diff --git a/src/api/production/generateReport.js b/src/api/production/generateReport.js index 3e91bf8..d228bd3 100644 --- a/src/api/production/generateReport.js +++ b/src/api/production/generateReport.js @@ -54,3 +54,6 @@ export const printDefectCard=data => createAPI(`dailyPlan/printDefectCard`, 'pos export const getOrderView=data => createAPI(`dailyPlan/getOrderView`, 'post', data) +export const selectSFDCToolHist = data =>createAPI(`dailyPlan/selectToolHist`,'post',data) +export const selectToolingHist = data =>createAPI(`dailyPlan/selectToolingHist`,'post',data) + diff --git a/src/views/modules/production/generateReport.vue b/src/views/modules/production/generateReport.vue index 5c219e4..428a238 100644 --- a/src/views/modules/production/generateReport.vue +++ b/src/views/modules/production/generateReport.vue @@ -384,7 +384,7 @@ 取消 - + @@ -461,7 +461,7 @@ - + @@ -530,6 +530,18 @@ + + + + + + + 查看SOP 取消 @@ -589,8 +601,8 @@ printTransNoLabel, } from "@/views/modules/print/print_transNo_label.js" import { - getSOScheduleRoutingData - , saveGenerateReportForSchedule, + getSOScheduleRoutingData, + saveGenerateReportForSchedule, searchReportedQty, searchSeqNo, startSeqNo, @@ -598,6 +610,7 @@ continueWork, getTvList, getBadCodeList, + selectSFDCToolHist } from '@/api/production/generateReport.js' import Chooselist from '@/views/modules/common/Chooselist' import { @@ -614,6 +627,7 @@ }, data () { return { + toolHistList:[],// 工具 cavity:'', setUp: { reviewFlag: false, @@ -860,6 +874,18 @@ if(this.saveHeaderData.acceptQty==null||this.saveHeaderData.acceptQty==''){ this.saveHeaderData.acceptQty=0 } + // 判断生产模数 + if (this.toolHistList.length > 0){ + if (!this.toolHistList.some(item => item.finishQty && item.finishQty !== 0)) { + this.$alert('至少填写一条工具的生产模数!', '错误信息', { + confirmButtonText: '确定' + }) + return + } + this.saveHeaderData.toolingHistDataList = this.toolHistList + this.saveHeaderData.createBy = this.$store.state.user.name + } + this.setUp.saveButton=true; saveGenerateReportForSchedule(this.saveHeaderData).then(({data}) => { this.setUp.saveButton = false @@ -943,6 +969,7 @@ initReportModal (row) { this.scanSeqNo=row.seqNo this.searchSeqNo() + this.selectSFDCToolHist(row) }, closeDialog () { Object.assign(this.$data.saveHeaderData, this.$options.data.call(this).saveHeaderData) @@ -952,6 +979,28 @@ this.tableData = data.rows }) }, + selectSFDCToolHist(row){ + let params = { + site:row.site, + orderNo:row.orderNo, + itemNo:row.itemNo, + seqNo:row.seqNo, + finishFlag:"N" + } + selectSFDCToolHist(params).then(({data})=>{ + if (data && data.code === 0){ + this.toolHistList = data.rows + }else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }).catch((error)=>{ + this.$alert(error, '错误', { + confirmButtonText: '确定' + }) + }) + }, createExportData () { return this.tableData }, @@ -1163,7 +1212,7 @@ this.liLunQty =''; this.saveHeaderData.planStartTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00') this.saveHeaderData.planFinishTime = this.dayjs(new Date()).format('YYYY-MM-DD 00:00:00') - + this.selectSFDCToolHist(this.saveHeaderData) searchReportedQty(this.saveHeaderData).then(({data}) => { if(data.code===0) { this.cavity= data.row.cavity @@ -1426,4 +1475,8 @@ font-size: 17px; font-weight: bold; } + + .big /deep/ .el-table .cell{ + height: auto !important; + } diff --git a/src/views/modules/production/soscheduleRouting.vue b/src/views/modules/production/soscheduleRouting.vue index 8c56c87..79c2883 100644 --- a/src/views/modules/production/soscheduleRouting.vue +++ b/src/views/modules/production/soscheduleRouting.vue @@ -102,16 +102,16 @@ border style="width: 100%"> + + + + + + + + + + + + + @@ -325,9 +341,11 @@