feat(IQC检验任务):在判定IQC检验任务时,当破坏数量与当前检验任务拆批的样本数量不一致时,弹出校验提示框
This commit is contained in:
parent
f8a0a5aec9
commit
c6854c88cd
@ -156,6 +156,15 @@ export function iqcJudge(obj) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 校验破坏数量
|
||||||
|
export function checkDestructiveQty(obj) {
|
||||||
|
return request({
|
||||||
|
url: qms('/inspec-job/checkDestructiveQty'),
|
||||||
|
method: 'post',
|
||||||
|
data: obj,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function iqcOa(obj) {
|
export function iqcOa(obj) {
|
||||||
return request({
|
return request({
|
||||||
url: qms('/inspec-job/iqcOa'),
|
url: qms('/inspec-job/iqcOa'),
|
||||||
|
|||||||
@ -14,6 +14,50 @@
|
|||||||
:modal-fetch-fun="getReasonCode"
|
:modal-fetch-fun="getReasonCode"
|
||||||
@inputDialogSelected="dialogSelected"
|
@inputDialogSelected="dialogSelected"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- 保存时,若破坏数量和样本总量不一致,展示的报错弹窗提示 -->
|
||||||
|
<el-dialog
|
||||||
|
v-el-drag-dialog
|
||||||
|
:fullscreen="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
width="60%"
|
||||||
|
:visible.sync="snInfoFormVisible"
|
||||||
|
:title="titleText"
|
||||||
|
@close="snInfoFormVisible = false"
|
||||||
|
center
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="form"
|
||||||
|
label-width="120px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<template>
|
||||||
|
<el-row class="basic-container">
|
||||||
|
<el-sl-panel style="color: red; ">破坏数量[{{ tipForm.destructiveQty}}]和样本总量[{{ tipForm.sumQty}}]不一致,请确认是否继续保存!详情数据如下:</el-sl-panel>
|
||||||
|
<el-table
|
||||||
|
ref="snInfoData"
|
||||||
|
stripe
|
||||||
|
:data="snInfoList"
|
||||||
|
tooltip-effect="dark"
|
||||||
|
height="calc(100vh - 480px)"
|
||||||
|
style="width: 100%"
|
||||||
|
:header-cell-style="{ 'text-align': 'center' }"
|
||||||
|
:cell-style="{ 'text-align': 'center' }"
|
||||||
|
>
|
||||||
|
<el-table-column prop="sn" label="样本号" />
|
||||||
|
<el-table-column prop="qtyOnHand" label="样本数量" />
|
||||||
|
</el-table>
|
||||||
|
</el-row>
|
||||||
|
</template>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" icon="el-icon-circle-close" size="small" @click="confirm()">确定</el-button>
|
||||||
|
<el-button size="small" @click="cancel()">取消</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:close-on-press-escape="false"
|
:close-on-press-escape="false"
|
||||||
@ -248,7 +292,7 @@ import { copyJSON } from '@/util/util'
|
|||||||
import { isBlank } from '@/util/string'
|
import { isBlank } from '@/util/string'
|
||||||
import { judgeForm } from './inspec'
|
import { judgeForm } from './inspec'
|
||||||
import { hideLoading, showLoading } from '@/const/loading'
|
import { hideLoading, showLoading } from '@/const/loading'
|
||||||
import { iqcCreateAbn, iqcJudge,iqcOa } from '@/api/mes/qms/inspec-job'
|
import {checkDestructiveQty, iqcCreateAbn, iqcJudge, iqcOa} from '@/api/mes/qms/inspec-job'
|
||||||
import { fetchList as getReasonCode } from '@/api/mes/prd/reason-code'
|
import { fetchList as getReasonCode } from '@/api/mes/prd/reason-code'
|
||||||
import { fetchList as getUserGroup } from '@/api/admin/role'
|
import { fetchList as getUserGroup } from '@/api/admin/role'
|
||||||
import { abnGroupObj, reasonCodeObj, abnStatusObj } from '../init'
|
import { abnGroupObj, reasonCodeObj, abnStatusObj } from '../init'
|
||||||
@ -294,6 +338,13 @@ export default {
|
|||||||
],
|
],
|
||||||
abnStatusObj,
|
abnStatusObj,
|
||||||
judgeFlag: false,
|
judgeFlag: false,
|
||||||
|
snInfoFormVisible: false,
|
||||||
|
snInfoList:[],
|
||||||
|
titleText: '',
|
||||||
|
tipForm:{
|
||||||
|
destructiveQty:0,
|
||||||
|
sumQty:0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -451,8 +502,63 @@ export default {
|
|||||||
if (f.newResult == '4' && reCheckNum >= Number(f.populationQty)) {
|
if (f.newResult == '4' && reCheckNum >= Number(f.populationQty)) {
|
||||||
return this.$message.error(this.$t('mes.qms.noQuantityAvailableForReinspection'))
|
return this.$message.error(this.$t('mes.qms.noQuantityAvailableForReinspection'))
|
||||||
}
|
}
|
||||||
this.doSave(f)
|
|
||||||
|
// 校验破坏数量
|
||||||
|
let param = {
|
||||||
|
"jobNo": f.jobNo,
|
||||||
|
"destructiveQty": f.destructiveQty,
|
||||||
|
};
|
||||||
|
|
||||||
|
let me = this;
|
||||||
|
me.snInfoList = [];
|
||||||
|
me.tipForm.destructiveQty = 0;
|
||||||
|
me.tipForm.sumQty = 0;
|
||||||
|
|
||||||
|
showLoading();
|
||||||
|
checkDestructiveQty(param).then(res => {
|
||||||
|
hideLoading();
|
||||||
|
if (res.data.code !== 0) {
|
||||||
|
return this.$message.error(res.data.msg);
|
||||||
|
}
|
||||||
|
// 如果 res.data.data 不为空
|
||||||
|
if (res.data.data != null) {
|
||||||
|
// 判断 tipShow 为 true,则弹出弹窗
|
||||||
|
if(res.data.data.tipShow) {
|
||||||
|
// 破坏数量
|
||||||
|
me.tipForm.destructiveQty = res.data.data.destructiveQty;
|
||||||
|
// 样本总量
|
||||||
|
me.tipForm.sumQty = res.data.data.sumQty;
|
||||||
|
// 样本信息
|
||||||
|
me.snInfoList = res.data.data.snInfoList;
|
||||||
|
me.titleText = '提示信息'
|
||||||
|
// 弹出弹窗
|
||||||
|
me.snInfoFormVisible = true;
|
||||||
|
} else {
|
||||||
|
// 调用保存方法
|
||||||
|
me.doSave(f)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
hideLoading();
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 取消
|
||||||
|
cancel() {
|
||||||
|
let me = this
|
||||||
|
me.snInfoFormVisible = false
|
||||||
|
},
|
||||||
|
|
||||||
|
// 确定
|
||||||
|
confirm() {
|
||||||
|
let me = this
|
||||||
|
let f = me.form
|
||||||
|
// 调用保存方法
|
||||||
|
me.doSave(f)
|
||||||
|
// 调用取消方法,关闭弹窗
|
||||||
|
me.cancel();
|
||||||
|
},
|
||||||
|
|
||||||
doSave(req) {
|
doSave(req) {
|
||||||
showLoading()
|
showLoading()
|
||||||
iqcJudge({
|
iqcJudge({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user