express.js 2.35 KB
/**
 * done tab store
 * @author: leo
 * @date: 04/05/2017
 */

import timeFormat from 'filters/time-format';

export default function() {
    return {
        useFilter: false,
        filters: {
            orderNo: {
                label: '调拨单号',
                model: '',
                holder: '',
            },
            expressNo: {
                label: '物流单号',
                labelSpan: 6,
                model: '',
                holder: '',
                fieldSpan: 18
            },
            prodCode: {
                label: 'SKN编码',
                labelSpan: 6,
                model: '',
                holder: 'SKN',
                fieldSpan: 18
            },
            skuCode: {
                label: 'SKU编码',
                model: '',
                holder: 'SKU'
            },
            prodBarCode: {
                label: '商品条码',
                labelSpan: 6,
                model: '',
                holder: '',
                fieldSpan: 18
            }
        },
        page: {
            total: 0,
            current: 1
        },
        table: {
            cols: [
                {
                    title: '物流单号',
                    key: '',
                    align: 'center',
                    render(h, params) {
                        return (
                            <span>{params.row.expressNumber}({params.row.expressName})</span>
                        );

                    }
                },
                {
                    title: '发货时间',
                    align: 'center',
                    render(h, params) {
                        return (
                            <span>{timeFormat(params.row.createTime)}</span>
                        );
                    }
                },
                {
                    title: '查看明细',
                    key: 'detail',
                    align: 'center',
                    render: (h, params) => {
                        return (
                            <i-button type="primary"
                                onClick={() => this.goExpDetail(params.row.expressNumber)}>
                                查看明细
                            </i-button>
                        );
                    }
                }
            ],
            list: []
        }
    };
}