Browse Source

检验任务检验值判断问题

linshi20240813
zhang_li 4 months ago
parent
commit
c4d3155181
  1. 23
      src/views/qms/inspectionJob/addForm.vue
  2. 20
      src/views/qms/inspectionRecord/addForm.vue
  3. 20
      src/views/qms/inspectionRecordFirst/addForm.vue

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

@ -478,10 +478,10 @@
" "
> >
<el-form-item label="检验值" required> <el-form-item label="检验值" required>
<el-input <el-input-number
v-model="cur.inspectionValue" v-model="cur.inspectionValue"
placeholder="请输入检验值" :min="0"
type="number" @change="inspectionValueInput(item, cur)"
@blur="inspectionValueInput(item, cur)" @blur="inspectionValueInput(item, cur)"
/> />
</el-form-item> </el-form-item>
@ -1412,6 +1412,9 @@ const inspectionValueInput = (item, cur) => {
i++ i++
) { ) {
item.isPass = true item.isPass = true
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit = false
item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget = 10
item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping = 10.1
// , // ,
if ( if (
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping && item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
@ -1479,22 +1482,22 @@ const inspectionValueInput = (item, cur) => {
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget && item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i] item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue && .inspectionValue &&
(parseFloat(cur.inspectionValue) > (parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) >
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) || parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) ||
parseFloat(cur.inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) <
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget)) parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget))
) { ) {
item.isPass = false item.isPass = false
return return
} }
// , // ,
if ( if (
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping && !item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit && item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget && item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
(parseFloat(cur.inspectionValue) > (parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) >
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget) || parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget) ||
parseFloat(cur.inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) <
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit)) parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
) { ) {
item.isPass = false item.isPass = false

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

@ -478,10 +478,10 @@
" "
> >
<el-form-item label="检验值" required> <el-form-item label="检验值" required>
<el-input <el-input-number
v-model="cur.inspectionValue" v-model="cur.inspectionValue"
placeholder="请输入检验值" :min="0"
type="number" @change="inspectionValueInput(item, cur)"
@blur="inspectionValueInput(item, cur)" @blur="inspectionValueInput(item, cur)"
/> />
</el-form-item> </el-form-item>
@ -1492,22 +1492,22 @@ const inspectionValueInput = (item, cur) => {
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget && item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i] item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue && .inspectionValue &&
(parseFloat(cur.inspectionValue) > (parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) >
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) || parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) ||
parseFloat(cur.inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) <
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget)) parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget))
) { ) {
item.isPass = false item.isPass = false
return return
} }
// , // ,
if ( if (
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping && !item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit && item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget && item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
(parseFloat(cur.inspectionValue) > (parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) >
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget) || parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget) ||
parseFloat(cur.inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) <
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit)) parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
) { ) {
item.isPass = false item.isPass = false

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

@ -535,10 +535,10 @@
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '0'" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '0'"
> >
<el-form-item label="检验值" required> <el-form-item label="检验值" required>
<el-input <el-input-number
v-model="cur.inspectionValue" v-model="cur.inspectionValue"
placeholder="请输入检验值" :min="0"
type="number" @change="inspectionValueInput(item, cur)"
@blur="inspectionValueInput(item, cur)" @blur="inspectionValueInput(item, cur)"
/> />
</el-form-item> </el-form-item>
@ -1485,22 +1485,22 @@ const inspectionValueInput = (item, cur) => {
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget && item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i] item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue && .inspectionValue &&
(parseFloat(cur.inspectionValue) > (parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) >
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) || parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) ||
parseFloat(cur.inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) <
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget)) parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget))
) { ) {
item.isPass = false item.isPass = false
return return
} }
// , // ,
if ( if (
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping && !item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit && item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget && item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
(parseFloat(cur.inspectionValue) > (parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) >
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget) || parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget) ||
parseFloat(cur.inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) <
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit)) parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
) { ) {
item.isPass = false item.isPass = false

Loading…
Cancel
Save