优化商品列的宽度

This commit is contained in:
神话
2022-05-06 20:04:02 +08:00
parent 664f50a7b5
commit ce896e105d
3 changed files with 33 additions and 33 deletions

View File

@@ -22,7 +22,7 @@
props: { props: {
modalWidth: { modalWidth: {
type: Number, type: Number,
default: 1300, default: 1450,
required: false required: false
}, },
value: { value: {

View File

@@ -101,20 +101,20 @@
}, },
categoryTree:[], categoryTree:[],
columns: [ columns: [
{dataIndex: 'mBarCode', title: '条码', width: 100, align: 'left', ellipsis:true}, {dataIndex: 'mBarCode', title: '条码', align: 'left'},
{dataIndex: 'name', title: '名称', width: 120, ellipsis:true}, {dataIndex: 'name', title: '名称'},
{dataIndex: 'categoryName', title: '类别', width: 80, ellipsis:true}, {dataIndex: 'categoryName', title: '类别'},
{dataIndex: 'standard', title: '规格', width: 80, ellipsis:true}, {dataIndex: 'standard', title: '规格'},
{dataIndex: 'model', title: '型号', width: 80, ellipsis:true}, {dataIndex: 'model', title: '型号'},
{dataIndex: 'color', title: '颜色', width: 80, ellipsis:true}, {dataIndex: 'color', title: '颜色'},
{dataIndex: 'unit', title: '单位', width: 70, ellipsis:true}, {dataIndex: 'unit', title: '单位'},
{dataIndex: 'sku', title: '多属性', width: 80, ellipsis:true}, {dataIndex: 'sku', title: '多属性'},
{dataIndex: 'stock', title: '库存', width: 60}, {dataIndex: 'stock', title: '库存'},
{dataIndex: 'expand', title: '扩展信息', width: 80, ellipsis:true}, {dataIndex: 'expand', title: '扩展信息'},
{dataIndex: 'enableSerialNumber', title: '序列号', width: 60, align: "center", {dataIndex: 'enableSerialNumber', title: '序列号', align: "center",
scopedSlots: { customRender: 'customRenderEnableSerialNumber' } scopedSlots: { customRender: 'customRenderEnableSerialNumber' }
}, },
{dataIndex: 'enableBatchNumber', title: '批号', width: 50, align: "center", {dataIndex: 'enableBatchNumber', title: '批号', align: "center",
scopedSlots: { customRender: 'customRenderEnableBatchNumber' } scopedSlots: { customRender: 'customRenderEnableBatchNumber' }
} }
], ],

View File

@@ -222,14 +222,14 @@
'purchaseDecimal','commodityDecimal','wholesaleDecimal','lowDecimal','enabled','enableSerialNumber','enableBatchNumber','action'], 'purchaseDecimal','commodityDecimal','wholesaleDecimal','lowDecimal','enabled','enableSerialNumber','enableBatchNumber','action'],
// 默认的列 // 默认的列
defColumns: [ defColumns: [
{title: '条码', dataIndex: 'mBarCode', width: '8%'}, {title: '条码', dataIndex: 'mBarCode'},
{title: '名称', dataIndex: 'name', width: '10%', ellipsis:true}, {title: '名称', dataIndex: 'name'},
{title: '规格', dataIndex: 'standard', width: '6%', ellipsis:true}, {title: '规格', dataIndex: 'standard'},
{title: '型号', dataIndex: 'model', width: '6%', ellipsis:true}, {title: '型号', dataIndex: 'model'},
{title: '颜色', dataIndex: 'color', width: '4%', ellipsis:true}, {title: '颜色', dataIndex: 'color'},
{title: '类别', dataIndex: 'categoryName', width: '6%', ellipsis:true}, {title: '类别', dataIndex: 'categoryName'},
{title: '扩展信息', dataIndex: 'materialOther', width: '6%', ellipsis:true}, {title: '扩展信息', dataIndex: 'materialOther'},
{title: '单位', dataIndex: 'unit', width: '6%', ellipsis:true, {title: '单位', dataIndex: 'unit',
customRender:function (t,r,index) { customRender:function (t,r,index) {
if (r) { if (r) {
let name = t?t:r.unitName let name = t?t:r.unitName
@@ -241,28 +241,28 @@
} }
} }
}, },
{title: '基础重量', dataIndex: 'weight', width: '5%'}, {title: '基础重量', dataIndex: 'weight'},
{title: '保质期', dataIndex: 'expiryNum', width: '4%'}, {title: '保质期', dataIndex: 'expiryNum'},
{title: '库存', dataIndex: 'stock', width: '5%'}, {title: '库存', dataIndex: 'stock'},
{title: '采购价', dataIndex: 'purchaseDecimal', width: '5%'}, {title: '采购价', dataIndex: 'purchaseDecimal'},
{title: '零售价', dataIndex: 'commodityDecimal', width: '5%'}, {title: '零售价', dataIndex: 'commodityDecimal'},
{title: '销售价', dataIndex: 'wholesaleDecimal', width: '5%'}, {title: '销售价', dataIndex: 'wholesaleDecimal'},
{title: '最低售价', dataIndex: 'lowDecimal', width: '5%'}, {title: '最低售价', dataIndex: 'lowDecimal'},
{title: '备注', dataIndex: 'remark', width: '5%', ellipsis:true}, {title: '备注', dataIndex: 'remark'},
{title: '状态', dataIndex: 'enabled', width: '4%', align: "center", {title: '状态', dataIndex: 'enabled', align: "center", width: 100,
scopedSlots: { customRender: 'customRenderEnabled' } scopedSlots: { customRender: 'customRenderEnabled' }
}, },
{title: '序列号', dataIndex: 'enableSerialNumber', width: '4%', align: "center", {title: '序列号', dataIndex: 'enableSerialNumber', align: "center", width: 100,
scopedSlots: { customRender: 'customRenderEnableSerialNumber' } scopedSlots: { customRender: 'customRenderEnableSerialNumber' }
}, },
{title: '批号', dataIndex: 'enableBatchNumber', width: '3%', align: "center", {title: '批号', dataIndex: 'enableBatchNumber', align: "center", width: 100,
scopedSlots: { customRender: 'customRenderEnableBatchNumber' } scopedSlots: { customRender: 'customRenderEnableBatchNumber' }
}, },
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
align:"center", align:"center",
width: '6%', width: 150,
scopedSlots: { customRender: 'action' }, scopedSlots: { customRender: 'action' },
} }
], ],