Browse Source

检验方案

hella_online_20241114
yufei_wang 2 weeks ago
parent
commit
e302621937
  1. 36
      src/views/qms/inspectionScheme/addForm.vue

36
src/views/qms/inspectionScheme/addForm.vue

@ -910,12 +910,14 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
let arr = []
list.forEach((item, index) => {
let obj = {
code: item.code,
inspectionCode: item.inspectionCode,
description: item.description,
inspectionCharCode: item.inspectionCharCode,
sequenceCode: item.sequenceCode,
name: String(index + 1),
inspectionCharacteristicsBaseVO: {
code: item.inspectionCharacteristicsBaseVO.code,
description: item.inspectionCharacteristicsBaseVO.description,
featureType: item.inspectionCharacteristicsBaseVO.featureType,
inspectionMethodCode: item.inspectionCharacteristicsBaseVO.inspectionMethodCode,
@ -1388,11 +1390,23 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => {
} else if (formField == 'inspectionType') {
data.value.testTypeName = val[0].description
} else if (formField == 'programmeTemplateCode') {
setDataProgrammeTemplateCode(val[0])
} else if (formField == 'dynamicUpdateCode') {
data.value[formField] = val[0].code
data.value.dynamicUpdateName = val[0].description
}
}
// emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row)
}
const setDataProgrammeTemplateCode = async (dataValue)=>{
isShowField.value = 0 //isShowField == 0aql
data.value.programmeTemplateName = val[0].description
data.value['dynamicUpdateCode'] = val[0].dynamicUpdateCode
data.value.dynamicUpdateName = val[0].dynamicUpdateName
let list = await InspectionProcessPageApi.getListByTempleteCode(val[0].code)
data.value.programmeTemplateName = dataValue.description
data.value['dynamicUpdateCode'] = dataValue.dynamicUpdateCode
data.value.dynamicUpdateName = dataValue.dynamicUpdateName
let list = await InspectionProcessPageApi.getListByTempleteCode(dataValue.code)
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false
@ -1426,13 +1440,6 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => {
rules.value.aql[0].required = false
}
data.value.process = list
} else if (formField == 'dynamicUpdateCode') {
data.value[formField] = val[0].code
data.value.dynamicUpdateName = val[0].description
}
}
// emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row)
}
//
const changeIsCapping = (e, item) => {
@ -1508,6 +1515,7 @@ const onItemBlur = async (field, pageApi, item) => {
}
//
const onBlur = async (field, pageApi, item) => {
console.log('onBlur',field, pageApi, item)
const dataObj = item ? item.inspectionCharacteristicsBaseVO : data.value
if (dataObj[field + 'Code']) {
const _searchCondition = {}
@ -1528,6 +1536,7 @@ const onBlur = async (field, pageApi, item) => {
_searchCondition.isSearch = true
_searchCondition.filters = filters
const array = await pageApi(_searchCondition)
console.log('array',array)
Butttondata = [
defaultButtons.formSaveBtn(null), //
defaultButtons.formCloseBtn(null) //
@ -1541,6 +1550,11 @@ const onBlur = async (field, pageApi, item) => {
dataObj[field + 'Code'] = ''
dataObj[field + 'Name'] = ''
}
if(field == 'programmeTemplate'){ //
setDataProgrammeTemplateCode(obj)
}
} else {
dataObj[field + 'Name'] = ''
Butttondata = [

Loading…
Cancel
Save