diff --git a/src/views/modules/yieldReport/com_produce_report_normal.vue b/src/views/modules/yieldReport/com_produce_report_normal.vue index e6d424a..d2b90b6 100644 --- a/src/views/modules/yieldReport/com_produce_report_normal.vue +++ b/src/views/modules/yieldReport/com_produce_report_normal.vue @@ -278,7 +278,7 @@ 上传MT日志 - + 获取班次 @@ -842,6 +842,9 @@ + + + @@ -1086,6 +1089,7 @@ import ComMrbRegister from "./com_mrb_register";/*MRB异常单登记组件*/ import comAbnormalContinueRoll from "./com_abnormal_continue_roll";/*异常续卷组件*/ import comTidUploadOrder from "./com_tid_upload_order";/*TID上传订单组件*/ import comTidUploadMtLog from "./com_tid_upload_mt_log";/*TID上传MT日志组件*/ +import comTidGetShift from "./com_tid_get_shift";/*TID获取班次组件*/ var functionId = 'C10000002'; export default { mixins: [labelPrintTemplates], // 添加标签打印模板 mixin @@ -1102,6 +1106,7 @@ export default { showMrbRegisterFlag: false,// MRB异常单登记弹窗显示状态 showTidUploadOrderFlag: false,// TID上传订单弹窗显示状态 showTidUploadMtLogFlag: false,// TID上传MT日志弹窗显示状态 + showTidGetShiftFlag: false,// TID获取班次弹窗显示状态 finishShiftLoading: false,// 结束班次处理中 showAbnormalContinueRollFlag: false,// 异常续卷弹窗显示状态 showDefault: false, @@ -4099,6 +4104,7 @@ export default { comAbnormalContinueRoll,/*异常续卷组件*/ comTidUploadOrder,/*TID上传订单组件*/ comTidUploadMtLog,/*TID上传MT日志组件*/ + comTidGetShift,/*TID获取班次组件*/ }, methods: { // 删除不良 @@ -5548,6 +5554,20 @@ export default { }) }, + // 打开TID获取班次对话框 + openGetShiftDialog() { + if (!this.scheduleData.seqNo) { + this.$message.warning('请先选择派工单!') + return + } + this.showTidGetShiftFlag = true + this.$nextTick(() => { + if (this.$refs.comTidGetShift) { + this.$refs.comTidGetShift.init(this.scheduleData) + } + }) + }, + // 结束MES班次 async handleFinishMesShift() { if (this.finishShiftLoading) { diff --git a/src/views/modules/yieldReport/com_tid_get_shift.vue b/src/views/modules/yieldReport/com_tid_get_shift.vue new file mode 100644 index 0000000..338594c --- /dev/null +++ b/src/views/modules/yieldReport/com_tid_get_shift.vue @@ -0,0 +1,475 @@ + + + + + diff --git a/src/views/modules/yieldReport/com_tid_upload_mt_log.vue b/src/views/modules/yieldReport/com_tid_upload_mt_log.vue index f5cc9e4..3f89930 100644 --- a/src/views/modules/yieldReport/com_tid_upload_mt_log.vue +++ b/src/views/modules/yieldReport/com_tid_upload_mt_log.vue @@ -205,7 +205,7 @@ export default { } this.uploadForm.machineNo = scheduleData.resourceId || scheduleData.resourceDesc || '' - this.uploadForm.shift = scheduleData.shiftNo || 'A' + this.uploadForm.shift = scheduleData.shiftNo || '' this.uploadForm.date = this.getTodayDateString() this.mesShiftData = {} this.mesShiftLogs = [] @@ -269,11 +269,10 @@ export default { getShiftValueForApi () { const shiftValue = this.uploadForm.shift ? String(this.uploadForm.shift).trim() : '' - const finalShift = shiftValue || 'A' - if (this.uploadForm.shift !== finalShift) { - this.uploadForm.shift = finalShift + if (this.uploadForm.shift !== shiftValue) { + this.uploadForm.shift = shiftValue } - return finalShift + return shiftValue }, async loadCurrentScheduleShift () { diff --git a/src/views/modules/yieldReport/com_tid_upload_order.vue b/src/views/modules/yieldReport/com_tid_upload_order.vue index 2845c57..7bad249 100644 --- a/src/views/modules/yieldReport/com_tid_upload_order.vue +++ b/src/views/modules/yieldReport/com_tid_upload_order.vue @@ -44,15 +44,23 @@ :height="leftTableHeight" v-loading="shiftLoading" style="width: 100%; margin-top: 10px;"> - + + + - + + + @@ -200,7 +208,7 @@ export default { saveLoading: false, shiftLoading: false, processOptions: [ - { label: 'bonging', value: 'bonging' }, + { label: 'bonding', value: 'bonding' }, { label: 'testing', value: 'testing' } ], pageData: { @@ -214,7 +222,7 @@ export default { scheduledDate: '' }, uploadForm: { - process: 'bonging', + process: 'bonding', machineNo: '', shift: '', operatorNo: '', @@ -251,7 +259,7 @@ export default { scheduledDate: scheduleData.scheduledDate || '' } - this.uploadForm.process = 'bonging' + this.uploadForm.process = 'bonding' this.uploadForm.machineNo = scheduleData.resourceId || scheduleData.resourceDesc || '' this.uploadForm.shift = scheduleData.shiftNo || '' this.uploadForm.operatorNo = '' @@ -359,11 +367,10 @@ export default { getShiftValueForApi () { const shiftValue = this.uploadForm.shift ? String(this.uploadForm.shift).trim() : '' - const finalShift = shiftValue || 'A' - if (this.uploadForm.shift !== finalShift) { - this.uploadForm.shift = finalShift + if (this.uploadForm.shift !== shiftValue) { + this.uploadForm.shift = shiftValue } - return finalShift + return shiftValue }, async loadOperatorOptions () { @@ -448,8 +455,56 @@ export default { return this.mesShiftData[fieldName] }, + getMesLogFieldValue (row, fieldList) { + if (!row || !Array.isArray(fieldList)) { + return '' + } + for (let i = 0; i < fieldList.length; i++) { + const fieldName = fieldList[i] + const fieldValue = row[fieldName] + if (fieldValue !== undefined && fieldValue !== null && fieldValue !== '') { + return fieldValue + } + } + return '' + }, + + getMesLogFileName (row) { + const value = this.getMesLogFieldValue(row, ['logFilename']) + return value || '-' + }, + + getMesLogResultMessage (row) { + const value = this.getMesLogFieldValue(row, ['message', 'msg', 'Message', 'result']) + return value || '-' + }, + + getMesLogStatus (row) { + return this.getMesLogFieldValue(row, ['status', 'Status', 'state', 'State']) + }, + + getMesLogStatusText (row) { + const statusValue = this.getMesLogStatus(row) + const statusText = String(statusValue) + if (statusText === '1') { + return '成功' + } + if (statusText === '0') { + return '失败' + } + + const messageText = String(this.getMesLogResultMessage(row)).toLowerCase() + if (messageText.indexOf('成功') > -1 || messageText.indexOf('success') > -1) { + return '成功' + } + if (messageText && messageText !== '-') { + return '失败' + } + return '-' + }, + getLogStatusType (status) { - return Number(status) === 1 ? 'success' : 'danger' + return String(status) === '1' ? 'success' : 'danger' }, triggerOrderFileSelect () { @@ -548,6 +603,10 @@ export default { this.$message.warning('机器账号不能为空') return false } + if (!this.getShiftValueForApi()) { + this.$message.warning('班次为空,暂不能上传') + return false + } if (!this.uploadForm.operatorNo) { this.$message.warning('请先维护上岗人员后再上传') return false @@ -758,6 +817,25 @@ export default { margin-top: 12px; } +.shift-panel /deep/ .el-table td { + padding-top: 2px !important; + padding-bottom: 2px !important; +} + +.shift-panel /deep/ .el-table .cell { + height: auto !important; + line-height: 20px !important; +} + +.shift-panel /deep/ .el-tag { + height: 20px; + line-height: 18px; + display: inline-flex; + align-items: center; + justify-content: center; + white-space: nowrap; +} + .upload-form { margin-bottom: 0; }