Commit cf92d806 authored by renjintao's avatar renjintao

mesplan---delete/send

parent 47593bf7
...@@ -328,8 +328,7 @@ export default { ...@@ -328,8 +328,7 @@ export default {
params.row.id == params.row.rootId && params.row.id == params.row.rootId &&
params.row.divideMark != 0) || params.row.divideMark != 0) ||
params.row.status != 1 params.row.status != 1
? // ||(params.row.id != params.row.rootId && this.sondeletecheck1(params.row.rootId)>0) ? "display:none"
"display:none"
: "" : ""
}, },
"删除" "删除"
...@@ -836,12 +835,25 @@ export default { ...@@ -836,12 +835,25 @@ export default {
}, },
//打开派发 //打开派发
openSendModal() { openSendModal() {
if (this.rowDataArry.length > 0) {
this.sendModal = true;
this.actIds = []; this.actIds = [];
this.delNum = 0;
if (this.rowDataArry.length > 0) {
this.rowDataArry.forEach(data => { this.rowDataArry.forEach(data => {
this.actIds.push(data.id); this.actIds.push(data.id);
if (data.status != 1) {
//判断非新建状态的订单
this.delNum += 1;
}
}); });
setTimeout(() => {
if (this.delNum > 0) {
this.$Message.error("所选的订单中有不可派发的订单!");
this.actIds = [];
this.sendModal = false;
} else {
this.sendModal = true;
}
}, 400);
} else { } else {
this.$Message.error("请选择订单"); this.$Message.error("请选择订单");
} }
...@@ -903,30 +915,27 @@ export default { ...@@ -903,30 +915,27 @@ export default {
let metCodesSingle = []; //没有子订单的订单 let metCodesSingle = []; //没有子订单的订单
let metCodesFather = []; //有子订单的原始订单 let metCodesFather = []; //有子订单的原始订单
this.actIds = []; this.actIds = [];
//alert(JSON.stringify(this.rowDataArry)); this.delNum = 0;
if (this.rowDataArry.length > 0) { if (this.rowDataArry.length > 0) {
this.rowDataArry.forEach(data => { this.rowDataArry.forEach(data => {
this.delNum = 0;
this.actIds.push(data.id); this.actIds.push(data.id);
if (data.id != data.rootId) { if (data.status != 1) {
//this.metCodesSingle.push(data.id); //判断非新建状态的订单
this.delNum += 1;
} else if (data.id != data.rootId) {
//判断子订单是否可以删除
this.sondeletecheck(data.rootId); this.sondeletecheck(data.rootId);
} }
}); });
setTimeout(() => { setTimeout(() => {
if (this.delNum > 0) { if (this.delNum > 0) {
this.$Message.error("删除的原始订单中有非新建状态的子订单!"); this.$Message.error("所选的订单中有不可删除的订单!");
this.actIds = []; this.actIds = [];
return false; this.deletelModal = false;
} else {
this.deletelModal = true;
} }
}, 400); }, 400);
this.deletelModal = true;
// this.actIds = [];
// this.rowDataArry.forEach(data => {
// this.actIds.push(data.id);
// });
} else { } else {
this.$Message.error("请选择订单"); this.$Message.error("请选择订单");
} }
...@@ -1100,7 +1109,7 @@ export default { ...@@ -1100,7 +1109,7 @@ export default {
"rootId" "rootId"
); );
this.dataT = this.$u.clone(this.dataT); this.dataT = this.$u.clone(this.dataT);
}, }
} }
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment