diff --git a/src/views/wpm_gx/handover.vue b/src/views/wpm_gx/handover.vue
index 0b920f63..bd8c4639 100644
--- a/src/views/wpm_gx/handover.vue
+++ b/src/views/wpm_gx/handover.vue
@@ -74,10 +74,26 @@
-
+
- 正常
- 交送
+ 接收
+
+
+
+
+ 正常
+ 返工
diff --git a/src/views/wpm_gx/mlogb_check.vue b/src/views/wpm_gx/mlogb_check.vue
index 522659f6..791de3bc 100644
--- a/src/views/wpm_gx/mlogb_check.vue
+++ b/src/views/wpm_gx/mlogb_check.vue
@@ -62,6 +62,7 @@
:min="0"
class="width-100"
controls-position="right"
+ @change="countChange"
/>
@@ -72,6 +73,7 @@
:min="0"
class="width-100"
controls-position="right"
+ @change="countChange"
/>
@@ -82,6 +84,7 @@
:min="0"
class="width-100"
controls-position="right"
+ @change="countChange"
/>
@@ -92,6 +95,7 @@
:min="0"
class="width-100"
controls-position="right"
+ @change="countChange"
/>
@@ -102,6 +106,7 @@
:min="0"
class="width-100"
controls-position="right"
+ @change="countChange"
/>
@@ -112,6 +117,7 @@
:min="0"
class="width-100"
controls-position="right"
+ @change="countChange"
/>
@@ -122,6 +128,7 @@
:min="0"
class="width-100"
controls-position="right"
+ @change="countChange"
/>
@@ -181,7 +188,17 @@ export default {
Object.assign(this.form, data);
console.log(this.form);
},
-
+ countChange() {
+ this.form.count_notok =
+ this.form.count_n_hs +
+ this.form.count_n_qp +
+ this.form.count_n_swen +
+ this.form.count_n_bb +
+ this.form.count_n_md +
+ this.form.count_n_xh +
+ this.form.count_n_wm;
+ this.form.count_ok = this.form.count_real - this.form.count_notok;
+ },
//表单提交方法
submit() {
let that = this;
@@ -189,17 +206,32 @@ export default {
if (valid) {
that.isSaveing = true;
that.form.mlog = that.mlog;
- that.$API.wpm.mlogb.updateOut
- .req(that.form.id, that.form)
- .then((res) => {
- that.isSaveing = false;
- that.$emit("success");
- that.visible = false;
- that.$message.success("操作成功");
- })
- .catch((err) => {
- that.isSaveing = false;
- });
+ this.form.count_notok =
+ this.form.count_n_hs +
+ this.form.count_n_qp +
+ this.form.count_n_swen +
+ this.form.count_n_bb +
+ this.form.count_n_md +
+ this.form.count_n_xh +
+ this.form.count_n_wm;
+ let sum = this.form.count_ok + this.form.count_notok;
+ if (sum - this.form.count_real == 0) {
+ that.$API.wpm.mlogb.updateOut
+ .req(that.form.id, that.form)
+ .then((res) => {
+ that.isSaveing = false;
+ that.$emit("success");
+ that.visible = false;
+ that.$message.success("操作成功");
+ })
+ .catch((err) => {
+ that.isSaveing = false;
+ });
+ } else {
+ this.$message.error(
+ "使用数量与合格数不合格数数量不对等"
+ );
+ }
}
});
},