ZZ 3 هفته پیش
والد
کامیت
36e37f9e24
3فایلهای تغییر یافته به همراه325 افزوده شده و 13 حذف شده
  1. 10 0
      mer_uniapp/api/secondHand.js
  2. 27 11
      mer_uniapp/pages/goods/order_confirm/index.vue
  3. 288 2
      mer_uniapp/pages/trade_fair/trade_fair_user/index.vue

+ 10 - 0
mer_uniapp/api/secondHand.js

@@ -22,6 +22,16 @@ export function secondHandOrderCreate(data) {
 }
 
 /**
+ * 订单创建
+ * @param string key
+ * @param object data
+ *
+ */
+export function secondHandOrderList(data) {
+	return request.get('secondHand/order/list', data);
+}
+
+/**
  * 删除已完成订单
  * @param string orderNo
  *

+ 27 - 11
mer_uniapp/pages/goods/order_confirm/index.vue

@@ -98,7 +98,7 @@
 					<view v-show="Number(orderInfoVo.secondType)===0&&orderInfoVo.type!=2" class="boxs">
 						<view class='item acea-row row-between-wrapper'>
 							<view>配送方式</view>
-							<view v-if="item.deliveryMethodMer.length===3 && item.takeTheirSwitch" class='discount acea-row row-middle'>
+							<view v-if="item.deliveryMethodMer && item.deliveryMethodMer.length===3 && item.takeTheirSwitch" class='discount acea-row row-middle'>
 								<text @tap="openShowBox(item,index)">{{item.shippingType === 1 ? '配送' : item.shippingType === 2 ? '自提' : '骑手配送'}}</text>
 
 								<text @tap="openShowBox(item,index)" class='iconfont icon-jiantou'></text>
@@ -118,7 +118,7 @@
 							</view>
 						</view>
 					</view>
-					<view v-show="item.shippingType === 1 || item.shippingType === 3" class='item acea-row row-between-wrapper'>
+					<view v-show="(item.shippingType === 1 || item.shippingType === 3) && !orderType" class='item acea-row row-between-wrapper'>
 						<view>打包费</view>
 						<view v-if='!item.freightFee || item.freightFee == 0' class="noCoupon">免打包费</view>
 						<view v-else class='money'>¥{{item.packingFee}}</view>
@@ -520,6 +520,9 @@
 		onShow: function() {
 			let _this = this
 			this.textareaStatus = true;
+			uni.$on('addressItem', function(res) {
+				that.$set(that, 'addressInfo', res);
+			})
 		},
 		methods: {
 			onTime() {
@@ -829,13 +832,20 @@
 			 * 获取默认收货地址或者获取某条地址信息
 			 */
 			getaddressInfo: function() {
-				if (this.addressId) {
-					getAddressDetail(this.addressId).then(res => {
-						if (res.data) {
-							res.data.isDefault = res.data.isDefault;
+				if (this.orderType == 'secondHand') {
+					getAddressDefault().then(res => {
+						console.log('地址', res)
 							this.addressInfo = res.data || {};
-						}
 					})
+				} else {
+					if (this.addressId) {
+						getAddressDetail(this.addressId).then(res => {
+							if (res.data) {
+								res.data.isDefault = res.data.isDefault;
+								this.addressInfo = res.data || {};
+							}
+						})
+					}
 				}
 			},
 
@@ -881,9 +891,15 @@
 				uni.hideLoading();
 			},
 			onAddress: function() {
-				uni.navigateTo({
-					url: '/pages/address/user_address_list/index?orderNo=' + this.orderNo
-				});
+				if (this.orderType !== 'secondHand') {
+					uni.navigateTo({
+						url: '/pages/address/user_address_list/index' + this.orderNo
+					});
+				} else {
+					uni.navigateTo({
+						url: '/pages/address/user_address_list/index'
+					});
+				}
 			},
 			realName: function(e) {
 				this.contacts = e.detail.value;
@@ -956,7 +972,7 @@
 						addressId: this.merchantOrderVoList[this.activeIndex].shippingType == 1 ? this.addressInfo.id : null,
 						orderMerchantRequestList: [
 							{
-								remark: "",
+								remark: this.merchantOrderVoList[this.activeIndex].remark || '',
 								sellerId: this.merchantOrderVoList[this.activeIndex].sellerId,
 								shippingType: this.merchantOrderVoList[this.activeIndex].shippingType
 							}

+ 288 - 2
mer_uniapp/pages/trade_fair/trade_fair_user/index.vue

@@ -73,11 +73,12 @@
 				<text @click.stop="changeTab(0)" :class="tab==0 ? 'on' : ''">我发布的</text>
 				<text @click.stop="changeTab(1)" :class="tab==1 ? 'on' : ''">我想要的</text>
 				<text @click.stop="changeTab(2)" :class="tab==2 ? 'on' : ''">我收藏的</text>
+				<text @click.stop="changeTab(3)" :class="tab==3 ? 'on' : ''">我购买的</text>
 			</view>
 		</view>
 		<view class="main">
 			<view class="tab-conts">
-				<view v-if="list.length > 0" class="goods-wrap flex-1">
+				<view v-if="list.length > 0 && tab!==3" class="goods-wrap flex-1">
 					<view class="goods">
 						<!-- <WaterfallsFlow v-if="list.length" :wfList="list" :fromType="1" fromTo="home">
 						</WaterfallsFlow> -->
@@ -88,6 +89,105 @@
 						</WaterfallsFlow>
 					</view>
 				</view>
+				<view class='my-order' v-else>
+					<view class='list'>
+						<view class='item' v-for="(item,index) in list" :key="index">
+							<view class='title acea-row row-between-wrapper'>
+								<view class="acea-row row-middle">
+									<view v-if="item.merName">
+										<navigator :url="`/pages/merchant/home/index?merId=${item.merId}`" hover-class="none">
+											<text class='iconfont icon-shangjiadingdan mr10'></text>
+											<text class="mr10">{{item.merName}}</text>
+											<text class='iconfont icon-xiangyou'></text>
+										</navigator>
+									</view>
+									<view v-else>
+										<text class="mr10">{{item.orderNo}}</text>
+									</view>
+								</view>
+								<view v-if="item.refundStatus == 3" class='font_color'>已退款</view>
+								<template v-else>
+									<view v-if="item.groupBuyRecordStatus==99||item.status==9||item.groupBuyRecordStatus==10"
+										class='font_color'>{{item.status | orderStatusFilter}}</view>
+									<view v-else class='font_color'>{{item.groupBuyRecordStatus===0?'拼团中':'拼团失败'}}</view>
+								</template>
+							</view>
+							<view v-for="(items,indexs) in item.orderInfoList" :key="indexs">
+								<view @click='goOrderDetails(item)' class='item-info acea-row row-between row-top'>
+									<view class='pictrue'>
+										<easy-loadimage mode="widthFix" :image-src="items.image"></easy-loadimage>
+									</view>
+									<view class='text acea-row row-between'>
+										<view class="nameBox">
+											<view class='name line2'>
+												<span v-if="Number(item.type) > 0 && Number(item.type) < 3"
+													class="activity bg_color">{{item.type | orderTypeFilter}}</span>
+												<span v-if="Number(item.secondType) === 1" class="activity bg_color">积分</span>
+												<span>{{items.productName}}</span>
+											</view>
+											<view class="sku line1">{{items.sku}}</view>
+										</view>
+										<view class='money'>
+											<view>¥{{items.price}}</view>
+											<view>x{{items.payNum}}</view>
+										</view>
+									</view>
+								</view>
+								<view v-if="items.applyRefundNum && item.refundStatus > -1"
+									class="text-24rpx font-color oppoSans-R mr-20px px-30 mt-14">
+									售后申请数量:{{ items.applyRefundNum }}
+								</view>
+							</view>
+							<view class='totalPrice' :class="item.status===0?'no-border':''">{{item.totalNum}}
+								件商品,总金额
+								<text class='money semiBold'> ¥{{item.payPrice}}</text>
+							</view>
+							<view v-if="item.status===0" class="mx-20 flex">
+								<view class="tips w-full px-20 f-s-26">
+									付款提醒<text class="ml-20 text-999">请在{{item.expirationTime}}前完成支付!</text>
+								</view>
+							</view>
+							<!-- 订单状态(0:待支付,1:待发货,2:部分发货, 3:待核销,4:待收货,5:已收货,6:已完成,9:已取消) -->
+							<view class='bottom acea-row row-right row-middle'>
+								<view class='bnt cancelBnt' v-if="item.status === 0" @click='cancelOrder(index,item.orderNo)'>
+									取消订单
+								</view>
+								<view class='bnt bg_color' v-if="item.status === 0" @click='goPay(item)'>
+									立即付款
+								</view>
+								<view class='bnt cancelBnt' v-if="item.type==2&&item.status !== 0&&item.status !== 9"
+									@click="toCheckGroup(item)">
+									查看拼团
+								</view>
+								<view class='bnt bg_color'
+									v-if="item.type==2&&item.status !== 0&&item.groupBuyRecordStatus===0&&item.status!=9"
+									@click="listenerActionSheet(item)">
+									邀请好友
+								</view>
+								<view class='bnt bg_color'
+									v-if="((item.paid || item.status == 9)&&item.type!=2)||(item.type==2&&item.groupBuyRecordStatus!==0)"
+									@click='goOrderDetails(item)'>
+									查看详情</view>
+								<view class='bnt cancelBnt' v-if="item.status==6 || item.status==9"
+									@click='delOrder(item.orderNo,index)'>
+									删除订单
+								</view>
+							</view>
+				
+						</view>
+					</view>
+				
+					<view class='loadingicon acea-row row-center-wrapper'>
+						<text class='loading iconfont icon-jiazai'
+							:hidden='loading==false'></text>{{orderList.length>0?loadTitle:''}}
+					</view>
+					<view class='noCart' v-if="orderList.length == 0 && isShow && !loading">
+						<view class='pictrue'>
+							<image :src="urlDomain+'crmebimage/presets/nodingdan.png'"></image>
+							<view class="default_txt">暂无订单信息~</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>
@@ -148,6 +248,7 @@
 		editSignatureApi,
 		editSchoolApi
 	} from '@/api/discover.js';
+	import {secondHandOrderList} from '@/api/secondHand.js';
 	import {
 		toLogin
 	} from '@/libs/login.js';
@@ -320,9 +421,35 @@
 				} else if (tab === 2) {
 					this.manage = 0;
 					this.myFollowList()
+				} else {
+					this.manage = 0;
+					this.myOrderList()
 				}
 			},
-			// 获取我的点赞作品
+			// 获取我购买的作品
+			myOrderList: function() {
+				let that = this;
+				if (that.loaded || that.loading) return;
+				that.loading = true;
+				that.loadTitle = '';
+				that.where.status = -1;
+				secondHandOrderList(that.where).then(res => {
+					let list = res.data.list;
+					let goods = that.$util.SplitArray(list, that.list);
+					that.loaded = list.length < that.where.limit;
+					that.loading = false;
+					that.loadTitle = that.loaded ? '到底了' : '加载更多';
+					that.$set(that, 'list', goods);
+					that.$set(that.where, 'page', that.where.page + 1);
+				}).catch(err => {
+					that.loading = false;
+					uni.showToast({
+						title: err,
+						icon: 'none'
+					})
+				})
+			},
+			// 获取我的收藏作品
 			myFollowList: function() {
 				let that = this;
 				if (that.loaded || that.loading) return;
@@ -716,4 +843,163 @@
 			}
 		}
 	}
