diff --git a/.env.local b/.env.local index 59edd6e3..2eb3a785 100644 --- a/.env.local +++ b/.env.local @@ -8,8 +8,8 @@ VITE_DEV=true # 线上环境 # VITE_BASE_URL='https://besure.ngsk.tech:7001' # 本地联调 -VITE_BASE_URL='http://192.168.5.106:48081' -# VITE_BASE_URL='http://192.168.5.164:48081' +VITE_BASE_URL='http://192.168.5.160:48081' +# VITE_BASE_URL='http://192.168.43.233:48081' # VITE_BASE_URL='http://192.168.5.5:48081' diff --git a/hwj_commits_2026_04.txt b/hwj_commits_2026_04.txt new file mode 100644 index 00000000..7e73fe82 --- /dev/null +++ b/hwj_commits_2026_04.txt @@ -0,0 +1,121 @@ +style:产品物料信息-新增/编辑-编码输入框大小调整 +feat:仓库信息-添加详情弹框 +feat:库区信息/库位信息-新增页面 +style:任务单排产-排产甘特图样式优化 +style:甘特图菜单样式调整 +style:甘特图适配中英文 +Merge branch 'main' of https://git.ngsk.tech/linweidong/besure_web +style:生产报表页面适配中英文 +style:出库单据-默认展示tabs修改 +style:生产报表-质检信息字段调整 +style:任务单排产-create-batch接口添加领料人/是否计算损耗入参 +style:生产计划/任务单排产生产报表-进度条样式修改 +style:生产计划-检验明细添加分页 +feat:生产报表-质检信息对接 +feat:甘特图菜单页添加刷新按钮 +style:任务单排产-进度条样式修改 +feat:甘特图菜单页-添加排产看板 +style:生产计划-检验按钮保存后刷新列表 +style:检验记录-新增/编辑-生产计划选项框调整 +style:检验记录-编辑添加显示判断 +style:检验模板-新增/编辑-检验方案添加productId传参 +style:任务单排产-任务单明细-是否计算损耗字段 +style:检验模板-编辑回显 +style:任务单排产-任务单明细-新增计划添加领料人、是否完成质检字段 +style:生产报表-报工信息-添加日期筛选条件 +style:生产报表-列表添加刷新按钮 +style:生产报表-基础信息-查看产品信息字段修改 +feat:生产计划-已开工-检验按钮逻辑修改 +style:修复甘特图保存后弹框报错 +style:生产投料-数量不填的默认为0 +style:产品物料信息-设备-所属车间字段更改 +feat:检验模板-添加关联产品 +style:产品物料信息-关联设备选项接口添加deviceStatus=0入参 +style:产品物料信息-状态字段位置更改 +style:任务制单-技术要求、备注样式修改 +style:任务制单-明细-编辑-打包数量字段自动填充 +style:产品物料信息-去掉字段:采购价格、最低价格、销售价格 +style:产品BOM-产品BOM明细-单位自动带入 +style:生产计划-添加“所有”tabs +style:甘特图菜单添加设备筛选框 +style:排产甘特图日期调整 +feat:菜单甘特图页面/一键排查-甘特图拆开两个组件 +style:排产弹框-任务单汇总明细-未计划数为0的,不能勾选 +style:排产弹框适配中英文 +style:检验记录-新增添加单号自动生成 +style:产品BOM-产品筛选框接口更改 +style:任务单排产-排产弹框样式调整 +style:任务制单-父列表项的status值为2,7,8,9,10时,子列表不展示编辑和删除按钮 +Merge branch 'main' of https://git.ngsk.tech/linweidong/besure_web +style:任务单排产-生产进度条样式修改 +feat:添加生产报表页面 +style:生产计划-暂停状态操作栏添加开工按钮 +Merge branch 'main' of https://git.ngsk.tech/linweidong/besure_web +style:厂区结构-关联采集设备字段回显 +feat:待入库-入库按钮添加仓库选择 +style:厂区结构-新增/编辑-关联采集设备选项接口更换 +feat:甘特图添加颜色区分 +feat:添加报工记录页面 +style:甘特图菜单页添加每日报工平均值、数据采集产能字段 +style:甘特图显示样式优化 +style:任务单排产-新增-计划开始、计划结束、最晚开工时间添加时分秒 +style:任务制单-新增-交货日期不能选往日 +style:任务单排产-添加生产进度条 +style:任务制单-tabs项更换 +style:任务单排产-新增计划-数量值添加校验(不能大于未计划数量) +style:甘特图tooltip隐藏逻辑优化 +Merge branch 'main' of https://git.ngsk.tech/linweidong/besure_web +style:修改任务单排产-新增计划及生产计划详情字段 +style:任务制单-任务单明细-新增按钮显示逻辑修改 +style:任务单排产-tabs更换 +style:任务单排产-未计划为0的,不显示新增计划按钮 +style:任务制单-任务单明细-新增按钮显示逻辑修改 +style:生产计划-报工后刷新报工记录列表 +style:生产计划-详情弹框字段与排产的新增计划弹框字段同步 +style:生产投料-新增-生产计划status值修改 +style:删除甘特图菜单无用代码 +feat:甘特图组件封装 +style:生产计划列表添加任务编码 +style:产品BOM-编辑-bomDetails集合里不传createTime字段 +Merge branch 'main' of https://git.ngsk.tech/linweidong/besure_web +style:排产甘特图样式优化 +style:排产弹框-添加是否跳过节假日switch +style:排产甘特图样式调整 +style:检验记录-编辑-ticketType回显 +style:检验记录-生产计划传参修改 +style:任务单排产-关联设备保存后刷新列表 +feat:排产弹框-新增设备名称列/关联设备按钮 +feat:生产计划-添加已开工tabs +style:任务单排产-新增计划-计划开始时间不能晚于结束时间 +style:设备台账-是否排产勾选后展示额定产能、每日报工平均值、数据采集产能 +Merge branch 'main' of https://git.ngsk.tech/linweidong/besure_web +style:处理设备台账代码合并问题 +Merge branch 'main' of https://git.ngsk.tech/linweidong/besure_web +style:甘特图查询时间默认本月 +feat:新增甘特图页面 +style:任务单排产-排产弹框-复选框逻辑优化 +style:任务单排产-甘特图样式修改 +style:任务单排产-一键排查接口字段调整 +style:任务单排产字段调整 +style:甘特图样式修改 +style:任务单排产-新增计划-taskDetailId传参调整 +style:产品物料信息-新增/编辑-设备列表添加已排产过滤 +style:排产接口入参添加产品编码 +feat:甘特图弹框抽离组件 +style:任务单排产-甘特图保存字段调整 +style:生产计划-甘特图样式修改 +feat:添加甘特图预览 +style:设备台账-新增/编辑-是否排产字段修改 +style:产品物料信息-阻止表单原生事件 +style:设备台账-是否排产字段修改 +feat:任务单排产-列表表头调整、排产弹框对接 +style:表管理-计算规则添加文案提示 +feat:采集设备-点位规则添加四则运算规则 +style:采集设备-添加新增产量按钮 +style:任务单排产-新增计划刷新列表 +Merge branch 'main' of https://git.ngsk.tech/linweidong/besure_web +style:任务单排产-列表添加“是否完成排产”列 +style:产品BOM-新增-清除单位默认值 +feat:任务制单-添加是否急单字段 +feat:产品管理-产品物料信息-产品分类时添加关联设备、关联模具字段 +feat:设备台账-添加是否排产、额定产能字段;状态改成switch切换 \ No newline at end of file diff --git a/src/api/erp/mold/index.ts b/src/api/erp/mold/index.ts index 830b8876..07082167 100644 --- a/src/api/erp/mold/index.ts +++ b/src/api/erp/mold/index.ts @@ -173,6 +173,17 @@ export const MoldBrandApi = { // 获得模具产品 getMoldBrandProduct: async (id: number) => { return await request.get({ url: `/erp/mold-brand/mold-brand-product/get?id=` + id }) + }, + + // ==================== 压网记录 ==================== + // 新增压网记录 + createPressureNetRecord: async (data: any) => { + return await request.post({ url: `/erp/mold-pressure-net-record/create`, data }) + }, + + // 查询压网记录分页 + getPressureNetRecordPage: async (params: any) => { + return await request.get({ url: `/erp/mold-pressure-net-record/page`, params }) } } diff --git a/src/api/mes/moldoperate/index.ts b/src/api/mes/moldoperate/index.ts index 5ed64370..7f2afc4b 100644 --- a/src/api/mes/moldoperate/index.ts +++ b/src/api/mes/moldoperate/index.ts @@ -4,10 +4,12 @@ import request from '@/config/axios' export interface MoldOperateVO { id: number // ID operateType: string // 操作类型 - moldId: number | string // 关联模具id(上模/下模剩余模具,支持逗号分隔) + moldId: number // 关联模具id deviceId: number // 关联设备id + lineId: number // 产线 + operateTime: string // 操作时间 + operatorId: number // 操作人 remark: string // 备注 - lowerMoldId?: number | string // 下模的模具id } // 模具上下模 API diff --git a/src/api/mold/moldrepair/index.ts b/src/api/mold/moldrepair/index.ts index 9f6f6ec7..c23584fe 100644 --- a/src/api/mold/moldrepair/index.ts +++ b/src/api/mold/moldrepair/index.ts @@ -62,6 +62,10 @@ export const MoldRepairApi = { return await request.get({ url: `/mes/mold-repair/getRepairListByMoldId`, params }) }, + getMoldRepairList: async (params: any) => { + return await request.get({ url: `/mes/mold-repair/list`, params }) + }, + exportRepairExcel: async (params: { moldId: number; startTime?: string; endTime?: string }) => { return await request.download({ url: `/mes/mold-repair/export-repair-excel`, params }) } diff --git a/src/api/mold/taskManagement/index.ts b/src/api/mold/taskManagement/index.ts index 4e71e197..0fa1a402 100644 --- a/src/api/mold/taskManagement/index.ts +++ b/src/api/mold/taskManagement/index.ts @@ -29,6 +29,11 @@ export const TaskManagementApi = { return await request.post({ url: `/mes/mold-task-management/createMoldTicket`, params: { id } }) }, + // 直接创建模具任务工单(点检/保养) + createMoldTicketDirect: async (data: any) => { + return await request.post({ url: `/mes/mold-task-management/createMoldTicketDirect`, data }) + }, + createTaskManagement: async (data: TaskManagementVO) => { return await request.post({ url: `/mes/mold-task-management/create`, data }) }, diff --git a/src/locales/en.ts b/src/locales/en.ts index f38a1791..4eb0b64d 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -16,6 +16,7 @@ export default { ok: 'OK', save: 'Save', cancel: 'Cancel', + select: 'Select', close: 'Close', reload: 'Reload current', success: 'Success', @@ -2325,16 +2326,16 @@ export default { nextMonth: 'next month', work: 'work', rest: 'rest', - searchDateStartPlaceholder: '开始日期', - searchDateEndPlaceholder: '结束日期', - searchTypeLabel: '类型', - searchTypePlaceholder: '请选择类型', - searchRemarkLabel: '备注', - searchRemarkPlaceholder: '请输入备注', - searchButtonText: '搜索', - resetButtonText: '重置', - addButtonText: '新增', - exportButtonText: '导出' + searchDateStartPlaceholder: 'Start date', + searchDateEndPlaceholder: 'End date', + searchTypeLabel: 'Type', + searchTypePlaceholder: 'Please select type', + searchRemarkLabel: 'Remark', + searchRemarkPlaceholder: 'Please input remark', + searchButtonText: 'Search', + resetButtonText: 'Reset', + addButtonText: 'Add', + exportButtonText: 'Export' }, EsopFile: { @@ -2461,7 +2462,8 @@ export default { version: 'Version', status: 'Status', currentDevice: 'Current Device', - moldSize: 'Sub Mold Count', + moldSize: 'Cavity Number', + childMoldCount: 'Sub Mold Count', createTime: 'Create Time', operate: 'Operate', detail: 'Detail', @@ -2485,6 +2487,8 @@ export default { back: 'Back', moldCode: 'Mold Code', moldName: 'Mold Name', + moldGroupCode: 'Mold Group Code', + moldGroupName: 'Mold Group Name', lastChangeTime: 'Last Change Time', targetLine: 'Target Line', lineName: 'Line Name', @@ -2515,10 +2519,29 @@ export default { uninstallDown: 'Down Mold', noRecords: 'No operation records', qrcodeDialogTitle: 'Mold QR Code', + qrcodeTitle: 'Mold QR Code', qrcodePrintTitle: '{name} Code Print Preview', qrcodeEmpty: 'No QR code', qrcodeLoadError: 'QR code load failed', - qrcodeRefreshConfirm: 'Confirm to refresh this mold QR code?' + qrcodeRefreshConfirm: 'Confirm to refresh this mold QR code?', + // 维护操作 + maintain: 'Maintain', + maintainType: 'Maintain Type', + placeholderMaintainType: 'Please select maintain type', + maintainTypeInspect: 'Inspect', + maintainTypeMaintain: 'Maintain', + maintainTypeRepair: 'Repair', + maintainTypeReplaceNet: 'Replace Net', + subMold: 'Sub Mold', + placeholderSubMold: 'Please select sub mold', + pressureNetTime: 'Pressure Net Time', + placeholderPressureNetTime: 'Please select pressure net time', + validatorSubMoldRequired: 'Please select sub mold', + validatorPressureNetTimeRequired: 'Please select pressure net time', + replaceNetRemark: 'Remark', + placeholderReplaceNetRemark: 'Please input remark', + moldInfo: 'Mold Info', + maintainInfo: 'Maintain Info' }, MoldBrandDetail: { @@ -2537,7 +2560,7 @@ export default { productName: 'Product Model', version: 'Version', lifeStatus: 'Life Status', - childMoldCount: 'Sub Mold Count', + childMoldCount: 'Cavity Count', tabMolds: 'Sub Molds', tabInspection: 'Inspection Records', tabRepair: 'Repair Records', @@ -2559,11 +2582,27 @@ export default { repairResult: 'Repair Result', finishDate: 'Finish Date', totalItems: '{count} items in total', + repairCode: 'Repair Code', + repairName: 'Repair Order', + moldCode: 'Mold Code', + repairStatus: 'Status', + repairStatusPending: 'Pending', + repairStatusDone: 'Completed', + repairResultPending: 'Pending Repair', + repairResultOk: 'Pass', + repairResultNg: 'Fail', + placeholderRepairCode: 'Please enter repair code', + selectRepairStatus: 'Please select status', + requireDate: 'Require Date', + finishDate: 'Finish Date', + acceptUser: 'Repair User', maintainMethod: 'Maintenance Method', maintainTime: 'Maintenance Time', mold: 'Mold', selectMold: 'Select Mold', remarkPlaceholder: 'Remark', + operateType: 'Operation Type', + selectOperateType: 'Please select operation type', moldName: 'Mold Name', deviceName: 'Device', creatorName: 'Operator', @@ -2624,6 +2663,14 @@ export default { installLocation: 'Install Location', material: 'Material', quantity: 'Quantity', + pressureNetInfo: 'Pressure Net Info', + lastReplace: 'Last Replace', + usedDays: 'Used', + days: 'days', + remark: 'Remark', + pressureNetRecord: 'Pressure Net Record', + pressureNetTime: 'Pressure Net Time', + createTime: 'Create Time', operate: 'Operate', edit: 'Edit', delete: 'Delete', @@ -2816,11 +2863,14 @@ export default { selectDeleteTip: 'Please select data to delete', exportFilename: 'MoldInspectionPlan.xls', validatorPlanNameRequired: 'Plan name can not be empty', - validatorPlanTypeRequired: 'Plan type can not be empty' + validatorPlanTypeRequired: 'Plan type can not be empty', + validatorSubjectIdsRequired: 'Related items can not be empty' }, MoldRepair: { moduleName: 'Mold Repair', + basicInfo: 'Basic Information', + faultInfo: 'Fault Information', repairCode: 'Repair Order No', repairName: 'Repair Order', mold: 'Mold', @@ -2987,6 +3037,9 @@ export default { device: 'Device', deviceName: 'Device Name', remark: 'Remark', + productionLine: 'Production Line', + operateTime: 'Operation Time', + operatorName: 'Operator', creatorName: 'Operator', createTime: 'Operation Time', operate: 'Operate', @@ -3000,6 +3053,9 @@ export default { placeholderMold: 'Please select mold', placeholderLowerMold: 'Please select lower mold', placeholderRemark: 'Please input remark', + placeholderProductionLine: 'Please select production line', + placeholderOperateTime: 'Please select operation time', + placeholderOperatorName: 'Please input operator', placeholderCreateTimeStart: 'Start Date', placeholderCreateTimeEnd: 'End Date', placeholderDevice: 'Please select device', @@ -3007,6 +3063,7 @@ export default { reset: 'Reset', validatorOperateTypeRequired: 'Operation type can not be empty', validatorDeviceRequired: 'Device can not be empty', + validatorProductionLineRequired: 'Production line can not be empty', validatorMoldRequired: 'Mold can not be empty', validatorLowerMoldRequired: 'Lower mold can not be empty', alertNeedRemoveMoldFirst: 'Please remove the mold from this device first!', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index dc66ea36..66ca0463 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -16,6 +16,7 @@ export default { ok: '确定', save: '保存', cancel: '取消', + select: '选择', close: '关闭', reload: '重新加载', success: '成功', @@ -1960,7 +1961,8 @@ export default { version: '版本', status: '状态', currentDevice: '当前设备', - moldSize: '子模数', + moldSize: '模穴数', + childMoldCount: '子模数', createTime: '创建时间', operate: '操作', detail: '详情', @@ -1985,6 +1987,8 @@ export default { back: '返回', moldCode: '模具编码', moldName: '模具名称', + moldGroupCode: '模具组编码', + moldGroupName: '模具组名称', lastChangeTime: '上次更换时间', targetLine: '目标产线', lineName: '产线名称', @@ -2015,10 +2019,29 @@ export default { uninstallDown: '下模', noRecords: '暂无操作记录', qrcodeDialogTitle: '模具二维码', + qrcodeTitle: '模具二维码', qrcodePrintTitle: '{name}码打印预览', qrcodeEmpty: '暂无二维码', qrcodeLoadError: '二维码加载失败', - qrcodeRefreshConfirm: '确认刷新该模具二维码吗?' + qrcodeRefreshConfirm: '确认刷新该模具二维码吗?', + // 维护操作 + maintain: '维护', + maintainType: '维护类型', + placeholderMaintainType: '请选择维护类型', + maintainTypeInspect: '点检', + maintainTypeMaintain: '保养', + maintainTypeRepair: '维修', + maintainTypeReplaceNet: '更换压网', + subMold: '子模具', + placeholderSubMold: '请选择子模具', + pressureNetTime: '压网时间', + placeholderPressureNetTime: '请选择压网时间', + validatorSubMoldRequired: '请选择子模具', + validatorPressureNetTimeRequired: '请选择压网时间', + replaceNetRemark: '备注', + placeholderReplaceNetRemark: '请输入备注', + moldInfo: '模具信息', + maintainInfo: '维护信息' }, MoldBrandDetail: { @@ -2037,7 +2060,7 @@ export default { productName: '产品型号', version: '版本', lifeStatus: '寿命状态', - childMoldCount: '子模数量', + childMoldCount: '模穴数量', // tabs tabMolds: '子模具', tabInspection: '点检记录', @@ -2063,6 +2086,20 @@ export default { repairResult: '维修结果', finishDate: '完成日期', totalItems: '共{count}条', + repairCode: '维修单号', + repairName: '维修单', + moldCode: '模具编码', + repairStatus: '单据状态', + repairStatusPending: '待处理', + repairStatusDone: '已完成', + repairResultPending: '待维修', + repairResultOk: '通过', + repairResultNg: '不通过', + placeholderRepairCode: '请输入维修单号', + selectRepairStatus: '请选择单据状态', + requireDate: '报修日期', + finishDate: '完成日期', + acceptUser: '接修人', // 保养 maintainMethod: '保养方式', maintainTime: '保养时间', @@ -2070,6 +2107,8 @@ export default { mold: '模具', selectMold: '选择模具', remarkPlaceholder: '备注', + operateType: '操作类型', + selectOperateType: '请选择操作类型', moldName: '模具名称', deviceName: '设备', creatorName: '操作人', @@ -2131,6 +2170,14 @@ export default { installLocation: '安装位置', material: '材质', quantity: '数量', + pressureNetInfo: '压网信息', + lastReplace: '上次更换', + usedDays: '已使用', + days: '天', + remark: '备注', + pressureNetRecord: '压网记录', + pressureNetTime: '压网时间', + createTime: '创建时间', operate: '操作', edit: '编辑', delete: '删除', @@ -2323,11 +2370,14 @@ export default { selectDeleteTip: '请选择需要删除的数据', exportFilename: '模具检验模板.xls', validatorPlanNameRequired: '模板名称不能为空', - validatorPlanTypeRequired: '模板类型不能为空' + validatorPlanTypeRequired: '模板类型不能为空', + validatorSubjectIdsRequired: '关联项目不能为空' }, MoldRepair: { moduleName: '维修单', + basicInfo: '基本信息', + faultInfo: '故障信息', repairCode: '维修单号', repairName: '维修单', mold: '模具', @@ -2494,6 +2544,9 @@ export default { device: '设备', deviceName: '设备名称', remark: '备注', + productionLine: '产线', + operateTime: '操作时间', + operatorName: '操作人', creatorName: '操作人', createTime: '操作时间', operate: '操作', @@ -2507,6 +2560,9 @@ export default { placeholderMold: '请选择模具', placeholderLowerMold: '请选择下模模具', placeholderRemark: '请输入备注', + placeholderProductionLine: '请选择产线', + placeholderOperateTime: '请选择操作时间', + placeholderOperatorName: '请输入操作人', placeholderCreateTimeStart: '开始日期', placeholderCreateTimeEnd: '结束日期', placeholderDevice: '请选择设备', @@ -2514,6 +2570,7 @@ export default { reset: '重置', validatorOperateTypeRequired: '操作类型不能为空', validatorDeviceRequired: '关联设备不能为空', + validatorProductionLineRequired: '产线不能为空', validatorMoldRequired: '关联模具不能为空', validatorLowerMoldRequired: '下模模具不能为空', alertNeedRemoveMoldFirst: '请先将该设备上的模具换下!', diff --git a/src/views/erp/mold/MoldBrandForm.vue b/src/views/erp/mold/MoldBrandForm.vue index b23eb975..8ce42add 100644 --- a/src/views/erp/mold/MoldBrandForm.vue +++ b/src/views/erp/mold/MoldBrandForm.vue @@ -22,8 +22,8 @@ - - + + @@ -153,7 +153,7 @@ const formRules = reactive({ code: [{ validator: validateCode, trigger: 'blur' }], name: [{ required: true, message: t('MoldManagement.MoldBrandFormPage.validatorNameRequired'), trigger: 'blur' }], moldType: [{ required: true, message: t('MoldManagement.MoldBrandFormPage.validatorNameRequired'), trigger: 'blur' }], - productId: [{ required: true, message: t('MoldManagement.MoldBrandFormPage.validatorProductRequired'), trigger: 'change' }], + productIds: [{ required: true, message: t('MoldManagement.MoldBrandFormPage.validatorProductRequired'), trigger: 'change' }], moldSize: [{ required: true, message: t('MoldManagement.MoldBrandFormPage.validatorMoldSizeRequired'), trigger: 'blur' }], isEnable: [{ required: true, message: t('MoldManagement.MoldBrandFormPage.validatorIsEnableRequired'), trigger: 'change' }] }) @@ -181,10 +181,11 @@ const resetForm = () => { formRef.value?.resetFields() } -const handleProductChange = (value?: number) => { - const current = productList.value.find((item) => item.id === value) - formData.value.productName = current?.name || '' - formData.value.productIds = value ? [value] : [] +const handleProductChange = (value?: number[] | number) => { + const ids = Array.isArray(value) ? value : value ? [value] : [] + formData.value.productIds = ids + const names = productList.value.filter((item) => ids.includes(item.id)).map((p) => p.name) + formData.value.productName = names.join(',') } const open = async (type: string, id?: number) => { @@ -193,7 +194,7 @@ const open = async (type: string, id?: number) => { formType.value = type resetForm() await dictStore.setDictMap() - productList.value = await ProductApi.getMesProductSimpleList() + productList.value = await ProductApi.getMesProductSimpleList({ categoryType: 1 }) if (!id) return formLoading.value = true try { @@ -220,16 +221,12 @@ const emit = defineEmits(['success']) const submitForm = async () => { await formRef.value.validate() formLoading.value = true - try { - handleProductChange(formData.value.productId) + try { + handleProductChange(formData.value.productIds) const payload: MoldBrandVO = { ...formData.value, version: addVersionPrefix(formData.value.version), - productIds: Array.isArray(formData.value.productIds) - ? formData.value.productIds - : formData.value.productId - ? [formData.value.productId] - : [], + productIds: Array.isArray(formData.value.productIds) ? formData.value.productIds : [], isEnable: Boolean(formData.value.isEnable) } if (formType.value === 'create') { diff --git a/src/views/erp/mold/components/MoldList.vue b/src/views/erp/mold/components/MoldList.vue index 8404ab45..7771c7dd 100644 --- a/src/views/erp/mold/components/MoldList.vue +++ b/src/views/erp/mold/components/MoldList.vue @@ -1,13 +1,26 @@ - + + + + - + + + + +
+ + + + + + + + + +
+
+ diff --git a/src/views/erp/mold/components/MoldMaintainView.vue b/src/views/erp/mold/components/MoldMaintainView.vue new file mode 100644 index 00000000..d84c0230 --- /dev/null +++ b/src/views/erp/mold/components/MoldMaintainView.vue @@ -0,0 +1,955 @@ + + + + + diff --git a/src/views/erp/mold/components/MoldOperateView.vue b/src/views/erp/mold/components/MoldOperateView.vue new file mode 100644 index 00000000..c7e11a2f --- /dev/null +++ b/src/views/erp/mold/components/MoldOperateView.vue @@ -0,0 +1,352 @@ + + + + + diff --git a/src/views/erp/mold/detail/brand.vue b/src/views/erp/mold/detail/brand.vue index 9cbc2dab..23594302 100644 --- a/src/views/erp/mold/detail/brand.vue +++ b/src/views/erp/mold/detail/brand.vue @@ -119,6 +119,17 @@
+ + + + + + + + + {{ t('MoldManagement.MoldBrandDetail.export') }} - + - +
-
-
- {{ row.subjectCode ?? '-' }} - {{ row.subjectName ?? '-' }} -
+
{{ t('MoldManagement.MoldBrandDetail.projectContent') }}{{ row.subjectContent ?? '-' }}
+ class="device-ledger-history-item-label">{{ t('MoldManagement.MoldBrandDetail.moldCode') }}{{ row.moldCode ?? '-' }}
{{ t('MoldManagement.MoldBrandDetail.repairResult') }}{{ t('MoldManagement.MoldBrandDetail.repairStatus') }}{{ - getResultLabel(row.repairResult ?? - row.result) }}
+ :type="getRepairStatusTagType(row.status)">{{ + getRepairStatusLabel(row.status) }}
{{ t('MoldManagement.MoldBrandDetail.finishDate') }}{{ - String(formatHistoryTime(row.finishDate)).split(' ')[0] - }}
+ class="device-ledger-history-item-label">{{ t('EquipmentManagement.DvRepair.repairStatus') }}{{ + getRepairResultLabel(row.repairStatus) }}
{{ t('MoldManagement.MoldBrandDetail.remark') }}{{ - row.remark ?? '-' }}
+ class="device-ledger-history-item-label">{{ t('MoldManagement.MoldBrandDetail.requireDate') }}{{ formatHistoryTime(row.requireDate) }}
+
{{ t('MoldManagement.MoldBrandDetail.finishDate') }}{{ formatHistoryTime(row.finishDate) }}
@@ -231,11 +237,13 @@
- - + + + + + + @@ -248,11 +256,18 @@ + + + - - + + >(new Set(['molds'])) const inspectionHistory = ref([]) const maintainHistory = ref([]) const repairList = ref([]) +const repairQueryCode = ref() +const repairQueryStatus = ref() const installRecords = ref([]) const installTotal = ref(0) const installPageNo = ref(1) @@ -301,6 +318,8 @@ const installPageSize = ref(10) const installMoldId = ref() const installRemark = ref() const installDateRange = ref() +const installOperateType = ref() +const moldList = ref([]) const repairActiveNames = ref([]) const inspectionDateRange = ref() const maintainDateRange = ref() @@ -369,6 +388,36 @@ const getResultTagType = (value: any) => { return 'info' } +const getRepairStatusLabel = (value: any) => { + const v = value === '' || value === null || value === undefined ? undefined : String(value) + if (v === '0') return t('MoldManagement.MoldBrandDetail.repairStatusPending') + if (v === '1') return t('MoldManagement.MoldBrandDetail.repairStatusDone') + return '-' +} + +const getRepairStatusTagType = (value: any) => { + const v = value === '' || value === null || value === undefined ? undefined : String(value) + if (v === '1') return 'success' + if (v === '0') return 'warning' + return 'info' +} + +const getRepairResultLabel = (value: any) => { + const v = value === '' || value === null || value === undefined ? undefined : String(value) + if (v === '0') return t('MoldManagement.MoldBrandDetail.repairResultPending') + if (v === '1') return t('MoldManagement.MoldBrandDetail.repairResultOk') + if (v === '2') return t('MoldManagement.MoldBrandDetail.repairResultNg') + return '-' +} + +const getRepairResultTagType = (value: any) => { + const v = value === '' || value === null || value === undefined ? undefined : String(value) + if (v === '1') return 'success' + if (v === '2') return 'danger' + if (v === '0') return 'info' + return 'info' +} + type HistoryStepItem = { key: string name: string @@ -434,18 +483,6 @@ const maintainStepGroups = computed(() => }) ) -const repairGroups = computed(() => { - const groupsMap = new Map() - for (const row of repairList.value ?? []) { - const key = String(row.repairCode ?? row.repairId ?? row.subjectName ?? '-') - if (!groupsMap.has(key)) { - groupsMap.set(key, { key, name: String(row.repairName ?? row.repairCode ?? key), items: [] }) - } - groupsMap.get(key)!.items.push(row) - } - return Array.from(groupsMap.values()) -}) - const getQrcodeRefreshUrl = () => { if (!detailData.value?.id || !detailData.value?.code) return '' return `/erp/mold-brand/regenerate-code?id=${detailData.value.id}&code=${encodeURIComponent(String(detailData.value.code))}` @@ -546,13 +583,14 @@ const fetchRepairHistory = async () => { repairLoading.value = true try { const params: any = { moldId: brandId.value } + if (repairQueryCode.value) params.repairCode = repairQueryCode.value + if (repairQueryStatus.value) params.status = repairQueryStatus.value if (repairDateRange.value && repairDateRange.value.length === 2) { - params.startTime = repairDateRange.value[0] - params.endTime = repairDateRange.value[1] + params.requireDate = [repairDateRange.value[0], repairDateRange.value[1]] } - const data = await MoldRepairApi.getRepairListByMoldId(params) + const data = await MoldRepairApi.getMoldRepairList(params) repairList.value = Array.isArray(data) ? data : [] - repairActiveNames.value = repairGroups.value.map((item) => item.key) + repairActiveNames.value = repairList.value.map((row: any) => String(row.id ?? row.repairCode)) } finally { repairLoading.value = false } @@ -562,9 +600,10 @@ const fetchInstallRecords = async () => { if (!brandId.value) return installLoading.value = true try { - const params: any = { pageNo: installPageNo.value, pageSize: installPageSize.value, brandId: brandId.value } - if (installMoldId.value) params.moldId = installMoldId.value + moldList.value = await MoldBrandApi.getBrandList() + const params: any = { pageNo: installPageNo.value, pageSize: installPageSize.value, moldId: brandId.value } if (installRemark.value) params.remark = installRemark.value + if (installOperateType.value) params.operateType = installOperateType.value if (installDateRange.value && installDateRange.value.length === 2) { params.createTime = [installDateRange.value[0], installDateRange.value[1]] } @@ -584,6 +623,7 @@ const handleQueryInstall = () => { const handleResetInstall = () => { installMoldId.value = undefined installRemark.value = undefined + installOperateType.value = undefined installDateRange.value = undefined installPageNo.value = 1 fetchInstallRecords() @@ -624,6 +664,8 @@ const handleQueryRepair = async () => { } const handleResetRepair = async () => { + repairQueryCode.value = undefined + repairQueryStatus.value = undefined repairDateRange.value = undefined await fetchRepairHistory() } @@ -707,6 +749,12 @@ onMounted(() => { background: #fff; } +.mold-brand-detail__qr-card { + display: flex; + flex-direction: column; + align-items: center; +} + .mold-brand-detail__image { width: 100%; height: 280px; diff --git a/src/views/erp/mold/index.vue b/src/views/erp/mold/index.vue index 956829e9..bae14aeb 100644 --- a/src/views/erp/mold/index.vue +++ b/src/views/erp/mold/index.vue @@ -1,15 +1,10 @@