浏览代码

feat(订单): 添加获取用户关联商品接口及类型定义

yz 1 月之前
父节点
当前提交
3b553c6525
共有 2 个文件被更改,包括 79 次插入0 次删除
  1. 13 0
      src/api/order/sales-order.js
  2. 66 0
      src/api/types/order.d.ts

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

@@ -18,9 +18,22 @@ import request from '@/router/axios'
  * @typedef {import('@/api/types/order').SalesOrderItemListResponse} SalesOrderItemListResponse
  * @typedef {import('@/api/types/order').SalesOrderItemFullListQueryParams} SalesOrderItemFullListQueryParams
  * @typedef {import('@/api/types/order').SalesOrderItemFullListResponse} SalesOrderItemFullListResponse
+ * @typedef {import('@/api/types/order').GetUserLinkGoodsResponse} GetUserLinkGoodsResponse
  */
 
 /**
+ * 获取用户关联商品(品牌与库存)
+ * GET /api/blade-factory/api/factory/salesOrder/getUserLinkGoods
+ * @returns {Promise<GetUserLinkGoodsResponse>} 接口响应
+ */
+export const getUserLinkGoods = async () => {
+  return request({
+    url: '/api/blade-factory/api/factory/salesOrder/getUserLinkGoods',
+    method: 'get'
+  })
+}
+
+/**
  * 库存查询(分页)
  * @param {number} current - 当前页码
  * @param {number} size - 每页大小

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

@@ -388,3 +388,69 @@ export type SalesOrderItemFullListQueryParams = Omit<SalesOrderItemListQueryPara
  * @description 返回所有记录的数组,不分页
  */
 export type SalesOrderItemFullListResponse = AxiosResponse<ApiResponseData<SalesOrderItemListRecord[]>>;
+
+// 用户关联商品查询(品牌与库存)
+export interface PjpfBrandDesc {
+  id: string;
+  createUser: string;
+  createDept: string;
+  createTime: string;
+  updateUser: string | null;
+  updateTime: string | null;
+  status: number | null;
+  isDeleted: 0 | 1;
+  tenantId: string;
+  enableOrNot: 0 | 1;
+  cname: string;
+  salesCompanyId: string;
+  salesCompanyName: string;
+  type: string;
+  sort: number;
+  whetherIntegral: string;
+}
+
+export interface PjpfStockDesc {
+  id: string;
+  createUser: string;
+  createDept: string;
+  createTime: string;
+  updateUser: string | null;
+  updateTime: string | null;
+  status: number | null;
+  isDeleted: 0 | 1;
+  tenantId: string;
+  storageId: string;
+  storageName: string;
+  goodsId: string;
+  code: string;
+  cname: string;
+  brandId: string;
+  brandName: string;
+  typeNo: string;
+  brandItem: string;
+  productDescription: string | null;
+  goodsTypeId: string;
+  balanceQuantity: string;
+  balanceQuantityFinancing: string;
+  balanceQuantityHave: string;
+  salesCompanyId: string;
+  salesCompanyName: string;
+  dot: string | null;
+  storeInventory: string;
+  inventoryAmount: string;
+  inventoryCostPrice: string;
+  inventoryAlert: string | null;
+  goodsTypeName: string;
+  version: number;
+  poNo: string | null;
+  cnameInt: string | null;
+  rebatePrice: string;
+  rebateInventoryAmount: string;
+}
+
+export interface UserLinkGoodsData {
+  pjpfBrandDescList: PjpfBrandDesc[];
+  pjpfStockDescList: PjpfStockDesc[];
+}
+
+export type GetUserLinkGoodsResponse = AxiosResponse<ApiResponseData<UserLinkGoodsData>>;