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 @@ -