|
|
@ -34,9 +34,12 @@ |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="物料编码" prop="itemCode"> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input v-model="data.itemCode" placeholder="请选择物料编码" |
|
|
|
@blur="onBlur('item', ItemBasicApi.getItembasicPage)" |
|
|
|
@focus="onFocus"/> |
|
|
|
<el-input |
|
|
|
v-model="data.itemCode" |
|
|
|
placeholder="请选择物料编码" |
|
|
|
@blur="onItemBlur('itemCode', ItemBasicApi.getItembasicPage)" |
|
|
|
@focus="onFocus" |
|
|
|
/> |
|
|
|
<el-button type="info" plain style="width: 40px" @click="opensearchItemsTable()" |
|
|
|
><Icon icon="ep:search" /> |
|
|
|
</el-button> |
|
|
@ -45,7 +48,7 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="物料名称" prop="itemName"> |
|
|
|
<el-input v-model="data.itemName" placeholder="请填写描述" disabled /> |
|
|
|
<el-input v-model="data.itemName" placeholder="请填写名称" disabled /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
@ -59,8 +62,14 @@ |
|
|
|
<el-input |
|
|
|
v-model="data.inspectionSchemeCode" |
|
|
|
placeholder="请选择检验方案" |
|
|
|
@blur="onBlur('inspectionScheme', InspectionSchemeApi.InspectionSchemePage)" |
|
|
|
@focus="onFocus"/> |
|
|
|
@blur=" |
|
|
|
onInspectionSchemeBlur( |
|
|
|
'inspectionSchemeCode', |
|
|
|
InspectionSchemeApi.InspectionSchemePage |
|
|
|
) |
|
|
|
" |
|
|
|
@focus="onFocus" |
|
|
|
/> |
|
|
|
<el-button |
|
|
|
type="info" |
|
|
|
plain |
|
|
@ -90,7 +99,7 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="检验人" prop="creatorName"> |
|
|
|
<el-input v-model="data.creatorName" placeholder="请填写检验人" disabled/> |
|
|
|
<el-input v-model="data.creatorName" placeholder="请填写检验人" disabled /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
@ -194,7 +203,9 @@ |
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName" |
|
|
|
v-model=" |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName |
|
|
|
" |
|
|
|
disabled |
|
|
|
placeholder="请选择检验方法" |
|
|
|
/> |
|
|
@ -208,7 +219,9 @@ |
|
|
|
> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.inspectionJobCharacteristicsUpdateReqVO.samplingProcessName" |
|
|
|
v-model=" |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.samplingProcessName |
|
|
|
" |
|
|
|
disabled |
|
|
|
placeholder="请选择采样过程编码" |
|
|
|
/> |
|
|
@ -216,10 +229,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item |
|
|
|
label="样品份数" |
|
|
|
prop="samplingProcessRespVO.sampleQty" |
|
|
|
> |
|
|
|
<el-form-item label="样品份数" prop="samplingProcessRespVO.sampleQty"> |
|
|
|
<div style="display: flex; width: 100%"> |
|
|
|
<el-input |
|
|
|
v-model="item.samplingProcessRespVO.sampleQty" |
|
|
@ -450,7 +460,6 @@ |
|
|
|
v-for="(cur, i) in item.inspectionJobCharacteristicsUpdateReqVO |
|
|
|
.recordInspectionQuantifyList" |
|
|
|
:key="i" |
|
|
|
|
|
|
|
> |
|
|
|
<div |
|
|
|
style=" |
|
|
@ -458,12 +467,15 @@ |
|
|
|
border-radius: 4px; |
|
|
|
padding-top: 16px; |
|
|
|
margin-bottom: 10px; |
|
|
|
"> |
|
|
|
" |
|
|
|
> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<!-- 汇总录入的时候显示 --> |
|
|
|
<el-col |
|
|
|
:span="12" |
|
|
|
v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1" |
|
|
|
v-if=" |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1 |
|
|
|
" |
|
|
|
> |
|
|
|
<el-form-item label="合格数量" required> |
|
|
|
<el-input |
|
|
@ -475,7 +487,9 @@ |
|
|
|
</el-col> |
|
|
|
<el-col |
|
|
|
:span="12" |
|
|
|
v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1" |
|
|
|
v-if=" |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1 |
|
|
|
" |
|
|
|
> |
|
|
|
<el-form-item label="不合格数量" required> |
|
|
|
<el-input |
|
|
@ -517,14 +531,13 @@ |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col |
|
|
|
:span="12" |
|
|
|
> |
|
|
|
<el-col :span="12"> |
|
|
|
<el-form-item label="备注"> |
|
|
|
<el-input |
|
|
|
v-model="cur.remark" |
|
|
|
placeholder="请输入备注" |
|
|
|
type="text" maxlength="200" |
|
|
|
type="text" |
|
|
|
maxlength="200" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -544,10 +557,9 @@ |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
|
|
|
|
</div> |
|
|
|
<template #footer> |
|
|
|
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" :key="count"/> |
|
|
|
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" :key="count" /> |
|
|
|
</template> |
|
|
|
</Dialog> |
|
|
|
<Dialog |
|
|
@ -581,18 +593,16 @@ import * as InspectionJobDetailApi from '@/api/qms/inspectionJob/inspectionJobDe |
|
|
|
import { SearchTable } from '@/components/SearchTable' |
|
|
|
import * as InspectionRecordDetail from '@/api/qms/inspectionRecord/inspectionRecordDetail' |
|
|
|
|
|
|
|
|
|
|
|
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' |
|
|
|
import * as ItemBasicApi from '@/api/wms/itembasic' |
|
|
|
|
|
|
|
|
|
|
|
import { InspectionSchemeMain } from '@/views/qms/inspectionScheme/inspectionScheme.data' |
|
|
|
import * as InspectionSchemeApi from '@/api/qms/InspectionScheme' |
|
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
|
|
|
|
import { useUserStore } from '@/store/modules/user' |
|
|
|
const userStore = useUserStore() |
|
|
|
console.log(3355,userStore.getUser.id) |
|
|
|
console.log(3355, userStore.getUser.id) |
|
|
|
|
|
|
|
const { proxy } = getCurrentInstance() |
|
|
|
|
|
|
@ -639,7 +649,7 @@ const props = defineProps({ |
|
|
|
type: Object, |
|
|
|
required: true, |
|
|
|
default: null |
|
|
|
}, |
|
|
|
} |
|
|
|
}) |
|
|
|
const { t } = useI18n() // 国际化 |
|
|
|
|
|
|
@ -661,7 +671,7 @@ const data = ref({ |
|
|
|
desc1: '', |
|
|
|
inspectionSchemeCode: '', |
|
|
|
inspectionBatch: '', |
|
|
|
inspectionTime:formatDate(new Date()), |
|
|
|
inspectionTime: formatDate(new Date()), |
|
|
|
creator: userStore.getUser.id, |
|
|
|
creatorName: userStore.getUser.nickname, |
|
|
|
subList: [] |
|
|
@ -678,9 +688,7 @@ if (props.basicFormWidth) { |
|
|
|
dialogWidth.value = props.isBusiness ? '60%' : '40%' |
|
|
|
} |
|
|
|
const rules = ref({ |
|
|
|
'inspectionTime': [ |
|
|
|
{ required: true, message: '请选择检验时间', trigger: 'blur' } |
|
|
|
], |
|
|
|
inspectionTime: [{ required: true, message: '请选择检验时间', trigger: 'blur' }], |
|
|
|
'inspectionJobCharacteristicsUpdateReqVO.description': [ |
|
|
|
{ required: true, message: '请填写描述', trigger: ['blur', 'change'] } |
|
|
|
], |
|
|
@ -739,7 +747,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
if (row) { |
|
|
|
data.value = JSON.parse(JSON.stringify(row)) |
|
|
|
let list = await InspectionRecordDetail.getInspectionRecordDetailList(data.value.id) |
|
|
|
await processList( data.value,list) |
|
|
|
await processList(data.value, list) |
|
|
|
} else { |
|
|
|
data.value = { |
|
|
|
code: '', |
|
|
@ -749,7 +757,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
desc1: '', |
|
|
|
inspectionSchemeCode: '', |
|
|
|
inspectionBatch: '', |
|
|
|
inspectionTime:formatDate(new Date()), |
|
|
|
inspectionTime: formatDate(new Date()), |
|
|
|
creator: userStore.getUser.id, |
|
|
|
creatorName: userStore.getUser.nickname, |
|
|
|
subList: [] |
|
|
@ -760,7 +768,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any |
|
|
|
} |
|
|
|
|
|
|
|
// 渲染工序列表 |
|
|
|
const processList =async (InspectionSchemeObj,list) => { |
|
|
|
const processList = async (InspectionSchemeObj, list) => { |
|
|
|
editableTabsValue.value = 1 |
|
|
|
list.forEach((item, index) => { |
|
|
|
item.name = index + 1 |
|
|
@ -774,18 +782,17 @@ const processList =async (InspectionSchemeObj,list) => { |
|
|
|
).toFixed(6) |
|
|
|
) |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1 ? item.inspectionJobCharacteristicsUpdateReqVO.qualitativeRespVOList : item.inspectionJobCharacteristicsUpdateReqVO.quantifyRespVOList |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.featureType == 1 |
|
|
|
? item.inspectionJobCharacteristicsUpdateReqVO.qualitativeRespVOList |
|
|
|
: item.inspectionJobCharacteristicsUpdateReqVO.quantifyRespVOList |
|
|
|
|
|
|
|
if (!item?.inspectionJobCharacteristicsUpdateReqVO?.recordInspectionQuantifyList) { |
|
|
|
// 单个录入时 |
|
|
|
if (item?.inspectionJobCharacteristicsUpdateReqVO?.resultEntryMethod == 2) { |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [] |
|
|
|
for ( |
|
|
|
let i = 0; |
|
|
|
i < parseInt(item.samplingProcessRespVO.sampleQty); |
|
|
|
i++ |
|
|
|
) { |
|
|
|
for (let i = 0; i < parseInt(item.samplingProcessRespVO.sampleQty); i++) { |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ |
|
|
|
inspectionValue: '', //检验值 |
|
|
|
qualitativeCode: '', //定性字典项值 |
|
|
@ -796,7 +803,7 @@ const processList =async (InspectionSchemeObj,list) => { |
|
|
|
} |
|
|
|
} else { |
|
|
|
// 汇总录入时 |
|
|
|
console.log(2333,item.inspectionJobCharacteristicsUpdateReqVO) |
|
|
|
console.log(2333, item.inspectionJobCharacteristicsUpdateReqVO) |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [] |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ |
|
|
@ -941,7 +948,7 @@ const validateForm = (formRef) => { |
|
|
|
} |
|
|
|
const submitForm = async () => { |
|
|
|
try { |
|
|
|
await formMainRef.value.validate() |
|
|
|
await formMainRef.value.validate() |
|
|
|
const bol2 = await validateForm(formFeaturesRef.value) |
|
|
|
if (!bol2) { |
|
|
|
message.error(`模板中有检验工序和检验特性未填写完全`) |
|
|
@ -1092,9 +1099,9 @@ const opensearchItemsTable = () => { |
|
|
|
) |
|
|
|
} |
|
|
|
const opensearchInspectionTable = () => { |
|
|
|
if(!data.value.itemCode){ |
|
|
|
if (!data.value.itemCode) { |
|
|
|
message.error(`请选择物料`) |
|
|
|
return; |
|
|
|
return |
|
|
|
} |
|
|
|
const _searchCondition = {} |
|
|
|
const filters: any[] = [] |
|
|
@ -1183,11 +1190,7 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
|
if (item?.inspectionJobCharacteristicsUpdateReqVO?.resultEntryMethod == 2) { |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [] |
|
|
|
for ( |
|
|
|
let i = 0; |
|
|
|
i < parseInt(item.samplingProcessRespVO.sampleQty); |
|
|
|
i++ |
|
|
|
) { |
|
|
|
for (let i = 0; i < parseInt(item.samplingProcessRespVO.sampleQty); i++) { |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ |
|
|
|
inspectionValue: '', //检验值 |
|
|
|
qualitativeCode: '', //定性字典项值 |
|
|
@ -1198,9 +1201,10 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
|
} |
|
|
|
} else { |
|
|
|
// 汇总录入时 |
|
|
|
console.log(2333,item.inspectionJobCharacteristicsUpdateReqVO) |
|
|
|
console.log(2333, item.inspectionJobCharacteristicsUpdateReqVO) |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [] |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = |
|
|
|
false |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ |
|
|
|
inspectionValue: '', //检验值 |
|
|
|
qualitativeCode: '', //定性字典项值 |
|
|
@ -1225,7 +1229,8 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit) { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = false |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = |
|
|
|
false |
|
|
|
} |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget) { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyTarget'][0].required = true |
|
|
@ -1242,7 +1247,7 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
|
data.value.subList = list |
|
|
|
} else if (formField == 'inspectionSchemeCode') { |
|
|
|
console.log(val[0]) |
|
|
|
const InspectionSchemeObj =val[0] |
|
|
|
const InspectionSchemeObj = val[0] |
|
|
|
data.value.samplePieceSize = InspectionSchemeObj.samplePieceSize |
|
|
|
data.value.inspectionSchemeCode = InspectionSchemeObj.code |
|
|
|
let list = await InspectionJobDetailApi.getBySchemeCode(data.value.inspectionSchemeCode) |
|
|
@ -1264,11 +1269,7 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
|
if (item?.inspectionJobCharacteristicsUpdateReqVO?.resultEntryMethod == 2) { |
|
|
|
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [] |
|
|
|
for ( |
|
|
|
let i = 0; |
|
|
|
i < parseInt(item.samplingProcessRespVO.sampleQty); |
|
|
|
i++ |
|
|
|
) { |
|
|
|
for (let i = 0; i < parseInt(item.samplingProcessRespVO.sampleQty); i++) { |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ |
|
|
|
inspectionValue: '', //检验值 |
|
|
|
qualitativeCode: '', //定性字典项值 |
|
|
@ -1279,9 +1280,10 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
|
} |
|
|
|
} else { |
|
|
|
// 汇总录入时 |
|
|
|
console.log(2333,item.inspectionJobCharacteristicsUpdateReqVO) |
|
|
|
console.log(2333, item.inspectionJobCharacteristicsUpdateReqVO) |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList = [] |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = false |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = |
|
|
|
false |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.push({ |
|
|
|
inspectionValue: '', //检验值 |
|
|
|
qualitativeCode: '', //定性字典项值 |
|
|
@ -1306,7 +1308,8 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => { |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit) { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = true |
|
|
|
} else { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = false |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit'][0].required = |
|
|
|
false |
|
|
|
} |
|
|
|
if (item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget) { |
|
|
|
rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyTarget'][0].required = true |
|
|
@ -1383,15 +1386,22 @@ const boxList = ref() |
|
|
|
// }) |
|
|
|
// } |
|
|
|
const inspectionValueInput = (item, cur) => { |
|
|
|
for ( let i = 0;i < item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.length;i++) { |
|
|
|
for ( |
|
|
|
let i = 0; |
|
|
|
i < item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.length; |
|
|
|
i++ |
|
|
|
) { |
|
|
|
item.isPass = true |
|
|
|
// 如果上限值存在,下限值和目标值不存在 大于上限值显示红色图标 |
|
|
|
// 如果上限值存在,下限值和目标值不存在 大于上限值显示红色图标 |
|
|
|
if ( |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping && |
|
|
|
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit && |
|
|
|
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget && |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&& |
|
|
|
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i] |
|
|
|
.inspectionValue && |
|
|
|
parseFloat( |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue |
|
|
|
) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) |
|
|
|
) { |
|
|
|
item.isPass = false |
|
|
|
return |
|
|
@ -1401,8 +1411,11 @@ const inspectionValueInput = (item, cur) => { |
|
|
|
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping && |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit && |
|
|
|
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget && |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&& |
|
|
|
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit) |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i] |
|
|
|
.inspectionValue && |
|
|
|
parseFloat( |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue |
|
|
|
) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit) |
|
|
|
) { |
|
|
|
item.isPass = false |
|
|
|
return |
|
|
@ -1412,8 +1425,11 @@ const inspectionValueInput = (item, cur) => { |
|
|
|
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping && |
|
|
|
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit && |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget && |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&& |
|
|
|
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget) |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i] |
|
|
|
.inspectionValue && |
|
|
|
parseFloat( |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue |
|
|
|
) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget) |
|
|
|
) { |
|
|
|
item.isPass = false |
|
|
|
return |
|
|
@ -1423,9 +1439,15 @@ const inspectionValueInput = (item, cur) => { |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping && |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit && |
|
|
|
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget && |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&& |
|
|
|
( parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) || |
|
|
|
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit)) |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i] |
|
|
|
.inspectionValue && |
|
|
|
(parseFloat( |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue |
|
|
|
) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) || |
|
|
|
parseFloat( |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i] |
|
|
|
.inspectionValue |
|
|
|
) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit)) |
|
|
|
) { |
|
|
|
item.isPass = false |
|
|
|
return |
|
|
@ -1435,9 +1457,12 @@ const inspectionValueInput = (item, cur) => { |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping && |
|
|
|
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit && |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget && |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&& |
|
|
|
(parseFloat(cur.inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping)|| |
|
|
|
parseFloat(cur.inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget)) |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i] |
|
|
|
.inspectionValue && |
|
|
|
(parseFloat(cur.inspectionValue) > |
|
|
|
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) || |
|
|
|
parseFloat(cur.inspectionValue) < |
|
|
|
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget)) |
|
|
|
) { |
|
|
|
item.isPass = false |
|
|
|
return |
|
|
@ -1447,8 +1472,10 @@ const inspectionValueInput = (item, cur) => { |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping && |
|
|
|
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit && |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget && |
|
|
|
(parseFloat(cur.inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget)|| |
|
|
|
parseFloat(cur.inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit)) |
|
|
|
(parseFloat(cur.inspectionValue) > |
|
|
|
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget) || |
|
|
|
parseFloat(cur.inspectionValue) < |
|
|
|
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit)) |
|
|
|
) { |
|
|
|
item.isPass = false |
|
|
|
return |
|
|
@ -1458,19 +1485,80 @@ const inspectionValueInput = (item, cur) => { |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping && |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit && |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget && |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&& |
|
|
|
(parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) || |
|
|
|
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit)) |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i] |
|
|
|
.inspectionValue && |
|
|
|
(parseFloat( |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue |
|
|
|
) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) || |
|
|
|
parseFloat( |
|
|
|
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i] |
|
|
|
.inspectionValue |
|
|
|
) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit)) |
|
|
|
) { |
|
|
|
item.isPass = false |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
const onItemBlur = async (field, pageApi) => { |
|
|
|
if (data.value[field]) { |
|
|
|
const _searchCondition = {} |
|
|
|
const filters: any[] = [] |
|
|
|
filters.push( |
|
|
|
{ |
|
|
|
action: '==', |
|
|
|
column: 'available', |
|
|
|
value: 'TRUE' |
|
|
|
}, |
|
|
|
{ |
|
|
|
column: 'type', |
|
|
|
action: 'in', |
|
|
|
value: 'BCP,CCP' |
|
|
|
}, |
|
|
|
{ |
|
|
|
column: 'code', |
|
|
|
action: '==', |
|
|
|
value: data.value[field]?.trim() |
|
|
|
} |
|
|
|
) |
|
|
|
// 参数整理 |
|
|
|
_searchCondition.isSearch = true |
|
|
|
_searchCondition.filters = filters |
|
|
|
_searchCondition.pageNo = 1 |
|
|
|
_searchCondition.pageSize = 20 |
|
|
|
_searchCondition.by = 'ASC' |
|
|
|
const array = await pageApi(_searchCondition) |
|
|
|
Butttondata = [ |
|
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
count.value++ |
|
|
|
const obj = array.list[0] |
|
|
|
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') |
|
|
|
} else { |
|
|
|
message.alert('暂无数据') |
|
|
|
data.value[field] = '' |
|
|
|
data.value['itemName'] = '' |
|
|
|
data.value['desc1'] = '' |
|
|
|
data.value['inspectionSchemeCode'] = '' |
|
|
|
data.value.subList =[] |
|
|
|
} |
|
|
|
} else { |
|
|
|
data.value[field] = '' |
|
|
|
Butttondata = [ |
|
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
count.value++ |
|
|
|
} |
|
|
|
} |
|
|
|
//失去焦点 |
|
|
|
const onBlur = async (field, pageApi, item) => { |
|
|
|
const dataObj = item ? item.inspectionCharacteristicsBaseVO : data.value |
|
|
|
if (dataObj[field + 'Code']) { |
|
|
|
const onInspectionSchemeBlur = async (field, pageApi) => { |
|
|
|
if (data.value[field]) { |
|
|
|
const _searchCondition = {} |
|
|
|
const filters: any[] = [] |
|
|
|
filters.push( |
|
|
@ -1482,12 +1570,25 @@ const onBlur = async (field, pageApi, item) => { |
|
|
|
{ |
|
|
|
column: 'code', |
|
|
|
action: '==', |
|
|
|
value: dataObj[field + 'Code']?.trim() |
|
|
|
value: data.value[field]?.trim() |
|
|
|
}, |
|
|
|
{ |
|
|
|
column: 'itemCode', |
|
|
|
action: '==', |
|
|
|
value: data.value.itemCode |
|
|
|
}, |
|
|
|
{ |
|
|
|
column: 'inspectionType', |
|
|
|
action: '==', |
|
|
|
value: data.value.inspectionType |
|
|
|
} |
|
|
|
) |
|
|
|
// 参数整理 |
|
|
|
_searchCondition.isSearch = true |
|
|
|
_searchCondition.filters = filters |
|
|
|
_searchCondition.pageNo = 1 |
|
|
|
_searchCondition.pageSize = 20 |
|
|
|
_searchCondition.by = 'ASC' |
|
|
|
const array = await pageApi(_searchCondition) |
|
|
|
Butttondata = [ |
|
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
@ -1496,14 +1597,15 @@ const onBlur = async (field, pageApi, item) => { |
|
|
|
count.value++ |
|
|
|
const obj = array.list[0] |
|
|
|
if (obj) { |
|
|
|
dataObj[field + 'Name'] = obj.description |
|
|
|
searchTableSuccess(field,'code',array.list,'main') |
|
|
|
} else { |
|
|
|
message.alert('暂无数据') |
|
|
|
dataObj[field + 'Code'] = '' |
|
|
|
dataObj[field + 'Name'] = '' |
|
|
|
data.value[field] = '' |
|
|
|
data.value['inspectionSchemeName'] = '' |
|
|
|
data.value.subList =[] |
|
|
|
} |
|
|
|
} else { |
|
|
|
dataObj[field + 'Name'] = '' |
|
|
|
data.value['inspectionSchemeName'] = '' |
|
|
|
Butttondata = [ |
|
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
@ -1528,8 +1630,8 @@ const onFocus = () => { |
|
|
|
color: #1a8bfc; |
|
|
|
font-size: 16px; |
|
|
|
} |
|
|
|
.tabs-box{ |
|
|
|
max-height:calc(80vh - 40px) ; |
|
|
|
.tabs-box { |
|
|
|
max-height: calc(80vh - 40px); |
|
|
|
overflow-x: hidden; |
|
|
|
overflow-y: auto; |
|
|
|
} |
|
|
|