From dd7fe1db0b9ca604664b59a906545fc1e13d55e2 Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期六, 30 三月 2024 10:37:08 +0800 Subject: [PATCH] 入库出库修改列表状态 --- src/views/overview/OverviewListView.vue | 78 ++++++++++++++++++++++++-------------- 1 files changed, 49 insertions(+), 29 deletions(-) diff --git a/src/views/overview/OverviewListView.vue b/src/views/overview/OverviewListView.vue index 36c3d35..1811b59 100644 --- a/src/views/overview/OverviewListView.vue +++ b/src/views/overview/OverviewListView.vue @@ -95,18 +95,9 @@ mixins: [pageMixin], computed: {}, data() { - // 浜у搧淇℃伅 - const productColumn = [ - { label: "浜у搧缂栧彿", prop: "id", default: true }, - { label: "浜у搧鍚嶇О", prop: "productName" }, - { label: "浜у搧瑙勬牸", prop: "specs" }, - { label: "浜у搧鍨嬪彿", prop: "model" }, - { label: "璁¢噺鍗曚綅", prop: "unit" }, - { label: "鏁伴噺", prop: "amount" } - ] return { tableList: {}, - showcol: ["浠撳簱浣嶇疆", "璋冨嚭浣嶇疆", "璋冨叆浣嶇疆", "鑱旂郴浜�", "鏃ユ湡", "鏉ユ簮鍗曟嵁", "鐘舵��"], + showcol: ["浠撳簱浣嶇疆", "鏉ユ簮","鏉ユ簮鍗曟嵁","璋冨嚭浣嶇疆", "璋冨叆浣嶇疆", "鑱旂郴浜�", "鏃ユ湡", "閿�鍞槑缁嗗崟", "鐘舵��"], searchOptions: [], commonDetail: { visible: false, @@ -129,9 +120,27 @@ numberLabel: "鍗曞彿", TabsIndex: "0", productTableList: {}, - showBottomCol: ["浜у搧缂栧彿", "浜у搧鍚嶇О", "浜у搧瑙勬牸", "浜у搧鍨嬪彿", "璁¢噺鍗曚綅", "鏁伴噺"], - tableBottomColumn: productColumn, - selectRow: {} + showBottomCol: ["浜у搧缂栧彿", "浜у搧鍚嶇О", "浜у搧瑙勬牸", "浜у搧鍨嬪彿", "璁¢噺鍗曚綅", "璋冨嚭浣嶇疆", "璋冨叆浣嶇疆", "鏁伴噺"], + tableBottomColumn: [], + selectRow: {}, + productColumn: [ + { label: "浜у搧缂栧彿", prop: "id", default: true }, + { label: "浜у搧鍚嶇О", prop: "productName" }, + { label: "浜у搧瑙勬牸", prop: "specs" }, + { label: "浜у搧鍨嬪彿", prop: "model" }, + { label: "璁¢噺鍗曚綅", prop: "unit" }, + { label: "鏁伴噺", prop: "amount" } + ], + allotProductColumn: [ + { label: "浜у搧缂栧彿", prop: "id", default: true }, + { label: "浜у搧鍚嶇О", prop: "productName" }, + { label: "浜у搧瑙勬牸", prop: "specs" }, + { label: "浜у搧鍨嬪彿", prop: "model" }, + { label: "璁¢噺鍗曚綅", prop: "unit" }, + { label: "璋冨嚭浣嶇疆", prop: "location" }, + { label: "璋冨叆浣嶇疆", prop: "toLocation" }, + { label: "鏁伴噺", prop: "amount" } + ] } }, created() { @@ -166,6 +175,7 @@ this.toLabel = "瀹㈡埛浣嶇疆" this.numberLabel = "鍑哄簱鍗曞彿" } else { + this.showcol=["浠撳簱浣嶇疆", "璋冨嚭浣嶇疆", "璋冨叆浣嶇疆", "鑱旂郴浜�", "鏃ユ湡", "閿�鍞槑缁嗗崟", "鐘舵��"], this.formLabel = "璋冨嚭浣嶇疆" this.toLabel = "璋冨叆浣嶇疆" this.numberLabel = "璋冩嫧鍗曞彿" @@ -188,6 +198,7 @@ } } this.tableList.allcol = allcol + this.tableBottomColumn = this.workType == 3 ? this.allotProductColumn : this.productColumn this.setBottomList() }, setTableColumn(showcol) { @@ -197,6 +208,21 @@ prop: "number", isShowColumn: true, default: true + }, + { + label: "鏉ユ簮", + prop: "operationSource", + isShowColumn: showcol.includes("鏉ユ簮"), + default: false, + // status: true, + isCallMethod: true, + getCallMethod: this.getSourceStatus + }, + { + label: "鏉ユ簮鍗曟嵁", + prop: "sourceNumber", + isShowColumn: showcol.includes("鏉ユ簮鍗曟嵁"), + default: false }, { label: this.formLabel, @@ -230,12 +256,6 @@ date: true }, // { - // label: "浜у搧鍙敤鎬�", - // prop: "status", - // isShowColumn: showcol.includes("浜у搧鍙敤鎬�"), - // default: false - // }, - // { // label: "鎴鏃ユ湡", // prop: "faultTime", // isShowColumn: showcol.includes("鎴鏃ユ湡"), @@ -248,17 +268,11 @@ // default: false // }, { - label: "鏉ユ簮鍗曟嵁", - prop: "sourceNumber", - isShowColumn: showcol.includes("鏉ユ簮鍗曟嵁"), + label: "閿�鍞槑缁嗗崟", + prop: "salesDetailsNumber", + isShowColumn: showcol.includes("閿�鍞槑缁嗗崟"), default: false }, - // { - // label: "娆犲崟", - // prop: "status", - // isShowColumn: showcol.includes("娆犲崟"), - // default: false - // }, { label: "鍏ュ簱绫诲瀷", prop: "operationTypeName", @@ -316,7 +330,9 @@ return { ...item, productName: item.product.name, - unit: item.product.unit + unit: item.product.unit, + location: arr.location.name, + toLocation: arr.toLocation.name } }) this.productTableList.tableInfomation = list @@ -372,6 +388,10 @@ getStatus(val) { return val === 1 ? "鑽夌" : val === 3 ? "灏辩华" : val === 4 ? "瀹屾垚" : val === 5 ? "鍙栨秷" : "" }, + // 鏉ユ簮 + getSourceStatus(val){ + return val===0 ? '--':val === 1 ? "閲囪喘鍏ュ簱" : val === 2 ? "鐢熶骇鍏ュ簱" : val === 3 ? "濮斿鍏ュ簱" : val === 4 ? "鐢熶骇棰嗘枡" : val=== 5 ? "濮斿棰嗘枡": val === 6?"閿�鍞彂璐�": "--" + }, // 鍒犻櫎鎼滅储鐘舵�� delSelectClick() { this.params.status = 0 -- Gitblit v1.8.0