From 0aaf29be48adc2acfa2b38834c7fce33ffe50075 Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Mon, 1 Apr 2024 16:55:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8C=85=E9=97=AE=E9=A2=98=E8=A7=A3?= =?UTF-8?q?=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/qms/dynamicRule/index.ts | 53 ++++ src/api/qms/inspectionStage/index.ts | 61 +++++ .../basicDataManage/counter/counter.data.ts | 11 - .../qms/basicDataManage/counter/index.vue | 12 +- .../dynamicRule/dynamicRule.data.ts | 105 ++++++++ .../qms/basicDataManage/dynamicRule/index.vue | 244 ++++++++++++++++++ .../basicDataManage/inspectionStage/index.vue | 244 ++++++++++++++++++ .../inspectionStage/inspectionStage.data.ts | 183 +++++++++++++ 8 files changed, 896 insertions(+), 17 deletions(-) create mode 100644 src/api/qms/dynamicRule/index.ts create mode 100644 src/api/qms/inspectionStage/index.ts create mode 100644 src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts create mode 100644 src/views/qms/basicDataManage/dynamicRule/index.vue create mode 100644 src/views/qms/basicDataManage/inspectionStage/index.vue create mode 100644 src/views/qms/basicDataManage/inspectionStage/inspectionStage.data.ts diff --git a/src/api/qms/dynamicRule/index.ts b/src/api/qms/dynamicRule/index.ts new file mode 100644 index 000000000..92d0c4d31 --- /dev/null +++ b/src/api/qms/dynamicRule/index.ts @@ -0,0 +1,53 @@ +import request from '@/config/axios' + +export interface DynamicRuleVO { + code: string + describe: string + available: string + deletionTime: Date + deleterId: string + extraProperties: string + concurrencyStamp: number + siteId: string +} + +// 查询动态修改规则列表 +export const getDynamicRulePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/basic/dynamic-rule/senior', data }) + } else { + return await request.get({ url: `/basic/dynamic-rule/page`, params }) + } +} + +// 查询动态修改规则详情 +export const getDynamicRule = async (id: number) => { + return await request.get({ url: `/basic/dynamic-rule/get?id=` + id }) +} + +// 新增动态修改规则 +export const createDynamicRule = async (data: DynamicRuleVO) => { + return await request.post({ url: `/basic/dynamic-rule/create`, data }) +} + +// 修改动态修改规则 +export const updateDynamicRule = async (data: DynamicRuleVO) => { + return await request.put({ url: `/basic/dynamic-rule/update`, data }) +} + +// 删除动态修改规则 +export const deleteDynamicRule = async (id: number) => { + return await request.delete({ url: `/basic/dynamic-rule/delete?id=` + id }) +} + +// 导出动态修改规则 Excel +export const exportDynamicRule = async (params) => { + return await request.download({ url: `/basic/dynamic-rule/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/basic/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 new file mode 100644 index 000000000..ecee3ef55 --- /dev/null +++ b/src/api/qms/inspectionStage/index.ts @@ -0,0 +1,61 @@ +import request from '@/config/axios' + +export interface InspectionStageVO { + code: string + dynamicModifyCode: string + describe: string + okTimes: number + okTimeStage: number + noOkTimes: number + noOkTimeStage: number + isStartStage: boolean + skipInspection: boolean + inspectionStringency: string + available: string + deletionTime: Date + deleterId: string + extraProperties: string + concurrencyStamp: number + siteId: string +} + +// 查询检验阶段列表 +export const getInspectionStagePage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/basic/inspection-stage/senior', data }) + } else { + return await request.get({ url: `/basic/inspection-stage/page`, params }) + } +} + +// 查询检验阶段详情 +export const getInspectionStage = async (id: number) => { + return await request.get({ url: `/basic/inspection-stage/get?id=` + id }) +} + +// 新增检验阶段 +export const createInspectionStage = async (data: InspectionStageVO) => { + return await request.post({ url: `/basic/inspection-stage/create`, data }) +} + +// 修改检验阶段 +export const updateInspectionStage = async (data: InspectionStageVO) => { + return await request.put({ url: `/basic/inspection-stage/update`, data }) +} + +// 删除检验阶段 +export const deleteInspectionStage = async (id: number) => { + return await request.delete({ url: `/basic/inspection-stage/delete?id=` + id }) +} + +// 导出检验阶段 Excel +export const exportInspectionStage = async (params) => { + return await request.download({ url: `/basic/inspection-stage/export-excel`, params }) +} + +// 下载用户导入模板 +export const importTemplate = () => { + return request.download({ url: '/basic/inspection-stage/get-import-template' }) +} \ No newline at end of file diff --git a/src/views/qms/basicDataManage/counter/counter.data.ts b/src/views/qms/basicDataManage/counter/counter.data.ts index 6c83b068f..f65265740 100644 --- a/src/views/qms/basicDataManage/counter/counter.data.ts +++ b/src/views/qms/basicDataManage/counter/counter.data.ts @@ -31,9 +31,6 @@ export const Counter = useCrudSchemas(reactive([ field: 'workingCode', sort: 'custom', isSearch: true, - form: { - component: 'Radio' - } }, { label: '供应商编码', @@ -46,10 +43,6 @@ export const Counter = useCrudSchemas(reactive([ field: 'qualifiedTimes', sort: 'custom', isSearch: false, - form: { - component: 'InputNumber', - value: 0 - } }, { label: '最后合格批次', @@ -126,10 +119,6 @@ export const Counter = useCrudSchemas(reactive([ field: 'nextStage', sort: 'custom', isSearch: false, - form: { - component: 'InputNumber', - value: 0 - } }, { label: '操作', diff --git a/src/views/qms/basicDataManage/counter/index.vue b/src/views/qms/basicDataManage/counter/index.vue index a36880258..4b7416869 100644 --- a/src/views/qms/basicDataManage/counter/index.vue +++ b/src/views/qms/basicDataManage/counter/index.vue @@ -54,7 +54,7 @@ - + diff --git a/src/views/qms/basicDataManage/inspectionStage/index.vue b/src/views/qms/basicDataManage/inspectionStage/index.vue new file mode 100644 index 000000000..25e4ce571 --- /dev/null +++ b/src/views/qms/basicDataManage/inspectionStage/index.vue @@ -0,0 +1,244 @@ + + + diff --git a/src/views/qms/basicDataManage/inspectionStage/inspectionStage.data.ts b/src/views/qms/basicDataManage/inspectionStage/inspectionStage.data.ts new file mode 100644 index 000000000..56a635822 --- /dev/null +++ b/src/views/qms/basicDataManage/inspectionStage/inspectionStage.data.ts @@ -0,0 +1,183 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const InspectionStageRules = reactive({ + code: [required], + dynamicModifyCode: [required], + okTimes: [required], + okTimeStage: [required], + noOkTimes: [required], + noOkTimeStage: [required], + isStartStage: [required], + skipInspection: [required], + inspectionStringency: [required], + available: [required], + concurrencyStamp: [required] +}) + +export const InspectionStage = useCrudSchemas(reactive([ + { + label: '编码', + field: 'code', + sort: 'custom', + isSearch: true + }, + { + label: '动态修改规则编码', + field: 'dynamicModifyCode', + sort: 'custom', + isSearch: true + }, + { + label: '描述', + field: 'describe', + sort: 'custom', + isSearch: true + }, + { + label: 'OK次数', + field: 'okTimes', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: 'OK次数后的阶段', + field: 'okTimeStage', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: 'NOK次数', + field: 'noOkTimes', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: 'NOK次数后的阶段', + field: 'noOkTimeStage', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '是否是起始阶段', + field: 'isStartStage', + sort: 'custom', + isSearch: true, + form: { + component: 'Radio' + } + }, + { + label: '是否略过检验', + field: 'skipInspection', + sort: 'custom', + isSearch: true, + form: { + component: 'Radio' + } + }, + { + label: '检验严格性', + field: 'inspectionStringency', + sort: 'custom', + isSearch: true + }, + { + label: '是否可用', + field: 'available', + sort: 'custom', + isSearch: true + }, + { + label: '创建时间', + field: 'createTime', + 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 + }, + { + label: '删除时间', + field: 'deletionTime', + 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' + } + } + }, + { + label: '删除者ID', + field: 'deleterId', + sort: 'custom', + isSearch: true + }, + { + label: '扩展属性', + field: 'extraProperties', + sort: 'custom', + isSearch: true + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isSearch: true, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '地点id', + field: 'siteId', + sort: 'custom', + isSearch: true + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +]))