فهرست منبع

feat(api): 添加产品管理相关API接口

- 新增产品分类关联API接口实现
- 新增产品黑名单管理API接口实现
- 新增产品池关联管理API接口实现
- 新增产品价格库存管理API接口实现
- 新增产品方案管理API接口实现
- 新增产品推荐关联API接口实现
- 新增产品规格关联API接口实现
- 新增产品税率配置API接口实现
- 新增产品单位管理API接口实现
- 定义各类API的数据传输对象类型
Lijingyang 1 ماه پیش
والد
کامیت
ec5b590cdb

+ 63 - 0
src/api/product/associate/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { AssociateVO, AssociateForm, AssociateQuery } from '@/api/product/associate/types';
+
+/**
+ * 查询产品关联列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listAssociate = (query?: AssociateQuery): AxiosPromise<AssociateVO[]> => {
+  return request({
+    url: '/product/associate/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询产品关联详细
+ * @param id
+ */
+export const getAssociate = (id: string | number): AxiosPromise<AssociateVO> => {
+  return request({
+    url: '/product/associate/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增产品关联
+ * @param data
+ */
+export const addAssociate = (data: AssociateForm) => {
+  return request({
+    url: '/product/associate',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改产品关联
+ * @param data
+ */
+export const updateAssociate = (data: AssociateForm) => {
+  return request({
+    url: '/product/associate',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除产品关联
+ * @param id
+ */
+export const delAssociate = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/product/associate/' + id,
+    method: 'delete'
+  });
+};

+ 101 - 0
src/api/product/associate/types.ts

@@ -0,0 +1,101 @@
+export interface AssociateVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 主产品id
+   */
+  productId: string | number;
+
+  /**
+   * 关联产品编号列表(如:用逗号分隔的产品编号)
+   */
+  productIds: string | number;
+
+  /**
+   * 是否单向关联:0=双向,1=单向
+   */
+  isUnidirectional: string | number;
+
+  /**
+   * 关联标题/展示名称
+   */
+  relatedTitle: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+}
+
+export interface AssociateForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 主产品id
+   */
+  productId?: string | number;
+
+  /**
+   * 关联产品编号列表(如:用逗号分隔的产品编号)
+   */
+  productIds?: string | number;
+
+  /**
+   * 是否单向关联:0=双向,1=单向
+   */
+  isUnidirectional?: string | number;
+
+  /**
+   * 关联标题/展示名称
+   */
+  relatedTitle?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+}
+
+export interface AssociateQuery extends PageQuery {
+
+  /**
+   * 主产品id
+   */
+  productId?: string | number;
+
+  /**
+   * 关联产品编号列表(如:用逗号分隔的产品编号)
+   */
+  productIds?: string | number;
+
+  /**
+   * 是否单向关联:0=双向,1=单向
+   */
+  isUnidirectional?: string | number;
+
+  /**
+   * 关联标题/展示名称
+   */
+  relatedTitle?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 63 - 0
src/api/product/classification/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ClassificationVO, ClassificationForm, ClassificationQuery } from '@/api/product/classification/types';
+
+/**
+ * 查询产品属性关联列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listClassification = (query?: ClassificationQuery): AxiosPromise<ClassificationVO[]> => {
+  return request({
+    url: '/product/classification/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询产品属性关联详细
+ * @param id
+ */
+export const getClassification = (id: string | number): AxiosPromise<ClassificationVO> => {
+  return request({
+    url: '/product/classification/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增产品属性关联
+ * @param data
+ */
+export const addClassification = (data: ClassificationForm) => {
+  return request({
+    url: '/product/classification',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改产品属性关联
+ * @param data
+ */
+export const updateClassification = (data: ClassificationForm) => {
+  return request({
+    url: '/product/classification',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除产品属性关联
+ * @param id
+ */
+export const delClassification = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/product/classification/' + id,
+    method: 'delete'
+  });
+};

+ 86 - 0
src/api/product/classification/types.ts

@@ -0,0 +1,86 @@
+export interface ClassificationVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 产品id
+   */
+  productId: string | number;
+
+  /**
+   * 分类编号
+   */
+  categoryId: string | number;
+
+  /**
+   * 属性列表(JSON或分号分隔等格式)
+   */
+  attributesList: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+}
+
+export interface ClassificationForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 产品id
+   */
+  productId?: string | number;
+
+  /**
+   * 分类编号
+   */
+  categoryId?: string | number;
+
+  /**
+   * 属性列表(JSON或分号分隔等格式)
+   */
+  attributesList?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+}
+
+export interface ClassificationQuery extends PageQuery {
+
+  /**
+   * 产品id
+   */
+  productId?: string | number;
+
+  /**
+   * 分类编号
+   */
+  categoryId?: string | number;
+
+  /**
+   * 属性列表(JSON或分号分隔等格式)
+   */
+  attributesList?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 63 - 0
src/api/product/contracproduct/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { ContracproductVO, ContracproductForm, ContracproductQuery } from '@/api/product/contracproduct/types';
+
+/**
+ * 查询合同产品关联列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listContracproduct = (query?: ContracproductQuery): AxiosPromise<ContracproductVO[]> => {
+  return request({
+    url: '/product/contracproduct/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询合同产品关联详细
+ * @param id
+ */
+export const getContracproduct = (id: string | number): AxiosPromise<ContracproductVO> => {
+  return request({
+    url: '/product/contracproduct/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增合同产品关联
+ * @param data
+ */
+export const addContracproduct = (data: ContracproductForm) => {
+  return request({
+    url: '/product/contracproduct',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改合同产品关联
+ * @param data
+ */
+export const updateContracproduct = (data: ContracproductForm) => {
+  return request({
+    url: '/product/contracproduct',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除合同产品关联
+ * @param id
+ */
+export const delContracproduct = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/product/contracproduct/' + id,
+    method: 'delete'
+  });
+};

+ 146 - 0
src/api/product/contracproduct/types.ts

@@ -0,0 +1,146 @@
+export interface ContracproductVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 合同供货编号
+   */
+  contractSupplyNo: string;
+
+  /**
+   * 产品编号
+   */
+  productNo: string;
+
+  /**
+   * 产品id
+   */
+  productId: string | number;
+
+  /**
+   * 供货周期(单位:天/月,根据业务定义)
+   */
+  supplyCycle: number;
+
+  /**
+   * 库存属性
+   */
+  inventoryProperties: string;
+
+  /**
+   * 最小供货量
+   */
+  minSupply: number;
+
+  /**
+   * 报价(支持大文本)
+   */
+  offerPrice: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+}
+
+export interface ContracproductForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 合同供货编号
+   */
+  contractSupplyNo?: string;
+
+  /**
+   * 产品编号
+   */
+  productNo?: string;
+
+  /**
+   * 产品id
+   */
+  productId?: string | number;
+
+  /**
+   * 供货周期(单位:天/月,根据业务定义)
+   */
+  supplyCycle?: number;
+
+  /**
+   * 库存属性
+   */
+  inventoryProperties?: string;
+
+  /**
+   * 最小供货量
+   */
+  minSupply?: number;
+
+  /**
+   * 报价(支持大文本)
+   */
+  offerPrice?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+}
+
+export interface ContracproductQuery extends PageQuery {
+
+  /**
+   * 合同供货编号
+   */
+  contractSupplyNo?: string;
+
+  /**
+   * 产品编号
+   */
+  productNo?: string;
+
+  /**
+   * 产品id
+   */
+  productId?: string | number;
+
+  /**
+   * 供货周期(单位:天/月,根据业务定义)
+   */
+  supplyCycle?: number;
+
+  /**
+   * 库存属性
+   */
+  inventoryProperties?: string;
+
+  /**
+   * 最小供货量
+   */
+  minSupply?: number;
+
+  /**
+   * 报价(支持大文本)
+   */
+  offerPrice?: string;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+

+ 63 - 0
src/api/product/customization/index.ts

@@ -0,0 +1,63 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { CustomizationVO, CustomizationForm, CustomizationQuery } from '@/api/product/customization/types';
+
+/**
+ * 查询产品定制信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listCustomization = (query?: CustomizationQuery): AxiosPromise<CustomizationVO[]> => {
+  return request({
+    url: '/product/customization/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询产品定制信息详细
+ * @param id
+ */
+export const getCustomization = (id: string | number): AxiosPromise<CustomizationVO> => {
+  return request({
+    url: '/product/customization/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增产品定制信息
+ * @param data
+ */
+export const addCustomization = (data: CustomizationForm) => {
+  return request({
+    url: '/product/customization',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改产品定制信息
+ * @param data
+ */
+export const updateCustomization = (data: CustomizationForm) => {
+  return request({
+    url: '/product/customization',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除产品定制信息
+ * @param id
+ */
+export const delCustomization = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/product/customization/' + id,
+    method: 'delete'
+  });
+};

+ 161 - 0
src/api/product/customization/types.ts

@@ -0,0 +1,161 @@
+export interface CustomizationVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 定制编号
+   */
+  customizationNo: string;
+
+  /**
+   * 产品id
+   */
+  productId: string | number;
+
+  /**
+   * 定制方式  支持多选,分隔  (0=包装定制,1=商品定制,2=开模定制)
+   */
+  customizedStyle: string;
+
+  /**
+   * 定制工艺  支持多选,分隔  (0=丝印,1=热转印,2=激光,烤花,压印)
+   */
+  customizedCraft: string;
+
+  /**
+   * 打样周期(天)
+   */
+  proofingPeriod: number;
+
+  /**
+   * 生产周期(天)
+   */
+  productionCycle: number;
+
+  /**
+   * 最小起订量(MOQ)
+   */
+  moq: number;
+
+  /**
+   * MOQ对应价格
+   */
+  moqPrice: number;
+
+  /**
+   * 备注
+   */
+  remark: string;
+
+}
+
+export interface CustomizationForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 定制编号
+   */
+  customizationNo?: string;
+
+  /**
+   * 产品id
+   */
+  productId?: string | number;
+
+  /**
+   * 定制方式  支持多选,分隔  (0=包装定制,1=商品定制,2=开模定制)
+   */
+  customizedStyle?: string;
+
+  /**
+   * 定制工艺  支持多选,分隔  (0=丝印,1=热转印,2=激光,烤花,压印)
+   */
+  customizedCraft?: string;
+
+  /**
+   * 打样周期(天)
+   */
+  proofingPeriod?: number;
+
+  /**
+   * 生产周期(天)
+   */
+  productionCycle?: number;
+
+  /**
+   * 最小起订量(MOQ)
+   */
+  moq?: number;
+
+  /**
+   * MOQ对应价格
+   */
+  moqPrice?: number;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+
+}
+
+export interface CustomizationQuery extends PageQuery {
+
+  /**
+   * 定制编号
+   */
+  customizationNo?: string;
+
+  /**
+   * 产品id
+   */
+  productId?: string | number;
+
+  /**
+   * 定制方式  支持多选,分隔  (0=包装定制,1=商品定制,2=开模定制)
+   */
+  customizedStyle?: string;
+
+  /**
+   * 定制工艺  支持多选,分隔  (0=丝印,1=热转印,2=激光,烤花,压印)
+   */
+  customizedCraft?: string;
+
+  /**
+   * 打样周期(天)
+   */
+  proofingPeriod?: number;
+
+  /**
+   * 生产周期(天)
+   */
+  productionCycle?: number;
+
+  /**
+   * 最小起订量(MOQ)
+   */
+  moq?: number;
+
+  /**
+   * MOQ对应价格
+   */
+  moqPrice?: number;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+    /**
+     * 日期范围参数
+     */
+    params?: any;
+}
+
+
+