🎈 perf:将确认收货挪出来在订单详情
This commit is contained in:
parent
7cb8cbe9d5
commit
0f281f93c9
@ -12,6 +12,8 @@ interface prosObj {
|
|||||||
cancle?: (any) => void,
|
cancle?: (any) => void,
|
||||||
nextBuy?: (any) => void,
|
nextBuy?: (any) => void,
|
||||||
toPay?: (any) => void,
|
toPay?: (any) => void,
|
||||||
|
handSureGoods?: () => void,
|
||||||
|
showTuiGoods?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export default memo((props: prosObj) => {
|
export default memo((props: prosObj) => {
|
||||||
@ -23,9 +25,11 @@ export default memo((props: prosObj) => {
|
|||||||
payment_method: 0,
|
payment_method: 0,
|
||||||
settle_mode: ''
|
settle_mode: ''
|
||||||
},
|
},
|
||||||
|
showTuiGoods = false,
|
||||||
cancle,
|
cancle,
|
||||||
nextBuy,
|
nextBuy,
|
||||||
toPay
|
toPay,
|
||||||
|
handSureGoods
|
||||||
} = props
|
} = props
|
||||||
//判断显示取消订单
|
//判断显示取消订单
|
||||||
|
|
||||||
@ -75,8 +79,25 @@ export default memo((props: prosObj) => {
|
|||||||
} else return false
|
} else return false
|
||||||
}, [obj])
|
}, [obj])
|
||||||
|
|
||||||
|
//判断显示确认收货
|
||||||
|
const showTake = useMemo(() => {
|
||||||
|
if (
|
||||||
|
(obj.sale_mode === 0 && obj.status == 8 && obj.collect_status == 0) ||
|
||||||
|
(obj.sale_mode === 0 && obj.status == 8 && obj.collect_status == 1) ||
|
||||||
|
(obj.sale_mode === 0 && obj.status == 8 && obj.collect_status == 2) ||
|
||||||
|
(obj.sale_mode === 0 && obj.status == 8 && obj.settle_mode == 3) ||
|
||||||
|
(obj.sale_mode === 1 && obj.status == 8) ||
|
||||||
|
(obj.sale_mode === 2 && obj.status == 8)
|
||||||
|
) {
|
||||||
|
return true
|
||||||
|
} else return false
|
||||||
|
}, [obj])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className={style.flexBox}>
|
<View className={style.flexBox}>
|
||||||
|
{
|
||||||
|
showTake && showTuiGoods && <View className={style.cancle} onClick={() => handSureGoods?.()}>确认收货</View>
|
||||||
|
}
|
||||||
{
|
{
|
||||||
showCancel && <View className={style.cancle} onClick={(e) => cancle?.(e)}>取消订单</View>
|
showCancel && <View className={style.cancle} onClick={(e) => cancle?.(e)}>取消订单</View>
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ interface prosObj {
|
|||||||
}
|
}
|
||||||
handApplyGoods?: () => void,
|
handApplyGoods?: () => void,
|
||||||
handApplyMoney?: () => void,
|
handApplyMoney?: () => void,
|
||||||
handSureGoods?: () => void,
|
// handSureGoods?: () => void,
|
||||||
}
|
}
|
||||||
|
|
||||||
export default memo((props: prosObj) => {
|
export default memo((props: prosObj) => {
|
||||||
@ -26,7 +26,7 @@ export default memo((props: prosObj) => {
|
|||||||
},
|
},
|
||||||
handApplyGoods,
|
handApplyGoods,
|
||||||
handApplyMoney,
|
handApplyMoney,
|
||||||
handSureGoods
|
// handSureGoods
|
||||||
} = props
|
} = props
|
||||||
|
|
||||||
//判断显示申请退货
|
//判断显示申请退货
|
||||||
@ -58,19 +58,7 @@ export default memo((props: prosObj) => {
|
|||||||
return true
|
return true
|
||||||
} else return false
|
} else return false
|
||||||
}, [obj])
|
}, [obj])
|
||||||
//判断显示确认收货
|
|
||||||
const showTake = useMemo(() => {
|
|
||||||
if (
|
|
||||||
(obj.sale_mode === 0 && obj.status == 8 && obj.collect_status == 0) ||
|
|
||||||
(obj.sale_mode === 0 && obj.status == 8 && obj.collect_status == 1) ||
|
|
||||||
(obj.sale_mode === 0 && obj.status == 8 && obj.collect_status == 2) ||
|
|
||||||
(obj.sale_mode === 0 && obj.status == 8 && obj.settle_mode == 3) ||
|
|
||||||
(obj.sale_mode === 1 && obj.status == 8) ||
|
|
||||||
(obj.sale_mode === 2 && obj.status == 8)
|
|
||||||
) {
|
|
||||||
return true
|
|
||||||
} else return false
|
|
||||||
}, [obj])
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -85,13 +73,13 @@ export default memo((props: prosObj) => {
|
|||||||
showTuikuan && <View className={styles.tuikuan} onClick={() => handApplyMoney?.()}>申请退款</View>
|
showTuikuan && <View className={styles.tuikuan} onClick={() => handApplyMoney?.()}>申请退款</View>
|
||||||
|
|
||||||
}
|
}
|
||||||
|
{/*
|
||||||
{
|
{
|
||||||
showTake && <View className={styles.tuikuan} onClick={() => handSureGoods?.()}>确认收货</View>
|
showTake && <View className={styles.tuikuan} onClick={() => handSureGoods?.()}>确认收货</View>
|
||||||
}
|
} */}
|
||||||
|
|
||||||
{
|
{
|
||||||
!showTuihuo && !showTuikuan && !showTake && <View className={styles.title} >暂无更多</View>
|
!showTuihuo && !showTuikuan && <View className={styles.title} >暂无更多</View>
|
||||||
}
|
}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
@ -684,15 +684,16 @@ export default () => {
|
|||||||
obj={infoObj}
|
obj={infoObj}
|
||||||
handApplyGoods={() => handApplyGood?.()}
|
handApplyGoods={() => handApplyGood?.()}
|
||||||
handApplyMoney={() => handApplyMoney?.()}
|
handApplyMoney={() => handApplyMoney?.()}
|
||||||
handSureGoods={() => handSureGoods?.()}
|
|
||||||
></BottomApply>
|
></BottomApply>
|
||||||
</View>
|
</View>
|
||||||
}
|
}
|
||||||
<BottomBtns
|
<BottomBtns
|
||||||
obj={infoObj}
|
obj={infoObj}
|
||||||
|
showTuiGoods
|
||||||
cancle={(e) => cancle?.(e, infoObj)}
|
cancle={(e) => cancle?.(e, infoObj)}
|
||||||
nextBuy={(e) => nextBuy?.(e, infoObj)}
|
nextBuy={(e) => nextBuy?.(e, infoObj)}
|
||||||
toPay={(e) => toPay?.(e, infoObj)}
|
toPay={(e) => toPay?.(e, infoObj)}
|
||||||
|
handSureGoods={() => handSureGoods?.()}
|
||||||
></BottomBtns>
|
></BottomBtns>
|
||||||
</View>
|
</View>
|
||||||
<PayPopup
|
<PayPopup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user