Browse Source

促销活动功能

lilei 10 months ago
parent
commit
6cc44c9c41

+ 3 - 3
package-lock.json

@@ -15,9 +15,9 @@
       "integrity": "sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw=="
     },
     "uview-ui": {
-      "version": "1.8.6",
-      "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.8.6.tgz",
-      "integrity": "sha512-R93WU6htCP2Fpw668ABpF7Y8UqIx66pUKGAwBYLDkbnIldyKWkjtfJzqjFm22tF41ty6FVB+82L+gIL775c5LQ=="
+      "version": "1.8.8",
+      "resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-1.8.8.tgz",
+      "integrity": "sha512-Osal3yzXiHor0In9OPTZuXTaqTbDglMZ9RGK/MPYDoQQs+y0hrBCUD0Xp5T70C8i2lLu2X6Z11zJhmsQWMR7Jg=="
     }
   }
 }

+ 1 - 1
package.json

@@ -6,7 +6,7 @@
   "dependencies": {
     "async-validator": "^3.5.2",
     "moment": "^2.29.1",
-    "uview-ui": "^1.8.4"
+    "uview-ui": "^1.8.8"
   },
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1"

+ 48 - 3
pages.json

@@ -162,9 +162,17 @@
                 "navigationBarTitleText": "设置岗位",
                 "enablePullDownRefresh": false
             }
+        },
+        {
+        	"path" : "pages/promo/index",
+        	"style" : 
+        	{
+        		"navigationBarTitleText" : "促销活动"
+        	}
         }
     ],
