|
@@ -69,9 +69,9 @@
|
|
|
</view>
|
|
|
<view class="btn-box acea-row" style="justify-content: flex-end;">
|
|
|
<view></view>
|
|
|
- <view v-if="refundTypeStatus == 10" class="btn btn-999 acea-row row-center line-heightOne mr-20" @click="handleRevokeReject(items.refundOrderNo)">拒绝退款</view>
|
|
|
+ <view v-if="refundTypeStatus == 10 && items.refundStatus === 0" class="btn btn-999 acea-row row-center line-heightOne mr-20" @click="handleRevokeAudit(items.refundOrderNo, false)">审核不通过</view>
|
|
|
<view v-if="items.refundStatus === 0 || items.refundStatus === 4 || items.refundStatus === 5" class="btn acea-row row-center line-heightOne"
|
|
|
- :class="refundTypeStatus == 10 ? 'bg-tk-color' : 'btn-999'" @click="handleRevokeRefund(items.refundOrderNo)">{{refundTypeStatus == 10 ? '确认退款' : '撤销售后'}}</view>
|
|
|
+ :class="refundTypeStatus == 10 ? 'bg-tk-color' : 'btn-999'" @click="refundTypeStatus == 10 ? handleRevokeAudit(items.refundOrderNo, true) : handleRevokeRefund(items.refundOrderNo)">{{refundTypeStatus == 10 ? '审核通过' : '撤销售后'}}</view>
|
|
|
<view v-if="items.refundStatus === 4 && items.afterSalesType === 2" style="color: #fff;" class="btn bg-color acea-row row-center line-heightOne ml20"
|
|
|
@click="handleReturningRefund(items)">退回商品</view>
|
|
|
</view>
|
|
@@ -90,10 +90,10 @@
|
|
|
|
|
|
<uni-popup ref="rejectDialog" type="dialog">
|
|
|
<view class="tui-modal-custom">
|
|
|
- <view class="fs-32 fw-500 lh-44rpx text-center">拒绝退款原因</view>
|
|
|
+ <view class="fs-32 fw-500 lh-44rpx text-center">审核不通过原因</view>
|
|
|
<view class="mt-24 bg--w111-f5f5f5 rd-16rpx p-24">
|
|
|
<textarea class="w-full fs-26 h-342" ref="myTextarea" v-model="rejectText" :always-embed="true" :adjust-position="true"
|
|
|
- cursor-spacing="85rpx" placeholder="请输入拒绝退款原因内容" :maxlength="100" name="desc" />
|
|
|
+ cursor-spacing="85rpx" placeholder="请输入审核不通过原因" :maxlength="100" name="desc" />
|
|
|
</view>
|
|
|
<view class="flex-between-center mt-40">
|
|
|
<view class="w-244 h-72 rd-36rpx flex-center fs-26 font-color close-btn" @tap="handleInputClose">取消
|
|
@@ -122,7 +122,8 @@
|
|
|
secondHandRefundList,
|
|
|
refundSecondHandMyList,
|
|
|
refundSecondHandOkApi,
|
|
|
- returningSecondHandRejectApi
|
|
|
+ returningSecondHandRejectApi,
|
|
|
+ returningSecondHandAuditApi
|
|
|
} from '@/api/secondHand.js';
|
|
|
import {
|
|
|
goProductDetail,
|
|
@@ -194,11 +195,11 @@
|
|
|
this.orderList = [];
|
|
|
this.getOrderRefundList()
|
|
|
},
|
|
|
- //拒绝退款保存
|
|
|
+ //审核保存
|
|
|
handleInputConfirm() {
|
|
|
let that = this;
|
|
|
if (!this.rejectText) return this.$util.Tips({
|
|
|
- title: '请输入拒绝退款原因内容!'
|
|
|
+ title: '请输入审核不通过原因!'
|
|
|
});
|
|
|
uni.showLoading({
|
|
|
title: '正在处理中'
|
|
@@ -208,7 +209,7 @@
|
|
|
auditType: 'refuse',
|
|
|
reason: this.rejectText
|
|
|
}
|
|
|
- returningSecondHandRejectApi(params).then(res => {
|
|
|
+ returningSecondHandAuditApi(params).then(res => {
|
|
|
uni.hideLoading();
|
|
|
return that.$util.Tips({
|
|
|
title: '处理成功',
|
|
@@ -224,53 +225,41 @@
|
|
|
// 关闭窗口后,恢复默认内容
|
|
|
this.$refs.rejectDialog.close()
|
|
|
},
|
|
|
- //拒绝退款取消
|
|
|
+ //审核取消
|
|
|
handleInputClose() {
|
|
|
this.$refs.rejectDialog.close()
|
|
|
},
|
|
|
- // 拒绝退款
|
|
|
- handleRevokeReject(orderNo) {
|
|
|
+ // 审核
|
|
|
+ handleRevokeAudit(orderNo, type) {
|
|
|
+ let that = this;
|
|
|
this.rejectOrder = orderNo;
|
|
|
- this.$refs.rejectDialog.open();
|
|
|
+ if (type) {
|
|
|
+ uni.showLoading({
|
|
|
+ title: '正在处理中'
|
|
|
+ });
|
|
|
+ returningSecondHandAuditApi({refundOrderNo: this.rejectOrder, auditType: 'success'}).then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
+ return that.$util.Tips({
|
|
|
+ title: '处理成功',
|
|
|
+ icon: 'success'
|
|
|
+ }, function() {
|
|
|
+ that.handleSeach();
|
|
|
+ });
|
|
|
+ }).catch(err => {
|
|
|
+ return that.$util.Tips({
|
|
|
+ title: err
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$refs.rejectDialog.open();
|
|
|
+ }
|
|
|
},
|
|
|
- //撤销售后 || 同意退款
|
|
|
+ //撤销售后
|
|
|
handleRevokeRefund(refundOrderNo) {
|
|
|
let that = this;
|
|
|
- if (this.refundTypeStatus == 10) {
|
|
|
- uni.showModal({
|
|
|
- content: '是否确认退款该订单',
|
|
|
- cancelText: "取消",
|
|
|
- confirmText: "确定",
|
|
|
- showCancel: true,
|
|
|
- confirmColor: '#f55850',
|
|
|
- success: (res) => {
|
|
|
- if (res.confirm) {
|
|
|
- uni.showLoading({
|
|
|
- title: '正在处理中'
|
|
|
- });
|
|
|
- refundSecondHandOkApi(refundOrderNo).then(res => {
|
|
|
- uni.hideLoading();
|
|
|
- return that.$util.Tips({
|
|
|
- title: '退款成功',
|
|
|
- icon: 'success'
|
|
|
- }, function() {
|
|
|
- that.handleSeach();
|
|
|
- });
|
|
|
- }).catch(err => {
|
|
|
- return that.$util.Tips({
|
|
|
- title: err
|
|
|
- });
|
|
|
- });
|
|
|
- } else {
|
|
|
-
|
|
|
- }
|
|
|
- },
|
|
|
- })
|
|
|
- } else {
|
|
|
- onRevokeRefund(refundOrderNo, 'secondHand').then(() => {
|
|
|
- this.handleSeach()
|
|
|
- });
|
|
|
- }
|
|
|
+ onRevokeRefund(refundOrderNo, 'secondHand').then(() => {
|
|
|
+ this.handleSeach()
|
|
|
+ });
|
|
|
},
|
|
|
//退回商品
|
|
|
handleReturningRefund(item) {
|
|
@@ -285,7 +274,7 @@
|
|
|
this.loading = false;
|
|
|
this.page = 1;
|
|
|
this.orderList = [];
|
|
|
- if (this.refundTypeStatus !== -1 || this.refundTypeStatus !== 10) {
|
|
|
+ if (this.refundTypeStatus !== -1 && this.refundTypeStatus !== 10) {
|
|
|
this.getOrderRefundList()
|
|
|
} else {
|
|
|
this.getOrderAfterSaleList();
|