diff --git a/src/api/shop/shopDealerApply/model/index.ts b/src/api/shop/shopDealerApply/model/index.ts index f3ce906..29d8627 100644 --- a/src/api/shop/shopDealerApply/model/index.ts +++ b/src/api/shop/shopDealerApply/model/index.ts @@ -10,14 +10,20 @@ export interface ShopDealerApply { type?: number; // 用户ID userId?: number; + // 昵称 + nickName?: string; // 姓名 realName?: string; // 经销商名称 dealerName?: string; // 手机号 mobile?: string; + // 分销比例 + rate?: number; // 推荐人用户ID refereeId?: number; + // 推荐人姓名 + refereeName?: string; // 申请方式(10需后台审核 20无需审核) applyType?: number; // 申请时间 diff --git a/src/api/shop/shopDealerRecord/index.ts b/src/api/shop/shopDealerRecord/index.ts new file mode 100644 index 0000000..3982d39 --- /dev/null +++ b/src/api/shop/shopDealerRecord/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { ShopDealerRecord, ShopDealerRecordParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询客户跟进情况 + */ +export async function pageShopDealerRecord(params: ShopDealerRecordParam) { + const res = await request.get>>( + MODULES_API_URL + '/shop/shop-dealer-record/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询客户跟进情况列表 + */ +export async function listShopDealerRecord(params?: ShopDealerRecordParam) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-dealer-record', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加客户跟进情况 + */ +export async function addShopDealerRecord(data: ShopDealerRecord) { + const res = await request.post>( + MODULES_API_URL + '/shop/shop-dealer-record', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改客户跟进情况 + */ +export async function updateShopDealerRecord(data: ShopDealerRecord) { + const res = await request.put>( + MODULES_API_URL + '/shop/shop-dealer-record', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除客户跟进情况 + */ +export async function removeShopDealerRecord(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-dealer-record/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除客户跟进情况 + */ +export async function removeBatchShopDealerRecord(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/shop/shop-dealer-record/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询客户跟进情况 + */ +export async function getShopDealerRecord(id: number) { + const res = await request.get>( + MODULES_API_URL + '/shop/shop-dealer-record/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/shop/shopDealerRecord/model/index.ts b/src/api/shop/shopDealerRecord/model/index.ts new file mode 100644 index 0000000..c32e9a7 --- /dev/null +++ b/src/api/shop/shopDealerRecord/model/index.ts @@ -0,0 +1,39 @@ +import type { PageParam } from '@/api'; + +/** + * 客户跟进情况 + */ +export interface ShopDealerRecord { + // ID + id?: number; + // 上级id, 0是顶级 + parentId?: number; + // 客户ID + dealerId?: number; + // 内容 + content?: string; + // 用户ID + userId?: number; + // 排序(数字越小越靠前) + sortNumber?: number; + // 备注 + comments?: string; + // 状态, 0待处理, 1已完成 + status?: number; + // 是否删除, 0否, 1是 + deleted?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; + // 修改时间 + updateTime?: string; +} + +/** + * 客户跟进情况搜索条件 + */ +export interface ShopDealerRecordParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/views/sdy/shopDealerApply/components/search.vue b/src/views/sdy/shopDealerApply/components/search.vue index 58bd4f3..11d042a 100644 --- a/src/views/sdy/shopDealerApply/components/search.vue +++ b/src/views/sdy/shopDealerApply/components/search.vue @@ -17,10 +17,10 @@ /> - + diff --git a/src/views/sdy/shopDealerApply/components/shopDealerApplyEdit.vue b/src/views/sdy/shopDealerApply/components/shopDealerApplyEdit.vue index bad4d1f..f7b93f8 100644 --- a/src/views/sdy/shopDealerApply/components/shopDealerApplyEdit.vue +++ b/src/views/sdy/shopDealerApply/components/shopDealerApplyEdit.vue @@ -5,7 +5,7 @@ :visible="visible" :maskClosable="false" :maxable="maxable" - :title="isUpdate ? '编辑分销商申请' : '新增分销商申请'" + :title="isUpdate ? '编辑客户' : '新增客户'" :body-style="{ paddingBottom: '28px' }" @update:visible="updateVisible" @ok="save" @@ -17,17 +17,65 @@ :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" > - + + - 申请人信息 + 客户信息 - + + + + + + + + + + + + + + + + + + + + + + + + 报备人信息 + + + + + - - + - - - - - - - - @@ -66,11 +104,22 @@ /> + + + + + - 审核信息 + 审核状态 @@ -78,39 +127,25 @@ - 待审核 - 等待审核 + 跟进中 + 正在跟进中 - 审核通过 - 申请通过 + 已签约 + 客户已签约 - 审核驳回 - 申请驳回 + 已取消 + 客户已取消 - - - - - - - - - - - - - - - - + + + + + + 跟进情况 + + + +
+ + + + 新增 + + + 最多可添加10条跟进信息,当前已添加{{ followUpList.length }}条 + + + + +
+ + + +
+ +
+
+ + + 删除 + + +
+
+
+