Commit c5779eec authored by 周远喜's avatar 周远喜

Merge branch 'product' of http://git.mes123.com/zhouyx/mes-ui into product

parents 55c5dad0 ac1f610f
...@@ -269,9 +269,9 @@ let options = { ...@@ -269,9 +269,9 @@ let options = {
}, },
{ {
id: 2, id: 2,
label: "任务", label: "名称",
value: "label", value: "name",
width: 200, width: 100,
expander: true, expander: true,
html: true html: true
// events: { // events: {
...@@ -283,38 +283,43 @@ let options = { ...@@ -283,38 +283,43 @@ let options = {
{ {
id: 3, id: 3,
label: "设备编号", label: "设备编号",
value: "user", value: "EquipmentNo",
width: 160,
width: 130,
html: true html: true
}, },
{ {
id: 4, id: 4,
label: "开始时间", label: "计划开始时间",
value: task => dayjs(task.start).format("YYYY-MM-DD"), value: task => dayjs(task.start).format("YYYY-MM-DD"),
width: 78 width: 100
}, },
{ {
id: 5, id: 5,
label: "结束时间", label: "计划结束时间",
value: task => dayjs(task.endTime).format("YYYY-MM-DD"), value: task => dayjs(task.endTime).format("YYYY-MM-DD"),
width: 78 width: 100
}, },
{ {
id: 6, id: 6,
label: "计划数量",
value: "plan_qty",
width: 68
},
{
id: 7,
label: "投入数量", label: "投入数量",
value: "put_into_qty", value: "put_into_qty",
width: 68 width: 68
}, },
{ {
id: 7, id: 8,
label: "派工数量", label: "派工数量",
value: "dispatch_qty", value: "dispatch_qty",
width: 68 width: 68
}, },
{ {
id: 8, id: 9,
label: "%", label: "%",
value: "progress", value: "progress",
width: 35, width: 35,
...@@ -369,7 +374,7 @@ export default { ...@@ -369,7 +374,7 @@ export default {
data() { data() {
return { return {
tasks:[], tasks,
options, options,
dynamicStyle: {}, dynamicStyle: {},
lastId: 16 lastId: 16
...@@ -385,22 +390,37 @@ export default { ...@@ -385,22 +390,37 @@ export default {
Api.paged({ scheduleId: this.id }) Api.paged({ scheduleId: this.id })
.then(r => { .then(r => {
if (r.result) { if (r.result) {
var parentId = r.result[0].id; //父级id
var list = [];
var obj = {
id: r.result[0].id,
name: r.result[0].part_name,
start: r.result[0].plan_start,
endTime: r.result[0].plan_finish,
EquipmentNo: "/",
duration: 15 * 24 * 60 * 60 * 1000,
percent: 85,
plan_qty: r.result[0].plan_qty,
put_into_qty: "/",
dispatch_qty: "/"
};
list.push(obj);
Api.getdetail({ Api.getdetail({
part_task_pk: r.result[0].id, part_task_pk: r.result[0].id,
scheduleId: this.id scheduleId: this.id
}).then(r => { }).then(r => {
if (r.result) { if (r.result) {
var list = [];
for (var i = 0; i < r.result.length; i++) { for (var i = 0; i < r.result.length; i++) {
let temp = { let temp = {
id: r.result[i].op_task_pk, id: r.result[i].op_task_pk,
label: r.result[i].task_name, name: r.result[i].task_name,
user: r.result[i].equip_id, EquipmentNo: r.result[i].equip_id,
parentId: parentId,
// start: r.result[i].plan_start, // start: r.result[i].plan_start,
// endTime: r.result[i].plan_finish, // endTime: r.result[i].plan_finish,
endTime: "2020-7-30", endTime: "2020-7-30",
start: getDate(1), start: getDate(-24 * 5),
duration: (15*i) * 24 * 60 * 60 * 1000, duration: 15 * 24 * 60 * 60 * 1000,
percent: 85, percent: 85,
put_into_qty: r.result[i].put_into_qty, put_into_qty: r.result[i].put_into_qty,
dispatch_qty: r.result[i].dispatch_qty dispatch_qty: r.result[i].dispatch_qty
......
...@@ -68,7 +68,9 @@ export default { ...@@ -68,7 +68,9 @@ export default {
easySearch: { easySearch: {
keys: { op: "title,code,type,departTitle", value: null } keys: { op: "title,code,type,departTitle", value: null }
}, },
entity: {}, entity: {
isimportant: "1"
},
disabled: false, disabled: false,
ids: [], ids: [],
editModal: false, editModal: false,
...@@ -285,6 +287,8 @@ export default { ...@@ -285,6 +287,8 @@ export default {
this.$Message.error("保存失败"); this.$Message.error("保存失败");
console.warn(err); console.warn(err);
}); });
} else {
this.$Message.error("请输入必填项");
} }
}); });
}, },
......
...@@ -166,7 +166,8 @@ export default { ...@@ -166,7 +166,8 @@ export default {
title: this.l("name"), title: this.l("name"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true,
tooltip:true,
}, },
{ {
key: "phase", key: "phase",
...@@ -209,14 +210,16 @@ export default { ...@@ -209,14 +210,16 @@ export default {
key: "productName", key: "productName",
title: this.l("productName"), title: this.l("productName"),
align: "left", align: "left",
high: true high: true,
tooltip:true,
}, },
{ {
key: "departmentName", key: "departmentName",
title: this.l("departmentName"), title: this.l("departmentName"),
width: 100, width: 100,
align: "left", align: "left",
high: true high: true,
tooltip:true,
}, },
{ {
key: "isEffect", key: "isEffect",
......
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