|
|
@@ -1,41 +1,41 @@
|
|
|
import { message, Tabs } from 'antd'
|
|
|
-import React, { useEffect, useState, useRef } from 'react'
|
|
|
+import React, { useEffect, useState } from 'react'
|
|
|
import consts from '@/consts'
|
|
|
-import { apiAddService } from '@/services/customer'
|
|
|
-import AddRecord from './Record'
|
|
|
+import { apiAddBusiService } from '@/services/customer'
|
|
|
import { useDispatch } from 'dva'
|
|
|
-import ProTable from '@ant-design/pro-table'
|
|
|
+// import ProTable from '@ant-design/pro-table'
|
|
|
+import AddRecord from '@/pages/Customer/Contact/components/ContactDetail/AddRecord'
|
|
|
|
|
|
-const ContanctTabList = ({ clientId, software }) => {
|
|
|
+const ContanctTabList = ({ businessId }) => {
|
|
|
const dispatch = useDispatch()
|
|
|
const [state, setState] = useState({
|
|
|
params: {},
|
|
|
visible: false
|
|
|
})
|
|
|
- const tRef = useRef()
|
|
|
- const columns = [
|
|
|
- {
|
|
|
- dataIndex: 'index',
|
|
|
- valueType: 'indexBorder',
|
|
|
- width: 48
|
|
|
- },
|
|
|
- {
|
|
|
- title: '姓名',
|
|
|
- dataIndex: 'name'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '昵称',
|
|
|
- dataIndex: 'nickname'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '手机',
|
|
|
- dataIndex: 'mobile'
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'QQ',
|
|
|
- dataIndex: 'qq'
|
|
|
- }
|
|
|
- ]
|
|
|
+ // const tRef = useRef()
|
|
|
+ // const columns = [
|
|
|
+ // {
|
|
|
+ // dataIndex: 'index',
|
|
|
+ // valueType: 'indexBorder',
|
|
|
+ // width: 48
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: '姓名',
|
|
|
+ // dataIndex: 'name'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: '昵称',
|
|
|
+ // dataIndex: 'nickname'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: '手机',
|
|
|
+ // dataIndex: 'mobile'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: 'QQ',
|
|
|
+ // dataIndex: 'qq'
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
const [addService, setAddService] = useState({
|
|
|
visible: false,
|
|
|
loading: false
|
|
|
@@ -43,7 +43,7 @@ const ContanctTabList = ({ clientId, software }) => {
|
|
|
|
|
|
const handleAddService = async values => {
|
|
|
setAddService({ ...addService, loading: true })
|
|
|
- const { code = -1 } = await apiAddService({ ...values, clientId })
|
|
|
+ const { code = -1 } = await apiAddBusiService({ ...values, businessId })
|
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
|
message.success('新增成功')
|
|
|
setState({ ...state, data: values })
|
|
|
@@ -58,26 +58,16 @@ const ContanctTabList = ({ clientId, software }) => {
|
|
|
// await initData()
|
|
|
}
|
|
|
useEffect(() => {
|
|
|
- setState({ ...state, params: { ...state.params, clientId } })
|
|
|
- }, [clientId])
|
|
|
+ setState({ ...state, params: { ...state.params, businessId } })
|
|
|
+ }, [businessId])
|
|
|
const { TabPane } = Tabs
|
|
|
return (
|
|
|
<div>
|
|
|
- <div className="zh-pd-left-15">
|
|
|
- {/* <Tabs onChange={callback} type="card"> */}
|
|
|
+ <div className="pl-15px">
|
|
|
<Tabs>
|
|
|
- {/* <TabPane tab="养护云造价" key="养护云造价">
|
|
|
- <div className="sheet-right-panel">
|
|
|
- 养护云造价
|
|
|
- <Table columns={curingcolumns} dataSource={curinglist} pagination={false} />
|
|
|
- </div>
|
|
|
- </TabPane>
|
|
|
- <TabPane tab="大司空云计价" key="大司空云计价">
|
|
|
- <div className="sheet-right-panel">大司空云计价</div>
|
|
|
- </TabPane> */}
|
|
|
<TabPane tab="联系人" key="1">
|
|
|
<div className="sheet-right-panel">
|
|
|
- <ProTable
|
|
|
+ {/* <ProTable
|
|
|
columns={columns}
|
|
|
search={false}
|
|
|
toolBarRender={false}
|
|
|
@@ -86,7 +76,7 @@ const ContanctTabList = ({ clientId, software }) => {
|
|
|
rowKey={record => record.id}
|
|
|
dataSource={software.longle}
|
|
|
pagination={false}
|
|
|
- />
|
|
|
+ /> */}
|
|
|
</div>
|
|
|
</TabPane>
|
|
|
<TabPane tab="发票" key="2">
|
|
|
@@ -94,10 +84,7 @@ const ContanctTabList = ({ clientId, software }) => {
|
|
|
</TabPane>
|
|
|
</Tabs>
|
|
|
</div>
|
|
|
- <div className="sheet-btns zh-pd-left-15 zh-pd-top-15">
|
|
|
- {/* <Button type="primary" ghost>
|
|
|
- <SvgIcon type="icon-link" /> 绑定加密锁
|
|
|
- </Button> */}
|
|
|
+ <div className="sheet-btns pl-15px pt-15px">
|
|
|
<AddRecord onConfirm={handleAddService} />
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -105,8 +92,3 @@ const ContanctTabList = ({ clientId, software }) => {
|
|
|
}
|
|
|
|
|
|
export default ContanctTabList
|
|
|
-
|
|
|
-// export default connect(({ curinglist, loading }) => ({
|
|
|
-// curinglistName: curinglist,
|
|
|
-// getlist: loading.effects['curinglist/fetch']
|
|
|
-// }))(ContanctTabList)
|