+	
+	.my-order .list {
+		width: 690rpx;
+		margin: 0 auto;
+	}
+	
+	.my-order .list .item {
+		background-color: #fff;
+		border-radius: 14rpx;
+		margin-bottom: 14rpx;
+	}
+	
+	.my-order .list .item .title {
+		height: 84rpx;
+		padding: 0 24rpx;
+		border-bottom: 1rpx solid #eee;
+		font-size: 28rpx;
+		color: #282828;
+	}
+	
+	.my-order .list .item .title .sign {
+		font-size: 24rpx;
+		padding: 0 13rpx;
+		height: 36rpx;
+		margin-right: 15rpx;
+		border-radius: 18rpx;
+		@include coupons_border_color(theme);
+		@include main_color(theme);
+	}
+	
+	.my-order .list .item .item-info {
+		padding: 0 30rpx;
+		margin-top: 22rpx;
+	}
+	
+	.my-order .list .item .item-info .pictrue {
+		width: 120rpx;
+		height: 120rpx;
+	}
+	
+	.my-order .list .item .item-info .pictrue image {
+		width: 100%;
+		height: 100%;
+		border-radius: 14rpx;
+		overflow: hidden;
+	}
+	
+	.my-order .list .item .item-info {
+		.nameBox {
+			position: relative;
+			height: 120rpx;
+		}
+	
+		.sku {
+			font-size: 20rpx;
+			position: absolute;
+			bottom: 4rpx;
+			width: 420rpx;
+		}
+	
+		.text {
+			width: 496rpx;
+			font-size: 28rpx;
+			color: #999;
+		}
+	}
+	
+	.my-order .list .item .item-info .text .name {
+		width: 326rpx;
+		color: #282828;
+	}
+	
+	.my-order .list .item .item-info .text .money {
+		text-align: right;
+	}
+	
+	.font_color {
+		@include main_color(theme);
+	}
+	
+	.my-order .list .item .totalPrice {
+		font-size: 26rpx;
+		color: #282828;
+		text-align: right;
+		margin: 27rpx 0 0 30rpx;
+		padding: 0 30rpx 30rpx 0;
+		border-bottom: 1rpx solid #eee;
+	}
+	
+	.my-order .list .item .totalPrice .money {
+		font-size: 28rpx;
+		font-weight: bold;
+		@include price_color(theme);
+	}
+	
+	.my-order .list .item .bottom {
+		height: 107rpx;
+		padding: 0 30rpx;
+	}
+	
+	.my-order .list .item .bottom .bnt {
+		width: 176rpx;
+		height: 60rpx;
+		text-align: center;
+		line-height: 60rpx;
+		color: #fff;
+		border-radius: 50rpx;
+		font-size: 27rpx;
+	}
+	
+	.my-order .list .item .bottom .bnt.cancelBnt {
+		border: 1rpx solid #ddd;
+		color: #aaa;
+	}
+	
+	.my-order .list .item .bottom .bnt~.bnt {
+		margin-left: 17rpx;
+	}
+	
+	
+	
+	.my-order {
+		/* #endif */
+		.header {
+			height: 250rpx;
+			padding: 0 30rpx;
+		}
+	}
+	
+	.bg_color {
+		@include main_bg_color(theme);
+	}
+	
+	.my-order .header .picTxt {
+		height: 190rpx;
+	}
+	
+	.my-order .header .picTxt .text {
+		color: rgba(255, 255, 255, 0.8);
+		font-size: 26rpx;
+		font-family: 'Guildford Pro';
+	}
+	
+	.my-order .header .picTxt .text .name {
+		font-size: 34rpx;
+		font-weight: bold;
+		color: #fff;
+		margin-bottom: 20rpx;
+	}
+	
+	.my-order .header .picTxt .pictrue {
+		width: 120rpx;
+		height: 120rpx;
+	}
+	
+	.my-order .header .picTxt .pictrue image {
+		width: 100%;
+		height: 100%;
+	}
 </style>