🐞 fix(ID1001211预付款选择预存货款时无法选择):

This commit is contained in:
czm 2023-02-06 18:19:34 +08:00
parent b17e72a32f
commit 1f8387f7f8
2 changed files with 21 additions and 18 deletions

View File

@ -1,11 +1,11 @@
export const BASE_URL = CURRENT_BASE_URL // export const BASE_URL = CURRENT_BASE_URL
// export const BASE_URL = `http://192.168.0.75:50001/lymarket` // export const BASE_URL = `http://192.168.0.75:50001/lymarket`
// export const BASE_URL = `http://192.168.0.89:50001/lymarket` // export const BASE_URL = `http://192.168.0.89:50001/lymarket`
// export const BASE_URL = `http://10.0.0.5:50001/lymarket` // export const BASE_URL = `http://10.0.0.5:50001/lymarket`
// export const BASE_URL = `http://192.168.0.89:40001/lymarket` // export const BASE_URL = `http://192.168.0.89:40001/lymarket`
// export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞 // export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞
// export const BASE_URL = 'https://test.zzfzyc.com/lymarket' // 测试环境 // export const BASE_URL = 'https://test.zzfzyc.com/lymarket' // 测试环境
// export const BASE_URL = 'https://pre.zzfzyc.com/lymarket' // 预发布 export const BASE_URL = 'https://pre.zzfzyc.com/lymarket' // 预发布
// export const BASE_URL = `http://192.168.1.9:40001/lymarket` // 发 // export const BASE_URL = `http://192.168.1.9:40001/lymarket` // 发
// export const BASE_URL = `http://192.168.1.9:50005/lymarket` // 发 // export const BASE_URL = `http://192.168.1.9:50005/lymarket` // 发
// export const BASE_URL = `http://192.168.1.30:50001/lymarket` // 发 // export const BASE_URL = `http://192.168.1.30:50001/lymarket` // 发

View File

@ -90,11 +90,11 @@ const Payment = ({ show = false, onClose, orderInfo, onSubmitSuccess }: Param) =
// 预存款选择 // 预存款选择
const advanceRef = useRef<any>(null) const advanceRef = useRef<any>(null)
const advanceSelectData = useCallback((val) => { const advanceSelectData = useCallback(async(val) => {
setSubmitData(e => ({ ...e, payment_method: val })) setSubmitData(e => ({ ...e, payment_method: val }))
}, []) }, [])
const changeSelect = async() => { const changeSelect = async(e) => {
await openSubscriptionMessage({ orderId: orderInfo?.id, scenes: ToPay.value }) e.stopPropagation()
advanceRef.current.onSelectEven() advanceRef.current.onSelectEven()
} }
@ -120,12 +120,13 @@ const Payment = ({ show = false, onClose, orderInfo, onSubmitSuccess }: Param) =
return false return false
} }
// 账期支付,或预付款并且不是剪板才会订阅 // 账期支付,或预付款并且不是剪板才会订阅
if ( // if (
(submitData.payment_method == PaymentMethodAccountPeriod.value || orderInfo?.status == SaleorderstatusWaitingPrePayment.value) // (submitData.payment_method == PaymentMethodAccountPeriod.value || orderInfo?.status == SaleorderstatusWaitingPrePayment.value)
&& orderInfo?.sale_mode != 1 // && orderInfo?.sale_mode != 1
) { // ) {
await openSubscriptionMessage({ orderId: orderInfo?.id, scenes: ToPay.value }) // await openSubscriptionMessage({ orderId: orderInfo?.id, scenes: ToPay.value })
} // }
await openSubscriptionMessage({ orderId: orderInfo?.id, scenes: ToPay.value })
alert.showLoading('正在支付') alert.showLoading('正在支付')
let res: any = null let res: any = null
if (orderInfo?.should_collect_order_id) { if (orderInfo?.should_collect_order_id) {
@ -224,7 +225,7 @@ const Payment = ({ show = false, onClose, orderInfo, onSubmitSuccess }: Param) =
</View> </View>
</View> </View>
<View className={styles.payment_list_con}> <View className={styles.payment_list_con}>
<View className={styles.payment_list_item} onClick={changeSelect}> <View className={styles.payment_list_item} onClick={e => changeSelect(e)}>
<View className={styles.payment_list_item_left}> <View className={styles.payment_list_item_left}>
<View className={classnames(styles.miconfont)}><IconFont name="icon-yufukuan" size={70} /></View> <View className={classnames(styles.miconfont)}><IconFont name="icon-yufukuan" size={70} /></View>
<View className={styles.payment_list_item_left_name}> <View className={styles.payment_list_item_left_name}>
@ -232,12 +233,14 @@ const Payment = ({ show = false, onClose, orderInfo, onSubmitSuccess }: Param) =
{advance_payment} {advance_payment}
</View> </View>
</View> </View>
<MCheckbox <View onClick={e => e.stopPropagation()}>
ref={advanceRef} <MCheckbox
status={submitData.payment_method == PaymentMethodPreDeposit.value} ref={advanceRef}
onSelect={() => advanceSelectData(PaymentMethodPreDeposit.value)} status={submitData.payment_method == PaymentMethodPreDeposit.value}
onClose={() => advanceSelectData(null)} onSelect={() => advanceSelectData(PaymentMethodPreDeposit.value)}
/> onClose={() => advanceSelectData(null)}
/>
</View>
</View> </View>
<View className={styles.payment_list_item} onClick={openBank}> <View className={styles.payment_list_item} onClick={openBank}>
<View className={styles.payment_list_item_left}> <View className={styles.payment_list_item_left}>