From 6bf15db7b7dc71c4991f31d61ea79d72e3a91952 Mon Sep 17 00:00:00 2001 From: ruanqi Date: Tue, 2 Aug 2022 23:56:35 +0800 Subject: [PATCH] =?UTF-8?q?0412=20=E6=96=B0=E7=9C=8B=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/production.js | 2 + .../modules/production/scheduleForSOTask.vue | 4 +- .../production/scheduleForShopOrder.vue | 53 +++++++++++++++---- 3 files changed, 48 insertions(+), 11 deletions(-) diff --git a/src/api/production.js b/src/api/production.js index 3ed1e50..7fd4f18 100644 --- a/src/api/production.js +++ b/src/api/production.js @@ -46,6 +46,8 @@ export const getWorkCenterOperatorList=data => createAPI(`dailyPlan/getWorkCente export const getAvailableResourceList=data => createAPI(`dailyPlan/getAvailableResourceList`, 'post', data); +export const scheduleForShopOrder=data => createAPI(`dailyPlan/scheduleForShopOrder`, 'post', data); + diff --git a/src/views/modules/production/scheduleForSOTask.vue b/src/views/modules/production/scheduleForSOTask.vue index c03c989..c735cd5 100644 --- a/src/views/modules/production/scheduleForSOTask.vue +++ b/src/views/modules/production/scheduleForSOTask.vue @@ -257,7 +257,7 @@ + :value="item.operatorID"> @@ -343,7 +343,7 @@ + :value="item.operatorID"> diff --git a/src/views/modules/production/scheduleForShopOrder.vue b/src/views/modules/production/scheduleForShopOrder.vue index c108222..4d10b24 100644 --- a/src/views/modules/production/scheduleForShopOrder.vue +++ b/src/views/modules/production/scheduleForShopOrder.vue @@ -311,7 +311,7 @@ + :value="item.operatorID"> @@ -341,7 +341,6 @@ v-model="scope.row.scheduleDate" type="date" value-format="yyyy-MM-dd" - @change="getTodayShiftNo2(scope.$index)" placeholder="选择日期"> @@ -397,7 +396,7 @@ + :value="item.operatorID"> @@ -428,7 +427,7 @@ getShopOrderRoutingData, getWorkCenterOperatorList, getAvailableResourceList, - + scheduleForShopOrder, } from "@/api/production.js" export default { @@ -496,6 +495,7 @@ shiftNo: '', sumQty: '', operatorId:'', + efficiency:'', }, scheduledModalFlag: false, availableResourceList: [], @@ -554,6 +554,7 @@ itemNo: row.itemNo, operationDesc: row.operationDesc, workCenterNo: row.workCenterNo, + efficiency:row.efficiency, scheduleDate: '', scheduleQty: '', resourceId: '', @@ -637,6 +638,7 @@ }) return false } + let flag=false; for (let i = 0; i this.schedulingModalData.needDate){ + flag=true; + } + } + if(flag){ + this.$confirm(`派工日期大于需求完成日期,是否继续`, '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.doSchedule(); + }) + }else { + this.doSchedule(); } - this.doSchedule(); }, doSchedule(){ let indata={ orderNo: this.schedulingModalData.orderNo, site: this.schedulingModalData.site, needDate: this.schedulingModalData.needDate, - lotSize: this.schedulingModalData.lotSize, - qtyToSchedule: this.schedulingModalData.qtyToSchedule, partNo: this.schedulingModalData.partNo, - partDescription: this.schedulingModalData.partDescription, itemNo: this.schedulingModalData.itemNo, - operationDesc: this.schedulingModalData.operationDesc, workCenterNo: this.schedulingModalData.workCenterNo, sumQty: this.schedulingModalData.sumQty, + scheduleDetail:this.schedulingModalTableData, + efficiency:this.schedulingModalData.efficiency, } + scheduleForShopOrder(indata).then(({data}) => { + if (data && data.code === 0) { + this.scheduledModalFlag = false + for (let i = 0; i { + } + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) } },