-	"subPackages":[{
+	"subPackages":[
+		{
 		"root": "pagesA",
 		"pages":[
 			{
@@ -407,11 +415,45 @@
 				}
 			}
         ]
-	}],
+	},
+	{
+		"root": "pagesB",
+		"pages":[{
+			"path" : "promoDetail",
+			"style" : 
+			{
+				"navigationBarTitleText" : "促销产品详情"
+			}
+		},
+		{
+			"path" : "coupon",
+			"style" : 
+			{
+				"navigationBarTitleText" : "优惠券"
+			}
+		},
+		{
+			"path" : "procureOrder",
+			"style" : 
+			{
+				"navigationBarTitleText" : "采购订单"
+			}
+		},
+		{
+			"path" : "procureOrderList",
+			"style" : 
+			{
+				"navigationBarTitleText" : "采购订单"
+			}
+		}
+			
+		]
+	}
+	],
 	"preloadRule": {
 		"pages/index/index": {
 			"network": "all",
-			"packages": ["pagesA"]
+			"packages": ["pagesA","pagesB"]
 		}
 	},
 	"globalStyle": {
@@ -428,6 +470,9 @@
 		"list": [{
 				"pagePath": "pages/index/index"
 			},
+			{
+				"pagePath": "pages/promo/index"
+			},
 			{
 				"pagePath": "pages/videos/index"
 			},

+ 27 - 43
pages/index/index.vue

@@ -61,13 +61,6 @@
 			</view>
 			<view class="body-box">	
 				<!-- 扫描按钮 -->
-				<!-- <view class="scanButton flex align_center" @click="openCamera">
-					<u-icon name="scan" size="60"></u-icon><text class="ml10">扫描VIN</text>
-				</view> -->
-				<!-- 直接取货 -->
-				<!-- <view class="scanButton flex align_center" v-if="userInfo.sysUserFlag == '1'" @click="openTakeGood">
-					<text>没有VIN,直接取货</text>
-				</view> -->
 				<view class="action-button flex" v-if="userInfo.sysUserFlag == '1'">
 					<view class="f1" @click="openTakeGood(1)">
 						<view class="icons"><u-icon name="shujuchaxun" custom-prefix="custom-icon"></u-icon></view>
@@ -81,7 +74,6 @@
 				<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>
 			<!-- 扫描记录 -->
 			<view class="list-box">
@@ -110,7 +102,7 @@
 			</view>
 			</view>
 		</view>
-		<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch" :mid-button="false"></u-tabbar>
+		<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch" :mid-button="true"></u-tabbar>
 	</view>
 </template>
 
@@ -131,8 +123,8 @@
 	import { openWebView } from "@/utils/index.js"
 	export default {
 		components: {
-			scrollBox,
-			UniStatusBar
+			scrollBox, // 无缝滚动组件
+			UniStatusBar // 状态栏组件
 		},
 		data() {
 			return {
@@ -141,44 +133,39 @@
 				bondRecord: null, // 保证金
 				list:[], // 扫描记录滚动
 				slist:[], // 红包滚动
-				vinList: [],
-				orderTodo: null,
-				avatarUrl:'',
-				navHeight: '44',
-				scanMaxNums: 10,
-				showAction: false,
-				actionList: [
-					{
-						text: '扫描条形码/二维码',
-						fontSize: 32
-					},
-					{
-						text: '按产品编码查询',
-						fontSize: 32
-					}
-				],
-				carouselList: []
+				vinList: [], // 扫描记录
+				orderTodo: null, // 待取货的货架订单信息
+				avatarUrl:'', // 用户图像
+				navHeight: '44', // 头部高度
+				scanMaxNums: 10, // 扫描VIN仅限10次
+				carouselList: [] // 修理厂促销活动列表
 			}
 		},
 		computed: {
 			...mapState(['hasLogin','vuex_vinScanNums','vuex_tabBarList']),
+			// 显示开发版本信息
 			showVersion () {
 				const baseUrl = getApp().globalData.baseUrl
 				return baseUrl.indexOf(".test.") >= 0
 			},
+			// 是否有数字货架
 			hasShelf(){
 				return this.$store.state.vuex_storeShelf
 			},
+			// 登录用户信息
 			userInfo(){
 				return this.$store.state.vuex_userInfo
 			},
+			// 是否有门店申请信息
 			storeApply(){
 				return this.$store.state.vuex_storeAuthInfo || null
 			},
+			// 是否有红包
 			hasRedPacket(){
 				const rule = this.$store.state.vuex_rewardRule
 				return rule&&rule.ruleStatus == 'release'
 			},
+			// banner 图片列表
 			imgList(){
 				let list = [
 					{
@@ -197,8 +184,8 @@
 			}
 		},
 		onReady() {
+			// 滚动扫描记录
 			this.getScrollLog()
-			
 			// 获取导航栏高度
 			const res = uni.getSystemInfoSync()
 			const system = res.platform
@@ -234,6 +221,7 @@
 				this.pageInit()
 			})
 		},
+		// 页面卸载
 		onUnload() {
 			uni.$off('refashHome')
 		},
@@ -264,7 +252,7 @@
 		methods: {
 			// 扫描vin
 			beforeSwitch(index){
-				if(index==1){
+				if(index==2){
 					this.openCamera()
 				}else{
 					return true
@@ -277,18 +265,10 @@
 				promoTerminalList({sn:storeShelf.dealerSn}).then(res => {
 					if(res.status == 200){
 						res.data&&res.data.map(item => {
-							item.imageSet&&item.imageSet.map(k => {
-								this.carouselList.push({
-									image: k,
-									title: item.title,
-									contentType: item.contentType,
-									id: item.id,
-									name: item.name,
-									promoActiveSn: item.promoActiveSn,
-									content: item.content
-								})
-							})
+							item.image = item.imageSet&&item.imageSet[0] // 默认取第一张图片
 						})
+						// 过滤掉产品促销活动
+						this.carouselList = res.data.filter(item => item.content.indexOf("pages/promo/index") < 0)
 					}
 				})
 			},
@@ -461,7 +441,6 @@
 			openTakeGood(index){
 				// 已有数字货架
 				if(this.hasShelf){
-					// this.showAction = true
 					this.clickAction(index)
 				}else{
 					uni.showToast({
@@ -473,7 +452,7 @@
 			// 单击banner
 			clickBanner(index){
 				const row = this.imgList[index]
-				console.log(row)
+				// 红包
 				if(row.activeType == 'redPacket'){
 					uni.navigateTo({url:"/pages/morePage/redPacket"})
 				}
@@ -552,7 +531,9 @@
 			// 去扫描
 			openCamera(){
 				if(this.hasLogin){
+					// 游客身份
 					if(this.userInfo.sysUserFlag == '0'){
+						// 最多扫10次
 						if(this.vuex_vinScanNums < this.scanMaxNums){
 							uni.navigateTo({
 								url: "/pages/scan-frame/scan-frame"
@@ -567,6 +548,7 @@
 							})
 						}
 					}else{
+						// 非游客,直接扫
 						uni.navigateTo({
 							url: "/pages/scan-frame/scan-frame"
 						})
@@ -583,6 +565,7 @@
 					url: this.hasLogin ? "/pagesA/vinRecord/vinRecord" : '/pages/login/login'
 				})
 			},
+			// 查看用户信息
 			toUser(){
 				if(this.hasLogin){
 					// 用户详细信息 或 门店认证
@@ -595,6 +578,7 @@
 					})
 				}
 			},
+			// 选择配件
 			toChoosePart(item){
 				item.text = item.modelInfo
 				uni.navigateTo({

+ 2 - 2
pages/login/login.vue

@@ -22,8 +22,8 @@
 		    </view>
 		</view>
 		<view class="xieyi" style="display: flex;align-items: center;padding:50upx 0;justify-content: center;font-size: 24rpx;">
-			<u-checkbox v-model="tyYd" shape="circle" style="width:25px;"></u-checkbox>
-			登录代表您已同意<text @click="gotoXieyi()">隐私政策、服务条款</text>
+			<u-checkbox v-model="tyYd" :label-size="24">登录代表您已同意</u-checkbox>
+			<text style="margin-left: -20rpx;" @click="gotoXieyi()">隐私政策、服务条款</text>
 		</view>
 	</view>
     

+ 2 - 2
pages/login/phoneLogin.vue

@@ -21,8 +21,8 @@
 		</view>
   
 		<view class="xieyi" style="display: flex;align-items: center;padding:50upx 0;justify-content: center;font-size: 24rpx;">
-			<u-checkbox v-model="tyYd" shape="circle" style="width:25px;"></u-checkbox>
-			登录代表您已同意<text @click="gotoXieyi()">隐私政策、服务条款</text>
+			<u-checkbox v-model="tyYd" :label-size="24">登录代表您已同意</u-checkbox>
+			<text style="margin-left: -20rpx;" @click="gotoXieyi()">隐私政策、服务条款</text>
 		</view>
 		<!-- 图文验证码 -->
 		<uni-popup @change="changeModal" ref="imageTxtPopup" type="center">

+ 13 - 2
pages/morePage/morePage.vue

@@ -9,6 +9,14 @@
 				</view>
 			</view>
 		</view>
+		<view class="list-box">
+			<view class="list-title flex align_center justify_between" @click="toPage('/pagesB/coupon')">
+				<view><u-icon size="34" color="#ff7d0b" name="gift-fill"></u-icon> <text style="color: #ff7d0b;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>
@@ -33,6 +41,9 @@
 				<u-cell-item title="急送订单" v-if="$hasPermissions('M_tempShelfOrder_mini')" @click="toPage('/pagesA/digitalShelf/tempOrderList/tempOrderList')" :title-style="{fontSize:'1em'}">
 					<text slot="icon"></text>
 				</u-cell-item>
+				<u-cell-item title="采购订单" v-if="$hasPermissions('M_tempShelfOrder_mini')" @click="toPage('/pagesB/procureOrderList')" :title-style="{fontSize:'1em'}">
+					<text slot="icon"></text>
+				</u-cell-item>
 			</u-cell-group>
 		</view>
 		<view class="list-box" v-if="$hasPermissions('M_creatWarranty_mini')||$hasPermissions('M_searchWarranty_mini')">
@@ -101,7 +112,7 @@
 			</view>
 		</u-popup>
 	</view>
-	<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch" :mid-button="false"></u-tabbar>
+	<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch" :mid-button="true"></u-tabbar>
 	</view>
 </template>
 
@@ -146,7 +157,7 @@
 			},
 		methods: {
 			beforeSwitch(index){
-				if(index==1){
+				if(index==2){
 					this.openCamera()
 				}else{
 					return true

+ 187 - 0
pages/promo/index.vue

@@ -0,0 +1,187 @@
+<template>
+	<view class="video-pagesCons">
+		<view class="tab-body">
+			<scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom">
+				<view  
+				class="check-order-list" 
+				v-for="(item,index) in list" 
+				:key="item.id" 
+				 @click="viewRow(item)"
+				>
+					<view class="video-item">
+						<view>
+							<u-image :src="item.imageSet[0]" height="160px" width="100%"></u-image>
+						</view>
+						<view class="ellipsis-two">{{item.title}}</view>
+					</view>
+				 </view>
+				 <view style="padding: 20upx;">
+					 <u-empty :src="`/static/nodata.png`" icon-size="180" :text="noDataText" img-width="120" v-if="list.length==0 && status!='loading'" mode="list"></u-empty>
+					 <u-loadmore v-if="(total>=list.length&&list.length)||status=='loading'" :status="status" />
+				 </view>
+			</scroll-view>     
+		</view>
+		<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch" :mid-button="true"></u-tabbar>
+	</view>
+</template>
+
+<script>
+	import {
+	    mapState,
+	    mapMutations,
+	} from 'vuex'
+	import { promoTerminalList } from '@/api/video.js'
+	export default {
+		data() {
+			return {
+				status: 'loading',
+				noDataText: '暂无数据',
+				// 查询条件
+				pageNo: 1,
+				pageSize: 10,
+				list: [],
+				total: 0,
+			}
+		},
+		computed: {
+			...mapState(['hasLogin','vuex_vinScanNums','vuex_scanMaxNums','vuex_tabBarList','vuex_videoTypeList']),
+			userInfo(){
+				return this.$store.state.vuex_userInfo
+			},
+			tabList(){
+				return this.$store.state.vuex_videoTypeList
+			}
+		},
+		onLoad() {
+			this.pageInit()
+		},
+		onHide() {
+			this.list.map(item => {
+				item.showVideo = false
+			})
+		},
+		methods: {
+			pageInit(){
+				this.total = 0
+				this.pageNo = 1
+				this.getRow()
+			},
+			// scroll-view到底部加载更多
+			onreachBottom() {
+				if(this.list.length < this.total){
+					this.pageNo += 1
+					this.getRow()
+				}else{
+					this.status = "nomore"
+				}
+			},
+			// 查询列表
+			getRow (pageNo) {
+			  let _this = this
+			  if (pageNo) {
+			    this.pageNo = pageNo
+			  }
+			  let params = {
+			    pageNo: this.pageNo,
+			    pageSize: this.pageSize,
+			  }
+			  const storeShelf = this.$store.state.vuex_storeShelf
+			  this.status = "loading"
+			  promoTerminalList({sn:storeShelf.dealerSn,contentType:'LINK'}).then(res => {
+				if (res.code == 200 || res.status == 204 || res.status == 200) {
+				  // const list = res.data.list || []
+				  // if(_this.pageNo>1){
+					 //  _this.list = _this.list.concat(list)
+				  // }else{
+					 //  _this.list = list
+				  // }
+				  // _this.total = res.data.count || 0
+				  
+				  _this.list = res.data.filter(item => item.content.indexOf("pages/promo/index") >= 0)
+				  _this.total = _this.list.length
+				} else {
+				  _this.list = []
+				  _this.total = 0
+				  _this.noDataText = res.message
+				}
+				_this.status = _this.total>=_this.list.length ? "nomore" : 'loadmore'
+			  })
+			},
+			// 促销活动产品列表页
+			viewRow(item){
+				 uni.navigateTo({
+				 	url: '/pagesB/promoDetail?id='+item.id+'&title='+item.title
+				 })
+			},
+			// 扫描vin
+			beforeSwitch(index){
+				if(index==2){
+					this.openCamera()
+				}else{
+					return true
+				}
+			},
+			// 去扫描
+			openCamera(){
+				if(this.hasLogin){
+					if(this.userInfo.sysUserFlag == '0'){
+						if(this.vuex_vinScanNums < this.vuex_scanMaxNums){
+							uni.navigateTo({
+								url: "/pages/scan-frame/scan-frame"
+							})
+						}else{
+							uni.showModal({
+								title: '提示',
+								content: '个人用户扫描VIN仅限10次,您的次数已用完!',
+								confirmText: '好的',
+								showCancel: false,
+								success(res) {}
+							})
+						}
+					}else{
+						uni.navigateTo({
+							url: "/pages/scan-frame/scan-frame"
+						})
+					}
+				}else{
+					uni.navigateTo({
+						url: '/pages/login/login'
+					})
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+    page{
+		height: 100vh;
+	}
+	.video-pagesCons{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		.tab-body{
+			height: 100vh;
+			.check-order-list{
+				background: #ffffff;
+				padding: 20upx;
+				margin: 25upx;
+				border-radius: 10upx;
+				box-shadow: 1px 1px 3px #EEEEEE;
+				.video-item{
+					> view{
+						&:first-child{
+							position: relative;
+						}
+						&:last-child{
+							text-align: center;
+							font-size: 36rpx;
+							margin: 20rpx 0 0;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 2 - 2
pages/videos/index.vue

@@ -36,7 +36,7 @@
 					</swiper-item>
 				</swiper>
 		</view>
-		<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch" :mid-button="false"></u-tabbar>
+		<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch" :mid-button="true"></u-tabbar>
 	</view>
 </template>
 
@@ -173,7 +173,7 @@
 			// 扫描vin
 			beforeSwitch(index){
 				console.log(index)
-				if(index==1){
+				if(index==2){
 					this.openCamera()
 				}else{
 					return true

+ 311 - 0
pagesB/coupon.vue

@@ -0,0 +1,311 @@
+<template>
+	<view class="digitShelf-pagesCons">
+		<view class="tab-body">
+			    <view>
+					<u-tabs-swiper ref="uTabs" :list="tabList" :offset="[5,40]" bar-width='100' active-color="#1283d4" name="dispName" :current="current" @change="tabsChange" :is-scroll="false"
+					 swiperWidth="750"></u-tabs-swiper>
+				</view>
+				<swiper class="check-list" :current="swiperCurrent" @transition="transition" @change="swiperChange" @animationfinish="animationfinish">
+					<swiper-item class="swiper-item" style="height: 100%;width: 100%;overflow: hidden;" v-for="(tabs, indexs) in tabList" :key="indexs">
+						<scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom">
+							<view  
+							class="check-order-list" 
+							v-for="(item,index) in 10" 
+							:key="item" 
+							>
+								<view>
+									<view class="dio dio-left"></view>
+									<view class="dio dio-right"></view>
+									<view class="check-order-left" :class="'imgbg-'+current">
+										¥<text>100</text>
+									</view>
+									<view class="check-order-right">
+										<view class="check-order-title">满1000减100</view>
+										<view class="check-order-subtitle">箭冠轮胎,五一大福利。</view>
+										<view class="check-order-date">
+											<view v-if="current!=1">2024.07.22 13:00:00 至</view>
+											<view v-if="current!=1">2024.08.22 13:00:00 到期 </view>
+											<view class="use-date" v-if="current==1">使用时间:2021-12-31</view>
+										</view>
+									</view>
+								</view>
+								<view>
+									<view class="check-order-desc" :class="'border-'+current" @click="item.showDesc = !item.showDesc">
+										<text>使用说明:</text>
+										<u-icon name="arrow-down"></u-icon>
+									</view>
+									<view class="check-order-desc-content">
+										 仅限箭冠产品,轮胎类,满1000,才能使用。
+									</view>
+								</view>
+							 </view>
+							 <view style="padding: 20upx;">
+								 <u-empty :src="`/static/nodata.png`" icon-size="180" :text="noDataText" img-width="120" v-if="list.length==0 && status!='loading'" mode="list"></u-empty>
+								 <u-loadmore v-if="(total>=list.length&&list.length)||status=='loading'" :status="status" />
+							 </view>
+						</scroll-view>
+					</swiper-item>
+				</swiper>
+		</view>
+	</view>
+</template>
+
+<script>
+	import carNo from '@/components/carNo.vue'
+	import { getShelfTempBillList, shelfTempTotalWaitQty } from '@/api/shelf.js'
+	import moment from 'moment'
+	export default {
+		components: {carNo},
+		data() {
+			return {
+				theme:'',
+				status: 'loading',
+				noDataText: '暂无数据',
+				tabList: [
+					  {
+						  dispName: '未使用',
+						  typeId: 1,
+						  count: 0
+					   },
+					  {
+					    dispName: '已使用',
+					  	typeId: 2,
+						count: 0
+					  },
+					  {
+					    dispName: '已过期',
+					  	typeId: 3,
+						count: 0
+					  },
+				  ],
+				current: 0,
+				swiperCurrent: 0,
+				// 查询条件
+				pageNo: 1,
+				pageSize: 10,
+				list: [],
+				total: 0,
+			}
+		},
+		onLoad() {
+			let _this = this
+			_this.pageInit()
+			_this.theme = getApp().globalData.theme
+			uni.$on('refreshOrder',function(data){
+				 _this.list = []
+				 _this.status = "loading"
+			     _this.pageInit()
+			})
+		},
+		methods:{
+			// 复制
+			copyVin(vin){
+				uni.setClipboardData({
+					data: vin||'',
+				})
+			},
+			message(title){
+				uni.showToast({
+					icon:'none',
+					title: title
+				})
+			},
+			pageInit(){
+				this.total = 0
+				this.pageNo = 1
+				this.getRow()
+				// 获取总条数
+				this.getWaitTotal()
+			},
+			// tabs通知swiper切换
+			tabsChange(index) {
+				this.swiperCurrent = index;
+			},
+			swiperChange(event){
+				console.log(event.detail)
+				this.list = []
+				this.status = "loading"
+			},
+			// swiper-item左右移动,通知tabs的滑块跟随移动
+			transition(e) {
+				let dx = e.detail.dx;
+				this.$refs.uTabs.setDx(dx);
+			},
+			// 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
+			// swiper滑动结束,分别设置tabs和swiper的状态
+			animationfinish(e) {
+				let current = e.detail.current;
+				if(current != this.current){
+					this.$refs.uTabs.setFinishCurrent(current);
+					this.swiperCurrent = current;
+					this.current = current;
+					this.pageInit()
+				}
+			},
+			// scroll-view到底部加载更多
+			onreachBottom() {
+				console.log(this.list.length, this.total)
+				if(this.list.length < this.total){
+					this.pageNo += 1
+					this.getRow()
+				}else{
+					this.status = "nomore"
+				}
+			},
+			checkNums (states, i){
+			  if(states){
+				  let arr = states.split(',')
+				  return arr[i]
+			  }
+				return 0
+			},
+			// 查询列表
+			getRow (pageNo) {
+			  let _this = this
+			  if (pageNo) {
+			    this.pageNo = pageNo
+			  }
+			  let params = {
+			    pageNo: this.pageNo,
+			    pageSize: this.pageSize,
+			  }
+			  // 状态条件
+			  if(this.swiperCurrent == 1){
+				  params.billStateList = ['WAIT_AUDIT','AUDIT_REJECT','WAIT_OUT_WAREHOUSE']
+			  }
+			  if(this.swiperCurrent == 2){
+				  params.billStateList = ['FINISH']
+			  }
+			  this.status = "loading"
+			  getShelfTempBillList(params).then(res => {
+				if (res.code == 200 || res.status == 204 || res.status == 200) {
+				  if(_this.pageNo>1){
+					  _this.list = _this.list.concat(res.data.list || [])
+				  }else{
+					  _this.list = res.data.list || []
+				  }
+				  _this.total = res.data.count || 0
+				} else {
+				  _this.list = []
+				  _this.total = 0
+				  _this.noDataText = res.message
+				}
+				_this.status = _this.total>=_this.list.length ? "nomore" : 'loadmore'
+			  })
+			},
+			// 获取待拿货数量
+			async getWaitTotal(){
+				 const ret = await shelfTempTotalWaitQty({billStateList:['WAIT_AUDIT','AUDIT_REJECT','WAIT_OUT_WAREHOUSE']}).then(res => res.data)
+				 this.tabList[1].count = ret || 0
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+	}
+	.digitShelf-pagesCons{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		.tab-body{
+			.check-list{
+				height: calc(100vh - 44px);
+			}
+			.check-order-list{
+				background: #ffffff;
+				margin: 25upx;
+				border-radius: 30upx;
+				box-shadow: 1px 1px 3px #EEEEEE;
+				> view{
+					&:first-child{
+						position: relative;
+						display: flex;
+						align-items: center;
+						justify-content: space-around;
+					}
+				}
+				.dio{
+					width: 30rpx;
+					height: 30rpx;
+					background: #f8f8f8;
+					border-radius: 100rpx;
+					position: absolute;
+					z-index: 1000;
+				}
+				.dio-left{
+					left: -15rpx;
+					top: 85rpx;
+				}
+				.dio-right{
+					right: -15rpx;
+					top: 85rpx;
+				}
+				.check-order-left{
+					width: 30%;
+					height: 200rpx;
+					display: flex;
+					align-items: center;
+					justify-content:center;
+					font-size: 30rpx;
+					text{
+						font-size: 65rpx;
+					}
+					color: #fff;
+				}
+				.imgbg-0{
+					background: #2196F3;
+				}
+				.imgbg-1{
+					background: #f7e7b8;
+					color: #FF9800;
+				}
+				.imgbg-2{
+					background: #d2d1d1;
+				}
+				.check-order-right{
+					width: 70%;
+					padding: 0 25rpx;
+					.check-order-title{
+						font-size: 32rpx;
+					}
+					.check-order-subtitle{
+						font-size: 28rpx;
+						color: #666;
+						margin: 10rpx 0;
+					}
+					.check-order-date{
+						font-size: 24rpx;
+						color: #666;
+						.use-date{
+							color: #ff5500;
+						}
+					}
+				}
+				.check-order-desc{
+					font-size: 24rpx;
+					color: #666;
+					padding: 10rpx 20rpx;
+					border-top: 1rpx solid #2196F3;
+					display: flex;
+					justify-content: space-between;
+				}
+				.border-0{
+					border-top: 1rpx solid #eee;
+				}
+				.border-1{
+					border-top: 1rpx solid #f7e7b8;
+				}
+				.border-2{
+					border-top: 1rpx solid #d2d1d1;
+				}
+				.check-order-desc-content{
+					padding: 5rpx 25rpx 25rpx 25rpx;
+					font-size: 24rpx;
+				}
+			}
+		}
+	}
+</style>

+ 342 - 0
pagesB/procureOrder.vue

@@ -0,0 +1,342 @@
+<template>
+	<view class="orderDetail-digitalShel flex flex_column">
+		<view class="contHead" :style="{background:state!= 'CLOSE' ? '#066cff':'#ff5500',color:'#fff'}">
+			<view class="statusH">
+				<view class="flex flex_column align_center">
+					<view class="status-row">
+						<u-icon :name="statusIcon" size="42" color="#fff"> 
+						</u-icon>
+						<text>{{statusText}}</text>
+					</view>
+					<view class="messageText">{{statusMessage}}</view>
+				</view>
+			</view>
+		</view>
+		<view class="order-body">
+			<view class="info partList" v-if="partList.length">
+				<view class="infoList">
+					<view class="title">
+						<u-icon name="info-circle" color="#ffaa00" size="28"></u-icon><text>请耐心等待汽配经销商进行配送</text>
+					</view>
+					<view>
+						{{partList.length}}款,共<text class="redText">{{totalNums}}</text>件
+					</view>
+				</view>
+				<view v-for="item in partList" :key="item.productSn" class="flex align-center item-list">
+					<view style="height: 150rpx;">
+						<u-image :src="item.images" border-radius="16" width="200" height="150" bg-color="#EBEBEB" ></u-image>
+						<view class="back-price">返<text>¥15</text></view>
+					</view>
+					<view>
+						<view class="item-name">
+						  <text>{{item.productName}}</text>
+						</view>
+						<view class="item-nums">
+							<text>{{item.productCode}}</text>
+						</view>
+						<view class="item-head">
+							<view>
+								数量:<text class="redText">{{item.qty}}</text>{{item.unit}}
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="info" v-if="info">
+				<view class="infoList">
+					<view class="title">单据信息</view>
+					<view class="statu"></view>
+				</view>
+				<view class="infoList dju">
+					<text>订单号</text>
+					<text>{{info.shelfOrderNo||'--'}}</text>
+				</view>
+				<view class="infoList">
+					<text>下单时间</text>
+					<text>{{info.shelfOrderDate||'--'}}</text>
+				</view>
+				<view class="infoList">
+					<text>下单人员</text>
+					<text>{{info.orderPersonName || '--'}}</text>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import carNo from '@/components/carNo.vue'
+	import uniIcons from "@/components/uni-icons/uni-icons.vue"
+	import moment from 'moment'
+	import { findBySnShelfOrder, cancelShelfOrder, takeGoods } from '@/api/shelf.js'
+	export default {
+	   name: 'orderDetail-digitalShel',
+	   components: {
+		uniIcons,
+		carNo
+	   },
+	   data() {
+		   return {
+			   loading: false,
+			   info: null,
+			   statusText: '',
+			   statusIcon: '', // 结算状态icon
+			   statusMessage: '',
+			   partList: [], // 配件列表
+			   shelfOrderSn: null,
+			   state: ''
+		   }
+	   },
+	   onReady() {
+	   },
+	   onLoad(option) { 
+		  this.shelfOrderSn = option.shelfOrderSn
+		  this.state = option.state
+		  uni.setNavigationBarTitle({
+		  	title: ''
+		  })
+		  // 更改标题栏背景色
+		  uni.setNavigationBarColor({
+		  	frontColor: '#ffffff',
+		  	backgroundColor: option.state!= 'error' ? '#066cff':'#ff5500',
+		  })
+	   },
+	   onShow() {
+	   	 // this.getDetail()
+		 this.info = {
+			 orderPersonName: '张三',
+			 shelfOrderDate: moment().format('YYYY-MM-DD HH:mm:ss'),
+			 shelfOrderNo: '12345678901234567890',
+			 billState: 'success'
+		 }
+		 this.statusText = '提交成功'
+		 this.statusIcon = 'checkmark-circle'
+		 this.partList = [
+			 {
+			 	id: new Date().getTime(),
+			 	productName: '长安回望绣成堆,山顶千门次第开,一骑红尘妃子笑,无人知是荔枝来',
+			 	images: 'https://cdn.uviewui.com/uview/common/logo.png',
+				productCode:'432-ddsaf-jjj',
+				qty: 5,
+			 	unit: '个'
+			 }
+		 ]
+	   },
+	   computed: {
+		   totalNums(){
+			   let ret = 0
+			   this.partList.map(item => {
+				   ret += item.qty
+			   })
+			   return ret
+		   }
+	   },
+	   methods: {
+		 message(title){
+		 	uni.showToast({
+		 		icon:'none',
+		 		title: title
+		 	})
+		 },
+		  // 获取详情
+		  getDetail(){
+			  findBySnShelfOrder({sn: this.shelfOrderSn}).then(res => {
+				  if(res.status == 200){
+					  this.info = res.data
+					  this.partList = res.data.shelfOrderDetailList || []
+					  if(this.info.billState == 'success'){
+						  this.statusText = '提交成功'
+						  this.statusIcon = 'checkmark-circle'
+						  this.statusMessage = ''
+					  }
+					  if(this.info.billState == 'error'){
+						  this.statusText = '提交失败'
+						  this.statusIcon = 'close-circle'
+						  this.statusMessage = ''
+					  }
+				  }
+			  })
+		  },
+	   }
+	}
+</script>
+
+<style lang="less">
+	page{
+		height: 100%;
+	}
+	.orderDetail-digitalShel{
+		height: 100%;
+		.redText{
+			color: #FB1E1E;
+		}
+		.order-body{
+			flex-grow: 1;
+			overflow: auto;
+			.partList{
+				margin-top: 20rpx;
+			}
+		}
+		.contHead {
+			.statusH{
+				> view{
+					padding: 10upx 12%;
+					font-size: 34upx;
+				}
+				.status-row{
+					font-size: 42upx;
+					text{
+						margin-left: 10rpx;
+					}
+				}
+				.messageText{
+					font-size: 30upx;
+					text-align: center;
+					text{
+						color: #ffaa00;
+					}
+					padding: 10rpx 0;
+				}
+			}
+			.orderTj{
+				padding: 0 20rpx 20rpx;
+				background-color: #fff;
+				> view{
+					text-align: center;
+					border-right: 2rpx solid #eee;
+					width: 50%;
+					color: #666E75;
+					.redText{
+						color: #FB1E1E;
+					}
+					&:last-child{
+						border: 0;
+					}
+					> view{
+						color: #666E75;
+						&:first-child{
+							font-size: 56rpx;
+						}
+					}
+				}
+				border-radius: 20rpx 20rpx 0 0;
+			}
+		}
+		.info{
+			background-color: #FFFFFF;
+			padding: 10rpx 30upx;
+			font-size: 32rpx;
+			margin-bottom: 20rpx;
+			.infoList{
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				padding: 20rpx 0;
+				border-bottom: 2rpx solid #f2f2f2;
+				&:last-child{
+					border: none;
+				}
+				.title{
+					font-weight: bold;
+					> text{
+						color: #ff9808;
+						font-size: 24upx;
+					}
+				}
+				> text{
+					&:first-child{
+						color: #666E75;
+					}
+				}
+			}
+			.item-list{
+				border-bottom: 2rpx solid #f2f2f2;
+				padding: 20rpx 0;
+				&:last-child{
+					border: none;
+				}
+				> view{
+					&:first-child{
+						margin-right: 20rpx;
+						margin-top: 18rpx;
+						position: relative;
+						overflow: hidden;
+						width: 200rpx;
+					}
+					.back-price{
+						zoom: calc(0.8);
+						padding: 6rpx 55rpx;
+						background: rgb(255 87 34 / 0.6);
+						position: absolute;
+						top: 16rpx;
+						left: -50rpx;
+						color: #fff;
+						z-index: 2;
+						font-size: 20rpx;
+						text-align: center;
+						transform: rotate(-40deg);
+						display: flex;
+						align-items: center;
+						text{
+							font-size: 28rpx;
+						}
+					}
+					&:last-child{
+						flex-grow: 1;
+						width: 60%;
+					}
+				}
+				.item-name{
+					word-wrap: break-word;
+					font-size: 32rpx;
+					color: #333;
+					font-weight: bold;
+					margin-top: 10rpx;
+				}
+				.item-nums{
+					padding: 10rpx 0;
+					text{
+						font-size: 32rpx;
+						color: #222222;
+					}
+				}
+				.item-head{
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					color: #666;
+					> view{
+						&:first-child{
+							font-size: 28rpx;
+							text{
+								margin-right: 30rpx;
+							}
+						}
+					}
+					.item-no{
+						font-size: 28rpx;
+						background: rgba(3, 54, 146, 0.15);
+						color: #033692;
+						border-radius: 100rpx;
+						padding: 2rpx 30rpx;
+						margin-right: 20rpx;
+						display: block;
+					}
+				}
+			}
+		}
+		.footer{
+			padding: 20upx 60upx;
+			background: #FFFFFF;
+			button{
+				&:after{
+					border: 0;
+				}
+				color: #585858;
+				font-size: 32rpx;
+				margin: 0 20rpx;
+			}
+		}
+	}
+	
+</style>

+ 318 - 0
pagesB/procureOrderList.vue

@@ -0,0 +1,318 @@
+<template>
+	<view class="digitShelf-pagesCons">
+		<view class="tab-body">
+			    <view>
+					<u-tabs-swiper ref="uTabs" :list="tabList" :offset="[5,40]" bar-width='100' active-color="#1283d4" name="dispName" :current="current" @change="tabsChange" :is-scroll="false"
+					 swiperWidth="750"></u-tabs-swiper>
+				</view>
+				<swiper class="check-list" :current="swiperCurrent" @transition="transition" @change="swiperChange" @animationfinish="animationfinish">
+					<swiper-item class="swiper-item" style="height: 100%;width: 100%;overflow: hidden;" v-for="(tabs, indexs) in tabList" :key="indexs">
+						<scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom">
+							<view  
+							class="check-order-list" 
+							v-for="(item,index) in list" 
+							:key="item.id" 
+							 @click="viewRow(item)"
+							>
+								<view class="check-row align-center justify_between">
+									<view class="orderNo">{{item.tempNo}}</view>
+									<view class="times">{{item.createDate}}</view>
+								</view>
+								 <view class="check-row flex align-center">
+									 <view class="carImage flex align-center">
+										 <u-image :src="item.vehicleLogo" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image> 
+									 </view>
+									 <view>
+										 <view class="carModel flex align-center" v-if="item.vehicleNumber" >
+										 	<view><carNo color="#0055ff" :val="item.vehicleNumber"></carNo></view>
+											<text style="margin-left: 20rpx;" v-if="item.vehicleModel">{{item.vehicleModel.split(' ')[0]}}</text>
+										 </view>
+										  <view class="carModel flex" v-if="!item.vehicleNumber" >
+											 <text>{{item.vehicleModel}}</text>
+										  </view>
+										  <view class="carVin flex align-center">
+											  VIN码:{{item.vin||'暂无'}}
+											  <text v-if="item.vin" @click.stop="copyVin(item.vin)">复制</text>
+										  </view>
+									 </view>
+								 </view>
+								 <view class="check-row">
+									 <view class="nums">
+										 {{item.totalQty}}件商品
+									 </view>
+									 <view style="text-align: right;">
+										 <span v-if="item.billState == 'WAIT_AUDIT'">待审核</span>
+										 <span v-if="item.billState == 'AUDIT_REJECT'">审核不通过</span>
+										 <span v-if="item.billState == 'WAIT_OUT_WAREHOUSE'">待收货</span>
+										 <span v-if="item.billState == 'FINISH'">已完结</span>
+									 </view>
+								 </view>
+							 </view>
+							 <view style="padding: 20upx;">
+								 <u-empty :src="`/static/nodata.png`" icon-size="180" :text="noDataText" img-width="120" v-if="list.length==0 && status!='loading'" mode="list"></u-empty>
+								 <u-loadmore v-if="(total>=list.length&&list.length)||status=='loading'" :status="status" />
+							 </view>
+						</scroll-view>
+					</swiper-item>
+				</swiper>
+		</view>
+	</view>
+</template>
+
+<script>
+	import carNo from '@/components/carNo.vue'
+	import { getShelfTempBillList, shelfTempTotalWaitQty } from '@/api/shelf.js'
+	import moment from 'moment'
+	export default {
+		components: {carNo},
+		data() {
+			return {
+				theme:'',
+				status: 'loading',
+				noDataText: '暂无数据',
+				tabList: [
+					  {
+						  dispName: '全部',
+						  typeId: 1,
+						  count: 0
+					   },
+					  {
+					    dispName: '待收货',
+					  	typeId: 2,
+						count: 0
+					  },
+					  {
+					    dispName: '已完结',
+					  	typeId: 3,
+						count: 0
+					  },
+				  ],
+				current: 0,
+				swiperCurrent: 0,
+				// 查询条件
+				pageNo: 1,
+				pageSize: 10,
+				list: [],
+				total: 0,
+			}
+		},
+		onLoad() {
+			let _this = this
+			_this.pageInit()
+			_this.theme = getApp().globalData.theme
+			uni.$on('refreshOrder',function(data){
+				 _this.list = []
+				 _this.status = "loading"
+			     _this.pageInit()
+			})
+		},
+		methods:{
+			// 复制
+			copyVin(vin){
+				uni.setClipboardData({
+					data: vin||'',
+				})
+			},
+			message(title){
+				uni.showToast({
+					icon:'none',
+					title: title
+				})
+			},
+			pageInit(){
+				this.total = 0
+				this.pageNo = 1
+				this.getRow()
+				// 获取总条数
+				this.getWaitTotal()
+			},
+			// tabs通知swiper切换
+			tabsChange(index) {
+				this.swiperCurrent = index;
+			},
+			swiperChange(event){
+				console.log(event.detail)
+				this.list = []
+				this.status = "loading"
+			},
+			// swiper-item左右移动,通知tabs的滑块跟随移动
+			transition(e) {
+				let dx = e.detail.dx;
+				this.$refs.uTabs.setDx(dx);
+			},
+			// 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
+			// swiper滑动结束,分别设置tabs和swiper的状态
+			animationfinish(e) {
+				let current = e.detail.current;
+				if(current != this.current){
+					this.$refs.uTabs.setFinishCurrent(current);
+					this.swiperCurrent = current;
+					this.current = current;
+					this.pageInit()
+				}
+			},
+			// scroll-view到底部加载更多
+			onreachBottom() {
+				console.log(this.list.length, this.total)
+				if(this.list.length < this.total){
+					this.pageNo += 1
+					this.getRow()
+				}else{
+					this.status = "nomore"
+				}
+			},
+			checkNums (states, i){
+			  if(states){
+				  let arr = states.split(',')
+				  return arr[i]
+			  }
+				return 0
+			},
+			// 查询列表
+			getRow (pageNo) {
+			  let _this = this
+			  if (pageNo) {
+			    this.pageNo = pageNo
+			  }
+			  let params = {
+			    pageNo: this.pageNo,
+			    pageSize: this.pageSize,
+			  }
+			  // 状态条件
+			  if(this.swiperCurrent == 1){
+				  params.billStateList = ['WAIT_AUDIT','AUDIT_REJECT','WAIT_OUT_WAREHOUSE']
+			  }
+			  if(this.swiperCurrent == 2){
+				  params.billStateList = ['FINISH']
+			  }
+			  this.status = "loading"
+			  getShelfTempBillList(params).then(res => {
+				if (res.code == 200 || res.status == 204 || res.status == 200) {
+				  if(_this.pageNo>1){
+					  _this.list = _this.list.concat(res.data.list || [])
+				  }else{
+					  _this.list = res.data.list || []
+				  }
+				  _this.total = res.data.count || 0
+				} else {
+				  _this.list = []
+				  _this.total = 0
+				  _this.noDataText = res.message
+				}
+				_this.status = _this.total>=_this.list.length ? "nomore" : 'loadmore'
+			  })
+			},
+			// 详细页
+			viewRow(item){
+				uni.navigateTo({
+					url: "/pagesA/digitalShelf/tempOrderList/orderDetail?orderSn="+item.tempSn+"&state="+(item.billState == 'FINISH'?1:0)
+				})
+			},
+			// 获取待拿货数量
+			async getWaitTotal(){
+				 const ret = await shelfTempTotalWaitQty({billStateList:['WAIT_AUDIT','AUDIT_REJECT','WAIT_OUT_WAREHOUSE']}).then(res => res.data)
+				 this.tabList[1].count = ret || 0
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+	}
+	.digitShelf-pagesCons{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		.tab-body{
+			.check-list{
+				height: calc(100vh - 44px);
+			}
+			.check-order-list{
+				background: #ffffff;
+				padding: 10upx 20upx;
+				margin: 25upx;
+				border-radius: 30upx;
+				box-shadow: 1px 1px 3px #EEEEEE;
+				.check-row{
+					display: flex;
+					padding: 20upx 10upx;
+					font-size: 28upx;
+					&:first-child{
+						color: #666E75;
+						font-size: 24upx;
+						padding-bottom: 10upx;
+						.orderNo{
+							font-size: 30upx;
+							color: #222222;
+							margin-top: -6upx;
+							flex-grow: 1;
+						}
+						.times{
+							text-align: right;
+						}
+						border-bottom: 2upx solid #f5f5f5;
+					}
+					&:last-child{
+						align-items: center;
+						justify-content: space-between;
+						.nums{
+							font-size: 28upx;
+							color: #033692;
+						}
+					}
+					> view{
+						.carModel{
+							color: #222222;
+							font-size: 32upx;
+							font-weight: bold;
+							line-height: normal;
+							margin-bottom: 10rpx;
+						}
+						.carVin{
+							color: #666E75;
+							font-size: 24upx;
+							text{
+								background-color: #EBEBEB;
+								border-radius: 100rpx;
+								padding: 0 20rpx;
+								color: #033692;
+								font-size: 20rpx;
+								display: flex;
+								align-items: center;
+								justify-content: center;
+								margin-left: 20rpx;
+							}
+						}
+					}
+					.carImage{
+						padding-right: 20rpx;
+					}
+					.action{
+						padding: 0 30rpx;
+						color: #fff;
+						border-radius: 100rpx;
+						margin-left: 15upx;
+						font-size: 24upx;
+						&:after{
+							border: 0;
+						}
+						&:active{
+							opacity: 0.5;
+						}
+					}
+					 
+					.finish{
+						background-color: #2d8cf0;
+					}
+					.del{
+						color: #666;
+						border:2rpx solid #EDEDED;
+						background: none;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 468 - 0
pagesB/promoDetail.vue

@@ -0,0 +1,468 @@
+<template>
+	<view class="video-pagesCons">
+		<view class="tab-search">
+			<u-search placeholder="请输入产品名称/轮胎规格" shape="round" :clearabled="true" show-action v-model="queryWord" @clear="getRow" @search="getRow" @custom="getRow"></u-search>
+		</view>
+		<view class="tab-body">
+			<scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom">
+				<view class="product-list">
+					<view
+					class="check-order-list" 
+					v-for="(item,index) in 20" 
+					:key="item.id" 
+					>
+						<view class="video-item">
+							<view>
+								<u-image :src="item.imageSet[0]" height="140px" width="100%"></u-image>
+								<view class="back-price">返<text>¥15</text></view>
+							</view>
+							<view>
+								<view class="product-name">箭冠轮胎285/70R17LT RT-5900 坦克300、长城炮、牧马人 D</view>
+								<view class="product-guige"><text>编码:285/70R17LT RT-5900</text> <text>尺寸:17</text></view>
+								<view class="product-button">
+									<view class="price-txt">¥<text>325.63</text></view>
+									<view>
+										<u-button :throttle-time="50" @click="chooseProduct(item)" :custom-style="{width:'50rpx'}" size="mini" type="primary" shape="circle"><u-icon name="plus"></u-icon></u-button>
+									</view>
+								</view>
+							</view>
+						</view>
+					 </view>
+				</view>
+				 <view style="padding: 20upx;">
+					 <u-empty :src="`/static/nodata.png`" icon-size="180" :text="noDataText" img-width="120" v-if="list.length==0 && status!='loading'" mode="list"></u-empty>
+					 <u-loadmore v-if="(total>=list.length&&list.length)||status=='loading'" :status="status" />
+				 </view>
+			</scroll-view> 
+			<!-- 底部栏 -->
+			<view class="bottom-bar" @click="clearAction">
+				<view class="bottom-bar-left">
+					<view class="bottom-bar-left-item">
+						<view class="bottom-bar-left-item-icon" @click="openChoose">
+							<u-icon name="shopping-cart" size="40"></u-icon>
+							<u-badge type="error" :count="chooseLength" :offset="[-7,-8]"></u-badge>
+						</view>
+					</view>
+					<view class="bottom-bar-left-item">
+						合计:<view class="price-txt">¥<text>325.63</text></view>
+					</view>
+				</view>
+				<view :class="'bottom-bar-right bg-'+(showChoosePopu?'1':'0')" @click="submitOrder">
+					<view class="bottom-bar-right-item">{{showChoosePopu?'确认采购':'去结算'}}</view>
+				</view>
+			</view>
+			<!-- 已选列表 -->
+			<u-popup 
+			v-model="showChoosePopu" 
+			closeable 
+			:zIndex="100" 
+			mode="bottom" 
+			border-radius="14" 
+			height="80%" 
+			@open="openRender"
+			@close="closePopu">
+				<view :style="{width:screenWidth + 'px'}" @click="clearAction">
+					<view class="choose-title">
+						<view>已选<text class="p-nums">{{chooseLength}}</text>款产品 </view>
+						<u-button @click="claerChoose" size="mini" type="error" plain style="margin: 0 20upx;">清空列表</u-button>
+					</view>
+					<view class="choose-product-list" v-if="showSwipeAction">
+						<u-swipe-action 
+						:show="item.show" 
+						:index="index" 
+						v-for="(item, index) in chooseProductList" 
+						:key="item.id" 
+						@click="chooseClick" 
+						@open="chooseOpen"
+						:options="chooseOptions"
+						>
+							<view class="choose-product-item">
+								 <view>
+									 <view class="choose-product-item-img">
+										<u-image :src="item.images" height="200rpx" width="100%"></u-image>
+										<view class="back-price">返<text>¥15</text></view>
+									 </view>
+									 <view class="choose-product-item-info">
+										<view class="ellipsis-two choose-product-item-left-info-name">箭冠轮胎285/70R17LT RT-5900 坦克300、长城炮、牧马人 D</view>
+										<view class="choose-product-item-left-info-guige"><text>编码:285/70R17LT RT-5900</text> <text>尺寸:17</text></view>
+										<view class="choose-product-item-left-info-price">
+											<view class="price-txt">¥<text>325.63</text></view>
+											<view>
+												<u-number-box :input-width="60" :input-height="60" size="mini"></u-number-box>
+											</view>
+										</view>
+									 </view>
+								 </view>
+							</view>
+						</u-swipe-action>
+					</view>
+				</view>
+			</u-popup>
+		</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+	    mapState,
+	    mapMutations,
+	} from 'vuex'
+	import { promoTerminalList } from '@/api/video.js'
+	export default {
+		data() {
+			return {
+				status: 'loading',
+				noDataText: '暂无数据',
+				queryWord: '',
+				// 查询条件
+				pageNo: 1,
+				pageSize: 10,
+				list: [],
+				total: 0,
+				showChoosePopu: false,
+				chooseList:[],
+				chooseProductList:[],
+				chooseOptions:
+				[
+					{
+						text: '删除',
+						style: {
+							backgroundColor: '#dd524d'
+						}
+					}
+				],
+				screenWidth: 750,
+				showSwipeAction: false
+			}
+		},
+		computed: {
+			...mapState(['hasLogin']),
+			userInfo(){
+				return this.$store.state.vuex_userInfo
+			},
+			chooseLength(){
+				return this.chooseList.length
+			}
+		},
+		onLoad(opts) {
+			uni.setNavigationBarTitle({
+				title: opts.title||'促销活动产品'
+			})
+			this.pageInit()
+		},
+		methods: {
+			pageInit(){
+				this.screenWidth = uni.getSystemInfoSync().windowWidth
+				this.total = 0
+				this.pageNo = 1
+				this.getRow()
+			},
+			// 添加已选产品
+			chooseProduct(item){
+				this.chooseList.push({
+					id: new Date().getTime(),
+					title: '长安回望绣成堆,山顶千门次第开,一骑红尘妃子笑,无人知是荔枝来',
+					images: 'https://cdn.uviewui.com/uview/common/logo.png',
+					show: false
+				})
+				this.showChoosePopu = false
+			},
+			openRender(){
+				this.chooseProductList = JSON.parse(JSON.stringify(this.chooseList))
+				setTimeout(()=>{
+					this.showSwipeAction = true
+				},100)
+			},
+			closePopu(){
+				this.chooseProductList = []
+				this.showChoosePopu=false
+			},
+			// 打开已选产品列表
+			openChoose(){
+				if(this.chooseLength){
+					this.showChoosePopu = !this.showChoosePopu
+				}else{
+					this.$u.toast(`请选择产品`);
+				}
+			},
+			//已选产品删除
+			chooseClick(index, btns){
+				if(btns == 0) {
+					this.chooseList.splice(index, 1);
+					this.chooseProductList.splice(index, 1);
+					this.$u.toast(`删除了第${index}个cell`);
+				}
+			},
+			// 同时打开一个
+			chooseOpen(index){
+				// 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
+				// 原本为'false',再次设置为'false'会无效
+				this.chooseProductList[index].show = true;
+				this.chooseProductList.map((val, idx) => {
+					if(index != idx) this.chooseProductList[idx].show = false;
+				})
+			},
+			// 清除滑动按钮
+			clearAction(){
+				this.chooseProductList.map(item => {
+					item.show = false
+				})
+				this.chooseProductList.splice()
+			},
+			// 清空已选列表
+			claerChoose(){
+				const _this = this
+				uni.showModal({
+					title: '提示',
+					content: '确定清空已选列表?',
+					confirmText: '确定',
+					success(res) {
+						if(res.confirm){
+							_this.chooseList = []
+							_this.chooseProductList = []
+							_this.showChoosePopu = false
+						}
+					}
+				})
+			},
+			// scroll-view到底部加载更多
+			onreachBottom() {
+				if(this.list.length < this.total){
+					this.pageNo += 1
+					this.getRow()
+				}else{
+					this.status = "nomore"
+				}
+			},
+			// 查询列表
+			getRow (pageNo) {
+			  let _this = this
+			  if (pageNo) {
+			    this.pageNo = pageNo
+			  }
+			  let params = {
+			    pageNo: this.pageNo,
+			    pageSize: this.pageSize,
+				queryWord: this.queryWord
+			  }
+			  const storeShelf = this.$store.state.vuex_storeShelf
+			  this.status = "loading"
+			  promoTerminalList({sn:storeShelf.dealerSn,contentType:'LINK'}).then(res => {
+				if (res.code == 200 || res.status == 204 || res.status == 200) {
+				  // const list = res.data.list || []
+				  // if(_this.pageNo>1){
+					 //  _this.list = _this.list.concat(list)
+				  // }else{
+					 //  _this.list = list
+				  // }
+				  // _this.total = res.data.count || 0
+				  
+				  _this.list = res.data.filter(item => item.content.indexOf("pages/promo/index") >= 0)
+				  _this.total = _this.list.length
+				} else {
+				  _this.list = []
+				  _this.total = 0
+				  _this.noDataText = res.message
+				}
+				_this.status = _this.total>=_this.list.length ? "nomore" : 'loadmore'
+			  })
+			},
+			// 提交订单
+			submitOrder(){
+				if(this.showChoosePopu){
+					uni.navigateTo({
+						url: '/pagesB/procureOrder?id='
+					})
+				}else{
+					this.openChoose()
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+    page{
+		height: 100vh;
+	}
+	.video-pagesCons{
+		height: 100vh;
+		display: flex;
+		flex-direction: column;
+		.tab-search{
+			padding: 15rpx 20rpx;
+			background: #fff;
+		}
+		.tab-body{
+			display: flex;
+			flex-direction: column;
+			flex-grow: 1;
+			overflow: auto;
+			.bottom-bar{
+				height: 150upx;
+				z-index: 500;
+				background-color: #fff;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				font-size: 32upx;
+				.bottom-bar-left{
+					padding: 0 30upx;
+					flex-grow: 1;
+					display: flex;
+					align-items: center;
+				}
+				.bottom-bar-left-item{
+					padding-right: 20rpx;
+					font-size: 24rpx;
+					display: flex;
+					align-items: center;
+				}
+				.bottom-bar-left-item-icon{
+					position: relative;
+					background: #2196F3;
+					padding: 20rpx;
+					border-radius: 100%;
+					color: #fff;
+				}
+				.bottom-bar-right{
+					padding: 0 50rpx;
+					height: 100%;
+					background: #2196F3;
+					display: flex;
+					align-items: center;
+					.bottom-bar-right-item{
+						color: #fff;
+					}
+				}
+				.bg-0{
+					background: #2196F3;
+				}
+				.bg-1{
+					background: #f44336;
+				}
+			}
+			.product-list{
+				display: flex;
+				flex-wrap: wrap;
+			}
+			.check-order-list{
+				width: 50%;
+				padding: 10upx;
+				.video-item{
+					background: #ffffff;
+					border-radius: 10upx;
+					box-shadow: 1px 1px 3px #EEEEEE;
+					> view{
+						&:first-child{
+							position: relative;
+							overflow: hidden;
+						}
+						&:last-child{
+							padding: 20rpx;
+							.product-guige{
+								margin: 10rpx 0;
+								color: #666;
+								text{
+									margin-right: 10rpx;
+								}
+							}
+						}
+						.product-button{
+							display: flex;
+							justify-content: space-between;
+							align-items: center;
+						}
+					}
+				}
+			}
+		}
+		.price-txt{
+			color: red;
+			text{
+				font-size: 36rpx;
+			}
+		}
+		.choose-title{
+			display: flex;
+			align-items:center;
+			padding: 30rpx;
+			position: fixed;
+			background: #fff;
+			width: 100%;
+			z-index: 3;
+			.p-nums{
+				color: #2196F3;
+				margin: 0 6rpx;
+			}
+		}
+		.choose-product-list{
+			padding: 100rpx 20rpx 150rpx;
+			width: 100%;
+			.choose-product-item{
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 20rpx 0;
+				border-bottom: 1px solid #eee;
+				> view{
+					 display: flex;
+					 align-items: center;
+					 justify-content: space-between;
+					 flex-grow: 1;
+					 width: 100%;
+				}
+				.choose-product-item-img{
+					margin-right: 10rpx;
+					width: 35%;
+					position: relative;
+					overflow: hidden;
+					.back-price{
+						zoom: calc(0.8);
+					}
+				}
+				.choose-product-item-info{
+					margin-right: 10rpx;
+					width: 65%;
+					flex-grow: 1;
+					.choose-product-item-left-info-price{
+						display: flex;
+						align-items:center;
+						justify-content: space-between;
+						>view{
+							&:last-child{
+								display: flex;
+								align-items:center;
+							}
+						}
+					}
+					.choose-product-item-left-info-guige{
+						color: #666;
+						margin: 10rpx 0;
+						text{
+							margin-right: 10rpx;
+						}
+					}
+				}
+			}
+		}
+		.back-price{
+			padding: 6rpx 55rpx;
+			background: rgb(255 87 34 / 0.6);
+			position: absolute;
+			top: 16rpx;
+			left: -50rpx;
+			color: #fff;
+			z-index: 2;
+			font-size: 20rpx;
+			text-align: center;
+			transform: rotate(-40deg);
+			display: flex;
+			align-items: center;
+			text{
+				font-size: 28rpx;
+			}
+		}
+	}
+</style>

BIN
static/tab/tab_home_normal.png


BIN
static/tab/tab_home_pressed.png


BIN
static/tab/tab_personal_normal.png


BIN
static/tab/tab_personal_pressed.png


BIN
static/tab/tab_promo_normal.png


BIN
static/tab/tab_promo_pressed.png


BIN
static/tab/tab_scan_pressed.png


BIN
static/tab/tab_video_normal.png


BIN
static/tab/tab_video_pressed.png


+ 9 - 1
store/index.js

@@ -74,10 +74,18 @@ const store = new Vuex.Store({
 				'customIcon': false,
 			},
 			{
-				'iconPath': "/static/tab/tab_scan_normal.png",
+				"pagePath": "/pages/promo/index",
+				"iconPath": "/static/tab/tab_promo_normal.png",
+				"selectedIconPath": "/static/tab/tab_promo_pressed.png",
+				"text": "促销",
+				'customIcon': false,
+			},
+			{
+				'iconPath': "/static/tab/tab_scan_pressed.png",
 				'selectedIconPath': "/static/tab/tab_scan_pressed.png",
 				'text': '扫描VIN',
 				'customIcon': false,
+				'midButton': true,
 			},
 			{
 				"pagePath": "/pages/videos/index",