From 98b9e26780b827b06289d7fe56ef7947d181b99b Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期三, 27 三月 2024 15:14:31 +0800 Subject: [PATCH] 采购列表收货信息获取问题修改和入库信息状态修改 --- src/views/purchaseManage/purchase/index.vue | 111 +++++++++++++++++++++++++++++++++++++------------------ 1 files changed, 74 insertions(+), 37 deletions(-) diff --git a/src/views/purchaseManage/purchase/index.vue b/src/views/purchaseManage/purchase/index.vue index 08caf16..f096fc5 100644 --- a/src/views/purchaseManage/purchase/index.vue +++ b/src/views/purchaseManage/purchase/index.vue @@ -53,11 +53,20 @@ <el-button type="text" size="small" @click="btnLook(scope.row)" style="margin-right: 5px" >鏌ョ湅</el-button > - <el-button - v-if="scope.row.status === 6||scope.row.status === 7" type="text" size="small" @click="confirmation(scope.row)" style="margin-right: 5px" + <el-button + v-if="scope.row.status === 6 || scope.row.status === 7" + type="text" + size="small" + @click="confirmation(scope.row)" + style="margin-right: 5px" >鍒拌揣纭</el-button > - <el-button v-if="scope.row.status === 7||scope.row.status === 8" type="text" size="small" @click="TestingAllClick(scope.row)" style="margin-right: 5px" + <el-button + v-if="scope.row.status === 7 || scope.row.status === 8" + type="text" + size="small" + @click="TestingAllClick(scope.row)" + style="margin-right: 5px" >鍘昏川妫�</el-button > <el-button @@ -135,9 +144,9 @@ <!-- 鏂板缓/缂栬緫 --> <AddPurchase ref="addDialog" v-if="editConfig.visible" :edit-common-config="editConfig" /> <!-- 鍒拌揣閫氱煡 --> - <ArrivalConfirmation v-if="editAffirmConfig.visible" :edit-common-config="editAffirmConfig" /> + <ArrivalConfirmation v-if="editAffirmConfig.visible" :edit-common-config="editAffirmConfig" /> <!-- 鎵归噺璐ㄦ --> - <TestingAll v-if="editTestingAllConfig.visible" :edit-common-config="editTestingAllConfig" /> + <TestingAll v-if="editTestingAllConfig.visible" :edit-common-config="editTestingAllConfig" /> </div> </template> @@ -153,14 +162,14 @@ } from "@/api/purchaseManage/purchase" import DetailSupplier from "@/views/purchaseManage/purchase/DetailSupplier" import AddPurchase from "@/views/purchaseManage/purchase/components/AddPurchase" -import ArrivalConfirmation from"@/views/purchaseManage/purchase/components/ArrivalConfirmation" -import TestingAll from"@/views/purchaseManage/purchase/components/TestingAll" +import ArrivalConfirmation from "@/views/purchaseManage/purchase/components/ArrivalConfirmation" +import TestingAll from "@/views/purchaseManage/purchase/components/TestingAll" import { getSupplierList } from "@/api/supplierManage/supplier" import { getDataByType } from "@/api/data" export default { name: "SupplierManage", props: {}, - components: { DetailSupplier, AddPurchase,ArrivalConfirmation,TestingAll }, + components: { DetailSupplier, AddPurchase, ArrivalConfirmation, TestingAll }, mixins: [pageMixin], computed: {}, data() { @@ -197,7 +206,7 @@ { label: "鏁伴噺", prop: "amount" }, { label: "鍏ュ簱鏃堕棿", prop: "overTime" }, { label: "鏀惰揣浜�", prop: "principal" }, - { label: "鐘舵��", prop: "status", isCallMethod: true, getCallMethod: this.getreceiveStatusStatus } + { label: "鐘舵��", prop: "status", isCallMethod: true, getCallMethod: this.getWarehouseStatus } ] return { purchaseStatusList: getDataByType("purchaseStatus"), @@ -225,17 +234,14 @@ isDisabled: false, detailEnter: false, infomation: { - // supplierList: [] } }, - editTestingAllConfig:{ + editTestingAllConfig: { visible: false, isDisabled: false, detailEnter: false, - infomation: { - - } + infomation: {} }, tableColumn: [ { label: "鍗曟嵁绫诲瀷", prop: "orderType", min: 130 }, @@ -269,7 +275,7 @@ // 鏀惰揣淇℃伅 recriveColumn: recriveColumn, // 鍏ュ簱淇℃伅 - inLibraryColumn:inLibraryColumn, + inLibraryColumn: inLibraryColumn, showReceiveCol: ["鏀惰揣鏃堕棿", "鏀惰揣浜�", "浜у搧鍚嶇О", "浜у搧缂栫爜", "瑙勬牸", "鏁伴噺", "鍗曚綅", "鐘舵��"], inLibraryCol: ["鍏ュ簱鍗曞彿", "鏀惰揣浠撳簱", "浜у搧鍚嶇О", "浜у搧缂栫爜", "鏁伴噺", "鍏ュ簱鏃堕棿", "鏀惰揣浜�", "鐘舵��"], loading: false, @@ -560,15 +566,15 @@ }, 3000) }, // 鍒拌揣纭 - confirmation(row){ - console.log(row,"row") - this.editAffirmConfig.infomation=row - this.editAffirmConfig.visible=true + confirmation(row) { + console.log(row, "row") + this.editAffirmConfig.infomation = row + this.editAffirmConfig.visible = true }, // 鍘昏川妫� - TestingAllClick(row){ - this.editTestingAllConfig.infomation=row - this.editTestingAllConfig.visible=true + TestingAllClick(row) { + this.editTestingAllConfig.infomation = row + this.editTestingAllConfig.visible = true }, // 璇︽儏 selCommonClick(row) { @@ -601,18 +607,23 @@ this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�") } }) - } else if (this.TabsIndex == 1 && row.status == 7||row.status == 8) { + } else if ( + (this.TabsIndex == 1 && row.status == 7) || + row.status == 8 || + (this.TabsIndex == 1 && row.status == 2) || + (this.TabsIndex == 1 && row.status == 3) + ) { this.productTableList.tableInfomation = [] getPurchaseQualityInspectionInfo({ - purchaseNumber: row.number, - }).then((res)=>{ + purchaseNumber: row.number + }).then((res) => { if (res.code == 200) { this.productTableList.tableInfomation = res.data } else { this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�") - }"" + } }) - } else if(this.TabsIndex == 2) { + } else if (this.TabsIndex == 2) { getOperationInfo({ id: row.id }).then((res) => { if (res.code == 200) { this.productTableList.tableInfomation = res.data @@ -620,8 +631,8 @@ this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�") } }) - }else { - this.productTableList.tableInfomation=[] + } else { + this.productTableList.tableInfomation = [] } }, // bom 鍒楄〃 @@ -674,7 +685,23 @@ }, // 鐘舵�� getStatus(val) { - return val === 1 ? "寰呯‘璁�" : val === 2 ? "寰呭叆搴�" : val === 3 ? "宸插叆搴�" : val === 4 ? "宸插畬鎴�" : val === 5 ? "宸插彇娑�" :val === 6 ? "寰呮敹璐�" :val === 7 ? "閮ㄥ垎鏀惰揣" :val === 8 ? "寰呰川妫�" : "--" + return val === 1 + ? "寰呯‘璁�" + : val === 2 + ? "寰呭叆搴�" + : val === 3 + ? "宸插叆搴�" + : val === 4 + ? "宸插畬鎴�" + : val === 5 + ? "宸插彇娑�" + : val === 6 + ? "寰呮敹璐�" + : val === 7 + ? "閮ㄥ垎鏀惰揣" + : val === 8 + ? "寰呰川妫�" + : "--" }, // 鑾峰彇浜у搧/鏀惰揣淇℃伅 async getProductInventoryInfo(row) { @@ -688,17 +715,22 @@ }) } else if (this.TabsIndex == 1 && row.status == 1) { this.productTableList.tableInfomation = [] - } else if(this.TabsIndex==1 && row.status==7||this.TabsIndex==1&&row.status==8){ + } else if ( + (this.TabsIndex == 1 && row.status == 7) || + (this.TabsIndex == 1 && row.status == 8) || + (this.TabsIndex == 1 && row.status == 2) || + (this.TabsIndex == 1 && row.status == 3) + ) { getPurchaseQualityInspectionInfo({ - purchaseNumber: row.number, - }).then((res)=>{ + purchaseNumber: row.number + }).then((res) => { if (res.code == 200) { this.productTableList.tableInfomation = res.data } else { this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�") - }"" + } }) - }else if(this.TabsIndex==2){ + } else if (this.TabsIndex == 2) { getOperationInfo({ id: row.id }).then((res) => { if (res.code == 200) { this.productTableList.tableInfomation = res.data @@ -706,9 +738,14 @@ this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�") } }) - }else{ - this.productTableList.tableInfomation =[] + } else { + this.productTableList.tableInfomation = [] } + }, + // 鍏ュ簱鐘舵�� + getWarehouseStatus(val) { + let newVal = Number(val) + return newVal === 1 ? "鑽夌" : newVal === 3 ? "灏辩华" : newVal === 4 ? "瀹屾垚" : newVal === 5 ? "宸插彇娑�" : " " } } } -- Gitblit v1.8.0