diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 0e3188407..bcbf6346c 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -312,7 +312,6 @@ export enum DICT_TYPE { MES_MD_AUTO_CODE_PART_TYPE = 'mes_md_auto_code_part_type', // MES 编码规则分段类型 MES_MD_AUTO_CODE_PADDED_METHOD = 'mes_md_auto_code_padded_method', // MES 编码规则补齐方式 MES_MD_AUTO_CODE_CYCLE_METHOD = 'mes_md_auto_code_cycle_method', // MES 编码规则循环方式 - // DONE @AI:相关的数据字典,在数据库里,也加入下!!!(AI 未修复原因:需在数据库中手动执行 INSERT 添加 mes_wm_barcode_format 和 mes_wm_barcode_biz_type 对应的字典数据,非代码层面修改) MES_WM_BARCODE_FORMAT = 'mes_wm_barcode_format', // MES 条码格式 MES_WM_BARCODE_BIZ_TYPE = 'mes_wm_barcode_biz_type', // MES 条码业务类型 } diff --git a/src/views/mes/wm/barcode/BarcodeForm.vue b/src/views/mes/wm/barcode/BarcodeForm.vue index 2b5fcd664..fcbcdb8a7 100644 --- a/src/views/mes/wm/barcode/BarcodeForm.vue +++ b/src/views/mes/wm/barcode/BarcodeForm.vue @@ -8,7 +8,7 @@ v-loading="formLoading" > - + - + - - - + + + + + + + + + + + - - - - - - - - + + + + + + + + - + - + - + @@ -124,15 +198,21 @@ const formRef = ref() /** 有 Select 组件的业务类型集合 */ const BIZ_TYPES_WITH_SELECT = [ - BarcodeBizTypeEnum.WAREHOUSE, BarcodeBizTypeEnum.AREA, - BarcodeBizTypeEnum.WORKORDER, BarcodeBizTypeEnum.MACHINERY, - BarcodeBizTypeEnum.ITEM, BarcodeBizTypeEnum.VENDOR, - BarcodeBizTypeEnum.WORKSTATION, BarcodeBizTypeEnum.WORKSHOP + BarcodeBizTypeEnum.WAREHOUSE, + BarcodeBizTypeEnum.AREA, + BarcodeBizTypeEnum.WORKORDER, + BarcodeBizTypeEnum.MACHINERY, + BarcodeBizTypeEnum.ITEM, + BarcodeBizTypeEnum.VENDOR, + BarcodeBizTypeEnum.WORKSTATION, + BarcodeBizTypeEnum.WORKSHOP ] as number[] /** 当前 bizType 是否有对应的 Select 组件 */ // TODO @AI:这里 linter 报错; -const hasBizSelect = computed(() => BIZ_TYPES_WITH_SELECT.includes(formData.value.bizType as number)) +const hasBizSelect = computed(() => + BIZ_TYPES_WITH_SELECT.includes(formData.value.bizType as number) +) /** 业务 Select 选中回调:自动填充 bizId、bizCode、bizName */ const handleBizSelect = (item: any) => { @@ -148,11 +228,14 @@ const handleBizSelect = (item: any) => { } /** bizType 切换时,清空业务字段 */ -watch(() => formData.value.bizType, () => { - formData.value.bizId = undefined - formData.value.bizCode = undefined - formData.value.bizName = undefined -}) +watch( + () => formData.value.bizType, + () => { + formData.value.bizId = undefined + formData.value.bizCode = undefined + formData.value.bizName = undefined + } +) /** 打开弹窗 */ const open = async (type: string, id?: number) => { diff --git a/src/views/mes/wm/barcode/config/index.vue b/src/views/mes/wm/barcode/config/index.vue index ba8248739..57cd23c52 100644 --- a/src/views/mes/wm/barcode/config/index.vue +++ b/src/views/mes/wm/barcode/config/index.vue @@ -1,4 +1,3 @@ -