Commit 0fddd13da4c4cd66e03b7eb240206330e4d601c8
1 parent
2b89bdf4
暂停区域线索站岗分配资格
Showing
5 changed files
with
175 additions
and
0 deletions
config/routers/crm_new.ts
... | ... | @@ -77,4 +77,8 @@ export default [ |
77 | 77 | path: '/crm/threePartyPlatformClue', // 三方平台线索配置 |
78 | 78 | component: './crm_new/ThreePartyPlatformClue', |
79 | 79 | }, |
80 | + { | |
81 | + path: '/crm/closeClue', // 暂停区域线索站岗分配 | |
82 | + component: './crm_new/Settings/subpages/CloseClue', | |
83 | + }, | |
80 | 84 | ]; |
81 | 85 | \ No newline at end of file | ... | ... |
src/pages/crm_new/Settings/index.tsx
... | ... | @@ -111,6 +111,9 @@ export default function Settings() { |
111 | 111 | |
112 | 112 | {/* 龚昆修改整合:集客跟进,潜客跟进到一个新的页面 */} |
113 | 113 | <div style={{ width: '100%', height: 40 }} /> |
114 | + <List.Item actions={[<a onClick={() => history.push('/crm/closeClue')}>查看</a>]}> | |
115 | + <List.Item.Meta title="暂停区域线索站岗分配资格" /> | |
116 | + </List.Item> | |
114 | 117 | <List.Item actions={[<a onClick={() => history.push('/crm/followUpSettings')}>查看</a>]}> |
115 | 118 | <List.Item.Meta title="跟进设置" /> |
116 | 119 | </List.Item> | ... | ... |
src/pages/crm_new/Settings/subpages/CloseClue/api.ts
0 → 100644
1 | +import request from '@/utils/request'; | |
2 | +import { CRM_HOST } from '@/utils/host'; | |
3 | + | |
4 | +export interface Result { | |
5 | + onlineSaleShopAssignClue?: boolean // 网销门店是否参与区域站岗线索分配 | |
6 | + exclusiveClueConvertRate?: number // 专属线索转化率(示例:90.50%) | |
7 | + stageMinAssignCount?: number // 下阶段每日最低分配线索数量 | |
8 | + dailyMinAssignCount?: number // 每日最低分配线索数量 从20个线索起,当天区域站岗分配线索跟进数每增加10个,低于“判断标准”,暂停当天资格 | |
9 | + increaseCount?: number // 每增加多少个当天区域站岗分配线索跟进数每增加10个,低于“判断标准”,暂停当天资格; | |
10 | +} | |
11 | +/** 查询停止区域线索分配资格设置 */ | |
12 | +export function getInfoApi() { | |
13 | + return request.get<Result>(`${CRM_HOST}/erp/config/find/stop/area/clue/assign/setting`); | |
14 | +} | |
15 | + | |
16 | +/** 新增/修改停止区域线索分配资格设置 */ | |
17 | +export function saveInfoApi(params: Result) { | |
18 | + return request.post(`${CRM_HOST}/erp/config/edit/stop/area/clue/assign/setting`, params); | |
19 | +} | |
0 | 20 | \ No newline at end of file | ... | ... |
src/pages/crm_new/Settings/subpages/CloseClue/index.tsx
0 → 100644
1 | +import React, { useEffect, useState } from 'react'; | |
2 | +import { Button, Card, ConfigProvider, Form, InputNumber, message, Row, Switch, Space } from 'antd'; | |
3 | +import zhCN from 'antd/lib/locale-provider/zh_CN'; | |
4 | +import { PageHeaderWrapper } from '@ant-design/pro-layout'; | |
5 | +import { getInfoApi, saveInfoApi, Result } from './api'; | |
6 | +import './style.less'; | |
7 | +import { history } from 'umi'; | |
8 | + | |
9 | +export default function CollectionFollowSetting() { | |
10 | + const [edit, setEdit] = useState(false); | |
11 | + const [loading, setLoading] = useState<boolean>(true); | |
12 | + const [form] = Form.useForm(); | |
13 | + const [stageMinAssignCount, setStageMinAssignCount] = useState<number>(0); | |
14 | + const [dailyMinAssignCount, setDailyMinAssignCount] = useState<number>(0); | |
15 | + const [increaseCount, setIncreaseCount] = useState<number>(0); | |
16 | + | |
17 | + useEffect(() => { | |
18 | + getInfoApi().then(res => { | |
19 | + if (res.data) { | |
20 | + form.setFieldsValue({...res.data}); | |
21 | + setDailyMinAssignCount(res.data?.dailyMinAssignCount || 0); | |
22 | + setStageMinAssignCount(res.data?.stageMinAssignCount || 0); | |
23 | + setIncreaseCount(res.data?.increaseCount || 0); | |
24 | + } | |
25 | + setLoading(false); | |
26 | + }).catch(error => { | |
27 | + message.error(error.message); | |
28 | + setLoading(false); | |
29 | + }); | |
30 | + }, []); | |
31 | + | |
32 | + const onOk = async () => { | |
33 | + const params: any = await form.validateFields(); | |
34 | + const _params: Result = { | |
35 | + exclusiveClueConvertRate: params.exclusiveClueConvertRate, | |
36 | + stageMinAssignCount, | |
37 | + dailyMinAssignCount, | |
38 | + increaseCount, | |
39 | + onlineSaleShopAssignClue: params.onlineSaleShopAssignClue, | |
40 | + }; | |
41 | + setLoading(true); | |
42 | + saveInfoApi(_params).then(res => { | |
43 | + message.success(res.result); | |
44 | + setEdit(false); | |
45 | + setLoading(false); | |
46 | + }).catch(error => { | |
47 | + message.error(error.message); | |
48 | + setLoading(false); | |
49 | + }); | |
50 | + }; | |
51 | + | |
52 | + return ( | |
53 | + <PageHeaderWrapper title="暂停区域线索站岗分配资格"> | |
54 | + <ConfigProvider locale={zhCN}> | |
55 | + <Card bordered={false} loading={loading}> | |
56 | + {/* <Spin> */} | |
57 | + <Form | |
58 | + labelCol={{ span: 8 }} | |
59 | + wrapperCol={{ span: 16 }} | |
60 | + form={form} | |
61 | + > | |
62 | + <Form.Item label="判断标准" name="exclusiveClueConvertRate" labelAlign="right" rules={[{ required: true, message: '请输入' }]}> | |
63 | + <InputNumber | |
64 | + style={{width: '100%'}} | |
65 | + controls={false} | |
66 | + min={0} | |
67 | + max={100} | |
68 | + formatter={value => `${value}%`} | |
69 | + precision={2} | |
70 | + disabled={!edit} | |
71 | + parser={value => value?.replace('%', '')} | |
72 | + /> | |
73 | + </Form.Item> | |
74 | + | |
75 | + <Form.Item label=" " name="stageMinAssignCount" colon={false} labelAlign="right"> | |
76 | + <span>{`(1)每阶段滚动判定,低于"判断标准",下一阶段线索每日仅分配`}</span> | |
77 | + <InputNumber | |
78 | + controls={false} | |
79 | + min={0} | |
80 | + disabled={!edit} | |
81 | + value={stageMinAssignCount} | |
82 | + onChange={(e) => setStageMinAssignCount(e || 0)} | |
83 | + formatter={value => `${value}个`} | |
84 | + precision={0} | |
85 | + parser={value => value?.replace('个', '')} | |
86 | + /> | |
87 | + <span>(最低要求);</span> | |
88 | + <span>阶段:1~10号;11~20号;21~月末</span> | |
89 | + </Form.Item> | |
90 | + | |
91 | + <Form.Item className="feewee-settings-form-closeClue" label=" " colon={false}> | |
92 | + <Form.Item colon={false} name="dailyMinAssignCount"> | |
93 | + <span>(2)从</span> | |
94 | + <InputNumber | |
95 | + controls={false} | |
96 | + value={dailyMinAssignCount} | |
97 | + onChange={(e) => setDailyMinAssignCount(e || 0)} | |
98 | + min={0} | |
99 | + disabled={!edit} | |
100 | + formatter={value => `${value}个`} | |
101 | + precision={0} | |
102 | + parser={value => value?.replace('个', '')} | |
103 | + /> | |
104 | + </Form.Item> | |
105 | + <Form.Item colon={false} name="increaseCount"> | |
106 | + <span>线索起,当天区域站岗分配线索跟进数每增加</span> | |
107 | + <InputNumber | |
108 | + controls={false} | |
109 | + min={0} | |
110 | + value={increaseCount} | |
111 | + onChange={(e) => setIncreaseCount(e || 0)} | |
112 | + formatter={value => `${value}个`} | |
113 | + precision={0} | |
114 | + disabled={!edit} | |
115 | + parser={value => value?.replace('个', '')} | |
116 | + /> | |
117 | + <span>低于{`"判断标准"`},暂停当天资格;</span> | |
118 | + </Form.Item> | |
119 | + </Form.Item> | |
120 | + <Form.Item label="网销门店是否参与区域线索站岗分配" name="onlineSaleShopAssignClue" labelAlign="right"> | |
121 | + <Switch | |
122 | + checkedChildren="是" | |
123 | + unCheckedChildren="否" | |
124 | + size="default" | |
125 | + /> | |
126 | + </Form.Item> | |
127 | + | |
128 | + </Form> | |
129 | + <Row justify="space-around" align="middle"> | |
130 | + <Space> | |
131 | + <Button type="default" onClick={() => setEdit(true)}>编辑</Button> | |
132 | + <Button type="primary" onClick={() => onOk()}>确认</Button> | |
133 | + <Button type="link" onClick={() => { history.goBack(); }}>返回上一级</Button> | |
134 | + </Space> | |
135 | + </Row> | |
136 | + {/* </Spin> */} | |
137 | + </Card> | |
138 | + </ConfigProvider> | |
139 | + </PageHeaderWrapper> | |
140 | + ); | |
141 | +} | |
0 | 142 | \ No newline at end of file | ... | ... |
src/pages/crm_new/Settings/subpages/CloseClue/style.less
0 → 100644