|
|
|
@ -132,11 +132,21 @@
|
|
|
|
|
<tr v-for="(value, index) in renderInfo.mainList" style="word-break: break-all"> |
|
|
|
|
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000">{{ index + 1 }}</td> |
|
|
|
|
<!-- 发货单位 --> |
|
|
|
|
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable> |
|
|
|
|
<td |
|
|
|
|
v-if="value.mergeColumnIndex" |
|
|
|
|
style="border-bottom: 1px solid #000; border-left: 1px solid #000" |
|
|
|
|
:rowspan="value.mergeColumnIndex" |
|
|
|
|
contenteditable |
|
|
|
|
> |
|
|
|
|
{{ value.shipper || '' }} |
|
|
|
|
</td> |
|
|
|
|
<!-- 开单时间 --> |
|
|
|
|
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable> |
|
|
|
|
<td |
|
|
|
|
v-if="value.mergeColumnIndex" |
|
|
|
|
style="border-bottom: 1px solid #000; border-left: 1px solid #000" |
|
|
|
|
:rowspan="value.mergeColumnIndex" |
|
|
|
|
contenteditable |
|
|
|
|
> |
|
|
|
|
{{ value.createTime || '' }} |
|
|
|
|
</td> |
|
|
|
|
<!-- 始发仓 --> |
|
|
|
@ -148,19 +158,38 @@
|
|
|
|
|
{{ value.destinationWarehouseName || '' }} |
|
|
|
|
</td> |
|
|
|
|
<!-- 收货单位 --> |
|
|
|
|
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable> |
|
|
|
|
<td |
|
|
|
|
v-if="value.mergeColumnIndex" |
|
|
|
|
style="border-bottom: 1px solid #000; border-left: 1px solid #000" |
|
|
|
|
:rowspan="value.mergeColumnIndex" |
|
|
|
|
contenteditable |
|
|
|
|
> |
|
|
|
|
{{ value.consignee }} |
|
|
|
|
</td> |
|
|
|
|
<!-- 收货人 --> |
|
|
|
|
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable> |
|
|
|
|
<td |
|
|
|
|
v-if="value.mergeColumnIndex" |
|
|
|
|
style="border-bottom: 1px solid #000; border-left: 1px solid #000" |
|
|
|
|
:rowspan="value.mergeColumnIndex" |
|
|
|
|
contenteditable |
|
|
|
|
> |
|
|
|
|
{{ value.consigneeName }} |
|
|
|
|
</td> |
|
|
|
|
<!-- 收货电话 --> |
|
|
|
|
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000" contenteditable> |
|
|
|
|
<td |
|
|
|
|
v-if="value.mergeColumnIndex" |
|
|
|
|
style="border-bottom: 1px solid #000; border-left: 1px solid #000" |
|
|
|
|
:rowspan="value.mergeColumnIndex" |
|
|
|
|
contenteditable |
|
|
|
|
> |
|
|
|
|
{{ value.consigneeMobile }} |
|
|
|
|
</td> |
|
|
|
|
<!-- 物流单号 --> |
|
|
|
|
<td style="border-bottom: 1px solid #000; border-left: 1px solid #000"> |
|
|
|
|
<td |
|
|
|
|
v-if="value.mergeColumnIndex" |
|
|
|
|
style="border-bottom: 1px solid #000; border-left: 1px solid #000" |
|
|
|
|
:rowspan="value.mergeColumnIndex" |
|
|
|
|
> |
|
|
|
|
{{ value.waybillNo }} |
|
|
|
|
</td> |
|
|
|
|
<!-- 合同号 --> |
|
|
|
@ -262,13 +291,47 @@ renderInfo.value = waybillInfo;
|
|
|
|
|
const isShowTotal = ref(false); |
|
|
|
|
|
|
|
|
|
renderInfo.value.endWarehouseNames = renderInfo.value.endWarehouseNames.split(','); |
|
|
|
|
|
|
|
|
|
// 合并起始索引 |
|
|
|
|
let mergeStartIndex = 0; |
|
|
|
|
// 比对值 |
|
|
|
|
let comparisonValue = ''; |
|
|
|
|
renderInfo.value.mainList[0].mergeColumnIndex = 1; |
|
|
|
|
|
|
|
|
|
const handleMerge = (startIndex: number, endIndex: number, data: {}) => { |
|
|
|
|
for (let index = startIndex; index < endIndex; index++) { |
|
|
|
|
const value = data[index]; |
|
|
|
|
|
|
|
|
|
if (index === startIndex) value.mergeColumnIndex = endIndex - startIndex; |
|
|
|
|
else { |
|
|
|
|
value.mergeColumnIndex = 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
for (let index = 0; index < renderInfo.value.mainList.length; index++) { |
|
|
|
|
const element = renderInfo.value.mainList[index]; |
|
|
|
|
|
|
|
|
|
if (index === 0) comparisonValue = element.waybillNo; |
|
|
|
|
|
|
|
|
|
totalNum.value += element.smallTotal || 0; |
|
|
|
|
totalUnLoadNum.value += element.unloadNum || 0; |
|
|
|
|
totalPlanNum.value += element.planNum || 0; |
|
|
|
|
|
|
|
|
|
if (element.waybillNo !== comparisonValue) { |
|
|
|
|
// if (index === 1) mergeStartIndex = 1; |
|
|
|
|
comparisonValue = element.waybillNo; |
|
|
|
|
handleMerge(mergeStartIndex, index, renderInfo.value.mainList); |
|
|
|
|
mergeStartIndex = index; |
|
|
|
|
|
|
|
|
|
if (index === renderInfo.value.mainList.length - 1) { |
|
|
|
|
handleMerge(mergeStartIndex, index + 1, renderInfo.value.mainList); |
|
|
|
|
} |
|
|
|
|
// 最后一位特殊处理 |
|
|
|
|
} else if (index === renderInfo.value.mainList.length - 1) { |
|
|
|
|
handleMerge(mergeStartIndex, index + 1, renderInfo.value.mainList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (element.goodsList && element.goodsList.length > 0) { |
|
|
|
|
for (let i = 0; i < element.goodsList.length; i++) { |
|
|
|
|
const item = element.goodsList[i]; |
|
|
|
|