优化手机端停车费和物业费 打折处理

This commit is contained in:
java110 2020-12-04 10:55:17 +08:00
parent 00637f2393
commit 138c3ffb18

View File

@ -83,6 +83,9 @@
<text class="text-grey text-sm">{{endTime }}</text> <text class="text-grey text-sm">{{endTime }}</text>
</view> </view>
</view> </view>
<vc-discount ref="vcDiscountRef" @computeFeeDiscount="computeFeeDiscount" :feeId="feeId" :cycles="feeMonth"
:communityId="communityId"></vc-discount>
</view> </view>
</scroll-view> </scroll-view>
@ -109,6 +112,7 @@
// pages/payParkingFee/payParkingFee.js // pages/payParkingFee/payParkingFee.js
const context = require("../../context/Java110Context.js"); const context = require("../../context/Java110Context.js");
const constant = context.constant; const constant = context.constant;
import vcDiscount from '@/components/vc-discount/vc-discount.vue'
import { import {
addMonth, addMonth,
formatDate formatDate
@ -122,6 +126,9 @@
// #endif // #endif
export default { export default {
components: {
vcDiscount
},
data() { data() {
return { return {
showFeeMonth: false, showFeeMonth: false,
@ -192,6 +199,7 @@
var prevPage = pages[pages.length - 2]; // var prevPage = pages[pages.length - 2]; //
//setData() //setData()
prevPage.needFefresh = false; prevPage.needFefresh = false;
this.$refs.vcDiscountRef._loadFeeDiscount(this.feeId, this.communityId, this.feeMonth);
}, },
/** /**
@ -199,7 +207,9 @@
*/ */
onShareAppMessage: function() {}, onShareAppMessage: function() {},
methods: { methods: {
computeFeeDiscount: function(_price) {
this.receivableAmount = this.receivableAmount - _price;
},
dateChange: function(e) { dateChange: function(e) {
console.log("onConfirm", e); console.log("onConfirm", e);
let _feeMonthName = null; let _feeMonthName = null;
@ -216,6 +226,7 @@
this.receivableAmount = _receivableAmount; this.receivableAmount = _receivableAmount;
this.feeMonth = _feeMonth; this.feeMonth = _feeMonth;
this.endTime = formatDate(_newDate); this.endTime = formatDate(_newDate);
this.$refs.vcDiscountRef._loadFeeDiscount(this.feeId, this.communityId, this.feeMonth);
}, },
onFeeMonthCancel: function(e) { onFeeMonthCancel: function(e) {
this.showFeeMonth = false; this.showFeeMonth = false;