import request from '@/utils/request'

//查询列表
export function getList(data){
  return request({
    url:'/cashier/account/list',
    method:'get',
    params:data
  })
}
// 查询乡镇账户列表
export function queryTaccount(query) {
  return request({
    url: '/yinnong/taccount/query',
    method: 'get',
    params: query
  })
}
// 查询开户行信息列表
export function listDeposit(query) {
  return request({
    url: '/yinnong/deposit/list',
    method: 'get',
    params: query
  })
}
// 查询出纳账户设置详细
export function getAccount(id) {
  return request({
    url: '/cashier/account/get/' + id,
    method: 'get'
  })
}

//科目编码明细
export function getSubjectDetail() {
  return request({
    url: '/finance/subject/list101And102',
    method: 'get',
    // data: data
  })
}

// 修改出纳账户设置
export function updateAccount(data) {
  return request({
    url: '/cashier/account/edit',
    method: 'post',
    data: data
  })
}

// 新增出纳账户设置
export function addAccount(data) {
  return request({
    url: '/cashier/account/add',
    method: 'post',
    data: data
  })
}

// 删除出纳账户设置
export function delAccount(id) {
  return request({
    url: '/cashier/account/remove/' + id,
    method: 'get'
  })
}
export function balanceEnquiry(id) {
  return request({
    url: '/yinnong/transfer/balanceEnquiry/' + id,
    method: 'get'
  })
}

// 查询管控类型为中心账套时中心账套列表
export function getCentralBooks(query) {
  return request({
    url: '/cashier/account/centralBooks',
    method: 'get',
    params: query
  })
}

// 查询管控类型为中心账套时会计科目列表
export function getCentralSubjects(query) {
  return request({
    url: '/cashier/account/centralSubjects',
    method: 'get',
    params: query
  })
}

//检索
export function realtimeBankList(data, dump = true) {
  return request({
    url: '/yinnong/deposit/realtimeList',
    method: 'post',
    data: data,
    params: {
      dump,
    }
  })
}
