Commit 858f96a8 authored by 周远喜's avatar 周远喜

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

parents d80c7bb2 4f65acef
...@@ -1108,6 +1108,7 @@ export default { ...@@ -1108,6 +1108,7 @@ export default {
efficiency_value: '效率系数', efficiency_value: '效率系数',
singleout: '单件产出', singleout: '单件产出',
first_equip: '首选资源', first_equip: '首选资源',
firsT_EQUIP_CODE: '首选资源编号',
equip_type: '设备类型', equip_type: '设备类型',
cal_id: '连班策略', cal_id: '连班策略',
machine_rule: '设备优先规则', machine_rule: '设备优先规则',
......
...@@ -144,8 +144,9 @@ export default { ...@@ -144,8 +144,9 @@ export default {
key: "firsT_EQUIP_CODE", key: "firsT_EQUIP_CODE",
title: this.l("first_equip"), title: this.l("first_equip"),
align: "left", align: "left",
easy: true, render: (h, params) => { //test:PCZYBZBH_20200804_1 params.row.firsT_EQUIP_CODE
high: true return h("span", {}, this.getResourceName(params.row.firsT_EQUIP_CODE))
}
}, },
{ {
key: "setup_time", key: "setup_time",
...@@ -366,7 +367,9 @@ export default { ...@@ -366,7 +367,9 @@ export default {
count: 0 //生产计划数量 count: 0 //生产计划数量
}, },
//设置参数结束 //设置参数结束
rowData: {} //编辑时传入行数据 rowData: {}, //编辑时传入行数据
resources: [],
types: [],
}; };
}, },
mounted() { mounted() {
...@@ -378,6 +381,10 @@ export default { ...@@ -378,6 +381,10 @@ export default {
}) { }) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
created() {
this.types = this.$store.getters.dictionaryByKey("aps.resource.type");
this.getResource();
},
methods: { methods: {
//根据点击副组件传过来id进行加载数据 //根据点击副组件传过来id进行加载数据
loadData(expendId) { loadData(expendId) {
...@@ -499,6 +506,36 @@ export default { ...@@ -499,6 +506,36 @@ export default {
this.deletedlModal = false; this.deletedlModal = false;
this.insertlModal = false; this.insertlModal = false;
}, },
//根据firsT_EQUIP_CODE返回对应的首选资源
getResourceName(code) {
let name = ""
let resources = this.$u.clone(this.resources);
if (code && code != '') {
resources.forEach(e => {
if (e.code == code) {
let type = e.type
this.types.forEach(el => {
if (type && type != '' && el.code == e.type) {
name = el.name + "/" + e.title
}
})
}
})
}
return name;
},
//获取首选资源所有的数据
getResource() {
let url = `${systemUrl}/planresource/list`;
let name = ""
this.$api
.post(url, {
pageSize: 2000
})
.then(r => {
this.resources = r.result;
});
},
l(key) { l(key) {
let vkey = "mes_op_task_plan_simulate" + "." + key; let vkey = "mes_op_task_plan_simulate" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
......
...@@ -514,7 +514,7 @@ export default { ...@@ -514,7 +514,7 @@ export default {
this.$http.order.batchstart(this.dataListRetrun).then(res => { this.$http.order.batchstart(this.dataListRetrun).then(res => {
if (res.success) { if (res.success) {
this.$Message.success("工艺规程送审成功!"); this.$Message.success("工艺规程送审成功!");
this.loaddata(); this.search();
//this.easySearch('') //this.easySearch('')
} else { } else {
this.$Message.error("工艺规程送审失败!"); this.$Message.error("工艺规程送审失败!");
......
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