import request from '@/utils/request'

// 查询账户库列表
export function listAccountInfo(query) {
  return request({
    url: '/ccdi/accountInfo/list',
    method: 'get',
    params: query
  })
}

// 查询账户库详情
export function getAccountInfo(id) {
  return request({
    url: '/ccdi/accountInfo/' + id,
    method: 'get'
  })
}

// 新增账户
export function addAccountInfo(data) {
  return request({
    url: '/ccdi/accountInfo',
    method: 'post',
    data
  })
}

// 修改账户
export function updateAccountInfo(data) {
  return request({
    url: '/ccdi/accountInfo',
    method: 'put',
    data
  })
}

// 删除账户
export function delAccountInfo(ids) {
  return request({
    url: '/ccdi/accountInfo/' + ids,
    method: 'delete'
  })
}

// 查询员工下拉
export function listAccountStaffOptions(query) {
  return request({
    url: '/ccdi/accountInfo/staffOptions',
    method: 'get',
    params: { query }
  })
}

// 查询关系人下拉
export function listAccountRelationOptions(staffId) {
  return request({
    url: '/ccdi/accountInfo/relationOptions',
    method: 'get',
    params: { staffId }
  })
}
