Parcourir la source

feat: 提醒弹窗/备忘 弹窗 联系人/客户 可点击查看详情

outaozhen il y a 5 ans
Parent
commit
f847370d63

+ 2 - 1
src/pages/Customer/Business/components/BusinessDetail/TabList.jsx

@@ -89,6 +89,7 @@ const ContanctTabList = ({ businessId, clientList }) => {
 
   const showConnectClientModal = () => {
     setModalProps({
+      zIndex: 1002,
       width: '60vw',
       modalRender: () => (
         <ConnectClient
@@ -99,7 +100,7 @@ const ContanctTabList = ({ businessId, clientList }) => {
       ),
       onCancel: () => toggleModal()
     })
-    toggleModal()
+    toggleModal(true)
   }
 
   const { TabPane } = Tabs

+ 8 - 11
src/pages/Customer/Client/index.jsx

@@ -172,8 +172,7 @@ const Client = props => {
       render: (clientName, record) => (
         <span
           onClick={() => showDrawer(record.id)}
-          className="text-primary cursor-pointer hover:text-[#967bbd]"
-        >
+          className="text-primary cursor-pointer hover:text-[#967bbd]">
           {clientName}
         </span>
       ),
@@ -187,7 +186,9 @@ const Client = props => {
       width: 150,
       ellipsis: true,
       render: (companyName, record) => (
-        <span onClick={() => showDrawerComapny(record.companyId)} className={styles.textPurple}>
+        <span
+          onClick={() => showDrawerComapny(record.companyId)}
+          className="text-primary cursor-pointer hover:text-[#967bbd]">
           {companyName}
         </span>
       ),
@@ -290,8 +291,7 @@ const Client = props => {
             tagType={TagTypeEnum.PERSONTAG}
             tagColumn={TagDataTypeEnum.CLIENT}
             checkCallBack={refreshData}
-            modeType={LabelModeType.column}
-          >
+            modeType={LabelModeType.column}>
             <Add theme="filled" size="20" fill="#868e96" className="cursor-pointer" />
           </PersonLabel>
         </div>
@@ -328,8 +328,7 @@ const Client = props => {
             tagType={TagTypeEnum.TEAMTAG}
             tagColumn={TagDataTypeEnum.CLIENT}
             checkCallBack={refreshData}
-            modeType={LabelModeType.column}
-          >
+            modeType={LabelModeType.column}>
             <Add theme="filled" size="20" fill="#868e96" className="cursor-pointer" />
           </PersonLabel>
         </div>
@@ -480,8 +479,7 @@ const Client = props => {
             tagType={TagTypeEnum.PERSONTAG}
             tagColumn={TagDataTypeEnum.CLIENT}
             checkCallBack={toolbarOptionsChange}
-            modeType={LabelModeType.toolbar}
-          >
+            modeType={LabelModeType.toolbar}>
             {tagState.tagIds.length ? (
               <Button>
                 {tagState.tagIds.map(item => (
@@ -506,8 +504,7 @@ const Client = props => {
             tagType={TagTypeEnum.TEAMTAG}
             tagColumn={TagDataTypeEnum.CLIENT}
             checkCallBack={toolbarOptionsChange}
-            modeType={LabelModeType.toolbar}
-          >
+            modeType={LabelModeType.toolbar}>
             {tagState.tagCooperationIds.length ? (
               <Button>
                 {tagState.tagCooperationIds.map(item => (

+ 79 - 5
src/pages/workbench/Dashboard/components/ReminderList.jsx

@@ -1,24 +1,84 @@
-import React from 'react'
-// import { Button } from 'antd'
+import React, { useState } from 'react'
 import consts from '@/consts'
 import { connect } from 'umi'
 import ProTable from '@ant-design/pro-table'
+import { useModal } from '@/components/Modal'
 import { queryReminderList } from '@/services/dashboard'
 // import styles from '@/pages/Customer/Company/components/ConnectCompany/index.less'
 import CustomModal from '@/components/Modal/src/components/CustomModal'
+import ContactDetail from '@/pages/Customer/Client/components/ClientDetail'
+import CompanyDetail from '@/pages/Customer/Company/components/CompanyDetail'
+import Detail from '@/pages/Customer/Business/components/BusinessDetail'
 
 const ReminderList = props => {
   // const dispatch = useDispatch()
   const { dataType, reminderCyclical } = props
+  const { toggleDrawer, setDrawerProps } = useModal()
+  const [state] = useState({
+    orderIds: []
+  })
   // const [state, setState] = useState({
   //   params: { dataType, reminderCyclical }
   // })
+  // 展示客户
+  const showDrawer = id => {
+    setDrawerProps({
+      zIndex: 1001,
+      closable: true,
+      onClose: () => toggleDrawer(),
+      bodyStyle: {
+        height: '100vh'
+        // overflowY: 'hidden'
+      },
+      children: <ContactDetail dataId={id} orderIds={state.orderIds} />
+    })
+    toggleDrawer()
+  }
+  // 展示单位
+  const showDrawerComapny = id => {
+    setDrawerProps({
+      zIndex: 1001,
+      closable: true,
+      onClose: () => toggleDrawer(),
+      bodyStyle: {
+        height: '100vh'
+        // overflowY: 'hidden'
+      },
+      children: <CompanyDetail dataId={id} orderIds={state.orderIds} />
+    })
+    toggleDrawer()
+  }
+  // 展示商机详情
+  const showDrawerBusiness = (id, isCompany = false) => {
+    setDrawerProps({
+      zIndex: 1001,
+      closable: true,
+      onClose: () => toggleDrawer(),
+      bodyStyle: {
+        height: '100vh',
+        overflowY: 'hidden'
+      },
+      children: isCompany ? (
+        <CompanyDetail dataId={id} />
+      ) : (
+        <Detail dataId={id} orderIds={state.orderIds} />
+      )
+    })
+    toggleDrawer()
+  }
   const clientColumns = [
     {
       title: '客户名称',
       dataIndex: 'clientName',
       ellipsis: true,
-      width: '10%'
+      width: '10%',
+      render: (clientName, record) => (
+        <span
+          onClick={() => showDrawer(record.id)}
+          className="text-primary cursor-pointer hover:text-[#967bbd]">
+          {clientName}
+        </span>
+      )
     },
     {
       title: '地区',
@@ -63,7 +123,14 @@ const ReminderList = props => {
       title: '单位名称',
       dataIndex: 'companyName',
       width: '15%',
-      ellipsis: true
+      ellipsis: true,
+      render: (companyName, record) => (
+        <span
+          onClick={() => showDrawerComapny(record.id)}
+          className="text-primary cursor-pointer hover:text-[#967bbd]">
+          {companyName}
+        </span>
+      )
     },
     {
       title: '地区',
@@ -108,7 +175,14 @@ const ReminderList = props => {
       title: '商机名称',
       dataIndex: 'name',
       width: '15%',
-      ellipsis: true
+      ellipsis: true,
+      render: (text, record) => (
+        <span
+          onClick={() => showDrawerBusiness(record.id)}
+          className="text-primary cursor-pointer hover:text-[#967bbd]">
+          {text}
+        </span>
+      )
     },
     {
       title: '单位名称',