From c036fa31530a2d725f37dced7fbe5f2c568b53ec Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Sat, 12 Oct 2024 12:30:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=8D=95=E6=8C=87=E6=B4=BE=E5=A4=9A?= =?UTF-8?q?=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/repair/Components/WorkerChoose.vue | 66 +++++++++++++++++++ .../repair/tickets/Components/TicketItem.vue | 17 +++-- .../tickets/Components/TicketItemShow.vue | 2 +- .../repair/tickets/Components/UserInfo.vue | 4 +- 4 files changed, 79 insertions(+), 10 deletions(-) create mode 100644 src/views/repair/Components/WorkerChoose.vue diff --git a/src/views/repair/Components/WorkerChoose.vue b/src/views/repair/Components/WorkerChoose.vue new file mode 100644 index 0000000..ad0eed0 --- /dev/null +++ b/src/views/repair/Components/WorkerChoose.vue @@ -0,0 +1,66 @@ + + + + + + + + + + + diff --git a/src/views/repair/tickets/Components/TicketItem.vue b/src/views/repair/tickets/Components/TicketItem.vue index 8c9748e..abbb80e 100644 --- a/src/views/repair/tickets/Components/TicketItem.vue +++ b/src/views/repair/tickets/Components/TicketItem.vue @@ -62,9 +62,9 @@ - - {{ scope.row.repair ? scope.row.repair.name : scope.row.repair }} + + {{ scope.row.repair ? getRepairName(scope.row.repair) : scope.row.repair }} @@ -132,10 +132,12 @@ import request from "@/utils/request"; import {getOtherByName} from "@/api/repair/other"; import {getProjectByName} from "@/api/repair/project"; import {getWaresByName} from "@/api/repair/wares"; +import WorkerChoose from "@/views/repair/Components/WorkerChoose.vue"; export default { name: "TicketItem", components: { + WorkerChoose, OtherForm, OtherChoose, ProjectChoose, RepairProjectForm, WaresForm, ServerChoose, StaffChoose, PartChoose }, @@ -183,6 +185,7 @@ export default { watch: { list: { handler(val) { + // console.log(val) this.$emit("tableData", val) const coupons = val.filter(item => item.coupon).map(item => item.coupon) if (coupons && coupons.length > 0) { @@ -192,7 +195,7 @@ export default { deep: true }, inListData(val) { - console.log(val) + // console.log(val) if (val && val.length > 0) { val.forEach(item => { item = { @@ -281,7 +284,7 @@ export default { }, /** 保存数据 */ save(row) { - // TODO 有BUG 更新表格 + // console.log(row) if (row.id) { row.itemStatus = (row.repair && this.itemType === 'project') ? "02" : "01" row.totalPrice = row.count * row.price * (row.discount / 10) @@ -387,8 +390,8 @@ export default { }) } }, - getCouponName(id) { - // this. + getRepairName(data) { + return data.map(item => item.userName).join(',') } } } diff --git a/src/views/repair/tickets/Components/TicketItemShow.vue b/src/views/repair/tickets/Components/TicketItemShow.vue index 26a3457..b58dff1 100644 --- a/src/views/repair/tickets/Components/TicketItemShow.vue +++ b/src/views/repair/tickets/Components/TicketItemShow.vue @@ -31,7 +31,7 @@ - + diff --git a/src/views/repair/tickets/Components/UserInfo.vue b/src/views/repair/tickets/Components/UserInfo.vue index b3d22ff..e6bfa1f 100644 --- a/src/views/repair/tickets/Components/UserInfo.vue +++ b/src/views/repair/tickets/Components/UserInfo.vue @@ -552,8 +552,8 @@ export default { itemPrice: item.price, itemDiscount: item.discount, itemMoney: item.totalPrice, - repairId: item?.repair?.id, - repairName: item?.repair?.name, + repairIds: item?.repair.map(i => i.id).join(','), + repairNames: item?.repair.map(i => i.userName).join(','), saleId: item?.sale?.id, saleName: item?.sale?.name, itemTypeId: item?.type?.id,