Commit 673cc4d0 authored by 仇晓婷's avatar 仇晓婷

排产结果

parent cf9954dc
<template>
<div class="compare">
<div class="btn" style="z-index:9999;position:absolute;right:0">
<Button type="primary" @click="parameter">下发</Button>
<!-- <Button type="primary">导出</Button>000 -->
<Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button>
</div>
<div class="compare">
<div class="compare_box" :style="{height:treeHeight+'px'}">
<div class="left_list">
<ul class="left_ul">
......@@ -28,7 +23,7 @@
</ul>
</div>
<div class="right_add flex">
<div class="fg list_box" v-for="a of 5" :class="a%2 == 1?'dip_bg':''">
<div class="fg list_box" v-for="a of 5" :class="a%2 == 1?'dip_bg':''" :key="a">
<ul class="right_ul">
<li class="right_ul_title">
<a class="del_case">
......@@ -54,74 +49,52 @@
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import Api from "./api";
export default {
data() {
return {
code: '2',
name: '添加',
code: "2",
name: "添加",
tree: [],
switch1: true,
treeHeight: "",
}
treeHeight: ""
};
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
await store.dispatch("loadDictionary"); // 加载数据字典
},
components: {},
created() {
this.treeHeight = window.innerHeight - 170
this.treeHeight = window.innerHeight - 170;
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight
this.treeHeight = window.screenHeight - 170
window.screenHeight = window.innerHeight;
this.treeHeight = window.screenHeight - 170;
})();
}
};
},
methods: {
// 下发
parameter() {
Api.processschemedispatch({
id: this.id
}).then(r => {
if (r.result) {
this.$Message.success(r.result.retmsg);
this.orderlist();
} else {
this.$Message.success("下发失败");
}
});
},
// 返回
comeBlck() {
this.$router.push({ path: "/aps/aps" });
},
change(status){
this.$Message.info('开关状态:' + status);
change(status) {
this.$Message.info("开关状态:" + status);
},
// 删除方案
delitedCase(){
this.$Message.info('删除方案');
delitedCase() {
this.$Message.info("删除方案");
},
tabChange(name) {
if(name=='technicalcoordination')
{
if (name == "technicalcoordination") {
this.$refs.technicalcoordination.loadchangelist();
}
if(name=='unqualifiedorder')
{
if (name == "unqualifiedorder") {
this.$refs.unqualifiedorder.loadchangelist();
}
},
}
}
}
};
</script>
......@@ -15,8 +15,6 @@
</template>
<style>
</style>
<script>
......@@ -94,8 +92,7 @@ let tasks = [
},
{
id: 5,
label:
"任务5",
label: "任务5",
user:
'<a href="https://www.google.com/search?q=Austin+Powers" target="_blank" style="color:#0077c0;">Austin Powers</a>',
parentId: 4,
......@@ -155,8 +152,7 @@ let tasks = [
},
{
id: 9,
label:
"任务9",
label: "任务9",
user:
'<a href="https://www.google.com/search?q=Dexter\'s+Laboratory" target="_blank" style="color:#0077c0;">Dexter\'s Laboratory</a>',
parentId: 8,
......@@ -336,7 +332,7 @@ let options = {
"十月",
"十一月",
"十二月"
],
]
// name: "en",
// Now: "Now",
// "X-Scale": "Zoom-X",
......
......@@ -16,10 +16,10 @@
class="left-body"
v-for="(li,index) in list"
:key="index"
@click="listData(li.schedule_Id,index)"
:class="isactive == index ? 'addclass' : '' "
>
<div class="title-t">排产方案:{{li.schedule_Id}}</div>
<Checkbox v-model="li.checked" class="i-checkbox" @on-change="changeCheck(li)"></Checkbox>
<div class="title-t" @click="listData(li.schedule_Id,index)">排产方案:{{li.schedule_Id}}</div>
<div class="fa">排产时间:{{li.plan_Date}}</div>
<div class="fa">
<span>{{li.iNSERTFLAG}} /</span>
......@@ -27,121 +27,30 @@
<span>参数应用:{{li.routing_version}}</span>
</div>
</div>
</Sider>
<Content class="tab_card_box">
<Tabs class="tab_card" v-model="name" type="card" :animated="false" @on-click="clickTab">
<TabPane label="结果列表" name="name1">
<resultsList ref="resultsLists" />
</TabPane>
<!-- <TabPane label="结果甘特图" name="name2">结果甘特图</TabPane> -->
<TabPane label="方案对比" name="name3">
<compareList ref="compareList" />
</TabPane>
</Tabs>
<!-- <h4>排产结果</h4>
<div class="btn">
<Button type="primary" @click="parameter">下发</Button>-->
<!-- <Button type="primary">导出</Button>000 -->
<!-- <Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button>
</div>
<div>
<Table :columns="columns" :data="data"></Table>
</div>-->
<Content>
<h4 :text="title">{{title}}</h4>
<a href="#" @click="comeBlck" class="black">返回</a>
<a href="#" @click="gantChart" class="gant">甘特图</a>
<component :is="detail" :eid="id" />
</Content>
</Layout>
</div>
</template>
<script>
import Api from "./api";
// import expandRow from "./table-expand.vue";expandRow,
import resultsList from "./result.vue";
import compareList from "./compare.vue";
export default {
components: { resultsList, compareList },
data() {
return {
curId: null,
detail: null,
isactive: 0,
data: [],
list: [],
name:'name1',
id: ""
// columns: [
// {
// type: "expand",
// width: 50,
// render: (h, params) => {
// return h(expandRow, {
// props: {
// row: params.row
// }
// });
// }
// },
// {
// title: "超期预警",
// key: "alert",
// align: "center",
// render: (h, params) => {
// return h("div", [
// h("Icon", {
// props: {
// type:
// params.row.alert == true
// ? "ios-information-circle-outline"
// : "ios-remove-circle-outline"
// },
// style: {
// marginRight: "5px",
// fontSize: "18px",
// fontWeight: "bold",
// color: params.row.alert == true ? "#FE7777" : "#0DD78D"
// }
// })
// ]);
// }
// },
// {
// title: "零件图号",
// key: "part_id",
// align: "center"
// },
// {
// title: "零件名称",
// key: "part_name",
// align: "center"
// },
// {
// title: "计划开始时间",
// key: "plan_start",
// width: 200,
// align: "center"
// },
// {
// title: "计划结束时间",
// key: "plan_start",
// width: 200,
// align: "center"
// },
// {
// title: "投料时间",
// key: "demand_start",
// width: 200,
// align: "center"
// },
// {
// title: "节点时间",
// key: "demand_finish",
// width: 200,
// align: "center"
// },
// {
// title: "计划数量",
// key: "plan_qty",
// align: "center"
// }
// ]
name: "name1",
id: null,
contrastList: [],
title: ""
};
},
async fetch({ store, params }) {
......@@ -151,36 +60,33 @@ export default {
this.orderlist();
},
methods: {
clickTab(name) {
},
clickTab(name) {},
orderlist() {
Api.getall()
.then(r => {
if (r.success) {
this.list = r.result;
if (r.result) {
this.listData(r.result[0].schedule_Id, 0);
} else {
this.listData(0, null);
}
this.list = r.result;
this.list.map(u => {
u.checked = false;
});
console.log(this.list);
}
})
.catch(error => {
this.$$Message.error("请求失败");
this.$Message.error("请求失败");
});
},
listData(id, index) {
this.detail = () => import("./result");
this.isactive = index;
this.id = id;
Api.paged({ scheduleId: id })
.then(r => {
if (r.success) {
this.data = r.result;
this.title = "排产方案结果";
this.list.map(u => {
if ((u.checked = true)) {
u.checked = false;
}
})
.catch(error => {
this.$$Message.error("请求失败");
});
this.contrastList = [];
},
clear() {
if (this.list.length > 0) {
......@@ -201,7 +107,10 @@ export default {
});
}
},
// 返回
comeBlck() {
this.$router.push({ path: "/aps/aps" });
},
parameter() {
Api.processschemedispatch({
id: this.id
......@@ -214,8 +123,22 @@ export default {
}
});
},
comeBlck() {
this.$router.push({ path: "/aps/aps" });
//甘特图
gantChart() {},
changeCheck(item) {
this.isactive = null;
if (item.checked == true) {
this.contrastList.push(item.schedule_Id);
} else if (item.checked == false) {
let index = this.contrastList.indexOf(item.schedule_Id);
if (index > -1) {
this.contrastList.splice(index, 1);
}
}
if (this.contrastList.length > 1) {
this.detail = () => import("./compare");
this.title = "排产方案比对";
}
}
}
};
......
<template>
<div class="parameter">
<Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row :gutter="20">
<Col span="12">
<div class="left-up">
<p class="title-c">参数设置</p>
<FormItem :label="l('plan_method')" prop="plan_method">
<i-switch v-model="entity.plan_method" size="large">
<span slot="open">On</span>
<span slot="close">Off</span>
</i-switch>
</FormItem>
<FormItem :label="l('cal_id')" prop="cal_id">
<Select v-model="entity.cal_id" style="width:150px">
<Option value="beijing">策略1</Option>
<Option value="shanghai">策略2</Option>
<Option value="shenzhen">策略3</Option>
</Select>
</FormItem>
<FormItem :label="l('over_time')" prop="over_time">
<i-switch v-model="entity.over_time" size="large">
<span slot="open">On</span>
<span slot="close">Off</span>
</i-switch>
</FormItem>
<FormItem :label="l('efficiency_value')" prop="efficiency_value">
<Input v-model="entity.efficiency_value" style="width:150px"></Input>
</FormItem>
<FormItem :label="l('run_time')" prop="run_time">
<InputNumber v-model="entity.run_time"></InputNumber>
</FormItem>
<FormItem :label="l('isdiscrete')" prop="isdiscrete">
<i-switch v-model="entity.isdiscrete" size="large">
<span slot="open">On</span>
<span slot="close">Off</span>
</i-switch>
</FormItem>
<FormItem :label="l('discrete_value')" prop="discrete_value">
<InputNumber v-model="entity.discrete_value"></InputNumber>
</FormItem>
<FormItem :label="l('discrete_percent')" prop="discrete_percent">
<InputNumber v-model="entity.discrete_percent"></InputNumber>
</FormItem>
</div>
<div class="left-donw">
<p class="title-c">参数级别</p>
<div class="icon">
<Dropdown trigger="custom" :visible="visible" style="width:150px">
<a href="javascript:void(0)" @click="handleOpen">
<Icon type="md-git-compare" />
</a>
<DropdownMenu slot="list" style="text-align: center;">
<DropdownItem>
<a href="#">
<Icon type="md-apps" />
</a>
<span>转序规则</span>
</DropdownItem>
<DropdownItem>
<a href="#">
<Icon type="md-apps" />
</a>
<span>加班策略</span>
</DropdownItem>
<DropdownItem>
<a href="#">
<Icon type="md-apps" />
</a>
<span>任务平衡</span>
</DropdownItem>
<DropdownItem>
<a href="#">
<Icon type="md-apps" />
</a>
<span>是否离散</span>
</DropdownItem>
<div style="margin:10px;">
<Button type="primary" @click="handleOk">确定</Button>
<Button type="primary" @click="handle">关闭</Button>
</div>
</DropdownMenu>
</Dropdown>
</div>
<div class="slider">
<Slider v-model="entity.value1" :step="25" show-stops></Slider>
<div class="slow"></div>
<div class="fast"></div>
</div>
</div>
</Col>
<Col span="12">
<div class="right-up">
<p class="title-d">多台分配设置</p>
<div class="duo">
<Row>
<Col :span="12">
<FormItem :label="l('multi_machine')" prop="multi_machine">
<i-switch v-model="entity.switch4" size="large">
<span slot="open">On</span>
<span slot="close">Off</span>
</i-switch>
</FormItem>
</Col>
<Col :span="12">
<FormItem label="多台数量" prop="abbre">
<InputNumber v-model="entity.abbre"></InputNumber>
</FormItem>
</Col>
</Row>
<FormItem label="班组结构">
<Select v-model="entity.select6" style="width:150px">
<Option value="beijing">结构1</Option>
<Option value="shanghai">结构2</Option>
<Option value="shenzhen">结构3</Option>
<Option value="shenzhen">结构4</Option>
</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>
</div>
</div>
</div>
<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>
<div class="slow">工序</div>
<div class="ding">订单</div>
<div class="ling">零件</div>
<div class="fast">所有</div>
</div>
</div>
</Col>
</Row>
<FormItem class="click-btn">
<Button type="primary" @click="handleSubmit">确定</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</div>
</template>
<script>
export default {
data() {
return {
entity: {
value1: '100',
value2: '100',
fruit: []
},
visible: false,
rules: {
businessName: [{ required: true, message: '必填', trigger: 'blur' }],
businessCode: [{ required: true, message: '必填', trigger: 'blur' }]
}
}
},
methods: {
handleSubmit() {},
handleClose() {},
handleOpen() {
this.visible = true
},
handle() {
this.visible = false
},
handleOk() {},
l(key) {
let vkey = 'mes_op_task_plan_simulate' + '.' + key
return this.$t(vkey) || key
}
}
}
</script>
<style lang="less" scoped>
.parameter {
margin: 10px;
.left-up {
position: relative;
border: 1px solid #e0e0e0;
padding: 25px 0;
.title-c {
width: 68px;
padding-left: 5px;
background: #fff;
position: absolute;
top: -9px;
left: 25px;
color: #2680eb;
}
}
.left-donw {
margin-top: 15px;
position: relative;
border: 1px solid #e0e0e0;
padding: 25px 0;
.title-c {
width: 68px;
padding-left: 5px;
background: #fff;
position: absolute;
top: -9px;
left: 25px;
color: #2680eb;
}
.slider {
margin: 0 50px 0 50px;
position: relative;
.slow {
position: absolute;
top: 7px;
left: -5px;
}
.fast {
position: absolute;
top: 7px;
right: -10px;
}
.ding {
position: absolute;
top: 7px;
left: 30%;
}
.ling {
position: absolute;
top: 7px;
right: 30%;
}
}
.icon {
text-align: right;
padding-right: 15px;
margin-top: -15px;
}
}
.right-up {
position: relative;
border: 1px solid #e0e0e0;
padding: 25px 0;
.title-d {
width: 95px;
padding-left: 5px;
margin-left: 10px;
background: #fff;
position: absolute;
top: -9px;
left: 25px;
color: #2680eb;
}
.check-box {
height: 300px;
border-top: 1px solid #e0e0e0;
padding: 15px;
padding-left: 0;
margin-left: 25px;
overflow: auto;
}
}
.right-down {
height: 100px;
}
.click-btn {
text-align: right;
margin-top: 15px;
}
}
</style>
\ No newline at end of file
......@@ -3,10 +3,8 @@
</style>
<template>
<div>
<div class="btn" style="z-index:9999;position:absolute;right:0">
<div class="btn">
<Button type="primary" @click="parameter" v-show="showNext">下发</Button>
<!-- <Button type="primary">导出</Button>000 -->
<Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button>
</div>
<div>
<Table :columns="columns" :data="data"></Table>
......@@ -18,6 +16,7 @@ import Api from "./api";
import expandRow from "./table-expand.vue";
export default {
components: { expandRow },
props: ["eid"],
data() {
return {
isactive: 0,
......@@ -106,37 +105,19 @@ export default {
},
components: {},
created() {
this.orderlist();
this.listData();
},
mounted() {},
methods: {
orderlist() {
Api.getall()
listData() {
Api.paged({ scheduleId: this.eid })
.then(r => {
if (r.success) {
this.list = r.result;
if (r.result) {
this.listData(r.result[0].schedule_Id, 0);
} else {
this.listData(0, null);
}
}
})
.catch(error => {
this.$$Message.error("请求失败");
});
},
listData(id, index) {
this.$emit.isactive = index;
this.id = id;
Api.paged({ scheduleId: id })
.then(r => {
if (r.success) {
this.data = r.result;
}
})
.catch(error => {
this.$$Message.error("请求失败");
this.$Message.error("请求失败");
});
},
// 下发
......@@ -187,10 +168,7 @@ export default {
}
});
},
// 返回
comeBlck() {
this.$router.push({ path: "/aps/aps" });
},
tabChange(name) {
if (name == "technicalcoordination") {
this.$refs.technicalcoordination.loadchangelist();
......
.results {
font-family: Microsoft YaHei;
.ivu-layout-sider {
background: none;
height: 90vh;
border-right: 1px solid #e4e6ed;
background: rgba(255, 255, 255, 1);
margin-right: 10px;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
height: 88vh;
overflow: auto;
.btn {
float: right;
margin-top: -44px;
margin-right: 15px;
}
}
.addclass {
border-color: #2680eb !important;
}
h4 {
height: 38px;
line-height: 38px;
height: 45px;
line-height: 45px;
border-bottom: 1px solid #e4e6ed;
margin-bottom: 15px;
margin-right: 15px;
}
.left-body:hover {
cursor: pointer;
border-color: #2680eb;
padding-left: 10px;
}
// .left-body:hover {
// border-color: #2680eb;
// }
.left-body {
margin: 10px 15px 0 0;
margin: 10px 15px 10px 30px;
border: 1px solid rgba(228, 230, 237, 1);
border-radius: 4px;
padding: 5px 8px;
.i-checkbox {
margin-left: -30px;
margin-top: 5px;
}
.title-t {
height: 30px;
line-height: 30px;
color: #2680eb;
font-size: 15px;
margin-top: -25px;
}
.title-t:hover {
font-weight: bold;
cursor: pointer;
}
.fa {
height: 30px;
line-height: 30px;
}
}
.ivu-layout-content {
margin-left: 15px;
.tab_card{
.ivu-tabs-bar{
margin-top: 10px;
margin-left: 5px;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
height: 88vh;
overflow: auto;
position: relative;
.black {
position: absolute;
top: 12px;
left: 120px;
}
.black:hover {
font-weight: bold;
}
.gant {
position: absolute;
top: 15px;
right: 95px;
}
.gant:hover {
font-weight: bold;
}
.tab_card {
.ivu-tabs-bar {
margin: 10px;
}
}
.btn {
float: right;
margin-top: -52px;
margin-right: 15px;
}
}
}
.compare{
.compare_box{
}
.compare {
.compare_box {
border: 1px solid #ccc;
.left_list{
.left_list {
float: left;
width: 200px;
height: 100%;
border-right: 1px solid #ccc;
.left_ul{
.left_ul_title{
.left_ul {
.left_ul_title {
height: 80px;
}
li{
li {
line-height: 50px;
text-align: center;
border-bottom: 1px solid #ccc;
}
}
}
.right_add{
.right_add {
height: 100%;
.dip_bg{
.dip_bg {
background: #ecf9f4;
}
.list_box{
.list_box {
border-right: 1px solid #ccc;
}
.list_box:last-of-type{
.list_box:last-of-type {
border-right: none;
}
.right_ul{
.right_ul_title{
.right_ul {
.right_ul_title {
position: relative;
height: 80px;
.del_case{
.del_case {
position: absolute;
top: -8px;
right: 8px;
}
.case{
.case {
color: #2680EB;
}
span{
span {
display: block;
height: 38px;
line-height: 37px;
}
}
li{
li {
line-height: 50px;
text-align: center;
border-bottom: 1px solid #ccc;
......
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