From d16a7da33b82421bd47fe52c41de7a6e1c35e841 Mon Sep 17 00:00:00 2001
From: "[li_she]" <[li.she@xujiesoft.com]>
Date: Fri, 2 Dec 2022 17:26:43 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A4=8D=E5=88=B6=E6=8F=92=E5=85=A5=E6=B4=BE?=
=?UTF-8?q?=E5=B7=A5=E5=8D=95=20=202022=E5=B9=B412=E6=9C=882=E6=97=A5=20sx?=
=?UTF-8?q?m?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/schedule/order_schedule.js | 3 +
src/views/modules/schedule/order_schedule.vue | 73 +++++++++++++------
2 files changed, 54 insertions(+), 22 deletions(-)
diff --git a/src/api/schedule/order_schedule.js b/src/api/schedule/order_schedule.js
index 93cfc82..49bf74d 100644
--- a/src/api/schedule/order_schedule.js
+++ b/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 moveScheduleBun = data => createAPI('scheduling/moveScheduleBun', 'POST', data)
diff --git a/src/views/modules/schedule/order_schedule.vue b/src/views/modules/schedule/order_schedule.vue
index 7f4748f..06a78ef 100644
--- a/src/views/modules/schedule/order_schedule.vue
+++ b/src/views/modules/schedule/order_schedule.vue
@@ -286,12 +286,12 @@
:disabled="detailMenuButton.partStockFlag">{{ buttons.viewPartStock }}
-
-
-
-
-
-
+ {{ '复制派工单' }}
+
+ {{ '插入派工单' }}
+
{{ buttons.settingTable }}
@@ -410,7 +410,8 @@ import {
updateScheduleWaitTimes,
refreshScheduleByRouting,
refreshScheduleByCalendar,
- sumProductionCapacity
+ sumProductionCapacity,
+ moveScheduleBun
} from '@/api/schedule/order_schedule.js'
import {
@@ -453,8 +454,8 @@ export default {
currentRoutingRow: {},
currentSchedlingRow: {},
selectList: [],
- copyShopOrder: {},
- insertShopOrder: {},
+ copyShopOrder: null,
+ insertShopOrder: null,
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
@@ -2413,6 +2414,8 @@ export default {
this.getShopOrderList();
this.getOrderScheduleList();
this.getSumProductionCapacity()
+ this.insertShopOrder = null
+ this.copyShopOrder = null
},
/*列表方法的回调*/
@@ -2672,28 +2675,54 @@ export default {
this.showPartStockFlag = true;
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('请复制派工单,再执行插入派工单操作!')
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() {