import fetch from "utils/fetch";

// 入驻申请列表

// export function settlement_list(query) {
//   return fetch({
//     url: 'vehicle/company/apply/selectList',
//     method: 'get',
//     params: query
//   });
// }

// // 设为已读
// export function set_to_read(query) {
//   return fetch({
//     url: 'vehicle/company/apply/upd',
//     method: 'post',
//     data: query
//   });
// }

export function company_list(query) {
  return fetch({
    url: "vehicle/company/info/selectList",
    method: "get",
    params: query,
  });
}

export function store_list(query) {
  return fetch({
    url: "vehicle/admin/branchCompany/search",
    method: "get",
    params: query,
  });
}
//所有公司列表
export function company_all_list() {
  return fetch({
    url: "vehicle/company/info/alls",
    method: "get",
  });
}

//所有门店列表 state: 1
export function branchCompany_all_list(query) {
  return fetch({
    url: "vehicle/branchCompany/alls",
    method: "get",
    params: query,
  });
}


// 添加公司
export function add_company(query) {
  return fetch({
    url: "vehicle/company/info/save",
    method: "post",
    data: query,
  });
}
// 删除公司
export function del_company(query) {
  return fetch({
    url: "vehicle/company/info/del",
    method: "post",
    data: query,
  });
}

//编辑公司

export function upd_company(query) {
  return fetch({
    url: "vehicle/company/info/upd",
    method: "post",
    data: query,
  });
}

//门店
// 删除门店

export function del_store(query) {
  return fetch({
    url: "vehicle/admin/branchCompany/detele?id=" + query.id,
    method: "delete",
  });
}

//添加门店
export function add_store(query) {
  return fetch({
    url: "vehicle/admin/branchCompany/saveOrUpd",
    method: "post",
    data: query,
  });
}

//修改上下架
//修改门店
export function update_store(id, query) {
  return fetch({
    url: "vehicle/admin/branchCompany/saveOrUpd",
    method: "post",
    data: query,
  });
}
//营收统计列表
export function revenue_sum_list(query) {
  return fetch({
    url: "/api/order/admin/wallet/selectList",
    method: "get",
    params: query,
  });
}

//营收统计合计
export function revenue_sum_count(query) {
  return fetch({
    url: "/api/order/admin/wallet/sumAmount",
    method: "get",
    params: query,
  });
}

//立即提现列表
export function revenue_sum_ljtx(query) {
  return fetch({
    url: "/api/order/admin/wallet/amount/selectList",
    method: "get",
    params: query,
  });
}

// 立即提现提交
export function revenue_sum_ljtx_sub(query) {
  return fetch({
    url: "/api/order/admin/wallet/applyCathList",
    method: "post",
    data: query,
  });
}


//提现申请列表
export function revenue_withdraw_list(query) {
  return fetch({
    url: "/api/order/admin/wallet/cath/selectList",
    method: "get",
    params: query,
  });
}

// 提现申请审核
export function revenue_withdraw_sh(query) {
  return fetch({
    url: "/api/order/admin/wallet/withDrawProcess",
    method: "post",
    data: query,
  });
}
