From 8d2671a05ef13b9f5031844bdf033d3a6a4aa0ea Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Thu, 11 Jun 2020 10:09:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=A8=B3=E5=AE=9A=E7=89=88?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B4=B9=E7=94=A8=E9=A1=B9=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../property/addFeeConfig/addFeeConfig.html | 43 ++- .../property/addFeeConfig/addFeeConfig.js | 279 ++++++++++-------- .../property/editFeeConfig/editFeeConfig.html | 31 +- .../property/editFeeConfig/editFeeConfig.js | 40 ++- 4 files changed, 253 insertions(+), 140 deletions(-) diff --git a/public/components/property/addFeeConfig/addFeeConfig.html b/public/components/property/addFeeConfig/addFeeConfig.html index aceef7118..c3ce4f50c 100644 --- a/public/components/property/addFeeConfig/addFeeConfig.html +++ b/public/components/property/addFeeConfig/addFeeConfig.html @@ -7,19 +7,6 @@
- -
@@ -46,6 +33,34 @@
+
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
@@ -99,4 +114,4 @@
-
+
\ No newline at end of file diff --git a/public/components/property/addFeeConfig/addFeeConfig.js b/public/components/property/addFeeConfig/addFeeConfig.js index 93640fdab..5f928c9b7 100644 --- a/public/components/property/addFeeConfig/addFeeConfig.js +++ b/public/components/property/addFeeConfig/addFeeConfig.js @@ -1,4 +1,4 @@ -(function(vc) { +(function (vc) { vc.extends({ propTypes: { @@ -17,30 +17,34 @@ computingFormula: '', squarePrice: '', additionalAmount: '', - feeTypeCds:[], - computingFormulas:[] + feeTypeCds: [], + computingFormulas: [], + billType: '', + paymentCycle: '', + paymentCd: '' } }, - _initMethod: function() { + _initMethod: function () { vc.component._initAddFeeConfigDateInfo(); - vc.getDict('pay_fee_config',"fee_type_cd",function(_data){ + vc.getDict('pay_fee_config', "fee_type_cd", function (_data) { vc.component.addFeeConfigInfo.feeTypeCds = _data; }); - vc.getDict('pay_fee_config',"computing_formula",function(_data){ + vc.getDict('pay_fee_config', "computing_formula", function (_data) { vc.component.addFeeConfigInfo.computingFormulas = _data; }); }, - _initEvent: function() { + _initEvent: function () { vc.on('addFeeConfig', 'openAddFeeConfigModal', - function() { - $('#addFeeConfigModel').modal('show'); - }); + function () { + $('#addFeeConfigModel').modal('show'); + }); }, methods: { _initAddFeeConfigDateInfo: function () { vc.component.addFeeConfigInfo.startTime = vc.dateFormat(new Date().getTime()); $('.addFeeConfigStartTime').datetimepicker({ language: 'zh-CN', + fontAwesome: 'fa', format: 'yyyy-mm-dd hh:ii:ss', initTime: true, initialDate: new Date(), @@ -55,6 +59,7 @@ }); $('.addFeeConfigEndTime').datetimepicker({ language: 'zh-CN', + fontAwesome: 'fa', format: 'yyyy-mm-dd hh:ii:ss', initTime: true, initialDate: new Date(), @@ -71,102 +76,130 @@ return vc.validate.validate({ addFeeConfigInfo: vc.component.addFeeConfigInfo }, - { - 'addFeeConfigInfo.feeTypeCd': [{ - limit: "required", - param: "", - errInfo: "费用类型不能为空" - }, { - limit: "num", - param: "", - errInfo: "费用类型格式错误" - }, - ], - 'addFeeConfigInfo.feeName': [{ - limit: "required", - param: "", - errInfo: "收费项目不能为空" - }, - { - limit: "maxin", - param: "1,100", - errInfo: "收费项目不能超过100位" - }, - ], - 'addFeeConfigInfo.feeFlag': [{ - limit: "required", - param: "", - errInfo: "费用标识不能为空" - }, - { - limit: "num", - param: "", - errInfo: "费用类型格式错误" - }, - ], - 'addFeeConfigInfo.startTime': [{ - limit: "required", - param: "", - errInfo: "计费起始时间不能为空" - }, - { - limit: "dateTime", - param: "", - errInfo: "计费起始时间不是有效的时间格式" - }, - ], - 'addFeeConfigInfo.endTime': [{ - limit: "required", - param: "", - errInfo: "计费终止时间不能为空" - }, - { - limit: "dateTime", - param: "", - errInfo: "计费终止时间不是有效的时间格式" - }, - ], - 'addFeeConfigInfo.computingFormula': [{ - limit: "required", - param: "", - errInfo: "计算公式不能为空" - }, - { - limit: "num", - param: "", - errInfo: "计算公式格式错误" - }, - ], - 'addFeeConfigInfo.squarePrice': [{ - limit: "required", - param: "", - errInfo: "计费单价不能为空" - }, - { - limit: "money", - param: "", - errInfo: "计费单价格式错误" - }, - ], - 'addFeeConfigInfo.additionalAmount': [{ - limit: "required", - param: "", - errInfo: "附加费用不能为空" - }, - { - limit: "money", - param: "", - errInfo: "附加费用格式错误" - }, - ], + 'addFeeConfigInfo.feeTypeCd': [{ + limit: "required", + param: "", + errInfo: "费用类型不能为空" + }, + { + limit: "num", + param: "", + errInfo: "费用类型格式错误" + }, + ], + 'addFeeConfigInfo.feeName': [{ + limit: "required", + param: "", + errInfo: "收费项目不能为空" + }, + { + limit: "maxin", + param: "1,100", + errInfo: "收费项目不能超过100位" + }, + ], + 'addFeeConfigInfo.feeFlag': [{ + limit: "required", + param: "", + errInfo: "费用标识不能为空" + }, + { + limit: "num", + param: "", + errInfo: "费用类型格式错误" + }, + ], + 'addFeeConfigInfo.startTime': [{ + limit: "required", + param: "", + errInfo: "计费起始时间不能为空" + }, + { + limit: "dateTime", + param: "", + errInfo: "计费起始时间不是有效的时间格式" + }, + ], + 'addFeeConfigInfo.endTime': [{ + limit: "required", + param: "", + errInfo: "计费终止时间不能为空" + }, + { + limit: "dateTime", + param: "", + errInfo: "计费终止时间不是有效的时间格式" + }, + ], + 'addFeeConfigInfo.computingFormula': [{ + limit: "required", + param: "", + errInfo: "计算公式不能为空" + }, + { + limit: "num", + param: "", + errInfo: "计算公式格式错误" + }, + ], + 'addFeeConfigInfo.squarePrice': [{ + limit: "required", + param: "", + errInfo: "计费单价不能为空" + }, + { + limit: "money", + param: "", + errInfo: "计费单价格式错误" + }, + ], + 'addFeeConfigInfo.additionalAmount': [{ + limit: "required", + param: "", + errInfo: "附加费用不能为空" + }, + { + limit: "money", + param: "", + errInfo: "附加费用格式错误" + }, + ], + 'addFeeConfigInfo.billType': [{ + limit: "required", + param: "", + errInfo: "出账类型不能为空" + } + ], + 'addFeeConfigInfo.paymentCycle': [{ + limit: "required", + param: "", + errInfo: "缴费周期不能为空" + }, + { + limit: "num", + param: "", + errInfo: "缴费周期必须为数字 单位月" + }, + ], + 'addFeeConfigInfo.paymentCd': [{ + limit: "required", + param: "", + errInfo: "付费类型不能为空" + }, + { + limit: "num", + param: "", + errInfo: "付费类型格式错误" + }, + ] - }); + }); }, - saveFeeConfigInfo: function() { + saveFeeConfigInfo: function () { //固定费用 - if(vc.component.addFeeConfigInfo.computingFormula == '2002'){ - vc.component.addFeeConfigInfo.squarePrice = "0.00"; + if (vc.component.addFeeConfigInfo.computingFormula == '2002') { + vc.component.addFeeConfigInfo.squarePrice = "0.00"; } if (!vc.component.addFeeConfigValidate()) { vc.toast(vc.validate.errInfo); @@ -185,28 +218,28 @@ vc.http.post('addFeeConfig', 'save', JSON.stringify(vc.component.addFeeConfigInfo), { emulateJSON: true }, - function(json, res) { - //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); - if (res.status == 200) { - //关闭model - $('#addFeeConfigModel').modal('hide'); - vc.component.clearAddFeeConfigInfo(); - vc.emit('feeConfigManage', 'listFeeConfig', {}); + function (json, res) { + //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); + if (res.status == 200) { + //关闭model + $('#addFeeConfigModel').modal('hide'); + vc.component.clearAddFeeConfigInfo(); + vc.emit('feeConfigManage', 'listFeeConfig', {}); - return; - } - vc.toast(json); + return; + } + vc.toast(json); - }, - function(errInfo, error) { - console.log('请求失败处理'); + }, + function (errInfo, error) { + console.log('请求失败处理'); - vc.toast(errInfo); + vc.toast(errInfo); - }); + }); }, - clearAddFeeConfigInfo: function() { - var _feeTypeCds = vc.component.addFeeConfigInfo.feeTypeCds; + clearAddFeeConfigInfo: function () { + var _feeTypeCds = vc.component.addFeeConfigInfo.feeTypeCds; var _computingFormulas = vc.component.addFeeConfigInfo.computingFormulas; vc.component.addFeeConfigInfo = { feeTypeCd: '', @@ -217,9 +250,11 @@ computingFormula: '', squarePrice: '', additionalAmount: '', - feeTypeCds:_feeTypeCds, - computingFormulas:_computingFormulas - + feeTypeCds: _feeTypeCds, + computingFormulas: _computingFormulas, + paymentCycle:'', + paymentCd:'', + billType: '' }; } } diff --git a/public/components/property/editFeeConfig/editFeeConfig.html b/public/components/property/editFeeConfig/editFeeConfig.html index 21539a324..b04990238 100644 --- a/public/components/property/editFeeConfig/editFeeConfig.html +++ b/public/components/property/editFeeConfig/editFeeConfig.html @@ -33,6 +33,35 @@ + +
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
@@ -86,4 +115,4 @@
- + \ No newline at end of file diff --git a/public/components/property/editFeeConfig/editFeeConfig.js b/public/components/property/editFeeConfig/editFeeConfig.js index 5115acc17..1e87c4aef 100644 --- a/public/components/property/editFeeConfig/editFeeConfig.js +++ b/public/components/property/editFeeConfig/editFeeConfig.js @@ -14,7 +14,10 @@ additionalAmount: '0.00', isDefault:'', feeTypeCds:[], - computingFormulas:[] + computingFormulas:[], + billType:'', + paymentCycle:'', + paymentCd:'' } }, _initMethod: function() { @@ -40,6 +43,7 @@ vc.component.editFeeConfigInfo.startTime = vc.dateFormat(new Date().getTime()); $('.editFeeConfigStartTime').datetimepicker({ language: 'zh-CN', + fontAwesome: 'fa', format: 'yyyy-mm-dd hh:ii:ss', initTime: true, initialDate: new Date(), @@ -54,6 +58,7 @@ }); $('.editFeeConfigEndTime').datetimepicker({ language: 'zh-CN', + fontAwesome: 'fa', format: 'yyyy-mm-dd hh:ii:ss', initTime: true, initialDate: new Date(), @@ -163,7 +168,34 @@ limit: "required", param: "", errInfo: "费用项ID不能为空" - }] + }], + 'editFeeConfigInfo.billType': [{ + limit: "required", + param: "", + errInfo: "出账类型不能为空" + }], + 'editFeeConfigInfo.paymentCycle': [{ + limit: "required", + param: "", + errInfo: "缴费周期不能为空" + }, + { + limit: "num", + param: "", + errInfo: "缴费周期必须为数字 单位月" + }, + ], + 'editFeeConfigInfo.paymentCd': [{ + limit: "required", + param: "", + errInfo: "付费类型不能为空" + }, + { + limit: "num", + param: "", + errInfo: "付费类型格式错误" + }, + ] }); }, @@ -209,7 +241,9 @@ computingFormula: '', squarePrice: '', additionalAmount: '', - isDefault:'' + isDefault:'', + paymentCycle:'', + paymentCd:'' }; vc.component.editFeeConfigInfo.feeTypeCds = _feeTypeCds; vc.component.editFeeConfigInfo.computingFormulas = _computingFormulas;