From b811e2fa4cdcb5949047faa78aa9299aec1d2f67 Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期三, 27 三月 2024 15:08:45 +0800 Subject: [PATCH] 确认采购单接口换位post请求,产品列表字段替换 --- src/views/purchaseManage/purchase/index.vue | 61 +++++++++++++++++++++++------- 1 files changed, 46 insertions(+), 15 deletions(-) diff --git a/src/views/purchaseManage/purchase/index.vue b/src/views/purchaseManage/purchase/index.vue index f052302..93c3fc8 100644 --- a/src/views/purchaseManage/purchase/index.vue +++ b/src/views/purchaseManage/purchase/index.vue @@ -148,6 +148,7 @@ getPurchaseInfo, newSubmitPurchase, deletePurchase, + getPurchaseQualityInspectionInfo, getOperationInfo } from "@/api/purchaseManage/purchase" import DetailSupplier from "@/views/purchaseManage/purchase/DetailSupplier" @@ -178,13 +179,13 @@ ] // 鏀惰揣淇℃伅 const recriveColumn = [ - { label: "鏀惰揣鏃堕棿", prop: "operationNumber", default: true }, + { label: "鏀惰揣鏃堕棿", prop: "createTime", default: true }, { label: "鏀惰揣浜�", prop: "principal" }, - { label: "浜у搧鍚嶇О", prop: "name" }, - { label: "浜у搧缂栫爜", prop: "number" }, - { label: "瑙勬牸", prop: "warehouseName" }, + { label: "浜у搧鍚嶇О", prop: "productName" }, + { label: "浜у搧缂栫爜", prop: "productId" }, + { label: "瑙勬牸", prop: "specs" }, { label: "鏁伴噺", prop: "amount" }, - { label: "鍗曚綅", prop: "overTime" }, + { label: "鍗曚綅", prop: "unit" }, { label: "鐘舵��", prop: "status", isCallMethod: true, getCallMethod: this.getreceiveStatusStatus } ] // 鍏ュ簱淇℃伅 @@ -249,7 +250,7 @@ showCol: ["閲囪喘鍗曞彿", "閲囪喘鍗曞悕绉�", "鍗曟嵁绫诲瀷", "渚涘簲鍟嗗悕绉�", "閲囪喘鏁伴噺", "鏀惰揣浠撳簱", "缁忓姙浜�", "鍒跺崟浜�"], tableBottomColumn: [], showBottomCol: [], - TabsIndex: "0", + TabsIndex: 0, productTableList: {}, // 浜у搧淇℃伅 productColumn: productColumn, @@ -368,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) } } }) @@ -473,7 +475,10 @@ if (!row.supplierName) { this.btnEdit(row) } else { - newSubmitPurchase(row.id).then((response) => { + newSubmitPurchase({ + id: Number(row.id), + status:4 + }).then((response) => { if (response.code === 200) { this.$message.success("鎻愪氦鎴愬姛") this.getData() @@ -496,7 +501,10 @@ type: "warning" }).then( () => { - newSubmitPurchase(Number(row.id)).then((response) => { + newSubmitPurchase({ + id: Number(row.id), + status:5 + }).then((response) => { if (response.code === 200) { this.$message.success("宸插彇娑�") this.getData() @@ -591,7 +599,7 @@ // top 琛岀偣鍑� tableRowClick(row) { this.selectRow = row - if (row.status == 1 && this.TabsIndex == 0) { + if (this.TabsIndex == 0) { getPurchaseInfo({ id: row.id }).then((res) => { if (res.code == 200) { this.productTableList.tableInfomation = res.data.productList @@ -599,9 +607,18 @@ this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�") } }) - } else if (this.TabsIndex == 1 && row.status == 1) { + } else if (this.TabsIndex == 1 ) { 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 @@ -609,6 +626,8 @@ this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�") } }) + }else { + this.productTableList.tableInfomation=[] } }, // bom 鍒楄〃 @@ -652,6 +671,7 @@ this.setBottomList() this.getProductInventoryInfo(this.selectRow) } else if (this.TabsIndex == 2) { + console.log("鍏ュ簱") // 鍏ュ簱淇℃伅鍒楄〃 this.tableBottomColumn = this.inLibraryColumn this.showBottomCol = this.inLibraryCol @@ -665,8 +685,7 @@ }, // 鑾峰彇浜у搧/鏀惰揣淇℃伅 async getProductInventoryInfo(row) { - console.log(row) - if (this.TabsIndex == 0 && row.status == 1) { + if (this.TabsIndex == 0 ) { getPurchaseInfo({ id: row.id }).then((res) => { if (res.code == 200) { this.productTableList.tableInfomation = res.data.productList @@ -676,7 +695,17 @@ }) } else if (this.TabsIndex == 1 && row.status == 1) { this.productTableList.tableInfomation = [] - } else { + } else if(this.TabsIndex==1 ){ + 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 @@ -684,6 +713,8 @@ this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�") } }) + }else{ + this.productTableList.tableInfomation =[] } } } -- Gitblit v1.8.0