Commit 1a5cf3db4cd81b7c465e3fb6abf4fe2a6b37234c
1 parent
d03a9f2f
筛选添加
Showing
2 changed files
with
12 additions
and
8 deletions
src/pages/crm_new/CluesConnectTargetEffectively/api.ts
1 | 1 | import request from '@/utils/request'; |
2 | 2 | import { CRM_HOST } from '@/utils/host'; |
3 | 3 | |
4 | +interface RequestParams { | |
5 | + keywords?: string | |
6 | +} | |
7 | + | |
4 | 8 | export interface Result { |
5 | 9 | id?: number // 配置id |
6 | 10 | dialAims?: number // 线索接通目标 |
... | ... | @@ -14,8 +18,8 @@ export interface ShopList { |
14 | 18 | } |
15 | 19 | |
16 | 20 | /** 查询线索拨通目标配置列表 */ |
17 | -export function getConfigApi() { | |
18 | - return request.get<Result[]>(`${CRM_HOST}/erp/clue/dial/aims/config/list`); | |
21 | +export function getConfigApi(params: RequestParams) { | |
22 | + return request.get<Result[]>(`${CRM_HOST}/erp/clue/dial/aims/config/list`, {params}); | |
19 | 23 | } |
20 | 24 | |
21 | 25 | /** 查询线索拨通目标已配置的门店 */ | ... | ... |
src/pages/crm_new/CluesConnectTargetEffectively/index.tsx
... | ... | @@ -6,7 +6,7 @@ import store from './store'; |
6 | 6 | import List from './components/List'; |
7 | 7 | import EditModal from './components/EditModal'; |
8 | 8 | import ShopModal from './components/ShopModal'; |
9 | -// import ShopSelectNew from '@/components/ShopSelectNew'; | |
9 | +import ShopSelectNew from '@/components/ShopSelectNew'; | |
10 | 10 | |
11 | 11 | export const { Provider, useStore } = createStore(store); |
12 | 12 | |
... | ... | @@ -15,16 +15,16 @@ function Index() { |
15 | 15 | const [selected, setSelected] = useState<any>([]); |
16 | 16 | |
17 | 17 | function handleOnChange(value: any) { |
18 | - setParams({shopId: value[0]?.value || undefined}, true); | |
18 | + setParams({keywords: value[0]?.label || undefined}, true); | |
19 | 19 | setSelected(value || []); |
20 | 20 | } |
21 | 21 | return ( |
22 | - <PageHeaderWrapper title={<Row align="middle"><span style={{width: "5px", height: "20px", backgroundColor: "#448EF7", borderRadius: "3px", display: 'inline-block', marginRight: "10px"}} /><span>线索有效接通目标</span></Row>}> | |
22 | + <PageHeaderWrapper title={<Row align="middle"><span style={{width: "5px", height: "20px", backgroundColor: "#448EF7", borderRadius: "3px", display: 'inline-block', marginRight: "10px"}} /><span>线索有效接通目标配置</span></Row>}> | |
23 | 23 | <Card> |
24 | - <Row justify="end" style={{ marginBottom: 20 }}> | |
25 | - {/* <Col span={10}> | |
24 | + <Row justify="space-between" style={{ marginBottom: 20 }}> | |
25 | + <Col span={10}> | |
26 | 26 | <ShopSelectNew value={selected} onChange={handleOnChange} defaultOptions={{bizTypes: "1"}} placeholder="请选择门店" /> |
27 | - </Col> */} | |
27 | + </Col> | |
28 | 28 | <Button onClick={() => setCurrent({visible: true, data: {}})} type="primary">新增</Button> |
29 | 29 | </Row> |
30 | 30 | <List /> | ... | ... |