From ed0d2a8cad8e5e8d62ea4d39ddb82a40abb67b2b Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 3 Sep 2024 15:30:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:mlogb=E6=A3=80=E9=AA=8C=E7=9A=84form?= =?UTF-8?q?=E8=A1=A8=E5=8D=95(=E5=85=A8=E6=A3=80/=E6=8A=BD=E6=A3=80)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_gx/check_form.vue | 155 ++++++++++++++++++++------------ 1 file changed, 97 insertions(+), 58 deletions(-) diff --git a/src/views/wpm_gx/check_form.vue b/src/views/wpm_gx/check_form.vue index eb777ba6..b69de15c 100644 --- a/src/views/wpm_gx/check_form.vue +++ b/src/views/wpm_gx/check_form.vue @@ -16,26 +16,26 @@ > - + - - {{item.batch}} - ({{item.count}}) - + + + + + + - + - + + + + + + - - - + + + precision="0" + > @@ -85,6 +95,16 @@ > + + + + + @@ -135,7 +154,6 @@ v-model="count_notok_json.count_n_wj" style="width: 100%" precision="0" - @change="handleCountChange" > @@ -147,7 +165,6 @@ v-model="count_notok_json.count_n_yd" style="width: 100%" precision="0" - @change="handleCountChange" > @@ -159,7 +176,6 @@ v-model="count_notok_json.count_n_txd" style="width: 100%" precision="0" - @change="handleCountChange" > @@ -171,7 +187,6 @@ v-model="count_notok_json.count_n_qp" style="width: 100%" precision="0" - @change="handleCountChange" > @@ -183,7 +198,6 @@ v-model="count_notok_json.count_n_swen" style="width: 100%" precision="0" - @change="handleCountChange" > @@ -195,12 +209,21 @@ v-model="count_notok_json.count_n_bb" style="width: 100%" precision="0" - @change="handleCountChange" > - + + + + + @@ -220,7 +242,6 @@ v-model="count_notok_json.count_n_md" style="width: 100%" precision="0" - @change="handleCountChange" > @@ -233,7 +254,17 @@ v-model="count_notok_json.count_n_ps" style="width: 100%" precision="0" - + @change="handleCountChange" + > + + + + + @@ -274,9 +305,11 @@ export default { batch: "", count: null, count_ok: null, + count_sampling_ok:'', count_notok: 0, count_notok_json:{} }, + count_ok_rate:100, count_notok_json:{ //尺寸 count_n_wj: 0, @@ -289,32 +322,27 @@ export default { count_n_hs: 0, count_n_md: 0, count_n_bb:0, + count_n_xbb:0, count_n_ps: 0, count_n_qt:0, }, rules: { - test_date: [ - { - required: true, - message: "请选择检验日期", - trigger: "blur", - }, - ], - batch: [ - { - required: true, - message: "请选择物料批次", - trigger: "blur", - }, - ], + test_date: [{required: true,message: "请选择检验日期",trigger: "blur"}], + batch: [{required: true,message: "请选择物料批次",trigger: "blur"}], + test_user: [{required: true,message: "请选择物料批次",trigger: "blur"}], }, + options: [], + userList : [], + typeOption:[ + {name:'全检',value:20}, + {name:'抽检',value:10}, + ], + selectionFilters: [], batchCount:null, formCount:null, visible: false, + supplier:null, isSaveing: false, - options: [], - userList : [], - selectionFilters: [], setFiltersVisible: false, }; }, @@ -323,6 +351,7 @@ export default { this.form.batch = this.itemObj.batch; this.form.wm = this.itemObj.id; this.form.count = this.itemObj.count; + this.form.supplier = this.itemObj.supplier; this.deptID = this.$TOOL.data.get('gx_deptID'); this.getUsers(); }, @@ -351,9 +380,6 @@ export default { }); }); }, - handleCheckChange(){ - this.form.count_ok = this.form.count-this.form.count_notok; - }, handleCountChange(type){ this.form.count_notok = this.count_notok_json.count_n_wj+ @@ -364,12 +390,20 @@ export default { this.count_notok_json.count_n_swen+ this.count_notok_json.count_n_hs+ this.count_notok_json.count_n_bb+ + this.count_notok_json.count_n_xbb+ this.count_notok_json.count_n_md+ - this.count_notok_json.count_n_ps; - this.form.count_ok = this.form.count - this.form.count_notok; + this.count_notok_json.count_n_ps+ + this.count_notok_json.count_n_qt; + this.handleCountNotokChange(); }, handleCountNotokChange(){ - this.form.count_ok = this.form.count - this.form.count_notok; + if(this.form.type2==10){//抽检 + this.form.count_sampling_ok = this.form.count_sampling - this.form.count_notok; + this.count_ok_rate = ((this.form.count_sampling_ok/this.form.count_sampling)*100).toFixed(2); + }else{//全检 + this.form.count_ok = this.form.count - this.form.count_notok; + this.count_ok_rate = ((this.form.count_ok/this.form.count)*100).toFixed(2); + } }, //获取物料批次 getMaterialBatch() { @@ -398,8 +432,10 @@ export default { this.count_notok_json.count_n_swen+ this.count_notok_json.count_n_hs+ this.count_notok_json.count_n_bb+ + this.count_notok_json.count_n_xbb+ this.count_notok_json.count_n_md+ - this.count_notok_json.count_n_ps; + this.count_notok_json.count_n_ps+ + this.count_notok_json.count_n_qt; if(count_notok>this.form.count_notok){ this.$notify.error("不合格数量有问题"); that.isSaveing = false; @@ -407,6 +443,9 @@ export default { if(count_notok