From 6b819127636f5b53a84d463e2ec3a707279d0fe1 Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Sun, 27 Nov 2022 17:49:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9B=A8=E8=8A=B1=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../deleteCouponPropertyPoolDetail.html | 19 ++++ .../deleteCouponPropertyPoolDetail.js | 52 +++++++++++ .../giftCouponPropertyPool.html | 60 ++++++++++++ .../giftCouponPropertyPool.js | 93 +++++++++++++++++++ .../couponPropertyPoolDetail.html | 41 +++++--- .../couponPropertyPoolDetail.js | 6 ++ .../couponPropertyPoolManage.html | 15 ++- .../couponPropertyPoolManage.js | 3 + .../couponPropertyUserDetail.html | 19 +--- .../couponPropertyUserDetail.js | 10 +- 10 files changed, 276 insertions(+), 42 deletions(-) create mode 100644 public/components/scm/deleteCouponPropertyPoolDetail/deleteCouponPropertyPoolDetail.html create mode 100644 public/components/scm/deleteCouponPropertyPoolDetail/deleteCouponPropertyPoolDetail.js create mode 100644 public/components/scm/giftCouponPropertyPool/giftCouponPropertyPool.html create mode 100644 public/components/scm/giftCouponPropertyPool/giftCouponPropertyPool.js diff --git a/public/components/scm/deleteCouponPropertyPoolDetail/deleteCouponPropertyPoolDetail.html b/public/components/scm/deleteCouponPropertyPoolDetail/deleteCouponPropertyPoolDetail.html new file mode 100644 index 000000000..0d8da39f8 --- /dev/null +++ b/public/components/scm/deleteCouponPropertyPoolDetail/deleteCouponPropertyPoolDetail.html @@ -0,0 +1,19 @@ +
diff --git a/public/components/scm/deleteCouponPropertyPoolDetail/deleteCouponPropertyPoolDetail.js b/public/components/scm/deleteCouponPropertyPoolDetail/deleteCouponPropertyPoolDetail.js new file mode 100644 index 000000000..b1d65abe6 --- /dev/null +++ b/public/components/scm/deleteCouponPropertyPoolDetail/deleteCouponPropertyPoolDetail.js @@ -0,0 +1,52 @@ +(function(vc,vm){ + + vc.extends({ + data:{ + deleteCouponPropertyPoolDetailInfo:{ + + } + }, + _initMethod:function(){ + + }, + _initEvent:function(){ + vc.on('deleteCouponPropertyPoolDetail','openDeleteCouponPropertyPoolModal',function(_params){ + + vc.component.deleteCouponPropertyPoolDetailInfo = _params; + $('#deleteCouponPropertyPoolDetailModel').modal('show'); + + }); + }, + methods:{ + deleteCouponPropertyPoolDetail:function(){ + vc.component.deleteCouponPropertyPoolDetailInfo.communityId=vc.getCurrentCommunity().communityId; + vc.http.apiPost( + '/couponProperty.deleteCouponPropertyPoolDetail', + JSON.stringify(vc.component.deleteCouponPropertyPoolDetailInfo), + { + emulateJSON:true + }, + function(json,res){ + //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); + let _json = JSON.parse(json); + if (_json.code == 0) { + //关闭model + $('#deleteCouponPropertyPoolDetailModel').modal('hide'); + vc.emit('couponPropertyPoolDetail', 'listCouponPropertyPool',{}); + return ; + } + vc.message(_json.msg); + }, + function(errInfo,error){ + console.log('请求失败处理'); + vc.message(json); + + }); + }, + closeDeleteCouponPropertyPoolModel:function(){ + $('#deleteCouponPropertyPoolDetailModel').modal('hide'); + } + } + }); + +})(window.vc,window.vc.component); diff --git a/public/components/scm/giftCouponPropertyPool/giftCouponPropertyPool.html b/public/components/scm/giftCouponPropertyPool/giftCouponPropertyPool.html new file mode 100644 index 000000000..f035deb3e --- /dev/null +++ b/public/components/scm/giftCouponPropertyPool/giftCouponPropertyPool.html @@ -0,0 +1,60 @@ + \ No newline at end of file diff --git a/public/components/scm/giftCouponPropertyPool/giftCouponPropertyPool.js b/public/components/scm/giftCouponPropertyPool/giftCouponPropertyPool.js new file mode 100644 index 000000000..8f0ef10a2 --- /dev/null +++ b/public/components/scm/giftCouponPropertyPool/giftCouponPropertyPool.js @@ -0,0 +1,93 @@ +(function (vc) { + + vc.extends({ + data: { + giftCouponPropertyPoolInfo: { + cppId: '', + couponName: '', + giftCount: '', + tel: '', + } + }, + _initMethod: function () { + + }, + _initEvent: function () { + vc.on('giftCouponPropertyPool', 'openGiftCouponPropertyPoolModal', function (_coupon) { + vc.copyObject(_coupon, $that.giftCouponPropertyPoolInfo); + $('#giftCouponPropertyPoolModel').modal('show'); + }); + }, + methods: { + giftCouponPropertyPoolValidate() { + return vc.validate.validate({ + giftCouponPropertyPoolInfo: vc.component.giftCouponPropertyPoolInfo + }, { + 'giftCouponPropertyPoolInfo.cppId': [ + { + limit: "required", + param: "", + errInfo: "优惠券不能为空" + }, + ], + 'giftCouponPropertyPoolInfo.giftCount': [ + { + limit: "required", + param: "", + errInfo: "数量不能为空" + } + ], + 'giftCouponPropertyPoolInfo.tel': [ + { + limit: "required", + param: "", + errInfo: "业主手机号不能为空" + } + ], + }); + }, + saveCouponPropertyPoolInfo: function () { + if (!vc.component.giftCouponPropertyPoolValidate()) { + vc.toast(vc.validate.errInfo); + return; + } + vc.component.giftCouponPropertyPoolInfo.communityId = vc.getCurrentCommunity().communityId; + vc.http.apiPost( + '/couponProperty.giftCouponProperty', + JSON.stringify(vc.component.giftCouponPropertyPoolInfo), + { + emulateJSON: true + }, + function (json, res) { + //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); + let _json = JSON.parse(json); + if (_json.code == 0) { + //关闭model + $('#giftCouponPropertyPoolModel').modal('hide'); + vc.component.clearGiftCouponPropertyPoolInfo(); + vc.emit('couponPropertyPoolManage', 'listCouponPropertyPool', {}); + return; + } + vc.toast(_json.msg); + + }, + function (errInfo, error) { + console.log('请求失败处理'); + + vc.toast(errInfo); + + }); + }, + clearGiftCouponPropertyPoolInfo: function () { + vc.component.giftCouponPropertyPoolInfo = { + cppId: '', + couponName: '', + giftCount: '', + tel: '', + + }; + }, + } + }); + +})(window.vc); diff --git a/public/pages/scm/couponPropertyPoolDetail/couponPropertyPoolDetail.html b/public/pages/scm/couponPropertyPoolDetail/couponPropertyPoolDetail.html index a98f7d112..f2e349c75 100644 --- a/public/pages/scm/couponPropertyPoolDetail/couponPropertyPoolDetail.html +++ b/public/pages/scm/couponPropertyPoolDetail/couponPropertyPoolDetail.html @@ -7,9 +7,6 @@