Commit 5db20f94 authored by renjintao's avatar renjintao

mornitoring 订单监控/分卡

parent cd81a8f2
......@@ -321,7 +321,6 @@ export default {
}
}
},
params.row.finishCount //完成数
)
]
......
<template>
<div class="record">
<DataGrid :columns="columns" ref="grid" :action="action" :tool="false" :height="820"></DataGrid>
<Tabs value="name1">
<TabPane label="订单暂停记录" name="name1">
<DataGrid :columns="columns" ref="grid" :action="action" :tool="false" :height="tdHeight"></DataGrid>
</TabPane>
<TabPane label="工单暂停记录" name="name2">
<DataGrid :columns="columnsProcess" ref="gridProcess" :tool="false" :height="tdHeight"></DataGrid>
</TabPane>
</Tabs>
<Modal v-model="detailModal" title="详情" width="800">
<Detail :eid="curId" />
</Modal>
......@@ -18,6 +25,7 @@ export default {
return {
detailModal: false,
action: Api.record,
tdHeight: "",
condition: {
orderId: { op: "Equal", value: this.eid },
keys: { op: "pauseCause,", value: null }
......@@ -103,7 +111,7 @@ export default {
);
}
},
{
key: "relatedPerson",
type: "user",
......@@ -111,13 +119,81 @@ export default {
align: "left",
high: true
}
],
columnsProcess: [
{
key: "productName",
title: "工序Id",
align: "left",
width: 90
},
{
key: "productName",
title: "工序号",
align: "left",
width: 90
},
{
key: "productName",
title: "工序名称",
align: "left",
width: 350,
},
{
key: "remark",
title: "暂停原因",
align: "left"
},
{
key: "productName",
title: "暂停人",
align: "left",
high: true,
width: 180
},
{
key: "productName",
title: "暂停时间",
align: "left",
width: 180
},
{
key: "productName",
title: "恢复人",
align: "left",
width: 180
},
{
key: "productName",
title: "恢复时间",
align: "left",
width: 180
},
{
key: "productName",
title: "相关人",
align: "left",
width: "180"
}
]
};
},
props: {
eid: Number
},
created() {},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight;
this.tdHeight = window.screenHeight - 180;
})();
};
},
created() {
this.tdHeight = window.innerHeight - 180;
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
......
......@@ -6,23 +6,67 @@
<div v-show="!load">
<DataGrid :columns="columns" :data="result" border :tool="false" :height="820" :page="false"></DataGrid>
</div>
<Modal v-model="modalSplit" title="订单分卡" width="800">
<Form model="entity" label-width="100">
<Row >
<Col span="24">
<FormItem label="选择序列号"></FormItem>
</Col>
<Col span="24">
<FormItem label="选择分卡原因"></FormItem>
</Col>
<Col span="24">
<FormItem label="备注说明"></FormItem>
</Col>
<Col span="24">
<FormItem label="选择序列号"></FormItem>
</Col>
</Row>
</Form>
<Modal v-model="modalSplit" title="订单分卡" width="650" footer-hide>
<div slot="close">
<Icon type="ios-close" size="31" color="gray" @click="handleClose" />
</div>
<Form :model="entity" ref="form" :label-width="110" :rules="rules">
<Row>
<Col span="24">
<FormItem label="选择序列号" prop="num">
<Select v-model="entity.num" multiple>
<Option
v-for="(item,index) in numList"
:value="item.value"
:key="index"
>{{ item.label }}</Option>
</Select>
</FormItem>
</Col>
<Col span="24">
<FormItem label="选择分卡原因" prop="reason">
<Select v-model="entity.reason" style="width:260px">
<Option
v-for="(item,index) in reasonList"
:value="item.value"
:key="index"
>{{ item.label }}</Option>
</Select>
</FormItem>
</Col>
<Col span="24">
<FormItem label="备注说明">
<Input v-model="entity.remark" placeholder type="textarea" :rows="3" />
</FormItem>
</Col>
<!--
<Col span="14">
<FormItem label prop="action">
<RadioGroup v-model="entity.action" @on-change="onchangeAction">
<Radio :label="1">暂停</Radio>
<Radio :label="2">继续</Radio>
<Radio :label="3">移入排产</Radio>
</RadioGroup>
</FormItem>
</Col>
<Col span="10" v-if="entity.action===3">
<FormItem label prop="scheduleType">
<Dictionary
code="aps.plan.scheduleType"
v-model="entity.scheduleType"
class="scheduleTypeSelect"
></Dictionary>
</FormItem>
</Col>
-->
</Row>
</Form>
<Row>
<Col span="24" style="text-align:right;height:60px;line-height:60px">
<Button type="primary" @click="splitOk">确定分卡</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</Col>
</Row>
</Modal>
</div>
</template>
......@@ -34,8 +78,14 @@ export default {
data() {
return {
modalSplit:false,
entity:{},
modalSplit: false,
entity: {
num: [], //序列号组合
reason: null, //分卡原因
remark: "", //备注信息
action: null, //操作
scheduleType: null //排产类型
},
columns: [
{
key: "detailId",
......@@ -128,7 +178,7 @@ export default {
code: "taskList.status",
align: "center",
width: 140,
filters: this.getArry(
filters: this.$u.getArry(
this.$store.getters.dictionaryByKey("taskList.status")
),
filterMethod(value, row) {
......@@ -143,38 +193,38 @@ export default {
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
// h(
// "op",
// {
// attrs: { oprate: "detail" },
// on: { click: () => this.detail(params.row) }
// },
// "查看"
// ),
h(
"op",
{
props: { oprate: "delete",title:"操作信息",msg:"确定暂停工序:"+params.row.detailName+"?" },
props: {
oprate: "delete",
title: "暂停",
msg: "确定暂停工序:" + params.row.detailName + "?"
},
style: params.row.status == 14 ? "" : "display:none",
on: { click: () => this.pause(params.row) },
on: { click: () => this.pause(params.row) }
},
"暂停"
),
h(
"op",
{
attrs: { oprate: "edit" },
style: params.row.status == 12 ? "" : "display:none",
on: { click: () => this.split(params.row) },
props: { oprate: "edit", title: "分卡" },
style: params.row.status == 5 ? "" : "display:none",
on: { click: () => this.split(params.row) }
},
"分卡"
),
h(
h(
"op",
{
props: { oprate: "delete",msg:"确定继续执行工序:"+params.row.detailName+"?" },
style: params.row.status == 5 ? "" : "display:none",
on: { click: () => this.continue(params.row) },
props: {
oprate: "delete",
title: "继续",
msg: "确定继续执行工序:" + params.row.detailName + "?"
},
style: params.row.status == 5 ? "" : "display:none",
on: { click: () => this.continue(params.row) }
},
"继续"
)
......@@ -183,26 +233,141 @@ export default {
}
],
listTask: [],
numList: [
{
value: 1,
label: "SKJC-001"
},
{
value: 2,
label: "SKJC-002"
},
{
value: 3,
label: "SKJC-003"
},
{
value: 4,
label: "SKJC-004"
},
{
value: 5,
label: "SKJC-005"
},
{
value: 6,
label: "SKJC-006"
}
],
reasonList: [
{
value: 1,
label: "分卡原因1"
},
{
value: 2,
label: "分卡原因2"
},
{
value: 3,
label: "分卡原因3"
}
],
rules: {
num: [
{
required: true,
message: "请选择分卡原因",
trigger: "change",
type: "array"
}
],
reason: [
{
required: true,
message: "请选择分卡原因",
trigger: "change",
type: "number"
}
],
action: [
{
required: true,
message: "请选择操作",
trigger: "change",
type: "number"
}
],
scheduleType: [
{
required: true,
message: "请选择排产类型",
trigger: "change",
type: "number"
}
]
}
};
},
props: {
result: Array,
load:Boolean,
load: Boolean
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
created() {},
methods: {
split(row){//工单分卡
alert(JSON.stringify(row))
this.modalSplit=true
split(row) {
//工单分卡
this.modalSplit = true;
},
onchangeAction(val) {
//选择移入排产时显示排产模型下拉框
if (val != 3) {
this.entity.scheduleType = null;
}
},
splitOk() {
//确定分卡
this.$refs.form.validate(valid => {
if (valid) {
let params = {
num: this.entity.num,
reason: this.entity.reason,
remark: this.entity.remark,
action: this.entity.action,
scheduleType: this.entity.scheduleType
};
alert(JSON.stringify(params));
this.handleClose();
} else {
this.modalSplit = true;
}
});
},
handleClose() {
//取消分卡
this.entityReset();
this.modalSplit = false;
},
pause(row){//暂停工单
alert(JSON.stringify(row))
entityReset() {
//重置分卡项目
this.entity = {
num: [],
reason: null,
remark: "",
action: null,
scheduleType: null
};
},
continue(row){//继续工单
alert(JSON.stringify(row))
pause(row) {
//暂停工单
alert(JSON.stringify(row));
},
continue(row) {
//继续工单
alert(JSON.stringify(row));
},
//截取字符串
sliceStr(str, lenS, lenE) {
......@@ -211,18 +376,6 @@ 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: {
......@@ -234,5 +387,13 @@ export default {
}
};
</script>
<style lang='less'>
<style lang='less' scope>
.scheduleTypeSelect {
display: inline;
width: 180px;
margin-left: -110px;
.ivu-select {
width: 180px;
}
}
</style>
\ No newline at end of file
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