From ccc127d839c67a69cc45587e97d86e37c5fb7b40 Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Sat, 26 Nov 2022 13:49:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=B4=E8=B4=B9=E9=A1=B5=E9=9D=A2=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E8=B4=AD=E7=89=A9=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/fee/feeApi.js | 22 +++++++++++ components/coupon/gift-coupon.vue | 65 +++++++++++++++++++++++++++++++ constant/url.js | 3 +- pages/fee/contractFee.vue | 7 +++- pages/fee/payParkingFee.vue | 9 ++++- pages/fee/roomFee.vue | 7 +++- 6 files changed, 107 insertions(+), 6 deletions(-) create mode 100644 components/coupon/gift-coupon.vue diff --git a/api/fee/feeApi.js b/api/fee/feeApi.js index 6b6e8a9..235a5f5 100755 --- a/api/fee/feeApi.js +++ b/api/fee/feeApi.js @@ -270,6 +270,28 @@ export function generatorCouponQrcode(_objData) { }); }) } + +export function computePayFeeCoupon(_objData) { + return new Promise((resolve, reject) => { + request({ + url: url.computePayFeeCoupon, + method: "GET", + data: _objData, //动态数据 + success: function(res) { + if (res.statusCode == 200) { + //成功情况下跳转 + resolve(res.data); + return; + } + reject(); + }, + fail: function(e) { + reject(); + } + }); + }) +} + export function receiveParkingCoupon(_objData) { diff --git a/components/coupon/gift-coupon.vue b/components/coupon/gift-coupon.vue new file mode 100644 index 0000000..a69bb61 --- /dev/null +++ b/components/coupon/gift-coupon.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/constant/url.js b/constant/url.js index d1e682f..b366315 100755 --- a/constant/url.js +++ b/constant/url.js @@ -171,8 +171,7 @@ export default { listInspectionTaskDetails:baseUrl +"app/inspectionTaskDetail.listInspectionTaskDetails", // 优惠券核销二维码生成 generatorCouponQrcode:baseUrl +"app/couponProperty.generatorCouponQrcode", - - + computePayFeeCoupon:baseUrl +"app/coupon.computePayFeeCoupon", NEED_NOT_LOGIN_PAGE: [ 'pages/login/login', diff --git a/pages/fee/contractFee.vue b/pages/fee/contractFee.vue index ce12e1d..73be1e5 100644 --- a/pages/fee/contractFee.vue +++ b/pages/fee/contractFee.vue @@ -82,6 +82,7 @@ {{endTime }} + @@ -108,6 +109,7 @@ // pages/fee/payParkingFee.js import context from '../../lib/java110/Java110Context.js'; const constant = context.constant; + import giftCoupon from '@/components/coupon/gift-coupon.vue' import vcDiscount from '@/components/vc-discount/vc-discount.vue' @@ -127,7 +129,8 @@ import {getCurContract} from '../../api/contract/contractApi.js' export default { components:{ - vcDiscount + vcDiscount, + giftCoupon }, data() { return { @@ -216,6 +219,7 @@ this.$nextTick(() => { this.$refs.vcDiscountRef._loadFeeDiscount(this.feeId,this.communityId,this.feeMonth); + this.$refs.giftCoupon.listGiftCoupon(this.feeId, this.communityId, this.feeMonth); }) }, methods: { @@ -237,6 +241,7 @@ this.feeMonth = _feeMonth; this.endTime = formatDate(_newDate); this.$refs.vcDiscountRef._loadFeeDiscount(this.feeId,this.communityId,this.feeMonth); + this.$refs.giftCoupon.listGiftCoupon(this.feeId, this.communityId, this.feeMonth); }, onFeeMonthChange: function(e) { console.log(e); diff --git a/pages/fee/payParkingFee.vue b/pages/fee/payParkingFee.vue index c50f53e..b527355 100755 --- a/pages/fee/payParkingFee.vue +++ b/pages/fee/payParkingFee.vue @@ -83,6 +83,7 @@ {{endTime }} + @@ -113,7 +114,8 @@ import context from '../../lib/java110/Java110Context.js'; const constant = context.constant; - import vcDiscount from '@/components/vc-discount/vc-discount.vue' + import vcDiscount from '@/components/vc-discount/vc-discount.vue'; + import giftCoupon from '@/components/coupon/gift-coupon.vue' import vcUserAccount from '@/components/vc-user-account/vc-user-account.vue' import { addMonth, @@ -133,7 +135,8 @@ export default { components: { vcDiscount, - vcUserAccount + vcUserAccount, + giftCoupon }, data() { return { @@ -221,6 +224,7 @@ this.$nextTick(() => { this.$refs.vcDiscountRef._loadFeeDiscount(this.feeId, this.communityId, this.feeMonth); this.$refs.vcUserAccountRef._listOwnerAccount(this.feeId, this.communityId); + this.$refs.giftCoupon.listGiftCoupon(this.feeId, this.communityId, this.feeMonth); }); this.payOnline = _fee.payOnline; }, @@ -269,6 +273,7 @@ this.endTime = formatDate(_newDate); this.receivableAmount = _feeMonth * this.feePrice; this.$refs.vcDiscountRef._loadFeeDiscount(this.feeId, this.communityId, this.feeMonth); + this.$refs.giftCoupon.listGiftCoupon(this.feeId, this.communityId, this.feeMonth); }, onFeeMonthCancel: function(e) { this.showFeeMonth = false; diff --git a/pages/fee/roomFee.vue b/pages/fee/roomFee.vue index c085ac9..db7eaa6 100755 --- a/pages/fee/roomFee.vue +++ b/pages/fee/roomFee.vue @@ -125,6 +125,7 @@ {{couponAmount}} + @@ -157,6 +158,7 @@ const constant = context.constant; import vcDiscount from '@/components/vc-discount/vc-discount.vue'; + import giftCoupon from '@/components/coupon/gift-coupon.vue' import vcUserAccount from '@/components/vc-user-account/vc-user-account.vue'; import { @@ -171,7 +173,8 @@ export default { components: { vcDiscount, - vcUserAccount + vcUserAccount, + giftCoupon }, data() { return { @@ -290,6 +293,7 @@ this.$nextTick(() => { this.$refs.vcDiscountRef._loadFeeDiscount(this.feeId, this.communityId, this.feeMonth); this.$refs.vcUserAccountRef._listOwnerAccount(this.feeId, this.communityId); + this.$refs.giftCoupon.listGiftCoupon(this.feeId, this.communityId, this.feeMonth); }) }, onShow() { @@ -369,6 +373,7 @@ this.endTime = formatDate(_newDate); this.receivableAmount = this.getReceivableAmount(); this.$refs.vcDiscountRef._loadFeeDiscount(this.feeId, this.communityId, this.feeMonth); + this.$refs.giftCoupon.listGiftCoupon(this.feeId, this.communityId, this.feeMonth); }, onFeeMonthChange: function(e) {