|
@@ -29,7 +29,10 @@
|
|
|
style="width: 100px"
|
|
|
></el-input>
|
|
|
</div>
|
|
|
- <div class="input_box" style="width:225px;margin-left:30px;margin-top:20px">
|
|
|
+ <div
|
|
|
+ class="input_box"
|
|
|
+ style="width: 225px; margin-left: 30px; margin-top: 20px"
|
|
|
+ >
|
|
|
<el-input placeholder="请输入车牌号/出厂门岗" v-model="input" clearable>
|
|
|
</el-input>
|
|
|
<el-button type="primary" class="btn" @click="onclick">
|
|
@@ -52,11 +55,14 @@ export default {
|
|
|
totalCapacity: null,
|
|
|
startTime: null,
|
|
|
endTime: null,
|
|
|
+
|
|
|
input: "",
|
|
|
tableTitle: "汽车抽查报表",
|
|
|
option: {
|
|
|
// 表格请求数据的地址
|
|
|
requestUrl: "api/v1/tms/getCapacityByDefend?apiId=474",
|
|
|
+ comparison: "orderNumber",
|
|
|
+ columnIndexs: [1, 2, 3, 4, 5, 6],
|
|
|
},
|
|
|
};
|
|
|
},
|
|
@@ -81,6 +87,51 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ //记录每一行的合并数
|
|
|
+ getSpanArr(data) {
|
|
|
+ //每次调用方法初始化
|
|
|
+ this.spanArr = [];
|
|
|
+ for (var i = 0; i < data.length; i++) {
|
|
|
+ if (i === 0) {
|
|
|
+ this.spanArr.push(1);
|
|
|
+ this.pos = 0;
|
|
|
+ } else {
|
|
|
+ // 判断当前元素与上一个元素是否相同
|
|
|
+ if (data[i].orderNumber === data[i - 1].orderNumber) {
|
|
|
+ this.spanArr[this.pos] += 1;
|
|
|
+ this.spanArr.push(0);
|
|
|
+ } else {
|
|
|
+ this.spanArr.push(1);
|
|
|
+ this.pos = i;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
+ if (
|
|
|
+ columnIndex == 0 ||
|
|
|
+ columnIndex == 1 ||
|
|
|
+ columnIndex == 7 ||
|
|
|
+ columnIndex == 8 ||
|
|
|
+ columnIndex == 9 ||
|
|
|
+ columnIndex == 10 ||
|
|
|
+ columnIndex == 11 ||
|
|
|
+ columnIndex == 12 ||
|
|
|
+ columnIndex == 13 ||
|
|
|
+ columnIndex == 14
|
|
|
+ ) {
|
|
|
+ const _row = this.spanArr[rowIndex];
|
|
|
+ const _col = _row > 0 ? 1 : 0;
|
|
|
+ return {
|
|
|
+ rowspan: _row,
|
|
|
+ colspan: _col,
|
|
|
+ };
|
|
|
+ }
|
|
|
+ },
|
|
|
+ showPathView(data){
|
|
|
+ this.dialogVisible=!this.dialogVisible;
|
|
|
+ this.selectOrderNumber=data.orderNumber;
|
|
|
+ },
|
|
|
func(res) {
|
|
|
console.log(res);
|
|
|
var resultNetWeightTotal = 0;
|