|
|
@ -16,7 +16,6 @@ |
|
|
|
:rules="rules" |
|
|
|
:schema="formSchema" |
|
|
|
:is-col="true" |
|
|
|
:disabled="true" |
|
|
|
@opensearchTable="opensearchTable" |
|
|
|
/> |
|
|
|
<el-tabs |
|
|
@ -29,7 +28,7 @@ |
|
|
|
:stretch="false" |
|
|
|
> |
|
|
|
<el-tab-pane |
|
|
|
v-for="item in data.process" |
|
|
|
v-for="item in data.subList" |
|
|
|
:key="item.name" |
|
|
|
:label="item.processCode" |
|
|
|
:name="item.name" |
|
|
@ -78,141 +77,66 @@ |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="编码"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.number" |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.number" |
|
|
|
placeholder="根据系统生成" |
|
|
|
:disabled="true" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="描述" prop="inspectionCharacteristicsBaseVO.description"> |
|
|
|
<el-input v-model="item.inspectionCharacteristicsBaseVO.description" :disabled="true" /> |
|
|
|
<el-form-item label="描述" prop="inspectionJobCharacteristicsUpdateReqVO.description"> |
|
|
|
<el-input v-model="item.inspectionJobCharacteristicsUpdateReqVO.description" :disabled="true" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="检验方法" |
|
|
|
prop="inspectionCharacteristicsBaseVO.inspectionMethodCode" |
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode" |
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.inspectionMethodName" |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName" |
|
|
|
disabled |
|
|
|
placeholder="请选择检验方法" |
|
|
|
/> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
|
plain |
|
|
|
style="width: 40px" |
|
|
|
@click=" |
|
|
|
opensearchTable( |
|
|
|
'inspectionMethodCode', |
|
|
|
null, |
|
|
|
'检验方法', |
|
|
|
InspectionMethod.allSchemas, |
|
|
|
InspectionMethodApi.getInspectionMethodPage, |
|
|
|
[ |
|
|
|
{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
} |
|
|
|
], |
|
|
|
false, |
|
|
|
'features', |
|
|
|
item |
|
|
|
) |
|
|
|
" |
|
|
|
><Icon icon="ep:search" |
|
|
|
/></el-button> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="采样过程编码" |
|
|
|
prop="inspectionCharacteristicsBaseVO.inspectionMethod" |
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionMethod" |
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.inspectionName" |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionName" |
|
|
|
disabled |
|
|
|
placeholder="请选择采样过程编码" |
|
|
|
/> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
|
plain |
|
|
|
style="width: 40px" |
|
|
|
@click=" |
|
|
|
opensearchTable( |
|
|
|
'inspectionMethod', |
|
|
|
null, |
|
|
|
'采样过程编码', |
|
|
|
SamplingProcess.allSchemas, |
|
|
|
SamplingProcessApi.getSamplingProcessPage, |
|
|
|
[ |
|
|
|
{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
} |
|
|
|
], |
|
|
|
false, |
|
|
|
'features', |
|
|
|
item |
|
|
|
) |
|
|
|
" |
|
|
|
><Icon icon="ep:search" |
|
|
|
/></el-button> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="动态修改规则编码" |
|
|
|
prop="inspectionCharacteristicsBaseVO.dynamicUpdateCode" |
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateCode" |
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.dynamicUpdateName" |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateName" |
|
|
|
disabled |
|
|
|
placeholder="请选择动态修改规则编码" |
|
|
|
/> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
|
plain |
|
|
|
style="width: 40px" |
|
|
|
@click=" |
|
|
|
opensearchTable( |
|
|
|
'dynamicUpdateCode', |
|
|
|
null, |
|
|
|
'动态修改规则编码', |
|
|
|
DynamicRule.allSchemas, |
|
|
|
DynamicRuleApi.getDynamicRulePage, |
|
|
|
[ |
|
|
|
{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
} |
|
|
|
], |
|
|
|
false, |
|
|
|
'features', |
|
|
|
item |
|
|
|
) |
|
|
|
" |
|
|
|
><Icon icon="ep:search" |
|
|
|
/></el-button> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="是否允许修改特征值" |
|
|
|
prop="inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.isCanUpdate" |
|
|
|
> |
|
|
|
<el-switch |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.isCanUpdate" |
|
|
|
disabled |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
@ -220,11 +144,13 @@ |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="结果录入方式" |
|
|
|
prop="inspectionCharacteristicsBaseVO.resultEntryMethod" |
|
|
|
prop="inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod" |
|
|
|
> |
|
|
|
<el-select |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.resultEntryMethod" |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod" |
|
|
|
placeholder="请选择结果录入方式" |
|
|
|
@change="resultEntryMethodChange($event,item)" |
|
|
|
disabled |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="dict in getStrDictOptions( |
|
|
@ -238,18 +164,14 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="特征类型" prop="inspectionCharacteristicsBaseVO.featureType"> |
|
|
|
<!-- <el-input v-model="item.featureType" /> --> |
|
|
|
<el-form-item label="特征类型" prop="inspectionJobCharacteristicsUpdateReqVO.featureType"> |
|
|
|
<el-select |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.featureType" |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.featureType" |
|
|
|
placeholder="请选择特征类型" |
|
|
|
@change="changeFeatureType" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
disabled |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="dict in getStrDictOptions( |
|
|
|
DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE |
|
|
|
)" |
|
|
|
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE )" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
@ -257,146 +179,66 @@ |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="24" style="border: 1px solid #dedede ;border-radius: 4px ;padding-top: 16px;margin-bottom: 10px" v-for="(cur,key) in item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList" :key="key"> |
|
|
|
<el-row> |
|
|
|
<!-- 汇总录入的时候显示 --> |
|
|
|
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"> |
|
|
|
<el-form-item label="合格数量" prop="inspectionJobCharacteristicsUpdateReqVO.featureType"> |
|
|
|
<el-input v-model="cur.qualifiedQuantity" placeholder="请输入合格数量"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"> |
|
|
|
<el-form-item label="不合格数量"> |
|
|
|
<el-input v-model="cur.unqualifiedQuantity" placeholder="请输入不合格数量"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<!-- 手动评估的时候显示 --> |
|
|
|
<el-col :span="12" v-if="item.samplingProcessRespVO.evaluationMode == 1"> |
|
|
|
<el-form-item label="评估代码"> |
|
|
|
<el-select |
|
|
|
v-model="cur.estimateCode" |
|
|
|
placeholder="请选择评估代码" |
|
|
|
@change="changeFeatureType"> |
|
|
|
<el-option v-for="dict in getStrDictOptions( DICT_TYPE.EVALUATION_CODE )" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0"> |
|
|
|
<el-form-item label="检验值" prop="inspectionValue"> |
|
|
|
<el-input v-model="cur.inspectionValue" placeholder="请输入检验值"/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1"> |
|
|
|
<el-form-item label="选定集" prop="qualitativeCode"> |
|
|
|
<el-select |
|
|
|
v-model="cur.qualitativeCode" |
|
|
|
placeholder="请选择选定集" |
|
|
|
@change="changeQualitativeCode($event,item,cur)"> |
|
|
|
<el-option v-for="dict in item.selectedProjectRespVOList" |
|
|
|
:key="dict.dictionaryValue" |
|
|
|
:label="dict.dictionaryLabel" |
|
|
|
:value="dict.dictionaryValue"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="12" v-if="item.inspectionCharacteristicsBaseVO.featureType == 0"> |
|
|
|
<el-form-item |
|
|
|
label="是否设定上限" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|
|
|
> |
|
|
|
<el-switch |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsCapping" |
|
|
|
@change="changeIsCapping" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="上限值" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyCapping" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyCapping" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsLowlimit" |
|
|
|
label="是否设定下限" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
> |
|
|
|
<el-switch |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit" |
|
|
|
@change="changeLowlimit" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="下限值" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyLowlimit" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyLowlimit" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyIsTarget" |
|
|
|
label="是否设定目标值" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
> |
|
|
|
<el-switch |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyIsTarget" |
|
|
|
@change="changeIsTarget" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="目标值" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyTarget" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyTarget" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="计量单位" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyUom" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyUom" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="小数位" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyDecimal" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 0" |
|
|
|
> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyDecimal" |
|
|
|
:disabled="!item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="选择集编码" |
|
|
|
prop="inspectionCharacteristicsBaseVO.quantifyQuantifyCode" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.featureType == 1" |
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionCharacteristicsBaseVO.quantifyQuantifyCode" |
|
|
|
disabled |
|
|
|
placeholder="请选择选择集编码" |
|
|
|
/> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
|
plain |
|
|
|
style="width: 40px" |
|
|
|
@click=" |
|
|
|
opensearchTable( |
|
|
|
'quantifyQuantifyCode', |
|
|
|
null, |
|
|
|
'选择集编码', |
|
|
|
SelectedSet.allSchemas, |
|
|
|
SelectedSetApi.getSelectedSetPage, |
|
|
|
[ |
|
|
|
{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
} |
|
|
|
], |
|
|
|
false, |
|
|
|
null, |
|
|
|
item |
|
|
|
) |
|
|
|
" |
|
|
|
v-if="item.inspectionCharacteristicsBaseVO.isCanUpdate" |
|
|
|
><Icon icon="ep:search" |
|
|
|
/></el-button> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
<el-col :span="12" v-if="item.samplingProcessRespVO.evaluationMode == 1"> |
|
|
|
<el-form-item label="缺陷级别"> |
|
|
|
<el-select |
|
|
|
v-model="cur.defectLevel" |
|
|
|
placeholder="请选择缺陷级别" |
|
|
|
disabled> |
|
|
|
<el-option v-for="dict in getStrDictOptions(DICT_TYPE.DEFECT_LEVEL)" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
@ -519,7 +361,7 @@ const data = ref({ |
|
|
|
effectiveDate: '', |
|
|
|
expirationDate: '', |
|
|
|
available: 'TRUE', |
|
|
|
process: [] |
|
|
|
subList: [] |
|
|
|
}) |
|
|
|
|
|
|
|
const dialogVisibleName = ref(false) |
|
|
@ -534,40 +376,40 @@ if (props.basicFormWidth) { |
|
|
|
} |
|
|
|
const rules = ref({ |
|
|
|
...props.rules, |
|
|
|
'inspectionCharacteristicsBaseVO.description': [ |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.description': [ |
|
|
|
{ required: true, message: '请填写描述', trigger: ['blur', 'change'] } |
|
|
|
], |
|
|
|
'inspectionCharacteristicsBaseVO.inspectionMethodCode': [ |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode': [ |
|
|
|
{ required: true, message: '请选择检验方法编码', trigger: 'blur' } |
|
|
|
], |
|
|
|
'inspectionCharacteristicsBaseVO.dynamicUpdateCode': [ |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateCode': [ |
|
|
|
{ required: true, message: '请选择采样过程编码', trigger: ['blur', 'change'] } |
|
|
|
], |
|
|
|
'inspectionCharacteristicsBaseVO.inspectionMethod': [ |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.inspectionMethod': [ |
|
|
|
{ required: true, message: '请选择动态修改规则编码', trigger: ['blur', 'change'] } |
|
|
|
], |
|
|
|
'inspectionCharacteristicsBaseVO.resultEntryMethod': [ |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod': [ |
|
|
|
{ required: true, message: '请选择结果录入方式', trigger: ['blur', 'change'] } |
|
|
|
], |
|
|
|
'inspectionCharacteristicsBaseVO.featureType': [ |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.featureType': [ |
|
|
|
{ required: true, message: '请选择特征类型', trigger: ['blur', 'change'] } |
|
|
|
], |
|
|
|
'inspectionCharacteristicsBaseVO.quantifyTarget': [ |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.quantifyTarget': [ |
|
|
|
{ required: true, message: '请输入目标值', trigger: 'blur' } |
|
|
|
], |
|
|
|
'inspectionCharacteristicsBaseVO.quantifyCapping': [ |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.quantifyCapping': [ |
|
|
|
{ required: true, message: '请输入上限值', trigger: 'blur' } |
|
|
|
], |
|
|
|
'inspectionCharacteristicsBaseVO.quantifyLowlimit': [ |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit': [ |
|
|
|
{ required: true, message: '请输入下限值', trigger: 'blur' } |
|
|
|
], |
|
|
|
'inspectionCharacteristicsBaseVO.quantifyUom': [ |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.quantifyUom': [ |
|
|
|
{ required: true, message: '请选择计量单位', trigger: 'blur' } |
|
|
|
], |
|
|
|
'inspectionCharacteristicsBaseVO.quantifyDecimal': [ |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.quantifyDecimal': [ |
|
|
|
{ required: true, message: '请输入小数位', trigger: 'blur' } |
|
|
|
], |
|
|
|
'inspectionCharacteristicsBaseVO.quantifyQuantifyCode': [ |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.quantifyQuantifyCode': [ |
|
|
|
{ required: true, message: '请输入选择集编码', trigger: 'blur' } |
|
|
|
] |
|
|
|
}) |
|
|
@ -583,40 +425,40 @@ const rules = ref({ |
|
|
|
// inspectionLevel: [{ required: true, message: '请选择检验水平', trigger: ['blur', 'change'] }], |
|
|
|
// effectiveDate: [{ required: true, message: '请选择生效时间', trigger: ['blur', 'change'] }], |
|
|
|
// expirationDate: [{ required: true, message: '请选择失效时间', trigger: ['blur', 'change'] }], |
|
|
|
// 'inspectionCharacteristicsBaseVO.description': [ |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.description': [ |
|
|
|
// { required: true, message: '请填写描述', trigger: ['blur', 'change'] } |
|
|
|
// ], |
|
|
|
// 'inspectionCharacteristicsBaseVO.inspectionMethodCode': [ |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode': [ |
|
|
|
// { required: true, message: '请选择检验方法编码', trigger: 'blur' } |
|
|
|
// ], |
|
|
|
// 'inspectionCharacteristicsBaseVO.dynamicUpdateCode': [ |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateCode': [ |
|
|
|
// { required: true, message: '请选择采样过程编码', trigger: ['blur', 'change'] } |
|
|
|
// ], |
|
|
|
// 'inspectionCharacteristicsBaseVO.inspectionMethod': [ |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.inspectionMethod': [ |
|
|
|
// { required: true, message: '请选择动态修改规则编码', trigger: ['blur', 'change'] } |
|
|
|
// ], |
|
|
|
// 'inspectionCharacteristicsBaseVO.resultEntryMethod': [ |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod': [ |
|
|
|
// { required: true, message: '请选择结果录入方式', trigger: ['blur', 'change'] } |
|
|
|
// ], |
|
|
|
// 'inspectionCharacteristicsBaseVO.featureType': [ |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.featureType': [ |
|
|
|
// { required: true, message: '请选择特征类型', trigger: ['blur', 'change'] } |
|
|
|
// ], |
|
|
|
// 'inspectionCharacteristicsBaseVO.quantifyTarget': [ |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.quantifyTarget': [ |
|
|
|
// { required: true, message: '请输入目标值', trigger: 'blur' } |
|
|
|
// ], |
|
|
|
// 'inspectionCharacteristicsBaseVO.quantifyCapping': [ |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.quantifyCapping': [ |
|
|
|
// { required: true, message: '请输入上限值', trigger: 'blur' } |
|
|
|
// ], |
|
|
|
// 'inspectionCharacteristicsBaseVO.quantifyLowlimit': [ |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit': [ |
|
|
|
// { required: true, message: '请输入下限值', trigger: 'blur' } |
|
|
|
// ], |
|
|
|
// 'inspectionCharacteristicsBaseVO.quantifyUom': [ |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.quantifyUom': [ |
|
|
|
// { required: true, message: '请选择计量单位', trigger: 'blur' } |
|
|
|
// ], |
|
|
|
// 'inspectionCharacteristicsBaseVO.quantifyDecimal': [ |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.quantifyDecimal': [ |
|
|
|
// { required: true, message: '请输入小数位', trigger: 'blur' } |
|
|
|
// ], |
|
|
|
// 'inspectionCharacteristicsBaseVO.quantifyQuantifyCode': [ |
|
|
|
// 'inspectionJobCharacteristicsUpdateReqVO.quantifyQuantifyCode': [ |
|
|
|
// { required: true, message: '请输入选择集编码', trigger: 'blur' } |
|
|
|
// ] |
|
|
|
// }) |
|
|
@ -633,37 +475,56 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
formType.value = type |
|
|
|
if (row) { |
|
|
|
data.value = JSON.parse(JSON.stringify(row)) |
|
|
|
console.log(data.value) |
|
|
|
let list = [] |
|
|
|
list = await InspectionJobDetailPageApi.getInspectionJobDetailList(row.id) |
|
|
|
// if (row.inspectionSchemeJson) { |
|
|
|
// list = JSON.parse(JSON.parse(row.inspectionSchemeJson)) |
|
|
|
// } else { |
|
|
|
// list = await InspectionJobDetailPageApi.getListByTempleteCode(row.programmeTemplateCode) |
|
|
|
// } |
|
|
|
console.log(list) |
|
|
|
console.log(typeof list) |
|
|
|
list.forEach((item, index) => { |
|
|
|
editableTabsValue.value = index + 1 |
|
|
|
item.name = index + 1 |
|
|
|
item.inspectionCharacteristicsBaseVO = item.inspectionJobCharacteristicsRespVO |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO = item.inspectionJobCharacteristicsRespVO |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[] |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod==0) { |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
|
for(let i=0;i<data.value.sampleTotalAmount;i++){ |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ |
|
|
|
inspectionValue:'',//检验值 |
|
|
|
qualitativeCode:'',//定性字典项值 |
|
|
|
estimateCode:'',//评估代码 |
|
|
|
defectLevel:'',//缺陷级别 |
|
|
|
qualifiedQuantity:'',//合格数量 |
|
|
|
unqualifiedQuantity:'',//不合格数量 |
|
|
|
}) |
|
|
|
} |
|
|
|
} else { |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[{ |
|
|
|
inspectionValue:'',//检验值 |
|
|
|
qualitativeCode:'',//定性字典项值 |
|
|
|
estimateCode:'',//评估代码 |
|
|
|
defectLevel:'',//缺陷级别 |
|
|
|
qualifiedQuantity:'',//合格数量 |
|
|
|
unqualifiedQuantity:'',//不合格数量 |
|
|
|
}] |
|
|
|
} |
|
|
|
// 编辑判断上限下限目标值是否必填 |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsCapping) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping) { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false |
|
|
|
} |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit) { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = false |
|
|
|
} |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget) { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyTarget'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyTarget'][0].required = false |
|
|
|
} |
|
|
|
}) |
|
|
|
data.value.process = list |
|
|
|
data.value.subList = list |
|
|
|
formMainRef.value.setValues(row) |
|
|
|
} else { |
|
|
|
data.value = { |
|
|
@ -678,11 +539,11 @@ console.log(typeof list) |
|
|
|
effectiveDate: '', |
|
|
|
expirationDate: '', |
|
|
|
available: 'TRUE', |
|
|
|
process: [] |
|
|
|
subList: [] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
tabIndex = data.value.process.length + 1 |
|
|
|
tabIndex = data.value.subList.length + 1 |
|
|
|
} |
|
|
|
defineExpose({ open, dialogVisible, formLoading }) // 提供 open 方法,用于打开弹窗 |
|
|
|
import type { TabPaneName } from 'element-plus' |
|
|
@ -695,7 +556,7 @@ const handleTabsEdit = (targetName: TabPaneName | undefined, action: 'remove' | |
|
|
|
nameForm.value.name = '' |
|
|
|
dialogVisibleName.value = true |
|
|
|
} else if (action === 'remove') { |
|
|
|
const tabs = data.value.process |
|
|
|
const tabs = data.value.subList |
|
|
|
let activeName = editableTabsValue.value |
|
|
|
if (activeName === targetName) { |
|
|
|
tabs.forEach((tab, index) => { |
|
|
@ -708,7 +569,7 @@ const handleTabsEdit = (targetName: TabPaneName | undefined, action: 'remove' | |
|
|
|
}) |
|
|
|
} |
|
|
|
editableTabsValue.value = activeName |
|
|
|
data.value.process = tabs.filter((tab) => tab.name !== targetName) |
|
|
|
data.value.subList = tabs.filter((tab) => tab.name !== targetName) |
|
|
|
} |
|
|
|
} |
|
|
|
/** 修改名称时间 */ |
|
|
@ -719,13 +580,13 @@ const buttonBaseClick1 = (val) => { |
|
|
|
nameRef.value.validate((valid, fields) => { |
|
|
|
if (valid) { |
|
|
|
const newTabName = `${++tabIndex}` |
|
|
|
data.value.process.push({ |
|
|
|
data.value.subList.push({ |
|
|
|
description: nameForm.value.name, |
|
|
|
name: newTabName, |
|
|
|
inspectionCode: '', |
|
|
|
sequenceCode: '', |
|
|
|
inspectionCharCode: '', |
|
|
|
inspectionJobCharacteristicsRespVO: { |
|
|
|
inspectionJobCharacteristicsUpdateReqVO: { |
|
|
|
describe: '', |
|
|
|
inspectionMethodCode: '', |
|
|
|
dynamicUpdateCode: '', |
|
|
@ -745,7 +606,7 @@ const buttonBaseClick1 = (val) => { |
|
|
|
quantifyQuantifyCode: '' |
|
|
|
} |
|
|
|
}) |
|
|
|
console.log(data.value.process) |
|
|
|
console.log(data.value.subList) |
|
|
|
|
|
|
|
editableTabsValue.value = newTabName |
|
|
|
dialogVisibleName.value = false |
|
|
@ -787,36 +648,36 @@ const validateForm = (formRef) => { |
|
|
|
const submitForm = async () => { |
|
|
|
try { |
|
|
|
const validateForm1 = await validateForm(formProcessRef.value) |
|
|
|
console.log(validateForm1) |
|
|
|
await formMainRef.value.validate() |
|
|
|
if (!data.value.process || data.value.process.length == 0) { |
|
|
|
message.error(`请添加工序`) |
|
|
|
return |
|
|
|
} |
|
|
|
const bol1 = await validateForm(formProcessRef.value) |
|
|
|
const bol2 = await validateForm(formFeaturesRef.value) |
|
|
|
if (!bol1 || !bol2) { |
|
|
|
message.error(`模板中有检验工序和检验特性未填写完全`) |
|
|
|
return |
|
|
|
} |
|
|
|
const arr = data.value.process.filter( |
|
|
|
(item) => |
|
|
|
!item.inspectionCharacteristicsBaseVO.quantifyIsCapping && |
|
|
|
!item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit && |
|
|
|
!item.inspectionCharacteristicsBaseVO.quantifyIsTarget && |
|
|
|
item.inspectionCharacteristicsBaseVO.featureType == 0 |
|
|
|
) |
|
|
|
console.log(arr) |
|
|
|
if (arr && arr.length > 0) { |
|
|
|
const str = arr.map((item) => item.description).join(',') |
|
|
|
message.error(`${str}是否设定上线,是否设定下限,是否是定目标值至少一项为是`) |
|
|
|
return |
|
|
|
} |
|
|
|
// console.log(validateForm1) |
|
|
|
// await formMainRef.value.validate() |
|
|
|
// if (!data.value.process || data.value.process.length == 0) { |
|
|
|
// message.error(`请添加工序`) |
|
|
|
// return |
|
|
|
// } |
|
|
|
// const bol1 = await validateForm(formProcessRef.value) |
|
|
|
// const bol2 = await validateForm(formFeaturesRef.value) |
|
|
|
// if (!bol1 || !bol2) { |
|
|
|
// message.error(`模板中有检验工序和检验特性未填写完全`) |
|
|
|
// return |
|
|
|
// } |
|
|
|
// const arr = data.value.process.filter( |
|
|
|
// (item) => |
|
|
|
// !item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping && |
|
|
|
// !item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit && |
|
|
|
// !item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget && |
|
|
|
// item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 |
|
|
|
// ) |
|
|
|
// console.log(arr) |
|
|
|
// if (arr && arr.length > 0) { |
|
|
|
// const str = arr.map((item) => item.description).join(',') |
|
|
|
// message.error(`${str}是否设定上线,是否设定下限,是否是定目标值至少一项为是`) |
|
|
|
// return |
|
|
|
// } |
|
|
|
if (formType.value == 'create') { |
|
|
|
// 主子表——提交请求 |
|
|
|
emit('submitForm', formType.value, data.value) |
|
|
|
} else { |
|
|
|
// 编辑 |
|
|
|
// 编辑/执行 |
|
|
|
emit('submitForm', formType.value, data.value) |
|
|
|
} |
|
|
|
} catch { |
|
|
@ -837,9 +698,9 @@ if (props.footButttondata) { |
|
|
|
const changeFeatureType = (e) => { |
|
|
|
console.log(e) |
|
|
|
// if (e) { |
|
|
|
// rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = true |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyQuantifyCode'][0].required = true |
|
|
|
// } else { |
|
|
|
// rules.value['inspectionCharacteristicsBaseVO.quantifyQuantifyCode'][0].required = false |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyQuantifyCode'][0].required = false |
|
|
|
// } |
|
|
|
} |
|
|
|
const searchTableRef = ref() |
|
|
@ -921,13 +782,13 @@ const opensearchTable = ( |
|
|
|
// val : 弹层列表row 数据 |
|
|
|
const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
|
if(type == 'features'){ |
|
|
|
row.inspectionCharacteristicsBaseVO[formField] = val[0].code |
|
|
|
row.inspectionJobCharacteristicsUpdateReqVO[formField] = val[0].code |
|
|
|
if(formField == 'inspectionMethodCode'){ |
|
|
|
row.inspectionCharacteristicsBaseVO.inspectionMethodName = val[0].description |
|
|
|
row.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName = val[0].description |
|
|
|
}else if(formField == 'dynamicUpdateCode'){ |
|
|
|
row.inspectionCharacteristicsBaseVO.dynamicUpdateName = val[0].description |
|
|
|
row.inspectionJobCharacteristicsUpdateReqVO.dynamicUpdateName = val[0].description |
|
|
|
}else if(formField == 'inspectionMethod'){ |
|
|
|
row.inspectionCharacteristicsBaseVO.inspectionName = val[0].description |
|
|
|
row.inspectionJobCharacteristicsUpdateReqVO.inspectionName = val[0].description |
|
|
|
} |
|
|
|
} else if(type == 'main'){ |
|
|
|
data.value[formField] = val[0].code |
|
|
@ -944,51 +805,61 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
|
editableTabsValue.value = index + 1 |
|
|
|
item.name = index + 1 |
|
|
|
// 编辑判断上限下限目标值是否必填 |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsCapping) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping) { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false |
|
|
|
} |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsLowlimit) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit) { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = false |
|
|
|
} |
|
|
|
if (item.inspectionCharacteristicsBaseVO.quantifyIsTarget) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget) { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyTarget'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyTarget'][0].required = false |
|
|
|
} |
|
|
|
}) |
|
|
|
data.value.process = list |
|
|
|
data.value.subList = list |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// emit('searchTableSuccess', formField, searchField, val, formRef.value, type, row) |
|
|
|
} |
|
|
|
// 选择是否设定上限值 |
|
|
|
const changeIsCapping = (e) => { |
|
|
|
if (e) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyCapping'][0].required = false |
|
|
|
} |
|
|
|
} |
|
|
|
// 选择是否设定下限值 |
|
|
|
const changeLowlimit = (e) => { |
|
|
|
if (e) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = true |
|
|
|
// 请选择结果录入方式 |
|
|
|
const resultEntryMethodChange = (e,item) => { |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList =[] |
|
|
|
if (e==0) { |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
|
for(let i=0;i<data.value.sampleTotalAmount;i++){ |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ |
|
|
|
inspectionValue:'',//检验值 |
|
|
|
qualitativeCode:'',//定性字典项值 |
|
|
|
estimateCode:'',//评估代码 |
|
|
|
defectLevel:'',//缺陷级别 |
|
|
|
qualifiedQuantity:'',//合格数量 |
|
|
|
unqualifiedQuantity:'',//不合格数量 |
|
|
|
}) |
|
|
|
} |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyLowlimit'][0].required = false |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList=[{ |
|
|
|
inspectionValue:'',//检验值 |
|
|
|
qualitativeCode:'',//定性字典项值 |
|
|
|
estimateCode:'',//评估代码 |
|
|
|
defectLevel:'',//缺陷级别 |
|
|
|
qualifiedQuantity:'',//合格数量 |
|
|
|
unqualifiedQuantity:'',//不合格数量 |
|
|
|
}] |
|
|
|
} |
|
|
|
console.log(222,item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList) |
|
|
|
} |
|
|
|
// 选择是否设定目标值 |
|
|
|
const changeIsTarget = (e) => { |
|
|
|
if (e) { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false |
|
|
|
} |
|
|
|
// 选择选定级 |
|
|
|
const changeQualitativeCode= (e,item,cur)=>{ |
|
|
|
let obj = item.selectedProjectRespVOList.find(cur=>cur.dictionaryValue==e) |
|
|
|
console.log(obj) |
|
|
|
cur.defectLevel = obj.defectLevel |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|