ZZ il y a 3 semaines
Parent
commit
620c834db4

+ 33 - 0
mer_uniapp/api/gameDazi.js

@@ -0,0 +1,33 @@
+import request from "@/utils/request.js";
+
+/**
+ * 游戏搭子内容发现列表
+ * 
+*/
+export function gameListApi(params){
+  return request.get(`game/note/discover/list`,params,{ noAuth : true});
+}
+
+/**
+ * 创建游戏搭子内容
+ * 
+*/
+export function gameAddApi(data){
+  return request.post(`game/note/add`, data);
+}
+
+/**
+ * 编辑游戏搭子内容
+ * 
+*/
+export function gameUpdateApi(data){
+  return request.post(`game/note/update`, data);
+}
+
+/**
+ * 游戏搭子内容详情
+ * 
+*/
+export function gameDetailApi(noteId){
+  return request.get(`game/note/user/detail/${noteId}`,{},{ noAuth : true});
+}

+ 8 - 0
mer_uniapp/api/secondHand.js

@@ -205,6 +205,14 @@ export function returningSecondHandRejectApi(data) {
 }
 
 /**
+ * 审核
+ *
+ */
+export function returningSecondHandAuditApi(data) {
+	return request.post(`refund/secondhand/audit`,data)
+}
+
+/**
  * 退款订单列表
  *
  */

+ 16 - 8
mer_uniapp/components/discoverFlowItem/discoverFlowItem.vue

@@ -2,8 +2,9 @@
 	<view :data-theme="theme">
 		<view @click="goDetail(items)" class="wf-page2">
 			<view class="flex-y-center mb-20">
-				<image class="type-image mr-20" :src="items.icon" mode=""></image>
-				<view>
+				<image v-if="!isDazi" class="type-image mr-20" :src="items.icon" mode=""></image>
+				<image v-else class="w-136 h-136 mr-20" :src="items.cover" mode=""></image>
+				<view class="flex-1">
 					<view v-if="!isDazi">
 						<view class="info-dzi mb-10 fs-24">{{items.authorName}}<text class="ml-14 mr-14">·</text>{{items.school || '北京大学'}}</view>
 						<view class="info-xzi">
@@ -11,12 +12,12 @@
 							<text>{{items.createTime || ''}}</text>
 						</view>
 					</view>
-					<view v-else>
-						<view class="info-dzi fs-24 flex-between-center">
-							{{items.title || ''}}
+					<view v-else class="flex-col flex-between-center h-136" style="align-items: flex-start;padding: 15rpx; 0">
+						<view class="w-full info-dzi fs-26 flex-between-center">
+							<text style="font-weight: bold;">{{items.title || ''}}</text>
 							<view class="dazi-info">加入</view>
 						</view>
-						<view class="info-xzi">{{item.content || ''}}</view>
+						<view class="info-xzi-jj">{{items.content || ''}}</view>
 					</view>
 				</view>
 			</view>
