index.js 4.42 KB
/**
 * on product page store
 * @author: Gexuhui
 * @date: 2017/08/23
 */
import moment from 'moment';
let curDay = moment().format('YYYY-MM-DD');

export default function() {
    return {
        day: curDay,
        date: curDay,
        dateRange: [curDay, curDay],
        categoryValue: [],
        maxSortId: 0,
        middleSortId: 0,
        smallSortId: 0,
        goodsYearsValue: '0',
        goodsSeasonsValue: '0',
        beginDate: curDay,
        endDate: curDay,
        today: moment().format('YYYY-MM-DD'),
        yesterday: moment().add(-1, 'days').format('YYYY-MM-DD'),
        day7: moment().add(-6, 'days').format('YYYY-MM-DD'),
        day30: moment().add(-29, 'days').format('YYYY-MM-DD'),
        timeLimit: true,
        goodsSeasonsList: [
            {
                name: '春',
                value: 1
            },
            {
                name: '夏',
                value: 2
            },
            {
                name: '秋',
                value: 3
            },
            {
                name: '冬',
                value: 4
            },
            {
                name: '春夏',
                value: 5
            },
            {
                name: '秋冬',
                value: 6
            }
        ],
        goodsYearsList: [],
        tableCols: [
            {
                title: 'skn',
                align: 'center',
                width: 70,
                key: 'skn'
            },
            {
                title: 'sku',
                align: 'center',
                width: 70,
                key: 'sku'
            },
            {
                title: '品牌',
                align: 'center',
                width: 85,
                key: 'brandName'
            },
            {
                title: '厂家编号',
                align: 'center',
                width: 75,
                key: 'factoryCode'
            },
            {
                title: '货品年季',
                align: 'center',
                width: 75,
                key: 'goodYearSeason'
            },
            {
                title: '三级品类',
                align: 'center',
                width: 75,
                key: 'smallSortName'
            },
            {
                title: '性别',
                align: 'center',
                key: 'gender'
            },
            {
                title: '吊牌价',
                align: 'center',
                width: 70,
                key: 'retailPrice'
            },
            {
                title: '当前价',
                align: 'center',
                width: 70,
                key: 'salePrice'
            },
            {
                title: '采购入库数',
                key: 'inNum',
                align: 'center',
                sortable: false
            },
            {
                title: '采购入库金额',
                key: 'inAmount',
                align: 'center',
                width: 85,
                sortable: false
            },
            {
                title: '退供应商数',
                key: 'outNum',
                align: 'center',
                sortable: false
            },
            {
                title: '退供应商金额',
                key: 'outAmount',
                align: 'center',
                width: 85,
                sortable: false
            },
            {
                title: '交易数量',
                key: 'postNum',
                align: 'center',
                sortable: false
            },
            {
                title: '交易金额',
                key: 'postAmount',
                align: 'center',
                sortable: false
            },
            {
                title: '库存数量',
                key: 'storageNum',
                align: 'center',
                sortable: false
            },
            {
                title: '库存金额',
                key: 'storageAmount',
                align: 'center',
                sortable: false
            }
        ],
        tableData: [],
        brandList: [],
        brandId: '0',
        pageData: {
            total: 0,
            current: 1,
            pageSize: 20
        },
        filters: {
            dateRange: {
                model: ''
            },
            begin: {
                model: ''
            },
            end: {
                model: ''
            }
        }
    };
}