Browse Source

检验记录样式

hella_online_20240829
zhang_li 4 months ago
parent
commit
241201e672
  1. 1031
      src/views/qms/inspectionJob/addForm.vue
  2. 1044
      src/views/qms/inspectionRecord/addForm.vue
  3. 671
      src/views/qms/inspectionRecordFirst/addForm.vue

1031
src/views/qms/inspectionJob/addForm.vue

File diff suppressed because it is too large

1044
src/views/qms/inspectionRecord/addForm.vue

File diff suppressed because it is too large

671
src/views/qms/inspectionRecordFirst/addForm.vue

@ -139,322 +139,353 @@
</span>
</template>
<div class="tabs-box">
<div class="small-title">检验工序</div>
<el-form :model="item" label-width="auto" :rules="rules" ref="formProcessRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码" prop="processCode">
<el-input
v-model="item.processCode"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验特性编号">
<el-input
v-model="item.inspectionFeatureCode"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="processDescribe">
<el-input v-model="item.processDescribe" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="顺序号" prop="sequenceCode">
<el-input v-model="item.sequenceCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="small-title">检验特性</div>
<el-form :model="item" label-width="auto" :rules="rules" ref="formFeaturesRef">
<div>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码">
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.number"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<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="inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode"
>
<div style="display: flex; width: 100%">
<el-collapse accordion>
<el-collapse-item name="1">
<template #title>
<div class="small-title">检验工序</div>
</template>
<el-form :model="item" label-width="auto" :rules="rules" ref="formProcessRef">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码" prop="processCode">
<el-input
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName
"
disabled
placeholder="请选择检验方法"
v-model="item.processCode"
placeholder="根据系统生成"
:disabled="true"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="采样过程编码"
prop="inspectionJobCharacteristicsUpdateReqVO.samplingProcessCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.samplingProcessName
"
disabled
placeholder="请选择采样过程编码"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="样品份数" prop="samplingProcessRespVO.sampleQty">
<div style="display: flex; width: 100%">
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="检验特性编号">
<el-input
v-model="item.samplingProcessRespVO.sampleQty"
disabled
placeholder="请输入样品份数"
v-model="item.inspectionFeatureCode"
placeholder="根据系统生成"
:disabled="true"
/>
</div>
</el-form-item>
</el-col>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="描述" prop="processDescribe">
<el-input v-model="item.processDescribe" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="顺序号" prop="sequenceCode">
<el-input v-model="item.sequenceCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-collapse-item>
<el-collapse-item name="2">
<template #title>
<div class="small-title">检验特性</div>
</template>
<el-form :model="item" label-width="auto" :rules="rules" ref="formFeaturesRef">
<div>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="编码">
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.number"
placeholder="根据系统生成"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<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="inspectionJobCharacteristicsUpdateReqVO.inspectionMethodCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName
"
disabled
placeholder="请选择检验方法"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="采样过程编码"
prop="inspectionJobCharacteristicsUpdateReqVO.samplingProcessCode"
>
<div style="display: flex; width: 100%">
<el-input
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.samplingProcessName
"
disabled
placeholder="请选择采样过程编码"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="样品份数" prop="samplingProcessRespVO.sampleQty">
<div style="display: flex; width: 100%">
<el-input
v-model="item.samplingProcessRespVO.sampleQty"
disabled
placeholder="请输入样品份数"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="每份样品量"
prop="inspectionJobCharacteristicsUpdateReqVO.samplePieceSize"
>
<div style="display: flex; width: 100%">
<el-input
v-model="data.samplePieceSize"
disabled
placeholder="请输入样品份数"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="是否允许修改特征值"
prop="inspectionJobCharacteristicsUpdateReqVO.isCanUpdate"
>
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.isCanUpdate"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="结果录入方式"
prop="inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod"
>
<el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod"
placeholder="请选择结果录入方式"
@change="resultEntryMethodChange($event, item)"
disabled
<el-col :span="12">
<el-form-item
label="每份样品量"
prop="inspectionJobCharacteristicsUpdateReqVO.samplePieceSize"
>
<div style="display: flex; width: 100%">
<el-input
v-model="data.samplePieceSize"
disabled
placeholder="请输入样品份数"
/>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="是否允许修改特征值"
prop="inspectionJobCharacteristicsUpdateReqVO.isCanUpdate"
>
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.isCanUpdate"
disabled
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="结果录入方式"
prop="inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod"
>
<el-select
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod
"
placeholder="请选择结果录入方式"
@change="resultEntryMethodChange($event, item)"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="特征类型"
prop="inspectionJobCharacteristicsUpdateReqVO.featureType"
>
<el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType"
disabled
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE
)"
: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-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_RESULT_ENTRY
)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="特征类型"
prop="inspectionJobCharacteristicsUpdateReqVO.featureType"
>
<el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.featureType"
placeholder="请选择特征类型"
@change="changeFeatureType"
disabled
<el-form-item
label="是否设定上限"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping
"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping
"
>
<el-option
v-for="dict in getStrDictOptions(
DICT_TYPE.INSPECTION_CHARACTERISTICS_FEATURE_TYPE
)"
: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="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping
"
>
<el-form-item
label="上限值"
prop="inspectionCharacteristicsBaseVO.quantifyCapping"
>
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0"
>
<el-form-item
label="是否设定下限"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit
"
>
<el-form-item
label="下限值"
prop="inspectionCharacteristicsBaseVO.quantifyCapping"
>
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-form-item
label="上限值"
prop="inspectionCharacteristicsBaseVO.quantifyCapping"
>
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0"
>
<el-form-item
label="是否设定目标值"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget
"
>
<el-form-item
label="目标值"
prop="inspectionCharacteristicsBaseVO.quantifyCapping"
>
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0"
>
<el-form-item
label="是否设定下限"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit
"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit
"
>
<el-form-item
label="下限值"
prop="inspectionCharacteristicsBaseVO.quantifyCapping"
>
<el-input
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit
"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="开始时间"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
>
<el-date-picker
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
type="datetime"
placeholder="请选择开始时间"
style="width: 100%"
value-format="x"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="结束时间"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
>
<el-date-picker
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
type="datetime"
placeholder="请选择结束时间"
style="width: 100%"
value-format="x"
/>
</el-form-item>
</el-col>
<!-- 手动评估的时候显示 -->
<el-col :span="12" v-if="item.samplingProcessRespVO.evaluationMode == 1">
<el-form-item
label="评估代码"
required
prop="inspectionJobCharacteristicsUpdateReqVO.estimateCode"
>
<el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.estimateCode"
placeholder="请选择评估代码"
@change="changeFeatureType"
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0"
>
<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-form-item
label="是否设定目标值"
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget
"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col
:span="12"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.featureType == 0 &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget
"
>
<el-form-item
label="目标值"
prop="inspectionCharacteristicsBaseVO.quantifyCapping"
>
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget"
:disabled="true"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="开始时间"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
>
<el-date-picker
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime
"
type="datetime"
placeholder="请选择开始时间"
style="width: 100%"
value-format="x"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label="结束时间"
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
>
<el-date-picker
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime
"
type="datetime"
placeholder="请选择结束时间"
style="width: 100%"
value-format="x"
/>
</el-form-item>
</el-col>
<!-- 手动评估的时候显示 -->
<el-col :span="12" v-if="item.samplingProcessRespVO.evaluationMode == 1">
<el-form-item
label="评估代码"
required
prop="inspectionJobCharacteristicsUpdateReqVO.estimateCode"
>
<el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.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-row>
</div>
</el-form>
</el-collapse-item>
<el-collapse-item name="3">
<template #title>
<div class="small-title">检验结果</div>
</template>
<el-form :model="item" label-width="auto" :rules="rules" ref="formFeaturesRef">
<el-col
:span="24"
v-for="(cur, i) in item.inspectionJobCharacteristicsUpdateReqVO
@ -551,9 +582,9 @@
</el-row>
</div>
</el-col>
</el-row>
</div>
</el-form>
</el-form>
</el-collapse-item>
</el-collapse>
</div>
</el-tab-pane>
</el-tabs>
@ -1081,12 +1112,12 @@ const opensearchItemsTable = () => {
column: 'type',
action: 'in',
value: 'BCP,CCP'
},
{
column: 'status',
action: 'in',
value: 'ENABLE'
}
// {
// column: 'status',
// action: 'in',
// value: 'ENABLE'
// }
)
//
_searchCondition.isSearch = true
@ -1178,7 +1209,7 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => {
data.value.inspectionSchemeCode = InspectionSchemeObj?.code || ''
if (!data.value.inspectionSchemeCode) {
data.value.subList = []
return;
return
}
let list = await InspectionJobDetailApi.getBySchemeCode(data.value.inspectionSchemeCode)
editableTabsValue.value = 1
@ -1551,15 +1582,15 @@ const onItemBlur = async (field, pageApi) => {
if (obj) {
// data.value['itemName'] = obj.name
// data.value['desc1'] = obj.desc1
// const searchTableSuccess = async(formField, searchField, val, type, row)
searchTableSuccess(field,'code',array.list,'main')
// const searchTableSuccess = async(formField, searchField, val, type, row)
searchTableSuccess(field, 'code', array.list, 'main')
} else {
message.alert('暂无数据')
data.value[field] = ''
data.value['itemName'] = ''
data.value['desc1'] = ''
data.value['inspectionSchemeCode'] = ''
data.value.subList =[]
data.value.subList = []
}
} else {
data.value[field] = ''
@ -1611,12 +1642,12 @@ const onInspectionSchemeBlur = async (field, pageApi) => {
count.value++
const obj = array.list[0]
if (obj) {
searchTableSuccess(field,'code',array.list,'main')
searchTableSuccess(field, 'code', array.list, 'main')
} else {
message.alert('暂无数据')
data.value[field] = ''
data.value['inspectionSchemeName'] = ''
data.value.subList =[]
data.value.subList = []
}
} else {
data.value['inspectionSchemeName'] = ''

Loading…
Cancel
Save