|
@@ -1087,6 +1087,7 @@
|
|
|
:data="steelMap.mapList"
|
|
|
border
|
|
|
style="width: 100%; margin-top: 20px"
|
|
|
+ :span-method="objectSpanMethod1"
|
|
|
>
|
|
|
<el-table-column
|
|
|
prop="materialName"
|
|
@@ -2034,6 +2035,8 @@ export default {
|
|
|
tableData: [],
|
|
|
spanArr: [],
|
|
|
pos: 0,
|
|
|
+ spanArr1: [],
|
|
|
+ pos1: 0,
|
|
|
//需要合并列的名称
|
|
|
mergeList: [
|
|
|
'选择',
|
|
@@ -2076,7 +2079,12 @@ export default {
|
|
|
'拼数',
|
|
|
'是否继续装',
|
|
|
'订单上传时间',
|
|
|
- '收款公司'
|
|
|
+ '收款公司',
|
|
|
+ '净重',
|
|
|
+ '皮重时间',
|
|
|
+ '皮重',
|
|
|
+ '毛重时间',
|
|
|
+ '毛重',
|
|
|
],
|
|
|
//钢材多拼车辆线路ID
|
|
|
//索引从1-10为1-10拼路线ID
|
|
@@ -4059,6 +4067,7 @@ export default {
|
|
|
this.onchangeProvince()
|
|
|
this.onchangeCity()
|
|
|
this.centerDialogVisible = true
|
|
|
+ this.getSpanArr1(res.data.data.mapList);
|
|
|
})
|
|
|
},
|
|
|
//查看抵达图
|
|
@@ -4870,7 +4879,7 @@ export default {
|
|
|
this.pos = 0
|
|
|
} else {
|
|
|
// 判断当前元素与上一个元素是否相同
|
|
|
- if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
|
|
|
+ if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId || ( data[i].weightBatchId && data[i].weightBatchId ===data[i - 1].weightBatchId)) {
|
|
|
this.spanArr[this.pos] += 1
|
|
|
// data[i].group = data[i - 1].group
|
|
|
this.spanArr.push(0)
|
|
@@ -4882,6 +4891,28 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ getSpanArr1(data) {
|
|
|
+ //每次调用方法初始化
|
|
|
+ this.spanArr1 = []
|
|
|
+ for (var i = 0; i < data.length; i++) {
|
|
|
+ if (i === 0) {
|
|
|
+ this.spanArr1.push(1)
|
|
|
+ // data[i].group = i
|
|
|
+ this.pos1 = 0
|
|
|
+ } else {
|
|
|
+ // 判断当前元素与上一个元素是否相同
|
|
|
+ if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId || ( data[i].weightBatchId && data[i].weightBatchId ===data[i - 1].weightBatchId)) {
|
|
|
+ this.spanArr1[this.pos] += 1
|
|
|
+ // data[i].group = data[i - 1].group
|
|
|
+ this.spanArr1.push(0)
|
|
|
+ } else {
|
|
|
+ this.spanArr1.push(1)
|
|
|
+ this.pos1 = i
|
|
|
+ // data[i].group = data[i - 1].group + 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
if (this.mergeList.indexOf(column.label) != -1) {
|
|
|
const _row = this.spanArr[rowIndex]
|
|
@@ -4892,6 +4923,16 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
|
|
|
+ if (this.mergeList.indexOf(column.label) != -1) {
|
|
|
+ const _row = this.spanArr1[rowIndex]
|
|
|
+ const _col = _row > 0 ? 1 : 0
|
|
|
+ return {
|
|
|
+ rowspan: _row,
|
|
|
+ colspan: _col
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
//计算总件数和总车数
|
|
|
// getTotalNum(data) {
|
|
|
// //通过车序号的个数来计算车数
|