商城测试版v7
This commit is contained in:
@@ -3,7 +3,6 @@ import { AFTER_ORDER_STATUS, 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";
|
||||
@@ -31,7 +30,10 @@ type Param = {
|
||||
type: number //2 退货 1 预收退款 3 销售
|
||||
return_apply_order_id: number //退款申请单
|
||||
refund_amount: number // 退款金额
|
||||
is_quality_check: true|false
|
||||
is_quality_check: true|false,
|
||||
accessory_url: string[], //物流图片
|
||||
take_goods_remark: string, //物流备注
|
||||
|
||||
},
|
||||
onClickBtn?: (val:{status:number, orderInfo:Param['value']}) => void
|
||||
}
|
||||
@@ -76,6 +78,7 @@ export default memo(({value, onClickBtn}: Param) => {
|
||||
return [ReturnStageQualityCheckPendingRefund.value, ReturnStageServiceOrderPendingRefund.value].includes(value?.stage)?'待退款':value?.stage_name
|
||||
}, [value])
|
||||
|
||||
|
||||
return (
|
||||
<View className={styles.order_item}>
|
||||
<View className={styles.header} onClick={() => goLink('/pages/salesAfter/index', {id: value?.id})}>
|
||||
@@ -132,6 +135,7 @@ export default memo(({value, onClickBtn}: Param) => {
|
||||
</View>
|
||||
</View>
|
||||
<AfterOrderBtns orderInfo={orderInfo} onClick={orderBtnsClick} fixedBottom={false}/>
|
||||
|
||||
</View>
|
||||
)
|
||||
})
|
||||
|
||||
@@ -10,8 +10,8 @@ import InfiniteScroll from "@/components/infiniteScroll"
|
||||
import { dataLoadingStatus, getFilterData } from "@/common/util"
|
||||
import OrderStatusList from "./components/orderStatusList"
|
||||
import { GetSaleOrderListApi, RefundOrderSatausApi } from "@/api/salesAfterOrder"
|
||||
import ReturnLogistics from "./components/returnLogistics"
|
||||
import ApplyRecord from "../salesAfter/components/applyRecord"
|
||||
import ReturnLogistics from "../salesAfter/components/returnLogistics"
|
||||
|
||||
export default () => {
|
||||
useLogin()
|
||||
@@ -61,7 +61,7 @@ export default () => {
|
||||
if(orderData.list.length < orderData.total) {
|
||||
pageNum.current.page++
|
||||
const size = pageNum.current.size * pageNum.current.page
|
||||
setSearchField({...searchField, size })
|
||||
setSearchField((e) => ({...e, size }))
|
||||
}
|
||||
}, [orderData])
|
||||
|
||||
@@ -101,18 +101,28 @@ export default () => {
|
||||
getOrderList()
|
||||
} else if (status == 8) {
|
||||
setApplyRecord(true)
|
||||
} else if (status == 5) {
|
||||
onShowLogistics(() => true)
|
||||
}
|
||||
setCallBackPayOrderInfo(orderInfo)
|
||||
}, [orderData])
|
||||
|
||||
//物流显示
|
||||
const [logisticsShow, setLogisticsShow] = useState(false)
|
||||
const onCloseLogistics = useCallback(() => setLogisticsShow(false), [])
|
||||
|
||||
//显示记录
|
||||
const [applyRecord, setApplyRecord] = useState(false)
|
||||
|
||||
|
||||
//物流显示
|
||||
const [logisticsShow, setLogisticsShow] = useState(false)
|
||||
const onShowLogistics = useCallback((val) => {
|
||||
setLogisticsShow(true)
|
||||
}, [])
|
||||
const onCloseLogistics = useCallback(() => {
|
||||
setLogisticsShow(false)
|
||||
}, [])
|
||||
//物流成功上传
|
||||
const logisticsSuccess = useCallback(() => {
|
||||
setLogisticsShow(false)
|
||||
getOrderList()
|
||||
}, [orderData])
|
||||
|
||||
return (
|
||||
<View className={styles.order_list_main}>
|
||||
@@ -126,9 +136,9 @@ export default () => {
|
||||
return <View key={item.id} className={styles.order_item_con}> <Order value={item} onClickBtn={clickOrderBtn}/></View>
|
||||
})}
|
||||
</InfiniteScroll>
|
||||
<ReturnLogistics show={logisticsShow} onClose={onCloseLogistics}/>
|
||||
</View>
|
||||
<ApplyRecord show={applyRecord} id={callBackOrderInfo?.id} onClose={() => setApplyRecord(false)}/>
|
||||
<ReturnLogistics images={callBackOrderInfo?.accessory_url} descValue={callBackOrderInfo?.take_goods_remark} show={logisticsShow} id={callBackOrderInfo?.return_apply_order_id} onClose={onCloseLogistics} onSubmit={logisticsSuccess}/>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user