zs 2 yıl önce
ebeveyn
işleme
82a91b7906

+ 17 - 1
pages.json

@@ -151,7 +151,23 @@
 					"path": "dough/index",
 					"style": {
 						"navigationBarTitleText": "我的拼团",
-						"enablePullDownRefresh": true
+						"enablePullDownRefresh": true,
+						"navigationBarBackgroundColor": "#23B67A"
+					}
+				},
+				{
+					"path": "dough/handle",
+					"style": {
+						"navigationBarTitleText": "拼团处理",
+						"enablePullDownRefresh": true,
+						"navigationBarBackgroundColor": "#23B67A"
+					}
+				},
+				{
+					"path": "dough/info",
+					"style": {
+						"navigationBarTitleText": "订单详情",
+						"navigationBarBackgroundColor": "#23B67A"
 					}
 				},
 				{

+ 3 - 5
pagesHome/group/index.vue

@@ -69,9 +69,7 @@
 						if (user) {
 							that.$set(that, `user`, user);
 							let res = await that.$api(`/goodsConfig`, `GET`, that.form, 'group');
-							if (res.errcode == '0' && res.total > 0) {
-								that.$set(that.form, `group_config`, res.data);
-							}
+							if (res.errcode == '0') that.$set(that.form, `group_config`, res.data);
 						}
 					},
 					fail: function(err) {
@@ -103,8 +101,8 @@
 							// 创建团数据
 							let res = await that.$api(`/group`, 'POST', that.form, 'group');
 							if (res.errcode == '0') {
-								uni.navigateTo({
-									url: `/pagesHome/group/share?id=${res.data.goods}`
+								uni.reLaunch({
+									url: `/pagesHome/group/share?id=${res.data.goods}&group=${res.data._id}`
 								})
 							} else {
 								uni.showToast({

+ 37 - 52
pagesHome/group/order.vue

@@ -19,33 +19,38 @@
 							<text class="iconfont icon-jiantouyou"></text>
 						</view>
 						<view class="one_2">
-							<view class="list" v-for="(item,index) in orderList" :key="index">
+							<view class="list">
 								<view class="list_1">
 									<view class="l">
 										<text class="iconfont icon-shangdian"></text>
-										<text>{{item.shop_name}}</text>
+										<text>{{info.shop.name}}</text>
 									</view>
 								</view>
-								<view class="list_2" v-for="(tag,index) in item.goods" :key="index">
+								<view class="list_2">
 									<view class="list_2_1">
 										<view class="l">
-											<image class="image" :src="tag.file&&tag.file.length>0?tag.file[0].url:''"
+											<image class="image"
+												v-if="info.goodsSpec.file&&info.goodsSpec.file.length>0"
+												:src="info.goodsSpec.file&&info.goodsSpec.file.length>0?info.goodsSpec.file[0].url:''"
+												mode=""></image>
+											<image class="image" v-else
+												:src="info.goods.file&&info.goods.file.length>0?info.goods.file[0].url:''"
 												mode=""></image>
 										</view>
 										<view class="c">
 											<view class="name">
-												{{tag.goods_name}}
+												{{info.goods.name}}
 											</view>
 											<view class="Spec">
-												规格:{{tag.goodsSpec_name}}
+												规格:{{info.goodsSpec.name}}
 											</view>
 										</view>
 										<view class="r">
 											<view class="price">
-												¥{{tag.price}}
+												¥{{info.goodsSpec.price}}
 											</view>
 											<view class="num">
-												×{{tag.num}}
+												×{{info.num}}
 											</view>
 										</view>
 									</view>
@@ -57,14 +62,15 @@
 									</view>
 									<view class="other">
 										<view class="other_1">运费</view>
-										<view class="other_2" v-if="!item.freight_total==0">¥{{item.freight_total}}
+										<view class="other_2" v-if="info.goodsSpec.freight!='0'">
+											¥{{info.goodsSpec.freight}}
 										</view>
 										<view class="other_2" v-else>包邮</view>
 									</view>
 									<view class="other">
 										<view class="other_1">订单备注</view>
 										<view class="other_3">
-											<input type="text" v-model="item.remarks" placeholder="选填,可填写您与卖家达成一致的要求" />
+											<input type="text" v-model="remarks" placeholder="选填,可填写您与卖家达成一致的要求" />
 										</view>
 									</view>
 								</view>
@@ -99,17 +105,14 @@
 				user: {},
 				key: '',
 				address: {},
-				orderList: [],
-				shop: [],
+				info: {},
 				goods_total: 0,
 				// 金额明细
 				total_detail: [],
 				// 收货地址
 				addressList: [],
-				total: 0,
-				page: 0,
-				skip: 0,
-				limit: 10,
+				// 备注
+				remarks: ''
 			};
 		},
 		onLoad: function(e) {
@@ -154,16 +157,16 @@
 				if (res.errcode == '0') {
 					that.$set(that, `addressList`, res.data.reverse());
 				}
-				const arr = await that.$api(`/order/toMakeOrder`, 'POST', {
+				const arr = await that.$api(`/groupOrder/toOrderPage`, 'POST', {
 					key: that.key
-				})
+				}, 'group')
 				if (arr.errcode == '0') {
 					// 地址
 					that.$set(that, `address`, arr.data.address);
 					// 订单
-					that.$set(that, `orderList`, arr.data.goodsData);
+					that.$set(that, `info`, arr.data);
 					// 总价
-					that.$set(that, `total_detail`, arr.data.orderTotal);
+					that.$set(that, `total_detail`, arr.data.total_detail);
 					that.computedTotal();
 				}
 			},
@@ -187,16 +190,15 @@
 				if (that.address) {
 					let obj = {
 						address: that.address,
-						goods: that.orderList,
-						total_detail: that.total_detail,
-						coupon: that.coupon,
-						type: that.type,
-						inviter: that.inviter,
-						plus_goods: that.plus_goods
+						shop: that.info.shop._id,
+						goods: that.info.goods._id,
+						goodsSpec: that.info.goodsSpec._id,
+						num: that.info.num,
+						group: that.info.group,
+						remarks: that.remarks
 					}
-					if (that.group_id) obj.group = that.group_id;
 					// 创建订单
-					let p1 = await that.$api(`/order`, 'POST', obj);
+					let p1 = await that.$api(`/groupOrder`, 'POST', obj, 'group');
 					if (p1.errcode == '0') {
 						if (system.uniPlatform == "mp-weixin") {
 							// 微信支付
@@ -204,45 +206,28 @@
 								title: '加载中'
 							})
 							// 支付信息
-							let p2 = await that.$api('/pay/toPayOrder', 'POST', {
+							let p2 = await that.$api('/orderDeal/pay', 'POST', {
 								order_id: p1.data,
-								type: '0'
-							})
+							}, 'group')
 							if (p2.errcode == '0' && p2.data.paySign) {
 								uni.requestPayment({
 									"provider": "wxpay",
 									...p2.data,
 									success: async function(res) {
-										// 获取团信息
-										let p3 = await that.$api('/group/getGroup', 'GET', {
-											order_id: p1.data,
+										console.log(res);
+										uni.reLaunch({
+											url: `/pagesMy/dough/index`
 										})
-										if (p3.errcode == '0') {
-											uni.hideLoading();
-											if (p3.data) {
-												uni.reLaunch({
-													url: `/pagesHome/group/share?id=${p3.data}`
-												})
-											} else {
-												uni.reLaunch({
-													url: `/pagesMy/order/index?status=${'1'}`
-												})
-											}
-										} else {
-											uni.showToast({
-												title: p3.errmsg,
-												icon: 'none'
-											})
-										}
 									},
 									fail: function(err) {
+										console.log(err);
 										uni.showToast({
 											title: `支付失败`,
 											icon: 'none'
 										})
 										uni.hideLoading();
 										uni.reLaunch({
-											url: `/pagesMy/order/index?status=${'0'}`
+											url: `/pagesMy/dough/index`
 										})
 									}
 								})

+ 21 - 69
pagesHome/group/share.vue

@@ -29,9 +29,7 @@
 							</view>
 						</view>
 						<view class="two_2">
-							<text class="money" v-if="infospecs.price"><text>特价¥</text>{{infospecs.price||0}}</text>
-							<text class="money" v-else><text>¥</text>{{infospecs.sell_money||0}}</text>
-							<text class="money"><text>¥</text>{{infospecs.flow_money||0}}</text>
+							<text class="money"><text>团购价¥</text>{{infospecs.price||0}}</text>
 						</view>
 						<view class="two_3">
 							<view class="name">
@@ -41,7 +39,6 @@
 								{{info.goods.shot_brief||''}}
 							</view>
 							<view class="money">
-								<!-- <text>运费{{infospecs.freight||'包邮'}}元</text> -->
 								<text>{{info.goods.send_time}}内发货</text>
 							</view>
 						</view>
@@ -119,11 +116,7 @@
 										</view>
 										<view class="r">
 											<view class="money">
-												<text v-if="specsInfo.price"
-													class="money_1"><text>特价¥</text>{{specsInfo.price}}</text>
-												<text v-if="!specsInfo.price"
-													class="money_1"><text>¥</text>{{specsInfo.sell_money}}</text>
-												<text class="money_1"><text>¥</text>{{specsInfo.flow_money}}</text>
+												<text class="money_1"><text>团购价¥</text>{{specsInfo.price||0}}</text>
 											</view>
 											<view class="other_1">
 												<text>已选:</text>
@@ -197,11 +190,14 @@
 				// 系统设置
 				config: {},
 				user: {},
+				// 商品id
 				id: '',
+				// 团id
+				group: '',
 				info: {},
 				buttonGroup: [{
-					text: '参团',
-					backgroundColor: 'linear-gradient(90deg, #EF1224, #EF1224)',
+					text: '参',
+					backgroundColor: 'linear-gradient(90deg, #23B67A, #23B67A)',
 					color: '#fff',
 				}],
 				// 规格
@@ -230,6 +226,7 @@
 		onLoad: async function(e) {
 			const that = this;
 			that.$set(that, `id`, e.id || '');
+			that.$set(that, `group`, e.group || '');
 			await that.watchLogin();
 			await that.searchConfig();
 			await that.search();
@@ -273,9 +270,10 @@
 				const that = this;
 				if (that.id) {
 					let res;
-					res = await that.$api(`/viewGoods/goodsDetail`, `POST`, {
-						id: that.id
-					});
+					res = await that.$api(`/view/goodsDetail`, `POST`, {
+						id: that.id,
+						group: that.group
+					}, 'group');
 					if (res.errcode == '0') {
 						let data = res.data;
 						if (data.goods.brief) data.goods.brief = data.goods.brief.replace(/\<img/gi,
@@ -284,12 +282,7 @@
 						if (data.specs && data.specs.length > 0) {
 							// 规格排序
 							let indexSpecs = data.specs.sort(function(a, b) {
-								let i, j;
-								if (a.price) i = 'price'
-								else i = 'sell_money'
-								if (b.price) j = 'price'
-								else j = 'sell_money'
-								return a[i] - b[j];
+								return a.price - b.price;
 							})
 							that.$set(that, `infospecs`, indexSpecs[0])
 						}
@@ -358,7 +351,7 @@
 				if (user && user._id) {
 					let res = await that.$api(`/storeShop`, `POST`, {
 						customer: user._id,
-						shop: that.info.shop._id
+						shop: that?.info?.shop._id
 					});
 					if (res.errcode == '0') {
 						uni.showToast({
@@ -417,7 +410,6 @@
 			// 关闭弹框
 			toClose() {
 				const that = this;
-				that.$set(that, `btn_type`, '1');
 				that.$refs.specShow.close();
 			},
 			// 弹框选择规格
@@ -446,26 +438,17 @@
 				let user = that.user;
 				if (user._id) {
 					let data = {
-						customer: user._id,
 						shop: that.info.shop._id,
 						goods: that.info.goods._id,
 						goodsSpec: that.specsInfo._id,
 						num: that.buy_num,
-						type: '1',
-						group: that.id
+						group: that.group
 					}
-					let arr = await that.$api(`/util/checkCanBuy`, 'POST', data)
+					let arr = await that.$api(`/groupOrder/checkCanBuy`, 'POST', data, 'group')
 					if (arr.errcode == '0') {
-						if (arr.data.result == true) {
-							uni.navigateTo({
-								url: `/pagesHome/group/order?key=${arr.data.key}`
-							})
-						} else {
-							uni.showToast({
-								title: arr.data.msg,
-								icon: 'none'
-							})
-						}
+						uni.navigateTo({
+							url: `/pagesHome/group/order?key=${arr.data}`
+						})
 					} else {
 						uni.showToast({
 							title: arr.errmsg,
@@ -509,7 +492,7 @@
 				let config = that.config;
 				that.$config.share = {
 					title: info?.goods?.name,
-					path: `/pagesHome/group/share?id=${that.id}`,
+					path: `/pagesHome/group/share?id=${that.id}&group=${that.group}`,
 					imageUrl: info?.goods?.file[0].url
 				}
 			},
@@ -594,24 +577,6 @@
 						font-size: 30px;
 					}
 				}
-
-				.acttags {
-					position: absolute;
-					top: 1vw;
-					left: 1vw;
-					width: 97%;
-
-					text {
-						display: inline-block;
-						background-color: #ff0000;
-						color: #fff;
-						border-radius: 1vw;
-						padding: 0.5vw;
-						font-size: 12px;
-
-						margin: 0 1vw 0 0;
-					}
-				}
 			}
 
 			.two_2 {
@@ -628,12 +593,6 @@
 						font-size: 14px;
 					}
 				}
-
-				.money:last-child {
-					font-size: 16px;
-					color: #858585;
-					text-decoration: line-through;
-				}
 			}
 
 			.two_3 {
@@ -875,13 +834,6 @@
 										font-size: 14px;
 									}
 								}
-
-								.money_1:last-child {
-									font-size: 16px;
-									color: #858585;
-									text-decoration: line-through;
-
-								}
 							}
 
 							.other_1 {
@@ -973,7 +925,7 @@
 				button {
 					width: 100%;
 					border-radius: 0;
-					background-color: var(--fFB1Color);
+					background-color: #23B67A;
 					color: #fff;
 					border: 1px solid #f1f1f1;
 				}

+ 15 - 4
pagesHome/order/detail.vue

@@ -32,6 +32,9 @@
 							<text v-if="discount.full_fold" class="act" v-for="(item,index) in discount.full_fold"
 								:key="index">{{item}}</text>
 						</view>
+						<view class="one_3">
+							<text class="num">已售{{info.goods.sell_num||0}}件</text>
+						</view>
 						<view class="one_4">
 							<view class="name">
 								{{info.goods.name}}
@@ -380,7 +383,6 @@
 					success: async function(res) {
 						let user = that.$jwt(res.data);
 						if (user) that.$set(that, `user`, user);
-						await that.searchOther();
 					},
 					fail: function(err) {
 						console.log('暂无用户信息');
@@ -453,10 +455,11 @@
 						if (act) that.$set(that.discount, `full_decrement`, act.text.split(';'));
 						act = data.act.find(i => i.type == '6')
 						if (act) that.$set(that.discount, `full_fold`, act.text.split(';'));
+						await that.searchOther();
 						// 查询规格
-						that.searchSpecs(data.specs);
+						await that.searchSpecs(data.specs);
 						// 查询评价数
-						that.searchRate(data);
+						await that.searchRate(data);
 					}
 				} else {
 					uni.showToast({
@@ -472,6 +475,9 @@
 					let data = e.find(i => i.num > 0);
 					let dataIndex = e.findIndex(i => i._id == data._id);
 					if (data) {
+						let specsInfo = that.group_config.find(i => i.spec._id == data._id)
+						if (specsInfo?._id && that.user.is_leader == '0') data.can_group = '0'
+						else data.can_group = '1'
 						that.$set(that, `specsInfo`, data);
 						that.$set(that, `is_specs`, dataIndex);
 					}
@@ -498,7 +504,7 @@
 				let specs = that.info.specs;
 				let dataIndex = specs.findIndex(i => i._id == e._id);
 				that.$set(that, `is_specs`, dataIndex);
-				let specsInfo = that.group_config.find(i => i.spec == e._id)
+				let specsInfo = that.group_config.find(i => i.spec._id == e._id)
 				if (specsInfo?._id && that.user.is_leader == '0') e.can_group = '0'
 				else e.can_group = '1'
 				that.$set(that, `specsInfo`, e)
@@ -855,6 +861,11 @@
 					border-radius: 6px;
 					padding: 0 1vw;
 				}
+
+				.num {
+					font-size: 12px;
+					color: #858585;
+				}
 			}
 
 			.one_4 {

+ 594 - 0
pagesMy/dough/handle.vue

@@ -0,0 +1,594 @@
+<template>
+	<mobile-frame>
+		<view class="main">
+			<view class="one">
+				<input type="text" v-model="searchInfo.customer" @input="toInput" placeholder="搜索购买用户名称">
+			</view>
+			<view class="two">
+				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
+					<view class="list-scroll-view">
+						<view class="list" v-for="(item,index) in list" :key="index" @tap="toInfo(item)">
+							<view class="list_1">
+								<view class="list_1_1">
+									<view class="shopname">
+										<text class="iconfont icon-shangdian"></text>
+										<text>{{item.shop.name}}</text>
+									</view>
+									<view class="status">
+										{{item.zhStatus||'暂无'}}
+									</view>
+								</view>
+								<view class="list_1_2">
+									<view class="goods">
+										<view class="goods_1">
+											<image class="image" v-if="item.spec.file&&item.spec.file.length>0"
+												:src="item.spec.file&&item.spec.file.length>0?item.spec.file[0].url:''"
+												mode=""></image>
+											<image class="image" v-else
+												:src="item.goods.file&&item.goods.file.length>0?item.goods.file[0].url:''"
+												mode=""></image>
+										</view>
+										<view class="goods_2">
+											<view class="goodsname textOver">
+												{{item.goods.name}}
+											</view>
+											<view class="specs">
+												{{item.spec.name}}
+											</view>
+											<view class="time">
+												购买者:{{item.customer.name}}
+											</view>
+											<view class="time">
+												购买时间:{{item.buy_time}}
+											</view>
+										</view>
+										<view class="goods_3">
+											<view class="price">
+												¥{{item.spec.price||0}}
+											</view>
+											<view class="num">
+												×{{item.num||0}}
+											</view>
+										</view>
+									</view>
+								</view>
+								<view class="other">
+									<text>共{{item.num||0}}件商品</text>
+									<text>实付款¥{{item.pay}}</text>
+								</view>
+							</view>
+							<view class="btn">
+								<button type="default" size="mini" @tap.stop="toView(item,'order')">详细信息</button>
+								<button v-if="item.status=='0'||item.status=='1'" size="mini"
+									@tap.stop="toCancel(item)">取消订单</button>
+								<button v-if="item.status=='0'" size="mini" @tap.stop="toPay(item)">支付</button>
+								<button v-if="item.status=='2'||item.status=='3'||item.status=='2-'" size="mini"
+									@tap.stop="toLogi(item)">查看物流</button>
+								<button v-if="item.status=='2'&&item.is_afterSale!=true" size="mini"
+									@tap.stop="toConfirm(item)">确认收货</button>
+								<button v-if="item.status=='2'||item.status=='2-'&&item.is_afterSale!=true" size="mini"
+									@tap.stop="toReject(item)">拒收</button>
+								<button v-if="item.status=='3'" size="mini" @tap.stop="toAfter(item)">申请售后</button>
+							</view>
+						</view>
+						<view class="is_bottom" v-if="is_bottom">
+							<text>{{config.bottom_title}}</text>
+						</view>
+					</view>
+				</scroll-view>
+			</view>
+		</view>
+	</mobile-frame>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				// 系统设置
+				config: {},
+				// 设备信息
+				system: {},
+				user: {},
+				id: '',
+				searchInfo: {},
+				list: [],
+				total: 0,
+				skip: 0,
+				limit: 6,
+				page: 0,
+				// 数据是否触底
+				is_bottom: false,
+				scrollTop: 0,
+				// 字典表
+				statusList: []
+			};
+		},
+		onLoad: function(e) {
+			const that = this;
+			that.$set(that, `id`, e.id || '');
+			that.searchConfig();
+		},
+		onShow: async function(e) {
+			const that = this;
+			await that.searchOther();
+			await that.watchlogin();
+		},
+		onPullDownRefresh: async function() {
+			const that = this;
+			that.clearPage();
+			await that.search();
+			uni.stopPullDownRefresh();
+		},
+		methods: {
+			// 查询基本设置
+			searchConfig() {
+				const that = this;
+				uni.getStorage({
+					key: 'config',
+					success: function(res) {
+						if (res.data) that.$set(that, `config`, res.data)
+						// 设备平台信息
+						let config = that.$config;
+						that.$set(that, `system`, config.system);
+					},
+					fail: function(err) {
+						console.log(err);
+					}
+				})
+			},
+			// 监听用户是否登录
+			watchlogin() {
+				const that = this;
+				uni.getStorage({
+					key: 'token',
+					success: function(res) {
+						let user = that.$jwt(res.data);
+						if (user) {
+							that.$set(that, `user`, user)
+							that.search();
+						}
+					}
+				})
+			},
+			async search() {
+				const that = this;
+				let info = {
+					skip: that.skip,
+					limit: that.limit,
+					group: that.id
+				}
+				let res = await that.$api(`/groupOrder/userView`, 'GET', {
+					...info,
+					...that.searchInfo
+				}, 'group');
+				if (res.errcode == '0') {
+					let list = [...that.list, ...res.data];
+					for (let val of list) {
+						if (val.status) val.zhStatus = that.searchStatus(val.status)
+					}
+					list.sort(function(a, b) {
+						return a.buy_time < b.buy_time ? 1 : -1;
+					})
+					that.$set(that, `list`, list);
+					that.$set(that, `total`, res.total)
+				} else {
+					uni.showToast({
+						title: res.errmsg,
+						icon: 'none'
+					})
+				}
+			},
+			// 查询状态
+			searchStatus(e) {
+				const that = this;
+				let data = that.statusList.find((i) => i.value == e);
+				if (data) return data.label
+				else return '暂无'
+			},
+			// 订单详细信息
+			toView(item) {
+				const that = this;
+				that.clearPage();
+				uni.navigateTo({
+					url: `/pagesMy/dough/info?id=${item._id}`
+				})
+			},
+			// 分页
+			toPage(e) {
+				const that = this;
+				let list = that.list;
+				let limit = that.limit;
+				if (that.total > list.length) {
+					uni.showLoading({
+						title: '加载中',
+						mask: true
+					})
+					let page = that.page + 1;
+					that.$set(that, `page`, page)
+					let skip = page * limit;
+					that.$set(that, `skip`, skip)
+					that.search();
+					uni.hideLoading();
+				} else that.$set(that, `is_bottom`, true)
+			},
+			toScroll(e) {
+				const that = this;
+				let up = that.scrollTop;
+				that.$set(that, `scrollTop`, e.detail.scrollTop);
+				let num = Math.sign(up - e.detail.scrollTop);
+				if (num == 1) that.$set(that, `is_bottom`, false);
+			},
+			// 输入框
+			toInput(e) {
+				const that = this;
+				if (that.searchInfo.goods) {
+					that.$set(that.searchInfo, `customer`, e.detail.value)
+				} else {
+					that.$set(that, `searchInfo`, {})
+				}
+				that.clearPage();
+				that.search();
+			},
+			// 订单详细信息
+			toInfo(item) {
+				const that = this;
+				that.clearPage();
+				uni.navigateTo({
+					url: `/pagesMy/order/info?id=${item._id}&status=${item.status}`
+				})
+			},
+			// 取消订单-未支付||取消订单-已支付
+			toCancel(e) {
+				const that = this;
+				uni.showModal({
+					title: '提示',
+					content: '确定取消订单吗?',
+					success: async function(res) {
+						if (res.confirm) {
+							if (e.status == '0') {
+								const arr = await that.$api(`/orderDeal/cancel`, 'POST', {
+									order_id: e._id
+								}, 'group');
+								if (arr.errcode == '0') {
+									uni.showToast({
+										title: '申请取消订单完成',
+										icon: 'none'
+									})
+									that.clearPage();
+									that.search();
+								} else {
+									uni.showToast({
+										title: arr.errmsg,
+										icon: 'none'
+									})
+								}
+							} else {
+								if (e.is_afterSale != true) {
+									let arr = await that.$api(`/groupAfterSale`, 'POST', {
+										order_detail: e._id,
+										type: '4'
+									}, 'group')
+									if (arr.errcode == '0') {
+										uni.showToast({
+											title: '申请取消订单完成',
+											icon: 'none'
+										})
+										that.clearPage();
+										that.search();
+									} else {
+										uni.showToast({
+											title: arr.errmsg,
+											icon: 'none'
+										})
+									}
+								} else {
+									uni.showToast({
+										title: `该订单有售后处理中`,
+										icon: 'none'
+									})
+								}
+							}
+						}
+					}
+				});
+			},
+			// 支付
+			async toPay(e) {
+				const that = this;
+				let system = that.system;
+				if (system.uniPlatform == "mp-weixin") {
+					uni.showLoading({
+						title: '加载中'
+					})
+					// 支付信息
+					let p2 = await that.$api('/orderDeal/pay', 'POST', {
+						order_id: e._id,
+					}, 'group')
+					if (p2.errcode == '0' && p2.data.paySign) {
+						uni.requestPayment({
+							"provider": "wxpay",
+							...p2.data,
+							success: function(res) {
+								uni.showToast({
+									title: '支付成功',
+									icon: 'none'
+								})
+							},
+							fail: function(err) {
+								uni.showToast({
+									title: `支付失败`,
+									icon: 'none'
+								})
+							},
+							complete: function() {
+								uni.hideLoading();
+								that.clearPage();
+								that.search()
+							}
+						})
+					} else {
+						uni.showToast({
+							title: p2.errmsg || '错误信息',
+							icon: 'none'
+						})
+					}
+				} else if (res.data.uniPlatform == "app") {
+					// app支付
+					uni.requestPayment({
+						provider: 'alipay',
+						orderInfo: 'orderInfo',
+						success: function(res) {
+							console.log('success:' + JSON.stringify(res));
+						},
+						fail: function(err) {
+							console.log('fail:' + JSON.stringify(err));
+						}
+					});
+				} else {
+					uni.showToast({
+						title: `平台不支持支付`,
+						icon: 'none'
+					})
+				}
+			},
+			// 查看物流
+			toLogi(e) {
+				const that = this;
+				that.clearPage();
+				uni.navigateTo({
+					url: `/pagesMy/logistics/index?id=${e._id}&type=${'groupOrder'}`
+				})
+			},
+			// 确认收货
+			async toConfirm(e) {
+				const that = this;
+				uni.showModal({
+					title: '提示',
+					content: '确定确认收货吗?',
+					success: async function(res) {
+						if (res.confirm) {
+							const arr = await that.$api(`/groupOrder/${e._id}`, 'POST', {
+								status: '3'
+							}, 'group');
+							if (arr.errcode == '0') {
+								uni.showToast({
+									title: '确认收货成功',
+									icon: 'none'
+								})
+								that.clearPage();
+								that.search();
+							} else {
+								uni.showToast({
+									title: arr.errmsg,
+									icon: 'none'
+								})
+							}
+						}
+					}
+				});
+			},
+			// 拒收
+			async toReject(e) {
+				const that = this;
+				uni.showModal({
+					title: '提示',
+					content: '确定拒收快递吗?',
+					success: async function(res) {
+						if (res.confirm) {
+							let arr = await that.$api(`/groupAfterSale`, 'POST', {
+								order_detail: e._id,
+								type: '5'
+							}, 'group')
+							if (arr.errcode == '0') {
+								uni.showToast({
+									title: '拒收申请完成',
+									icon: 'none'
+								})
+								that.clearPage();
+								that.search();
+							} else {
+								uni.showToast({
+									title: arr.errmsg,
+									icon: 'none'
+								})
+							}
+						}
+					}
+				});
+			},
+			// 申请售后
+			toAfter(e) {
+				const that = this;
+				that.clearPage();
+				uni.navigateTo({
+					url: `/pagesMy/order/service?id=${e._id}&status=${'-3'}`
+				})
+			},
+			// 查询其他信息
+			async searchOther() {
+				const that = this;
+				let res;
+				// 查询状态
+				res = await that.$api(`/dictData`, 'GET', {
+					code: 'order_process'
+				})
+				if (res.errcode == '0') that.$set(that, `statusList`, res.data);
+			},
+			// 清空列表
+			clearPage() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+			}
+		},
+
+	}
+</script>
+
+<style lang="scss">
+	.main {
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 100vh;
+
+		.one {
+			padding: 2vw;
+
+			input {
+				padding: 2vw;
+				background-color: var(--f1Color);
+				font-size: var(--font14Size);
+				border-radius: 5px;
+			}
+		}
+
+		.two {
+			position: relative;
+			flex-grow: 1;
+			background-color: var(--f9Color);
+
+			.list {
+				background-color: #fff;
+				border: 1px solid var(--f5Color);
+				padding: 2vw;
+				margin: 0 2vw 2vw 2vw;
+				border-radius: 5px;
+
+				.list_1 {
+					.list_1_1 {
+						display: flex;
+						justify-content: space-between;
+						margin: 0 0 2vw 0;
+
+						.shopname {
+							text:last-child {
+								padding: 0 0 0 2vw;
+							}
+						}
+
+						.status {
+							color: var(--ff0Color);
+						}
+					}
+
+					.list_1_2 {
+						border-bottom: 1px solid #f1f1f1;
+
+						.goods {
+							display: flex;
+							padding: 0 0 2vw 0;
+
+							.goods_1 {
+								width: 20vw;
+								height: 20vw;
+
+								.image {
+									width: 100%;
+									height: 100%;
+									border-radius: 5px;
+								}
+							}
+
+							.goods_2 {
+								width: 55vw;
+								padding: 0 0 0 2vw;
+
+								.goodsname {
+									font-size: 16px;
+									margin: 0 0 1vw 0;
+								}
+
+								.specs {
+									font-size: 14px;
+									color: #858585;
+								}
+
+								.time {
+									font-size: 13px;
+									color: #858585;
+								}
+							}
+
+							.goods_3 {
+								width: 15vw;
+								text-align: right;
+
+								.price {
+									color: #ff0000;
+								}
+							}
+						}
+					}
+
+					.other {
+						padding: 0 0 2vw 0;
+						margin: 2vw 0;
+						text-align: right;
+						border-bottom: 1px solid #f1f1f1;
+
+						text {
+							font-size: 14px;
+							padding: 0 0 0 2vw;
+						}
+					}
+				}
+
+				.btn {
+					text-align: right;
+
+					button {
+						margin: 0 2vw 0 0;
+					}
+				}
+			}
+		}
+	}
+
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.list-scroll-view {
+			display: flex;
+			flex-direction: column;
+		}
+	}
+
+	.is_bottom {
+		text-align: center;
+
+		text {
+			padding: 2vw 0;
+			display: inline-block;
+			color: #858585;
+			font-size: 14px;
+		}
+	}
+</style>

+ 460 - 72
pagesMy/dough/index.vue

@@ -7,11 +7,10 @@
 						<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
 							<view class="list-scroll-view">
 								<view class="one_1">
-									<input type="text" v-model="searchInfo.name" @blur="toInput" placeholder="搜索商品名称">
+									<button size="mini" @tap="toDislog">查询条件</button>
 								</view>
 								<view class="one_2">
-									<view class="list" v-for="(item, index) in list" :key="index"
-										@click="toShare(item)">
+									<view class="list" v-for="(item, index) in list" :key="index">
 										<view class="list_1" v-if="tabs.active=='0'">
 											<view class="list_1_1">
 												<view class="shopname">
@@ -23,55 +22,56 @@
 												</view>
 											</view>
 											<view class="list_1_2">
-												<view class="goods" v-for="(tag,indexs) in item.goods" :key="indexs">
+												<view class="goods">
 													<view class="goods_1">
-														<image class="image" :src="tag.url" mode=""></image>
+														<image class="image"
+															v-if="item.spec.file&&item.spec.file.length>0"
+															:src="item.spec.file&&item.spec.file.length>0?item.spec.file[0].url:''"
+															mode=""></image>
+														<image class="image" v-else
+															:src="item.goods.file&&item.goods.file.length>0?item.goods.file[0].url:''"
+															mode=""></image>
 													</view>
 													<view class="goods_2">
 														<view class="goodsname textOver">
-															{{tag.goods.name}}
+															{{item.goods.name}}
 														</view>
 														<view class="specs">
-															{{tag.name}}
+															{{item.spec.name}}
 														</view>
-														<text v-if="tag.gift.length>0" class="gift">赠品</text>
-														<text v-if="tag.sp_price" class="act">特价</text>
 													</view>
 													<view class="goods_3">
-														<view v-if="item.type=='0'" class="price">
-															¥{{tag.price||tag.sell_money}}
-														</view>
-														<view v-else class="price">
-															¥{{tag.group_config.money}}
+														<view class="price">
+															¥{{item.spec.price||0}}
 														</view>
 														<view class="num">
-															×{{tag.buy_num}}
+															×{{item.num||0}}
 														</view>
 													</view>
 												</view>
 											</view>
 											<view class="other">
-												<text>共{{item.buy_num_total||0}}件商品</text>
-												<text>实付款¥{{item.real_pay}}</text>
+												<text>共{{item.num||0}}件商品</text>
+												<text>实付款¥{{item.pay}}</text>
 											</view>
 											<view class="btn">
-												<button v-if="item.status=='0'" size="mini"
+												<button type="default" size="mini"
+													@tap.stop="toView(item,'order')">详细信息</button>
+												<button v-if="item.status=='0'||item.status=='1'" size="mini"
 													@tap.stop="toCancel(item)">取消订单</button>
 												<button v-if="item.status=='0'" size="mini"
 													@tap.stop="toPay(item)">支付</button>
-												<button v-if="item.status=='1'&&item.is_afterSale!=true" size="mini"
-													@tap.stop="toCancels(item)">取消订单</button>
 												<button v-if="item.status=='2'||item.status=='3'||item.status=='2-'"
-													size="mini" @tap.stop="toLogi(item)">查看物流</button>
+													size="mini" @tap.stop="toLogi(item,'order')">查看物流</button>
 												<button v-if="item.status=='2'&&item.is_afterSale!=true" size="mini"
-													@tap.stop="toConfirm(item)">确认收货</button>
+													@tap.stop="toConfirm(item,'order')">确认收货</button>
 												<button
 													v-if="item.status=='2'||item.status=='2-'&&item.is_afterSale!=true"
 													size="mini" @tap.stop="toReject(item)">拒收</button>
 												<button v-if="item.status=='3'" size="mini"
 													@tap.stop="toAfter(item)">申请售后</button>
-												<button v-if="item.status=='3'" type="default" size="mini"
-													@tap.stop="toAppraise(item)">{{item.rate?'追加评价':'立即评价'}}</button>
+												<!-- 	<button v-if="item.status=='3'" type="default" size="mini"
+													@tap.stop="toAppraise(item)">{{item.rate?'追加评价':'立即评价'}}</button> -->
 											</view>
 										</view>
 										<view class="list_2" v-else-if="tabs.active=='-1'">
@@ -85,15 +85,18 @@
 												</view>
 											</view>
 											<view class="list_2_2">
-												<image class="image"
-													:src="item.url&&item.url.length>0?item.url[0].url:''" mode="">
-												</image>
+												<image class="image" v-if="item.spec.file&&item.spec.file.length>0"
+													:src="item.spec.file&&item.spec.file.length>0?item.spec.file[0].url:''"
+													mode=""></image>
+												<image class="image" v-else
+													:src="item.goods.file&&item.goods.file.length>0?item.goods.file[0].url:''"
+													mode=""></image>
 												<view class="other">
 													<view class="name textOver">
-														{{item.goods.goods.name||'暂无'}}
+														{{item.goods.name||'暂无'}}
 													</view>
 													<view class="other_1">
-														商品规格:<text>{{item.goods.name||'暂无'}}</text>
+														商品规格:<text>{{item.goodsSpec.name||'暂无'}}</text>
 													</view>
 													<view class="other_1" v-if="item.type!='3'">
 														退款:<text>¥{{item.money||0}}</text>
@@ -108,50 +111,58 @@
 											</view>
 											<view class="btn">
 												<button type="default" size="mini"
-													@tap.stop="toView(item)">详细信息</button>
+													@tap.stop="toView(item,'after')">详细信息</button>
 												<button v-if="item.status=='0'" type="default" size="mini"
-													@tap.stop="toCancel(item)">取消售后</button>
+													@tap.stop="toCancels(item)">取消售后</button>
 												<button
 													v-if="item.type!='1'&&item.status=='2'||item.status=='3'&&!item.transport.shop_receive"
 													type="default" size="mini"
 													@tap.stop="toMaintain(item)">维护单号</button>
 												<button
-													v-if="item.type=='3'&&item.status=='3'&&item.transport.shop_receive==true"
-													type="default" size="mini" @tap.stop="toLogi(item)">查看物流</button>
+													v-if="item.type=='3'&&item.status=='3'||item.status=='-3'&&item.transport.customer_receive==true"
+													type="default" size="mini"
+													@tap.stop="toLogi(item,'after')">查看物流</button>
 												<button
-													v-if="item.type=='3'&&item.status=='3'&&item.transport.shop_receive==true&&!item.transport.customer_receive"
-													type="default" size="mini" @tap.stop="toConfirm(item)">确认收货</button>
+													v-if="item.type=='3'&&item.status=='3'&&item.transport.customer_receive==true"
+													type="default" size="mini"
+													@tap.stop="toConfirm(item,'after')">确认收货</button>
 											</view>
 										</view>
 										<view class="list_2" v-else>
 											<view class="list_2_1">
 												<view class="shopname">
 													<text class="iconfont icon-shangdian"></text>
-													<text>{{item.shop_name||'暂无'}}</text>
+													<text>{{item.shop.name||'暂无'}}</text>
 												</view>
 												<view class="type">
 													{{item.zhStatus||'暂无'}}
 												</view>
 											</view>
 											<view class="list_2_2">
+												<image class="image"
+													:src="item.goods.file&&item.goods.file.length>0?item.goods.file[0].url:''"
+													mode="">
+												</image>
 												<view class="other">
 													<view class="name textOver">
-														{{item.goods_name||'暂无'}}
+														{{item.goods.name||'暂无'}}
 													</view>
 													<view class="other_1">
 														开始时间:<text>{{item.start_time||'暂无'}}</text>
 													</view>
 													<view class="other_1">
-														结束时间:<text>¥{{item.end_time||'暂无'}}</text>
+														结束时间:<text>{{item.end_time||'暂无'}}</text>
 													</view>
 													<view class="other_1">
-														人数限制:<text>{{item.person_limit||'暂无'}}</text>
+														人数限制:<text>{{item.person_limit||'暂无'}}</text>
 													</view>
 												</view>
 											</view>
 											<view class="btn">
-												<button type="default" size="mini"
-													@tap.stop="toView(item)">详细信息</button>
+												<button type="default" v-if="item.status=='0'" size="mini"
+													@tap.stop="toShare(item)">分享</button>
+												<button type="default" v-if="item.status=='0'||item.status=='1'"
+													size="mini" @tap.stop="toHandle(item)">团处理</button>
 											</view>
 										</view>
 									</view>
@@ -161,6 +172,33 @@
 					</view>
 				</tabs>
 			</view>
+			<view class="dialog" v-if="dialog.show==true">
+				<view class="dialog_1" v-if="dialog.type=='1'">
+					<uni-forms ref="form" :modelValue="searchInfo" :rules="rules" label-width="auto">
+						<uni-forms-item v-if="tabs.active!='-1'" label="商品名称查询" name="goods">
+							<uni-easyinput type="text" v-model="searchInfo.goods" placeholder="请输入商品名称" />
+						</uni-forms-item>
+						<uni-forms-item label="状态" name="status">
+							<picker v-if="tabs.active=='0'" class="picker" mode="selector" :range="ostatusList"
+								@change="statusChange" range-key="label">
+								<view>{{status_name||'请选择状态'}}</view>
+							</picker>
+							<picker v-else-if="tabs.active=='-1'" class="picker" mode="selector" :range="astatusList"
+								@change="statusChange" range-key="label">
+								<view>{{status_name||'请选择状态'}}</view>
+							</picker>
+							<picker v-else-if="tabs.active=='1'" class="picker" mode="selector" :range="gstatusList"
+								@change="statusChange" range-key="label">
+								<view>{{status_name||'请选择状态'}}</view>
+							</picker>
+						</uni-forms-item>
+					</uni-forms>
+					<view class="btn">
+						<button type="primary" @click="onSubmit" size="mini">确定</button>
+						<button type="primary" @click="dialogClose" size="mini">取消</button>
+					</view>
+				</view>
+			</view>
 		</view>
 	</mobile-frame>
 </template>
@@ -174,6 +212,8 @@
 		},
 		data() {
 			return {
+				// 设备平台信息
+				system: {},
 				user: {},
 				searchInfo: {},
 				list: [],
@@ -202,6 +242,13 @@
 				gstatusList: [],
 				// 售后类型
 				typeList: [],
+				// 条件弹出框
+				dialog: {
+					show: false,
+					type: '1'
+				},
+				// 状态名称
+				status_name: '',
 			};
 		},
 		onShow: async function() {
@@ -212,7 +259,7 @@
 		onPullDownRefresh: async function() {
 			const that = this;
 			that.clearPage();
-			await that.search(that.tabs.active)
+			await that.search()
 			uni.stopPullDownRefresh();
 		},
 		methods: {
@@ -230,7 +277,10 @@
 								active: '1'
 							})
 						}
-						that.search(that.tabs.active)
+						// 设备平台信息
+						let config = that.$config;
+						that.$set(that, `system`, config.system);
+						that.search()
 					},
 					fail: function(err) {
 						uni.navigateTo({
@@ -240,7 +290,7 @@
 				})
 			},
 			// 查询列表
-			async search(active) {
+			async search() {
 				const that = this;
 				let user = that.user;
 				if (user._id) {
@@ -249,12 +299,12 @@
 						limit: that.limit,
 					}
 					let res;
-					if (active == '0') {
+					if (that.tabs.active == '0') {
 						info.customer = user._id;
-						res = await that.$api(`/orderDetail`, 'GET', {
+						res = await that.$api(`/groupOrder/userView`, 'GET', {
 							...info,
 							...that.searchInfo
-						})
+						}, 'group')
 						if (res.errcode == '0') {
 							let list = [...that.list, ...res.data];
 							for (let val of list) {
@@ -264,12 +314,12 @@
 							that.$set(that, `list`, list);
 							that.$set(that, `total`, res.total)
 						}
-					} else if (active == '-1') {
+					} else if (that.tabs.active == '-1') {
 						info.customer = user._id;
-						res = await that.$api(`/afterSale`, 'GET', {
+						res = await that.$api(`/groupAfterSale/userView`, 'GET', {
 							...info,
 							...that.searchInfo
-						})
+						}, 'group')
 						if (res.errcode == '0') {
 							let list = [...that.list, ...res.data];
 							for (let val of list) {
@@ -277,14 +327,13 @@
 								if (type) val.zhType = type.label;
 								let status = that.astatusList.find(i => i.value == val.status)
 								if (status) val.zhStatus = status.label;
-								val.url = val?.goods?.goods?.file;
 							}
 							that.$set(that, `list`, list);
 							that.$set(that, `total`, res.total)
 						}
 					} else {
 						info.leader = user._id;
-						res = await that.$api(`/group`, 'GET', {
+						res = await that.$api(`/group/userView`, 'GET', {
 							...info,
 							...that.searchInfo
 						}, 'group')
@@ -300,6 +349,314 @@
 					}
 				}
 			},
+			// 查询条件
+			toDislog() {
+				const that = this;
+				that.$set(that, `searchInfo`, {})
+				that.$set(that, `status_name`, '')
+				that.$set(that, `dialog`, {
+					show: true,
+					type: '1'
+				})
+			},
+			// 状态选择
+			statusChange(e) {
+				const that = this;
+				let data;
+				if (that.tabs.active == '0') data = that.ostatusList[e.detail.value];
+				if (that.tabs.active == '-1') data = that.astatusList[e.detail.value];
+				if (that.tabs.active == '1') data = that.gstatusList[e.detail.value];
+				if (data) {
+					that.$set(that.searchInfo, `status`, data.value);
+					that.$set(that, `status_name`, data.label);
+				}
+			},
+			// 关闭弹框
+			dialogClose() {
+				const that = this;
+				that.$set(that, `dialog`, {
+					show: false,
+					type: '1'
+				})
+			},
+			onSubmit() {
+				const that = this;
+				that.clearPage();
+				that.search();
+				that.$set(that, `dialog`, {
+					show: false,
+					type: '1'
+				})
+			},
+			// 订单详细信息
+			toView(item, type) {
+				const that = this;
+				that.clearPage();
+				if (type == 'order') {
+					uni.navigateTo({
+						url: `/pagesMy/dough/info?id=${item._id}`
+					})
+				} else {
+					uni.navigateTo({
+						url: `/pagesMy/order/afterInfo?id=${item._id}&status=${'1'}`
+					})
+				}
+			},
+			// 取消订单-未支付||取消订单-已支付
+			toCancel(e) {
+				const that = this;
+				uni.showModal({
+					title: '提示',
+					content: '确定取消订单吗?',
+					success: async function(res) {
+						if (res.confirm) {
+							if (e.status == '0') {
+								const arr = await that.$api(`/orderDeal/cancel`, 'POST', {
+									order_id: e._id
+								}, 'group');
+								if (arr.errcode == '0') {
+									uni.showToast({
+										title: '申请取消订单完成',
+										icon: 'none'
+									})
+									that.clearPage();
+									that.search();
+								} else {
+									uni.showToast({
+										title: arr.errmsg,
+										icon: 'none'
+									})
+								}
+							} else {
+								if (e.is_afterSale != true) {
+									let arr = await that.$api(`/groupAfterSale`, 'POST', {
+										order: e._id,
+										type: '4'
+									}, 'group')
+									if (arr.errcode == '0') {
+										uni.showToast({
+											title: '申请取消订单完成',
+											icon: 'none'
+										})
+										that.clearPage();
+										that.search();
+									} else {
+										uni.showToast({
+											title: arr.errmsg,
+											icon: 'none'
+										})
+									}
+								} else {
+									uni.showToast({
+										title: `该订单有售后处理中`,
+										icon: 'none'
+									})
+								}
+							}
+						}
+					}
+				});
+			},
+			// 支付
+			async toPay(e) {
+				const that = this;
+				let system = that.system;
+				if (system.uniPlatform == "mp-weixin") {
+					uni.showLoading({
+						title: '加载中'
+					})
+					// 支付信息
+					let p2 = await that.$api('/orderDeal/pay', 'POST', {
+						order_id: e._id,
+					}, 'group')
+					if (p2.errcode == '0' && p2.data.paySign) {
+						uni.requestPayment({
+							"provider": "wxpay",
+							...p2.data,
+							success: function(res) {
+								uni.showToast({
+									title: '支付成功',
+									icon: 'none'
+								})
+							},
+							fail: function(err) {
+								uni.showToast({
+									title: `支付失败`,
+									icon: 'none'
+								})
+							},
+							complete: function() {
+								uni.hideLoading();
+								that.clearPage();
+								that.search()
+							}
+						})
+					} else {
+						uni.showToast({
+							title: p2.errmsg || '错误信息',
+							icon: 'none'
+						})
+					}
+				} else if (res.data.uniPlatform == "app") {
+					// app支付
+					uni.requestPayment({
+						provider: 'alipay',
+						orderInfo: 'orderInfo',
+						success: function(res) {
+							console.log('success:' + JSON.stringify(res));
+						},
+						fail: function(err) {
+							console.log('fail:' + JSON.stringify(err));
+						}
+					});
+				} else {
+					uni.showToast({
+						title: `平台不支持支付`,
+						icon: 'none'
+					})
+				}
+			},
+			// 查看物流
+			toLogi(e, type) {
+				const that = this;
+				that.clearPage();
+				if (type == 'order') {
+					uni.navigateTo({
+						url: `/pagesMy/logistics/index?id=${e._id}&type=${'groupOrder'}`
+					})
+				} else {
+					uni.navigateTo({
+						url: `/pagesMy/logistics/index?id=${e._id}&type=${'groupAfterSale'}`
+					})
+				}
+			},
+			// 确认收货
+			async toConfirm(e, type) {
+				const that = this;
+				uni.showModal({
+					title: '提示',
+					content: '确定确认收货吗?',
+					success: async function(res) {
+						if (res.confirm) {
+							let arr;
+							if (type == 'order') {
+								arr = await that.$api(`/groupOrder/${e._id}`, 'POST', {
+									status: '3'
+								}, 'group');
+							} else {
+								e.transport.customer_receive = true;
+								arr = await that.$api(`/groupAfterSale/${e._id}`, 'POST', {
+									transport: e.transport
+								}, 'group');
+							}
+							if (arr.errcode == '0') {
+								uni.showToast({
+									title: '确认收货成功',
+									icon: 'none'
+								})
+								that.clearPage();
+								that.search();
+							} else {
+								uni.showToast({
+									title: arr.errmsg,
+									icon: 'none'
+								})
+							}
+						}
+					}
+				});
+			},
+			// 拒收
+			async toReject(e) {
+				const that = this;
+				uni.showModal({
+					title: '提示',
+					content: '确定拒收快递吗?',
+					success: async function(res) {
+						if (res.confirm) {
+							let arr = await that.$api(`/groupAfterSale`, 'POST', {
+								order: e._id,
+								type: '5'
+							}, 'group')
+							if (arr.errcode == '0') {
+								uni.showToast({
+									title: '拒收申请完成',
+									icon: 'none'
+								})
+								that.clearPage();
+								that.search();
+							} else {
+								uni.showToast({
+									title: arr.errmsg,
+									icon: 'none'
+								})
+							}
+						}
+					}
+				});
+			},
+			// 立即评价
+			toAppraise(e) {
+				const that = this;
+				that.clearPage();
+				uni.navigateTo({
+					url: `/pagesMy/order/appraise?id=${e._id}`
+				})
+			},
+			// 申请售后
+			toAfter(e) {
+				const that = this;
+				if (e.is_afterSale != true) {
+					that.clearPage();
+					uni.navigateTo({
+						url: `/pagesMy/order/service?id=${e._id}&status=${'-3'}`
+					})
+				} else {
+					uni.showToast({
+						title: `该订单有售后处理中`,
+						icon: 'none'
+					})
+				}
+			},
+			// 维护单号
+			toMaintain(e) {
+				uni.navigateTo({
+					url: `/pagesMy/order/detail?id=${e._id}&status=${'1'}`
+				})
+			},
+			// 取消售后
+			toCancels(e) {
+				const that = this;
+				uni.showModal({
+					title: '提示',
+					content: '确定取消售后申请吗?',
+					success: async function(res) {
+						if (res.confirm) {
+							const arr = await that.$api(`/groupAfterSale/${e._id}`, 'DELETE', {}, 'group');
+							if (arr.errcode == '0') {
+								uni.showToast({
+									title: '取消售后成功',
+									icon: 'none'
+								})
+								that.clearPage();
+								that.search();
+							} else {
+								uni.showToast({
+									title: arr.errmsg,
+									icon: 'none'
+								})
+							}
+						}
+					}
+				});
+			},
+			toHandle(e) {
+				const that = this;
+				that.clearPage();
+				uni.navigateTo({
+					url: `/pagesMy/dough/handle?id=${e._id}`
+				})
+			},
 			// 分页
 			toPage(e) {
 				const that = this;
@@ -318,19 +675,14 @@
 					uni.hideLoading();
 				} else {}
 			},
-			// 输入框
-			toInput(e) {
-				const that = this;
-				if (e.detail.value) that.$set(that.searchInfo, `name`, e.detail.value);
-				that.clearPage();
-				that.search();
-			},
 			// 选择选项卡
 			tabsChange(e) {
 				const that = this;
 				that.$set(that.tabs, `active`, e.active)
+				that.$set(that, `searchInfo`, {})
+				that.$set(that, `status_name`, '')
 				that.clearPage();
-				that.search(e.active)
+				that.search()
 			},
 			// 查询其他信息
 			async searchOther() {
@@ -358,12 +710,10 @@
 			// 分享
 			toShare(e) {
 				const that = this;
-				if (that.tabs.active == '1') {
-					uni.navigateTo({
-						url: `/pagesHome/group/share?id=${e.goods}`
-					})
-					that.clearPage();
-				}
+				that.clearPage();
+				uni.navigateTo({
+					url: `/pagesHome/group/share?id=${e.goods._id}&group=${e._id}`
+				})
 			},
 			// 清空列表
 			clearPage() {
@@ -396,12 +746,11 @@
 
 				.one_1 {
 					padding: 2vw;
+					text-align: center;
 
-					input {
-						padding: 2vw;
-						background-color: var(--f1Color);
-						font-size: var(--font14Size);
-						border-radius: 5px;
+					button {
+						background-color: #23B67A;
+						color: #ffffff;
 					}
 				}
 
@@ -490,7 +839,7 @@
 								text-align: right;
 
 								button {
-									margin: 0 2vw 0 0;
+									margin: 0 1vw 0 0;
 								}
 							}
 						}
@@ -530,6 +879,7 @@
 
 									.name {
 										font-size: var(--font16Size);
+										margin: 0 0 1vw 0;
 									}
 
 									.other_1 {
@@ -556,6 +906,44 @@
 		}
 	}
 
+	.dialog {
+		position: fixed;
+		width: 96vw;
+		height: 100vh;
+		background-color: #ffffff;
+		z-index: 99999;
+		display: flex;
+		flex-direction: column;
+		padding: 2vw;
+
+		.uni-input {
+			border: #f1f1ff 1px solid;
+			padding: 2vw 2vw;
+			border-radius: 1vw;
+		}
+
+		.picker {
+			border: 1px solid #3333;
+			border-radius: 5px;
+			padding: 2vw;
+		}
+
+		.btn {
+			text-align: center;
+
+			button {
+				margin: 0 2vw 2vw 2vw;
+				background-color: #23B67A;
+				color: #ffffff;
+			}
+
+			.name {
+				color: var(--f85Color);
+				font-size: var(--font14Size);
+			}
+		}
+	}
+
 	.scroll-view {
 		position: absolute;
 		top: 0;

+ 340 - 0
pagesMy/dough/info.vue

@@ -0,0 +1,340 @@
+<template>
+	<mobile-frame>
+		<view class="main">
+			<view class="zero">
+				<scroll-view scroll-y="true" class="scroll-view">
+					<view class="list-scroll-view">
+						<view class="one">
+							<view class="one_1">
+								<text class="iconfont icon-dingweixiao"></text>
+							</view>
+							<view class="one_2">
+								<view class="name">
+									<text>{{info.address.name}}</text>
+									<text>{{info.address.phone}}</text>
+								</view>
+								<view class="address">
+									<text>{{info.address.province}}</text>
+									<text>{{info.address.city}}</text>
+									<text>{{info.address.area}}</text>
+									<text>{{info.address.address}}</text>
+								</view>
+							</view>
+						</view>
+						<view class="two">
+							<view class="two_0">
+								<text>{{info.zhStatus||'未识别'}}</text>
+							</view>
+							<view class="two_1">
+								<view class="list">
+									<view class="list_1">
+										<text class="iconfont icon-shangdian"></text>
+										<text>{{info.shop.name}}</text>
+									</view>
+									<view class="list_2">
+										<view class="goods">
+											<view class="goods_1">
+												<view class="url">
+													<image class="image" v-if="info.spec.file&&info.spec.file.length>0"
+														:src="info.spec.file&&info.spec.file.length>0?info.spec.file[0].url:''"
+														mode=""></image>
+													<image class="image" v-else
+														:src="info.goods.file&&info.goods.file.length>0?info.goods.file[0].url:''"
+														mode=""></image>
+												</view>
+												<view class="goodsname">
+													{{info.goods.name}}
+													<view class="specs">
+														{{info.spec.name}}
+													</view>
+												</view>
+												<view class="goodsother">
+													<view class="price">
+														¥{{info.spec.price||0}}
+													</view>
+													<view class="num">
+														×{{info.num}}
+													</view>
+												</view>
+											</view>
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+						<view class="thr">
+							<view class="thr_1" v-for="(item,index) in info.total_detail" :key="index">
+								<text>{{item.zh}}</text>
+								<text>¥{{item.money}}</text>
+							</view>
+							<view class="thr_1">
+								<text>实付金额</text>
+								<text>¥{{info.goods_total}}</text>
+							</view>
+						</view>
+						<view class="four">
+							<view class="four_1">
+								<text>订单号</text>
+								<text>{{info.no}}</text>
+							</view>
+							<view class="four_1">
+								<text>订单状态</text>
+								<text>{{info.zhStatus||'未识别'}}</text>
+							</view>
+							<view class="four_1">
+								<text>下单时间</text>
+								<text>{{info.buy_time}}</text>
+							</view>
+							<view class="four_1">
+								<text>订单备注</text>
+								<text>{{info.remarks}}</text>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+			</view>
+			<view class="zero_1">
+				<text>合计:</text>
+				<text>¥{{info.goods_total}}</text>
+			</view>
+		</view>
+	</mobile-frame>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				id: '',
+				info: {},
+				// 售后状态
+				statusList: [],
+			};
+		},
+		onLoad: async function(e) {
+			const that = this;
+			that.$set(that, `id`, e.id || '');
+			await that.searchOther();
+			await that.search()
+		},
+		methods: {
+			// 查询详情
+			async search() {
+				const that = this;
+				uni.showLoading({
+					title: '加载中'
+				});
+				let res = await that.$api(`/groupOrder/userView/${that.id}`, 'GET', {},
+					'group');
+				if (res.errcode == '0') {
+					let status = that.statusList.find(i => i.value == res.data.status)
+					if (status) res.data.zhStatus = status.label;
+					// 运费总数和商品总数相加
+					let total = 0;
+					for (let val of res.data?.total_detail) total = this.$plus(total, val.money)
+					res.data.goods_total = total
+					that.$set(that, `info`, res.data);
+					uni.hideLoading();
+				}
+			},
+			// 查询其他信息
+			async searchOther() {
+				const that = this;
+				let res;
+				// 查询状态
+				res = await that.$api(`/dictData`, 'GET', {
+					code: 'order_process'
+				})
+				if (res.errcode == '0') {
+					that.$set(that, `statusList`, res.data);
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.main {
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 100vh;
+		background-color: #f5f5f5;
+
+		.zero {
+			position: relative;
+			flex-grow: 1;
+
+			.one {
+				background-color: #fff;
+				margin: 0 0 2vw 0;
+				display: flex;
+				justify-content: space-between;
+				padding: 2vw;
+				border-bottom: 2px dashed #ff0000;
+
+				.one_1 {
+					width: 8vw;
+					text-align: center;
+					padding: 3vw 0 0;
+				}
+
+				.one_2 {
+					width: 86vw;
+
+					.name {
+						font-size: 16px;
+						margin: 0 0 1vw 0;
+
+						text {
+							padding: 0 0 0 2vw;
+						}
+					}
+
+					.address {
+						font-size: 14px;
+						color: #858585;
+
+						text {
+							padding: 0 0 0 2vw;
+						}
+					}
+				}
+			}
+
+			.two {
+				background-color: #fff;
+				margin: 0 0 2vw 0;
+				padding: 2vw;
+
+				.two_0 {
+					text-align: right;
+					color: #ff0000;
+				}
+
+				.two_1 {
+					display: flex;
+					flex-direction: column;
+
+					.list {
+						margin: 0 0 1vw 0;
+
+						.list_1 {
+							font-size: 16px;
+							margin: 0 0 1vw 0;
+
+							text:last-child {
+								padding: 0 0 0 2vw;
+							}
+						}
+
+						.list_2 {
+							display: flex;
+							flex-direction: column;
+
+							.goods {
+								border-bottom: 1px dashed #f1f1f1;
+								padding: 2vw 0;
+
+								.goods_1 {
+									display: flex;
+
+									.url {
+										width: 20vw;
+
+										.image {
+											width: 100%;
+											height: 20vw;
+											border-radius: 5px;
+
+										}
+									}
+
+									.goodsname {
+										display: flex;
+										flex-direction: column;
+										width: 60vw;
+										padding: 0 2vw;
+										font-size: 16px;
+
+										.specs {
+											color: var(--f85Color);
+											font-size: var(--font12Size);
+										}
+
+										.other {
+											display: flex;
+											padding: 1vw 0 0 0;
+										}
+									}
+
+									.goodsother {
+										width: 15vw;
+										text-align: right;
+									}
+								}
+							}
+						}
+					}
+				}
+			}
+
+			.thr {
+				background-color: #fff;
+				margin: 0 0 2vw 0;
+				padding: 0 2vw;
+
+				.thr_1 {
+					margin: 2vw 0;
+					font-size: 15px;
+					display: flex;
+					justify-content: space-between;
+				}
+
+				.thr_1:last-child {
+					text:last-child {
+						color: #ff0000;
+					}
+				}
+			}
+
+			.four {
+				background-color: #fff;
+				margin: 0 0 2vw 0;
+				padding: 0 2vw;
+
+				.four_1 {
+					margin: 2vw 0;
+					font-size: 15px;
+					display: flex;
+					justify-content: space-between;
+				}
+			}
+		}
+
+		.zero_1 {
+			background-color: white;
+			width: 96vw;
+			padding: 4vw 2vw;
+			font-size: 16px;
+
+			text:last-child {
+				color: #ff0000;
+				padding: 0 0 0 2vw;
+			}
+		}
+	}
+
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.list-scroll-view {
+			display: flex;
+			flex-direction: column;
+		}
+	}
+</style>

+ 61 - 3
pagesMy/logistics/index.vue

@@ -2,7 +2,7 @@
 	<mobile-frame>
 		<view class="main">
 			<!-- 已收货查看选择商品物流 -->
-			<view class="first" v-if="type!='afterSale'&&type != 'integral'">
+			<view class="first" v-if="type == 'order'">
 				<view class="first_1">
 					<picker class="picker" mode="selector" :range="info.goods" @change="goodsChange"
 						range-key="goods_name">
@@ -111,6 +111,8 @@
 					let res;
 					if (that.type == 'integral') {
 						res = await that.$api(`/zrOrder/${that.id}`, `GET`, {}, `integral`)
+					} else if (that.type == 'groupOrder') {
+						res = await that.$api(`/groupOrder/${that.id}`, `GET`, {}, `group`)
 					} else if (that.type == 'afterSale') {
 						res = await that.$api(`/afterSale/${that.id}`, `GET`)
 						that.$set(that.tabs, `active`, 'shop')
@@ -121,18 +123,28 @@
 							title: '用户物流',
 							active: 'customer',
 						}])
+					} else if (that.type == 'groupAfterSale') {
+						res = await that.$api(`/groupAfterSale/${that.id}`, `GET`, {}, 'group')
+						that.$set(that.tabs, `active`, 'shop')
+						that.$set(that.tabs, `menu`, [{
+							title: '店铺物流',
+							active: 'shop',
+						}, {
+							title: '用户物流',
+							active: 'customer',
+						}])
 					} else {
 						res = await that.$api(`/orderDetail/${that.id}`, 'GET')
 					}
 					if (res.errcode == '0') {
-						if (that.type != 'afterSale' && that.type != 'integral') {
+						if (that.type == 'order') {
 							for (let val of res.data.goods) {
 								val.goods_name = val.goods.name;
 								val.goods_file = val.goods.file;
 							}
 						}
 						that.$set(that, `info`, res.data);
-						if (that.type == 'afterSale' || that.type == 'integral') that.search();
+						if (that.type != 'order') that.search();
 					} else {
 						uni.showToast({
 							title: res.errmsg,
@@ -187,6 +199,52 @@
 								icon: 'none'
 							})
 						}
+					} else if (that.type == 'groupAfterSale') {
+						let arr = await that.$api(`/orderOthers/afterSale/transport`, `POST`, {
+							id: that.id
+						}, `group`);
+						if (arr.errcode == '0') {
+							if (that.tabs.active == 'shop') {
+								that.$set(that, `is_check`, arr.data?.shop.is_check);
+								let list = arr.data?.shop.list.map((i) => ({
+									desc: i.time,
+									title: i.context
+								}))
+								that.$set(that, `list`, list);
+								that.$set(that, `no`, arr.data?.shop.no);
+							} else {
+								that.$set(that, `is_check`, arr.data?.customer.is_check);
+								let list = arr.data?.customer.list.map((i) => ({
+									desc: i.time,
+									title: i.context
+								}))
+								that.$set(that, `list`, list);
+								that.$set(that, `no`, arr.data?.customer.no);
+							}
+						} else {
+							uni.showToast({
+								title: res.errmsg,
+								icon: 'none'
+							})
+						}
+					} else if (that.type == 'groupOrder') {
+						let res = await that.$api(`/orderOthers/transport`, `POST`, {
+							order: that.id
+						}, `group`);
+						if (res.errcode == '0') {
+							that.$set(that, `is_check`, res?.data[0].is_check);
+							let list = res?.data[0].list.map((i) => ({
+								desc: i.time,
+								title: i.context
+							}))
+							that.$set(that, `list`, list);
+							that.$set(that, `no`, res?.data[0].no);
+						} else {
+							uni.showToast({
+								title: res.errmsg,
+								icon: 'none'
+							})
+						}
 					} else {
 						let data = that.tabs.menu.find((i) => i.no == that.tabs.active);
 						if (data) {

+ 2 - 2
pagesMy/order/after.vue

@@ -247,7 +247,7 @@
 			// 售后详细信息
 			toView(item) {
 				uni.navigateTo({
-					url: `/pagesMy/order/afterInfo?id=${item._id}`
+					url: `/pagesMy/order/afterInfo?id=${item._id}$status=${'0'}`
 				})
 			},
 			// 订单详细
@@ -259,7 +259,7 @@
 			// 维护单号
 			toMaintain(item) {
 				uni.navigateTo({
-					url: `/pagesMy/order/detail?id=${item._id}`
+					url: `/pagesMy/order/detail?id=${item._id}$status=${'0'}`
 				})
 			},
 			// 确认收货

+ 6 - 2
pagesMy/order/afterInfo.vue

@@ -1,7 +1,7 @@
 <template>
 	<mobile-frame>
 		<view class="main">
-			<view class="goods" v-if="info.goods">
+			<view class="goods" v-if="status == '0'">
 				<view class="url">
 					<image class="image"
 						:src="info.goods.goods.file&&info.goods.goods.file.length>0?info.goods.goods.file[0].url:''"
@@ -80,6 +80,7 @@
 		data() {
 			return {
 				id: '',
+				status: '',
 				user: {},
 				info: {},
 				// 售后状态
@@ -93,6 +94,7 @@
 		onLoad: async function(e) {
 			const that = this;
 			that.$set(that, `id`, e.id || '');
+			that.$set(that, `status`, e.status || '');
 			await that.searchOther();
 			await that.watchLogin();
 		},
@@ -131,7 +133,9 @@
 							that.$set(that, `user`, user);
 							if (that.id) {
 								//售后详情
-								let arr = await that.$api(`/afterSale/${that.id}`, 'GET')
+								let arr;
+								if (that.status == '0') arr = await that.$api(`/afterSale/${that.id}`, 'GET')
+								else arr = await that.$api(`/groupAfterSale/${that.id}`, 'GET', {}, 'group')
 								if (arr.errcode == '0') {
 									let status = that.statusList.find(i => i.value == arr.data.status)
 									if (status) arr.data.zhStatus = status.label;

+ 30 - 8
pagesMy/order/appraise.vue

@@ -5,7 +5,7 @@
 				<view class="one_1">
 					<text>评论商品</text>
 				</view>
-				<view class="one_2">
+				<view class="one_2" v-if="status=='0'">
 					<view class="list" v-for="(item,index) in goodsList" :key="index">
 						<view class="list_1">
 							<image class="image"
@@ -36,7 +36,7 @@
 			</view>
 			<view class="two">
 				<uni-forms ref="form" :modelValue="form" :rules="rules" label-width="auto">
-					<uni-forms-item label="评论商品" name="goods">
+					<uni-forms-item label="评论商品" name="goods" v-if="status=='0'">
 						<picker class="picker" mode="selector" :range="goodsList" @change="goodsChange"
 							range-key="goods_name">
 							<view>{{form.goods_name||'请选择评论商品'}}</view>
@@ -76,6 +76,7 @@
 		data() {
 			return {
 				id: '',
+				status: '',
 				// 追加
 				rate_id: '',
 				user: {},
@@ -110,6 +111,7 @@
 		onLoad: function(e) {
 			const that = this;
 			that.$set(that, `id`, e.id || '');
+			that.$set(that, `status`, e.status || '');
 			// 监听用户是否登录
 			that.watchLogin();
 		},
@@ -137,12 +139,32 @@
 				let user = that.user;
 				let res;
 				if (that.id) {
-					res = await that.$api(`/orderDetail/${that.id}`);
-					if (res.errcode == '0') {
-						that.$set(that, `info`, res.data.order);
-						for (let val of res.data.goods) val.goods_name = val.goods.name
-						that.$set(that, `goodsList`, res.data.goods);
-						uni.hideLoading();
+					if (that.status == '0') {
+						res = await that.$api(`/orderDetail/${that.id}`);
+						if (res.errcode == '0') {
+							that.$set(that, `info`, res.data.order);
+							for (let val of res.data.goods) val.goods_name = val.goods.name
+							that.$set(that, `goodsList`, res.data.goods);
+							uni.hideLoading();
+						}
+					} else {
+						res = await that.$api(`/groupOrder/${that.id}`, {}, 'group');
+						if (res.errcode == '0') {
+							if (res.data.rate) {
+								that.$set(that, `rate_id`, res.data.rate);
+								let arr = await that.$api(`/goodsRate/${res.data.rate}`);
+								if (arrarr.errcode == '0') {
+									that.$set(that, `form`, arr.data);
+									that.$set(that.form, `goods_name`, res.data.goods.name);
+									that.$set(that, `readonly`, true)
+								}
+							} else {
+								that.$set(that.form, `goods`, res.data.goods._id);
+								that.$set(that.form, `goods_name`, res.data.goods.name);
+								that.$set(that.form, `goodsSpec`, res.goodsSpec.data._id);
+							}
+							uni.hideLoading();
+						}
 					}
 				}
 			},

+ 7 - 2
pagesMy/order/detail.vue

@@ -4,7 +4,8 @@
 			<view class="one">
 				<uni-forms ref="form" :modelValue="form" :rules="rules" label-width="auto">
 					<uni-forms-item label="快递类型查询" name="transport_type">
-						<uni-easyinput type="text" @change="searchOther" v-model="form.transport_type" placeholder="请输入快递类型" />
+						<uni-easyinput type="text" @change="searchOther" v-model="form.transport_type"
+							placeholder="请输入快递类型" />
 					</uni-forms-item>
 					<uni-forms-item label="快递类型" name="customer_transport_type">
 						<picker class="picker" mode="selector" :range="typeList" @change="typeChange" range-key="label">
@@ -28,6 +29,7 @@
 		data() {
 			return {
 				id: '',
+				status: '',
 				form: {},
 				rules: {
 					customer_transport_type: {
@@ -49,6 +51,7 @@
 		onLoad: function(e) {
 			const that = this;
 			that.$set(that, `id`, e.id || '');
+			that.$set(that, `status`, e.status || '');
 			that.watchLogin();
 		},
 		methods: {
@@ -79,7 +82,9 @@
 					transport.customer_transport_no = params.customer_transport_no;
 					transport.customer_transport_type = params.customer_transport_type;
 					form.transport = transport;
-					const arr = await that.$api(`/afterSale/${that.id}`, 'POST', form);
+					let arr;
+					if (that.status == '0') arr = await that.$api(`/afterSale/${that.id}`, 'POST', form);
+					else arr = await that.$api(`/groupAfterSale/${that.id}`, 'POST', form, 'group')
 					if (arr.errcode == '0') {
 						uni.showToast({
 							title: `维护信息成功`,

+ 3 - 3
pagesMy/order/index.vue

@@ -421,7 +421,7 @@
 				const that = this;
 				that.clearPage();
 				uni.navigateTo({
-					url: `/pagesMy/logistics/index?id=${e._id}`
+					url: `/pagesMy/logistics/index?id=${e._id}&type=${'order'}`
 				})
 			},
 			// 确认收货
@@ -486,7 +486,7 @@
 				const that = this;
 				that.clearPage();
 				uni.navigateTo({
-					url: `/pagesMy/order/appraise?id=${e._id}`
+					url: `/pagesMy/order/appraise?id=${e._id}&status=${'0'}`
 				})
 			},
 			// 申请售后
@@ -494,7 +494,7 @@
 				const that = this;
 				that.clearPage();
 				uni.navigateTo({
-					url: `/pagesMy/order/service?id=${e._id}&&status=${e.status}`
+					url: `/pagesMy/order/service?id=${e._id}&status=${e.status}`
 				})
 			},
 			// 查询其他信息

+ 66 - 35
pagesMy/order/service.vue

@@ -1,7 +1,7 @@
 <template>
 	<mobile-frame>
 		<view class="main">
-			<view class="one">
+			<view class="one" v-if="status!='-3'">
 				<view class="one_1">
 					<text>售后商品</text>
 				</view>
@@ -35,9 +35,9 @@
 				</view>
 			</view>
 			<view class="two">
-				<view class="two_1" v-if="status=='3'">
+				<view class="two_1" v-if="status=='3'||status=='-3'">
 					<uni-forms ref="thrform" :rules="thrrules" :model="thrform" label-width="auto">
-						<uni-forms-item label="售后商品" name="goods">
+						<uni-forms-item label="售后商品" name="goods" v-if="status!='-3'">
 							<picker class="picker" mode="selector" :range="info.goods" @change="goodsChange"
 								range-key="goods_name">
 								<view>{{thrform.goods_name||'请选择退款商品'}}</view>
@@ -170,22 +170,34 @@
 						uni.navigateTo({
 							url: `/pages/login/index`
 						})
-
 					}
 				})
 			},
 			async search() {
 				const that = this;
-				let id = that.id;
-				let res = await that.$api(`/orderDetail/${id}`, 'GET')
-				if (res.errcode == '0') {
-					for (let val of res.data.goods) val.goods_name = val.goods.name;
-					that.$set(that, `info`, res.data)
+				let res;
+				if (that.status != '-3') {
+					res = await that.$api(`/orderDetail/${that.id}`, 'GET')
+					if (res.errcode == '0') {
+						for (let val of res.data.goods) val.goods_name = val.goods.name;
+						that.$set(that, `info`, res.data)
+					} else {
+						uni.showToast({
+							title: res.errmsg,
+							icon: 'none'
+						})
+					}
 				} else {
-					uni.showToast({
-						title: res.errmsg,
-						icon: 'none'
-					})
+					res = await that.$api(`/groupOrder/userView/${that.id}`, 'GET', {}, 'group')
+					if (res.errcode == '0') {
+						that.$set(that.thrform, `goods`, res.data.goods._id);
+						that.$set(that, `info`, res.data)
+					} else {
+						uni.showToast({
+							title: res.errmsg,
+							icon: 'none'
+						})
+					}
 				}
 			},
 			// 售后请求
@@ -206,28 +218,31 @@
 					that.$set(that.thrform, `type`, data.value);
 					that.$set(that.thrform, `type_name`, data.label);
 				}
-				if (data.value != '3') {
-					if (thrform.goods) {
-						const arr = await that.$api(`/afterSale/cgfr`, 'POST', {
-							order_detail: that.id,
-							goods_id: thrform.goods
-						});
-						if (arr.errcode == '0') {
-							that.$set(that, `moneyInfo`, arr.data);
+				if (that.status != '-3') {
+					if (data.value != '3') {
+						if (thrform.goods) {
+							const arr = await that.$api(`/afterSale/cgfr`, 'POST', {
+								order_detail: that.id,
+								goods_id: thrform.goods
+							});
+							if (arr.errcode == '0') {
+								that.$set(that, `moneyInfo`, arr.data);
+							} else {
+								uni.showToast({
+									title: arr.errmsg,
+									icon: 'none',
+								})
+							}
 						} else {
 							uni.showToast({
-								title: arr.errmsg,
-								icon: 'none',
+								title: '缺少商品信息',
+								icon: 'none'
 							})
 						}
-					} else {
-						uni.showToast({
-							title: '缺少商品信息',
-							icon: 'none'
-						})
 					}
+				} else {
+					that.$set(that.moneyInfo, `payTotal`, that.info.pay);
 				}
-
 			},
 			// 选择申请理由
 			reasonChange(e) {
@@ -276,14 +291,12 @@
 					} else {
 						that.orderCancel(params)
 					}
-
 				})
 			},
 			// 已收到货
 			async Receip(e) {
 				const that = this;
 				e.file = that.thrform.file;
-				e.order_detail = that.id;
 				let money = that.moneyInfo.payTotal;
 				let res;
 				if (e.type != '3') {
@@ -294,7 +307,13 @@
 								icon: 'none'
 							})
 						} else {
-							res = await that.$api(`/afterSale`, 'POST', e)
+							if (that.status == '-3') {
+								e.order = that.id;
+								res = await that.$api(`/groupAfterSale`, 'POST', e, 'group')
+							} else {
+								e.order_detail = that.id;
+								res = await that.$api(`/afterSale`, 'POST', e)
+							}
 						}
 					} else {
 						uni.showToast({
@@ -303,7 +322,13 @@
 						});
 					}
 				} else {
-					res = await that.$api(`/afterSale`, 'POST', e)
+					if (that.status == '-3') {
+						e.order = that.id;
+						res = await that.$api(`/groupAfterSale`, 'POST', e, 'group')
+					} else {
+						e.order_detail = that.id;
+						res = await that.$api(`/afterSale`, 'POST', e)
+					}
 				}
 				if (res.errcode == '0') {
 					uni.showToast({
@@ -323,8 +348,14 @@
 			// 未收到货
 			async orderCancel(e) {
 				const that = this;
-				e.order_detail = that.id;
-				const res = await that.$api(`/afterSale/orderCancel`, 'POST', e);
+				let res;
+				if (that.status == '-3') {
+					e.order = that.id;
+					res = await that.$api(`/groupAfterSale`, 'POST', e, 'group')
+				} else {
+					e.order_detail = that.id;
+					res = await that.$api(`/afterSale`, 'POST', e)
+				}
 				if (res.errcode == '0') {
 					uni.showToast({
 						title: `申请售后成功`,