Commit 835b0b1a authored by 仇晓婷's avatar 仇晓婷

55

parent 11f26e60
......@@ -14,25 +14,23 @@
<div class="left-down">
<div
class="left-body"
v-for="(li, index) in list"
v-for="(li,index) in list"
:key="index"
@click="listData(li, index)"
:class="isactive == index ? 'addclass' : ''"
@click="listData(li,index)"
:class="isactive == index ? 'addclass' : '' "
>
<Row class="title-i">
<Col :span="20" class="order-code">订单号:{{ li.mesCode }}</Col>
<Col :span="20" class="order-code">订单号:{{li.mesCode}}</Col>
<Col :span="4" class="order-ringht">
<Icon type="md-close" @click="close(li.id)" />
</Col>
</Row>
<div class="fa">产品名称:{{ li.productName }}</div>
<div class="fa">产品名称:{{li.productName}}</div>
<div class="time-s">
<!-- <Icon type="ios-copy" /> -->
<span>工序:{{ li.drawnNumber }}</span>
</div>
<div class="time-s">
{{ li.demandFinishDate }}{{ li.demandStartDate }}
<span>工序:{{li.drawnNumber}}</span>
</div>
<div class="time-s">{{li.demandFinishDate}}{{li.demandStartDate}}</div>
</div>
</div>
</div>
......@@ -46,22 +44,11 @@
<span></span>
</Col>
<Col :span="6">
<RadioGroup
v-model="mode"
type="button"
size="small"
@on-change="changeMode"
>
<RadioGroup v-model="mode" type="button" size="small" @on-change="changeMode">
<Radio :label="1">一级排产</Radio>
<Radio :label="2">二级排产</Radio>
</RadioGroup>
<Button
type="primary"
@click="lowerHair"
:disabled="!allow"
v-if="showXia"
>下发</Button
>
<Button type="primary" @click="lowerHair" :disabled="!allow" v-if="showXia">下发</Button>
</Col>
</Row>
<Row class="right-body">
......@@ -71,56 +58,50 @@
<Badge :count="item.seq" slot="dot" :type="type(index)"></Badge>
<div class="set-name">
<span
@click="sets(item, index)"
@click="sets(item,index)"
class="mr20"
:class="active == index ? 'gongTitle' : ''"
>工序名称:{{ item.name }}</span
>
:class="active == index ? 'gongTitle' : '' "
>工序名称:{{item.name}}</span>
<op
title="拆分工序"
@click="split(item, index)"
@click="split(item,index)"
type="icon"
icon="ios-cut"
v-if="item.quantity > 1 && !item.chai"
v-if="item.quantity>1&&!item.chai"
></op>
<op
title="移除"
@click="remove(item, index)"
@click="remove(item,index)"
type="icon"
icon="ios-trash"
oprate="delete"
v-if="item.chai"
></op>
</div>
<div>数量:{{ item.quantity }}</div>
<div>数量:{{item.quantity}}</div>
<div v-if="item.userIds">
人员:
<span v-for="(u, j) in item.userIds" :key="j">
<span v-for="(u,j) in item.userIds" :key="j">
<User :value="u"></User>&nbsp;&nbsp;&nbsp;
</span>
</div>
<div v-if="item.shopName">
班组:
{{ item.shopName }}
{{item.shopName}}
</div>
<div v-if="item.beginTime">
时间:
{{ item.beginTime }} —— {{ item.endTime }}
{{item.beginTime}} —— {{item.endTime}}
</div>
<div v-if="item.remark">
备注:
{{ item.remark }}
{{item.remark}}
</div>
<!-- <div>工序号:{{item.task_seq}}</div> -->
</TimelineItem>
</Timeline>
<div>
<Drawer
title="排产设置盘"
:closable="false"
v-model="set"
width="55%"
>
<Drawer title="排产设置盘" :closable="false" v-model="set" width="55%">
<Set
:mode="mode"
:detailId="detailId"
......@@ -146,12 +127,7 @@
>
拆分数量:
<InputNumber v-model="chaiNum" :min="1" :max="maxnum"></InputNumber>
<Slider
v-if="maxnum > 1"
v-model="chaiNum"
:min="1"
:max="maxnum"
></Slider>
<Slider v-if="maxnum>1" v-model="chaiNum" :min="1" :max="maxnum"></Slider>
</Modal>
</div>
</template>
......@@ -161,7 +137,7 @@ import Api from "./api";
export default {
name: "set",
components: {
Set,
Set
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
......@@ -188,7 +164,7 @@ export default {
orderId: 0,
routingHeaderId: 0,
detailId: 0,
detailId: 0
};
},
created() {
......@@ -210,10 +186,9 @@ export default {
//排产池列表
orderlist() {
Api.getpooltypeorderlist({ PoolType: 3, status: this.status }).then(
(r) => {
Api.getpooltypeorderlist({ PoolType: 3, status: this.status }).then(r => {
if (r.result) {
r.result.map((u) => {
r.result.map(u => {
u.aps = 0;
u.demandFinishDate = u.demandFinishDate.substr(0, 10);
u.demandStartDate = u.demandStartDate.substr(0, 10);
......@@ -227,8 +202,7 @@ export default {
} else {
this.$Message.info("排产池数据请求失败");
}
}
);
});
},
//点击选中排产订单
listData(li, index) {
......@@ -244,9 +218,9 @@ export default {
},
//工序列表
tagTata(id) {
Api.getroutingdetails({ id: id }).then((r) => {
Api.getroutingdetails({ id: id }).then(r => {
if (r.success) {
r.result.map((u) => {
r.result.map(u => {
u.seq = u.task_seq;
u.chaiCount = 0;
u.chai = false;
......@@ -268,7 +242,7 @@ export default {
title: "删除",
content: "<p>您确定要移除此订单吗</p>",
onOk: () => {
Api.shiftoutofcmorflpool({ ids: ids }).then((r) => {
Api.shiftoutofcmorflpool({ ids: ids }).then(r => {
if (r.success) {
this.$Message.success("删除成功");
this.orderlist(this.status);
......@@ -279,7 +253,7 @@ export default {
},
onCancel: () => {
this.$Message.info("您已取消删除");
},
}
});
},
//工序列表序列设置
......@@ -357,16 +331,16 @@ export default {
quantity: this.result[i].quantity,
beginTime: this.result[i].beginTime,
endTime: this.result[i].endTime,
remark: this.result[i].remark,
remark: this.result[i].remark
};
items.push(obj);
}
let data = {
orderId: this.orderId,
routingHeaderId: this.routingHeaderId,
items: items,
items: items
};
Api.flonestepschedule(data).then((r) => {
Api.flonestepschedule(data).then(r => {
if (r.result) {
this.$Message.success("下发成功");
this.orderlist(this.status);
......@@ -383,16 +357,16 @@ export default {
quantity: this.result[i].quantity,
beginTime: this.result[i].beginTime,
endTime: this.result[i].endTime,
remark: this.result[i].remark,
remark: this.result[i].remark
};
items.push(obj);
}
let data = {
orderId: this.orderId,
routingHeaderId: this.routingHeaderId,
items: items,
items: items
};
Api.fltwostepschedule(data).then((r) => {
Api.fltwostepschedule(data).then(r => {
if (r.result) {
this.$Message.success("下发成功");
this.orderlist(this.status);
......@@ -415,17 +389,17 @@ export default {
this.$set(this.result, index, item);
this.set = false;
// this.active = null;
},
}
},
computed: {
allow() {
let mode = this.mode;
let oks = this.result.filter((u) => {
let oks = this.result.filter(u => {
return u.aps == mode;
});
return oks.length == this.result.length;
},
},
}
}
};
</script>
<style lang="less">
......@@ -525,8 +499,8 @@ export default {
height: 82vh;
overflow: auto;
.list {
padding-left: 10px;
padding-top: 5px;
padding-left: 15px;
padding-top: 20px;
.set-name {
font-weight: bold;
......@@ -558,15 +532,11 @@ export default {
}
}
}
.ivu-timeline-item {
padding: 0 0 25px 0;
}
}
.right-body {
.list {
.s0 {
color: @table-color !important;
color:@table-color !important;
}
}
}
......
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