lilei 2 年 前
コミット
3c2a5f9e67

+ 10 - 2
components/scrollBox.vue

@@ -2,9 +2,9 @@
 	<view class="list uni-flex uni-column">
 		<view class="wrap-item">
 			<view class="lis uni-flex uni-column" :animation="animationData">
-				<view class="uni-flex uni-column item" v-for="(item, index) in list" :key="index">
+				<view class="uni-flex uni-column item" :style="{background: bgColor,color:color}" v-for="(item, index) in list" :key="index">
 					<view class="swiper-item item_title uni-flex list_item">
-						<view class="time uni-flex-item justify-align-center uni-flex">{{ item.userName }}刚刚扫描了一个VIN</view>
+						<view class="time uni-flex-item justify-align-center uni-flex">{{ item.placeText }}</view>
 					</view>
 				</view>
 			</view>
@@ -17,6 +17,14 @@ export default {
 	props: {
 		list: {
 			type: Array
+		},
+		bgColor: {
+			type: String,
+			default: 'rgba(229, 237, 240, 0.6)'
+		},
+		color: {
+			type: String,
+			default: '#333'
 		}
 	},
 	data() {

+ 9 - 0
pages.json

@@ -303,6 +303,15 @@
             }
             
         }
+        ,{
+            "path" : "pages/morePage/redPacket",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "红包奖励",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 23 - 5
pages/digitalShelf/choosePart.vue

@@ -225,6 +225,17 @@
 				</view>
 			</view>
 		</u-popup>
+		<!-- 红包 -->
+		<u-mask :show="showMask">
+			<view class="imageWarp flex flex_column justify_center align_center" style="width:100%;height:100vh;">
+				<view style="position: relative;">
+					<u-image src="/static/hb.png" width="700" height="657" @click="toSuccess"></u-image>
+					<view style="font-size: 60rpx;color:#fff;position: absolute;top:50%;text-align: center;width: 100%;">
+						25.00 <text style="font-size: 26rpx;margin-left: 10rpx;">元</text>
+					</view>
+				</view>
+			</view>
+		</u-mask>
 	</view>
 </template>
 
@@ -234,6 +245,7 @@
 		data() {
 			return {
 				showOther: false,
+				showMask: false,
 				theme: '',
 				vinNumber: '',
 				leve2Data: [],  //  二级菜单数据
@@ -253,7 +265,8 @@
 				vinPartList: [],
 				isIphoneXup: false,
 				saveLoading: false,
-				showPopup: false
+				showPopup: false,
+				tempData: null
 			}
 		},
 		computed:{
@@ -591,16 +604,15 @@
 						vin: this.vinNumber,
 						vehicleModel: this.modelLabel || '',
 						vehicleLogo: this.carInfo.icon||'',
+						billSource: 'vin'
 					}
 					console.log(params,'立即提交')
 					this.saveLoading = true
 					shelfOrderFlowCreate(params).then(res => {
 						console.log(res,'shelfOrderFlowCreate')
 						if(res.status == 200){
-							// 提交成功
-							uni.redirectTo({
-								url:"/pages/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify(res.data))+"&state=1"
-							})
+							this.showMask = true
+							this.tempData = res.data
 						}else{
 							// 或失败
 							uni.redirectTo({
@@ -610,6 +622,12 @@
 						this.saveLoading = false
 					})
 				}
+			},
+			toSuccess(){
+				// 提交成功
+				uni.redirectTo({
+					url:"/pages/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify(this.tempData))+"&state=1"
+				})
 			}
 		}
 	}

+ 1 - 1
pages/digitalShelf/orderList.vue

@@ -20,7 +20,7 @@
 								</view>
 								 <view class="check-row flex align-center">
 									 <view class="carImage">
-										 <u-image v-if="!item.billSource" :src="item.vehicleLogo" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image> 
+										 <u-image v-if="!item.billSource||item.billSource=='vin'" :src="item.vehicleLogo" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image> 
 										 <u-image v-if="item.billSource=='qr_code'" src="/static/qrcode.png" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image> 
 										 <u-image v-if="item.billSource=='bar_code'" src="/static/barcode.png" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image>
 										 <u-image v-if="item.billSource=='product_code'" src="/static/tag.png" border-radius="30" width="100" height="100" bg-color="#333" ></u-image> 

