diff --git a/src/views/modules/qc/IPQCResultEntry.vue b/src/views/modules/qc/IPQCResultEntry.vue index aac9d0b..f1aa94f 100644 --- a/src/views/modules/qc/IPQCResultEntry.vue +++ b/src/views/modules/qc/IPQCResultEntry.vue @@ -59,7 +59,12 @@ - + @@ -1668,6 +1673,7 @@ startDate2: '', endDate2: '', inspectionTypeNo: '', + inspectionTypeNos: [], partNo: '', partDesc: '', cinvSourceCode: '', @@ -3196,6 +3202,7 @@ userName: this.$store.state.user.name, inspectionNo: '', inspectionTypeNo: '', + inspectionTypeNos: [], isQualified: '', buNo: '', startDate: '', @@ -4124,7 +4131,8 @@ this.searchLoading = true this.searchData.limit = this.pageSize this.searchData.page = this.pageIndex - qcIPQCInspectionSearch(this.searchData).then(({data}) => { + const queryData = this.buildSearchQueryData() + qcIPQCInspectionSearch(queryData).then(({data}) => { if (data.code === 0) { this.dataList = data.page.list this.pageIndex = data.page.currPage @@ -4156,10 +4164,23 @@ async createExportData () { this.searchData.limit = -1 this.searchData.page = 1 - const { data } = await qcIPQCInspectionSearch(this.searchData) + const queryData = this.buildSearchQueryData() + const { data } = await qcIPQCInspectionSearch(queryData) return data.page.list || [] }, + buildSearchQueryData () { + const queryData = { + ...this.searchData + } + const inspectionTypeNos = Array.isArray(queryData.inspectionTypeNos) + ? queryData.inspectionTypeNos.filter(item => item !== null && item !== undefined && String(item).trim() !== '') + : [] + queryData.inspectionTypeNos = inspectionTypeNos + queryData.inspectionTypeNo = inspectionTypeNos.length === 1 ? inspectionTypeNos[0] : '' + return queryData + }, + startDownload () { this._exportLoading = this.$loading({ lock: true, diff --git a/src/views/modules/yieldReport/com_tid_upload_order.vue b/src/views/modules/yieldReport/com_tid_upload_order.vue index f46d9fa..edabf49 100644 --- a/src/views/modules/yieldReport/com_tid_upload_order.vue +++ b/src/views/modules/yieldReport/com_tid_upload_order.vue @@ -270,8 +270,8 @@ export default { scheduledDate: scheduleData.scheduledDate || '' } - this.uploadForm.process = '' this.uploadForm.machineNo = scheduleData.resourceId || scheduleData.resourceDesc || '' + this.uploadForm.process = this.getDefaultProcessByMachineNo(this.uploadForm.machineNo) this.uploadForm.shift = scheduleData.shiftNo || '' this.uploadForm.operatorNo = '' this.uploadForm.date = this.getTodayDateString() @@ -366,6 +366,21 @@ export default { return this.formatDateValue(new Date()) }, + getDefaultProcessByMachineNo (machineNo) { + const normalizedMachineNo = machineNo ? String(machineNo).trim().toUpperCase() : '' + if (!normalizedMachineNo) { + return '' + } + const firstLetter = normalizedMachineNo.charAt(0) + if (firstLetter === 'A') { + return 'testing' + } + if (firstLetter === 'M') { + return 'bonding' + } + return '' + }, + formatDateValue (dateObj) { var year = dateObj.getFullYear() var month = dateObj.getMonth() + 1