From 1888b426ff2b6a529f5fdef0f0453dadef71824b Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期三, 17 四月 2024 10:17:38 +0800 Subject: [PATCH] 隐藏多单位的问题 --- src/views/overview/OverviewListView.vue | 111 ++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 80 insertions(+), 31 deletions(-) diff --git a/src/views/overview/OverviewListView.vue b/src/views/overview/OverviewListView.vue index 36c3d35..fef9531 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", @@ -274,7 +288,25 @@ status: true, isCallMethod: true, getCallMethod: this.getStatus - } + }, + { + label: "涓荤", + prop: "manager", + isShowColumn: showcol.includes("涓荤"), + default: false + }, + { + label: "浼氳", + prop: "accountant", + isShowColumn: showcol.includes("浼氳"), + default: false + }, + { + label: "淇濈鍛�", + prop: "custodian", + isShowColumn: showcol.includes("淇濈鍛�"), + default: false + }, ] return tableColumn }, @@ -316,7 +348,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 @@ -353,7 +387,18 @@ } row.locationID = row.location.jointName row.locationId = row.location.value - + row.managerObj={ + label:row.manager, + value:row.managerId + } + row.accountantObj={ + label:row.accountant, + value:row.accountantId + } + row.custodianObj={ + label:row.custodian, + value:row.custodianId + } // row.tolocationId=row.tolocation.value this.editConfig.infomation = { ...row } }, @@ -372,6 +417,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