import request from '@/utils/request'
export function  searchname( dName ) {
    return request({
      url: `/csc-szls-system-manage/basicsDepot/authority_button/getByPersonnelName?dName=${dName}`,
      method: 'get',
    })
  }
  export function  savezs( data ) {
    return request({
      url: `/csc-szls-system-manage/basicsDepot/authority_button/add`,
      method: 'post',
      data:data
    })
  }
  export function  getzs( data ) {
    return request({
      url: `/csc-szls-system-manage/basicsDepot/authority/getPage`,
      method: 'post',
      data : data
    })
  }
  export function  findbyidzs( id ) {
    return request({
      url: `/csc-szls-system-manage/basicsDepot/authority/getById/${id}`,
      method: 'get',
    })
  }
  export function  updatezs( data ) {
    return request({
      url: `/csc-szls-system-manage/basicsDepot/authority_button/update`,
      method: 'post',
      data:data
    })
  }
  //库点
  export function  deletezs( id ) {
    return request({
      url: `/csc-szls-system-manage/basicsDepot/authority_button/deleteById?id=${id}`,
      method: 'delete',
    })
  }
  //仓房
  export function  searchcfname(  depotId ,hName  ) {
    return request({
      url: `/csc-szls-system-manage/basicsWarehouse/authority_button/getByPersonnelName?depotId=${depotId}&hName=${hName}`,
      method: 'get',
    })
  }
  //仓房
  export function  savecf( data ) {
    return request({
      url: `/csc-szls-system-manage/basicsWarehouse/authority_button/add`,
      method: 'post',
      data:data
    })
  }
  export function  getcf( data ) {
    return request({
      url: `/csc-szls-system-manage/basicsWarehouse/authority/getPage`,
      method: 'post',
      data : data
    })
  }
  export function  findbyidcf( id ) {
    return request({
      url: `/csc-szls-system-manage/basicsWarehouse/authority/getById/${id}`,
      method: 'get',
    })
  }
  export function  updatecf( data ) {
    return request({
      url: `/csc-szls-system-manage/basicsWarehouse/authority_button/update`,
      method: 'post',
      data:data
    })
  }
  export function  deletecf( id ) {
    return request({
      url: `/csc-szls-system-manage/basicsWarehouse/authority_button/deleteById?id=${id}`,
      method: 'delete',
    })
  }
  