Skip to content

Commit 837dc37

Browse files
committed
udpate(scrm): wecom customer api
1 parent 3670195 commit 837dc37

File tree

3 files changed

+43
-16
lines changed

3 files changed

+43
-16
lines changed

src/api/scrm/wecom/customer/index.ts

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,29 @@
77
*/
88
import axios from 'axios';
99
import { PrefixUriAdmin } from '@/api';
10-
import { UriWeCom } from '../base';
10+
import { UriWeCom, UriWeComUser } from '../base';
1111

1212
/**
1313
* customer
1414
* @description scrm客户管理
1515
*/
1616

17-
export interface UserDepartment {
18-
depId: number;
19-
depName: string;
20-
}
21-
22-
export interface Customers {
23-
list: any[];
17+
export interface WeComCustomer {
18+
name: string;
19+
adderId: number;
20+
addTime: string;
21+
updateTime: string;
22+
addChannel: string;
23+
tagGroupIdList: number[];
24+
tagIdList: number[];
25+
personalTagList: string[];
26+
age: number;
27+
email: string;
28+
phoneNumber: string;
29+
address: string;
30+
birthday: string;
31+
remark: string;
32+
groupChatId: number;
2433
}
2534

2635
export interface GetCustomersRequest {
@@ -31,15 +40,17 @@ export interface GetCustomersRequest {
3140
pageSize?: number;
3241
}
3342

34-
export type GetCustomersReply = Customers;
43+
export interface GetCustomersReply {
44+
list: WeComCustomer[];
45+
}
3546

3647
/**
3748
* customer
3849
* @description 客户列表
3950
*/
4051
export function getCustomers(request: GetCustomersRequest) {
4152
return axios.post<GetCustomersReply>(
42-
`/api/v1/scrm/wechat/wecom/customers/page`,
53+
`${PrefixUriAdmin + UriWeComUser}/page`,
4354
request,
4455
);
4556
}
@@ -50,7 +61,9 @@ export interface GetCustomersGroupsRequest {
5061
limit?: number;
5162
name?: string;
5263
}
53-
export type GetCustomersGroupsReReply = Customers;
64+
export interface GetCustomersGroupsReReply {
65+
list: WeComCustomer[];
66+
}
5467
/**
5568
* customer
5669
* @description 客户群列表

src/views/scrm/wecom/customer-domain/customer/index.module.less

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,19 @@
5858
display: flex;
5959
flex-direction: column;
6060
gap: 16px;
61-
.totalBox{
61+
.navBox{
62+
display: flex;
63+
flex-direction: row;
64+
justify-content: space-between;
65+
align-items: center;
6266
padding-top: 3px;
6367
height: 22px;
6468
float: left;
6569
font-size: 16px;
6670
font-weight: 400;
6771
line-height: 22.4px;
6872
text-align: left;
73+
//border:1px solid red;
6974
color: var(--ww_base_black);
7075
}
7176
}

src/views/scrm/wecom/customer-domain/customer/index.vue

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts" setup>
2-
import { onMounted, reactive, ref, toRaw } from 'vue';
2+
import { onMounted, reactive, ref } from 'vue';
33
import { corpOption } from '@/api/scrm/wecom/tag/corp-tag';
44
import { getCustomers, GetCustomersRequest } from '@/api/scrm/wecom/customer';
55
import useLoadingStore from '@/store/modules/loading';
@@ -126,9 +126,18 @@
126126
</div>
127127
<a-divider />
128128
<div :class="styles.resultBox">
129-
<div :class="styles.totalBox"
130-
>共{{ customersList.list.length }}个客户</div
131-
>
129+
<div :class="styles.navBox">
130+
<span>共{{ customersList.list.length }}个客户</span>
131+
<div class="mr-4">
132+
<a-tooltip content="从企微同步客户">
133+
<a-button>
134+
<template #icon>
135+
<icon-sync />
136+
</template>
137+
</a-button>
138+
</a-tooltip>
139+
</div>
140+
</div>
132141
<a-table :data="customersList.list" column-resizable scrollbar>
133142
<template #columns>
134143
<a-table-column

0 commit comments

Comments
 (0)