|
|
|
@ -29,11 +29,23 @@ |
|
|
|
{{item.status == 0?'待退款':item.status == 3?'待售后':""}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view style="height: 180rpx;padding-top: 20rpx;color: #777;"> |
|
|
|
<view style="height: 50rpx;line-height: 50rpx;font-size: 28rpx;"> |
|
|
|
<view class="refund-info"> |
|
|
|
<view class="refund-info-content"> |
|
|
|
<view>退款原因: <text style="font-weight: 700;color:#00231C;">{{item.refundTypeStatus == 1?'商家原因':item.refundTypeStatus == 2?'配送原因':item.refundTypeStatus == 3?'商家/配送都有原因(需要退配送费)':item.refundTypeStatus == 4?'平台退款':""}}</text></view> |
|
|
|
|
|
|
|
<view>退款类型: <text style="font-weight: 700;color:#00231C;">{{item.refundType == 1?'退商品':item.refundType == 2?'退配送费':item.refundType == 3?'全额退款':""}}</text></view> |
|
|
|
<view class="refund-reason-row"> |
|
|
|
退款/售后原因: |
|
|
|
<text class="refund-reason-text">{{item.reason || '无'}}</text> |
|
|
|
</view> |
|
|
|
<view class="refund-pictures-row" v-if="getPictureList(item.pictures).length > 0"> |
|
|
|
<view class="refund-pictures-label">退款/售后原因图片:</view> |
|
|
|
<view class="refund-pictures"> |
|
|
|
<image class="refund-picture" v-for="(picture,pictureIndex) in getPictureList(item.pictures)" |
|
|
|
:key="pictureIndex" :src="picture" mode="aspectFill" |
|
|
|
@tap.stop="previewRefundImage(item.pictures,pictureIndex)"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view style="text-align: right;">退款金额: <text style="color:red;font-size: 34rpx;font-weight: 700;">¥{{item.refundAmount}}</text></view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -43,11 +55,11 @@ |
|
|
|
查看订单 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="btn" @tap="returnAmountAllow(item,0)" style="background: rgba(0, 35, 28, 1);color: rgba(166, 255, 234, 1);"> |
|
|
|
不同意 |
|
|
|
<view class="btn" :class="{'btn-disabled': submitLoading}" @tap="returnAmountAllow(item,0)" style="background: rgba(0, 35, 28, 1);color: rgba(166, 255, 234, 1);"> |
|
|
|
{{submitLoading ? '处理中' : '不同意'}} |
|
|
|
</view> |
|
|
|
<view class="btn" @tap="returnAmountAllow(item,1)" style="margin-left: 10px;"> |
|
|
|
同意 |
|
|
|
<view class="btn" :class="{'btn-disabled': submitLoading}" @tap="returnAmountAllow(item,1)" style="margin-left: 10px;"> |
|
|
|
{{submitLoading ? '处理中' : '同意'}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -168,7 +180,8 @@ |
|
|
|
goodsList:[], |
|
|
|
orderDetail:{}, |
|
|
|
returnData:[], |
|
|
|
returnCount:0 |
|
|
|
returnCount:0, |
|
|
|
submitLoading:false |
|
|
|
} |
|
|
|
}, |
|
|
|
filters:{ |
|
|
|
@ -247,7 +260,7 @@ |
|
|
|
}else{ |
|
|
|
this.searchCountForm.linkId = uni.getStorageSync('shopId') |
|
|
|
} |
|
|
|
this.tui.request("/mall/refund/page", "POST", this.searchCountForm, false, false).then((res) => { |
|
|
|
return this.tui.request("/mall/refund/page", "POST", this.searchCountForm, false, false).then((res) => { |
|
|
|
if (res.code == 200 && res.result != null) { |
|
|
|
that.returnCount = res.result.records.length; |
|
|
|
that.returnData = res.result.records |
|
|
|
@ -259,9 +272,26 @@ |
|
|
|
uni.hideLoading(); |
|
|
|
}).catch((res) => {}); |
|
|
|
}, |
|
|
|
getPictureList(pictures) { |
|
|
|
if (pictures == null || pictures === '') return []; |
|
|
|
if (Array.isArray(pictures)) { |
|
|
|
return pictures.filter(item => item != null && item !== ''); |
|
|
|
} |
|
|
|
return String(pictures).split(',').map(item => item.trim()).filter(item => item !== ''); |
|
|
|
}, |
|
|
|
previewRefundImage(pictures, index) { |
|
|
|
const urls = this.getPictureList(pictures); |
|
|
|
if (urls.length === 0) return; |
|
|
|
uni.previewImage({ |
|
|
|
urls, |
|
|
|
current: urls[index] |
|
|
|
}); |
|
|
|
}, |
|
|
|
returnAmountAllow(item,status){ |
|
|
|
if (this.submitLoading) return; |
|
|
|
let titleText = status == 1 ? '确定同意该申请吗?' : '确定拒绝该申请吗?'; |
|
|
|
//退款提示 |
|
|
|
this.groupOrderIdList = []; |
|
|
|
|
|
|
|
if(item.groupOrderIds != null && item.groupOrderIds != ''){ |
|
|
|
titleText += '该订单为面对面配送单,所有参团订单将同步处理'; |
|
|
|
@ -271,8 +301,6 @@ |
|
|
|
this.groupOrderIdList.push(this.returnData[i]); |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
this.groupOrderIdList = [] |
|
|
|
} |
|
|
|
|
|
|
|
// 2. 弹出确认框 |
|
|
|
@ -281,56 +309,68 @@ |
|
|
|
content: titleText, |
|
|
|
success: (res) => { |
|
|
|
if (res.confirm) { |
|
|
|
this.submitLoading = true; |
|
|
|
uni.showLoading({ |
|
|
|
title: '处理中', |
|
|
|
mask: true |
|
|
|
}); |
|
|
|
let requestList = []; |
|
|
|
if(this.groupOrderIdList != [] && this.groupOrderIdList.length > 0){ |
|
|
|
for(let i = 0; i < this.groupOrderIdList.length;i++){ |
|
|
|
this.processReturn(this.groupOrderIdList[i], status); |
|
|
|
requestList.push(this.processReturn(this.groupOrderIdList[i], status)); |
|
|
|
} |
|
|
|
}else{ |
|
|
|
this.processReturn(item, status); |
|
|
|
requestList.push(this.processReturn(item, status)); |
|
|
|
} |
|
|
|
Promise.all(requestList).then((messageList) => { |
|
|
|
this.tui.toast(messageList[0] || '操作成功'); |
|
|
|
return this.getReturnCount(); |
|
|
|
}).catch((message) => { |
|
|
|
this.tui.toast(message || '操作失败'); |
|
|
|
}).then(() => { |
|
|
|
this.submitLoading = false; |
|
|
|
uni.hideLoading(); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
processReturn(item,status){ |
|
|
|
let url = '' |
|
|
|
let returnFormData = {} |
|
|
|
//退款 |
|
|
|
if(item.status == 0){ |
|
|
|
//不同意 |
|
|
|
if(status == 0){ |
|
|
|
this.returnFormData.status = 2 |
|
|
|
returnFormData.status = 2 |
|
|
|
}else{ |
|
|
|
this.returnFormData.status = 1 |
|
|
|
returnFormData.status = 1 |
|
|
|
} |
|
|
|
}else if(item.status == 3){ |
|
|
|
//售后 |
|
|
|
if(status == 0){ |
|
|
|
this.returnFormData.status = 5 |
|
|
|
returnFormData.status = 5 |
|
|
|
}else{ |
|
|
|
this.returnFormData.status = 4 |
|
|
|
returnFormData.status = 4 |
|
|
|
} |
|
|
|
} |
|
|
|
this.returnFormData.id = item.id; |
|
|
|
this.returnFormData.linkId = item.linkId; |
|
|
|
this.returnFormData.orderId = item.orderId; |
|
|
|
this.returnFormData.deliveryType = item.mallOrder.deliveryType; |
|
|
|
this.returnFormData.orderType = item.mallOrder.orderType; |
|
|
|
this.returnFormData.refundAmount = item.refundAmount; |
|
|
|
this.returnFormData.refundType = item.refundType; |
|
|
|
this.returnFormData.refundTypeStatus = item.refundTypeStatus; |
|
|
|
returnFormData.id = item.id; |
|
|
|
returnFormData.linkId = item.linkId; |
|
|
|
returnFormData.orderId = item.orderId; |
|
|
|
returnFormData.deliveryType = item.mallOrder.deliveryType; |
|
|
|
returnFormData.orderType = item.mallOrder.orderType; |
|
|
|
returnFormData.refundAmount = item.refundAmount; |
|
|
|
returnFormData.refundType = item.refundType; |
|
|
|
returnFormData.refundTypeStatus = item.refundTypeStatus; |
|
|
|
|
|
|
|
let that = this |
|
|
|
this.tui.request("/mall/refund/allowOrReject", "POST", this.returnFormData, false, false).then((res) => { |
|
|
|
return this.tui.request("/mall/refund/allowOrReject", "POST", returnFormData, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
that.tui.toast(res.message); |
|
|
|
this.getReturnCount() |
|
|
|
that.$forceUpdate(); |
|
|
|
return res.message; |
|
|
|
} else { |
|
|
|
that.tui.toast(res.message); |
|
|
|
return; |
|
|
|
return Promise.reject(res.message); |
|
|
|
} |
|
|
|
uni.hideLoading(); |
|
|
|
}).catch((res) => {}); |
|
|
|
}).catch((res) => { |
|
|
|
return Promise.reject(res && res.message ? res.message : res); |
|
|
|
}); |
|
|
|
}, |
|
|
|
back() { |
|
|
|
uni.navigateBack() |
|
|
|
@ -342,23 +382,27 @@ |
|
|
|
<style lang="scss"> |
|
|
|
page { |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
min-height: 100%; |
|
|
|
font-size: 24rpx; |
|
|
|
background: #F5F8F5; |
|
|
|
color: #00231C; |
|
|
|
overflow-y: auto; |
|
|
|
} |
|
|
|
|
|
|
|
.page1 { |
|
|
|
width: 100%; |
|
|
|
height: 100%; |
|
|
|
min-height: 100vh; |
|
|
|
font-size: 24rpx; |
|
|
|
position: relative; |
|
|
|
overflow-y: auto; |
|
|
|
padding-bottom: 80rpx; |
|
|
|
box-sizing: border-box; |
|
|
|
} |
|
|
|
|
|
|
|
.title { |
|
|
|
background: url('https://jewel-shop.oss-cn-beijing.aliyuncs.com/8bc15960c2dc40268e295d6dd23aecce.png') no-repeat; |
|
|
|
width: 100%; |
|
|
|
height: 20%; |
|
|
|
height: 260rpx; |
|
|
|
} |
|
|
|
|
|
|
|
.title-sreach { |
|
|
|
@ -382,7 +426,8 @@ |
|
|
|
text-align: center; |
|
|
|
} |
|
|
|
.content{ |
|
|
|
margin: -100rpx auto; |
|
|
|
margin: -100rpx auto 0; |
|
|
|
padding-bottom: 60rpx; |
|
|
|
} |
|
|
|
.box1 { |
|
|
|
width: 95%; |
|
|
|
@ -390,6 +435,41 @@ |
|
|
|
background: #fff; |
|
|
|
border-radius: 20rpx; |
|
|
|
padding: 20rpx; |
|
|
|
box-sizing: border-box; |
|
|
|
} |
|
|
|
.refund-info { |
|
|
|
padding-top: 20rpx; |
|
|
|
color: #777; |
|
|
|
} |
|
|
|
.refund-info-content { |
|
|
|
font-size: 28rpx; |
|
|
|
line-height: 50rpx; |
|
|
|
} |
|
|
|
.refund-reason-row { |
|
|
|
line-height: 42rpx; |
|
|
|
} |
|
|
|
.refund-reason-text { |
|
|
|
color: #00231C; |
|
|
|
font-weight: 700; |
|
|
|
word-break: break-all; |
|
|
|
} |
|
|
|
.refund-pictures-row { |
|
|
|
margin: 10rpx 0; |
|
|
|
line-height: 40rpx; |
|
|
|
} |
|
|
|
.refund-pictures-label { |
|
|
|
margin-bottom: 10rpx; |
|
|
|
} |
|
|
|
.refund-pictures { |
|
|
|
display: flex; |
|
|
|
flex-wrap: wrap; |
|
|
|
gap: 12rpx; |
|
|
|
} |
|
|
|
.refund-picture { |
|
|
|
width: 140rpx; |
|
|
|
height: 140rpx; |
|
|
|
border-radius: 14rpx; |
|
|
|
background: #f0f5f3; |
|
|
|
} |
|
|
|
.btn{ |
|
|
|
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1)); |
|
|
|
@ -401,6 +481,10 @@ |
|
|
|
font-weight: 700; |
|
|
|
margin-top: 20rpx; |
|
|
|
} |
|
|
|
.btn-disabled { |
|
|
|
opacity: 0.6; |
|
|
|
pointer-events: none; |
|
|
|
} |
|
|
|
.popup-area-title { |
|
|
|
font-size: 36rpx; |
|
|
|
font-weight: bold; |
|
|
|
|