Browse Source

feat(订单): 添加销售订单项目列表接口及类型定义

yz 1 month ago
parent
commit
660a2f290f
2 changed files with 108 additions and 20 deletions
  1. 23 20
      src/api/order/sales-order.js
  2. 85 0
      src/api/types/order.d.ts

+ 23 - 20
src/api/order/sales-order.js

@@ -10,6 +10,9 @@ import request from '@/router/axios'
  * @typedef {import('@/api/types/order').SubmitOrderToU9Response} SubmitOrderToU9Response
  * @typedef {import('@/api/types/order').SalesOrderListQueryParams} SalesOrderListQueryParams
  * @typedef {import('@/api/types/order').SalesOrderListResponse} SalesOrderListResponse
+ * @typedef {import('@/api/types/order').SalesOrderItemListRecord} SalesOrderItemListRecord
+ * @typedef {import('@/api/types/order').SalesOrderItemListQueryParams} SalesOrderItemListQueryParams
+ * @typedef {import('@/api/types/order').SalesOrderItemListResponse} SalesOrderItemListResponse
  */
 
 /**
@@ -57,25 +60,6 @@ export const getInventoryFullList = async (params) => {
 }
 
 /**
- * 物料档案查询(分页)
- * @param {number} current - 当前页码
- * @param {number} size - 每页大小
- * @param {Object} params - 查询参数
- * @returns {Promise<AxiosResponse>} 分页查询结果
- */
-export const getMaterialList = async (current, size, params) => {
-  return request({
-    url: '/api/blade-factory/api/factory/salesOrder/item/list',
-    method: 'get',
-    params: {
-      ...params,
-      current,
-      size
-    }
-  })
-}
-
-/**
  * 获取物料档案详情
  * @param {string | number} id - 物料ID
  * @returns {Promise<AxiosResponse>} 物料详情
@@ -272,4 +256,23 @@ export const getOrderList = async (current, size, params) => {
       size
     }
   })
-}
+}
+
+/**
+ * 获取销售订单项目列表
+ * @param {number} current - 当前页码
+ * @param {number} size - 每页大小
+ * @param {SalesOrderItemListQueryParams} params - 查询参数
+ * @returns {Promise<SalesOrderItemListResponse>} 分页查询结果
+ */
+export const getSalesOrderItemList = async (current, size, params) => {
+  return request({
+    url: '/api/blade-factory/api/factory/salesOrder/item/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size
+    }
+  })
+}

+ 85 - 0
src/api/types/order.d.ts

@@ -267,3 +267,88 @@ export type SalesOrderListQueryParams = Pick<OrderQueryParams,
  * 销售订单列表响应类型
  */
 export type SalesOrderListResponse = AxiosResponse<ApiResponseData<PageResult<SalesOrderRecord>>>;
+
+/**
+ * 销售订单项目记录接口
+ * @description 基于BaseEntity扩展的销售订单项目记录,包含物料、组织、分类、库存等信息
+ */
+export interface SalesOrderItemListRecord extends BaseEntity {
+  /** 组织ID */
+  ORG_ID: number;
+  /** 组织编码 */
+  ORG_CODE: string;
+  /** 组织名称 */
+  ORG_NAME: string;
+  /** 物料ID */
+  Item_ID: number;
+  /** 物料编码 */
+  Item_Code: string;
+  /** 物料名称 */
+  Item_Name: string;
+  /** 物料规格 */
+  Item_PECS: string;
+  /** 物料描述 */
+  Item_Description: string | null;
+  /** 物料编码1 */
+  Item_Code1: string;
+  /** 物料编码2 */
+  Item_Code2: string;
+  /** 主物料分类ID */
+  MainItemCategory_ID: number;
+  /** 主物料分类编码 */
+  MainItemCategory_Code: string;
+  /** 主物料分类名称 */
+  MainItemCategory_Name: string;
+  /** 库存信息ID */
+  InventoryInfo_ID: number;
+  /** 库存信息编码 */
+  InventoryInfo_Code: string;
+  /** 库存信息名称(单位) */
+  InventoryInfo_Name: string;
+  /** 仓库ID */
+  Warehouse_ID: number | null;
+  /** 仓库编码 */
+  Warehouse_Code: string | null;
+  /** 仓库名称 */
+  Warehouse_Name: string | null;
+  /** 销售员ID */
+  Saleser_ID: number | null;
+  /** 销售员编码 */
+  Saleser_CODE: string | null;
+  /** 销售员名称 */
+  Saleser_NAME: string | null;
+  /** 发货仓库ID */
+  ShipmentWarehouse_ID: number | null;
+  /** 发货仓库编码 */
+  ShipmentWarehouse_Code: string | null;
+  /** 发货仓库名称 */
+  ShipmentWarehouse_Name: string | null;
+  /** 创建日期 */
+  createdon: string;
+  /** 修改日期 */
+  ModifiedOn: string;
+}
+
+/**
+ * 销售订单项目列表查询参数接口
+ * @description 基于BaseQueryParams扩展的查询参数
+ */
+export type SalesOrderItemListQueryParams = BaseQueryParams & {
+  /** 物料编码 */
+  itemCode?: string;
+  /** 物料名称 */
+  itemName?: string;
+  /** 组织编码 */
+  orgCode?: string;
+  /** 组织名称 */
+  orgName?: string;
+  /** 主物料分类ID */
+  mainItemCategoryId?: number;
+  /** 仓库ID */
+  warehouseId?: number;
+};
+
+/**
+ * 销售订单项目列表响应接口
+ */
+export type SalesOrderItemListResponse = AxiosResponse<ApiResponseData<PageResult<SalesOrderItemListRecord>>>;