Commit 1be34e58 authored by GuanHua's avatar GuanHua

fix: 进货单下单跳转,下单类型错误问题

parent 637b9354
...@@ -11,7 +11,7 @@ import { priceFormat, numFormat } from "@/utils/numberFomat" ...@@ -11,7 +11,7 @@ import { priceFormat, numFormat } from "@/utils/numberFomat"
import { useLocalStore, observer } from 'mobx-react' import { useLocalStore, observer } from 'mobx-react'
import ImageBox from '@/components/ImageBox' import ImageBox from '@/components/ImageBox'
import { store } from '@/store' import { store } from '@/store'
import { LAYOUT_TYPE } from '@/constants' import { LAYOUT_TYPE, OrderModalType } from '@/constants'
import { GetSearchShopPurchaseGetPurchaseListResponse } from '@/services/SearchApi' import { GetSearchShopPurchaseGetPurchaseListResponse } from '@/services/SearchApi'
import { GetTemplateWebMemberChannelWebMemberChannelMainResponse } from '@/services/TemplateApi' import { GetTemplateWebMemberChannelWebMemberChannelMainResponse } from '@/services/TemplateApi'
import { isEmpty } from 'lodash' import { isEmpty } from 'lodash'
...@@ -541,6 +541,25 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => { ...@@ -541,6 +541,25 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
} }
/** /**
* 获取下单模式
*/
const getOrderMode = () => {
let mode = OrderModalType.PURCHASE_ORDER
switch (layoutType) {
case LAYOUT_TYPE.channel:
mode = OrderModalType.CHANNEL_DIRECT_PURCHASE_ORDER
break
case LAYOUT_TYPE.ichannel:
mode = OrderModalType.CHANNEL_SPOT_PURCHASE_ORDER
break
default:
mode = OrderModalType.PURCHASE_ORDER
break
}
return mode
}
/**
* 结算 * 结算
*/ */
const handleSettlement = async () => { const handleSettlement = async () => {
...@@ -662,7 +681,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => { ...@@ -662,7 +681,7 @@ const PurchaseOrder: React.FC<PurchaseOrderPropsType> = (props) => {
break break
} }
} else { } else {
history.push(`/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/add?modelType=5&spam_id=${sessionKey}`) history.push(`/memberCenter/tranactionAbility/purchaseOrder/readyAddOrder/add?modelType=${getOrderMode()}&spam_id=${sessionKey}`)
} }
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment