From f1db3059b3c3e4ad637c3a5e029fc1118022451e Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Tue, 15 Jun 2021 12:46:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../property/addFeeConfig/addFeeConfig.html | 11 +- .../property/addFeeConfig/addFeeConfig.js | 133 +++++++++--------- .../property/editFeeConfig/editFeeConfig.html | 11 +- .../property/editFeeConfig/editFeeConfig.js | 3 +- .../roomCreateFeeAdd/roomCreateFeeAdd.html | 7 + .../roomCreateFeeAdd/roomCreateFeeAdd.js | 7 +- .../pages/property/payFeeOrder/payFeeOrder.js | 5 +- 7 files changed, 101 insertions(+), 76 deletions(-) diff --git a/public/components/property/addFeeConfig/addFeeConfig.html b/public/components/property/addFeeConfig/addFeeConfig.html index bd7506aff..9ca1e5943 100755 --- a/public/components/property/addFeeConfig/addFeeConfig.html +++ b/public/components/property/addFeeConfig/addFeeConfig.html @@ -86,14 +86,17 @@
+ v-show="addFeeConfigInfo.computingFormula != '2002' + && addFeeConfigInfo.computingFormula != '7007' + && addFeeConfigInfo.computingFormula != '8008' + && addFeeConfigInfo.computingFormula != '4004'">
+ v-show="addFeeConfigInfo.computingFormula != '7007' + && addFeeConfigInfo.computingFormula != '8008' + && addFeeConfigInfo.computingFormula != '4004'"> diff --git a/public/components/property/addFeeConfig/addFeeConfig.js b/public/components/property/addFeeConfig/addFeeConfig.js index db2be3f19..d12416872 100755 --- a/public/components/property/addFeeConfig/addFeeConfig.js +++ b/public/components/property/addFeeConfig/addFeeConfig.js @@ -24,7 +24,7 @@ billType: '', paymentCycle: '', paymentCd: '', - computingFormulaText:'' + computingFormulaText: '' } }, _initMethod: function () { @@ -109,96 +109,96 @@ }, addFeeConfigValidate() { return vc.validate.validate({ - addFeeConfigInfo: vc.component.addFeeConfigInfo - }, + addFeeConfigInfo: vc.component.addFeeConfigInfo + }, { 'addFeeConfigInfo.feeTypeCd': [{ limit: "required", param: "", errInfo: "费用类型不能为空" }, - { - limit: "num", - param: "", - errInfo: "费用类型格式错误" - }, + { + limit: "num", + param: "", + errInfo: "费用类型格式错误" + }, ], 'addFeeConfigInfo.feeName': [{ limit: "required", param: "", errInfo: "收费项目不能为空" }, - { - limit: "maxin", - param: "1,100", - errInfo: "收费项目不能超过100位" - }, + { + limit: "maxin", + param: "1,100", + errInfo: "收费项目不能超过100位" + }, ], 'addFeeConfigInfo.feeFlag': [{ limit: "required", param: "", errInfo: "费用标识不能为空" }, - { - limit: "num", - param: "", - errInfo: "费用类型格式错误" - }, + { + limit: "num", + param: "", + errInfo: "费用类型格式错误" + }, ], 'addFeeConfigInfo.startTime': [{ limit: "required", param: "", errInfo: "计费起始时间不能为空" }, - { - limit: "dateTime", - param: "", - errInfo: "计费起始时间不是有效的时间格式" - }, + { + limit: "dateTime", + param: "", + errInfo: "计费起始时间不是有效的时间格式" + }, ], 'addFeeConfigInfo.endTime': [{ limit: "required", param: "", errInfo: "计费终止时间不能为空" }, - { - limit: "dateTime", - param: "", - errInfo: "计费终止时间不是有效的时间格式" - }, + { + limit: "dateTime", + param: "", + errInfo: "计费终止时间不是有效的时间格式" + }, ], 'addFeeConfigInfo.computingFormula': [{ limit: "required", param: "", errInfo: "计算公式不能为空" }, - { - limit: "num", - param: "", - errInfo: "计算公式格式错误" - }, + { + limit: "num", + param: "", + errInfo: "计算公式格式错误" + }, ], 'addFeeConfigInfo.squarePrice': [{ limit: "required", param: "", errInfo: "计费单价不能为空" }, - { - limit: "moneyModulus", - param: "", - errInfo: "计费单价格式错误,如1.5000" - }, + { + limit: "moneyModulus", + param: "", + errInfo: "计费单价格式错误,如1.5000" + }, ], 'addFeeConfigInfo.additionalAmount': [{ limit: "required", param: "", errInfo: "附加费用不能为空" }, - { - limit: "money", - param: "", - errInfo: "附加费用格式错误" - }, + { + limit: "money", + param: "", + errInfo: "附加费用格式错误" + }, ], 'addFeeConfigInfo.billType': [{ limit: "required", @@ -211,47 +211,48 @@ param: "", errInfo: "缴费周期不能为空" }, - { - limit: "num", - param: "", - errInfo: "缴费周期必须为数字 单位月" - }, + { + limit: "num", + param: "", + errInfo: "缴费周期必须为数字 单位月" + }, ], 'addFeeConfigInfo.paymentCd': [{ limit: "required", param: "", errInfo: "付费类型不能为空" }, - { - limit: "num", - param: "", - errInfo: "付费类型格式错误" - }, + { + limit: "num", + param: "", + errInfo: "付费类型格式错误" + }, ] }); }, saveFeeConfigInfo: function () { - + //固定费用 if (vc.component.addFeeConfigInfo.computingFormula == '2002') { vc.component.addFeeConfigInfo.squarePrice = "0.00"; } //自定义费用 - if (vc.component.addFeeConfigInfo.computingFormula == '7007') { + if (vc.component.addFeeConfigInfo.computingFormula == '7007' || + vc.component.addFeeConfigInfo.computingFormula == '4004') { 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(); + //收费项目去空 + 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; @@ -264,8 +265,8 @@ return; } vc.http.post('addFeeConfig', 'save', JSON.stringify(vc.component.addFeeConfigInfo), { - emulateJSON: true - }, + emulateJSON: true + }, function (json, res) { //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); if (res.status == 200) { @@ -305,7 +306,7 @@ billType: '', paymentCycle: '', paymentCd: '', - computingFormulaText:'' + computingFormulaText: '' }; } } diff --git a/public/components/property/editFeeConfig/editFeeConfig.html b/public/components/property/editFeeConfig/editFeeConfig.html index 09659a485..f0c0dc7dd 100755 --- a/public/components/property/editFeeConfig/editFeeConfig.html +++ b/public/components/property/editFeeConfig/editFeeConfig.html @@ -89,14 +89,17 @@ v-model="editFeeConfigInfo.computingFormula">
+ v-show="editFeeConfigInfo.computingFormula != '2002' + && editFeeConfigInfo.computingFormula != '7007' + && editFeeConfigInfo.computingFormula != '8008' + && editFeeConfigInfo.computingFormula != '4004'">
+ v-show="editFeeConfigInfo.computingFormula != '7007' + && editFeeConfigInfo.computingFormula != '8008' + && editFeeConfigInfo.computingFormula != '4004'"> diff --git a/public/components/property/editFeeConfig/editFeeConfig.js b/public/components/property/editFeeConfig/editFeeConfig.js index cc3bdea2c..458dd75d1 100755 --- a/public/components/property/editFeeConfig/editFeeConfig.js +++ b/public/components/property/editFeeConfig/editFeeConfig.js @@ -235,7 +235,8 @@ vc.component.editFeeConfigInfo.squarePrice = "0.00"; } //自定义费用 - if (vc.component.editFeeConfigInfo.computingFormula == '7007') { + if (vc.component.editFeeConfigInfo.computingFormula == '7007' + ||vc.component.editFeeConfigInfo.computingFormula != '4004') { vc.component.editFeeConfigInfo.squarePrice = "0.00"; vc.component.editFeeConfigInfo.additionalAmount = "0.00"; } diff --git a/public/components/property/roomCreateFeeAdd/roomCreateFeeAdd.html b/public/components/property/roomCreateFeeAdd/roomCreateFeeAdd.html index f413d0eb0..b3ef691b4 100755 --- a/public/components/property/roomCreateFeeAdd/roomCreateFeeAdd.html +++ b/public/components/property/roomCreateFeeAdd/roomCreateFeeAdd.html @@ -87,6 +87,13 @@
+
+ +
+ +
+
diff --git a/public/components/property/roomCreateFeeAdd/roomCreateFeeAdd.js b/public/components/property/roomCreateFeeAdd/roomCreateFeeAdd.js index 5eda2afef..bd8cf80b8 100755 --- a/public/components/property/roomCreateFeeAdd/roomCreateFeeAdd.js +++ b/public/components/property/roomCreateFeeAdd/roomCreateFeeAdd.js @@ -21,7 +21,9 @@ roomType: '1010301', feeLayer: '全部', feeFlag: '', - endTime: '' + endTime: '', + computingFormula:'', + amount:'' } }, _initMethod: function () { @@ -210,6 +212,8 @@ feeLayer: '全部', feeFlag: '', endTime: '', + computingFormula:'', + amount:'' }; $that.roomCreateFeeAddInfo.feeTypeCds = _feeTypeCds; }, @@ -255,6 +259,7 @@ $that.roomCreateFeeAddInfo.feeConfigs.forEach(item => { if (_configId == item.configId) { $that.roomCreateFeeAddInfo.feeFlag = item.feeFlag; + $that.roomCreateFeeAddInfo.computingFormula = item.computingFormula; return; } }); diff --git a/public/pages/property/payFeeOrder/payFeeOrder.js b/public/pages/property/payFeeOrder/payFeeOrder.js index 6b00043ea..5b5f151c5 100755 --- a/public/pages/property/payFeeOrder/payFeeOrder.js +++ b/public/pages/property/payFeeOrder/payFeeOrder.js @@ -228,7 +228,8 @@ if (_cycles == '') { _newCycles = $that.payFeeOrderInfo.paymentCycles[0]; } - var price = parseFloat(_newCycles) * ((vc.component.payFeeOrderInfo.builtUpArea) * (vc.component.payFeeOrderInfo.squarePrice) + parseFloat(vc.component.payFeeOrderInfo.additionalAmount)); + //var price = parseFloat(_newCycles) * ((vc.component.payFeeOrderInfo.builtUpArea) * (vc.component.payFeeOrderInfo.squarePrice) + parseFloat(vc.component.payFeeOrderInfo.additionalAmount)); + var price = parseFloat(_newCycles) * parseFloat($that.payFeeOrderInfo.feePrice); // 调整为根据映射 取整 // let unFixedNum = Math.floor(parseFloat(_newCycles) * parseFloat(vc.component.payFeeOrderInfo.feePrice) * 100) / 100; vc.component.payFeeOrderInfo.totalFeePrice = $that._getFixedNum(price); @@ -250,7 +251,7 @@ if (_cycles == '') { return; } - var price = parseFloat(_cycles) * ((vc.component.payFeeOrderInfo.builtUpArea) * (vc.component.payFeeOrderInfo.squarePrice) + parseFloat(vc.component.payFeeOrderInfo.additionalAmount)); + var price = parseFloat(_cycles) * parseFloat($that.payFeeOrderInfo.feePrice); // let unFixedNum = Math.floor(parseFloat(_cycles) * parseFloat(vc.component.payFeeOrderInfo.feePrice) * 100) / 100; vc.component.payFeeOrderInfo.totalFeePrice = $that._getFixedNum(price); vc.component.payFeeOrderInfo.receivedAmount = vc.component.payFeeOrderInfo.totalFeePrice;