Selaa lähdekoodia

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

outaozhen 4 vuotta sitten
vanhempi
commit
3b0af08a34

+ 0 - 2
src/components/ModalStore/src/CreateProvider.tsx

@@ -82,8 +82,6 @@ const ModalStore: React.FC<ModalStoreProps> = props => {
   }
   }
 
 
   function push(key: string, compState: any) {
   function push(key: string, compState: any) {
-    console.log(key)
-
     const isDrawer = key.startsWith('D')
     const isDrawer = key.startsWith('D')
     // eslint-disable-next-line no-param-reassign
     // eslint-disable-next-line no-param-reassign
     key = isDrawer && compState?.dataId ? `${key}@${compState?.dataId}` : key
     key = isDrawer && compState?.dataId ? `${key}@${compState?.dataId}` : key

+ 1 - 0
src/models/refresh.js

@@ -24,6 +24,7 @@ export default {
     changState(state, action) {
     changState(state, action) {
       if (isObject(action.payload)) {
       if (isObject(action.payload)) {
         const { main, target } = action.payload
         const { main, target } = action.payload
+        console.log({ ...state, [main]: !state[main], [target]: !state[target] })
         return { ...state, [main]: !state[main], [target]: !state[target] }
         return { ...state, [main]: !state[main], [target]: !state[target] }
       }
       }
       if (isUnDef(state[action.payload])) {
       if (isUnDef(state[action.payload])) {

+ 2 - 0
src/pages/Customer/Client/index.jsx

@@ -31,6 +31,7 @@ const Client = props => {
     loading,
     loading,
     sourceList
     sourceList
   } = props
   } = props
+  console.log(shouldUpdate)
 
 
   const { initialState: { permData } = { permData: {} } } = useModel('@@initialState')
   const { initialState: { permData } = { permData: {} } } = useModel('@@initialState')
   const tRef = useRef()
   const tRef = useRef()
@@ -163,6 +164,7 @@ const Client = props => {
           <span
           <span
             onClick={() =>
             onClick={() =>
               dispatchModal('D_COMPANY_DETAIL', {
               dispatchModal('D_COMPANY_DETAIL', {
+                updateKey: 'client',
                 dataId: record.companyId,
                 dataId: record.companyId,
                 orderIds: state.orderIds
                 orderIds: state.orderIds
               })
               })

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

@@ -28,6 +28,7 @@ const Company = props => {
     loading
     loading
   } = props
   } = props
 
 
+  console.log(shouldUpdate)
   const { initialState: { permData } = { permData: {} } } = useModel('@@initialState')
   const { initialState: { permData } = { permData: {} } } = useModel('@@initialState')
 
 
   const hasAddPerm = useAccess()?.validatePermByType('company_add')
   const hasAddPerm = useAccess()?.validatePermByType('company_add')
@@ -58,6 +59,7 @@ const Company = props => {
       })
       })
     }
     }
     if (shouldUpdate) {
     if (shouldUpdate) {
+      console.log('1111')
       tRef.current.reload()
       tRef.current.reload()
     }
     }
   }, [shouldUpdate])
   }, [shouldUpdate])

+ 10 - 3
src/pages/Product/Lock/LockStore/index.jsx

@@ -207,7 +207,9 @@ const LockStore = ({ prodList = [], dispatch, shouldUpdate }) => {
       width: 150,
       width: 150,
       render: (text, record) => (
       render: (text, record) => (
         <span
         <span
-          onClick={() => dispatchModal('D_CLIENT_DETAIL', { dataId: record.clientId })}
+          onClick={() =>
+            dispatchModal('D_CLIENT_DETAIL', { updateKey: 'longle', dataId: record.clientId })
+          }
           className="text-primary cursor-pointer hover:text-hex-967bbd"
           className="text-primary cursor-pointer hover:text-hex-967bbd"
         >
         >
           {text}
           {text}
@@ -223,7 +225,7 @@ const LockStore = ({ prodList = [], dispatch, shouldUpdate }) => {
       render: (text, record) => (
       render: (text, record) => (
         <span
         <span
           onClick={() =>
           onClick={() =>
-            dispatchModal('D_COMPANY_DETAIL', { dataId: record.customerId, updateKey: 'longle' })
+            dispatchModal('D_COMPANY_DETAIL', { updateKey: 'longle', dataId: record.customerId })
           }
           }
           className="text-primary cursor-pointer hover:text-hex-967bbd"
           className="text-primary cursor-pointer hover:text-hex-967bbd"
         >
         >
@@ -237,7 +239,12 @@ const LockStore = ({ prodList = [], dispatch, shouldUpdate }) => {
       width: 80,
       width: 80,
       render: (text, record) => (
       render: (text, record) => (
         <span
         <span
-          onClick={() => dispatchModal('D_SOFTWARE_DETAIL', { dataId: record.responsibleId })}
+          onClick={() =>
+            dispatchModal('D_SOFTWARE_DETAIL', {
+              updateKey: 'longle',
+              dataId: record.responsibleId
+            })
+          }
           className="text-primary cursor-pointer hover:text-hex-967bbd"
           className="text-primary cursor-pointer hover:text-hex-967bbd"
         >
         >
           {text}
           {text}