info.js 1.83 KB
/**
 * Created by TaoHuang on 2017/6/20.
 */

export default function() {
    return {
        tableCols: [
            {
                title: 'sku',
                key: 'sku',
                align: 'center'
            },
            {
                title: '条码',
                key: 'skuFactoryCode',
                align: 'center'
            },
            {
                title: '商品图片',
                align: 'center',
                render: (h, params) => {
                    let directives = [
                        {name: 'prod-img', value: params.row.skn, modifiers: {skn: true}}
                    ];

                    return (
                        <div>
                            <img {...{directives}}></img>
                        </div>
                    );
                }
            },
            {
                title: '商品名称',
                key: 'productName',
                align: 'center'
            },
            {
                title: '规格',
                align: 'center',
                render: (h, params) => {
                    return (
                        <div>{params.row.colorName}/{params.row.size}</div>
                    );
                }
            },
            {
                title: '入库单号/已发数',
                align: 'center',
                render: (h, params) => {
                    return (
                        <div>{params.row.boList.map((i) => {
                            return (
                                <div>{i.proRequisitionFormId}/{i.num}</div>
                            );
                        })}</div>
                    );
                }
            }
        ],
        tableData: [],
        id: null,
        time: null,
        storeroomName: null,
        address: null,
        adminName: null
    };
}