feat(ID1000741):付款后不能修改的发货方式的按钮优化

This commit is contained in:
Haiyi 2022-12-12 17:56:18 +08:00
parent 53467bc5be
commit cb3d4b8734
3 changed files with 74 additions and 35 deletions

View File

@ -1,7 +1,7 @@
.addressBox { .addressBox {
margin-right: 24px; margin-right: 24px;
// width: 702px; // width: 702px;
height: 223px; min-height: 223px;
background: #ffffff; background: #ffffff;
border-radius: 16px; border-radius: 16px;
margin-top: 24px; margin-top: 24px;
@ -33,7 +33,6 @@
width: 461px; width: 461px;
height: 78px; height: 78px;
font-size: 28px; font-size: 28px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #000000; color: #000000;
margin-right: 41px; margin-right: 41px;
@ -63,28 +62,36 @@
.bottom { .bottom {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: space-between;
margin-top: 24px; margin-top: 44px;
.reatName {
.name {
line-height: 34px;
width: 84px;
height: 34px;
@include common_ellipsis();
font-size: 28px; font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC; font-weight: 500;
font-weight: 400; color: #337fff;
color: #343434; margin-right: 32px;
margin-right: 16px;
} }
.leftbottom {
margin-left: 120px;
display: flex;
align-items: center;
.name {
line-height: 34px;
width: 84px;
height: 34px;
@include common_ellipsis();
font-size: 28px;
font-weight: 400;
color: #343434;
margin-right: 16px;
}
.phone { .phone {
height: 34px; height: 34px;
font-size: 28px; font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC; font-weight: 400;
font-weight: 400; color: #343434;
color: #343434; // margin-right: 70px;
margin-right: 70px; }
} }
.reatBox { .reatBox {

View File

@ -10,6 +10,8 @@ interface propsObj {
onReceivingStatus?: (any, Number) => void onReceivingStatus?: (any, Number) => void
obj?: any obj?: any
navSelect?: (any) => void navSelect?: (any) => void
showBtn?: boolean
showWhatFont?: string
} }
const AddressDetailBox = (props: propsObj) => { const AddressDetailBox = (props: propsObj) => {
const { const {
@ -17,6 +19,8 @@ const AddressDetailBox = (props: propsObj) => {
onReceivingStatus, onReceivingStatus,
obj = {}, obj = {},
navSelect, navSelect,
showBtn = true,
showWhatFont = '',
} = props } = props
return ( return (
@ -43,21 +47,28 @@ const AddressDetailBox = (props: propsObj) => {
</View> </View>
<View className={styles.line}></View> <View className={styles.line}></View>
<View className={styles.bottom}> <View className={styles.bottom}>
<View className={styles.name}>{receivingStatus === 1 ? '谭先生' : obj.target_user_name}</View> <View className={styles.leftbottom}>
<View className={styles.phone}>{receivingStatus === 1 ? 13242128982 : obj.purchaser_phone}</View> <View className={styles.name}>{receivingStatus === 1 ? '谭先生' : obj.target_user_name}</View>
<View className={styles.reatBox}> <View className={styles.phone}>{receivingStatus === 1 ? 13242128982 : obj.purchaser_phone}</View>
<View className={styles.updateBtn}>
<View className={styles.updateBtn_list}>
<View className={classnames(styles.updateBtn_item, receivingStatus == 1 && styles.updateBtn_item_select)} onClick={e => onReceivingStatus?.(e, 1)}>
</View>
<View className={classnames(styles.updateBtn_item, receivingStatus == 2 && styles.updateBtn_item_select)} onClick={e => onReceivingStatus?.(e, 2)}>
</View>
</View>
<View style={{ transform: receivingStatus == 1 ? 'translateX(0)' : 'translateX(100%)' }} className={classnames(styles.updateBtn_select)}></View>
</View>
</View> </View>
{
showBtn && <View className={styles.reatBox}>
<View className={styles.updateBtn}>
<View className={styles.updateBtn_list}>
<View className={classnames(styles.updateBtn_item, receivingStatus == 1 && styles.updateBtn_item_select)} onClick={e => onReceivingStatus?.(e, 1)}>
</View>
<View className={classnames(styles.updateBtn_item, receivingStatus == 2 && styles.updateBtn_item_select)} onClick={e => onReceivingStatus?.(e, 2)}>
</View>
</View>
<View style={{ transform: receivingStatus == 1 ? 'translateX(0)' : 'translateX(100%)' }} className={classnames(styles.updateBtn_select)}></View>
</View>
</View>
}
{
!showBtn && <View className={styles.reatName}>{showWhatFont}</View>
}
</View> </View>
</View > </View >
) )

View File

@ -614,6 +614,25 @@ const OrderDetails = () => {
}) })
} }
// 是否显示按钮
const showBtn = useMemo(() => {
if (receivingStatus === 1 || (infoObj.status === 8 || infoObj.status === 9 || infoObj.status === 4 || infoObj.status === 5 || infoObj.status === 11 || infoObj.status === 3)) {
return false
}
else {
return true
}
}, [infoObj])
const showWhatFont = useMemo(() => {
if (infoObj.shipment_mode === 1) {
return '自提商品'
}
else {
return '物流'
}
}, [infoObj])
// 申请退货 // 申请退货
const handApplyGood = () => { const handApplyGood = () => {
if (infoObj.av_return_product.length == 0) { if (infoObj.av_return_product.length == 0) {
@ -744,6 +763,8 @@ const OrderDetails = () => {
infoObj.status === 10 && <AdvanceOrderState orderInfo={infoObj} onRefresh={() => refresh()} /> infoObj.status === 10 && <AdvanceOrderState orderInfo={infoObj} onRefresh={() => refresh()} />
} }
<AddressDetailBox <AddressDetailBox
showBtn={showBtn}
showWhatFont={showWhatFont}
navSelect={obj => handSelect(obj)} navSelect={obj => handSelect(obj)}
obj={infoObj} obj={infoObj}
receivingStatus={receivingStatus} receivingStatus={receivingStatus}