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

整机排产

parent 82fd1193
<template>
<div class="scheduling">
<div class="aps-l">
<Row class="row-p">
<Col :span="6" class="chan-chi">排产池</Col>
<Col :span="18" class="l-ringht">
<RadioGroup v-model="status" type="button" @on-change="changeStatus" size="small">
<Radio label="0">全部</Radio>
<Radio label="1">未排产</Radio>
<Radio label="2">已排查</Radio>
</RadioGroup>
</Col>
</Row>
<div
class="left-body"
v-for="(li,index) in list"
:key="index"
@click="listData(li.part_task_pk,index)"
:class="isactive == index ? 'addclass' : '' "
>
<Row class="title-i">
<Col :span="20" class="order-code">订单号:{{li.order_id}}</Col>
<Col :span="4" class="order-ringht">
<Icon type="md-close" @click="close" />
</Col>
</Row>
<div class="fa">{{li.routing_version}}</div>
<div class="time-s">
<span>工序:{{li.routing_schema}}</span>
</div>
<div class="time-s">{{li.demand_start}}{{li.demand_finish}}</div>
</div>
</div>
<div class="aps-r">
</div>
</div>
</template>
<script>
// import List from './list.vue'
// import Api from './api'
export default {
name: "list",
// components: {
// List
// },
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
data() {
return {
activeindex: 1,
list: [
{
part_task_pk: "euuei",
order_id: "hdhfk",
routing_version: "fsslllsl",
demand_start: "2020-3-30",
demand_finish: "2020-3-30"
},
{
part_task_pk: "euuei",
order_id: "hdhfk",
routing_version: "fsslllsl",
demand_start: "2020-3-30",
demand_finish: "2020-3-30"
}
],
status: "0", //全部排产0,1为未排产;2为已排查;
partTaskPk: "", //车间
result: [],
isactive: 0,
selectName: "all"
};
},
created() {
// this.orderlist()
},
methods: {
// 过滤条件
changeStatus(a) {
console.log(a);
// this.orderlist(a);
},
orderlist(a) {
if (a == 0) {
//全部
} else if (a == 1) {
//未排产
} else if (a == 2) {
//已排产
}
Api.getmesorder({ status: 2, workshop_id: 3 }).then(r => {
// console.log(r)
if (r.success) {
this.list = r.result;
this.listData(r.result[0].part_task_pk, 0);
}
});
},
listData(li, index) {
this.isactive = index;
},
tagClick(name) {
this.selectName = name;
this.tagTata(this.selectName);
},
tagTata(name) {
if (name == "all") {
this.status = "";
}
if (name == "yi") {
this.status = 13;
}
if (name == "wei") {
this.status = 0;
}
let data = {
part_task_pk: this.partTaskPk,
status: this.status
};
Api.gettaskseqinfo(data).then(r => {
// console.log(r)
if (r.success) {
this.result = r.result;
}
});
},
close() {}
}
};
</script>
<style lang="less" scoped>
.addclass {
border-color: rgba(38, 128, 235, 0.5) !important;
.title-i {
background: rgba(38, 128, 235, 0.5) !important;
}
}
.scheduling {
display: flex;
display: -webkit-flex;
height: 100%;
.aps-l {
width: 20%;
border-right: 1px solid #e4e6ed;
height: 86vh;
padding: 0 15px 10px 10px;
overflow: auto;
.row-p {
border-bottom: 1px solid #e4e6ed;
padding: 5px;
.chan-chi {
font-size: 14px;
font-weight: bold;
margin-top: 3px;
}
.l-ringht {
text-align: right;
}
}
.left-body:hover {
cursor: pointer;
border-color: rgba(38, 128, 235, 0.5);
.title-i {
background: rgba(38, 128, 235, 0.5) !important;
}
}
.left-body {
margin-top: 15px;
border: 1px solid rgba(228, 230, 237, 1);
border-radius: 4px;
.title-i {
padding: 0 8px;
height: 34px;
line-height: 34px;
color: #515a6e;
background: #e4e6ed;
.order-ringht {
text-align: right;
.ivu-icon {
cursor: pointer;
}
}
}
.fa {
height: 32px;
line-height: 32px;
color: rgba(38, 128, 235, 1);
padding: 5px 8px 0 8px;
}
.time-s {
padding: 0 8px;
height: 32px;
line-height: 32px;
color: #515a6e;
}
}
}
.aps-r {
width: 80%;
padding: 0 15px;
}
}
</style>
\ No newline at end of file
......@@ -43,7 +43,7 @@
style="margin-right:15px;"
type="info"
>
<a href="javascript:;">整机排产&nbsp;&nbsp;&nbsp;</a>
<a href="javascript:;" @click="goCemplate">整机排产&nbsp;&nbsp;&nbsp;</a>
</Badge>
<Badge :count="this.$store.state.countRun" overflow-count="99" type="info">
<a href="javascript:;">流水排产&nbsp;&nbsp;&nbsp;</a>
......@@ -90,7 +90,8 @@
</RadioGroup>
<p class="pl30 pt10" v-show="scheduleType!=''">
确定将订单 <span class="fwBold">{{resultsOrderList}}</span> 移入
确定将订单
<span class="fwBold">{{resultsOrderList}}</span> 移入
<span class="red fwBold">{{scheduleTypeName}}</span>
</p>
<p>&nbsp;</p>
......@@ -455,8 +456,8 @@ export default {
},
modalSchedule() {
//移入排产
this.scheduleType=""
this.scheduleTypeName=""
this.scheduleType = "";
this.scheduleTypeName = "";
this.listBatchIds = this.listBatchIds1;
if (this.scheduleStatus == 1) {
this.scheduleModal = true;
......@@ -466,11 +467,11 @@ export default {
},
goMethod(value) {
//行内点击后面按钮
this.canselFooter()
this.canselFooter();
this.resultsOrderList = value.mesCode;
this.listBatchIds = [value.id];
this.scheduleType=""
this.scheduleTypeName=""
this.scheduleType = "";
this.scheduleTypeName = "";
if (value.mainRoutingSetStatus == 0) {
//this.dispatchStatus = 1
//this.scheduleStatus = 0
......@@ -529,6 +530,11 @@ export default {
}
});
},
goCemplate() {
this.$router.push({
name: "aps-complete"
});
},
addOk() {
this.$refs.grid.load();
this.addModal = false;
......@@ -618,16 +624,17 @@ export default {
//移入排产成功后给标题增加数量
changeCountOut(type, count) {
switch (type) {
case "2"://智能排产池排产订单数量
case "2": //智能排产池排产订单数量
this.$store.commit("setCountAi", this.$store.state.countAi + count);
break;
case "3"://整机排产池排产订单数量
case "3": //整机排产池排产订单数量
this.$store.commit("setCountAll", this.$store.state.countAll + count);
break;
case "4"://流水排产池排产订单数量
case "4": //流水排产池排产订单数量
this.$store.commit("setCountRun", this.$store.state.countRun + count);
break;
default://APS排产池排产订单数量
default:
//APS排产池排产订单数量
this.$store.commit("setCountAps", this.$store.state.countAps + count);
}
},
......@@ -639,11 +646,10 @@ export default {
this.$store.commit("setCountRun", 0);
Api.getpoolordercount()
.then(res => {
if (res.success && res.result.length>1) {
res.result.forEach(data=>
{
this.changeCountOut(data.poolType+'',data.count)
})
if (res.success && res.result.length > 1) {
res.result.forEach(data => {
this.changeCountOut(data.poolType + "", data.count);
});
}
})
.catch(err => {
......
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