fix:已接受的交接添加退回功能
This commit is contained in:
parent
5752485618
commit
4e3d51ebf2
|
@ -166,9 +166,16 @@
|
||||||
link
|
link
|
||||||
size="small"
|
size="small"
|
||||||
@click="table_receive(scope.row)"
|
@click="table_receive(scope.row)"
|
||||||
type="success"
|
type="primary"
|
||||||
v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time == null"
|
v-if="scope.row.recive_mgroup == mgroupId&&scope.row.submit_time == null"
|
||||||
>接收</el-button>
|
>接收</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
|
<el-button
|
||||||
link
|
link
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -408,6 +415,29 @@ export default {
|
||||||
that.$refs.table.queryData(that.query);
|
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) {
|
table_print(row) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.handoverItem = row;
|
that.handoverItem = row;
|
||||||
|
|
|
@ -542,6 +542,10 @@ export default {
|
||||||
that.form.recive_mgroup = that.form.send_mgroup;
|
that.form.recive_mgroup = that.form.send_mgroup;
|
||||||
that.form.mtype = that.mtype;
|
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){
|
if(that.mtype==20||that.mtype==30||that.type==40){
|
||||||
that.$API.wpm.handover.createsubmit.req(that.form).then((res) => {
|
that.$API.wpm.handover.createsubmit.req(that.form).then((res) => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
|
@ -553,6 +557,9 @@ export default {
|
||||||
return err;
|
return err;
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
|
if(that.form.new_batch!==''){
|
||||||
|
that.form.mtype=30;
|
||||||
|
}
|
||||||
if (that.mode == "add") {
|
if (that.mode == "add") {
|
||||||
that.$API.wpm.handover.create.req(that.form).then((res) => {
|
that.$API.wpm.handover.create.req(that.form).then((res) => {
|
||||||
that.isSaveing = false;
|
that.isSaveing = false;
|
||||||
|
|
Loading…
Reference in New Issue