stock.js 2.78 KB
/**
 * on stock page store
 * @author: wsl <shuiling.wang@yoho.cn>
 * @date: 2017/07/13
 */
import moment from 'moment';
export default function() {
    return {
        tableCols: [
            {
                title: '商品编号',
                key: 'productSku',
                align: 'center'
            },
            {
                title: '产品名称',
                key: 'productName',
                align: 'center'
            },
            {
                title: '厂家编号',
                key: 'factoryCode',
                align: 'center',
            },
            {
                title: '请购类型',
                key: 'sellTypeName',
                align: 'center',
            },
            {
                title: '初期数量',
                key: 'supplier90Sell',
                align: 'center'
            },
            {
                title: '进货数量',
                key: 'supplier11Sell',
                align: 'center'
            },
            {
                title: '销售数量',
                key: 'supplier30Sell',
                align: 'center'
            },
            {
                title: '销退数量',
                key: 'supplier33Sell',
                align: 'center'
            },
            {
                title: '退供应商数量',
                key: 'supplier10Sell',
                align: 'center'
            },
            {
                title: '其他出库数量',
                key: 'supplier60Sell',
                align: 'center'
            },
            {
                title: '地面店出库数量',
                key: 'supplier70Sell',
                align: 'center',
                width: 150
            },
            {
                title: '地面店入库数量',
                key: 'supplier71Sell',
                align: 'center',
                width: 150
            },
            {
                title: '期末库存数量',
                key: 'supplier100Sell',
                align: 'center'
            }
        ],
        tableData: [],
        pageData: {
            total: 0,
            pageNo: 1,
            pageSize: 20
        },
        filters: {
            brandId: {
                label: '品牌',
                labelSpan: 6,
                model: this.$route.query.brandId,
                holder: '',
                fieldSpan: 18
            },
            createTime: {
                label: '创建时间',
                labelSpan: 6,
                model: [
                    new Date(+this.$route.query.begin * 1000),
                    new Date(moment(this.$route.query.begin * 1000).endOf('month').format("YYYY-MM-DD") + " 00:00:00")
                ],
                holder: '',
                fieldSpan: 18
            }
        }
    };
}