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/api/purchaseManage/purchase.js | 4 ++-- src/views/purchaseManage/purchase/index.vue | 25 ++++++++++++++++--------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/api/purchaseManage/purchase.js b/src/api/purchaseManage/purchase.js index a7d1d89..19c132b 100644 --- a/src/api/purchaseManage/purchase.js +++ b/src/api/purchaseManage/purchase.js @@ -105,8 +105,8 @@ // 纭閲囪喘鍗� export function newSubmitPurchase(data) { return request({ - url: "/api/purchase/newSubmit/"+data, - method: "get", + url: "/api/purchase/newSubmit", + method: "post", data }) } diff --git a/src/views/purchaseManage/purchase/index.vue b/src/views/purchaseManage/purchase/index.vue index 08caf16..93c3fc8 100644 --- a/src/views/purchaseManage/purchase/index.vue +++ b/src/views/purchaseManage/purchase/index.vue @@ -166,9 +166,9 @@ data() { // 浜у搧淇℃伅 const productColumn = [ - { label: "浜у搧缂栧彿", prop: "productId", default: true }, - { label: "浜у搧鍚嶇О", prop: "productName" }, - { label: "瑙勬牸", prop: "specs" }, + { label: "浜у搧缂栧彿", prop: "number", default: true }, + { label: "浜у搧鍚嶇О", prop: "name" }, + { label: "瑙勬牸", prop: "specifications" }, { label: "鍨嬪彿", prop: "modelNumber" }, { label: "閲囪喘鏁伴噺", prop: "amount" }, { label: "宸插彂璐ф暟閲�", prop: "sendAmount" }, @@ -475,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() @@ -498,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() @@ -593,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 @@ -601,7 +607,7 @@ this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�") } }) - } else if (this.TabsIndex == 1 && row.status == 7||row.status == 8) { + } else if (this.TabsIndex == 1 ) { this.productTableList.tableInfomation = [] getPurchaseQualityInspectionInfo({ purchaseNumber: row.number, @@ -665,6 +671,7 @@ this.setBottomList() this.getProductInventoryInfo(this.selectRow) } else if (this.TabsIndex == 2) { + console.log("鍏ュ簱") // 鍏ュ簱淇℃伅鍒楄〃 this.tableBottomColumn = this.inLibraryColumn this.showBottomCol = this.inLibraryCol @@ -678,7 +685,7 @@ }, // 鑾峰彇浜у搧/鏀惰揣淇℃伅 async getProductInventoryInfo(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 @@ -688,7 +695,7 @@ }) } 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 ){ getPurchaseQualityInspectionInfo({ purchaseNumber: row.number, }).then((res)=>{ -- Gitblit v1.8.0