diff --git a/src/api/yieldReport/com_split_order_report.js b/src/api/yieldReport/com_split_order_report.js index a6ccc75..7d166e7 100644 --- a/src/api/yieldReport/com_split_order_report.js +++ b/src/api/yieldReport/com_split_order_report.js @@ -1,7 +1,12 @@ import { createAPI } from '@/utils/httpRequest.js' -// 获取派工单信息 -export const getScheduleDataBySeqNo = data => createAPI('schedule/getScheduleDataBySeqNo', 'POST', data) +// 获取派工单信息(兼容仅传seqNo,支持透传itemNo) +export const getScheduleDataBySeqNo = data => { + const payload = (data !== null && typeof data === 'object') + ? data + : { seqNo: data } + return createAPI('schedule/getScheduleDataBySeqNo', 'POST', payload) +} // 获取当前上机卷信息 export const getCurrentRollOpsBySeqNo = data => createAPI('schedule/getCurrentRollOpsBySeqNo', 'POST', data) diff --git a/src/api/yieldReport/produce_report_normal.js b/src/api/yieldReport/produce_report_normal.js index 9822818..d4fda81 100644 --- a/src/api/yieldReport/produce_report_normal.js +++ b/src/api/yieldReport/produce_report_normal.js @@ -1,7 +1,12 @@ import { createAPI, createFormAPI } from '@/utils/httpRequest.js' -// 获取派工单信息 -export const getScheduleDataBySeqNo = data => createAPI('schedule/getScheduleDataBySeqNo', 'POST', data) +// 获取派工单信息(兼容仅传seqNo,支持透传itemNo) +export const getScheduleDataBySeqNo = data => { + const payload = (data !== null && typeof data === 'object') + ? data + : { seqNo: data } + return createAPI('schedule/getScheduleDataBySeqNo', 'POST', payload) +} // 暂停生产/继续生产(调用存储过程 UspUpdateProductionStatus) export const updateProductionStatus = data => createAPI('schedule/updateProductionStatus', 'POST', data) diff --git a/src/views/modules/todo/todoCenter.vue b/src/views/modules/todo/todoCenter.vue index 2851d34..53c8d08 100644 --- a/src/views/modules/todo/todoCenter.vue +++ b/src/views/modules/todo/todoCenter.vue @@ -163,8 +163,13 @@
{{ item.messageSource || '-' }}
-
- {{ item.orderNo || '-' }} +
+
+ {{ item.orderNo || '-' }} +
+
+ {{ buildProcessExceptionLabel(item) }} +
@@ -240,6 +245,12 @@ width="830px" class="todo-cache-detail-dialog" append-to-body> +
+ {{ detailDialogTitle }} + + {{ buildProcessExceptionLabel({ mrbInspectionReport: detailProcessExceptionNo }) }} + +
当前代办暂无详情数据 @@ -406,6 +417,7 @@ export default { detailDialogVisible: false, detailDialogLoading: false, detailDialogTitle: '创建分卷详情', + detailProcessExceptionNo: '', detailSections: [], showMrbRegisterFlag: false, currentAuditTodo: null, @@ -552,6 +564,18 @@ export default { }, resetDetailData () { this.detailSections = [] + this.detailProcessExceptionNo = '' + }, + resolveProcessExceptionNo (row) { + if (!row) { + return '' + } + const value = row.mrbInspectionReport || row.processExceptionNo || '' + return String(value).trim() + }, + buildProcessExceptionLabel (row) { + const processExceptionNo = this.resolveProcessExceptionNo(row) + return processExceptionNo || '-' }, toInt (value) { const num = Number(value) @@ -712,13 +736,15 @@ export default { this.detailDialogVisible = true this.detailDialogLoading = true this.resetDetailData() + this.detailProcessExceptionNo = this.resolveProcessExceptionNo(row) const query = { site: row.site || this.searchData.site || this.$store.state.user.site, buNo: row.buNo || this.searchData.buNo || '', infoCode: row.infoCode || '', orderNo: row.orderNo || '', - seqNo: row.seqNo + seqNo: row.seqNo, + mrbInspectionReport: this.resolveProcessExceptionNo(row) } getTodoDetailRecords(query).then(({ data }) => { if (!(data && data.code === 200)) { @@ -726,6 +752,10 @@ export default { return } const resultMap = data.resultMap || {} + const processExceptionNo = this.resolveProcessExceptionNo(resultMap) + if (processExceptionNo) { + this.detailProcessExceptionNo = processExceptionNo + } const triggerList = resultMap.triggerList || [] const reportList = resultMap.reportList || [] const sections = [] @@ -1041,10 +1071,36 @@ export default { } .todo-main-title { - margin-top: 6px; + margin-top: 0; font-size: 14px; color: #303133; font-weight: 700; + flex: 1; + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.todo-main-title-row { + margin-top: 6px; + display: flex; + align-items: center; + gap: 8px; +} + +.todo-process-chip { + max-width: 52%; + font-size: 11px; + color: #2f7ed8; + border: 1px solid #b3d8ff; + background: #ecf5ff; + border-radius: 999px; + line-height: 18px; + padding: 0 8px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .todo-detail-line { @@ -1142,6 +1198,36 @@ export default { padding-top: 10px; } +.todo-detail-dialog-title { + display: flex; + align-items: center; + justify-content: space-between; + gap: 10px; + width: calc(100% - 36px); +} + +.todo-detail-dialog-title-main { + min-width: 0; + color: #303133; + font-size: 20px; + font-weight: 600; +} + +.todo-detail-dialog-title-process { + flex-shrink: 0; + max-width: 310px; + color: #2f7ed8; + font-size: 12px; + border: 1px solid #b3d8ff; + background: #ecf5ff; + border-radius: 999px; + padding: 2px 10px; + line-height: 18px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + .todo-detail-content { min-height: 120px; } diff --git a/src/views/modules/yieldReport/com_produce_report_normal.vue b/src/views/modules/yieldReport/com_produce_report_normal.vue index 1bbaf8e..c5c06e9 100644 --- a/src/views/modules/yieldReport/com_produce_report_normal.vue +++ b/src/views/modules/yieldReport/com_produce_report_normal.vue @@ -4394,7 +4394,10 @@ export default { }, // 获取派工单的信息 getScheduleDataBySeqNo() { - getScheduleDataBySeqNo(this.scheduleData.seqNo).then(({data}) => { + getScheduleDataBySeqNo({ + seqNo: this.scheduleData.seqNo, + itemNo: this.scheduleData.itemNo + }).then(({data}) => { this.scheduleData.seqNo = data.row.seqNo; this.scheduleData.orderNo = data.row.orderNo; this.scheduleData.itemNo = data.row.itemNo; @@ -4644,9 +4647,14 @@ export default { } }, - init(seqNo, operatorData) { + init(seqNo, operatorData, itemNo) { //判断是否关闭所有的页面按钮 this.scheduleData.seqNo = seqNo; + if (itemNo !== undefined && itemNo !== null && Number(itemNo) > 0) { + this.scheduleData.itemNo = Number(itemNo); + } else { + this.scheduleData.itemNo = 0; + } this.currentRollOps.seqNo = seqNo; this.operatorData = operatorData; @@ -4678,7 +4686,10 @@ export default { //刷新页面的数据 async refreshPageData() { - await getScheduleDataBySeqNo(this.scheduleData.seqNo).then(({data}) => { + await getScheduleDataBySeqNo({ + seqNo: this.scheduleData.seqNo, + itemNo: this.scheduleData.itemNo + }).then(({data}) => { this.scheduleData.site = data.row.site; this.searchData.site = data.row.site; this.currentRollOps.site = data.row.site; diff --git a/src/views/modules/yieldReport/produce_order.vue b/src/views/modules/yieldReport/produce_order.vue index d91b965..5f6a854 100644 --- a/src/views/modules/yieldReport/produce_order.vue +++ b/src/views/modules/yieldReport/produce_order.vue @@ -2042,7 +2042,7 @@ export default { // 打开操作员切换功能 this.showReportFlag = true this.$nextTick(() => { - this.$refs.comProduceReportNormal.init(this.currentRow.seqNo, this.operatorData) + this.$refs.comProduceReportNormal.init(this.currentRow.seqNo, this.operatorData, this.currentRow.itemNo) }) }, @@ -2110,7 +2110,7 @@ export default { this.showReportFlag = true // 打开报工操作页面 this.$nextTick(() => { - this.$refs.comProduceReportNormal.init(this.currentRow.seqNo, this.operatorData) + this.$refs.comProduceReportNormal.init(this.currentRow.seqNo, this.operatorData, this.currentRow.itemNo) }) }) },