zjiaru zidingyigognshi

This commit is contained in:
java110 2021-02-26 16:25:27 +08:00
parent 482094c21b
commit 3490da0da3
5 changed files with 179 additions and 114 deletions

View File

@ -1,5 +1,5 @@
<div id="addFeeConfigModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-body">
@ -13,7 +13,7 @@
<select class="custom-select" v-model="addFeeConfigInfo.feeTypeCd">
<option selected disabled value="">必填,请选择费用类型</option>
<option v-for="(item,index) in addFeeConfigInfo.feeTypeCds" :key="index"
v-bind:value="item.statusCd">
v-bind:value="item.statusCd">
{{item.name}}
</option>
</select>
@ -23,7 +23,7 @@
<label class="col-sm-2 col-form-label">收费项目</label>
<div class="col-sm-10">
<input v-model="addFeeConfigInfo.feeName" type="text" placeholder="必填,请填写收费项目"
class="form-control">
class="form-control">
</div>
</div>
<div class="form-group row">
@ -32,7 +32,7 @@
<select class="custom-select" v-model="addFeeConfigInfo.feeFlag">
<option selected disabled value="">必填,请选择费用标识</option>
<option v-for="(item,index) in addFeeConfigInfo.feeFlags" :key="index"
:value="item.statusCd">{{item.name}}
:value="item.statusCd">{{item.name}}
</option>
</select>
</div>
@ -43,7 +43,7 @@
<select class="custom-select" v-model="addFeeConfigInfo.paymentCd">
<option selected disabled value="">必填,请选择付费类型</option>
<option v-for="(item,index) in addFeeConfigInfo.paymentCds" :key="index"
:value="item.statusCd">{{item.name}}
:value="item.statusCd">{{item.name}}
</option>
</select>
</div>
@ -52,7 +52,7 @@
<label class="col-sm-2 col-form-label">缴费周期</label>
<div class="col-sm-10">
<input v-model="addFeeConfigInfo.paymentCycle" type="text"
placeholder="必填,请填写缴费周期 单位为月" class="form-control">
placeholder="必填,请填写缴费周期 单位为月" class="form-control">
</div>
</div>
<div class="form-group row">
@ -61,7 +61,7 @@
<select class="custom-select" v-model="addFeeConfigInfo.billType">
<option selected disabled value="">必填,请选择催缴类型</option>
<option v-for="(item,index) in addFeeConfigInfo.billTypes" :key="index"
:value="item.statusCd">{{item.name}}
:value="item.statusCd">{{item.name}}
</option>
</select>
</div>
@ -70,14 +70,14 @@
<label class="col-sm-2 col-form-label">计费起始时间</label>
<div class="col-sm-10">
<input v-model="addFeeConfigInfo.startTime" type="text" placeholder="必填,请填写计费起始时间"
class="form-control addFeeConfigStartTime" name="startTime">
class="form-control addFeeConfigStartTime" name="startTime">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">计费终止时间</label>
<div class="col-sm-10">
<input v-model="addFeeConfigInfo.endTime" type="text" placeholder="必填,请填写计费终止时间"
class="form-control addFeeConfigEndTime" name="endTime">
class="form-control addFeeConfigEndTime" name="endTime">
</div>
</div>
<div class="form-group row">
@ -86,33 +86,56 @@
<select class="custom-select" v-model="addFeeConfigInfo.computingFormula">
<option selected disabled value="">必填,请选择计算公式</option>
<option v-for="(item,index) in addFeeConfigInfo.computingFormulas" :key="index"
v-bind:value="item.statusCd">{{item.name}}
v-if="item.statusCd != '4004'" v-bind:value="item.statusCd">{{item.name}}
</option>
</select>
</div>
</div>
<div class="form-group row" v-if="addFeeConfigInfo.computingFormula != '2002'">
<div class="form-group row"
v-if="addFeeConfigInfo.computingFormula != '2002' && addFeeConfigInfo.computingFormula != '7007' ">
<label class="col-sm-2 col-form-label">计费单价</label>
<div class="col-sm-10">
<input v-model="addFeeConfigInfo.squarePrice" type="text" placeholder="必填,请填写计费单价"
class="form-control">
class="form-control">
</div>
</div>
<div class="form-group row">
<div class="form-group row" v-if="addFeeConfigInfo.computingFormula != '7007'">
<label class="col-sm-2 col-form-label">{{addFeeConfigInfo.computingFormula == '1001'
?'附加费用':'固定费用'}}</label>
<div class="col-sm-10">
<input v-model="addFeeConfigInfo.additionalAmount" type="text"
placeholder="必填,请填写附加费用" class="form-control">
placeholder="必填,请填写附加费用" class="form-control">
</div>
</div>
<div v-else>
<div class="form-group row">
<label class="col-sm-2 col-form-label">公式</label>
<div class="col-sm-10">
<textarea v-model="addFeeConfigInfo.computingFormulaText" placeholder="必填,请填写公式"
class="form-control"></textarea>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">说明</label>
<div class="col-sm-10">
<div>C 代表房屋对应小区面积</div>
<div>F 代表房屋对应楼栋面积</div>
<div>U 代表房屋对应单元面积</div>
<div>R 代表房屋面积</div>
<div>X 代表房屋收费系数(房屋管理中配置)</div>
<div>L 代表房屋层数</div>
<div>举例:电梯使用费 (层数-5)*每层单价+基础费用</div>
<div>公式:(L-5)*5 + 10</div>
</div>
</div>
</div>
<div class="ibox-content">
<button class="btn btn-primary float-right" type="button"
v-on:click="saveFeeConfigInfo()">
v-on:click="saveFeeConfigInfo()">
<i class="fa fa-check"></i>&nbsp;保存
</button>
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
data-dismiss="modal">
data-dismiss="modal">
<i class="fa fa-times"></i>&nbsp;取消
</button>
</div>

