订单售后v3

This commit is contained in:
2022-06-21 20:32:27 +08:00
parent f92a8913f4
commit 51ff3eefe7
26 changed files with 1111 additions and 220 deletions
@@ -0,0 +1,66 @@
.apply_after_sales_con{
padding: 20px;
.returnSaleInput_item{
display: flex;
align-items: center;
padding-bottom: 50px;
flex-wrap: wrap;
.title{
font-size: $font_size;
font-weight: 700;
width: 119px;
}
.select{
flex:1;
height: 60px;
border: 2px solid #e6e6e6;
border-radius: 10px;
margin-left: 20px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
font-size: 26px;
color: $color_font_two;
.miconfont{
font-size: 30px;
}
}
.upload_image{
flex:1;
}
}
.btns_con{
width: 100%;
bottom:0;
box-sizing: border-box;
margin-top: 50px;
.btns_two{
display: flex;
height: 82px;
// border: 1PX solid #007aff;
font-size: $font_size_big;
border-radius: 40px;
margin-bottom: 20px;
.rest_btn{
flex:1;
border: 1PX solid #007aff;
border-radius: 40px 0 0 40px;
text-align: center;
line-height: 82px;
color: $color_main;
background-color: #fff;
}
.verify_btn{
flex:1;
border-radius: 0 40px 40px 0;
background: #007aff;
text-align: center;
line-height: 82px;
color: #fff;
}
}
}
}
@@ -1,9 +1,57 @@
import { memo } from "react";
import Popup from "@/components/popup";
import TextareaEnhance from "@/components/textareaEnhance";
import { ScrollView, Text, View } from "@tarojs/components";
import { memo, useCallback, useState } from "react";
import ReasonPopup from "../reasonPopup";
import styles from './index.module.scss'
import classnames from "classnames";
type Param = {
show?: true|false,
onClose?: () => void
}
export default memo(({show, onClose}:Param) => {
const getOtherReason = useCallback(() => {
}, [])
const onSubmit = (val) => {
}
//显示说明
const [showReason, setShowReason] = useState(false)
const closeReason = useCallback(() => {
setShowReason(false)
}, [])
const onShowReason = () => {
setShowReason(true)
}
export default memo(() => {
return (
<>
123123
<Popup show={show} title="申请退款" onClose={onClose} >
<View className={styles.apply_after_sales_con}>
<View className={styles.returnSaleInput_item}>
<View className={styles.title}>退款说明</View>
<View className={styles.select} onClick={() => onShowReason()}>
<Text>请选择</Text>
<Text className={classnames(styles.miconfont, 'iconfont icon-a-moreback')}></Text>
</View>
</View>
<TextareaEnhance onChange={getOtherReason} title='备注' placeholder="请输入退款备注"/>
<View className={styles.btns_con}>
<View className={styles.btns_two}>
<View className={styles.rest_btn} onClick={() => onSubmit(1)}>取消</View>
<View className={styles.verify_btn } onClick={() => onSubmit(2)}>确认</View>
</View >
</View>
</View>
</Popup>
<ReasonPopup show={showReason} onClose={closeReason} />
</>
)
})
@@ -0,0 +1,27 @@
.reason_return_con{
height: 50vh;
.reason_title{
padding: 10px 20px 0 20px;
height: 60px;
border-bottom: 1PX solid #F3F3F3;
box-sizing: border-box;
Text{
font-size: 26px;
border-bottom: 3px solid #000;
padding: 10px;
font-weight: 400;
}
}
.reason_scroll{
height: calc(100% - 70px);
.reason_list{
font-size: 26px;
padding: 30px 20px 0 20px;
color: #707070;
.reason_item{
margin-bottom: 36px;
}
}
}
}
@@ -0,0 +1,37 @@
import Popup from "@/components/popup";
import { ScrollView, Text, View } from "@tarojs/components";
import { memo, useMemo } from "react";
import styles from './index.module.scss'
//原因选择
type ReasonInfoParam = {
show?: boolean,
onClose?: () => void,
}
export default memo(({show = false, onClose}: ReasonInfoParam) => {
return (
<Popup showIconButton={false} show={show} title="退款说明" onClose={onClose} >
<View className={styles.reason_return_con}>
<View className={styles.reason_title}><Text>退款说明</Text></View>
<ScrollView scrollY className={styles.reason_scroll}>
<View className={styles.reason_list}>
<View className={styles.reason_item}>完好无损带原标签</View>
<View className={styles.reason_item}>完好无损带原标签</View>
<View className={styles.reason_item}>完好无损带原标签</View>
<View className={styles.reason_item}>完好无损带原标签</View>
<View className={styles.reason_item}>完好无损带原标签</View>
<View className={styles.reason_item}>完好无损带原标签</View>
<View className={styles.reason_item}>完好无损带原标签</View>
<View className={styles.reason_item}>完好无损带原标签</View>
<View className={styles.reason_item}>完好无损带原标签</View>
<View className={styles.reason_item}>完好无损带原标签</View>
<View className={styles.reason_item}>完好无损带原标签</View>
<View className={styles.reason_item}>完好无损带原标签</View>
<View className={styles.reason_item}>完好无损带原标签</View>
<View className={styles.reason_item}>完好无损带原标签</View>
</View>
</ScrollView>
</View>
</Popup>
)
})
+8 -2
View File
@@ -1,18 +1,24 @@
import Popup from "@/components/popup"
import { Textarea, View } from "@tarojs/components"
import { useCallback, useState } from "react"
import { useCallback, useEffect, useState } from "react"
import styles from './index.module.scss'
type Param = {
onBlur?: (val:any) => void
onSave?: (val: string) => void
defaultValue?: string
}
export default ({onBlur, onSave}:Param) => {
export default ({onBlur, onSave, defaultValue = ''}:Param) => {
const [descData, setDescData] = useState({
number: 0,
value: '',
count: 200
})
useEffect(() => {
getDesc(defaultValue)
}, [defaultValue])
const getDesc = useCallback((e) => {
let value = e.detail.value
let res = value
+12 -2
View File
@@ -15,6 +15,7 @@ import Taro, { useDidShow, usePullDownRefresh, useRouter } from "@tarojs/taro";
import classnames from "classnames";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import AddressInfoDetail from "./components/addressInfoDetail";
import ApplyRefund from "./components/applyRefund";
import KindList from "./components/kindList";
import OrderState from "./components/orderState";
import Payment from "./components/payment";
@@ -149,7 +150,10 @@ import styles from './index.module.scss'
}else if(val == 2) {
//待付款
toPay()
} else if(val == 3) {
setRefundShow(true)
}
}, [orderDetail])
//页面下拉刷新
@@ -189,6 +193,12 @@ import styles from './index.module.scss'
getSaleOrderPreView()
}, [orderDetail])
//退款申请
const [refundShow, setRefundShow] = useState(false)
const applyRefundClose = useCallback(() => {
setRefundShow(false)
}, [])
return (
<View className={styles.order_main}>
<OrderState orderInfo={orderDetail} onRefresh={refresh}/>
@@ -224,10 +234,10 @@ import styles from './index.module.scss'
<View className="common_safe_area_y"></View>
</View> }
<Popup show={showDesc} showTitle={false} onClose={() => setShowDesc(false)}>
<Remark onSave={(e) => getRemark(e)}/>
<Remark onSave={(e) => getRemark(e)} defaultValue={orderDetail?.remark}/>
</Popup>
<Payment onSubmitSuccess={onPaySuccess} show={payMentShow} onClose={closePayShow} orderInfo={orderDetail} />
<ApplyRefund show={refundShow} onClose={applyRefundClose}/>
<View className="common_safe_area_y"></View>
</View>
)