From 4febedea6db99ccabf733875b8cafa198f1495c9 Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Wed, 25 Nov 2020 12:21:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=8A=A0=E5=85=A5=20?= =?UTF-8?q?=E6=8A=98=E6=89=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../addPayFeeConfigDiscount.html | 43 ++++++ .../addPayFeeConfigDiscount.js | 137 ++++++++++++++++++ .../choosePayFeeConfigDiscount.html | 58 ++++++++ .../choosePayFeeConfigDiscount.js | 63 ++++++++ .../deletePayFeeConfigDiscount.html | 19 +++ .../deletePayFeeConfigDiscount.js | 52 +++++++ .../editPayFeeConfigDiscount.html | 38 +++++ .../editPayFeeConfigDiscount.js | 101 +++++++++++++ .../viewPayFeeConfigDiscountInfo.html | 44 ++++++ .../viewPayFeeConfigDiscountInfo.js | 49 +++++++ .../feeConfigManage/feeConfigManage.html | 12 +- .../feeConfigManage/feeConfigManage.js | 3 + .../feeDiscountManage/feeDiscountManage.html | 5 +- .../payFeeConfigDiscountManage.html | 61 ++++++++ .../payFeeConfigDiscountManage.js | 86 +++++++++++ 15 files changed, 765 insertions(+), 6 deletions(-) create mode 100644 public/components/property/addPayFeeConfigDiscount/addPayFeeConfigDiscount.html create mode 100644 public/components/property/addPayFeeConfigDiscount/addPayFeeConfigDiscount.js create mode 100644 public/components/property/choosePayFeeConfigDiscount/choosePayFeeConfigDiscount.html create mode 100644 public/components/property/choosePayFeeConfigDiscount/choosePayFeeConfigDiscount.js create mode 100644 public/components/property/deletePayFeeConfigDiscount/deletePayFeeConfigDiscount.html create mode 100644 public/components/property/deletePayFeeConfigDiscount/deletePayFeeConfigDiscount.js create mode 100644 public/components/property/editPayFeeConfigDiscount/editPayFeeConfigDiscount.html create mode 100644 public/components/property/editPayFeeConfigDiscount/editPayFeeConfigDiscount.js create mode 100644 public/components/property/viewPayFeeConfigDiscountInfo/viewPayFeeConfigDiscountInfo.html create mode 100644 public/components/property/viewPayFeeConfigDiscountInfo/viewPayFeeConfigDiscountInfo.js create mode 100644 public/pages/property/payFeeConfigDiscountManage/payFeeConfigDiscountManage.html create mode 100644 public/pages/property/payFeeConfigDiscountManage/payFeeConfigDiscountManage.js diff --git a/public/components/property/addPayFeeConfigDiscount/addPayFeeConfigDiscount.html b/public/components/property/addPayFeeConfigDiscount/addPayFeeConfigDiscount.html new file mode 100644 index 000000000..1512aad35 --- /dev/null +++ b/public/components/property/addPayFeeConfigDiscount/addPayFeeConfigDiscount.html @@ -0,0 +1,43 @@ +
\ No newline at end of file diff --git a/public/components/property/addPayFeeConfigDiscount/addPayFeeConfigDiscount.js b/public/components/property/addPayFeeConfigDiscount/addPayFeeConfigDiscount.js new file mode 100644 index 000000000..90b3a84b7 --- /dev/null +++ b/public/components/property/addPayFeeConfigDiscount/addPayFeeConfigDiscount.js @@ -0,0 +1,137 @@ +(function (vc) { + + vc.extends({ + propTypes: { + callBackListener: vc.propTypes.string, //父组件名称 + callBackFunction: vc.propTypes.string //父组件监听方法 + }, + data: { + addPayFeeConfigDiscountInfo: { + configDiscountId: '', + discountId: '', + configId: '', + discountType: '', + discounts: [], + } + }, + _initMethod: function () { + + }, + _initEvent: function () { + vc.on('addPayFeeConfigDiscount', 'openAddPayFeeConfigDiscountModal', function (_param) { + + vc.copyObject(_param, $that.addPayFeeConfigDiscountInfo); + $('#addPayFeeConfigDiscountModel').modal('show'); + }); + }, + methods: { + addPayFeeConfigDiscountValidate() { + return vc.validate.validate({ + addPayFeeConfigDiscountInfo: vc.component.addPayFeeConfigDiscountInfo + }, { + 'addPayFeeConfigDiscountInfo.configId': [ + { + limit: "required", + param: "", + errInfo: "费用项不能为空" + }, + { + limit: "num", + param: "", + errInfo: "费用项格式错误" + }, + ], + 'addPayFeeConfigDiscountInfo.discountId': [ + { + limit: "required", + param: "", + errInfo: "折扣名称不能为空" + }, + { + limit: "num", + param: "", + errInfo: "折扣格式错误" + }, + ] + }); + }, + savePayFeeConfigDiscountInfo: function () { + if (!vc.component.addPayFeeConfigDiscountValidate()) { + vc.toast(vc.validate.errInfo); + return; + } + + vc.component.addPayFeeConfigDiscountInfo.communityId = vc.getCurrentCommunity().communityId; + //不提交数据将数据 回调给侦听处理 + if (vc.notNull($props.callBackListener)) { + vc.emit($props.callBackListener, $props.callBackFunction, vc.component.addPayFeeConfigDiscountInfo); + $('#addPayFeeConfigDiscountModel').modal('hide'); + return; + } + + vc.http.apiPost( + '/payFeeConfigDiscount/savePayFeeConfigDiscount', + JSON.stringify(vc.component.addPayFeeConfigDiscountInfo), + { + emulateJSON: true + }, + function (json, res) { + //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); + let _json = JSON.parse(json); + if (_json.code == 0) { + //关闭model + $('#addPayFeeConfigDiscountModel').modal('hide'); + vc.component.clearAddPayFeeConfigDiscountInfo(); + vc.emit('payFeeConfigDiscountManage', 'listPayFeeConfigDiscount', {}); + + return; + } + vc.message(_json.msg); + + }, + function (errInfo, error) { + console.log('请求失败处理'); + + vc.message(errInfo); + + }); + }, + clearAddPayFeeConfigDiscountInfo: function () { + vc.component.addPayFeeConfigDiscountInfo = { + configDiscountId: '', + discountId: '', + configId: '', + discountType: '', + discounts: [] + }; + }, + _changeAddPayFeeConfigDiscountType: function () { + + if ($that.addPayFeeConfigDiscountInfo.discountType == '') { + return; + } + $that.addPayFeeConfigDiscountInfo.discounts = []; + var param = { + params: { + page: 1, + row: 100, + communityId: vc.getCurrentCommunity().communityId, + discountType: $that.addPayFeeConfigDiscountInfo.discountType + } + }; + //发送get请求 + vc.http.apiGet('/feeDiscount/queryFeeDiscount', + param, + function (json, res) { + let _feeDiscountManageInfo = JSON.parse(json); + + $that.addPayFeeConfigDiscountInfo.discounts = _feeDiscountManageInfo.data; + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + } + } + }); + +})(window.vc); diff --git a/public/components/property/choosePayFeeConfigDiscount/choosePayFeeConfigDiscount.html b/public/components/property/choosePayFeeConfigDiscount/choosePayFeeConfigDiscount.html new file mode 100644 index 000000000..6e29d3b9d --- /dev/null +++ b/public/components/property/choosePayFeeConfigDiscount/choosePayFeeConfigDiscount.html @@ -0,0 +1,58 @@ + diff --git a/public/components/property/choosePayFeeConfigDiscount/choosePayFeeConfigDiscount.js b/public/components/property/choosePayFeeConfigDiscount/choosePayFeeConfigDiscount.js new file mode 100644 index 000000000..33c832152 --- /dev/null +++ b/public/components/property/choosePayFeeConfigDiscount/choosePayFeeConfigDiscount.js @@ -0,0 +1,63 @@ +(function(vc){ + vc.extends({ + propTypes: { + emitChoosePayFeeConfigDiscount:vc.propTypes.string, + emitLoadData:vc.propTypes.string + }, + data:{ + choosePayFeeConfigDiscountInfo:{ + payFeeConfigDiscounts:[], + _currentPayFeeConfigDiscountName:'', + } + }, + _initMethod:function(){ + }, + _initEvent:function(){ + vc.on('choosePayFeeConfigDiscount','openChoosePayFeeConfigDiscountModel',function(_param){ + $('#choosePayFeeConfigDiscountModel').modal('show'); + vc.component._refreshChoosePayFeeConfigDiscountInfo(); + vc.component._loadAllPayFeeConfigDiscountInfo(1,10,''); + }); + }, + methods:{ + _loadAllPayFeeConfigDiscountInfo:function(_page,_row,_name){ + var param = { + params:{ + page:_page, + row:_row, + communityId:vc.getCurrentCommunity().communityId, + name:_name + } + }; + + //发送get请求 + vc.http.apiGet('payFeeConfigDiscount.listPayFeeConfigDiscounts', + param, + function(json){ + var _payFeeConfigDiscountInfo = JSON.parse(json); + vc.component.choosePayFeeConfigDiscountInfo.payFeeConfigDiscounts = _payFeeConfigDiscountInfo.payFeeConfigDiscounts; + },function(){ + console.log('请求失败处理'); + } + ); + }, + choosePayFeeConfigDiscount:function(_payFeeConfigDiscount){ + if(_payFeeConfigDiscount.hasOwnProperty('name')){ + _payFeeConfigDiscount.payFeeConfigDiscountName = _payFeeConfigDiscount.name; + } + vc.emit($props.emitChoosePayFeeConfigDiscount,'choosePayFeeConfigDiscount',_payFeeConfigDiscount); + vc.emit($props.emitLoadData,'listPayFeeConfigDiscountData',{ + payFeeConfigDiscountId:_payFeeConfigDiscount.payFeeConfigDiscountId + }); + $('#choosePayFeeConfigDiscountModel').modal('hide'); + }, + queryPayFeeConfigDiscounts:function(){ + vc.component._loadAllPayFeeConfigDiscountInfo(1,10,vc.component.choosePayFeeConfigDiscountInfo._currentPayFeeConfigDiscountName); + }, + _refreshChoosePayFeeConfigDiscountInfo:function(){ + vc.component.choosePayFeeConfigDiscountInfo._currentPayFeeConfigDiscountName = ""; + } + } + + }); +})(window.vc); diff --git a/public/components/property/deletePayFeeConfigDiscount/deletePayFeeConfigDiscount.html b/public/components/property/deletePayFeeConfigDiscount/deletePayFeeConfigDiscount.html new file mode 100644 index 000000000..8065d562d --- /dev/null +++ b/public/components/property/deletePayFeeConfigDiscount/deletePayFeeConfigDiscount.html @@ -0,0 +1,19 @@ + diff --git a/public/components/property/deletePayFeeConfigDiscount/deletePayFeeConfigDiscount.js b/public/components/property/deletePayFeeConfigDiscount/deletePayFeeConfigDiscount.js new file mode 100644 index 000000000..f59ffcf28 --- /dev/null +++ b/public/components/property/deletePayFeeConfigDiscount/deletePayFeeConfigDiscount.js @@ -0,0 +1,52 @@ +(function(vc,vm){ + + vc.extends({ + data:{ + deletePayFeeConfigDiscountInfo:{ + + } + }, + _initMethod:function(){ + + }, + _initEvent:function(){ + vc.on('deletePayFeeConfigDiscount','openDeletePayFeeConfigDiscountModal',function(_params){ + + vc.component.deletePayFeeConfigDiscountInfo = _params; + $('#deletePayFeeConfigDiscountModel').modal('show'); + + }); + }, + methods:{ + deletePayFeeConfigDiscount:function(){ + vc.component.deletePayFeeConfigDiscountInfo.communityId=vc.getCurrentCommunity().communityId; + vc.http.apiPost( + 'payFeeConfigDiscount.deletePayFeeConfigDiscount', + JSON.stringify(vc.component.deletePayFeeConfigDiscountInfo), + { + emulateJSON:true + }, + function(json,res){ + //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); + let _json = JSON.parse(json); + if (_json.code == 0) { + //关闭model + $('#deletePayFeeConfigDiscountModel').modal('hide'); + vc.emit('payFeeConfigDiscountManage','listPayFeeConfigDiscount',{}); + return ; + } + vc.message(_json.msg); + }, + function(errInfo,error){ + console.log('请求失败处理'); + vc.message(json); + + }); + }, + closeDeletePayFeeConfigDiscountModel:function(){ + $('#deletePayFeeConfigDiscountModel').modal('hide'); + } + } + }); + +})(window.vc,window.vc.component); diff --git a/public/components/property/editPayFeeConfigDiscount/editPayFeeConfigDiscount.html b/public/components/property/editPayFeeConfigDiscount/editPayFeeConfigDiscount.html new file mode 100644 index 000000000..e2b54914a --- /dev/null +++ b/public/components/property/editPayFeeConfigDiscount/editPayFeeConfigDiscount.html @@ -0,0 +1,38 @@ + diff --git a/public/components/property/editPayFeeConfigDiscount/editPayFeeConfigDiscount.js b/public/components/property/editPayFeeConfigDiscount/editPayFeeConfigDiscount.js new file mode 100644 index 000000000..e0019121e --- /dev/null +++ b/public/components/property/editPayFeeConfigDiscount/editPayFeeConfigDiscount.js @@ -0,0 +1,101 @@ +(function(vc,vm){ + + vc.extends({ + data:{ + editPayFeeConfigDiscountInfo:{ + configDiscountId:'', +discountId:'', +discountId:'', + + } + }, + _initMethod:function(){ + + }, + _initEvent:function(){ + vc.on('editPayFeeConfigDiscount','openEditPayFeeConfigDiscountModal',function(_params){ + vc.component.refreshEditPayFeeConfigDiscountInfo(); + $('#editPayFeeConfigDiscountModel').modal('show'); + vc.copyObject(_params, vc.component.editPayFeeConfigDiscountInfo ); + vc.component.editPayFeeConfigDiscountInfo.communityId = vc.getCurrentCommunity().communityId; + }); + }, + methods:{ + editPayFeeConfigDiscountValidate:function(){ + return vc.validate.validate({ + editPayFeeConfigDiscountInfo:vc.component.editPayFeeConfigDiscountInfo + },{ + 'editPayFeeConfigDiscountInfo.discountId':[ +{ + limit:"required", + param:"", + errInfo:"折扣名称不能为空" + }, + { + limit:"num", + param:"", + errInfo:"折扣格式错误" + }, + ], +'editPayFeeConfigDiscountInfo.discountId':[ +{ + limit:"required", + param:"", + errInfo:"折扣名称不能为空" + }, + { + limit:"num", + param:"", + errInfo:"折扣格式错误" + }, + ], +'editPayFeeConfigDiscountInfo.configDiscountId':[ +{ + limit:"required", + param:"", + errInfo:"费用折扣ID不能为空" + }] + + }); + }, + editPayFeeConfigDiscount:function(){ + if(!vc.component.editPayFeeConfigDiscountValidate()){ + vc.toast(vc.validate.errInfo); + return ; + } + + vc.http.apiPost( + 'payFeeConfigDiscount.updatePayFeeConfigDiscount', + JSON.stringify(vc.component.editPayFeeConfigDiscountInfo), + { + emulateJSON:true + }, + function(json,res){ + //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); + let _json = JSON.parse(json); + if (_json.code == 0) { + //关闭model + $('#editPayFeeConfigDiscountModel').modal('hide'); + vc.emit('payFeeConfigDiscountManage','listPayFeeConfigDiscount',{}); + return ; + } + vc.message(_json.msg); + }, + function(errInfo,error){ + console.log('请求失败处理'); + + vc.message(errInfo); + }); + }, + refreshEditPayFeeConfigDiscountInfo:function(){ + vc.component.editPayFeeConfigDiscountInfo= { + configDiscountId:'', +discountId:'', +discountId:'', + + } + } + } + }); + +})(window.vc,window.vc.component); diff --git a/public/components/property/viewPayFeeConfigDiscountInfo/viewPayFeeConfigDiscountInfo.html b/public/components/property/viewPayFeeConfigDiscountInfo/viewPayFeeConfigDiscountInfo.html new file mode 100644 index 000000000..c4eec4057 --- /dev/null +++ b/public/components/property/viewPayFeeConfigDiscountInfo/viewPayFeeConfigDiscountInfo.html @@ -0,0 +1,44 @@ +