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

Merge branch 'qin'

parents 26ffb489 e358b135
......@@ -1056,9 +1056,10 @@ export default {
calId: '连班策略',
overTime: '六日加班',
isDiscrete: '是否离散',
multipleEquip: "是否多台安排设备",// 否 是
multipleEquip: "多台分配",// 否 是
multipleEquipIds: "设备id", //用英文逗号分隔
discrete: '离散值',
},
routing_header:{
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>
......@@ -117,22 +117,17 @@
v-for="(item,index) in list"
:key="index"
:value="item.value"
:label="item.title"
:label="item.label"
style="display:none"
></Option>
<Tree key="mytree" :data="data1" ref="mytree" :render="renderContent"></Tree>
</Select>
</FormItem>
<div class="check-box">
<CheckboxGroup v-model="entity.fruit">
<Checkbox label="10985553333(数控车床 车工班)"></Checkbox>
<br />
<Checkbox label="10985553333(数控车床 车工班)"></Checkbox>
<br />
<Checkbox label="10985553333(数控车床 车工班)"></Checkbox>
<br />
<Checkbox label="10985553333(数控车床 车工班)"></Checkbox>
<br />
<CheckboxGroup v-model="entity.multipleEquipIds">
<div v-for="(item,index) in checkList" :key="index" class="check-item">
<Checkbox :label="item.equip_pk">{{item.equip_name}}</Checkbox>
</div>
</CheckboxGroup>
</div>
</div>
......@@ -140,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>
......@@ -159,19 +154,29 @@
<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,
value2: 100,
fruit: []
multipleEquipIds: [], //设备
multipleEquip: false,
plan_method: false,
overTime: false,
isDiscrete: false
},
list: [],
data1: [],
checkList: [],
listCal: [],
visible: false,
rules: {
......@@ -183,7 +188,8 @@ export default {
mounted() {
this.getCal(); //获取连班策略
this.apsGet(); //获取参数级别和转序等的关系
this.initTree(); //获取当前登录人所在车间下的所有部门
this.initTree(); //获取当前登录人所在车间下的所有部门:班组结构
this.multiple(0); //获取任务工单相关设备
},
methods: {
getCal() {
......@@ -199,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 => {
......@@ -216,7 +222,6 @@ export default {
var sumData = [];
Api.userdepartmentsofworkshop()
.then(r => {
if (r.result) {
this.data1 = r.result;
} else {
......@@ -249,9 +254,25 @@ export default {
};
this.list = [];
this.list.push(obj);
alert(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() {
this.$emit("on-close");
......@@ -268,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>
......@@ -354,6 +393,10 @@ export default {
padding-left: 0;
margin-left: 25px;
overflow: auto;
.check-item {
height: 30px;
margin-left: 10px;
}
}
}
.right-down {
......@@ -364,4 +407,5 @@ export default {
margin-top: 15px;
}
}
</style>
\ No newline at end of file
......@@ -72,8 +72,8 @@ export default {
getequiplist(params) {
return Api.get(`${apsUrl}/mes_equip_info/getequiplist`, params);
},
//获取当前登录人所在车间下的所有部门
userdepartmentsofworkshop(params) {
//获取当前登录人所在车间下的所有部门
userdepartmentsofworkshop(params) {
return Api.get(`${systemUrl}/user/userdepartmentsofworkshop`, params);
},
//获取班组 /mes_equip_info/getequiptypelist
......
......@@ -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----
......@@ -425,7 +430,7 @@ export default {
}
});
},
//删除工序时间end-----
cancel() {
this.curId = 0;
......@@ -442,5 +447,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"
......@@ -211,8 +211,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", {
......@@ -223,6 +225,7 @@ export default {
oprate: "delete",
msg: "确认要移出排产吗?"
},
class: "icons-i",
on: { click: () => this.remove(params.row.part_task_pk) }
}),
h("op", {
......@@ -233,6 +236,7 @@ export default {
oprate: "delete",
msg: "确认要恢复工序吗?"
},
class: "icons-i",
on: { click: () => this.refresh(params.row.part_task_pk) }
})
]);
......@@ -417,4 +421,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