From 1870f2f89879b28d96f048ec731e886b0f348d4a Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Tue, 12 Nov 2024 17:44:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E9=85=8D=E4=BB=B6=E7=94=B3=E8=AF=B710?= =?UTF-8?q?0%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stockOperate/Components/WaresItem.vue | 58 ++++++++++++------- .../tickets/Components/TicketWaresShow.vue | 53 ++++++----------- .../repair/tickets/form/GetAndBackWares.vue | 5 +- 3 files changed, 59 insertions(+), 57 deletions(-) diff --git a/src/views/repair/stockOperate/Components/WaresItem.vue b/src/views/repair/stockOperate/Components/WaresItem.vue index 7dfab95..0079e3c 100644 --- a/src/views/repair/stockOperate/Components/WaresItem.vue +++ b/src/views/repair/stockOperate/Components/WaresItem.vue @@ -21,17 +21,24 @@ - - - - + + + + + + + - - + + + @@ -186,10 +200,11 @@ import SoTable from "@/views/repair/stockOperate/Components/SoTable.vue"; import WarehouseChoose from "@/views/repair/Components/WarehouseChoose.vue"; import {createRepairSo} from "@/api/repair/stockOperate/stockOperate"; import {getUserProfile} from "@/api/system/user"; +import TicketWaresShow from "@/views/repair/tickets/Components/TicketWaresShow.vue"; export default { name: "WaresItem", - components: {WarehouseChoose, SoTable}, + components: {TicketWaresShow, WarehouseChoose, SoTable}, props: { type: Boolean, }, @@ -199,8 +214,7 @@ export default { pageNo: 1, pageSize: 10, query: null, - type: "01", - isBack: this.type ? null : true + isBack: !this.type, }, showSearch: true, loading: false, @@ -217,7 +231,7 @@ export default { // 保存进入编辑的cell clickCellMap: {}, // 需要编辑的属性 - editProp: ['warehouse', 'count', 'newPrice', 'remark', 'code', 'waresCount', 'model'], + editProp: ['warehouse', 'count', 'newPrice', 'remark', 'code', 'waresCount', 'model', 'unit'], remark: null, tableKey: 0, } @@ -226,6 +240,9 @@ export default { this.getList() }, methods: { + getDictDatasToType(type){ + return this.getDictDatas(type) + }, // 通过 true是全部、false是选择 async handlePass() { // 生成领料单、退料单 @@ -304,15 +321,13 @@ export default { const data = {twId: row.id} const res = await listTwItem(data) this.items = res.data + this.items = this.items.filter(item => item.waresStatus === '1') this.items.forEach(item => { const count = item.waresAlreadyCount ? parseInt(item.waresCount) - parseInt(item.waresAlreadyCount) : item.waresCount item.waresCount = this.type ? count : item.waresAlreadyCount item.isStock = this.type ? count <= item.wares.stock : true }) - this.items = this.items.filter(item => this.type ? item.waresStatus === '02' : item.waresAlreadyCount) - if (!this.type) { - this.items = this.items.filter(item => item.waresAlreadyCount !== item.waresBackCount) - } + this.items = this.items.filter(item => this.type ? (item.waresCount > item.waresAlreadyCount) : (item.waresAlreadyCount > 0)) } finally { this.dialogLoading = false } @@ -497,6 +512,9 @@ export default { } }) return flag.filter(item => item !== "").join(",") + }, + handleView(row){ + this.$refs.ticketWaresShow.open(row) } } } diff --git a/src/views/repair/tickets/Components/TicketWaresShow.vue b/src/views/repair/tickets/Components/TicketWaresShow.vue index 8cbc52e..6007a9b 100644 --- a/src/views/repair/tickets/Components/TicketWaresShow.vue +++ b/src/views/repair/tickets/Components/TicketWaresShow.vue @@ -95,12 +95,12 @@ -