优化报表的列宽排版

This commit is contained in:
季圣华
2023-02-15 22:23:47 +08:00
parent 59a52a2933
commit de3eea3efa
13 changed files with 183 additions and 160 deletions

View File

@@ -146,27 +146,27 @@
// 表头
columns: [
{
title: '#', dataIndex: 'rowIndex', width:40, align:"center",
title: '#', dataIndex: 'rowIndex', width:60, align:"center", fixed: 'left',
customRender:function (t,r,index) {
return (t !== '合计') ? (parseInt(index) + 1) : t
}
},
{title: '库存流水', dataIndex: 'action', align:"center", width: 60,
{title: '库存流水', dataIndex: 'action', align:"center", width: 150, fixed: 'left',
scopedSlots: { customRender: 'action' }
},
{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,
{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,
scopedSlots: { customRender: 'customRenderStock' }
},
{title: '库存金额', dataIndex: 'currentStockPrice', sorter: (a, b) => a.currentStockPrice - b.currentStockPrice, width: 80}
{title: '库存金额', dataIndex: 'currentStockPrice', sorter: (a, b) => a.currentStockPrice - b.currentStockPrice}
],
url: {
list: "/material/getListWithStock"
@@ -177,6 +177,9 @@
this.getDepotData()
this.loadTreeData()
},
mounted () {
this.scroll.x = 2500
},
methods: {
moment,
getQueryParams() {