|
@@ -712,7 +712,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="opreation">
|
|
<div class="opreation">
|
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
|
- <el-button type="primary" @click="makeSure">修改下货地址和单价</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="makeSureAll">修改下货地址和单价</el-button>
|
|
<el-button type="primary" @click="makeSure">只修改单价</el-button>
|
|
<el-button type="primary" @click="makeSure">只修改单价</el-button>
|
|
</div>
|
|
</div>
|
|
</el-drawer>
|
|
</el-drawer>
|
|
@@ -1067,6 +1067,7 @@ export default {
|
|
start + Math.floor(this.maxHeight / this.itemHeight) + 1
|
|
start + Math.floor(this.maxHeight / this.itemHeight) + 1
|
|
)
|
|
)
|
|
this.getSpanArr(this.visibleList)
|
|
this.getSpanArr(this.visibleList)
|
|
|
|
+ this.getSpanArr1(this.visibleList1)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -2470,6 +2471,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.pos = 0
|
|
|
|
+ } else {
|
|
|
|
+ // 判断当前元素与上一个元素是否相同
|
|
|
|
+ if (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId) {
|
|
|
|
+ this.spanArr1[this.pos] += 1
|
|
|
|
+ data[i].group = data[i - 1].group
|
|
|
|
+ this.spanArr1.push(0)
|
|
|
|
+ } else {
|
|
|
|
+ this.spanArr1.push(1)
|
|
|
|
+ this.pos = i
|
|
|
|
+ data[i].group = data[i - 1].group + 1
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
if (this.mergeList.indexOf(column.label) != -1) {
|
|
if (this.mergeList.indexOf(column.label) != -1) {
|
|
const _row = this.spanArr[rowIndex]
|
|
const _row = this.spanArr[rowIndex]
|
|
@@ -2482,7 +2505,7 @@ export default {
|
|
},
|
|
},
|
|
objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
|
|
objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
|
|
if (this.mergeList1.indexOf(column.label) != -1) {
|
|
if (this.mergeList1.indexOf(column.label) != -1) {
|
|
- const _row = this.spanArr[rowIndex]
|
|
|
|
|
|
+ const _row = this.spanArr1[rowIndex]
|
|
const _col = _row > 0 ? 1 : 0
|
|
const _col = _row > 0 ? 1 : 0
|
|
return {
|
|
return {
|
|
rowspan: _row,
|
|
rowspan: _row,
|
|
@@ -2677,6 +2700,20 @@ export default {
|
|
this.tableData = res.data.data
|
|
this.tableData = res.data.data
|
|
this.totalHeight += this.itemHeight
|
|
this.totalHeight += this.itemHeight
|
|
this.visibleList = res.data.data
|
|
this.visibleList = res.data.data
|
|
|
|
+ console.log(this.visibleList);
|
|
|
|
+ try {
|
|
|
|
+ //遍历保留两位小数
|
|
|
|
+ this.visibleList.forEach(e=>{
|
|
|
|
+ if(e.priceValue){
|
|
|
|
+ e.priceValue=e.priceValue.toFixed(2);
|
|
|
|
+ }
|
|
|
|
+ if(e.detailsAmount){
|
|
|
|
+ e.detailsAmount=e.detailsAmount.toFixed(2);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } catch (error) {
|
|
|
|
+
|
|
|
|
+ }
|
|
console.log(this.visibleList, 'this.visibleList')
|
|
console.log(this.visibleList, 'this.visibleList')
|
|
this.getSpanArr(this.visibleList)
|
|
this.getSpanArr(this.visibleList)
|
|
this.getTotalNum(this.tableData)
|
|
this.getTotalNum(this.tableData)
|
|
@@ -2710,8 +2747,21 @@ export default {
|
|
this.tableData = res.data.data
|
|
this.tableData = res.data.data
|
|
this.totalHeight += this.itemHeight
|
|
this.totalHeight += this.itemHeight
|
|
this.visibleList1 = res.data.data
|
|
this.visibleList1 = res.data.data
|
|
|
|
+ try {
|
|
|
|
+ //遍历保留两位小数
|
|
|
|
+ this.visibleList1.forEach(e=>{
|
|
|
|
+ if(e.priceValue){
|
|
|
|
+ e.priceValue=e.priceValue.toFixed(2);
|
|
|
|
+ }
|
|
|
|
+ if(e.detailsAmount){
|
|
|
|
+ e.detailsAmount=e.detailsAmount.toFixed(2);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } catch (error) {
|
|
|
|
+
|
|
|
|
+ }
|
|
console.log(this.visibleList1, 'this.visibleList1')
|
|
console.log(this.visibleList1, 'this.visibleList1')
|
|
- this.getSpanArr(this.visibleList1)
|
|
|
|
|
|
+ this.getSpanArr1(this.visibleList1)
|
|
this.getTotalNum(this.tableData)
|
|
this.getTotalNum(this.tableData)
|
|
console.log(this.visibleList1)
|
|
console.log(this.visibleList1)
|
|
})
|
|
})
|
|
@@ -2807,6 +2857,19 @@ export default {
|
|
0,
|
|
0,
|
|
Math.floor(this.maxHeight / this.itemHeight) + 1
|
|
Math.floor(this.maxHeight / this.itemHeight) + 1
|
|
)
|
|
)
|
|
|
|
+ try {
|
|
|
|
+ //遍历保留两位小数
|
|
|
|
+ this.visibleList.forEach(e=>{
|
|
|
|
+ if(e.priceValue){
|
|
|
|
+ e.priceValue=e.priceValue.toFixed(2);
|
|
|
|
+ }
|
|
|
|
+ if(e.detailsAmount){
|
|
|
|
+ e.detailsAmount=e.detailsAmount.toFixed(2);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } catch (error) {
|
|
|
|
+
|
|
|
|
+ }
|
|
console.log(this.visibleList)
|
|
console.log(this.visibleList)
|
|
this.getSpanArr(this.visibleList)
|
|
this.getSpanArr(this.visibleList)
|
|
this.getTotalNum(this.tableData)
|
|
this.getTotalNum(this.tableData)
|
|
@@ -2846,8 +2909,21 @@ export default {
|
|
0,
|
|
0,
|
|
Math.floor(this.maxHeight / this.itemHeight) + 1
|
|
Math.floor(this.maxHeight / this.itemHeight) + 1
|
|
)
|
|
)
|
|
|
|
+ try {
|
|
|
|
+ //遍历保留两位小数
|
|
|
|
+ this.visibleList1.forEach(e=>{
|
|
|
|
+ if(e.priceValue){
|
|
|
|
+ e.priceValue=e.priceValue.toFixed(2);
|
|
|
|
+ }
|
|
|
|
+ if(e.detailsAmount){
|
|
|
|
+ e.detailsAmount=e.detailsAmount.toFixed(2);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } catch (error) {
|
|
|
|
+
|
|
|
|
+ }
|
|
console.log(this.visibleList1)
|
|
console.log(this.visibleList1)
|
|
- this.getSpanArr(this.visibleList1)
|
|
|
|
|
|
+ this.getSpanArr1(this.visibleList1)
|
|
this.getTotalNum(this.tableData1)
|
|
this.getTotalNum(this.tableData1)
|
|
loading.close()
|
|
loading.close()
|
|
})
|
|
})
|