|
|
|
@ -229,12 +229,12 @@ |
|
|
|
:disabled="detailMenuButton.shopOrderFlag">生产订单</el-dropdown-item> |
|
|
|
<el-dropdown-item class="customer-li" command="工作日历" |
|
|
|
:disabled="detailMenuButton.workCalendarOutFlag">工作日历</el-dropdown-item> |
|
|
|
<el-dropdown-item class="customer-li" command="批量维护工作日历" |
|
|
|
:disabled="detailMenuButton.batchWorkCalendarFlag">批量维护工作日历</el-dropdown-item> |
|
|
|
<el-dropdown-item class="customer-li" command="分批排产" |
|
|
|
:disabled="detailMenuButton.splitScheduleFlag">分批排产</el-dropdown-item> |
|
|
|
<el-dropdown-item class="customer-li" command="重新排产" |
|
|
|
:disabled="detailMenuButton.reScheduleOrderFlag">重新排产</el-dropdown-item> |
|
|
|
<el-dropdown-item class="customer-li" command="更改等待时间" |
|
|
|
:disabled="detailMenuButton.changeWaitTimeFlag">更改等待时间</el-dropdown-item> |
|
|
|
<el-dropdown-item class="customer-li" command="根据工艺路线调整" |
|
|
|
:disabled="detailMenuButton.changeScheduleByRoutingFlag">根据工艺路线调整</el-dropdown-item> |
|
|
|
<el-dropdown-item class="customer-li" command="根据工作日历调整" |
|
|
|
:disabled="detailMenuButton.changeScheduleByRoutingFlag">根据工作日历调整</el-dropdown-item> |
|
|
|
<el-dropdown-item class="customer-li" command="查看物料库存" |
|
|
|
:disabled="detailMenuButton.partStockFlag">查看物料库存</el-dropdown-item> |
|
|
|
</el-dropdown-menu> |
|
|
|
@ -297,6 +297,11 @@ |
|
|
|
:visible.sync="showPartStockFlag"> |
|
|
|
</comPartStock> |
|
|
|
|
|
|
|
<!-- 更改等待时间 --> |
|
|
|
<comChangeWaitTime ref="comChangeWaitTime" :close-on-click-modal="false" |
|
|
|
:visible.sync="showChangeWaitTime" |
|
|
|
@changeScheduleWaitTimes="changeScheduleWaitTimes"> |
|
|
|
</comChangeWaitTime> |
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -307,6 +312,7 @@ |
|
|
|
import comWorkCalendarOut from "../common/com_work_calendar_out";/*工作日历外组件*/ |
|
|
|
import comBatchWorkCalendar from "../common/com_batch_work_calendar";/*批量维护工作日历外组件*/ |
|
|
|
import comPartStock from "../common/com_part_stock";/*展示物料库存的组件*/ |
|
|
|
import comChangeWaitTime from "./com_change_wait_time";/*修改等待派工单的等待时间*/ |
|
|
|
import { |
|
|
|
getResourceRestList, |
|
|
|
getShopOrderList, |
|
|
|
@ -318,6 +324,9 @@ import { |
|
|
|
reScheduleWorkOrders, |
|
|
|
moveUpSchedule, |
|
|
|
moveDownSchedule, |
|
|
|
updateScheduleWaitTimes, |
|
|
|
refreshScheduleByRouting, |
|
|
|
refreshScheduleByCalendar, |
|
|
|
} from '@/api/schedule/order_schedule.js' |
|
|
|
|
|
|
|
export default { |
|
|
|
@ -329,6 +338,7 @@ export default { |
|
|
|
showBatchWorkCalendar: false, |
|
|
|
showSplitScheduleFlag: false, |
|
|
|
showPartStockFlag: false, |
|
|
|
showChangeWaitTime: false, |
|
|
|
scheduleIndex: -1, |
|
|
|
modelFlag: false, |
|
|
|
modelInputFlag: true, |
|
|
|
@ -1766,9 +1776,9 @@ export default { |
|
|
|
detailMenuButton: { |
|
|
|
shopOrderFlag: true, |
|
|
|
workCalendarOutFlag: true, |
|
|
|
batchWorkCalendarFlag: true, |
|
|
|
splitScheduleFlag: true, |
|
|
|
reScheduleOrderFlag: true, |
|
|
|
changeWaitTimeFlag: true, |
|
|
|
changeScheduleByRoutingFlag: true, |
|
|
|
changeScheduleByCalendarFlag: true, |
|
|
|
partStockFlag: true, |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1781,6 +1791,7 @@ export default { |
|
|
|
comWorkCalendarOut,/*工作日历外组件*/ |
|
|
|
comBatchWorkCalendar,/*批量维护工作日历外组件*/ |
|
|
|
comPartStock,/*展示物料库存的组件*/ |
|
|
|
comChangeWaitTime,/*修改等待派工单的等待时间*/ |
|
|
|
}, |
|
|
|
|
|
|
|
mounted() { |
|
|
|
@ -1976,53 +1987,57 @@ export default { |
|
|
|
this.$refs.comWorkCalendarOut.init(tempData); |
|
|
|
}) |
|
|
|
|
|
|
|
}else if('批量维护工作日历' === menuName){ |
|
|
|
}else if('更改等待时间' === menuName){ |
|
|
|
//判断是否选择好了工单 |
|
|
|
if(this.currentRoutingRow == null || this.currentRoutingRow == {}){ |
|
|
|
if(this.currentSchedlingRow == null || this.currentSchedlingRow == {}){ |
|
|
|
//重置按钮 |
|
|
|
this.primaryMenuButton.workCalendarOutFlag = true; |
|
|
|
this.detailMenuButton.changeWaitTimeFlag = true; |
|
|
|
//返回错误 |
|
|
|
this.$message.error('请选择工单!'); |
|
|
|
this.$message.error('请选择派工单!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
let tempData = {'site': this.pageData.site, 'calendarId': this.pageData.calendarId, |
|
|
|
'calendarDesc': this.pageData.calendarDesc, 'scheduledDate': this.pageData.scheduleDate}; |
|
|
|
let waitTimes = parseFloat(this.currentSchedlingRow.timeRequired) * 60; |
|
|
|
//等待时间取整 |
|
|
|
waitTimes = parseInt(waitTimes); |
|
|
|
let tempData = {'site': this.pageData.site, 'orderNo': this.currentSchedlingRow.orderNo, |
|
|
|
'itemNo': this.currentSchedlingRow.itemNo, 'seqNo': this.currentSchedlingRow.seqNo, |
|
|
|
'waitTimes': waitTimes}; |
|
|
|
//打开组件 需要的数据 展示需要的数据 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.showBatchWorkCalendar = true; |
|
|
|
this.$refs.comBatchWorkCalendar.init(tempData); |
|
|
|
this.showChangeWaitTime = true; |
|
|
|
this.$refs.comChangeWaitTime.init(tempData); |
|
|
|
}) |
|
|
|
}else if('分批排产' === menuName){ |
|
|
|
}else if('根据工艺路线调整' === menuName){ |
|
|
|
//判断是否选择好了工单 |
|
|
|
if(this.currentRoutingRow == null || this.currentRoutingRow == {}){ |
|
|
|
if(this.currentSchedlingRow == null || this.currentSchedlingRow == {}){ |
|
|
|
//重置按钮 |
|
|
|
this.primaryMenuButton.workCalendarOutFlag = true; |
|
|
|
this.detailMenuButton.changeScheduleByRoutingFlag = true; |
|
|
|
//返回错误 |
|
|
|
this.$message.error('请选择工单!'); |
|
|
|
this.$message.error('请选择派工单!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
this.openSplitScheduleModal(); |
|
|
|
}else if('重新排产' === menuName){ |
|
|
|
this.changeScheduleByRouting(this.currentSchedlingRow); |
|
|
|
}else if('根据工作日历调整' === menuName){ |
|
|
|
//判断是否选择好了工单 |
|
|
|
if(this.currentRoutingRow == null || this.currentRoutingRow == {}){ |
|
|
|
if(this.currentSchedlingRow == null || this.currentSchedlingRow == {}){ |
|
|
|
//重置按钮 |
|
|
|
this.primaryMenuButton.workCalendarOutFlag = true; |
|
|
|
this.detailMenuButton.changeScheduleByCalendarFlag = true; |
|
|
|
//返回错误 |
|
|
|
this.$message.error('请选择工单!'); |
|
|
|
this.$message.error('请选择派工单!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
//调用提示的方法 |
|
|
|
this.warnReScheduleConfirm(); |
|
|
|
this.warnChangeScheduleByCalendar(this.currentSchedlingRow); |
|
|
|
}else if('查看物料库存' === menuName){ |
|
|
|
//判断是否选择好了工单 |
|
|
|
if(this.currentRoutingRow == null || this.currentRoutingRow == {}){ |
|
|
|
//重置按钮 |
|
|
|
this.primaryMenuButton.partStockFlag = true; |
|
|
|
this.detailMenuButton.partStockFlag = true; |
|
|
|
//返回错误 |
|
|
|
this.$message.error('请选择工单!'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
let tempData = {'site': this.pageData.site, 'orderNo': this.currentRoutingRow.orderNo}; |
|
|
|
let tempData = {'site': this.pageData.site, 'orderNo': this.currentSchedlingRow.orderNo}; |
|
|
|
//打开组件 需要的数据 展示需要的数据 |
|
|
|
this.$nextTick(() => { |
|
|
|
this.showPartStockFlag = true; |
|
|
|
@ -2031,7 +2046,7 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
/*打开分批排产 |
|
|
|
/*打开分批排产*/ |
|
|
|
openSplitScheduleModal(){ |
|
|
|
let routingRow = this.currentRoutingRow; |
|
|
|
//首先判断是否选好 |
|
|
|
@ -2045,11 +2060,6 @@ export default { |
|
|
|
this.$refs.comSplitSchedule.init(this.currentRoutingRow); |
|
|
|
}, |
|
|
|
|
|
|
|
/*区分不同的菜单 调用不同的方法 调用不同的方法*/ |
|
|
|
initProcessScheduleMenu(menuName){ |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
/*获取当前的机台对应的加工中心*/ |
|
|
|
getCurrentWorkCenterNoByResourceId(){ |
|
|
|
getCurrentWorkCenterNoByResourceId(this.pageData).then(({data}) => { |
|
|
|
@ -2363,20 +2373,90 @@ export default { |
|
|
|
if(this.currentSchedlingRow == null || this.currentSchedlingRow == {}){ |
|
|
|
this.detailMenuButton.shopOrderFlag = true; |
|
|
|
this.detailMenuButton.workCalendarOutFlag = true; |
|
|
|
this.detailMenuButton.batchWorkCalendarFlag = true; |
|
|
|
this.detailMenuButton.splitScheduleFlag = true; |
|
|
|
this.detailMenuButton.reScheduleOrderFlag = true; |
|
|
|
this.detailMenuButton.changeWaitTimeFlag = true; |
|
|
|
this.detailMenuButton.changeScheduleByRoutingFlag = true; |
|
|
|
this.detailMenuButton.changeScheduleByCalendarFlag = true; |
|
|
|
this.detailMenuButton.partStockFlag = true; |
|
|
|
}else{ |
|
|
|
this.detailMenuButton.shopOrderFlag = false; |
|
|
|
this.detailMenuButton.workCalendarOutFlag = false; |
|
|
|
this.detailMenuButton.batchWorkCalendarFlag = false; |
|
|
|
this.detailMenuButton.splitScheduleFlag = false; |
|
|
|
this.detailMenuButton.reScheduleOrderFlag = false; |
|
|
|
//需要判断是否是等待工单(只有等待工单才可以修改时间) |
|
|
|
if(this.currentSchedlingRow.orderNo === '9999'){ |
|
|
|
this.detailMenuButton.changeWaitTimeFlag = false; |
|
|
|
}else{ |
|
|
|
this.detailMenuButton.changeWaitTimeFlag = true; |
|
|
|
} |
|
|
|
this.detailMenuButton.changeScheduleByRoutingFlag = false; |
|
|
|
this.detailMenuButton.changeScheduleByCalendarFlag = false; |
|
|
|
this.detailMenuButton.partStockFlag = false; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
/*调整等待派工单的等待时间*/ |
|
|
|
changeScheduleWaitTimes(tempData){ |
|
|
|
//修改当前等待派工单的等待时间 |
|
|
|
let requestData = {'site': tempData.site, 'orderNo': tempData.orderNo, 'itemNo': tempData.itemNo, |
|
|
|
'seqNo': tempData.seqNo, 'waitTimes': tempData.waitTimes, 'workCenterNo': this.pageData.workCenterNo, |
|
|
|
'resourceId': this.pageData.resourceId, 'scheduleSeqNo': this.currentSchedlingRow.scheduledSeqNo}; |
|
|
|
updateScheduleWaitTimes(requestData).then(({data}) => { |
|
|
|
if(data.code != 200){ |
|
|
|
this.$message.error(data.msg); |
|
|
|
}else{ |
|
|
|
this.$message.success(data.msg); |
|
|
|
//刷新派工单的数据 |
|
|
|
this.getOrderScheduleList(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/*根据工艺路线调整派工单*/ |
|
|
|
changeScheduleByRouting(tempData){ |
|
|
|
//修改当前等待派工单的等待时间 |
|
|
|
let requestData = {'site': tempData.site, 'orderNo': tempData.orderNo, 'itemNo': tempData.itemNo, |
|
|
|
'seqNo': tempData.seqNo, 'workCenterNo': this.pageData.workCenterNo, |
|
|
|
'resourceId': this.pageData.resourceId, 'scheduleSeqNo': this.currentSchedlingRow.scheduledSeqNo}; |
|
|
|
refreshScheduleByRouting(requestData).then(({data}) => { |
|
|
|
if(data.code != 500){ |
|
|
|
this.$message.error(data.msg); |
|
|
|
}else{ |
|
|
|
this.$message.success(data.msg); |
|
|
|
//刷新派工单的数据 |
|
|
|
this.getOrderScheduleList(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/*提示是否按照工作日历调整派工单*/ |
|
|
|
warnChangeScheduleByCalendar(scheduleRow){ |
|
|
|
//提示操作 |
|
|
|
this.$confirm('确实要要从该派工单开始,根据工作日历调整排产吗?', '提示', { |
|
|
|
confirmButtonText: '确认', |
|
|
|
celButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() =>{ |
|
|
|
//执行创建新卷的操作 |
|
|
|
this.changeScheduleByCalendar(scheduleRow); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
/*根据日历调整派工单*/ |
|
|
|
changeScheduleByCalendar(tempData){ |
|
|
|
//修改当前等待派工单的等待时间 |
|
|
|
let requestData = {'site': tempData.site, 'orderNo': tempData.orderNo, 'itemNo': tempData.itemNo, |
|
|
|
'seqNo': tempData.seqNo, 'workCenterNo': this.pageData.workCenterNo, |
|
|
|
'resourceId': this.pageData.resourceId, 'scheduleSeqNo': this.currentSchedlingRow.scheduledSeqNo}; |
|
|
|
refreshScheduleByCalendar(requestData).then(({data}) => { |
|
|
|
if(data.code == 500){ |
|
|
|
this.$message.error(data.msg); |
|
|
|
}else{ |
|
|
|
this.$message.success(data.msg); |
|
|
|
//刷新派工单的数据 |
|
|
|
this.getOrderScheduleList(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
created() { |
|
|
|
//执行查询休息时间数据 |
|
|
|
|