import httpClient from '@/services/http'
import { CommonFetchOptions } from '@/services/http/types'

/**
 * 获取机构开户列表信息
 */
export function queryWskhUserinfo(options: CommonFetchOptions<{ request: Model.WskhUserinfoReq; response: Model.MemberDetail; }>) {
    return httpClient.commonRequest('/wskhUserinfo/query', 'get', options)
}

/**
 * 获取机构开户列表详情信息
 */
export function queryWskhUserinfoDetail(options: CommonFetchOptions<{ request: Model.WskhUserinfoDetailReq; response: Model.MemberDetail; }>) {
    return httpClient.commonRequest('/wskhUserinfo/queryDetail', 'get', options)
}

/**
 * 处理开户信息 新增、修改
 */
export function wskhUserinfoAdd(options: CommonFetchOptions<{ request: Partial<Model.MemberDetail>; }>) {
    return httpClient.commonRequest('/wskhUserinfo/add', 'post', options)
}

/**
 * 审核通过
 */
export function wskhUserinfoApproved(options: CommonFetchOptions<{ request: Partial<Model.MemberDetail>; }>) {
    return httpClient.commonRequest('/wskhUserinfo/approved', 'post', options)
}

/**
 * 撤回提交的待审核信息
 */
export function wskhUserinfoReBack(options: CommonFetchOptions<{ request: Model.WskhUserinfoReBackReq; }>) {
    return httpClient.commonRequest('/wskhUserinfo/reBack', 'get', options)
}

/**
 * 删除待提交的开户申请
 */
export function wskhUserinfoDelete(options: CommonFetchOptions<{ request: Model.WskhUserinfoDeleteReq; }>) {
    return httpClient.commonRequest('/wskhUserinfo/delete', 'get', options)
}

/**
 * 获取机构及所有子机构
 */
export function getAreaAndAllChilds(options: CommonFetchOptions<{ response: Model.AreaAndAllChildsRsp[]; }>) {
    return httpClient.commonRequest('/common/getAreaAndAllChilds', 'get', options)
}

/**
 * 会员机构管理-->子机构管理-->新增
 */
export function organSonAdd(options: CommonFetchOptions<{ request: Partial<Model.organSonUpdateReq>; }>) {
    return httpClient.commonRequest('/organSon/addsonorgan', 'post', options)
}

/**
 * 会员机构管理-->子机构管理-->保存
 */
export function organSonSave(options: CommonFetchOptions<{ request: Partial<Model.organSonUpdateReq>; }>) {
    return httpClient.commonRequest('/organSon/edit', 'post', options)
}

/**
 * 会员机构管理-->子机构管理-->修改
 */
export function organSonEdit(options: CommonFetchOptions<{ request: Partial<Model.organSonUpdateReq>; }>) {
    return httpClient.commonRequest('/organSon/editsonorgan', 'post', options)
}

/**
 * 会员机构管理-->子机构管理-->注销
 */
export function organSonDelete(options: CommonFetchOptions<{ request: Model.organSonDeleteReq; }>) {
    return httpClient.commonRequest('/organSon/delete', 'get', options)
}

/**
 * 会员机构管理-->子机构管理-->获取机构列表
 */
export function queryOrganSon(options: CommonFetchOptions<{ request: Model.OrganSonReq; response: Model.OrganSonRsp[]; }>) {
    return httpClient.commonRequest('/organSon/query', 'get', options)
}

/**
 * 会员机构管理-->子机构管理-->撤回
 */
export function organSonRebackChange(options: CommonFetchOptions<{ request: Model.organSonRebackChangeReq; }>) {
    return httpClient.commonRequest('/organSon/rebackChange', 'get', options)
}

/**
 * 会员机构管理-->子机构管理-->恢复
 */
export function organSonRecover(options: CommonFetchOptions<{ request: Model.organSonRecoverReq; }>) {
    return httpClient.commonRequest('/organSon/recover', 'get', options)
}

/**
 * 会员机构管理-->子机构管理-->机构详情
 */
export function organSonViewson(options: CommonFetchOptions<{ request: Model.organSonViewsonReq; response: Model.organSonViewsonRsp; }>) {
    return httpClient.commonRequest('/organSon/viewson', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->机构资料管理-->获取机构资料列表
 */
export function queryOrganDetailList(options: CommonFetchOptions<{ request: Model.OrganDetailListReq; response: Model.OrganDetailRsp[]; }>) {
    return httpClient.commonRequest('/organDetail/query', 'get', options)
}

/**
 * 会员机构管理-->机构管理-->机构资料管理-->获取机构资料详情信息
 */
export function queryOrganDetail(options: CommonFetchOptions<{ request: Model.OrganDetailReq; response: Model.OrganDetailRsp[]; }>) {
    return httpClient.commonRequest('/organDetail/queryDetail', 'get', options)
}