fix:不合格校验
This commit is contained in:
parent
061ebbb09f
commit
263a914fa9
|
|
@ -74,10 +74,26 @@
|
||||||
<el-table-column label="批次" prop="batch" min-width="100">
|
<el-table-column label="批次" prop="batch" min-width="100">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量" prop="count"></el-table-column>
|
<el-table-column label="数量" prop="count"></el-table-column>
|
||||||
<el-table-column label="类型" prop="type">
|
<el-table-column label="交接类型" prop="type">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag v-if="scope.row.type == 10">正常</el-tag>
|
<el-text
|
||||||
<el-tag v-if="scope.row.type == 20" type="danger"
|
v-if="scope.row.send_mgroup == mgroupId"
|
||||||
|
type="primary"
|
||||||
|
>交送</el-text
|
||||||
|
>
|
||||||
|
<el-text
|
||||||
|
v-if="scope.row.recive_mgroup == mgroupId"
|
||||||
|
type="success"
|
||||||
|
>接收</el-text
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" prop="type">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag v-if="scope.row.type == 10" type="success"
|
||||||
|
>正常</el-tag
|
||||||
|
>
|
||||||
|
<el-tag v-if="scope.row.type == 20" type="warning"
|
||||||
>返工</el-tag
|
>返工</el-tag
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@
|
||||||
:min="0"
|
:min="0"
|
||||||
class="width-100"
|
class="width-100"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
@change="countChange"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -72,6 +73,7 @@
|
||||||
:min="0"
|
:min="0"
|
||||||
class="width-100"
|
class="width-100"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
@change="countChange"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -82,6 +84,7 @@
|
||||||
:min="0"
|
:min="0"
|
||||||
class="width-100"
|
class="width-100"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
@change="countChange"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -92,6 +95,7 @@
|
||||||
:min="0"
|
:min="0"
|
||||||
class="width-100"
|
class="width-100"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
@change="countChange"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -102,6 +106,7 @@
|
||||||
:min="0"
|
:min="0"
|
||||||
class="width-100"
|
class="width-100"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
@change="countChange"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -112,6 +117,7 @@
|
||||||
:min="0"
|
:min="0"
|
||||||
class="width-100"
|
class="width-100"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
@change="countChange"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -122,6 +128,7 @@
|
||||||
:min="0"
|
:min="0"
|
||||||
class="width-100"
|
class="width-100"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
|
@change="countChange"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
@ -181,7 +188,17 @@ export default {
|
||||||
Object.assign(this.form, data);
|
Object.assign(this.form, data);
|
||||||
console.log(this.form);
|
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() {
|
submit() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
@ -189,17 +206,32 @@ export default {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
that.isSaveing = true;
|
that.isSaveing = true;
|
||||||
that.form.mlog = that.mlog;
|
that.form.mlog = that.mlog;
|
||||||
that.$API.wpm.mlogb.updateOut
|
this.form.count_notok =
|
||||||
.req(that.form.id, that.form)
|
this.form.count_n_hs +
|
||||||
.then((res) => {
|
this.form.count_n_qp +
|
||||||
that.isSaveing = false;
|
this.form.count_n_swen +
|
||||||
that.$emit("success");
|
this.form.count_n_bb +
|
||||||
that.visible = false;
|
this.form.count_n_md +
|
||||||
that.$message.success("操作成功");
|
this.form.count_n_xh +
|
||||||
})
|
this.form.count_n_wm;
|
||||||
.catch((err) => {
|
let sum = this.form.count_ok + this.form.count_notok;
|
||||||
that.isSaveing = false;
|
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(
|
||||||
|
"使用数量与合格数不合格数数量不对等"
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue