✨ feat(ID1001621): 【订单详情】-待发货状态且货到付款状态时,不是申请退款,是“取消订单”
【【订单详情】-待发货状态且货到付款状态时,不是申请退款,是“取消订单”】 https://www.tapd.cn/53459131/bugtrace/bugs/view/1153459131001001621
This commit is contained in:
parent
0aa47cb0e5
commit
2510e7ac93
@ -1,10 +1,10 @@
|
||||
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.89: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 = '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 = `https://dev.zzfzyc.com/lymarket` // 开发环境
|
||||
// export const BASE_URL = 'https://www.zzfzyc.com/lymarket' // 正式环境
|
||||
// export const BASE_URL = 'http://192.168.1.7:50002/lymarket' // 添
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
font-size: 32px;
|
||||
font-weight: 500;
|
||||
color: #000000;
|
||||
margin-top: 24px;
|
||||
padding-top: 24px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
@ -97,14 +97,10 @@
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.scrollviewBig {
|
||||
.scrollview {
|
||||
// height: 300px;
|
||||
|
||||
.kongBox {
|
||||
height: 181px;
|
||||
width: 100%;
|
||||
}
|
||||
.virtualList {
|
||||
.kongBox {
|
||||
height: 181px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,8 +131,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
.scrllStyle {
|
||||
.popupHeight {
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
height: 75vh;
|
||||
.shopcartBox {
|
||||
flex: 1 1 auto;
|
||||
display: flex;
|
||||
flex-flow: column nowrap;
|
||||
overflow: hidden;
|
||||
.virtualListContainer {
|
||||
flex: 1 1 auto;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 底部按钮
|
||||
.bottomBox {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Button, ScrollView, View } from '@tarojs/components'
|
||||
import Taro, { useDidShow } from '@tarojs/taro'
|
||||
import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'
|
||||
import Taro, { nextTick, useDidShow } from '@tarojs/taro'
|
||||
import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from 'react'
|
||||
import classnames from 'classnames'
|
||||
import VirtualList from '@tarojs/components/virtual-list'
|
||||
import Divider from '../divider'
|
||||
@ -154,10 +154,48 @@ const ShoppingCart = (props: prosObj, ref) => {
|
||||
})
|
||||
}
|
||||
|
||||
const [virtualListHeight, setVirtualListHeight] = useState(400)
|
||||
|
||||
useLayoutEffect(() => {
|
||||
console.log('useEffect')
|
||||
if (showPopup && goodList.length !== 0) {
|
||||
getVirtualListHeight()
|
||||
}
|
||||
}, [showPopup, goodList])
|
||||
|
||||
const getVirtualListHeight = () => {
|
||||
nextTick(() => {
|
||||
const query = Taro.createSelectorQuery()
|
||||
query.select('#virtualListContainer').boundingClientRect((res) => {
|
||||
console.log(res)
|
||||
const virtualListHeight = res.height
|
||||
console.log('setVirtualListHeight res', res)
|
||||
setVirtualListHeight(virtualListHeight)
|
||||
})
|
||||
query.exec()
|
||||
})
|
||||
}
|
||||
|
||||
// useLayoutEffect(() => {
|
||||
// console.log('useLayoutEffect')
|
||||
// if (showPopup) {
|
||||
// const query = Taro.createSelectorQuery()
|
||||
// query.select('#shopCartBox').boundingClientRect()
|
||||
// query.select('#virtualList').boundingClientRect()
|
||||
// query.exec((res) => {
|
||||
// console.log(res)
|
||||
// const shopCartBoxHeight = res[0].height
|
||||
// const virtualListTop = res[1].top
|
||||
// console.log('setVirtualListHeight res', res)
|
||||
// setVirtualListHeight(shopCartBoxHeight - virtualListTop)
|
||||
// })
|
||||
// }
|
||||
// }, [showPopup])
|
||||
|
||||
return (
|
||||
<Popup showTitle={false} show={showPopup} onClose={() => closePopup?.()}>
|
||||
<ScrollView className={styles.scrllStyle} id="scroll" scrollY>
|
||||
<View className={styles.shopcartBox}>
|
||||
<View className={styles.popupHeight}>
|
||||
<View className={styles.shopcartBox} id="shopCartBox">
|
||||
<View className={styles.topTitle}>
|
||||
{formatHashTag(obj?.code, obj?.name)}
|
||||
</View>
|
||||
@ -198,12 +236,12 @@ const ShoppingCart = (props: prosObj, ref) => {
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
{goodList.length > 0 && (
|
||||
<>
|
||||
<View className={styles.scrollviewBig}>
|
||||
<View id="virtualListContainer" className={styles.virtualListContainer}>
|
||||
{goodList.length > 0 && (
|
||||
<>
|
||||
<VirtualList
|
||||
className={styles.scrollview}
|
||||
height={400} /* 列表的高度 */
|
||||
className={styles.virtualList}
|
||||
height={virtualListHeight} /* 列表的高度 */
|
||||
width="100%" /* 列表的宽度 */
|
||||
itemData={goodList} /* 渲染列表的数据 */
|
||||
itemCount={goodList.length + 0} /* 渲染列表的长度 */
|
||||
@ -212,31 +250,31 @@ const ShoppingCart = (props: prosObj, ref) => {
|
||||
>
|
||||
{Rows}
|
||||
</VirtualList>
|
||||
</View>
|
||||
|
||||
<View className={styles.kongOne}></View>
|
||||
</>
|
||||
)}
|
||||
{/* <View className={styles.kongOne}></View> */}
|
||||
</>
|
||||
)}
|
||||
</View>
|
||||
{goodList.length === 0 && (
|
||||
<View className={styles.loading_more}>
|
||||
暂无更多
|
||||
{/* <DotLoading /> */}
|
||||
</View>
|
||||
)}
|
||||
{!hasBottom && <View style={{ height: '100rpx' }}></View>}
|
||||
{/* {!hasBottom && <View style={{ height: '100rpx' }}></View>} */}
|
||||
</View>
|
||||
<View className={styles.noBottom}>
|
||||
<View className={styles.bottomBox}>
|
||||
<View className={styles.leftBottom} onClick={navTo}>
|
||||
<View className={styles.nowFont}>当前客户:</View>
|
||||
<View className={styles.selctFont}>{clientName === '' ? '请选择客户 >' : `${clientName} >`}</View>
|
||||
</View>
|
||||
<View className={styles.rightBottom}>
|
||||
<NormalButton round type="primary" disabled={isDisabled} onClick={handBuyNow}>立即购买</NormalButton>
|
||||
<NormalButton round type="primary" disabled={isDisabled} onClick={handSure}>加入购物车</NormalButton>
|
||||
</View>
|
||||
</View >
|
||||
</View>
|
||||
</ScrollView>
|
||||
<View className={styles.noBottom}>
|
||||
<View className={styles.bottomBox}>
|
||||
<View className={styles.leftBottom} onClick={navTo}>
|
||||
<View className={styles.nowFont}>当前客户:</View>
|
||||
<View className={styles.selctFont}>{clientName === '' ? '请选择客户 >' : `${clientName} >`}</View>
|
||||
</View>
|
||||
<View className={styles.rightBottom}>
|
||||
<NormalButton round type="primary" disabled={isDisabled} onClick={handBuyNow}>立即购买</NormalButton>
|
||||
<NormalButton round type="primary" disabled={isDisabled} onClick={handSure}>加入购物车</NormalButton>
|
||||
</View>
|
||||
</View >
|
||||
</View>
|
||||
</Popup>
|
||||
)
|
||||
|
||||
@ -63,7 +63,7 @@ const BottomApply = (props: prosObj) => {
|
||||
|| (obj.sale_mode === 0 && obj.status == 7 && obj.collect_status == 2 && goodsObj?.av_return_product?.length)
|
||||
|| (obj.sale_mode === 0 && obj.status == 7 && obj.collect_status == 3 && goodsObj?.av_return_product?.length)
|
||||
|| (obj.sale_mode === 0 && obj.status == 11 && (obj.collect_status == 1 || obj.collect_status == 2) && goodsObj?.av_return_product?.length)
|
||||
|| (obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 0 && goodsObj?.av_return_product?.length && !obj.is_shipper_picks_up)
|
||||
// || (obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 0 && goodsObj?.av_return_product?.length && !obj.is_shipper_picks_up)
|
||||
|| (obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 2 && goodsObj?.av_return_product?.length && !obj.is_shipper_picks_up)
|
||||
|| (obj.sale_mode === 0 && obj.status == 3 && obj.collect_status == 1 && goodsObj?.av_return_product?.length && !obj.is_shipper_picks_up)
|
||||
|| (obj.sale_mode === 1 && obj.status == 0 && goodsObj?.av_return_product?.length)
|
||||
@ -129,7 +129,8 @@ const BottomApply = (props: prosObj) => {
|
||||
|| (obj.sale_mode === 2 && obj.status === 0 && obj.collect_status == 0)
|
||||
|| (obj.sale_mode === 1 && obj.status === 10)
|
||||
|| (obj.sale_mode === 2 && obj.status === 10)
|
||||
|| (obj.sale_mode === 0 && obj.status === 13)
|
||||
|| (obj.sale_mode === 0 && obj.status === 13)
|
||||
|| (obj.collect_status == 0)
|
||||
) {
|
||||
return true
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user