Browse Source

检验方案增加计量单位

master_hella_20240701
liuchen864 7 months ago
parent
commit
36da593e1c
  1. 20
      src/views/qms/basicDataManage/inspectionScheme/addForm.vue
  2. 2
      src/views/qms/basicDataManage/inspectionScheme/index.vue
  3. 19
      src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts

20
src/views/qms/basicDataManage/inspectionScheme/addForm.vue

@ -189,12 +189,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="每份样品量" prop="samplePieceSize"> <el-form-item label="每份样品量" prop="samplePieceSize">
<el-input v-model="data.samplePieceSize" placeholder="请填写每份样品量" /> <el-input v-model="data.samplePieceSize" placeholder="请填写每份样品量" :disabled='isSamplePieceSizeDisabled'/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否整检" prop="isWhole">
<el-switch v-model="data.isWhole" active-value="TRUE" inactive-value="FALSE" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -708,7 +703,7 @@ const data = ref({
dynamicUpdateCode: '', dynamicUpdateCode: '',
description:'', description:'',
samplePieceSize:'', samplePieceSize:'',
isWhole:'TRUE', uom:'',
process: [] process: []
}) })
@ -846,7 +841,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
dynamicUpdateCode:'', dynamicUpdateCode:'',
description:"", description:"",
samplePieceSize:"", samplePieceSize:"",
isWhole:"TRUE", uom:"",
process: [] process: []
} }
} }
@ -1095,6 +1090,7 @@ const opensearchTable = (
_searchCondition _searchCondition
) )
} }
const isSamplePieceSizeDisabled = ref(false)//
// //
// val row // val row
const searchTableSuccess = async (formField, searchField, val, type, 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 data.value[formField] = val[0].code
if (formField == 'itemCode') { if (formField == 'itemCode') {
data.value.itemName = val[0].name 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') { } else if (formField == 'inspectionType') {
data.value.testTypeName = val[0].description data.value.testTypeName = val[0].description
} else if (formField == 'programmeTemplateCode') { } else if (formField == 'programmeTemplateCode') {

2
src/views/qms/basicDataManage/inspectionScheme/index.vue

@ -181,7 +181,7 @@ const submitForm = async (formType,data) => {
effectiveDate: data.effectiveDate, effectiveDate: data.effectiveDate,
expirationDate: data.expirationDate, expirationDate: data.expirationDate,
samplePieceSize: data.samplePieceSize, samplePieceSize: data.samplePieceSize,
isWhole: data.isWhole, uom: data.uom,
available: data.available, available: data.available,
content:JSON.stringify(data.process) content:JSON.stringify(data.process)
} }

19
src/views/qms/basicDataManage/inspectionScheme/inspectionScheme.data.ts

@ -67,7 +67,6 @@ export const InspectionTemplateRules = reactive({
quantifyQuantifyCode: [ quantifyQuantifyCode: [
{ required: true, message: '请输入选择集编码', trigger: 'blur' } { required: true, message: '请输入选择集编码', trigger: 'blur' }
], ],
isWhole: [{ required: true}],
}) })
export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
@ -170,24 +169,6 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 140 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: '生效时间', label: '生效时间',
field: 'effectiveDate', field: 'effectiveDate',

Loading…
Cancel
Save