Browse Source

检验任务检验值判断问题

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

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