Browse Source

检验记录样式

hella_online_20240829
zhang_li 4 months ago
parent
commit
241201e672
  1. 157
      src/views/qms/inspectionJob/addForm.vue
  2. 166
      src/views/qms/inspectionRecord/addForm.vue
  3. 61
      src/views/qms/inspectionRecordFirst/addForm.vue

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

@ -71,7 +71,11 @@
</span>
</template>
<div class="tabs-box">
<el-collapse accordion>
<el-collapse-item name="1">
<template #title>
<div class="small-title">检验工序</div>
</template>
<el-form :model="item" label-width="auto" :rules="rules" ref="formProcessRef">
<el-row :gutter="20">
<el-col :span="12">
@ -104,7 +108,11 @@
</el-col>
</el-row>
</el-form>
</el-collapse-item>
<el-collapse-item name="2">
<template #title>
<div class="small-title">检验特性</div>
</template>
<el-form :model="item" label-width="auto" :rules="rules" ref="formFeaturesRef">
<div>
<el-row :gutter="20">
@ -135,7 +143,9 @@
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName
"
disabled
placeholder="请选择检验方法"
/>
@ -149,7 +159,9 @@
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.samplingProcessName"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.samplingProcessName
"
disabled
placeholder="请选择采样过程编码"
/>
@ -178,7 +190,9 @@
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize
"
disabled
placeholder="请输入样品份数"
/>
@ -202,7 +216,9 @@
prop="inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod"
>
<el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod
"
placeholder="请选择结果录入方式"
@change="resultEntryMethodChange($event, item)"
disabled
@ -250,7 +266,9 @@
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping
"
:disabled="true"
/>
</el-form-item>
@ -282,7 +300,9 @@
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit
"
:disabled="true"
/>
</el-form-item>
@ -299,7 +319,9 @@
prop="inspectionCharacteristicsBaseVO.quantifyCapping"
>
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit
"
:disabled="true"
/>
</el-form-item>
@ -314,7 +336,9 @@
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget
"
:disabled="true"
/>
</el-form-item>
@ -343,7 +367,9 @@
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
>
<el-date-picker
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime
"
type="datetime"
placeholder="请选择开始时间"
style="width: 100%"
@ -357,7 +383,9 @@
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
>
<el-date-picker
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime
"
type="datetime"
placeholder="请选择结束时间"
style="width: 100%"
@ -386,12 +414,22 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
</el-collapse-item>
<el-collapse-item name="3">
<template #title>
<div class="small-title">检验结果</div>
</template>
<el-form :model="item" label-width="auto" :rules="rules" ref="formFeaturesRef">
<div>
<el-row :gutter="20">
<el-col
:span="24"
v-for="(cur, i) in item.inspectionJobCharacteristicsUpdateReqVO
.recordInspectionQuantifyList"
:key="i"
>
<div
style="
@ -399,12 +437,16 @@
border-radius: 4px;
padding-top: 16px;
margin-bottom: 10px;
">
"
>
<el-row :gutter="20">
<!-- 汇总录入的时候显示 -->
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod ==
1
"
>
<el-form-item label="合格数量" required>
<el-input
@ -416,7 +458,10 @@
</el-col>
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod ==
1
"
>
<el-form-item label="不合格数量" required>
<el-input
@ -428,7 +473,9 @@
</el-col>
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '0'"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.featureType == '0'
"
>
<el-form-item label="检验值" required>
<el-input
@ -441,7 +488,9 @@
</el-col>
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '1'"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.featureType == '1'
"
>
<el-form-item label="选定集" required>
<el-select
@ -458,14 +507,13 @@
</el-select>
</el-form-item>
</el-col>
<el-col
:span="12"
>
<el-col :span="12">
<el-form-item label="备注">
<el-input
v-model="cur.remark"
placeholder="请输入备注"
type="text" maxlength="200"
type="text"
maxlength="200"
/>
</el-form-item>
</el-col>
@ -482,10 +530,11 @@
</el-row>
</div>
</el-form>
</el-collapse-item>
</el-collapse>
</div>
</el-tab-pane>
</el-tabs>
</div>
<template #footer>
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" />
@ -1361,15 +1410,22 @@ const boxList = ref()
// })
// }
const inspectionValueInput = (item, cur) => {
for ( let i = 0;i < item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.length;i++) {
for (
let i = 0;
i < item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.length;
i++
) {
item.isPass = true
// ,
if (
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping)
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue &&
parseFloat(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue
) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping)
) {
item.isPass = false
return
@ -1379,8 +1435,11 @@ const inspectionValueInput = (item, cur) => {
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit)
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue &&
parseFloat(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue
) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit)
) {
item.isPass = false
return
@ -1390,8 +1449,11 @@ const inspectionValueInput = (item, cur) => {
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget)
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue &&
parseFloat(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue
) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget)
) {
item.isPass = false
return
@ -1401,9 +1463,15 @@ const inspectionValueInput = (item, cur) => {
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
( parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) ||
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue &&
(parseFloat(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue
) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) ||
parseFloat(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue
) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
) {
item.isPass = false
return
@ -1413,9 +1481,12 @@ const inspectionValueInput = (item, cur) => {
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
(parseFloat(cur.inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping)||
parseFloat(cur.inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget))
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue &&
(parseFloat(cur.inspectionValue) >
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) ||
parseFloat(cur.inspectionValue) <
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget))
) {
item.isPass = false
return
@ -1425,8 +1496,10 @@ const inspectionValueInput = (item, cur) => {
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
(parseFloat(cur.inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget)||
parseFloat(cur.inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
(parseFloat(cur.inspectionValue) >
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget) ||
parseFloat(cur.inspectionValue) <
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
) {
item.isPass = false
return
@ -1436,9 +1509,15 @@ const inspectionValueInput = (item, cur) => {
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
(parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) ||
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue &&
(parseFloat(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue
) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) ||
parseFloat(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue
) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
) {
item.isPass = false
return

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

@ -71,7 +71,11 @@
</span>
</template>
<div class="tabs-box">
<el-collapse accordion>
<el-collapse-item name="1">
<template #title>
<div class="small-title">检验工序</div>
</template>
<el-form :model="item" label-width="auto" :rules="rules" ref="formProcessRef">
<el-row :gutter="20">
<el-col :span="12">
@ -104,7 +108,11 @@
</el-col>
</el-row>
</el-form>
</el-collapse-item>
<el-collapse-item name="2">
<template #title>
<div class="small-title">检验特性</div>
</template>
<el-form :model="item" label-width="auto" :rules="rules" ref="formFeaturesRef">
<div>
<el-row :gutter="20">
@ -135,7 +143,9 @@
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.inspectionMethodName
"
disabled
placeholder="请选择检验方法"
/>
@ -149,7 +159,9 @@
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.samplingProcessName"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.samplingProcessName
"
disabled
placeholder="请选择采样过程编码"
/>
@ -178,7 +190,9 @@
>
<div style="display: flex; width: 100%">
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.samplePieceSize
"
disabled
placeholder="请输入样品份数"
/>
@ -202,7 +216,9 @@
prop="inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod"
>
<el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod
"
placeholder="请选择结果录入方式"
@change="resultEntryMethodChange($event, item)"
disabled
@ -250,7 +266,9 @@
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping
"
:disabled="true"
/>
</el-form-item>
@ -282,7 +300,9 @@
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit
"
:disabled="true"
/>
</el-form-item>
@ -299,7 +319,9 @@
prop="inspectionCharacteristicsBaseVO.quantifyCapping"
>
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit
"
:disabled="true"
/>
</el-form-item>
@ -314,7 +336,9 @@
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget
"
:disabled="true"
/>
</el-form-item>
@ -343,7 +367,9 @@
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
>
<el-date-picker
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime
"
type="datetime"
placeholder="请选择开始时间"
style="width: 100%"
@ -357,7 +383,9 @@
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
>
<el-date-picker
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime
"
type="datetime"
placeholder="请选择结束时间"
style="width: 100%"
@ -386,12 +414,22 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
</el-collapse-item>
<el-collapse-item name="3">
<template #title>
<div class="small-title">检验结果</div>
</template>
<el-form :model="item" label-width="auto" :rules="rules" ref="formFeaturesRef">
<div>
<el-row :gutter="20">
<el-col
:span="24"
v-for="(cur, i) in item.inspectionJobCharacteristicsUpdateReqVO
.recordInspectionQuantifyList"
:key="i"
>
<div
style="
@ -399,12 +437,16 @@
border-radius: 4px;
padding-top: 16px;
margin-bottom: 10px;
">
"
>
<el-row :gutter="20">
<!-- 汇总录入的时候显示 -->
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod ==
1
"
>
<el-form-item label="合格数量" required>
<el-input
@ -416,7 +458,10 @@
</el-col>
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 1"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod ==
1
"
>
<el-form-item label="不合格数量" required>
<el-input
@ -428,7 +473,9 @@
</el-col>
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '0'"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.featureType == '0'
"
>
<el-form-item label="检验值" required>
<el-input
@ -441,7 +488,9 @@
</el-col>
<el-col
:span="12"
v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '1'"
v-if="
item.inspectionJobCharacteristicsUpdateReqVO.featureType == '1'
"
>
<el-form-item label="选定集" required>
<el-select
@ -458,14 +507,13 @@
</el-select>
</el-form-item>
</el-col>
<el-col
:span="12"
>
<el-col :span="12">
<el-form-item label="备注">
<el-input
v-model="cur.remark"
placeholder="请输入备注"
type="text" maxlength="200"
type="text"
maxlength="200"
/>
</el-form-item>
</el-col>
@ -482,10 +530,11 @@
</el-row>
</div>
</el-form>
</el-collapse-item>
</el-collapse>
</div>
</el-tab-pane>
</el-tabs>
</div>
<template #footer>
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" />
@ -685,7 +734,9 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
let list = []
const masterId = row.id
list = await InspectionRecordDetailPageApi.getInspectionRecordDetailList(row.id)
data.value.packageList = await InspectionRecordPackageApi.getInspectionRecordPackageList(masterId)
data.value.packageList = await InspectionRecordPackageApi.getInspectionRecordPackageList(
masterId
)
list.forEach((item, index) => {
editableTabsValue.value = 1
item.name = index + 1
@ -699,7 +750,10 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
).toFixed(6)
)
// rules.value['inspectionJobCharacteristicsUpdateReqVO.quantifyCapping'][0].required = true
item.inspectionRecordCharacteristicsRespVO.recordInspectionQuantifyList = item.inspectionRecordCharacteristicsRespVO.featureType == 1 ? item.inspectionRecordCharacteristicsRespVO.qualitativeRespVOList : item.inspectionRecordCharacteristicsRespVO.quantifyRespVOList
item.inspectionRecordCharacteristicsRespVO.recordInspectionQuantifyList =
item.inspectionRecordCharacteristicsRespVO.featureType == 1
? item.inspectionRecordCharacteristicsRespVO.qualitativeRespVOList
: item.inspectionRecordCharacteristicsRespVO.quantifyRespVOList
if (!item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList) {
//
if (item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod == 2) {
@ -1364,15 +1418,22 @@ const boxList = ref()
// })
// }
const inspectionValueInput = (item, cur) => {
for ( let i = 0;i < item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.length;i++) {
for (
let i = 0;
i < item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList.length;
i++
) {
item.isPass = true
// ,
if (
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping)
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue &&
parseFloat(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue
) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping)
) {
item.isPass = false
return
@ -1382,8 +1443,11 @@ const inspectionValueInput = (item, cur) => {
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit)
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue &&
parseFloat(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue
) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit)
) {
item.isPass = false
return
@ -1393,8 +1457,11 @@ const inspectionValueInput = (item, cur) => {
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget)
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue &&
parseFloat(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue
) != parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget)
) {
item.isPass = false
return
@ -1404,9 +1471,15 @@ const inspectionValueInput = (item, cur) => {
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
( parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) ||
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue &&
(parseFloat(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue
) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) ||
parseFloat(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue
) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
) {
item.isPass = false
return
@ -1416,9 +1489,12 @@ const inspectionValueInput = (item, cur) => {
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
(parseFloat(cur.inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping)||
parseFloat(cur.inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget))
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue &&
(parseFloat(cur.inspectionValue) >
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) ||
parseFloat(cur.inspectionValue) <
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget))
) {
item.isPass = false
return
@ -1428,8 +1504,10 @@ const inspectionValueInput = (item, cur) => {
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
!item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
(parseFloat(cur.inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget)||
parseFloat(cur.inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
(parseFloat(cur.inspectionValue) >
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyTarget) ||
parseFloat(cur.inspectionValue) <
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
) {
item.isPass = false
return
@ -1439,9 +1517,15 @@ const inspectionValueInput = (item, cur) => {
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit &&
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget &&
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue&&
(parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) ||
parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue &&
(parseFloat(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i].inspectionValue
) > parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyCapping) ||
parseFloat(
item.inspectionJobCharacteristicsUpdateReqVO.recordInspectionQuantifyList[i]
.inspectionValue
) < parseFloat(item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit))
) {
item.isPass = false
return

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

@ -139,7 +139,11 @@
</span>
</template>
<div class="tabs-box">
<el-collapse accordion>
<el-collapse-item name="1">
<template #title>
<div class="small-title">检验工序</div>
</template>
<el-form :model="item" label-width="auto" :rules="rules" ref="formProcessRef">
<el-row :gutter="20">
<el-col :span="12">
@ -172,7 +176,11 @@
</el-col>
</el-row>
</el-form>
</el-collapse-item>
<el-collapse-item name="2">
<template #title>
<div class="small-title">检验特性</div>
</template>
<el-form :model="item" label-width="auto" :rules="rules" ref="formFeaturesRef">
<div>
<el-row :gutter="20">
@ -271,7 +279,9 @@
prop="inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod"
>
<el-select
v-model="item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.resultEntryMethod
"
placeholder="请选择结果录入方式"
@change="resultEntryMethodChange($event, item)"
disabled
@ -319,7 +329,9 @@
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsCapping
"
:disabled="true"
/>
</el-form-item>
@ -351,7 +363,9 @@
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsLowlimit
"
:disabled="true"
/>
</el-form-item>
@ -368,7 +382,9 @@
prop="inspectionCharacteristicsBaseVO.quantifyCapping"
>
<el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.quantifyLowlimit
"
:disabled="true"
/>
</el-form-item>
@ -383,7 +399,9 @@
prop="inspectionCharacteristicsBaseVO.quantifyIsCapping"
>
<el-switch
v-model="item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.quantifyIsTarget
"
:disabled="true"
/>
</el-form-item>
@ -412,7 +430,9 @@
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
>
<el-date-picker
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.inspectionStartTime
"
type="datetime"
placeholder="请选择开始时间"
style="width: 100%"
@ -426,7 +446,9 @@
prop="inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
>
<el-date-picker
v-model="item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime"
v-model="
item.inspectionJobCharacteristicsUpdateReqVO.inspectionEndTime
"
type="datetime"
placeholder="请选择结束时间"
style="width: 100%"
@ -455,6 +477,15 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
</el-collapse-item>
<el-collapse-item name="3">
<template #title>
<div class="small-title">检验结果</div>
</template>
<el-form :model="item" label-width="auto" :rules="rules" ref="formFeaturesRef">
<el-col
:span="24"
v-for="(cur, i) in item.inspectionJobCharacteristicsUpdateReqVO
@ -551,9 +582,9 @@
</el-row>
</div>
</el-col>
</el-row>
</div>
</el-form>
</el-collapse-item>
</el-collapse>
</div>
</el-tab-pane>
</el-tabs>
@ -1081,12 +1112,12 @@ const opensearchItemsTable = () => {
column: 'type',
action: 'in',
value: 'BCP,CCP'
},
{
column: 'status',
action: 'in',
value: 'ENABLE'
}
// {
// column: 'status',
// action: 'in',
// value: 'ENABLE'
// }
)
//
_searchCondition.isSearch = true
@ -1178,7 +1209,7 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => {
data.value.inspectionSchemeCode = InspectionSchemeObj?.code || ''
if (!data.value.inspectionSchemeCode) {
data.value.subList = []
return;
return
}
let list = await InspectionJobDetailApi.getBySchemeCode(data.value.inspectionSchemeCode)
editableTabsValue.value = 1

Loading…
Cancel
Save