From 176f373e0f7008c95b1db7699921e61cba9fc3ab Mon Sep 17 00:00:00 2001 From: hwj Date: Thu, 25 Jun 2026 10:50:51 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E7=9B=98=E7=82=B9=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/erp/stock/check/index.ts | 41 ++ src/locales/en.ts | 12 + src/locales/zh-CN.ts | 12 + src/views/erp/stock/checkExecution/index.vue | 13 +- src/views/erp/stock/checkRecord/index.vue | 430 +++++++++++++++++++ 5 files changed, 505 insertions(+), 3 deletions(-) create mode 100644 src/views/erp/stock/checkRecord/index.vue diff --git a/src/api/erp/stock/check/index.ts b/src/api/erp/stock/check/index.ts index 79482fb9..7965d179 100644 --- a/src/api/erp/stock/check/index.ts +++ b/src/api/erp/stock/check/index.ts @@ -40,6 +40,37 @@ export interface StockCheckItemVO { productUnitName: string // 产品单位名称 } +export interface StockCheckRecordVO { + id: number + stockCheckId?: number + stockCheckItemId?: number + no?: string + checkTime?: Date | string + sourceType?: number | string + categoryType?: number | string + status?: number | string + checkStatus?: number | string + productId?: number + productName?: string + productBarCode?: string + barCode?: string + standard?: string + productUnitName?: string + unitName?: string + warehouseId?: number + warehouseName?: string + areaId?: number + areaName?: string + stockCount?: number | string + actualCount?: number | string + count?: number | string + remark?: string + creator?: string + creatorName?: string + createTime?: Date | string + [key: string]: any +} + export interface StockCheckApproveRecordVO { id?: number // 编号 stockCheckId?: number // 盘点单编号 @@ -61,6 +92,16 @@ export const StockCheckApi = { return await request.get({ url: `/erp/stock-check/page`, params }) }, + // 查询库存盘点记录分页 + getStockCheckRecordPage: async (params: any) => { + return await request.get({ url: `/erp/stock-check/record-page`, params }) + }, + + // 导出库存盘点记录 Excel + exportStockCheckRecord: async (params) => { + return await request.download({ url: `/erp/stock-check/record-export-excel`, params }) + }, + // 查询库存盘点单详情 getStockCheck: async (id: number) => { return await request.get({ url: `/erp/stock-check/get?id=` + id }) diff --git a/src/locales/en.ts b/src/locales/en.ts index 57ee43c0..2e5ddde4 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -716,6 +716,18 @@ export default { validatorWarehouseRequired: 'Warehouse name is required' } }, + CheckRecord: { + area: 'Area', + productBarCode: 'Material Code', + productName: 'Material Name', + warehouseName: 'Warehouse Name', + areaName: 'Area Name', + placeholderSourceType: 'Please select source type', + placeholderCategoryType: 'Please select product category', + placeholderArea: 'Please select area', + placeholderCheckStatus: 'Please select check status', + exportName: 'Stock Check Record.xls' + }, Record: { id: 'ID', product: 'Product', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index b260bf93..cf8f427e 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -716,6 +716,18 @@ export default { validatorWarehouseRequired: '仓库名字不能为空' } }, + CheckRecord: { + area: '库区', + productBarCode: '物料编码', + productName: '物料名称', + warehouseName: '仓库名称', + areaName: '库区名称', + placeholderSourceType: '请选择生成来源', + placeholderCategoryType: '请选择产品分类', + placeholderArea: '请选择库区', + placeholderCheckStatus: '请选择盘点状态', + exportName: '盘点记录.xls' + }, Record: { id: '编号', product: '产品', diff --git a/src/views/erp/stock/checkExecution/index.vue b/src/views/erp/stock/checkExecution/index.vue index 97ca0a30..cb82756b 100644 --- a/src/views/erp/stock/checkExecution/index.vue +++ b/src/views/erp/stock/checkExecution/index.vue @@ -178,8 +178,8 @@ {{ t('action.edit') }} @@ -363,7 +363,14 @@ const resetQuery = () => { handleQuery() } -const openForm = (type: string, id?: number) => { +const isEditDisabled = (row: StockCheckVO) => { + return Number(row.status) === 20 || Number(row.checkStatus) === 1 +} + +const openForm = (type: string, id?: number, row?: StockCheckVO) => { + if (type === 'update' && row && isEditDisabled(row)) { + return + } formRef.value.open(type, id) } diff --git a/src/views/erp/stock/checkRecord/index.vue b/src/views/erp/stock/checkRecord/index.vue new file mode 100644 index 00000000..687cb027 --- /dev/null +++ b/src/views/erp/stock/checkRecord/index.vue @@ -0,0 +1,430 @@ + + + + +