소스 검색

feat: 仪表盘服务提醒

outaozhen 5 년 전
부모
커밋
c0915a76e9
1개의 변경된 파일85개의 추가작업 그리고 6개의 파일을 삭제
  1. 85 6
      src/pages/workbench/Dashboard/components/ReminderList/index.jsx

+ 85 - 6
src/pages/workbench/Dashboard/components/ReminderList/index.jsx

@@ -48,17 +48,96 @@ const ReminderList = props => {
       dataIndex: 'serviceTime'
     }
   ]
+  const customerColumns = [
+    {
+      title: '客户名称',
+      dataIndex: 'staffName'
+    },
+    {
+      title: '地区',
+      dataIndex: 'districtName'
+    },
+    {
+      title: '电话',
+      dataIndex: 'phone'
+    },
+    {
+      title: '手机',
+      dataIndex: 'telephone'
+    },
+    {
+      title: '重要联系人',
+      dataIndex: 'companyName'
+    },
+    {
+      title: '联系人',
+      dataIndex: 'clientName'
+    },
+    {
+      title: '上一次服务',
+      dataIndex: 'createTime'
+    },
+    {
+      title: '服务内容',
+      dataIndex: 'remarks'
+    },
+    {
+      title: '服务提醒',
+      dataIndex: 'updateTime'
+    }
+  ]
+  const businessColumns = [
+    {
+      title: '客户名称',
+      dataIndex: 'staffName'
+    },
+    {
+      title: '地区',
+      dataIndex: 'districtName'
+    },
+    {
+      title: '电话',
+      dataIndex: 'phone'
+    },
+    {
+      title: '手机',
+      dataIndex: 'telephone'
+    },
+    {
+      title: '重要联系人',
+      dataIndex: 'companyName'
+    },
+    {
+      title: '联系人',
+      dataIndex: 'clientName'
+    },
+    {
+      title: '上一次服务',
+      dataIndex: 'createTime'
+    },
+    {
+      title: '服务内容',
+      dataIndex: 'mark'
+    },
+    {
+      title: '服务提醒',
+      dataIndex: 'serviceTime'
+    }
+  ]
   const dataMap = {
     0: {
       key: 'client',
       columns: clientColumns
     },
-    1: 'customer',
-    2: 'business'
+    1: {
+      key: 'customer',
+      columns: customerColumns
+    },
+    2: {
+      key: 'business',
+      columns: businessColumns
+    }
   }
-  // const columnsMap = {
-  //   0: 'clientColumns'
-  // }
   const [dataSource, setDataSource] = useState(null)
   const { run: tryGetList } = useRequest(params => queryReminderList(params), {
     manual: true,
@@ -86,7 +165,7 @@ const ReminderList = props => {
       <div className="mx-4">
         <ProTable
           size="small"
-          rowKey={record => record.rank}
+          rowKey={record => record.id}
           columns={dataMap[dataType].columns}
           dataSource={dataSource}
           search={false}