|
@@ -1,18 +1,38 @@
|
|
|
-import { message, Tabs, Button, Table } from 'antd'
|
|
|
|
|
-import React, { useEffect, useState } from 'react'
|
|
|
|
|
|
|
+import { message, Tabs, Button } from 'antd'
|
|
|
|
|
+import React, { useEffect, useState, useRef } from 'react'
|
|
|
import consts from '@/consts'
|
|
import consts from '@/consts'
|
|
|
import SvgIcon from '@/components/SvgIcon'
|
|
import SvgIcon from '@/components/SvgIcon'
|
|
|
-import { apiAddService } from '@/services/contact'
|
|
|
|
|
|
|
+import { apiAddService, apiContactDetail } from '@/services/contact'
|
|
|
import AddRecord from './AddRecord'
|
|
import AddRecord from './AddRecord'
|
|
|
import { useDispatch } from 'dva'
|
|
import { useDispatch } from 'dva'
|
|
|
-// import { connect } from 'umi'
|
|
|
|
|
|
|
+import ProTable from '@ant-design/pro-table'
|
|
|
|
|
|
|
|
const ContanctTabList = ({ clientId }) => {
|
|
const ContanctTabList = ({ clientId }) => {
|
|
|
// console.log(clientId)
|
|
// console.log(clientId)
|
|
|
const dispatch = useDispatch()
|
|
const dispatch = useDispatch()
|
|
|
const [state, setState] = useState({
|
|
const [state, setState] = useState({
|
|
|
|
|
+ params: {},
|
|
|
visible: false
|
|
visible: false
|
|
|
})
|
|
})
|
|
|
|
|
+ const tRef = useRef()
|
|
|
|
|
+ const columns = [
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '锁号',
|
|
|
|
|
+ dataIndex: 'keyNum'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '产品',
|
|
|
|
|
+ dataIndex: 'product'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '状态',
|
|
|
|
|
+ dataIndex: 'statusT'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ title: '责任人',
|
|
|
|
|
+ dataIndex: 'client'
|
|
|
|
|
+ }
|
|
|
|
|
+ ]
|
|
|
const [addService, setAddService] = useState({
|
|
const [addService, setAddService] = useState({
|
|
|
visible: false,
|
|
visible: false,
|
|
|
loading: false
|
|
loading: false
|
|
@@ -34,28 +54,51 @@ const ContanctTabList = ({ clientId }) => {
|
|
|
})
|
|
})
|
|
|
// await initData()
|
|
// await initData()
|
|
|
}
|
|
}
|
|
|
- useEffect(() => {}, [])
|
|
|
|
|
|
|
+ useEffect(() => {
|
|
|
|
|
+ setState({ ...state, params: { ...state.params, clientId } })
|
|
|
|
|
+ }, [clientId])
|
|
|
const { TabPane } = Tabs
|
|
const { TabPane } = Tabs
|
|
|
return (
|
|
return (
|
|
|
<div>
|
|
<div>
|
|
|
<div className="zh-pd-left-15">
|
|
<div className="zh-pd-left-15">
|
|
|
{/* <Tabs onChange={callback} type="card"> */}
|
|
{/* <Tabs onChange={callback} type="card"> */}
|
|
|
<Tabs>
|
|
<Tabs>
|
|
|
- <TabPane tab="养护云造价" key="养护云造价">
|
|
|
|
|
|
|
+ {/* <TabPane tab="养护云造价" key="养护云造价">
|
|
|
<div className="sheet-right-panel">
|
|
<div className="sheet-right-panel">
|
|
|
养护云造价
|
|
养护云造价
|
|
|
- {/* <Table columns={curingcolumns} dataSource={curinglist} pagination={false} /> */}
|
|
|
|
|
|
|
+ <Table columns={curingcolumns} dataSource={curinglist} pagination={false} />
|
|
|
</div>
|
|
</div>
|
|
|
</TabPane>
|
|
</TabPane>
|
|
|
<TabPane tab="大司空云计价" key="大司空云计价">
|
|
<TabPane tab="大司空云计价" key="大司空云计价">
|
|
|
<div className="sheet-right-panel">大司空云计价</div>
|
|
<div className="sheet-right-panel">大司空云计价</div>
|
|
|
- </TabPane>
|
|
|
|
|
|
|
+ </TabPane> */}
|
|
|
<TabPane tab="软件锁" key="软件锁">
|
|
<TabPane tab="软件锁" key="软件锁">
|
|
|
- <div className="sheet-right-panel">软件锁</div>
|
|
|
|
|
|
|
+ <div className="sheet-right-panel">
|
|
|
|
|
+ <ProTable
|
|
|
|
|
+ columns={columns}
|
|
|
|
|
+ search={false}
|
|
|
|
|
+ toolBarRender={false}
|
|
|
|
|
+ params={state.params}
|
|
|
|
|
+ actionRef={tRef}
|
|
|
|
|
+ rowKey={record => record.id}
|
|
|
|
|
+ request={async (params, sort, filter) => {
|
|
|
|
|
+ const {
|
|
|
|
|
+ code = -1,
|
|
|
|
|
+ data: { software = {}, total = 0 }
|
|
|
|
|
+ } = await apiContactDetail({ ...params, ...sort, ...filter })
|
|
|
|
|
+ return {
|
|
|
|
|
+ data: software,
|
|
|
|
|
+ success: code === consts.RET_CODE.SUCCESS,
|
|
|
|
|
+ total
|
|
|
|
|
+ }
|
|
|
|
|
+ }}
|
|
|
|
|
+ pagination={false}
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
</TabPane>
|
|
</TabPane>
|
|
|
- <TabPane tab="通行账号" key="通行账号">
|
|
|
|
|
|
|
+ {/* <TabPane tab="通行账号" key="通行账号">
|
|
|
<div className="sheet-right-panel">通行账号</div>
|
|
<div className="sheet-right-panel">通行账号</div>
|
|
|
- </TabPane>
|
|
|
|
|
|
|
+ </TabPane> */}
|
|
|
</Tabs>
|
|
</Tabs>
|
|
|
</div>
|
|
</div>
|
|
|
<div className="sheet-btns zh-pd-left-15 zh-pd-top-15">
|
|
<div className="sheet-btns zh-pd-left-15 zh-pd-top-15">
|