From 64434a466e8422f6c08d2b65d1fcaee8e755080a Mon Sep 17 00:00:00 2001 From: dataprince Date: Wed, 31 Jan 2024 15:42:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90=E6=94=AF?= =?UTF-8?q?=E6=8C=81:=E4=B8=BB=E5=AD=90=E8=A1=A8=EF=BC=88element-ts?= =?UTF-8?q?=E7=89=88=E6=9C=AC=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mf/customer/index.ts | 63 ++++++ src/api/mf/customer/types.ts | 119 ++++++++++ src/views/mf/customer/index.vue | 385 ++++++++++++++++++++++++++++++++ 3 files changed, 567 insertions(+) create mode 100644 src/api/mf/customer/index.ts create mode 100644 src/api/mf/customer/types.ts create mode 100644 src/views/mf/customer/index.vue diff --git a/src/api/mf/customer/index.ts b/src/api/mf/customer/index.ts new file mode 100644 index 0000000..07db2dd --- /dev/null +++ b/src/api/mf/customer/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { CustomerVO, CustomerForm, CustomerQuery } from '@/api/mf/customer/types'; + +/** + * 查询客户主表列表 + * @param query + * @returns {*} + */ + +export const listCustomer = (query?: CustomerQuery): AxiosPromise => { + return request({ + url: '/mf/customer/list', + method: 'get', + params: query + }); +}; + +/** + * 查询客户主表详细 + * @param customerId + */ +export const getCustomer = (customerId: string | number): AxiosPromise => { + return request({ + url: '/mf/customer/' + customerId, + method: 'get' + }); +}; + +/** + * 新增客户主表 + * @param data + */ +export const addCustomer = (data: CustomerForm) => { + return request({ + url: '/mf/customer', + method: 'post', + data: data + }); +}; + +/** + * 修改客户主表 + * @param data + */ +export const updateCustomer = (data: CustomerForm) => { + return request({ + url: '/mf/customer', + method: 'put', + data: data + }); +}; + +/** + * 删除客户主表 + * @param customerId + */ +export const delCustomer = (customerId: string | number | Array) => { + return request({ + url: '/mf/customer/' + customerId, + method: 'delete' + }); +}; diff --git a/src/api/mf/customer/types.ts b/src/api/mf/customer/types.ts new file mode 100644 index 0000000..f5db02c --- /dev/null +++ b/src/api/mf/customer/types.ts @@ -0,0 +1,119 @@ +export interface CustomerVO extends BaseEntity { + /** + * 客户姓名 + */ + customerName: string; + + /** + * 手机号码 + */ + phonenumber: string; + + /** + * 客户性别 + */ + gender: string; + + /** + * 客户生日 + */ + birthday: string; + + /** 商品子表信息 */ + goodsList: Array; +} + +export interface GoodsVO extends BaseEntity { + /** 列表序号 */ + index:number; + /** + * 商品名称 + */ + name: string; + + /** + * 商品重量 + */ + weight: number; + + /** + * 商品价格 + */ + price: number; + + /** + * 商品时间 + */ + date: string; + + /** + * 商品种类 + */ + type: string; + + /** + * 乐观锁 + */ + version: number; + +} + +export interface CustomerForm { + /** + * 客户id + */ + customerId?: string | number; + + /** + * 客户姓名 + */ + customerName?: string; + + /** + * 手机号码 + */ + phonenumber?: string; + + /** + * 客户性别 + */ + gender?: string; + + /** + * 客户生日 + */ + birthday?: string; + + /** + * 客户描述 + */ + remark?: string; + + /** + * 乐观锁 + */ + version?: number; + +} + +export interface CustomerQuery extends PageQuery { + /** + * 客户姓名 + */ + customerName?: string; + + /** + * 手机号码 + */ + phonenumber?: string; + + /** + * 客户性别 + */ + gender?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/views/mf/customer/index.vue b/src/views/mf/customer/index.vue new file mode 100644 index 0000000..3458187 --- /dev/null +++ b/src/views/mf/customer/index.vue @@ -0,0 +1,385 @@ + + +