From 1bf5e32273eb33a86cb179db69fd9acb3b930f78 Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Wed, 3 Apr 2024 14:11:49 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E6=A8=A1=E6=9D=BF=E6=96=B9?=
=?UTF-8?q?=E6=A1=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../inspectionPlan/addForm.vue | 29 +++++++------------
.../inspectionPlan/inspectionPlan.data.ts | 16 ++++++++++
.../inspectionTemplate/addForm.vue | 16 ----------
3 files changed, 27 insertions(+), 34 deletions(-)
diff --git a/src/views/qms/basicDataManage/inspectionPlan/addForm.vue b/src/views/qms/basicDataManage/inspectionPlan/addForm.vue
index 2523ea79f..2609724b6 100644
--- a/src/views/qms/basicDataManage/inspectionPlan/addForm.vue
+++ b/src/views/qms/basicDataManage/inspectionPlan/addForm.vue
@@ -162,7 +162,7 @@
-
+
@@ -606,7 +606,7 @@ const data = ref({
inspectionLevel:'',
effectiveDate:'',
expirationDate:'',
- available: true,
+ available: 'TRUE',
process: []
})
@@ -642,24 +642,12 @@ const rules = ref({
'inspectionCharacteristicsBaseVO.inspectionMethod': [
{ required: true, message: '请选择动态修改规则编码', trigger: ['blur', 'change'] }
],
- 'inspectionCharacteristicsBaseVO.isCanUpdate': [
- { required: true, message: '请选择是否允许修改特征值', trigger: ['blur', 'change'] }
- ],
- 'inspectionCharacteristicsBaseVO.isDestructionInspection': [
- { required: true, message: '请选择是否破坏性检验', trigger: ['blur', 'change'] }
- ],
'inspectionCharacteristicsBaseVO.resultEntryMethod': [
{ required: true, message: '请选择结果录入方式', trigger: ['blur', 'change'] }
],
'inspectionCharacteristicsBaseVO.featureType': [
{ required: true, message: '请选择特征类型', trigger: ['blur', 'change'] }
],
- 'inspectionCharacteristicsBaseVO.quantifyIsCapping': [
- { required: true, message: '请选择是否设定上限', trigger: ['blur', 'change'] }
- ],
- 'inspectionCharacteristicsBaseVO.quantifyIsLowlimit': [
- { required: true, message: '请选择是否设定下限', trigger: ['blur', 'change'] }
- ],
'inspectionCharacteristicsBaseVO.quantifyIsTarget': [
{ required: true, message: '请选择是否设定目标值', trigger: ['blur', 'change'] }
],
@@ -695,8 +683,13 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
formType.value = type
if (row) {
data.value = row
-
- let list = await InspectionProcessPageApi.getListByTempleteCode(row.code)
+ let list =[]
+ if(row.content){
+ list = JSON.parse(row.content)
+ }else{
+ list = await InspectionProcessPageApi.getListByTempleteCode(row.programmeTemplateCode)
+ }
+
list.forEach((item, index) => {
editableTabsValue.value = index + 1
item.name = index + 1
@@ -721,7 +714,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
} else {
data.value = {
code: '',
- description: '',
+ itemCode: '',
version: '',
testTypeCode:'',
programmeTemplateCode:'',
@@ -730,7 +723,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
inspectionLevel:'',
effectiveDate:'',
expirationDate:'',
- available: true,
+ available: 'TRUE',
process: []
}
}
diff --git a/src/views/qms/basicDataManage/inspectionPlan/inspectionPlan.data.ts b/src/views/qms/basicDataManage/inspectionPlan/inspectionPlan.data.ts
index ae54b1875..b4306d930 100644
--- a/src/views/qms/basicDataManage/inspectionPlan/inspectionPlan.data.ts
+++ b/src/views/qms/basicDataManage/inspectionPlan/inspectionPlan.data.ts
@@ -127,14 +127,30 @@ export const InspectionPlanMain = useCrudSchemas(reactive([
label: '生效时间',
field: 'effectiveDate',
sort: 'custom',
+ formatter: dateFormatter,
},{
label: '失效时间',
field: 'expirationDate',
sort: 'custom',
+ formatter: dateFormatter,
},{
label: '是否可用',
field: 'available',
+ dictType: DICT_TYPE.TRUE_FALSE,
+ dictClass: 'string',
+ isTable: true,
sort: 'custom',
+ table: {
+ width: 150
+ },
+ form: {
+ component: 'Switch',
+ value: 'TRUE',
+ componentProps: {
+ inactiveValue: 'FALSE',
+ activeValue: 'TRUE'
+ }
+ },
},
{
label: '操作',
diff --git a/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue b/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue
index 7209b0225..e9e0fb289 100644
--- a/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue
+++ b/src/views/qms/basicDataManage/inspectionTemplate/addForm.vue
@@ -502,28 +502,12 @@ const rules = ref({
'inspectionCharacteristicsBaseVO.inspectionMethod': [
{ required: true, message: '请选择动态修改规则编码', trigger: ['blur', 'change'] }
],
- 'inspectionCharacteristicsBaseVO.isCanUpdate': [
- { required: true, message: '请选择是否允许修改特征值', trigger: ['blur', 'change'] }
- ],
- 'inspectionCharacteristicsBaseVO.isDestructionInspection': [
- { required: true, message: '请选择是否破坏性检验', trigger: ['blur', 'change'] }
- ],
'inspectionCharacteristicsBaseVO.resultEntryMethod': [
{ required: true, message: '请选择结果录入方式', trigger: ['blur', 'change'] }
],
'inspectionCharacteristicsBaseVO.featureType': [
{ required: true, message: '请选择特征类型', trigger: ['blur', 'change'] }
],
- 'inspectionCharacteristicsBaseVO.quantifyIsCapping': [
- { required: true, message: '请选择是否设定上限', trigger: ['blur', 'change'] }
- ],
- 'inspectionCharacteristicsBaseVO.quantifyIsLowlimit': [
- { required: true, message: '请选择是否设定下限', trigger: ['blur', 'change'] }
- ],
- 'inspectionCharacteristicsBaseVO.quantifyIsTarget': [
- { required: true, message: '请选择是否设定目标值', trigger: ['blur', 'change'] }
- ],
-
'inspectionCharacteristicsBaseVO.quantifyTarget': [
{ required: true, message: '请输入目标值', trigger: 'blur' }
],