From 36da593e1ca858846bf85dfef81e058a894a8078 Mon Sep 17 00:00:00 2001
From: liuchen864 <23082234@qq.com>
Date: Tue, 30 Apr 2024 14:43:29 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A3=80=E9=AA=8C=E6=96=B9=E6=A1=88=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E8=AE=A1=E9=87=8F=E5=8D=95=E4=BD=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../inspectionScheme/addForm.vue | 20 +++++++++++--------
.../inspectionScheme/index.vue | 2 +-
.../inspectionScheme/inspectionScheme.data.ts | 19 ------------------
3 files changed, 13 insertions(+), 28 deletions(-)
diff --git a/src/views/qms/basicDataManage/inspectionScheme/addForm.vue b/src/views/qms/basicDataManage/inspectionScheme/addForm.vue
index 11bdaa3b4..787c3a407 100644
--- a/src/views/qms/basicDataManage/inspectionScheme/addForm.vue
+++ b/src/views/qms/basicDataManage/inspectionScheme/addForm.vue
@@ -189,12 +189,7 @@
-
-
-
-
-
-
+
@@ -708,7 +703,7 @@ const data = ref({
dynamicUpdateCode: '',
description:'',
samplePieceSize:'',
- isWhole:'TRUE',
+ uom:'',
process: []
})
@@ -846,7 +841,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
dynamicUpdateCode:'',
description:"",
samplePieceSize:"",
- isWhole:"TRUE",
+ uom:"",
process: []
}
}
@@ -1095,6 +1090,7 @@ const opensearchTable = (
_searchCondition
)
}
+const isSamplePieceSizeDisabled = ref(false)//判断每份样品朗是否可输入
// 弹层确定返回所选数据
// val : 弹层列表row 数据
const searchTableSuccess = async (formField, searchField, val, type, row) => {
@@ -1115,6 +1111,14 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => {
data.value[formField] = val[0].code
if (formField == 'itemCode') {
data.value.itemName = val[0].name
+ data.value.uom = val[0].uom
+ if(data.value.uom == 'EA'){
+ data.value.samplePieceSize = 1
+ isSamplePieceSizeDisabled.value = true
+ }else{
+ data.value.samplePieceSize = ''
+ isSamplePieceSizeDisabled.value = false
+ }
} else if (formField == 'inspectionType') {
data.value.testTypeName = val[0].description
} else if (formField == 'programmeTemplateCode') {
diff --git a/src/views/qms/basicDataManage/inspectionScheme/index.vue b/src/views/qms/basicDataManage/inspectionScheme/index.vue
index 419b53f99..b746fd17b 100644
--- a/src/views/qms/basicDataManage/inspectionScheme/index.vue
+++ b/src/views/qms/basicDataManage/inspectionScheme/index.vue
@@ -181,7 +181,7 @@ const submitForm = async (formType,data) => {
effectiveDate: data.effectiveDate,
expirationDate: data.expirationDate,
samplePieceSize: data.samplePieceSize,
- isWhole: data.isWhole,
+ uom: data.uom,
available: data.available,
content:JSON.stringify(data.process)
}
diff --git a/src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts b/src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts
index a15fe2c9c..df35c591c 100644
--- a/src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts
+++ b/src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts
@@ -67,7 +67,6 @@ export const InspectionTemplateRules = reactive({
quantifyQuantifyCode: [
{ required: true, message: '请输入选择集编码', trigger: 'blur' }
],
- isWhole: [{ required: true}],
})
export const InspectionSchemeMain = useCrudSchemas(reactive([
{
@@ -170,24 +169,6 @@ export const InspectionSchemeMain = useCrudSchemas(reactive([
width: 140
}
},
- {
- label: '是否整检',
- field: 'isWhole',
- sort: 'custom',
- dictType: DICT_TYPE.TRUE_FALSE,
- dictClass: 'string', // 默认都是字符串类型其他暂不考虑
- form: {
- component: 'Switch',
- value: 'TRUE',
- componentProps: {
- inactiveValue: 'FALSE',
- activeValue: 'TRUE'
- }
- },
- table: {
- width: 110
- }
- },
{
label: '生效时间',
field: 'effectiveDate',