Commit 62b9e3b6 authored by 仇晓婷's avatar 仇晓婷

Merge branch 'qin'

parents 26ffb489 e358b135
...@@ -1056,9 +1056,10 @@ export default { ...@@ -1056,9 +1056,10 @@ export default {
calId: '连班策略', calId: '连班策略',
overTime: '六日加班', overTime: '六日加班',
isDiscrete: '是否离散', isDiscrete: '是否离散',
multipleEquip: "是否多台安排设备",// 否 是 multipleEquip: "多台分配",// 否 是
multipleEquipIds: "设备id", //用英文逗号分隔 multipleEquipIds: "设备id", //用英文逗号分隔
discrete: '离散值', discrete: '离散值',
}, },
routing_header:{ routing_header:{
id:'', id:'',
......
...@@ -98,8 +98,8 @@ ...@@ -98,8 +98,8 @@
<div class="duo"> <div class="duo">
<Row> <Row>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('multi_machine')" prop="multi_machine"> <FormItem :label="l('multipleEquip')" prop="multipleEquip">
<i-switch v-model="entity.switch4" size="large"> <i-switch v-model="entity.multipleEquip" size="large">
<span slot="open">On</span> <span slot="open">On</span>
<span slot="close">Off</span> <span slot="close">Off</span>
</i-switch> </i-switch>
...@@ -117,22 +117,17 @@ ...@@ -117,22 +117,17 @@
v-for="(item,index) in list" v-for="(item,index) in list"
:key="index" :key="index"
:value="item.value" :value="item.value"
:label="item.title" :label="item.label"
style="display:none" style="display:none"
></Option> ></Option>
<Tree key="mytree" :data="data1" ref="mytree" :render="renderContent"></Tree> <Tree key="mytree" :data="data1" ref="mytree" :render="renderContent"></Tree>
</Select> </Select>
</FormItem> </FormItem>
<div class="check-box"> <div class="check-box">
<CheckboxGroup v-model="entity.fruit"> <CheckboxGroup v-model="entity.multipleEquipIds">
<Checkbox label="10985553333(数控车床 车工班)"></Checkbox> <div v-for="(item,index) in checkList" :key="index" class="check-item">
<br /> <Checkbox :label="item.equip_pk">{{item.equip_name}}</Checkbox>
<Checkbox label="10985553333(数控车床 车工班)"></Checkbox> </div>
<br />
<Checkbox label="10985553333(数控车床 车工班)"></Checkbox>
<br />
<Checkbox label="10985553333(数控车床 车工班)"></Checkbox>
<br />
</CheckboxGroup> </CheckboxGroup>
</div> </div>
</div> </div>
...@@ -140,7 +135,7 @@ ...@@ -140,7 +135,7 @@
<div class="left-donw right-down"> <div class="left-donw right-down">
<p class="title-c">参数应用</p> <p class="title-c">参数应用</p>
<div class="slider"> <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="slow">工序</div>
<div class="ding">订单</div> <div class="ding">订单</div>
<div class="ling">零件</div> <div class="ling">零件</div>
...@@ -159,19 +154,29 @@ ...@@ -159,19 +154,29 @@
<script> <script>
import Api from "./api"; import Api from "./api";
export default { export default {
props: {
eid: Object
},
data() { data() {
return { return {
entity: { entity: {
partTaskPk: null, //订单ID,
opTaskPk: 0, //工单ID,
taskSeq: null, // "工序号",
flog: 0, //参数应用 flog: 0, //参数应用
planMethod: "转序规则", // 平行 重叠 planMethod: "转序规则", // 平行 重叠
shopId: null, shopId: null,
level: 100, level: 100,
value2: 100, multipleEquipIds: [], //设备
fruit: [] multipleEquip: false,
plan_method: false,
overTime: false,
isDiscrete: false
}, },
list: [], list: [],
data1: [], data1: [],
checkList: [],
listCal: [], listCal: [],
visible: false, visible: false,
rules: { rules: {
...@@ -183,7 +188,8 @@ export default { ...@@ -183,7 +188,8 @@ export default {
mounted() { mounted() {
this.getCal(); //获取连班策略 this.getCal(); //获取连班策略
this.apsGet(); //获取参数级别和转序等的关系 this.apsGet(); //获取参数级别和转序等的关系
this.initTree(); //获取当前登录人所在车间下的所有部门 this.initTree(); //获取当前登录人所在车间下的所有部门:班组结构
this.multiple(0); //获取任务工单相关设备
}, },
methods: { methods: {
getCal() { getCal() {
...@@ -199,8 +205,8 @@ export default { ...@@ -199,8 +205,8 @@ export default {
// } // }
}); });
}, },
handleSubmit() { handleSubmit() {
this.entity.multipleEquipIds = this.entity.multipleEquipIds.join(",");
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
Api.apsschedulupdateparameter(this.entity).then(res => { Api.apsschedulupdateparameter(this.entity).then(res => {
...@@ -216,7 +222,6 @@ export default { ...@@ -216,7 +222,6 @@ export default {
var sumData = []; var sumData = [];
Api.userdepartmentsofworkshop() Api.userdepartmentsofworkshop()
.then(r => { .then(r => {
if (r.result) { if (r.result) {
this.data1 = r.result; this.data1 = r.result;
} else { } else {
...@@ -249,9 +254,25 @@ export default { ...@@ -249,9 +254,25 @@ export default {
}; };
this.list = []; this.list = [];
this.list.push(obj); this.list.push(obj);
alert(this.list[0].value)
this.entity.shopId = this.list[0].value; this.entity.shopId = this.list[0].value;
this.multiple(this.entity.shopId);
},
multiple(id) {
// part_task_pk 任务ID 可以为0
//op_pk 工单ID 可以为0
//shop_id 班组ID 可以为0
Api.gettaskequips({
part_task_pk: 0,
op_pk: this.entity.opTaskPk,
shop_id: id
})
.then(r => {
if (r.result) {
this.checkList = r.result;
}
})
.catch(err => {});
}, },
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
...@@ -268,6 +289,24 @@ export default { ...@@ -268,6 +289,24 @@ export default {
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;
} }
},
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> </script>
...@@ -354,6 +393,10 @@ export default { ...@@ -354,6 +393,10 @@ export default {
padding-left: 0; padding-left: 0;
margin-left: 25px; margin-left: 25px;
overflow: auto; overflow: auto;
.check-item {
height: 30px;
margin-left: 10px;
}
} }
} }
.right-down { .right-down {
...@@ -364,4 +407,5 @@ export default { ...@@ -364,4 +407,5 @@ export default {
margin-top: 15px; margin-top: 15px;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<p>确定进行 {{insertTItle}} 操作?</p> <p>确定进行 {{insertTItle}} 操作?</p>
</Modal> </Modal>
<Modal v-model="setParsModal" title="工序参数设置" footer-hide width="1000"> <Modal v-model="setParsModal" title="工序参数设置" footer-hide width="1000">
<Add :eid="curId" @on-close="cancel" /> <Add :eid="row" @on-close="cancel" />
</Modal> </Modal>
</div> </div>
</template> </template>
...@@ -46,6 +46,7 @@ export default { ...@@ -46,6 +46,7 @@ export default {
value: null value: null
} }
}, },
row: {},
setParsModal: false, setParsModal: false,
editModal: false, editModal: false,
detailModal: false, detailModal: false,
...@@ -98,7 +99,7 @@ export default { ...@@ -98,7 +99,7 @@ export default {
{ {
key: "part_task_pk", key: "part_task_pk",
title: this.l("part_task_pk"), title: this.l("part_task_pk"),
align: "left", align: "center",
high: true, high: true,
hide: true hide: true
}, },
...@@ -106,33 +107,33 @@ export default { ...@@ -106,33 +107,33 @@ export default {
{ {
key: "put_into_qty", key: "put_into_qty",
title: this.l("put_into_qty"), title: this.l("put_into_qty"),
align: "left",
high: true
},
{
key: "plan_start",
title: this.l("plan_start"),
align: "center", align: "center",
high: true, high: true
width: 140
}, },
{ {
key: "plan_finish", key: "plan_start+'——'+plan_finish",
title: this.l("plan_finish"), title: "计划时间",
align: "center", align: "center",
high: true, high: true,
width: 140 width: 140
}, },
// {
// key: "plan_finish",
// title: this.l("plan_finish"),
// align: "center",
// high: true,
// width: 140
// },
{ {
key: "setup_time", key: "setup_time",
title: this.l("setup_time"), title: this.l("setup_time"),
align: "right", align: "center",
high: true high: true
}, },
{ {
key: "run_time", key: "run_time",
title: this.l("run_time"), title: this.l("run_time"),
align: "right", align: "center",
high: true high: true
}, },
{ {
...@@ -145,27 +146,27 @@ export default { ...@@ -145,27 +146,27 @@ export default {
{ {
key: "transport_time", key: "transport_time",
title: this.l("transport_time"), title: this.l("transport_time"),
align: "right", align: "center",
high: true, high: true,
hide: true hide: true
}, },
{ {
key: "check_time", key: "check_time",
title: this.l("check_time"), title: this.l("check_time"),
align: "right", align: "center",
high: true, high: true,
hide: true hide: true
}, },
{ {
key: "efficiency_value", key: "efficiency_value",
title: this.l("efficiency_value"), title: this.l("efficiency_value"),
align: "right", align: "center",
high: true high: true
}, },
{ {
key: "machine_rule", key: "machine_rule",
title: this.l("machine_rule"), title: this.l("machine_rule"),
align: "left", align: "center",
easy: true, easy: true,
high: true, high: true,
width: 140 width: 140
...@@ -173,14 +174,14 @@ export default { ...@@ -173,14 +174,14 @@ export default {
{ {
key: "singleout", key: "singleout",
title: this.l("singleout"), title: this.l("singleout"),
align: "left", align: "center",
high: true, high: true,
hide: true hide: true
}, },
{ {
key: "first_equip", key: "first_equip",
title: this.l("first_equip"), title: this.l("first_equip"),
align: "left", align: "center",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true
...@@ -188,7 +189,7 @@ export default { ...@@ -188,7 +189,7 @@ export default {
{ {
key: "equip_type", key: "equip_type",
title: this.l("equip_type"), title: this.l("equip_type"),
align: "left", align: "center",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true
...@@ -196,48 +197,48 @@ export default { ...@@ -196,48 +197,48 @@ export default {
{ {
key: "cal_id", key: "cal_id",
title: this.l("cal_id"), title: this.l("cal_id"),
align: "left", align: "center",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: "plan_method", key: "plan_method",
title: this.l("plan_method"), title: this.l("plan_method"),
align: "left", align: "center",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: "over_time", key: "over_time",
title: this.l("over_time"), title: this.l("over_time"),
align: "left", align: "center",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: "isdiscrete", key: "isdiscrete",
title: this.l("isdiscrete"), title: this.l("isdiscrete"),
align: "left", align: "center",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: "discrete_value", key: "discrete_value",
title: this.l("discrete_value"), title: this.l("discrete_value"),
align: "left", align: "center",
high: true high: true
}, },
{ {
key: "multi_machine", key: "multi_machine",
title: this.l("multi_machine"), title: this.l("multi_machine"),
align: "left", align: "center",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: "notes", key: "notes",
title: this.l("notes"), title: this.l("notes"),
align: "left", align: "center",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true
...@@ -246,7 +247,7 @@ export default { ...@@ -246,7 +247,7 @@ export default {
{ {
key: "taskseq_des", key: "taskseq_des",
title: this.l("taskseq_des"), title: this.l("taskseq_des"),
align: "left", align: "center",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true
...@@ -254,7 +255,7 @@ export default { ...@@ -254,7 +255,7 @@ export default {
{ {
key: "workshopcode", key: "workshopcode",
title: this.l("workshopcode"), title: this.l("workshopcode"),
align: "left", align: "center",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true
...@@ -262,21 +263,21 @@ export default { ...@@ -262,21 +263,21 @@ export default {
{ {
key: "routing_detail_id", key: "routing_detail_id",
title: this.l("routing_detail_id"), title: this.l("routing_detail_id"),
align: "left", align: "center",
high: true, high: true,
hide: true hide: true
}, },
{ {
key: "routing_header_id", key: "routing_header_id",
title: this.l("routing_header_id"), title: this.l("routing_header_id"),
align: "left", align: "center",
high: true, high: true,
hide: true hide: true
}, },
{ {
key: "comb_param", key: "comb_param",
title: this.l("comb_param"), title: this.l("comb_param"),
align: "left", align: "center",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true
...@@ -284,14 +285,14 @@ export default { ...@@ -284,14 +285,14 @@ export default {
{ {
key: "rule_qty", key: "rule_qty",
title: this.l("rule_qty"), title: this.l("rule_qty"),
align: "left", align: "center",
high: true, high: true,
hide: true hide: true
}, },
{ {
title: "操作", title: "操作",
key: "action", key: "action",
width: 140, width: 100,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
return h("div", { class: "action" }, [ return h("div", { class: "action" }, [
...@@ -299,10 +300,11 @@ export default { ...@@ -299,10 +300,11 @@ export default {
attrs: { attrs: {
icon: "md-options", icon: "md-options",
type: "icon", type: "icon",
oprate: "detail", oprate: "edit",
title: "工序参数设置" title: "工序参数设置"
}, },
on: { click: () => this.openParms(params.row.id) } class: "icons-h",
on: { click: () => this.openParms(params.row) }
}), }),
h("op", { h("op", {
attrs: { attrs: {
...@@ -312,6 +314,7 @@ export default { ...@@ -312,6 +314,7 @@ export default {
oprate: "edit", oprate: "edit",
msg: "确认要移出排产吗?" msg: "确认要移出排产吗?"
}, },
class: "icons-h",
on: { click: () => this.edit(params.row.id) } on: { click: () => this.edit(params.row.id) }
}), }),
h("op", { h("op", {
...@@ -322,6 +325,7 @@ export default { ...@@ -322,6 +325,7 @@ export default {
oprate: "delete", oprate: "delete",
msg: "确认要刪除工序吗?" msg: "确认要刪除工序吗?"
}, },
class: "icons-h",
on: { click: () => this.remove(params.row, params.index) } on: { click: () => this.remove(params.row, params.index) }
}) })
]); ]);
...@@ -348,7 +352,7 @@ export default { ...@@ -348,7 +352,7 @@ export default {
Api.getbyorderid(params).then(res => { Api.getbyorderid(params).then(res => {
if (res.success) { if (res.success) {
this.gridHeight = 50; this.gridHeight = 50;
this.gridHeight = (res.result.length +1) * 48; this.gridHeight = (res.result.length + 1) * 48;
this.data1 = res.result; this.data1 = res.result;
} }
}); });
...@@ -381,7 +385,8 @@ export default { ...@@ -381,7 +385,8 @@ export default {
//插单事件end---- //插单事件end----
//单个工序进行参设置start---- //单个工序进行参设置start----
openParms(id) { openParms(row) {
this.row = row;
this.setParsModal = true; this.setParsModal = true;
}, },
//单个工序进行参数设置end---- //单个工序进行参数设置end----
...@@ -442,5 +447,12 @@ export default { ...@@ -442,5 +447,12 @@ export default {
} }
}; };
</script> </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> </style>
\ No newline at end of file
<template> <template>
<div> <div class="aps-activ">
<DataGrid <DataGrid
:columns="columns" :columns="columns"
ref="grid" ref="grid"
...@@ -211,8 +211,10 @@ export default { ...@@ -211,8 +211,10 @@ export default {
attrs: { attrs: {
icon: "md-options", icon: "md-options",
type: "icon", type: "icon",
title: "工序参数设置" title: "工序参数设置",
oprate: "edit"
}, },
class: "icons-i",
on: { click: () => this.openParms(params.row.id) } on: { click: () => this.openParms(params.row.id) }
}), }),
h("op", { h("op", {
...@@ -223,6 +225,7 @@ export default { ...@@ -223,6 +225,7 @@ export default {
oprate: "delete", oprate: "delete",
msg: "确认要移出排产吗?" msg: "确认要移出排产吗?"
}, },
class: "icons-i",
on: { click: () => this.remove(params.row.part_task_pk) } on: { click: () => this.remove(params.row.part_task_pk) }
}), }),
h("op", { h("op", {
...@@ -233,6 +236,7 @@ export default { ...@@ -233,6 +236,7 @@ export default {
oprate: "delete", oprate: "delete",
msg: "确认要恢复工序吗?" msg: "确认要恢复工序吗?"
}, },
class: "icons-i",
on: { click: () => this.refresh(params.row.part_task_pk) } on: { click: () => this.refresh(params.row.part_task_pk) }
}) })
]); ]);
...@@ -417,4 +421,11 @@ export default { ...@@ -417,4 +421,11 @@ export default {
.drag { .drag {
cursor: move; cursor: move;
} }
.aps-activ .icons-i:hover {
width: 20px;
height: 20px;
line-height: 20px;
border-radius: 50%;
background-color: #f5d2da;
}
</style> </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