From f009403e5309d1d7d7d4d8e302555715bde232c4 Mon Sep 17 00:00:00 2001 From: ruanqi Date: Thu, 4 Aug 2022 18:14:22 +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 | 1 + src/api/production/generateReport.js | 7 + src/assets/scss/global.scss | 4 +- src/views/modules/pad/padPartPhoto.vue | 10 +- .../modules/production/generateReport.vue | 262 +++++++-- .../modules/production/generateReport_old.vue | 515 ++++++++++++++++++ .../modules/production/scheduleForSOTask.vue | 102 +++- 7 files changed, 836 insertions(+), 65 deletions(-) create mode 100644 src/views/modules/production/generateReport_old.vue diff --git a/src/api/production.js b/src/api/production.js index 7fd4f18..f2210d2 100644 --- a/src/api/production.js +++ b/src/api/production.js @@ -47,6 +47,7 @@ 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); +export const scheduleForSOTask=data => createAPI(`dailyPlan/scheduleForSOTask`, 'post', data); diff --git a/src/api/production/generateReport.js b/src/api/production/generateReport.js index d90d561..19cbaf6 100644 --- a/src/api/production/generateReport.js +++ b/src/api/production/generateReport.js @@ -5,3 +5,10 @@ export const getGenerateReportList = data => createAPI(`dailyPlan/getGenerateRep // 获取生产报告信息 export const saveGenerateReport = data => createAPI(`dailyPlan/saveGenerateReport`, 'post', data); + +// 获取生产报告信息 +export const getSOScheduleRoutingData = data => createAPI(`dailyPlan/getSOScheduleRoutingData`, 'post', data); + + +// 获取生产报告信息 +export const saveGenerateReportForSchedule = data => createAPI(`dailyPlan/saveGenerateReportForSchedule`, 'post', data); diff --git a/src/assets/scss/global.scss b/src/assets/scss/global.scss index 3b6bf0f..0d7a1cc 100644 --- a/src/assets/scss/global.scss +++ b/src/assets/scss/global.scss @@ -208,4 +208,6 @@ a:hover{ .mainTable .hover-row > td{ background-color: transparent !important; } - +.padPhoto .img{ + object-fit: cover; +} diff --git a/src/views/modules/pad/padPartPhoto.vue b/src/views/modules/pad/padPartPhoto.vue index acf40fa..426d766 100644 --- a/src/views/modules/pad/padPartPhoto.vue +++ b/src/views/modules/pad/padPartPhoto.vue @@ -92,8 +92,8 @@ } this.fileName=this.photoDatas[this.num-1].attaFileNameDb; this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")"; - this.photoUrl='http://192.168.2.172/upload/'+this.photoDatas[this.num-1].attaFileNameDb; - // this.photoUrl='http://192.168.1.83/upload/'+this.photoDatas[this.num-1].attaFileNameDb; + // this.photoUrl='http://192.168.2.172/upload/'+this.photoDatas[this.num-1].attaFileNameDb; + this.photoUrl='http://192.168.1.83/upload/'+this.photoDatas[this.num-1].attaFileNameDb; }) }, nextPicture(){ @@ -111,7 +111,8 @@ } this.fileName=this.photoDatas[this.num-1].attaFileNameDb; this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")"; - this.photoUrl='http://192.168.2.172/upload/'+this.photoDatas[this.num-1].attaFileNameDb; + // this.photoUrl='http://192.168.2.172/upload/'+this.photoDatas[this.num-1].attaFileNameDb; + this.photoUrl='http://192.168.1.83/upload/'+this.photoDatas[this.num-1].attaFileNameDb; }, lastPicture(){ if(this.photoDatas.length==0){ @@ -128,7 +129,8 @@ } this.fileName=this.photoDatas[this.num-1].attaFileNameDb; this.fileTitle="文件名 ("+this.num+"/"+this.photoDatas.length+")"; - this.photoUrl='http://192.168.2.172/upload/'+this.photoDatas[this.num-1].attaFileNameDb; + // this.photoUrl='http://192.168.2.172/upload/'+this.photoDatas[this.num-1].attaFileNameDb; + this.photoUrl='http://192.168.1.83/upload/'+this.photoDatas[this.num-1].attaFileNameDb; }, }, created () { diff --git a/src/views/modules/production/generateReport.vue b/src/views/modules/production/generateReport.vue index 678b986..58e59e3 100644 --- a/src/views/modules/production/generateReport.vue +++ b/src/views/modules/production/generateReport.vue @@ -6,7 +6,7 @@ 加工中心编码 - + 产品编码 @@ -47,109 +47,123 @@ + min-width="80" + label="派工单号"> + align="left" + min-width="100" + label="关联单号"> + min-width="80" + label="关联单号类型"> + label="工序号"> + min-width="160" + label="工序名称"> + min-width="80" + label="派工数量"> + min-width="80" + label="报工数量"> + align="left" + min-width="80" + label="派工日期"> + + + min-width="80" + label="物料编码"> + min-width="200" + label="物料名称"> + label="机台ID"> + label="班次"> + + - - + + @@ -256,22 +270,67 @@ + 查看SOP 取消 确定 - + + + +
+
产品图片
+ + + + + + + + + + + + + + + + + + + + + 上一张 + + + 下一张 + + + 关闭 + + +
+
+ +
+ +
+
+
+
+ + diff --git a/src/views/modules/production/scheduleForSOTask.vue b/src/views/modules/production/scheduleForSOTask.vue index c735cd5..14e5c4d 100644 --- a/src/views/modules/production/scheduleForSOTask.vue +++ b/src/views/modules/production/scheduleForSOTask.vue @@ -265,7 +265,7 @@ 添加 - 保存 + 保存
@@ -374,6 +374,7 @@ getSOTastRoutingData, getWorkCenterOperatorList, getAvailableResourceList, + scheduleForSOTask, } from "@/api/production.js" export default { @@ -437,6 +438,7 @@ sumQty: '', orderDate:'', operatorId:'', + efficiency:'', }, scheduledModalFlag: false, availableResourceList: [], @@ -495,6 +497,7 @@ itemNo: row.itemNo, operationDesc: row.operationDesc, workCenterNo: row.workCenterNo, + efficiency:row.efficiency, orderDate: row.orderDate, scheduleDate: '', scheduleQty: '', @@ -528,7 +531,6 @@ shiftNo: this.schedulingModalData.shiftNo, scheduleDate: null, operatorId:this.schedulingModalData.operatorId, - selectList: [] }) this.sumQty += this.schedulingModalData.scheduleQty }, @@ -566,6 +568,102 @@ this.availableResourceList = data.rows; }) }, + saveSchedule(){ + if(this.schedulingModalTableData.length==0){ + this.$alert('请添加派工记录!', '错误', { + confirmButtonText: '确定' + }) + return false + } + if(this.schedulingModalData.qtyToSchedule { + this.doSchedule(); + }) + }else { + this.doSchedule(); + } + }, + doSchedule(){ + let indata={ + orderNo: this.schedulingModalData.orderNo, + site: this.schedulingModalData.site, + orderDate: this.schedulingModalData.orderDate, + partNo: this.schedulingModalData.partNo, + itemNo: this.schedulingModalData.itemNo, + workCenterNo: this.schedulingModalData.workCenterNo, + sumQty: this.schedulingModalData.sumQty, + scheduleDetail:this.schedulingModalTableData, + efficiency:this.schedulingModalData.efficiency, + orderRef1:this.schedulingModalData.orderRef1 + } + scheduleForSOTask(indata).then(({data}) => { + if (data && data.code === 0) { + this.scheduledModalFlag = false + for (let i = 0; i { + } + }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } }, created() { }