Browse Source

1.活动列表

guo 2 years ago
parent
commit
c2ff56e1cf

+ 240 - 109
pages/activity/activity.vue

@@ -1,112 +1,243 @@
-<template>
-<view class="box">
-	<view>集客活动</view>
-	
-	<!-- 手机号授权 -->
-	<view class="authorizBox" v-if="authorizShow" @click="authorizShow=false">
-		<view class="authorizCont" @click.stop="">
-			<view class="authorizName">{{wxOpenData.miniAppName}}</view>
-			<view class="authorizMs">您好,欢迎访问本店,授权手机号登录能获取我们最新的促销活动哦~</view>
-			<button class="authorizContbutton" type="default" open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumber">授权</button>
-		</view>
-		<view style="text-align: center;padding-top: 56rpx;">
-			<image src="../../static/timg/icon_guanbi@2x.png" mode="" class="authorizCloseImg"></image>
-		</view>
-	</view>
-</view>
-</template>
-
-<script>
-	
-	export default {
-		components: {
-			
-		},
-		
-		data() {
-			return {
-				userInfo:'',
-				authorizShow:false,
-				code:'',
-				wxOpenData:'',
-			}
-		},
-		onLoad() {
-			this.userInfo=this.$store.state.userInfo;
-			this.wxOpenData=this.$store.state.wxOpenData
-			//this.getOrderTimes()
-		},
-		
-		methods: {
-			
-			
-		}
+<template>
+	<view class="box">
+
+		<view class="itemHistory" v-for="(item,index) in itemData" :key="index" @click="goDetail(item.id)">
+			<image :src="item.img" mode="" class="itemImg"></image>
+			<view class="timeBox">
+				<image src="../../static/img/bg_huangse.png" mode="" class="state"></image>
+				<view class="time">{{item.CreateTime}}</view>
+			</view>
+			<view class="name">{{item.PlateNumber}}</view>
+
+		</view>
+
+		<!-- 上拉 加载更多 -->
+		<view class="noMore" v-if="noMoreShow && (itemData.length!=0)">没有更多数据</view>
+		<!-- 无数据空白页 -->
+		<nodata v-if="itemData.length==0"></nodata>
+
+
+		<!-- 手机号授权 -->
+		<view class="authorizBox" v-if="authorizShow" @click="authorizShow=false">
+			<view class="authorizCont" @click.stop="">
+				<view class="authorizName">{{wxOpenData.miniAppName}}</view>
+				<view class="authorizMs">您好,欢迎访问本店,授权手机号登录能获取我们最新的促销活动哦~</view>
+				<button class="authorizContbutton" type="default" open-type="getPhoneNumber"
+					@getphonenumber="decryptPhoneNumber">授权</button>
+			</view>
+			<view style="text-align: center;padding-top: 56rpx;">
+				<image src="../../static/timg/icon_guanbi@2x.png" mode="" class="authorizCloseImg"></image>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script scoped>
+	import nodata from '../../components/nodata/nodata.vue'
+	export default {
+		components: {
+			nodata,
+		},
+
+		data() {
+			return {
+				userInfo: '',
+				authorizShow: false,
+				code: '',
+				wxOpenData: '',
+				page: 1,
+				itemData: [1,2,3,4],
+				noMoreShow: false,
+			}
+		},
+		onLoad() {
+			this.userInfo = this.$store.state.userInfo;
+			this.wxOpenData = this.$store.state.wxOpenData
+
+			this.page = 1
+			// this.myOrderCoupon()
+		},
+
+		methods: {
+			goDetail(id) {
+				uni.navigateTo({
+					url: 'reportDetail?id=' + id
+				})
+			},
+			myOrderCoupon() {
+				uni.showLoading({
+					title: '加载中'
+				})
+				this.$http('opencheckSheet/getTestList', {
+
+					// page: this.page,
+					// limit: 10,
+				}, 'GET').then(res => {
+					uni.hideLoading();
+					// var list = res.data.Items
+					var list = res.data
+
+					// 处理 undefined和null转为空白字符串
+					// list.forEach((item, index) => {
+					// 	for (const key in item) {
+					// 		item[key] = this.$praseStrEmpty(item[key])
+					// 	}
+					// })
+
+					if (this.page == 1) {
+						this.itemData = list
+					} else {
+						this.itemData = this.itemData.concat(list)
+					}
+
+					if (list.length < 10) {
+						this.noMoreShow = true
+					} else {
+						this.noMoreShow = false
+					}
+
+
+
+
+
+				})
+			},
+
+
+		},
+
+		// 下拉刷新 上拉加载更多
+		onPullDownRefresh() {
+			this.page = 1
+			this.myOrderCoupon()
+			setTimeout(function() {
+				uni.stopPullDownRefresh();
+			}, 1000);
+		},
+		onReachBottom() {
+			// this.page++;
+			this.myOrderCoupon()
+		},
+	}
+</script>
+
+<style scoped lang="less">
+	.box {
+		background: #F4F5F7;
+		min-height: 100vh;
+		padding-top: 20rpx;
+	}
+
+	.authorizBox {
+		width: 100vw;
+		height: 100vh;
+		background: rgba(0, 0, 0, 0.5);
+		position: fixed;
+		top: 0;
+		left: 0;
+	}
+
+	.authorizCont {
+		margin-top: 30vh;
+		width: 564rpx;
+		height: 408rpx;
+		background: #FFFFFF;
+		border-radius: 24rpx;
+		margin-left: 93rpx;
+		position: relative;
+	}
+
+	.authorizCloseImg {
+		width: 62rpx;
+		height: 62rpx;
+	}
+
+	.sqLogoBox {
+		width: 180rpx;
+		height: 180rpx;
+		background: #FFFFFF;
+		border-radius: 90rpx;
+		text-align: center;
+		position: absolute;
+		top: -50rpx;
+		left: 192rpx;
+	}
+
+	.authorizName {
+		color: #333333;
+		line-height: 42rpx;
+		font-size: 30rpx;
+		text-align: center;
+		padding-top: 58rpx;
+	}
+
+	.authorizMs {
+		color: #999999;
+		line-height: 36rpx;
+		font-size: 26rpx;
+		width: 452rpx;
+		padding-top: 24rpx;
+		text-align: center;
+		margin-left: 56rpx;
+	}
+
+	.authorizContbutton {
+		width: 422rpx;
+		height: 88rpx;
+		background: #D53533;
+		border-radius: 44rpx;
+		line-height: 88rpx;
+		text-align: center;
+		font-size: 30rpx;
+		color: #FFFFFF;
+		margin-top: 62rpx;
+		margin-left: 71rpx;
+	}
+
+	.itemHistory {
+		margin: 0rpx 24rpx 20rpx;
+		background-color: #FFFFFF;
+		border-radius: 10rpx;
+
+	}
+
+	.itemImg {
+		height: 280rpx;
+
+	}
+
+	.timeBox {
+		display: flex;
+		margin-top: -53rpx;
+		align-items: flex-end;
 	}
-</script>
-
-<style scoped lang="less">
-.box{
-	background: #F4F5F7;
-	min-height: 100vh;
-}
-.authorizBox{
-		width: 100vw;
-		height: 100vh;
-		background: rgba(0, 0, 0, 0.5);
-		position: fixed;
-		top: 0;
-		left: 0;
-	}
-	.authorizCont{
-		margin-top: 30vh;
-		width: 564rpx;
-		height: 408rpx;
-		background: #FFFFFF;
-		border-radius: 24rpx;
-		margin-left: 93rpx;
-		position: relative;
-	}
-	.authorizCloseImg{
-		width: 62rpx;
-		height: 62rpx;
-	}
-	.sqLogoBox{
-		width: 180rpx;
-		height: 180rpx;
+	.state{
+		width: 102rpx;
+		height: 53rpx;
+	}
+
+	.time {
+		padding: 5rpx 10rpx;
+		color: #FFFFFF;
+		font-size: 24rpx;
+		background: #000000;
+
+		border-radius: 0 10rpx 0 0;
+	}
+
+	.name {
+		padding: 24rpx 20rpx;
+		color: #333333;
+		font-size: 28rpx;
 		background: #FFFFFF;
-		border-radius: 90rpx;
-		text-align: center;
-		position: absolute;
-		top: -50rpx;
-		left: 192rpx;
-	}
-	.authorizName{
-		color: #333333;
-		line-height: 42rpx;
-		font-size: 30rpx;
-		text-align: center;
-		padding-top: 58rpx;
-	}
-	.authorizMs{
-		color: #999999;
-		line-height: 36rpx;
-		font-size: 26rpx;
-		width: 452rpx;
-		padding-top: 24rpx;
-		text-align: center;
-		margin-left: 56rpx;
-	}
-	.authorizContbutton{
-		width: 422rpx;
-		height: 88rpx;
-		background: #D53533;
-		border-radius: 44rpx;
-		line-height: 88rpx;
-		text-align: center;
-		font-size:30rpx;
-		color: #FFFFFF;
-		margin-top: 62rpx;
-		margin-left:71rpx;
-	}
-
+		border-radius: 0 0 10rpx 10rpx;
+	}
+
+
+	.noMore {
+		text-align: center;
+		line-height: 50rpx;
+		color: #999999;
+		font-size: 28rpx;
+	}
 </style>

+ 23 - 4
pages/index/paintSure.vue

@@ -157,7 +157,8 @@
 					    
 					 }
 				}); 
