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(),