View File

@ -23,7 +23,8 @@
billTypes: [],
billType: '',
paymentCycle: '',
paymentCd: ''
paymentCd: '',
computingFormulaText:''
}
},
_initMethod: function () {
@ -230,21 +231,27 @@
});
},
saveFeeConfigInfo: function () {
//收费项目去空
vc.component.addFeeConfigInfo.feeName = vc.component.addFeeConfigInfo.feeName.trim();
//缴费周期去空
vc.component.addFeeConfigInfo.paymentCycle = vc.component.addFeeConfigInfo.paymentCycle.trim();
//计费单价去空
vc.component.addFeeConfigInfo.squarePrice = vc.component.addFeeConfigInfo.squarePrice.trim();
//附加费用去空
vc.component.addFeeConfigInfo.additionalAmount = vc.component.addFeeConfigInfo.additionalAmount.trim();
//固定费用
if (vc.component.addFeeConfigInfo.computingFormula == '2002') {
vc.component.addFeeConfigInfo.squarePrice = "0.00";
}
//自定义费用
if (vc.component.addFeeConfigInfo.computingFormula == '7007') {
vc.component.addFeeConfigInfo.squarePrice = "0.00";
vc.component.addFeeConfigInfo.additionalAmount = "0.00";
}
if (vc.component.addFeeConfigInfo.feeFlag == '2006012') {
vc.component.addFeeConfigInfo.paymentCycle = '1';
}
//收费项目去空
vc.component.addFeeConfigInfo.feeName = vc.component.addFeeConfigInfo.feeName.trim();
//缴费周期去空
vc.component.addFeeConfigInfo.paymentCycle = vc.component.addFeeConfigInfo.paymentCycle.trim();
//计费单价去空
vc.component.addFeeConfigInfo.squarePrice = vc.component.addFeeConfigInfo.squarePrice.trim();
//附加费用去空
vc.component.addFeeConfigInfo.additionalAmount = vc.component.addFeeConfigInfo.additionalAmount.trim();
if (!vc.component.addFeeConfigValidate()) {
vc.toast(vc.validate.errInfo);
return;
@ -297,7 +304,8 @@
billTypes: _billTypes,
billType: '',
paymentCycle: '',
paymentCd: ''
paymentCd: '',
computingFormulaText:''
};
}
}

View File

