From 0100f93a2a7edd4f47821268220926b1306019c4 Mon Sep 17 00:00:00 2001 From: xiao-fajia <1665375861@qq.com> Date: Wed, 25 Sep 2024 15:42:23 +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 --- src/views/repair/Components/StaffChoose.vue | 7 +- .../repair/tickets/Components/TicketItem.vue | 32 +- .../repair/tickets/Components/UserInfo.vue | 439 +++++++++++++----- 3 files changed, 356 insertions(+), 122 deletions(-) diff --git a/src/views/repair/Components/StaffChoose.vue b/src/views/repair/Components/StaffChoose.vue index 8131b62..924d790 100644 --- a/src/views/repair/Components/StaffChoose.vue +++ b/src/views/repair/Components/StaffChoose.vue @@ -13,6 +13,11 @@ export default { props: { value: { type: Object, + }, + isGet:{ + type: String, + default: '', + required: false } }, data() { @@ -41,7 +46,7 @@ export default { methods: { async listStaff() { try { - if (this.hasRequest) return; + if (!this.isGet) return; const res = await getStaffList() this.staffList = res.data this.hasRequest = true diff --git a/src/views/repair/tickets/Components/TicketItem.vue b/src/views/repair/tickets/Components/TicketItem.vue index fbb7431..703ebec 100644 --- a/src/views/repair/tickets/Components/TicketItem.vue +++ b/src/views/repair/tickets/Components/TicketItem.vue @@ -21,6 +21,14 @@ {{ scope.row.name ? scope.row.name : scope.row.goods }} + + + + + + + + @@ -55,14 +63,14 @@
+ :select-width="'15rem'" :is-get="scope.row.id"/> {{ scope.row.repair ? scope.row.repair.name : scope.row.repair }}
+ :select-width="'15rem'" :is-get="scope.row.id"/> {{ scope.row.sale ? scope.row.sale.name : scope.row.sale }}
@@ -137,14 +145,23 @@ export default { type:Array, default: () => {return []}, required: false + }, + couponList: { + type: Array, + default: () => {return []}, + required: false } }, data() { return { loading: false, - list: [{}], + list: [{ + coupon:{ + id: null + } + }], // 需要编辑的属性 - editProp: ["goods", 'count', 'price', 'discount', 'repair', 'sale', 'remark', 'type', 'accountType'], + editProp: ["goods", 'count', 'price', 'discount', 'repair', 'sale', 'remark', 'type', 'accountType', 'coupon'], // 保存进入编辑的cell clickCellMap: {}, selectRepair: {}, @@ -159,6 +176,10 @@ export default { list: { handler(val) { this.$emit("tableData", val) + const coupons = val.filter(item => item.coupon).map(item => item.coupon) + if (coupons && coupons.length > 0){ + this.$emit("changeCoupon", coupons) + } }, deep: true }, @@ -320,6 +341,9 @@ export default { }, returnOther() { + }, + getCouponName(id){ + // this. } } } diff --git a/src/views/repair/tickets/Components/UserInfo.vue b/src/views/repair/tickets/Components/UserInfo.vue index 79e2710..05d8296 100644 --- a/src/views/repair/tickets/Components/UserInfo.vue +++ b/src/views/repair/tickets/Components/UserInfo.vue @@ -1,118 +1,294 @@