...
|
...
|
@@ -3,9 +3,9 @@ |
|
|
* @author: qi.li <qi.li@yoho.cn>
|
|
|
* @date: 2017/04/13
|
|
|
*/
|
|
|
|
|
|
let tableCols = [
|
|
|
{
|
|
|
export default function() {
|
|
|
return {
|
|
|
tableCols: [{
|
|
|
title: 'SKN',
|
|
|
key: 'productSkn',
|
|
|
align: 'center'
|
...
|
...
|
@@ -14,8 +14,10 @@ let tableCols = [ |
|
|
title: '图片',
|
|
|
key: 'image',
|
|
|
align: 'center',
|
|
|
render() {
|
|
|
return '<div> <img v-prod-img="row.productSkn"> </div>';
|
|
|
render: (h, params) => {
|
|
|
return (
|
|
|
<img v-prod-img={params.row.productSkn}/>
|
|
|
);
|
|
|
}
|
|
|
},
|
|
|
{
|
...
|
...
|
@@ -32,48 +34,49 @@ let tableCols = [ |
|
|
title: '库存',
|
|
|
key: 'storage',
|
|
|
align: 'center',
|
|
|
render(row) {
|
|
|
return row.storage ? row.storage : 0;
|
|
|
render: (h, params) => {
|
|
|
return (
|
|
|
<span>{params.row.storage || 0}</span>
|
|
|
);
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
title: '销售价',
|
|
|
key: 'salePrice',
|
|
|
align: 'center',
|
|
|
render(row) {
|
|
|
return row.salePrice || 0;
|
|
|
render: (h, params) => {
|
|
|
return (
|
|
|
<span>{params.row.salePrice || 0}</span>
|
|
|
);
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
title: '更新时间',
|
|
|
key: 'editTime',
|
|
|
align: 'center',
|
|
|
render(row) {
|
|
|
return row.editTime || '-';
|
|
|
render: (h, params) => {
|
|
|
return (
|
|
|
<span>{params.row.editTime || '-'}</span>
|
|
|
);
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
|
key: 'action',
|
|
|
align: 'center',
|
|
|
render: function() {
|
|
|
return `<div class="action-btn-row">
|
|
|
<i-button type="primary" size="small" @click="editStore(row)">库存编辑</i-button>
|
|
|
</div> `;
|
|
|
}
|
|
|
render: (h, params) => {
|
|
|
return (
|
|
|
<action-group>
|
|
|
<i-button type="primary" size="small" onClick={() => this.editStore(params.row)}>库存编辑</i-button>
|
|
|
</action-group>
|
|
|
);
|
|
|
}
|
|
|
];
|
|
|
|
|
|
let tableData = [];
|
|
|
|
|
|
let pageData = {
|
|
|
}],
|
|
|
tableData: [],
|
|
|
pageData: {
|
|
|
total: 0,
|
|
|
current: 1,
|
|
|
pageSize: 20
|
|
|
};
|
|
|
|
|
|
export {
|
|
|
tableCols,
|
|
|
tableData,
|
|
|
pageData
|
|
|
}; |
|
|
}
|
|
|
};
|
|
|
} |
...
|
...
|
|