lanjianrong 5 лет назад
Родитель
Сommit
ed9b1beb8c

+ 6 - 6
src/pages/Customer/Client/index.jsx

@@ -192,15 +192,15 @@ const Client = props => {
       title: '电话',
       title: '电话',
       dataIndex: 'phone',
       dataIndex: 'phone',
       key: 'phone',
       key: 'phone',
-      width: 65
-      // sorter: (a, b) => a.phone.localeCompare(b.phone)
+      width: 65,
+      sorter: (a, b) => a.phone - b.phone
     },
     },
     {
     {
       title: '手机',
       title: '手机',
       dataIndex: 'telephone',
       dataIndex: 'telephone',
       key: 'telephone',
       key: 'telephone',
       width: 75,
       width: 75,
-      sorter: (a, b) => a.telephone.localeCompare(b.telephone),
+      sorter: (a, b) => a.telephone - b.telephone,
       search: false
       search: false
     },
     },
     {
     {
@@ -208,7 +208,7 @@ const Client = props => {
       dataIndex: 'qq',
       dataIndex: 'qq',
       key: 'qq',
       key: 'qq',
       width: 75,
       width: 75,
-      sorter: (a, b) => a.qq.localeCompare(b.qq),
+      sorter: (a, b) => a.qq - b.qq,
       search: false
       search: false
     },
     },
     {
     {
@@ -216,7 +216,7 @@ const Client = props => {
       dataIndex: 'email',
       dataIndex: 'email',
       key: 'email',
       key: 'email',
       width: 75,
       width: 75,
-      sorter: (a, b) => a.email.localeCompare(b.email),
+      sorter: (a, b) => a.email - b.email,
       search: false
       search: false
     },
     },
     {
     {
@@ -321,7 +321,7 @@ const Client = props => {
       key: 'address',
       key: 'address',
       ellipsis: true,
       ellipsis: true,
       width: 150,
       width: 150,
-      sorter: (a, b) => a.address.localeCompare(b.address),
+      sorter: (a, b) => a.address - b.address,
       search: false
       search: false
     },
     },
     {
     {

+ 2 - 2
src/pages/Customer/Company/index.jsx

@@ -185,7 +185,7 @@ const Company = props => {
       dataIndex: 'phone',
       dataIndex: 'phone',
       key: 'phone',
       key: 'phone',
       search: false,
       search: false,
-      sorter: (a, b) => a.phone.localeCompare(b.phone),
+      sorter: (a, b) => a.phone - b.phone,
       width: 80
       width: 80
     },
     },
     {
     {
@@ -270,7 +270,7 @@ const Company = props => {
       dataIndex: 'address',
       dataIndex: 'address',
       key: 'address',
       key: 'address',
       search: false,
       search: false,
-      sorter: (a, b) => a.address.localeCompare(b.address),
+      sorter: (a, b) => a.address - b.address,
       width: 150
       width: 150
     },
     },
     {
     {

+ 1 - 1
src/pages/workbench/Dashboard/components/RatioPanels.jsx

@@ -8,7 +8,7 @@ import ClientDetail from '@/pages/Customer/Client/components/ClientDetail'
 import CompanyDetail from '@/pages/Customer/Company/components/CompanyDetail'
 import CompanyDetail from '@/pages/Customer/Company/components/CompanyDetail'
 import { Badge } from 'antd'
 import { Badge } from 'antd'
 import { cardTypeMap } from '../consts'
 import { cardTypeMap } from '../consts'
-import { useModal } from '@/components/Modal'
+// import { useModal } from '@/components/Modal'
 
 
 const dataTypeEunm = {
 const dataTypeEunm = {
   0: {
   0: {