undone.js 5.1 KB
/**
 * undone tab store
 * @author: leo
 * @date: 04/05/2017
 */

export default () => {
    return {
        filters: {
            orderNo: {
                label: '调拨单号',
                model: '',
                holder: '',
            },
            prodCode: {
                label: '商品编码',
                model: '',
                holder: 'SKN'
            },
            merChantCode: {
                label: '商家编码',
                model: '',
                holder: '商家商品编码',
            },
            prodBarCode: {
                label: '商品条码',
                model: '',
                holder: ''
            },
            orderTime: {
                label: '下单时间',
                model: '',
                holder: ''
            },
            startTime: {
                model: ''
            },
            endTime: {
                model: '',
            },
            prodStatus: {
                label: '商品状态',
                model: -1,
                options: [
                    {
                        value: -1,
                        label: '全部'
                    },
                    {
                        value: 1,
                        label: '待处理'
                    },
                    {
                        value: 2,
                        label: '待处理超时'
                    }
                ]
            }
        },
        page: {
            total: 0,
            current: 1
        },
        table: {
            cols: [
                {
                    type: 'selection',
                    width: 60,
                    align: 'center'
                },
                {
                    title: '下单时间',
                    key: 'createTime',
                    align: 'center'
                },
                {
                    title: '商品图片',
                    align: 'center',
                    render(row) { // eslint-disable-line
                        return `<div>
                            <img v-prod-img.sku="row.productSku">
                        </div>`;
                    }
                },
                {
                    title: '商品信息',
                    align: 'center',
                    render(row) { // eslint-disable-line
                        return `<cell-prd-info
                    :skn="row.productSkn"
                    :sku="row.productSku"
                    :color="row._colorName"
                    :name="row.productName"
                    :brand="row.brandName"
                    :price="row.salesPrice"
                    :purchase-price="row.purchasePrice"
                    :size="row.sizeName"
                ></cell-prd-info>`;
                    }
                },
                {
                    title: '商品条码',
                    key: 'skuFactoryCode',
                    align: 'center'
                },
                {
                    title: '订单收发货',
                    align: 'center',
                    render(row) { // eslint-disable-line
                        return `<cell-dispatch
                    :show-store="true"
                    :store-num="row.inStoreNum"
                    :buy-num="row.buyingNums"
                    :ship-num="row.shipmentsNums"
                    :lack-num="row.lackNum">
                </cell-dispatch>`;
                    }
                },
                {
                    title: '发货',
                    width: 120,
                    align: 'center',
                    render(row, column, i) {
                        return `<cell-deliver
                            :row-index="${i}"
                            :ship-num="row.shipmentsNums"
                            @deliver-change="deliverChange">
                        </cell-deliver>`;
                    }
                },
                {
                    title: '缺货',
                    width: 140,
                    align: 'center',
                    render(row, column, index) {
                        return `<cell-stock-out
                            :row-index="${index}"
                            :lack-num="row.lackNum"
                            @lack-num-change="lackNumChange"
                            @click-upload="showUploadModal(${index})"
                        ></cell-stock-out>`;
                    }
                },
                {
                    title: '状态',
                    align: 'center',
                    render(row) {
                        let ot = row.isOvertime;

                        ot = ot === 'N' ? true : false;

                        return `<span v-if="${ot}">待处理</span>
                                <span v-else class="is-overtime">待处理(超时)</span>`;
                    },
                    className: 'status-cell'
                },
                {
                    title: '调拨单号',
                    key: 'proRequisitionFormId',
                    align: 'center',
                }
            ],
            list: []
        }
    };
};