From b07c42031c6ba14d759ebbcc7e110750687074e6 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期三, 27 三月 2024 14:55:21 +0800 Subject: [PATCH] 采购管理页面入库信息状态管理 --- src/views/purchaseManage/purchase/index.vue | 28 ++++++++++++++++++++-------- 1 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/views/purchaseManage/purchase/index.vue b/src/views/purchaseManage/purchase/index.vue index affa53a..08caf16 100644 --- a/src/views/purchaseManage/purchase/index.vue +++ b/src/views/purchaseManage/purchase/index.vue @@ -166,9 +166,9 @@ data() { // 浜у搧淇℃伅 const productColumn = [ - { label: "浜у搧缂栧彿", prop: "number", default: true }, - { label: "浜у搧鍚嶇О", prop: "name" }, - { label: "瑙勬牸", prop: "specifications" }, + { label: "浜у搧缂栧彿", prop: "productId", default: true }, + { label: "浜у搧鍚嶇О", prop: "productName" }, + { label: "瑙勬牸", prop: "specs" }, { label: "鍨嬪彿", prop: "modelNumber" }, { label: "閲囪喘鏁伴噺", prop: "amount" }, { label: "宸插彂璐ф暟閲�", prop: "sendAmount" }, @@ -250,7 +250,7 @@ showCol: ["閲囪喘鍗曞彿", "閲囪喘鍗曞悕绉�", "鍗曟嵁绫诲瀷", "渚涘簲鍟嗗悕绉�", "閲囪喘鏁伴噺", "鏀惰揣浠撳簱", "缁忓姙浜�", "鍒跺崟浜�"], tableBottomColumn: [], showBottomCol: [], - TabsIndex: "0", + TabsIndex: 0, productTableList: {}, // 浜у搧淇℃伅 productColumn: productColumn, @@ -369,7 +369,8 @@ this.pagerOptions.totalCount = res.data.total if (res.data.total > 0) { this.selectRow = this.tableList.tableInfomation.length > 0 ? this.tableList.tableInfomation[0] : {} - this.tableRowClick(this.selectRow) + // this.tableRowClick(this.selectRow) + this.getProductInventoryInfo(this.selectRow) } } }) @@ -600,9 +601,18 @@ this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�") } }) - } else if (this.TabsIndex == 1 && row.status == 1) { + } else if (this.TabsIndex == 1 && row.status == 7||row.status == 8) { this.productTableList.tableInfomation = [] - } else { + getPurchaseQualityInspectionInfo({ + 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) { getOperationInfo({ id: row.id }).then((res) => { if (res.code == 200) { this.productTableList.tableInfomation = res.data @@ -610,6 +620,8 @@ this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�") } }) + }else { + this.productTableList.tableInfomation=[] } }, // bom 鍒楄〃 @@ -676,7 +688,7 @@ }) } else if (this.TabsIndex == 1 && row.status == 1) { this.productTableList.tableInfomation = [] - } else if(this.TabsIndex==1 && row.status==7||row.status==8){ + } else if(this.TabsIndex==1 && row.status==7||this.TabsIndex==1&&row.status==8){ getPurchaseQualityInspectionInfo({ purchaseNumber: row.number, }).then((res)=>{ -- Gitblit v1.8.0