diff --git a/src/api/production/schedule.js b/src/api/production/schedule.js index 6b7ba4f..1fb8a1f 100644 --- a/src/api/production/schedule.js +++ b/src/api/production/schedule.js @@ -28,3 +28,5 @@ export const toolUseDetail=data => createAPI(`schedule/toolUseDetail`, 'post', d export const updateSOSPrintFlag=data => createAPI(`schedule/updateSOSPrintFlag`, 'post', data); export const openSchedule=data => createAPI(`schedule/openSchedule`, 'post', data); +export const searchDefect=data => createAPI(`schedule/searchDefect`, 'post', data); +export const searchDefectHistByReport=data => createAPI(`schedule/searchDefectHistByReport`, 'post', data); diff --git a/src/views/modules/schedule/generateReport.vue b/src/views/modules/schedule/generateReport.vue index 0bbf321..dc7a35b 100644 --- a/src/views/modules/schedule/generateReport.vue +++ b/src/views/modules/schedule/generateReport.vue @@ -376,7 +376,10 @@ - + + + + 新增不良
@@ -409,6 +412,38 @@ +
+ + + + + + + + + + +
取消 确定 @@ -426,7 +461,9 @@ searchReportedQty, searchSeqNo, startSeqNo, + searchDefect, } from '@/api/production/schedule.js' + import Chooselist from '@/views/modules/common/Chooselist' export default { name: 'generateReport', @@ -445,6 +482,7 @@ factorFlag:false, abnormalList:[], saveHeaderData: { + badList:[], qtyRequire:'', qtyUnApprove:'', site: '', @@ -532,7 +570,8 @@ currentData:'', tagNo2:'', startModalFlag:false, - + badList:[], + defectList:[], } }, mounted () { @@ -593,6 +632,12 @@ return } this.setUp.saveButton=true; + this.saveHeaderData.badList=[]; + for (let i = 0; i < this.badList.length ; i++) { + if(this.badList[i].defectQty!==''&&this.badList[i].defectCode!==''){ + this.saveHeaderData.badList.push(this.badList[i]) + } + } saveGenerateReportForSchedule(this.saveHeaderData).then(({data}) => { if (data.code == 0) { this.$message.success(data.msg) @@ -627,6 +672,9 @@ strVal = this.searchData.operatorName } } + // if (val === 1020) { + // + // } if (val === 88) { strVal = this.searchData.sResourceID } @@ -654,6 +702,9 @@ if (this.tagNo === 88) { this.searchData.sResourceID = val.ResourceID } + // if (this.tagNo === 1020) { + // this.searchData.sResourceID = val.ResourceID + // } }, initReportModal (row) { this.scanSeqNo=row.seqNo @@ -730,6 +781,9 @@ }) return false; } + this.searchDefect() + this.badList=[]; + this.saveHeaderData.badList=[]; this.saveHeaderData.qtyApprove=0 this.saveHeaderData.qtyUnApprove=0 this.saveHeaderData.qtyRework=0 @@ -791,7 +845,13 @@ } }) }, - + addBad(){ + let inData={ + defectCode:'', + defectQty:'', + } + this.badList.push(inData) + }, startSeqNo(){ let inData={ username:this.$store.state.user.name, @@ -819,6 +879,26 @@ } }) }, + deleteBad (index) { + + this.badList.splice(index, 1) + this.changeSum() + }, + changeSum(){ + this.saveHeaderData.qtyUnApprove=0 + for (let i = 0; i { + if (data.code == 0) { + this.defectList = data.rows; + } + }) + } }, created () { diff --git a/src/views/modules/schedule/searchSfdc.vue b/src/views/modules/schedule/searchSfdc.vue index 84340c3..f6c142a 100644 --- a/src/views/modules/schedule/searchSfdc.vue +++ b/src/views/modules/schedule/searchSfdc.vue @@ -72,6 +72,17 @@ :data="tableData" border style="width: 100%"> + + + + + + + + + + + + + + + + + + + + + + 关闭 + + @@ -96,7 +147,7 @@