|
@@ -15,7 +15,7 @@ import { API_goodFileList } from '@/store/action/C2files'
|
|
import { C3_APIfocus, C3_APIfocusNo } from '@/store/action/C3focus'
|
|
import { C3_APIfocus, C3_APIfocusNo } from '@/store/action/C3focus'
|
|
import { MessageFu } from '@/utils/message'
|
|
import { MessageFu } from '@/utils/message'
|
|
import C22revamp from '@/pages/C_goodsManage/C22goodEdit/C22revamp'
|
|
import C22revamp from '@/pages/C_goodsManage/C22goodEdit/C22revamp'
|
|
-import history from '@/utils/history'
|
|
|
|
|
|
+import history, { useQuery } from '@/utils/history'
|
|
import { statusStorageObj } from '@/utils/tableData'
|
|
import { statusStorageObj } from '@/utils/tableData'
|
|
import { useSelector } from 'react-redux'
|
|
import { useSelector } from 'react-redux'
|
|
import { RootState } from '@/store'
|
|
import { RootState } from '@/store'
|
|
@@ -27,16 +27,20 @@ function Y2look() {
|
|
const goodsInfoPower = useSelector((state: RootState) => state.A0Layout.goodsInfoPower)
|
|
const goodsInfoPower = useSelector((state: RootState) => state.A0Layout.goodsInfoPower)
|
|
const downImg = useSelector((state: RootState) => state.A0Layout.downImg)
|
|
const downImg = useSelector((state: RootState) => state.A0Layout.downImg)
|
|
|
|
|
|
- const { id: sId } = useParams<any>()
|
|
|
|
|
|
+ const { id: sId, menuId } = useParams<any>()
|
|
|
|
+ const query = useQuery()
|
|
|
|
|
|
const [info, setInfo] = useState({} as C1GoodType)
|
|
const [info, setInfo] = useState({} as C1GoodType)
|
|
|
|
|
|
- const getInfoFu = useCallback(async (id: number) => {
|
|
|
|
- const res = await API_goodsInfo(id)
|
|
|
|
- if (res.code === 0) {
|
|
|
|
- setInfo(res.data)
|
|
|
|
- }
|
|
|
|
- }, [])
|
|
|
|
|
|
+ const getInfoFu = useCallback(
|
|
|
|
+ async (id: number) => {
|
|
|
|
+ const res = await API_goodsInfo(id, menuId, query.oId)
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
+ setInfo(res.data)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ [menuId, query.oId]
|
|
|
|
+ )
|
|
|
|
|
|
const handleExport = async () => {
|
|
const handleExport = async () => {
|
|
Promise.all([API_goodFileList(sId), API_getGoodsLedger(sId)]).then(res => {
|
|
Promise.all([API_goodFileList(sId), API_getGoodsLedger(sId)]).then(res => {
|