hurx 1 mese fa
parent
commit
68de33b55e

+ 75 - 0
src/api/company/warehouse/index.ts

@@ -0,0 +1,75 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { WarehouseVO, WarehouseForm, WarehouseQuery } from '@/api/company/warehouse/types';
+
+/**
+ * 查询仓库信息列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listWarehouse = (query?: WarehouseQuery): AxiosPromise<WarehouseVO[]> => {
+  return request({
+    url: '/system/warehouse/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询仓库信息详细
+ * @param id
+ */
+export const getWarehouse = (id: string | number): AxiosPromise<WarehouseVO> => {
+  return request({
+    url: '/system/warehouse/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增仓库信息
+ * @param data
+ */
+export const addWarehouse = (data: WarehouseForm) => {
+  return request({
+    url: '/system/warehouse',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改仓库信息
+ * @param data
+ */
+export const updateWarehouse = (data: WarehouseForm) => {
+  return request({
+    url: '/system/warehouse',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除仓库信息
+ * @param id
+ */
+export const delWarehouse = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/warehouse/' + id,
+    method: 'delete'
+  });
+};
+
+export function changeStatus(id: string | number, isShow: string) {
+  const data = {
+    id,
+    isShow
+  };
+  return request({
+    url: '/system/warehouse/changeStatus',
+    method: 'put',
+    data: data
+  });
+}

+ 380 - 0
src/api/company/warehouse/types.ts

@@ -0,0 +1,380 @@
+export interface WarehouseVO {
+  /**
+   * 主键ID
+   */
+  id: string | number;
+
+  /**
+   * 仓库编码
+   */
+  warehouseCode: string;
+
+  /**
+   * 仓库名称
+   */
+  warehouseName: string;
+
+  /**
+   * 库存状态
+   */
+  stkStu: string;
+
+  /**
+   * 所属公司
+   */
+  companyId: string | number;
+
+  /**
+   * 省份
+   */
+  province: string;
+
+  /**
+   * 城市
+   */
+  city: string;
+
+  /**
+   * 区/县
+   */
+  district: string;
+
+  /**
+   * 省市区
+   */
+  provinceCityDistrict: string;
+
+  /**
+   * 仓库类型
+   */
+  warehouseType: string;
+
+  /**
+   * 仓库功能
+   */
+  warehouseFunction: string;
+
+  /**
+   * 是否支持发货
+   */
+  isShip: string;
+
+  /**
+   * 是否支持退货
+   */
+  isReturn: string;
+
+  /**
+   * 是否默认仓库
+   */
+  isDefault: string;
+
+  /**
+   * 是否前台展示
+   */
+  isShow: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 联系人姓名
+   */
+  contacts: string;
+
+  /**
+   * 手机号
+   */
+  mobile: string;
+
+  /**
+   * 固定电话
+   */
+  phone: string;
+
+  /**
+   * 详细地址
+   */
+  address: string;
+
+  /**
+   * 邮政编码
+   */
+  zipCode: string;
+
+  /**
+   * 最大配送时效(天)
+   */
+  maxLeadTime: number;
+
+  /**
+   * 最小配送时效(天)
+   */
+  minLeadTime: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface WarehouseForm extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id?: string | number;
+
+  /**
+   * 仓库编码
+   */
+  warehouseCode?: string;
+
+  /**
+   * 仓库名称
+   */
+  warehouseName?: string;
+
+  /**
+   * 库存状态
+   */
+  stkStu?: string;
+
+  /**
+   * 所属公司
+   */
+  companyId?: string | number;
+
+  /**
+   * 省份
+   */
+  province?: string;
+
+  /**
+   * 城市
+   */
+  city?: string;
+
+  /**
+   * 区/县
+   */
+  district?: string;
+
+  /**
+   * 省市区
+   */
+  provinceCityDistrict?: string;
+
+  /**
+   * 仓库类型
+   */
+  warehouseType?: string;
+
+  /**
+   * 仓库功能
+   */
+  warehouseFunction?: string;
+
+  /**
+   * 是否支持发货
+   */
+  isShip?: string;
+
+  /**
+   * 是否支持退货
+   */
+  isReturn?: string;
+
+  /**
+   * 是否默认仓库
+   */
+  isDefault?: string;
+
+  /**
+   * 是否前台展示
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 联系人姓名
+   */
+  contacts?: string;
+
+  /**
+   * 手机号
+   */
+  mobile?: string;
+
+  /**
+   * 固定电话
+   */
+  phone?: string;
+
+  /**
+   * 详细地址
+   */
+  address?: string;
+
+  /**
+   * 邮政编码
+   */
+  zipCode?: string;
+
+  /**
+   * 最大配送时效(天)
+   */
+  maxLeadTime?: number;
+
+  /**
+   * 最小配送时效(天)
+   */
+  minLeadTime?: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface WarehouseQuery extends PageQuery {
+  /**
+   * 仓库编码
+   */
+  warehouseCode?: string;
+
+  /**
+   * 仓库名称
+   */
+  warehouseName?: string;
+
+  /**
+   * 库存状态
+   */
+  stkStu?: string;
+
+  /**
+   * 所属公司
+   */
+  companyId?: string | number;
+
+  /**
+   * 省份
+   */
+  province?: string;
+
+  /**
+   * 城市
+   */
+  city?: string;
+
+  /**
+   * 区/县
+   */
+  district?: string;
+
+  /**
+   * 省市区
+   */
+  provinceCityDistrict?: string;
+
+  /**
+   * 仓库类型
+   */
+  warehouseType?: string;
+
+  /**
+   * 仓库功能
+   */
+  warehouseFunction?: string;
+
+  /**
+   * 是否支持发货
+   */
+  isShip?: string;
+
+  /**
+   * 是否支持退货
+   */
+  isReturn?: string;
+
+  /**
+   * 是否默认仓库
+   */
+  isDefault?: string;
+
+  /**
+   * 是否前台展示
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 联系人姓名
+   */
+  contacts?: string;
+
+  /**
+   * 手机号
+   */
+  mobile?: string;
+
+  /**
+   * 固定电话
+   */
+  phone?: string;
+
+  /**
+   * 详细地址
+   */
+  address?: string;
+
+  /**
+   * 邮政编码
+   */
+  zipCode?: string;
+
+  /**
+   * 最大配送时效(天)
+   */
+  maxLeadTime?: number;
+
+  /**
+   * 最小配送时效(天)
+   */
+  minLeadTime?: number;
+
+  /**
+   * 状态(0正常 1停用)
+   */
+  status?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}

+ 75 - 0
src/api/customer/invoiceType/index.ts

@@ -0,0 +1,75 @@
+import request from '@/utils/request';
+import { AxiosPromise } from 'axios';
+import { InvoiceTypeVO, InvoiceTypeForm, InvoiceTypeQuery } from '@/api/customer/invoiceType/types';
+
+/**
+ * 查询发票类型列表
+ * @param query
+ * @returns {*}
+ */
+
+export const listInvoiceType = (query?: InvoiceTypeQuery): AxiosPromise<InvoiceTypeVO[]> => {
+  return request({
+    url: '/system/invoiceType/list',
+    method: 'get',
+    params: query
+  });
+};
+
+/**
+ * 查询发票类型详细
+ * @param id
+ */
+export const getInvoiceType = (id: string | number): AxiosPromise<InvoiceTypeVO> => {
+  return request({
+    url: '/system/invoiceType/' + id,
+    method: 'get'
+  });
+};
+
+/**
+ * 新增发票类型
+ * @param data
+ */
+export const addInvoiceType = (data: InvoiceTypeForm) => {
+  return request({
+    url: '/system/invoiceType',
+    method: 'post',
+    data: data
+  });
+};
+
+/**
+ * 修改发票类型
+ * @param data
+ */
+export const updateInvoiceType = (data: InvoiceTypeForm) => {
+  return request({
+    url: '/system/invoiceType',
+    method: 'put',
+    data: data
+  });
+};
+
+/**
+ * 删除发票类型
+ * @param id
+ */
+export const delInvoiceType = (id: string | number | Array<string | number>) => {
+  return request({
+    url: '/system/invoiceType/' + id,
+    method: 'delete'
+  });
+};
+
+export function changeShowStatus(id: string | number, isShow: string) {
+  const data = {
+    id,
+    isShow
+  };
+  return request({
+    url: '/system/invoiceType/changeStatus',
+    method: 'put',
+    data: data
+  });
+}

+ 95 - 0
src/api/customer/invoiceType/types.ts

@@ -0,0 +1,95 @@
+export interface InvoiceTypeVO {
+  /**
+   * ID
+   */
+  id: string | number;
+
+  /**
+   * 发票类型编号
+   */
+  invoiceTypeNo: string;
+
+  /**
+   * 发票类型名称
+   */
+  invoiceTypeName: string;
+
+  /**
+   * 是否显示:0-显示,1-隐藏
+   */
+  isShow: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource: string;
+
+  /**
+   * 备注
+   */
+  remark: string;
+}
+
+export interface InvoiceTypeForm extends BaseEntity {
+  /**
+   * ID
+   */
+  id?: string | number;
+
+  /**
+   * 发票类型编号
+   */
+  invoiceTypeNo?: string;
+
+  /**
+   * 发票类型名称
+   */
+  invoiceTypeName?: string;
+
+  /**
+   * 是否显示:0-显示,1-隐藏
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 备注
+   */
+  remark?: string;
+}
+
+export interface InvoiceTypeQuery extends PageQuery {
+  /**
+   * 发票类型编号
+   */
+  invoiceTypeNo?: string;
+
+  /**
+   * 发票类型名称
+   */
+  invoiceTypeName?: string;
+
+  /**
+   * 是否显示:0-显示,1-隐藏
+   */
+  isShow?: string;
+
+  /**
+   * 数据来源
+   */
+  dataSource?: string;
+
+  /**
+   * 平台标识
+   */
+  platformCode?: string;
+
+  /**
+   * 日期范围参数
+   */
+  params?: any;
+}