fix:光子添加库存检验撤回

This commit is contained in:
shijing 2024-04-22 15:36:06 +08:00
parent 02b03770c3
commit e02c11634d
3 changed files with 78 additions and 32 deletions

View File

@ -162,6 +162,13 @@ export default {
data);
}
},
test_revert: {
name: "撤销检验",
req: async function(id){
return await http.post(
`${config.API_URL}/inm/mioitem/${id}/test_revert/`);
}
},
testpurin: {
name: "入场检验",
req: async function(id,data){

View File

@ -84,13 +84,27 @@
</el-table-column>
<el-table-column label="数量" prop="count">
</el-table-column>
<el-table-column label="组合件信息" v-if="cate=='good'" width="300">
<el-table-column
label="组合件信息"
v-if="cate == 'good'"
width="300"
>
<template #default="scope">
<div v-if="scope.row.assemb.length>0">
<div v-for="item in scope.row.assemb" :key="item.id">
<div>{{ scope.row.material_name }}
<span style="color:gray; font-size: 12px;">:</span>{{ scope.row.batch }}
<span style="color:gray; font-size: 12px;">:</span>{{ scope.row.rate }}
<div v-if="scope.row.assemb.length > 0">
<div
v-for="item in scope.row.assemb"
:key="item.id"
>
<div>
{{ scope.row.material_name }}
<span
style="color: gray; font-size: 12px"
>:</span
>{{ scope.row.batch }}
<span
style="color: gray; font-size: 12px"
>:</span
>{{ scope.row.rate }}
</div>
</div>
</div>
@ -111,7 +125,6 @@
width="100px"
>
<template #default="scope">
<!-- <el-link type="primary" @click="table_check(scope.row)" v-if="mioObj.state==20&&mioObj.type=='do_in'"> -->
<el-button
link
type="primary"
@ -135,6 +148,17 @@
>
查看
</el-button>
<el-button
link
type="danger"
@click="check_reSet(scope.row)"
v-if="
scope.row.test_date !== null &&
type == 'do_in'
"
>
撤回
</el-button>
<el-button
link
type="danger"
@ -233,20 +257,7 @@ export default {
this.$refs.saveDialog.open("add", this.mioObj.type);
});
},
//
table_edit(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("edit").setData(row);
});
},
//
table_show(row) {
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("show").setData(row);
});
},
//
table_del(row) {
this.$confirm(`确定删除吗?`, "提示", {
@ -266,14 +277,16 @@ export default {
})
.catch(() => {});
},
//
table_check(row) {
this.mioitemId = row.id;
this.objitem = row;
this.dialog.check = true;
this.$nextTick(() => {
this.$refs.checkDialog.open("add");
this.$refs.checkDialog.open("add").setData(row);
});
},
//
check_Show(row) {
this.mioitemId = row.id;
this.objitem = row;
@ -282,6 +295,26 @@ export default {
this.$refs.checkDialog.open("show").setData(row);
});
},
//
check_edit(row) {
this.mioitemId = row.id;
this.objitem = row;
this.dialog.check = true;
this.$nextTick(() => {
this.$refs.checkDialog.open("edit").setData(row);
});
},
//
check_reSet(row) {
this.$confirm(`确定撤回吗?`, "提示", {
type: "warning",
}).then(() => {
this.$API.inm.mioitem.test_revert.req(row.id).then((res) => {
this.$message.success("撤回成功");
this.$refs.table.refresh();
});
});
},
//
handleSaveSuccess(data, mode) {
if (mode == "add") {

View File

@ -738,7 +738,7 @@
</el-main>
<el-footer v-if="mode == 'add'">
<el-button type="primary" :loading="isSaveing" @click="submit"
>保存</el-button
>提交</el-button
>
<el-button @click="visible = false">取消</el-button>
</el-footer>
@ -829,11 +829,13 @@ export default {
if (that.type == "do_in" && that.cate == "good") {
this.form.count_notok = 0;
this.form.count_n_hs = 0;
this.form.count_n_zs = 0;
this.form.count_n_cs = 0;
this.form.count_n_zz = 0;
this.form.count_n_tw = 0;
this.form.count_n_d = 0;
this.form.count_n_zdd = 0;
this.form.count_n_zw = 0;
this.form.count_n_dl = 0;
//
this.form.count_n_qp = 0;
this.form.count_n_bl = 0;
@ -844,10 +846,10 @@ export default {
//
this.form.count_n_qx = 0;
this.form.count_n_js = 0;
this.form.count_n_tydu = 0;
this.form.count_n_tydd = 0;
this.form.count_n_sw = 0;
this.form.count_n_bhpcd = 0;
this.form.count_n_w = 0;
this.form.count_n_wq = 0;
}
},
methods: {
@ -911,11 +913,13 @@ export default {
if (that.type == "do_in" && that.cate == "good") {
this.form.count_notok =
this.form.count_n_hs +
this.form.count_n_zs +
this.form.count_n_cs +
this.form.count_n_zz +
this.form.count_n_tw +
this.form.count_n_d +
this.form.count_n_zdd +
this.form.count_n_zw +
this.form.count_n_dl +
//
this.form.count_n_qp +
this.form.count_n_bl +
@ -926,10 +930,10 @@ export default {
//
this.form.count_n_qx +
this.form.count_n_js +
this.form.count_n_tydu +
this.form.count_n_tydd +
this.form.count_n_sw +
this.form.count_n_bhpcd +
this.form.count_n_w;
this.form.count_n_wq;
}
},
//
@ -958,11 +962,13 @@ export default {
if (that.type == "do_in" && that.cate == "good") {
this.form.count_notok =
this.form.count_n_hs +
this.form.count_n_zs +
this.form.count_n_cs +
this.form.count_n_zz +
this.form.count_n_tw +
this.form.count_n_d +
this.form.count_n_zdd +
this.form.count_n_zw +
this.form.count_n_dl +
//
this.form.count_n_qp +
this.form.count_n_bl +
@ -973,10 +979,10 @@ export default {
//
this.form.count_n_qx +
this.form.count_n_js +
this.form.count_n_tydu +
this.form.count_n_tydd +
this.form.count_n_sw +
this.form.count_n_bhpcd +
this.form.count_n_w;
this.form.count_n_wq;
}
that.$refs.dialogForm.validate(async (valid) => {
if (valid) {