-				
+				
+				console.log('默认服务门店-=',this.shopInfo)
 			})
 			
 			this.$http('openSheetMetalSprayPaint/queryPayType', {
@@ -171,6 +172,8 @@
 		onShow() {
 			this.carInfo = this.$store.state.carInfo;
 			this.shopInfo=this.$store.state.ckshopInfo;
+			this.shopInfo.id = this.shopInfo.shopId
+			this.shopID=this.shopInfo.id
 			
 			uni.setStorage({
 				key: 'yyshopInfo',
@@ -179,7 +182,7 @@
 				    
 				 }
 			}); 
-			console.log(this.shopInfo)
+			console.log('服务门店选择过-=',this.shopInfo)
 		},
 		methods: {
 			changeTime(data){
@@ -190,7 +193,22 @@
 				 this.$refs.timeSelect.open();
 			},
 			submit() {
-				
+				if (this.shopID == '') {
+					uni.showToast({
+						title: '请选择服务门店',
+						icon: 'none',
+						duration: 3000
+					});
+					return false;
+				}
+				if (this.billDate == '') {
+					uni.showToast({
+						title: '请选择到店服务时间',
+						icon: 'none',
+						duration: 3000
+					});
+					return false;
+				}
 				//"bizType:1商品2项目3套餐
 				var params = {
 					sheetType:'5',
@@ -201,7 +219,8 @@
 					carModel: this.carInfo.carModel,
 					totalMoney: this.totalMoney,
 					shopId: this.shopID,
-					comment: this.comment,
+					comment: this.comment,
+					hTime: this.billDate,
 					sheetDetail: JSON.stringify(this.sheetDetail),
 					payType:this.PayType,
 				}

+ 1 - 1
pages/user/checkReport.vue

@@ -29,7 +29,7 @@
 		data() {
 			return {
 				page: 1,
-				itemData: [1, 2, 3],
+				itemData: [],
 				noMoreShow: false,
 			}
 		},

+ 15 - 5
pages/user/myOrder/activityOrderDetail.vue

@@ -64,9 +64,9 @@
 			<view v-if="orderData.openSheetDetail.length>0" v-for="(item,index) in orderData.openSheetDetail" :key="index">
 				<view class="informationLine2">
 					<view class="goodsName">{{item.itemName}}</view>
-					<view class="goodsName3">活动详情
-					<image src="../../../static/img/little_rightArrow.png" mode="" style="width: 30rpx;height: 30rpx;"></image>
-					
+					<view class="huodong" @click="goDetail(item)">
+						<view class="goodsName3">活动详情</view>
+						<image src="../../../static/img/little_rightArrow.png" mode="" style="width: 30rpx;height: 30rpx;"></image>
 					</view>
 				</view>
 				<view class="salePrice"><span class="informationNum">¥</span>{{item.salePrice}}</view>
@@ -250,7 +250,13 @@
 		
 
 		methods: {
-			
+			goDetail(item) {
+				
+					// uni.navigateTo({
+					// 	url: "activityOrderDetail?id=" + item.ID
+					// })
+				
+			},
 			pay(){
 				this.$http('openMallOrder/unifiedPay', {
 					sheetId:this.id
@@ -753,10 +759,14 @@
 		font-size: 26rpx;
 		
 	}
+	.huodong{
+		display: flex;
+		align-items: center;
+	}
 	.goodsName3{
 		color: #333333;
 		font-size: 26rpx;
-		text-align: center;
+		
 	}
 	.goodsName2{
 		padding: 20rpx 20rpx 15rpx;

BIN
static/img/bg_hongse.png


BIN
static/img/bg_huangse.png