Commit 83ec8ae3 authored by 康振飞's avatar 康振飞

拆分订单

parent b2b3a142
......@@ -14,10 +14,21 @@
<Radio label="2">已排产</Radio>
</RadioGroup>
{{listTask.length}}
<span class="check">
<RadioGroup v-model="listShow" type="button" size="small">
<Radio label="订单" title="订单分类">
<Icon type="ios-albums" />
</Radio>
<Radio label="工单" title="时间顺序">
<Icon type="ios-calendar" />
</Radio>
</RadioGroup>
</span>
</p>
<div class="dispatch_part_body" :style="{height:byheight}">
<!-- {{ids}} -->
<Row :gutter="15" class="card_body01">
<!-- <p>订单号:{{item.mesCode}}</p> v-for="(item,index) in listTask" :key="index" -->
<Col span="8" class="dispatch_card" v-for="(item,index) in listTask" :key="index">
<Card>
<p slot="title" class="card_top">
......@@ -247,6 +258,7 @@ export default {
byheight: '450px',
button1: '全部',
button2: '设备',
listShow: '订单',
shebei: '',
dateRange: {
//禁选工时时间区间
......@@ -428,13 +440,6 @@ export default {
let formData = this.listTask
let timebegin = formData[0].beginTime
let timend = formData[0].endTime
if (this.button2 == '设备') {
this.entity.taskTime = [timebegin,timend]
this.facilityModal = true
} else {
this.pentity.taskTime = [timebegin,timend]
this.manModal = true
}
this.newList = []
chekids.forEach((v) => {
var item = formData.filter((u) => {
......@@ -444,6 +449,20 @@ export default {
this.newList.push(item[0])
}
})
if (this.button2 == '设备') {
this.entity.taskTime = [timebegin,timend]
this.facilityModal = true
} else {
this.pentity.taskTime = [timebegin,timend]
if(formData.map(t=>{
this.newList.filter(m=>{
m.id = t.id
})
})){
}
this.manModal = true
}
console.log('选中的数据', this.newList)
},
// 设备派工
......@@ -481,7 +500,11 @@ export default {
// console.log(item)
this.$refs['formpepole'].validate((valid) => {
if(valid){
Api.saveTeamentry(item).then((res) => {
let params = {
isDispatch: 1,//派工是1,保存是0
entryList: item
}
Api.saveTeamentry(params).then((res) => {
if (res.success) {
this.$Message.success('人员派工成功。')
this.getUserInfoFn()
......@@ -494,7 +517,6 @@ export default {
this.$Message.error('校验不通过...')
}
})
},
// 拆分方法
setChai(item, index) {
......@@ -512,6 +534,29 @@ export default {
detail.pid = this.$u.guid()
detail.quantity = this.chaiNum
this.listTask.splice(this.rowIndex + 1, 0, detail)
this.saveFameData()
},
// 拆分保存
saveFameData() {
// let item = this.newList
// item.map((u) => {
// u.userIds = this.peploeId
// u.remark = this.pentity.remark
// })
// console.log(item)
let params = {
isDispatch: 0,//派工是1,保存是0
entryList: this.listTask
}
Api.saveTeamentry(params).then((res) => {
if (res.success) {
this.$Message.success('拆分成功。')
// this.getUserInfoFn()
// this.manModal = false
} else {
this.$Message.error('拆分失败...')
}
})
},
// 删除行
removeDetail(item, index) {
......
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