@ -1,5 +1,5 @@
<div id="editFeeConfigModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-body">
@ -11,10 +11,10 @@
<label class="col-sm-2 col-form-label">费用类型</label>
<div class="col-sm-10">
<select class="custom-select" v-bind:disabled="editFeeConfigInfo.isDefault=='T'"
v-model="editFeeConfigInfo.feeTypeCd">
v-model="editFeeConfigInfo.feeTypeCd">
<option selected disabled value="">必填,请选择费用类型</option>
<option v-for="(item,index) in editFeeConfigInfo.feeTypeCds" :key="index"
v-bind:value="item.statusCd">{{item.name}}
v-bind:value="item.statusCd">{{item.name}}
</option>
</select>
</div>
@ -23,18 +23,18 @@
<label class="col-sm-2 col-form-label">收费项目</label>
<div class="col-sm-10">
<input v-model="editFeeConfigInfo.feeName"
v-bind:disabled="editFeeConfigInfo.isDefault=='T'" type="text"
placeholder="必填,请填写收费项目" class="form-control">
v-bind:disabled="editFeeConfigInfo.isDefault=='T'" type="text"
placeholder="必填,请填写收费项目" class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">费用标识</label>
<div class="col-sm-10">
<select class="custom-select" v-bind:disabled="editFeeConfigInfo.isDefault=='T'"
v-model="editFeeConfigInfo.feeFlag">
v-model="editFeeConfigInfo.feeFlag">
<option selected disabled value="">必填,请选择费用标识</option>
<option v-for="(item,index) in editFeeConfigInfo.feeFlags" :key="index"
:value="item.statusCd">{{item.name}}
:value="item.statusCd">{{item.name}}
</option>
</select>
</div>
@ -46,7 +46,7 @@
<select class="custom-select" v-model="editFeeConfigInfo.paymentCd">
<option selected disabled value="">必填,请选择付费类型</option>
<option v-for="(item,index) in editFeeConfigInfo.paymentCds" :key="index"
:value="item.statusCd">{{item.name}}
:value="item.statusCd">{{item.name}}
</option>
</select>
</div>
@ -55,7 +55,7 @@
<label class="col-sm-2 col-form-label">缴费周期</label>
<div class="col-sm-10">
<input v-model="editFeeConfigInfo.paymentCycle" type="text"
placeholder="必填,请填写缴费周期 单位为月" class="form-control">
placeholder="必填,请填写缴费周期 单位为月" class="form-control">
</div>
</div>
<div class="form-group row">
@ -64,7 +64,7 @@
<select class="custom-select" v-model="editFeeConfigInfo.billType">
<option selected disabled value="">必填,请选择催缴类型</option>
<option v-for="(item,index) in editFeeConfigInfo.billTypes" :key="index"
:value="item.statusCd">{{item.name}}
:value="item.statusCd">{{item.name}}
</option>
</select>
</div>
@ -73,41 +73,67 @@
<label class="col-sm-2 col-form-label">计费起始时间</label>
<div class="col-sm-10">
<input v-model="editFeeConfigInfo.startTime" type="text" placeholder="必填,请填写计费起始时间"
class="form-control editFeeConfigStartTime">
class="form-control editFeeConfigStartTime">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">计费终止时间</label>
<div class="col-sm-10">
<input v-model="editFeeConfigInfo.endTime" type="text" placeholder="必填,请填写计费终止时间"
class="form-control editFeeConfigEndTime">
class="form-control editFeeConfigEndTime">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">计算公式</label>
<div class="col-sm-10">
<select class="custom-select" v-bind:disabled="editFeeConfigInfo.isDefault=='T'"
v-model="editFeeConfigInfo.computingFormula">
v-model="editFeeConfigInfo.computingFormula">
<option selected disabled value="">必填,请选择计算公式</option>
<option v-for="(item,index) in editFeeConfigInfo.computingFormulas" :key="index"
v-bind:value="item.statusCd">{{item.name}}
v-if="item.statusCd != '4004'" v-bind:value="item.statusCd">{{item.name}}
</option>
</select>
</div>
</div>
<div class="form-group row" v-if="editFeeConfigInfo.computingFormula != '2002'">
<div class="form-group row"
v-if="editFeeConfigInfo.computingFormula != '2002' && editFeeConfigInfo.computingFormula != '7007'">
<label class="col-sm-2 col-form-label">计费单价</label>
<div class="col-sm-10">
<input v-model="editFeeConfigInfo.squarePrice" type="text" placeholder="必填,请填写计费单价"
class="form-control">
class="form-control">
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">{{editFeeConfigInfo.computingFormula == '1001'
<div class="form-group row" v-if="editFeeConfigInfo.computingFormula != '7007'">
<label class="col-sm-2 col-form-label">{{editFeeConfigInfo.computingFormula
== '1001'
?'附加费用':'固定费用'}}</label>
<div class="col-sm-10">
<input v-model="editFeeConfigInfo.additionalAmount" type="text"
placeholder="必填,请填写附加费用" class="form-control">
placeholder="必填,请填写附加费用" class="form-control">
</div>
</div>
<div v-else>
<div class="form-group row">
<label class="col-sm-2 col-form-label">公式</label>
<div class="col-sm-10">
<textarea v-model="editFeeConfigInfo.computingFormulaText"
placeholder="必填,请填写公式" class="form-control"></textarea>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">说明</label>
<div class="col-sm-10">
<div>T 代表总量,如电费总使用量</div>
<div>C 代表房屋对应小区面积</div>
<div>F 代表房屋对应楼栋面积</div>
<div>U 代表房屋对应单元面积</div>
<div>R 代表房屋面积</div>
<div>X 代表房屋收费系数(房屋管理中配置)</div>
<div>L 代表房屋对应楼栋房屋数</div>
<div>D 代表房屋对应单元房屋数</div>
<div>举例:公共区域公摊电费 电量/楼栋面积*房屋面积</div>
<div>公式T/F * R</div>
</div>
</div>
</div>
@ -116,7 +142,7 @@
<i class="fa fa-check"></i>&nbsp;保存
</button>
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
data-dismiss="modal">
data-dismiss="modal">
<i class="fa fa-times"></i>&nbsp;取消
</button>
</div>
@ -126,4 +152,4 @@
</div>
</div>
</div>
</div>
</div>

