Browse Source

检验值默认值为0bug

linshi20240813
zhang_li 3 months ago
parent
commit
6f92254852
  1. 10
      src/views/qms/inspectionJob/addForm.vue
  2. 17
      src/views/qms/inspectionRecord/addForm.vue
  3. 10
      src/views/qms/inspectionRecordFirst/addForm.vue

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

@ -478,12 +478,7 @@
" "
> >
<el-form-item label="检验值" required> <el-form-item label="检验值" required>
<el-input-number <el-input v-model="cur.inspectionValue" placeholder="请输入检验值" @input="inputChange($event,cur)" @blur="inspectionValueInput(item, cur)" />
v-model="cur.inspectionValue"
:min="0"
@change="inspectionValueInput(item, cur)"
@blur="inspectionValueInput(item, cur)"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col <el-col
@ -1405,6 +1400,9 @@ const boxList = ref()
// mianscroll.value.scrollTo({ top: boxList.value.clientHeight + 550, behavior: 'smooth' }) // mianscroll.value.scrollTo({ top: boxList.value.clientHeight + 550, behavior: 'smooth' })
// }) // })
// } // }
const inputChange = (val,cur) => {
cur.inspectionValue = cur.inspectionValue.replace(/[^0-9.]/g, '')
}
const inspectionValueInput = (item, cur) => { const inspectionValueInput = (item, cur) => {
for ( for (
let i = 0; let i = 0;

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

@ -478,12 +478,7 @@
" "
> >
<el-form-item label="检验值" required> <el-form-item label="检验值" required>
<el-input-number <el-input v-model="cur.inspectionValue" placeholder="请输入检验值" @input="inputChange($event,cur)" @blur="inspectionValueInput(item, cur)" />
v-model="cur.inspectionValue"
:min="0"
@change="inspectionValueInput(item, cur)"
@blur="inspectionValueInput(item, cur)"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col <el-col
@ -1418,6 +1413,9 @@ const boxList = ref()
// mianscroll.value.scrollTo({ top: boxList.value.clientHeight + 550, behavior: 'smooth' }) // mianscroll.value.scrollTo({ top: boxList.value.clientHeight + 550, behavior: 'smooth' })
// }) // })
// } // }
const inputChange = (val,cur) => {
cur.inspectionValue = cur.inspectionValue.replace(/[^0-9.]/g, '')
}
const inspectionValueInput = (item, cur) => { const inspectionValueInput = (item, cur) => {
for ( for (
let i = 0; let i = 0;
@ -1528,6 +1526,13 @@ const inspectionValueInput = (item, cur) => {
.inspectionValue .inspectionValue
) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit)) ) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
) { ) {
console.log(parseFloat(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue
))
console.log( parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
console.log( parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping))
console.log(333)
item.isPass = false item.isPass = false
return return
} }

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

@ -535,12 +535,7 @@
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '0'" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '0'"
> >
<el-form-item label="检验值" required> <el-form-item label="检验值" required>
<el-input-number <el-input v-model="cur.inspectionValue" placeholder="请输入检验值" @input="inputChange($event,cur)" @blur="inspectionValueInput(item, cur)" />
v-model="cur.inspectionValue"
:min="0"
@change="inspectionValueInput(item, cur)"
@blur="inspectionValueInput(item, cur)"
/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col <el-col
@ -1411,6 +1406,9 @@ const boxList = ref()
// mianscroll.value.scrollTo({ top: boxList.value.clientHeight + 550, behavior: 'smooth' }) // mianscroll.value.scrollTo({ top: boxList.value.clientHeight + 550, behavior: 'smooth' })
// }) // })
// } // }
const inputChange = (val,cur) => {
cur.inspectionValue = cur.inspectionValue.replace(/[^0-9.]/g, '')
}
const inspectionValueInput = (item, cur) => { const inspectionValueInput = (item, cur) => {
for ( for (
let i = 0; let i = 0;

Loading…
Cancel
Save