商城测试版v5

This commit is contained in:
2022-07-11 20:06:35 +08:00
parent 217d6bca43
commit 6f9dd5b838
25 changed files with 507 additions and 88 deletions
@@ -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})}>
+9
View File
@@ -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>
)
}