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 :span="12">
<el-form-item label="每份样品量" prop="samplePieceSize">
<el-input v-model="data.samplePieceSize" placeholder="请填写每份样品量" />
</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-input v-model="data.samplePieceSize" placeholder="请填写每份样品量" :disabled='isSamplePieceSizeDisabled'/>
</el-form-item>
</el-col>
<el-col :span="12">
@ -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') {

2
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)
}

19
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<CrudSchema[]>([
{
@ -170,24 +169,6 @@ export const InspectionSchemeMain = useCrudSchemas(reactive<CrudSchema[]>([
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',

Loading…
Cancel
Save