From dc6df87b771878f13eb54e3b0a6795955ddf887b Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Thu, 23 Sep 2021 00:02:49 +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 --- .../applyDeleteFeeBatch.html | 56 +++++++++++ .../applyDeleteFeeBatch.js | 93 +++++++++++++++++++ .../property/payFeeBatch/payFeeBatch.html | 5 +- .../pages/property/payFeeBatch/payFeeBatch.js | 3 + 4 files changed, 155 insertions(+), 2 deletions(-) create mode 100644 public/components/property/applyDeleteFeeBatch/applyDeleteFeeBatch.html create mode 100644 public/components/property/applyDeleteFeeBatch/applyDeleteFeeBatch.js diff --git a/public/components/property/applyDeleteFeeBatch/applyDeleteFeeBatch.html b/public/components/property/applyDeleteFeeBatch/applyDeleteFeeBatch.html new file mode 100644 index 000000000..99f656c40 --- /dev/null +++ b/public/components/property/applyDeleteFeeBatch/applyDeleteFeeBatch.html @@ -0,0 +1,56 @@ +
\ No newline at end of file diff --git a/public/components/property/applyDeleteFeeBatch/applyDeleteFeeBatch.js b/public/components/property/applyDeleteFeeBatch/applyDeleteFeeBatch.js new file mode 100644 index 000000000..c96500c46 --- /dev/null +++ b/public/components/property/applyDeleteFeeBatch/applyDeleteFeeBatch.js @@ -0,0 +1,93 @@ +(function (vc) { + vc.extends({ + propTypes: { + callBackListener: vc.propTypes.string, //父组件名称 + callBackFunction: vc.propTypes.string //父组件监听方法 + }, + data: { + applyDeleteFeeBatchInfo: { + batchId: '', + createUserName: '', + createTime: '', + remark: '', + communityId: '' + } + }, + _initMethod: function () { + }, + _initEvent: function () { + vc.on('applyDeleteFeeBatch', 'openApply', function (_param) { + $that.clearApplyDeleteFeeBatchInfo(); + vc.copyObject(_param, $that.applyDeleteFeeBatchInfo); + $('#applyDeleteFeeBatchModel').modal('show'); + }); + }, + methods: { + applyDeleteFeeBatchInfoValidate() { + return vc.validate.validate({ + applyDeleteFeeBatchInfo: vc.component.applyDeleteFeeBatchInfo + }, { + 'applyDeleteFeeBatchInfo.batchId': [ + { + limit: "required", + param: "", + errInfo: "批次不能为空" + } + ], + 'applyDeleteFeeBatchInfo.remark': [ + { + limit: "required", + param: "", + errInfo: "取消原因不能为空" + } + ] + }); + }, + saveApplyDeleteFeeBatchInfo: function () { + if (!vc.component.applyDeleteFeeBatchInfoValidate()) { + vc.toast(vc.validate.errInfo); + return; + } + vc.component.applyDeleteFeeBatchInfo.communityId = vc.getCurrentCommunity().communityId; + //不提交数据将数据 回调给侦听处理 + if (vc.notNull($props.callBackListener)) { + vc.emit($props.callBackListener, $props.callBackFunction, vc.component.applyDeleteFeeBatchInfo); + $('#applyDeleteFeeBatchModel').modal('hide'); + return; + } + vc.http.apiPost( + '/payFeeBatch.applyDeletePayFeeBatchCmd', + JSON.stringify(vc.component.applyDeleteFeeBatchInfo), + { + emulateJSON: true + }, + function (json, res) { + //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); + let _json = JSON.parse(json); + if (_json.code == 0) { + //关闭model + $('#applyDeleteFeeBatchModel').modal('hide'); + vc.component.clearApplyDeleteFeeBatchInfo(); + vc.emit('pagination', 'page_event', 1); + location.reload(); + return; + } + vc.message(_json.msg); + }, + function (errInfo, error) { + console.log('请求失败处理'); + vc.message(errInfo); + }); + }, + clearApplyDeleteFeeBatchInfo: function () { + vc.component.applyDeleteFeeBatchInfo = { + batchId: '', + createUserName: '', + createTime: '', + remark: '', + communityId: '' + }; + }, + } + }); +})(window.vc); diff --git a/public/pages/property/payFeeBatch/payFeeBatch.html b/public/pages/property/payFeeBatch/payFeeBatch.html index ab9c5dc1d..0632717cc 100644 --- a/public/pages/property/payFeeBatch/payFeeBatch.html +++ b/public/pages/property/payFeeBatch/payFeeBatch.html @@ -23,13 +23,13 @@