feat(wms): 添加分卷操作的多仓库标签功能

在分卷操作页面中,根据工序类型动态显示对应的仓库标签,并实现标签切换时自动加载对应仓库的物料列表
This commit is contained in:
砂糖
2025-11-24 17:48:38 +08:00
parent 9d7ce2472d
commit 76c65bd31d
2 changed files with 175 additions and 172 deletions

View File

@@ -1,5 +1,5 @@
<template>
<DoPage :label="actionType" />
<DoPage :label="actionType" :tabs="tabs" />
</template>
<script>
@@ -12,13 +12,50 @@
},
data() {
return {
actionType: '分卷'
actionType: '分卷',
tabs: [],
}
},
watch: {
'$route.query.actionType': {
handler(newVal) {
this.actionType = newVal
this.actionType = newVal;
// 根据名字获取默认的查询参数
const map = {
'酸连轧工序': [
{value: '1988150099140866050', label: '酸连轧成品库'},
{value: '1988150263284953089', label: '镀锌原料库'},
{value: '1988150545175736322', label: '脱脂原料库'},
],
'镀锌工序': [
{value: '1988150263284953089', label: '镀锌原料库'},
{value: '1988150323162836993', label: '镀锌成品库'},
],
'脱脂工序': [
{value: '1988150545175736322', label: '脱脂原料库'},
{value: '1988150586938421250', label: '脱脂成品库'},
],
'退火工序': [
{value: '1988150648993148929', label: '罩式退火原料库'},
{value: '1988150704496373761', label: '罩式退火成品库'},
],
'拉矫平整工序': [
{value: '1988150854442741762', label: '拉矫原料库'},
{value: '1988150915591499777', label: '拉矫成品库'},
],
'双机架工序': [
{value: '1992873386047643650', label: '双机架原料库'},
{value: '1992873437713080322', label: '双机架成品库'},
],
'镀铬工序': [
{value: '1988151076996706306', label: '镀铬原料库'},
{value: '1988151132361519105', label: '镀铬成品库'},
],
}
// 从map中获取默认的查询参数
const defaultWarehouseIds = map[this.actionType] || []
console.log(defaultWarehouseIds, 'defaultWarehouseIds')
this.tabs = defaultWarehouseIds
},
immediate: true
}