fix:已接受的交接添加退回功能

This commit is contained in:
shijing 2025-04-22 11:26:37 +08:00
parent 5752485618
commit 4e3d51ebf2
2 changed files with 38 additions and 1 deletions

View File

@ -166,9 +166,16 @@
link
size="small"
@click="table_receive(scope.row)"
type="success"
type="primary"
v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time == null"
>接收</el-button>
<el-button
link
size="small"
@click="table_reBack(scope.row)"
type="danger"
v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time!== null&&scope.row.type == 10&&scope.row.mtype == 10"
>退回</el-button>
<el-button
link
size="small"
@ -408,6 +415,29 @@ export default {
that.$refs.table.queryData(that.query);
});
},
//退
table_reBack(row){
let that = this;
let form = {};
form.send_mgroup = row.recive_mgroup;
form.recive_mgroup = row.send_mgroup;
form.handoverb =[];
row.handoverb.forEach((item) => {
let obj = {};
obj.wm = item.wm_to;
obj.batch = item.batch;
obj.count = item.count;
form.handoverb.push(obj)
})
form.send_user = that.$TOOL.data.get('USER_INFO').content.id;
form.send_date = that.$TOOL.dateFormat2(new Date());
form.type = 'back';
that.$API.wpm.handover.create.req(form).then((res) => {
that.$message.success("操作成功");
}).catch((err) => {
return err;
});
},
table_print(row) {
let that = this;
that.handoverItem = row;

View File

@ -542,6 +542,10 @@ export default {
that.form.recive_mgroup = that.form.send_mgroup;
that.form.mtype = that.mtype;
}
if(that.form.new_batch!==''){
that.form.mtype=30;
that.mtype==30
}
if(that.mtype==20||that.mtype==30||that.type==40){
that.$API.wpm.handover.createsubmit.req(that.form).then((res) => {
that.isSaveing = false;
@ -553,6 +557,9 @@ export default {
return err;
});
}else{
if(that.form.new_batch!==''){
that.form.mtype=30;
}
if (that.mode == "add") {
that.$API.wpm.handover.create.req(that.form).then((res) => {
that.isSaveing = false;