From 4a9a11cc61362c8e5d2b0551e0a4d134fd4411ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=BB=E7=A0=96-JAVA=5CAdministrator?= <591141169@qq.com> Date: Wed, 17 Apr 2024 13:52:12 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/qms/aql/aql.data.ts | 12 ++- .../inspectionScheme/inspectionScheme.data.ts | 78 ++++++++++++------- .../inspectionMethod/inspectionMethod.data.ts | 9 +++ .../samplingProcess/samplingProcess.data.ts | 29 ++++--- .../qms/samplingScheme/samplingScheme.data.ts | 9 +++ 5 files changed, 96 insertions(+), 41 deletions(-) diff --git a/src/views/qms/aql/aql.data.ts b/src/views/qms/aql/aql.data.ts index f62070d8e..58e6df6c2 100644 --- a/src/views/qms/aql/aql.data.ts +++ b/src/views/qms/aql/aql.data.ts @@ -540,9 +540,15 @@ export const Aql = useCrudSchemas(reactive([ detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, - table: { - width: 115 - } + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '操作', diff --git a/src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts b/src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts index c15af9eec..deb0650c2 100644 --- a/src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts +++ b/src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts @@ -5,10 +5,10 @@ import { dateFormatter } from '@/utils/formatTime' export const InspectionTemplateRules = reactive({ description: [ - { required: true , message: '请填写描述', trigger: 'blur' } + { required: true, message: '请填写描述', trigger: 'blur' } ], version: [ - { required: true , message: '请填写版本', trigger: 'blur' } + { required: true, message: '请填写版本', trigger: 'blur' } ], inspectionCode: [ { required: true, message: '请选择检验方案模板编码', trigger: 'blur' } @@ -77,11 +77,11 @@ export const InspectionSchemeMain = useCrudSchemas(reactive([ width: 220, fixed: 'left' }, - isSearch:true, - form:{ - componentProps:{ - disabled:true, - placeholder:'系统自动获取' + isSearch: true, + form: { + componentProps: { + disabled: true, + placeholder: '系统自动获取' } } }, @@ -92,7 +92,7 @@ export const InspectionSchemeMain = useCrudSchemas(reactive([ table: { width: 150 }, - isSearch:true, + isSearch: true, }, { label: '物料编码', @@ -101,19 +101,19 @@ export const InspectionSchemeMain = useCrudSchemas(reactive([ table: { width: 150 }, - isSearch:true, + isSearch: true, }, { label: '描述', field: 'description', sort: 'custom', - },{ + }, { label: '版本', field: 'version', sort: 'custom', table: { width: 150 } - },{ + }, { label: '检验类型编码', field: 'inspectionType', dictType: DICT_TYPE.INSPECTION_TYPE, @@ -122,14 +122,14 @@ export const InspectionSchemeMain = useCrudSchemas(reactive([ table: { width: 150 } - },{ + }, { label: '检验模板编码', field: 'programmeTemplateCode', sort: 'custom', table: { width: 150 } - },{ + }, { label: '拆分规则', field: 'splitRule', sort: 'custom', @@ -137,8 +137,8 @@ export const InspectionSchemeMain = useCrudSchemas(reactive([ dictClass: 'string', // 默认都是字符串类型其他暂不考虑 table: { width: 150 - }, - },{ + }, + }, { label: 'aql', field: 'aql', sort: 'custom', @@ -147,32 +147,54 @@ export const InspectionSchemeMain = useCrudSchemas(reactive([ table: { width: 150 } - },{ + }, { label: '检验水平', field: 'inspectionLevel', sort: 'custom', dictType: DICT_TYPE.INSPECTION_LEVEL, - dictClass: 'string', + dictClass: 'string', table: { width: 150 - }, - isSearch:true, - },{ + }, + isSearch: true, + }, + { label: '生效时间', field: 'effectiveDate', sort: 'custom', formatter: dateFormatter, - table: { - width: 180 - } - },{ + isForm: false, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, + { label: '失效时间', field: 'expirationDate', sort: 'custom', formatter: dateFormatter, - table: { - width: 180 - } + isForm: false, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, // { // label: '是否可用', @@ -197,7 +219,7 @@ export const InspectionSchemeMain = useCrudSchemas(reactive([ label: '操作', field: 'action', isDetail: false, - isForm: false , + isForm: false, table: { width: 150, fixed: 'right' diff --git a/src/views/qms/inspectionMethod/inspectionMethod.data.ts b/src/views/qms/inspectionMethod/inspectionMethod.data.ts index 4df465762..ed6fb2d94 100644 --- a/src/views/qms/inspectionMethod/inspectionMethod.data.ts +++ b/src/views/qms/inspectionMethod/inspectionMethod.data.ts @@ -61,6 +61,15 @@ export const InspectionMethod = useCrudSchemas(reactive([ detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '操作', diff --git a/src/views/qms/samplingProcess/samplingProcess.data.ts b/src/views/qms/samplingProcess/samplingProcess.data.ts index 05f285cf9..3832d94b3 100644 --- a/src/views/qms/samplingProcess/samplingProcess.data.ts +++ b/src/views/qms/samplingProcess/samplingProcess.data.ts @@ -76,16 +76,25 @@ export const SamplingProcess = useCrudSchemas(reactive([ } }, }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isForm: false, - detail: { - dateFormat: 'YYYY-MM-DD HH:mm:ss' - }, - }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isForm: false, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + }, { label: '操作', field: 'action', diff --git a/src/views/qms/samplingScheme/samplingScheme.data.ts b/src/views/qms/samplingScheme/samplingScheme.data.ts index b651c61ed..61c81bba4 100644 --- a/src/views/qms/samplingScheme/samplingScheme.data.ts +++ b/src/views/qms/samplingScheme/samplingScheme.data.ts @@ -32,6 +32,15 @@ export const SamplingScheme = useCrudSchemas(reactive([ detail: { dateFormat: 'YYYY-MM-DD HH:mm:ss' }, + form: { + component: 'DatePicker', + componentProps: { + style: {width: '100%'}, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, }, { label: '操作',