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

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

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

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

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

Loading…
Cancel
Save