From cb3d4b8734e94905cf965d90f4ae5eee5827296a Mon Sep 17 00:00:00 2001 From: Haiyi <1021441632@qq.com> Date: Mon, 12 Dec 2022 17:56:18 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(ID1000741):=E4=BB=98=E6=AC=BE?= =?UTF-8?q?=E5=90=8E=E4=B8=8D=E8=83=BD=E4=BF=AE=E6=94=B9=E7=9A=84=E5=8F=91?= =?UTF-8?q?=E8=B4=A7=E6=96=B9=E5=BC=8F=E7=9A=84=E6=8C=89=E9=92=AE=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../addressDetailBox/index.module.scss | 49 +++++++++++-------- .../components/addressDetailBox/index.tsx | 39 +++++++++------ src/pages/orderDetails/index.tsx | 21 ++++++++ 3 files changed, 74 insertions(+), 35 deletions(-) diff --git a/src/pages/orderDetails/components/addressDetailBox/index.module.scss b/src/pages/orderDetails/components/addressDetailBox/index.module.scss index 8d29843..5af4958 100644 --- a/src/pages/orderDetails/components/addressDetailBox/index.module.scss +++ b/src/pages/orderDetails/components/addressDetailBox/index.module.scss @@ -1,7 +1,7 @@ .addressBox { margin-right: 24px; // width: 702px; - height: 223px; + min-height: 223px; background: #ffffff; border-radius: 16px; margin-top: 24px; @@ -33,7 +33,6 @@ width: 461px; height: 78px; font-size: 28px; - font-family: PingFangSC-Medium, PingFang SC; font-weight: 500; color: #000000; margin-right: 41px; @@ -63,28 +62,36 @@ .bottom { display: flex; align-items: center; - justify-content: flex-end; - margin-top: 24px; - - .name { - line-height: 34px; - width: 84px; - height: 34px; - @include common_ellipsis(); + justify-content: space-between; + margin-top: 44px; + .reatName { font-size: 28px; - font-family: PingFangSC-Regular, PingFang SC; - font-weight: 400; - color: #343434; - margin-right: 16px; + font-weight: 500; + color: #337fff; + margin-right: 32px; } + .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 { - height: 34px; - font-size: 28px; - font-family: PingFangSC-Regular, PingFang SC; - font-weight: 400; - color: #343434; - margin-right: 70px; + .phone { + height: 34px; + font-size: 28px; + font-weight: 400; + color: #343434; + // margin-right: 70px; + } } .reatBox { diff --git a/src/pages/orderDetails/components/addressDetailBox/index.tsx b/src/pages/orderDetails/components/addressDetailBox/index.tsx index 002f951..73c051e 100644 --- a/src/pages/orderDetails/components/addressDetailBox/index.tsx +++ b/src/pages/orderDetails/components/addressDetailBox/index.tsx @@ -10,6 +10,8 @@ interface propsObj { onReceivingStatus?: (any, Number) => void obj?: any navSelect?: (any) => void + showBtn?: boolean + showWhatFont?: string } const AddressDetailBox = (props: propsObj) => { const { @@ -17,6 +19,8 @@ const AddressDetailBox = (props: propsObj) => { onReceivingStatus, obj = {}, navSelect, + showBtn = true, + showWhatFont = '', } = props return ( @@ -43,21 +47,28 @@ const AddressDetailBox = (props: propsObj) => { - {receivingStatus === 1 ? '谭先生' : obj.target_user_name} - {receivingStatus === 1 ? 13242128982 : obj.purchaser_phone} - - - - onReceivingStatus?.(e, 1)}> - 自提 - - onReceivingStatus?.(e, 2)}> - 物流 - - - - + + {receivingStatus === 1 ? '谭先生' : obj.target_user_name} + {receivingStatus === 1 ? 13242128982 : obj.purchaser_phone} + { + showBtn && + + + onReceivingStatus?.(e, 1)}> + 自提 + + onReceivingStatus?.(e, 2)}> + 物流 + + + + + + } + { + !showBtn && {showWhatFont} + } ) diff --git a/src/pages/orderDetails/index.tsx b/src/pages/orderDetails/index.tsx index 5ac0dbe..0e95016 100644 --- a/src/pages/orderDetails/index.tsx +++ b/src/pages/orderDetails/index.tsx @@ -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 = () => { if (infoObj.av_return_product.length == 0) { @@ -744,6 +763,8 @@ const OrderDetails = () => { infoObj.status === 10 && refresh()} /> } handSelect(obj)} obj={infoObj} receivingStatus={receivingStatus}