From d68b036a3b3c67273b8effa3c9925ef3869a91ba Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期三, 07 二月 2024 13:56:50 +0800 Subject: [PATCH] wms项目 wms系统参数设置的页面开发+路由+是否显示表头配置 --- src/views/overview/OverviewListView.vue | 71 ++++++++++++++++++++++++++--------- 1 files changed, 53 insertions(+), 18 deletions(-) diff --git a/src/views/overview/OverviewListView.vue b/src/views/overview/OverviewListView.vue index 9519c51..974ba53 100644 --- a/src/views/overview/OverviewListView.vue +++ b/src/views/overview/OverviewListView.vue @@ -1,15 +1,17 @@ <template> <div class="rightContent"> - <div class="label-fixed-element"> + <!-- <div class="label-fixed-element"> <span>{{ params.name }}</span> - </div> + </div> --> <div class="top"> <SearchCommonView :add-title="'鏂板缓'" :placeholder="'璇疯緭鍏ュ崟鍙�/鏉ユ簮鍗曟嵁'" :amount-view="false" + :search-task-map="searchTaskMap" @addCommonClick="addBtnClick" @searchClick="getList" + @delSelectClick="delSelectClick" /> </div> <div class="list-view"> @@ -20,7 +22,7 @@ <template slot-scope="scope"> <el-button @click="tableRowClick(scope.row, '鏌ョ湅')" type="text" size="small">鏌ョ湅</el-button> <el-button - v-if="scope.row.status !== 4" + v-if="scope.row.status !== 4 && scope.row.status !== 5" @click="tableRowClick(scope.row, '缂栬緫')" type="text" size="small" @@ -38,9 +40,9 @@ <!-- 鏂板缓/缂栬緫 --> <AddOverviewDialog v-if="editConfig.visible" - :work-type="workType" + :workType="workType" :edit-common-config="editConfig" - :add-name="this.$route.params.name" + :add-name="addName" :display-edit="displayEdit" /> </div> @@ -78,11 +80,13 @@ params: {}, displayEdit: false, formLabel: "", - toLabel: "" + toLabel: "", + addName: "", + searchTaskMap: [], + numberLabel: "鍗曞彿" } }, created() { - console.log(this.workType) this.setFormToLabel() this.setTable() var paramsData = sessionStorage.getItem("paramsData") @@ -94,6 +98,8 @@ sessionStorage.setItem("paramsData", JSON.stringify(params)) } this.params = params + this.searchTaskMap = + this.params.status > 0 ? [{ id: this.params.id, title: this.getStatus(this.params.status) }] : [] this.getData() // console.log(this.$route.params.workType) }, @@ -106,12 +112,15 @@ if (this.workType === 1) { this.formLabel = "渚涘簲鍟嗕綅缃�" this.toLabel = "浠撳簱浣嶇疆" + this.numberLabel = "鍏ュ簱鍗曞彿" } else if (this.workType === 2) { this.formLabel = "浠撳簱浣嶇疆" this.toLabel = "瀹㈡埛浣嶇疆" + this.numberLabel = "鍑哄簱鍗曞彿" } else { this.formLabel = "璋冨嚭浣嶇疆" this.toLabel = "璋冨叆浣嶇疆" + this.numberLabel = "璋冩嫧鍗曞彿" } }, setTable() { @@ -135,7 +144,7 @@ setTableColumn(showcol) { let tableColumn = [ { - label: "鍗曞彿", + label: this.numberLabel, prop: "number", isShowColumn: true, default: true @@ -228,17 +237,18 @@ async getData() { await getOperation({ number: this.keyword, - operationTypeId: this.params.id, + operationTypeId: this.$route.params.id ? this.$route.params.id : this.params.id, page: this.pagerOptions.currPage, - pageSize: this.pagerOptions.pageSize + pageSize: this.pagerOptions.pageSize, + status: this.params.status }).then((res) => { console.log(res.data) if (res.code === 200) { const list = res.data.map((item) => { return { ...item, - from: item.fromLocation.name, - to: item.toLocation.name + from: item.location.jointName, + to: item.location.jointName } }) this.tableList.tableInfomation = list || [] @@ -255,22 +265,47 @@ }, // 鏌ョ湅 缂栬緫 tableRowClick(row, val) { - console.log(row) this.editConfig.visible = true this.editConfig.title = val - this.editConfig.operationTypeId = this.$route.params.id + this.editConfig.operationTypeId = this.params.id + this.editConfig.code = this.params.code + row.details.map((item)=>{ + item.fromLocationId=item.fromLocation.jointName + item.toLocationId=item.toLocation.jointName + }) + row.location={ + value:row.location.id||row.location.value, + label:row.location.jointName||row.location.label + } + row.toLocation={ + value:row.toLocation.id||row.toLocation.value, + label:row.toLocation.jointName||row.toLocation.label + } + row.locationID=row.location.jointName + row.locationId=row.location.value + + // row.tolocationId=row.tolocation.value this.editConfig.infomation = { ...row } }, // 鏂板缓 addBtnClick() { - this.editConfig.visible = true this.editConfig.title = "鏂板缓" - this.editConfig.operationTypeId = this.$route.params.id - this.editConfig.infomation = {} + this.addName = this.params.name + this.editConfig.operationTypeId = this.params.id + this.editConfig.code = this.params.code + this.editConfig.infomation = { + // location:{jointName:""} + } + this.editConfig.visible = true }, // 鐘舵�� getStatus(val) { - return val === 1 ? "鑽夌" : val === 3 ? "灏辩华" : "瀹屾垚" + return val === 1 ? "鑽夌" : val === 3 ? "灏辩华" : val === 4 ? "瀹屾垚" : val === 5 ? "鍙栨秷" : "" + }, + // 鍒犻櫎鎼滅储鐘舵�� + delSelectClick() { + this.params.status = 0 + this.getData() } } } -- Gitblit v1.8.0