优化报表的列宽排版

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

@@ -166,29 +166,29 @@
// 表头
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: 'number', width: 100,
title: '单据编号', dataIndex: 'number', width: 150, fixed: 'left',
scopedSlots: { customRender: 'numberCustomRender' },
},
{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}
{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'}
],
url: {
list: "/depotHead/findInOutDetail",
@@ -200,6 +200,9 @@
this.initSupplier()
this.defaultTimeStr = [moment(getNowFormatYear() + '-01-01', this.dateFormat), moment(this.currentDay, this.dateFormat)]
},
mounted () {
this.scroll.x = 2500
},
methods: {
moment,
getQueryParams() {