+ 19 - 3
pages/index/index.vue

@@ -75,8 +75,8 @@
 					</view>
 					<view></view>
 				</view>
-				<view class="flex align_center justify_center" style="margin-top: 20upx;">
-					<u-image src="/static/banner1.png" width="645" height="504"></u-image>
+				<view style="margin-top: 20upx;">
+					<u-swiper mode="dot" bg-color="" img-mode="widthFix" @click="clickBanner" :interval="3000" :height="374" :list="imgList"></u-swiper>
 				</view>
 				<u-action-sheet :list="actionList" @click="clickAction" v-model="showAction"></u-action-sheet>
 			</view>
@@ -148,7 +148,12 @@
 						text: '按产品编码查询',
 						fontSize: 32
 					}
-				]
+				],
+				imgList:[{
+						image: '/static/banner1.png'
+					},{
+						image: '/static/banner2.jpg'
+					}]
 			}
 		},
 		computed: {
@@ -217,6 +222,7 @@
 			}
 		},
 		methods: {
+			// 扫描vin
 			beforeSwitch(index){
 				if(index==1){
 					this.openCamera()
@@ -224,6 +230,7 @@
 					return true
 				}
 			},
+			// 价格显示
 			async getPriceShow(){
 				await findPriceShow().then(res => {
 					this.showPrice = res.data ? res.data.paramValue=='1' : false
@@ -334,6 +341,9 @@
 				scanVinLogQueryRoll({pageNo:1,pageSize:1000}).then(res => {
 					console.log(res)
 					this.list = res.data.list || []
+					this.list.map(item => {
+						item.placeText = item.userName + '刚刚扫描了一个VIN'
+					})
 				})
 			},
 			// 获取当前门店扫描记录
@@ -382,6 +392,12 @@
 					})
 				}
 			},
