Sfoglia il codice sorgente

fix: 增加排序字段以及抽屉ui调整

lanjianrong 5 anni fa
parent
commit
e3e913aa02

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

@@ -61,7 +61,7 @@ const Detail = props => {
     <Spin spinning={state.loading}>
       <div className="sheet-box">
         <Row>
-          <Col span={12} className="sheet-box-left">
+          <Col span={10} className="sheet-box-left">
             {orderIds.length ? (
               <div className="mb-3">
                 <Tooltip title="上一条记录">
@@ -95,7 +95,7 @@ const Detail = props => {
               />
             </div>
           </Col>
-          <Col span={12} className="sheet-box-right">
+          <Col span={14} className="sheet-box-right">
             <TabList businessId={state.business.id} clientList={state.linkClient.client} />
             <LowerList log={state.log} serviceLog={state.serviceLog} />
           </Col>

+ 10 - 3
src/pages/Customer/Client/components/ClientDetail/TabList.jsx

@@ -35,6 +35,7 @@ const ContanctTabList = ({ clientId, software }) => {
     {
       title: '锁号',
       dataIndex: 'keyNum',
+      width: '20%',
       render: (clientName, record) => (
         <span
           onClick={() => showLongleDrawer(record.id)}
@@ -45,15 +46,21 @@ const ContanctTabList = ({ clientId, software }) => {
     },
     {
       title: '产品',
-      dataIndex: 'product'
+      dataIndex: 'product',
+      width: '50%',
+      ellipsis: true
     },
     {
       title: '状态',
-      dataIndex: 'statusT'
+      dataIndex: 'statusT',
+      width: '12%',
+      ellipsis: true
     },
     {
       title: '责任人',
-      dataIndex: 'responsible'
+      dataIndex: 'responsible',
+      width: '18%',
+      ellipsis: true
     }
   ]
   const [addService, setAddService] = useState({

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

@@ -163,7 +163,7 @@ const Client = props => {
           {clientName}
         </span>
       ),
-      sorter: (a, b) => a.clientName - b.clientName,
+      sorter: true,
       search: false
     },
     {
@@ -177,7 +177,7 @@ const Client = props => {
           {companyName}
         </span>
       ),
-      sorter: (a, b) => a.companyName - b.companyName,
+      sorter: true,
       search: false
     },
     {
@@ -193,14 +193,14 @@ const Client = props => {
       dataIndex: 'phone',
       key: 'phone',
       width: 65,
-      sorter: (a, b) => a.phone - b.phone
+      sorter: true
     },
     {
       title: '手机',
       dataIndex: 'telephone',
       key: 'telephone',
       width: 75,
-      sorter: (a, b) => a.telephone - b.telephone,
+      sorter: true,
       search: false
     },
     {
@@ -208,7 +208,7 @@ const Client = props => {
       dataIndex: 'qq',
       key: 'qq',
       width: 75,
-      sorter: (a, b) => a.qq - b.qq,
+      sorter: true,
       search: false
     },
     {
@@ -216,7 +216,7 @@ const Client = props => {
       dataIndex: 'email',
       key: 'email',
       width: 75,
-      sorter: (a, b) => a.email - b.email,
+      sorter: true,
       search: false
     },
     {
@@ -321,7 +321,7 @@ const Client = props => {
       key: 'address',
       ellipsis: true,
       width: 150,
-      sorter: (a, b) => a.address - b.address,
+      sorter: true,
       search: false
     },
     {

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

@@ -53,7 +53,7 @@ const CompanyTabList = ({ initData, customerId, client, software, customer }) =>
       title: '所有部门',
       dataIndex: 'department',
       onFilter: true,
-      width: '20%',
+      width: '25%',
       filters: Array.from(
         new Set(client.client?.map(item => item.department)).map(item => ({
           text: item,
@@ -88,7 +88,7 @@ const CompanyTabList = ({ initData, customerId, client, software, customer }) =>
     {
       title: 'QQ',
       dataIndex: 'qq',
-      width: '15%',
+      width: '10%',
       ellipsis: true
     }
   ]

+ 4 - 9
src/pages/Customer/Company/index.jsx

@@ -153,7 +153,7 @@ const Company = props => {
       width: 150,
       fixed: 'left',
       search: false,
-      sorter: (a, b) => a.companyName - b.companyName,
+      sorter: true,
       render: (companyName, record) => (
         <span
           onClick={() => showDrawer(record.id)}
@@ -174,7 +174,7 @@ const Company = props => {
       dataIndex: 'phone',
       key: 'phone',
       search: false,
-      sorter: (a, b) => a.phone - b.phone,
+      sorter: true,
       width: 80
     },
     {
@@ -214,12 +214,6 @@ const Company = props => {
       search: false,
       filters: true,
       valueEnum: tag.teamTagMap,
-      // valueType: 'select',
-      // fieldProps: {
-      //   mode: 'multiple',
-      //   options: tag.teamOptions,
-      //   showArrow: true
-      // },
       render: (_, record) => (
         <div className="flex items-center flex-wrap">
           {record.tagCooperationIds.map(item => (
@@ -248,6 +242,7 @@ const Company = props => {
       dataIndex: 'clientTotal',
       key: 'clientTotal',
       search: false,
+      sorter: true,
       width: 80
     },
     {
@@ -262,7 +257,7 @@ const Company = props => {
       dataIndex: 'address',
       key: 'address',
       search: false,
-      sorter: (a, b) => a.address - b.address,
+      sorter: true,
       width: 150
     },
     {

+ 15 - 17
src/pages/Product/Lock/Lockstore/components/LocksDetail/TabList.jsx

@@ -4,13 +4,26 @@ import { dayjsFormat } from '@/utils/utils'
 import consts from '@/consts'
 import { apiSoftwareAddLonglelog } from '@/services/lock'
 import { ProductLabel } from '@/pages/Product/Lock/LockStore'
-import { lockTypeEnum } from './LockModal'
-import LockModal from './LockModal'
+import LockModal, { lockTypeEnum } from './LockModal'
 import ClientDetail from '@/pages/Customer/Client/components/ClientDetail'
 import { servicelogEnum, showProductsStatus, showNewLongleStatus, showMarkStatus } from './consts'
 import { useDispatch } from 'dva'
 import { useModal } from '@/components/Modal'
 
+const RenderLongleCon = ({ longleService }) => {
+  return (
+    <>
+      {showProductsStatus.includes(longleService.status) ? (
+        <ProductLabel data={longleService.product} />
+      ) : null}
+      {showNewLongleStatus.includes(longleService.status) ? (
+        <span>{longleService.NewKeyNum}</span>
+      ) : null}
+      {showMarkStatus.includes(longleService.status) ? <span>{longleService.mark}</span> : null}
+    </>
+  )
+}
+
 const LockTabList = props => {
   const { longleLog, longleId, keyNum, clientId } = props
   const { toggleDrawer, setDrawerProps } = useModal()
@@ -166,19 +179,4 @@ const LockTabList = props => {
   )
 }
 
-const RenderLongleCon = ({ longleService }) => {
-  // console.log(longleService)
-  return (
-    <>
-      {showProductsStatus.includes(longleService.status) ? (
-        <ProductLabel data={longleService.product} />
-      ) : null}
-      {showNewLongleStatus.includes(longleService.status) ? (
-        <span>{longleService.NewKeyNum}</span>
-      ) : null}
-      {showMarkStatus.includes(longleService.status) ? <span>{longleService.mark}</span> : null}
-    </>
-  )
-}
-
 export default LockTabList

+ 2 - 2
src/pages/Product/Lock/Lockstore/components/LocksDetail/index.jsx

@@ -49,7 +49,7 @@ const Index = props => {
     <div>
       <div className="sheet-box">
         <Row>
-          <Col span={12} className="sheet-box-left">
+          <Col span={10} className="sheet-box-left">
             {orderIds.length ? (
               <div className="mb-3">
                 <Tooltip title="上一条记录">
@@ -79,7 +79,7 @@ const Index = props => {
               <LockForm longle={state.longle} customerId={state.longle.customerId} />
             </div>
           </Col>
-          <Col span={12} className="sheet-box-right">
+          <Col span={14} className="sheet-box-right">
             <LockTabList
               longleLog={state.longleLog}
               longleId={state.longle.id}