合并
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
.other_desc{
|
||||
padding: 0 20px;
|
||||
box-sizing: border-box;
|
||||
.title{
|
||||
font-size: $font_size;
|
||||
font-weight: 700;
|
||||
}
|
||||
.textarea{
|
||||
position: relative;
|
||||
height: 165.4px;
|
||||
.descDataNum{
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
font-size: 22px;
|
||||
color: #ABABAB;
|
||||
}
|
||||
}
|
||||
.textarea_con, .textarea_con_pretend{
|
||||
background-color: #f3f3f3;
|
||||
border: 2px solid #e6e6e6;
|
||||
border-radius: 10px;
|
||||
width: 100%;
|
||||
font-size: 25px;
|
||||
height: 165.4px;
|
||||
padding: 20px 20px 30px 20px;
|
||||
box-sizing: border-box;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.textarea_con_pretend{
|
||||
color: $color_font_two;
|
||||
}
|
||||
.textarea_con_pretend_ed{
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
import {Textarea, View } from "@tarojs/components";
|
||||
import { memo, useMemo, useState } from "react";
|
||||
import styles from './index.module.scss'
|
||||
import classnames from "classnames";
|
||||
|
||||
//其他说明
|
||||
export default memo(() => {
|
||||
const [descData, setDescData] = useState({
|
||||
number: 0,
|
||||
value: '',
|
||||
count: 200,
|
||||
show: false
|
||||
})
|
||||
const getDesc = (e) => {
|
||||
let value = e.detail.value
|
||||
let res = value
|
||||
if(value.length > descData.count) {
|
||||
res = value.slice(0, descData.count)
|
||||
}
|
||||
setDescData({...descData, number:res.length, value: res})
|
||||
}
|
||||
|
||||
const toggleShowRealTextarea = (show) => {
|
||||
setDescData({...descData, show:show})
|
||||
}
|
||||
return (
|
||||
<View className={styles.other_desc}>
|
||||
<View className={styles.title}>其他说明</View>
|
||||
<View className={styles.textarea}>
|
||||
{descData.show&&<Textarea autoFocus value={descData.value} onBlur={() => toggleShowRealTextarea(false)} className={styles.textarea_con} cursorSpacing={100} maxlength={descData.count} onInput={(e) => getDesc(e)}></Textarea>||
|
||||
<View className={classnames(styles.textarea_con_pretend, descData.value&&styles.textarea_con_pretend_ed)} onClick={() => toggleShowRealTextarea(true)}>{descData.value||'一般情况下选填,当退货说明=“其它问题”时,必填'}</View>
|
||||
}
|
||||
<View className={styles.descDataNum}>{descData.number +'/'+ descData.count}</View>
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
})
|
||||
@@ -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,44 @@
|
||||
import Popup from "@/components/popup";
|
||||
import { ScrollView, Text, View } from "@tarojs/components";
|
||||
import { memo, useMemo } from "react";
|
||||
import styles from './index.module.scss'
|
||||
|
||||
type ReasonParam = 1|2|3 //1 退货原因 2 货物状况 3 退货说明
|
||||
//原因选择
|
||||
type ReasonInfoParam = {
|
||||
show?: boolean,
|
||||
onClose?: () => void,
|
||||
status: ReasonParam
|
||||
}
|
||||
export default memo(({show = false, onClose, status}: ReasonInfoParam) => {
|
||||
const title = useMemo(() => {
|
||||
if(status == 1) return '退货原因'
|
||||
if(status == 2) return '货物状况'
|
||||
if(status == 3) return '退货说明'
|
||||
},[status])
|
||||
return (
|
||||
<Popup showIconButton={false} show={show} title="申请退货" onClose={onClose} >
|
||||
<View className={styles.reason_return_con}>
|
||||
<View className={styles.reason_title}><Text>{title}</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>
|
||||
)
|
||||
})
|
||||
@@ -0,0 +1,4 @@
|
||||
export default {
|
||||
navigationBarTitleText: '申请售后',
|
||||
enableShareAppMessage: true,
|
||||
}
|
||||
+73
-30
@@ -10,6 +10,7 @@
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1PX solid #f3f3f3;
|
||||
text{
|
||||
background-color: #F6F6F6;
|
||||
border-radius: 10px;
|
||||
@@ -22,9 +23,11 @@
|
||||
}
|
||||
}
|
||||
.apply_after_sales_con{
|
||||
height: 80vh;
|
||||
.scroll{
|
||||
height: calc(100% - 80px);
|
||||
height: calc(100% - 170px);
|
||||
}
|
||||
.scroll_con{
|
||||
padding: 20px 0 150px 0;
|
||||
}
|
||||
.returnSaleInput{
|
||||
margin: 0 20px;
|
||||
@@ -34,9 +37,11 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-bottom: 20px;
|
||||
flex-wrap: wrap;
|
||||
.title{
|
||||
font-size: $font_size;
|
||||
font-weight: 700;
|
||||
width: 119px;
|
||||
}
|
||||
.select{
|
||||
flex:1;
|
||||
@@ -67,6 +72,8 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
margin-bottom: 20px;
|
||||
position: relative;
|
||||
.miconfont{
|
||||
font-size: 50px;
|
||||
}
|
||||
@@ -74,39 +81,38 @@
|
||||
font-size: 26px;
|
||||
color: $color_font_three;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
.other_desc{
|
||||
padding: 0 20px;
|
||||
box-sizing: border-box;
|
||||
.title{
|
||||
font-size: $font_size;
|
||||
font-weight: 700;
|
||||
}
|
||||
.uploadImg{
|
||||
position: relative;
|
||||
.descDataNum{
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
font-size: 22px;
|
||||
color: #ABABAB;
|
||||
.ImgItem{
|
||||
width: 202px;
|
||||
height: 150px;
|
||||
background: #f0f0f0;
|
||||
margin-left: 20px;
|
||||
margin-bottom: 20px;
|
||||
position: relative;
|
||||
border-radius: 10px;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.miconfont_close{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background-color: #ccc;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
right: -10px;
|
||||
top: -10px;
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
Textarea{
|
||||
background-color: #f3f3f3;
|
||||
border: 2px solid #e6e6e6;
|
||||
border-radius: 10px;
|
||||
width: 100%;
|
||||
font-size: 25px;
|
||||
height: 165.4px;
|
||||
padding: 20px 20px 30px 20px;
|
||||
box-sizing: border-box;
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.apply_after_sales_list{
|
||||
padding: 0 20px;
|
||||
@@ -172,5 +178,42 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
.btns_con{
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom:0;
|
||||
padding: 0 20px;
|
||||
box-sizing: border-box;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+73
-28
@@ -1,20 +1,36 @@
|
||||
import { Image, ScrollView, Text, Textarea, View } from "@tarojs/components";
|
||||
import { memo, useState } from "react";
|
||||
import { memo, useCallback, useMemo, useState } from "react";
|
||||
import classnames from "classnames";
|
||||
import styles from './index.module.scss'
|
||||
import Popup from "@/components/popup";
|
||||
import { formatImgUrl } from "@/common/fotmat";
|
||||
import Counter from "@/components/counter";
|
||||
import ReasonPopup from "./components/reasonPopup";
|
||||
import OtherReason from "./components/otherReason";
|
||||
import Taro from "@tarojs/taro";
|
||||
import uploadCDNImg from "@/common/uploadImage";
|
||||
|
||||
export default memo(() => {
|
||||
type ReasonParam = 1|2|3 //1 退货原因 2 货物状况 3 退货说明
|
||||
export default () => {
|
||||
const [showDesc, setShowDesc] = useState(true)
|
||||
|
||||
//退货选择弹窗
|
||||
const [showReason, setShowReason] = useState<{show:true|false, status:ReasonParam}>({show:false, status:1})
|
||||
const closeReason = useCallback(() => setShowReason({...showReason, show:false}), [])
|
||||
const onShowReason = (status) => setShowReason({...showReason, status, show:true})
|
||||
|
||||
|
||||
|
||||
//底部按钮
|
||||
const onSubmit = (val) => {
|
||||
|
||||
}
|
||||
|
||||
return (
|
||||
<View className={styles.apply_after_sales_main}>
|
||||
<Popup showIconButton={true} show={showDesc} showTitle={false} onClose={() => setShowDesc(false)} >
|
||||
<View className={styles.apply_after_sales_con}>
|
||||
<View className={styles.apply_after_sales_head}>申请退货</View>
|
||||
<View className={styles.kind_number}><Text>2种面料,3种颜色,共6条</Text></View>
|
||||
<ScrollView scrollY className={styles.scroll}>
|
||||
<View className={styles.apply_after_sales_con}>
|
||||
<View className={styles.kind_number}><Text>2种面料,3种颜色,共6条</Text></View>
|
||||
<ScrollView scrollY className={styles.scroll}>
|
||||
<View className={styles.scroll_con}>
|
||||
<View className={styles.apply_after_sales_list}>
|
||||
<View className={styles.apply_after_sales_item}>
|
||||
<View className={styles.apply_after_sales_title}>
|
||||
@@ -64,45 +80,74 @@ export default memo(() => {
|
||||
<View className={styles.returnSaleInput}>
|
||||
<View className={styles.returnSaleInput_item}>
|
||||
<View className={styles.title}>退货原因</View>
|
||||
<View className={styles.select}>
|
||||
<View className={styles.select} onClick={() => onShowReason(1)}>
|
||||
<Text>请选择</Text>
|
||||
<Text className={classnames(styles.miconfont, 'iconfont icon-a-moreback')}></Text>
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.returnSaleInput_item}>
|
||||
<View className={styles.title}>货物状况</View>
|
||||
<View className={styles.select}>
|
||||
<View className={styles.select} onClick={() => onShowReason(2)}>
|
||||
<Text>请选择</Text>
|
||||
<Text className={classnames(styles.miconfont, 'iconfont icon-a-moreback')}></Text>
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.returnSaleInput_item}>
|
||||
<View className={styles.title}>退货说明</View>
|
||||
<View className={styles.select}>
|
||||
<View className={styles.select} onClick={() => onShowReason(3)}>
|
||||
<Text>请选择</Text>
|
||||
<Text className={classnames(styles.miconfont, 'iconfont icon-a-moreback')}></Text>
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.returnSaleInput_item}>
|
||||
<View className={styles.title}>拍照上传</View>
|
||||
<View className={styles.uploadImg}>
|
||||
<Text className={classnames(styles.miconfont, 'iconfont icon-saomazhifu')}></Text>
|
||||
<Text className={styles.uploadText}>上传照片</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
</View>
|
||||
<View className={styles.other_desc}>
|
||||
<View className={styles.title}>其他说明</View>
|
||||
<View className={styles.uploadImg}>
|
||||
<Textarea placeholder="一般情况下选填,当退货说明=“其它问题”时,必填" cursorSpacing={100}></Textarea>
|
||||
<View className={styles.descDataNum}>0/100</View>
|
||||
<PictureItem/>
|
||||
|
||||
</View>
|
||||
</View>
|
||||
<View className="common_safe_area_y"></View>
|
||||
</ScrollView>
|
||||
</View>
|
||||
</Popup>
|
||||
<OtherReason/>
|
||||
</View>
|
||||
</ScrollView>
|
||||
<View className="common_safe_area_y"></View>
|
||||
</View>
|
||||
<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 >
|
||||
<ReasonPopup show={showReason.show} onClose={closeReason} status={showReason.status}/>
|
||||
</View>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
//图片列表
|
||||
const PictureItem = memo(() => {
|
||||
|
||||
//图片
|
||||
const uploadImage = () => {
|
||||
Taro.chooseImage({
|
||||
count: 1, // 默认9
|
||||
sizeType: ['original', 'compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
success: function (res) {
|
||||
// var tempFilePaths = res.tempFilePaths
|
||||
const file = res.tempFiles[0]
|
||||
console.log('res:::',res.tempFiles[0])
|
||||
// uploadCDNImg(file, 'product', 'product')
|
||||
}
|
||||
})
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<View className={styles.ImgItem}>
|
||||
<Image mode="aspectFill" src={formatImgUrl('')} ></Image>
|
||||
<View className={classnames(styles.miconfont_close, 'iconfont icon-qingkong')}></View>
|
||||
</View>
|
||||
<View className={styles.uploadImg } onClick={uploadImage}>
|
||||
<Text className={classnames(styles.miconfont, 'iconfont icon-saomazhifu')}></Text>
|
||||
<Text className={styles.uploadText}>上传照片</Text>
|
||||
</View>
|
||||
</>
|
||||
)
|
||||
})
|
||||
@@ -101,12 +101,17 @@
|
||||
|
||||
}
|
||||
.order_address_list {
|
||||
height: 900px;
|
||||
height:80vh;
|
||||
.order_address_title{
|
||||
font-size: $font_size;
|
||||
font-weight: 700;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding: 20px 0 30px 0;
|
||||
height: 100px;
|
||||
}
|
||||
.addressList_con{
|
||||
padding-bottom: 20px;
|
||||
height: calc(100% - 160px);
|
||||
}
|
||||
}
|
||||
@@ -114,9 +114,10 @@ export default memo(forwardRef(({onSelect, onChangeShipmentMode, defaultValue =
|
||||
<Popup show={showAddressList} showTitle={false} onClose={() => setShowAddressList(false)}>
|
||||
<View className={styles.order_address_list}>
|
||||
<View className={styles.order_address_title}>请选择收货地址</View>
|
||||
<AddressList onSelect={getAddress}/>
|
||||
<View className={styles.addressList_con}>
|
||||
<AddressList onSelect={getAddress}/>
|
||||
</View>
|
||||
</View>
|
||||
<View className="common_safe_area_y"></View>
|
||||
</Popup>
|
||||
</View>
|
||||
)
|
||||
|
||||
@@ -16,7 +16,6 @@ import classnames from "classnames";
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
import order from "../orderList/components/order";
|
||||
import AddressInfoDetail from "./components/addressInfoDetail";
|
||||
import ApplyAfterSales from "./components/applyAfterSales";
|
||||
import KindList from "./components/kindList";
|
||||
import OrderState from "./components/orderState";
|
||||
import Payment from "./components/payment";
|
||||
@@ -143,12 +142,10 @@ import styles from './index.module.scss'
|
||||
|
||||
//获取底部按钮点击, 获取按钮状态
|
||||
const orderStateClick = useCallback((val) => {
|
||||
console.log('val::', val)
|
||||
if(val == 1) {
|
||||
if(val == 1 || val == 6) {
|
||||
//取消订单
|
||||
getSaleOrderPreView()
|
||||
}
|
||||
if(val == 2) {
|
||||
}else if(val == 2) {
|
||||
//待付款
|
||||
toPay()
|
||||
}
|
||||
@@ -226,7 +223,6 @@ import styles from './index.module.scss'
|
||||
<Remark onSave={(e) => getRemark(e)}/>
|
||||
</Popup>
|
||||
<Payment onSubmitSuccess={onPaySuccess} show={payMentShow} onClose={closePayShow} orderInfo={payOrderInfo} />
|
||||
<ApplyAfterSales/>
|
||||
<View className="common_safe_area_y"></View>
|
||||
</View>
|
||||
)
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
border-radius: 0px 20px 0px 20px;
|
||||
}
|
||||
}
|
||||
.product_con{
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.product_title{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -99,7 +99,6 @@ export default memo(({value, onClickBtn}: Param) => {
|
||||
<View className={styles.color_count_num}>{`${value?.total_fabrics}种面料,${value?.total_colors}种颜色,共${value?.total_number}条`}</View>
|
||||
</View>
|
||||
<OrderBtns orderInfo={orderInfo} onClick={orderBtnsClick}/>
|
||||
|
||||
</View>
|
||||
)
|
||||
})
|
||||
|
||||
@@ -96,7 +96,10 @@ export default () => {
|
||||
|
||||
//监听点击的按钮
|
||||
const clickOrderBtn = useCallback(({status, orderInfo}) => {
|
||||
if(status == 2) {
|
||||
console.log('status:::', status)
|
||||
if(status == 1 || status == 6) {
|
||||
getOrderList()
|
||||
} else if(status == 2) {
|
||||
//去支付
|
||||
setPayOrderInfo({orderId:orderInfo.should_collect_order_id, payment_method:orderInfo.payment_method})
|
||||
toPay()
|
||||
|
||||
Reference in New Issue
Block a user