diff --git a/src/locales/en.ts b/src/locales/en.ts index f67e7eaa..569f24e1 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -308,7 +308,8 @@ export default { typeUpdate: 'Dict Type Eidt', dataCreate: 'Dict Data Create', dataUpdate: 'Dict Data Eidt', - fileUpload: 'File Upload' + fileUpload: 'File Upload', + select: 'Select' }, dialog: { dialog: 'Dialog', @@ -1435,5 +1436,152 @@ export default { updateSuccess: 'Update successful', updateFail: 'Update failed' } + }, + QualityManagement: { + ZjType: { + moduleName: 'Inspection Type', + code: 'Code', + name: 'Name', + remark: 'Remark', + createTime: 'Create Time', + operate: 'Operate', + exportFilename: 'Quality-InspectionType.xls', + placeholderCode: 'Please input code', + placeholderName: 'Please input name', + placeholderRemark: 'Please input remark', + placeholderCreateTimeStart: 'Start Date', + placeholderCreateTimeEnd: 'End Date', + validatorCodeRequired: 'Code can not be empty', + validatorNameRequired: 'Name can not be empty' + }, + ZjItem: { + moduleName: 'Inspection Item', + zjType: 'Inspection Type', + name: 'Name', + tool: 'Operation Method', + standardVal: 'Standard Value', + upperVal: 'Upper Limit', + lowerVal: 'Lower Limit', + unit: 'Unit', + remark: 'Remark', + createTime: 'Create Time', + operate: 'Operate', + exportFilename: 'Quality-InspectionItem.xls', + placeholderZjType: 'Please select inspection type', + placeholderName: 'Please input name', + placeholderTool: 'Please input operation method', + placeholderStandardVal: 'Please input standard value', + placeholderUpperVal: 'Please input upper limit', + placeholderLowerVal: 'Please input lower limit', + placeholderUnit: 'Please select unit', + placeholderRemark: 'Please input remark', + placeholderCreateTimeStart: 'Start Date', + placeholderCreateTimeEnd: 'End Date', + validatorNameRequired: 'Name can not be empty', + validatorZjTypeRequired: 'Inspection type can not be empty' + }, + ZjSchema: { + moduleName: 'Inspection Scheme', + name: 'Name', + type: 'Type', + sampleMethod: 'Sampling Method', + val: 'Value', + item: 'Related Items', + remark: 'Remark', + createTime: 'Create Time', + operate: 'Operate', + source: 'Source', + target: 'Target', + filterPlaceholder: 'Filter', + selectItemDialogTitle: 'Select Inspection Items', + exportFilename: 'Quality-InspectionScheme.xls', + placeholderName: 'Please input name', + placeholderType: 'Please select type', + placeholderSampleMethod: 'Please select sampling method', + placeholderVal: 'Please input value', + placeholderItem: 'Please select inspection items', + placeholderRemark: 'Please input remark', + placeholderCreateTimeStart: 'Start Date', + placeholderCreateTimeEnd: 'End Date', + validatorNameRequired: 'Name can not be empty', + validatorTypeRequired: 'Type can not be empty', + validatorSampleMethodRequired: 'Sampling method can not be empty', + validatorValRequired: 'Value can not be empty' + }, + ZjTask: { + moduleName: 'Inspection Task', + index: 'Index', + code: 'Code', + type: 'Inspection Category', + status: 'Status', + ticketCode: 'Work Order', + orgType: 'Process', + schemaName: 'Inspection Scheme', + managerName: 'Manager', + executorName: 'Executor', + executeTime: 'Execute Time', + remark: 'Remark', + result: 'Result', + resultPass: 'Pass', + resultFail: 'Fail', + createTime: 'Create Time', + operate: 'Operate', + inspect: 'Inspect', + exportFilename: 'Quality-InspectionTask.xls', + placeholderCode: 'Please input code', + placeholderType: 'Please select inspection category', + placeholderOrgType: 'Please select process', + placeholderStatus: 'Please select status', + placeholderResult: 'Please input result', + placeholderCreateTimeStart: 'Start Date', + placeholderCreateTimeEnd: 'End Date', + formCode: 'Code', + formType: 'Inspection Category', + formSchema: 'Inspection Scheme', + formTicketType: 'Work Order Type', + formTicket: 'Production Plan', + formOrgType: 'Process', + formManager: 'Manager', + formRemark: 'Remark', + ticketTypeProcess: 'Production Process', + ticketTypeStorage: 'Product Storage', + placeholderFormCode: 'Please input code', + placeholderFormType: 'Please select inspection category', + placeholderFormSchema: 'Please select inspection scheme', + placeholderFormTicket: 'Please select production plan', + placeholderFormOrgType: 'Please select process', + placeholderFormManager: 'Please select manager', + placeholderFormRemark: 'Please input remark', + validatorCodeRequired: 'Code can not be empty', + validatorTypeRequired: 'Inspection category can not be empty', + validatorSchemaRequired: 'Inspection scheme can not be empty', + validatorTicketRequired: 'Work order can not be empty', + validatorOrgTypeRequired: 'Process can not be empty', + validatorTicketTypeRequired: 'Work order type can not be empty' + }, + TicketResultDialog: { + moduleName: 'Inspection Result', + index: 'Index', + inspectionItemName: 'Inspection Item Name', + inspectionMethod: 'Inspection Method', + judgmentCriteria: 'Judgment Criteria', + unit: 'Unit', + upperVal: 'Upper Limit', + lowerVal: 'Lower Limit', + inspectionResult: 'Inspection Result', + inspectionResultPending: 'Pending', + inspectionResultPass: 'Pass', + inspectionResultFail: 'Fail', + images: 'Images', + remark: 'Remark', + operate: 'Operate', + pass: 'Pass', + fail: 'Fail', + save: 'Save', + cancel: 'Cancel', + selectDecisionTip: 'Please select pass or fail for pending records first', + updateSuccess: 'Update successful', + updateFail: 'Update failed' + } } } diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 4fdbca7d..7f1cc1a1 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -309,7 +309,8 @@ export default { typeCreate: '字典类型新增', typeUpdate: '字典类型编辑', dataCreate: '字典数据新增', - dataUpdate: '字典数据编辑' + dataUpdate: '字典数据编辑', + select: '选择' }, dialog: { dialog: '弹窗', @@ -1431,5 +1432,152 @@ export default { updateSuccess: '更新成功', updateFail: '更新失败' } + }, + QualityManagement: { + ZjType: { + moduleName: '检验类型', + code: '编码', + name: '名称', + remark: '备注', + createTime: '创建时间', + operate: '操作', + exportFilename: '质量管理-检验类型.xls', + placeholderCode: '请输入编码', + placeholderName: '请输入名称', + placeholderRemark: '请输入备注', + placeholderCreateTimeStart: '开始日期', + placeholderCreateTimeEnd: '结束日期', + validatorCodeRequired: '编码不能为空', + validatorNameRequired: '名称不能为空' + }, + ZjItem: { + moduleName: '检验项目', + zjType: '检验类型', + name: '名称', + tool: '作业方式', + standardVal: '标准值', + upperVal: '上限值', + lowerVal: '下限值', + unit: '单位', + remark: '备注', + createTime: '创建时间', + operate: '操作', + exportFilename: '质量管理-检验项目.xls', + placeholderZjType: '请选择检验类型', + placeholderName: '请输入名称', + placeholderTool: '请输入作业方式', + placeholderStandardVal: '请输入标准值', + placeholderUpperVal: '请输入上限值', + placeholderLowerVal: '请输入下限值', + placeholderUnit: '请选择单位', + placeholderRemark: '请输入备注', + placeholderCreateTimeStart: '开始日期', + placeholderCreateTimeEnd: '结束日期', + validatorNameRequired: '名称不能为空', + validatorZjTypeRequired: '检验类型不能为空' + }, + ZjSchema: { + moduleName: '检验方案', + name: '名称', + type: '类型', + sampleMethod: '抽检方式', + val: '值', + item: '关联项目', + remark: '备注', + createTime: '创建时间', + operate: '操作', + source: '来源', + target: '目标', + filterPlaceholder: '筛选', + selectItemDialogTitle: '选择检验项目', + exportFilename: '质量管理-检验方案.xls', + placeholderName: '请输入名称', + placeholderType: '请选择类型', + placeholderSampleMethod: '请选择抽检方式', + placeholderVal: '请输入值', + placeholderItem: '请选择检验项目', + placeholderRemark: '请输入备注', + placeholderCreateTimeStart: '开始日期', + placeholderCreateTimeEnd: '结束日期', + validatorNameRequired: '名称不能为空', + validatorTypeRequired: '类型不能为空', + validatorSampleMethodRequired: '抽检方式不能为空', + validatorValRequired: '值不能为空' + }, + ZjTask: { + moduleName: '检验任务', + index: '序号', + code: '单号', + type: '质检分类', + status: '状态', + ticketCode: '工单', + orgType: '工序', + schemaName: '检验方案', + managerName: '负责人', + executorName: '执行人', + executeTime: '执行时间', + remark: '备注', + result: '结果', + resultPass: '通过', + resultFail: '不通过', + createTime: '创建时间', + operate: '操作', + inspect: '检验', + exportFilename: '质量管理-检验任务.xls', + placeholderCode: '请输入单号', + placeholderType: '请选择质检分类', + placeholderOrgType: '请选择工序', + placeholderStatus: '请选择状态', + placeholderResult: '请输入结果', + placeholderCreateTimeStart: '开始日期', + placeholderCreateTimeEnd: '结束日期', + formCode: '单号', + formType: '质检分类', + formSchema: '检验方案', + formTicketType: '工单类型', + formTicket: '生产计划', + formOrgType: '工序', + formManager: '负责人', + formRemark: '备注', + ticketTypeProcess: '生产过程', + ticketTypeStorage: '产品入库', + placeholderFormCode: '请输入单号', + placeholderFormType: '请选择质检分类', + placeholderFormSchema: '请选择检验方案', + placeholderFormTicket: '请选择生产计划', + placeholderFormOrgType: '请选择工序', + placeholderFormManager: '请选择负责人', + placeholderFormRemark: '请输入备注', + validatorCodeRequired: '单号不能为空', + validatorTypeRequired: '质检分类不能为空', + validatorSchemaRequired: '检验方案不能为空', + validatorTicketRequired: '工单不能为空', + validatorOrgTypeRequired: '工序不能为空', + validatorTicketTypeRequired: '工单类型不能为空' + }, + TicketResultDialog: { + moduleName: '检验结果', + index: '序号', + inspectionItemName: '检验项名称', + inspectionMethod: '检验方式', + judgmentCriteria: '判定基准', + unit: '单位', + upperVal: '上限值', + lowerVal: '下限值', + inspectionResult: '检验结果', + inspectionResultPending: '待检测', + inspectionResultPass: '通过', + inspectionResultFail: '不通过', + images: '图片', + remark: '备注', + operate: '操作', + pass: '通过', + fail: '不通过', + save: '保 存', + cancel: '取 消', + selectDecisionTip: '请先为待检测记录选择通过或不通过', + updateSuccess: '更新成功', + updateFail: '更新失败' + } } } diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 244237a8..dddf2046 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -601,7 +601,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ { path: '/iot/report/dashboardPage/Dashboard8', - component: () => import('@/views/report/dashboardPage/dashboard8/Dashboard8.vue'), + component: () => import('@/views/report/dashboardPage/dashboard8/index.vue'), name: 'IotReportDashboard8', meta: { title: '智能制造产线任务总览', @@ -613,7 +613,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ { path: '/iot/report/dashboardPage/Dashboard1', - component: () => import('@/views/report/dashboardPage/dashboard1/Dashboard8.vue'), + component: () => import('@/views/report/dashboardPage/dashboard1/index.vue'), name: 'IotReportDashboard1', meta: { title: '智能制造产线任务总览', diff --git a/src/views/mes/zjTask/ZjTaskForm.vue b/src/views/mes/zjTask/ZjTaskForm.vue index 0f6b02c4..936af021 100644 --- a/src/views/mes/zjTask/ZjTaskForm.vue +++ b/src/views/mes/zjTask/ZjTaskForm.vue @@ -1,38 +1,58 @@ - - - + + + - - + + - + - + - 选择 + + {{ t('action.select') }} + - + - 生产过程 - 产品入库 + {{ t('QualityManagement.ZjTask.ticketTypeProcess') }} + {{ t('QualityManagement.ZjTask.ticketTypeStorage') }} - - + - + + - + - + + - 确 定 - 取 消 + + {{ t('common.ok') }} + + + {{ t('common.cancel') }} + - + @@ -81,28 +117,32 @@ v-for="dict in getStrDictOptions('mes_zj_task_type')" :key="dict.value" :label=" - - - + + + - + - + {{ formatSchemaVal(scope.row.val) }} - + - 取 消 - 确 定 + + {{ t('common.cancel') }} + + + {{ t('common.ok') }} + @@ -140,12 +180,12 @@ const formData = ref<{ [key: string]: any }>({ }) const formRules = reactive({ - code: [{ required: true, message: '单号不能为空', trigger: 'blur' }], - type: [{ required: true, message: '质检分类不能为空', trigger: 'change' }], - schemaId: [{ required: true, message: '检验方案不能为空', trigger: 'change' }], - ticket: [{ required: true, message: '工单不能为空', trigger: 'blur' }], - orgType: [{ required: true, message: '工序不能为空', trigger: 'change' }], - ticketType: [{ required: true, message: '工单类型不能为空', trigger: 'change' }], + code: [{ required: true, message: t('QualityManagement.ZjTask.validatorCodeRequired'), trigger: 'blur' }], + type: [{ required: true, message: t('QualityManagement.ZjTask.validatorTypeRequired'), trigger: 'change' }], + schemaId: [{ required: true, message: t('QualityManagement.ZjTask.validatorSchemaRequired'), trigger: 'change' }], + ticket: [{ required: true, message: t('QualityManagement.ZjTask.validatorTicketRequired'), trigger: 'blur' }], + orgType: [{ required: true, message: t('QualityManagement.ZjTask.validatorOrgTypeRequired'), trigger: 'change' }], + ticketType: [{ required: true, message: t('QualityManagement.ZjTask.validatorTicketTypeRequired'), trigger: 'change' }], }) const formRef = ref() diff --git a/src/views/mes/zjTask/components/ZjTaskResultDialog.vue b/src/views/mes/zjTask/components/ZjTaskResultDialog.vue index 1106c05d..54ec080b 100644 --- a/src/views/mes/zjTask/components/ZjTaskResultDialog.vue +++ b/src/views/mes/zjTask/components/ZjTaskResultDialog.vue @@ -7,14 +7,54 @@ :show-overflow-tooltip="true" :row-key="getRowKey" > - - - - - - - - + + + + + + + + - - - + + - 待检测 - 通过 - 不通过 + + {{ t('QualityManagement.TicketResultDialog.inspectionResultPending') }} + + + {{ t('QualityManagement.TicketResultDialog.inspectionResultPass') }} + + + {{ t('QualityManagement.TicketResultDialog.inspectionResultFail') }} + - - + - 通过 - 不通过 + {{ t('QualityManagement.TicketResultDialog.pass') }} + {{ t('QualityManagement.TicketResultDialog.fail') }} - @@ -73,14 +134,16 @@ /> - 取 消 + + {{ t('QualityManagement.TicketResultDialog.cancel') }} + - 保 存 + {{ t('QualityManagement.TicketResultDialog.save') }} @@ -92,8 +155,9 @@ import { ZjTaskApi } from '@/api/mes/zjtask' defineOptions({ name: 'ZjTaskResultDialog' }) +const { t } = useI18n() const dialogVisible = ref(false) -const dialogTitle = ref('检验结果') +const dialogTitle = ref(t('QualityManagement.TicketResultDialog.moduleName')) const loading = ref(false) const submitLoading = ref(false) @@ -113,7 +177,7 @@ const queryParams = reactive({ const open = async (id: number) => { dialogVisible.value = true - dialogTitle.value = '检验结果' + dialogTitle.value = t('QualityManagement.TicketResultDialog.moduleName') taskId.value = id for (const key of Object.keys(decisionMap)) delete decisionMap[key] for (const key of Object.keys(imageMap)) delete imageMap[key] diff --git a/src/views/mes/zjTask/index.vue b/src/views/mes/zjTask/index.vue index 7374ba62..a146a0fd 100644 --- a/src/views/mes/zjTask/index.vue +++ b/src/views/mes/zjTask/index.vue @@ -1,13 +1,23 @@ - - + + + v-model="queryParams.code" + :placeholder="t('QualityManagement.ZjTask.placeholderCode')" + clearable + @keyup.enter="handleQuery" + class="!w-240px" + /> - - + + @@ -18,43 +28,62 @@ v-for="dict in getStrDictOptions('mes_zj_task_type')" :key="dict.value" :label=" v-model="queryParams.ticket" placeholder="请输入工单" clearable @keyup.enter="handleQuery" class="!w-240px" /> --> - - + + - - + + - + + v-model="queryParams.result" + :placeholder="t('QualityManagement.ZjTask.placeholderResult')" + clearable + @keyup.enter="handleQuery" + class="!w-240px" + /> - + + v-model="queryParams.createTime" + value-format="YYYY-MM-DD HH:mm:ss" + type="daterange" + :start-placeholder="t('QualityManagement.ZjTask.placeholderCreateTimeStart')" + :end-placeholder="t('QualityManagement.ZjTask.placeholderCreateTimeEnd')" + :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" + class="!w-260px" + /> - 搜索 + {{ t('common.query') }} - 重置 + {{ t('common.reset') }} - 新增 + {{ t('action.create') }} - 导出 + {{ t('action.export') }} @@ -70,44 +99,54 @@ type="success" plain @click="handleExport" :loading="exportLoading" @selection-change="handleSelectionChange" > - - - + + + - + - - + + - - - - - - + + + + + + - 通过 - 不通过 + + {{ t('QualityManagement.ZjTask.resultPass') }} + + + {{ t('QualityManagement.ZjTask.resultFail') }} + - - + - 检验 + {{ t('QualityManagement.ZjTask.inspect') }} - 编辑 + {{ t('action.update') }} - 删除 + {{ t('action.delete') }} @@ -233,7 +272,7 @@ const handleExport = async () => { ids: selectedIds.value.length ? selectedIds.value.join(',') : undefined, } const data = await ZjTaskApi.exportZjTask(params) - download.excel(data, '检验任务.xls') + download.excel(data, t('QualityManagement.ZjTask.exportFilename')) } catch { } finally { exportLoading.value = false diff --git a/src/views/mes/zjitem/ZjItemForm.vue b/src/views/mes/zjitem/ZjItemForm.vue index 349e6019..e744fd0b 100644 --- a/src/views/mes/zjitem/ZjItemForm.vue +++ b/src/views/mes/zjitem/ZjItemForm.vue @@ -4,56 +4,83 @@ ref="formRef" :model="formData" :rules="formRules" - label-width="100px" + label-width="120px" v-loading="formLoading" > - - + + - - - - + + + + - - + + - - + + - - + + - - + + - - - - - - - + + + + + + + - 确 定 - 取 消 + + {{ t('common.ok') }} + + + {{ t('common.cancel') }} + @@ -86,8 +113,8 @@ const formData = ref({ lowerVal: undefined, }) const formRules = reactive({ - name: [{ required: true, message: '名称不能为空', trigger: 'blur' }], - zjType: [{ required: true, message: '检验类型不能为空', trigger: 'blur' }] + name: [{ required: true, message: t('QualityManagement.ZjItem.validatorNameRequired'), trigger: 'blur' }], + zjType: [{ required: true, message: t('QualityManagement.ZjItem.validatorZjTypeRequired'), trigger: 'blur' }] }) const formRef = ref() // 表单 Ref @@ -153,4 +180,4 @@ const resetForm = () => { } - \ No newline at end of file + diff --git a/src/views/mes/zjitem/index.vue b/src/views/mes/zjitem/index.vue index 9e1a238e..c2f21e42 100644 --- a/src/views/mes/zjitem/index.vue +++ b/src/views/mes/zjitem/index.vue @@ -1,42 +1,57 @@ - - - + + + - + - + - + - 搜索 + {{ t('common.query') }} - 重置 + {{ t('common.reset') }} - 新增 + {{ t('action.create') }} - 导出 + {{ t('action.export') }} @@ -54,26 +69,32 @@ type="success" plain @click="handleExport" :loading="exportLoading" > - - - + + + {{ scope.row.zjTypeName }} - - - - - - - + + + + + + + - 编辑 + {{ t('action.update') }} - 删除 + {{ t('action.delete') }} @@ -182,7 +203,7 @@ const handleExport = async () => { ids: selectedIds.value.length ? selectedIds.value.join(',') : undefined, } const data = await ZjItemApi.exportZjItem(params) - download.excel(data, '质量管理-检验项目.xls') + download.excel(data, t('QualityManagement.ZjItem.exportFilename')) } catch { } finally { exportLoading.value = false diff --git a/src/views/mes/zjproduct/components/ZjProductForm.vue b/src/views/mes/zjproduct/components/ZjProductForm.vue index 7b8704f7..07b8fa6b 100644 --- a/src/views/mes/zjproduct/components/ZjProductForm.vue +++ b/src/views/mes/zjproduct/components/ZjProductForm.vue @@ -129,4 +129,4 @@ const resetForm = () => { } formRef.value?.resetFields() } - \ No newline at end of file + diff --git a/src/views/mes/zjproduct/components/ZjProductList.vue b/src/views/mes/zjproduct/components/ZjProductList.vue index f2cdb06b..8e53be6a 100644 --- a/src/views/mes/zjproduct/components/ZjProductList.vue +++ b/src/views/mes/zjproduct/components/ZjProductList.vue @@ -244,4 +244,4 @@ const handleExport = async () => { // onMounted(() => { // getList() // }) - \ No newline at end of file + diff --git a/src/views/mes/zjproduct/components/ZjProductPreList.vue b/src/views/mes/zjproduct/components/ZjProductPreList.vue index 7adca076..d4cac765 100644 --- a/src/views/mes/zjproduct/components/ZjProductPreList.vue +++ b/src/views/mes/zjproduct/components/ZjProductPreList.vue @@ -76,4 +76,4 @@ const getList = async () => { onMounted(() => { getList() }) - \ No newline at end of file + diff --git a/src/views/mes/zjschema/ZjSchemaForm.vue b/src/views/mes/zjschema/ZjSchemaForm.vue index 79b6421a..c67e1140 100644 --- a/src/views/mes/zjschema/ZjSchemaForm.vue +++ b/src/views/mes/zjschema/ZjSchemaForm.vue @@ -1,67 +1,101 @@ - - - + + + - + {{ dict.label }} - + {{ dict.label }} - + % - 每间隔 + {{ t('QualityManagement.ZjSchema.val') }} - 抽取 + {{ t('QualityManagement.ZjSchema.val') }} - + - + - + - 选择 + + {{ t('action.select') }} + - - + + - 确 定 - 取 消 + + {{ t('common.ok') }} + + + {{ t('common.cancel') }} + - + - 来源 + {{ t('QualityManagement.ZjSchema.source') }} {{ filteredSourceItems.length }} - + - - + + {{ scope.row.zjTypeName }} @@ -91,11 +125,15 @@ - 目标 + {{ t('QualityManagement.ZjSchema.target') }} {{ filteredTargetItems.length }} - + - - + + {{ scope.row.zjTypeName }} @@ -116,8 +154,12 @@ - 取 消 - 确 定 + + {{ t('common.cancel') }} + + + {{ t('common.ok') }} + @@ -156,9 +198,11 @@ const targetKeyword = ref('') const sourceCheckedKeys = ref([]) const targetCheckedKeys = ref([]) const formRules = reactive({ - name: [{ required: true, message: '名称不能为空', trigger: 'blur' }], - type: [{ required: true, message: '类型不能为空', trigger: 'change' }], - sampleMethod: [{ required: true, message: '抽检方式不能为空', trigger: 'change' }], + name: [{ required: true, message: t('QualityManagement.ZjSchema.validatorNameRequired'), trigger: 'blur' }], + type: [{ required: true, message: t('QualityManagement.ZjSchema.validatorTypeRequired'), trigger: 'change' }], + sampleMethod: [ + { required: true, message: t('QualityManagement.ZjSchema.validatorSampleMethodRequired'), trigger: 'change' }, + ], val: [{ validator: (_: any, __: any, callback: any) => validateVal(callback), trigger: 'blur' }], }) const formRef = ref() // 表单 Ref @@ -221,20 +265,20 @@ const validateVal = (callback: any) => { callback() return } - if (isRateMethod.value) { - if (rateVal.value === undefined || rateVal.value === null) { - callback(new Error('值不能为空')) - return - } - } else if (isGapMethod.value) { - if (!gapInterval.value || !gapCount.value) { - callback(new Error('值不能为空')) + if (isRateMethod.value) { + if (rateVal.value === undefined || rateVal.value === null) { + callback(new Error(t('QualityManagement.ZjSchema.validatorValRequired'))) + return + } + } else if (isGapMethod.value) { + if (!gapInterval.value || !gapCount.value) { + callback(new Error(t('QualityManagement.ZjSchema.validatorValRequired'))) + return + } + } else if (!formData.value.val) { + callback(new Error(t('QualityManagement.ZjSchema.validatorValRequired'))) return } - } else if (!formData.value.val) { - callback(new Error('值不能为空')) - return - } callback() } diff --git a/src/views/mes/zjschema/index.vue b/src/views/mes/zjschema/index.vue index f8aa7a5a..fe0f8f54 100644 --- a/src/views/mes/zjschema/index.vue +++ b/src/views/mes/zjschema/index.vue @@ -1,59 +1,92 @@ - - + + + v-model="queryParams.name" + :placeholder="t('QualityManagement.ZjSchema.placeholderName')" + clearable + @keyup.enter="handleQuery" + class="!w-240px" + /> - - + + - - + + - - + + - + + v-model="queryParams.remark" + :placeholder="t('QualityManagement.ZjSchema.placeholderRemark')" + clearable + @keyup.enter="handleQuery" + class="!w-240px" + /> - + + v-model="queryParams.item" + :placeholder="t('QualityManagement.ZjSchema.placeholderItem')" + clearable + @keyup.enter="handleQuery" + class="!w-240px" + /> - + + v-model="queryParams.createTime" + value-format="YYYY-MM-DD HH:mm:ss" + type="daterange" + :start-placeholder="t('QualityManagement.ZjSchema.placeholderCreateTimeStart')" + :end-placeholder="t('QualityManagement.ZjSchema.placeholderCreateTimeEnd')" + :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" + class="!w-220px" + /> - 搜索 + {{ t('common.query') }} - 重置 + {{ t('common.reset') }} - 新增 + {{ t('action.create') }} - 导出 + {{ t('action.export') }} @@ -73,45 +106,54 @@ type="success" plain @click="handleExport" :loading="exportLoading" - - - - - - - + v-loading="scope.row._itemLoading" + :data="scope.row._items || []" + size="small" + :show-overflow-tooltip="true" + > + + + + + + + - - + + - + - + {{ formatValDisplay(scope.row.val) }} - - - + + + - 编辑 + {{ t('action.update') }} - 删除 + {{ t('action.delete') }} @@ -230,7 +272,7 @@ const handleExport = async () => { ids: selectedIds.value.length ? selectedIds.value.join(',') : undefined, } const data = await ZjSchemaApi.exportZjSchema(params) - download.excel(data, '检验方案.xls') + download.excel(data, t('QualityManagement.ZjSchema.exportFilename')) } catch { } finally { exportLoading.value = false diff --git a/src/views/mes/zjtype/ZjTypeForm.vue b/src/views/mes/zjtype/ZjTypeForm.vue index 6c56c55f..11facf4c 100644 --- a/src/views/mes/zjtype/ZjTypeForm.vue +++ b/src/views/mes/zjtype/ZjTypeForm.vue @@ -4,22 +4,36 @@ ref="formRef" :model="formData" :rules="formRules" - label-width="100px" + label-width="120px" v-loading="formLoading" > - - + + - - + + - - + + - 确 定 - 取 消 + + {{ t('common.ok') }} + + + {{ t('common.cancel') }} + @@ -43,8 +57,8 @@ const formData = ref({ remark: undefined, }) const formRules = reactive({ - code: [{ required: true, message: '编码不能为空', trigger: 'blur' }], - name: [{ required: true, message: '名称不能为空', trigger: 'blur' }], + code: [{ required: true, message: t('QualityManagement.ZjType.validatorCodeRequired'), trigger: 'blur' }], + name: [{ required: true, message: t('QualityManagement.ZjType.validatorNameRequired'), trigger: 'blur' }], }) const formRef = ref() // 表单 Ref @@ -100,4 +114,4 @@ const resetForm = () => { } formRef.value?.resetFields() } - \ No newline at end of file + diff --git a/src/views/mes/zjtype/index.vue b/src/views/mes/zjtype/index.vue index 5e56c20d..3db8aef5 100644 --- a/src/views/mes/zjtype/index.vue +++ b/src/views/mes/zjtype/index.vue @@ -6,56 +6,56 @@ :model="queryParams" ref="queryFormRef" :inline="true" - label-width="68px" + label-width="110px" > - + - + - + - + - 搜索 - 重置 + {{ t('common.query') }} + {{ t('common.reset') }} - 新增 + {{ t('action.add') }} - 导出 + {{ t('action.export') }} @@ -82,17 +82,17 @@ > - - - + + + - + - 编辑 + {{ t('action.edit') }} - 删除 + {{ t('action.del') }} @@ -212,7 +212,7 @@ const handleExport = async () => { ids: selectedIds.value.length ? selectedIds.value.join(',') : undefined, } const data = await ZjTypeApi.exportZjType(params) - download.excel(data, '质量管理-检验类型.xls') + download.excel(data, t('QualityManagement.ZjType.exportFilename')) } catch { } finally { exportLoading.value = false