From 68c61dbf812d9e4a35211ab67c05f0d5b80a8890 Mon Sep 17 00:00:00 2001 From: hwj Date: Thu, 18 Jun 2026 14:37:09 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E7=9B=98=E7=82=B9=E6=89=A7?= =?UTF-8?q?=E8=A1=8C/=E6=89=98=E7=9B=98=E7=AE=A1=E7=90=86=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/erp/stock/pallet/index.ts | 4 +- src/locales/en.ts | 9 +- src/locales/zh-CN.ts | 9 +- src/utils/dict.ts | 1 - .../components/StockCheckExecutionForm.vue | 9 + src/views/erp/stock/pallet/PalletForm.vue | 472 +++++++++++++++--- src/views/erp/stock/pallet/index.vue | 162 ++---- 7 files changed, 478 insertions(+), 188 deletions(-) diff --git a/src/api/erp/stock/pallet/index.ts b/src/api/erp/stock/pallet/index.ts index 2ce1c0ac..7bc31c2b 100644 --- a/src/api/erp/stock/pallet/index.ts +++ b/src/api/erp/stock/pallet/index.ts @@ -26,8 +26,8 @@ export const PalletApi = { return await request.get({ url: `/erp/pallet/page`, params }) }, - createPallet: async (params: PalletVO) => { - return await request.post({ url: `/erp/pallet/create`, params }) + createPallet: async (data: PalletVO) => { + return await request.post({ url: `/erp/pallet/create`, data }) }, updatePallet: async (params: PalletVO) => { diff --git a/src/locales/en.ts b/src/locales/en.ts index b18a5a43..23ae1a2c 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -597,6 +597,7 @@ validatorSelectCheckItem: 'Please select check item', validatorAuditUserRequired: 'Please select auditor', validatorCompleteCheckInfo: 'Please complete check information first', + confirmActualCountZero: ' actual count is 0. Confirm submit?', confirmApprove: 'Are you sure to approve this check order?', confirmReverseApprove: 'Are you sure to reverse approve this check order?', submitSuccess: 'Submit success', @@ -729,13 +730,18 @@ productCount: 'Product Quantity', qrcode: 'QR Code', viewQrcode: 'View QR Code', + qrcodeEmpty: 'No QR code', + qrcodeRefreshConfirm: 'Confirm to refresh this pallet QR code?', purchaseDate: 'Purchase Date', useDate: 'Use Date', remark: 'Remark', createTime: 'Create Time', placeholderCode: 'Please enter pallet code', placeholderPalletType: 'Please enter pallet type', - placeholderSpecification: 'Please select pallet specification', + placeholderSpecification: 'Please enter pallet specification', + placeholderLength: 'Length', + placeholderWidth: 'Width', + placeholderHeight: 'Height', placeholderRatedLoadWeight: 'Please enter rated load', placeholderUnit: 'Please enter unit', placeholderStatus: 'Please select pallet status', @@ -744,7 +750,6 @@ placeholderPlanCode: 'Please enter production task no.', placeholderProductId: 'Please select product', placeholderProductCount: 'Please enter product quantity', - placeholderQrcode: 'Please enter QR code URL', placeholderPurchaseDate: 'Please select purchase date', placeholderUseDate: 'Please select use date', placeholderRemark: 'Please enter remark', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 600f308e..07af80fc 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -597,6 +597,7 @@ validatorSelectCheckItem: '请选择盘点项', validatorAuditUserRequired: '请选择审核人', validatorCompleteCheckInfo: '请先完善盘点信息', + confirmActualCountZero: '实盘数量为0,确认提交吗?', confirmApprove: '确定审批该盘点单吗?', confirmReverseApprove: '确定反审批该盘点单吗?', submitSuccess: '提交成功', @@ -729,13 +730,18 @@ productCount: '产品数量', qrcode: '二维码', viewQrcode: '查看二维码', + qrcodeEmpty: '暂无二维码', + qrcodeRefreshConfirm: '确认刷新该托盘二维码吗?', purchaseDate: '采购日期', useDate: '启用日期', remark: '备注', createTime: '创建时间', placeholderCode: '请输入托盘编码', placeholderPalletType: '请输入托盘类型', - placeholderSpecification: '请选择托盘规格', + placeholderSpecification: '请输入托盘规格', + placeholderLength: '长', + placeholderWidth: '宽', + placeholderHeight: '高', placeholderRatedLoadWeight: '请输入额定载重', placeholderUnit: '请输入单位', placeholderStatus: '请选择托盘状态', @@ -744,7 +750,6 @@ placeholderPlanCode: '请输入生产任务单号', placeholderProductId: '请选择产品', placeholderProductCount: '请输入产品数量', - placeholderQrcode: '请输入二维码地址', placeholderPurchaseDate: '请选择采购日期', placeholderUseDate: '请选择投入使用日期', placeholderRemark: '请输入备注', diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 1cf04976..a6bbdc0c 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -235,7 +235,6 @@ export enum DICT_TYPE { WAREHOUSE_OUTBOUND_PURPOSE = 'warehouse_outbound_purpose', // 出库用途 STORAGE_PALLET_TYPES = 'storage_pallet_types', // 仓储托盘类型 STORAGE_PALLET_STATUS = 'storage_pallet_status', // 仓储托盘状态 - STORAGE_PALLET_SPECIFICATIONS = 'storage_pallet_specifications', // 仓储托盘规格 SUBMOLD_TYPE = 'submold_type', // 子模具类型 ERP_MAINTAIN_TYPE = 'maintain_type',// ERP 保养类型 diff --git a/src/views/erp/stock/checkExecution/components/StockCheckExecutionForm.vue b/src/views/erp/stock/checkExecution/components/StockCheckExecutionForm.vue index 61c67499..0f053854 100644 --- a/src/views/erp/stock/checkExecution/components/StockCheckExecutionForm.vue +++ b/src/views/erp/stock/checkExecution/components/StockCheckExecutionForm.vue @@ -354,6 +354,8 @@ const isActualCountEmpty = (value: unknown) => value === undefined || value === const hasIncompleteActualCount = computed(() => (formData.value.items || []).some((item) => isActualCountEmpty(item.actualCount)) ) +const getCheckItemName = (item: StockCheckItemVO) => + item.productBarCode || item.productName || `${t('ErpStock.Check.checkItem')}${item.id ? `-${item.id}` : ''}` const selectedWarehouses = ref([]) const selectedAreas = ref([]) @@ -811,6 +813,13 @@ const submitForm = async (checkStatus?: 0 | 1) => { message.warning(t('ErpStock.Check.validatorCompleteCheckInfo')) return } + if (checkStatus === 1) { + const zeroCountItems = (formData.value.items || []).filter((item) => Number(item.actualCount) === 0) + if (zeroCountItems.length > 0) { + const itemNames = zeroCountItems.map((item) => getCheckItemName(item)).join('、') + await message.confirm(`${itemNames}${t('ErpStock.Check.confirmActualCountZero')}`) + } + } if (isInventoryCheck.value) { formData.value.checkStatus = checkStatus formData.value.items.forEach((item) => { diff --git a/src/views/erp/stock/pallet/PalletForm.vue b/src/views/erp/stock/pallet/PalletForm.vue index 4519c6f3..83f27307 100644 --- a/src/views/erp/stock/pallet/PalletForm.vue +++ b/src/views/erp/stock/pallet/PalletForm.vue @@ -46,19 +46,31 @@ - - + - + x + + x + + @@ -95,37 +107,20 @@ - - - + + + - - - + + + @@ -184,9 +179,19 @@ /> - + - + @@ -205,14 +210,156 @@ {{ t('common.cancel') }} + + + + + + + + + {{ t('common.query') }} + + + {{ t('common.reset') }} + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ + + + + + + + + + + + {{ t('common.query') }} + + + {{ t('common.reset') }} + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+ + diff --git a/src/views/erp/stock/pallet/index.vue b/src/views/erp/stock/pallet/index.vue index 9a2f7c94..23a5b232 100644 --- a/src/views/erp/stock/pallet/index.vue +++ b/src/views/erp/stock/pallet/index.vue @@ -1,90 +1,39 @@