From d1b87c152c6e8b66bf6e6b39e975b2c286a23a9b Mon Sep 17 00:00:00 2001 From: xiao-fajia <1665375861@qq.com> Date: Wed, 25 Sep 2024 17:34:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repair/tickets/Components/UserInfo.vue | 302 +++++++++--------- 1 file changed, 158 insertions(+), 144 deletions(-) diff --git a/src/views/repair/tickets/Components/UserInfo.vue b/src/views/repair/tickets/Components/UserInfo.vue index 3a729f2..799e536 100644 --- a/src/views/repair/tickets/Components/UserInfo.vue +++ b/src/views/repair/tickets/Components/UserInfo.vue @@ -1,118 +1,118 @@ - + @@ -232,7 +233,7 @@ - +
会员卡券
@@ -242,20 +243,20 @@ size="mini" height="200" style="width: 100%"> - - - - - - + + + + + + - + @@ -279,12 +280,12 @@ {{ parseTime(scope.row.endTime) }} - - - - - - + + + + + +
@@ -319,10 +320,13 @@ B单 - - + - @@ -379,8 +383,8 @@ - 完成 - 结算 + 完成 + 结算 @@ -416,13 +420,20 @@ export default { }, watch: { selectUser(val) { - if (!val) { - this.selectUser = {} + if (val) { + this.selectCar = {} + this.bookingList = [] + this.couponList = [] + if (val.userId) { + this.getBooking(val.userId) + } + if (val.id) { + this.getCouponList(val.id) + } + } else { + this.selectCar = {} this.bookingList = [] this.couponList = [] - }else { - this.getBooking(val.userId) - this.getCouponList(val.id) } }, selectCar(val) { @@ -433,6 +444,7 @@ export default { }, data() { return { + isEnable: false, formData: { endCheck: 1, partDisposal: '01', @@ -483,7 +495,7 @@ export default { } }, methods: { - async getCouponList(id){ + async getCouponList(id) { const res = await CustomerMainApi.getCustomerMain(id); this.couponList = res.data.couponList this.finaCouponList = [ @@ -548,6 +560,7 @@ export default { }, // 登记保存 async handleSave() { + this.isEnable = true this.createInit() this.createItemInit() try { @@ -557,6 +570,7 @@ export default { } catch { } finally { this.formData.ticketNo = null + this.isEnable = false } }, // 初始化 @@ -714,16 +728,16 @@ export default { this.handleSave() }, // 查看用户的预约记录 - async getBooking(userId){ + async getBooking(userId) { const res = await request({ url: "/repair/booking/list?userId=" + userId, method: "get" }) this.bookingList = res.data - console.log(this.bookingList,723) + // console.log(this.bookingList,723) }, // 权益更改 - changeCoupon(data){ + changeCoupon(data) { this.finaCouponList.map(item => { item.isChoose = data.includes(item) }) @@ -739,7 +753,7 @@ export default {