From e12004a43a1bb3c79df90037934f2843087a00af Mon Sep 17 00:00:00 2001 From: hwj Date: Mon, 8 Jun 2026 15:03:48 +0800 Subject: [PATCH 1/8] =?UTF-8?q?feat=EF=BC=9A=E6=A8=A1=E5=85=B7=E5=87=BA?= =?UTF-8?q?=E5=BA=93/=E6=A8=A1=E5=85=B7=E5=85=A5=E5=BA=93-=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=B7=BB=E5=8A=A0=E6=A8=A1=E5=85=B7=E7=BB=84/?= =?UTF-8?q?=E5=AD=90=E6=A8=A1=E5=85=B7=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/erp/stock/in/index.ts | 2 +- src/api/erp/stock/out/index.ts | 2 +- src/locales/en.ts | 8 +- src/locales/zh-CN.ts | 8 +- src/views/mes/moldget/MoldGetForm.vue | 77 ++--- src/views/mes/moldreturn/MoldReturnForm.vue | 76 ++--- src/views/mes/moldreturn/index.vue | 340 +++++++------------- 7 files changed, 212 insertions(+), 301 deletions(-) diff --git a/src/api/erp/stock/in/index.ts b/src/api/erp/stock/in/index.ts index 4d173055..ee692bb3 100644 --- a/src/api/erp/stock/in/index.ts +++ b/src/api/erp/stock/in/index.ts @@ -38,7 +38,7 @@ export const StockInApi = { // 更新其它入库单的状态 updateStockInStatus: async (id: number, status: number) => { return await request.put({ - url: `/erp/stock-in/update-status`, + url: `/erp/stock-in/update-mold-status`, params: { id, status diff --git a/src/api/erp/stock/out/index.ts b/src/api/erp/stock/out/index.ts index c62d2de8..79d2d74b 100644 --- a/src/api/erp/stock/out/index.ts +++ b/src/api/erp/stock/out/index.ts @@ -38,7 +38,7 @@ export const StockOutApi = { // 更新其它出库单的状态 updateStockOutStatus: async (id: number, status: number) => { return await request.put({ - url: `/erp/stock-out/update-status`, + url: `/erp/stock-out/update-mold-status`, params: { id, status diff --git a/src/locales/en.ts b/src/locales/en.ts index 4eb0b64d..5a224892 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -2739,7 +2739,10 @@ export default { approveConfirm: 'Confirm approve this stock in order?', unapproveConfirm: 'Confirm unapprove this stock in order?', approveSuccess: 'Approve successful', - unapproveSuccess: 'Unapprove successful' + unapproveSuccess: 'Unapprove successful', + subMoldList: 'Sub Mold List', + moldGroupList: 'Mold Group & Sub Mold List', + moldGroupListTitle: 'Stock In Mold Group List' }, MoldGet: { @@ -2794,7 +2797,8 @@ export default { validatorItemOutIdRequired: 'Stock out id can not be empty', validatorItemWarehouseRequired: 'Warehouse can not be empty', validatorItemMoldRequired: 'Mold can not be empty', - validatorItemCountRequired: 'Quantity can not be empty' + validatorItemCountRequired: 'Quantity can not be empty', + moldGroupListTitle: 'Stock Out Mold Group List' }, MoldInspectionItems: { diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 66ca0463..9d1803dc 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -2246,7 +2246,10 @@ export default { approveConfirm: '确定审批该入库单吗?', unapproveConfirm: '确定反审批该入库单吗?', approveSuccess: '审批成功', - unapproveSuccess: '反审批成功' + unapproveSuccess: '反审批成功', + subMoldList: '子模具列表', + moldGroupList: '模具组及子模具列表', + moldGroupListTitle: '入库模具组清单' }, MoldGet: { @@ -2301,7 +2304,8 @@ export default { validatorItemOutIdRequired: '出库编号不能为空', validatorItemWarehouseRequired: '仓库不能为空', validatorItemMoldRequired: '模具不能为空', - validatorItemCountRequired: '数量不能为空' + validatorItemCountRequired: '数量不能为空', + moldGroupListTitle: '出库模具组清单' }, MoldInspectionItems: { diff --git a/src/views/mes/moldget/MoldGetForm.vue b/src/views/mes/moldget/MoldGetForm.vue index 7652ed9a..26021713 100644 --- a/src/views/mes/moldget/MoldGetForm.vue +++ b/src/views/mes/moldget/MoldGetForm.vue @@ -89,11 +89,46 @@ - + - - + + + + + + + + + + @@ -109,9 +144,8 @@ From 156e532b14066dec4a8dec7797a15a8b7cb67c4b Mon Sep 17 00:00:00 2001 From: hwj Date: Mon, 8 Jun 2026 17:26:23 +0800 Subject: [PATCH 6/8] =?UTF-8?q?fix=EF=BC=9A=E6=A8=A1=E5=85=B7=E7=BB=84-?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AC=AC=E4=B8=80=E6=AC=A1=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E4=B8=8A=E6=A8=A1/=E4=B8=8B=E6=A8=A1=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=B2=A1=E8=B0=83=E7=94=A8=E6=8E=A5=E5=8F=A3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/erp/mold/index.vue | 51 ++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/src/views/erp/mold/index.vue b/src/views/erp/mold/index.vue index bae14aeb..346271a1 100644 --- a/src/views/erp/mold/index.vue +++ b/src/views/erp/mold/index.vue @@ -12,8 +12,8 @@ - + { + const v = val?.trim() || undefined + queryParams.code = v + queryParams.name = v + queryParams.productName = v +}) + +const onKeywordClear = () => { + inputKeyword.value = '' +} + const statusCards = computed(() => [ { key: 'all', label: t('MoldManagement.MoldBrandPage.all'), value: counters.allCount, status: undefined }, { key: 'onMachine', label: t('MoldManagement.MoldBrandPage.onMachine'), value: counters.onMachineCount, status: 1 }, @@ -215,12 +226,6 @@ const statusCards = computed(() => [ { key: 'scrapped', label: t('MoldManagement.MoldBrandPage.scrapped'), value: counters.scrappedCount, status: 3 } ]) -const parseKeyword = () => { - const keyword = queryParams.keyword?.trim() - queryParams.code = keyword || undefined - queryParams.name = keyword || undefined -} - const getImageList = (images?: string) => { if (!images) return [] return String(images) @@ -243,9 +248,10 @@ const normalizePageResult = (data: any) => { const getList = async () => { loading.value = true try { - parseKeyword() const selected = productOptions.value.filter((item) => (queryParams.productIds || []).includes(item.id)) - queryParams.productName = selected.map((p) => p.name).join(',') + if (selected.length > 0) { + queryParams.productName = selected.map((p) => p.name).join(',') + } const data = await MoldBrandApi.getMoldBrandPage({ ...queryParams, currentDevice: queryParams.currentDevice @@ -263,6 +269,7 @@ const handleQuery = () => { const resetQuery = () => { queryFormRef.value?.resetFields() + inputKeyword.value = '' currentStatusKey.value = 'all' queryParams.status = undefined queryParams.productIds = [] @@ -331,14 +338,19 @@ const openDetail = (id: number) => { } // 上下模操作函数 -const openOperateForm = async (type: number, row: MoldBrandVO) => { +const openOperateForm = (type: number, row: MoldBrandVO) => { operateType.value = type currentMold.value = row operateFormVisible.value = true - await nextTick() - moldOperateViewRef.value?.open() } +// 监听 operateFormVisible + moldOperateViewRef,等异步组件就绪后调用 open +watch([operateFormVisible, moldOperateViewRef], ([visible, ref]) => { + if (visible && ref) { + ref.open() + } +}) + const closeOperateForm = () => { operateFormVisible.value = false currentMold.value = null @@ -349,13 +361,18 @@ const onOperateSuccess = () => { } // 维护操作函数 -const openMaintainForm = async (row: MoldBrandVO) => { +const openMaintainForm = (row: MoldBrandVO) => { currentMold.value = row maintainFormVisible.value = true - await nextTick() - moldMaintainViewRef.value?.open() } +// 监听 maintainFormVisible + moldMaintainViewRef,等异步组件就绪后调用 open +watch([maintainFormVisible, moldMaintainViewRef], ([visible, ref]) => { + if (visible && ref) { + ref.open() + } +}) + const closeMaintainForm = () => { maintainFormVisible.value = false currentMold.value = null From 48bceb74d20cf875828410109a2050d9ecf6d844 Mon Sep 17 00:00:00 2001 From: hwj Date: Mon, 8 Jun 2026 17:32:07 +0800 Subject: [PATCH 7/8] =?UTF-8?q?style=EF=BC=9A=E4=B8=8A=E4=B8=8B=E6=A8=A1-?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E4=BA=BA/=E6=93=8D=E4=BD=9C=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/en.ts | 2 ++ src/locales/zh-CN.ts | 2 ++ src/views/mes/moldoperate/MoldOperateForm.vue | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/locales/en.ts b/src/locales/en.ts index 3a8cd776..b9799dd7 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -3073,6 +3073,8 @@ export default { validatorProductionLineRequired: 'Production line can not be empty', validatorMoldRequired: 'Mold can not be empty', validatorLowerMoldRequired: 'Lower mold can not be empty', + validatorOperateTimeRequired: 'Operation time can not be empty', + validatorOperatorRequired: 'Operator can not be empty', alertNeedRemoveMoldFirst: 'Please remove the mold from this device first!', alertNoMoldOnDevice: 'No mold is installed on this device!' }, diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index f360eab9..5128cdb7 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -2577,6 +2577,8 @@ export default { validatorProductionLineRequired: '产线不能为空', validatorMoldRequired: '关联模具不能为空', validatorLowerMoldRequired: '下模模具不能为空', + validatorOperateTimeRequired: '操作时间不能为空', + validatorOperatorRequired: '操作人不能为空', alertNeedRemoveMoldFirst: '请先将该设备上的模具换下!', alertNoMoldOnDevice: '该设备没有安装模具!' }, diff --git a/src/views/mes/moldoperate/MoldOperateForm.vue b/src/views/mes/moldoperate/MoldOperateForm.vue index 222fcd74..555bdcc2 100644 --- a/src/views/mes/moldoperate/MoldOperateForm.vue +++ b/src/views/mes/moldoperate/MoldOperateForm.vue @@ -171,6 +171,8 @@ const formRules = reactive({ deviceId: [{ required: true, message: t('MoldManagement.MoldOperate.validatorDeviceRequired'), trigger: 'change' }], lineId: [{ required: true, message: t('MoldManagement.MoldOperate.validatorProductionLineRequired'), trigger: 'change' }], moldId: [{ required: true, validator: validateMoldId, trigger: 'change' }], + operateTime: [{ required: true, message: t('MoldManagement.MoldOperate.validatorOperateTimeRequired'), trigger: 'blur' }], + operatorId: [{ required: true, message: t('MoldManagement.MoldOperate.validatorOperatorRequired'), trigger: 'change' }], }) const formRef = ref() // 表单 Ref From a049c54d7d1a8c1d8f7a34c0548df7fce5484a09 Mon Sep 17 00:00:00 2001 From: hwj Date: Mon, 8 Jun 2026 17:36:50 +0800 Subject: [PATCH 8/8] =?UTF-8?q?style=EF=BC=9A=E6=A8=A1=E5=85=B7=E7=BB=84-?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=A1=86=E5=85=A5=E5=8F=82=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/erp/mold/index.vue | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/views/erp/mold/index.vue b/src/views/erp/mold/index.vue index 346271a1..01b999d6 100644 --- a/src/views/erp/mold/index.vue +++ b/src/views/erp/mold/index.vue @@ -182,10 +182,8 @@ const counters = reactive({ const queryParams = reactive({ pageNo: 1, pageSize: 10, - code: undefined as string | undefined, - name: undefined as string | undefined, + keyword: undefined as string | undefined, productIds: [] as number[], - productName: undefined as string | undefined, status: undefined as number | undefined, currentDevice: undefined as string | undefined, currentPosition: undefined as string | undefined @@ -208,10 +206,7 @@ const moldMaintainViewRef = ref() const inputKeyword = ref('') watch(inputKeyword, (val) => { - const v = val?.trim() || undefined - queryParams.code = v - queryParams.name = v - queryParams.productName = v + queryParams.keyword = val?.trim() || undefined }) const onKeywordClear = () => {