|
|
@@ -1,4 +1,5 @@
|
|
|
import Contacts from '@/components/PopContent/Contacts'
|
|
|
+import Addcontact from'@/pages/Customer/Contact/Addcontact'
|
|
|
import ProTable from '@ant-design/pro-table'
|
|
|
// import { PageHeaderWrapper } from '@ant-design/pro-layout';
|
|
|
import { Button, Tag } from 'antd'
|
|
|
@@ -25,6 +26,7 @@ const Contact = props => {
|
|
|
id: '',
|
|
|
visible: false
|
|
|
})
|
|
|
+ const [visible, setVisible] = useState(false)
|
|
|
|
|
|
const initData = async payload => {
|
|
|
const {
|
|
|
@@ -332,7 +334,6 @@ const Contact = props => {
|
|
|
<div>
|
|
|
<div className={styles.tableContent}>
|
|
|
<ProTable
|
|
|
- // className={styles.tableContent}
|
|
|
rowKey={record => record.id}
|
|
|
size="middle"
|
|
|
columns={columns}
|
|
|
@@ -347,20 +348,27 @@ const Contact = props => {
|
|
|
search: {
|
|
|
onSearch: handleSearch
|
|
|
},
|
|
|
- actions: [<LazyCascader onSelect={handleOnselect} key="LazyCascader" />]
|
|
|
+ actions: [
|
|
|
+ <LazyCascader onSelect={handleOnselect} key="LazyCascader" />,
|
|
|
+ <Button key="button" type="primary" onClick={() => setVisible(true)}>
|
|
|
+ <SvgIcon type="icon-plus" />
|
|
|
+ 联系人
|
|
|
+ </Button>
|
|
|
+ ]
|
|
|
}}
|
|
|
scroll={{ x, y }}
|
|
|
columnsStateMap={columnsStateMap}
|
|
|
onColumnsStateChange={map => setColumnsStateMap(map)}
|
|
|
headerTitle="联系人"
|
|
|
- toolBarRender={() => [
|
|
|
- <Button key="button" type="primary">
|
|
|
- <SvgIcon type="icon-plus" />
|
|
|
- 联系人
|
|
|
- </Button>
|
|
|
- ]}
|
|
|
+ // toolBarRender={() => [
|
|
|
+ // <Button key="button" type="primary">
|
|
|
+ // <SvgIcon type="icon-plus" />
|
|
|
+ // 联系人
|
|
|
+ // </Button>
|
|
|
+ // ]}
|
|
|
/>
|
|
|
</div>
|
|
|
+ <Addcontact onOk={() => setVisible(false)} visible={visible} onCancel={() => setVisible(false)}/>
|
|
|
<Contacts onClose={hideDrawer} visible={state.visible} onCreate={onCreate} id={state.id} />
|
|
|
</div>
|
|
|
)
|