From ec6857c9e95fbe1b175d7f697a836c210c0c2b2c Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期五, 29 三月 2024 10:32:19 +0800 Subject: [PATCH] 公共组件选择产品信息处理 --- src/views/purchaseManage/purchase/index.vue | 68 ++++++++++++++++++++++++---------- 1 files changed, 48 insertions(+), 20 deletions(-) diff --git a/src/views/purchaseManage/purchase/index.vue b/src/views/purchaseManage/purchase/index.vue index f096fc5..89747e6 100644 --- a/src/views/purchaseManage/purchase/index.vue +++ b/src/views/purchaseManage/purchase/index.vue @@ -9,7 +9,7 @@ :show-download="false" :amount-view="false" :show-action-btn="false" - :placeholder="'璇疯緭鍏ヤ緵搴斿晢鍚嶇О/鐗╂枡鍚嶇О/閲囪喘鍗曞悕绉�'" + :placeholder="'璇疯緭鍏ヤ緵搴斿晢鍚嶇О/鐗╂枡鍚嶇О/閲囪喘鍗曞悕绉�/閿�鍞槑缁嗗崟绛�'" @searchClick="onFilterSearch" /> </div> @@ -175,9 +175,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" }, @@ -203,7 +203,7 @@ { label: "鏀惰揣浠撳簱", prop: "warehouseName" }, { label: "浜у搧鍚嶇О", prop: "name" }, { label: "浜у搧缂栫爜", prop: "number" }, - { label: "鏁伴噺", prop: "amount" }, + { label: "鏁伴噺", prop: "overAmount" }, { label: "鍏ュ簱鏃堕棿", prop: "overTime" }, { label: "鏀惰揣浜�", prop: "principal" }, { label: "鐘舵��", prop: "status", isCallMethod: true, getCallMethod: this.getWarehouseStatus } @@ -246,6 +246,7 @@ tableColumn: [ { label: "鍗曟嵁绫诲瀷", prop: "orderType", min: 130 }, { label: "閲囪喘鍗曞彿", prop: "number", min: 150, isCommonClick: true, default: true }, + { label: "閿�鍞槑缁嗗崟", prop: "salesDetailsNumber" }, { label: "閲囪喘鍗曞悕绉�", prop: "name", min: 130, isCommonClick: true }, { label: "渚涘簲鍟嗗悕绉�", prop: "supplierName", min: 130 }, { label: "閲囪喘鏁伴噺", prop: "quantity", min: 130 }, @@ -253,7 +254,17 @@ { label: "缁忓姙浜�", prop: "handledBy", min: 130 }, { label: "鍒跺崟浜�", prop: "creator", min: 130 } ], - showCol: ["閲囪喘鍗曞彿", "閲囪喘鍗曞悕绉�", "鍗曟嵁绫诲瀷", "渚涘簲鍟嗗悕绉�", "閲囪喘鏁伴噺", "鏀惰揣浠撳簱", "缁忓姙浜�", "鍒跺崟浜�"], + showCol: [ + "閲囪喘鍗曞彿", + "閿�鍞槑缁嗗崟", + "閲囪喘鍗曞悕绉�", + "鍗曟嵁绫诲瀷", + "渚涘簲鍟嗗悕绉�", + "閲囪喘鏁伴噺", + "鏀惰揣浠撳簱", + "缁忓姙浜�", + "鍒跺崟浜�" + ], tableBottomColumn: [], showBottomCol: [], TabsIndex: 0, @@ -481,7 +492,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() @@ -504,7 +518,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() @@ -599,7 +616,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 @@ -623,7 +640,11 @@ this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�") } }) - } else if (this.TabsIndex == 2) { + } else if ( + (this.TabsIndex == 2 && row.status == 8) || + (this.TabsIndex == 2 && row.status == 2) || + (this.TabsIndex == 2 && row.status == 3) + ) { getOperationInfo({ id: row.id }).then((res) => { if (res.code == 200) { this.productTableList.tableInfomation = res.data @@ -676,6 +697,7 @@ this.setBottomList() this.getProductInventoryInfo(this.selectRow) } else if (this.TabsIndex == 2) { + console.log("鍏ュ簱") // 鍏ュ簱淇℃伅鍒楄〃 this.tableBottomColumn = this.inLibraryColumn this.showBottomCol = this.inLibraryCol @@ -705,15 +727,16 @@ }, // 鑾峰彇浜у搧/鏀惰揣淇℃伅 async getProductInventoryInfo(row) { - if (this.TabsIndex == 0 && row.status == 1) { - getPurchaseInfo({ id: row.id }).then((res) => { - if (res.code == 200) { - this.productTableList.tableInfomation = res.data.productList - } else { - this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�") - } - }) - } else if (this.TabsIndex == 1 && row.status == 1) { + // if (this.TabsIndex == 0) { + // getPurchaseInfo({ id: row.id }).then((res) => { + // if (res.code == 200) { + // this.productTableList.tableInfomation = res.data.productList + // } else { + // this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�") + // } + // }) + // } else + if (this.TabsIndex == 1 && row.status == 1) { this.productTableList.tableInfomation = [] } else if ( (this.TabsIndex == 1 && row.status == 7) || @@ -730,7 +753,12 @@ this.$message.error(res.msg ? res.msg + "," : "" + "鑾峰彇淇℃伅澶辫触锛�") } }) - } else if (this.TabsIndex == 2) { + } else if ( + this.TabsIndex == 0 || + (this.TabsIndex == 2 && row.status == 8) || + (this.TabsIndex == 2 && row.status == 2) || + (this.TabsIndex == 2 && row.status == 3) + ) { getOperationInfo({ id: row.id }).then((res) => { if (res.code == 200) { this.productTableList.tableInfomation = res.data -- Gitblit v1.8.0