import { httpApi } from '../../../request/httpApi'

export default {
    //树数据
    async queryLazyTree(form, msg = true) {
        return httpApi({
            url: '/api/blade-manager/wbsPrivate/lazy-tree',
            method: 'get',
            params: form,
        }, msg)
    },

    // 获取试验树节点下的记录信息接口：
    async getMixRatioTestTree(form, msg = true) {
        return httpApi({
            url: '/api/blade-manager/wbsPrivate/self/trial/getMixRatioTestTree',
            method: 'post',
            params: form,
        }, msg)
    },
    // 获取试验树节点下的记录信息接口：
    async gettrialPage(form, msg = true) {
        return httpApi({
            // url: '/api/blade-business/trial/data/page',
            url: '/api/blade-business/trial/data/relation/page',
            method: 'post',
            data: form,
        }, msg)
    },
    //分页条件查询
    async queryPage(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/material/sample/page',
            method: 'get',
            params: form,
        }, msg)
    },
    //进场材料新增或修改
    async submitForm(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/material/sample/submit',
            method: 'post',
            data: form,
        }, msg)
    },
    //进场材料批量删除
    async removeData(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/material/sample/remove',
            method: 'post',
            params: form,
        }, msg)
    },
    //校验样品编号是否唯一
    async verification(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/material/sample/verification',
            method: 'get',
            params: form,
        }, msg)
    },
    //进场材料批量复制
    async copyData(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/material/sample/copy',
            method: 'post',
            data: form,
        }, msg)
    },
    //批量打印进场材料Pdf
    async exportPdf(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/material/sample/export-pdf',
            method: 'post',
            params: form,
        }, msg)
    },
    //关联试验文件信息提交保存接口
    async submitRelationFile(form, msg = true) {
        return httpApi({
            url: '/api/blade-business/trial/file/submit',
            method: 'post',
            data: form,
        }, msg)
    },
}
