商城测试版v5
This commit is contained in:
parent
217d6bca43
commit
6f9dd5b838
@ -110,3 +110,13 @@ export const GetSaleOrderListApi = () => {
|
||||
method: "get",
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 售后记录
|
||||
*/
|
||||
export const ReturnRecordApi = () => {
|
||||
return useRequest({
|
||||
url: `/v1/mall/saleOrder/return`,
|
||||
method: "get",
|
||||
})
|
||||
}
|
||||
|
@ -4,14 +4,14 @@
|
||||
// export const BASE_URL = `http://10.0.0.5:50001/lymarket`
|
||||
// export const BASE_URL = `http://192.168.0.89:40001/lymarket`
|
||||
// export const BASE_URL = `http://192.168.1.165:40001/lymarket` // 王霞
|
||||
export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境
|
||||
// export const BASE_URL = `https://test.zzfzyc.com/lymarket` // 测试环境
|
||||
// export const BASE_URL = `http://192.168.1.9:40001/lymarket` // 发
|
||||
// export const BASE_URL = `http://192.168.1.9:50005/lymarket` // 发
|
||||
// export const BASE_URL = `http://192.168.1.30:50001/lymarket` // 发
|
||||
// export const BASE_URL = `https://dev.zzfzyc.com/lymarket` // 开发环境
|
||||
// export const BASE_URL = `https://www.zzfzyc.com/lymarket` // 正式环境
|
||||
// export const BASE_URL = `http://192.168.1.5:40001/lymarket` // 王霞
|
||||
// export const BASE_URL = `http://192.168.1.7:50002/lymarket` // 添
|
||||
export const BASE_URL = `http://192.168.1.7:50002/lymarket` // 添
|
||||
// export const BASE_URL = `http://192.168.1.42:50001/lymarket` // 杰
|
||||
|
||||
// CDN
|
||||
|
@ -26,14 +26,19 @@ export default memo(({show = false, onClose, onAdd}: ReasonInfoParam) => {
|
||||
if(show) getFavoriteList()
|
||||
}, [show])
|
||||
|
||||
const onCreate = () => {
|
||||
onClose?.()
|
||||
goLink('/pages/collection/index')
|
||||
}
|
||||
|
||||
return (
|
||||
<Popup show={show} onClose={onClose} showTitle={false} >
|
||||
<View className={styles.collection_con}>
|
||||
<View className={styles.header}>
|
||||
<Text className={styles.title}>选择文件夹</Text>
|
||||
<Text className={styles.title}>选择收藏夹</Text>
|
||||
<View className={styles.miconfont_con} >
|
||||
<Text className={classnames(styles.miconfont, 'iconfont icon-jia')}></Text>
|
||||
<Text onClick={() => goLink('/pages/collection/index')}>新建</Text>
|
||||
<Text onClick={onCreate}>新建</Text>
|
||||
</View>
|
||||
</View>
|
||||
<ScrollView scrollY className={styles.scrollView}>
|
||||
|
@ -3,8 +3,8 @@ import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useState } from
|
||||
import {formatKbPrice} from '@/common/common'
|
||||
import classnames from "classnames";
|
||||
import styles from './index.module.scss'
|
||||
import AmountShow from "../amountShow";
|
||||
import Taro from "@tarojs/taro";
|
||||
import AmountShow from "../amountShow";
|
||||
|
||||
type Param = {
|
||||
style?: Object,
|
||||
|
@ -91,11 +91,17 @@ export default memo(({orderInfo, onClick}:Param) => {
|
||||
value: [SaleOrderStatusBooking.value], //按钮对应: 待接单
|
||||
label: '退款'
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
value: [SaleOrderStatusRefund.value], //售后记录按钮:已退款
|
||||
label: '售后记录'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
value: [SaleOrderStatusTaking.value, SaleorderstatusWaitingPrePayment.value, SaleOrderStatusWaitingPayment.value, SaleOrderStatusWaitingDelivery.value, SaleOrderStatusWaitingReceipt.value, SaleOrderStatusAlreadyReceipt.value, SaleOrderStatusComplete.value], //去付款按钮对应:待付款, 待发货, 待收货, 已收货, 已完成
|
||||
label: '去付款'
|
||||
},
|
||||
|
||||
])
|
||||
|
||||
//判断是否显示该按钮
|
||||
|
@ -1,8 +1,8 @@
|
||||
|
||||
.searchInput_main{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 62px;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid #F0F0F0;
|
||||
.searchInput_title {
|
||||
min-width: 145px;
|
||||
@ -26,6 +26,9 @@
|
||||
.searchInput_con{
|
||||
flex:1;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
input{
|
||||
font-size: 26px;
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ type Params = {
|
||||
changeOnInput?: (string) => void,
|
||||
clickOnInput?: () => void,
|
||||
children?: ReactNode
|
||||
height?: number,
|
||||
height?: string,
|
||||
titleStyle?: Object,
|
||||
styleObj?: Object
|
||||
|
||||
@ -28,7 +28,7 @@ export default memo((props: Params) => {
|
||||
showBorder = true,
|
||||
changeOnInput,
|
||||
clickOnInput,
|
||||
height = 80,
|
||||
height = '80rpx',
|
||||
titleStyle = {}
|
||||
} = props
|
||||
|
||||
@ -39,11 +39,11 @@ export default memo((props: Params) => {
|
||||
return {}
|
||||
}, [showBorder])
|
||||
return (
|
||||
<View className={styles.searchInput_main} style={{height: height + 'rpx', ...stylen,}}>
|
||||
<View className={styles.searchInput_main} style={{height: height, ...stylen}}>
|
||||
{showTitle&&<View className={styles.searchInput_title} style={titleStyle}>{title}</View>}
|
||||
<View className={styles.searchInput_con}>
|
||||
{!props.children&&<Input disabled={disabled} placeholder={placeholder} onClick={() => clickOnInput?.()} onInput={(e) => changeOnInput?.(e.detail.value)}/>
|
||||
||<View>{props.children}</View>
|
||||
||<>{props.children}</>
|
||||
}
|
||||
</View>
|
||||
{showIcon&&<View className={`iconfont icon-jiantou ${styles.icon_more_self}`}></View>}
|
||||
|
@ -58,6 +58,9 @@
|
||||
.miconfont{
|
||||
font-size: 30px;
|
||||
}
|
||||
.selected{
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
.upload_image{
|
||||
flex:1;
|
||||
|
@ -212,21 +212,21 @@ export default () => {
|
||||
<View className={styles.returnSaleInput_item}>
|
||||
<View className={styles.title}>退货原因</View>
|
||||
<View className={styles.select} onClick={() => onShowReason(returnStatus.return_reason)}>
|
||||
<Text>{returnObj[returnStatus.return_reason]?.name||'请选择'}</Text>
|
||||
<Text className={returnObj[returnStatus.return_reason]&&styles.selected}>{returnObj[returnStatus.return_reason]?.name||'请选择'}</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} onClick={() => onShowReason(returnStatus.goods_status)}>
|
||||
<Text>{returnObj[returnStatus.goods_status]?.name||'请选择'}</Text>
|
||||
<Text className={returnObj[returnStatus.goods_status]&&styles.selected}>{returnObj[returnStatus.goods_status]?.name||'请选择'}</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} onClick={() => onShowReason(returnStatus.return_explain)}>
|
||||
<Text>{returnObj[returnStatus.return_explain]?.name||'请选择'}</Text>
|
||||
<Text className={returnObj[returnStatus.return_explain]&&styles.selected}>{returnObj[returnStatus.return_explain]?.name||'请选择'}</Text>
|
||||
<Text className={classnames(styles.miconfont, 'iconfont icon-a-moreback')}></Text>
|
||||
</View>
|
||||
</View>
|
||||
|
@ -69,7 +69,6 @@ export default memo(({order, comfirm = false}:Param) => {
|
||||
label:'预估金额',
|
||||
field: 'estimate_amount',
|
||||
message: '预估金额按生产商定义的标准匹重计算,仅供参考。详细交易金额以出单为准!',
|
||||
messageShow: false,
|
||||
},
|
||||
{
|
||||
id:2,
|
||||
@ -77,7 +76,6 @@ export default memo(({order, comfirm = false}:Param) => {
|
||||
label:'合计金额',
|
||||
field: 'total_sale_price',
|
||||
message: '包含空差的货款金额',
|
||||
messageShow: false,
|
||||
},
|
||||
{
|
||||
id:3,
|
||||
@ -85,7 +83,6 @@ export default memo(({order, comfirm = false}:Param) => {
|
||||
label:'空差优惠',
|
||||
field: 'total_weight_error_discount',
|
||||
message: '扣除空差金额',
|
||||
messageShow: false,
|
||||
},
|
||||
{
|
||||
id:4,
|
||||
@ -93,7 +90,6 @@ export default memo(({order, comfirm = false}:Param) => {
|
||||
label:'应付金额',
|
||||
field: 'total_should_collect_money',
|
||||
message: '扣除空差后的货款金额',
|
||||
messageShow: false,
|
||||
},
|
||||
{
|
||||
id:5,
|
||||
@ -101,14 +97,13 @@ export default memo(({order, comfirm = false}:Param) => {
|
||||
label:'实付金额',
|
||||
field: 'actual_amount',
|
||||
message: '本单实付总金额',
|
||||
messageShow: false,
|
||||
}
|
||||
]
|
||||
|
||||
//订单流程是否显示价格
|
||||
const showPrice = (item) => {
|
||||
if (item.id == 2) {
|
||||
//合计金额 (剪板特殊请情况)
|
||||
//合计金额 (剪板特殊情况)
|
||||
return (item.value.includes(order.status)|| order.sale_mode == 1)
|
||||
} else if (item.id == 3) {
|
||||
//空差优惠只有大货才有
|
||||
@ -126,7 +121,7 @@ export default memo(({order, comfirm = false}:Param) => {
|
||||
<>
|
||||
{
|
||||
priceList.map(item => {
|
||||
return <>{showPrice(item)&&<EstimatedAmount messageShow={item.messageShow} key={item.id} number={formatPriceDiv(order[item.field])} title={item.label} messageTitle={item.message} />}</>
|
||||
return <>{showPrice(item)&&<EstimatedAmount key={item.id} number={formatPriceDiv(order[item.field])} title={item.label} messageTitle={item.message} />}</>
|
||||
})
|
||||
}
|
||||
</>
|
||||
@ -140,11 +135,17 @@ export default memo(({order, comfirm = false}:Param) => {
|
||||
return<EstimatedAmount key={item.id} number={formatPriceDiv(order[item.field])} title={item.label} />
|
||||
}, [order])
|
||||
|
||||
//金额展示
|
||||
//确认金额展示
|
||||
const showPriceConDom = useMemo(() => {
|
||||
return comfirm?comfirmPriceConDom:priceConDom
|
||||
}, [order])
|
||||
|
||||
//颜色金额小计
|
||||
const colorPrice = useCallback((item) => {
|
||||
let res = item.total_sale_price||item.estimate_amount
|
||||
return formatPriceDiv(res).toLocaleString('en', {minimumFractionDigits: 2})
|
||||
},[order])
|
||||
|
||||
|
||||
//散剪大约重量
|
||||
const aboutWeight = useCallback((weight) => {
|
||||
@ -187,7 +188,7 @@ export default memo(({order, comfirm = false}:Param) => {
|
||||
</View>
|
||||
<View className={styles.order_list_item_count}>
|
||||
<View className={styles.count_num}>×{formatCount(colorItem)}<text>{order.unit}</text></View>
|
||||
<View className={styles.count_price}><text>¥</text>{formatPriceDiv(colorItem.estimate_amount).toLocaleString()}</View>
|
||||
<View className={styles.count_price}><text>¥</text>{colorPrice(colorItem)}</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
|
160
src/pages/order/components/returnRecord/index.module.scss
Normal file
160
src/pages/order/components/returnRecord/index.module.scss
Normal file
@ -0,0 +1,160 @@
|
||||
.returnRecord_main{
|
||||
height: 70vh;
|
||||
.order_item{
|
||||
background-color: #fff;
|
||||
border-radius: 20px;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
.header{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.user{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.name {
|
||||
color: #000;
|
||||
font-weight: 700;
|
||||
margin-left: 15px;
|
||||
font-size: $font_size;
|
||||
width: 100px;
|
||||
@include common_ellipsis();
|
||||
}
|
||||
image{
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
.order_con {
|
||||
padding-left: 15px;
|
||||
width: 100%;
|
||||
.name {
|
||||
color: #000;
|
||||
font-weight: 700;
|
||||
font-size: $font_size;
|
||||
}
|
||||
.order_num {
|
||||
flex: 1;
|
||||
font-size: $font_size_medium;
|
||||
color: $color_font_one;
|
||||
padding-right: 10px;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
.order_num_con{
|
||||
flex:1;
|
||||
}
|
||||
.miconfont {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.tag{
|
||||
font-size: $font_size_min;
|
||||
padding: 5px 15px;
|
||||
background-color: $color_main;
|
||||
color: #fff;
|
||||
border-radius: 0px 20px 0px 20px;
|
||||
}
|
||||
}
|
||||
.product_title{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 35px 0;
|
||||
.product_tag{
|
||||
background-color: #CDE5FF;
|
||||
font-size: $font_size_min;
|
||||
padding: 5px 10px;
|
||||
color: $color_main;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.product_name{
|
||||
flex:1;
|
||||
font-size: $font_size;
|
||||
font-weight: 700;
|
||||
padding: 0 20px;
|
||||
@include common_ellipsis()
|
||||
}
|
||||
.product_status{
|
||||
font-size: $font_size;
|
||||
color: $color_main;
|
||||
}
|
||||
}
|
||||
.product_list{
|
||||
display: flex;
|
||||
.image{
|
||||
width: 126px;
|
||||
height: 126px;
|
||||
border-radius: 20px ;
|
||||
position: relative;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 20px ;
|
||||
}
|
||||
.color_num {
|
||||
background: rgba(0,0,0, 0.5);
|
||||
border-radius: 36px 0px 20px 0px;
|
||||
font-size: $font_size_min;
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
right:0;
|
||||
bottom:0;
|
||||
padding: 5px 10px 5px 15px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
.color_list{
|
||||
flex:1;
|
||||
padding-left: 30px;
|
||||
.color_item{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: $font_size_min;
|
||||
color: $color_font_three;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
.color_title{
|
||||
font-weight: 700;
|
||||
font-size: $font_size;
|
||||
color: #000;
|
||||
}
|
||||
.color_more{
|
||||
color: $color_font_three;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.color_count_num{
|
||||
font-size: $font_size_min;
|
||||
color: $color_font_two;
|
||||
background-color: #F6F6F6;
|
||||
border-radius: 10px;
|
||||
padding: 10px 22px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.order_number{
|
||||
display: flex;
|
||||
background-color: #F6F6F6;
|
||||
padding: 20px;
|
||||
margin: 20px 0;
|
||||
align-items: center;
|
||||
font-size: $font_size_medium;
|
||||
border-radius: 10px;
|
||||
text{
|
||||
&:nth-child(1) {
|
||||
|
||||
font-weight: 700;
|
||||
color: $color_font_three;
|
||||
border-right: 2px solid #CCCCCC;
|
||||
padding-right: 20px;
|
||||
}
|
||||
&:nth-child(2) {
|
||||
padding-left: 20px;
|
||||
color: $color_font_one;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
160
src/pages/order/components/returnRecord/index.tsx
Normal file
160
src/pages/order/components/returnRecord/index.tsx
Normal file
@ -0,0 +1,160 @@
|
||||
import { GetSaleOrderListApi, ReturnRecordApi } from "@/api/salesAfterOrder";
|
||||
import { goLink } from "@/common/common";
|
||||
import { formatHashTag, formatPriceDiv } from "@/common/fotmat";
|
||||
import { dataLoadingStatus, getFilterData } from "@/common/util";
|
||||
import InfiniteScroll from "@/components/infiniteScroll";
|
||||
import LabAndImg from "@/components/LabAndImg";
|
||||
import Popup from "@/components/popup";
|
||||
import OrderStatusTag from "@/pages/salesAfterList/components/orderStatusTag";
|
||||
import { useSelector } from "@/reducers/hooks";
|
||||
import { Image, Text, View } from "@tarojs/components";
|
||||
import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
import classnames from "classnames";
|
||||
import styles from './index.module.scss'
|
||||
import { REFUND_STATUS_ORDER } from "@/common/enum";
|
||||
|
||||
type Param = {
|
||||
show?: true|false,
|
||||
onClose?: () => void,
|
||||
onSubmit?: () => void,
|
||||
id?: number
|
||||
}
|
||||
export default memo(({show, onClose, onSubmit, id}:Param) => {
|
||||
//搜索参数
|
||||
const searchField = useRef({
|
||||
page : 1,
|
||||
size : 10,
|
||||
saleOrderID: 0
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
if(show && id) {
|
||||
searchField.current.saleOrderID = id
|
||||
getOrderList()
|
||||
}
|
||||
}, [show, id])
|
||||
|
||||
const userInfo = useSelector(state => state.userInfo)
|
||||
|
||||
//获取订单列表
|
||||
const {fetchData: listFetchData, state:orderState} = ReturnRecordApi()
|
||||
const [orderData, setOrderData] = useState<{list:any[], total:number}>({list:[], total:0})
|
||||
const getOrderList = async () => {
|
||||
console.log('ida::', id)
|
||||
let res = await listFetchData(getFilterData(searchField.current))
|
||||
setOrderData({list: res.data.list, total: res.data.total})
|
||||
}
|
||||
|
||||
//整理颜色
|
||||
const labAndRgbAndUrl = useCallback((item) => {
|
||||
return {lab:{...item?.lab}, rgb:{...item?.rgb}, texturl_url: item?.texturl_url}
|
||||
}, [orderData])
|
||||
|
||||
const {
|
||||
ReturnApplyOrderTypeReturnForRefund, // 退货退款
|
||||
} = REFUND_STATUS_ORDER
|
||||
|
||||
//对应单价
|
||||
const standardPrice = useCallback((price, sale_mode) => {
|
||||
return formatPriceDiv(price).toLocaleString() + '/' + (sale_mode == 1?'m':'kg')
|
||||
}, [orderData])
|
||||
|
||||
//对应数量
|
||||
const formatCount = useCallback((item, sale_mode) => {
|
||||
return sale_mode == 0? item.roll : Number(item.length / 100)
|
||||
}, [orderData])
|
||||
|
||||
//上拉加载数据
|
||||
const pageNum = useRef({size: searchField.current.size, page: searchField.current.page})
|
||||
const getScrolltolower = () => {
|
||||
if(orderData.list.length < orderData.total) {
|
||||
pageNum.current.page++
|
||||
const size = pageNum.current.size * pageNum.current.page
|
||||
searchField.current.size = size
|
||||
}
|
||||
}
|
||||
|
||||
//监听滚动
|
||||
const [scrollStatus, setScrollStatus] = useState(false)
|
||||
const onscroll = useCallback((e) => {
|
||||
if(e.detail.scrollTop > 20) {
|
||||
setScrollStatus(true)
|
||||
} else {
|
||||
setScrollStatus(false)
|
||||
}
|
||||
},[])
|
||||
|
||||
//数据加载状态
|
||||
const statusMore = useMemo(() => {
|
||||
return dataLoadingStatus({list:orderData.list, total: orderData.total, status: orderState.loading})
|
||||
}, [orderData, orderState])
|
||||
|
||||
return (
|
||||
<>
|
||||
<Popup show={show} title="售后记录" onClose={onClose}>
|
||||
<View className={styles.returnRecord_main}>
|
||||
<InfiniteScroll
|
||||
selfonScrollToLower={getScrolltolower}
|
||||
selfOnScroll={onscroll}
|
||||
statusMore={statusMore}
|
||||
>
|
||||
<View className={styles.returnRecord_con}>
|
||||
{orderData?.list?.map(item => <View key={item.id} className={styles.order_item}>
|
||||
<View className={styles.header} onClick={() => goLink('/pages/salesAfter/index', {id: item?.id})}>
|
||||
<View className={styles.user}>
|
||||
<Image src={`${userInfo?.adminUserInfo?.avatar_url}`}/>
|
||||
</View>
|
||||
<View className={styles.order_con}>
|
||||
<Text className={styles.name}>{userInfo?.adminUserInfo?.user_name}</Text>
|
||||
<View className={styles.order_num}>
|
||||
<View className={styles.order_num_con}>
|
||||
<Text className={styles.order_no}>售后单号:{item?.return_order_no}</Text>
|
||||
<Text className={classnames(styles.miconfont, 'iconfont, icon-a-moreback')}></Text>
|
||||
</View>
|
||||
<OrderStatusTag status={item?.type}/>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.product_con} onClick={() => goLink('/pages/salesAfter/index', {id: item?.id})}>
|
||||
<View className={styles.product_title}>
|
||||
<View className={styles.product_tag}>{item?.sale_mode_name}</View>
|
||||
<View className={styles.product_name}>{formatHashTag(item?.product_list?.[0].code, item?.product_list?.[0].name)}</View>
|
||||
<View className={styles.product_status}>{item?.stage_name}</View>
|
||||
</View>
|
||||
<View className={styles.product_list}>
|
||||
<View className={styles.image}>
|
||||
<LabAndImg value={labAndRgbAndUrl(item)}/>
|
||||
<View className={styles.color_num}>{item?.product_list?.[0].product_colors?.[0].code}</View>
|
||||
</View>
|
||||
<View className={styles.color_list}>
|
||||
{item?.product_list?.[0].product_colors?.map((itemColor, index) => {
|
||||
return (
|
||||
(index <= 1)&&<View className={styles.color_item}>
|
||||
<View className={styles.color_title}>{formatHashTag(itemColor.code, itemColor.name)}</View>
|
||||
<View className={styles.color_price}>{standardPrice(itemColor.sale_price, item.sale_mode)}</View>
|
||||
<View className={styles.color_num}>×{formatCount(itemColor, itemColor.sale_mode)}条</View>
|
||||
</View>
|
||||
)
|
||||
})
|
||||
}
|
||||
<View className={styles.color_item}>
|
||||
<View className={styles.color_more}>……</View>
|
||||
<View className={styles.color_more}>……</View>
|
||||
<View className={styles.color_more}>……</View>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
<View className={styles.color_count_num}>{`${item?.total_fabrics}种面料,${item?.total_colors}种颜色,共${item?.total_number}条`}</View>
|
||||
<View className={styles.order_number}>
|
||||
<Text>{item?.type == ReturnApplyOrderTypeReturnForRefund.value?'已申请退货':'已申请退款'}</Text>
|
||||
<Text>订单号:{item?.order_no}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>)}
|
||||
</View>
|
||||
</InfiniteScroll>
|
||||
</View>
|
||||
</Popup>
|
||||
</>
|
||||
)
|
||||
})
|
@ -108,6 +108,7 @@
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
.order_num_btn{
|
||||
font-size: $font_size_medium;
|
||||
padding: 5px 10px;
|
||||
|
@ -26,6 +26,7 @@ import KindList from "./components/kindList";
|
||||
import OrderState from "./components/orderState";
|
||||
import Payment from "./components/payment";
|
||||
import Remark from "./components/remark";
|
||||
import ReturnRecord from "./components/returnRecord";
|
||||
import styles from './index.module.scss'
|
||||
|
||||
export default () => {
|
||||
@ -180,8 +181,7 @@ import styles from './index.module.scss'
|
||||
|
||||
//获取底部按钮点击, 获取按钮状态
|
||||
const orderStateClick = useCallback((val) => {
|
||||
if(val == 1 || val == 6) {
|
||||
//取消订单
|
||||
if(val == 1 || val == 6 || val == 8) {
|
||||
getSaleOrderPreView()
|
||||
}else if(val == 2) {
|
||||
//待付款
|
||||
@ -193,6 +193,9 @@ import styles from './index.module.scss'
|
||||
} else if(val == 7) {
|
||||
//再购
|
||||
addShopCart()
|
||||
} else if(val == 9) {
|
||||
//售后记录
|
||||
onReturnRecordShow()
|
||||
}
|
||||
|
||||
}, [orderDetail])
|
||||
@ -286,6 +289,15 @@ import styles from './index.module.scss'
|
||||
|
||||
}
|
||||
|
||||
//显示售后记录
|
||||
const [returnRecordShow, setReturnRecordShow] = useState(false)
|
||||
const onReturnRecordShow = useCallback(() => {
|
||||
setReturnRecordShow(true)
|
||||
}, [])
|
||||
const closeReturnRecord = useCallback(() => {
|
||||
setReturnRecordShow(false)
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<View className={styles.order_main}>
|
||||
{(orderDetail?.status != SaleorderstatusWaitingPrePayment.value)&&<OrderState orderInfo={orderDetail}/>||
|
||||
@ -296,16 +308,16 @@ import styles from './index.module.scss'
|
||||
<KindList order={formatPreViewOrderMemo}/>
|
||||
<View className={styles.order_info} >
|
||||
<View className={styles.order_info_title}>订单信息</View>
|
||||
<SearchInput showBorder={false} title='单号' height={50}>
|
||||
<SearchInput showBorder={false} title='单号' height='50rpx'>
|
||||
<View className={styles.order_num}>
|
||||
<Text>{orderDetail?.order_no}</Text>
|
||||
<View className={styles.order_num_btn} onClick={() => clipboardData()}>复制</View>
|
||||
</View>
|
||||
</SearchInput>
|
||||
<SearchInput showBorder={false} title='下单时间' height={50}>
|
||||
<SearchInput showBorder={false} title='下单时间' height='50rpx'>
|
||||
<Text>{formatDateTime(orderDetail?.create_time)}</Text>
|
||||
</SearchInput>
|
||||
{(orderDetail?.payment_time)&&<SearchInput showBorder={false} title='付款时间' height={50}>
|
||||
{(orderDetail?.payment_time)&&<SearchInput showBorder={false} title='付款时间' height='50rpx'>
|
||||
<Text>{formatDateTime(orderDetail?.payment_time)}</Text>
|
||||
</SearchInput>}
|
||||
</View>
|
||||
@ -327,6 +339,7 @@ import styles from './index.module.scss'
|
||||
<Payment onSubmitSuccess={onPaySuccess} show={payMentShow} onClose={closePayShow} orderInfo={orderDetail} />
|
||||
<ApplyRefund show={refundShow} onClose={applyRefundClose} orderId={orderDetail?.id}/>
|
||||
<ShopCart show={showCart} onClose={() => setShowCart(false)}/>
|
||||
<ReturnRecord show={returnRecordShow} onClose={closeReturnRecord} id={orderDetail?.id}/>
|
||||
<View className="common_safe_area_y"></View>
|
||||
</View>
|
||||
)
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { goLink } from "@/common/common";
|
||||
import { ORDER_STATUS } from "@/common/enum";
|
||||
import { formatHashTag, formatImgUrl, formatPriceDiv } from "@/common/fotmat";
|
||||
import LabAndImg from "@/components/LabAndImg";
|
||||
import OrderBtns from "@/components/orderBtns";
|
||||
@ -51,6 +52,13 @@ export default memo(({value, onClickBtn}: Param) => {
|
||||
onClickBtn?.({status, orderInfo:value})
|
||||
}, [value])
|
||||
|
||||
let {SaleOrderStatusTaking} = ORDER_STATUS
|
||||
|
||||
//订单状态
|
||||
// const orderStatus = useCallback((item) => {
|
||||
// return item.status == SaleOrderStatusTaking.value?'装车中':item.status_name
|
||||
// }, [value])
|
||||
|
||||
//按钮所需数据
|
||||
const orderInfo = useMemo(() => {
|
||||
return {
|
||||
@ -68,6 +76,7 @@ export default memo(({value, onClickBtn}: Param) => {
|
||||
return `${value?.total_fabrics}种面料,${value?.total_colors}种颜色,共${value?.total_number}${value?.sale_mode == 0? '条':'米'}`
|
||||
}, [value])
|
||||
|
||||
|
||||
return (
|
||||
<View className={styles.order_item}>
|
||||
<View className={styles.header} onClick={() => goLink('/pages/order/index', {id: value?.id})}>
|
||||
|
@ -15,6 +15,7 @@ import ShopCart from "@/components/shopCart"
|
||||
import { alert } from "@/common/common"
|
||||
import { useRouter } from "@tarojs/runtime"
|
||||
import ApplyRefund from "../order/components/applyRefund"
|
||||
import ReturnRecord from "../order/components/returnRecord"
|
||||
|
||||
export default () => {
|
||||
const {checkLogin} = useLogin()
|
||||
@ -107,7 +108,7 @@ export default () => {
|
||||
//监听点击的按钮
|
||||
const clickOrderBtn = useCallback(({status, orderInfo}) => {
|
||||
setCallBackPayOrderInfo(() => orderInfo)
|
||||
if(status == 1 || status == 6) {
|
||||
if(status == 1 || status == 6 || status == 8) {
|
||||
getOrderList()
|
||||
} else if(status == 2) {
|
||||
//去支付
|
||||
@ -119,6 +120,8 @@ export default () => {
|
||||
} else if (status == 7) {
|
||||
//购买
|
||||
addShopCart(orderInfo)
|
||||
} else if (status == 9) {
|
||||
onReturnRecordShow()
|
||||
}
|
||||
}, [orderData])
|
||||
|
||||
@ -178,6 +181,15 @@ export default () => {
|
||||
setRefundShow(false)
|
||||
}, [])
|
||||
|
||||
//显示售后记录
|
||||
const [returnRecordShow, setReturnRecordShow] = useState(false)
|
||||
const onReturnRecordShow = useCallback(() => {
|
||||
setReturnRecordShow(true)
|
||||
}, [])
|
||||
const closeReturnRecord = useCallback(() => {
|
||||
setReturnRecordShow(false)
|
||||
}, [])
|
||||
|
||||
|
||||
return (
|
||||
<View className={styles.order_list_main}>
|
||||
@ -194,6 +206,7 @@ export default () => {
|
||||
</View>
|
||||
<ApplyRefund show={refundShow} onClose={applyRefundClose} orderId={callBackOrderInfo?.id}/>
|
||||
<ShopCart show={showCart} onClose={() => setShowCart(false)}/>
|
||||
<ReturnRecord show={returnRecordShow} onClose={closeReturnRecord} id={callBackOrderInfo?.id}/>
|
||||
<Payment onSubmitSuccess={onPaySuccess} show={payMentShow} onClose={closePayShow} orderInfo={callBackOrderInfo}/>
|
||||
</View>
|
||||
)
|
||||
|
@ -1,9 +1,11 @@
|
||||
.apply_record_scroll{
|
||||
height: 70vh;
|
||||
}
|
||||
|
||||
.apply_record_main{
|
||||
margin-top: 20px;
|
||||
padding: 0 30px;
|
||||
height: 70vh;
|
||||
.apply_record_scroll{
|
||||
height: 100%;
|
||||
}
|
||||
.kind_number{
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
|
@ -4,6 +4,7 @@ import LabAndImg from "@/components/LabAndImg";
|
||||
import Popup from "@/components/popup";
|
||||
import { ScrollView, Text, View } from "@tarojs/components";
|
||||
import { memo, useCallback, useEffect, useMemo, useState } from "react";
|
||||
import Taro from "@tarojs/taro";
|
||||
import styles from './index.module.scss'
|
||||
|
||||
type Param = {
|
||||
@ -15,10 +16,12 @@ type Param = {
|
||||
export default memo(({show, onClose, onSubmit, id}:Param) => {
|
||||
useEffect(() => {
|
||||
if(show && id) getSaleOrderPreView()
|
||||
if(!show) setFormatDetailOrder(() => null)
|
||||
}, [show, id])
|
||||
|
||||
|
||||
//获取订单详情
|
||||
const [orderDetail, setOrderDetail] = useState<any>() //获取到的原始数据
|
||||
const [orderDetail, setOrderDetail] = useState<any>(null) //获取到的原始数据
|
||||
const {fetchData: saleOrderOrderDetailData} = SaleOrderOrderDetailApi()
|
||||
const getSaleOrderPreView = async () => {
|
||||
if(id) {
|
||||
@ -77,7 +80,8 @@ export default memo(({show, onClose, onSubmit, id}:Param) => {
|
||||
return (
|
||||
<>
|
||||
<Popup show={show} title="申请记录" onClose={onClose}>
|
||||
{formatDetailOrder&&<View className={styles.apply_record_main}>
|
||||
<View className={styles.apply_record_main}>
|
||||
{formatDetailOrder&&<>
|
||||
<View className={styles.kind_number}><Text>{numText}</Text></View>
|
||||
<ScrollView scrollY className={styles.apply_record_scroll}>
|
||||
<View className={styles.orders_list_con}>
|
||||
@ -120,7 +124,8 @@ export default memo(({show, onClose, onSubmit, id}:Param) => {
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
</View>}
|
||||
</>}
|
||||
</View>
|
||||
</Popup>
|
||||
</>
|
||||
)
|
||||
|
@ -112,6 +112,7 @@
|
||||
}
|
||||
.order_num{
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.order_num_btn{
|
||||
@ -124,6 +125,7 @@
|
||||
}
|
||||
text{
|
||||
font-size: $font_size;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -157,33 +157,33 @@ import styles from './index.module.scss'
|
||||
return (
|
||||
<View className={styles.order_info} >
|
||||
<View className={styles.order_info_title}>订单信息</View>
|
||||
<SearchInput showBorder={false} title='售后单号' height={50}>
|
||||
<SearchInput showBorder={false} title='售后单号' height='50rpx'>
|
||||
<View className={styles.order_num}>
|
||||
<Text>{orderInfo?.return_order_no}</Text>
|
||||
<View className={styles.order_num_btn} onClick={() => clipboardData(orderInfo?.return_order_no)}>复制</View>
|
||||
</View>
|
||||
</SearchInput>
|
||||
<SearchInput showBorder={false} title='订单号' height={50}>
|
||||
<SearchInput showBorder={false} title='订单号' height='50rpx'>
|
||||
<View className={styles.order_num}>
|
||||
<Text>{orderInfo?.order_no}</Text>
|
||||
<View className={styles.order_num_btn} onClick={() => clipboardData(orderInfo?.order_no)}>复制</View>
|
||||
</View>
|
||||
</SearchInput>
|
||||
<SearchInput showBorder={false} title='退货原因' height={50}>
|
||||
<SearchInput showBorder={false} title='退货原因' height='50rpx'>
|
||||
<Text>{orderInfo?.return_reason_name}</Text>
|
||||
</SearchInput>
|
||||
<SearchInput showBorder={false} title='退货说明' height={50}>
|
||||
<SearchInput showBorder={false} title='退货说明' height='50rpx'>
|
||||
<Text>{orderInfo?.return_explain_name}</Text>
|
||||
</SearchInput>
|
||||
<SearchInput showBorder={false} title='其它说明' height={50}>
|
||||
<Text>{orderInfo?.reason_describe}</Text>
|
||||
</SearchInput>
|
||||
<SearchInput showBorder={false} title='货物状况' height={50}>
|
||||
<SearchInput showBorder={false} title='货物状况' height='50rpx'>
|
||||
<Text>{orderInfo?.goods_status_name}</Text>
|
||||
</SearchInput>
|
||||
<SearchInput showBorder={false} title='申请时间' height={50}>
|
||||
<SearchInput showBorder={false} title='申请时间' height='50rpx'>
|
||||
<Text>{formatDateTime(orderInfo?.apply_time)}</Text>
|
||||
</SearchInput>
|
||||
<SearchInput showBorder={false} title='其它说明' height='auto'>
|
||||
<Text>{orderInfo?.reason_describe}</Text>
|
||||
</SearchInput>
|
||||
</View>
|
||||
)
|
||||
})
|
||||
|
@ -3,6 +3,7 @@ import { REFUND_STATUS_ORDER } from "@/common/enum";
|
||||
import { formatHashTag, formatImgUrl, formatPriceDiv } from "@/common/fotmat";
|
||||
import AfterOrderBtns from "@/components/afterOrderBtns";
|
||||
import LabAndImg from "@/components/LabAndImg";
|
||||
import ApplyRecord from "@/pages/salesAfter/components/applyRecord";
|
||||
import { useSelector } from "@/reducers/hooks";
|
||||
import { Image, Text, View } from "@tarojs/components"
|
||||
import classnames from "classnames";
|
||||
@ -68,6 +69,8 @@ export default memo(({value, onClickBtn}: Param) => {
|
||||
ReturnApplyOrderTypeReturnForRefund, // 退货退款
|
||||
} = REFUND_STATUS_ORDER
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<View className={styles.order_item}>
|
||||
<View className={styles.header} onClick={() => goLink('/pages/salesAfter/index', {id: value?.id})}>
|
||||
|
@ -12,6 +12,7 @@ import OrderStatusList from "./components/orderStatusList"
|
||||
import { AFTER_ORDER_STATUS } from "@/common/enum"
|
||||
import { GetSaleOrderListApi, RefundOrderSatausApi } from "@/api/salesAfterOrder"
|
||||
import ReturnLogistics from "./components/returnLogistics"
|
||||
import ApplyRecord from "../salesAfter/components/applyRecord"
|
||||
|
||||
export default () => {
|
||||
useLogin()
|
||||
@ -93,16 +94,23 @@ export default () => {
|
||||
}
|
||||
|
||||
//监听点击的按钮
|
||||
const [callBackOrderInfo, setCallBackPayOrderInfo] = useState<any>()
|
||||
const clickOrderBtn = useCallback(({status, orderInfo}) => {
|
||||
if(status == 1 || status == 6) {
|
||||
getOrderList()
|
||||
} else if (status == 8) {
|
||||
setApplyRecord(true)
|
||||
}
|
||||
setCallBackPayOrderInfo(orderInfo)
|
||||
}, [orderData])
|
||||
|
||||
//物流显示
|
||||
const [logisticsShow, setLogisticsShow] = useState(false)
|
||||
const onCloseLogistics = useCallback(() => setLogisticsShow(false), [])
|
||||
|
||||
//显示记录
|
||||
const [applyRecord, setApplyRecord] = useState(false)
|
||||
|
||||
return (
|
||||
<View className={styles.order_list_main}>
|
||||
<View className={styles.title}>
|
||||
@ -117,6 +125,7 @@ export default () => {
|
||||
</InfiniteScroll>
|
||||
<ReturnLogistics show={logisticsShow} onClose={onCloseLogistics}/>
|
||||
</View>
|
||||
<ApplyRecord show={applyRecord} id={callBackOrderInfo?.id} onClose={() => setApplyRecord(false)}/>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
.text_ss{
|
||||
position: relative;
|
||||
.miconfont{
|
||||
font-size: 20px;
|
||||
font-size: 30px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
&::before{
|
||||
|
@ -29,7 +29,8 @@ export default () => {
|
||||
width: '',
|
||||
weight_density: '',
|
||||
product_kind_id: '',
|
||||
component: ''
|
||||
component: '',
|
||||
abstract_sort_key: ''
|
||||
})
|
||||
|
||||
//获取面料列表
|
||||
@ -116,6 +117,19 @@ export default () => {
|
||||
setSelectList([...data])
|
||||
}
|
||||
|
||||
//排序
|
||||
const [sortStatus, setSortStatus] = useState<{comprehensive:'none'|'top'|'bottom', collection:'none'|'top'|'bottom'}>({
|
||||
comprehensive: 'none',
|
||||
collection: 'none'
|
||||
})
|
||||
const changeSort = (val) => {
|
||||
if(val == 1) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<View className={styles.main}>
|
||||
<View className={styles.search}>
|
||||
@ -123,13 +137,13 @@ export default () => {
|
||||
</View>
|
||||
<View className={styles.filter}>
|
||||
<View className={styles.filter_all}>
|
||||
<View className={styles.text_zh}>
|
||||
<View className={styles.text_zh} onClick={() => changeSort(1)}>
|
||||
<Text>综合</Text>
|
||||
<SortBtn status="top"/>
|
||||
<SortBtn status={sortStatus.comprehensive}/>
|
||||
</View>
|
||||
<View className={styles.text_sc}>
|
||||
<View className={styles.text_sc} onClick={() => changeSort(2)}>
|
||||
<Text>收藏</Text>
|
||||
<SortBtn status="top"/>
|
||||
<SortBtn status="none"/>
|
||||
</View>
|
||||
<View className={styles.text_ss} onClick={() => goLink('/pages/searchList/hightSearchList')}>
|
||||
<Text>高级搜索</Text>
|
||||
|
@ -325,7 +325,7 @@ const Assets = (props: any) => {
|
||||
// 功能
|
||||
const Main = memo(() => {
|
||||
let menu = [{ text: "地址管理", icon: "icon-daohang", url: "/pages/addressManager/index" }, { text: "码单管理", icon: "icon-a-yuanmadanmadanguanli", url: "/pages/weightList/index" },
|
||||
{ text: "我的收藏", icon: "icon-shoucang" }, { text: "颜色对比", icon: "icon-yanseduibi", url: "/pages/sampleComparison/index" },
|
||||
{ text: "我的收藏", icon: "icon-shoucang", url: "/pages/collection/index" }, { text: "颜色对比", icon: "icon-yanseduibi", url: "/pages/sampleComparison/index" },
|
||||
{ text: "分享推广", icon: "icon-fenxiang" }, { text: "团队邀请", icon: "icon-yaoqingtuandui" }]
|
||||
return (
|
||||
<View className={`${styles.crad} ${styles['card-main']} ${styles['card-feature']}`}>
|
||||
|
Loading…
x
Reference in New Issue
Block a user