|
@@ -1,18 +1,20 @@
|
|
|
import React, { useRef } from 'react'
|
|
import React, { useRef } from 'react'
|
|
|
import { Tabs, Button, message } from 'antd'
|
|
import { Tabs, Button, message } from 'antd'
|
|
|
// import SvgIcon from '@/components/SvgIcon'
|
|
// import SvgIcon from '@/components/SvgIcon'
|
|
|
-import Addcontact from '@/pages/customer/Contact/components/AddContact'
|
|
|
|
|
|
|
+import AddContact from '@/pages/customer/Contact/components/AddContact'
|
|
|
import { apiAddClient } from '@/services/contact'
|
|
import { apiAddClient } from '@/services/contact'
|
|
|
import { formatValues } from '@/components/LazyCascader'
|
|
import { formatValues } from '@/components/LazyCascader'
|
|
|
import consts from '@/consts'
|
|
import consts from '@/consts'
|
|
|
|
|
|
|
|
-const CompanyTabList = () => {
|
|
|
|
|
|
|
+const CompanyTabList = ({ initData }) => {
|
|
|
const { TabPane } = Tabs
|
|
const { TabPane } = Tabs
|
|
|
- const tRef = useRef()
|
|
|
|
|
- const initData = () => {
|
|
|
|
|
- tRef.current.reset()
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // const tRef = useRef()
|
|
|
|
|
+ // const initData = () => {
|
|
|
|
|
+ // tRef.current.reset()
|
|
|
|
|
+ // }
|
|
|
const handleAddClient = async values => {
|
|
const handleAddClient = async values => {
|
|
|
|
|
+ // 客户id
|
|
|
|
|
+
|
|
|
const payload = formatValues(values)
|
|
const payload = formatValues(values)
|
|
|
const { code = -1, msg = '新增失败' } = await apiAddClient(payload)
|
|
const { code = -1, msg = '新增失败' } = await apiAddClient(payload)
|
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
@@ -47,7 +49,7 @@ const CompanyTabList = () => {
|
|
|
>
|
|
>
|
|
|
<SvgIcon type="icon-plus" /> 添加联系人
|
|
<SvgIcon type="icon-plus" /> 添加联系人
|
|
|
</Button> */}
|
|
</Button> */}
|
|
|
- <Addcontact onConfirm={handleAddClient} key="addContactBtn" />
|
|
|
|
|
|
|
+ <AddContact onConfirm={handleAddClient} key="addContactBtn" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
)
|
|
)
|