Sfoglia il codice sorgente

feat(订单): 添加根据PID获取PC Blade发货跟踪信息的APIPC Blade产品的物流跟踪信息

yz 1 settimana fa
parent
commit
e8495ea888
2 ha cambiato i file con 76 aggiunte e 0 eliminazioni
  1. 15 0
      src/api/order/sales-order.js
  2. 61 0
      src/api/types/sales-order.d.ts

+ 15 - 0
src/api/order/sales-order.js

@@ -138,4 +138,19 @@ export const createSalesOrder = async (data) => {
     method: 'post',
     data
   });
+};
+
+/**
+ * 根据PID获取PC Blade发货跟踪信息
+ * @param {string} pid - 产品ID或订单ID
+ * @returns {Promise<import('../types/sales-order').PcBladeShipmentTrackingResponse>} PC Blade发货跟踪信息
+ */
+export const getPcBladeShipmentTrackingByPid = async (pid) => {
+  return request({
+    url: '/api/blade-factory/api/factory/salesOrder/getPcBladeShipmentTrackingByPid',
+    method: 'get',
+    params: {
+      pid
+    }
+  });
 };

+ 61 - 0
src/api/types/sales-order.d.ts

@@ -139,4 +139,65 @@ export type SalesOrderAddResponse = AxiosResponse<ApiResponseData<boolean>>;
 
 export type SalesOrderOperationResponse = AxiosResponse<ApiResponseData<boolean>>;
 
+/**
+ * PC Blade发货跟踪记录
+ */
+export interface PcBladeShipmentTrackingRecord {
+  /** 记录ID */
+  id: string;
+  /** 创建用户 */
+  createUser: string;
+  /** 创建部门 */
+  createDept: string;
+  /** 创建时间 */
+  createTime: string;
+  /** 更新用户 */
+  updateUser: string | null;
+  /** 更新时间 */
+  updateTime: string;
+  /** 状态 */
+  status: number;
+  /** 是否删除 */
+  isDeleted: number;
+  /** 发货单ID */
+  shipmentId: number;
+  /** 产品ID */
+  pid: string;
+  /** 客户ID */
+  cid: string;
+  /** 发货单号 */
+  shipmentNo: string;
+  /** 物流单号 */
+  trackingNo: string;
+  /** 跟踪状态 */
+  trackingStatus: string;
+  /** 当前位置 */
+  location: string;
+  /** 事件时间 */
+  eventTime: string;
+  /** 事件描述 */
+  eventDesc: string;
+  /** 是否异常 */
+  isException: number;
+  /** 异常类型 */
+  exceptionType: string | null;
+}
+
+/**
+ * PC Blade发货跟踪响应数据
+ */
+export interface PcBladeShipmentTrackingData {
+  /** 状态码 */
+  code: number;
+  /** 跟踪记录列表 */
+  data: PcBladeShipmentTrackingRecord[];
+  /** 响应消息 */
+  msg: string;
+}
+
+/**
+ * 根据PID获取PC Blade发货跟踪信息响应类型
+ */
+export type PcBladeShipmentTrackingResponse = AxiosResponse<PcBladeShipmentTrackingData>;
+
 // 注意:SalesOrderCreateResponse 已移至 order.d.ts 以避免重复定义