View File

@ -19,7 +19,8 @@
paymentCds: [],
billType: '',
paymentCycle: '',
paymentCd: ''
paymentCd: '',
computingFormulaText: ''
}
},
_initMethod: function () {
@ -102,96 +103,96 @@
},
editFeeConfigValidate: function () {
return vc.validate.validate({
editFeeConfigInfo: vc.component.editFeeConfigInfo
},
editFeeConfigInfo: vc.component.editFeeConfigInfo
},
{
'editFeeConfigInfo.feeTypeCd': [{
limit: "required",
param: "",
errInfo: "费用类型不能为空"
},
{
limit: "num",
param: "",
errInfo: "费用类型格式错误"
},
{
limit: "num",
param: "",
errInfo: "费用类型格式错误"
},
],
'editFeeConfigInfo.feeName': [{
limit: "required",
param: "",
errInfo: "收费项目不能为空"
},
{
limit: "maxin",
param: "1,100",
errInfo: "收费项目不能超过100位"
},
{
limit: "maxin",
param: "1,100",
errInfo: "收费项目不能超过100位"
},
],
'editFeeConfigInfo.feeFlag': [{
limit: "required",
param: "",
errInfo: "费用标识不能为空"
},
{
limit: "num",
param: "",
errInfo: "费用类型格式错误"
},
{
limit: "num",
param: "",
errInfo: "费用类型格式错误"
},
],
'editFeeConfigInfo.startTime': [{
limit: "required",
param: "",
errInfo: "计费起始时间不能为空"
},
{
limit: "dateTime",
param: "",
errInfo: "计费起始时间不是有效的时间格式"
},
{
limit: "dateTime",
param: "",
errInfo: "计费起始时间不是有效的时间格式"
},
],
'editFeeConfigInfo.endTime': [{
limit: "required",
param: "",
errInfo: "计费终止时间不能为空"
},
{
limit: "dateTime",
param: "",
errInfo: "计费终止时间不是有效的时间格式"
},
{
limit: "dateTime",
param: "",
errInfo: "计费终止时间不是有效的时间格式"
},
],
'editFeeConfigInfo.computingFormula': [{
limit: "required",
param: "",
errInfo: "计算公式不能为空"
},
{
limit: "num",
param: "",
errInfo: "计算公式格式错误"
},
{
limit: "num",
param: "",
errInfo: "计算公式格式错误"
},
],
'editFeeConfigInfo.squarePrice': [{
limit: "required",
param: "",
errInfo: "计费单价不能为空"
},
{
limit: "moneyModulus",
param: "",
errInfo: "计费单价格式错误如1.5000"
},
{
limit: "moneyModulus",
param: "",
errInfo: "计费单价格式错误如1.5000"
},
],
'editFeeConfigInfo.additionalAmount': [{
limit: "required",
param: "",
errInfo: "附加费用不能为空"
},
{
limit: "moneyModulus",
param: "",
errInfo: "附加费用格式错误"
},
{
limit: "moneyModulus",
param: "",
errInfo: "附加费用格式错误"
},
],
'editFeeConfigInfo.configId': [{
limit: "required",
@ -208,26 +209,39 @@
param: "",
errInfo: "缴费周期不能为空"
},
{
limit: "num",
param: "",
errInfo: "缴费周期必须为数字 单位月"
},
{
limit: "num",
param: "",
errInfo: "缴费周期必须为数字 单位月"
},
],
'editFeeConfigInfo.paymentCd': [{
limit: "required",
param: "",
errInfo: "付费类型不能为空"
},
{
limit: "num",
param: "",
errInfo: "付费类型格式错误"
},
{
limit: "num",
param: "",
errInfo: "付费类型格式错误"
},
]
});
},
editFeeConfig: function () {
//固定费用
if (vc.component.editFeeConfigInfo.computingFormula == '2002') {
vc.component.editFeeConfigInfo.squarePrice = "0.00";
}
//自定义费用
if (vc.component.editFeeConfigInfo.computingFormula == '7007') {
vc.component.editFeeConfigInfo.squarePrice = "0.00";
vc.component.editFeeConfigInfo.additionalAmount = "0.00";
}
if (vc.component.editFeeConfigInfo.feeFlag == '2006012') {
vc.component.editFeeConfigInfo.paymentCycle = '1';
}
//收费项目去空
vc.component.editFeeConfigInfo.feeName = vc.component.editFeeConfigInfo.feeName.trim();
//计费单价去空
@ -236,20 +250,13 @@
vc.component.editFeeConfigInfo.additionalAmount = vc.component.editFeeConfigInfo.additionalAmount.trim();
//缴费周期去空
vc.component.editFeeConfigInfo.paymentCycle = vc.component.editFeeConfigInfo.paymentCycle.trim();
//固定费用
if (vc.component.editFeeConfigInfo.computingFormula == '2002') {
vc.component.editFeeConfigInfo.squarePrice = "0.00";
}
if (vc.component.editFeeConfigInfo.feeFlag == '2006012') {
vc.component.editFeeConfigInfo.paymentCycle = '1';
}
if (!vc.component.editFeeConfigValidate()) {
vc.toast(vc.validate.errInfo);
return;
}
vc.http.post('editFeeConfig', 'update', JSON.stringify(vc.component.editFeeConfigInfo), {
emulateJSON: true
},
emulateJSON: true
},
function (json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
if (res.status == 200) {
@ -284,7 +291,8 @@
isDefault: '',
paymentCycle: '',
paymentCd: '',
billType: ''
billType: '',
computingFormulaText: ''
};
vc.component.editFeeConfigInfo.feeTypeCds = _feeTypeCds;
vc.component.editFeeConfigInfo.computingFormulas = _computingFormulas;

View File

@ -105,8 +105,8 @@
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">费用项ID</th>
<th class="text-center">费用项</th>
<!-- <th class="text-center">费用项ID</th>
<th class="text-center">费用项</th> -->
<th class="text-center">费用类型</th>
<th class="text-center">收费项目</th>
<th class="text-center">费用标识</th>
@ -122,8 +122,8 @@
</thead>
<tbody>
<tr v-for="feeConfig in feeConfigManageInfo.feeConfigs">
<td class="text-center">{{feeConfig.configId}}</td>
<td class="text-center">{{feeConfig.isDefault=='T'?'默认费用':'自定义费用'}}</td>
<!-- <td class="text-center">{{feeConfig.configId}}</td>
<td class="text-center">{{feeConfig.isDefault=='T'?'默认费用':'自定义费用'}}</td> -->
<td class="text-center">{{feeConfig.feeTypeCdName}}</td>
<td class="text-center">{{feeConfig.feeName}}</td>
<td class="text-center">{{feeConfig.feeFlagName}}</td>