From 3788bfee1256ca29fd8cd6c02947eaa26b2c11d0 Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Sun, 7 Apr 2024 18:21:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=A8=E6=80=81=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E8=A7=84=E5=88=99=E7=9A=84stage=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/qms/inspectionStage/index.ts | 1 + .../dynamicRule/dynamicRule.data.ts | 132 --------------- .../qms/basicDataManage/dynamicRule/index.vue | 4 +- .../inspectionStage/inspectionStage.data.ts | 152 ++++++++---------- 4 files changed, 66 insertions(+), 223 deletions(-) diff --git a/src/api/qms/inspectionStage/index.ts b/src/api/qms/inspectionStage/index.ts index cc1d066dc..ffce240a6 100644 --- a/src/api/qms/inspectionStage/index.ts +++ b/src/api/qms/inspectionStage/index.ts @@ -3,6 +3,7 @@ import request from '@/config/axios' export interface InspectionStageVO { code: string masterId: number + stage: number dynamicModifyCode: string description: string okTimes: number diff --git a/src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts b/src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts index 9fb81f8c4..f4c6c33a9 100644 --- a/src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts +++ b/src/views/qms/basicDataManage/dynamicRule/dynamicRule.data.ts @@ -40,135 +40,3 @@ export const DynamicRule = useCrudSchemas(reactive([ } } ])) - -// 表单校验 -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: 'description', - sort: 'custom', - isSearch: true - }, - { - label: 'OK次数', - field: 'okTimes', - sort: 'custom', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - }, - tableForm: { - type: 'InputNumber', - } - }, - { - label: 'OK次数后的阶段', - field: 'okTimeStage', - sort: 'custom', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - }, - tableForm: { - type: 'InputNumber', - } - }, - { - label: 'NOK次数', - field: 'noOkTimes', - sort: 'custom', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - }, - tableForm: { - type: 'InputNumber', - } - }, - { - label: 'NOK次数后的阶段', - field: 'noOkTimeStage', - sort: 'custom', - isSearch: true, - form: { - component: 'InputNumber', - value: 0 - }, - tableForm: { - type: 'InputNumber', - } - }, - { - label: '是否是起始阶段', - field: 'isStartStage', - sort: 'custom', - isSearch: true, - formatter: (_: Recordable, __: TableColumn, cellValue: boolean) => { - return trueFalse.find((account) => account.value == cellValue)?.label - }, - form: { - component: 'Switch', - value:true - }, - tableForm: { - type: 'Switch', - default: true - }, - }, - { - label: '是否略过检验', - field: 'skipInspection', - sort: 'custom', - isSearch: true, - formatter: (_: Recordable, __: TableColumn, cellValue: boolean) => { - return trueFalse.find((account) => account.value == cellValue)?.label - }, - form: { - component: 'Switch', - value:true - }, - tableForm: { - type: 'Switch', - default: true - } - }, - { - label: '检验严格性', - field: 'inspectionStringency', - sort: 'custom', - isSearch: true, - dictType: DICT_TYPE.INSPECTION_SEVERITY, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - form: { - component: 'Select' - }, - tableForm: { - type: 'Select' - }, - }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - 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 47c7b192a..a6e697802 100644 --- a/src/views/qms/basicDataManage/dynamicRule/index.vue +++ b/src/views/qms/basicDataManage/dynamicRule/index.vue @@ -77,7 +77,6 @@ @detailOpenForm="detailOpenForm" myFuncTypeSign="InspectionStage" /> - @@ -85,7 +84,8 @@