给报表列增加左右拉动的功能
This commit is contained in:
@@ -83,6 +83,7 @@
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:components="handleDrag(columns)"
|
||||
:pagination="false"
|
||||
:scroll="scroll"
|
||||
:loading="loading"
|
||||
@@ -166,29 +167,29 @@
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
title: '#', dataIndex: 'rowIndex', width:60, align:"center", fixed: 'left',
|
||||
title: '#', dataIndex: 'rowIndex', width:40, align:"center",
|
||||
customRender:function (t,r,index) {
|
||||
return (t !== '合计') ? (parseInt(index) + 1) : t
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '单据编号', dataIndex: 'number', width: 150, fixed: 'left',
|
||||
title: '单据编号', dataIndex: 'number', width: 100,
|
||||
scopedSlots: { customRender: 'numberCustomRender' },
|
||||
},
|
||||
{title: '条码', dataIndex: 'barCode', width: 150, fixed: 'left'},
|
||||
{title: '名称', dataIndex: 'mname', width: 150, fixed: 'left'},
|
||||
{title: '规格', dataIndex: 'standard'},
|
||||
{title: '型号', dataIndex: 'model'},
|
||||
{title: '单位', dataIndex: 'mUnit'},
|
||||
{title: '数量', dataIndex: 'operNumber', sorter: (a, b) => a.operNumber - b.operNumber},
|
||||
{title: '单价', dataIndex: 'unitPrice', sorter: (a, b) => a.unitPrice - b.unitPrice},
|
||||
{title: '金额', dataIndex: 'allPrice', sorter: (a, b) => a.allPrice - b.allPrice},
|
||||
{title: '税率(%)', dataIndex: 'taxRate'},
|
||||
{title: '税额', dataIndex: 'taxMoney', sorter: (a, b) => a.taxMoney - b.taxMoney},
|
||||
{title: '往来单位', dataIndex: 'sname'},
|
||||
{title: '仓库', dataIndex: 'dname'},
|
||||
{title: '出库日期', dataIndex: 'operTime'},
|
||||
{title: '备注', dataIndex: 'newRemark'}
|
||||
{title: '条码', dataIndex: 'barCode', width: 80},
|
||||
{title: '名称', dataIndex: 'mname', width: 120, ellipsis:true},
|
||||
{title: '规格', dataIndex: 'standard', width: 60, ellipsis:true},
|
||||
{title: '型号', dataIndex: 'model', width: 60, ellipsis:true},
|
||||
{title: '单位', dataIndex: 'mUnit', width: 50, ellipsis:true},
|
||||
{title: '数量', dataIndex: 'operNumber', sorter: (a, b) => a.operNumber - b.operNumber, width: 60},
|
||||
{title: '单价', dataIndex: 'unitPrice', sorter: (a, b) => a.unitPrice - b.unitPrice, width: 60},
|
||||
{title: '金额', dataIndex: 'allPrice', sorter: (a, b) => a.allPrice - b.allPrice, width: 60},
|
||||
{title: '税率(%)', dataIndex: 'taxRate', width: 60},
|
||||
{title: '税额', dataIndex: 'taxMoney', sorter: (a, b) => a.taxMoney - b.taxMoney, width: 60},
|
||||
{title: '往来单位', dataIndex: 'sname', width: 80, ellipsis:true},
|
||||
{title: '仓库', dataIndex: 'dname', width: 80, ellipsis:true},
|
||||
{title: '出库日期', dataIndex: 'operTime', width: 70},
|
||||
{title: '备注', dataIndex: 'newRemark', width: 100, ellipsis:true}
|
||||
],
|
||||
url: {
|
||||
list: "/depotHead/findInOutDetail",
|
||||
@@ -201,7 +202,7 @@
|
||||
this.defaultTimeStr = [moment(getNowFormatYear() + '-01-01', this.dateFormat), moment(this.currentDay, this.dateFormat)]
|
||||
},
|
||||
mounted () {
|
||||
this.scroll.x = 2300
|
||||
this.scroll.x = 1620
|
||||
},
|
||||
methods: {
|
||||
moment,
|
||||
|
||||
Reference in New Issue
Block a user