✨ feat:申请退货80%
This commit is contained in:
@@ -65,7 +65,6 @@ export default memo((props: prosObj) => {
|
||||
}, [obj])
|
||||
|
||||
|
||||
|
||||
return (
|
||||
< >
|
||||
|
||||
|
||||
@@ -22,7 +22,8 @@ import {
|
||||
orderPaymentpreCollectOrderorderPaymentSubmission,
|
||||
mpsaleOrdercancel,
|
||||
GetPayCode,
|
||||
mpsaleOrderaddress
|
||||
mpsaleOrderaddress,
|
||||
mpsaleOrderreceive
|
||||
} from '@/api/order'
|
||||
import { alert, goLink } from '@/common/common'
|
||||
import { formatPriceDiv, formatDateTime, formatWeightDiv } from '@/common/format'
|
||||
@@ -477,6 +478,7 @@ export default () => {
|
||||
setShowPay(false)
|
||||
getDetail()
|
||||
} else {
|
||||
Taro.hideLoading()
|
||||
Taro.showToast({
|
||||
title: restult?.msg,
|
||||
icon: 'error'
|
||||
@@ -505,6 +507,52 @@ export default () => {
|
||||
})
|
||||
}
|
||||
|
||||
//申请退货
|
||||
const handApplyGood = () => {
|
||||
if (infoObj.av_return_product.length == 0) {
|
||||
return alert.error('暂无货物退')
|
||||
} else {
|
||||
Taro.navigateTo({
|
||||
url: '/pages/applyGoods/index?orderId=' + infoObj.id
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
//确认收货
|
||||
const { fetchData: receveFetch } = mpsaleOrderreceive()
|
||||
const handSureGoods = async () => {
|
||||
|
||||
Taro.showModal({
|
||||
content: "确认收货吗?",
|
||||
confirmText: "确认",
|
||||
cancelText: "取消",
|
||||
success: async function (res) {
|
||||
if (res.confirm) {
|
||||
Taro.showLoading({
|
||||
title: '请稍等...',
|
||||
mask: true
|
||||
})
|
||||
const res = await receveFetch({ id: Number(infoObj.id) })
|
||||
if (res?.msg === 'success') {
|
||||
Taro.showToast({
|
||||
title: '成功'
|
||||
})
|
||||
Taro.hideLoading()
|
||||
setShowMore(false)
|
||||
getDetail()
|
||||
} else {
|
||||
Taro.hideLoading()
|
||||
Taro.showToast({
|
||||
title: res?.msg,
|
||||
icon: 'error'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<View className={styles.mainBox}>
|
||||
{(infoObj?.status != 10 && <OrderState orderInfo={infoObj} />)}
|
||||
@@ -587,7 +635,12 @@ export default () => {
|
||||
}
|
||||
{
|
||||
showMore && <View className={styles.posssBox}>
|
||||
<BottomApply obj={infoObj}></BottomApply>
|
||||
<BottomApply
|
||||
obj={infoObj}
|
||||
handApplyGoods={() => handApplyGood?.()}
|
||||
handApplyMoney={() => handApplyMoney?.()}
|
||||
handSureGoods={() => handSureGoods?.()}
|
||||
></BottomApply>
|
||||
</View>
|
||||
}
|
||||
<BottomBtns
|
||||
|
||||
Reference in New Issue
Block a user