+			// 单击banner
+			clickBanner(index){
+				if(index == 1){
+					uni.navigateTo({url:"/pages/morePage/redPacket"})
+				}
+			},
 			// 选择取货方式
 			clickAction(index){
 				const shelfSn = this.hasShelf.shelfSn

+ 8 - 0
pages/morePage/morePage.vue

@@ -1,6 +1,14 @@
 <template>
 	<view>
 	<view class="morePages">
+		<view class="list-box">
+			<view class="list-title flex align_center justify_between" @click="toPage('/pages/morePage/redPacket')">
+				<view><u-icon size="34" color="#f10000" name="red-packet-fill"></u-icon> <text style="color: #ff0000;margin-left: 10rpx;">红包奖励</text></view>
+				<view>
+					<u-icon size="28" color="#969799" name="arrow-right"></u-icon>
+				</view>
+			</view>
+		</view>
 		<view class="list-box" v-if="$hasPermissions('M_stockQueryList_mini')||$hasPermissions('M_stockPut_mini')">
 			<view class="list-title">
 				<u-icon size="38" name="bag"></u-icon> <text>货品管理</text>

+ 187 - 0
pages/morePage/redPacket.vue

@@ -0,0 +1,187 @@
+<template>
+	<view class="content">
+		<view class="header-img">
+			<u-image src="/static/hbheader.jpg" width="750" height="578"></u-image>
+			<!-- 滚动区域 -->
+			<view class="scroll-list" v-if="slist.length">
+				<scrollBox :list="slist" placeText="刚刚得到了1.5元 红包奖励" bgColor="rgba(250, 224, 188, 0.6)"></scrollBox>
+			</view>
+			<view class="amount-box">
+				345.5
+				<text>元</text>
+			</view>
+			<view class="view-gz">查看活动规则>></view>
+		</view>
+		<view class="list-box">
+			<view class="codes flex align_center">
+				<view @click="openImg('/static/codetemp.jpg')">
+					<u-image src="/static/codetemp.jpg" width="160" height="160"></u-image>
+				</view>
+				<view>
+					<view>扫描添加客服微信,领取待发放红包</view>
+					<view>点击二维码查看大图,长按识别二维码</view>
+				</view>
+			</view>
+			<view class="tabbox">
+				<view class="tabhead flex align_center justify_between">
+					<view class="active">所有红包</view>
+					<view>已发红包</view>
+					<view>待发红包</view>
+				</view>
+				<view class="tablist">
+					<view class="flex align_center justify_between" v-for="item in 12">
+						<view class="flex align_center">
+							<view class="imgs">
+								<u-icon size="30" color="#fff" name="red-packet"></u-icon>
+							</view>
+							<view class="txts">
+								<view class="txts-name">扫描VIN码下单得红包</view>
+								<view class="txts-time">2022-10-28 12:36</view>
+							</view>
+						</view>
+						<view class="amount">+0.50</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import scrollBox from '@/components/scrollBox.vue'
+	import { scanVinLogQueryRoll }from '@/api/car.js'
+	export default {
+		components: {
+			scrollBox,
+		},
+		data() {
+			return {
+				slist:[],
+			}
+		},
+		onLoad(){
+			this.getScrollLog()
+		},
+		methods: {
+			openImg(url){
+				uni.previewImage({
+					urls:[url]
+				})
+			},
+			// 获取上方滚动扫描记录
+			getScrollLog(){
+				scanVinLogQueryRoll({pageNo:1,pageSize:1000}).then(res => {
+					console.log(res)
+					this.slist = res.data.list || []
+					this.slist.map(item => {
+						item.placeText = item.userName + '刚刚得到了1.5元 红包奖励'
+					})
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+	.content{
+		padding: 0;
+		background-color: #fae0bc;
+		.header-img{
+			position: relative;
+			color: #fff;
+			.amount-box{
+				position: absolute;
+				width: 100%;
+				text-align: center;
+				font-size: 80rpx;
+				text{
+					font-size: 40rpx;
+				}
+				top: 50%;
+				color: #f5563d;
+			}
+			.view-gz{
+				position: absolute;
+				width: 100%;
+				text-align: center;
+				bottom: 45rpx;
+				font-size: 30rpx;
+			}
+			.scroll-list{
+				width:100%;
+				position: absolute;
+				left:10rpx;
+				top:0;
+			}
+		}
+		.list-box{
+			padding: 30rpx;
+			.codes{
+				margin-bottom: 40rpx;
+				> view{
+					&:first-child{
+						padding: 10rpx;
+						background-color: #fff;
+					}
+					&:last-child{
+						padding: 0 20rpx;
+						> view{
+							padding: 10rpx 0;
+							font-size: 26rpx;
+						}
+					}
+				}
+			}
+			.tabbox{
+				background-color: #fff5e7;
+				box-shadow: 0 0 10rpx #e75115;
+				border-radius: 15rpx;
+				.tabhead{
+					border-bottom: 1rpx solid #f0b675;
+					> view{
+						width: 30%;
+						color: #5a4f49;
+						padding: 20rpx 0;
+						text-align: center;
+					}
+					.active{
+						color: #e7463c;
+						border-bottom: 4rpx solid #e7463c;
+						font-weight: bold;
+					}
+				}
+				.tablist{
+					padding: 20rpx 0;
+					> view{
+						border-bottom: 1rpx solid #fff;
+						padding: 20rpx 30rpx;
+						.txts-name{
+							color: #e7463c;
+						}
+						.txts-time{
+							font-size: 24rpx;
+							color: #666;
+							margin-top: 10rpx;
+						}
+						.amount{
+							color: #e7463c;
+							font-weight: bold;
+							font-size: 32rpx;
+						}
+					}
+					.txts{
+						padding:0 20rpx;
+					}
+					.imgs{
+						background-color: #fe9790;
+						border-radius: 100rpx;
+						padding: 10rpx;
+						width: 50rpx;
+						height: 50rpx;
+						text-align: center;
+					}
+				}
+			}
+		}
+	}
+</style>

BIN
static/banner2.jpg


BIN
static/codetemp.jpg


BIN
static/hb.png


BIN
static/hbheader.jpg