diff --git a/src/api/mes/tm/tool/index.ts b/src/api/mes/tm/tool/index.ts index 3e79add31..227b00b99 100644 --- a/src/api/mes/tm/tool/index.ts +++ b/src/api/mes/tm/tool/index.ts @@ -48,5 +48,10 @@ export const TmToolApi = { // 导出工具台账 Excel exportTool: async (params: any) => { return await request.download({ url: `/mes/tm/tool/export-excel`, params }) + }, + + // 查询工具台账精简列表 + getToolSimpleList: async () => { + return await request.get({ url: `/mes/tm/tool/simple-list` }) } } diff --git a/src/views/mes/utils/constants.ts b/src/views/mes/utils/constants.ts index 8ebe2846f..201802264 100644 --- a/src/views/mes/utils/constants.ts +++ b/src/views/mes/utils/constants.ts @@ -365,6 +365,8 @@ export const BARCODE_FORMAT_MAP: Record = { /** MES 条码业务类型枚举(对应后端 BarcodeBizTypeEnum) */ export enum BarcodeBizTypeEnum { // WM 仓库模块 [100, 200) + WAREHOUSE = 102, + LOCATION = 103, AREA = 104, PACKAGE = 105, STOCK = 106, @@ -375,10 +377,13 @@ export enum BarcodeBizTypeEnum { TRANSORDER = 302, // DV 设备模块 [400, 500) MACHINERY = 400, + // TM 工具模块 [500, 600) + TOOL = 500, // MD 主数据模块 [600, 700) ITEM = 600, VENDOR = 601, WORKSTATION = 602, WORKSHOP = 603, - USER = 604 + USER = 604, + CLIENT = 605 } diff --git a/src/views/mes/wm/barcode/BarcodeForm.vue b/src/views/mes/wm/barcode/BarcodeForm.vue index b895bcbf5..7c1969f91 100644 --- a/src/views/mes/wm/barcode/BarcodeForm.vue +++ b/src/views/mes/wm/barcode/BarcodeForm.vue @@ -27,7 +27,35 @@ /> - + + + + +
+ + +
+
+
- + + + + + + + () // 库区选择器的临时数据:选择仓库后,传给库区选择器,加载对应仓库的库区列表 -const areaLocationId = ref() // 库区选择器的临时数据:选择库位后,传给库区选择器,加载对应库位的库区列表 +const locationWarehouseId = ref() // 库区选择器的临时数据:选择仓库后,传给库区选择器 +const areaWarehouseId = ref() // 库位选择器的临时数据:选择仓库后,传给库位选择器 +const areaLocationId = ref() // 库位选择器的临时数据:选择库区后,传给库位选择器 /** 业务 Select 选中回调:自动填充 bizId、bizCode、bizName */ const handleBizSelect = (item: any) => { @@ -206,7 +251,14 @@ const handleBizSelect = (item: any) => { formData.value.bizName = item.name || item.nickname } -/** 库区仓库选择回调:清空库位和库区 */ +/** 库区仓库选择回调:清空库区 */ +const handleLocationWarehouseChange = () => { + formData.value.bizId = undefined + formData.value.bizCode = undefined + formData.value.bizName = undefined +} + +/** 库位仓库选择回调:清空库区和库位 */ const handleAreaWarehouseChange = () => { areaLocationId.value = undefined formData.value.bizId = undefined @@ -214,7 +266,7 @@ const handleAreaWarehouseChange = () => { formData.value.bizName = undefined } -/** 库区库位选择回调:清空库区 */ +/** 库位库区选择回调:清空库位 */ const handleAreaLocationChange = () => { formData.value.bizId = undefined formData.value.bizCode = undefined @@ -228,7 +280,8 @@ watch( formData.value.bizId = undefined formData.value.bizCode = undefined formData.value.bizName = undefined - // 清空库区的临时数据 + // 清空仓库层级的临时数据 + locationWarehouseId.value = undefined areaWarehouseId.value = undefined areaLocationId.value = undefined }