@@ -137,9 +138,9 @@
 				this.$emit('changeLikeToggle', item)
 			},
 			goDetail(item) {
-				if (item.type == 1 || this.column) {
+				if (item.type == 1 || this.column || this.isDazi) {
 					uni.navigateTo({
-						url: `/pages/discover/discover_details/index?noteId=${item.id}`
+						url: `/pages/discover/discover_details/index?noteId=${item.id}&dazi=${this.isDazi ? 'dazi' : ''}`
 					});
 				} else {
 					uni.navigateTo({
@@ -283,6 +284,13 @@
 		color: #999999;
 	}
 	
+	.info-xzi-jj {
+		font-weight: 400;
+		font-size: 23rpx;
+		color: #141414;
+		line-height: 33rpx;
+	}
+	
 	.info-dzi {
 		font-weight: 500;
 		font-size: 23rpx;

+ 7 - 3
mer_uniapp/pages/discover/discover_details/index.vue

@@ -26,6 +26,7 @@
 	import discoverDetails from '@/components/discoverDetails/index.vue'
 	import discoverComment from '@/components/discoverComment/index.vue'
 	import navBar from '@/components/navBar';
+	import { gameDetailApi } from '@/api/gameDazi.js';
 	import {
 		noteDetailApi
 	} from '@/api/discover.js';
@@ -61,13 +62,15 @@
 				observer: null,
 				isShowCommentView: false, //评论列表是否出现
 				isClickBtn: false, //是否点击了评论按钮,
-				title: '内容详情'
+				title: '内容详情',
+				dazi: ''
 			}
 		},
 		onLoad: function(options) {
 			let pages = getCurrentPages()
-
+			console.log(options)
 			this.noteId = Number(options.noteId);
+			this.dazi = options.dazi || '';
 			this.getNoteDetail(options.noteId);
 
 			//分销码
@@ -151,7 +154,8 @@
 			},
 			// 内容详情
 			getNoteDetail(noteId) {
-				noteDetailApi(noteId).then(res => {
+				let api = this.dazi ? gameDetailApi : noteDetailApi;
+				api(noteId).then(res => {
 					this.loading = true;
 					this.noteDetail = res.data;
 					this.noteRecommendList = res.data;

+ 5 - 4
mer_uniapp/pages/discover/discover_release/index.vue

@@ -179,6 +179,7 @@
 	import {
 		setThemeColor
 	} from '@/utils/setTheme.js'
+	import { gameAddApi, gameUpdateApi, gameDetailApi } from '@/api/gameDazi.js';
 	import {
 		noteDetailApi,
 		secondHandDetailApi,
@@ -349,7 +350,7 @@
 			},
 			/*获取图文详情*/
 			getDetail() {
-				let api = this.fair ? secondHandDetailApi : noteDetailApi;
+				let api = this.fair ? secondHandDetailApi : this.dazi ? gameDetailApi : noteDetailApi;
 				api(this.noteId).then(res => {
 					this.formData = res.data;
 					this.productList = res.data.productList || [];
@@ -479,7 +480,7 @@
 						});
 					}
 				}
-				if (!that.formData.categoryId) return that.$util.Tips({
+				if (!that.formData.categoryId && !isFinite(that.formData.categoryId)) return that.$util.Tips({
 					title: '请选择内容分类'
 				});
 				if (!that.formData.price && that.fair) return that.$util.Tips({
@@ -522,8 +523,8 @@
 					title: '保存中',
 					mask: true
 				})
-				let addApi = this.fair ? secondHandAddApi : noteAddApi
-				let editApi = this.fair ? secondHandUpdateApi : noteUpdateApi
+				let addApi = this.fair ? secondHandAddApi : this.dazi ? gameAddApi : noteAddApi
+				let editApi = this.fair ? secondHandUpdateApi : this.data ? gameUpdateApi : noteUpdateApi
 				console.log(that.noteId, this.formData, this.saleStatus)
 				that.noteId ? editApi(that.formData).then(res => {
 					uni.hideLoading()

+ 19 - 24
mer_uniapp/pages/game_dazi/index.vue

@@ -19,8 +19,8 @@
 				<!--  #endif -->
 				<view class="discover-navTab acea-row row-middle bg--w111-fff" style="margin: 4rpx 0;">
 					<view class="acea-row row-center-wrapper" :style="[textBoxStyle]">
-						<view style="margin-right: 52rpx;" :class="tabActive == 0 ? 'on' : ''" class="nav-item pb-10" @click="tabActive=0;showCateDrawer = false">本校</view>
-						<view :class="tabActive == 1 ? 'on' : ''" class="nav-item pb-10" @click="tabActive=1;">同城</view>
+						<view style="margin-right: 52rpx;" :class="tabActive == 0 ? 'on' : ''" class="nav-item pb-10" @click="onTabActiveClick(0, 'school')">本校</view>
+						<view :class="tabActive == 1 ? 'on' : ''" class="nav-item pb-10" @click="onTabActiveClick(1, 'city')">同城</view>
 					</view>
 					<!-- #ifndef MP -->
 					<view style="width: 32rpx;"></view>
@@ -125,6 +125,7 @@
 	import {
 		BACK_URL
 	} from '@/config/cache';
+	import { gameListApi } from '@/api/gameDazi.js';
 	import {
 		communityCategoryListApi,
 		recommendAuthorListApi,
@@ -237,14 +238,14 @@
 				theme: app.globalData.theme,
 				marTop: 0,
 				categoryList: [{
-						id: 1,
+						id: 0,
 						width: '51rpx',
 						iconXz: '/static/img/ic-dazi-pwgl.png',
 						iconWx: '/static/img/ic-dazi-pwbl.png',
 						name: '游戏搭子'
 					},
 					{
-						id: 2,
+						id: 1,
 						width: '38rpx',
 						iconXz: '/static/img/ic-dazi-dlgl.png',
 						iconWx: '/static/img/ic-dazi-dlbl.png',
@@ -299,20 +300,8 @@
 				searchHeight: 0,
 				bannerList: [],
 				wallHeadline: [],
-				navList: [{
-					id: 0,
-					name: '默认'
-				}, {
-					id: 1,
-					name: '评论'
-				}, {
-					id: 2,
-					name: '点赞'
-				}, {
-					id: 3,
-					name: '有图'
-				}],
 				active: 0,
+				rangeStr: 'city'
 			}
 		},
 		// 滚动监听
@@ -679,22 +668,19 @@
 						where: {
 							...this.where,
 							categoryId: this.categoryId,
-							secondType: this.active
+							range: this.rangeStr
 						},
 						goods: []
 					})
 				}
 				const data = this.discoverList[this.categoryId];
 				const cateId = this.categoryId;
-				if (data.loading || data.loadend) {
-					this.triggeredDiscover = false;
-					return
-				};
+				
 				data.loading = true
 				this.loading = true
 				this.loadTitle = '';
-				if (data.where.categoryId === 0) data.where.categoryId = ''
-				discoverListApi(data.where).then(res => {
+				if (data.where.range === 'city') data.where.city = uni.getStorageSync('cityName');
+				gameListApi(data.where).then(res => {
 					data.loadend = res.data.list.length < that.where.limit;
 					if (data.where.page == 1) {
 						data.goods = [];
@@ -750,6 +736,7 @@
 			// 点击列表头部
 			selectMenu(item, index, isScroll) {
 				if (this.tabClick == index) return
+				this.discoverList[this.categoryId].where.page = 1
 				this.active = 0
 				this.triggeredDiscover = false;
 				this.categoryId = item.id;
@@ -771,6 +758,14 @@
 				this.discoverList[this.categoryId].where.secondType = active
 				this.getDiscoverList();
 			},
+			onTabActiveClick(index, text) {
+				if (this.tabActive == index) return
+				this.discoverList[this.categoryId].where.page = 1
+				this.tabActive = index
+				console.log(this.tabActive, '父组件改变变变变')
+				this.rangeStr = text
+				this.getDiscoverList()
+			}
 		}
 	}
 </script>

+ 1 - 1
mer_uniapp/pages/goods/order_details/index.vue

@@ -130,7 +130,7 @@
 					</view>
 					<view class="borRadius14 orderGoodsBox">
 						<orderGoods :orderInfo="item" :orderNo="orderNo" :cartInfo="item.orderInfoList" :jump="true" :orderData="orderInfo"
-						 :secondType="orderInfo.secondType" :isHeader="true"></orderGoods>
+						 :secondType="orderInfo.secondType" :isHeader="orderType == 'secondHand'"></orderGoods>
 						<!-- v-if="orderInfo.status < 2" -->
 						<view class="p-24">
 							<view class='item acea-row row-between'>

+ 22 - 8
mer_uniapp/pages/goods/order_list/index.vue

@@ -28,7 +28,7 @@
 					<text class='item' :class='orderStatus==1 ? "on": ""' @click="statusClick(1)">
 						<text>待发货</text>
 					</text>
-					<text class='item' :class='orderStatus==3 ? "on": ""' @click="statusClick(3)">
+					<text v-if="!orderType" class='item' :class='orderStatus==3 ? "on": ""' @click="statusClick(3)">
 						<text>待核销</text>
 					</text>
 					<text class='item' :class='orderStatus==4 ? "on": ""' @click="statusClick(4)">
@@ -217,6 +217,11 @@
 		orderDel
 	} from '@/api/order.js';
 	import {
+		getSecondHandOrderList,
+		secondHandCancel,
+		secondHandDel
+	} from '@/api/secondHand.js';
+	import {
 		openOrderSubscribe
 	} from '@/utils/SubscribeMessage.js';
 	import navBar from '@/components/navBar';
@@ -277,7 +282,8 @@
 				errT: '',
 				storeImage: '', //海报产品图
 				selectItem: '',
-				groupLeaderAvatar: ''
+				groupLeaderAvatar: '',
+				orderType: ''
 			};
 		},
 		computed: mapGetters(['isLogin', 'userInfo', 'globalData', 'uid']),
@@ -300,6 +306,7 @@
 		onLoad: function(options) {
 			if (options.status) this.orderStatus = options.status;
 			if (options.secondType) this.secondType = options.secondType
+			if (options.orderType) this.orderType = options.orderType
 		},
 		methods: {
 			/**
@@ -661,7 +668,8 @@
 							uni.showLoading({
 								title: '正在取消中'
 							});
-							orderCancel(orderNo).then(res => {
+							let api = that.orderType ? secondHandCancel : orderCancel;
+							api(orderNo).then(res => {
 								uni.hideLoading();
 								return that.$util.Tips({
 									title: '取消成功',
@@ -693,7 +701,11 @@
 					this.changeOrderPay(item.orderNo, 'yue', 'yue', 'integral', 'integral', '0')
 				} else {
 					// 其他商品走正常流程,去支付收银台页面
-					this.getToPayment(item.secondType, item)
+					if (this.orderType) {
+						this.getToPayment('', item, 'secondHand')
+					} else {
+						this.getToPayment(item.secondType, item)
+					}
 				}
 			}),
 			/**
@@ -724,14 +736,14 @@
 				} else {
 					// #ifdef MP
 					uni.navigateTo({
-						url: '/pages/goods/order_details/index?orderNo=' + item.orderNo
+						url: '/pages/goods/order_details/index?orderNo=' + item.orderNo + `&orderType=${this.orderType}`
 					})
 					// #endif
 					// #ifndef MP
 					uni.navigateTo({
 						animationType: animationType.type,
 						animationDuration: animationType.duration,
-						url: '/pages/goods/order_details/index?orderNo=' + item.orderNo
+						url: '/pages/goods/order_details/index?orderNo=' + item.orderNo + `&orderType=${this.orderType}`
 					})
 					// #endif
 				}
@@ -755,7 +767,8 @@
 				if (that.loading) return;
 				that.loading = true;
 				that.loadTitle = "加载更多";
-				getOrderList({
+				let api = this.orderType ? getSecondHandOrderList : getOrderList;
+				api({
 					status: that.orderStatus,
 					page: that.page,
 					limit: that.limit,
@@ -790,7 +803,8 @@
 					success: (res) => {
 						if (res.confirm) {
 							let that = this;
-							orderDel(orderNo).then(res => {
+							let api = that.orderType ? secondHandDel : orderDel;
+							api(orderNo).then(res => {
 								that.getAllOrder();
 								return that.$util.Tips({
 									title: '删除成功',

+ 35 - 47
mer_uniapp/pages/goods/refund_details/index.vue

@@ -176,9 +176,9 @@
 				<view class='wrapper borRadius14 return_info_pad btn-box acea-row' style="justify-content: flex-end;">
 					<view></view>
 
-					<view v-if="orderTypeId == 10" class="btn btn-999 acea-row row-center line-heightOne mr-20" @click="handleRevokeReject(refundInfo.refundOrderNo)">拒绝退款</view>
+					<view v-if="orderTypeId == 10 && refundInfo.refundStatus === 0" class="btn btn-999 acea-row row-center line-heightOne mr-20" @click="handleRevokeAudit(refundInfo.refundOrderNo, false)">审核不通过</view>
 					<view v-if="refundInfo.refundStatus === 0 || refundInfo.refundStatus === 4 || refundInfo.refundStatus === 5"
-					 :class="orderTypeId == 10 ? 'bg-tk-color' : 'btn-999'" class="btn" @click="handleRevokeRefund(refundInfo.refundOrderNo)">{{orderTypeId == 10 ? '确认退款' : '撤销售后'}}</view>
+					 :class="orderTypeId == 10 ? 'bg-tk-color' : 'btn-999'" class="btn" @click="orderTypeId == 10 ? handleRevokeAudit(refundInfo.refundOrderNo, pictrue) : handleRevokeRefund(refundInfo.refundOrderNo)">{{orderTypeId == 10 ? '审核通过' : '撤销售后'}}</view>
 					<view v-if="refundInfo.refundStatus === 4 && refundInfo.afterSalesType === 2" style="color: #fff;" class="btn bg-color"
 					 @click="handleReturningRefund(refundInfo)">退回商品</view>
 				</view>
@@ -187,10 +187,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">取消
@@ -219,7 +219,8 @@
 	import {
 		refundSecondHandOkApi,
 		returningSecondHandRejectApi,
-		secondHandRefundInfoApi
+		secondHandRefundInfoApi,
+		returningSecondHandAuditApi
 	} from '@/api/secondHand.js';
 	import {
 		onRevokeRefund
@@ -306,11 +307,11 @@
 
 		},
 		methods: {
-			//拒绝退款保存
+			//审核保存
 			handleInputConfirm() {
 				let that = this;
 					if (!this.rejectText) return this.$util.Tips({
-						title: '请输入拒绝退款原因内容!'
+						title: '请输入审核不通过原因!'
 					});
 					uni.showLoading({
 						title: '正在处理中'
@@ -320,7 +321,7 @@
 						auditType: 'refuse',
 						reason: this.rejectText
 					}
-					returningSecondHandRejectApi(params).then(res => {
+					returningSecondHandAuditApi(params).then(res => {
 						uni.hideLoading();
 						return that.$util.Tips({
 							title: '处理成功',
@@ -336,14 +337,33 @@
 				// 关闭窗口后,恢复默认内容
 				this.$refs.rejectDialog.close()
 			},
-			//拒绝退款取消
+			//审核取消
 			handleInputClose() {
 				this.$refs.rejectDialog.close()
 			},
-			// 拒绝退款
-			handleRevokeReject(orderNo) {
+			// 审核
+			handleRevokeAudit(orderNo, type) {
 				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.orderRefundInfo();
+						});
+					}).catch(err => {
+						return that.$util.Tips({
+							title: err
+						});
+					});
+				} else {
+					this.$refs.rejectDialog.open();
+				}
 			},
 			//店铺地址
 			getMerAddress() {
@@ -358,41 +378,9 @@
 			//撤销售后
 			handleRevokeRefund(refundOrderNo) {
 					let that = this;
-					if (this.orderTypeId == 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.orderRefundInfo();
-										});
-									}).catch(err => {
-										return that.$util.Tips({
-											title: err
-										});
-									});
-								} else {
-									
-								}
-							},
-						})
-					} else {
-						onRevokeRefund(refundOrderNo, this.orderType).then(() => {
-							this.orderRefundInfo()
-						});
-					}
+					onRevokeRefund(refundOrderNo, this.orderType).then(() => {
+						this.orderRefundInfo()
+					});
 			},
 			//退回商品
 			handleReturningRefund(item) {

+ 5 - 58
mer_uniapp/pages/trade_fair/trade_fair_user/index.vue

@@ -55,7 +55,7 @@
 
 			<view class="plant_info" style="padding-bottom: 30rpx;">
 				<view class="count_wrapper acea-row">
-					<navigator :url="!id ? '/pages/discover/discover_follow/index?type=follow' : ''" class="item" hover-class="none">
+					<!-- <navigator :url="!id ? '/pages/discover/discover_follow/index?type=follow' : ''" class="item" hover-class="none">
 						<text class="mr10">{{userInfo.concernedNum}}</text> 关注
 					</navigator>
 					<navigator :url="!id ? '/pages/discover/discover_follow/index?type=fans' : ''" class="item" hover-class="none">
@@ -63,7 +63,10 @@
 					</navigator>
 					<view class="item">
 						<text class="mr10">{{userInfo.likeNum}}</text> 获赞
-					</view>
+					</view> -->
+					<navigator v-if="userInfo.id==uid" :url="!id ? '/pages/goods/order_list/index?orderType=secondHand' : ''" class="item" hover-class="none">
+						<text class="mr10"></text> 我的订单
+					</navigator>
 					<navigator v-if="userInfo.id==uid" :url="!id ? '/pages/trade_fair/trade_return_list/index' : ''" class="item" hover-class="none">
 						<text class="mr10">{{userInfo.refundNum}}</text> 售后
 					</navigator>
@@ -167,62 +170,6 @@
 						</view>
 					</view>
 				</view>
-				<view v-else-if="tab == 4">
-					<view class='goodWrapper borRadius14' v-for="(items,index) in list" :key="index">
-						<view v-if="refundTypeStatus ==-1" class='orderNum acea-row'>
-							<text class="mr10 iconfont icon-shangjiadingdan"></text>
-							<text class="no mr10">{{items.merName}}</text>
-						</view>
-						<view v-else class='orderNum acea-row row-between'>
-							<view class="acea-row">
-								<view class="tit mr10">退款单号: </view>
-								<view class="no">{{items.refundOrderNo}}</view>
-							</view>
-							<view class="afterSalesType">
-								<span class="iconfont" :class="items.afterSalesType===1?'icon-jintuikuan':'icon-tuihuotuikuan'"></span>
-								<span>{{items.afterSalesType===1?'仅退款':'退货退款'}}</span>
-							</view>
-						</view>
-						<view class='item acea-row row-between-wrapper'>
-							<view class='pictrue'>
-								<image :src='items.image'></image>
-							</view>
-							<view class='text'>
-								<view class='name line1 mb20'>{{items.productName}}</view>
-								<view class="f-s-20 text-999 mb24">{{items.sku}}</view>
-								<view class='acea-row row-between-wrapper'>
-									<view class='num mr20 line-heightOne'>
-										{{refundTypeStatus ==-1?'数量:'+items.payNum:'申请数量:'+items.applyRefundNum}}
-									</view>
-									<view v-show="refundTypeStatus !==-1" class='attr font-color line-heightOne'>
-										{{items.refundStatus===3?'已退款':'申请退款'}}:{{items.refundPrice}}
-									</view>
-					
-								</view>
-							</view>
-						</view>
-						<view v-if="refundTypeStatus===-1" class="btn-box acea-row row-between">
-							<view @click.stop="handlerToRecord(items.orderNo)" v-if="items.applyRefundNum+items.refundNum>0" class="applyRefundNum">
-								<text>有{{items.applyRefundNum+items.refundNum}}件商品已申请售后</text><span class="iconfont icon-gengduo3 ml10" style="font-size: 20rpx;"></span>
-							</view>
-							<view v-else></view>
-							<view class="btn bg-color acea-row row-center" style="color: #fff;" @click="goRefund(items)">申请售后</view>
-						</view>
-						<view v-else>
-							<view class="refundTypeStatus line1">
-								{{ items.refundStatus| refundStatusFilter}}
-								<span class="tips ml20">{{items.refundStatus| orderRefundTipsStatusFilter}}</span>
-							</view>
-							<view class="btn-box acea-row" style="justify-content: flex-end;">
-								<view></view>
-								<view v-if="(items.refundStatus === 0 || items.refundStatus === 4 || items.refundStatus === 5)"
-									class="btn btn-999 acea-row row-center line-heightOne" @click="handleRevokeRefund(items.refundOrderNo)">撤销售后</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>
-						</view>
-					</view>
-				</view>
 				<view class="empty-boxs noContent" v-if="list.length == 0 && !loading">
 					<emptyPage title="暂无更多内容~" mTop="13%" :imgSrc="urlDomain+'crmebimage/presets/noguanzhu.png'">
 					</emptyPage>

+ 38 - 49
mer_uniapp/pages/trade_fair/trade_return_list/index.vue

@@ -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();