lanjianrong 5 سال پیش
والد
کامیت
942056e4a4

+ 1 - 1
src/pages/Customer/Company/components/ChangeSelect/index.jsx

@@ -10,7 +10,7 @@ const ChangeSelect = props => {
     if (Array.isArray(value)) {
       local = options.reduce((prev, curr) => {
         if (value.includes(curr.value)) {
-          return `${prev}${prev ? ',' : ''}${curr.label}`
+          return `${prev}${prev ? '' : ''}${curr.label}`
         }
         return prev
       }, '')

+ 12 - 0
src/pages/Customer/Company/components/CompanyDetail/CompanyLowerList.jsx

@@ -1,11 +1,23 @@
 import { Tabs, List } from 'antd'
 import { dayjsFormat } from '@/utils/utils'
+import { useModal } from '@/components/Modal'
+import ContactDetail from '@/pages/Customer/Contact/components/ContactDetail'
 
 const CompanyLowerList = props => {
+  const { toggleModal, setModalProps } = useModal()
   const {
     log: { log: logs = [], total = 0 }
   } = props
   const { TabPane } = Tabs
+  const needSubtractHeight = 48 + 48 + 48 + 64 + 24 // 需要被裁掉的高度
+  // const [x, y] = useAutoTable(needSubtractHeight)
+
+  // const handleOnClick = id => {
+  //   setModalProps({
+  //     onClose: () => toggleDrawer(),
+  //     children: <ContactDetail dataId={id} />
+  //   })
+  // }
   return (
     <div>
       <div className="zh-pd-left-15">

+ 4 - 4
src/pages/Customer/Contact/components/ContactDetail/index.jsx

@@ -7,8 +7,8 @@ import { apiContactDetail } from '@/services/contact'
 import consts from '@/consts'
 import { connect } from 'dva'
 
-const PopContent = props => {
-  const { dispatch, shouldUpdate, visible, id = '' } = props
+const ContactDetail = props => {
+  const { dispatch, shouldUpdate, visible, dataId = '' } = props
 
   const [state, setState] = useState({
     loading: false,
@@ -22,7 +22,7 @@ const PopContent = props => {
     const {
       data: { client = {}, log = [], serviceLog = [] },
       code = -1
-    } = await apiContactDetail(id)
+    } = await apiContactDetail(dataId)
     if (code === consts.RET_CODE.SUCCESS) {
       if (shouldUpdate) {
         dispatch({
@@ -67,4 +67,4 @@ const PopContent = props => {
 export default connect(({ refresh, single }) => ({
   visible: single.drawer.visible,
   shouldUpdate: refresh.contact
-}))(PopContent)
+}))(ContactDetail)

+ 6 - 3
src/pages/Customer/Contact/index.jsx

@@ -1,4 +1,4 @@
-import Contacts from '@/pages/Customer/Contact/components/ContactDetail'
+import ContactDetail from '@/pages/Customer/Contact/components/ContactDetail'
 import Addcontact from '@/pages/Customer/Contact/components/AddContact'
 import ProTable from '@ant-design/pro-table'
 // import { PageHeaderWrapper } from '@ant-design/pro-layout';
@@ -65,7 +65,7 @@ const Contact = () => {
         height: '100vh',
         overflowY: 'hidden'
       },
-      children: <Contacts id={id} />
+      children: <ContactDetail dataId={id} />
     })
     toggleDrawer()
   }
@@ -359,7 +359,7 @@ const Contact = () => {
         <ProTable
           rowKey={record => record.id}
           bordered
-          // size="middle"
+          rowSelection={true}
           columns={columns}
           dataSource={state.data}
           summary={() => (
@@ -376,6 +376,9 @@ const Contact = () => {
             total: state.total,
             onChange: (page, size) => initData({ page, size })
           }}
+          tableAlertRender={({ selectedRowKeys }) => {
+            return <div>2222</div>
+          }}
           search={false}
           toolbar={{
             search: {