Explorar el Código

feat: 云版详情cld客户详情

outaozhen hace 4 años
padre
commit
c0942f5987

+ 1 - 8
src/pages/Product/Cloud/components/Detail/Form.jsx

@@ -1,6 +1,5 @@
 import React from 'react'
-import { Row, Col, Button } from 'antd'
-import { LinkOne } from '@icon-park/react'
+import { Row, Col } from 'antd'
 import EditableForm from '@/components/EditableForm'
 
 const RoadpricingForm = props => {
@@ -93,12 +92,6 @@ const RoadpricingForm = props => {
         tartgetUrl="/cloud/update"
         type={updateKey}
       />
-      <div className="text-center mt-6">
-        <Button type="primary" ghost size="small">
-          <LinkOne size="14" />
-          <span className="ml-5px">关联CLD客户</span>
-        </Button>
-      </div>
     </div>
   )
 }

+ 22 - 4
src/pages/Product/Cloud/components/Detail/index.jsx

@@ -1,8 +1,10 @@
 import React, { useState, useEffect } from 'react'
-import { Row, Col } from 'antd'
+import { Row, Col, Button } from 'antd'
+import { LinkOne, LinkInterrupt } from '@icon-park/react'
 import { connect } from 'umi'
 import consts from '@/consts'
 import Form from './Form'
+import ClientDetail from '@/pages/Customer/Client/components/ClientDetail/Form'
 import LowerList from './LowerList'
 import TabList from './TabList'
 import { apiRoadpricingDetail } from '@/services/product'
@@ -15,12 +17,13 @@ const Detail = props => {
     cloudUser: {},
     compilationList: [],
     log: [],
-    serviceLog: []
+    serviceLog: [],
+    client: []
   })
   const initData = async id => {
     setState({ ...state, loading: true })
     const {
-      data: { cloudUser = {}, compilationList = [], log = [], serviceLog = [] },
+      data: { cloudUser = {}, compilationList = [], log = [], serviceLog = [], client = [] },
       code = -1
     } = await apiRoadpricingDetail({ ssoId: id, projectType })
     if (code === consts.RET_CODE.SUCCESS) {
@@ -30,7 +33,7 @@ const Detail = props => {
           payload: updateKey
         })
       }
-      setState({ ...state, cloudUser, compilationList, log, serviceLog, loading: false })
+      setState({ ...state, cloudUser, compilationList, log, serviceLog, client, loading: false })
     }
   }
   useEffect(() => {
@@ -50,6 +53,21 @@ const Detail = props => {
           className="sheet-box-left">
           <div className="sheet-left-panel pr-4">
             <Form cloudUser={state.cloudUser} updateKey={updateKey} projectType={projectType} />
+            <div className="mt-4">
+              <ClientDetail client={state.client} />
+            </div>
+            <div className="text-center mt-6">
+              <Button type="primary" ghost size="small">
+                <LinkOne size="14" />
+                <span className="ml-5px">关联CLD客户</span>
+              </Button>
+            </div>
+            <div className="text-center mt-6">
+              <Button type="primary" ghost size="small">
+                <LinkInterrupt size="14" />
+                <span className="ml-5px">移除CLD客户</span>
+              </Button>
+            </div>
           </div>
         </Col>
         <Col