Commit e358b135 authored by 仇晓婷's avatar 仇晓婷

参数页面

parent fbf67285
......@@ -1056,9 +1056,10 @@ export default {
calId: '连班策略',
overTime: '六日加班',
isDiscrete: '是否离散',
multipleEquip: "是否多台安排设备",// 否 是
multipleEquip: "多台分配",// 否 是
multipleEquipIds: "设备id", //用英文逗号分隔
discrete: '离散值',
},
routing_detail: {
id: '',
......
......@@ -98,8 +98,8 @@
<div class="duo">
<Row>
<Col :span="12">
<FormItem :label="l('multi_machine')" prop="multi_machine">
<i-switch v-model="entity.switch4" size="large">
<FormItem :label="l('multipleEquip')" prop="multipleEquip">
<i-switch v-model="entity.multipleEquip" size="large">
<span slot="open">On</span>
<span slot="close">Off</span>
</i-switch>
......@@ -135,7 +135,7 @@
<div class="left-donw right-down">
<p class="title-c">参数应用</p>
<div class="slider">
<Slider v-model="entity.value2" :step="33.3" show-stops></Slider>
<Slider v-model="entity.flog" :step="33.3" show-stops></Slider>
<div class="slow">工序</div>
<div class="ding">订单</div>
<div class="ling">零件</div>
......@@ -154,15 +154,24 @@
<script>
import Api from "./api";
export default {
props: {
eid: Object
},
data() {
return {
entity: {
partTaskPk: null, //订单ID,
opTaskPk: 0, //工单ID,
taskSeq: null, // "工序号",
flog: 0, //参数应用
planMethod: "转序规则", // 平行 重叠
shopId: null,
level: 100,
multipleEquipIds: [], //设备
value2: 100
multipleEquip: false,
plan_method: false,
overTime: false,
isDiscrete: false
},
list: [],
......@@ -179,7 +188,7 @@ export default {
mounted() {
this.getCal(); //获取连班策略
this.apsGet(); //获取参数级别和转序等的关系
this.initTree(); //获取当前登录人所在车间下的所有部门
this.initTree(); //获取当前登录人所在车间下的所有部门:班组结构
this.multiple(0); //获取任务工单相关设备
},
methods: {
......@@ -196,8 +205,8 @@ export default {
// }
});
},
handleSubmit() {
this.entity.multipleEquipIds = this.entity.multipleEquipIds.join(",");
this.$refs.form.validate(valid => {
if (valid) {
Api.apsschedulupdateparameter(this.entity).then(res => {
......@@ -255,7 +264,7 @@ export default {
//shop_id 班组ID 可以为0
Api.gettaskequips({
part_task_pk: 0,
op_pk: 0,
op_pk: this.entity.opTaskPk,
shop_id: id
})
.then(r => {
......@@ -280,6 +289,24 @@ export default {
let vkey = "mes_op_task_plan_simulate" + "." + key;
return this.$t(vkey) || key;
}
},
watch: {
eid: {
handler(newVal, oldVal) {
// console.log(newVal)
// this.entity = newVal;
this.entity.partTaskPk = newVal.part_task_pk; //订单ID,
this.entity.opTaskPk = newVal.id; //工单ID,
this.entity.taskSeq = newVal.task_seq; //工序号
this.entity.calId = newVal.taskseq_des; //连班策略
this.entity.overTime = newVal.routing_detail_id; //六日加班
this.entity.isDiscrete = newVal.routing_header_id; //是否离散
this.entity.multipleEquip = newVal.rule_qty; //是否多台安排设备
this.entity.plan_method = newVal.workshopcode; //重叠转序
this.entity.discrete = newVal.comb_param; //离散值
},
deep: true
}
}
};
</script>
......@@ -380,4 +407,5 @@ export default {
margin-top: 15px;
}
}
</style>
\ No newline at end of file
......@@ -20,7 +20,7 @@
<p>确定进行 {{insertTItle}} 操作?</p>
</Modal>
<Modal v-model="setParsModal" title="工序参数设置" footer-hide width="1000">
<Add :eid="curId" @on-close="cancel" />
<Add :eid="row" @on-close="cancel" />
</Modal>
</div>
</template>
......@@ -46,6 +46,7 @@ export default {
value: null
}
},
row: {},
setParsModal: false,
editModal: false,
detailModal: false,
......@@ -98,7 +99,7 @@ export default {
{
key: "part_task_pk",
title: this.l("part_task_pk"),
align: "left",
align: "center",
high: true,
hide: true
},
......@@ -106,33 +107,33 @@ export default {
{
key: "put_into_qty",
title: this.l("put_into_qty"),
align: "left",
high: true
},
{
key: "plan_start",
title: this.l("plan_start"),
align: "center",
high: true,
width: 140
high: true
},
{
key: "plan_finish",
title: this.l("plan_finish"),
key: "plan_start+'——'+plan_finish",
title: "计划时间",
align: "center",
high: true,
width: 140
},
// {
// key: "plan_finish",
// title: this.l("plan_finish"),
// align: "center",
// high: true,
// width: 140
// },
{
key: "setup_time",
title: this.l("setup_time"),
align: "right",
align: "center",
high: true
},
{
key: "run_time",
title: this.l("run_time"),
align: "right",
align: "center",
high: true
},
{
......@@ -145,27 +146,27 @@ export default {
{
key: "transport_time",
title: this.l("transport_time"),
align: "right",
align: "center",
high: true,
hide: true
},
{
key: "check_time",
title: this.l("check_time"),
align: "right",
align: "center",
high: true,
hide: true
},
{
key: "efficiency_value",
title: this.l("efficiency_value"),
align: "right",
align: "center",
high: true
},
{
key: "machine_rule",
title: this.l("machine_rule"),
align: "left",
align: "center",
easy: true,
high: true,
width: 140
......@@ -173,14 +174,14 @@ export default {
{
key: "singleout",
title: this.l("singleout"),
align: "left",
align: "center",
high: true,
hide: true
},
{
key: "first_equip",
title: this.l("first_equip"),
align: "left",
align: "center",
easy: true,
high: true,
hide: true
......@@ -188,7 +189,7 @@ export default {
{
key: "equip_type",
title: this.l("equip_type"),
align: "left",
align: "center",
easy: true,
high: true,
hide: true
......@@ -196,48 +197,48 @@ export default {
{
key: "cal_id",
title: this.l("cal_id"),
align: "left",
align: "center",
easy: true,
high: true
},
{
key: "plan_method",
title: this.l("plan_method"),
align: "left",
align: "center",
easy: true,
high: true
},
{
key: "over_time",
title: this.l("over_time"),
align: "left",
align: "center",
easy: true,
high: true
},
{
key: "isdiscrete",
title: this.l("isdiscrete"),
align: "left",
align: "center",
easy: true,
high: true
},
{
key: "discrete_value",
title: this.l("discrete_value"),
align: "left",
align: "center",
high: true
},
{
key: "multi_machine",
title: this.l("multi_machine"),
align: "left",
align: "center",
easy: true,
high: true
},
{
key: "notes",
title: this.l("notes"),
align: "left",
align: "center",
easy: true,
high: true,
hide: true
......@@ -246,7 +247,7 @@ export default {
{
key: "taskseq_des",
title: this.l("taskseq_des"),
align: "left",
align: "center",
easy: true,
high: true,
hide: true
......@@ -254,7 +255,7 @@ export default {
{
key: "workshopcode",
title: this.l("workshopcode"),
align: "left",
align: "center",
easy: true,
high: true,
hide: true
......@@ -262,21 +263,21 @@ export default {
{
key: "routing_detail_id",
title: this.l("routing_detail_id"),
align: "left",
align: "center",
high: true,
hide: true
},
{
key: "routing_header_id",
title: this.l("routing_header_id"),
align: "left",
align: "center",
high: true,
hide: true
},
{
key: "comb_param",
title: this.l("comb_param"),
align: "left",
align: "center",
easy: true,
high: true,
hide: true
......@@ -284,14 +285,14 @@ export default {
{
key: "rule_qty",
title: this.l("rule_qty"),
align: "left",
align: "center",
high: true,
hide: true
},
{
title: "操作",
key: "action",
width: 140,
width: 100,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
......@@ -299,10 +300,11 @@ export default {
attrs: {
icon: "md-options",
type: "icon",
oprate: "detail",
oprate: "edit",
title: "工序参数设置"
},
on: { click: () => this.openParms(params.row.id) }
class: "icons-h",
on: { click: () => this.openParms(params.row) }
}),
h("op", {
attrs: {
......@@ -312,6 +314,7 @@ export default {
oprate: "edit",
msg: "确认要移出排产吗?"
},
class: "icons-h",
on: { click: () => this.edit(params.row.id) }
}),
h("op", {
......@@ -322,6 +325,7 @@ export default {
oprate: "delete",
msg: "确认要刪除工序吗?"
},
class: "icons-h",
on: { click: () => this.remove(params.row, params.index) }
})
]);
......@@ -348,7 +352,7 @@ export default {
Api.getbyorderid(params).then(res => {
if (res.success) {
this.gridHeight = 50;
this.gridHeight = (res.result.length +1) * 48;
this.gridHeight = (res.result.length + 1) * 48;
this.data1 = res.result;
}
});
......@@ -381,7 +385,8 @@ export default {
//插单事件end----
//单个工序进行参设置start----
openParms(id) {
openParms(row) {
this.row = row;
this.setParsModal = true;
},
//单个工序进行参数设置end----
......@@ -409,7 +414,7 @@ export default {
}
});
},
//删除工序时间end-----
cancel() {
this.curId = 0;
......@@ -426,5 +431,12 @@ export default {
}
};
</script>
<style lang="less">
<style lang="less" scope>
.icons-h:hover {
width: 20px;
height: 20px;
line-height: 20px;
border-radius: 50%;
background-color: #aecef5;
}
</style>
\ No newline at end of file
<template>
<div>
<div class="aps-activ">
<DataGrid
:columns="columns"
ref="grid"
......@@ -172,7 +172,7 @@ export default {
align: "center",
hide: true,
resizable: true,
width: 100
width: 140
},
{
key: "demand_finish",
......@@ -200,8 +200,10 @@ export default {
attrs: {
icon: "md-options",
type: "icon",
title: "工序参数设置"
title: "工序参数设置",
oprate: "edit"
},
class: "icons-i",
on: { click: () => this.openParms(params.row.id) }
}),
h("op", {
......@@ -212,6 +214,7 @@ export default {
oprate: "delete",
msg: "确认要移出排产吗?"
},
class: "icons-i",
on: { click: () => this.remove(params.row.part_task_pk) }
}),
h("op", {
......@@ -222,6 +225,7 @@ export default {
oprate: "delete",
msg: "确认要恢复工序吗?"
},
class: "icons-i",
on: { click: () => this.refresh(params.row.part_task_pk) }
})
]);
......@@ -270,7 +274,7 @@ export default {
if (r.success) {
this.$Message.success("恢复成功");
this.list = [];
this.loadList()
this.loadList();
}
});
},
......@@ -337,29 +341,23 @@ export default {
arryIds.push(objIds);
});
parmsOrderpriority.alls = arryIds;
// alert(JSON.stringify(parmsOrderpriority));
// alert(JSON.stringify(parmsOrderpriority));
Api.orderpriority(parmsOrderpriority).then(res => {
if (res.success) {
if (res.result) {
this.$Message.success("排序成功");
//apsp排产前检查
Api.apsdatachecked().then(res1=>{
if(res1.success)
{
if(res1.result)
{
Api.apsdatachecked().then(res1 => {
if (res1.success) {
if (res1.result) {
this.$Message.success("数据校验成功");
}
else
{
} else {
this.$Message.success("数据校验失败");
}
}
else{
} else {
this.$Message.error("操作失败:数据校验");
}
})
});
} else {
this.$Message.error("排序失败,请重新APS排产操作");
}
......@@ -376,4 +374,11 @@ export default {
.drag {
cursor: move;
}
.aps-activ .icons-i:hover {
width: 20px;
height: 20px;
line-height: 20px;
border-radius: 50%;
background-color: #f5d2da;
}
</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