Commit bead90d6 authored by renjintao's avatar renjintao

Merge branch 'product' of git.mes123.com:zhouyx/mes-ui into product-rjt

parents 8881e90d ff6e3b4b
...@@ -339,9 +339,6 @@ ...@@ -339,9 +339,6 @@
color: #fff; color: #fff;
} }
} }
.ivu-select-dropdown{
z-index: 910!important;
}
.manyTabs { .manyTabs {
.ivu-tabs-bar { .ivu-tabs-bar {
position: absolute; position: absolute;
......
...@@ -3,19 +3,22 @@ export default { ...@@ -3,19 +3,22 @@ export default {
getpooltypeorderlist(params) { getpooltypeorderlist(params) {
return Api.get(`${PlanUrl}/messchedule/getpooltypeorderlist`, params); //排产池订单数据 return Api.get(`${PlanUrl}/messchedule/getpooltypeorderlist`, params); //排产池订单数据
}, },
gettaskseqinfo(params) { cmonestepschedule(params) {
return Api.get(`${PlanUrl}/aps/gettaskseqinfo`, params); //根据订单获取全部工序数据 return Api.post(`${PlanUrl}/messchedule/cmonestepschedule`, params); //整机排产--一级排产
}, },
getlist(params) { cmtwostepschedule(params) {
return Api.get(`${PlanUrl}/mes_sys_shop_info/getlist`, params); //手工排产:查询所在车间下的所有班组信息 return Api.post(`${PlanUrl}/messchedule/cmtwostepschedule`, params); //整机排产--二级排产
},
getbyshopid(params) {
return Api.get(`${PlanUrl}/mes_sys_user_info/getuserbyshopid`, params); //手工排产:根据班组ID,加载人员信息
},
getlistEquip(params) {
return Api.get(`${PlanUrl}/mes_equip_info/getlist`, params); //手工排产:获取所在车间的设备
},
getbyequippk(params) {
return Api.get(`${PlanUrl}/mes_sys_user_info/getuserbyequippk`, params); //手工排产:根据设备ID,加载人员信息
}, },
// getlist(params) {
// return Api.get(`${PlanUrl}/mes_sys_shop_info/getlist`, params); //手工排产:查询所在车间下的所有班组信息
// },
// getbyshopid(params) {
// return Api.get(`${PlanUrl}/mes_sys_user_info/getuserbyshopid`, params); //手工排产:根据班组ID,加载人员信息
// },
// getlistEquip(params) {
// return Api.get(`${PlanUrl}/mes_equip_info/getlist`, params); //手工排产:获取所在车间的设备
// },
// getbyequippk(params) {
// return Api.get(`${PlanUrl}/mes_sys_user_info/getuserbyequippk`, params); //手工排产:根据设备ID,加载人员信息
// },
} }
\ No newline at end of file
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
</div> </div>
</Col> </Col>
</Row> </Row>
<ul v-if="singleList.isClick"> <ul v-show="singleList.isClick">
<li <li
ref="liId" ref="liId"
v-for="(item,index) in list" v-for="(item,index) in list"
...@@ -215,7 +215,7 @@ export default { ...@@ -215,7 +215,7 @@ export default {
border-radius: 20px; border-radius: 20px;
margin: 0 5px; margin: 0 5px;
cursor: pointer; cursor: pointer;
background: rgba(38, 128, 235, 0.15); background: rgba(38, 128, 235, 0.1);
} }
li:hover { li:hover {
border: 1px solid rgba(38, 128, 235, 0.5); border: 1px solid rgba(38, 128, 235, 0.5);
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<Col :span="6" class="chan-chi">排产池</Col> <Col :span="6" class="chan-chi">排产池</Col>
<Col :span="18" class="l-ringht"> <Col :span="18" class="l-ringht">
<RadioGroup v-model="status" type="button" @on-change="changeStatus" size="small"> <RadioGroup v-model="status" type="button" @on-change="changeStatus" size="small">
<Radio label="0">全部</Radio> <Radio label="-1">全部</Radio>
<Radio label="1">未排产</Radio> <Radio label="0">未排产</Radio>
<Radio label="2">已排查</Radio> <Radio label="2">已排查</Radio>
</RadioGroup> </RadioGroup>
</Col> </Col>
...@@ -15,12 +15,11 @@ ...@@ -15,12 +15,11 @@
class="left-body" class="left-body"
v-for="(li,index) in list" v-for="(li,index) in list"
:key="index" :key="index"
@click="listData(li.part_task_pk,index)"
:class="li.checked == true ? 'addclass' : '' " :class="li.checked == true ? 'addclass' : '' "
> >
<Row class="title-i"> <Row class="title-i">
<Col :span="20" class="order-code"> <Col :span="20" class="order-code">
<Checkbox v-model="li.checked">订单号:{{li.mesCode}}</Checkbox> <Checkbox v-model="li.checked" @on-change="checkData(li)">订单号:{{li.mesCode}}</Checkbox>
</Col> </Col>
<Col :span="4" class="order-ringht"> <Col :span="4" class="order-ringht">
<Icon type="md-close" @click="close" /> <Icon type="md-close" @click="close" />
...@@ -39,8 +38,9 @@ ...@@ -39,8 +38,9 @@
<FormItem label="工时"> <FormItem label="工时">
<DatePicker <DatePicker
type="datetimerange" type="datetimerange"
format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择工时" placeholder="请选择工时"
@on-change="changeFormat"
v-model="formItem.time" v-model="formItem.time"
style="width:300px" style="width:300px"
></DatePicker> ></DatePicker>
...@@ -60,8 +60,12 @@ ...@@ -60,8 +60,12 @@
></Dictionary> ></Dictionary>
</FormItem> </FormItem>
<FormItem label="班组" v-if="formItem.radio==1"> <FormItem label="班组" v-if="formItem.radio==1">
<Select v-model="formItem.model1" style="width:300px" multiple> <Select v-model="formItem.shopId" style="width:300px" multiple>
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option> <Option
v-for="item in classList"
:value="item.shopId"
:key="item.shopId"
>{{ item.label }}</Option>
</Select> </Select>
</FormItem> </FormItem>
...@@ -84,7 +88,6 @@ ...@@ -84,7 +88,6 @@
<span>{{item.name}}&nbsp&nbsp{{item.class}}</span> <span>{{item.name}}&nbsp&nbsp{{item.class}}</span>
<Icon type="md-close" @click="closeTag" /> <Icon type="md-close" @click="closeTag" />
</div> </div>
<!-- <Tag <!-- <Tag
color="rgba(38,128,235,0.3)" color="rgba(38,128,235,0.3)"
closable closable
...@@ -103,8 +106,8 @@ ...@@ -103,8 +106,8 @@
></Input> ></Input>
</FormItem> </FormItem>
<FormItem> <FormItem>
<Button style="margin-left: 8px">取消</Button> <Button style="margin-left: 8px" @click="closeOk">取消</Button>
<Button type="primary">下发</Button> <Button type="primary" @click="lowerHair">下发</Button>
</FormItem> </FormItem>
</Form> </Form>
</div> </div>
...@@ -126,24 +129,15 @@ export default { ...@@ -126,24 +129,15 @@ export default {
return { return {
// activeindex: 1, // activeindex: 1,
list: [], list: [],
status: "0", //全部排产0,1为未排产;2为已排查; status: "-1", //全部排产-1,0为未排产;2为已排查;
partTaskPk: "", //车间
result: [],
formItem: { formItem: {
resourcesType: 0, resourcesType: 0,
input: "",
select: "",
radio: "0", radio: "0",
checkbox: [],
switch: true,
date: "",
time: "", time: "",
slider: [20, 50], beginTime: "",
textarea: "", endTime: "",
day: 0 textarea: ""
}, },
tagdata: [],
listGroup: [ listGroup: [
{ {
equip_name: "调试组", equip_name: "调试组",
...@@ -155,61 +149,59 @@ export default { ...@@ -155,61 +149,59 @@ export default {
], ],
tagGroup: [ tagGroup: [
{ {
id: 1,
name: "张芳", name: "张芳",
class: "1级" class: "1级"
}, },
{ {
id: 2,
name: "张芳", name: "张芳",
class: "1级" class: "1级"
}, },
{ {
id: 4,
name: "张芳", name: "张芳",
class: "1级" class: "1级"
}, },
{ {
id: 5,
name: "张芳", name: "张芳",
class: "1级" class: "1级"
} }
], ],
cityList: [ classList: [
{ {
value: "0", shopId: "0",
label: "调试组" label: "调试组"
}, },
{ {
value: "1", shopId: "1",
label: "装配组" label: "装配组"
}, },
{ {
value: "2", shopId: "2",
label: "计划组" label: "计划组"
}, },
{ {
value: "3", shopId: "3",
label: "管理组" label: "管理组"
} }
] ],
orderIds: []
}; };
}, },
created() { created() {
this.orderlist(); this.orderlist(-1);
}, },
methods: { methods: {
// 过滤条件 // 过滤条件
changeStatus(a) { changeStatus(name) {
console.log(a); this.orderlist(name);
// this.orderlist(a);
}, },
orderlist() { //排产池列表
// if (a == 0) { orderlist(a) {
// //全部 this.status = a;
// } else if (a == 1) { Api.getpooltypeorderlist({ PoolType: 2, status: this.status }).then(r => {
// //未排产
// } else if (a == 2) {
// //已排产
// }
Api.getpooltypeorderlist({ PoolType: 2 }).then(r => {
// console.log(r)
if (r.success) { if (r.success) {
r.result.forEach(e => { r.result.forEach(e => {
return (e.checked = false); return (e.checked = false);
...@@ -218,31 +210,57 @@ export default { ...@@ -218,31 +210,57 @@ export default {
} }
}); });
}, },
listData(li, index) { //获取订单集
// this.isactive = index; checkData(li) {
}, if (li.checked) {
this.orderIds.push(li.id);
tagTata(name) { } else {
if (name == "all") { if (this.orderIds) {
this.status = ""; this.orderIds.forEach((e, i) => {
} if (this.orderIds[i] == li.id) {
if (name == "yi") { this.orderIds.splice(i, 1);
this.status = 13; }
} });
if (name == "wei") { }
this.status = 0;
} }
let data = { },
part_task_pk: this.partTaskPk, //工时时间范围
status: this.status changeFormat(val) {
}; this.formItem.beginTime = val[0];
Api.gettaskseqinfo(data).then(r => { this.formItem.endTime = val[1];
// console.log(r) },
if (r.success) { lowerHair() {
this.result = r.result; if (this.formItem.radio == 0) {
//一级排产选择人员
let urseId = [];
for (var i = 0; i < this.tagGroup.length; i++) {
urseId.push(this.tagGroup[i].id);
} }
}); let params1 = {
orderIds: this.orderIds,
userIds: urseId,
beginTime: this.formItem.beginTime,
endTime: this.formItem.endTime
};
Api.cmonestepschedule(params1).then(r => {
if (r.success) {
}
});
} else if (this.formItem.radio == 1) {
//二级排产选择班组
let params2 = {
orderIds: this.orderIds,
shopId: this.formItem.shopId,
beginTime: this.formItem.beginTime,
endTime: this.formItem.endTime
};
Api.cmtwostepschedule(params2).then(r => {
if (r.success) {
}
});
}
}, },
closeOk() {},
close() { close() {
this.$Modal.confirm({ this.$Modal.confirm({
title: "删除", title: "删除",
...@@ -268,9 +286,9 @@ export default { ...@@ -268,9 +286,9 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.addclass { .addclass {
border-color: rgba(38, 128, 235, 0.5) !important; border-color: rgba(38, 128, 235, 0.2) !important;
.title-i { .title-i {
background: rgba(38, 128, 235, 0.5) !important; background: rgba(38, 128, 235, 0.2) !important;
} }
} }
.scheduling { .scheduling {
...@@ -328,7 +346,7 @@ export default { ...@@ -328,7 +346,7 @@ export default {
} }
} }
.aps-r { .aps-r {
border: 1px solid rgba(228, 230, 237, 1); border: 1px solid rgba(228, 230, 237, 0.5);
width: 80%; width: 80%;
padding: 15px 15px 15px 30px; padding: 15px 15px 15px 30px;
margin-left: 20px; margin-left: 20px;
...@@ -344,7 +362,7 @@ export default { ...@@ -344,7 +362,7 @@ export default {
.tag-list { .tag-list {
width: 100%; width: 100%;
min-height: 50px; min-height: 50px;
border: 1px solid rgba(228, 230, 237, 1); border: 1px solid rgba(228, 230, 237, 0.5);
.tag-group { .tag-group {
display: inline-block; display: inline-block;
text-align: center; text-align: center;
...@@ -353,7 +371,7 @@ export default { ...@@ -353,7 +371,7 @@ export default {
line-height: 30px; line-height: 30px;
border-radius: 20px; border-radius: 20px;
margin: 5px; margin: 5px;
background: rgba(38, 128, 235, 0.25); background: rgba(38, 128, 235, 0.2);
.ivu-icon { .ivu-icon {
cursor: pointer; cursor: pointer;
} }
......
import Api from '@/plugins/request' import Api from '@/plugins/request'
export default { export default {
getmesorder(params) { getpooltypeorderlist(params) {
return Api.get(`${apsManualUrl}/aps/getmesorder`, params); //待排产订单数据 return Api.get(`${PlanUrl}/messchedule/getpooltypeorderlist`, params); //排产池订单数据
}, },
gettaskseqinfo(params) { getroutingdetails(params) {
return Api.get(`${apsManualUrl}/aps/gettaskseqinfo`, params); //根据订单获取全部工序数据 return Api.get(`${PlanUrl}/messchedule/getroutingdetails`, params); //工序信息
}, },
getlist(params) { flonestepschedule(params) {
return Api.get(`${apsManualUrl}/mes_sys_shop_info/getlist`, params); //手工排产:查询所在车间下的所有班组信息 return Api.post(`${PlanUrl}/messchedule/flonestepschedule`, params); //流水一级
}, },
getbyshopid(params) { fltwostepschedule(params) {
return Api.get(`${apsManualUrl}/mes_sys_user_info/getuserbyshopid`, params); //手工排产:根据班组ID,加载人员信息 return Api.post(`${PlanUrl}/messchedule/fltwostepschedule`, params); //流水二级
},
getlistEquip(params) {
return Api.get(`${apsManualUrl}/mes_equip_info/getlist`, params); //手工排产:获取所在车间的设备
},
getbyequippk(params) {
return Api.get(`${apsManualUrl}/mes_sys_user_info/getuserbyequippk`, params); //手工排产:根据设备ID,加载人员信息
}, },
// gettaskseqinfo(params) {
// return Api.get(`${apsManualUrl}/aps/gettaskseqinfo`, params); //根据订单获取全部工序数据
// },
// getlist(params) {
// return Api.get(`${apsManualUrl}/mes_sys_shop_info/getlist`, params); //手工排产:查询所在车间下的所有班组信息
// },
// getbyshopid(params) {
// return Api.get(`${apsManualUrl}/mes_sys_user_info/getuserbyshopid`, params); //手工排产:根据班组ID,加载人员信息
// },
// getlistEquip(params) {
// return Api.get(`${apsManualUrl}/mes_equip_info/getlist`, params); //手工排产:获取所在车间的设备
// },
// getbyequippk(params) {
// return Api.get(`${apsManualUrl}/mes_sys_user_info/getuserbyequippk`, params); //手工排产:根据设备ID,加载人员信息
// },
} }
\ No newline at end of file
<template> <template>
<div class="checkbox-list"> <div class="checkbox-list">
<Row style="border-bottom: 1px solid #e9e9e9;margin-bottom:6px;"> <Row class="check-title">
<Col span="20"> <Col span="20">
<div> <div>
<!-- :indeterminate="indeterminate" --> <!-- :indeterminate="indeterminate" -->
<!-- :label="resourcesType==0?singleList.shop_name:resourcesType==2?singleList.equip_name:''" -->
<Checkbox <Checkbox
:label="resourcesType==0?singleList.shop_name:resourcesType==2?singleList.equip_name:''" :label="singleList.equip_name"
v-model="checkAll" v-model="checkAll"
@click.prevent.native="handleCheckAll(singleList.shop_id)" @click.prevent.native="handleCheckAll(singleList.shop_id)"
>{{resourcesType==0?singleList.shop_name:resourcesType==2?singleList.equip_name:''}}</Checkbox> >{{singleList.equip_name}}</Checkbox>
<!-- {{resourcesType==0?singleList.shop_name:resourcesType==2?singleList.equip_name:''}} -->
</div> </div>
</Col> </Col>
<Col span="4"> <Col span="4">
...@@ -18,112 +20,163 @@ ...@@ -18,112 +20,163 @@
</div> </div>
</Col> </Col>
</Row> </Row>
<CheckboxGroup <ul v-if="singleList.isClick">
<li
ref="liId"
v-for="(item,index) in list"
:key="index"
@click="onclick(index)"
>{{item.name}}&nbsp&nbsp{{item.class}}</li>
</ul>
<!-- <CheckboxGroup
v-model="checkAllGroup" v-model="checkAllGroup"
@on-change="checkAllGroupChange" @on-change="checkAllGroupChange"
v-if="singleList.isClick" v-if="singleList.isClick"
> >-->
<Checkbox <!-- :label="resourcesType==0?item.user_name:resourcesType==2?item.equip_name:''" -->
:label="resourcesType==0?item.user_name:resourcesType==2?item.equip_name:''" <!-- <Checkbox v-for="(item,index) in list" :key="index" :label="item.name">{{item.name}}</Checkbox>
v-for="(item,index) in list" </CheckboxGroup>-->
:key="item.user_id"
></Checkbox>
</CheckboxGroup>
</div> </div>
</template> </template>
<script> <script>
import Api from './api' import Api from "./api";
export default { export default {
name: 'CheckboxList', name: "CheckboxList",
props: ['singleList', 'resourcesType'], props: ["singleList"],
data() { data() {
return { return {
chooseNum: null,
indeterminate: true, indeterminate: true,
checkAll: false, checkAll: false,
checkAllGroup: [], checkAllGroup: [],
typeIcon: 'ios-arrow-down', typeIcon: "ios-arrow-down",
show: -1, show: -1,
list: [], list: [
{
name: "张芳",
class: "1级"
},
{
name: "张芳",
class: "1级"
},
{
name: "张芳",
class: "1级"
},
{
name: "张芳",
class: "1级"
}
],
taglistData: [] taglistData: []
} };
}, },
mounted() { mounted() {
// this.checkList() // this.checkList()
}, },
methods: { methods: {
handleCheckAll(id) { onclick(index) {
// console.log(this.list) if (this.$refs.liId[index].className.length <= 0) {
// this.list.map((u) => { this.$refs.liId[index].className = "li-focus"; // 添加类
// console.log(u) let list = [];
// }) this.$refs.liId.forEach((element, index) => {
// this.checkList(id) if (this.$refs.liId[index].className) {
this.checkAll = !this.checkAll list.push(this.$refs.liId[index].className);
if (this.checkAll) {
let listNew = []
this.list.map((u) => {
if (this.resourcesType == 0) {
listNew.push(u.user_name)
} else if (this.resourcesType == 2) {
listNew.push(u.equip_name)
} }
}) });
this.checkAllGroup = listNew if (list.length == this.list.length) {
this.$emit('changeData', this.checkAllGroup) this.checkAll = true;
}
} else { } else {
this.checkAllGroup = [] this.$refs.liId[index].className = ""; // 选中再取消的情况
this.checkAll = false;
} }
}, },
handleCheckAll(id) {
checkAllGroupChange(data) { this.checkAll = !this.checkAll;
console.log(data) if (this.checkAll) {
console.log(this.list) this.$refs.liId.forEach((element, index) => {
this.$refs.liId[index].className = "li-focus"; // 添加类
this.checkAllGroup = data });
this.$emit('changeData', this.checkAllGroup)
if (data.length === this.list.length) {
this.indeterminate = false
this.checkAll = true
} else if (data.length > 0) {
this.indeterminate = true
this.checkAll = false
} else { } else {
this.indeterminate = false this.$refs.liId.forEach((element, index) => {
this.checkAll = false this.$refs.liId[index].className = ""; // 选中再取消的情况
});
} }
// // console.log(this.list)
// // this.list.map((u) => {
// // console.log(u)
// // })
// // this.checkList(id)
// this.checkAll = !this.checkAll;
// if (this.checkAll) {
// let listNew = [];
// this.list.map(u => {
// if (this.resourcesType == 0) {
// listNew.push(u.user_name);
// } else if (this.resourcesType == 2) {
// listNew.push(u.equip_name);
// }
// });
// this.checkAllGroup = listNew;
// this.$emit("changeData", this.checkAllGroup);
// } else {
// this.checkAllGroup = [];
// }
}, },
// checkAllGroupChange(data) {
// console.log(data);
// console.log(this.list);
// this.checkAllGroup = data;
// this.$emit("changeData", this.checkAllGroup);
// if (data.length === this.list.length) {
// this.indeterminate = false;
// this.checkAll = true;
// } else if (data.length > 0) {
// this.indeterminate = true;
// this.checkAll = false;
// } else {
// this.indeterminate = false;
// this.checkAll = false;
// }
// },
checkList(id) { checkList(id) {
if (this.resourcesType == 0) { if (this.resourcesType == 0) {
//班组 //班组
Api.getbyshopid({ shop_id: id }).then((r) => { Api.getbyshopid({ shop_id: id }).then(r => {
// console.log(r) // console.log(r)
if (r.success) { if (r.success) {
r.result.forEach((e) => { r.result.forEach(e => {
e.ischeckBox = false e.ischeckBox = false;
}) });
this.list = r.result this.list = r.result;
} }
}) });
} else if (this.resourcesType == 2) { } else if (this.resourcesType == 2) {
//设备 //设备
Api.getbyequippk({ equip_pk: 91 }).then((r) => { Api.getbyequippk({ equip_pk: 91 }).then(r => {
// console.log(r) // console.log(r)
if (r.success) { if (r.success) {
r.result.forEach((e) => { r.result.forEach(e => {
e.ischeckBox = false e.ischeckBox = false;
}) });
this.list = r.result this.list = r.result;
} }
}) });
} }
}, },
upDown(post) { upDown(post) {
if (!post.isClick) { if (!post.isClick) {
this.$set(post, 'isClick', true) this.$set(post, "isClick", true);
this.checkList(post.shop_id) this.checkList(post.shop_id);
} else { } else {
this.$set(post, 'isClick', false) this.$set(post, "isClick", false);
} }
} }
} }
...@@ -135,12 +188,41 @@ export default { ...@@ -135,12 +188,41 @@ export default {
// deep: true // deep: true
// } // }
// } // }
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.checkbox-list { .checkbox-list {
.icon-down { .icon-down {
text-align: right; text-align: right;
cursor: pointer;
}
.check-title {
height: 40px;
line-height: 40px;
padding: 0 10px;
background: rgba(38, 128, 235, 0.5);
}
ul {
min-height: 60px;
padding: 10px 5px;
display: flex;
li {
list-style-type: none;
text-align: center;
width: 100px;
height: 30px;
line-height: 30px;
border-radius: 20px;
margin: 0 5px;
cursor: pointer;
background: rgba(38, 128, 235, 0.1);
}
li:hover {
border: 1px solid rgba(38, 128, 235, 0.5);
}
.li-focus {
border: 1px solid rgba(38, 128, 235, 0.5);
}
} }
} }
</style> </style>
\ No newline at end of file
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<Col :span="6" class="chan-chi">排产池</Col> <Col :span="6" class="chan-chi">排产池</Col>
<Col :span="18" class="l-ringht"> <Col :span="18" class="l-ringht">
<RadioGroup v-model="status" type="button" @on-change="changeStatus" size="small"> <RadioGroup v-model="status" type="button" @on-change="changeStatus" size="small">
<Radio label="0">全部</Radio> <Radio label="-1">全部</Radio>
<Radio label="1">未排产</Radio> <Radio label="0">未排产</Radio>
<Radio label="2">已排查</Radio> <Radio label="2">已排查</Radio>
</RadioGroup> </RadioGroup>
</Col> </Col>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
class="left-body" class="left-body"
v-for="(li,index) in list" v-for="(li,index) in list"
:key="index" :key="index"
@click="listData(li.part_task_pk,index)" @click="listData(li)"
:class="isactive == index ? 'addclass' : '' " :class="isactive == index ? 'addclass' : '' "
> >
<Row class="title-i"> <Row class="title-i">
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<TimelineItem v-for="(item, index) in result" :key="index"> <TimelineItem v-for="(item, index) in result" :key="index">
<Badge :count="index+ 1" slot="dot" :type="type(index)"></Badge> <Badge :count="index+ 1" slot="dot" :type="type(index)"></Badge>
<div class="set-name"> <div class="set-name">
<span @click="sets(item.resources_Type)">{{item.taskname}}</span> &nbsp <span @click="sets(item.routingHeaderId)">{{item.taskname}}</span> &nbsp
<Tooltip content="拆分工序" placement="top"> <Tooltip content="拆分工序" placement="top">
<Icon type="md-bluetooth" @click="split" /> <Icon type="md-bluetooth" @click="split" />
</Tooltip> </Tooltip>
...@@ -62,8 +62,14 @@ ...@@ -62,8 +62,14 @@
</TimelineItem> </TimelineItem>
</Timeline> </Timeline>
<div> <div>
<Drawer title="排产设置盘" :closable="false" v-model="set" width="45%"> <Drawer
<Set :resourcesType="resourcesType"></Set> title="排产设置盘"
:closable="false"
v-model="set"
width="55%"
:mask-closable="false"
>
<Set :group="group" @closeOk="closeOk"></Set>
</Drawer> </Drawer>
</div> </div>
<!-- <List :result="result"></List> --> <!-- <List :result="result"></List> -->
...@@ -100,25 +106,13 @@ export default { ...@@ -100,25 +106,13 @@ export default {
}, },
data() { data() {
return { return {
group: {
orderId: 0,
routingHeaderId: 0
},
activeindex: 1, activeindex: 1,
list: [ list: [],
{ status: "-1", //全部排产-1,0为未排产;2为已排查;
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: [ result: [
{ {
taskname: "工序名称", taskname: "工序名称",
...@@ -134,7 +128,6 @@ export default { ...@@ -134,7 +128,6 @@ export default {
} }
], ],
isactive: 0, isactive: 0,
selectName: "all",
resourcesType: null, resourcesType: null,
set: false, set: false,
chaiNum: 1, //拆分数量 chaiNum: 1, //拆分数量
...@@ -142,49 +135,43 @@ export default { ...@@ -142,49 +135,43 @@ export default {
}; };
}, },
created() { created() {
// this.orderlist(); this.orderlist();
}, },
methods: { methods: {
// 排产池过滤条件
changeStatus(a) {
this.orderlist(a);
},
//排产池列表 //排产池列表
orderlist() { orderlist() {
Api.getmesorder({ status: 2, workshop_id: 3 }).then(r => { Api.getpooltypeorderlist({ PoolType: 3,status:this.status }).then(r => {
// console.log(r) // console.log(r)
if (r.success) { if (r.success) {
r.result.forEach(e => {
return (e.checked = false);
});
this.list = r.result; this.list = r.result;
this.listData(r.result[0].part_task_pk, 0);
} }
}); });
}, },
//点击选中排产订单 //点击选中排产订单
listData(li, index) { listData(li) {
// this.status = "";
// this.partTaskPk = li;
// this.tagClick("all");
this.isactive = index; this.isactive = index;
this.group.orderId = li.id;
this.tagTata(li.id);
}, },
//工序列表
// 排产池过滤条件 tagTata(id) {
changeStatus(a) { Api.getroutingdetails({ id: id }).then(r => {
console.log(a);
// this.tagTata(a);
},
//工序排产过滤
changeRodio(a) {
console.log(a);
// this.tagTata(a);
},
tagTata(name) {
let data = {
part_task_pk: this.partTaskPk,
status: this.status
};
Api.gettaskseqinfo(data).then(r => {
// console.log(r)
if (r.success) { if (r.success) {
this.result = r.result; this.result = r.result;
} }
}); });
}, },
//工序排产过滤
changeRodio(a) {
console.log(a);
},
//删除排产订单 //删除排产订单
close() { close() {
this.$Modal.confirm({ this.$Modal.confirm({
...@@ -213,13 +200,7 @@ export default { ...@@ -213,13 +200,7 @@ export default {
//设置工序 //设置工序
sets(name) { sets(name) {
this.set = true; this.set = true;
// this.resourcesType = name; this.group.routingHeaderId = name;
// if (this.resourcesType == 0 || this.resourcesType == 2) {
// this.set = true;
// } else {
// this.set = false;
// // this.$Message.info('没有设置盘')
// }
}, },
//拆分工序 //拆分工序
split() { split() {
...@@ -248,6 +229,9 @@ export default { ...@@ -248,6 +229,9 @@ export default {
this.$Message.info("您已取消删除"); this.$Message.info("您已取消删除");
} }
}); });
},
closeOk() {
this.set = false;
} }
} }
}; };
......
...@@ -6,11 +6,18 @@ ...@@ -6,11 +6,18 @@
type="datetimerange" type="datetimerange"
format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm"
placeholder="请选择工时" placeholder="请选择工时"
@on-change="changeFormat"
v-model="formItem.time" v-model="formItem.time"
style="width:300px" style="width:300px"
></DatePicker> ></DatePicker>
</FormItem> </FormItem>
<FormItem label="人员分组形式"> <FormItem label="类型">
<RadioGroup v-model="formItem.radio">
<Radio label="0">人员</Radio>
<Radio label="1">班组</Radio>
</RadioGroup>
</FormItem>
<FormItem label="人员分组形式" v-if="formItem.radio==0">
<Dictionary <Dictionary
disabled disabled
code="aps.scheduling.groupingForm" code="aps.scheduling.groupingForm"
...@@ -18,64 +25,132 @@ ...@@ -18,64 +25,132 @@
type="radio" type="radio"
></Dictionary> ></Dictionary>
</FormItem> </FormItem>
<FormItem> <FormItem label="班组" v-if="formItem.radio==1">
<div v-for="(li,index) in listGroup" :key="index"> <Select v-model="formItem.shopId" style="width:300px" multiple>
<Option v-for="item in classList" :value="item.shopId" :key="item.shopId">{{ item.label }}</Option>
</Select>
</FormItem>
<FormItem v-if="formItem.radio==0">
<!-- <UserSelect ref="userSelected" v-model="formItem.DistributeMainRouting" /> -->
<div class="list-check">
<Checkbox-List <Checkbox-List
:single-list="li" :single-list="li"
ref="groups" ref="groups"
@changeData="setData" @changeData="setData"
:resourcesType="resourcesType" v-for="(li,index) in listGroup"
:key="index"
></Checkbox-List> ></Checkbox-List>
</div> </div>
</FormItem> </FormItem>
<FormItem label="已选择"> <!-- v-if="tagGroup.lenght>0" -->
<Tag closable @on-close="handleClose" :key="index" v-for="(val, index) in tagGroup">{{val}}</Tag> <FormItem label="已选择" v-if="formItem.radio==0">
<div class="tag-list">
<div v-for="(item,index) in tagGroup" :key="index" class="tag-group">
<span>{{item.name}}&nbsp&nbsp{{item.class}}</span>
<Icon type="md-close" @click="closeTag" />
</div>
<!-- <Tag
color="rgba(38,128,235,0.3)"
closable
@on-close="handleClose"
:key="index"
v-for="(val, index) in tagGroup"
>{{val.name}}</Tag>-->
</div>
</FormItem> </FormItem>
<FormItem label="备注"> <FormItem label="备注">
<Input <Input
v-model="formItem.textarea" v-model="formItem.textarea"
type="textarea" type="textarea"
:autosize="{minRows: 2,maxRows: 5}" :autosize="{minRows: 2,maxRows: 5}"
placeholder="Enter something..." placeholder="请输入备注信息"
></Input> ></Input>
</FormItem> </FormItem>
<FormItem> <FormItem>
<Button style="margin-left: 8px">取消</Button> <Button style="margin-left: 8px" @click="closeOk">取消</Button>
<Button type="primary">排产</Button> <Button type="primary" @click="lowerHair">排产</Button>
</FormItem> </FormItem>
</Form> </Form>
</div> </div>
</template> </template>
<script> <script>
import CheckboxList from './checkboxList' import CheckboxList from "./checkboxList";
import Api from './api' import Api from "./api";
export default { export default {
name: 'set', name: "set",
components: { components: {
CheckboxList CheckboxList
}, },
props: { props: {
resourcesType: Number group: {
default: Object,
orderId: Number,
routingHeaderId: Number
}
}, },
data() { data() {
return { return {
orderId: 0, //订单id
routingHeaderId: 0, //工艺规程id
formItem: { formItem: {
resourcesType: 0, resourcesType: 0,
input: '', radio: "0",
select: '', time: "",
radio: 'male', beginTime: "",
checkbox: [], endTime: "",
switch: true, textarea: ""
date: '',
time: '',
slider: [20, 50],
textarea: '',
day: 0
}, },
tagdata: [], listGroup: [
listGroup: [], {
tagGroup: [] equip_name: "调试组",
} isClick: true
},
{
equip_name: "装配组"
}
],
tagGroup: [
{
id: 1,
name: "张芳",
class: "1级"
},
{
id: 2,
name: "张芳",
class: "1级"
},
{
id: 4,
name: "张芳",
class: "1级"
},
{
id: 5,
name: "张芳",
class: "1级"
}
],
classList: [
{
shopId: "0",
label: "调试组"
},
{
shopId: "1",
label: "装配组"
},
{
shopId: "2",
label: "计划组"
},
{
shopId: "3",
label: "管理组"
}
]
};
}, },
mounted() {}, mounted() {},
// computed: { // computed: {
...@@ -92,43 +167,111 @@ export default { ...@@ -92,43 +167,111 @@ export default {
// } // }
// }, // },
methods: { methods: {
getList(v) { lowerHair(v) {
if (v == 0) { if (this.formItem.radio == 0) {
//班组 //一级排产选择人员
Api.getlist({ workshop_pk: 3 }).then((r) => { let urseId = [];
console.log(r) for (var i = 0; i < this.tagGroup.length; i++) {
urseId.push(this.tagGroup[i].id);
}
let items = [
{
detailId: 0,
userIds: urseId,
quantity: 0,
beginTime: this.formItem.beginTime,
endTime: this.formItem.endTime
}
];
let params1 = {
orderIds: this.group.orderId,
routingHeaderId: this.group.routingHeaderId,
items: items
};
Api.flonestepschedule(params1).then(r => {
if (r.success) {
}
});
} else if (this.formItem.radio == 1) {
//二级排产选择班组
let items = [
{
detailId: 0,
userIds: urseId,
quantity: 0,
beginTime: this.formItem.beginTime,
endTime: this.formItem.endTime
}
];
let params2 = {
orderIds: this.group.orderId,
routingHeaderId: this.group.routingHeaderId,
items: items
};
Api.fltwostepschedule(params2).then(r => {
if (r.success) { if (r.success) {
r.result.forEach((u) => {
u.isClick = false
})
this.listGroup = r.result
} }
}) });
} else if (v == 2) {
//设备
Api.getlistEquip({ workshop_pk: 3 }).then((r) => {
console.log(r)
r.result.forEach((u) => {
u.isClick = false
})
this.listGroup = r.result
})
} }
}, },
closeOk() {
this.$emit("closeOk");
},
handleClose(nodeKey) { handleClose(nodeKey) {
// this.$refs.users.handleCheck({ checked: false, nodeKey: nodeKey }); // this.$refs.users.handleCheck({ checked: false, nodeKey: nodeKey });
}, },
setData(val) { setData(val) {
this.tagGroup = val this.tagGroup = val;
} },
//工时时间范围
changeFormat(val) {
this.formItem.beginTime = val[0];
this.formItem.endTime = val[1];
},
closeTag() {}
}, },
watch: { watch: {
resourcesType(v) { // resourcesType(v) {
if (v != null) { // if (v != null) {
this.formItem.resourcesType = v // this.formItem.resourcesType = v;
this.getList(v) // this.getList(v);
// }
// }
}
};
</script>
<style lang="less" scoped>
.set {
border: 1px solid rgba(228, 230, 237, 0.5);
width: 100%;
padding: 15px;
margin-left: 10px;
// box-shadow: darkgrey 2px 2px 8px 1px; //边框阴影
.r-title {
font-size: 14px;
font-weight: bold;
margin-bottom: 10px;
}
.list-check {
border: 1px solid rgba(38, 128, 235, 0.5);
}
.tag-list {
width: 100%;
min-height: 50px;
border: 1px solid rgba(228, 230, 237, 0.5);
.tag-group {
display: inline-block;
text-align: center;
width: 100px;
height: 30;
line-height: 30px;
border-radius: 20px;
margin: 5px;
background: rgba(38, 128, 235, 0.2);
.ivu-icon {
cursor: pointer;
} }
} }
} }
} }
</script> </style>
...@@ -86,6 +86,7 @@ ...@@ -86,6 +86,7 @@
line-height: 50px; line-height: 50px;
border-left: 1px solid #ccc; border-left: 1px solid #ccc;
background: #f5f7f9; background: #f5f7f9;
z-index: 888;
.ivu-menu-item{ .ivu-menu-item{
width: 140px; width: 140px;
border-right: 1px solid #ccc; border-right: 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