Browse Source

复制插入派工单 2022年12月2日 sxm

master
[li_she] 3 years ago
parent
commit
d16a7da33b
  1. 3
      src/api/schedule/order_schedule.js
  2. 73
      src/views/modules/schedule/order_schedule.vue

3
src/api/schedule/order_schedule.js

@ -41,3 +41,6 @@ export const refreshScheduleByCalendar = data => createAPI('scheduling/refreshSc
// 产能汇总 // 产能汇总
export const sumProductionCapacity = data => createAPI('schedule/sumProductionCapacity', 'POST', data) export const sumProductionCapacity = data => createAPI('schedule/sumProductionCapacity', 'POST', data)
// 复制插入派工单
export const moveScheduleBun = data => createAPI('scheduling/moveScheduleBun', 'POST', data)

73
src/views/modules/schedule/order_schedule.vue

@ -286,12 +286,12 @@
:disabled="detailMenuButton.partStockFlag">{{ buttons.viewPartStock }} :disabled="detailMenuButton.partStockFlag">{{ buttons.viewPartStock }}
</el-dropdown-item> </el-dropdown-item>
<hr width="95%"/> <hr width="95%"/>
<!-- <el-dropdown-item class="customer-li" command="copyShopOrder"-->
<!-- :disabled="this.currentSchedlingRow?false:true">{{ '复制派工单' }}-->
<!-- </el-dropdown-item>-->
<!-- <el-dropdown-item class="customer-li" command="insertShopOrder"-->
<!-- :disabled="this.currentSchedlingRow?false:true">{{ '插入派工单' }}-->
<!-- </el-dropdown-item>-->
<el-dropdown-item class="customer-li" command="copyShopOrder"
:disabled="this.currentSchedlingRow?false:true">{{ '复制派工单' }}
</el-dropdown-item>
<el-dropdown-item class="customer-li" command="insertShopOrder"
:disabled="this.copyShopOrder?false:true">{{ '插入派工单' }}
</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<el-button @click="userSetting('5303Schedule')" type="primary">{{ buttons.settingTable }}</el-button> <el-button @click="userSetting('5303Schedule')" type="primary">{{ buttons.settingTable }}</el-button>
@ -410,7 +410,8 @@ import {
updateScheduleWaitTimes, updateScheduleWaitTimes,
refreshScheduleByRouting, refreshScheduleByRouting,
refreshScheduleByCalendar, refreshScheduleByCalendar,
sumProductionCapacity
sumProductionCapacity,
moveScheduleBun
} from '@/api/schedule/order_schedule.js' } from '@/api/schedule/order_schedule.js'
import { import {
@ -453,8 +454,8 @@ export default {
currentRoutingRow: {}, currentRoutingRow: {},
currentSchedlingRow: {}, currentSchedlingRow: {},
selectList: [], selectList: [],
copyShopOrder: {},
insertShopOrder: {},
copyShopOrder: null,
insertShopOrder: null,
pageData: { pageData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
username: this.$store.state.user.name, username: this.$store.state.user.name,
@ -2413,6 +2414,8 @@ export default {
this.getShopOrderList(); this.getShopOrderList();
this.getOrderScheduleList(); this.getOrderScheduleList();
this.getSumProductionCapacity() this.getSumProductionCapacity()
this.insertShopOrder = null
this.copyShopOrder = null
}, },
/*列表方法的回调*/ /*列表方法的回调*/
@ -2672,28 +2675,54 @@ export default {
this.showPartStockFlag = true; this.showPartStockFlag = true;
this.$refs.comPartStock.init(tempData); this.$refs.comPartStock.init(tempData);
}) })
}else if(menuName == 'copyShopOrder'){
} else if (menuName == 'copyShopOrder') {
// //
this.copyShopOrder = JSON.parse(JSON.stringify(this.currentSchedlingRow))
}else if(menuName == 'insertShopOrder'){
//
this.insertShopOrder = JSON.parse(JSON.stringify(this.currentSchedlingRow))
this.copyShopOrderDate()
} else if (menuName == 'insertShopOrder') {
this.insertShopOrderData()
} }
}, },
// //
copyShopOrder(){
copyShopOrderDate() {
this.copyShopOrder = JSON.parse(JSON.stringify(this.currentSchedlingRow))
}, },
// //
insertShopOrder(){
if (!this.copyShopOrder){
this.$message.warning('请复制派工单,再执行插入派工单操作!')
return;
}
if (this.copyShopOrder){
insertShopOrderData() {
//
this.insertShopOrder = JSON.parse(JSON.stringify(this.currentSchedlingRow))
if (!this.copyShopOrder) {
this.$message.warning('请复制派工单,再执行插入派工单操作!') this.$message.warning('请复制派工单,再执行插入派工单操作!')
return; return;
} }
if (!this.insertShopOrder) {
this.$message.warning('请选则插入的派工单位置!')
return;
}
if (this.insertShopOrder.seqNo == this.copyShopOrder.seqNo) {
this.$message.warning('源单子与目的单子不能是同一个派工单!')
return;
}
this.moveScheduleAction()
},
//
moveScheduleAction() {
let dto = {
site: this.copyShopOrder.site,
workCenterNo: this.copyShopOrder.workCenterNo,
resourceId: this.copyShopOrder.resourceId,
scheduleSeqNo: this.copyShopOrder.scheduledSeqNo,
moveScheduleSeqNo: this.insertShopOrder.scheduledSeqNo
}
moveScheduleBun(dto).then(({data}) => {
if (data && data.code == 0) {
this.$message.success(data.msg)
this.getOrderScheduleList()
} else {
this.$message.warning(data.msg)
}
this.copyShopOrder = null
this.insertShopOrder = null
})
}, },
/*打开分批排产*/ /*打开分批排产*/
openSplitScheduleModal() { openSplitScheduleModal() {

Loading…
Cancel
Save