|
|
|
@ -193,7 +193,6 @@ |
|
|
|
size="mini" |
|
|
|
type="primary" |
|
|
|
plain |
|
|
|
:disabled="item.auditFlag === 'Y' && item.operateFlag === 'Y'" |
|
|
|
@click="showDetail(item)"> |
|
|
|
详情 |
|
|
|
</el-button> |
|
|
|
@ -241,96 +240,104 @@ |
|
|
|
width="830px" |
|
|
|
class="todo-cache-detail-dialog" |
|
|
|
append-to-body> |
|
|
|
<div v-loading="detailDialogLoading"> |
|
|
|
<el-form :inline="true" label-position="top" style="height: auto;"> |
|
|
|
<el-row style="margin-top: -10px;"> |
|
|
|
<el-col :span="11"> |
|
|
|
<el-form-item label="时间"> |
|
|
|
<el-input :value="detailData.cacheTime" readonly style="width: 220px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="固定载具"> |
|
|
|
<el-input :value="detailData.fixture" readonly style="width: 120px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item label="排数"> |
|
|
|
<el-input-number :controls="false" :step="0" :value="detailData.rowCount" disabled style="width: 60px;"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item label="分切卷数"> |
|
|
|
<el-input-number :controls="false" :step="0" :value="detailData.rollCount" disabled style="width: 60px;"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<div class="rq"> |
|
|
|
<el-table |
|
|
|
class="todo-detail-table" |
|
|
|
:data="detailRowList" |
|
|
|
border |
|
|
|
style="width: 100%; margin-top: 10px;" |
|
|
|
max-height="360"> |
|
|
|
<el-table-column prop="rowNumber" label="NO." width="50" align="center"></el-table-column> |
|
|
|
<el-table-column label="良品数" width="80" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="readonly-number good"> |
|
|
|
{{ scope.row.goodQty }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="面损" width="80" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="readonly-number"> |
|
|
|
{{ scope.row.surfaceLossQty }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="性能不良" width="80" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="readonly-number"> |
|
|
|
{{ scope.row.poorPerformanceQty }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="不良数" width="80" align="right"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="readonly-number defect" style="text-align: right; padding-right: 10px;"> |
|
|
|
{{ scope.row.defectQty }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="良率" width="80" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="readonly-number yield">{{ scope.row.yieldRate }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="总数" width="80" align="right"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="readonly-number" style="text-align: right; padding-right: 10px;"> |
|
|
|
{{ scope.row.totalQty }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="Packing List" align="center" class-name="packing-list-column"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="readonly-text-cell"> |
|
|
|
<div class="readonly-text-scroll">{{ scope.row.packingList || '-' }}</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="备注" align="center" class-name="remark-column"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="readonly-text-cell"> |
|
|
|
<div class="readonly-text-scroll">{{ scope.row.remark || '-' }}</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<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-row style="margin-top: -10px;"> |
|
|
|
<el-col :span="11"> |
|
|
|
<el-form-item label="时间"> |
|
|
|
<el-input :value="section.cacheTime" readonly style="width: 220px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="固定载具"> |
|
|
|
<el-input :value="section.fixture" readonly style="width: 120px;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item label="排数"> |
|
|
|
<el-input-number :controls="false" :step="0" :value="section.rowCount" disabled style="width: 60px;"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item label="分切卷数"> |
|
|
|
<el-input-number :controls="false" :step="0" :value="section.rollCount" disabled style="width: 60px;"></el-input-number> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
|
|
|
|
<div class="rq"> |
|
|
|
<el-table |
|
|
|
class="todo-detail-table" |
|
|
|
:data="section.rowList" |
|
|
|
border |
|
|
|
style="width: 100%; margin-top: 10px;" |
|
|
|
max-height="320"> |
|
|
|
<el-table-column prop="rowNumber" label="NO." width="50" align="center"></el-table-column> |
|
|
|
<el-table-column label="良品数" width="80" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="readonly-number good"> |
|
|
|
{{ scope.row.goodQty }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="面损" width="80" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="readonly-number"> |
|
|
|
{{ scope.row.surfaceLossQty }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="性能不良" width="80" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="readonly-number"> |
|
|
|
{{ scope.row.poorPerformanceQty }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="不良数" width="80" align="right"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="readonly-number defect" style="text-align: right; padding-right: 10px;"> |
|
|
|
{{ scope.row.defectQty }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="良率" width="80" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="readonly-number yield">{{ scope.row.yieldRate }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="总数" width="80" align="right"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="readonly-number" style="text-align: right; padding-right: 10px;"> |
|
|
|
{{ scope.row.totalQty }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="Packing List" align="center" class-name="packing-list-column"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="readonly-text-cell"> |
|
|
|
<div class="readonly-text-scroll">{{ scope.row.packingList || '-' }}</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="备注" align="center" class-name="remark-column"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="readonly-text-cell"> |
|
|
|
<div class="readonly-text-scroll">{{ scope.row.remark || '-' }}</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" @click="detailDialogVisible = false">关闭</el-button> |
|
|
|
@ -350,7 +357,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
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' |
|
|
|
|
|
|
|
export default { |
|
|
|
@ -399,13 +406,7 @@ export default { |
|
|
|
detailDialogVisible: false, |
|
|
|
detailDialogLoading: false, |
|
|
|
detailDialogTitle: '创建分卷详情', |
|
|
|
detailData: { |
|
|
|
cacheTime: '', |
|
|
|
fixture: '', |
|
|
|
rowCount: 0, |
|
|
|
rollCount: 0 |
|
|
|
}, |
|
|
|
detailRowList: [], |
|
|
|
detailSections: [], |
|
|
|
showMrbRegisterFlag: false, |
|
|
|
currentAuditTodo: null, |
|
|
|
currentMrbAction: '', |
|
|
|
@ -550,13 +551,7 @@ export default { |
|
|
|
return String(val).replace('T', ' ').substring(0, 19) |
|
|
|
}, |
|
|
|
resetDetailData () { |
|
|
|
this.detailData = { |
|
|
|
cacheTime: '', |
|
|
|
fixture: '', |
|
|
|
rowCount: 0, |
|
|
|
rollCount: 0 |
|
|
|
} |
|
|
|
this.detailRowList = [] |
|
|
|
this.detailSections = [] |
|
|
|
}, |
|
|
|
toInt (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) { |
|
|
|
if (!row) { |
|
|
|
return |
|
|
|
@ -700,44 +708,40 @@ export default { |
|
|
|
if (!row) { |
|
|
|
return |
|
|
|
} |
|
|
|
if (row.auditFlag === 'Y' && row.operateFlag === 'Y') { |
|
|
|
return |
|
|
|
} |
|
|
|
this.detailDialogTitle = `创建分卷详情 - ${row.infoCode || ''}` |
|
|
|
this.detailDialogVisible = true |
|
|
|
this.detailDialogLoading = true |
|
|
|
this.resetDetailData() |
|
|
|
|
|
|
|
const seqNo = this.toInt(row.seqNo) |
|
|
|
if (seqNo === null) { |
|
|
|
this.detailDialogLoading = false |
|
|
|
this.$message.error('派工单号格式不正确,无法查询缓存数据') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
const query = { |
|
|
|
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 |
|
|
|
} |
|
|
|
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 |
|
|
|
} |
|
|
|
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(() => { |
|
|
|
this.$message.error('缓存数据查询失败') |
|
|
|
this.$message.error('详情数据查询失败') |
|
|
|
}).finally(() => { |
|
|
|
this.detailDialogLoading = false |
|
|
|
}) |
|
|
|
@ -1138,6 +1142,35 @@ export default { |
|
|
|
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 { |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
|