lanjianrong 4 лет назад
Родитель
Сommit
ecbd0711b8

+ 30 - 28
src/pages/Customer/Client/components/ClientDetail/LowerList.tsx

@@ -1,7 +1,6 @@
-import { Tabs, Table } from 'antd'
+import { Tabs } from 'antd'
 import React, { useMemo } from 'react'
 import React, { useMemo } from 'react'
 import { dayjsFormat } from '@/utils/utils'
 import { dayjsFormat } from '@/utils/utils'
-import TimeLineList from '@/components/TimeLineList'
 import classNames from 'classnames'
 import classNames from 'classnames'
 import { isDevMode } from '@/utils/env'
 import { isDevMode } from '@/utils/env'
 import { VList } from 'virtuallist-antd'
 import { VList } from 'virtuallist-antd'
@@ -24,26 +23,26 @@ export enum Servicelog {
 export const servicelogEnum = {
 export const servicelogEnum = {
   [Servicelog.VISIT]: {
   [Servicelog.VISIT]: {
     title: '上门服务',
     title: '上门服务',
-    bg: 'bg-hex-886ab5 bg-opacity-6',
-    text: 'text-hex-886ab5 fomt-medium text-sm',
+    bg: 'bg-hex-886ab5',
+    text: 'text-hex-886ab5',
     border: 'border-hex-886ab5'
     border: 'border-hex-886ab5'
   },
   },
   [Servicelog.CALL]: {
   [Servicelog.CALL]: {
     title: '电话拜访',
     title: '电话拜访',
-    bg: 'bg-hex-246daf bg-opacity-6',
-    text: 'text-hex-246daf fomt-medium text-sm',
+    bg: 'bg-hex-246daf',
+    text: 'text-hex-246daf',
     border: 'border-hex-246daf'
     border: 'border-hex-246daf'
   },
   },
   [Servicelog.OTHER]: {
   [Servicelog.OTHER]: {
     title: '其他事项',
     title: '其他事项',
-    bg: 'bg-hex-1ca081 bg-opacity-6',
-    text: 'text-hex-1ca081 fomt-medium text-sm',
+    bg: 'bg-hex-1ca081',
+    text: 'text-hex-1ca081',
     border: 'border-hex-1ca081'
     border: 'border-hex-1ca081'
   },
   },
   [Servicelog.ONLINE]: {
   [Servicelog.ONLINE]: {
     title: '在线服务',
     title: '在线服务',
-    bg: 'bg-hex-b8795e bg-opacity-6',
-    text: 'text-hex-b8795e fomt-medium text-sm',
+    bg: 'bg-hex-b8795e',
+    text: 'text-hex-b8795e ',
     border: 'border-hex-b8795e'
     border: 'border-hex-b8795e'
   }
   }
 }
 }
@@ -59,11 +58,11 @@ export const renderServiceLogItem = (item: API.ServiceLogItem) => {
   return (
   return (
     <div
     <div
       className={classNames(
       className={classNames(
-        'w-full rounded border-l-2px',
+        'w-full rounded border-l-2px bg-opacity-6',
         servicelogEnum[item.status]?.bg,
         servicelogEnum[item.status]?.bg,
         servicelogEnum[item.status]?.border
         servicelogEnum[item.status]?.border
       )}>
       )}>
-      <div className="p-4 flex flex-col">
+      <div className="p-3 flex flex-col">
         <div className="flex justify-between">
         <div className="flex justify-between">
           <div className="flex">
           <div className="flex">
             <div
             <div
@@ -83,18 +82,23 @@ export const renderServiceLogItem = (item: API.ServiceLogItem) => {
               </div>
               </div>
             </div>
             </div>
           </div>
           </div>
-          <div className={servicelogEnum[item.status]?.text}>{servicelogEnum[item.status]?.title}</div>
+          <div className="flex flex-nowrap">
+            <div className={classNames(servicelogEnum[item.status]?.text, 'font-medium text-sm')}>
+              {servicelogEnum[item.status]?.title}
+            </div>
+            <div
+              className={classNames(
+                'ml-1 text-xs bg-opacity-16 rounded-sm h-5 leading-5 px-1',
+                servicelogEnum[item.status]?.text,
+                servicelogEnum[item.status]?.bg
+              )}>
+              {dayjsFormat(item.date, 'YYYY-MM-DD')}
+            </div>
+          </div>
         </div>
         </div>
-        <div className="bg-white bg-opacity-80 rounded-sm text-black text-opacity-60 text-sm mt-4 p-2">
+        <div className="bg-white bg-opacity-80 rounded-sm text-black text-opacity-60 text-sm mt-3 p-2">
           {item.mark}
           {item.mark}
         </div>
         </div>
-        <div className="pt-2 flex justify-between">
-          <div />
-          <div className="text-sm text-opacity-80">
-            <span>服务日期:</span>
-            <span className="ml-1">{dayjsFormat(item.date, 'YYYY-MM-DD')}</span>
-          </div>
-        </div>
       </div>
       </div>
     </div>
     </div>
   )
   )
@@ -159,13 +163,11 @@ const ClientLowerList: React.FC<ClientLowerListProps> = ({ logList: { log: logs
         <Tabs>
         <Tabs>
           <TabPane tab="客户服务记录" key="客户服务记录">
           <TabPane tab="客户服务记录" key="客户服务记录">
             <div className="sheet-panel-record">
             <div className="sheet-panel-record">
-              <TimeLineList<API.ServiceLogItem>
-                rowkey="id"
-                mode="card"
-                dataField="createTime"
-                dataSource={serviceList}
-                renderItem={item => renderServiceLogItem(item)}
-              />
+              {serviceList.map(item => (
+                <div className="mb-3" key={item.id}>
+                  {renderServiceLogItem(item)}
+                </div>
+              ))}
             </div>
             </div>
           </TabPane>
           </TabPane>
           <TabPane tab="日志" key="日志">
           <TabPane tab="日志" key="日志">

+ 5 - 7
src/pages/Customer/Company/components/CompanyDetail/LowerList.tsx

@@ -72,13 +72,11 @@ const CompanyLowerList: React.FC<CompanyLowerListProps> = ({ logList: { log: log
         <Tabs>
         <Tabs>
           <TabPane tab="单位服务记录" key="服务记录">
           <TabPane tab="单位服务记录" key="服务记录">
             <div className="sheet-panel-record">
             <div className="sheet-panel-record">
-              <TimeLineList<API.ServiceLogItem>
-                rowkey="id"
-                mode="card"
-                dataField="createTime"
-                dataSource={serviceList}
-                renderItem={item => renderServiceLogItem(item)}
-              />
+              {serviceList.map(item => (
+                <div className="mb-2" key={item.id}>
+                  {renderServiceLogItem(item)}
+                </div>
+              ))}
             </div>
             </div>
           </TabPane>
           </TabPane>
           <TabPane tab="日志" key="日志">
           <TabPane tab="日志" key="日志">