From 2d57f586d47849ce415adf1fb37c6b990c8e7e11 Mon Sep 17 00:00:00 2001 From: Haiyi <1021441632@qq.com> Date: Tue, 6 Dec 2022 13:49:50 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix(=E9=80=80=E6=AC=BE=E7=A0=81?= =?UTF-8?q?=E5=8D=95):=E9=85=8D=E5=90=88=E5=90=8E=E7=AB=AF=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/RefundCodelist/index.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/RefundCodelist/index.tsx b/src/components/RefundCodelist/index.tsx index f7f4207..05575bd 100644 --- a/src/components/RefundCodelist/index.tsx +++ b/src/components/RefundCodelist/index.tsx @@ -21,6 +21,15 @@ const RefundCodelist = (props: Props) => { const { fetchData: payFetch } = GetReturnPayCode() const [PicUrl, setPicUrl] = useState('') + const totalNums = useMemo(() => { + if (props?.obj.type == 1 || props?.obj.type == 3) { + return props?.obj.quality_check_pass_number + } + else { + return props?.obj.total_number + } + }, [props?.obj]) + const getPic = async() => { Taro.showLoading({ title: '请稍等...', @@ -28,7 +37,7 @@ const RefundCodelist = (props: Props) => { }) const list: any = [] let arr: any[] = [] - if (props.obj.type == 1) { + if (props.obj.type == 1 || props?.obj.type == 3) { arr = props.obj.quality_check_pass_product } else { @@ -68,7 +77,7 @@ const RefundCodelist = (props: Props) => { order_total_price: ( props.obj.refund_amount / 100 ).toString(), - order_total_num: props.obj.total_number.toString(), + order_total_num: totalNums.toString(), order_total_settle_weight: ( props.obj.order_total_settle_weight / 1000 ).toString(),