import {Base} from '../../../static/util/base.js'

class SampleRandomModel extends Base {

    constructor() {
        super();
    }

    getEnterprisesList(data,callBack) {
        var params = {
            url: '/ah/ah-task-zf-user/getEnterprisesList',
            data:data,
            sCallBack: function (res) {
                callBack && callBack(res.data)
            }
        }
        this.serviceRequest(params);
    }

    getProductList(data,callBack) {
        var params = {
            url: '/ah/ah-task-zf-user/getProductList',
            data:data,
            sCallBack: function (res) {
                callBack && callBack(res.data)
            }
        }
        this.serviceRequest(params);
    }

    getEnterPrisesNum(data,callBack) {
        var params = {
            url: '/ah/ah-task-zf-user/getEnterPrisesNum',
            data:data,
            sCallBack: function (res) {
                callBack && callBack(res.data)
            }
        }
        this.serviceRequest(params);
    }


    getTaskSampleDetail(taskId, callBack) {
        var params = {
            url: '/ah/ahTaskDetail/list?pageNum=1&pageSize=100&taskId=' + taskId,
            sCallBack: function (res) {
                callBack && callBack(res.data)
            }
        }
        this.serviceRequest(params);
    }
    getZfUserById(id, callBack) {
        var params = {
            url: '/ah/ah-task-zf-user/getZfUserById',
            data:{id},
            sCallBack: function (res) {
                callBack && callBack(res.data)
            }
        }
        this.serviceRequest(params);
    }

    updateZfyInfo(data, callBack) {
        var params = {
            url: '/ah/ahSampleSheet/updateZfyInfo',
            data:data,
            type:"POST",
            sCallBack: function (res) {
                callBack && callBack(res.data)
            }
        }
        this.serviceRequest(params);
    }
    createSampleSheetList(data,callBack){
        var params = {
            url: '/ah/ahSampleSheet/createSampleSheet',
            data:data,
            type:"POST",
            sCallBack: function (res) {
                callBack && callBack(res.data)
            }
        }
        this.serviceRequest(params);
    }
    getSampleCheckList(data,callBack){
        var params = {
            url: '/ah/ahSampleSheet/listByCheckSample',
            data:data,
            sCallBack: function (res) {
                callBack && callBack(res.data)
            }
        }
        this.serviceRequest(params);
    }
    /* 获取改xzqdm下的地点 */
    getXzqdmSubLists(xzqCode,callBack){
        var params = {
            url: '/jg/tZdXzq/list',
            type: 'GET',
            data: {xzqCode},
            header: {
                'content-type': 'application/x-www-form-urlencoded'
            },
            sCallBack: function (res) {
                callBack && callBack(res)
            }
        }
        this.jgRequest(params);
    }

}
const _sampleRandom = new SampleRandomModel();
export {_sampleRandom}