import {baseApp} from '@/api'
import request from '@/utils/require'

// 列表获取
export function getPageList(pageForm,param){
    return request({
        url: `${baseApp}/companyRecordsPage/${pageForm.page}/${pageForm.size}`,
        method: 'post',
        data: param
    })
} 
export function getInfoById(id){
    return request({
        url: `${baseApp}/companyRecords/${id}`,
        method: 'get',
    })
} 
// 获取企业信息
export function getCompanyInfo(code){
    return request({
        url: `${baseApp}/company/${code}`,
        method: 'get',
    })
} 
// 企业信息更新
export function editCompanyInfo(param){
    return request({
        url: `${baseApp}/insertCompanyRecords/0`,
        method: 'post',
        data:param
    })
} 
// 仓房基本情况
export function getWareList(param){
    return request({
        url: `${baseApp}/warehouseListByKddm/${param.kddm}`,
        method: 'post',
    })
}
// 仓房信息新增
export function addWareInfo(param){
    return request({
        url: `${baseApp}/warehouseInsertList`,
        method: 'post',
        data:param
    })
} 
// 仓储设备情况
export function getDeviceList(param){
    return request({
        url: `${baseApp}/equipmentList`,
        method: 'post',
        data:param
    })
}                          
// 仓储设备新增
export function addDeviceInfo(param){
    return request({
        url: `${baseApp}/equipmentInsertList`,
        method: 'post',
        data:param
    })
} 

// 保管员情况
export function getPeopleList(param){
    return request({
        url: `${baseApp}/personnelListByKddm/${param.kddm}`,
        method: 'post',
        data: param
    })
}

export function addPeopleInfo(param){
    return request({
        url: `${baseApp}/personnelInsertList`,
        method: 'post',
        data:param
    })
} 
       
export function companyInfo(param,type){
    return request({
        url: `${baseApp}/insertCompanyRecords/${type}`,
        method: 'post',
        data:param
    })
} 


// 提交
export function sendKuDianInfo(code){
    return request({
        url: `${baseApp}/companyRecordsRelay/${code}`,
        method: 'post',
    })
}  

// 审批
export function checkKuDianInfo(form){
    return request({
        url: `${baseApp}/companyRecordsDistrictExamine`,
        method: 'post',
        data:form
    })
}  
     