/* * @Date: 2021-07-08 16:53:36 * @LastEditors: wangqiang@feewee.cn * @LastEditTime: 2022-10-08 16:17:27 */ import { http } from "@/typing/http"; import request from "@/utils/request"; import { OOP_HOST } from "@/utils/host"; import { LabelValueType } from "rc-tree-select/lib/interface"; export interface ShopSelectNewOptions { bizTypes?: string; // 业态类型集合 ,分割 brands?: string; // 品牌id集合 ,分割 regions?: string; // 区域编码集合 ,分割 dealers?: string; // 商家id集合 ,分割 } export interface QueryParams extends ShopSelectNewOptions { type: 1 | 2; // 1 集团维度 2 自定义门店维度 shops?: string; // 门店集合 ,分割 keywords?: string; // 门店关键字搜索 } export interface ShopItem { shopId?: number; //门店id shopFullName?: string; //门店全称 shopShortName?: string; //门店简称 casShopId?: number; //对应售后门店id(只有售前业态门店有) casShopName?: string; //对应售后门店名称 bizType?: number; //业态类型 region?: Region; dealer?: DealerOrBrand; brandList?: DealerOrBrand[]; //只有售前业态门店有 } export interface Value extends ShopItem, LabelValueType {} export enum BizType { "新车销售" = 1, "售后", "二手车", "租车", } export interface Region { bh?: string; // 区域编码 name?: string; // 区域名称 fullName?: string; // 区域全称 } export interface DealerOrBrand { id?: number; name?: string; } /** * @description: 门店选择列表 * @param {QueryParams} params * @return {http.PromiseResp} */ export function getShopListApi( params: QueryParams ): http.PromiseResp { return request.get(`${OOP_HOST}/select/shop/classify`, { params }); } export interface Option { bizList?: Biz[]; regionList?: Region[]; brandList?: DealerOrBrand[]; dealerList?: DealerOrBrand[]; } export interface Biz { type?: number; name?: string; } /** * @description: 门店选择条件 * @param {QueryParams} params * @return {http.PromiseResp