|
|
@ -169,7 +169,7 @@ |
|
|
<el-table-column prop="fileName" header-align="center" label="文件名" min-width="150" show-overflow-tooltip></el-table-column> |
|
|
<el-table-column prop="fileName" header-align="center" label="文件名" min-width="150" show-overflow-tooltip></el-table-column> |
|
|
<el-table-column prop="statusText" header-align="center" label="状态" width="70" align="center"> |
|
|
<el-table-column prop="statusText" header-align="center" label="状态" width="70" align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-tag :type="scope.row.success ? 'success' : 'danger'" size="mini"> |
|
|
|
|
|
|
|
|
<el-tag :type="scope.row.success ? 'success' : 'danger'"> |
|
|
{{ scope.row.statusText }} |
|
|
{{ scope.row.statusText }} |
|
|
</el-tag> |
|
|
</el-tag> |
|
|
</template> |
|
|
</template> |
|
|
@ -190,7 +190,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { getMesShiftData, uploadMesOrderLog } from '@/api/yieldReport/produce_report_normal.js' |
|
|
|
|
|
|
|
|
import { getMesShiftData, uploadMesOrderLog, getScheduleDateShift } from '@/api/yieldReport/produce_report_normal.js' |
|
|
import { getOperatorList2 } from '@/api/yieldReport/produce_order.js' |
|
|
import { getOperatorList2 } from '@/api/yieldReport/produce_order.js' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
@ -263,6 +263,7 @@ export default { |
|
|
this.operatorOptions = [] |
|
|
this.operatorOptions = [] |
|
|
|
|
|
|
|
|
this.updateDialogLayout() |
|
|
this.updateDialogLayout() |
|
|
|
|
|
await this.loadCurrentScheduleShift() |
|
|
await this.loadOperatorOptions() |
|
|
await this.loadOperatorOptions() |
|
|
await this.loadMesShiftData(false) |
|
|
await this.loadMesShiftData(false) |
|
|
}, |
|
|
}, |
|
|
@ -291,6 +292,42 @@ export default { |
|
|
this.rightTableHeight = nextRightTableHeight |
|
|
this.rightTableHeight = nextRightTableHeight |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getCurrentDateTimeString () { |
|
|
|
|
|
const now = new Date() |
|
|
|
|
|
const year = now.getFullYear() |
|
|
|
|
|
const month = this.padZero(now.getMonth() + 1) |
|
|
|
|
|
const day = this.padZero(now.getDate()) |
|
|
|
|
|
const hour = this.padZero(now.getHours()) |
|
|
|
|
|
const minute = this.padZero(now.getMinutes()) |
|
|
|
|
|
const second = this.padZero(now.getSeconds()) |
|
|
|
|
|
return year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
async loadCurrentScheduleShift () { |
|
|
|
|
|
if (!this.pageData.site || !this.pageData.resourceId) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
const params = { |
|
|
|
|
|
site: this.pageData.site, |
|
|
|
|
|
resourceId: this.pageData.resourceId, |
|
|
|
|
|
currentDateTime: this.getCurrentDateTimeString() |
|
|
|
|
|
} |
|
|
|
|
|
try { |
|
|
|
|
|
const { data } = await getScheduleDateShift(params) |
|
|
|
|
|
const map = (data && data.map) || {} |
|
|
|
|
|
const shiftNo = map.ShiftNo || map.shiftNo || '' |
|
|
|
|
|
const scheduleDate = map.scheduleddate || map.scheduledDate || map.ScheduleDate || map.scheduleDate || '' |
|
|
|
|
|
if (shiftNo) { |
|
|
|
|
|
this.uploadForm.shift = shiftNo |
|
|
|
|
|
} |
|
|
|
|
|
if (scheduleDate) { |
|
|
|
|
|
this.uploadForm.date = this.extractDatePart(scheduleDate) |
|
|
|
|
|
} |
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
// keep fallback values from schedule data when lookup fails |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
extractDatePart (dateValue) { |
|
|
extractDatePart (dateValue) { |
|
|
if (!dateValue) { |
|
|
if (!dateValue) { |
|
|
return this.getTodayDateString() |
|
|
return this.getTodayDateString() |
|
|
@ -360,14 +397,14 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
async loadMesShiftData (showWarning = true) { |
|
|
async loadMesShiftData (showWarning = true) { |
|
|
if (!this.uploadForm.machineNo || !this.uploadForm.date) { |
|
|
|
|
|
|
|
|
if (!this.uploadForm.machineNo) { |
|
|
this.mesShiftData = {} |
|
|
this.mesShiftData = {} |
|
|
this.mesShiftLogs = [] |
|
|
this.mesShiftLogs = [] |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
const params = { |
|
|
const params = { |
|
|
machineNo: this.uploadForm.machineNo, |
|
|
machineNo: this.uploadForm.machineNo, |
|
|
date: this.uploadForm.date, |
|
|
|
|
|
|
|
|
date: this.getTodayDateString(), |
|
|
shift: this.uploadForm.shift, |
|
|
shift: this.uploadForm.shift, |
|
|
type: '' |
|
|
type: '' |
|
|
} |
|
|
} |
|
|
@ -800,6 +837,25 @@ export default { |
|
|
margin-top: 0; |
|
|
margin-top: 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.upload-result-wrap /deep/ .el-table td { |
|
|
|
|
|
padding-top: 2px !important; |
|
|
|
|
|
padding-bottom: 2px !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.upload-result-wrap /deep/ .el-table .cell { |
|
|
|
|
|
height: auto !important; |
|
|
|
|
|
line-height: 20px !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.upload-result-wrap /deep/ .el-tag { |
|
|
|
|
|
height: 20px; |
|
|
|
|
|
line-height: 18px; |
|
|
|
|
|
display: inline-flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
justify-content: center; |
|
|
|
|
|
white-space: nowrap; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.upload-panel /deep/ .el-form-item { |
|
|
.upload-panel /deep/ .el-form-item { |
|
|
margin-bottom: 6px; |
|
|
margin-bottom: 6px; |
|
|
} |
|
|
} |
|
|
|