From a795cc2120318f5cfea03c099f72a34efdecebc1 Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Thu, 5 Dec 2024 16:29:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=93=E5=BA=93=E5=AF=B9=E9=85=8D=E4=BB=B6?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=8D=95=E7=9A=84=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stockOperate/Components/WaresItem.vue | 36 ++++++++++++++----- .../repair/tickets/Components/TWIAdd.vue | 8 +++++ 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/views/repair/stockOperate/Components/WaresItem.vue b/src/views/repair/stockOperate/Components/WaresItem.vue index 7dcea25..6f4d15a 100644 --- a/src/views/repair/stockOperate/Components/WaresItem.vue +++ b/src/views/repair/stockOperate/Components/WaresItem.vue @@ -13,8 +13,10 @@ - 导出 + 导出 + @@ -65,6 +67,14 @@ 重置 + + + + 添加配件 + + + - +
- + @@ -272,6 +282,8 @@ + +
@@ -292,10 +304,11 @@ import {getBaseTypeList} from "@/api/base/type"; import {listByTicketId} from "@/api/repair/repairworker"; import StaffChoose from "@/views/repair/Components/StaffChoose.vue"; import SupplierChoose from "@/views/repair/Components/SupplierChoose.vue"; +import TWIAdd from "@/views/repair/tickets/Components/TWIAdd.vue"; export default { name: "WaresItem", - components: {SupplierChoose, StaffChoose, TicketWaresShow, WarehouseChoose, SoTable}, + components: {TWIAdd, SupplierChoose, StaffChoose, TicketWaresShow, WarehouseChoose, SoTable}, props: { type: Boolean, }, @@ -352,6 +365,12 @@ export default { this.getList() }, methods: { + handleAddWares(){ + this.$refs.twiAdd.open({id: this.twId}) + }, + handleSuccess(data){ + this.getTwitemList({twId: this.twId}) + }, getTypeById(id) { return this.typeMap.get(id) }, @@ -421,7 +440,7 @@ export default { this.images = null this.inPhoto = true }, - async getTicketStaff(){ + async getTicketStaff() { const res = await listByTicketId(this.ticketId) this.staffs = res.data this.chooseStaff.push(this.formData.repairId) @@ -433,7 +452,7 @@ export default { return item.replace(process.env.VUE_APP_FILE_API, "") }).join(",") } - if ((!this.chooseStaff || this.chooseStaff.length === 0)){ + if ((!this.chooseStaff || this.chooseStaff.length === 0)) { this.$modal.msgError(`请选择${this.type ? '领' : '退'}料人!`) return } @@ -455,6 +474,7 @@ export default { goodsCount: item.waresCount, } })] + this.formData.ids = this.allSelectRows.map(item => item.id) if (this.type) { this.formData.items = [...this.allSelectRows.map(item => { return { @@ -717,7 +737,7 @@ export default { soStatus: "02", remark: this.remark, } - if (this.chooseSupplier){ + if (this.chooseSupplier) { this.formData.supplierId = this.chooseSupplier.id this.formData.supplierName = this.chooseSupplier.name } diff --git a/src/views/repair/tickets/Components/TWIAdd.vue b/src/views/repair/tickets/Components/TWIAdd.vue index 0346aa9..e7dd55b 100644 --- a/src/views/repair/tickets/Components/TWIAdd.vue +++ b/src/views/repair/tickets/Components/TWIAdd.vue @@ -129,6 +129,13 @@ import {addTwi} from "@/api/repair/tickets/TWItem"; export default { name: "TWIAdd", components: {TreeSelect}, + props:{ + ifHouseAdd: { + type: Boolean, + default: false, + required: false + } + }, data(){ return{ dialogVisible: false, @@ -199,6 +206,7 @@ export default { name: item.name } })] + this.formData.ifHouseAdd = this.ifHouseAdd }, async open(row){ this.reset()