api.ts 1.64 KB
import { http } from '@/typing/http';
import request from '@/utils/request';
import { PMS_HOST } from '@/utils/host';

export interface ListVO {
  partId?: number, //	配件id
  partName?: string, //	配件名称
  partCode?: string, //	配件编码
  partCnt?: number, //	缺件数量
  price?: number, //	价格
  count?: number,
  cnt?: number,
  amount?: number, //	价格
  supplierId?: number,
  supplierName?: string,
  storageId?: number
  storageName?: string
  shopId?: number
  shopName?: string
  waitListIds?: string
  remark?: string
  typeId?: string
  userName?: string
  status?:string
  brandName?:number
}

export interface Params{
  current?:number
  pageSize?:number
  brandId?:number
  status?:number
  shopId?:number
  keywords?:string
  serviceName?:string
  plateNo?:string
  vin?:string
}

export interface ProgressVO {
  planId?: string, //	计划ID
  planGroupId?: string, //	计划分组ID
  progressVOS?: ProgressItemVO[], //	流程详情
}
export interface ProgressItemVO {
  status?: string, //	状态
  title?: string, //	标题
  remarks?: string[], //	备注
  hasDetail?: boolean, //	是否有明细
}

export interface ProgressParams {
  handleTypeId?: string, //	缺件处理类型id
  handleType?: string, //	缺件处理类型 外采 调件 客户定件
}
// 列表查询
export function fetchPartList(params: Params): http.PromisePageResp<ListVO> {
  return request.get(`${PMS_HOST}/erp/cus/buy/part/get/buy/part/page`, { params });
}
// 进度查询
export function fetchProgress(params?: ProgressParams): http.PromiseResp<ProgressItemVO[]> {
  return request.get(`${PMS_HOST}/erp/cus/buy/part/get/pool/part/progress`, { params });
}