Sfoglia il codice sorgente

Merge branch 'master' of http://192.168.1.41:3000/outaozhen/cldV2react

outaozhen 5 anni fa
parent
commit
93ecb728c3

+ 13 - 4
config/routes.js

@@ -21,7 +21,13 @@ export default [
           {
             path: '/',
             component: '../layouts/BasicLayout',
-            authority: ['admin', 'client_access'],
+            authority: [
+              'admin',
+              'client_access',
+              'company_access',
+              'business_access',
+              'department_access'
+            ],
             routes: [
               {
                 path: '/',
@@ -72,7 +78,8 @@ export default [
                     path: '/customer/business',
                     name: 'business',
                     icon: 'icon-usd-circle',
-                    component: './Customer/Business'
+                    component: './Customer/Business',
+                    authority: ['admin', 'business_access']
                   },
                   {
                     path: '/customer/test',
@@ -142,13 +149,15 @@ export default [
                 routes: [
                   {
                     path: '/staff',
-                    redirect: '/staff/employee'
+                    redirect: '/staff/employee',
+                    authority: ['admin', 'department_access']
                   },
                   {
                     path: '/staff/employee',
                     name: 'employee',
                     icon: 'icon-users',
-                    component: './Staff/Employee'
+                    component: './Staff/Employee',
+                    authority: ['admin', 'department_access']
                   }
                 ]
               }

+ 9 - 19
src/pages/Customer/Business/components/AddBusiness.jsx

@@ -1,10 +1,4 @@
-import {
-  ModalForm,
-  ProFormDatePicker,
-  ProFormDependency,
-  ProFormSelect,
-  ProFormText
-} from '@ant-design/pro-form'
+import { ModalForm, ProFormDatePicker, ProFormSelect, ProFormText } from '@ant-design/pro-form'
 import ModalDrag from '@/components/DragmModal'
 import { Button, Row, Col, message } from 'antd'
 import { Plus } from '@icon-park/react'
@@ -39,16 +33,13 @@ const AddBusiness = props => {
         }
       }}>
       <ProFormText name="name" label="商机名称" required />
-      <Row>
-        <Col span={12}>
-          <ProFormSelect
-            fieldProps={{ options: groupList }}
-            name="businessGroupId"
-            label="商机状态组"
-            required
-          />
-        </Col>
-        <Col span={12}>
+      <ProFormSelect
+        fieldProps={{ options: groupList }}
+        name="businessGroupId"
+        label="商机状态组"
+        required
+      />
+      {/* <Col span={12}>
           <ProFormDependency name={['businessGroupId']}>
             {({ businessGroupId }) => (
               <ProFormSelect
@@ -63,8 +54,7 @@ const AddBusiness = props => {
               />
             )}
           </ProFormDependency>
-        </Col>
-      </Row>
+        </Col> */}
       <Row>
         <Col span={12}>
           <ProFormText name="price" label="商机金额(元)" required />

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

@@ -8,7 +8,6 @@ import { CloseOne, SmilingFaceWithSquintingEyes } from '@icon-park/react'
 import { MinusCircleOutlined, DownOutlined } from '@ant-design/icons'
 
 const Step = ({ id, statusId, groupStatus = [] }) => {
-  console.log(groupStatus)
   const dispatch = useDispatch()
   const { run: tryChangeStatus } = useRequest(params => changeGroupStatus(params), {
     manual: true,
@@ -47,6 +46,7 @@ const Step = ({ id, statusId, groupStatus = [] }) => {
       if (curr.selected) return idx
       return prev
     }, -1)
+
     const endItemIdx = otherItems.findIndex(item => item.id === statusId)
     const isSelected = mainItems.findIndex(item => item.selected) !== -1
     const isEnd = otherItems.findIndex(item => item.id === statusId) !== -1
@@ -139,13 +139,13 @@ const Step = ({ id, statusId, groupStatus = [] }) => {
       ))}
       <div
         className={`busi-state-item ${
-          op.isEnd ? stateMap[op.otherItems[op.endItemIdx].endProcess].class : 'state-undo'
+          op.isEnd ? stateMap[op.otherItems[op.endItemIdx].key].class : 'state-undo'
         }`}>
         <span className="title">
           {op.isEnd ? (
             <>
-              {stateMap[op.otherItems[op.endItemIdx].endProcess].icon}
-              {stateMap[op.otherItems[op.endItemIdx].endProcess].text}
+              {stateMap[op.otherItems[op.endItemIdx].key].icon}
+              {stateMap[op.otherItems[op.endItemIdx].key].text}
             </>
           ) : (
             <Dropdown overlay={menu}>