|
|
@ -18,7 +18,12 @@ |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="物料编码" prop="itemCode"> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input v-model="data.itemCode" disabled placeholder="请选择物料编码" /> |
|
|
|
<el-input |
|
|
|
v-model="data.itemCode" |
|
|
|
placeholder="请选择物料编码" |
|
|
|
@blur="onBlur('item', ItemBasicApi.getItembasicPage)" |
|
|
|
@focus="onFocus" |
|
|
|
/> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
|
plain |
|
|
@ -41,6 +46,13 @@ |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="物料名称" prop="itemName"> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input v-model="data.itemName" placeholder="请选择物料" disabled /> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="描述" prop="description"> |
|
|
|
<el-input v-model="data.description" placeholder="请填写描述" /> |
|
|
@ -53,28 +65,6 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="检验类型" prop="inspectionType"> |
|
|
|
<!-- <div style="display: flex; width: 100%"> |
|
|
|
<el-input v-model="data.testTypeName" disabled placeholder="请选择检验类型" /> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
|
plain |
|
|
|
style="width: 40px" |
|
|
|
@click=" |
|
|
|
opensearchTable( |
|
|
|
'testTypeCode', |
|
|
|
null, |
|
|
|
'检验类型', |
|
|
|
SamplingProcess.allSchemas, |
|
|
|
SamplingProcessApi.getSamplingProcessPage, |
|
|
|
null, |
|
|
|
false, |
|
|
|
'main', |
|
|
|
null |
|
|
|
) |
|
|
|
" |
|
|
|
><Icon icon="ep:search" /> |
|
|
|
</el-button> |
|
|
|
</div> --> |
|
|
|
<el-select v-model="data.inspectionType" placeholder="请选择检验类型"> |
|
|
|
<el-option |
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.INSPECTION_TYPE)" |
|
|
@ -89,9 +79,12 @@ |
|
|
|
<el-form-item label="检验模板" prop="programmeTemplateCode"> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="data.programmeTemplateName" |
|
|
|
disabled |
|
|
|
v-model="data.programmeTemplateCode" |
|
|
|
placeholder="请选择检验模板" |
|
|
|
@blur=" |
|
|
|
onBlur('programmeTemplateCode', InspectionTemplateApi.inspectionTemplatePage) |
|
|
|
" |
|
|
|
@focus="onFocus" |
|
|
|
/> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
@ -122,12 +115,24 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="动态修改规则" prop="dynamicUpdateCode"> |
|
|
|
<el-form-item label="检验模板描述" prop="programmeTemplateName"> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="data.dynamicUpdateName" |
|
|
|
v-model="data.programmeTemplateName" |
|
|
|
placeholder="请选择检验模板" |
|
|
|
disabled |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="动态修改规则" prop="dynamicUpdateCode"> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="data.dynamicUpdateCode" |
|
|
|
placeholder="请选择动态修改规则" |
|
|
|
@blur="onBlur('dynamicUpdate', DynamicRuleApi.getDynamicRulePage)" |
|
|
|
@focus="onFocus" |
|
|
|
/> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
@ -157,6 +162,17 @@ |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="动态修改规则描述" prop="dynamicUpdateName"> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="data.dynamicUpdateName" |
|
|
|
placeholder="请选择动态修改规则描述" |
|
|
|
disabled |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<!-- <el-col :span="12"> |
|
|
|
<el-form-item label="拆分规则" prop="splitRule"> |
|
|
|
<el-select v-model="data.splitRule" placeholder="请选择拆分规则"> |
|
|
@ -344,9 +360,16 @@ |
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodName" |
|
|
|
disabled |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodCode" |
|
|
|
placeholder="请选择检验方法" |
|
|
|
@blur=" |
|
|
|
onBlur( |
|
|
|
'inspectionMethod', |
|
|
|
InspectionMethodApi.getInspectionMethodPage, |
|
|
|
item |
|
|
|
) |
|
|
|
" |
|
|
|
@focus="onFocus" |
|
|
|
/> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
@ -376,6 +399,20 @@ |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="检验方法描述" |
|
|
|
prop="inspectionCharacteristicsBaseVO.inspectionMethodName" |
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodName" |
|
|
|
disabled |
|
|
|
placeholder="请选择检验方法" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="采样过程" |
|
|
@ -383,9 +420,12 @@ |
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.samplingProcessName" |
|
|
|
disabled |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.samplingProcessCode" |
|
|
|
placeholder="请选择采样过程" |
|
|
|
@blur=" |
|
|
|
onBlur('samplingProcess', SamplingProcessApi.getSamplingProcessPage, item) |
|
|
|
" |
|
|
|
@focus="onFocus" |
|
|
|
/> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
@ -415,6 +455,20 @@ |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="采样过程描述" |
|
|
|
prop="inspectionCharacteristicsBaseVO.inspectionMethodName" |
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodName" |
|
|
|
disabled |
|
|
|
placeholder="请选择采样过程描述" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="是否允许修改特征值" |
|
|
@ -586,8 +640,9 @@ |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode" |
|
|
|
disabled |
|
|
|
placeholder="请选择选定集" |
|
|
|
@blur="onBlur('quantifyQuantify', SelectedSetApi.getSelectedSetPage, item)" |
|
|
|
@focus="onFocus" |
|
|
|
/> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
@ -618,13 +673,27 @@ |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 1"> |
|
|
|
<el-form-item |
|
|
|
label="选定集描述" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyQuantifyName" |
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyQuantifyName" |
|
|
|
disabled |
|
|
|
placeholder="请选择选定集描述" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
</div> |
|
|
|
<template #footer> |
|
|
|
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" /> |
|
|
|
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" :key="count" /> |
|
|
|
</template> |
|
|
|
</Dialog> |
|
|
|
<Dialog |
|
|
@ -820,12 +889,12 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
if (row) { |
|
|
|
data.value = JSON.parse(JSON.stringify(row)) |
|
|
|
// 如果点击复制进入 |
|
|
|
if(formType.value == 'create'){ |
|
|
|
if (formType.value == 'create') { |
|
|
|
data.value.id = '' |
|
|
|
data.value.code = '' |
|
|
|
data.value.itemCode = '' |
|
|
|
data.value.process= [] |
|
|
|
let list =[] |
|
|
|
data.value.process = [] |
|
|
|
let list = [] |
|
|
|
if (row.content) { |
|
|
|
list = JSON.parse(row.content) |
|
|
|
} else { |
|
|
@ -835,33 +904,33 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
let arr = [] |
|
|
|
list.forEach((item, index) => { |
|
|
|
let obj = { |
|
|
|
inspectionCode:item.inspectionCode, |
|
|
|
description:item.description, |
|
|
|
inspectionCharCode:item.inspectionCharCode, |
|
|
|
sequenceCode:item.sequenceCode, |
|
|
|
name :String(index + 1), |
|
|
|
inspectionCharacteristicsBaseVO:{ |
|
|
|
description:item.inspectionCharacteristicsBaseVO.description, |
|
|
|
featureType:item.inspectionCharacteristicsBaseVO.featureType, |
|
|
|
inspectionMethodCode:item.inspectionCharacteristicsBaseVO.inspectionMethodCode, |
|
|
|
inspectionMethodName:item.inspectionCharacteristicsBaseVO.inspectionMethodName, |
|
|
|
samplingProcessCode:item.inspectionCharacteristicsBaseVO.samplingProcessCode, |
|
|
|
inspectionCode: item.inspectionCode, |
|
|
|
description: item.description, |
|
|
|
inspectionCharCode: item.inspectionCharCode, |
|
|
|
sequenceCode: item.sequenceCode, |
|
|
|
name: String(index + 1), |
|
|
|
inspectionCharacteristicsBaseVO: { |
|
|
|
description: item.inspectionCharacteristicsBaseVO.description, |
|
|
|
featureType: item.inspectionCharacteristicsBaseVO.featureType, |
|
|
|
inspectionMethodCode: item.inspectionCharacteristicsBaseVO.inspectionMethodCode, |
|
|
|
inspectionMethodName: item.inspectionCharacteristicsBaseVO.inspectionMethodName, |
|
|
|
samplingProcessCode: item.inspectionCharacteristicsBaseVO.samplingProcessCode, |
|
|
|
|
|
|
|
isCanUpdate:item.inspectionCharacteristicsBaseVO.isCanUpdate, |
|
|
|
isDestructionInspection:item.inspectionCharacteristicsBaseVO.isDestructionInspection, |
|
|
|
quantifyCapping:item.inspectionCharacteristicsBaseVO.quantifyCapping, |
|
|
|
quantifyDecimal:item.inspectionCharacteristicsBaseVO.quantifyDecimal, |
|
|
|
quantifyIsCapping:item.inspectionCharacteristicsBaseVO.quantifyIsCapping, |
|
|
|
quantifyIsLowlimit:item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit, |
|
|
|
quantifyIsTarget:item.inspectionCharacteristicsBaseVO.quantifyIsTarget, |
|
|
|
quantifyLowlimit:item.inspectionCharacteristicsBaseVO.quantifyLowlimit, |
|
|
|
quantifyQuantifyCode:item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode, |
|
|
|
quantifyQuantifyName:item.inspectionCharacteristicsBaseVO.quantifyQuantifyName, |
|
|
|
quantifyTarget:item.inspectionCharacteristicsBaseVO.quantifyTarget, |
|
|
|
quantifyUom:item.inspectionCharacteristicsBaseVO.quantifyUom, |
|
|
|
resultEntryMethod:item.inspectionCharacteristicsBaseVO.resultEntryMethod, |
|
|
|
samplingProcessCode:item.inspectionCharacteristicsBaseVO.samplingProcessCode, |
|
|
|
samplingProcessName:item.inspectionCharacteristicsBaseVO.samplingProcessName, |
|
|
|
isCanUpdate: item.inspectionCharacteristicsBaseVO.isCanUpdate, |
|
|
|
isDestructionInspection: item.inspectionCharacteristicsBaseVO.isDestructionInspection, |
|
|
|
quantifyCapping: item.inspectionCharacteristicsBaseVO.quantifyCapping, |
|
|
|
quantifyDecimal: item.inspectionCharacteristicsBaseVO.quantifyDecimal, |
|
|
|
quantifyIsCapping: item.inspectionCharacteristicsBaseVO.quantifyIsCapping, |
|
|
|
quantifyIsLowlimit: item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit, |
|
|
|
quantifyIsTarget: item.inspectionCharacteristicsBaseVO.quantifyIsTarget, |
|
|
|
quantifyLowlimit: item.inspectionCharacteristicsBaseVO.quantifyLowlimit, |
|
|
|
quantifyQuantifyCode: item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode, |
|
|
|
quantifyQuantifyName: item.inspectionCharacteristicsBaseVO.quantifyQuantifyName, |
|
|
|
quantifyTarget: item.inspectionCharacteristicsBaseVO.quantifyTarget, |
|
|
|
quantifyUom: item.inspectionCharacteristicsBaseVO.quantifyUom, |
|
|
|
resultEntryMethod: item.inspectionCharacteristicsBaseVO.resultEntryMethod, |
|
|
|
samplingProcessCode: item.inspectionCharacteristicsBaseVO.samplingProcessCode, |
|
|
|
samplingProcessName: item.inspectionCharacteristicsBaseVO.samplingProcessName |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -885,7 +954,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
}) |
|
|
|
data.value.process = arr |
|
|
|
console.log(111, data.value) |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
let list = [] |
|
|
|
if (row.content) { |
|
|
|
list = JSON.parse(row.content) |
|
|
@ -925,9 +994,6 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
} |
|
|
|
data.value.process = list |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
data.value = { |
|
|
|
code: '', |
|
|
@ -1382,6 +1448,59 @@ const changeIsTarget = (e, item) => { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
|
} |
|
|
|
} |
|
|
|
//失去焦点 |
|
|
|
const onBlur = async (field, pageApi, item) => { |
|
|
|
const dataObj = item ? item.inspectionCharacteristicsBaseVO : data.value |
|
|
|
if (dataObj[field + 'Code']) { |
|
|
|
const _searchCondition = {} |
|
|
|
const filters: any[] = [] |
|
|
|
filters.push( |
|
|
|
{ |
|
|
|
action: '==', |
|
|
|
column: 'available', |
|
|
|
value: 'TRUE' |
|
|
|
}, |
|
|
|
{ |
|
|
|
column: 'code', |
|
|
|
action: '==', |
|
|
|
value: dataObj[field + 'Code']?.trim() |
|
|
|
} |
|
|
|
) |
|
|
|
// 参数整理 |
|
|
|
_searchCondition.isSearch = true |
|
|
|
_searchCondition.filters = filters |
|
|
|
const array = await pageApi(_searchCondition) |
|
|
|
Butttondata = [ |
|
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
count.value++ |
|
|
|
const obj = array.list[0] |
|
|
|
if (obj) { |
|
|
|
dataObj[field + 'Name'] = obj.description |
|
|
|
} else { |
|
|
|
message.alert('暂无数据') |
|
|
|
dataObj[field + 'Code'] = '' |
|
|
|
dataObj[field + 'Name'] = '' |
|
|
|
} |
|
|
|
} else { |
|
|
|
dataObj[field + 'Name'] = '' |
|
|
|
Butttondata = [ |
|
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
count.value++ |
|
|
|
} |
|
|
|
} |
|
|
|
const count = ref(0) |
|
|
|
// 聚焦的时候不可以保存 |
|
|
|
const onFocus = () => { |
|
|
|
Butttondata = [ |
|
|
|
defaultButtons.formSaveBtn({ disabled: true }), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
count.value++ |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
.small-title { |
|
|
|