import request from '@/utils/httpRequest'

export default class WorkClientService {
  list (param) {
    return request({
      url: '/workClientInfo/workClientInfo/list',
      method: 'get',
      params: param
    })
  }
  componentList (param) {
    return request({
      url: '/workClientInfo/workClientInfo/componentList',
      method: 'get',
      params: param
    })
  }
  componentById (id) {
    return request({
      url: '/workClientInfo/workClientInfo/componentById',
      method: 'get',
      params: {id: id}
    })
  }
  save (param) {
    return request({
      url: '/workClientInfo/workClientInfo/save',
      method: 'post',
      data: param
    })
  }
  remove (url) {
    return request({
      url: '/workClientInfo/workClientInfo/remove',
      method: 'get',
      params: {id: url}
    })
  }
  findById (id) {
    return request({
      url: '/workClientInfo/workClientInfo/findById',
      method: 'get',
      params: {id: id}
    })
  }
  update (param) {
    return request({
      url: '/workClientInfo/workClientInfo/update',
      method: 'post',
      data: param
    })
  }
  findListByName (name) {
    return request({
      url: '/workClientInfo/workClientInfo/findListByName',
      method: 'get',
      params: {name: name}
    })
  }
  enterpriseSearchByName (name) {
    return request({
      url: '/workClientInfo/workClientInfo/enterpriseSearchByName',
      method: 'post',
      params: {keyword: name}
    })
  }
  enterpriseTicketInfo (name) {
    return request({
      url: '/workClientInfo/workClientInfo/enterpriseTicketInfo',
      method: 'post',
      params: {id: name}
    })
  }
  isExist (param) {
    return request({
      url: '/workClientInfo/workClientInfo/isExist',
      method: 'get',
      params: {param: param}
    })
  }
  haveUscCode (id, uscCode) {
    return request({
      url: '/workClientInfo/workClientInfo/haveUscCode',
      method: 'get',
      params: {id: id, uscCode: uscCode}
    })
  }
  haveWorkClient (id, name) {
    return request({
      url: '/workClientInfo/workClientInfo/haveWorkClient',
      method: 'get',
      params: {id: id, name: name}
    })
  }
}
