Browse Source

检验任务检验值判断问题

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

27
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>
@ -643,7 +643,7 @@ const formProcessRef = ref()
const formSchema = ref(props.formAllSchemas?.formSchema)
const tableAllSchemas = ref(props.tableAllSchemas)
const tableFormRules = ref(props.tableFormRules)
const collapseShow = ref(['1','2','3'])
const collapseShow = ref(['1', '2', '3'])
const data = ref({
code: '',
@ -773,7 +773,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
inspectionValue: '', //
qualitativeCode: '', //
defectLevel: '', //
qualifiedQuantity:parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty), //
qualifiedQuantity: parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.sampleQty), //
unqualifiedQuantity: '0' //
})
}
@ -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

24
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>
@ -693,7 +693,7 @@ const formMainRef = ref()
const formFeaturesRef = ref()
const formProcessRef = ref()
const formSchema = ref(props.formAllSchemas?.formSchema)
const collapseShow = ref(['1','2','3'])
const collapseShow = ref(['1', '2', '3'])
const data = ref({
code: '',
@ -842,7 +842,7 @@ const processList = async (InspectionSchemeObj, list) => {
inspectionValue: '', //
qualitativeCode: '', //
defectLevel: '', //
qualifiedQuantity:parseFloat(item.samplingProcessRespVO.sampleQty), //
qualifiedQuantity: parseFloat(item.samplingProcessRespVO.sampleQty), //
unqualifiedQuantity: '0' //
})
}
@ -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