Commit 33216e29 authored by 季圣华's avatar 季圣华
Browse files

商品列表的单位优化

parent a8c31414
...@@ -93,6 +93,10 @@ ...@@ -93,6 +93,10 @@
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</span> </span>
<span slot="customRenderUnit" slot-scope="text, record">
{{text?text:record.unitName}}
<a-tag v-if="record.sku">SKU</a-tag>
</span>
<template slot="customRenderEnabled" slot-scope="enabled"> <template slot="customRenderEnabled" slot-scope="enabled">
<a-tag v-if="enabled" color="green">启用</a-tag> <a-tag v-if="enabled" color="green">启用</a-tag>
<a-tag v-if="!enabled" color="orange">禁用</a-tag> <a-tag v-if="!enabled" color="orange">禁用</a-tag>
...@@ -165,15 +169,8 @@ ...@@ -165,15 +169,8 @@
{title: '颜色', dataIndex: 'color', width: 50}, {title: '颜色', dataIndex: 'color', width: 50},
{title: '类别', dataIndex: 'categoryName', width: 80}, {title: '类别', dataIndex: 'categoryName', width: 80},
{title: '扩展信息', dataIndex: 'materialOther', width: 100}, {title: '扩展信息', dataIndex: 'materialOther', width: 100},
{ {title: '单位', dataIndex: 'unit', width: 100,
title: '单位', dataIndex: 'unit', width: 100, customRender: function (text, record, index) { scopedSlots: { customRender: 'customRenderUnit' }
if(text) {
let showSku = record.sku?'[sku]':''
return text + showSku;
} else {
return record.unitName;
}
}
}, },
{title: '安全存量', dataIndex: 'safetyStock', width: 80}, {title: '安全存量', dataIndex: 'safetyStock', width: 80},
{title: '库存', dataIndex: 'stock', width: 70}, {title: '库存', dataIndex: 'stock', width: 70},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment