Commit 8881e90d authored by renjintao's avatar renjintao

订单监控

parent 8d331111
......@@ -28,7 +28,7 @@
<Record :eid="recordId" />
</Modal>
<Modal v-model="SpeedModal" title="工单信息" fullscreen footer-hide class="recordM">
<Speed :result="result" />
<Speed :result="result" :load="loading" />
</Modal>
</div>
</template>
......@@ -68,7 +68,7 @@ export default {
{
title: "序号",
type: "index",
width: 40,
width: 70,
align: "center"
},
{
......@@ -77,7 +77,8 @@ export default {
code: "plan.order.status",
align: "center",
easy: true,
high: true
high: true,
width: 100
},
{
key: "mesCode",
......@@ -273,7 +274,6 @@ export default {
}
}
},
params.row.unstartCount //未开工数
),
h(
......@@ -289,7 +289,6 @@ export default {
}
}
},
params.row.startCount //开工数
),
h(
......@@ -307,7 +306,6 @@ export default {
}
}
},
params.row.stopCount //暂停数
),
h(
......@@ -325,7 +323,7 @@ export default {
}
},
params.row.finishCount //完工数
params.row.finishCount //完成數
)
]
)
......@@ -411,7 +409,8 @@ export default {
]);
}
}
]
],
loading: false
};
},
mounted() {},
......@@ -427,15 +426,27 @@ export default {
this.recordId = id;
},
speed(row) {
this.SpeedModal = true;
Api.info({
routingHeaderId: row.routingHeaderId,
dispatchExecuteId: row.dispatchExecuteId
}).then(r => {
if (r.success) {
this.result = r.result;
}
});
if (
row.finishCount == 0 &&
row.stopCount == 0 &&
row.startCount == 0 &&
row.unstartCount == 0
) {
this.$Message.error("数据错误");
} else {
this.result = [];
this.loading = true;
this.SpeedModal = true;
Api.info({
routingHeaderId: row.routingHeaderId,
dispatchExecuteId: row.dispatchExecuteId
}).then(r => {
if (r.success) {
this.result = r.result;
this.loading = false;
}
});
}
},
suspendOk() {
this.suspendModal = false;
......
......@@ -29,7 +29,7 @@ export default {
{
title: "序号",
type: "index",
width: 60,
width: 70,
align: "center"
},
{
......
<template>
<div class="record">
<DataGrid :columns="columns" :data="result" border :tool='false' :height="820"></DataGrid>
<div v-if="load" style="width:100px;margin:0 auto;padding-top:260px;">
<Spin size="large"></Spin>
</div>
<div v-show="!load">
<DataGrid :columns="columns" :data="result" border :tool="false" :height="820" :page="false"></DataGrid>
</div>
</div>
</template>
<script>
......@@ -15,12 +20,14 @@ export default {
{
key: "detailId",
title: this.l("detailId"),
align: "center"
align: "center",
width: 100
},
{
key: "taskSeq",
title: this.l("taskSeq"),
align: "center"
align: "center",
width: 100
},
{
key: "detailName",
......@@ -97,15 +104,61 @@ export default {
{
key: "status",
title: '工单状态',
title: "工单状态",
code: "taskList.status",
align: "center"
align: "center",
width: 140,
filters: this.getArry(
this.$store.getters.dictionaryByKey("taskList.status")
),
filterMethod(value, row) {
let statusChar = row.status + "";
return statusChar.indexOf(value) > -1;
}
},
{
title: "操作",
key: "action",
width: 120,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
// h(
// "op",
// {
// attrs: { oprate: "detail" },
// on: { click: () => this.detail(params.row) }
// },
// "查看"
// ),
h(
"op",
{
attrs: { oprate: "remove" },
on: { click: () => this.edit(params.row) },
style: params.row.status == 14 ? "" : "display:none"
},
"暂停"
),
h(
"op",
{
attrs: { oprate: "edit" },
on: { click: () => this.remove(params.row) },
style: params.row.status == 5 ? "" : "display:none"
},
"分卡"
)
]);
}
}
]
],
listTask: [],
};
},
props: {
result: Array
result: Array,
load:Boolean,
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
......@@ -119,6 +172,25 @@ export default {
l(key) {
let vkey = "mes_order_watch" + "." + key;
return this.$t(vkey) || key;
},
//得到数据字典对应的label和value,用于table排序
getArry(arryList) {
let arry = [];
arryList.forEach(data => {
var that = this;
let arryObj = {};
arryObj["label"] = data.name;
arryObj["value"] = data.code;
arry.push(arryObj);
});
return arry;
}
},
watch: {
result(v) {
if (v && v.length > 0) {
this.load = false;
}
}
}
};
......
......@@ -381,7 +381,7 @@ export default {
},
remove(row) {
if (row.totalNum != row.numberAvailable) {
this.$Message.error("资源有接触不能删除");
this.$Message.error("资源有借出不能删除");
} else {
this.deletelModal = true;
this.curId = row.id;
......
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