Explorar el Código

Merge branch 'dev' of http://192.168.1.41:3000/outaozhen/cldV2react into dev

outaozhen hace 4 años
padre
commit
ae30f7b610

+ 0 - 1
.stylelintrc.js

@@ -8,7 +8,6 @@ module.exports = {
     'max-empty-lines': 2,
     'rule-empty-line-before': null,
     'unit-no-unknown': null,
-    'unit-whitelist': ['px', 'em', 'rem', 's', '%', 'vw', 'vh', 'deg'],
     'selector-max-compound-selectors': 5,
     'color-hex-length': 'long',
     'at-rule-no-unknown': null,

+ 1 - 0
src/pages/Customer/Client/components/ClientDetail/AddRecord.tsx

@@ -47,6 +47,7 @@ const AddRecord: React.FC<AddRecordProps> = ({ defaultValues, onConfirm, ...rese
   return (
     <Modal
       {...resetModalProps}
+      maskClosable={false}
       title="添加服务记录"
       getContainer={() => document.getElementById('root')}
       onOk={() => {

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

@@ -76,7 +76,7 @@ type ServiceLogItemProps = {
 export const ServiceLogItem: React.FC<ServiceLogItemProps> = ({ item, logType, updatePayload }) => {
   const dispatchModal = useModal()
   const dispatch = useDispatch()
-  const { run: truUpdate, loading: comfirmLoading } = useRequest(
+  const { run: truUpdate } = useRequest(
     logType === ServiceLogType.COMPANY ? updateCustomerService : updateClientService,
     {
       manual: true,
@@ -150,7 +150,7 @@ export const ServiceLogItem: React.FC<ServiceLogItemProps> = ({ item, logType, u
         </div>
         {item.isOperation ? (
           <div className="mt-2">
-            <Button size="small" onClick={() => handleOnEdit(item)} loading={comfirmLoading}>
+            <Button size="small" onClick={() => handleOnEdit(item)}>
               编辑
             </Button>
             <Popconfirm title="确认删除该服务记录吗?" onConfirm={() => truDel({ id: item.id })}>

+ 32 - 45
src/pages/Customer/Client/components/ClientDetail/TabList.jsx

@@ -55,35 +55,28 @@ const ClientTabList = ({ clientId, software, updatePayload }) => {
       title: '产品',
       dataIndex: 'product',
       width: 230,
-      ellipsis: true,
-      render: (_, record) => (
-        <>
-          {record.preserveStatus === 3 ? (
-            <Text delete type="secondary">
-              {record.product}
-            </Text>
-          ) : (
-            <ProductLabel data={record.product} />
-          )}
-        </>
-      )
+      render: (_, record) =>
+        record.preserveStatus === 3 ? (
+          <Text delete type="secondary">
+            {record.product}
+          </Text>
+        ) : (
+          <ProductLabel data={record.product} />
+        )
     },
     {
       title: '销售状态',
       dataIndex: 'sellStatus',
       width: 90,
       ellipsis: true,
-      render: (_, record) => (
-        <>
-          {record.preserveStatus === 3 ? (
-            <Text delete type="secondary">
-              {longleSellStatusNum[record.sellStatus]?.text}
-            </Text>
-          ) : (
-            <>{longleSellStatusNum[record.sellStatus]?.text}</>
-          )}
-        </>
-      )
+      render: (_, record) =>
+        record.preserveStatus === 3 ? (
+          <Text delete type="secondary">
+            {longleSellStatusNum[record.sellStatus]?.text}
+          </Text>
+        ) : (
+          <>{longleSellStatusNum[record.sellStatus]?.text}</>
+        )
     },
     {
       title: '维护状态',
@@ -91,34 +84,28 @@ const ClientTabList = ({ clientId, software, updatePayload }) => {
       key: 'preserveStatus',
       width: 90,
       ellipsis: true,
-      render: (_, record) => (
-        <>
-          {record.preserveStatus === 3 ? (
-            <Text delete type="secondary">
-              {longlePreserveStatusNum[record.preserveStatus]?.text}
-            </Text>
-          ) : (
-            <>{longlePreserveStatusNum[record.preserveStatus]?.text}</>
-          )}
-        </>
-      )
+      render: (_, record) =>
+        record.preserveStatus === 3 ? (
+          <Text delete type="secondary">
+            {longlePreserveStatusNum[record.preserveStatus]?.text}
+          </Text>
+        ) : (
+          <>{longlePreserveStatusNum[record.preserveStatus]?.text}</>
+        )
     },
     {
       title: '责任人',
       dataIndex: 'responsible',
       width: 70,
       ellipsis: true,
-      render: (_, record) => (
-        <>
-          {record.preserveStatus === 3 ? (
-            <Text delete type="secondary">
-              {record.responsible}
-            </Text>
-          ) : (
-            <>{record.responsible}</>
-          )}
-        </>
-      )
+      render: (_, record) =>
+        record.preserveStatus === 3 ? (
+          <Text delete type="secondary">
+            {record.responsible}
+          </Text>
+        ) : (
+          <>{record.responsible}</>
+        )
     }
   ]
 

+ 1 - 1
src/pages/Customer/Client/components/ClientDetail/index.jsx

@@ -77,7 +77,7 @@ const ClientDetail = props => {
             <Row>
               <Col span={9} className="sheet-box-left">
                 {orderIds.length ? (
-                  <div className="mb-3px">
+                  <div className="mb-1">
                     <Tooltip title="上一条记录">
                       <Up
                         fill={flipConsts.disableUpBtn ? '#BDBDBE' : '#886ab5'}

+ 8 - 13
src/pages/Customer/Company/components/CompanyDetail/SyncClient.jsx

@@ -88,15 +88,10 @@ const SyncClient = ({ customer, client, actionPayload }) => {
     })
   }, [])
 
-  const { checkValues, visible, loading } = state
+  const { checkValues, visible } = state
   return (
     <>
-      <Button
-        size="small"
-        ghost
-        type="primary"
-        loading={loading}
-        onClick={() => setState({ ...state, visible: true, loading: true })}>
+      <Button size="small" ghost type="primary" onClick={() => setState({ ...state, visible: true })}>
         <Copy theme="two-tone" fill={['#333', '#886ab5']} />
         <span className="ml-1">同步地址信息</span>
       </Button>
@@ -105,37 +100,37 @@ const SyncClient = ({ customer, client, actionPayload }) => {
         title={`同步 ${customer.companyName} 信息`}
         // getContainer={() => document.getElementById('root')}
         visible={visible}
-        onCancel={() => setState({ ...state, visible: false, loading: false })}
+        onCancel={() => setState({ ...state, visible: false })}
         onOk={handleOnConfirm}>
         <div className="rounded-3 p-4 mb-2 pt-0">
           <Checkbox.Group defaultValue={checkValues} onChange={e => setState({ ...state, checkValues: e })}>
             <div className="flex flex-nowrap">
               <Checkbox value="district">
-                <div className="w-100px text-left">地区</div>
+                <div className="w-25 text-left">地区</div>
               </Checkbox>
               <div>{customer.districtName?.replaceAll(' / ', ',')}</div>
             </div>
             <div className="flex flex-nowrap">
               <Checkbox value="address">
-                <div className="w-100px text-left">地址</div>
+                <div className="w-25 text-left">地址</div>
               </Checkbox>
               <div>{customer.address}</div>
             </div>
             <div className="flex flex-nowrap">
               <Checkbox value="ride">
-                <div className="w-100px text-left">乘车路线</div>
+                <div className="w-25 text-left">乘车路线</div>
               </Checkbox>
               <div>{customer.ride}</div>
             </div>
             <div className="flex flex-nowrap">
               <Checkbox value="landmarks">
-                <div className="w-100px text-left">地标建筑</div>
+                <div className="w-25 text-left">地标建筑</div>
               </Checkbox>
               <div>{customer.landmarks}</div>
             </div>
             <div className="flex flex-nowrap">
               <Checkbox value="stay">
-                <div className="w-100px text-left">参考住宿</div>
+                <div className="w-25 text-left">参考住宿</div>
               </Checkbox>
               <div>{customer.stay}</div>
             </div>

+ 94 - 3
src/services/typding.d.ts

@@ -51,10 +51,101 @@ declare namespace API {
 
   /** @description 日志 */
   type LogItem = {
-    id?: string
-    createTime?: string
-    operatorName?: string
+    id: string
     operationType?: string
+    avatar?: string
+    clientId?: string
+    clientName?: string
+    customerId?: string
+    customerName?: any
+    longleId?: string
+    longleName?: any
+    businessId?: string
+    businessName?: string
+    staffId?: string
+    staffName?: string
+    operatorId?: string
+    operatorName?: string
     content?: string
+    createTime?: string
+  }
+
+  /** @description 客户 */
+  type ClientItem = {
+    id: string
+    companyId?: string
+    staffId?: string
+    sourceId?: string
+    sourceName?: string
+    staffName?: string
+    districtIds?: string[]
+    districtName?: string
+    tagIds?: string[]
+    tagName?: string[]
+    tagCooperationIds?: string[]
+    tagCooperationName?: string[]
+    gender?: string
+    niceName?: string
+    qq?: string
+    telephone?: string
+    phone?: string
+    email?: string
+    clientName?: string
+    keynum?: string
+    companyName?: string
+    unit?: string
+    fax?: string
+    webservice?: string
+    department?: string
+    position?: string
+    office?: string
+    address?: string
+    tooltip?: string
+    ride?: string
+    stay?: string
+    landmarks?: string
+    mark?: string
+    priority?: string
+    createTime?: string
+    serviceTime?: any
+  }
+
+  enum SellStatus {}
+
+  enum preserveStatus {}
+
+  /** 软件锁 */
+  type SoftwareLongleItem = {
+    id: string
+    categoryId?: string
+    clientId?: string
+    responsibleId?: string
+    customerId?: string
+    departmentId?: string
+    departmentName?: string
+    customerName?: string
+    category?: string
+    status?: number
+    stockStatus?: number
+    sellStatus?: SellStatus
+    preserveStatus?: preserveStatus
+    stockTime?: string
+    sellTime?: string
+    preserveTime?: string
+    statusLog?: string
+    statusT?: string
+    keyNum?: string
+    serialNumber?: string
+    product?: string
+    allotedTime?: string
+    makeDay?: string
+    responsible?: string
+    version?: string
+    client?: string
+    licences?: string
+    authorizeStr?: string
+    authorizeFile?: string
+    updateStr?: string
+    updateFile?: string
   }
 }