电子商城测试版v4
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { goLink } from "@/common/common";
|
||||
import { REFUND_STATUS_ORDER } from "@/common/enum";
|
||||
import { formatHashTag, formatImgUrl, formatPriceDiv } from "@/common/fotmat";
|
||||
import AfterOrderBtns from "@/components/afterOrderBtns";
|
||||
import LabAndImg from "@/components/LabAndImg";
|
||||
@@ -26,7 +27,7 @@ type Param = {
|
||||
lab: {l:number, a:number, b:number},
|
||||
rgb: {r:number, g:number, b:number},
|
||||
texturl_url: string,
|
||||
type: number //1 退货 2退款
|
||||
type: number //2 退货 1 预收退款 3 销售
|
||||
return_apply_order_id: number //退款申请单
|
||||
},
|
||||
onClickBtn?: (val:{status:number, orderInfo:Param['value']}) => void
|
||||
@@ -63,6 +64,10 @@ export default memo(({value, onClickBtn}: Param) => {
|
||||
return {lab:{...value?.lab}, rgb:{...value?.rgb}, texturl_url: value?.texturl_url}
|
||||
}, [value])
|
||||
|
||||
const {
|
||||
ReturnApplyOrderTypeReturnForRefund, // 退货退款
|
||||
} = REFUND_STATUS_ORDER
|
||||
|
||||
return (
|
||||
<View className={styles.order_item}>
|
||||
<View className={styles.header} onClick={() => goLink('/pages/salesAfter/index', {id: value?.id})}>
|
||||
@@ -71,8 +76,8 @@ export default memo(({value, onClickBtn}: Param) => {
|
||||
<Text className={styles.name}>{userInfo?.adminUserInfo?.user_name}</Text>
|
||||
</View>
|
||||
<View className={styles.order_num}>
|
||||
<Text>售后单号:{value?.return_order_no}</Text>
|
||||
<Text className={classnames(styles.miconfont, 'iconfont, icon-a-moreback')}></Text>
|
||||
<Text>售后单号:{value?.return_order_no}</Text>
|
||||
<Text className={classnames(styles.miconfont, 'iconfont, icon-a-moreback')}></Text>
|
||||
</View>
|
||||
<OrderStatusTag status={value?.type}/>
|
||||
</View>
|
||||
@@ -107,7 +112,7 @@ export default memo(({value, onClickBtn}: Param) => {
|
||||
</View>
|
||||
<View className={styles.color_count_num}>{`${value?.total_fabrics}种面料,${value?.total_colors}种颜色,共${value?.total_number}条`}</View>
|
||||
<View className={styles.order_number}>
|
||||
<Text>{value?.type == 1?'已申请退货':'已申请退款'}</Text>
|
||||
<Text>{value?.type == ReturnApplyOrderTypeReturnForRefund.value?'已申请退货':'已申请退款'}</Text>
|
||||
<Text>订单号:{value?.order_no}</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -2,17 +2,23 @@ import { Text, View } from "@tarojs/components"
|
||||
import { memo } from "react"
|
||||
import classnames from "classnames";
|
||||
import styles from './index.module.scss'
|
||||
import { REFUND_STATUS_ORDER } from "@/common/enum";
|
||||
|
||||
|
||||
type Param = {
|
||||
status?: number //0默认不处理, 1退货,2退款
|
||||
status?: number
|
||||
}
|
||||
export default memo(({status = 0}:Param) => {
|
||||
const {
|
||||
ReturnApplyOrderTypeAdvanceReceiptRefund, // 预收退款
|
||||
ReturnApplyOrderTypeReturnForRefund, // 退货退款
|
||||
ReturnApplyOrderTypeSalesRefund // 销售退款
|
||||
} = REFUND_STATUS_ORDER
|
||||
return (
|
||||
<>
|
||||
{(status !== 0)&&<View className={classnames(styles.tag, status == 2?styles.refund_tag :styles.saleReturn_tag)}>
|
||||
{(status !== 0)&&<View className={classnames(styles.tag, status != ReturnApplyOrderTypeReturnForRefund.value?styles.refund_tag :styles.saleReturn_tag)}>
|
||||
<View className={classnames(styles.miconfont, 'iconfont icon-yucunkuan')}></View>
|
||||
<Text>{ status == 1?'退货':'退款'}</Text>
|
||||
<Text>{ status == ReturnApplyOrderTypeReturnForRefund.value?'退货':'退款'}</Text>
|
||||
</View>}
|
||||
</>
|
||||
)
|
||||
|
||||
@@ -14,9 +14,9 @@ import { GetSaleOrderListApi, RefundOrderSatausApi } from "@/api/salesAfterOrder
|
||||
import ReturnLogistics from "./components/returnLogistics"
|
||||
|
||||
export default () => {
|
||||
const {checkLogin} = useLogin()
|
||||
useDidShow(async () => {
|
||||
await checkLogin()
|
||||
useLogin()
|
||||
useDidShow(() => {
|
||||
getOrderList()
|
||||
})
|
||||
|
||||
//搜索参数
|
||||
@@ -94,9 +94,8 @@ export default () => {
|
||||
|
||||
//监听点击的按钮
|
||||
const clickOrderBtn = useCallback(({status, orderInfo}) => {
|
||||
if(status == 2) {
|
||||
//退货物流
|
||||
|
||||
if(status == 1 || status == 6) {
|
||||
getOrderList()
|
||||
}
|
||||
}, [orderData])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user