Просмотр исходного кода

Merge branch 'master' of http://192.168.0.115:3000/shaogen1995/qingDao_goods into master

shaogen1995 3 дней назад
Родитель
Сommit
7c4c276b0d

+ 4 - 4
src/pages/Fstorehouse/F4check/F4edit/index.tsx

@@ -121,14 +121,14 @@ function F1editContent() {
     }
   }
 
-  const customTableLastBtn = useMemo(() => {
-    return isLook ? (
+  const customTableLastBtn = (item: GoodsType) => {
+    return info.status === 4 ? (
       <Dropdown
         menu={{
           items: registerMenu,
           style: { width: 100 },
           onClick: ({ key }) => {
-            history.push(`/${key}_edit/1/null?pNum=${info.num}`)
+            history.push(`/${key}_edit/1/null?pNum=${`${info.num},${item.id}`}`)
           }
         }}
         placement='bottom'
@@ -138,7 +138,7 @@ function F1editContent() {
         </Button>
       </Dropdown>
     ) : null
-  }, [history, info.num, isLook])
+  }
 
   useEffect(() => {
     if (!isLook || !info.num) return

+ 2 - 2
src/pages/Zother/SonGoodsList/index.tsx

@@ -40,7 +40,7 @@ type Props = {
   clueShowBtnDisabled?: boolean
   selectGoodsParams?: any
   label?: string
-  customTableLastBtn?: React.ReactNode
+  customTableLastBtn?: (item: GoodsType) => React.ReactNode
   tableLastWidth?: number
 }
 
@@ -103,7 +103,7 @@ function SonGoodsList(
                   />
                 </>
               )}
-              {customTableLastBtn ? customTableLastBtn : null}
+              {customTableLastBtn ? customTableLastBtn(item) : null}
             </>
           )
         }