From 3935f91c5371e4310aa9bbcc1040ab86397874af Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Tue, 2 Apr 2024 17:22:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A8=E6=80=81=E4=BF=AE=E6=94=B9=E8=A7=84?= =?UTF-8?q?=E5=88=99=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/qms/counter/index.ts | 16 +- src/api/qms/dynamicRule/index.ts | 18 +- src/api/qms/inspectionStage/index.ts | 19 +- src/components/BasicForm/src/BasicFormQms.vue | 696 ++++++++++++++ src/components/Detail/src/Detail.vue | 1 + src/components/Detail/src/DetailQms.vue | 846 ++++++++++++++++++ src/utils/dict.ts | 4 +- .../dynamicRule/dynamicRule.data.ts | 146 +-- .../qms/basicDataManage/dynamicRule/index.vue | 99 +- .../inspectionStage/inspectionStage.data.ts | 2 +- 10 files changed, 1757 insertions(+), 90 deletions(-) create mode 100644 src/components/BasicForm/src/BasicFormQms.vue create mode 100644 src/components/Detail/src/DetailQms.vue diff --git a/src/api/qms/counter/index.ts b/src/api/qms/counter/index.ts index 30f143a44..ee346e189 100644 --- a/src/api/qms/counter/index.ts +++ b/src/api/qms/counter/index.ts @@ -26,38 +26,38 @@ export const getCounterPage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/basic/counter/senior', data }) + return await request.post({ url: '/qms/counter/senior', data }) } else { - return await request.get({ url: `/basic/counter/page`, params }) + return await request.get({ url: `/qms/counter/page`, params }) } } // 查询物料检验计数器详情 export const getCounter = async (id: number) => { - return await request.get({ url: `/basic/counter/get?id=` + id }) + return await request.get({ url: `/qms/counter/get?id=` + id }) } // 新增物料检验计数器 export const createCounter = async (data: CounterVO) => { - return await request.post({ url: `/basic/counter/create`, data }) + return await request.post({ url: `/qms/counter/create`, data }) } // 修改物料检验计数器 export const updateCounter = async (data: CounterVO) => { - return await request.put({ url: `/basic/counter/update`, data }) + return await request.put({ url: `/qms/counter/update`, data }) } // 删除物料检验计数器 export const deleteCounter = async (id: number) => { - return await request.delete({ url: `/basic/counter/delete?id=` + id }) + return await request.delete({ url: `/qms/counter/delete?id=` + id }) } // 导出物料检验计数器 Excel export const exportCounter = async (params) => { - return await request.download({ url: `/basic/counter/export-excel`, params }) + return await request.download({ url: `/qms/counter/export-excel`, params }) } // 下载用户导入模板 export const importTemplate = () => { - return request.download({ url: '/basic/counter/get-import-template' }) + return request.download({ url: '/qms/counter/get-import-template' }) } \ No newline at end of file diff --git a/src/api/qms/dynamicRule/index.ts b/src/api/qms/dynamicRule/index.ts index 92d0c4d31..522cea36b 100644 --- a/src/api/qms/dynamicRule/index.ts +++ b/src/api/qms/dynamicRule/index.ts @@ -1,7 +1,7 @@ import request from '@/config/axios' export interface DynamicRuleVO { - code: string + number: string describe: string available: string deletionTime: Date @@ -16,38 +16,38 @@ export const getDynamicRulePage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/basic/dynamic-rule/senior', data }) + return await request.post({ url: '/qms/dynamic-rule/senior', data }) } else { - return await request.get({ url: `/basic/dynamic-rule/page`, params }) + return await request.get({ url: `/qms/dynamic-rule/page`, params }) } } // 查询动态修改规则详情 export const getDynamicRule = async (id: number) => { - return await request.get({ url: `/basic/dynamic-rule/get?id=` + id }) + return await request.get({ url: `/qms/dynamic-rule/get?id=` + id }) } // 新增动态修改规则 export const createDynamicRule = async (data: DynamicRuleVO) => { - return await request.post({ url: `/basic/dynamic-rule/create`, data }) + return await request.post({ url: `/qms/dynamic-rule/create`, data }) } // 修改动态修改规则 export const updateDynamicRule = async (data: DynamicRuleVO) => { - return await request.put({ url: `/basic/dynamic-rule/update`, data }) + return await request.put({ url: `/qms/dynamic-rule/update`, data }) } // 删除动态修改规则 export const deleteDynamicRule = async (id: number) => { - return await request.delete({ url: `/basic/dynamic-rule/delete?id=` + id }) + return await request.delete({ url: `/qms/dynamic-rule/delete?id=` + id }) } // 导出动态修改规则 Excel export const exportDynamicRule = async (params) => { - return await request.download({ url: `/basic/dynamic-rule/export-excel`, params }) + return await request.download({ url: `/qms/dynamic-rule/export-excel`, params }) } // 下载用户导入模板 export const importTemplate = () => { - return request.download({ url: '/basic/dynamic-rule/get-import-template' }) + return request.download({ url: '/qms/dynamic-rule/get-import-template' }) } \ No newline at end of file diff --git a/src/api/qms/inspectionStage/index.ts b/src/api/qms/inspectionStage/index.ts index ecee3ef55..8439a6474 100644 --- a/src/api/qms/inspectionStage/index.ts +++ b/src/api/qms/inspectionStage/index.ts @@ -1,7 +1,8 @@ import request from '@/config/axios' export interface InspectionStageVO { - code: string + number: string + masterId: number dynamicModifyCode: string describe: string okTimes: number @@ -24,38 +25,38 @@ export const getInspectionStagePage = async (params) => { if (params.isSearch) { delete params.isSearch const data = {...params} - return await request.post({ url: '/basic/inspection-stage/senior', data }) + return await request.post({ url: '/qms/inspection-stage/senior', data }) } else { - return await request.get({ url: `/basic/inspection-stage/page`, params }) + return await request.get({ url: `/qms/inspection-stage/page`, params }) } } // 查询检验阶段详情 export const getInspectionStage = async (id: number) => { - return await request.get({ url: `/basic/inspection-stage/get?id=` + id }) + return await request.get({ url: `/qms/inspection-stage/get?id=` + id }) } // 新增检验阶段 export const createInspectionStage = async (data: InspectionStageVO) => { - return await request.post({ url: `/basic/inspection-stage/create`, data }) + return await request.post({ url: `/qms/inspection-stage/create`, data }) } // 修改检验阶段 export const updateInspectionStage = async (data: InspectionStageVO) => { - return await request.put({ url: `/basic/inspection-stage/update`, data }) + return await request.put({ url: `/qms/inspection-stage/update`, data }) } // 删除检验阶段 export const deleteInspectionStage = async (id: number) => { - return await request.delete({ url: `/basic/inspection-stage/delete?id=` + id }) + return await request.delete({ url: `/qms/inspection-stage/delete?id=` + id }) } // 导出检验阶段 Excel export const exportInspectionStage = async (params) => { - return await request.download({ url: `/basic/inspection-stage/export-excel`, params }) + return await request.download({ url: `/qms/inspection-stage/export-excel`, params }) } // 下载用户导入模板 export const importTemplate = () => { - return request.download({ url: '/basic/inspection-stage/get-import-template' }) + return request.download({ url: '/qms/inspection-stage/get-import-template' }) } \ No newline at end of file diff --git a/src/components/BasicForm/src/BasicFormQms.vue b/src/components/BasicForm/src/BasicFormQms.vue new file mode 100644 index 000000000..93b9a66a4 --- /dev/null +++ b/src/components/BasicForm/src/BasicFormQms.vue @@ -0,0 +1,696 @@ + + + diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 4b0b7512f..328aeaae6 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -457,6 +457,7 @@ const formRef = ref() const titleNameRef = ref() const titleValueRef = ref() const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => { + debugger titleNameRef.value = titleName titleValueRef.value = titleValue remarksData.data = { diff --git a/src/components/Detail/src/DetailQms.vue b/src/components/Detail/src/DetailQms.vue new file mode 100644 index 000000000..443d33ccc --- /dev/null +++ b/src/components/Detail/src/DetailQms.vue @@ -0,0 +1,846 @@ + + + + + diff --git a/src/utils/dict.ts b/src/utils/dict.ts index d3dd1b504..b72ef2599 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -292,6 +292,7 @@ export enum DICT_TYPE { EVALUATION_MODE = "evaluation_mode", // 评估模式 INSPECTION_CHARACTERISTICS_FEATURE_TYPE = "inspection_characteristics_feature_type", // 特征类型 INSPECTION_CHARACTERISTICS_RESULT_ENTRY = "inspection_characteristics_result_entry", // 结果录入方式 + INSPECTION_SEVERITY = 'inspection_severity',//检验严重性 // ========== 业务 - mes -gaojs ========== @@ -302,6 +303,7 @@ export enum DICT_TYPE { OPERSTEP_COLLECT_TYPE='operstep_collect_type',//操作步骤采集方式 REWORK_TYPE='rework_type',//工作类型:返工登记、返修登记 REWORK_STATUS='rework_status',//返工返修状态:待返修,返修中,返修完成 - REWORK_REPLACE_FLAG='rework_replace_flag',//是否有替换件 + REWORK_REPLACE_FLAG = 'rework_replace_flag',//是否有替换件 + } diff --git a/src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts b/src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts index eb3c50d9c..580eb529f 100644 --- a/src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts +++ b/src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts @@ -1,19 +1,27 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' +import { string } from 'vue-types' + +const trueFalse = [{ + label: '是', + value: true +}, { + label: '否', + value: false +}] // 表单校验 export const DynamicRuleRules = reactive({ - code: [required], - available: [required], - concurrencyStamp: [required] + describe: [required] }) export const DynamicRule = useCrudSchemas(reactive([ { label: '编码', - field: 'code', + field: 'number', sort: 'custom', - isSearch: true + isSearch: true, + isForm: false, }, { label: '描述', @@ -22,84 +30,122 @@ export const DynamicRule = useCrudSchemas(reactive([ isSearch: true }, { - label: '是否可用', - field: 'available', + label: '操作', + field: 'action', + isForm: false, + isDetail: false, + table: { + width: 150, + fixed: 'right' + } + } +])) + +// 表单校验 +export const InspectionStageRules = reactive({ + dynamicModifyCode: [required], + okTimes: [required], + okTimeStage: [required], + noOkTimes: [required], + noOkTimeStage: [required], + isStartStage: [required], + skipInspection: [required], + inspectionStringency: [required], +}) + +export const InspectionStage = useCrudSchemas(reactive([ + + { + label: '描述', + field: 'describe', sort: 'custom', isSearch: true }, { - label: '创建时间', - field: 'createTime', + label: 'OK次数', + field: 'okTimes', sort: 'custom', - formatter: dateFormatter, isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } - }, - isForm: false + form: { + component: 'InputNumber', + value: 0 + } }, { - label: '删除时间', - field: 'deletionTime', + label: 'OK次数后的阶段', + field: 'okTimeStage', sort: 'custom', - formatter: dateFormatter, isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } - }, form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - valueFormat: 'x' - } + component: 'InputNumber', + value: 0 } }, { - label: '删除者ID', - field: 'deleterId', + label: 'NOK次数', + field: 'noOkTimes', sort: 'custom', - isSearch: true + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } }, { - label: '扩展属性', - field: 'extraProperties', + label: 'NOK次数后的阶段', + field: 'noOkTimeStage', sort: 'custom', - isSearch: true + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } }, { - label: '并发乐观锁', - field: 'concurrencyStamp', + label: '是否是起始阶段', + field: 'isStartStage', sort: 'custom', isSearch: true, + formatter: (_: Recordable, __: TableColumn, cellValue: boolean) => { + return trueFalse.find((account) => account.value == cellValue)?.label + }, form: { - component: 'InputNumber', - value: 0 + component: 'Switch', + value:true } }, { - label: '地点id', - field: 'siteId', + label: '是否略过检验', + field: 'skipInspection', sort: 'custom', - isSearch: true + isSearch: true, + formatter: (_: Recordable, __: TableColumn, cellValue: boolean) => { + return trueFalse.find((account) => account.value == cellValue)?.label + }, + form: { + component: 'Switch', + value:true + } + }, + { + label: '检验严格性', + field: 'inspectionStringency', + sort: 'custom', + isSearch: true, + dictType: DICT_TYPE.INSPECTION_SEVERITY, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + form: { + component: 'Select' + }, }, { label: '操作', field: 'action', isForm: false, table: { - width: 150, + width: 300, fixed: 'right' - } + }, + isTableForm: false, } ])) diff --git a/src/views/qms/basicDataManage/dynamicRule/index.vue b/src/views/qms/basicDataManage/dynamicRule/index.vue index 9276c8fa3..eaf60e016 100644 --- a/src/views/qms/basicDataManage/dynamicRule/index.vue +++ b/src/views/qms/basicDataManage/dynamicRule/index.vue @@ -27,9 +27,9 @@ v-model:currentPage="tableObject.currentPage" v-model:sort="tableObject.sort" > -