From 62d36f52a6058e0483feceb8819475b31bc1f102 Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期三, 10 四月 2024 18:59:23 +0800 Subject: [PATCH] 库存调整,出入库明细跳转明细单修改 --- src/views/overview/AddOverviewDialog.vue | 46 +++++++++++++++++------ src/views/operate/inventoryAdjustment/inventoryAdjustmentHistory.vue | 4 +- src/views/operate/outEnterLibrary/index.vue | 16 +++++++ src/views/productManage/product/components/bomDialog.vue | 9 ++-- src/views/operate/inventoryAdjustment/index.vue | 1 5 files changed, 56 insertions(+), 20 deletions(-) diff --git a/src/views/operate/inventoryAdjustment/index.vue b/src/views/operate/inventoryAdjustment/index.vue index 04e6dd7..10a7700 100644 --- a/src/views/operate/inventoryAdjustment/index.vue +++ b/src/views/operate/inventoryAdjustment/index.vue @@ -242,7 +242,6 @@ this.isSel() console.log(row) if (this.isNoProduct) { - console.log("鍘嗗彶") this.$router.push({ name: "inventoryAdjustmentHistory", params: { locationId: row.locationId, productId: row.productId, baseOperationType: row.baseOperationType } diff --git a/src/views/operate/inventoryAdjustment/inventoryAdjustmentHistory.vue b/src/views/operate/inventoryAdjustment/inventoryAdjustmentHistory.vue index f8102e2..d1bbaa0 100644 --- a/src/views/operate/inventoryAdjustment/inventoryAdjustmentHistory.vue +++ b/src/views/operate/inventoryAdjustment/inventoryAdjustmentHistory.vue @@ -142,8 +142,8 @@ let product = item.details[0].product return { ...item, - from: item.fromLocation?item.fromLocation.name:"", - to: item.toLocation?item.toLocation.name:"", + from: item.details[0].fromLocation.jointName?item.details[0].fromLocation.jointName:"", + to: item.details[0].toLocation.jointName?item.details[0].toLocation.jointName:"", productName: product.name, amount: item.details[0].amount, unit: product.unit diff --git a/src/views/operate/outEnterLibrary/index.vue b/src/views/operate/outEnterLibrary/index.vue index 03c0913..6514f51 100644 --- a/src/views/operate/outEnterLibrary/index.vue +++ b/src/views/operate/outEnterLibrary/index.vue @@ -40,6 +40,7 @@ </div> <!-- 鏌ョ湅/缂栬緫 --> <AddOverviewDialog + ref="viewDialog" v-if="editConfig.visible" :edit-common-config="editConfig" :add-name="addName" @@ -274,8 +275,21 @@ this.workType=row.baseOperationType this.editConfig.title = val getOperationInfo(row.operationId).then((res)=>{ + res.data.details.map((item) => { + item.fromLocationId = item.fromLocation.jointName + item.toLocationId = item.toLocation.jointName + }) + res.data.location = { + value: res.data.location.id || res.data.location.value, + label: res.data.location.jointName || res.data.location.label + } + res.data.toLocation = { + value: res.data.toLocation.id || res.data.toLocation.value, + label: res.data.toLocation.jointName || res.data.toLocation.label + } + res.data.locationID = res.data.location.jointName + res.data.locationId = res.data.location.value this.editConfig.infomation = { - ...res.data } this.editConfig.visible = true diff --git a/src/views/overview/AddOverviewDialog.vue b/src/views/overview/AddOverviewDialog.vue index e84bc86..7b32ed0 100644 --- a/src/views/overview/AddOverviewDialog.vue +++ b/src/views/overview/AddOverviewDialog.vue @@ -203,7 +203,7 @@ </el-form-item> </el-col> <el-col :span="12"> - <el-form-item :label="workType === 1 ? '浠撳簱浣嶇疆' : '璋冨嚭浣嶇疆'" prop="location"> + <el-form-item :label="workType === 1 ? '浠撳簱浣嶇疆' : '浠�'" prop="location"> <el-select @change="rootLocationChange" v-model="editConfig.infomation.location" @@ -243,7 +243,7 @@ </el-form-item> </el-col> <el-col :span="12" v-if="workType === 3"> - <el-form-item label="璋冨叆浣嶇疆" prop="toLocation"> + <el-form-item label="鑷�" prop="toLocation"> <el-select @change="toLocationChange" v-model="editConfig.infomation.toLocation" @@ -516,7 +516,7 @@ supplierOptions: [], //渚涘簲鍟� clientOptions: [], //瀹㈡埛 memberOptions: [{ id: 1, name: "绠$悊鍛�" }], - formLocationOptions: [], // 璋冨嚭浣嶇疆 + formLocationOptions: [], // 鑷� toLocationOptions: [], // 浠撳簱浣嶇疆 showButton: true, activeName: "first", @@ -993,31 +993,53 @@ tableColumnArr = [ { label: "浜у搧鍚嶇О", prop: "productName", productName: true, isRequird: true }, { label: "浜у搧缂栫爜", prop: "productId" }, - { label: "璁¢噺鍗曚綅", prop: "unit" }, + { label: "鏁伴噺", prop: "amount", inputFloat: true }, { label: "浜у搧瑙勬牸", prop: "specs" }, { label: "浜у搧鍨嬪彿", prop: "model" }, - { label: "鏁伴噺", prop: "amount", inputFloat: true } + { label: "璁¢噺鍗曚綅", prop: "unit" }, ] } else if (this.workType === 2) { tableColumnArr = [ { label: "浜у搧鍚嶇О", prop: "productName", productName: true, isRequird: true }, { label: "浜у搧缂栫爜", prop: "productId" }, - { label: "璁¢噺鍗曚綅", prop: "unit" }, + { label: "鏁伴噺", prop: "amount", inputFloat: true }, { label: "浜у搧瑙勬牸", prop: "specs" }, { label: "浜у搧鍨嬪彿", prop: "model" }, - { label: "璋冨叆浣嶇疆", prop: "fromLocationId", sonLocation: true, isRequird: true }, - { label: "鏁伴噺", prop: "amount", inputFloat: true } + { label: "浠�", prop: "fromLocationId", sonLocation: true, isRequird: true }, + { label: "璁¢噺鍗曚綅", prop: "unit" }, ] } else if (this.workType === 3) { tableColumnArr = [ { label: "浜у搧鍚嶇О", prop: "productName", productName: true, isRequird: true }, { label: "浜у搧缂栫爜", prop: "productId" }, - { label: "璁¢噺鍗曚綅", prop: "unit" }, + { label: "鏁伴噺", prop: "amount", inputFloat: true }, { label: "浜у搧瑙勬牸", prop: "specs" }, { label: "浜у搧鍨嬪彿", prop: "model" }, - { label: "璋冨叆浣嶇疆", prop: "fromLocationId", sonLocation: true, isRequird: true }, - { label: "璋冨嚭浣嶇疆", prop: "toLocationId", toLocation: true, isRequird: true }, - { label: "鏁伴噺", prop: "amount", inputFloat: true } + { label: "浠�", prop: "fromLocationId", sonLocation: true, isRequird: true }, + { label: "鑷�", prop: "toLocationId", toLocation: true, isRequird: true }, + { label: "璁¢噺鍗曚綅", prop: "unit" }, + ] + }else if (this.workType === 4) { + tableColumnArr = [ + { label: "浜у搧鍚嶇О", prop: "productName", productName: true, isRequird: true }, + { label: "浜у搧缂栫爜", prop: "productId" }, + { label: "鏁伴噺", prop: "amount", inputFloat: true }, + { label: "浜у搧瑙勬牸", prop: "specs" }, + { label: "浜у搧鍨嬪彿", prop: "model" }, + { label: "浠�", prop: "fromLocationId", sonLocation: true, isRequird: true }, + { label: "鑷�", prop: "toLocationId", toLocation: true, isRequird: true }, + { label: "璁¢噺鍗曚綅", prop: "unit" }, + ] + }else if (this.workType === 5) { + tableColumnArr = [ + { label: "浜у搧鍚嶇О", prop: "productName", productName: true, isRequird: true }, + { label: "浜у搧缂栫爜", prop: "productId" }, + { label: "鏁伴噺", prop: "amount", inputFloat: true }, + { label: "浜у搧瑙勬牸", prop: "specs" }, + { label: "浜у搧鍨嬪彿", prop: "model" }, + { label: "浠�", prop: "fromLocationId", sonLocation: true, isRequird: true }, + { label: "鑷�", prop: "toLocationId", toLocation: true, isRequird: true }, + { label: "璁¢噺鍗曚綅", prop: "unit" }, ] } this.productTableList = { diff --git a/src/views/productManage/product/components/bomDialog.vue b/src/views/productManage/product/components/bomDialog.vue index 343cdea..1d4faa7 100644 --- a/src/views/productManage/product/components/bomDialog.vue +++ b/src/views/productManage/product/components/bomDialog.vue @@ -66,8 +66,8 @@ thatEditRow:this.editRow, isTableShow: true, form: {}, - // BomTableData:[], - BomTableData: this.editRow.BomTableData, + BomTableData:[], + // BomTableData: this.editRow.BomTableData, // BomTableData: JSON.parse(this.editRow.BomTableData), // BomTableData: [{ id: 303, createdAt: "2024-02-05 18:02:47", updatedAt: "2024-02-05 18:02:47",name: "kg", isDefault: false }], work: 1, @@ -107,9 +107,9 @@ watch: { }, created() { - console.log(this.thatEditRow,"thatEditRow") }, - mounted() { }, + mounted() { + }, methods: { handleAdd() { this.BomTableData=this.thatEditRow.BomTableData @@ -148,6 +148,7 @@ console.log(this.codenumberList.replace(/,/g, "")); }, switchChange(scope, val) { + this.BomTableData=this.thatEditRow.BomTableData let arr = []; for (let i in this.BomTableData) { if (this.BomTableData[i].isDefault) { -- Gitblit v1.8.0