|
|
|
@ -197,13 +197,13 @@ |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
|
|
|
|
<!-- rqrq - 推送WCS预览弹窗 --> |
|
|
|
<!-- 推送WCS预览弹窗只展示物料汇总与指定明细,标签集中在一个单元格内 - rqrq --> |
|
|
|
<el-dialog |
|
|
|
title="库存匹配情况预览" |
|
|
|
:visible.sync="previewDialogVisible" |
|
|
|
:close-on-click-modal="false" |
|
|
|
v-drag |
|
|
|
width="95%"> |
|
|
|
width="70%"> |
|
|
|
<!-- rqrq - 目的地显示/编辑区域 --> |
|
|
|
<el-form :inline="true" label-position="left" style="margin-bottom: 10px;"> |
|
|
|
<el-form-item label="单据目的地:" style="margin-bottom: 0;"> |
|
|
|
@ -241,150 +241,76 @@ |
|
|
|
label="订单号" |
|
|
|
width="130" |
|
|
|
align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="scope.row.displayRowType !== 'SPECIFIED'">{{ scope.row.soorderNo }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="itemNo" |
|
|
|
label="订单序号" |
|
|
|
width="85" |
|
|
|
align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="scope.row.displayRowType !== 'SPECIFIED'">{{ scope.row.itemNo }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="bomItemNo" |
|
|
|
label="BOM行号" |
|
|
|
width="85" |
|
|
|
align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="scope.row.displayRowType !== 'SPECIFIED'">{{ scope.row.bomItemNo }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="partNo" |
|
|
|
label="物料编码" |
|
|
|
width="135" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="requiredQty" |
|
|
|
label="需求数量" |
|
|
|
width="95" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="specifiedQty" |
|
|
|
label="指定数量" |
|
|
|
width="95" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="specifiedMatchedQty" |
|
|
|
label="指定匹配" |
|
|
|
width="95" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="fallbackMatchedQty" |
|
|
|
label="普通匹配" |
|
|
|
width="95" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="matchedQty" |
|
|
|
label="总匹配" |
|
|
|
width="95" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="shortageQty" |
|
|
|
label="短缺数量" |
|
|
|
width="95" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="allocSeq" |
|
|
|
label="指定序号" |
|
|
|
width="85" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="matchStage" |
|
|
|
label="匹配阶段" |
|
|
|
width="135" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="matchSource" |
|
|
|
label="匹配来源" |
|
|
|
width="120" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="serialNo" |
|
|
|
label="标签号" |
|
|
|
width="165" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="batchNo" |
|
|
|
label="批次号" |
|
|
|
width="145" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="palletId" |
|
|
|
label="托盘" |
|
|
|
width="125" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="position" |
|
|
|
label="位置" |
|
|
|
width="75" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="layer" |
|
|
|
label="层" |
|
|
|
width="65" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="receiveDate" |
|
|
|
label="接收日期" |
|
|
|
width="155" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="expiredDate" |
|
|
|
label="失效日期" |
|
|
|
width="155" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="wdr" |
|
|
|
label="WDR" |
|
|
|
width="110" |
|
|
|
align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="matchStatus" |
|
|
|
label="匹配状态" |
|
|
|
width="130" |
|
|
|
min-width="145" |
|
|
|
align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span :style="{color: getMatchStatusColor(scope.row), fontWeight: 'bold'}"> |
|
|
|
{{ getMatchStatusText(scope.row) }} |
|
|
|
</span> |
|
|
|
<span v-if="scope.row.displayRowType !== 'SPECIFIED'">{{ scope.row.partNo }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="failureMessage" |
|
|
|
label="失败原因" |
|
|
|
min-width="260" |
|
|
|
prop="specifiedContent" |
|
|
|
label="指定内容" |
|
|
|
min-width="180" |
|
|
|
align="left" |
|
|
|
show-overflow-tooltip> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="scope.row.failureCode" :style="{color: getMatchStatusColor(scope.row)}"> |
|
|
|
{{ scope.row.failureMessage || scope.row.failureCode }} |
|
|
|
<span v-if="scope.row.displayRowType === 'SPECIFIED'" class="specified-content"> |
|
|
|
{{ scope.row.specifiedContent }} |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="requiredQty" label="需求数量" width="100" align="right"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- 物料行显示申请需求,指定明细行显示该条alloc_qty;匹配数量单独按整标签实际数量展示 - rqrq --> |
|
|
|
<span>{{ formatPreviewQty(scope.row.requiredQty) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="matchedQty" label="匹配数量" width="100" align="right"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ formatPreviewQty(scope.row.matchedQty) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="matchedSerialNos" label="标签号" min-width="360" align="left" class-name="wrap-text-column"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="matched-labels">{{ scope.row.matchedSerialNos }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column--> |
|
|
|
<!-- prop="failureMessage"--> |
|
|
|
<!-- label="失败原因"--> |
|
|
|
<!-- min-width="240"--> |
|
|
|
<!-- align="left">--> |
|
|
|
<!-- <template slot-scope="scope">--> |
|
|
|
<!-- <span v-if="scope.row.failureCode" class="failure-message">--> |
|
|
|
<!-- {{ scope.row.failureMessage || scope.row.failureCode }}--> |
|
|
|
<!-- </span>--> |
|
|
|
<!-- </template>--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
</el-table> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" class="yzzButtonAn" @click="pushToWCS" :loading="pushLoading" |
|
|
|
@ -2726,51 +2652,19 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 根据服务端事件阶段和失败编码设置预览行颜色,指定阻塞与目标区域失败必须醒目 - rqrq |
|
|
|
*/ |
|
|
|
/** 根据物料或指定明细自身的匹配结果设置颜色,失败统一标红且不再展示额外状态列 - rqrq */ |
|
|
|
getRowClassName ({row}) { |
|
|
|
const failureCode = row && row.failureCode |
|
|
|
if (['SPECIFIED_DETAIL_UNAVAILABLE', 'SPECIFIED_DETAIL_SHORTAGE', 'SPECIFIED_DETAIL_INVALID_QTY', 'SPECIFIED_DETAIL_INVALID_TYPE'].indexOf(failureCode) >= 0) { |
|
|
|
return 'danger-row' |
|
|
|
} |
|
|
|
if (['TARGET_AREA', 'SHARED_PALLET_CONFLICT', 'ALREADY_PUSHED'].indexOf(failureCode) >= 0) { |
|
|
|
return 'warning-row' |
|
|
|
} |
|
|
|
if (row && row.matchStatus === 'MATCHED' && row.orderSatisfactionStatus === 'COMPLETE') { |
|
|
|
return 'success-row' |
|
|
|
} |
|
|
|
if (row && row.matchStatus === 'FAILED') { |
|
|
|
return 'danger-row' |
|
|
|
} |
|
|
|
return '' |
|
|
|
const classNames = [] |
|
|
|
if (row && row.displayRowType === 'SPECIFIED') classNames.push('specified-preview-row') |
|
|
|
if (row && row.matchStatus === 'FAILED') classNames.push('danger-row') |
|
|
|
if (row && row.matchStatus === 'MATCHED') classNames.push('success-row') |
|
|
|
return classNames.join(' ') |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 将机器状态转换成现场可读文案,失败时优先显示指定明细或区域阻塞阶段 - rqrq |
|
|
|
*/ |
|
|
|
getMatchStatusText (row) { |
|
|
|
if (!row) return '' |
|
|
|
if (row.failureCode && row.failureCode.indexOf('SPECIFIED_DETAIL') === 0) return '指定明细阻塞' |
|
|
|
if (row.failureCode === 'TARGET_AREA') return '目标区域配置失败' |
|
|
|
if (row.failureCode === 'SHARED_PALLET_CONFLICT') return '共享托盘阻塞' |
|
|
|
if (row.failureCode === 'ALREADY_PUSHED') return '已存在推送任务' |
|
|
|
if (row.failureCode === 'INVENTORY_SHORTAGE') return '普通库存不足' |
|
|
|
if (row.matchStatus === 'MATCHED' && row.orderSatisfactionStatus === 'COMPLETE') return '完整满足' |
|
|
|
if (row.matchStatus === 'MATCHED') return '已匹配' |
|
|
|
if (row.matchStatus === 'FAILED') return '匹配失败' |
|
|
|
return '汇总待确认' |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 返回预览状态颜色,成功、指定阻塞、库存不足和配置失败保持不同视觉层级 - rqrq |
|
|
|
*/ |
|
|
|
getMatchStatusColor (row) { |
|
|
|
if (row && row.failureCode && row.failureCode.indexOf('SPECIFIED_DETAIL') === 0) return '#F56C6C' |
|
|
|
if (row && (row.failureCode === 'TARGET_AREA' || row.failureCode === 'SHARED_PALLET_CONFLICT' || row.failureCode === 'ALREADY_PUSHED')) return '#E6A23C' |
|
|
|
if (row && row.failureCode === 'INVENTORY_SHORTAGE') return '#F56C6C' |
|
|
|
if (row && row.matchStatus === 'MATCHED' && row.orderSatisfactionStatus === 'COMPLETE') return '#67C23A' |
|
|
|
return '#909399' |
|
|
|
/** 数量展示去除无意义尾零,空值统一显示0,避免同一列出现不同格式 - rqrq */ |
|
|
|
formatPreviewQty (value) { |
|
|
|
if (value === null || value === undefined || value === '') return '0' |
|
|
|
return String(value).replace(/(\.\d*?[1-9])0+$|\.0+$/, '$1') |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
@ -2824,7 +2718,7 @@ export default { |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
/deep/ .customer-tab .el-tabs__content { |
|
|
|
.mod-config /deep/ .customer-tab .el-tabs__content { |
|
|
|
padding: 5px !important; |
|
|
|
} |
|
|
|
|
|
|
|
@ -2833,37 +2727,56 @@ export default { |
|
|
|
line-height: 1.5; |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .wrap-text-column .cell { |
|
|
|
.mod-config /deep/ .wrap-text-column .cell { |
|
|
|
white-space: normal !important; |
|
|
|
word-break: break-all !important; |
|
|
|
line-height: 1.5 !important; |
|
|
|
} |
|
|
|
|
|
|
|
/* 指定明细使用缩进和浅色文字形成物料行下展开的视觉关系,不额外占用父级业务列 - rqrq */ |
|
|
|
.mod-config /deep/ .el-table .specified-preview-row .specified-content { |
|
|
|
display: inline-block; |
|
|
|
padding-left: 18px; |
|
|
|
color: #606266; |
|
|
|
} |
|
|
|
|
|
|
|
.mod-config /deep/ .matched-labels { |
|
|
|
white-space: normal; |
|
|
|
word-break: break-all; |
|
|
|
line-height: 1.5; |
|
|
|
} |
|
|
|
|
|
|
|
.mod-config /deep/ .failure-message { |
|
|
|
color: #F56C6C; |
|
|
|
white-space: normal; |
|
|
|
word-break: break-word; |
|
|
|
} |
|
|
|
|
|
|
|
/* rqrq - 表格行样式:根据满足状态显示不同背景色 */ |
|
|
|
/deep/ .el-table .success-row { |
|
|
|
.mod-config /deep/ .el-table .success-row { |
|
|
|
background-color: #f0f9ff !important; |
|
|
|
border-left: 3px solid #67C23A; |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .el-table .warning-row { |
|
|
|
.mod-config /deep/ .el-table .warning-row { |
|
|
|
background-color: #fdf6ec !important; |
|
|
|
border-left: 3px solid #E6A23C; |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .el-table .danger-row { |
|
|
|
.mod-config /deep/ .el-table .danger-row { |
|
|
|
background-color: #fef0f0 !important; |
|
|
|
border-left: 3px solid #F56C6C; |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .el-table .success-row:hover > td { |
|
|
|
.mod-config /deep/ .el-table .success-row:hover > td { |
|
|
|
background-color: #ecf5ff !important; |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .el-table .warning-row:hover > td { |
|
|
|
.mod-config /deep/ .el-table .warning-row:hover > td { |
|
|
|
background-color: #faecd8 !important; |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .el-table .danger-row:hover > td { |
|
|
|
.mod-config /deep/ .el-table .danger-row:hover > td { |
|
|
|
background-color: #fde2e2 !important; |
|
|
|
} |
|
|
|
</style> |