import { routerRedux } from 'dva/router';
import * as qcExportService from '../../services/QC/qcBatchService';

export default {

    namespace: 'QCBatchModel',
    state: {
    },
    subscriptions: {
        setup({ dispatch, history }) {  // eslint-disable-line

        },
    },
    effects: {
        *qcBatchExport({ payload, onComplete }, { call, put }) {
            const ret = yield call(qcExportService.BatchExport, payload);
            if (typeof onComplete === 'function') {
                onComplete(ret)
            }
        }
    },
    reducers: {
        save(state, action) {
            return { ...state, ...action.payload };
        },
    }
};
