import request from '@/utils/httpRequest'
import { BUSINESS_PATH as prefix } from "../AppPath";

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