Browse Source

2026-08-12

代办中心【详情】优化
master
fengyuan_yang 1 month ago
parent
commit
91c520636b
  1. 4
      src/api/schedule/todoCenter.js
  2. 129
      src/views/modules/todo/todoCenter.vue
  3. 24
      src/views/modules/yieldReport/com_separate_roll.vue

4
src/api/schedule/todoCenter.js

@ -6,8 +6,8 @@ export const getTodoCenterStats = data => createAPI('schedule/getTodoCenterStats
// 功能代办中心:分页查询代办列表 // 功能代办中心:分页查询代办列表
export const searchTodoCenterList = data => createAPI('schedule/searchTodoCenterList', 'POST', data) export const searchTodoCenterList = data => createAPI('schedule/searchTodoCenterList', 'POST', data)
// 功能代办中心:查询创建分卷缓存详情
export const getTodoCacheDetail = data => createAPI('schedule/shiftChange/getUnprocessedData', 'POST', data)
// 功能代办中心:查询创建分卷详情快照(触发批次/报告批次)
export const getTodoDetailRecords = data => createAPI('schedule/getTodoDetailRecords', 'POST', data)
// 功能代办中心:审核代办消息 // 功能代办中心:审核代办消息
export const auditTodoMessage = data => createAPI('schedule/auditTodoMessage', 'POST', data) export const auditTodoMessage = data => createAPI('schedule/auditTodoMessage', 'POST', data)

129
src/views/modules/todo/todoCenter.vue

@ -193,7 +193,6 @@
size="mini" size="mini"
type="primary" type="primary"
plain plain
:disabled="item.auditFlag === 'Y' && item.operateFlag === 'Y'"
@click="showDetail(item)"> @click="showDetail(item)">
详情 详情
</el-button> </el-button>
@ -241,27 +240,33 @@
width="830px" width="830px"
class="todo-cache-detail-dialog" class="todo-cache-detail-dialog"
append-to-body> append-to-body>
<div v-loading="detailDialogLoading">
<div v-loading="detailDialogLoading" class="todo-detail-content">
<div v-if="detailSections.length === 0" class="todo-detail-empty-tip">
当前代办暂无详情数据
</div>
<div v-else class="todo-detail-section-list">
<div class="todo-detail-section" v-for="section in detailSections" :key="section.key">
<div class="todo-detail-section-title">{{ section.title }}</div>
<el-form :inline="true" label-position="top" style="height: auto;"> <el-form :inline="true" label-position="top" style="height: auto;">
<el-row style="margin-top: -10px;"> <el-row style="margin-top: -10px;">
<el-col :span="11"> <el-col :span="11">
<el-form-item label="时间"> <el-form-item label="时间">
<el-input :value="detailData.cacheTime" readonly style="width: 220px;"></el-input>
<el-input :value="section.cacheTime" readonly style="width: 220px;"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="固定载具"> <el-form-item label="固定载具">
<el-input :value="detailData.fixture" readonly style="width: 120px;"></el-input>
<el-input :value="section.fixture" readonly style="width: 120px;"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-form-item label="排数"> <el-form-item label="排数">
<el-input-number :controls="false" :step="0" :value="detailData.rowCount" disabled style="width: 60px;"></el-input-number>
<el-input-number :controls="false" :step="0" :value="section.rowCount" disabled style="width: 60px;"></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-form-item label="分切卷数"> <el-form-item label="分切卷数">
<el-input-number :controls="false" :step="0" :value="detailData.rollCount" disabled style="width: 60px;"></el-input-number>
<el-input-number :controls="false" :step="0" :value="section.rollCount" disabled style="width: 60px;"></el-input-number>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -269,10 +274,10 @@
<div class="rq"> <div class="rq">
<el-table <el-table
class="todo-detail-table" class="todo-detail-table"
:data="detailRowList"
:data="section.rowList"
border border
style="width: 100%; margin-top: 10px;" style="width: 100%; margin-top: 10px;"
max-height="360">
max-height="320">
<el-table-column prop="rowNumber" label="NO." width="50" align="center"></el-table-column> <el-table-column prop="rowNumber" label="NO." width="50" align="center"></el-table-column>
<el-table-column label="良品数" width="80" align="center"> <el-table-column label="良品数" width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -332,6 +337,8 @@
</div> </div>
</el-form> </el-form>
</div> </div>
</div>
</div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="detailDialogVisible = false">关闭</el-button> <el-button type="primary" @click="detailDialogVisible = false">关闭</el-button>
</span> </span>
@ -350,7 +357,7 @@
<script> <script>
import { getSiteAndBuByUserName2, getUserRoleList } from '@/api/qc/qc' import { getSiteAndBuByUserName2, getUserRoleList } from '@/api/qc/qc'
import { getTodoCenterStats, searchTodoCenterList, getTodoCacheDetail, auditTodoMessage } from '@/api/schedule/todoCenter'
import { getTodoCenterStats, searchTodoCenterList, getTodoDetailRecords, auditTodoMessage } from '@/api/schedule/todoCenter'
import ComMrbRegister from '../yieldReport/com_mrb_register' import ComMrbRegister from '../yieldReport/com_mrb_register'
export default { export default {
@ -399,13 +406,7 @@ export default {
detailDialogVisible: false, detailDialogVisible: false,
detailDialogLoading: false, detailDialogLoading: false,
detailDialogTitle: '创建分卷详情', detailDialogTitle: '创建分卷详情',
detailData: {
cacheTime: '',
fixture: '',
rowCount: 0,
rollCount: 0
},
detailRowList: [],
detailSections: [],
showMrbRegisterFlag: false, showMrbRegisterFlag: false,
currentAuditTodo: null, currentAuditTodo: null,
currentMrbAction: '', currentMrbAction: '',
@ -550,13 +551,7 @@ export default {
return String(val).replace('T', ' ').substring(0, 19) return String(val).replace('T', ' ').substring(0, 19)
}, },
resetDetailData () { resetDetailData () {
this.detailData = {
cacheTime: '',
fixture: '',
rowCount: 0,
rollCount: 0
}
this.detailRowList = []
this.detailSections = []
}, },
toInt (value) { toInt (value) {
const num = Number(value) const num = Number(value)
@ -597,6 +592,19 @@ export default {
} }
}) })
}, },
buildDetailSection (key, title, detailList) {
const list = detailList || []
const first = list.length > 0 ? list[0] : {}
return {
key: key,
title: title,
cacheTime: this.formatDateTime(first.createdTime),
fixture: first.fixtureNo || '',
rowCount: this.toInt(first.rowCount) || list.length,
rollCount: this.toInt(first.rollCount) || 0,
rowList: this.mapCacheDetailRows(list)
}
},
openTodoAuditModal (row) { openTodoAuditModal (row) {
if (!row) { if (!row) {
return return
@ -700,44 +708,40 @@ export default {
if (!row) { if (!row) {
return return
} }
if (row.auditFlag === 'Y' && row.operateFlag === 'Y') {
return
}
this.detailDialogTitle = `创建分卷详情 - ${row.infoCode || ''}` this.detailDialogTitle = `创建分卷详情 - ${row.infoCode || ''}`
this.detailDialogVisible = true this.detailDialogVisible = true
this.detailDialogLoading = true this.detailDialogLoading = true
this.resetDetailData() this.resetDetailData()
const seqNo = this.toInt(row.seqNo)
if (seqNo === null) {
this.detailDialogLoading = false
this.$message.error('派工单号格式不正确,无法查询缓存数据')
return
}
const query = { const query = {
site: row.site || this.searchData.site || this.$store.state.user.site, site: row.site || this.searchData.site || this.$store.state.user.site,
orderNo: row.orderNo,
seqNo: seqNo
buNo: row.buNo || this.searchData.buNo || '',
infoCode: row.infoCode || '',
orderNo: row.orderNo || '',
seqNo: row.seqNo
} }
getTodoCacheDetail(query).then(({ data }) => {
if (!(data && data.code === 0)) {
this.$message.error((data && data.msg) || '缓存数据查询失败')
getTodoDetailRecords(query).then(({ data }) => {
if (!(data && data.code === 200)) {
this.$message.error((data && data.msg) || '详情数据查询失败')
return return
} }
const cacheList = data.data || []
if (cacheList.length === 0) {
this.$message.warning('当前代办暂无缓存数据')
const resultMap = data.resultMap || {}
const triggerList = resultMap.triggerList || []
const reportList = resultMap.reportList || []
const sections = []
if (triggerList.length > 0) {
sections.push(this.buildDetailSection('trigger', '触发异常时数据', triggerList))
}
if (reportList.length > 0) {
sections.push(this.buildDetailSection('report', '审核后最终报告数据', reportList))
}
this.detailSections = sections
if (sections.length === 0) {
this.$message.warning('当前代办暂无详情数据')
return return
} }
const first = cacheList[0]
this.detailData.cacheTime = this.formatDateTime(first.createdTime)
this.detailData.fixture = first.fixtureNo || ''
this.detailData.rowCount = this.toInt(first.rowCount) || cacheList.length
this.detailData.rollCount = this.toInt(first.rollCount) || 0
this.detailRowList = this.mapCacheDetailRows(cacheList)
}).catch(() => { }).catch(() => {
this.$message.error('缓存数据查询失败')
this.$message.error('详情数据查询失败')
}).finally(() => { }).finally(() => {
this.detailDialogLoading = false this.detailDialogLoading = false
}) })
@ -1138,6 +1142,35 @@ export default {
padding-top: 10px; padding-top: 10px;
} }
.todo-detail-content {
min-height: 120px;
}
.todo-detail-empty-tip {
color: #909399;
text-align: center;
padding: 28px 0 16px;
}
.todo-detail-section-list {
display: flex;
flex-direction: column;
gap: 18px;
}
.todo-detail-section {
border: 1px solid #ebeef5;
border-radius: 6px;
padding: 10px 10px 2px;
}
.todo-detail-section-title {
font-size: 13px;
font-weight: 600;
color: #303133;
margin-bottom: 8px;
}
.todo-cache-detail-dialog .table-content-container { .todo-cache-detail-dialog .table-content-container {
width: 100%; width: 100%;
} }

24
src/views/modules/yieldReport/com_separate_roll.vue

@ -2016,6 +2016,28 @@ export default {
seqNo: this.scheduleData.seqNo seqNo: this.scheduleData.seqNo
} }
}, },
buildSplitRuleCompletePayload () {
return {
site: this.scheduleData.site,
buNo: this.scheduleData.buNo,
orderNo: this.scheduleData.orderNo,
seqNo: this.scheduleData.seqNo,
fixture: this.pageData.fixture || '',
shiftNo: this.scheduleData.shiftNo || '',
rowCount: this.pageData.rowCount || 0,
rollCount: this.pageData.rollCount || 0,
rollRows: (this.rowDataList || []).map(row => ({
rowNumber: row.rowNumber,
goodQty: row.goodQty || 0,
surfaceLossQty: row.surfaceLossQty || 0,
poorPerformanceQty: row.poorPerformanceQty || 0,
defectQty: row.defectQty || 0,
totalQty: row.totalQty || 0,
packingList: row.packingList || '',
remark: row.remark || ''
}))
}
},
async refreshSplitRuleLockStatus (showUnlockHint) { async refreshSplitRuleLockStatus (showUnlockHint) {
const payload = this.buildSplitRuleStatusPayload() const payload = this.buildSplitRuleStatusPayload()
@ -2116,7 +2138,7 @@ export default {
}, },
async completeSplitRuleTodoOperationIfNeeded () { async completeSplitRuleTodoOperationIfNeeded () {
const payload = this.buildSplitRuleStatusPayload()
const payload = this.buildSplitRuleCompletePayload()
if (!payload.site || !payload.buNo || !payload.orderNo || !payload.seqNo) { if (!payload.site || !payload.buNo || !payload.orderNo || !payload.seqNo) {
return return
} }

Loading…
Cancel
Save