Browse Source

fix: 单位同步地址

outaozhen 4 years ago
parent
commit
8bb910d225

+ 34 - 3
src/pages/Customer/Company/components/CompanyDetail/SyncClient.jsx

@@ -1,9 +1,11 @@
 import consts from '@/consts'
 import { syncToClient } from '@/services/customer'
 import { Copy } from '@icon-park/react'
-import { Button, Checkbox, message, Modal, Table } from 'antd'
+import { Button, Checkbox, message, Modal } from 'antd'
 import { useState } from 'react'
 import { useDispatch } from 'umi'
+import { Table } from '@arco-design/web-react'
+import '@arco-design/web-react/dist/css/arco.css'
 
 const SyncClient = ({ customer, client }) => {
   const dispatch = useDispatch()
@@ -47,12 +49,18 @@ const SyncClient = ({ customer, client }) => {
       dataIndex: 'clientName',
       title: '客户名称',
       width: '15%',
+      headerCellStyle: {
+        backgroundColor: '#fff'
+      },
       ellipsis: true
     },
     {
       dataIndex: 'districtName',
       title: '客户地区',
       width: '15%',
+      headerCellStyle: {
+        backgroundColor: '#fff'
+      },
       ellipsis: true,
       renderText: text => text?.replaceAll(' / ', ',')
     },
@@ -60,24 +68,36 @@ const SyncClient = ({ customer, client }) => {
       dataIndex: 'address',
       title: '地址',
       width: '20%',
+      headerCellStyle: {
+        backgroundColor: '#fff'
+      },
       ellipsis: true
     },
     {
       dataIndex: 'ride',
       title: '乘车路线',
       width: '20%',
+      headerCellStyle: {
+        backgroundColor: '#fff'
+      },
       ellipsis: true
     },
     {
       dataIndex: 'landmarks',
       title: '地标建筑',
       width: '15%',
+      headerCellStyle: {
+        backgroundColor: '#fff'
+      },
       ellipsis: true
     },
     {
       dataIndex: 'stay',
       title: '参考住宿',
-      width: '15%',
+      headerCellStyle: {
+        backgroundColor: '#fff'
+      },
+      // width: '15%',
       ellipsis: true
     }
   ]
@@ -141,6 +161,17 @@ const SyncClient = ({ customer, client }) => {
           </Checkbox.Group>
         </div>
         <Table
+          virtualized
+          scroll={{ y: 400 }}
+          border={false}
+          columns={columns}
+          data={client}
+          pagination={false}
+          rowSelection={{
+            onChange: selectedRowKeys => setState({ ...state, selectedKeys: selectedRowKeys })
+          }}
+        />
+        {/* <Table
           rowKey="id"
           size="small"
           columns={columns}
@@ -151,7 +182,7 @@ const SyncClient = ({ customer, client }) => {
           rowSelection={{
             onChange: selectedRowKeys => setState({ ...state, selectedKeys: selectedRowKeys })
           }}
-        />
+        /> */}
       </Modal>
     </>
   )

+ 7 - 7
src/pages/Customer/Company/components/CompanyDetail/TabList.jsx

@@ -123,7 +123,7 @@ const CompanyTabList = ({
       dataIndex: 'priority',
       width: '15%',
       headerCellStyle: {
-        backgroundColor: 'var(--color-bg-2)'
+        backgroundColor: '#fafafa'
       },
       sorter: (a, b) => a.priority - b.priority,
       render: (text, record) => (
@@ -149,7 +149,7 @@ const CompanyTabList = ({
       onFilter: true,
       width: '18%',
       headerCellStyle: {
-        backgroundColor: 'var(--color-bg-2)'
+        backgroundColor: '#fafafa'
       },
       filters: Array.from(
         new Set(client.client?.map(item => item.department)).map(item => ({
@@ -157,14 +157,14 @@ const CompanyTabList = ({
           value: item
         }))
       ),
-      onFilter: (value, item) => item.department > value
+      onFilter: (value, item) => item.department === value
     },
     {
       title: '姓名',
       dataIndex: 'clientName',
       width: '15%',
       headerCellStyle: {
-        backgroundColor: 'var(--color-bg-2)'
+        backgroundColor: '#fafafa'
       },
       render: (clientName, record) => (
         <div className="text-primary hover:text-[#967bbd] line-clamp-1">
@@ -179,7 +179,7 @@ const CompanyTabList = ({
       dataIndex: 'niceName',
       width: '15%',
       headerCellStyle: {
-        backgroundColor: 'var(--color-bg-2)'
+        backgroundColor: '#fafafa'
       },
       ellipsis: true
     },
@@ -188,7 +188,7 @@ const CompanyTabList = ({
       dataIndex: 'telephone',
       // width: '20%',
       headerCellStyle: {
-        backgroundColor: 'var(--color-bg-2)'
+        backgroundColor: '#fafafa'
       },
       ellipsis: true
     },
@@ -197,7 +197,7 @@ const CompanyTabList = ({
       dataIndex: 'qq',
       // width: '20%',
       headerCellStyle: {
-        backgroundColor: 'var(--color-bg-2)'
+        backgroundColor: '#fafafa'
       },
       ellipsis: true
     }

+ 6 - 0
src/pages/Customer/Company/components/CompanyDetail/index.less

@@ -5,4 +5,10 @@
   :global(.arco-table-col-has-sorter .arco-table-cell-with-sorter) {
     padding: 8px 8px;
   }
+  :global(.arco-table .arco-table-td) {
+    background-color: #fafafa;
+  }
+  :global(.arco-table-tr:hover) {
+    background-color: #fafafa !important;
+  }
 }

+ 1 - 1
src/pages/Product/Lock/LockStore/index.jsx

@@ -25,7 +25,7 @@ export const ProductLabel = ({ data }) => {
     newData = data.split('+')
   }
   return (
-    <div className="children:m-2px">
+    <div className="!children:m-2px">
       {newData.map((item, idx) => (
         <Tag color="purple" key={item + idx}>
           {item}