import { httpRequest } from '@/services/http'
import { HttpRequest } from '@/services/http/interface'
import { tradeServerRequest } from '@/services/socket/trade'
import { TradeRequest } from '@/services/socket/trade/interface'

/**
 * 查询仓库信息
 */
export function queryWarehouseInfo(params: HttpRequest<{ req: Ermcp.WarehouseInfoReq, rsp: Ermcp.WarehouseInfoRsp[] }>) {
    return httpRequest('/Guangzuan/QueryWarehouseInfo', 'get', params);
}

/**
 * 仓库新增修改
 */
export function warehouseApply(params: TradeRequest<Proto.WarehouseApplyReq, Proto.WarehouseApplyRsp>) {
    return tradeServerRequest('WarehouseApplyReq', 'WarehouseApplyRsp', params);
}