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

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

parents 728be2ca f3a60094
......@@ -30,7 +30,6 @@ export default {
},
title: {
type: String,
default:'确定'
},
msg: {
type: String,
......
......@@ -43,12 +43,12 @@ henq.isArray = u => {
return Object.prototype.toString.call(u) == '[object Array]';
}
henq.toIntArray = u => {
if(henq.isNull(u)){
if (henq.isNull(u)) {
return [];
}
var arrs=u.split(',')
var result=[];
arrs.map(p=>{
var arrs = u.split(',')
var result = [];
arrs.map(p => {
result.push(parseInt(p));
})
return result;
......@@ -96,7 +96,7 @@ henq.getDate = (strDate) => {
}).match(/\d+/g) + ')');
return date;
}
henq.group=(array, f)=> {
henq.group = (array, f) => {
const groups = {};
array.forEach(function (o) {
const group = JSON.stringify(f(o));
......@@ -122,7 +122,7 @@ henq.toTree = (list, rootId, format, parentFiledName) => {
if (format) {
format(u)
}
u.children = toTree(data, u.id, level)
u.children = toTree(data, u.id, level)
})
}
return parents;
......@@ -130,19 +130,20 @@ henq.toTree = (list, rootId, format, parentFiledName) => {
return toTree(list, rootId, i)
}
henq.treeToList = (tree) => {
let list=[];
let list = [];
function treeToList(data) {
data.map(u=>{
if(u.children){
treeToList(u.children,u)
data.map(u => {
if (u.children) {
treeToList(u.children, u)
}
let copy=henq.clone(u);
let copy = henq.clone(u);
delete copy.delete;
copy.parent=u;
copy.parent = u;
list.push(copy);
})
}
treeToList(tree,null)
treeToList(tree, null)
return list;
}
//导出pdf
......@@ -169,4 +170,15 @@ henq.outPdf = (ele, fileName) => {
window.open("/static/pdf.html", '_blank');
}, 1000)
}
export default henq;
\ No newline at end of file
henq.getArry = (arryList) => {//得到数据字典对应的label和value,用于table排序
let arry = [];
arryList.forEach(data => {
var that = this;
let arryObj = {};
arryObj["label"] = data.name;
arryObj["value"] = data.code;
arry.push(arryObj);
});
return arry;
}
export default henq;
......@@ -310,7 +310,7 @@ export default {
h(
"op",
{
attrs: { oprate: "detail" },
attrs: { oprate: "detail",title: params.row.mainRoutingSetStatus == 0? "工艺派发": "移入排产"},
style: {
color: params.row.mainRoutingSetStatus == 0 ? "red" : ""
},
......@@ -331,7 +331,7 @@ export default {
h(
"op",
{
attrs: { oprate: "detail" },
attrs: { oprate: "detail",title: params.row.isSupportingFinish == 2|| params.row.isSupportingFinish == 3? "配套派发": "" },
style: {
color: params.row.mainRoutingSetStatus == 0 ? "red" : ""
},
......
......@@ -166,7 +166,8 @@ export default {
"op",
{
attrs: {
oprate: "detail"
oprate: "detail",
title: this.tabIndex == 2? "审核": "查看"
},
on: {
click: () => {
......
......@@ -68,7 +68,8 @@ export default {
"op",
{
attrs: {
oprate: "add"
oprate: "add",
title:"查看"
},
on: {
click: () => {
......
......@@ -297,7 +297,7 @@ export default {
h(
"op",
{
attrs: { oprate: "detail" },
attrs: { oprate: "detail",title: "查看" },
on: { click: () => this.detail(params.row) }
},
"查看"
......@@ -305,7 +305,7 @@ export default {
h(
"op",
{
attrs: { oprate: "edit" },
attrs: { oprate: "edit",title: "编辑" },
on: { click: () => this.edit(params.row) },
style:
(params.row.status == 1 &&
......@@ -321,7 +321,7 @@ export default {
h(
"op",
{
attrs: { oprate: "remove" },
attrs: { oprate: "remove",title: "删除" },
on: { click: () => this.remove(params.row) },
style:
(params.row.status == 1 &&
......@@ -336,7 +336,7 @@ export default {
h(
"op",
{
attrs: { oprate: "detail" },
attrs: { oprate: "detail",title: "分解" },
on: { click: () => this.split(params.row) },
style:
(params.row.divideMark != 0 &&
......
......@@ -321,7 +321,6 @@ export default {
}
}
},
params.row.finishCount //完成数
)
]
......@@ -345,7 +344,7 @@ export default {
h(
"op",
{
attrs: { oprate: "record", class: "edit" },
attrs: { oprate: "record", class: "edit",title:'暂停记录' },
on: { click: () => this.record(params.row.id) }
},
"暂停记录"
......
<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"); // 加载数据字典
},
......
This diff is collapsed.
......@@ -371,7 +371,7 @@ export default {
"op",
{
attrs: {
oprate: "detail"
oprate: "detail",title: "预览"
},
on: {
click: () => {
......@@ -390,7 +390,7 @@ export default {
"op",
{
attrs: {
oprate: "detail"
oprate: "detail",title: "编辑"
},
on: {
click: () => {
......
......@@ -357,7 +357,7 @@ export default {
"op",
{
attrs: {
oprate: "detail"
oprate: "detail",title: "预览"
},
on: {
click: () => {
......@@ -376,7 +376,7 @@ export default {
"op",
{
attrs: {
oprate: "detail"
oprate: "detail",title: "编辑"
},
on: {
click: () => {
......
......@@ -129,7 +129,7 @@ export default {
"op",
{
attrs: {
oprate: "detail"
oprate: "detail",title: "查看合格证"
},
on: { click: () => this.detail(params.row.id) }
},
......
......@@ -316,7 +316,7 @@ export default {
"op",
{
attrs: {
oprate: "detail"
oprate: "detail",title: "检验"
},
on: {
click: () => {
......
......@@ -285,7 +285,7 @@ export default {
"op",
{
attrs: {
oprate: "detail"
oprate: "detail",title: "设置最低库存"
},
on: { click: () => this.setNum(params.row) }
},
......
......@@ -290,7 +290,7 @@ export default {
"op",
{
attrs: {
oprate: "detail"
oprate: "detail",title: "修改"
},
on: { click: () => this.edit(params.row.id) }
},
......@@ -300,7 +300,7 @@ export default {
"op",
{
attrs: {
oprate: "delete"
oprate: "delete",title: "删除"
},
class:
params.row.totalNum === params.row.numberAvailable
......@@ -314,7 +314,7 @@ export default {
"op",
{
attrs: {
oprate: "detail"
oprate: "detail",title: "查看日志"
},
on: { click: () => this.logDetail(params.row.id) }
},
......
......@@ -536,7 +536,7 @@ export default {
{
attrs: {
oprate: "detail",
class: "edit"
class: "edit",title: "设置日历"
},
on: {
click: () => {
......
......@@ -573,7 +573,8 @@ export default {
{
attrs: {
oprate: "detail",
class: "edit"
class: "edit",
title: "编辑"
},
on: {
click: () => {
......@@ -587,7 +588,7 @@ export default {
"op",
{
attrs: {
oprate: "delete"
oprate: "delete",title: "删除"
},
style: {
color: "red"
......@@ -604,7 +605,7 @@ export default {
"op",
{
attrs: {
oprate: "detail"
oprate: "detail",title: "保养"
},
on: {
click: () => {
......@@ -618,7 +619,7 @@ export default {
"op",
{
attrs: {
oprate: "detail"
oprate: "detail",title: "维修"
},
on: {
click: () => {
......
......@@ -147,7 +147,8 @@ export default {
{
attrs: {
oprate: "detail",
class: "edit"
class: "edit",
title: "编辑"
},
on: {
click: () => {
......@@ -161,7 +162,7 @@ export default {
"op",
{
attrs: {
oprate: "delete"
oprate: "delete",title: "删除"
},
style: {
color: "red"
......
......@@ -178,7 +178,7 @@ export default {
h(
"op",
{
attrs: { oprate: "remove" },
attrs: { oprate: "remove",title: "删除" },
on: { click: () => this.remove(params.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