clxx.js 3.56 KB
/*
 * @Description: 材料信息
 * @Autor: renchao
 * @LastEditTime: 2023-09-18 16:03:16
 */
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))

/**
 * @description: 材料目录明细初始化
 * @param {*} data
 * @author: renchao
 */
export function InitClml (data) {
    return request({
        url: SERVER.SERVERAPI + '/rest/ywbl/clxx/InitClml',
        method: 'post',
        data
    })
}

/**
 * @description: 材料目录明细移动
 * @param {*} data
 * @author: renchao
 */
export function moveClml (data) {
    return request({
        url: SERVER.SERVERAPI + '/rest/ywbl/clxx/moveClml',
        method: 'post',
        data
    })
}

/**
 * @description: 材料目录明细保存
 * @param {*} data
 * @author: renchao
 */
export function saveClml (data) {
    return request({
        url: SERVER.SERVERAPI + '/rest/ywbl/clxx/saveClml',
        method: 'post',
        data
    })
}
/**
 * @description: 修改收件材料目录
 * @param {*} data
 * @author: renchao
 */
export function updateClml (data, bsmSldy, bsmSlsq) {
    return request({
        url: SERVER.SERVERAPI + '/rest/ywbl/clxx/updateClml/' + bsmSldy + '/' + bsmSlsq,
        method: 'post',
        data
    })
}

/**
 * @description: 材料目录批量删除
 * @param {*} params
 * @author: renchao
 */
export function deleteSjClml (params) {
    return request({
        url: SERVER.SERVERAPI + '/rest/ywbl/clxx/deleteSjClml',
        method: 'delete',
        params: params
    })
}

/**
 * @description: 上传单个文件
 * @param {*} data
 * @author: renchao
 */
export function uploadSjClmx (data) {
    return request({
        url: SERVER.SERVERAPI + '/rest/ywbl/clxx/uploadSjClmx',
        method: 'post',
        headers: {
            'Content-Type': 'multipart/form-data'
        },
        data
    })
}

/**
 * @description: 上传duo个文件
 * @param {*} data
 * @author: renchao
 */
export function uploadBatch (data) {
    return request({
        url: SERVER.SERVERAPI + '/rest/ywbl/clxx/uploadBatch',
        method: 'post',
        headers: {
            'Content-Type': 'multipart/form-data'
        },
        data
    })
}

/**
 * @description: 删除上传文件
 * @param {*} bsmClmx
 * @author: renchao
 */
export function deleteClmx (bsmClmx) {
    return request({
        url: SERVER.SERVERAPI + '/rest/ywbl/clxx/deleteClmx?bsmClmx=' + bsmClmx,
        method: 'delete'
    })
}

/**
 * @description: 材料移动
 * @param {*} data
 * @author: renchao
 */
export function move (direction, clmxBsm) {
    return request({
        url: SERVER.SERVERAPI + '/rest/ywbl/clxx/move',
        method: 'post',
        params: {
            direction: direction,
            clmxBsm: clmxBsm
        }
    })
}

/**
 * @description: 材料导入
 * @param {*} data
 * @author: renchao
 */
export function uploadUndo (data) {
    return request({
        url: SERVER.SERVERAPI + '/rest/ywbl/clxx/uploadUndo',
        method: 'post',
        data
    })
}

/**
 * @description: 获取材料明细集合
 * @param {*} bsmSj
 * @author: renchao
 */
export function getClmxList (bsmSj) {
    return request({
        url: SERVER.SERVERAPI + '/rest/ywbl/clxx/getClmxList',
        method: 'get',
        params: {
            sjBsm: bsmSj
        }
    })
}
/**
 * @description: 补录材料目录
 * @param {*} data
 * @author: renchao
 */
export function repairInitClml (data) {
    return request({
        url: SERVER.SERVERAPI + '/rest/ywbl/clxx/repairInitClml',
        method: 'post',
        params: {
            repair: data.bsmRepair
        }
    })
}