Commit 909c5f5d authored by 仇晓婷's avatar 仇晓婷

流水排产

parent f6b29aad
......@@ -135,7 +135,7 @@
import Set from "./set";
import Api from "./api";
export default {
name: "list",
name: "set",
components: {
Set
},
......@@ -182,11 +182,11 @@ export default {
u.aps = 0;
});
this.list = r.result;
if (r.result[0]) {
// this.tagTata(r.result[0].id);
} else {
this.result = [];
}
// if (r.result[0]) {
// this.tagTata(r.result[0].id);
// } else {
// this.result = [];
// }
} else {
this.$Message.info("排产池数据请求失败");
}
......@@ -298,58 +298,62 @@ export default {
},
//下发
lowerHair() {
var items = [];
var obj = {};
if (this.mode == 1) {
for (let i = 0; i < this.result.length; i++) {
obj = {
detailId: this.result[i].detailId,
userIds: this.result[i].userIds,
quantity: this.result[i].quantity,
beginTime: this.result[i].beginTime,
endTime: this.result[i].endTime,
remark: this.result[i].remark
if (this.orderId) {
var items = [];
var obj = {};
if (this.mode == 1) {
for (let i = 0; i < this.result.length; i++) {
obj = {
detailId: this.result[i].detailId,
userIds: this.result[i].userIds,
quantity: this.result[i].quantity,
beginTime: this.result[i].beginTime,
endTime: this.result[i].endTime,
remark: this.result[i].remark
};
items.push(obj);
}
let data = {
orderId: this.orderId,
routingHeaderId: this.routingHeaderId,
items: items
};
items.push(obj);
}
let data = {
orderId: this.orderId,
routingHeaderId: this.routingHeaderId,
items: items
};
Api.flonestepschedule(data).then(r => {
if (r.success) {
this.$Message.success("下发成功");
this.orderlist(this.status);
} else {
this.$Message.info("下发失败");
Api.flonestepschedule(data).then(r => {
if (r.success) {
this.$Message.success("下发成功");
this.orderlist(this.status);
} else {
this.$Message.info("下发失败");
}
});
} else if (this.mode == 2) {
for (let i = 0; i < this.result.length; i++) {
obj = {
detailId: this.result[i].detailId,
shopId: this.result[i].shopId,
quantity: this.result[i].quantity,
beginTime: this.result[i].beginTime,
endTime: this.result[i].endTime,
remark: this.result[i].remark
};
items.push(obj);
}
});
} else if (this.mode == 2) {
for (let i = 0; i < this.result.length; i++) {
obj = {
detailId: this.result[i].detailId,
shopId: this.result[i].shopId,
quantity: this.result[i].quantity,
beginTime: this.result[i].beginTime,
endTime: this.result[i].endTime,
remark: this.result[i].remark
let data = {
orderId: this.orderId,
routingHeaderId: this.routingHeaderId,
items: items
};
items.push(obj);
Api.fltwostepschedule(data).then(r => {
if (r.success) {
this.$Message.success("下发成功");
this.orderlist(this.status);
} else {
this.$Message.info("下发失败");
}
});
}
let data = {
orderId: this.orderId,
routingHeaderId: this.routingHeaderId,
items: items
};
Api.fltwostepschedule(data).then(r => {
if (r.success) {
this.$Message.success("下发成功");
this.orderlist(this.status);
} else {
this.$Message.info("下发失败");
}
});
} else {
this.$Message.info("请先选择排产订单");
}
},
closeOk() {
......@@ -370,7 +374,6 @@ export default {
let oks = this.result.filter(u => {
return u.aps == mode;
});
return oks.length == this.result.length;
}
}
......
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