Commit e7f70cde0f1f152e9bb8e1ad4f7a8021f1d61622

Authored by gesilong
2 parents 51b10a4b 9f4f6b65

Merge branch 'cjerp-3.0-fix' into test_cjerp

... ... @@ -267,6 +267,14 @@ export default {
267 267 line.assayApplyId && !list.some(item => item.assayApplyId === line.assayApplyId)
268 268 )
269 269 this.applyDetailOptions = list.concat(extra)
  270 + // 用数据源补全回显行的样品/数量等固定字段(详情接口明细行不含 category),并刷新表格
  271 + const merged = (detailLines || []).map(line => {
  272 + const opt = list.find(o => o.assayApplyId === line.assayApplyId) ||
  273 + extra.find(o => o.assayApplyId === line.assayApplyId) || {}
  274 + return { ...opt, ...line }
  275 + })
  276 + const detailTable = this.$refs.detailTable
  277 + detailTable && detailTable.setRows && detailTable.setRows(merged)
270 278 })
271 279 .catch(() => {
272 280 this.applyDetailOptions = (detailLines || []).map(item => ({ ...item }))
... ...
... ... @@ -263,10 +263,10 @@ export default {
263 263 this.planList = Array.isArray(data.planLines) ? data.planLines.map(x => ({ ...x })) : []
264 264 this.weighList = Array.isArray(data.weighLines) ? data.weighLines.map(x => ({ ...x })) : []
265 265 this.applyList = Array.isArray(data.applyLines) ? data.applyLines.map(x => ({ ...x })) : []
266   - // 已传附件回显(多文件逗号分隔)
267   - const key = this.mode === 'delay' ? 'delayFile' : 'signFile'
268   - const ids = String(data[key + 'Id'] || '').split(',').filter(Boolean)
269   - const names = String(data[key + 'Name'] || '').split(',').filter(Boolean)
  266 + // 已传附件回显(多文件逗号分隔,与详情接口字段一致)
  267 + const key = this.mode === 'delay' ? 'delayAttachmentFile' : 'signAttachmentFile'
  268 + const ids = String(data[key + 'Ids'] || '').split(',').map(x => x.trim()).filter(Boolean)
  269 + const names = String(data[key + 'Names'] || '').split(',').map(x => x.trim())
270 270 this.fileList = ids.map((id, i) => ({ id, name: names[i] || '' }))
271 271 })
272 272 .catch(() => {
... ...