Commit 8881e90d authored by renjintao's avatar renjintao

订单监控

parent 8d331111
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<Record :eid="recordId" /> <Record :eid="recordId" />
</Modal> </Modal>
<Modal v-model="SpeedModal" title="工单信息" fullscreen footer-hide class="recordM"> <Modal v-model="SpeedModal" title="工单信息" fullscreen footer-hide class="recordM">
<Speed :result="result" /> <Speed :result="result" :load="loading" />
</Modal> </Modal>
</div> </div>
</template> </template>
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
{ {
title: "序号", title: "序号",
type: "index", type: "index",
width: 40, width: 70,
align: "center" align: "center"
}, },
{ {
...@@ -77,7 +77,8 @@ export default { ...@@ -77,7 +77,8 @@ export default {
code: "plan.order.status", code: "plan.order.status",
align: "center", align: "center",
easy: true, easy: true,
high: true high: true,
width: 100
}, },
{ {
key: "mesCode", key: "mesCode",
...@@ -273,7 +274,6 @@ export default { ...@@ -273,7 +274,6 @@ export default {
} }
} }
}, },
params.row.unstartCount //未开工数 params.row.unstartCount //未开工数
), ),
h( h(
...@@ -289,7 +289,6 @@ export default { ...@@ -289,7 +289,6 @@ export default {
} }
} }
}, },
params.row.startCount //开工数 params.row.startCount //开工数
), ),
h( h(
...@@ -307,7 +306,6 @@ export default { ...@@ -307,7 +306,6 @@ export default {
} }
} }
}, },
params.row.stopCount //暂停数 params.row.stopCount //暂停数
), ),
h( h(
...@@ -325,7 +323,7 @@ export default { ...@@ -325,7 +323,7 @@ export default {
} }
}, },
params.row.finishCount //完工数 params.row.finishCount //完成數
) )
] ]
) )
...@@ -411,7 +409,8 @@ export default { ...@@ -411,7 +409,8 @@ export default {
]); ]);
} }
} }
] ],
loading: false
}; };
}, },
mounted() {}, mounted() {},
...@@ -427,6 +426,16 @@ export default { ...@@ -427,6 +426,16 @@ export default {
this.recordId = id; this.recordId = id;
}, },
speed(row) { speed(row) {
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; this.SpeedModal = true;
Api.info({ Api.info({
routingHeaderId: row.routingHeaderId, routingHeaderId: row.routingHeaderId,
...@@ -434,8 +443,10 @@ export default { ...@@ -434,8 +443,10 @@ export default {
}).then(r => { }).then(r => {
if (r.success) { if (r.success) {
this.result = r.result; this.result = r.result;
this.loading = false;
} }
}); });
}
}, },
suspendOk() { suspendOk() {
this.suspendModal = false; this.suspendModal = false;
......
...@@ -29,7 +29,7 @@ export default { ...@@ -29,7 +29,7 @@ export default {
{ {
title: "序号", title: "序号",
type: "index", type: "index",
width: 60, width: 70,
align: "center" align: "center"
}, },
{ {
......
<template> <template>
<div class="record"> <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> </div>
</template> </template>
<script> <script>
...@@ -15,12 +20,14 @@ export default { ...@@ -15,12 +20,14 @@ export default {
{ {
key: "detailId", key: "detailId",
title: this.l("detailId"), title: this.l("detailId"),
align: "center" align: "center",
width: 100
}, },
{ {
key: "taskSeq", key: "taskSeq",
title: this.l("taskSeq"), title: this.l("taskSeq"),
align: "center" align: "center",
width: 100
}, },
{ {
key: "detailName", key: "detailName",
...@@ -97,15 +104,61 @@ export default { ...@@ -97,15 +104,61 @@ export default {
{ {
key: "status", key: "status",
title: '工单状态', title: "工单状态",
code: "taskList.status", 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: { props: {
result: Array result: Array,
load:Boolean,
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
...@@ -119,6 +172,25 @@ export default { ...@@ -119,6 +172,25 @@ export default {
l(key) { l(key) {
let vkey = "mes_order_watch" + "." + key; let vkey = "mes_order_watch" + "." + key;
return this.$t(vkey) || 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 { ...@@ -381,7 +381,7 @@ export default {
}, },
remove(row) { remove(row) {
if (row.totalNum != row.numberAvailable) { if (row.totalNum != row.numberAvailable) {
this.$Message.error("资源有接触不能删除"); this.$Message.error("资源有借出不能删除");
} else { } else {
this.deletelModal = true; this.deletelModal = true;
this.curId = row.id; 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