给报表列增加左右拉动的功能
This commit is contained in:
@@ -65,6 +65,7 @@
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:components="handleDrag(columns)"
|
||||
:pagination="false"
|
||||
:scroll="scroll"
|
||||
:loading="loading"
|
||||
@@ -146,27 +147,27 @@
|
||||
// 表头
|
||||
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: 'action', align:"center", width: 100, fixed: 'left',
|
||||
{title: '库存流水', dataIndex: 'action', align:"center", width: 60,
|
||||
scopedSlots: { customRender: 'action' }
|
||||
},
|
||||
{title: '条码', dataIndex: 'mBarCode', width: 150, fixed: 'left'},
|
||||
{title: '名称', dataIndex: 'name', width: 150, fixed: 'left'},
|
||||
{title: '规格', dataIndex: 'standard'},
|
||||
{title: '型号', dataIndex: 'model'},
|
||||
{title: '颜色', dataIndex: 'color'},
|
||||
{title: '类别', dataIndex: 'categoryName'},
|
||||
{title: '单位', dataIndex: 'unitName'},
|
||||
{title: '单价', dataIndex: 'purchaseDecimal', sorter: (a, b) => a.purchaseDecimal - b.purchaseDecimal},
|
||||
{title: '初始库存', dataIndex: 'initialStock', sorter: (a, b) => a.initialStock - b.initialStock},
|
||||
{title: '库存', dataIndex: 'currentStock', sorter: (a, b) => a.currentStock - b.currentStock,
|
||||
{title: '条码', dataIndex: 'mBarCode', width: 80},
|
||||
{title: '名称', dataIndex: 'name', width: 140, ellipsis:true},
|
||||
{title: '规格', dataIndex: 'standard', width: 100, ellipsis:true},
|
||||
{title: '型号', dataIndex: 'model', width: 100, ellipsis:true},
|
||||
{title: '颜色', dataIndex: 'color', width: 80, ellipsis:true},
|
||||
{title: '类别', dataIndex: 'categoryName', width: 80, ellipsis:true},
|
||||
{title: '单位', dataIndex: 'unitName', width: 60, ellipsis:true},
|
||||
{title: '单价', dataIndex: 'purchaseDecimal', sorter: (a, b) => a.purchaseDecimal - b.purchaseDecimal, width: 60},
|
||||
{title: '初始库存', dataIndex: 'initialStock', sorter: (a, b) => a.initialStock - b.initialStock, width: 60},
|
||||
{title: '库存', dataIndex: 'currentStock', sorter: (a, b) => a.currentStock - b.currentStock, width: 60,
|
||||
scopedSlots: { customRender: 'customRenderStock' }
|
||||
},
|
||||
{title: '库存金额', dataIndex: 'currentStockPrice', sorter: (a, b) => a.currentStockPrice - b.currentStockPrice}
|
||||
{title: '库存金额', dataIndex: 'currentStockPrice', sorter: (a, b) => a.currentStockPrice - b.currentStockPrice, width: 80}
|
||||
],
|
||||
url: {
|
||||
list: "/material/getListWithStock"
|
||||
@@ -178,7 +179,7 @@
|
||||
this.loadTreeData()
|
||||
},
|
||||
mounted () {
|
||||
this.scroll.x = 2100
|
||||
this.scroll.x = 1620
|
||||
},
|
||||
methods: {
|
||||
moment,
|
||||
|
||||
Reference in New Issue
Block a user