From 27876781629d64545777c069ed60717b34f46b2c Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期五, 03 十一月 2023 17:05:49 +0800
Subject: [PATCH] 库存预览跳转带出单据的状态及仓库位置列表默认展示内部位置
---
src/views/overview/OverviewListView.vue | 14 ++++
src/components/makepager/SearchCommonView.vue | 16 +++--
src/views/operate/orderPoint/index.vue | 48 +++------------
src/views/warehouseManage/position/index.vue | 45 +++++++-------
4 files changed, 55 insertions(+), 68 deletions(-)
diff --git a/src/components/makepager/SearchCommonView.vue b/src/components/makepager/SearchCommonView.vue
index dd328e8..3c280c3 100644
--- a/src/components/makepager/SearchCommonView.vue
+++ b/src/components/makepager/SearchCommonView.vue
@@ -54,7 +54,7 @@
<template v-if="selectArr?.length > 0" slot="prepend">
<div style="display: flex">
<div v-for="(val, i) in selectArr" :key="i" class="pre-views">
- <span style="margin-left: 5px">{{ val.title }}</span>
+ <span style="margin-left: 5px">{{ val?.title ?? val }}</span>
<i @click="delSelectClick(val)" class="el-icon-close" style="margint: 0 5px"></i>
</div>
</div>
@@ -80,7 +80,7 @@
trigger="click"
:hide-on-click="false"
placement="bottom"
- @command="switchStatusKeywords($event, selList)"
+ @command="switchKeywords($event, selList)"
>
<div class="common yes-cursor">
<img src="@/assets/img/shaixuan.png" style="width: 10px" />
@@ -90,7 +90,7 @@
<el-dropdown-item
v-for="(item, key) in screenArray"
:key="key"
- :command="{ command: item.title, ...item }"
+ :command="item.title"
:class="{ selected: status == item.title }"
>
<div class="dropdown-view">
@@ -256,6 +256,9 @@
}
},
mounted() {
+ this.searchTaskMap.forEach((ele) => {
+ this.selList.push(ele.title)
+ })
this.selectArr = this.searchTaskMap
},
methods: {
@@ -287,8 +290,8 @@
inspectionConfigClick() {
this.$emit("inspectionConfigClick")
},
- switchStatusKeywords(command, item) {
- console.log("index", command)
+ switchKeywords(command, item) {
+ console.log("index", command, item)
this.status = command
const oldValue = item
console.log(oldValue)
@@ -301,6 +304,7 @@
} else {
oldValue.push(command)
}
+ this.$emit("switchKeywords", item)
},
// 鍒犻櫎绛涢�夊唴瀹�
delSelectClick(item) {
@@ -427,7 +431,7 @@
}
}
.selected {
- color: #409eff;
+ color: #606266;
}
.dropdown-view {
position: relative;
diff --git a/src/views/operate/orderPoint/index.vue b/src/views/operate/orderPoint/index.vue
index 80c1401..092a1d9 100644
--- a/src/views/operate/orderPoint/index.vue
+++ b/src/views/operate/orderPoint/index.vue
@@ -8,10 +8,13 @@
:placeholder="'璇疯緭鍏ヤ綅缃�/浜у搧'"
:amount-view="false"
:search-task-map="searchTaskMap"
+ :show-sreen="false"
+ :screen-array="screenArray"
@addCommonClick="addProductClick"
@searchClick="getList"
@discardBtnClick="discardBtnClick"
@delSelectClick="delSelectClick"
+ @switchKeywords="switchKeywords"
/>
</div>
<div class="content_wrap">
@@ -83,41 +86,6 @@
data() {
return {
datas: [],
- // datas: [{
- // label: '涓�绾� 1',
- // children: [{
- // label: '浜岀骇 1-1',
- // children: [{
- // label: '涓夌骇 1-1-1'
- // }]
- // }]
- // }, {
- // label: '涓�绾� 2',
- // children: [{
- // label: '浜岀骇 2-1',
- // children: [{
- // label: '涓夌骇 2-1-1'
- // }]
- // }, {
- // label: '浜岀骇 2-2',
- // children: [{
- // label: '涓夌骇 2-2-1'
- // }]
- // }]
- // }, {
- // label: '涓�绾� 3',
- // children: [{
- // label: '浜岀骇 3-1',
- // children: [{
- // label: '涓夌骇 3-1-1'
- // }]
- // }, {
- // label: '浜岀骇 3-2',
- // children: [{
- // label: '涓夌骇 3-2-1'
- // }]
- // }]
- // }],
defaultProps: {
children: "children",
label: "jointName"
@@ -140,12 +108,13 @@
unit: "",
reorderId: 0,
searchTaskMap: [],
- type: "bh"
+ type: "bh",
+ screenArray: [{ id: "0", type: "bh", title: "閲嶆柊璁㈣喘" }]
}
},
created() {
this.setTable()
- this.searchTaskMap = [{ type: this.type, title: "閲嶆柊璁㈣喘" }]
+ this.searchTaskMap = [{ id: "0", type: this.type, title: "閲嶆柊璁㈣喘" }]
this.getData()
this.getLocationList()
},
@@ -411,6 +380,11 @@
delSelectClick() {
this.type = ""
this.getData()
+ },
+ switchKeywords(item) {
+ console.log(item, "switchKeywords")
+ this.type = item?.length > 0 ? "bh" : ""
+ this.getData()
}
}
}
diff --git a/src/views/overview/OverviewListView.vue b/src/views/overview/OverviewListView.vue
index 1da054c..fc3a8d8 100644
--- a/src/views/overview/OverviewListView.vue
+++ b/src/views/overview/OverviewListView.vue
@@ -8,8 +8,10 @@
:add-title="'鏂板缓'"
:placeholder="'璇疯緭鍏ュ崟鍙�/鏉ユ簮鍗曟嵁'"
:amount-view="false"
+ :search-task-map="searchTaskMap"
@addCommonClick="addBtnClick"
@searchClick="getList"
+ @delSelectClick="delSelectClick"
/>
</div>
<div class="list-view">
@@ -79,7 +81,8 @@
displayEdit: false,
formLabel: "",
toLabel: "",
- addName: ""
+ addName: "",
+ searchTaskMap: []
}
},
created() {
@@ -95,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)
},
@@ -275,7 +280,12 @@
},
// 鐘舵��
getStatus(val) {
- return val === 1 ? "鑽夌" : val === 3 ? "灏辩华" : "瀹屾垚"
+ return val === 1 ? "鑽夌" : val === 3 ? "灏辩华" : val === 4 ? "瀹屾垚" : ""
+ },
+ // 鍒犻櫎鎼滅储鐘舵��
+ delSelectClick() {
+ this.params.status = 0
+ this.getData()
}
}
}
diff --git a/src/views/warehouseManage/position/index.vue b/src/views/warehouseManage/position/index.vue
index 5ab6b05..b1bc80c 100644
--- a/src/views/warehouseManage/position/index.vue
+++ b/src/views/warehouseManage/position/index.vue
@@ -5,36 +5,24 @@
:add-title="'鏂板缓'"
:placeholder="'璇疯緭鍏ュ崟鍙�'"
:amount-view="false"
+ :search-task-map="searchTaskMap"
@addCommonClick="addBtnClick"
@searchClick="getList"
+ @delSelectClick="delSelectClick"
/>
</div>
<div class="list-view">
<div class="table">
- <TableCommonView
- ref="tableListRef"
- :table-list="tableList"
- :show-checkcol="false"
- >
- <template slot="tableButton">
+ <TableCommonView ref="tableListRef" :table-list="tableList" :show-checkcol="false">
+ <template slot="tableButton">
<el-table-column label="鎿嶄綔" width="120" fixed="right">
<template slot-scope="scope">
- <el-button
- @click="tableRowClick(scope.row,'edit')"
- type="text"
- size="small"
- >缂栬緫</el-button
- >
- <el-button
- type="text"
- size="small"
- @click="tableRowClick(scope.row,'look')"
- >鏌ョ湅</el-button
- >
+ <el-button @click="tableRowClick(scope.row, 'edit')" type="text" size="small">缂栬緫</el-button>
+ <el-button type="text" size="small" @click="tableRowClick(scope.row, 'look')">鏌ョ湅</el-button>
</template>
</el-table-column>
</template>
- </TableCommonView>
+ </TableCommonView>
</div>
<div class="btn-pager">
<PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
@@ -70,11 +58,14 @@
title: "鏂板缓",
infomation: {}
},
- positionTypeList: getDataByType("positionType")
+ positionTypeList: getDataByType("positionType"),
+ searchTaskMap: [],
+ type: 3
}
},
created() {
this.setTable()
+ this.searchTaskMap = [{ id: "3", title: "鍐呴儴浣嶇疆" }]
this.getData()
},
methods: {
@@ -134,6 +125,7 @@
// 璇锋眰鏁版嵁
async getData() {
await getLocationList({
+ type: this.type,
keyword: this.keyword,
page: this.pagerOptions.currPage,
pageSize: this.pagerOptions.pageSize
@@ -156,10 +148,12 @@
this.getData()
},
// 琛岀偣鍑�
- tableRowClick(row,val) {
- this.editConfig.title = val=='look'?'鏌ョ湅':"缂栬緫"
+ tableRowClick(row, val) {
+ this.editConfig.title = val == "look" ? "鏌ョ湅" : "缂栬緫"
this.editConfig.infomation = { ...row }
- this.editConfig.infomation.parentId = this.editConfig.infomation.parentId?Number(this.editConfig.infomation.parentId):null
+ this.editConfig.infomation.parentId = this.editConfig.infomation.parentId
+ ? Number(this.editConfig.infomation.parentId)
+ : null
this.editConfig.visible = true
},
// 鏂板缓
@@ -178,6 +172,11 @@
}
this.editConfig.visible = true
this.editConfig.title = "鏂板缓"
+ },
+ // 鍒犻櫎浣嶇疆
+ delSelectClick() {
+ this.type = 0
+ this.getData()
}
}
}
--
Gitblit v1.8.0