|
@@ -71,7 +71,7 @@
|
|
|
border
|
|
|
stripe
|
|
|
style="width: 100%; margin-top: 20px"
|
|
|
- max-height="800px"
|
|
|
+ max-height="500px"
|
|
|
:row-style="{ height: '30px' }"
|
|
|
:cell-style="{ fontWeight: '700' }"
|
|
|
:summary-method="getSummaries"
|
|
@@ -250,6 +250,7 @@
|
|
|
<template slot-scope="scope">
|
|
|
<el-input
|
|
|
v-model.number="scope.row.wagonBillWeight"
|
|
|
+ @change="mergeChange(scope.row)"
|
|
|
placeholder="计费吨位"
|
|
|
>
|
|
|
</el-input>
|
|
@@ -284,7 +285,7 @@
|
|
|
width="150px"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" align="center" width="150px">
|
|
|
+ <el-table-column label="操作" align="center" width="150px" prop="operation">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="text" @click="operate(scope.row)">保存</el-button>
|
|
|
</template>
|
|
@@ -334,7 +335,7 @@ export default {
|
|
|
operateName: "编辑",
|
|
|
unloadPointList: [],
|
|
|
spanArr: [],
|
|
|
- mergeList: [""]
|
|
|
+ mergeList: ["wagonNo","wagonBillWeight","OutStation"]
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -425,6 +426,13 @@ export default {
|
|
|
);
|
|
|
};
|
|
|
},
|
|
|
+ //修改合并行同步
|
|
|
+ mergeChange(row){
|
|
|
+ let index=this.tableData.indexOf(row);
|
|
|
+ for(let i=index;i<this.tableData.length && row.wagonNo==this.tableData[i].wagonNo && row.OutStation==this.tableData[i].OutStation;i++){
|
|
|
+ this.tableData[i].wagonBillWeight=row.wagonBillWeight;
|
|
|
+ }
|
|
|
+ },
|
|
|
operate(row) {
|
|
|
row.personnelSsoId = getCookie("userId");
|
|
|
if (
|
|
@@ -500,7 +508,7 @@ export default {
|
|
|
.then(res => {
|
|
|
this.tableData = res.data.data;
|
|
|
this.showSummariesPosition();
|
|
|
- this.getSpanArr();
|
|
|
+ this.getSpanArr(this.tableData);
|
|
|
});
|
|
|
},
|
|
|
//获取后台数据
|
|
@@ -513,7 +521,7 @@ export default {
|
|
|
.then(res => {
|
|
|
console.log(res.data.data);
|
|
|
this.tableData = res.data.data;
|
|
|
- this.getSpanArr();
|
|
|
+ this.getSpanArr(this.tableData);
|
|
|
this.showSummariesPosition();
|
|
|
});
|
|
|
},
|
|
@@ -585,7 +593,8 @@ export default {
|
|
|
this.pos = 0;
|
|
|
} else {
|
|
|
// 判断当前元素与上一个元素是否相同
|
|
|
- if (data[i].trainOrderId === data[i - 1].trainOrderId) {
|
|
|
+ if (data[i].wagonNo === data[i - 1].wagonNo
|
|
|
+ && data[i].OutStation === data[i - 1].OutStation) {
|
|
|
this.spanArr[this.pos] += 1;
|
|
|
data[i].group = data[i - 1].group;
|
|
|
this.spanArr.push(0);
|