|
|
|
@ -626,16 +626,25 @@ export default { |
|
|
|
transferHuSite(requestData).then(({ data }) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
const result = data.row || {} |
|
|
|
const htmlContent = `<div style="line-height: 1.8;">` |
|
|
|
+ `<p><b>成功数量:</b>${result.successCount || 0}</p>` |
|
|
|
+ `<p><b>出库事务号:</b>${result.stoTransNo || ''}</p>` |
|
|
|
+ `<p><b>入库事务号:</b>${result.stiTransNo || ''}</p>` |
|
|
|
+ `<p>${result.message || ''}</p>` |
|
|
|
+ `</div>` |
|
|
|
// 失败分组逐条展示条码和原因;IFS或本地提交结果不明时提示停止重试。- rqrq |
|
|
|
const escapeHtml = value => String(value == null ? '' : value).replace(/[&<>"']/g, char => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[char]) |
|
|
|
const failures = (result.failedUnitIds || []).map((unitId, index) => |
|
|
|
`<div>${escapeHtml(unitId)}:${escapeHtml((result.failedReasons || [])[index] || '处理失败')}</div>`).join('') |
|
|
|
const htmlContent = [ |
|
|
|
'<div style="line-height: 1.8;">', |
|
|
|
`<p><b>成功数量:</b>${result.successCount || 0}</p>`, |
|
|
|
`<p><b>失败数量:</b>${result.failCount || 0}</p>`, |
|
|
|
`<p><b>出库事务号:</b>${escapeHtml(result.stoTransNo)}</p>`, |
|
|
|
`<p><b>入库事务号:</b>${escapeHtml(result.stiTransNo)}</p>`, |
|
|
|
`<p>${escapeHtml(result.message)}</p>`, |
|
|
|
result.reconciliationRequired ? '<p style="color:#c0392b"><b>IFS或本地提交结果不明,请停止重试并人工对账。</b></p>' : '', |
|
|
|
failures ? `<div style="max-height:240px;overflow:auto"><b>失败明细:</b>${failures}</div>` : '', |
|
|
|
'</div>' |
|
|
|
].join('') |
|
|
|
this.$alert(htmlContent, '跨site调拨结果', { |
|
|
|
dangerouslyUseHTMLString: true, |
|
|
|
confirmButtonText: this.$t('warehouse.common.confirm'), |
|
|
|
type: 'success', |
|
|
|
type: result.reconciliationRequired ? 'error' : (result.failCount ? 'warning' : 'success'), |
|
|
|
callback: () => { |
|
|
|
this.closeTransferDialog() |
|
|
|
this.getDataList() |
|
|
|
|