|
|
|
@ -101,6 +101,15 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column header-align="center" align="center" width="90" label="是否阅读"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="scope.row.state !== '待检验'">—</span> |
|
|
|
<span v-else-if="scope.row.hasWorkFile === 'N'">无需</span> |
|
|
|
<span v-else-if="scope.row.workFileRead === 'Y'" style="color: #3ac252">是</span> |
|
|
|
<span v-else-if="scope.row.hasWorkFile === 'Y'" style="color: red">否</span> |
|
|
|
<span v-else>—</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column v-for="(item,index) in columnList1" :key="index" :sortable="item.columnSortable" |
|
|
|
:prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" :fixed="item.fixed === '' ? false : item.fixed" :min-width="item.columnWidth" |
|
|
|
@ -651,7 +660,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<iqc-file-table :columns="fileColumnList" :data-list="fileContentList" |
|
|
|
:query-loading="fileLoading"></iqc-file-table> |
|
|
|
:query-loading="fileLoading" @file-previewed="onWorkFilePreviewed"></iqc-file-table> |
|
|
|
<el-footer style="height:35px;margin-top: 10px;text-align:center"> |
|
|
|
<el-button type="primary" @click="fileFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
@ -802,6 +811,7 @@ import { |
|
|
|
fqcDetailSearch, // 查询FAI的检验明细 |
|
|
|
inspectorSearch, // 查询检验员 |
|
|
|
fqcRecordDelete, // 删除检验记录 |
|
|
|
markFQCWorkFileRead, // 标记工作文件已阅读 |
|
|
|
saveFQCDetailedRecord, // 新增明细信息 |
|
|
|
saveFQCSubmitResult, // 审核 |
|
|
|
saveFQCSubDetailed, // 新增子明细信息 |
|
|
|
@ -917,6 +927,7 @@ export default { |
|
|
|
inspectionNo: '', |
|
|
|
fileFlag: false, |
|
|
|
fileContentList: [], |
|
|
|
currentWorkFileRow: null, |
|
|
|
// 是否收藏 |
|
|
|
favorite: false, |
|
|
|
// 导出 start |
|
|
|
@ -3290,8 +3301,58 @@ export default { |
|
|
|
this.FAISelections = val |
|
|
|
}, |
|
|
|
|
|
|
|
resolveWorkFileRow(row) { |
|
|
|
if (!row || !row.inspectionNo) { |
|
|
|
return row |
|
|
|
} |
|
|
|
const matched = this.dataList.find(item => |
|
|
|
item.site === row.site && item.buNo === row.buNo && item.inspectionNo === row.inspectionNo |
|
|
|
) |
|
|
|
return matched || row |
|
|
|
}, |
|
|
|
|
|
|
|
saveWorkFileReadToServer(row) { |
|
|
|
const target = this.resolveWorkFileRow(row) |
|
|
|
if (!target || !target.inspectionNo || target.workFileRead === 'Y') { |
|
|
|
return Promise.resolve() |
|
|
|
} |
|
|
|
return markFQCWorkFileRead({ |
|
|
|
site: target.site, |
|
|
|
buNo: target.buNo, |
|
|
|
inspectionNo: target.inspectionNo |
|
|
|
}).then(({ data }) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$set(target, 'workFileRead', 'Y') |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
onWorkFilePreviewed() { |
|
|
|
if (this.currentWorkFileRow) { |
|
|
|
this.saveWorkFileReadToServer(this.currentWorkFileRow) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
fetchWorkFiles(row) { |
|
|
|
const currentData = { |
|
|
|
orderRef1: row.site, |
|
|
|
orderRef2: row.inspectionNo, |
|
|
|
orderRef4: row.buNo, |
|
|
|
partNo: row.partNo, |
|
|
|
} |
|
|
|
return getInspectionFile(currentData) |
|
|
|
.then(({ data }) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
return data.rows || [] |
|
|
|
} |
|
|
|
return [] |
|
|
|
}) |
|
|
|
.catch(() => []) |
|
|
|
}, |
|
|
|
|
|
|
|
// 刷新派设备文档的列表 |
|
|
|
getFileContentData(row) { |
|
|
|
this.currentWorkFileRow = this.resolveWorkFileRow(row) |
|
|
|
let currentData = { |
|
|
|
orderRef1: row.site, |
|
|
|
orderRef2: row.inspectionNo, |
|
|
|
@ -3307,6 +3368,7 @@ export default { |
|
|
|
} else { |
|
|
|
this.fileContentList = [] |
|
|
|
} |
|
|
|
this.$set(this.resolveWorkFileRow(row), 'hasWorkFile', this.fileContentList.length > 0 ? 'Y' : 'N') |
|
|
|
this.fileLoading = false |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
@ -3601,6 +3663,29 @@ export default { |
|
|
|
|
|
|
|
// 明细记录信息查询 |
|
|
|
detailModal(row) { |
|
|
|
if (row.state === '待检验' && row.workFileRead !== 'Y') { |
|
|
|
if (row.hasWorkFile === 'N') { |
|
|
|
this.openDetailModal(row) |
|
|
|
return |
|
|
|
} |
|
|
|
this.fetchWorkFiles(row).then(files => { |
|
|
|
const target = this.resolveWorkFileRow(row) |
|
|
|
this.$set(target, 'hasWorkFile', files.length > 0 ? 'Y' : 'N') |
|
|
|
if (files.length > 0 && target.workFileRead !== 'Y') { |
|
|
|
this.$message.warning('请先预览工作文件后再进行检验操作') |
|
|
|
this.currentWorkFileRow = target |
|
|
|
this.fileContentList = files |
|
|
|
this.fileFlag = true |
|
|
|
return |
|
|
|
} |
|
|
|
this.openDetailModal(row) |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
this.openDetailModal(row) |
|
|
|
}, |
|
|
|
|
|
|
|
openDetailModal(row) { |
|
|
|
this.detailData.site = row.site |
|
|
|
this.detailData.buNo = row.buNo |
|
|
|
this.detailData.inspectionNo = row.inspectionNo |
|
|
|
|