|
@@ -244,7 +244,6 @@
|
|
|
:pagination="ipagination"
|
|
|
:scroll="{ x: 1500 }"
|
|
|
@change="handleTableChange"
|
|
|
- :footer="addBookFooterShow"
|
|
|
>
|
|
|
<!-- 集装箱代号 输入框 -->
|
|
|
<template slot="containerCode" slot-scope="text, record, index">
|
|
@@ -717,21 +716,21 @@ export default {
|
|
|
headData.money = moneyAll;
|
|
|
this.addBook = headData;
|
|
|
},
|
|
|
- // 新增托书 子表合计
|
|
|
- addBookFooterShow(data) {
|
|
|
- console.log('新增托书 子表 ----合计行')
|
|
|
- console.log('data', data)
|
|
|
- return (
|
|
|
- <a-table
|
|
|
- rowKey={Math.random}
|
|
|
- bordered={false}
|
|
|
- pagination={false}
|
|
|
- columns={this.addBookColumns}
|
|
|
- dataSource={this.addBookFooterDataSource || []}
|
|
|
- showHeader={false}
|
|
|
- ></a-table>
|
|
|
- )
|
|
|
- },
|
|
|
+ // // 新增托书 子表合计
|
|
|
+ // addBookFooterShow(data) {
|
|
|
+ // console.log('新增托书 子表 ----合计行')
|
|
|
+ // console.log('data', data)
|
|
|
+ // return (
|
|
|
+ // <a-table
|
|
|
+ // rowKey={Math.random}
|
|
|
+ // bordered={false}
|
|
|
+ // pagination={false}
|
|
|
+ // columns={this.addBookColumns}
|
|
|
+ // dataSource={this.addBookFooterDataSource || []}
|
|
|
+ // showHeader={false}
|
|
|
+ // ></a-table>
|
|
|
+ // )
|
|
|
+ // },
|
|
|
|
|
|
// 操作 删除
|
|
|
handleDelete(index) {
|
|
@@ -821,32 +820,32 @@ export default {
|
|
|
|
|
|
// 出现滚动条,合计栏跟随 table 滚动
|
|
|
watch: {
|
|
|
- dataSource(val) {
|
|
|
- console.log(val)
|
|
|
- // 同步表与footer滚动
|
|
|
- let dom = this.$refs.TableInfo.$el.querySelectorAll('.ant-table-body')[0]
|
|
|
- dom.addEventListener(
|
|
|
- 'scroll',
|
|
|
- () => {
|
|
|
- this.$refs.TableInfo.$el.querySelectorAll('.ant-table-body')[1].scrollLeft = dom.scrollLeft
|
|
|
- console.log('走到这')
|
|
|
- },
|
|
|
- true
|
|
|
- )
|
|
|
- }
|
|
|
+ // dataSource(val) {
|
|
|
+ // console.log(val)
|
|
|
+ // // 同步表与footer滚动
|
|
|
+ // let dom = this.$refs.TableInfo.$el.querySelectorAll('.ant-table-body')[0]
|
|
|
+ // dom.addEventListener(
|
|
|
+ // 'scroll',
|
|
|
+ // () => {
|
|
|
+ // this.$refs.TableInfo.$el.querySelectorAll('.ant-table-body')[1].scrollLeft = dom.scrollLeft
|
|
|
+ // console.log('走到这')
|
|
|
+ // },
|
|
|
+ // true
|
|
|
+ // )
|
|
|
+ // }
|
|
|
},
|
|
|
// 构建合计数据 --合计
|
|
|
// TODO:合计行 有滚动待解决
|
|
|
computed: {
|
|
|
- addBookFooterDataSource() {
|
|
|
- // 新增托书 子表 合计
|
|
|
- const total = Object.assign({}, this.addBookData[0])
|
|
|
- for (const attr in total) {
|
|
|
- total[attr] = '合计'
|
|
|
- break
|
|
|
- }
|
|
|
- return [total]
|
|
|
- }
|
|
|
+ // addBookFooterDataSource() {
|
|
|
+ // // 新增托书 子表 合计
|
|
|
+ // const total = Object.assign({}, this.addBookData[0])
|
|
|
+ // for (const attr in total) {
|
|
|
+ // total[attr] = '合计'
|
|
|
+ // break
|
|
|
+ // }
|
|
|
+ // return [total]
|
|
|
+ // }
|
|
|
},
|
|
|
mounted() {}
|
|
|
}
|