فهرست منبع

Merge branch 'develop_yh49_1' of jianguan-web/repairYimatong-mini-html into master

李磊 6 ماه پیش
والد
کامیت
cfa3dd1281
100فایلهای تغییر یافته به همراه8767 افزوده شده و 1502 حذف شده
  1. 2 88
      App.vue
  2. 34 0
      api/bizParam.js
  3. 47 0
      api/cart.js
  4. 50 0
      api/purchase.js
  5. 28 17
      api/request.js
  6. 1 1
      api/rewardRule.js
  7. 47 0
      api/shop.js
  8. 16 0
      api/user.js
  9. 21 6
      api/video.js
  10. 95 30
      components/icon-items-list/icon-items-list.vue
  11. 4 2
      components/scrollBox.vue
  12. 33 0
      components/skline/sklineFooter.vue
  13. 81 0
      components/skline/sklineHeader.vue
  14. 50 0
      components/skline/sklineTemp.vue
  15. 41 0
      components/uni-authStore-popup.vue
  16. 0 101
      components/uni-badge/uni-badge.vue
  17. 171 0
      components/uni-cart-animation/uni-cart-animation.vue
  18. 94 94
      components/uni-icons/uni-icons.vue
  19. 51 0
      components/uni-pages-nav/uni-pages-nav.vue
  20. 71 0
      flex.css
  21. 12 1
      manifest.json
  22. 0 23
      package-lock.json
  23. 1 1
      package.json
  24. 165 43
      pages.json
  25. 631 224
      pages/index/index.vue
  26. 212 0
      pages/index/productItem.vue
  27. 0 0
      pages/login/login.vue
  28. 0 0
      pages/login/phoneLogin.vue
  29. 546 152
      pages/morePage/morePage.vue
  30. 1 2
      pages/personData/personData.vue
  31. 158 0
      pages/promo/index.vue
  32. 37 29
      pages/storeManage/addPerson.vue
  33. 11 48
      pages/storeManage/editAdminAuth.vue
  34. 14 46
      pages/storeManage/editIsManage.vue
  35. 6 4
      pages/storeManage/personnel.vue
  36. 7 3
      pages/storeManage/roleSetting/addRole.vue
  37. 16 6
      pages/storeManage/roleSetting/roleAuthSet.vue
  38. 25 4
      pages/storeManage/storeAuth.vue
  39. 31 17
      pages/videos/index.vue
  40. 46 29
      pages/vinInput/confirmVin.vue
  41. 6 6
      pagesA/activeDetail/index.vue
  42. 363 299
      pagesA/digitalShelf/choosePart.vue
  43. 23 16
      pagesA/digitalShelf/choosePartResult.vue
  44. 237 0
      pagesA/digitalShelf/components/otherPartItem.vue
  45. 237 0
      pagesA/digitalShelf/components/vinPartItem.vue
  46. 7 9
      pagesA/digitalShelf/orderDetail.vue
  47. 19 87
      pagesA/digitalShelf/orderList.vue
  48. 4 4
      pagesA/digitalShelf/settlementManage/settlementAyDetail.vue
  49. 4 6
      pagesA/digitalShelf/settlementManage/settlementManage.vue
  50. 4 6
      pagesA/digitalShelf/settlementManage/settlementSxDetail.vue
  51. 0 2
      pagesA/digitalShelf/settlementRecord/settlementDetail.vue
  52. 5 3
      pagesA/digitalShelf/stockPut.vue
  53. 12 17
      pagesA/digitalShelf/stockPutDetail.vue
  54. 9 11
      pagesA/digitalShelf/tempOrderList/orderDetail.vue
  55. 8 5
      pagesA/digitalShelf/tempOrderList/tempOrderList.vue
  56. 8 2
      pagesA/qualityPolicy/creatOrder.vue
  57. 2 1
      pagesA/queryByCode/confirmQh.vue
  58. 58 42
      pagesA/queryByCode/queryByCode.vue
  59. 0 0
      pagesA/static/icon_shopping@3x.png
  60. 807 0
      pagesB/cart/index.vue
  61. 342 0
      pagesB/cart/productitem.vue
  62. 191 0
      pagesB/components/chooseProductItemSkline.vue
  63. 180 0
      pagesB/components/productItemSkline.vue
  64. 309 0
      pagesB/coupon.vue
  65. 468 0
      pagesB/procureOrder.vue
  66. 305 0
      pagesB/procureOrderList.vue
  67. 244 0
      pagesB/promoProduct.vue
  68. 1 1
      pagesB/redPacket.vue
  69. 153 0
      pagesB/shopShow/shopShow.vue
  70. 803 0
      pagesB/shopiing/productDetail.vue
  71. 364 0
      pagesB/shopiing/searchProduct.vue
  72. 474 0
      pagesB/shopiing/shopProduct.vue
  73. BIN
      pagesB/static/add.png
  74. BIN
      pagesB/static/arrow-left.png
  75. BIN
      pagesB/static/cart.png
  76. 0 0
      pagesB/static/hbheader.jpg
  77. BIN
      pagesB/static/search.png
  78. 12 7
      pagesB/stockQuery/stockQuery.vue
  79. 6 6
      pagesB/videos/detail.vue
  80. 246 0
      pagesB/videos/index.vue
  81. BIN
      static/arrow-left.png
  82. BIN
      static/banner1.jpg
  83. BIN
      static/banner1.png
  84. BIN
      static/banner2.jpg
  85. BIN
      static/banner2.png
  86. BIN
      static/def_imgs.png
  87. BIN
      static/hot.png
  88. BIN
      static/icon_delete@3x.png
  89. 0 1
      static/iconfont/iconfont.css
  90. BIN
      static/kongCart.png
  91. BIN
      static/nav_icon1.jpg
  92. BIN
      static/nav_icon2.jpg
  93. BIN
      static/nav_icon3.jpg
  94. BIN
      static/nav_icon4.jpg
  95. BIN
      static/tab/tab_cart_normal.png
  96. BIN
      static/tab/tab_cart_pressed.png
  97. BIN
      static/tab/tab_home_normal.png
  98. BIN
      static/tab/tab_home_pressed.png
  99. BIN
      static/tab/tab_personal_normal.png
  100. BIN
      static/tab/tab_personal_pressed.png

+ 2 - 88
App.vue

@@ -1,7 +1,7 @@
 <script>
 	export default {
 		globalData: {
-			// baseUrl: 'http://192.168.2.103:9110/saas/clz/', // 本地
+			// baseUrl: 'http://192.168.2.113:9110/saas/clz/', // 本地
 			baseUrl: 'https://md.test.zyucgj.com/saas/clz/', // 预发布
 			// baseUrl: 'https://car.zyucgj.com/saas/clz/' // 生产
 		},
@@ -41,6 +41,7 @@
 <style lang="scss">
 	@import "uview-ui/index.scss";
 	@import "/static/iconfont/iconfont.css";
+	@import 'flex.css';
 	/*每个页面公共css */
 	page {
 		width: 100%;
@@ -104,91 +105,4 @@
 		box-shadow: 1px 1px 3px #EEEEEE;
 		font-size: 28upx;
 	}
-	/* 显示一行省略号 */
-	.ellipsis-one{
-		white-space: nowrap;
-		text-overflow: ellipsis;
-		overflow: hidden;
-		word-break: break-all;
-	}
-	/* 显示两行,省略号 */
-	.ellipsis-two{
-		overflow: hidden;
-		text-overflow: ellipsis;
-		display: -webkit-box;
-		-webkit-line-clamp: 2;
-		line-clamp: 2;
-		-webkit-box-orient: vertical;
-	}
-	/* felx布局 */
-	.flex{
-		display: -webkit-flex; /* Chrome 21+, Safari 6.1+, iOS Safari 7+, Opera 15/16 */  
-		display: -moz-flex; /* Firefox 18+ */  
-		display: -ms-flexbox; /* IE 10 */  
-		display: flex; /* Chrome 29+, Firefox 22+, IE 11+, Opera 12.1/17/18, Android 4.4+ */
-	}
-	/*伸缩流方向*/
-	.flex_column{
-	    -webkit-box-orient: vertical;
-	    -ms-flex-direction: column;
-	    -webkit-flex-direction: column;
-	    flex-direction: column;
-	}
-	/*主轴对齐*/
-	.justify_center{
-	    -webkit-box-pack: center;
-	    -ms-flex-pack: center;
-	    -webkit-justify-content: center;
-	    justify-content: center;
-	}
-	.justify_end{
-	    -webkit-box-pack: end;
-	    -ms-flex-pack: end;
-	    -webkit-justify-content: flex-end;
-	    justify-content: flex-end;
-	}
-	.justify_between{
-	    -webkit-box-pack: justify;
-	    -ms-flex-pack: justify;
-	    -webkit-justify-content: space-between;
-	    justify-content: space-between;
-	}
-	/*侧轴对齐*/
-	.align_start{
-	    -webkit-box-align: start;
-	    -ms-flex-align: start;
-	    -webkit-align-items: flex-start;
-	    align-items: flex-start;
-	}
-	.align_end{
-	    -webkit-box-align: end;
-	    -ms-flex-align: end;
-	    -webkit-align-items: flex-end;
-	    align-items: flex-end;
-	}
-	.align_center{
-	    -webkit-box-align: center;
-	    -ms-flex-align: center;
-	    -webkit-align-items: center;
-	    align-items: center;
-	}
-	.align_baseline{
-	    -webkit-box-align: baseline;
-	    -ms-flex-align: baseline;
-	    -webkit-align-items: baseline;
-	    align-items: baseline;
-	}
-	/*伸缩性*/
-	.flex_auto{
-	    -webkit-box-flex: 1;
-	    -ms-flex: auto;
-	    -webkit-flex: auto;
-	    flex: auto;
-	}
-	.flex_1{
-	    -webkit-box-flex: 1;
-	    -ms-flex: 1;
-	    -webkit-flex: 1;
-	    flex: 1;    
-	}
 </style>

+ 34 - 0
api/bizParam.js

@@ -0,0 +1,34 @@
+import request from './request';
+ 
+// 商城是否开启
+export function getShopStatus(params) {
+	return request({
+	  url: `bizParam/findMallParam`,
+	  method: 'post',
+	  data: params
+	})
+}
+// 员工是否开启商城列表
+export function getShopUserParamList(params) {
+	return request({
+	  url: `bizParam/findMallUserParam`,
+	  method: 'post',
+	  data: params
+	})
+}
+// 查询本人商城状态
+export function getShopUserParam(params) {
+	return request({
+	  url: `bizParam/findMyMallParam`,
+	  method: 'post',
+	  data: params
+	})
+}
+// 更新人员商城状态
+export function updateShopUserParam(params) {
+	return request({
+	  url: `bizParam/updateMallUserParam`,
+	  method: 'post',
+	  data: params
+	})
+}

+ 47 - 0
api/cart.js

@@ -0,0 +1,47 @@
+import request from './request';
+
+// 获取购物车列表
+export function getCartList(params) {
+	return request({
+	  url: `shopCart/queryList/${params.pageNo}/${params.pageSize}`,
+	  method: 'post',
+	  data: params
+	})
+}
+
+// 添加商品到购物车
+export function addCart(params) {
+	return request({
+	  url: `shopCart/addProduct`,
+	  method: 'post',
+	  data: params
+	})
+}
+
+// 修改购物车商品数量
+export function updateCart(params) {
+	return request({
+	  url: `shopCart/updateProduct`,
+	  method: 'post',
+	  data: params
+	})
+}
+
+// 删除购物车商品
+export function deleteCart(params) {
+	return request({
+	  url: `shopCart/batchDelProduct`,
+	  method: 'post',
+	  data: params
+	})
+}
+
+// 购物车总数
+export function getCartCount(params) {
+	return request({
+	  url: `shopCart/productCount`,
+	  method: 'post',
+	  data: params
+	})
+}
+ 

+ 50 - 0
api/purchase.js

@@ -0,0 +1,50 @@
+import request from './request';
+
+// 促销活动采购单保存
+export const purchaseSave = params => {
+  return request({
+    url: `purchase/create`,
+    method: 'post',
+    data: params
+  })
+}
+// 采购单校验
+export const purchaseCheck = params => {
+  return request({
+    url: `purchase/createVerify`,
+    method: 'post',
+    data: params
+  })
+}
+// 采购单-分页
+export const purchaseQueryPage = params => {
+  return request({
+    url: `purchase/queryPage/${params.pageNo}/${params.pageSize}`,
+    method: 'post',
+    data: params
+  })
+}
+// 采购单产品明细-分页
+export const purchaseQueryDetailPage = params => {
+  return request({
+    url: `purchase/queryDetailPage/${params.pageNo}/${params.pageSize}`,
+    method: 'post',
+    data: params
+  })
+}
+// 采购单-取消
+export const purchaseCancel = params => {
+  return request({
+    url: `purchase/cancel`,
+    method: 'post',
+    data: params
+  })
+}
+// 采购单-收货
+export const purchaseReceive = params => {
+  return request({
+    url: `purchase/receive`,
+    method: 'post',
+    data: params
+  })
+}

+ 28 - 17
api/request.js

@@ -28,30 +28,41 @@ function request(options,hasNoToken) {
     _obj.url = baseUrl + _obj.url;
     _obj.method = _obj.method.toUpperCase();
     _obj.success = function(res) {
+	  console.log(res.data)
+	  const isCloseUser = res.data.status == 500&&(res.data.message == 0||res.data.message == -1)
+	  const closeMsg = res.data.message == 0 ? '用户已停用' : '用户已注销'
+	  const showCommonTips = uni.getStorageSync('showCommonTips')
+	  
       if (_obj.url.indexOf('checkLogin') > -1) {
-	    console.log(res.data,'res.data checkLogin')
         resolve(res.data);
-      } else if (res.data.status === '900010') {
-        setTimeout(function() {
-          wx.showToast({
-            title: '登录已过期,请重新登录',
-            icon: 'none',
-            duration: 1000
-          });
-        }, 10);
-		setTimeout(function() {
-		  const currentRoute = getRoutePath();
-		  uni.setStorageSync('token','')
-		  const url = `/pages/login/login?lanuch=${currentRoute.lanuch}&path=` + encodeURIComponent(currentRoute.url);
-		  uni.reLaunch({
-		  	url: url
-		  })
-		}, 1000);
+      } else if (res.data.status === '900010' || isCloseUser) {
+		if(!showCommonTips){
+			uni.setStorageSync('showCommonTips',1)
+			uni.showModal({
+				title: '提示',
+				content: isCloseUser ? closeMsg : '登录已过期,请重新登录',
+				confirmText: '知道了',
+				showCancel: false,
+				success(res) {
+					if(res.confirm){
+						uni.removeStorageSync('token')
+						uni.removeStorageSync('userInfo')
+						uni.removeStorageSync('permCodes')
+						uni.removeStorageSync('userPhoto')
+						uni.removeStorageSync('showCommonTips')
+						uni.reLaunch({
+							url: `/pages/login/login`
+						})
+					}
+				}
+			})
+		}
       } else {
         resolve(res.data);
       }
     };
     _obj.fail = function(err) {
+	  console.log(err)
       reject(err);
     };
     _obj.complete = function() {};

+ 1 - 1
api/rewardRule.js

@@ -28,4 +28,4 @@ export const getRewardRollList = (params) => {
     data: params,
     method: 'post'
   })
-}
+}

+ 47 - 0
api/shop.js

@@ -0,0 +1,47 @@
+import request from './request';
+
+// 获取商品列表
+export function getShopProductList(params) {
+  return request({
+    url: `shopProduct/queryProductPage/${params.pageNo}/${params.pageSize}`,
+    method: 'post',
+    data: params
+  },true)
+}
+
+// 获取商品详情
+export function getShopDetail(params) {
+	return request({
+	  url: `shopProduct/queryBySn`,
+	  method: 'post',
+	  data: params
+	},true)
+}
+
+// 获取商品分类
+export function getShopCategory(params) {
+	return request({
+	  url: `shopCategory/queryList`,
+	  method: 'post',
+	  data: params
+	},true)
+}
+
+// 获取商品分类详情
+export function getShopCategoryDetail(params) {
+	return request({
+	  url: `shopCategory/queryBySn/${params.categorySn}`,
+	  method: 'post',
+	  data: params
+	},true)
+}
+
+// 获取商品分类扩展
+export function getShopCategoryExt(params) {
+  return request({
+    url: `shopCategory/queryExtBySn`,
+    method: 'post',
+    data: params
+  },true)
+}
+ 

+ 16 - 0
api/user.js

@@ -37,4 +37,20 @@ export const getStore = (token) => {
     url: 'getStore',
     method: 'get'
   })
+}
+// 促销活动优惠券-分页
+export const ticketQueryList = params => {
+  return request({
+    url: `ticket/queryList/${params.pageNo}/${params.pageSize}`,
+    method: 'post',
+    data: params
+  })
+}
+// 促销活动优惠券-总数
+export const ticketQueryCount = params => {
+  return request({
+    url: `ticket/getAllTicketInfo`,
+    method: 'post',
+    data: params
+  })
 }

+ 21 - 6
api/video.js

@@ -1,19 +1,34 @@
 import request from './request';
 
 // 首页轮播图
-export const promoTerminalList = params => {
+export const shopBannerList = params => {
   return request({
-    url: `promoTerminal/queryByDealerSn/${params.sn}`,
-    method: 'get',
-    data: ''
+    url: `shopBanner/queryList`,
+    method: 'post',
+    data: params
+  })
+}
+// 轮播图详情信息
+export const shopBannerDetail = params => {
+  return request({
+    url: `shopBanner/context`,
+	data: params,
+    method: 'post',
+  })
+}
+// 促销活动列表-分页
+export const promoTerminalListByPage = params => {
+  return request({
+    url: `shopPromo/queryPage/${params.pageNo}/${params.pageSize}`,
+    method: 'post',
+    data: params
   })
 }
 // 活动详情
 export const promoTerminalDetail = params => {
   return request({
-    url: `promoTerminal/findBySn/${params.sn}`,
+    url: `shopPromo/findBySn/${params.sn}`,
     method: 'get',
-    data: ''
   })
 }
 // 视频列表

+ 95 - 30
components/icon-items-list/icon-items-list.vue

@@ -1,11 +1,12 @@
 <template>
 	<div class="icon-items-list" :class="'icon-items-list-'+type">
-		<div class="icon-items-icons" v-for="(item,index) in list" :key="item.id" :style="{width:itemWidth}" @click="toPage(item,index)">
-			<div class="icon-items-imgse" >
-				<image class="imgs" :class="item.auth?'':'uni-img-gray'" :fade-show='true' :src="item.icon"></image>
+		<div class="icon-items-icons" :style="{width:itemWidth,marginBottom:circle?'5px':'0px'}" v-for="(item,index) in list" :key="item.id" @click="toPage(item,index)">
+			<div class="icon-items-imgse" :class="circle?'icon-items-imgse-circle':''" >
+				<image class="imgs" v-if="type=='img'" :class="item.auth?'':'uni-img-gray'" :fade-show='true' :src="item.icon||'/static/def_imgs.png'"></image>
+				<u-icon class="icons" v-if="type=='icon'" :color="item.color" :size="iconSize" :name="item.icon" custom-prefix="custom-icon"></u-icon>
 				<u-badge class="tag" :absolute="false" type="error"  v-if="item.nums" :count="item.nums"></u-badge>
 			</div>
-			<div class="icon-items-text">{{item.name.slice(0,14)}}</div>
+			<div class="icon-items-text" :class="circle?'icon-items-text-circle':''">{{item.name}}</div>
 		</div>
 		<div class="nodata" v-if="list.length==0">
 			<u-empty :text="noDataText" mode="list"></u-empty>
@@ -14,6 +15,7 @@
 </template>
 
 <script>
+	import { toAuthStore } from "@/utils/index.js"
 	export default {
 		name: "iconItemsList",
 		props:{
@@ -28,6 +30,10 @@
 				type: String,
 				default: '25%'
 			},
+			iconSize: {
+				type: Number,
+				default: 60
+			},
 			type: {
 				type: String,
 				default: 'icon'
@@ -35,6 +41,18 @@
 			noDataText: {
 				type: String,
 				default: '暂无数据'
+			},
+			isLogin: {
+				type: Boolean,
+				default: false
+			},
+			sysUserFlag: {
+				type: String,
+				default: '1'
+			},
+			circle: {
+				type: Boolean,
+				default: false
 			}
 		},
 		data() {
@@ -44,27 +62,33 @@
 		},
 		methods: {
 			toPage(item,index){
-				if(!item.auth){
-					// uni.showToast({icon: 'none',title: '您还未登录'})
+				if(this.isLogin){
+					if(item.url&&item.url!=''){
+						if(!item.ignoreAuth){
+							// 游客去认证
+							if(this.sysUserFlag == '0'){
+								toAuthStore()
+								return true
+							}
+						}
+						if(item.target == 'page'){
+							uni.navigateTo({
+								url: item.url
+							})
+						}
+						if(item.target == 'tabPage'){
+							uni.switchTab({
+								url: item.url
+							})
+						}
+						if(item.target == 'fun'){
+							this.$emit('callback',item)
+						}
+					}
+				}else{
 					uni.navigateTo({
 						url: '/pages/login/login'
 					})
-					return
-				}
-				if(item.url&&item.url!=''){
-					if(item.target == 'page'){
-						uni.navigateTo({
-							url: item.url
-						})
-					}
-					if(item.target == 'tabPage'){
-						uni.switchTab({
-							url: item.url
-						})
-					}
-					if(item.target == 'fun'){
-						this.$emit('callback',item.url)
-					}
 				}
 			}
 		}
@@ -73,7 +97,7 @@
 
 <style lang="less">
 	.icon-items-list{
-		align-items: center;
+		align-items: flex-start;
 		display: flex;
 		flex-wrap: wrap;
 		.nodata{
@@ -83,16 +107,58 @@
 			color: #999999;
 		}
 	}
-	.icon-items-list-icon{
+	.icon-items-list-img{
+		.icon-items-icons{
+			margin-bottom: 5px;
+			.icon-items-text{
+				font-size: 24upx;
+				color: #333;
+			}
+			.icon-items-text-circle{
+				font-size: 28upx;
+				color: #333;
+			}
+		}
 		.icon-items-imgse{
 			position: relative;
+			width: 60upx;
+			height: 60upx;
+			margin-bottom: 6upx;
+			display:flex;
+			align-items: center;
+			justify-content: center;
+			border-radius:10upx;
+			overflow: hidden;
+			.imgs{
+				width: 100%;
+				height: 100%;
+			}
+			.tag{
+				position: absolute;
+				top: -5upx;
+				right: -5upx;
+			}
+		}
+		.icon-items-imgse-circle{
+			border-radius:100rpx;
+			overflow: hidden;
 			width: 100upx;
 			height: 100upx;
-			margin-bottom: 6upx;
+			background: linear-gradient(#fff,#eee);
 			.imgs{
-				width: 100upx;
-				height: 100upx;
+				width: 80%;
+				height: 80%;
 			}
+		}
+	}
+	.icon-items-list-icon{
+		.icon-items-imgse{
+			position: relative;
+			width: 100upx;
+			margin-bottom: 6upx;
+			display:flex;
+			align-items: center;
+			justify-content: center;
 			.tag{
 				position: absolute;
 				top: -5upx;
@@ -100,13 +166,12 @@
 			}
 		}
 		.icon-items-text{
-			font-size: 28upx;
-			color: #666666;
+			font-size: 24upx;
+			color: #333;
 		}
 	}
 	.icon-items-icons{
 		text-align: center;
-		margin: 20upx 0;
 		display: flex;
 		align-items: center;
 		flex-direction: column;

+ 4 - 2
components/scrollBox.vue

@@ -35,7 +35,9 @@ export default {
 		};
 	},
 	mounted() {
-		this.prizeScroll();
+		if(this.list.length){
+			this.prizeScroll();
+		}
 	},
 	methods: {
 		getHeight(Class) {
@@ -43,7 +45,7 @@ export default {
 			query
 				.selectAll(Class)
 				.boundingClientRect(data => {
-					this.height = data[0].height;
+					this.height = data[0] ? data[0].height : 0;
 				})
 				.exec();
 		},

+ 33 - 0
components/skline/sklineFooter.vue

@@ -0,0 +1,33 @@
+<template>
+	<div class="skline_footer">
+		<view class="skline_footer-content">
+			<slot></slot>
+		</view>
+		<view :style="{height:safeAreaBottom+'px'}"></view>
+	</div>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				safeAreaBottom: 0
+			}
+		},
+		mounted() {
+			uni.getSystemInfo({
+				success: (res) => {
+					this.safeAreaBottom = res.safeAreaInsets.bottom
+				}
+			})
+		}
+	}
+</script>
+
+<style lang="less">
+	.skline_footer {
+		 .skline_footer-content{
+			 height: 100rpx;
+		 }
+	}
+</style>

+ 81 - 0
components/skline/sklineHeader.vue

@@ -0,0 +1,81 @@
+<template>
+	<view class="scrollPage-header">
+		<view :style="{height:statusBarHeight+'px'}"></view>
+		<view class="header-title-box">
+			<view class="header-left" @click="goBack">
+				<uni-icons type="arrowleft" size="20"></uni-icons>
+				<text>{{isShare?'首页':'返回'}}</text>
+			</view>
+			<view class="header-title"><text :max-lines="1" overflow="ellipsis">{{title}}</text></view>
+			<view class="header-right">
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "sklineHeader",
+		props: {
+			title: {
+				type: String,
+				default: '标题'
+			},
+			isShare: {
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+				statusBarHeight: 0,
+			};
+		},
+		created() {
+			this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
+		},
+		methods: {
+			goBack() {
+				if(this.isShare){
+					uni.reLaunch({
+						url: '/pages/index/index'
+					})
+				}else{
+					uni.navigateBack()
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+	.scrollPage-header{
+		z-index: 1;
+		.header-title-box{
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			padding: 0 10px;
+			height: 44px;
+			background-color: #FFFFFF;
+			border-bottom: 1px solid #e8e8e8;
+			.header-title{
+				font-size: 16px;
+				color: #333333;
+				max-width: 70%;
+			}
+			.header-left{
+				display: flex;
+				align-items: center;
+				text{
+					font-size: 14px;
+					color: #333333;
+					margin-left: 2px;
+				}
+			}
+			.header-right{
+				width: 50px;
+			}
+		}
+	}
+</style>

+ 50 - 0
components/skline/sklineTemp.vue

@@ -0,0 +1,50 @@
+<template>
+	<view class="empty-bar">
+		<image mode="aspectFit" :style="{width:iconSize+'px',height:iconSize+'px'}" :src="src"></image>
+		<view>{{text}}</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "sklineTemp",
+		props: {
+			src: {
+				type: String,
+				default: '/static/nodata.png'
+			},
+			text: {
+				type: String,
+				default: '暂无数据'
+			},
+			iconSize: {
+				type: Number,
+				default: 100
+			}
+		},
+		data() {
+			return {
+
+			};
+		}
+	}
+</script>
+
+<style lang="less">
+	.empty-bar{
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		padding: 20px 0;
+		image{
+			width: 100px;
+			height: 100px;
+		}
+		view{
+			font-size: 14px;
+			color: #999999;
+			margin-top: 10px;
+		}
+	}
+</style>

+ 41 - 0
components/uni-authStore-popup.vue

@@ -0,0 +1,41 @@
+<template>
+	<!-- 去认证弹框 -->
+	<u-popup v-model="showPopup" mode="center" :border-radius="20" closeable @close="close">
+		<view style="background-color: #fff;padding: 1rem;">
+			<u-image width="533" height="415" src="/static/authimg.jpg"></u-image>
+			<view style="padding-top:1rem;" class="flex justify_center">
+				<u-button @click="toAuthStore()" shape="circle" :custom-style="{background:'#066cff',color:'#fff',width:'350rpx'}">开始认证</u-button>
+			</view>
+		</view>
+	</u-popup>
+</template>
+
+<script>
+	export default {
+		name:"uni-authStore-popup",
+		data() {
+			return {
+				showPopup: false
+			};
+		},
+		methods: {
+			close(){
+				this.showPopup = false
+			},
+			open(){
+				this.showPopup = true
+			},
+			// 去认证
+			toAuthStore(){
+				this.close()
+				uni.navigateTo({
+					url: '/pages/storeManage/storeAuth'
+				})
+			},
+		},
+	}
+</script>
+
+<style>
+
+</style>

+ 0 - 101
components/uni-badge/uni-badge.vue

@@ -1,101 +0,0 @@
-<template>
-  <text v-if="text" :class="inverted ? 'uni-badge-' + type + ' uni-badge--' + size + ' uni-badge-inverted' : 'uni-badge-' + type + ' uni-badge--' + size"
-    class="uni-badge" @click="onClick()">{{ text }}</text>
-</template>
-
-<script>
-  export default {
-    name: 'UniBadge',
-    props: {
-      type: {
-        type: String,
-        default: 'default'
-      },
-      inverted: {
-        type: Boolean,
-        default: false
-      },
-      text: {
-        type: String,
-        default: ''
-      },
-      size: { // small.normal
-        type: String,
-        default: 'normal'
-      }
-    },
-    methods: {
-      onClick() {
-        this.$emit('click')
-      }
-    }
-  }
-</script>
-
-<style lang="scss">
-  $bage-size:12px;
-  $bage-small:scale(0.8);
-
-  .uni-badge {
-    font-family: 'Helvetica Neue', Helvetica, sans-serif;
-    box-sizing: border-box;
-    font-size: $bage-size;
-    line-height: 1;
-    display: inline-block;
-    padding: 3px 6px;
-    color: $uni-text-color;
-    border-radius: 100px;
-    background-color: $uni-bg-color-hover;
-
-    &.uni-badge-inverted {
-      padding: 0 5px 0 0;
-      color: $uni-text-color-grey;
-      background-color: transparent;
-    }
-
-    &-primary {
-      color: $uni-text-color-inverse;
-      background-color: $uni-color-primary;
-
-      &.uni-badge-inverted {
-        color: $uni-color-primary;
-        background-color: transparent
-      }
-    }
-
-    &-success {
-      color: $uni-text-color-inverse;
-      background-color: $uni-color-success;
-
-      &.uni-badge-inverted {
-        color: $uni-color-success;
-        background-color: transparent
-      }
-    }
-
-    &-warning {
-      color: $uni-text-color-inverse;
-      background-color: $uni-color-warning;
-
-      &.uni-badge-inverted {
-        color: $uni-color-warning;
-        background-color: transparent
-      }
-    }
-
-    &-error {
-      color: $uni-text-color-inverse;
-      background-color: $uni-color-error;
-
-      &.uni-badge-inverted {
-        color: $uni-color-error;
-        background-color: transparent
-      }
-    }
-
-    &--small {
-      transform: $bage-small;
-      transform-origin: center center;
-    }
-  }
-</style>

+ 171 - 0
components/uni-cart-animation/uni-cart-animation.vue

@@ -0,0 +1,171 @@
+<template>
+	<!-- 加入购物车动画 -->
+	<view>
+		<view class="good_box" v-show="!hide_good_box" :style="[{left:bus_x+'px', top:bus_y+'px', background:PrimaryColor}]"></view>
+	</view>
+</template>
+
+<script>
+    export default {
+        data() {
+            return {
+                PrimaryColor: '#fe461d', // 背景色
+                hide_good_box: true,
+                bus_x:0,
+                bus_y:0,
+            }
+        },
+        created(e) {
+            // 默认掉落坐标
+            this.busPos = {};
+            this.busPos['x'] = uni.getSystemInfoSync().windowWidth - 140;
+            this.busPos['y'] = uni.getSystemInfoSync().windowHeight + 100;
+        },
+        methods:{
+            //点击商品触发的事件
+            touchOnGoods: function(e,busPos) {
+                console.log(e, '进入动画')
+                if(busPos){//是否自定义掉落坐标
+                    this.busPos = busPos
+                }
+                // 如果good_box正在运动
+                if (!this.hide_good_box) return;
+                this.finger = {};
+                var topPoint = {};
+                var flag = false; //false:倒序,true:正序
+                this.finger["x"] = e.detail.clientX || e.touches[0].clientX; //点击的位置
+                this.finger["y"] = e.detail.clientY || e.touches[0].clientY;
+    
+                if (this.finger['y'] < this.busPos['y']) {
+                    topPoint['y'] = this.finger['y'] - 150;
+                } else {
+                    topPoint['y'] = this.busPos['y'] - 150;
+                }
+                topPoint['x'] = Math.abs(this.finger['x'] - this.busPos['x']) / 2;
+    
+                if (this.finger['x'] > this.busPos['x']) {
+                    topPoint['x'] = (this.finger['x'] - this.busPos['x']) / 2 + this.busPos['x'];
+                    console.log("0123")
+                    this.linePos = this.bezier([this.busPos, topPoint, this.finger], 30);
+                    flag = false
+                } else { //
+                    topPoint['x'] = (this.busPos['x'] - this.finger['x']) / 2 + this.finger['x'];
+                    console.log("123")
+                    this.linePos = this.bezier([this.finger, topPoint, this.busPos], 30);
+                    flag = true
+                }
+                this.startAnimation(flag);
+            },
+            //开始动画
+            startAnimation: function(flag) {
+                // uni.vibrateShort(); //震动方法
+                var that = this,
+                    bezier_points = that.linePos['bezier_points'],
+                    index = bezier_points.length;
+                console.log(bezier_points, 'bezier_points')
+                this.hide_good_box = false,
+                this.bus_x = that.finger['x']
+                this.bus_y = that.finger['y']
+                if (!flag) {
+                    index = bezier_points.length;
+                    this.timer = setInterval(function() {
+                        index--;
+                        that.bus_x = bezier_points[index]['x']
+                        that.bus_y = bezier_points[index]['y']
+                        if (index <= 1) {
+                            clearInterval(that.timer);
+                            that.hide_good_box = true
+							that.$emit('animationfinish')
+                        }
+                    }, 22);
+                } else {
+                    index = 0;
+                    this.timer = setInterval(function() {
+                        index++;
+                        that.bus_x = bezier_points[index]['x']
+                        that.bus_y = bezier_points[index]['y']
+                        if (index >= 28) {
+                            clearInterval(that.timer);
+                            that.hide_good_box = true
+							that.$emit('animationfinish')
+                        }
+                    }, 22);
+                }
+            },
+            bezier: function(points, times) {
+                // 0、以3个控制点为例,点A,B,C,AB上设置点D,BC上设置点E,DE连线上设置点F,则最终的贝塞尔曲线是点F的坐标轨迹。
+                // 1、计算相邻控制点间距。
+                // 2、根据完成时间,计算每次执行时D在AB方向上移动的距离,E在BC方向上移动的距离。
+                // 3、时间每递增100ms,则D,E在指定方向上发生位移, F在DE上的位移则可通过AD/AB = DF/DE得出。
+                // 4、根据DE的正余弦值和DE的值计算出F的坐标。
+                // 邻控制AB点间距
+                var bezier_points = [];
+                var points_D = [];
+                var points_E = [];
+                const DIST_AB = Math.sqrt(Math.pow(points[1]['x'] - points[0]['x'], 2) + Math.pow(points[1]['y'] - points[0]['y'], 2));
+                // 邻控制BC点间距
+                const DIST_BC = Math.sqrt(Math.pow(points[2]['x'] - points[1]['x'], 2) + Math.pow(points[2]['y'] - points[1]['y'], 2));
+                // D每次在AB方向上移动的距离
+                const EACH_MOVE_AD = DIST_AB / times;
+                // E每次在BC方向上移动的距离 
+                const EACH_MOVE_BE = DIST_BC / times;
+                // 点AB的正切
+                const TAN_AB = (points[1]['y'] - points[0]['y']) / (points[1]['x'] - points[0]['x']);
+                // 点BC的正切
+                const TAN_BC = (points[2]['y'] - points[1]['y']) / (points[2]['x'] - points[1]['x']);
+                // 点AB的弧度值
+                const RADIUS_AB = Math.atan(TAN_AB);
+                // 点BC的弧度值
+                const RADIUS_BC = Math.atan(TAN_BC);
+                // 每次执行
+                for (var i = 1; i <= times; i++) {
+                    // AD的距离
+                    var dist_AD = EACH_MOVE_AD * i;
+                    // BE的距离
+                    var dist_BE = EACH_MOVE_BE * i;
+                    // D点的坐标
+                    var point_D = {};
+                    point_D['x'] = dist_AD * Math.cos(RADIUS_AB) + points[0]['x'];
+                    point_D['y'] = dist_AD * Math.sin(RADIUS_AB) + points[0]['y'];
+                    points_D.push(point_D);
+                    // E点的坐标
+                    var point_E = {};
+                    point_E['x'] = dist_BE * Math.cos(RADIUS_BC) + points[1]['x'];
+                    point_E['y'] = dist_BE * Math.sin(RADIUS_BC) + points[1]['y'];
+                    points_E.push(point_E);
+                    // 此时线段DE的正切值
+                    var tan_DE = (point_E['y'] - point_D['y']) / (point_E['x'] - point_D['x']);
+                    // tan_DE的弧度值
+                    var radius_DE = Math.atan(tan_DE);
+                    // 地市DE的间距
+                    var dist_DE = Math.sqrt(Math.pow((point_E['x'] - point_D['x']), 2) + Math.pow((point_E['y'] - point_D['y']), 2));
+                    // 此时DF的距离
+                    var dist_DF = (dist_AD / DIST_AB) * dist_DE;
+                    // 此时DF点的坐标
+                    var point_F = {};
+                    point_F['x'] = dist_DF * Math.cos(radius_DE) + point_D['x'];
+                    point_F['y'] = dist_DF * Math.sin(radius_DE) + point_D['y'];
+                    bezier_points.push(point_F);
+                }
+                return {
+                    'bezier_points': bezier_points
+                };
+            },
+        }
+    }
+</script>
+
+<style lang="scss" scoped>
+.good_box {
+    width: 20rpx;
+    height: 20rpx;
+    position: fixed;
+    border-radius: 50%;
+    overflow: hidden;
+    left: 50%;
+    top: 50%;
+    z-index: +99;
+    border: 1px solid #fff;
+    background: red;
+}
+</style>

+ 94 - 94
components/uni-icons/uni-icons.vue

@@ -59,367 +59,367 @@ export default {
 	color: #007aff;
 }
 
-.uni-icon-contact:before {
+.uni-icon-contact::before {
 	content: '\e100';
 }
 
-.uni-icon-person:before {
+.uni-icon-person::before {
 	content: '\e101';
 }
 
-.uni-icon-personadd:before {
+.uni-icon-personadd::before {
 	content: '\e102';
 }
 
-.uni-icon-contact-filled:before {
+.uni-icon-contact-filled::before {
 	content: '\e130';
 }
 
-.uni-icon-person-filled:before {
+.uni-icon-person-filled::before {
 	content: '\e131';
 }
 
-.uni-icon-personadd-filled:before {
+.uni-icon-personadd-filled::before {
 	content: '\e132';
 }
 
-.uni-icon-phone:before {
+.uni-icon-phone::before {
 	content: '\e200';
 }
 
-.uni-icon-email:before {
+.uni-icon-email::before {
 	content: '\e201';
 }
 
-.uni-icon-chatbubble:before {
+.uni-icon-chatbubble::before {
 	content: '\e202';
 }
 
-.uni-icon-chatboxes:before {
+.uni-icon-chatboxes::before {
 	content: '\e203';
 }
 
-.uni-icon-phone-filled:before {
+.uni-icon-phone-filled::before {
 	content: '\e230';
 }
 
-.uni-icon-email-filled:before {
+.uni-icon-email-filled::before {
 	content: '\e231';
 }
 
-.uni-icon-chatbubble-filled:before {
+.uni-icon-chatbubble-filled::before {
 	content: '\e232';
 }
 
-.uni-icon-chatboxes-filled:before {
+.uni-icon-chatboxes-filled::before {
 	content: '\e233';
 }
 
-.uni-icon-weibo:before {
+.uni-icon-weibo::before {
 	content: '\e260';
 }
 
-.uni-icon-weixin:before {
+.uni-icon-weixin::before {
 	content: '\e261';
 }
 
-.uni-icon-pengyouquan:before {
+.uni-icon-pengyouquan::before {
 	content: '\e262';
 }
 
-.uni-icon-chat:before {
+.uni-icon-chat::before {
 	content: '\e263';
 }
 
-.uni-icon-qq:before {
+.uni-icon-qq::before {
 	content: '\e264';
 }
 
-.uni-icon-videocam:before {
+.uni-icon-videocam::before {
 	content: '\e300';
 }
 
-.uni-icon-camera:before {
+.uni-icon-camera::before {
 	content: '\e301';
 }
 
-.uni-icon-mic:before {
+.uni-icon-mic::before {
 	content: '\e302';
 }
 
-.uni-icon-location:before {
+.uni-icon-location::before {
 	content: '\e303';
 }
 
-.uni-icon-mic-filled:before,
-.uni-icon-speech:before {
+.uni-icon-mic-filled::before,
+.uni-icon-speech::before {
 	content: '\e332';
 }
 
-.uni-icon-location-filled:before {
+.uni-icon-location-filled::before {
 	content: '\e333';
 }
 
-.uni-icon-micoff:before {
+.uni-icon-micoff::before {
 	content: '\e360';
 }
 
-.uni-icon-image:before {
+.uni-icon-image::before {
 	content: '\e363';
 }
 
-.uni-icon-map:before {
+.uni-icon-map::before {
 	content: '\e364';
 }
 
-.uni-icon-compose:before {
+.uni-icon-compose::before {
 	content: '\e400';
 }
 
-.uni-icon-trash:before {
+.uni-icon-trash::before {
 	content: '\e401';
 }
 
-.uni-icon-upload:before {
+.uni-icon-upload::before {
 	content: '\e402';
 }
 
-.uni-icon-download:before {
+.uni-icon-download::before {
 	content: '\e403';
 }
 
-.uni-icon-close:before {
+.uni-icon-close::before {
 	content: '\e404';
 }
 
-.uni-icon-redo:before {
+.uni-icon-redo::before {
 	content: '\e405';
 }
 
-.uni-icon-undo:before {
+.uni-icon-undo::before {
 	content: '\e406';
 }
 
-.uni-icon-refresh:before {
+.uni-icon-refresh::before {
 	content: '\e407';
 }
 
-.uni-icon-star:before {
+.uni-icon-star::before {
 	content: '\e408';
 }
 
-.uni-icon-plus:before {
+.uni-icon-plus::before {
 	content: '\e409';
 }
 
-.uni-icon-minus:before {
+.uni-icon-minus::before {
 	content: '\e410';
 }
 
-.uni-icon-circle:before,
-.uni-icon-checkbox:before {
+.uni-icon-circle::before,
+.uni-icon-checkbox::before {
 	content: '\e411';
 }
 
-.uni-icon-close-filled:before,
-.uni-icon-clear:before {
+.uni-icon-close-filled::before,
+.uni-icon-clear::before {
 	content: '\e434';
 }
 
-.uni-icon-refresh-filled:before {
+.uni-icon-refresh-filled::before {
 	content: '\e437';
 }
 
-.uni-icon-star-filled:before {
+.uni-icon-star-filled::before {
 	content: '\e438';
 }
 
-.uni-icon-plus-filled:before {
+.uni-icon-plus-filled::before {
 	content: '\e439';
 }
 
-.uni-icon-minus-filled:before {
+.uni-icon-minus-filled::before {
 	content: '\e440';
 }
 
-.uni-icon-circle-filled:before {
+.uni-icon-circle-filled::before {
 	content: '\e441';
 }
 
-.uni-icon-checkbox-filled:before {
+.uni-icon-checkbox-filled::before {
 	content: '\e442';
 }
 
-.uni-icon-closeempty:before {
+.uni-icon-closeempty::before {
 	content: '\e460';
 }
 
-.uni-icon-refreshempty:before {
+.uni-icon-refreshempty::before {
 	content: '\e461';
 }
 
-.uni-icon-reload:before {
+.uni-icon-reload::before {
 	content: '\e462';
 }
 
-.uni-icon-starhalf:before {
+.uni-icon-starhalf::before {
 	content: '\e463';
 }
 
-.uni-icon-spinner:before {
+.uni-icon-spinner::before {
 	content: '\e464';
 }
 
-.uni-icon-spinner-cycle:before {
+.uni-icon-spinner-cycle::before {
 	content: '\e465';
 }
 
-.uni-icon-search:before {
+.uni-icon-search::before {
 	content: '\e466';
 }
 
-.uni-icon-plusempty:before {
+.uni-icon-plusempty::before {
 	content: '\e468';
 }
 
-.uni-icon-forward:before {
+.uni-icon-forward::before {
 	content: '\e470';
 }
 
-.uni-icon-back:before,
-.uni-icon-left-nav:before {
+.uni-icon-back::before,
+.uni-icon-left-nav::before {
 	content: '\e471';
 }
 
-.uni-icon-checkmarkempty:before {
+.uni-icon-checkmarkempty::before {
 	content: '\e472';
 }
 
-.uni-icon-home:before {
+.uni-icon-home::before {
 	content: '\e500';
 }
 
-.uni-icon-navigate:before {
+.uni-icon-navigate::before {
 	content: '\e501';
 }
 
-.uni-icon-gear:before {
+.uni-icon-gear::before {
 	content: '\e502';
 }
 
-.uni-icon-paperplane:before {
+.uni-icon-paperplane::before {
 	content: '\e503';
 }
 
-.uni-icon-info:before {
+.uni-icon-info::before {
 	content: '\e504';
 }
 
-.uni-icon-help:before {
+.uni-icon-help::before {
 	content: '\e505';
 }
 
-.uni-icon-locked:before {
+.uni-icon-locked::before {
 	content: '\e506';
 }
 
-.uni-icon-more:before {
+.uni-icon-more::before {
 	content: '\e507';
 }
 
-.uni-icon-flag:before {
+.uni-icon-flag::before {
 	content: '\e508';
 }
 
-.uni-icon-home-filled:before {
+.uni-icon-home-filled::before {
 	content: '\e530';
 }
 
-.uni-icon-gear-filled:before {
+.uni-icon-gear-filled::before {
 	content: '\e532';
 }
 
-.uni-icon-info-filled:before {
+.uni-icon-info-filled::before {
 	content: '\e534';
 }
 
-.uni-icon-help-filled:before {
+.uni-icon-help-filled::before {
 	content: '\e535';
 }
 
-.uni-icon-more-filled:before {
+.uni-icon-more-filled::before {
 	content: '\e537';
 }
 
-.uni-icon-settings:before {
+.uni-icon-settings::before {
 	content: '\e560';
 }
 
-.uni-icon-list:before {
+.uni-icon-list::before {
 	content: '\e562';
 }
 
-.uni-icon-bars:before {
+.uni-icon-bars::before {
 	content: '\e563';
 }
 
-.uni-icon-loop:before {
+.uni-icon-loop::before {
 	content: '\e565';
 }
 
-.uni-icon-paperclip:before {
+.uni-icon-paperclip::before {
 	content: '\e567';
 }
 
-.uni-icon-eye:before {
+.uni-icon-eye::before {
 	content: '\e568';
 }
 
-.uni-icon-arrowup:before {
+.uni-icon-arrowup::before {
 	content: '\e580';
 }
 
-.uni-icon-arrowdown:before {
+.uni-icon-arrowdown::before {
 	content: '\e581';
 }
 
-.uni-icon-arrowleft:before {
+.uni-icon-arrowleft::before {
 	content: '\e582';
 }
 
-.uni-icon-arrowright:before {
+.uni-icon-arrowright::before {
 	content: '\e583';
 }
 
-.uni-icon-arrowthinup:before {
+.uni-icon-arrowthinup::before {
 	content: '\e584';
 }
 
-.uni-icon-arrowthindown:before {
+.uni-icon-arrowthindown::before {
 	content: '\e585';
 }
 
-.uni-icon-arrowthinleft:before {
+.uni-icon-arrowthinleft::before {
 	content: '\e586';
 }
 
-.uni-icon-arrowthinright:before {
+.uni-icon-arrowthinright::before {
 	content: '\e587';
 }
 
-.uni-icon-pulldown:before {
+.uni-icon-pulldown::before {
 	content: '\e588';
 }
 
-.uni-icon-closefill:before {
+.uni-icon-closefill::before {
 	content: '\e589';
 }
 
-.uni-icon-sound:before {
+.uni-icon-sound::before {
 	content: '\e590';
 }
 
-.uni-icon-scan:before {
+.uni-icon-scan::before {
 	content: '\e612';
 }
 </style>

+ 51 - 0
components/uni-pages-nav/uni-pages-nav.vue

@@ -0,0 +1,51 @@
+<template>
+  <div class="pagination" :class="showShadow?'showShadow':''">
+    <u-button size="mini" shape="circle" @click="goToPage(currentPage - 1)" :disabled="currentPage <= 1">上一页</u-button>
+    <text>第 {{ currentPage }} 页 / 共 {{ totalPages }} 页</text>
+    <u-button size="mini" shape="circle" @click="goToPage(currentPage + 1)" :disabled="currentPage >= totalPages">下一页</u-button>
+  </div>
+</template>
+ 
+<script>
+export default {
+  name: 'UniPagesNav',
+  props: {
+    currentPage: {
+      type: Number,
+      required: true
+    },
+    totalPages: {
+      type: Number,
+      required: true
+    },
+	showShadow: {
+      type: Boolean,
+      default: true
+    }
+  },
+  methods: {
+    goToPage(page) {
+      if (page >= 1 && page <= this.totalPages) {
+        this.$emit('pagechanged', page);
+      }
+    }
+  }
+}
+</script>
+ 
+<style scoped>
+.pagination {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  background: #fff;
+  padding: 20rpx;
+  border-radius: 20rpx;
+}
+.showShadow{
+	box-shadow: 1px 1px 5px #eee;
+}
+.pagination text {
+  margin: 0 10px;
+}
+</style>

+ 71 - 0
flex.css

@@ -0,0 +1,71 @@
+/* felx布局 */
+.flex{
+	display: -webkit-flex; /* Chrome 21+, Safari 6.1+, iOS Safari 7+, Opera 15/16 */  
+	display: -moz-flex; /* Firefox 18+ */  
+	display: -ms-flexbox; /* IE 10 */  
+	display: flex; /* Chrome 29+, Firefox 22+, IE 11+, Opera 12.1/17/18, Android 4.4+ */
+}
+/*伸缩流方向*/
+.flex_column{
+	-webkit-box-orient: vertical;
+	-ms-flex-direction: column;
+	-webkit-flex-direction: column;
+	flex-direction: column;
+}
+/*主轴对齐*/
+.justify_center{
+	-webkit-box-pack: center;
+	-ms-flex-pack: center;
+	-webkit-justify-content: center;
+	justify-content: center;
+}
+.justify_end{
+	-webkit-box-pack: end;
+	-ms-flex-pack: end;
+	-webkit-justify-content: flex-end;
+	justify-content: flex-end;
+}
+.justify_between{
+	-webkit-box-pack: justify;
+	-ms-flex-pack: justify;
+	-webkit-justify-content: space-between;
+	justify-content: space-between;
+}
+/*侧轴对齐*/
+.align_start{
+	-webkit-box-align: start;
+	-ms-flex-align: start;
+	-webkit-align-items: flex-start;
+	align-items: flex-start;
+}
+.align_end{
+	-webkit-box-align: end;
+	-ms-flex-align: end;
+	-webkit-align-items: flex-end;
+	align-items: flex-end;
+}
+.align_center{
+	-webkit-box-align: center;
+	-ms-flex-align: center;
+	-webkit-align-items: center;
+	align-items: center;
+}
+.align_baseline{
+	-webkit-box-align: baseline;
+	-ms-flex-align: baseline;
+	-webkit-align-items: baseline;
+	align-items: baseline;
+}
+/*伸缩性*/
+.flex_auto{
+	-webkit-box-flex: 1;
+	-ms-flex: auto;
+	-webkit-flex: auto;
+	flex: auto;
+}
+.flex_1{
+	-webkit-box-flex: 1;
+	-ms-flex: 1;
+	-webkit-flex: 1;
+	flex: 1;    
+}

+ 12 - 1
manifest.json

@@ -57,7 +57,18 @@
             "postcss" : true,
             "minified" : true
         },
-        "usingComponents" : true
+        "usingComponents" : true,
+		"lazyCodeLoading": "requiredComponents",
+		"rendererOptions": { 
+			"skyline": { 
+				"defaultDisplayBlock": true,
+				"defaultContentBox": true,
+				"disableABTest": true,
+				"sdkVersionBegin":"3.0.1",
+				"sdkVersionEnd": "15.255.255"
+			}
+		},
+		"styleIsolation" : "apply-shared"
     },
     "mp-alipay" : {
         "usingComponents" : true

+ 0 - 23
package-lock.json

@@ -1,23 +0,0 @@
-{
-  "name": "digitalshelf-mini-html",
-  "version": "1.0.0",
-  "lockfileVersion": 1,
-  "requires": true,
-  "dependencies": {
-    "async-validator": {
-      "version": "3.5.2",
-      "resolved": "https://registry.npmjs.org/async-validator/-/async-validator-3.5.2.tgz",
-      "integrity": "sha512-8eLCg00W9pIRZSB781UUX/H6Oskmm8xloZfr09lz5bikRpBVDlJ3hRVuxxP1SxcwsEYfJ4IU8Q19Y8/893r3rQ=="
-    },
-    "moment": {
-      "version": "2.29.3",
-      "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.3.tgz",
-      "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=="
-    }
-  }
-}

+ 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"

+ 165 - 43
pages.json

@@ -22,21 +22,6 @@
 				"navigationBarTitleText": "手机号登录"
 			}
 		},
-		{
-		    "path" : "pages/videos/index",
-		    "style" :                                                                                    
-		{
-		    "navigationBarTitleText": "视频内容",
-		    "enablePullDownRefresh": false
-		}
-		},{
-		    "path" : "pages/videos/detail",
-		    "style" :                                                                                    
-		{
-		    "navigationBarTitleText": "视频内容",
-		    "enablePullDownRefresh": false
-		}
-		},
 		{
 			"path": "pages/personData/personData",
 			"style": {
@@ -71,13 +56,19 @@
             "path" : "pages/morePage/morePage",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "更多功能",
-                "enablePullDownRefresh": false,
-				"navigationBarBackgroundColor": "#86defa"
+                "navigationBarTitleText": "",
+                "navigationStyle":"custom"
             }
             
-        }
-        ,{
+        },
+		{
+		    "path" : "pages/videos/index",
+		    "style" :                                                                                    
+			{
+				"navigationBarTitleText": "视频讲解",
+				"enablePullDownRefresh": false
+			}
+		},{
             "path" : "pages/storeManage/personnel",
             "style" :                                                                                    
             {
@@ -101,14 +92,6 @@
                 "enablePullDownRefresh": false
             }
             
-        },{
-            "path" : "pages/stockQuery/stockQuery",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "库存查询",
-                "enablePullDownRefresh": false
-            }
-            
         },
         {
             "path" : "pages/storeManage/addPerson",
@@ -136,15 +119,6 @@
                 "enablePullDownRefresh": false
             }
             
-        }
-        ,{
-            "path" : "pages/morePage/redPacket",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "红包奖励",
-                "enablePullDownRefresh": false
-            }
-            
         }
         ,{
             "path" : "pages/storeManage/editIsManage",
@@ -162,9 +136,17 @@
                 "navigationBarTitleText": "设置岗位",
                 "enablePullDownRefresh": false
             }
+        },
+        {
+        	"path" : "pages/promo/index",
+        	"style" : 
+        	{
+        		"navigationBarTitleText" : "促销活动"
+        	}
         }
     ],
-	"subPackages":[{
+	"subPackages":[
+		{
 		"root": "pagesA",
 		"pages":[
 			{
@@ -198,7 +180,14 @@
 			    "style" :                                                                                    
 			    {
 			        "navigationBarTitleText": "选择配件",
-			        "enablePullDownRefresh": false
+			        "enablePullDownRefresh": false,
+					"navigationStyle": "custom",
+					"disableScroll": true,
+					"app-plus":{
+						"bounce":"none"
+					},
+					"renderer":"skyline",
+					"componentFramework": "glass-easel"
 			    }
 			}
 			,{
@@ -334,7 +323,14 @@
 			    "style" :                                                                                    
 			    {
 			        "navigationBarTitleText": "按产品编码查询",
-			        "enablePullDownRefresh": false
+			        "enablePullDownRefresh": false,
+					"navigationStyle": "custom",
+					"disableScroll": true,
+					"app-plus":{
+						"bounce":"none"
+					},
+					"renderer":"skyline",
+					"componentFramework": "glass-easel"
 			    }
 			    
 			}
@@ -407,17 +403,140 @@
 				}
 			}
         ]
-	}],
+	},
+	{
+		"root": "pagesB",
+		"pages":[
+		{
+            "path" : "stockQuery/stockQuery",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "库存查询",
+                "enablePullDownRefresh": false
+            }
+            
+        },{
+            "path" : "redPacket",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "红包奖励",
+                "enablePullDownRefresh": false
+            }
+        },
+		{
+		    "path" : "videos/index",
+		    "style" :                                                                                    
+			{
+				"navigationBarTitleText": "视频讲解",
+				"enablePullDownRefresh": false
+			}
+		},{
+		    "path" : "videos/detail",
+		    "style" :                                                                                    
+			{
+				"navigationBarTitleText": "视频内容",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path" : "promoProduct",
+			"style" : 
+			{
+				"navigationBarTitleText" : "促销产品列表",
+				"navigationStyle": "custom",
+				"disableScroll": true,
+				"app-plus":{
+					"bounce":"none"
+				},
+				"renderer":"skyline",
+				"componentFramework": "glass-easel"
+			}
+		},
+		{
+			"path" : "coupon",
+			"style" : 
+			{
+				"navigationBarTitleText" : "优惠券"
+			}
+		},
+		{
+			"path" : "procureOrder",
+			"style" : 
+			{
+				"navigationBarTitleText" : "采购订单"
+			}
+		},
+		{
+			"path" : "procureOrderList",
+			"style" : 
+			{
+				"navigationBarTitleText" : "采购订单"
+			}
+		},
+		{
+			"path" : "shopiing/searchProduct",
+			"style" : 
+			{
+				"navigationBarTitleText" : "商品搜索",
+				"navigationStyle": "custom",
+				"disableScroll": true,
+				"renderer":"skyline",
+				"componentFramework": "glass-easel"
+			}
+		},
+		{
+			"path" : "shopiing/shopProduct",
+			"style" : 
+			{
+				"navigationBarTitleText" : "商城商品",
+				"navigationStyle": "custom",
+				"disableScroll": true,
+				"renderer":"skyline",
+				"componentFramework": "glass-easel"
+			}
+		},
+		{
+			"path" : "shopiing/productDetail",
+			"style" : 
+			{
+				"navigationBarTitleText" : "商品详情",
+				"navigationStyle": "custom"
+			}
+		},
+        {
+        	"path" : "cart/index",
+        	"style" : 
+        	{
+        		"navigationBarTitleText" : "购物车",
+				"navigationStyle": "custom",
+				"disableScroll": true,
+				"app-plus":{
+					"bounce":"none"
+				},
+				"renderer":"skyline",
+				"componentFramework": "glass-easel"
+        	}
+        },
+        {
+        	"path" : "shopShow/shopShow",
+        	"style" : 
+        	{
+        		"navigationBarTitleText" : "商城显示设置"
+        	}
+        }
+		]
+	}
+	],
 	"preloadRule": {
 		"pages/index/index": {
 			"network": "all",
-			"packages": ["pagesA"]
+			"packages": ["pagesA","pagesB"]
 		}
 	},
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "uni-app",
-		"navigationBarBackgroundColor": "#F8F8F8",
+		"navigationBarBackgroundColor": "#ffffff",
 		"backgroundColor": "#F8F8F8"
 	},
 	"tabBar": {
@@ -428,6 +547,9 @@
 		"list": [{
 				"pagePath": "pages/index/index"
 			},
+			{
+				"pagePath": "pages/promo/index"
+			},
 			{
 				"pagePath": "pages/videos/index"
 			},

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 631 - 224
pages/index/index.vue


+ 212 - 0
pages/index/productItem.vue

@@ -0,0 +1,212 @@
+<template>
+	<view
+	class="product-list"
+	>
+		<view 
+		class="product-item" 
+		:style="{width:itemWidth+'px',marginTop:gap+'px'}"
+		v-for="(item,index) in list"
+	    :key="item.id" @click="toDetail(item)">
+			<view>
+				<image mode="aspectFit" :src="item.productMsg ? item.productMsg+'?x-oss-process=image/resize,p_30':'/static/def_imgs.png'" style="height: 140px;width: 100%;"></image>
+				<view class="back-price" v-if="isLogin&&sysUserFlag == '1'&&item.dealerScopeFlag==0">售罄</view>
+				<view class="product-code"><text class="ellipsis-one" overflow="ellipsis">{{item.productCode}}</text></view>
+			</view>
+			<view>
+				<view class="product-name ellipsis-two">{{item.productName}}</view>
+				<view class="product-guige" v-if="!!item.productOrigCode"><text class="ellipsis-two" max-lines="2" overflow="ellipsis">{{item.productOrigCode}}</text></view>
+				<view class="product-button">
+					<view class="price-txt" v-if="isLogin&&sysUserFlag == '1'">
+						¥<text>{{item.priceStr[0]}}</text>.{{item.priceStr[1]}}
+					</view>
+					<view class="price-txt" v-else>
+						¥***
+					</view>
+					<view class="flex align_center rebate-tag" v-if="isLogin&&item.promoType=='BUY_PROD_GIVE_VALID'">
+						返<text>{{item.resultValue}}</text>元
+					</view>
+					<view class="flex align_center rebate-tag" v-if="isLogin&&item.promoType=='BUY_PROD_GIVE_PROD'">
+						买{{item.conditionValue}}赠{{item.resultValue}}
+					</view>
+					<view class="flex align_center tejia-tag" v-if="isLogin&&item.promoType=='PROMO_PROD'">
+						特价<text>¥{{item.orginPrice}}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { toAuthStore, toLogin } from "@/utils/index.js"
+	export default {
+		name: 'productItem',
+		props: {
+			list: {
+				type: Array,
+				default: () => []
+			},
+			index:{
+				type: [Number,String],
+				default: 0
+			},
+			gap:{
+				type: [Number,String],
+				default: 10
+			},
+			itemWidth:{
+				type: [Number,String],
+				default: 0
+			},
+			isLogin: {
+				type: Boolean,
+				default: false
+			},
+			sysUserFlag:{
+				type: String,
+				default: '1'
+			}
+		},
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			toDetail(item){
+				if(this.isLogin){
+					// 游客去认证
+					if(this.sysUserFlag == '0'){
+						toAuthStore()
+						return true
+					}
+				}else{
+					toLogin()
+					return true
+				}
+				uni.navigateTo({
+					url:'/pagesB/shopiing/productDetail?sn='+item.shopProductSn
+				})
+				this.$emit('detail',item)
+			},
+		},
+	}
+</script>
+
+<style lang="less">
+/* 显示一行省略号 */
+.ellipsis-one{
+	white-space: nowrap;
+	text-overflow: ellipsis;
+	overflow: hidden;
+	word-break: break-all;
+}
+/* 显示两行,省略号 */
+.ellipsis-two{
+	overflow: hidden;
+	text-overflow: ellipsis;
+	display: -webkit-box;
+	-webkit-line-clamp: 2;
+	line-clamp: 2;
+	-webkit-box-orient: vertical;
+}
+.product-list{
+	display:flex;
+	flex-wrap: wrap;
+	justify-content: space-between;
+	padding: 0;
+	width: 100%;
+}
+.product-item{
+	background: #ffffff;
+	border-radius: 10upx;
+	border: 1px solid #eee;
+	width: 48%;
+	margin: 10px 0 0 0;
+	display: flex;
+	flex-direction: column;
+	.price-txt{
+		color: red;
+		display: flex;
+		align-items: baseline;
+		font-size: 12px;
+		text{
+			font-size: 36rpx;
+		}
+	}
+	> view{
+		&:first-child{
+			position: relative;
+			overflow: hidden;
+			.product-code{
+				color: #666;
+				position: absolute;
+				width: 100%;
+				left:0;
+				bottom:0;
+				background: rgba(255,255,255,0.7);
+				text-align: center;
+			}
+		}
+		&:last-child{
+			position: relative;
+			flex-grow: 1;
+			padding: 10px 10px 35px;
+			.product-name{
+				font-size: 28rpx;
+				color: #333;
+			}
+			.product-guige{
+				margin: 10rpx 0;
+				color: #2196F3;
+			}
+		}
+		.product-button{
+			position: absolute;
+			left: 5%;
+			bottom: 0;
+			width: 90%;
+			padding: 5px 0 10px;
+			display: flex;
+			align-items: center;
+			.rebate-tag{
+				background: #ffe7df;
+				color: #E91E63;
+				padding: 2px 5px;
+				font-size: 10px;
+				border-radius: 3px;
+				margin-left: 6px;
+			}
+			.tejia-tag{
+				color: #E91E63;
+				margin-left: 6px;
+				font-size: 12px;
+				text{
+					font-size: 12px;
+					color: #999;
+					margin-left: 5px;
+					text-decoration: line-through;
+				}
+			}
+		}
+	}
+	.back-price{
+		padding: 6rpx 65rpx;
+		background: #ececec;
+		position: absolute;
+		top: 18rpx;
+		right: -45rpx;
+		color: #666;
+		z-index: 2;
+		font-size: 20rpx;
+		text-align: center;
+		transform: rotate(40deg);
+		display: flex;
+		align-items: center;
+		text{
+			font-size: 28rpx;
+			margin: 0 5rpx;
+		}
+	}
+	}
+</style>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
pages/login/login.vue


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
pages/login/phoneLogin.vue


+ 546 - 152
pages/morePage/morePage.vue

@@ -1,97 +1,89 @@
 <template>
 	<view>
 	<view class="morePages">
-		<view class="list-box" v-if="hasRedPacket&&hasShelf">
-			<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>
-			</view>
-			<u-cell-group :border="false">
-				<u-cell-item title="库存查询" v-if="$hasPermissions('M_stockQueryList_mini')" @click="toPage('/pages/stockQuery/stockQuery')" :title-style="{fontSize:'1em'}">
-					<text slot="icon"></text>
-				</u-cell-item>
-				<u-cell-item title="补货记录" v-if="$hasPermissions('M_stockPut_mini')" @click="toPage('/pagesA/digitalShelf/stockPut')" :title-style="{fontSize:'1em'}">
-					<text slot="icon"></text>
-				</u-cell-item>
-			</u-cell-group>
-		</view>
-		<view class="list-box" v-if="$hasPermissions('M_shelfOrder_mini')||$hasPermissions('M_tempShelfOrder_mini')">
-			<view class="list-title">
-				<u-icon size="34" name="order"></u-icon> <text>订单管理</text>
+		<!-- 头部栏 -->
+		<view class="header-box">
+			<UniStatusBar></UniStatusBar>
+			<view class="title flex align_center" :style="{height:(navHeight+'px')}">
+				 <u-image src="/static/logo-h.png" width="349" height='40'></u-image>
 			</view>
-			<u-cell-group :border="false">
-				<u-cell-item title="货架订单" v-if="$hasPermissions('M_shelfOrder_mini')" @click="toPage('/pagesA/digitalShelf/orderList')" :title-style="{fontSize:'1em'}">
-					<text slot="icon"></text>
-				</u-cell-item>
-				<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-group>
 		</view>
-		<view class="list-box" v-if="$hasPermissions('M_creatWarranty_mini')||$hasPermissions('M_searchWarranty_mini')">
-			<view class="list-title">
-				<u-icon size="38" name="file-text"></u-icon> <text>电子质保单</text>
+		<!-- body -->
+		<view class="morePages-body">
+			<view class="body-box bg-blue">
+				<!-- 名片 -->
+				<view class="userCard flex align_center justify_between">
+					<view class="userCard-info flex align_center">
+						<view>
+							<u-image shape='circle' v-if="!hasLogin" src="/static/def_personal_avatar.png" width="90" height="90"></u-image>
+							<u-image shape='circle' v-else :src="avatarUrl||'/static/def_personal_avatar.png'" width="90" height="90"></u-image>
+						</view>
+						<view class="user-info" @click="toUser">
+							<view v-if="!hasLogin" style="font-size: 40rpx;">
+								请点击登录
+							</view>
+							<view v-else>
+								<view class="user-name">{{userInfo.userNameCN || userInfo.mobile}}</view>
+								<view v-if="hasLogin&&userInfo&&userInfo.sysUserFlag == '0'">
+									<u-tag text="个人用户" mode="dark" type="warning" shape="circle" size="mini" />
+								</view>
+								<view v-else>{{userInfo.orgName}}</view>
+							</view>
+						</view>
+					</view>
+					<view @click="toUser">
+						<text v-if="hasLogin&&userInfo&&userInfo.sysUserFlag == '0'" class="user-rz">
+							{{storeApply&&storeApply.auditStatus=='WAIT'?'认证门店审核中':'认证成为门店'}}
+						</text>
+						<uni-icons type="arrowright" size="20" color="#999"></uni-icons>
+					</view>
+				</view>
 			</view>
-			<u-cell-group :border="false">
-				<u-cell-item title="创建质保单" v-if="$hasPermissions('M_creatWarranty_mini')" @click="toPage('/pagesA/qualityPolicy/creatOrder')" :title-style="{fontSize:'1em'}">
-					<text slot="icon"></text>
-				</u-cell-item>
-				<u-cell-item title="质保单查询" v-if="$hasPermissions('M_searchWarranty_mini')" @click="toPage('/pagesA/qualityPolicy/searchOrder')" :title-style="{fontSize:'1em'}">
-					<text slot="icon"></text>
-				</u-cell-item>
-			</u-cell-group>
-		</view>
-		<view class="list-box" v-if="$hasPermissions('M_settlementRecord_mini')||$hasPermissions('M_settlementManage_mini')">
-			<view class="list-title">
-				<u-icon size="36" name="rmb-circle"></u-icon> <text>结算管理</text>
+			
+			<view class="list-box" v-if="hasRedPacket&&hasShelf">
+				<view class="list-title flex align_center justify_between" @click="toPage('/pagesB/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-badge :absolute="false" :count="redPackCount"></u-badge>
+						<uni-icons type="arrowright" size="20" color="#999"></uni-icons>
+					</view>
+				</view>
 			</view>
-			<u-cell-group :border="false">
-				<u-cell-item title="结算记录" v-if="$hasPermissions('M_settlementRecord_mini')" @click="toPage('/pagesA/digitalShelf/settlementRecord/settlementRecord')" :title-style="{fontSize:'1em'}">
-					<text slot="icon"></text>
-				</u-cell-item>
-				<u-cell-item title="付款结算" v-if="$hasPermissions('M_settlementManage_mini')" @click="toPage('/pagesA/digitalShelf/settlementManage/settlementManage')" :title-style="{fontSize:'1em'}">
-					<text slot="icon"></text>
-				</u-cell-item>
-			</u-cell-group>
-		</view>
-		<view class="list-box" v-if="$hasPermissions('M_employee_mini')||$hasPermissions('M_roleSetting_mini')||($hasPermissions('M_priceShow_mini')&&showPriceSet)">
-			<view class="list-title">
-				<u-icon size="32" name="home"></u-icon> <text>基础设置</text>
+			<view class="list-box" v-if="hasLogin&&$hasPermissions('M_couponList_mini')">
+				<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-badge :absolute="false" :count="hasShelf?couponCount:0"></u-badge>
+						<uni-icons type="arrowright" size="20" color="#999"></uni-icons>
+					</view>
+				</view>
 			</view>
-			<u-cell-group :border="false">
-				<u-cell-item title="员工管理" v-if="$hasPermissions('M_employee_mini')" @click="toPage('/pages/storeManage/personnel')" :title-style="{fontSize:'1em'}">
-					<text slot="icon"></text>
-				</u-cell-item>
-			</u-cell-group>
-			<u-cell-group :border="false">
-				<u-cell-item title="岗位权限" v-if="$hasPermissions('M_roleSetting_mini')" @click="toPage('/pages/storeManage/roleSetting/roleSetting')" :title-style="{fontSize:'1em'}">
-					<text slot="icon"></text>
-				</u-cell-item>
-			</u-cell-group>
-			<u-cell-group :border="false">
-				<u-cell-item title="价格权限/显示设置" v-if="$hasPermissions('M_priceShow_mini')&&showPriceSet" @click="toPage('/pages/storeManage/priceSetting/priceSetting')" :title-style="{fontSize:'1em'}">
-					<text slot="icon"></text>
-				</u-cell-item>
-			</u-cell-group>
-		</view>
-		<view class="list-box" v-if="hasLogin&&dealerPhone">
-			<view class="list-title flex justify_center phone" @click="call">
-				<u-icon size="36" name="phone"></u-icon> <text>联系汽配商</text>
+					
+			<!-- 网格图标 -->
+			<view class="list-box" v-for="item in itemList" :key="item.id">
+				<view class="list-title" v-if="item.text">
+					<text>{{item.text}}</text>
+				</view>
+				<view class="list-body" :style="{paddingTop:item.text?0:'10px'}">
+					<uni-grid :column="item.column" :highlight="true" :show-border="false" :square="false" @change="e=>openPage(e,item.child)">
+						<uni-grid-item v-for="(sub, idx) in item.child" :index="idx" :key="idx">
+							<view class="grid-item-box">
+								<u-icon class="icons" :color="sub.color" :size="item.size" :name="sub.icon" custom-prefix="custom-icon"></u-icon>
+								<text class="text">{{sub.text}}</text>
+							</view>
+						</uni-grid-item>
+					</uni-grid>
+				</view>
 			</view>
-		</view>
-		<view class="list-box" v-if="hasLogin">
-			<view class="list-title flex justify_center phone" @click="quitOut">
-				<text>退出登录</text>
+			 
+			<view class="list-box" v-if="hasLogin">
+				<view class="list-title flex justify_center phone" @click="quitOut">
+					<text>退出登录</text>
+				</view>
 			</view>
 		</view>
-		<!-- 去认证 -->
+		
+		<!-- 去认证弹框 -->
 		<u-popup v-model="showPopup" mode="center" :border-radius="20" closeable>
 			<view style="background-color: #fff;padding: 1rem;">
 				<u-image width="533" height="415" src="/static/authimg.jpg"></u-image>
@@ -101,7 +93,8 @@
 			</view>
 		</u-popup>
 	</view>
-	<u-tabbar :list="vuex_tabBarList" :before-switch="beforeSwitch" :mid-button="false"></u-tabbar>
+	<!-- tab -->
+	<u-tabbar :list="vuex_tabBarList" :mid-button-size="80" :before-switch="beforeSwitch" :midButton="vuex_tabBarList.length==5"></u-tabbar>
 	</view>
 </template>
 
@@ -110,14 +103,25 @@
 	    mapState,
 	    mapMutations
 	} from 'vuex'
-	import { queryQplsConfig } from '@/api/shelf.js'
+	import UniStatusBar from '@/components/uni-status-bar/uni-status-bar.vue'
+	import { queryQplsConfig,getProductfindByScanCode } from '@/api/shelf.js'
+	import { findUserReward } from '@/api/rewardRule.js'
+	import { ticketQueryCount } from '@/api/user.js'
+	import { clickTab, toLogin } from "@/utils/index.js"
 	export default {
+		components: {
+			UniStatusBar // 状态栏组件
+		},
 		data() {
 			return {
-				dealerPhone: null,
+				dealerPhone: null, // 经销商电话
 				showPopup: false,
 				showPriceSet: false,
-				shelfSn: null
+				shelfSn: null,
+				avatarUrl:'', // 用户图像
+				navHeight: 44,
+				couponCount: 0,
+				redPackCount: 0
 			}
 		},
 		computed: {
@@ -135,23 +139,266 @@
 				const rule = this.$store.state.vuex_rewardRule
 				return rule&&rule.ruleStatus == 'release'
 			},
+			hasShopSeting(){
+				return this.$store.state.vuex_hasShopiing
+			},
+			itemList(){
+				const list = [
+					{
+						text: '订单管理',
+						icon: 'order',
+						auth: true,
+						column: 4,
+						size: 60,
+						child:[
+							{
+								text: '货架订单',
+								icon: 'huojiaguanli',
+								auth: this.$hasPermissions('M_shelfOrder_mini'),
+								path: '/pagesA/digitalShelf/orderList',
+								color: '#056cd9',
+								isShelf: true
+							},
+							{
+								text: '急送订单',
+								icon: 'yijianshansong',
+								auth: this.$hasPermissions('M_tempShelfOrder_mini'),
+								path: '/pagesA/digitalShelf/tempOrderList/tempOrderList',
+								color: '#dd6859',
+								isShelf: true
+							},
+							{
+								text: '采购订单',
+								icon: 'purchaseorder',
+								auth: this.$hasPermissions('M_procureOrder_mini'),
+								path: '/pagesB/procureOrderList',
+								color: '#ffaa00'
+							}
+						],
+					},
+					{
+						text: '货架管理',
+						icon: 'list-dot',
+						auth: true,
+						column: 4,
+						size: 60,
+						child:[
+							{
+								text: '库存查询',
+								icon: 'stockquery',
+								auth: this.$hasPermissions('M_stockQueryList_mini'),
+								path: '/pagesB/stockQuery/stockQuery',
+								color: '#ff87a3',
+								isShelf: true
+							},
+							{
+								text: '补货记录',
+								icon: 'replenishment',
+								auth: this.$hasPermissions('M_stockPut_mini'),
+								path: '/pagesA/digitalShelf/stockPut',
+								color: '#55aaff',
+								isShelf: true
+							},
+							{
+								text: '结算记录',
+								icon: 'settlement',
+								auth: this.$hasPermissions('M_settlementRecord_mini'),
+								path: '/pagesA/digitalShelf/settlementRecord/settlementRecord',
+								color: '#55aa7f',
+								isShelf: true
+							},
+							{
+								text: '付款结算',
+								icon: 'payrecord',
+								auth: this.$hasPermissions('M_settlementManage_mini'),
+								path: '/pagesA/digitalShelf/settlementManage/settlementManage',
+								color: '#ff9777',
+								isShelf: true
+							},
+							{
+								text: '编码取货',
+								icon: 'ziyuanxhdpi',
+								auth: this.userInfo && this.userInfo.sysUserFlag == '1',
+								path: '#quhuo1',
+								color: '#2196f3',
+								isShelf: true
+							},
+							{
+								text: '扫码取货',
+								icon: 'saoma1',
+								auth: this.userInfo && this.userInfo.sysUserFlag == '1',
+								path: '#quhuo0',
+								color: '#ffaa00',
+								isShelf: true
+							},
+							{
+								text: 'VIN查询历史',
+								icon: 'lishijilu',
+								auth: this.hasLogin,
+								path: '/pagesA/vinRecord/vinRecord',
+								color: '#abc4ff',
+								isShelf: true
+							},
+							{
+								text: '联系汽配商',
+								icon: 'lianxidianhua',
+								auth: this.hasLogin&&this.dealerPhone,
+								path: '#call',
+								color: '#00aaff',
+								isShelf: true
+							},
+						],
+					},
+					{
+						text: '轮胎质保单',
+						icon: 'file-text',
+						auth: true,
+						column: 4,
+						size: 60,
+						child:[
+							{
+								text: '创建质保单',
+								icon: 'zhibaodan',
+								auth: this.$hasPermissions('M_creatWarranty_mini'),
+								path: '/pagesA/qualityPolicy/creatOrder',
+								color: '#056cd9'
+							},
+							{
+								text: '质保单查询',
+								icon: 'ordersearch',
+								auth: this.$hasPermissions('M_searchWarranty_mini'),
+								path: '/pagesA/qualityPolicy/searchOrder',
+								color: '#ffaa7f'
+							},
+						],
+					},
+					{
+						text: '基础设置',
+						icon: 'setting',
+						auth: true,
+						column: 4,
+						size: 60,
+						child:[
+							{
+								text: '员工管理',
+								icon: 'employee',
+								auth: this.$hasPermissions('M_employee_mini'),
+								path: '/pages/storeManage/personnel',
+								color: '#ff9d7c'
+							},
+							{
+								text: '岗位权限',
+								icon: 'job',
+								auth: this.$hasPermissions('M_roleSetting_mini'),
+								path: '/pages/storeManage/roleSetting/roleSetting',
+								color: '#aaaaff'
+							},
+							{
+								text: '价格显示设置',
+								icon: 'permission',
+								auth: this.$hasPermissions('M_priceShow_mini')&&this.showPriceSet,
+								path: '/pages/storeManage/priceSetting/priceSetting',
+								color: '#55aaff',
+								isShelf: true
+							},
+							{
+								text: '商城显示设置',
+								icon: 'shangcheng',
+								auth: this.$store.state.vuex_showShopAuth&&this.userInfo&&this.userInfo.superAdmin == 1,
+								path: '/pagesB/shopShow/shopShow',
+								color: '#00aa00',
+								isShelf: true
+							},
+						],
+					}
+				]
+				// 计算父节点,权限
+				list.forEach(item => {
+					item.id = this.$u.guid()
+					item.child = item.child.filter(c => c.auth)
+					item.auth = item.child.length > 0
+				})
+				return list.filter(item => item.auth)
+			}
 		},
 		onShow() {
-				const shelfInfo = this.$store.state.vuex_storeShelf
-				this.shelfSn = shelfInfo ? shelfInfo.shelfSn : ''
-				this.dealerPhone = shelfInfo&&shelfInfo.contactMobile ? shelfInfo.contactMobile : ''
-				if(this.shelfSn){
-					this.getPriceCofig()
+			// 用户头像
+			this.avatarUrl = uni.getStorageSync('userPhoto');
+			// 获取货架信息
+			const shelfInfo = this.$store.state.vuex_storeShelf
+			this.shelfSn = shelfInfo ? shelfInfo.shelfSn : ''
+			this.dealerPhone = shelfInfo&&shelfInfo.contactMobile ? shelfInfo.contactMobile : ''
+			if(this.shelfSn){
+				this.getPriceCofig()
+			}
+			// 获取优惠券总数
+			if(this.hasLogin&&this.$hasPermissions('M_couponList_mini')){
+				this.getCouponCount()
+			}
+			// 红包总金额
+			if(this.hasRedPacket&&this.hasShelf){
+				this.getUserReward()
+			}
+			// 隐藏促销模块
+			if(!this.hasLogin){
+				this.hidePromoTab()
+			}
+		},
+		// 页面卸载
+		onUnload() {
+			uni.$off('refashProm')
+		},
+		methods: {
+			// 获取优惠券数量
+			getCouponCount(){
+				if(this.userInfo.sysUserFlag == '1'){
+					ticketQueryCount().then(res => {
+						this.couponCount = res.data ? res.data.ticketValue : 0
+					})
 				}
 			},
-		methods: {
-			beforeSwitch(index){
-				if(index==1){
-					this.openCamera()
+			// 红包总金额
+			getUserReward(){
+				findUserReward().then(res => {
+					this.redPackCount = res.data ? res.data.rewardAmount : 0
+				})
+			},
+			// 查看用户信息
+			toUser(){
+				if(this.hasLogin){
+					// 用户详细信息 或 门店认证
+					uni.navigateTo({
+						url: this.userInfo.sysUserFlag == '1' ? '/pages/personData/personData' : '/pages/storeManage/storeAuth'
+					})
 				}else{
-					return true
+					toLogin()
 				}
 			},
+			// 隐藏促销模块
+			hidePromoTab(){
+				// 删除促销模块
+				const promoIndex = this.$store.state.vuex_tabBarList.findIndex(item => item.text == '促销')
+				if(promoIndex > -1){
+					this.$store.state.vuex_tabBarList.splice(promoIndex,1)
+				}
+				// 扫描按钮不局中
+				const scanTab = this.$store.state.vuex_tabBarList.find(item => item.text == '扫描VIN')
+				if(scanTab){
+					scanTab.iconPath = "/static/tab/tab_scan_normal.png"
+					scanTab.midButton = false
+				}
+			},
+			// tab单击
+			beforeSwitch(index){
+				const row = this.$store.state.vuex_tabBarList[index] // 当前tab
+				const isNoAuth = this.userInfo ? this.userInfo.sysUserFlag == '0' : false // 是否认证门店
+				return clickTab(row,this.hasLogin,isNoAuth,this.vuex_vinScanNums < this.vuex_scanMaxNums)
+			},
+			// 网格打开页面
+			openPage(e,child){
+				const item = child[e.detail.index]
+				this.toPage(item.path,item.isShelf)
+			},
 			// 获取价格配置
 			getPriceCofig(){
 				queryQplsConfig({shelfSn: this.shelfSn}).then(res => {
@@ -162,35 +409,79 @@
 					this.showPriceSet = ret.filter(item => !!item).length > 0
 				})
 			},
-			// 去扫描
-			openCamera(){
-				if(this.hasLogin){
-					if(this.userInfo.sysUserFlag == '0'){
-						if(this.vuex_vinScanNums < this.vuex_scanMaxNums){
-							uni.navigateTo({
-								url: "/pages/scan-frame/scan-frame"
+			// 取货
+			openTakeGood(index){
+				// 已有数字货架
+				if(this.hasShelf){
+					this.clickAction(index)
+				}else{
+					uni.showToast({
+						icon:'none',
+						title: '门店没有关联数字货架,无法使用此功能!'
+					})
+				}
+			},
+			// 选择取货方式
+			clickAction(index){
+				const shelfSn = this.hasShelf.shelfSn
+				const _this = this
+				// 扫描
+				if(index == 0){
+					uni.scanCode({
+						success: function (ret) {
+							console.log(ret);
+							const params = {
+								codeType: ret.scanType == 'QR_CODE' ? 0 : 1
+							}
+							// 二维码
+							if(ret.scanType == 'QR_CODE'){
+								const result = ret.result.split("&")
+								params.productSn = result[2] // 产品编码sn
+							}else{
+								params.qrCode = ret.result
+							}
+							uni.showLoading({
+								title: "正在查询产品..."
 							})
-						}else{
-							uni.showModal({
-								title: '提示',
-								content: '个人用户扫描VIN仅限10次,您的次数已用完!',
-								confirmText: '好的',
-								showCancel: false,
-								success(res) {}
+							// 确认取货
+							getProductfindByScanCode(params).then(res => {
+								if(res.status == 200 && res.data){
+									if(res.data.currentInven){
+										const billSource = ret.scanType == 'QR_CODE' ? 'qr_code': 'bar_code'
+										const retData = Object.assign({shelfSn: shelfSn, billSource: billSource},res.data)
+										_this.$store.state.vuex_tempData = retData
+										uni.navigateTo({
+											url: '/pagesA/queryByCode/confirmQh'
+										})
+									}else{
+										uni.showModal({
+											title: '提示',
+											content: '产品库存为0,无法取货!',
+											confirmText: '好的',
+											showCancel: false
+										})
+									}
+								}else{
+									uni.showModal({
+										title: '提示',
+										content: '产品不属于此货架,请重新扫描!',
+										confirmText: '好的',
+										showCancel: false
+									})
+								}
+								uni.hideLoading()
 							})
 						}
-					}else{
-						uni.navigateTo({
-							url: "/pages/scan-frame/scan-frame"
-						})
-					}
+					});
 				}else{
+					// 按编码搜索
 					uni.navigateTo({
-						url: '/pages/login/login'
+						url: '/pagesA/queryByCode/queryByCode'
 					})
 				}
 			},
-			toPage(path){
+			// 跳转打开页面
+			toPage(path,isShelf){
 				const _this = this
 				if(this.hasLogin){
 					// 游客未认证
@@ -212,9 +503,7 @@
 								showCancel: false,
 								success() {
 									_this.$store.dispatch('userLogout');
-									uni.redirectTo({
-										url: '/pages/login/login'
-									});
+									toLogin()
 								}
 							})						
 						}else{
@@ -222,10 +511,22 @@
 						}
 					}else{
 						// 已有数字货架
-						if(this.hasShelf){
-							uni.navigateTo({
-								url: path
-							})
+						if(this.hasShelf || !isShelf){
+							if(path.indexOf("/pages")>=0){
+								uni.navigateTo({
+									url: path
+								})
+							}else{
+								if(path == '#quhuo1'){
+									this.openTakeGood(1)
+								}
+								if(path == '#quhuo0'){
+									this.openTakeGood(0)
+								}
+								if(path == '#call'){
+									this.call()
+								}
+							}
 						}else{
 							uni.showToast({
 								icon:'none',
@@ -234,20 +535,21 @@
 						}
 					}
 				}else{
-					uni.navigateTo({
-						url: '/pages/login/login'
-					})
+					toLogin()
 				}
 			},
+			// 去认证
 			toAuthStore(){
 				this.showPopup = false
 				uni.navigateTo({
 					url: '/pages/storeManage/storeAuth'
 				})
 			},
+			// 打电话
 			call(){
 				this.callPhone(this.dealerPhone)
 			},
+			// 退出登录
 			quitOut(){
 				let _this = this
 				uni.showModal({
@@ -256,13 +558,10 @@
 					success: (ret) => {
 					  if(ret.confirm){
 						  _this.$store.dispatch('userLogout');
-						  uni.navigateTo({
-						  	 url: '/pages/login/login'
-						  });
+						  toLogin()
 					  }
 					}
 				})
-				
 			}
 		}
 	}
@@ -271,31 +570,126 @@
 <style lang="less">
 .morePages{
 	width: 100%;
-	padding: 30rpx;
 	background-image: linear-gradient(#86defa 0%,#cdeff9 20%,#f8f8f8 30%);
-	.list-box{
-		background: #ffffff;
-		margin-bottom: 30rpx;
-		border-radius: 25rpx;
+	.header-box{
+		z-index: 5;
+		padding: 0em 1em;
+		background: #03A9F4;
+		 .title{
+			 padding: 0;
+		 }
+		 .version{
+			 color: #FFEB3B;
+			 font-size: 0.8em;
+			 margin-left: 1em;
+		 }
+	}
+	.morePages-body{
+		padding: 0 30rpx;
 		overflow: hidden;
-		box-shadow: 2rpx 2rpx 5rpx #eee;
-		.list-title{
-			padding:30rpx 20rpx;
-			font-size: 30rpx;
-			border-bottom: 2rpx solid #f8f8f8;
-			> text{
-				margin-left: 10rpx;
+		.body-box{
+			margin-bottom: 10px;
+			z-index: 4;
+		}
+		.bg-blue{
+			position: relative;
+			> view{
+				z-index: 100;
+				position: relative;
+			}
+			&::after{
+				/* 这个伪类的作用就是一个圆弧的背景色 */
+				width: 130%;
+				height: 100%;
+				position: absolute;
+				/*设置水平居中*/
+				left: -15%;
+				/* 之所以left:20%,是因为width:140%,若width:160%,那么left:30%才能水平居中 */
+				top: -25%; 
+				/*层叠顺序,最底层显示*/
+				content: '';
+				border-radius: 0 0 50% 50%;
+				/*分别对应 左上 右上 右下 左下 可以修改成其它颜色*/
+			    background: linear-gradient(to bottom, #03A9F4, #02a6ec);  
+			}
+			.userCard{
+				position:relative;
+				left:0;
+				bottom:0;
+				padding: 0.5rem;
+				background: #fff;
+				border-radius: 25rpx;
+				box-shadow: 2rpx 2rpx 5rpx #bcdede;
+				.userCard-info{
+					flex-grow:1;
+					> view{
+						&:last-child{
+							margin-left: 0.5em;
+							line-height: 1.5em;
+							.user-name{
+								font-size: 1rem;
+							}
+							>view{
+								padding: 0.2em;
+							}
+						}
+					}
+					.user-info{
+						flex-grow:1;
+					}
+				}
+				.user-rz{
+					font-size: 0.8rem;
+					color:#58aff5;
+				}
 			}
 		}
-		&:first-child{
-			box-shadow: 2rpx 2rpx 5rpx #cdeff9;
+		.list-box{
+			background: #ffffff;
+			margin-bottom: 20rpx;
+			border-radius: 25rpx;
+			overflow: hidden;
+			box-shadow: 2rpx 2rpx 5rpx #eee;
+			.list-title{
+				padding: 25rpx 20rpx;
+				color: #666;
+				> text{
+					font-size: 28rpx;
+				}
+			}
+			&:first-child{
+				box-shadow: 2rpx 2rpx 5rpx #cdeff9;
+			}
+			.list-body{
+				padding: 0 20rpx;
+			}
+			.grid-item-box{
+				display: flex;
+				flex-direction: column;
+				align-items:center;
+				justify-content: center;
+				margin-bottom: 15px;
+				.text{
+					text-align:center;
+					color: #666;
+					margin-top: 3px;
+					font-size: 12px;
+				}
+				.icons{
+					text-align:center;
+					display: flex;
+					align-items: center;
+					flex-direction: column;
+					justify-content: center;
+				}
+			}
 		}
-	}
-	.phone{
-		color: #00aaff;
-		&:active{
-			opacity: 0.8;
-			transform:scale(0.9);
+		.phone{
+			color: #00aaff;
+			&:active{
+				opacity: 0.8;
+				transform:scale(0.9);
+			}
 		}
 	}
 }

+ 1 - 2
pages/personData/personData.vue

@@ -191,8 +191,6 @@
 		}
 	}
 	.bottom-cont{
-		position: fixed;
-		bottom: 0;
 		width: 100%;
 		background-color: #fff;
 		height: 110rpx;
@@ -200,6 +198,7 @@
 		color: #999999;
 		text-align: center;
 		line-height: 110rpx;
+		margin-top: 20rpx;
 	}
 		
 </style>

+ 158 - 0
pages/promo/index.vue

@@ -0,0 +1,158 @@
+<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.imageUrl" height="140px" width="100%"></u-image>
+						</view>
+						<view class="ellipsis-two">{{item.promoName}}</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" :mid-button-size="80" :before-switch="beforeSwitch" :midButton="vuex_tabBarList.length==5"></u-tabbar>
+	</view>
+</template>
+
+<script>
+	import {
+	    mapState,
+	    mapMutations,
+	} from 'vuex'
+	import { promoTerminalListByPage } from '@/api/video.js'
+	import { clickTab } from "@/utils/index.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()
+			uni.$on("refashProm",()=>{
+				this.pageInit()
+			})
+		},
+		// 页面卸载
+		onUnload() {
+			uni.$off('refashProm')
+		},
+		methods: {
+			pageInit(){
+				this.total = 0
+				this.pageNo = 1
+				this.list = []
+				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,
+				queryWord: this.queryWord
+			  }
+			  this.status = "loading"
+			  promoTerminalListByPage(params).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
+				} 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/promoProduct?promoSn='+item.promoSn+'&title='+item.promoName
+				 })
+			},
+			// tab单击
+			beforeSwitch(index){
+				const row = this.$store.state.vuex_tabBarList[index] // 当前tab
+				const isNoAuth = this.userInfo ? this.userInfo.sysUserFlag == '0' : false // 是否认证门店
+				return clickTab(row,this.hasLogin,isNoAuth,this.vuex_vinScanNums < this.vuex_scanMaxNums)
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+    page{
+		height: 100vh;
+	}
+	.video-pagesCons{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		.tab-body{
+			height: calc(100vh - 86px);
+			.check-order-list{
+				background: #ffffff;
+				margin: 25upx;
+				border-radius: 10upx;
+				overflow: hidden;
+				box-shadow: 1px 1px 3px #EEEEEE;
+				.video-item{
+					> view{
+						&:first-child{
+							position: relative;
+						}
+						&:last-child{
+							text-align: center;
+							font-size: 32rpx;
+							padding: 20rpx 0;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 37 - 29
pages/storeManage/addPerson.vue

@@ -23,37 +23,37 @@
 					</evanFormItem>
 					<evanFormItem label="岗位" v-if="!isEdit||formData.isManager==0" prop="roleNames">
 						<u-input type="select" style="width:100%" input-align="right" placeholder="请选择岗位" @click="showRoles=true" v-model="formData.roleNames"/>
-						<u-popup v-model="showRoles" mode="bottom">
-							<view style="padding: 1rem;width: 100%;">
-								<view style="position: relative;padding: 0.5rem;width: 100%;text-align: center;border-bottom: 1px solid #eee;font-size:1.1rem;">
-									<text @click="toAddRole()" style="color:#066cff;position: absolute;left:0;top:0.5rem;font-size:0.9rem;">新增岗位</text>
-									选择岗位
-								</view>
-								<view style="padding:1rem;min-height: 15rem;" v-if="roleList.length">
-									<u-radio-group wrap v-model="formData.roleIds" @change="radioGroupChange">
-										<u-radio 
-											v-for="(item, index) in roleList" :key="item.id" 
-											:name="item.id"
-											:disabled="!item.isEnable"
-											:icon-size="30"
-											:label-size="32"
-										>
-											{{item.name}}
-										</u-radio>
-									</u-radio-group>
-								</view>
-								<view style="color: #999;text-align: center;padding:3rem 0;" v-else>
-									暂无岗位信息,请点击“新增岗位”
-								</view>
-							</view>
-						</u-popup>
 					</evanFormItem>
 				</evanForm>
 			</view>
 			<view class="form-footer-btn flex align_center justify_center">
-				<u-button shape="circle" v-if="isEdit" @click="delPerson()" :custom-style="{width:'300rpx',marginRight:'20rpx' }">删除</u-button>
-				<u-button shape="circle" type="info" :custom-style="{ background: '#066cff', color: '#fff',width:'300rpx' }" @click="save('formData')">保存</u-button>
+				<u-button shape="circle" :disabled="loading" v-if="isEdit&&formData.isManager==0" @click="delPerson()" :custom-style="{width:'300rpx',marginRight:'20rpx' }">删除</u-button>
+				<u-button shape="circle" :disabled="loading" type="info" :custom-style="{ background: '#066cff', color: '#fff',width:'300rpx' }" @click="save('formData')">保存</u-button>
 			</view>
+			<u-popup v-model="showRoles" mode="bottom">
+				<view style="width: 100%;">
+					<view style="position: relative;padding: 0.5rem;width: 100%;text-align: center;border-bottom: 1px solid #eee;font-size:1.1rem;">
+						<text @click="toAddRole()" style="color:#066cff;position: absolute;left:1rem;top:0.6rem;font-size:0.8rem;">新增岗位</text>
+						选择岗位
+					</view>
+					<view style="padding:0.5rem 1rem;min-height: 15rem;" v-if="roleList.length">
+						<u-radio-group wrap v-model="formData.roleIds" @change="radioGroupChange">
+							<u-radio 
+								v-for="(item, index) in roleList" :key="item.id" 
+								:name="item.id"
+								:disabled="!item.isEnable"
+								:icon-size="30"
+								:label-size="32"
+							>
+								{{item.name}}
+							</u-radio>
+						</u-radio-group>
+					</view>
+					<view style="color: #999;text-align: center;padding:3rem 0;" v-else>
+						暂无岗位信息,请点击“新增岗位”
+					</view>
+				</view>
+			</u-popup>
 	</view>
 </template>
 
@@ -69,6 +69,7 @@
 		},
 		data(){
 			return{
+				loading: false,
 				showRoles: false,
 				roleList: [],  //  角色  数据列表
 				roleArr: [],  //  当前所选角色
@@ -135,7 +136,7 @@
 			},
 			// 获取角色
 			getRole(){
-				getRoleList().then(res => {
+				getRoleList({isEnable: '1'}).then(res => {
 					this.roleList = res.data || []
 				})
 			},
@@ -146,6 +147,7 @@
 				this.formData.roleNames = roleNames?roleNames.name:'';
 				this.showRoles = false
 			},
+			// 新增岗位
 			toAddRole(){
 				this.showRoles = false
 				uni.navigateTo({
@@ -155,20 +157,22 @@
 			//  保存
 			save(name){
 				let data=this.formData
-				console.log(data)
 				this.$refs[name].validate((valid) => {
 				  if (valid) {
 					if(!this.formData.roleNames && this.formData.isManager==0){
 						uni.showToast({icon: 'none', title: '请选择岗位'})
 					}else{
+						this.loading = true
+						uni.showLoading({title:'正在保存...'})
 						saveEmployee(data).then(res=>{
-							console.log(res)
+							uni.hideLoading()
 							if(res.status == 200){
 								uni.showToast({icon: 'none', title:'保存成功'})
 								this.cancel()
 							}else{
 								uni.showToast({icon: 'none', title: res.message})
 							}
+							this.loading = false
 						})
 					}
 				}
@@ -183,11 +187,15 @@
 					content: '数据删除后无法恢复, 确认删除吗?',
 					success: (ret) => {
 					  if(ret.confirm||ret.index==0){
+						  _this.loading = true
+						  uni.showLoading({title:'正在删除...'})
 						  // 删除数据
 						  delEmployee({id: item.id}).then(res=>{
+							uni.hideLoading()
 						  	if(res.status == 200){
 						  		this.cancel()
 						  	}
+							_this.loading = false
 						  	uni.showToast({icon: 'none', title: res.message})
 						  })
 					  }

+ 11 - 48
pages/storeManage/editAdminAuth.vue

@@ -31,9 +31,8 @@
 </template>
 
 <script>
-	import { getPowerRoleList } from '@/api/powerRole-md.js'
+	import { getRoleList } from '@/api/powerRole-md.js'
 	import {saveEmployee,setManager} from '@/api/employee'
-	import { getCurrUserInfo } from '@/api/data.js';
 	export default{
 		data(){
 			return{
@@ -41,8 +40,7 @@
 				noDataText: '暂无数据',
 				// 查询参数
 				queryParam: {
-				  name: '',
-				  isEnable: ''
+				  isEnable: '1'
 				},
 				formData:{},
 				pageSize: 100,
@@ -53,21 +51,13 @@
 				loading:false,
 				total:''	,// 获取数据总数
 				userInfo: null,
+				adminId: null
 			}
 		},
 		onLoad(opts) {
 			this.userInfo = this.$store.state.vuex_nowStaffData
-			this.getCurrUserInfo()
-		},
-		// 下一页
-		onReachBottom() {
-			console.log('next page')
-			if(this.roleList.length < this.total){
-				this.pageNo += 1
-				this.getRoleList()
-			}else{
-				this.status = "nomore"
-			}
+			this.adminId = opts.adminId
+			this.getRoleList()
 		},
 		methods:{
 			radioGroupChange(e){
@@ -79,39 +69,11 @@
 			getRoleList(){
 				let _this = this
 				this.status = "loading"
-				 getPowerRoleList(Object.assign({pageNo: this.pageNo, pageSize: this.pageSize}, this.queryParam)).then(res => {
-				   uni.hideLoading()
-				   if (res.code == 200 || res.status == 204 || res.status == 200) {
-				     if(_this.pageNo>1){
-				   	  _this.roleList = _this.roleList.concat(res.data.list || [])
-				     }else{
-				   	  _this.roleList = res.data.list || []
-				     }
-				     _this.total = res.data.count || 0
-					 _this.roleList.map(item => {
-					 	item.roleState = item.isEnable == 1
-					 })
-				   } else {
-				     _this.roleList = []
-				     _this.total = 0
-				     _this.noDataText = res.message
-				   }
-				   _this.status = "loadmore"
-				 })
-			},
-			getCurrUserInfo(){
-				uni.showLoading({
-					mask:true,
-					title: '正在加载...'
-				})
-				getCurrUserInfo().then(res => {
-					if(res.data){
-						this.formData = Object.assign({},this.formData,{id:res.data.id})
-						this.pageNo = 1
-						this.getRoleList()
-					}else{
-						uni.hideLoading()
-					}
+				getRoleList({isEnable: '1'}).then(res => {
+					uni.hideLoading()
+					_this.roleList = res.data || []
+					_this.noDataText = res.message
+					_this.status = "loadmore"
 				})
 			},
 			//  保存
@@ -136,6 +98,7 @@
 			},
 			// 设置岗位
 			saveRole(){
+				this.formData.id = this.adminId
 				saveEmployee(this.formData).then(res=>{
 					console.log(res)
 					if(res.status == 200){

+ 14 - 46
pages/storeManage/editIsManage.vue

@@ -5,18 +5,9 @@
 				<scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom">
 					<view style="height: 20rpx;" ></view>
 					<view class="check-order-list">
-						 <u-radio-group wrap @change="radioGroupChange">
-						 	<u-radio 
-						 		v-model="item.checked" 
-						 		v-for="(item, index) in list" :key="item.userId" 
-						 		:name="item.userId"
-								v-if="item.isManager == 0"
-						 	>
-						 	<view class="u-name">
-						 		{{item.name}}/{{item.mobile}}
-						 	</view>
-						 	</u-radio>
-						 </u-radio-group>
+						 <u-cell-group>
+						 	<u-cell-item v-for="(item, index) in list" :key="item.userId" @click="setNewAdmin(item)" :title="item.name+'/'+item.mobile"></u-cell-item>
+						 </u-cell-group>
 					 </view>
 					 <view style="padding:0 30upx 30upx;">
 						 <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>
@@ -25,11 +16,6 @@
 				</scroll-view>
 			</swiper-item>
 		</swiper>
-		<view class="footer flex align_center justify_center">
-			<u-button @click="setNewAdmin()" :throttle-time="100" :custom-style="{ background: '#066cff', color: '#fff' }" shape="circle" type="info">
-				设为新负责人
-			</u-button>
-		</view>
 	</view>
 </template>
 
@@ -49,32 +35,31 @@
 				pageSize: 20,
 				list: [],
 				total: 0,
-				curPerson: null
+				adminId: null
 			}
 		},
 		onShow() {
 			this.getRow(1)
 		},
+		onLoad(opts) {
+			this.adminId = opts.adminId
+		},
 		computed:{
 			userInfo(){
 				return this.$store.state.vuex_userInfo
 			},
 		},
 		methods:{
-			radioGroupChange(e){
-				console.log(e)
-				this.curPerson = e
-			},
 			// 查询列表
 			getRow (pageNo) {
 			  let _this = this
 			  if (pageNo) {
 			    this.pageNo = pageNo
 			  }
-			  
 			  let params = {
 			    pageNo:this.pageNo,
-			    pageSize:this.pageSize
+			    pageSize:this.pageSize,
+				isManager: 0
 			  }
 			  this.status = "loading"
 			  searchEmployee(params).then(res => {
@@ -96,7 +81,6 @@
 			},
 			// scroll-view到底部加载更多
 			onreachBottom() {
-				console.log(this.list.length, this.total)
 				if(this.list.length < this.total){
 					this.pageNo += 1
 					this.getRow()
@@ -105,19 +89,11 @@
 				}
 			},
 			// 设为负责人
-			setNewAdmin(){
-				console.log(this.curPerson)
-				if(!!this.curPerson){
-					const row = this.list.find(item => item.userId == this.curPerson )
-					this.$store.state.vuex_nowStaffData = row
-					uni.redirectTo({
-						url: "/pages/storeManage/editAdminAuth"
-					})
-				}else{
-					uni.showToast({
-						title: "请选择员工"
-					})
-				}
+			setNewAdmin(row){
+				this.$store.state.vuex_nowStaffData = row
+				uni.navigateTo({
+					url: "/pages/storeManage/editAdminAuth?adminId="+this.adminId
+				})
 			},
 		}
 	}
@@ -145,13 +121,5 @@
 				}
 			}
 		}
-		.footer{
-			padding: 0.6rem;
-			background: #ffffff;
-			u-button{
-				width: 45%;
-				margin: 0 2%;
-			}
-		}
 	}
 </style>

+ 6 - 4
pages/storeManage/personnel.vue

@@ -34,7 +34,7 @@
 			</swiper-item>
 		</swiper>
 		<view class="footer flex align_center justify_center">
-			<u-button @click="editIsManage()" v-if="userInfo&&userInfo.superAdmin==1" :throttle-time="100" shape="circle" type="error" plain>
+			<u-button @click="editIsManage()" v-if="userInfo&&userInfo.superAdmin==1&&!hasOnlyAdmin" :throttle-time="100" shape="circle" type="error" plain>
 				更换负责人
 			</u-button>
 			<u-button @click="editPerson(null)" :throttle-time="100" :custom-style="{ background: '#066cff', color: '#fff' }" shape="circle" type="info">
@@ -69,6 +69,9 @@
 			userInfo(){
 				return this.$store.state.vuex_userInfo
 			},
+			hasOnlyAdmin(){
+				return this.list.length ==1 && this.list[0].isManager == 1 || this.list.length == 0
+			}
 		},
 		methods:{
 			// 查询列表
@@ -77,7 +80,6 @@
 			  if (pageNo) {
 			    this.pageNo = pageNo
 			  }
-			  
 			  let params = {
 			    pageNo:this.pageNo,
 			    pageSize:this.pageSize
@@ -102,7 +104,6 @@
 			},
 			// scroll-view到底部加载更多
 			onreachBottom() {
-				console.log(this.list.length, this.total)
 				if(this.list.length < this.total){
 					this.pageNo += 1
 					this.getRow()
@@ -119,8 +120,9 @@
 			},
 			// 更换负责人
 			editIsManage(){
+				const row = this.list.find(item=>item.isManager == 1)
 				uni.navigateTo({
-					url: "/pages/storeManage/editIsManage"
+					url: "/pages/storeManage/editIsManage?adminId="+row.id
 				})
 			}
 		}

+ 7 - 3
pages/storeManage/roleSetting/addRole.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="container flex flex_column">
-		<view style="flex-grow: 1;">
+		<view style="flex-grow: 1;padding-bottom: 120rpx;">
 			<evan-form ref="formData" :rules="ruleValidate" :model="formData">
 				<evan-form-item label="岗位名称:" prop="name">
 					<u-input class="form-input" :maxlength="30" style="width: 100%;" placeholder="请填写岗位名称(最多30个字符)" v-model="formData.name" />
@@ -57,7 +57,6 @@
 			}
 		},
 		onLoad(options) {
-			console.log(options)
 			this.type = options.type
 			uni.setNavigationBarTitle({
 				title: this.type=="add" ? '添加岗位' : '编辑岗位'
@@ -84,7 +83,6 @@
 				  if (valid) {
 					  this.loading = true
 					  const menusIds = this.$refs.roleSet.getSelMenu()
-					  console.log(menusIds,'menus--')
 					  if(!menusIds){
 						  uni.showToast({
 						  	icon: 'none',
@@ -144,6 +142,8 @@
 	.container{
 		margin: 0 30rpx;
 		height: 100vh;
+		position: relative;
+		overflow: auto;
 		.form-input-placeholder{
 			text-align: right;
 		}
@@ -154,6 +154,10 @@
 		.form-footer-btn{
 			padding: 20rpx;
 			background: #FFFFFF;
+			width: 100%;
+			position: fixed;
+			bottom: 0;
+			left: 0;
 		}
 	}
 </style>

+ 16 - 6
pages/storeManage/roleSetting/roleAuthSet.vue

@@ -4,13 +4,13 @@
 			<view class="leve_0">
 				<view class="leve_1">
 					<label @click="checkAll()">
-						<checkbox :checked="checkedAll" /> {{checkedAll?'取消全部':'全部'}}
+						<checkbox :checked="checkedAll" /> {{checkedAll?'取消全选':'全选'}}
 					</label>
 				</view>
 			</view>
 			<view class="leve_0" v-if="authList.length" v-for="(item,index) in authList" :key="item.id">
-				<view class="leve_1">
-					<label @click="checkParent(item)">
+				<view class="leve_1" @click="checkParent(item)">
+					<label>
 					<checkbox :value="String(item.id)" :checked="item.checked" /> {{item.name}}
 					</label>
 				</view>
@@ -154,12 +154,22 @@
 			flex-grow: 1;
 			overflow: auto;
 			height: 100%;
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: space-between;
 			.leve_0{
 				padding:0;
+				width: 48%;
+				&:first-child{
+					width:100%;
+					margin-bottom: 20rpx;
+					.leve_1{
+						border-bottom: 1px solid #eee;
+					}
+				}
 				.leve_1{
-					padding: 15upx;
-					border-bottom: 1px solid #eee;
-					uni-label{
+					padding:10rpx 15rpx;
+					label{
 						display: block;
 					}
 				}

+ 25 - 4
pages/storeManage/storeAuth.vue

@@ -33,8 +33,10 @@
 					<u-input v-model="form.storeName" maxlength="30" placeholder="请输入门店名称(最多30个字符)"/>
 				</u-form-item>
 				<u-form-item label="所在地区" prop="label">
-					<u-input v-model="form.label" placeholder="请选择省市区" :disabled="true" @click="openAddress"/>
-					<Address ref="applyAddress" @onConfirm="areaConfirm"></Address>
+					<view @click="openAddress" :style="{color:form.label?'':'#c0c2c5'}" style="line-height: normal;" class="flex justify_between align_center">
+						{{form.label||'请选择省市区'}}
+						<u-icon name="arrow-down" color="#c0c2c5" size="28"></u-icon>
+					</view>
 				</u-form-item>
 				<u-form-item label="详细地址" prop="addrDetail">
 					<u-input type="textarea" maxlength="100" v-model="form.addrDetail" placeholder="请输入详细地址"/>
@@ -90,6 +92,7 @@
 		<view class="form-btn-con flex justify_center" v-if="!isRead">
 			<u-button class="form-btn" shape="circle" type="info" :loading="loading" :custom-style="{ background: '#066cff', color: '#fff',width:'350rpx' }" @click="formSubmit">提交审核</u-button>
 		</view>
+		<Address ref="applyAddress" @onConfirm="areaConfirm"></Address>
 	</view>
 </template>
 
@@ -184,11 +187,28 @@
 			this.$refs.uForm.setRules(this.rules);
 		},
 		onLoad() {
+			const _this = this
 			// 判断是否审核中
 			this.storeApply = this.$store.state.vuex_storeAuthInfo
 			if(this.storeApply){
 				this.isRead = this.storeApply.auditStatus == 'WAIT' || this.storeApply.auditStatus == 'PASS'
-				this.tipTit = this.storeApply.auditStatus == 'WAIT' ? '门店认证资料审核中,请耐心等待' : (this.storeApply.auditStatus == 'REFUSE' ? '门店认证资料审核不通过,请重新提交审核!' : '')
+				const titText = {'WAIT':'门店认证资料审核中,请耐心等待',"REFUSE":'门店认证资料审核不通过,请重新提交审核!','PASS':'门店认证审核已通过,请重新登录!'}
+				this.tipTit = titText[this.storeApply.auditStatus]
+				if(this.storeApply.auditStatus=='PASS'){
+					uni.showModal({
+						title: '提示',
+						content: '门店认证审核已通过,请重新登录!',
+						confirmText: '去登录',
+						showCancel: false,
+						success() {
+							_this.$store.dispatch('userLogout');
+							uni.redirectTo({
+								url: '/pages/login/login'
+							});
+						}
+					})						
+				}
+				// 赋值
 				this.form = Object.assign(this.form, this.storeApply)
 				this.storePhotoList = this.form.storeImage ? [{url:this.form.storeImage}] : []
 				this.yyzzPhotoList = this.form.licenseImage ? [{url:this.form.licenseImage}] : [],
@@ -271,7 +291,7 @@
 					console.log(res)
 					uni.showToast({icon: 'none',title: res.message,duration:3000})
 					if(res.status == 200){
-						 uni.$emit("updateAuthState")
+						 uni.$emit("refashHome")
 						 setTimeout(()=>{
 							 uni.switchTab({
 							 	url: "/pages/index/index"
@@ -291,6 +311,7 @@
 				this.form.label = e.label
 			},
 			openAddress(){
+				console.log('省市区')
 				//  省市区  回显     参数为省市区id数组
 				this.$refs.applyAddress.open(this.areaIdArr)
 			},

+ 31 - 17
pages/videos/index.vue

@@ -7,7 +7,7 @@
 				</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">
+						<scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom" v-if="swiperCurrent==indexs">
 							<view  
 							class="check-order-list" 
 							v-for="(item,index) in list" 
@@ -23,7 +23,7 @@
 											<u-icon size="30" color="#fff" name="eye-fill"></u-icon>
 											{{item.viewNum}}
 										</view>
-										<u-image :src="item.imageSet[0]" height="200px" width="100%"></u-image>
+										<u-image :src="item.images" height="200px" width="100%"></u-image>
 									</view>
 									<view class="ellipsis-two">{{item.titile}}</view>
 								</view>
@@ -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" :mid-button-size="80" :before-switch="beforeSwitch" :midButton="vuex_tabBarList.length==5"></u-tabbar>
 	</view>
 </template>
 
@@ -56,7 +56,7 @@
 				swiperCurrent: 0,
 				// 查询条件
 				pageNo: 1,
-				pageSize: 10,
+				pageSize: 5,
 				list: [],
 				total: 0,
 				videoObj:null
@@ -74,6 +74,10 @@
 		onLoad() {
 			this.pageInit()
 		},
+		// 页面卸载
+		onUnload() {
+			uni.$off('refashProm')
+		},
 		onHide() {
 			this.list.map(item => {
 				item.showVideo = false
@@ -83,16 +87,19 @@
 			pageInit(){
 				this.total = 0
 				this.pageNo = 1
+				this.list = []
 				this.getRow()
 			},
 			// tabs通知swiper切换
 			tabsChange(index) {
+				this.list = []
+				this.status = "loading"
 				this.swiperCurrent = index;
 			},
 			swiperChange(event){
-				console.log(event.detail)
 				this.list = []
 				this.status = "loading"
+				this.swiperCurrent = event.detail.current;
 			},
 			// swiper-item左右移动,通知tabs的滑块跟随移动
 			transition(e) {
@@ -112,7 +119,6 @@
 			},
 			// scroll-view到底部加载更多
 			onreachBottom() {
-				console.log(this.list.length, this.total)
 				if(this.list.length < this.total){
 					this.pageNo += 1
 					this.getRow()
@@ -133,16 +139,21 @@
 			  params.category = this.tabList ? this.tabList[this.swiperCurrent].code : ''
 			  this.status = "loading"
 			  getVideoList(params).then(res => {
-				if (res.code == 200 || res.status == 204 || res.status == 200) {
+				if (res.status == 200) {
 				  const list = res.data.list || []
-				  list.map(item => {
-					  item.showVideo = false
+				  const ret = []
+				  list.forEach(item => {
+					  ret.push({
+						  id: item.id,
+						  showVideo: false,
+						  contentType: item.contentType,
+						  titile: item.titile,
+						  viewNum: item.viewNum,
+						  images: item.images,
+						  content: item.content
+					  })
 				  })
-				  if(_this.pageNo>1){
-					  _this.list = _this.list.concat(list)
-				  }else{
-					  _this.list = list
-				  }
+				  _this.list = _this.list.concat(ret)
 				  _this.total = res.data.count || 0
 				} else {
 				  _this.list = []
@@ -161,7 +172,7 @@
 							item.viewNum = res.data.viewNum
 							this.list.splice()
 							uni.navigateTo({
-								url: "/pages/videos/detail?form=videoList&&title="+item.titile+"&&content="+item.content
+								url: "/pagesB/videos/detail?form=videoList&&title="+item.titile+"&&content="+item.content
 							})
 						}
 					})
@@ -172,8 +183,11 @@
 			},
 			// 扫描vin
 			beforeSwitch(index){
-				console.log(index)
-				if(index==1){
+				const row = this.$store.state.vuex_tabBarList[index]
+				if(row.text == '促销'){
+					uni.$emit('refashProm')
+				}
+				if(row.text == '扫描VIN'){
 					this.openCamera()
 				}else{
 					return true

+ 46 - 29
pages/vinInput/confirmVin.vue

@@ -14,7 +14,7 @@
 			<u-input v-model="verifyCode" :custom-style="{fontSize:'40rpx'}" type="text" height="90" :maxlength='17' input-align="center" placeholder="请输入VIN" :border="true" />
 		</view>
 		<view class="confirm-button">
-			<u-button @click="submitForm" :loading="loading" :custom-style="{background:'#066cff'}" type="primary" shape="circle">确认</u-button>
+			<u-button @click="okBtns" :loading="loading" :custom-style="{background:'#066cff'}" type="primary" shape="circle">确认</u-button>
 		</view>
 		<view class="share-list flex align_center">
 			<view @click="toScan">
@@ -46,7 +46,9 @@
 			return {
 				loading: false,
 				verifyCode: '',
-				vinImg: ''
+				vinImg: '',
+				carInfo: null,
+				type: ''
 			}
 		},
 		computed: {
@@ -61,13 +63,9 @@
 		onLoad(opts) {
 			this.verifyCode = opts.verifyCode || ''
 			this.vinImg = opts.filePath || ''
-			
+			this.type = opts.type
 			// 不是手动输入
 			if(opts.type == 'carmen'){
-				// 游客需要记录扫描记录
-				if(this.userInfo.sysUserFlag == '0' && this.verifyCode){
-					this.creatRecord(null)
-				}
 				// 如果识别返回空
 				if(!this.verifyCode){
 					uni.showToast({
@@ -75,6 +73,8 @@
 						title: 'VIN识别失败,请重新扫描或手动输入VIN'
 					})
 				}
+				// 获取车型信息
+				this.getCarInfo()
 			}
 		},
 		// 分享
@@ -139,19 +139,18 @@
 					year: data?data.year:'',
 					identifyType: this.userInfo.identifyType
 				}).then(res => {
-					console.log(res)
 					uni.$emit("refashHome")
 				})
 			},
-			// 提交并匹配车型
-			submitForm(){
-				// if(!this.hasShelf){
-				// 	uni.showToast({
-				// 		icon:'none',
-				// 		title: '门店没有关联数字货架,无法使用此功能!'
-				// 	})
-				// 	return
-				// }
+			okBtns(){
+				if(this.type == 'input'){
+					this.getCarInfo()
+				}else{
+					this.submitForm()
+				}
+			},
+			// 匹配车型
+			getCarInfo(){
 				const _this = this
 				const vinNo = this.verifyCode.toUpperCase()
 				if(vinNo.length>=17){
@@ -160,20 +159,22 @@
 						vin:vinNo
 					}).then(res => {
 						if (res.status == 200&&res.data) {
-							_this.creatRecord(_this.userInfo.sysUserFlag == '1' ? res.data : null)
-							// 打开选择配件页面
-							uni.redirectTo({
-								url: "/pagesA/digitalShelf/choosePart?vinNumber="+vinNo+"&carList="+encodeURIComponent(JSON.stringify(res.data))+'&type=news'
-							})
-						} else {
-							uni.showModal({
-								title: '匹配错误',
-								content: '此VIN码没有匹配的车型,请检查VIN码是否正确',
-								showCancel: false,
-								confirmText: '知道了'
+							_this.carInfo = res.data
+							// 记录扫码次数
+							_this.creatRecord(res.data)
+							// 手动收入
+							if(_this.type == 'input'){
+								_this.submitForm()
+							}
+						}else{
+							uni.showToast({
+								icon: 'none',
+								title: res.message
 							})
 						}
-						this.loading = false
+						setTimeout(()=>{
+							_this.loading = false
+						},300)
 					})
 				}else{
 					uni.showToast({
@@ -181,6 +182,22 @@
 						title: '请输入正确的VIN码'
 					})
 				}
+			},
+			submitForm(){
+				if(this.carInfo){
+					const vinNo = this.verifyCode.toUpperCase()
+					// 打开选择配件页面
+					uni.redirectTo({
+						url: "/pagesA/digitalShelf/choosePart?vinNumber="+vinNo+"&carList="+encodeURIComponent(JSON.stringify(this.carInfo))+'&type=news'
+					})
+				} else {
+					uni.showModal({
+						title: '匹配错误',
+						content: '此VIN码没有匹配的车型,请检查VIN码是否正确',
+						showCancel: false,
+						confirmText: '知道了'
+					})
+				}
 			}
 		}
 	}

+ 6 - 6
pagesA/activeDetail/index.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="content" v-if="detail">
-		<view class="titles">{{detail.title}}</view>
+		<!-- <view class="titles">{{detail.bannerName}}</view> -->
 		<view class="acitve-content">
 			<u-parse :html="content" :tag-style="style"></u-parse>
 		</view>
@@ -8,7 +8,7 @@
 </template>
 
 <script>
-	import { promoTerminalDetail } from '@/api/video.js'
+	import { shopBannerDetail } from '@/api/video.js'
 	export default {
 		data() {
 			return {
@@ -16,7 +16,7 @@
 				style: {
 					p: 'margin-bottom:10px;'
 				},
-				promoActiveSn: null
+				bannerSn: null
 			}
 		},
 		computed: {
@@ -25,7 +25,7 @@
 			}
 		},
 		onLoad(opts) {
-			this.promoActiveSn = opts.sn
+			this.bannerSn = opts.sn
 			this.getDetail()
 		},
 		methods: {
@@ -33,10 +33,10 @@
 				uni.showLoading({
 					title: "正在加载..."
 				})
-				promoTerminalDetail({sn:this.promoActiveSn}).then(res => {
+				shopBannerDetail({bannerSn:this.bannerSn}).then(res => {
 					this.detail = res.data
 					uni.setNavigationBarTitle({
-						title: res.data.name || '活动内容'
+						title: res.data.bannerName || '活动内容'
 					})
 					uni.hideLoading()
 				})

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 363 - 299
pagesA/digitalShelf/choosePart.vue


+ 23 - 16
pagesA/digitalShelf/choosePartResult.vue

@@ -4,8 +4,7 @@
 			<view class="statusH">
 				<view class="flex flex_column align_center">
 					<view class="status-row">
-						<u-icon :name="statusIcon" size="42" color="#fff"> 
-						</u-icon>
+						<u-icon :name="statusIcon" size="42" color="#fff"> </u-icon>
 						<text>{{statusText}}</text>
 					</view>
 					<view class="messageText" v-html="info&&info.shelfOrder&&info.shelfOrder.remindMessage||''"></view>
@@ -147,13 +146,11 @@
 </template>
 
 <script>
-	import uniIcons from "@/components/uni-icons/uni-icons.vue"
 	import moment from 'moment'
 	import { findBySnShelfOrder, takeGoods, rewardOrderFindBySn } from '@/api/shelf'
 	export default {
 	   name: 'choosePartResult',
 	   components: {
-		uniIcons,
 	   },
 	   data() {
 		   return {
@@ -170,31 +167,41 @@
 			   redPacketData: null
 		   }
 	   },
+	   onUnload() {
+		 this.$store.state.vuex_tempData = null
+	   },
 	   onLoad(option) { 
-		  this.info = option.data?JSON.parse(decodeURIComponent(option.data)):null
 		  this.state = option.state
-		  console.log(this.info,'-------------')
-		  if(option.state==1){
+		  // 更改标题栏背景色
+		  uni.setNavigationBarColor({
+		  	frontColor: '#ffffff',
+		  	backgroundColor: option.state==1 ? '#066cff':'#ff5500',
+		  })
+		  this.info = this.$store.state.vuex_tempData
+	   },
+	   onShow(){
+		   uni.showLoading({
+		   	title: '加载中...'
+		   })
+		   if(this.state==1){
 			  this.statusText = '拿货成功';
 			  this.statusIcon = 'checkmark-circle';
 			  // 获取配件列表
 			  this.partList = this.info.shelfOrder ? this.info.shelfOrder.shelfOrderDetailList : [];
+			  this.current = this.partList.length ? 0 : 1;
+			  
 			  this.tempPartList = this.info.shelfTempBill ? this.info.shelfTempBill.detailList : [];
 			  this.shelfOrderSn = this.info.shelfOrder ? this.info.shelfOrder.shelfOrderSn : '';
-			  this.current = this.partList.length ? 0 : 1;
 			  
 			  // 是否有红包活动奖励
 			  this.getOrderRedReward()
-		  }else{
+		   }else{
 			  this.statusText = '拿货失败'
 			  this.statusIcon = 'close-circle'
-		  }
-		  
-		  // 更改标题栏背景色
-		  uni.setNavigationBarColor({
-		  	frontColor: '#ffffff',
-		  	backgroundColor: option.state==1 ? '#066cff':'#ff5500',
-		  })
+		   }
+		   this.$nextTick(()=>{
+			  uni.hideLoading()
+		   })
 	   },
 	   computed: {
 		   totalNums(){

+ 237 - 0
pagesA/digitalShelf/components/otherPartItem.vue

@@ -0,0 +1,237 @@
+<template>
+	<block>
+		<view class="nav-right-item flex" v-for="item in list" :key="item.productSn">
+			<view class="uni-col-2">
+				<image 
+				:src="item.images ? item.images+'?x-oss-process=image/resize,m_fixed,h_60,w_60,color_ffffff' : '/static/def_imgs.png'" 
+				@click="viewImg(item)" 
+				style="width:100rpx;height:100rpx;border-radius: 30rpx;background-color: #EBEBEB;"
+				>
+				</image>
+			</view>
+			<view class="item-info uni-col-10">
+				<view class="item-name">
+					<text>{{item.name}}</text>
+				</view>
+				<view class="item-detail">
+					<view class="item-detail-info">
+						<view class="flex justify_between">
+							<text class="item-detail-text flex_1">{{item.code}}</text>
+							<text class="item-detail-text" style="width: 50%;text-align: right;">库存:{{item.currentInven?item.currentInven:0}}{{item.unit}}</text>
+						</view>
+						<view class="flex" v-if="item.productTypeSn=='543766811373752320'">
+							<uni-tag :text="item.origCode" inverted circle type="success"></uni-tag>
+						</view>
+						<view class="flex justify_between">
+							<view class="item-detail-text flex align_center"
+								@click="openPriceModal(item,0,showShelfDetial)">
+								<view class="item-price" :style="{color:!item.price?'#666':''}"
+									v-if="showCarPrice&&configPrice&&configPrice.shelf_price_show == '1'">
+									{{item.price?'¥'+item.price:'暂无价格'}}
+								</view>
+								<view class="item-price" :style="{color:!item.cost?'#666':''}"
+									v-if="showCostPrice&&configPrice&&configPrice.shelf_cost_show == '1'">
+									{{item.cost?'¥'+item.cost:'暂无价格'}}
+								</view>
+								<uni-icons type="arrowright" color="#00aaff" size="12"
+									v-if="priceShowVal&&showShelfDetial"></uni-icons>
+							</view>
+							<view class="item-detail-text flex align_center" v-if="item.currentInven">
+								<view 
+								class="qty-btn flex align_center justify_center"
+								@click="e=>{addPart(e,item)}" 
+								v-if="!item.checked"
+								>+</view>
+								<view class="flex align_center qty-box" v-else>
+									<view class="qty-btn" @click="e=>{changeQty(null,item.qty-1,item,1)}" :class="(item.qty <= 0)?'qty-disabled':''">-</view>
+									<view class="qty-num" :style="{width:Number(item.qty).toString().length*8+8+'px'}"><input type="number" @blur="e=>changeQty(null,Number(e.detail.value),item,0)" v-model="item.qty"/></view>
+									<view class="qty-btn" @click="e=>{changeQty(e,item.qty+1,item,1)}" :class="(item.qty >= item.currentInven)?'qty-disabled':''">+</view>
+								</view>
+							</view>
+							<view class="item-detail-text flex align_center" v-else>
+								<text @click="e=>{addPart(e,item)}" v-if="!item.checked" class="phtxt">我要急送</text>
+								<view class="flex align_center qty-box" v-else>
+									<view class="qty-btn" @click="e=>{changeQty(null,item.qty-1,item,1)}" :class="(item.qty <= 0)?'qty-disabled':''">-</view>
+									<view class="qty-num" :style="{width:Number(item.qty).toString().length*8+8+'px'}"><input type="number" @blur="e=>changeQty(null,Number(e.detail.value),item,0)" v-model="item.qty"/></view>
+									<view class="qty-btn" @click="e=>{changeQty(e,item.qty+1,item,1)}" :class="(item.qty >= 999)?'qty-disabled':''">+</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</block>
+</template>
+
+<script>
+	export default {
+		props: {
+			list: {
+				type: Array,
+				default: () => {
+					return []
+				}
+			},
+			configPrice: {
+				type: Object,
+				default: () => {
+					return {}
+				}
+			},
+			showCarPrice: {
+				type: Boolean,
+				default: false
+			},
+			showCostPrice: {
+				type: Boolean,
+				default: false
+			},
+			showShelfDetial: {
+				type: Boolean,
+				default: false
+			},
+			showNonShelfDetial: {
+				type: Boolean,
+				default: false
+			},
+			priceShowVal: {
+				type: Boolean,
+				default: false
+			},
+		},
+		data() {
+			return {}
+		},
+		methods: {
+			openPriceModal(item, type, show) {
+				this.$emit('openPrice', item, type, show)
+			},
+			addPart(e, item) {
+				this.$emit('addPart', e, item, 'other')
+			},
+			changeQty(event,value,item,type) {
+				const max = item.currentInven || 999
+				const v = value > max ? max : value
+				if(value > max && type == 0){
+					this.updateNums(event,value,item.productSn)
+					this.$nextTick(()=>{
+						this.updateNums(event,v,item.productSn)
+					})
+				}else{
+					this.updateNums(value > max ? null : event,v,item.productSn)
+				}
+			},
+			updateNums(event,value, id) {
+				this.$emit('updateNums', {
+					value: Number(value),
+					index: id,
+					event: event
+				})
+			},
+			viewImg(item) {
+				if(item.images){
+					this.$emit('viewImg',item)
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+	@import '/flex.css';
+	.qty-box{
+		display: flex;
+		.qty-num{
+			width: 25px;
+			height: 22px;
+			line-height: 22px;
+			padding:0 3px;
+			input{
+				width: 100%;
+				height: 100%;
+				text-align: center;
+				color: #333;
+			}
+		}
+	}
+	.qty-btn{
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 22px;
+		height: 22px;
+		border-radius: 50px;
+		font-size: 18px;
+		background-color: #066cff;
+		color: #fff;
+		&.qty-disabled{
+			background-color: #c0c0c0;
+		}
+	}
+	.nav-right-item {
+		padding: 15upx 25upx;
+		border-bottom: 2rpx solid #f5f5f5;
+
+		.uni-col-2 {
+			width: 50px;
+		}
+
+		.item-info {
+			padding-left: 10upx;
+			width: 80%;
+			flex-grow: 1;
+
+			.item-name {
+				font-size: 30upx;
+				color: #191919;
+				display: flex;
+				align-items: center;
+
+				>image {
+					width: 38rpx;
+					height: 38rpx;
+					margin-right: 10rpx;
+				}
+
+				>text {
+					flex: 1;
+					word-break: break-all;
+				}
+			}
+
+			.item-detail {
+				.item-detail-info {
+					padding: 10upx 0 4upx;
+
+					/deep/ .uni-tag {
+						word-break: break-all;
+						font-size: 28rpx;
+						color: #0fab04eee;
+						border: 0;
+						padding: 0.2rem 0.3rem;
+					}
+
+					>view {
+						padding-bottom: 10rpx;
+						align-items: center;
+
+						.item-detail-text {
+							color: #999;
+
+							.phtxt {
+								color: #0485F6;
+								font-size: 28upx;
+							}
+
+							.item-price {
+								color: #FB1E1E;
+								font-size: 28upx;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 237 - 0
pagesA/digitalShelf/components/vinPartItem.vue

@@ -0,0 +1,237 @@
+<template>
+	<block>
+		<view class="nav-right-item flex" v-for="item in list" :key="item.productSn">
+			<view class="uni-col-2">
+				<image
+				:src="item.images ? item.images+'?x-oss-process=image/resize,m_fixed,h_60,w_60,color_ffffff' : '/static/def_imgs.png'" 
+				@click="viewImg(item)" 
+				style="width:100rpx;height:100rpx;border-radius: 30rpx;background-color: #EBEBEB;"
+				>
+				</image>
+			</view>
+			<view class="item-info uni-col-10">
+				<view class="item-name">
+					<text>{{item.name}}</text>
+				</view>
+				<view class="item-detail">
+					<view class="item-detail-info">
+						<view class="flex justify_between">
+							<view class="flex align_center">
+								<text class="item-detail-text flex_1">{{item.code}}</text>
+								<uni-tag v-if="commonPartCode.includes(item.code)" size="small" style="margin-left: 5px;" text="通用" :circle="true" type="success"></uni-tag>
+							</view>
+							<text class="item-detail-text" style="width: 50%;text-align: right;" v-if="item.affiliation=='SHELF'">库存:{{item.currentInven?item.currentInven:0}} {{item.unit}}</text>
+						</view>
+						<view class="flex" v-if="item.productTypeSn=='543766811373752320'">
+							<uni-tag :text="item.origCode" inverted :circle="true" type="success"></uni-tag>
+						</view>
+						<view class="flex justify_between">
+							<view class="item-detail-text">
+								<!-- 货架产品 -->
+								<view class="flex align_center" @click="openPriceModal(item,1,showShelfDetial)" v-if="item.affiliation=='SHELF'">
+									<view class="item-price" :style="{color:!item.price?'#666':''}" v-if="showCarPrice&&configPrice&&configPrice.shelf_price_show == '1'">{{item.price?'¥'+item.price:'暂无价格'}}</view>
+									<view class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice&&configPrice&&configPrice.shelf_cost_show == '1'">{{item.cost?'¥'+item.cost:'暂无价格'}}</view>
+									<uni-icons type="arrowright" color="#00aaff" size="12" v-if="priceShowVal&&showShelfDetial"></uni-icons>
+								</view>
+								<!-- 非货架 -->
+								<view class="flex align_center" @click="openPriceModal(item,1,showNonShelfDetial)" v-else>
+									<view class="item-price" :style="{color:!item.price?'#666':''}" v-if="showCarPrice&&configPrice&&configPrice.non_shelf_price_show == '1'">{{item.price?'¥'+item.price:'暂无价格'}}</view>
+									<view class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice&&configPrice&&configPrice.non_shelf_cost_show == '1'">{{item.cost?'¥'+item.cost:'暂无价格'}}</view>
+									<uni-icons type="arrowright" color="#00aaff" size="12" v-if="priceShowVal&&showNonShelfDetial"></uni-icons>
+								</view>
+							</view>
+							<view class="item-detail-text" v-if="item.currentInven">
+								<view
+								class="qty-btn flex align_center justify_center"
+								@click="e=>{addPart(e,item)}" 
+								v-if="!item.checked"
+								>+</view>
+								<view class="flex align_center qty-box" v-else>
+									<view class="qty-btn" @click="e=>{changeQty(null,item.qty-1,item,1)}" :class="(item.qty <= 0)?'qty-disabled':''">-</view>
+									<view class="qty-num" :style="{width:Number(item.qty).toString().length*8+8+'px'}"><input type="number" @blur="e=>changeQty(null,Number(e.detail.value),item,0)" :value="item.qty"/></view>
+									<view class="qty-btn" @click="e=>{changeQty(e,item.qty+1,item,1)}" :class="(item.qty >= item.currentInven)?'qty-disabled':''">+</view>
+								</view>
+							</view>
+							<view class="item-detail-text" v-if="item.affiliation=='NON_SHELF'||!item.currentInven">
+								<text v-if="!item.checked" @click="e=>{addPart(e,item)}" class="phtxt">我要急送</text>
+								<view class="flex align_center qty-box" v-else>
+									<view class="qty-btn" @click="e=>{changeQty(null,item.qty-1,item,1)}" :class="(item.qty <= 0)?'qty-disabled':''">-</view>
+									<view class="qty-num" :style="{width:Number(item.qty).toString().length*8+8+'px'}"><input type="number" @blur="e=>changeQty(null,Number(e.detail.value),item,0)" :value="item.qty"/></view>
+									<view class="qty-btn" @click="e=>{changeQty(e,item.qty+1,item,1)}" :class="(item.qty >= 999)?'qty-disabled':''">+</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</block>
+</template>
+
+<script>
+	export default {
+		props: {
+			list: {
+				type: Array,
+				default: () => {
+					return []
+				}
+			},
+			commonPartCode: {
+				type: Array,
+				default: () => {
+					return []
+				}
+			},
+			configPrice: {
+				type: Object,
+				default: () => {
+					return {}
+				}
+			},
+			showCarPrice: {
+				type: Boolean,
+				default: false
+			},
+			showCostPrice: {
+				type: Boolean,
+				default: false
+			},
+			showShelfDetial: {
+				type: Boolean,
+				default: false
+			},
+			showNonShelfDetial: {
+				type: Boolean,
+				default: false
+			},
+			priceShowVal: {
+				type: Boolean,
+				default: false
+			},
+		},
+		data() {
+			return {
+			}
+		},
+		methods: {
+			openPriceModal(item, type, show) {
+				this.$emit('openPrice', item, type, show)
+			},
+			addPart(e,item) {
+				this.$emit('addPart', e, item, 'vin')
+			},
+			changeQty(event,value,item,type) {
+				const max = item.currentInven || 999
+				const v = value > max ? max : value
+				if(value > max && type == 0){
+					this.updateNums(event,value,item.productSn)
+					this.$nextTick(()=>{
+						this.updateNums(event,v,item.productSn)
+					})
+				}else{
+					this.updateNums(value > max ? null : event,v,item.productSn)
+				}
+			},
+			updateNums(event,value, id) {
+				this.$emit('updateVinNums', {
+					value: Number(value),
+					index: id,
+					event:event
+				})
+			},
+			viewImg(item){
+				if(item.images){
+					this.$emit('viewImg',item)
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+	@import '/flex.css';
+	.qty-box{
+		display: flex;
+		.qty-num{
+			width: 25px;
+			height: 22px;
+			line-height: 22px;
+			padding:0 3px;
+			input{
+				width: 100%;
+				height: 100%;
+				text-align: center;
+				color: #333;
+			}
+		}
+	}
+	.qty-btn{
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 22px;
+		height: 22px;
+		border-radius: 50px;
+		font-size: 18px;
+		background-color: #066cff;
+		color: #fff;
+		&.qty-disabled{
+			background-color: #c0c0c0;
+		}
+	}
+	.nav-right-item{
+		padding: 15upx 25upx;
+		border-bottom: 2rpx solid #f5f5f5;
+		.uni-col-2{
+			width: 50px;
+		}
+		.item-info{
+			padding-left: 10upx;
+			width: 80%;
+			flex-grow: 1;
+			.item-name{
+				font-size: 30upx;
+				color: #191919;
+				display: flex;
+				align-items: center;
+				>image{
+					width: 38rpx;
+					height: 38rpx;
+					margin-right: 10rpx;
+				}
+				>text{
+					flex: 1;
+					word-break: break-all;
+				}
+			}
+			.item-detail{
+				.item-detail-info{
+					padding: 10upx 0 4upx;
+					/deep/ .uni-tag{
+						word-break: break-all;
+						font-size: 28rpx;
+						color: #0fab04eee;
+						border: 0;
+						padding: 0.2rem 0.3rem;
+					}
+					> view{
+						padding-bottom: 10rpx;
+						align-items: center;
+						.item-detail-text{
+							color: #999;
+							.phtxt{
+								color: #0485F6;
+								font-size: 28upx;
+							}
+							.item-price{
+								color: #FB1E1E;
+								font-size: 28upx;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 7 - 9
pagesA/digitalShelf/orderDetail.vue

@@ -26,7 +26,7 @@
 			<!-- 头部车辆信息 -->
 			<div class="flex align-center cpb_header" v-if="info&&!info.billSource">
 				<div>
-					<u-image :src="info.vehicleLogo" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image>
+					<u-image :src="info.vehicleLogo?info.vehicleLogo:'/static/def_imgs.png'" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image>
 				</div>
 				<div class="flex flex_column justify_center align_start">
 					<view class="carModel flex align-center" v-if="info.vehicleNumber" >
@@ -49,9 +49,9 @@
 						{{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 v-for="item in partList" :key="item.productSn" class="flex align_center item-list">
 					<view>
-						<u-image :src="item.images" border-radius="16" width="130" height="130" bg-color="#EBEBEB" ></u-image>
+						<u-image :src="item.images?item.images:'/static/def_imgs.png'" border-radius="16" width="130" height="130" bg-color="#EBEBEB" ></u-image>
 					</view>
 					<view>
 						<view class="item-name">
@@ -100,7 +100,7 @@
 			</view>
 		</view>
 		<view class="footer flex align_center justify_center" v-if="info">
-			<u-button v-if="info.billState != 'CLOSE'&&info.settleState=='WAIT'" :throttle-time="100" @click="deleteRow" shape="circle" type="info">取消订单</u-button>
+			<u-button v-if="info.billState != 'CLOSE'&&info.settleState=='WAIT'" :throttle-time="100" @click="deleteRow" shape="circle" plain type="error">取消订单</u-button>
 			<!-- <u-button v-if="info.billState == 'WAIT'" :throttle-time="100" @click="sanCodeRow" :custom-style="{background:'#066cff',color:'#fff'}" shape="circle" type="success">扫码取货</u-button> -->
 			<u-button v-if="info.billState == 'WAIT'" :throttle-time="100" @click="onceQh()" :loading="loading" :custom-style="{background:'#066cff',color:'#fff'}" shape="circle" type="success">一键取货</u-button>
 		</view>
@@ -109,13 +109,11 @@
 
 <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() {
@@ -399,7 +397,6 @@
 					padding: 20rpx 0;
 					&:first-child{
 						margin-right: 20rpx;
-						margin-top: 18rpx;
 					}
 					&:last-child{
 						flex-grow: 1;
@@ -407,7 +404,7 @@
 				}
 				.item-name{
 					word-wrap: break-word;
-					font-size: 32rpx;
+					font-size: 28rpx;
 					color: #333;
 					font-weight: bold;
 					margin-top: 10rpx;
@@ -415,7 +412,7 @@
 				.item-nums{
 					padding: 10rpx 0;
 					text{
-						font-size: 32rpx;
+						font-size: 28rpx;
 						color: #222222;
 					}
 				}
@@ -424,6 +421,7 @@
 					align-items: center;
 					justify-content: space-between;
 					color: #666;
+					font-size: 28rpx;
 					> view{
 						&:first-child{
 							font-size: 28rpx;

+ 19 - 87
pagesA/digitalShelf/orderList.vue

@@ -7,7 +7,7 @@
 				</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">
+						<scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom" v-if="swiperCurrent == indexs">
 							<view  
 							class="check-order-list" 
 							v-for="(item,index) in list" 
@@ -18,7 +18,7 @@
 									<view class="orderNo">{{item.shelfOrderNo}}</view>
 									<view class="times">{{item.createDate}}</view>
 								</view>
-								 <view class="check-row flex align-center">
+								 <view class="check-row check-row-info flex align_center">
 									 <view class="carImage">
 										 <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> 
@@ -39,6 +39,9 @@
 										  </view>
 									 </view>
 									 <view v-else>
+										 <view class="carModel flex">
+										 	<text>{{item.shelfOrderDetailList[0].productName}}</text>
+										 </view>
 										  <view class="pcode flex">
 											 <text>{{item.shelfOrderDetailList[0].productCode}}</text>
 										  </view>
@@ -48,9 +51,6 @@
 										  		<u-tag :text="item.shelfOrderDetailList[0].origCode" mode="light" borderColor="#ffffff" type="warning" size="large"></u-tag>
 										  	</view>
 										  </view>
-										  <view class="carModel flex">
-											  <text>{{item.shelfOrderDetailList[0].productName}}</text>
-										  </view>
 									 </view>
 								 </view>
 								 <view class="check-row">
@@ -144,12 +144,14 @@
 			},
 			// tabs通知swiper切换
 			tabsChange(index) {
+				this.list = []
+				this.status = "loading"
 				this.swiperCurrent = index;
 			},
 			swiperChange(event){
-				console.log(event.detail)
 				this.list = []
 				this.status = "loading"
+				this.swiperCurrent = event.detail.current
 			},
 			// swiper-item左右移动,通知tabs的滑块跟随移动
 			transition(e) {
@@ -313,7 +315,6 @@
 				box-shadow: 1px 1px 3px #EEEEEE;
 				.check-row{
 					display: flex;
-					padding: 20upx 10upx;
 					font-size: 28upx;
 					/deep/ .u-tag{
 						word-break: break-all;
@@ -321,9 +322,9 @@
 					&:first-child{
 						color: #666E75;
 						font-size: 24upx;
-						padding-bottom: 10upx;
+						padding: 20upx 0;
 						.orderNo{
-							font-size: 30upx;
+							font-size: 28upx;
 							color: #222222;
 							margin-top: -6upx;
 							flex-grow: 1;
@@ -346,8 +347,8 @@
 							margin-bottom: 10rpx;
 						}
 						.carModel{
-							color: #222222;
-							font-size: 32upx;
+							color: #333;
+							font-size: 28upx;
 							font-weight: bold;
 							line-height: normal;
 							margin-bottom: 10rpx;
@@ -376,7 +377,7 @@
 						color: #fff;
 						border-radius: 100rpx;
 						margin-left: 15upx;
-						font-size: 24upx;
+						font-size: 22upx;
 						&:after{
 							border: 0;
 						}
@@ -389,84 +390,15 @@
 						background-color: #066cff;
 					}
 					.del{
-						color: #666;
-						border:2rpx solid #EDEDED;
-						background: none;
+						color: #fa3534;
+						border-color: #fab6b6;
+						background-color: #fef0f0;
 					}
 				}
-			}
-		}
-	}
-    
-	.search-popup{
-		.search-title{
-			text-align: center;
-			padding: 20upx;
-			color: #333;
-			border-bottom: 1px solid #eee;
-		}
-		.uni-list{
-			padding:10upx 20upx;
-			margin: 0;
-			border-bottom: 1px solid #EEEEEE;
-			.uni-list-cell{
-				border: 0;
-				.uni-list-cell-db{
-					flex: 1;
-					width: 100%;
+				.check-row-info{
+					padding-top: 10px;
+					padding-bottom: 5px;
 				}
-				.uni-input{
-					height: 2.5em;
-					line-height: 2.5em;
-					font-size: 28upx;
-					display: flex;
-					align-items: center;
-					> view{
-						&:first-child{
-							flex-grow: 1;
-							color: #666;
-						}
-						&:last-child{
-							color: #999;
-						}
-					}
-				}
-				.item-icon{
-					margin-left: 10upx;
-				}
-			}
-		}
-		.uni-list-btns{
-			display: flex;
-			padding: 50upx 20upx;
-			uni-button{
-				font-size: 28upx;
-				margin: 0 30upx;
-				flex:1;
-				border-radius: 100upx;
-				&:after{
-					border: 0;
-				}
-			}
-		}
-		.checkbox-items{
-			display: flex;
-			flex-wrap: wrap;
-			justify-content: space-between;
-			.checkbox{
-				width: 24%;
-				background: #F8F8F8;
-				text-align: center;
-				margin: 20upx 0;
-				padding: 10upx 0;
-				border-radius: 50upx;
-				font-size: 24upx;
-				border:1upx solid #eee;
-			}
-			.checked{
-				background: rgba(4, 133, 246, 0.15);
-				border-color: rgba(4, 133, 246, 0.5);
-				color: rgba(4, 133, 246, 1);
 			}
 		}
 	}

+ 4 - 4
pagesA/digitalShelf/settlementManage/settlementAyDetail.vue

@@ -186,7 +186,7 @@
 	display: flex;
 	flex-direction: column;
 	> view{
-		padding: 30rpx 50rpx;
+		padding: 30rpx;
 	}
 	.monthSel{
 		padding: 0;
@@ -200,7 +200,7 @@
 	.sxjs-box{
 		> view{
 			background-color: #fff;
-			border-radius: 25rpx;
+			border-radius: 15rpx;
 			min-height: 100rpx;
 			padding: 30rpx;
 			color: #666;
@@ -224,11 +224,11 @@
 	}
 	.ds-box{
 		flex-grow: 1;
-		padding: 0 50rpx;
+		padding: 0 30rpx;
 		overflow: auto;
 		.ds-list{
 			background-color: #fff;
-			border-radius: 25rpx;
+			border-radius: 15rpx;
 			margin-bottom: 20rpx;
 			min-height: 100rpx;
 			padding: 10rpx;

+ 4 - 6
pagesA/digitalShelf/settlementManage/settlementManage.vue

@@ -38,7 +38,7 @@
 					<view>{{item.month}}月</view>
 					<view>
 						<text>¥{{item.settleAmount}}</text>
-						<uniIcons color="#999" size="20" type="arrowright"></uniIcons>
+						<u-icon color="#999" size="20" name="arrow-right"></u-icon>
 					</view>
 				</view>
 				<view style="padding-top: 10%;border:0" v-if="ayJsList.length==0 && status!='loading'">
@@ -53,11 +53,9 @@
 </template>
 
 <script>
-	import uniIcons from '@/components/uni-icons/uni-icons.vue';
 	import {findStoreShelfSettleRule,waitSettleForMonth} from '@/api/shelf'
 	export default {
 		components: {
-			uniIcons
 		},
 		data() {
 			return {
@@ -126,12 +124,12 @@
 .settlement-pages{
 	min-height: 100vh;
 	> view{
-		padding: 30rpx 50rpx;
+		padding: 30rpx 30rpx;
 	}
 	.sxjs-box{
 		> view{
 			background-color: #fff;
-			border-radius: 25rpx;
+			border-radius: 15rpx;
 			margin-bottom: 20rpx;
 			min-height: 100rpx;
 			padding: 30rpx;
@@ -172,7 +170,7 @@
 	.ayjs-box{
 		> view{
 			background-color: #fff;
-			border-radius: 25rpx;
+			border-radius: 15rpx;
 			margin-bottom: 20rpx;
 			min-height: 100rpx;
 			padding: 30rpx;

+ 4 - 6
pagesA/digitalShelf/settlementManage/settlementSxDetail.vue

@@ -62,11 +62,9 @@
 </template>
 
 <script>
-	import uniIcons from '@/components/uni-icons/uni-icons.vue';
 	import { waitSettleForSx,shelfSettleBillToPay,findStoreShelfSettleRule } from '@/api/shelf.js'
 	export default {
 		components: {
-			uniIcons
 		},
 		data() {
 			return {
@@ -163,12 +161,12 @@
 	display: flex;
 	flex-direction: column;
 	> view{
-		padding: 30rpx 50rpx;
+		padding: 30rpx;
 	}
 	.sxjs-box{
 		> view{
 			background-color: #fff;
-			border-radius: 25rpx;
+			border-radius: 15rpx;
 			min-height: 100rpx;
 			padding: 30rpx;
 			color: #666;
@@ -228,11 +226,11 @@
 	}
 	.ds-box{
 		flex-grow: 1;
-		padding: 0 50rpx;
+		padding: 0 30rpx;
 		overflow: auto;
 		.notes-msg{
 			background-color: #F8ECD9;
-			border-radius: 25rpx;
+			border-radius: 15rpx;
 			margin-bottom: 20rpx;
 			min-height: 100rpx;
 			padding: 30rpx;

+ 0 - 2
pagesA/digitalShelf/settlementRecord/settlementDetail.vue

@@ -68,11 +68,9 @@
 
 <script>
 	import carNo from '@/components/carNo.vue'
-	import uniIcons from '@/components/uni-icons/uni-icons.vue';
 	import { getShelfOrderList } from "@/api/shelf.js"
 	export default {
 		components: {
-			uniIcons,
 			carNo
 		},
 		data() {

+ 5 - 3
pagesA/digitalShelf/stockPut.vue

@@ -7,7 +7,7 @@
 				</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">
+						<scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom" v-if="swiperCurrent == indexs">
 							<view style="height: 20rpx;" ></view>
 							<view  
 							class="check-order-list" 
@@ -126,12 +126,14 @@
 			},
 			// tabs通知swiper切换
 			tabsChange(index) {
-				this.swiperCurrent = index;
+				this.list = []
+				this.status = "loading"
+				this.swiperCurrent = index
 			},
 			swiperChange(event){
-				console.log(event.detail)
 				this.list = []
 				this.status = "loading"
+				this.swiperCurrent = event.detail.current
 			},
 			// swiper-item左右移动,通知tabs的滑块跟随移动
 			transition(e) {

+ 12 - 17
pagesA/digitalShelf/stockPutDetail.vue

@@ -40,17 +40,8 @@
 						<view class="item-name">
 						  <text>{{item.productName||'--'}}</text>
 						</view>
-						<view class="item-nums flex align-center justify_between">
+						<view class="item-nums">
 							<text>{{item.productCode||'--'}}</text>
-							<!-- <view>
-								<u-number-box :min="0" :max="999999"></u-number-box>
-							</view> -->
-							<view v-if="pageInfo&&pageInfo.billState=='FINISH'">
-								<text>入库数量:{{item.putQty||item.putQty==0?item.putQty:'--'}}</text>
-							</view>
-							<view v-else>
-								<text>待入库数量:{{item.confirmQty||item.confirmQty==0?item.confirmQty:'--'}}</text>
-							</view>
 						</view>
 						<view class="flex align_center" v-if="item.productTypeSn3=='543766811373752320'" style="margin-top: 5px;">
 							<text class="item-detail-text">原厂编码:</text>
@@ -58,6 +49,14 @@
 								<u-tag :text="item.origCode" mode="light" borderColor="#ffffff" type="warning" size="large"></u-tag>
 							</view>
 						</view>
+						<view class="item-nums flex align-center justify_end">
+							<view v-if="pageInfo&&pageInfo.billState=='FINISH'">
+								<text>入库数量:{{item.putQty||item.putQty==0?item.putQty:'--'}}</text>
+							</view>
+							<view v-else>
+								<text>待入库数量:{{item.confirmQty||item.confirmQty==0?item.confirmQty:'--'}}</text>
+							</view>
+						</view>
 					</view>
 				</view>
 			</view>
@@ -66,13 +65,11 @@
 </template>
 
 <script>
-	import uniIcons from "@/components/uni-icons/uni-icons.vue"
 	import moment from 'moment'
 	import { findShelfReplenishBill } from '@/api/shelf.js'
 	export default {
 	   name: 'orderDetail-digitalShel',
 	   components: {
-		uniIcons,
 	   },
 	   data() {
 		   return {
@@ -202,17 +199,15 @@
 				}
 				.item-name{
 					word-wrap: break-word;
-					font-size: 32rpx;
+					font-size: 28rpx;
 					color: #333;
 					font-weight: bold;
 					margin-top: 10rpx;
 				}
 				.item-nums{
-					margin-top: 10rpx;
-					padding: 10rpx 0;
 					text{
-						font-size: 32rpx;
-						color: #222222;
+						font-size: 28rpx;
+						color: #666;
 					}
 				}
 			}

+ 9 - 11
pagesA/digitalShelf/tempOrderList/orderDetail.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="orderDetail-digitalShel flex flex_column">
-		<view class="contHead" :style="{background:state== 0?'#1283d4':'#06ab50',color:'#fff'}">
+		<view class="contHead" :style="{background:state== 0?'#066cff':'#06ab50',color:'#fff'}">
 			<view class="statusH">
 				<view class="flex flex_column align_center">
 					<view class="status-row">
@@ -16,7 +16,7 @@
 			<!-- 头部车辆信息 -->
 			<div class="flex align-center cpb_header" v-if="info">
 				<div>
-					<u-image :src="info.vehicleLogo" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image>
+					<u-image :src="info.vehicleLogo?info.vehicleLogo:'/static/def_imgs.png'" border-radius="30" width="100" height="100" bg-color="#EBEBEB" ></u-image>
 				</div>
 				<div class="flex flex_column justify_center align_start">
 					<view class="carModel flex align-center" v-if="info.vehicleNumber" >
@@ -39,9 +39,9 @@
 						{{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 v-for="item in partList" :key="item.productSn" class="flex align_center item-list">
 					<view>
-						<u-image :src="item.images" border-radius="16" width="130" height="130" bg-color="#EBEBEB" ></u-image>
+						<u-image :src="item.images?item.images:'/static/def_imgs.png'" border-radius="16" width="130" height="130" bg-color="#EBEBEB" ></u-image>
 					</view>
 					<view>
 						<view class="item-name">
@@ -86,13 +86,11 @@
 
 <script>
 	import carNo from '@/components/carNo.vue'
-	import uniIcons from "@/components/uni-icons/uni-icons.vue"
 	import moment from 'moment'
 	import { getShelfTempBillDetail } from '@/api/shelf.js'
 	export default {
 	   name: 'orderDetail-digitalShel',
 	   components: {
-		uniIcons,
 		carNo
 	   },
 	   data() {
@@ -114,7 +112,7 @@
 		  // 更改标题栏背景色
 		  uni.setNavigationBarColor({
 		  	frontColor: '#ffffff',
-		  	backgroundColor: option.state== 0 ? '#1283d4':'#06ab50',
+		  	backgroundColor: option.state== 0 ? '#066cff':'#06ab50',
 		  })
 	   },
 	   onShow() {
@@ -330,7 +328,6 @@
 					padding: 20rpx 0;
 					&:first-child{
 						margin-right: 20rpx;
-						margin-top: 18rpx;
 					}
 					&:last-child{
 						flex-grow: 1;
@@ -338,7 +335,7 @@
 				}
 				.item-name{
 					word-wrap: break-word;
-					font-size: 32rpx;
+					font-size: 28rpx;
 					color: #333;
 					font-weight: bold;
 					margin-top: 10rpx;
@@ -346,8 +343,8 @@
 				.item-nums{
 					padding: 10rpx 0;
 					text{
-						font-size: 32rpx;
-						color: #222222;
+						font-size: 28rpx;
+						color: #333;
 					}
 				}
 				.item-head{
@@ -356,6 +353,7 @@
 					justify-content: space-between;
 					color: #666;
 					margin-top: 5px;
+					font-size: 28rpx;
 					> view{
 						&:first-child{
 							font-size: 28rpx;

+ 8 - 5
pagesA/digitalShelf/tempOrderList/tempOrderList.vue

@@ -7,7 +7,7 @@
 				</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">
+						<scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom" v-if="swiperCurrent == indexs">
 							<view  
 							class="check-order-list" 
 							v-for="(item,index) in list" 
@@ -18,7 +18,7 @@
 									<view class="orderNo">{{item.tempNo}}</view>
 									<view class="times">{{item.createDate}}</view>
 								</view>
-								 <view class="check-row flex align-center">
+								 <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>
@@ -128,12 +128,14 @@
 			},
 			// tabs通知swiper切换
 			tabsChange(index) {
+				this.list = []
+				this.status = "loading"
 				this.swiperCurrent = index;
 			},
 			swiperChange(event){
-				console.log(event.detail)
 				this.list = []
 				this.status = "loading"
+				this.swiperCurrent = event.detail.current
 			},
 			// swiper-item左右移动,通知tabs的滑块跟随移动
 			transition(e) {
@@ -257,6 +259,7 @@
 					&:last-child{
 						align-items: center;
 						justify-content: space-between;
+						padding-top: 0;
 						.nums{
 							font-size: 28upx;
 							color: #033692;
@@ -264,8 +267,8 @@
 					}
 					> view{
 						.carModel{
-							color: #222222;
-							font-size: 32upx;
+							color: #333;
+							font-size: 28upx;
 							font-weight: bold;
 							line-height: normal;
 							margin-bottom: 10rpx;

+ 8 - 2
pagesA/qualityPolicy/creatOrder.vue

@@ -80,7 +80,7 @@
 					const hasCode = await getTraceCodeQueryList({traceCode: this.uuidCode,pageSize:1,pageNo:1}).then(res => res.data)
 					console.log(hasCode)
 					// 已存在,且没有使用过
-					if(hasCode.count==0){
+					if(hasCode && hasCode.count==0){
 						uni.showToast({
 							icon: 'none',
 							title: '唯一码不存在'
@@ -88,7 +88,7 @@
 						this.loading = false
 						return
 					}
-					if(hasCode.list && hasCode.list.length > 0){
+					if(hasCode && hasCode.list && hasCode.list.length > 0){
 						if(!hasCode.list[0].warrantyState){
 							this.uuid.push(hasCode.list[0])
 						}else{
@@ -98,6 +98,12 @@
 							})
 						}
 					}
+					if(!hasCode){
+						uni.showToast({
+							icon: 'none',
+							title: '系统异常,请联系管理员!'
+						})
+					}
 					this.uuidCode = ''
 					this.loading = false
 				}else{

+ 2 - 1
pagesA/queryByCode/confirmQh.vue

@@ -99,9 +99,10 @@
 			},
 			toDetail(data){
 				uni.$emit("updateQueryByCodeList")
+				this.$store.state.vuex_tempData = {shelfOrder:data}
 				// 提交成功
 				uni.redirectTo({
-					url:"/pagesA/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify({shelfOrder:data}))+"&state=1"
+					url:"/pagesA/digitalShelf/choosePartResult?state=1"
 				})
 			},
 			// 确认拿货

+ 58 - 42
pagesA/queryByCode/queryByCode.vue

@@ -1,24 +1,24 @@
 <template>
 	<view class="content flex flex_column">
-		<view class="searchBar">
-			<view class="search flex align_center">
-				<view class="input">
-					<u-search 
-					focus
-					v-model="queryWord" 
-					@input="change"
-					@custom="search" 
-					@search="search" 
-					@clear="clearSearch"
-					:height="90"
-					bg-color="#fff" 
-					:action-style="{borderRadius:'50rpx',color:'#ffffff',width: '120rpx',padding:'12rpx 20rpx',background:'#00aaff'}" 
-					placeholder="请输入产品编码搜索"></u-search>
-				</view>
-			</view>
-		</view>
+		<uni-nav-bar left-icon="arrowleft" title="按编码查询" @clickLeft="back" statusBar fixed></uni-nav-bar>
 		<view class="check-list">
-			<scroll-view scroll-y class="scroll-view" @scrolltolower="onreachBottom">
+			<scroll-view scroll-y type="custom" class="scroll-view" @scrolltolower="onreachBottom">
+				<sticky-header>
+					<view class="searchBar">
+						<uni-search-bar
+						radius="100" 
+						focus 
+						cancelButton="none"
+						placeholder="请输入产品编码搜索" 
+						bg-color="#f3f3f3"
+						@input="change"
+						@confirm="search" 
+						@blur="search"
+						@clear="clearSearch"
+						v-model="queryWord" 
+						clearButton="auto"/>
+					</view>
+				</sticky-header>
 				<view class="partList-list-box" v-for="item in partList" :key="item.id">
 					<view class="product flex align_center" @click="toEdit(item)">
 						<view class="flex align_center flex_1">
@@ -29,10 +29,10 @@
 								<view class="pname flex align_center justify_between">
 									<view class="code"><text>{{item.shelfPlaceCode}}</text>{{item.code}}</view>
 								</view>
-								<view class="flex align_center" v-if="item.productTypeSn=='543766811373752320'" style="padding-top: 5px;">
+								<view class="flex align_center" v-if="item.productTypeSn=='543766811373752320'&&item.origCode" style="padding-top: 5px;">
 									<text class="item-detail-text">原厂编码:</text>
 									<view style="width: 50%;flex-grow: 1;">
-										<u-tag :text="item.origCode" mode="light" borderColor="#ffffff" type="warning" size="large"></u-tag>
+										<uni-tag :text="item.origCode" inverted :circle="true" type="warning"></uni-tag>
 									</view>
 								</view>
 								<view class="ptxt">
@@ -49,11 +49,14 @@
 								</view>
 							</view>
 						</view>
+						<view class="flex align_center justify_center">
+							<uni-icons type="arrowright" size="20" color="#999"></uni-icons>
+						</view>
 					</view>
 				</view>
 				<view style="padding: 20upx;">
-					 <u-empty :src="`/static/nodata.png`" icon-size="180" :text="noDataText" img-width="120" v-if="partList.length==0 && status!='loading'" mode="list"></u-empty>
-					 <u-loadmore v-if="(total>=partList.length&&partList.length)||status=='loading'" :status="status" />
+					<sklineTemp v-if="partList.length==0 && status!='loading'" :text="noDataText"/>
+					<uni-load-more v-if="(total>=partList.length&&partList.length)||status=='loading'" :status="status"/>
 				</view>
 			</scroll-view>
 		</view>
@@ -61,8 +64,12 @@
 </template>
 
 <script>
+	import sklineTemp from '@/components/skline/sklineTemp.vue'
 	import { getShelfProductList,findShelfUserParam } from '@/api/shelf'
 	export default {
+		components:{
+			sklineTemp
+		},
 		data() {
 			return {
 				queryWord: '',
@@ -99,6 +106,9 @@
 			uni.$off("updateQueryByCodeList")
 		},
 		methods: {
+			back(){
+				uni.navigateBack()
+			},
 			getShowPriceType(){
 				findShelfUserParam({shelfSn: this.shelfSn}).then(res => {
 					this.priceShowVal = res.data ? res.data.carOwnerPrice == '1' && res.data.purchasesPrice == '1' : false
@@ -143,9 +153,13 @@
 			},
 			clearSearch(){
 				this.queryWord = ''
-				this.search()
+				this.pageNo = 1
+				this.partList = []
 			},
 			search(){
+				if(this.queryWord == ''){
+					return
+				}
 				this.pageNo = 1
 				this.partList = []
 				this.getpartList()
@@ -163,7 +177,6 @@
 					uni.hideLoading()
 					if(res.status == 200){
 						let list = res.data.list
-						console.log(list)
 						if (list && list.length){
 							// 分页 拼接数据
 							if (_this.pageNo != 1) {
@@ -209,35 +222,29 @@
 .content{
 	height: 100vh;
 	width: 100%;
-	padding: 0 0.5rem;
+	padding: 0;
 	background: #fff;
-	.searchBar{
-		padding: 0 0.3rem;
-		.search{
-			padding: 0.5rem 0.5rem 0.3rem 0.5rem;
-			.input{
-				flex-grow: 1;
-				border:0.1rpx solid #eee;
-				padding: 0.1rpx;
-				border-radius: 50rpx;
-				padding-right: 10rpx;
-			}
-		}
-	}
 	.check-list{
 		flex-grow: 1;
+		background: #f8f8f8;
 		.scroll-view{
-			height: calc(100vh - 180rpx);
+			height: 100%;
 			box-sizing: border-box;
+			.searchBar{
+				background-color: #fff;
+			}
 		}
 		.partList-list-box{
-			padding: 20rpx 30rpx;
-			border-bottom: 2rpx solid #f5f5f5;
+			padding: 10rpx 20rpx;
 			&:last-child{
 				border:0;
 			}
 			.product{
 				flex-grow: 1;
+				padding: 20rpx;
+				background-color: #fff;
+				border-radius: 10rpx;
+				box-shadow: 1px 1px 3px #eee;
 				&:active{
 					opacity: 0.6;
 					background-color: #f8f8f8;
@@ -245,8 +252,13 @@
 				.pinfo{
 					flex-grow: 1;
 					padding-left: 20rpx;
-					/deep/ .u-tag{
+					width: 80%;
+					/deep/ .uni-tag{
 						word-break: break-all;
+						font-size: 28rpx;
+						color: #0fab04eee;
+						border: 0;
+						padding: 0.2rem 0.3rem;
 					}
 					.item-detail-text{
 						color: #999;
@@ -255,6 +267,8 @@
 						font-size: 28rpx;
 						color: #191919;
 						.code{
+							display: flex;
+							align-items: center;
 							text{
 								font-weight: normal;
 								margin-right: 6rpx;
@@ -266,6 +280,8 @@
 							}
 						}
 						.kc{
+							display: flex;
+							align-items: center;
 							color: #999;
 							text{
 								color: #333;

+ 0 - 0
static/icon_shopping@3x.png → pagesA/static/icon_shopping@3x.png


+ 807 - 0
pagesB/cart/index.vue

@@ -0,0 +1,807 @@
+<template>
+	<view class="pages">
+		<!-- head -->
+		<sklineHeader title="购物车"></sklineHeader>
+		<view class="cart-body">
+				<!-- 内容 -->
+				<scroll-view 
+				scroll-y 
+				class="cart-list" 
+				type="custom" 
+				:bounces="false"
+				@scrolltolower="onreachBottom">
+					<sticky-header>
+						 <!-- 头部 -->
+						 <view class="cart-head" v-if="total>0">
+						 	<view class="cart-head-left">共<text>{{total}}</text>款商品</view>
+						 	<view class="cart-head-right">
+								<view class="cart-head-btton blue" @click="editAll">
+									<text>{{editFlag?'完成':'编辑'}}</text>
+								</view>
+							</view>
+						 </view>
+					</sticky-header>
+					<productItem
+					v-for="(item, index) in list"
+					:key="index"  
+					:list="item" 
+					@changeQty="changeQty" 
+					@check="chooseItem"
+					@editQty="editQty"
+					@remove="removeCart">
+					</productItem>
+					<!-- loading -->
+					<view class="loading-bar" v-if="total>0 && status!='loading'">{{noDataText}}</view>
+					<view class="empty-bar" v-if="total==0 && status!='loading'" @click="goBack">
+						<image mode="aspectFit" :src="empty.imgUrl"></image>
+						<view>{{empty.tip}}</view>
+					</view>
+				</scroll-view>
+				<!-- 底部 -->
+				<view class="cart-footer" v-if="total>0">
+					<view class="cart-footer-box">
+						<view class="cart-footer-left">
+								<view class="cart-footer-left-all" @click="chooseAll">
+									<view class="cart-footer-left-all-icon">
+										<uni-icons v-if="allDisabled&&!editFlag" type="circle-filled" size="24" color="#ccc"></uni-icons>
+										<uni-icons v-else :type="allChecked?'checkbox-filled':'circle'" size="24" :color="allChecked?'#dd0000':'#666'"></uni-icons>
+									</view>
+									<view class="cart-footer-left-all-text">
+										<text>全选</text>
+									</view>
+								</view>
+						</view>
+						<view class="cart-footer-right">
+							<view class="cart-footer-left-price" v-if="!editFlag && totalAmount">
+								<view class="flex align_center">
+									<view class="cart-footer-left-price-text">
+										<text>合计:</text>
+									</view>
+									<view class="cart-footer-left-price-num">
+										¥<text>{{Number(totalAmount).toFixed(2).toString().split('.')[0]}}</text>.{{Number(totalAmount).toFixed(2).toString().split('.')[1]}}
+									</view>
+								</view>
+								<view class="flex align_center" v-if="totalDiscount||totalCoupon">
+									<view class="cart-footer-left-price-text1">
+										<text v-if="totalDiscount">优惠:¥{{Number(totalDiscount).toFixed(2)}}</text>
+										<text v-if="totalCoupon">代金券:¥{{Number(totalCoupon).toFixed(2)}}</text>
+									</view>
+								</view>
+							</view>
+							<view v-else></view>
+							<view class="cart-footer-right-button">
+								<button class="btns" :loading="loading" v-if="!editFlag" type="warn" size="mini" @click="settlement">去结算({{totalNum}})</button>
+								<button v-else class="btns" type="warn" plain size="mini" @click="batchRemove">删除({{totalSel}})</button>
+							</view>
+						</view>
+					</view>
+					<view :style="{height:safeAreaBottom+'px'}"></view>
+				</view>
+		</view>
+		<!-- 修改数量弹框 -->
+		<uni-popup ref="showPopu" type="center" :maskClick="false">
+			<view class="popu-content">
+				<view class="popu-close" @click="closePopu">
+					<uni-icons size="26" type="closeempty"></uni-icons>
+				</view>
+				<view class="popu-content-title flex align_center justify_center"><text>修改商品数量</text></view>
+				<view class="popu-content-num flex align_center justify_center">
+					<uni-number-box v-model="curEditRow.qty" :size="28" :input-width="280" :input-height="70" :min="1" :max="999"></uni-number-box>
+				</view>
+				<view class="popu-content-btn">
+					<view class="popu-content-btn-item cancelBtn" @click="closePopu">取消</view>
+					<view class="popu-content-btn-item okbtn" @click="changeSingQty">确定</view>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import {
+	    mapState,
+	    mapMutations,
+	} from 'vuex'
+	import productItem from '@/pagesB/cart/productitem.vue'
+	import sklineHeader from '../../components/skline/sklineHeader.vue'
+	import { getCartList, updateCart, deleteCart } from '@/api/cart.js'
+	import { purchaseSave, purchaseCheck } from '@/api/purchase.js'
+	export default {
+		components:{
+			productItem,
+			sklineHeader
+		},
+		onLoad() {
+			// 计算区域高度
+			this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
+			this.screenWidth = uni.getSystemInfoSync().windowWidth
+			this.screenHeight = uni.getSystemInfoSync().windowHeight
+			this.safeAreaBottom = uni.getSystemInfoSync().safeAreaInsets.bottom
+			// 获取列表数据
+			this.pageInit()
+		},
+		data() {
+			return {
+				loading: false,
+				status: 'loading',
+				noDataText: '暂无产品',
+				empty: {
+					tip: '购物车空空的,去挑选商品吧',
+					imgUrl: '/static/kongCart.png'
+				},
+				// 查询条件
+				pageNo: 1, // 页数
+				pageSize: 10000, // 每页数
+				list: [], // 列表数据
+				total: 0, // 总款数
+				totalAmount: 0, // 总金额
+				totalDiscount:0, // 总优惠
+				totalCoupon: 0, // 总代金券
+				totalNum: 0, // 总数量
+				totalSel: 0, // 已选数量
+				editFlag: false, // 是否编辑状态
+				allChecked: false, // 是否全选
+				screenWidth: 325, // 屏幕宽度
+				screenHeight: 0, // 屏幕高度
+				statusBarHeight: 44, // 状态栏高度
+				safeAreaBottom: 0, // 底部安全区域高度
+				curEditRow: null
+			}
+		},
+		computed: {
+			...mapState(['hasLogin']),
+			userInfo(){
+				return this.$store.state.vuex_userInfo
+			},
+			allDisabled(){
+				let ret = false
+				if(!this.editFlag){
+					this.list.forEach(key => {
+						ret = key.every(item => !item.status || item.status==0 || item.dealerScopeFlag==0)
+					})
+				}
+				return ret
+			}
+		},
+		methods: {
+			goBack(){
+				uni.navigateBack()
+			},
+			pageInit(){
+				this.allChecked = false
+				this.pageNo = 1
+				this.list = []
+				this.getRow()
+			},
+			// 关闭弹框
+			closePopu(){
+				this.$refs.showPopu.close()
+				this.curEditRow = null
+			},
+			// 打开编辑数量弹框
+			editQty(item){
+				this.curEditRow = JSON.parse(JSON.stringify(item))
+				this.$refs.showPopu.open()
+			},
+			// 确定修改
+			changeSingQty(){
+				this.changeQty(this.curEditRow.qty,this.curEditRow.cartSn)
+			},
+			// 查询列表
+			getRow (pageNo) {
+			  let _this = this
+			  if (pageNo) {
+			    this.pageNo = pageNo
+			  }
+			  let params = {
+			    pageNo: this.pageNo,
+			    pageSize: this.pageSize,
+				queryWord: this.queryWord
+			  }
+			  this.status = "loading"
+			  getCartList(params).then(res => {
+				if (res.status == 200) {
+				  _this.total = res.data.count || 0
+				  const list = res.data.list
+				  for(let i=0;i<list.length;i=i+10){
+					  _this.list.push(list.slice(i,(i+10)>list.length?list.length:(i+10)).map(key=>{
+						  const a = key.shopPromoProduct
+						  key.orginPrice = key.price
+						  if(a){
+							  key.promoType = a.promoType
+							  key.resultValue = a.resultValue
+							  key.conditionValue = a.conditionValue
+							  key.discountType = a.discountType
+							  key.promoProductSn = a.promoProductSn
+							  key.promoSn = a.promoSn
+							  // 特价
+							  if(key.promoType=='PROMO_PROD'){
+								  key.price = key.conditionValue
+							  }
+						  }
+						  key.priceStr = Number(key.price).toFixed(2).toString().split('.')
+						  delete key.shopPromoProduct
+						  return {
+								id: key.id,
+								edit: false,
+								checked: _this.allChecked,
+								cartSn: key.cartSn,
+								price: key.price,
+								orginPrice: key.orginPrice,
+								priceStr: key.priceStr,
+								qty: key.qty,
+								productSn: key.productSn,
+								productName: key.productEntity.productName,
+								productImage: key.productEntity.images,
+								productCode: key.productEntity.code,
+								productOrigCode: key.productEntity.origCode,
+								unit: key.productEntity.unit,
+								status: key.status,
+								dealerScopeFlag: key.dealerScopeFlag,
+								resultValue: key.resultValue,
+								conditionValue: key.conditionValue,
+								discountType: key.discountType,
+								promoType: key.promoType,
+								promoProductSn: key.promoProductSn,
+								promoSn: key.promoSn,
+								giftQty: 0
+							}
+					  }))
+				  }
+				  
+				  // 默认全选
+				  if(_this.pageNo == 1){
+					  _this.chooseAll()
+				  }
+				  // 判断是否最后一页
+				  const maxPages = Math.ceil(_this.total / _this.pageSize)
+				  if(this.pageNo >= maxPages){
+				  	_this.status = 'nomore'
+				  	_this.noDataText = '没有更多了'
+				  }else{
+					  _this.status = 'loadmore'
+					  _this.noDataText = '加载更多'
+				  }
+				} else {
+				  _this.list = []
+				  _this.total = 0
+				  _this.status = 'loadmore'
+				  _this.noDataText = res.message
+				}
+			  })
+			},
+			// scroll-view到底部加载更多
+			onreachBottom() {
+				// 判断是否最后一页
+				const maxPages = Math.ceil(this.total / this.pageSize)
+				if(this.pageNo >= maxPages){
+					this.status = "nomore"
+					this.noDataText = '没有更多了'
+				}else{
+					this.pageNo += 1
+					this.getRow()
+				}
+			},
+			// 根据cartSn查找
+			getItemById(cartSn){
+				const a = this.list.findIndex(k => k.find(s=> s.cartSn == cartSn))
+				const b = a>=0 ? this.list[a].findIndex(s=> s.cartSn == cartSn) : -1
+				return {p:a,s:b}
+			},
+			// 已选产品变更数量
+			changeQty(val,cartSn){
+				uni.showLoading({
+					title: '加载中'
+				})
+				updateCart({
+					cartSn: cartSn,
+					qty: val
+				}).then(res => {
+					if(res.status == 200){
+						const crow = this.getItemById(cartSn)
+						if(crow.p>=0&&crow.s>=0){
+							this.list[crow.p][crow.s].qty = val
+							this.list[crow.p].splice()
+							// 合计
+							this.getChooseHeji()
+							uni.$emit('refashCart')
+						}
+						this.closePopu()
+					}else{
+						uni.showToast({
+							title: res.message,
+							icon: 'none'
+						})
+					}
+					uni.hideLoading()
+				})
+			},
+			// 单选择
+			chooseItem(cartSn){
+				const crow = this.getItemById(cartSn)
+				if(crow.p>=0&&crow.s>=0){
+					this.list[crow.p][crow.s].checked = !this.list[crow.p][crow.s].checked
+					// 合计
+					this.getChooseHeji()
+					// 判断是否全选
+					this.isAllChecked()
+				}
+			},
+			// 判断是否全选
+			isAllChecked(){
+				if(this.editFlag){
+					this.allChecked = this.list.every(key => key.every(item => item.checked))
+				}else{
+					this.allChecked = this.list.every(key => key.filter(item => item.status==1&&item.dealerScopeFlag==1 ).every(item => item.checked))
+				}
+			},
+			// 编辑
+			editAll(){
+				this.editFlag = !this.editFlag
+				this.list.forEach(key => {
+					key.forEach(item => {
+						item.edit = this.editFlag
+						if(!item.status||item.status==0||item.dealerScopeFlag==0){
+							item.checked = false
+						}
+					})
+				})
+				// 合计
+				this.getChooseHeji()
+				// 判断是否全选
+				this.isAllChecked()
+			},
+			// 全选
+			chooseAll(){
+				if(this.allDisabled){
+					return
+				}
+				this.allChecked = !this.allChecked
+				this.list.forEach(key => {
+					// 非编辑模式
+					if(!this.editFlag){
+						key.filter(item=>item.status == 1 && item.dealerScopeFlag == 1).forEach(item => {
+							item.checked = this.allChecked
+						})
+					}else{
+						// 编辑模式
+						key.forEach(item => {
+							item.checked = this.allChecked
+						})
+					}
+				})
+				// 合计
+				this.getChooseHeji()
+			},
+			//单个删除
+			removeChoose(cartSn,isBatch){
+				// 删除项
+				const crow = this.getItemById(cartSn)
+				if(crow.p>=0&&crow.s>=0){
+					this.list[crow.p].splice(crow.s, 1);
+					this.total = this.total - 1
+					// 合计
+					if(!isBatch){
+						this.getChooseHeji()
+						uni.$emit('refashCart')
+						// 判断是否全选
+						this.isAllChecked()
+					}
+				}
+			},
+			// 批量删除
+			batchRemove(){
+				if(this.totalNum==0){
+					uni.showToast({
+						title: '请选择产品',
+						icon: 'none'
+					})
+					return false
+				}
+				const _this = this
+				uni.showModal({
+					title: '提示',
+					content: '确定删除商品吗?',
+					confirmText: '确定',
+					success(res) {
+						if(res.confirm){
+							const snList = []
+							 _this.list.forEach(item => {
+							 	item.filter(k=>k.checked).forEach(s=>{
+							 		snList.push(s.cartSn)
+							 	})
+							 })
+							  
+							 // 删除购物车
+							 _this.removeCart(snList,true,true)
+						}
+					}
+				})
+			},
+			// 删除商品
+			removeCart(snList,isBatch,isTip){
+				const _this = this
+				if(isTip){
+					uni.showLoading({
+						title: '删除中'
+					})
+				}
+				deleteCart({cartSns:snList}).then(ret => {
+					 if(ret.status == 200){
+						 snList.forEach(sn => {
+							 _this.removeChoose(sn,isBatch)
+						 })
+						 // 合计,批量操作
+						 if(isBatch){
+							 _this.getChooseHeji()
+							 uni.$emit('refashCart')
+							 // 判断是否全选
+							 _this.isAllChecked()
+						 }
+						 if(isTip){
+							uni.showToast({
+								 title: '删除成功',
+								 icon: 'none'
+							}) 
+						 }
+					 }
+					 uni.hideLoading()
+				})
+			},
+			// 去结算
+			settlement(){
+				if(this.totalAmount>0){
+					 this.submitOrder()
+				}else{
+					uni.showToast({
+						title: '请选择产品',
+						icon: 'none'
+					})
+				}
+			},
+			// 去结算
+			submitOrder(){
+				const _this = this
+				// 获取已选商品
+				const detailList = []
+				const cartSn = []
+				_this.list.forEach(key => {
+					key.filter(item=>item.checked).forEach(item => {
+						 detailList.push({
+						 	productSn:item.productSn,
+						 	productCode:item.productCode,
+						 	qty: item.qty,
+						 	price:item.orginPrice,
+							promoSn: item.promoSn
+						 })
+						 cartSn.push({
+							 cartSn: item.cartSn,
+							 productSn:item.productSn
+						 })
+					})
+				})
+				
+				// 校验并提示信息
+				purchaseCheck({detailList:detailList}).then(res => {
+					if(res.status == 200){
+						const promoChangeFlag = res.data.promoChangeFlag
+						// 活动变更
+						if(promoChangeFlag){
+							uni.showModal({
+								title: '提示',
+								content: '促销活动已变更,请刷新?',
+								confirmText:'确定刷新',
+								success(ret) {
+									if(ret.confirm){
+										_this.pageInit()
+									}
+								}
+							})
+							return
+						}
+						const successList = res.data.successList.map(item => {
+							return {
+								productSn:item.productSn,
+								productCode: item.productCode,
+								qty: item.qty,
+								price:item.price,
+								promoSn: item.promoSn
+							}
+						})
+						const delSn = cartSn.filter(item => successList.find(k => k.productSn == item.productSn)).map(item => item.cartSn)
+						const removeList = res.data.removeList.map(item => item.productCode)
+						const selloutList = res.data.selloutList.map(item => item.productCode)
+						console.log(successList,delSn)
+						console.log(removeList,selloutList)
+						// 有已下架或已售罄产品提示
+						if(removeList.length || selloutList.length){
+							uni.showModal({
+								title: '提示',
+								content: (removeList.length ? `产品${removeList.join(',')}已下架,`:'')+(selloutList.length?`产品${selloutList.join(',')}已售罄,`:'')+`不可采购。`+(successList.length?'是否继续采购其他产品?':''),
+								showCancel: successList.length,
+								confirmText: successList.length?'确定':'知道了',
+								success(ret) {
+									if(ret.confirm && successList.length){
+										_this.submitForm(successList,delSn)
+									}
+								}
+							})
+						}else{
+							// 提交
+							_this.submitForm(successList,delSn)
+						}
+					}else{
+						uni.showToast({
+							title: res.message,
+							icon: 'none'
+						})
+					}
+				})
+			},
+			// 确认提交
+			submitForm(detailList,cartSn){
+				uni.showLoading({
+					title: '提交中...',
+					mask: true
+				})
+				this.loading = true
+				purchaseSave({
+					detailList: detailList
+				}).then(res => {
+					this.loading = false
+					uni.hideLoading()
+					if(res.status == 200){
+						// 删除已提交产品
+						this.removeCart(cartSn,true,false)
+						res.data.detailList = []
+						this.$store.state.vuex_tempData = res.data
+						uni.navigateTo({
+							url: "/pagesB/procureOrder"
+						})
+					}else{
+						uni.showToast({
+							title: res.message,
+							icon: 'none'
+						})
+					}
+				})
+			},
+			// 计算总款数、合计、数量
+			getChooseHeji(){
+				this.totalAmount = 0
+				this.totalDiscount = 0
+				this.totalCoupon = 0
+				this.totalNum = 0
+				this.totalSel = 0
+				this.list.forEach(key => {
+					key.filter(item=>item.checked).forEach(item => {
+						this.totalAmount += item.price * item.qty // 总金额
+						this.totalNum += item.qty // 总数量
+						this.totalSel += 1 // 已选数量
+						// 如果是返券类型
+						if(item.promoType=='BUY_PROD_GIVE_VALID'){
+							this.totalCoupon += item.resultValue * item.qty
+						}
+						// 特价
+						if(item.promoType=='PROMO_PROD'){
+							this.totalDiscount += (item.orginPrice - item.conditionValue) * item.qty
+						}
+						// 满赠
+						item.giftQty = item.promoType=='BUY_PROD_GIVE_PROD' ? Math.floor(item.qty / item.conditionValue)*item.resultValue : 0
+					})
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+.pages{
+	height: 100vh;
+	display: flex;
+	flex-direction: column;
+	.popu-content{
+		background-color: #FFFFFF;
+		border-radius: 10px;
+		width: 300px;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		padding: 10px 15px;
+		.popu-close{
+			padding: 10px;
+			position: absolute;
+			right: 0;
+			top: 0;
+		}
+		.popu-content-title{
+			padding: 10px;
+			font-size: 16px;
+		}
+		.popu-content-num{
+			font-size: 14px;
+			color: #999999;
+			padding: 10px 0;
+			> text{
+				margin-right: 10px;
+				font-size: 10px;
+			}
+		}
+		.popu-content-btn{
+			width: 100%;
+			display: flex;
+			align-items: center;
+			justify-content: space-around;
+			margin: 20px 0 10px;
+			.popu-content-btn-item{
+				width: 40%;
+				height: 32px;
+				font-size: 14px;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				border-radius: 100px;
+			}
+			.cancelBtn{
+				background-color: #f8f8f8;
+				color: #666;
+			}
+			.okbtn{
+				background-color: #f70000;
+				color: #FFFFFF;
+			}
+		}
+	}
+	.cart-body{
+		position: relative;
+		flex-grow: 1;
+		display: flex;
+		flex-direction: column;
+		.cart-head{
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding: 0 20rpx;
+			background-color: #FFFFFF;
+			height: 40px;
+			.cart-head-left{
+				display: flex;
+				align-items: center;
+				font-size: 28rpx;
+				color: #333333;
+				height: 100%;
+				text{
+					color: #d81e06;
+					margin: 0 10rpx;
+				}
+			}
+			.cart-head-right{
+				display: flex;
+				align-items: center;
+			}
+			.red{
+				color: #d81e06;
+			}
+			.blue{
+				color: #2196F3;
+			}
+			.cart-head-btton{
+				height: 100%;
+				font-size: 28rpx;
+				margin-right: 10px;
+			}
+		}
+		.cart-list{
+			flex-grow: 1;
+			background-color: #F5F5F5;
+			width: 100%;
+			.loading-bar{
+				text-align: center;
+				padding: 10px 0;
+				color: #999999;
+			}
+			.empty-bar{
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				justify-content: center;
+				padding: 20px 0;
+				margin-top: 20vh;
+				image{
+					width: 100px;
+					height: 100px;
+				}
+				view{
+					font-size: 14px;
+					color: #999999;
+					margin-top: 10px;
+				}
+			}
+		}
+		.cart-footer{
+			width: 100%;
+			background-color: #FFFFFF;
+			.cart-footer-box{
+				width: 100%;
+				height: 100rpx;
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+			}
+			.cart-footer-left{
+				display: flex;
+				align-items: center;
+				padding: 0 20rpx 0 36rpx;
+				.cart-footer-left-all{
+					display: flex;
+					align-items: center;
+					.cart-footer-left-all-text{
+						margin-left: 10rpx;
+						font-size: 28rpx;
+						color: #333333;
+					}
+				}
+			}
+			.cart-footer-right{
+				padding: 0 20rpx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				flex-grow:1;
+				.cart-footer-left-price{
+					flex-grow:1;
+					> view{
+						display: flex;
+						align-items: baseline;
+						justify-content: flex-end;
+					}
+					.cart-footer-left-price-text{
+						font-size: 24rpx;
+						color: #333333;
+					}
+					.cart-footer-left-price-text1{
+						font-size: 20rpx;
+						color: #666;
+						display: flex;
+						align-items: center;
+						flex-wrap: wrap;
+						justify-content: flex-end;
+						text{
+							margin-right: 5px;
+						}
+					}
+					.cart-footer-left-price-num{
+						display: flex;
+						align-items: baseline;
+						font-size: 24rpx;
+						color: #d81e06;
+						text{
+							font-size: 32rpx;
+						}
+					}
+				}
+				.red{
+					color: #d81e06;
+				}
+				.cart-head-btton{
+					height: 100%;
+					font-size: 28rpx;
+					color: #333333;
+				}
+				.cart-footer-right-button{
+					display: flex;
+					align-items: center;
+					margin-left: 20rpx;
+					text-align: right;
+					.btns{
+						border-radius: 100rpx;
+						height: 36px;
+						padding: 0 10px;
+						min-width: 80px;
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 342 - 0
pagesB/cart/productitem.vue

@@ -0,0 +1,342 @@
+<template>
+	<block>
+		<view class="choose-product-item"
+		v-for="(item, dix) in list"
+		:key="item.id" 
+		>
+			<view class="choose-product-item-check" @click="checkItem(item)">
+				<uni-icons v-if="!item.edit && (!item.status||item.status==0||item.dealerScopeFlag==0)" type="circle-filled" size="24" color="#ccc"></uni-icons>
+				<uni-icons v-else :type="item.checked?'checkbox-filled':'circle'" size="24" :color="item.checked?'#dd0000':'#666'"></uni-icons>
+			</view>
+			 <view>
+				 <view>
+					 <view class="choose-product-item-img">
+						<image mode="aspectFit" :src="item.productImage?item.productImage+'?x-oss-process=image/resize,p_30':'/static/def_imgs.png'" style="width: 100%;height: 100%;"></image>
+						<view class="back-price xiajia" v-if="!item.status||item.status==0">下架</view>
+						<view class="back-price xiajia" v-else-if="item.dealerScopeFlag==0">售罄</view>
+					 </view>
+					 <view class="choose-product-item-info">
+						<view class="choose-product-item-left-info-name">
+							<text :max-lines="1" overflow="ellipsis">{{item.productName}}</text>
+						</view>
+						<view class="choose-product-item-left-info-guige">
+							<text :max-lines="1" overflow="ellipsis">{{item.productCode}}</text>
+							<text :max-lines="2" overflow="ellipsis">{{item.productOrigCode}}</text>
+						</view>
+						<view class="choose-product-item-left-info-price">
+							<view v-if="item.status==1">
+								<view class="price-txt">¥<text>{{item.priceStr[0]}}</text>.{{item.priceStr[1]}}</view>
+								<view class="flex align_center rebate-tag" v-if="item.promoType=='BUY_PROD_GIVE_VALID'">
+									返<text>{{item.resultValue}}</text>元
+								</view>
+								<view class="flex align_center rebate-tag" v-if="item.promoType=='BUY_PROD_GIVE_PROD'">
+									买{{item.conditionValue}}赠{{item.resultValue}}
+								</view>
+								<view class="flex align_center tejia-tag" v-if="item.promoType=='PROMO_PROD'">
+									特价<text>¥{{item.orginPrice}}</text>
+								</view>
+							</view>
+							<view v-else></view>
+							<view>
+								<view v-if="item.status==1&&item.dealerScopeFlag==1" :style="{opacity:!item.edit?1:0,width:!item.edit?'auto':0}">
+									<view class="flex align_center qty-box">
+										<view class="qty-btn" @click="changeQty(item.qty-1,item,1)" :class="(item.qty <= 1)?'qty-disabled':''">-</view>
+										<view class="qty-num" @click="editQty(item)" :style="{width:Number(item.qty).toString().length*8+10+'px'}">
+											<!-- <input type="number" @input="inputQty(item)" @blur="changeQty(item.qty,item,0)" v-model="item.qty"/> -->
+											{{item.qty}}
+										</view>
+										<view class="qty-btn" @click="changeQty(item.qty+1,item,1)" :class="(item.qty >= 999)?'qty-disabled':''">+</view>
+									</view>
+								</view>
+								<view v-if="!item.edit && (!item.status||item.status==0||item.dealerScopeFlag==0)" class="edit-qty">
+									X <text>{{item.qty}}</text>
+								</view>
+								<view v-if="item.edit" class="edit-qty">
+									X <text>{{item.qty}}</text>
+									<uni-icons type="minus-filled" size="24" color="#dd0000" @click="remove(item.cartSn)"></uni-icons>
+								</view>
+							</view>
+						</view>
+					 </view>
+				 </view>
+				 <!-- 赠品 -->
+				 <view class="gift-box" v-if="item.giftQty">
+					 <view class="choose-product-item-img">
+						<image mode="aspectFit" :src="item.productImage?item.productImage+'?x-oss-process=image/resize,p_30':'/static/def_imgs.png'" style="width: 100%;height: 100%;"></image>
+						<view class="back-price xiajia" v-if="!item.status||item.status==0">下架</view>
+						<view class="back-price xiajia" v-else-if="item.dealerScopeFlag==0">售罄</view>
+					 </view>
+					 <view class="choose-product-item-info">
+						<view class="choose-product-item-left-info-name flex align_center">
+							<view class="flex align_center rebate-tag">赠品</view>
+							<text class="text" :max-lines="1" overflow="ellipsis">{{item.productName}}</text>
+						</view>
+						<view class="choose-product-item-left-info-guige">
+							<text :max-lines="1" overflow="ellipsis">{{item.productCode}}</text>
+							<text :max-lines="1" overflow="ellipsis">{{item.productOrigCode}}</text>
+						</view>
+						<view class="choose-product-item-left-info-price">
+							<view></view>
+							<view>
+								<view class="edit-qty">
+									X <text>{{item.giftQty}}</text>
+								</view>
+							</view>
+						</view>
+					 </view>
+				 </view>
+			 </view>
+		</view>
+	</block>
+</template>
+
+<script>
+	export default {
+		name: 'productItem',
+		props: {
+			list: {
+				type: Array,
+				default: () => []
+			},
+		},
+		data() {
+			return {
+				isChange: false
+			}
+		},
+		methods: {
+			inputQty(item){
+				this.isChange = true
+			},
+			changeQty(value,item,type) {
+				const max = 999
+				const v = value > max ? max : (value==''||value==0?1:value)
+				if(type == 0){
+					if(!this.isChange){
+						return
+					}
+					this.updateNums(value,item.cartSn)
+					this.$nextTick(()=>{
+						setTimeout(()=>{
+							this.updateNums(v,item.cartSn)
+							this.isChange = false
+						},100)
+					})
+				}else{
+					if(value<=max && value >= 1){
+						this.updateNums(v,item.cartSn)
+					}
+				}
+			},
+			updateNums(e, cartSn) {
+				this.$emit('changeQty', Number(e), cartSn)
+			},
+			remove(cartSn){
+				this.$emit('remove', [cartSn], false)
+			},
+			checkItem(item){
+				if(item.edit || (item.status==1&&item.dealerScopeFlag==1)){
+					this.$emit('check',item.cartSn)
+				}
+			},
+			editQty(item){
+				this.$emit('editQty',item)
+			}
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+	.qty-box{
+		display: flex;
+		.qty-btn{
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			width: 22px;
+			height: 20px;
+			border-radius: 50px;
+			font-size: 18px;
+			color: #066cff;
+			&.qty-disabled{
+				color: #999;
+			}
+		}
+		.qty-num{
+			width: 24px;
+			height: 20px;
+			line-height: 20px;
+			text-align: center;
+			background-color: #efefef;
+			margin: 0 3px;
+			border-radius: 3px;
+			font-size: 12px;
+			input{
+				width: 100%;
+				height: 100%;
+				text-align: center;
+				color: #333;
+			}
+		}
+	}
+	.choose-product-item{
+		display: flex;
+		justify-content: space-between;
+		padding: 10px;
+		background: #fff;
+		margin: 8px 8px 0 8px;
+		border-radius: 10px;
+		.price-txt{
+			color: red;
+			display: flex;
+			align-items: baseline;
+			font-size: 12px;
+			text{
+				font-size: 32rpx;
+			}
+		}
+		> view{
+			 &:last-child{
+				 flex-grow: 1;
+				 width: 80%;
+				 >view{
+					 width: 100%;
+					 display: flex;
+					 align-items: center;
+					 justify-content: space-between;
+				 }
+			 }
+		}
+		.choose-product-item-check{
+			padding: 0 10rpx 0 0;
+			width: 24px;
+			margin-top: 33px;
+		}
+		.choose-product-item-img{
+			margin-right: 20rpx;
+			width: 80px;
+			height: 80px;
+			position: relative;
+			overflow: hidden;
+			border: 1px solid #eee;
+			padding: 3rpx;
+			border-radius: 10rpx;
+			.back-price{
+				zoom: calc(0.8);
+				padding: 6rpx 65rpx;
+				position: absolute;
+				top: 18rpx;
+				right: -45rpx;
+				z-index: 2;
+				font-size: 20rpx;
+				text-align: center;
+				transform: rotate(40deg);
+				display: flex;
+				align-items: center;
+				text{
+					font-size: 28rpx;
+					margin: 0 5rpx;
+				}
+			}
+			.xiajia{
+				background: #ececec;
+				color: #5f5f5f;
+			}
+			.choose-product-item-left-info-code{
+				color: #666;
+				position: absolute;
+				width: 100%;
+				left:0;
+				bottom:0;
+				background: rgba(255,255,255,0.7);
+				text-align: center;
+				font-size: 12px;
+			}
+		}
+		.choose-product-item-info{
+			width: 70%;
+			flex-grow: 1;
+			.choose-product-item-left-info-price{
+				display: flex;
+				justify-content: space-between;
+				>view{
+					display: flex;
+					align-items:baseline;
+				}
+				.edit-qty{
+					display: flex;
+					align-items:center;
+					justify-content: space-between;
+					color: #999;
+					font-size: 10px;
+					> text{
+						color: #666;
+						font-size: 12px;
+						margin-left: 5px;
+						margin-right: 10px;
+					}
+				}
+			}
+			.rebate-tag{
+				background: #ffe7df;
+				color: #E91E63;
+				padding: 2px 5px;
+				font-size: 10px;
+				border-radius: 3px;
+				margin-left: 6px;
+			}
+			.tejia-tag{
+				color: #E91E63;
+				margin-left: 6px;
+				font-size: 10px;
+				text{
+					font-size: 10px;
+					color: #999;
+					margin-left: 5px;
+					text-decoration: line-through;
+				}
+			}
+			.choose-product-item-left-info-name{
+				font-size: 28rpx;
+				color: #333;
+			}
+			.choose-product-item-left-info-guige{
+				margin: 10rpx 0;
+				font-size: 12px;
+				text{
+					color: #666;
+					&:last-child{
+						color: #2196F3;
+					}
+				}
+			}
+		}
+		.gift-box{
+			margin-top: 10px;
+			border-top: 1px solid #ececec;
+			padding-top: 10px;
+			.choose-product-item-img{
+				width: 60px;
+				height: 60px;
+				margin-left: 20px;
+			}
+			.choose-product-item-info .choose-product-item-left-info-guige{
+				margin: 10rpx 0 0 0;
+			}
+			.choose-product-item-info .choose-product-item-left-info-name{
+				font-size: 24rpx;
+				.rebate-tag{
+					margin: 0 5px 0 2px;
+					background: #ff0000;
+					color: #fff;
+					display: flex;
+					justify-content: center;
+				}
+				.text{
+					width: 80%;
+					flex-grow: 1;
+				}
+			}
+		}
+	}
+</style>

+ 191 - 0
pagesB/components/chooseProductItemSkline.vue

@@ -0,0 +1,191 @@
+<template>
+	<block>
+		<view class="choose-product-item"
+		v-for="(item, index) in list"
+		:key="item.id" 
+		@click="toDetail(item)"
+		>
+			 <view style="flex-grow: 1;">
+				 <view class="choose-product-item-img">
+					<image mode="aspectFit" :src="item.productImage ? item.productImage+'?x-oss-process=image/resize,p_30':'/static/def_imgs.png'" style="width: 100%;height: 100%;"></image>
+					<view class="back-price xiajia" v-if="item.status==0">下架</view>
+					<view class="back-price xiajia" v-else-if="item.dealerScopeFlag==0">售罄</view>
+					<view class="choose-product-item-left-info-code ">
+						<text :max-lines="1" overflow="ellipsis">{{item.productCode}}</text>
+					</view>
+				 </view>
+				 <view class="choose-product-item-info">
+					<view class="choose-product-item-left-info-name">
+						<text :max-lines="2" overflow="ellipsis">{{item.productName}}</text>
+					</view>
+					<view class="choose-product-item-left-info-guige">
+						<text :max-lines="2" overflow="ellipsis">{{item.productOrigCode}}</text>
+					</view>
+					<view class="choose-product-item-left-info-price">
+						<view class="price-txt" v-if="isLogin">
+							¥<text>{{item.priceStr[0]}}</text>.{{item.priceStr[1]}}
+						</view>
+						<view class="price-txt" v-else>¥***</view>
+						<view class="flex align_center rebate-tag" v-if="isLogin&&item.promoType=='BUY_PROD_GIVE_VALID'">
+							返<text>{{item.resultValue}}</text>元
+						</view>
+						<view class="flex align_center rebate-tag" v-if="isLogin&&item.promoType=='BUY_PROD_GIVE_PROD'">
+							买{{item.conditionValue}}赠{{item.resultValue}}
+						</view>
+						<view class="flex align_center tejia-tag" v-if="isLogin&&item.promoType=='PROMO_PROD'">
+							特价<text>¥{{item.orginPrice}}</text>
+						</view>
+					</view>
+				 </view>
+			 </view>
+			 <view class="flex align_center justify_center">
+			 	<uni-icons type="arrowright" size="20" color="#999"></uni-icons>
+			 </view>
+		</view>
+	</block>
+</template>
+
+<script>
+	export default {
+		name: 'chooseProductItemSkline',
+		props: {
+			index: {
+				type: Number,
+				default: 0
+			},
+			list: {
+				type: Array,
+				default: () => []
+			},
+			edit: {
+				type: Boolean,
+				default: false
+			},
+			isLogin:{
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+			}
+		},
+		methods: {
+			toDetail(item){
+				this.$emit('toDetail',item)
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	@import '/flex.css';
+	.choose-product-item{
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 10px;
+		border-bottom: 1px solid #eee;
+		.price-txt{
+			color: red;
+			display: flex;
+			align-items: baseline;
+			font-size: 12px;
+			text{
+				font-size: 36rpx;
+			}
+		}
+		> view{
+			 display: flex;
+			 align-items: center;
+			 justify-content: space-between;
+			 &::first-child{
+				 flex-grow: 1;
+			 }
+		}
+		.choose-product-item-img{
+			margin-right: 20rpx;
+			width: 30%;
+			height: 180rpx;
+			position: relative;
+			overflow: hidden;
+			border: 1px solid #f8f8f8;
+			border-radius: 5px;
+			padding: 10rpx;
+			.back-price{
+				zoom: calc(0.8);
+				padding: 6rpx 65rpx;
+				position: absolute;
+				top: 18rpx;
+				right: -45rpx;
+				z-index: 2;
+				font-size: 20rpx;
+				text-align: center;
+				transform: rotate(40deg);
+				display: flex;
+				align-items: center;
+				text{
+					font-size: 28rpx;
+					margin: 0 5rpx;
+				}
+			}
+			.xiajia{
+				background: #ececec;
+				color: #5f5f5f;
+			}
+			.fantext{
+				background: rgba(255 ,87 ,34 , 1);
+				color: #fff;
+				font-size: 8px;
+			}
+			.choose-product-item-left-info-code{
+				color: #666;
+				position: absolute;
+				width: 100%;
+				left:0;
+				bottom:0;
+				background: rgba(255,255,255,0.7);
+				text-align: center;
+			}
+		}
+		.choose-product-item-info{
+			margin-right: 10rpx;
+			width: 70%;
+			flex-grow: 1;
+			.choose-product-item-left-info-price{
+				display: flex;
+				align-items:center;
+				.rebate-tag{
+					background: #ffe7df;
+					color: #E91E63;
+					padding: 2px 5px;
+					font-size: 10px;
+					border-radius: 3px;
+					margin-left: 6px;
+				}
+				.tejia-tag{
+					color: #E91E63;
+					margin-left: 6px;
+					font-size: 12px;
+					text{
+						font-size: 12px;
+						color: #999;
+						margin-left: 5px;
+						text-decoration: line-through;
+					}
+				}
+			}
+			.choose-product-item-left-info-name{
+				font-size: 28rpx;
+				color: #666;
+			}
+			.choose-product-item-left-info-guige{
+				color: #2196F3;
+				margin: 10rpx 0;
+				text{
+					margin-right: 10rpx;
+				}
+			}
+		}
+	}
+</style>

+ 180 - 0
pagesB/components/productItemSkline.vue

@@ -0,0 +1,180 @@
+<template>
+	<view
+	class="product-list"
+	>
+		<view 
+		class="product-item" 
+		:style="{width:itemWidth+'px',marginTop:gap+'px'}"
+		v-for="(item,index) in list"
+	    :key="item.id" 
+		 @click="toDetail(item)">
+			<view>
+				<image mode="aspectFit" :src="item.productImage ? item.productImage+'?x-oss-process=image/resize,p_30':'/static/def_imgs.png'" style="height: 140px;width: 100%;"></image>
+				<view class="back-price xiajia" v-if="item.status==0||!item.status">下架</view>
+				<view class="back-price xiajia" v-else-if="item.dealerScopeFlag==0">售罄</view>
+				<view class="product-code"><text :max-lines="1" overflow="ellipsis">{{item.productCode}}</text></view>
+			</view>
+			<view>
+				<view class="product-name"><text :max-lines="2" overflow="ellipsis">{{item.productName}}</text></view>
+				<view class="product-guige"><text :max-lines="2" overflow="ellipsis">{{item.productOrigCode}}</text></view>
+				<view class="product-button">
+					<view class="price-txt">
+						¥<text>{{item.priceStr[0]}}</text>.{{item.priceStr[1]}}
+					</view>
+					<view class="flex align_center rebate-tag" v-if="item.promoType=='BUY_PROD_GIVE_VALID'">
+						返<text>{{item.resultValue}}</text>元
+					</view>
+					<view class="flex align_center rebate-tag" v-if="item.promoType=='BUY_PROD_GIVE_PROD'">
+						买{{item.conditionValue}}赠{{item.resultValue}}
+					</view>
+					<view class="flex align_center tejia-tag" v-if="item.promoType=='PROMO_PROD'">
+						特价<text>¥{{item.orginPrice}}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: 'productItemSkline',
+		props: {
+			list: {
+				type: Array,
+				default: () => []
+			},
+			index:{
+				type: [Number,String],
+				default: 0
+			},
+			gap:{
+				type: [Number,String],
+				default: 10
+			},
+			itemWidth:{
+				type: [Number,String],
+				default: 0
+			}
+		},
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			toDetail(item){
+				this.$emit('detail',item)
+			}
+		},
+	}
+</script>
+
+<style lang="less">
+.product-list{
+	display:flex;
+	flex-wrap: wrap;
+	justify-content: space-between;
+	padding: 0 2%;
+}
+.product-item{
+	background: #ffffff;
+	border-radius: 10upx;
+	box-shadow: 1px 1px 3px #EEEEEE;
+	width: 48%;
+	margin: 10px 0 0 0;
+	display: flex;
+	flex-direction: column;
+	.price-txt{
+		color: red;
+		display: flex;
+		align-items: baseline;
+		font-size: 12px;
+		text{
+			font-size: 36rpx;
+		}
+	}
+	.back-price{
+		zoom: calc(0.8);
+		padding: 6rpx 65rpx;
+		position: absolute;
+		top: 18rpx;
+		right: -45rpx;
+		z-index: 2;
+		font-size: 20rpx;
+		text-align: center;
+		transform: rotate(40deg);
+		display: flex;
+		align-items: center;
+		text{
+			font-size: 28rpx;
+			margin: 0 5rpx;
+		}
+	}
+	.xiajia{
+		background: #ececec;
+		color: #5f5f5f;
+	}
+	.fantext{
+		background: rgba(255 ,87 ,34 , 1);
+		color: #fff;
+		font-size: 8px;
+	}
+	> view{
+		&:first-child{
+			position: relative;
+			overflow: hidden;
+			.product-code{
+				color: #666;
+				position: absolute;
+				width: 100%;
+				left:0;
+				bottom:0;
+				background: rgba(255,255,255,0.7);
+				text-align: center;
+			}
+		}
+		&:last-child{
+			position: relative;
+			flex-grow: 1;
+			padding: 10px 10px 35px;
+			.product-name{
+				font-size: 28rpx;
+				color: #333;
+			}
+			.product-guige{
+				margin: 10rpx 0;
+				color: #2196F3;
+			}
+		}
+		.product-button{
+			position: absolute;
+			left: 5%;
+			bottom: 0;
+			width: 90%;
+			padding: 5px 0 10px;
+			display: flex;
+			align-items: center;
+			.rebate-tag{
+				background: #ffe7df;
+				color: #E91E63;
+				padding: 2px 5px;
+				font-size: 10px;
+				border-radius: 3px;
+				margin-left: 6px;
+			}
+			.tejia-tag{
+				color: #E91E63;
+				margin-left: 6px;
+				font-size: 12px;
+				text{
+					font-size: 12px;
+					color: #999;
+					margin-left: 5px;
+					text-decoration: line-through;
+				}
+			}
+		}
+	}
+	}
+</style>

+ 309 - 0
pagesB/coupon.vue

@@ -0,0 +1,309 @@
+<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" v-if="swiperCurrent==indexs">
+							<view  
+							class="check-order-list" 
+							v-for="(item,index) in list" 
+							:key="item.id" 
+							:class="'imgbg-'+current"
+							>
+								<view>
+									<view class="dio dio-left"></view>
+									<view class="dio dio-right"></view>
+									<view class="check-order-left">
+										¥<text>{{item.ticketValue}}</text>
+									</view>
+									<view class="check-order-right">
+										<view class="check-order-title">{{item.activeName}}</view>
+										<view class="check-order-subtitle">{{item.activeTitle}}</view>
+										<view class="check-order-date">
+											<view>{{item.validStartDate}} 至</view>
+											<view>{{item.validEndDate}} 到期 </view>
+											<!-- <view class="use-date" v-if="current==1">使用时间:2021-12-31</view> -->
+										</view>
+										<view v-if="item.ticketExplain">
+											<view class="check-order-desc" :class="'border-'+current" @click="showDesc(item)">
+												<text>使用说明:</text>
+												<u-icon :name="item.showDesc?'arrow-up':'arrow-down'"></u-icon>
+											</view>
+											<view class="check-order-desc-content" v-if="item.showDesc">
+												 {{item.ticketExplain}}
+											</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>
+					</swiper-item>
+				</swiper>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { ticketQueryList } from '@/api/user.js'
+	import moment from 'moment'
+	export default {
+		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:{
+			message(title){
+				uni.showToast({
+					icon:'none',
+					title: title
+				})
+			},
+			pageInit(){
+				this.total = 0
+				this.pageNo = 1
+				this.getRow()
+			},
+			showDesc(item){
+				item.showDesc = !item.showDesc
+				this.list.splice()
+			},
+			// tabs通知swiper切换
+			tabsChange(index) {
+				this.list = []
+				this.status = "loading"
+				this.swiperCurrent = index;
+			},
+			swiperChange(event){
+				this.list = []
+				this.status = "loading"
+				this.swiperCurrent = event.detail.current
+			},
+			// 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,
+				ticketState: 'UNUSED'
+			  }
+			  // 状态条件
+			  if(this.swiperCurrent == 1){
+				  params.ticketState = 'USED'
+			  }
+			  if(this.swiperCurrent == 2){
+				  params.ticketState = 'DATED'
+			  }
+			  this.status = "loading"
+			  ticketQueryList(params).then(res => {
+				if (res.code == 200 || res.status == 204 || res.status == 200) {
+				  const list = res.data.list || []
+				  list.map(k => k.showDesc = false)
+				  _this.list = _this.list.concat(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'
+			  })
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	page{
+		height: 100%;
+	}
+	.digitShelf-pagesCons{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		.tab-body{
+			.check-list{
+				height: calc(100vh - 44px);
+			}
+			.imgbg-0{
+				background: #fde2da;
+				.check-order-left{
+					color: #f44336;
+				}
+				.check-order-right{
+					border-left: 1rpx dashed #ff7d73;
+				}
+			}
+			.imgbg-1{
+				background: #dbf5ce;
+				.check-order-left{
+					color: #4CAF50;
+				}
+				.check-order-right{
+					border-left: 1rpx dashed #4CAF50;
+				}
+			}
+			.imgbg-2{
+				background: #e2e2e2;
+				.check-order-left{
+					color: #9E9E9E;
+				}
+				.check-order-right{
+					border-left: 1rpx dashed #9E9E9E;
+				}
+			}
+			.check-order-list{
+				margin: 25upx;
+				border-radius: 30upx;
+				overflow: hidden;
+				> 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: 50%;
+					margin-top: -15rpx;
+				}
+				.dio-right{
+					right: -15rpx;
+					top: 50%;
+					margin-top: -15rpx;
+				}
+				.check-order-left{
+					width: 30%;
+					display: flex;
+					align-items: center;
+					justify-content:center;
+					font-size: 30rpx;
+					text{
+						font-size: 65rpx;
+					}
+				}
+				.check-order-right{
+					width: 70%;
+					padding: 25rpx;
+					background-color: #fff;
+					.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 0 0;
+					display: flex;
+					justify-content: space-between;
+				}
+				.check-order-desc-content{
+					padding: 5rpx 25rpx 25rpx 25rpx;
+					font-size: 24rpx;
+				}
+			}
+		}
+	}
+</style>

+ 468 - 0
pagesB/procureOrder.vue

@@ -0,0 +1,468 @@
+<template>
+	<view class="orderDetail-digitalShel flex flex_column">
+		<view class="contHead" :style="{background:state!= 'error'&&state!= 'AUDIT_REJECT'&&state!='CANCEL' ? '#066cff':'#f34503',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"><text>{{statusMessage}}</text></view>
+				</view>
+			</view>
+		</view>
+		<view class="order-body">
+			<view class="info partList" v-if="partList.length" style="max-height: 50vh;overflow: auto;">
+				<view class="infoList">
+					<view class="title">
+						产品列表
+					</view>
+					<view v-if="info">
+						共<text class="cText">{{info.totalCategory}}</text>款
+					</view>
+				</view>
+				<view v-for="(item,dix) in partList" :key="item.id" class="item-list-box">
+					<view class="item-list flex">
+						<view style="height: 160rpx;width: 160rpx;">
+							<u-image :src="item.product.images+'?x-oss-process=image/resize,p_50'" border-radius="16" width="160" height="160" bg-color="#EBEBEB" ></u-image>
+						</view>
+						<view>
+							<view class="item-name">
+							  <text>{{item.product.productName}}</text>
+							</view>
+							<view class="item-nums" v-if="item.product&&item.product.origCode">
+								<text style="color: #00aaff;">{{item.product.origCode}}</text>
+							</view>
+							<view class="item-nums" v-if="item.product&&item.product.code">
+								<text>{{item.product.code}}</text>
+							</view>
+							<view class="item-head">
+								<view class="flex align_center">
+									<view class="price-txt">¥<text>{{item.priceStr[0]}}</text>.{{item.priceStr[1]}}</view>
+									<view class="flex align_center rebate-tag" v-if="item.promoProductType=='TICKET_PRODUCT'">
+										返<text>{{item.resultValue}}</text>元
+									</view>
+									<view class="flex align_center rebate-tag" v-if="item.promoProductType=='REGULAR_PRODUCT'">
+										买{{item.conditionValue}}赠{{item.resultValue}}
+									</view>
+									<view class="flex align_center tejia-tag" v-if="item.promoProductType=='SPECIAL_PRODUCT'">
+										特价<text>¥{{item.priceOrig}}</text>
+									</view>
+								</view>
+								<view>
+									X <text class="cText">{{item.qty}}</text>{{item.product&&item.product.unit||''}}
+								</view>
+							</view>
+						</view>
+					</view>
+					<!-- 赠品 -->
+					<view class="item-list flex gift-box" v-if="item.giftObj">
+						<view style="height: 120rpx;width: 120rpx;margin-left: 40rpx;">
+							<u-image :src="item.giftObj.product.images+'?x-oss-process=image/resize,p_50'" border-radius="16" width="120" height="120" bg-color="#EBEBEB" ></u-image>
+						</view>
+						<view>
+							<view class="item-name flex align_center">
+							  <view class="flex align_center rebate-tag">
+							  	赠品
+							  </view>
+							  <text class="ellipsis-one">{{item.giftObj.product.productName}}</text>
+							</view>
+							<view class="item-nums ellipsis-one" v-if="item.giftObj.product&&item.giftObj.product.origCode">
+								<text style="color: #666;">{{item.giftObj.product.origCode}}</text>
+							</view>
+							<view class="item-nums ellipsis-one" v-if="item.giftObj.product&&item.giftObj.product.code">
+								<text>{{item.giftObj.product.code}}</text>
+							</view>
+							<view class="item-head">
+								<view class="flex align_center"></view>
+								<view>
+									X <text class="cText">{{item.giftObj.qty}}</text>{{item.giftObj.product&&item.giftObj.product.unit||''}}
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+				<!-- 分页 -->
+				<view class="product-pages" v-if="totalPages>1">
+					<uni-pages-nav :totalPages="totalPages" :showShadow="false" :currentPage="pageNo" @pagechanged="getRow"></uni-pages-nav>
+				</view>
+			</view>
+			<view class="info" v-if="info">
+				<view class="infoList gray-text" v-if="info.totalTicketGiveAmount">
+					<text>代金券</text>
+					<text class="cText">¥{{Number(info.totalTicketGiveAmount).toFixed(2)}}</text>
+				</view>
+				<view class="infoList gray-text" v-if="info.totalSpecialGiveAmount">
+					<text>总优惠</text>
+					<text class="cText">¥{{Number(info.totalSpecialGiveAmount).toFixed(2)}}</text>
+				</view>
+				<view class="infoList">
+					<text>总金额</text>
+					<view class="price-txt">¥<text>{{Number(info.totalAmount).toFixed(2)}}</text></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.purchaseNo||'--'}}</text>
+				</view>
+				<view class="infoList">
+					<text>下单时间</text>
+					<text>{{info.purchaseDate||'--'}}</text>
+				</view>
+				<view class="infoList">
+					<text>下单人员</text>
+					<text>{{info.purchaserName || '--'}}</text>
+				</view>
+			</view>
+		</view>
+		<view class="footer flex align_center justify_center" v-if="info">
+			<u-button v-if="info.billStatus == 'WAIT_AUDIT'" shape="circle" type="error" plain @click="cancelOrder(info)">取消订单</u-button>
+			<u-button v-if="info.billStatus == 'WAIT_RECEIVE'" shape="circle" type="primary" @click="receiveOrder(info)">确认收货</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { purchaseQueryDetailPage,purchaseCancel,purchaseReceive } from '@/api/purchase.js'
+	export default {
+	   name: 'procureDetailOrder',
+	   data() {
+		   return {
+			   loading: false,
+			   info: null,
+			   statusText: '',
+			   statusIcon: '', // 结算状态icon
+			   statusMessage: '请耐心等待汽配经销商进行配送',
+			   partList: [], // 配件列表
+			   state: 'success',
+			   pageNo:1,
+			   pageSize: 30,
+			   total: 0,
+			   purchaseSn: null
+		   }
+	   },
+	   onLoad(option) { 
+		   uni.setNavigationBarTitle({
+		   	title: '采购订单详情'
+		   })
+		   // 从采购单列表来
+		  if(option.purchaseSn){
+			  this.state = option.state
+			  this.purchaseSn = option.purchaseSn
+			  const stateText = {'WAIT_AUDIT':'待审核','AUDIT_REJECT':'审核不通过','WAIT_OUT_WAREHOUSE':'待收货','FINISH':'已完结','CANCEL':'已取消'}
+			  this.statusText = stateText[option.state]
+			  this.statusIcon = option.state == 'FINISH' ? 'checkmark-circle' : 'hourglass'
+			  this.info = this.$store.state.vuex_tempData
+			  this.statusMessage = option.state == 'FINISH' || option.state == 'AUDIT_REJECT' || option.state == 'CANCEL' ? '' : '请耐心等待汽配经销商进行配送'
+			  // 获取明细
+			  this.getDetailList()
+		  }else{
+			  const data = this.$store.state.vuex_tempData
+			  if(data){
+				  this.info = data
+				  this.state = data.billStatus
+				  this.purchaseSn = data.purchaseSn
+				  // 获取明细
+				  this.getDetailList()
+			  }
+			  this.statusText = '提交成功'
+			  this.statusIcon = 'checkmark-circle'
+		  } 
+		  
+		  // 更改标题栏背景色
+		  uni.setNavigationBarColor({
+		  	frontColor: '#ffffff',
+		  	backgroundColor: this.state!= 'error'&&this.state!= 'AUDIT_REJECT'&&this.state!= 'CANCEL' ? '#066cff':'#f34503',
+		  })
+	   },
+	   onUnload() {
+			this.$store.state.vuex_tempData = null
+	   },
+	   computed: {
+		   totalPages(){
+			   return Math.ceil(this.total / this.pageSize)
+		   }
+	   },
+	   methods: {
+		 getRow(pageNo){
+			this.pageNo = pageNo
+			this.getDetailList()
+		 },
+		 getDetailList(){
+		   uni.showLoading({
+		   	title: '加载中'
+		   })
+		   purchaseQueryDetailPage({purchaseSn: this.purchaseSn,pageNo:this.pageNo,pageSize:this.pageSize}).then(res => {
+				if(res.status == 200){
+					this.partList = res.data ? res.data.list : []
+					// 是否有赠品
+					const giftList = this.partList.filter(item => item.promoProductType == 'GIFT_PRODUCT')
+					// 正品
+					this.partList = this.partList.filter(item => item.promoProductType !== 'GIFT_PRODUCT')
+					this.partList.map(item=>{
+					  // 关联赠品
+					  item.giftObj = giftList.find(gift => gift.purchaseDetailParentSn  == item.purchaseDetailSn)
+					  item.priceStr = Number(item.price).toFixed(2).toString().split('.')
+					})
+					this.total = res.data ? res.data.count : 0
+				}
+				// 滚动到顶部
+				this.$nextTick(()=>{
+					uni.pageScrollTo({
+						scrollTop: 0,
+						duration: 300
+					});
+					uni.hideLoading()
+				})
+		   }) 
+		 },
+		 message(title){
+		 	uni.showToast({
+		 		icon:'none',
+		 		title: title
+		 	})
+		 },
+		 // 取消订单
+		 cancelOrder(item){
+		 	let _this = this
+		 	uni.showModal({
+		 		title: '提示',
+		 		content: '确定取消订单吗?',
+		 		success: function (res) {
+		 			if (res.confirm) {
+		 				purchaseCancel({purchaseSn:_this.purchaseSn}).then(res => {
+		 					if (res.status == 200) {
+		 						_this.message('取消成功')
+								uni.$emit('refreshOrder')
+								uni.navigateBack()
+		 					} else {
+		 						_this.message(res.message)
+		 					}
+		 				})
+		 			}
+		 		}
+		 	});
+		 },
+		 // 确认收货
+		 receiveOrder(item){
+		 	let _this = this
+		 	uni.showModal({
+		 		title: '提示',
+		 		content: '确定收货吗?',
+		 		success: function (res) {
+		 			if (res.confirm) {
+		 				purchaseReceive({purchaseSn:_this.purchaseSn}).then(res => {
+		 					if (res.status == 200) {
+		 						_this.message('收货成功')
+								uni.$emit('refreshOrder')
+		 						uni.navigateBack()
+		 					} else {
+		 						_this.message(res.message)
+		 					}
+		 				})
+		 			}
+		 		}
+		 	});
+		 },
+	   }
+	}
+</script>
+
+<style lang="less">
+	page{
+		height: 100%;
+	}
+	.orderDetail-digitalShel{
+		height: 100%;
+		.redText{
+			color: #FB1E1E;
+			margin: 0 10rpx;
+		}
+		.cText{
+			color: #666;
+			margin: 0 6rpx;
+			font-size: 14px;
+		}
+		.gray-text{
+			text{
+				font-size: 14px;
+				color: #999;
+			}
+		}
+		.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: 28upx;
+					text-align: center;
+					text{
+						color: #f3e781;
+					}
+					padding: 20rpx 0;
+				}
+			}
+		}
+		.price-txt{
+			color: red;
+			display: flex;
+			align-items: baseline;
+			font-size: 12px;
+			text{
+				font-size: 32rpx;
+			}
+		}
+		.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-box{
+				border-bottom: 2rpx solid #f2f2f2;
+			}
+			.item-list{
+				padding: 20rpx 0;
+				&:last-child{
+					border: none;
+				}
+				> view{
+					&:first-child{
+						margin-right: 20rpx;
+						position: relative;
+						overflow: hidden;
+						width: 160rpx;
+						height: 160rpx;
+						border-radius: 6px;
+						border: 1px solid #eee;
+					}
+					&:last-child{
+						flex-grow: 1;
+						width: 60%;
+					}
+				}
+				.item-name{
+					word-wrap: break-word;
+					font-size: 28rpx;
+					color: #333;
+					font-weight: bold;
+				}
+				.item-nums{
+					text{
+						font-size: 28rpx;
+						color: #666;
+					}
+				}
+				.item-head{
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					color: #666;
+					margin-top: 5px;
+					> view:last-child{
+						font-size: 24rpx;
+						text{
+							margin: 0 10rpx;
+							font-size: 28rpx;
+						}
+					}
+				}
+				.rebate-tag{
+					background: #ffe7df;
+					color: #E91E63;
+					padding: 2px 5px;
+					font-size: 10px;
+					border-radius: 3px;
+					margin-left: 6px;
+				}
+				.tejia-tag{
+					color: #E91E63;
+					margin-left: 6px;
+					font-size: 12px;
+					text{
+						font-size: 12px;
+						color: #999;
+						margin-left: 5px;
+						text-decoration: line-through;
+					}
+				}
+			}
+		}
+		.gift-box.item-list{
+			.item-name{
+				color: #666;
+				font-size: 12px;
+				font-weight: normal;
+			}
+			.item-nums{
+				text{
+					color: #666;
+					font-size: 12px;
+				}
+			}
+			.rebate-tag{
+				margin-left: 0;
+				margin-right: 5px;
+			}
+			.ellipsis-one{
+				flex-grow: 1;
+				width:80%;
+			}
+		}
+		.footer{
+			padding: 20upx 60upx;
+			background: #FFFFFF;
+			button{
+				&:after{
+					border: 0;
+				}
+				color: #585858;
+				font-size: 32rpx;
+				margin: 0 20rpx;
+			}
+		}
+	}
+	
+</style>

+ 305 - 0
pagesB/procureOrderList.vue

@@ -0,0 +1,305 @@
+<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" v-if="swiperCurrent == indexs">
+							<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.purchaseNo}}</view>
+									<view class="times">{{item.createDate}}</view>
+								</view>
+								 <view class="check-row flex align-center justify_between">
+									 <view>总款数:{{item.totalCategory}}</view>
+									 <view>总金额:<text class="price">¥{{item.totalAmount}}</text></view>
+								 </view>
+								 <view class="check-row">
+									 <view class="nums">
+										 共{{item.totalQty}}件商品
+									 </view>
+									 <view style="text-align: right;color: #999;">
+										 <span v-if="item.billStatus == 'WAIT_AUDIT'">待审核</span>
+										 <span v-if="item.billStatus == 'AUDIT_REJECT'">审核不通过</span>
+										 <span v-if="item.billStatus == 'WAIT_OUT_WAREHOUSE' || item.billStatus == 'WAIT_RECEIVE'">待收货</span>
+										 <span v-if="item.billStatus == 'FINISH'">已完结</span>
+										 <span v-if="item.billStatus == 'CANCEL'">已取消</span>
+										 <u-button style="margin-left: 10px;" v-if="item.billStatus == 'WAIT_AUDIT'" size="mini" shape="circle" type="error" plain @click="cancelOrder(item)">取消订单</u-button>
+										 <u-button style="margin-left: 10px;" v-if="item.billStatus == 'WAIT_RECEIVE'" size="mini" shape="circle" type="primary" @click="receiveOrder(item)">确认收货</u-button>
+									 </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 { purchaseQueryPage,purchaseCancel,purchaseReceive } from '@/api/purchase.js'
+	export default {
+		data() {
+			return {
+				status: 'loading',
+				noDataText: '暂无数据',
+				tabList: [
+					  {
+						  dispName: '全部',
+						  typeId: 1,
+						  count: 0
+					   },
+					  {
+					    dispName: '待收货',
+					  	typeId: 2,
+						count: 0
+					  },
+					  {
+					    dispName: '已完结',
+					  	typeId: 3,
+						count: 0
+					  },
+					  {
+					    dispName: '已取消',
+					  	typeId: 4,
+					  	count: 0
+					  },
+				  ],
+				current: 1,
+				swiperCurrent: 1,
+				// 查询条件
+				pageNo: 1,
+				pageSize: 10,
+				list: [],
+				total: 0,
+			}
+		},
+		onLoad() {
+			this.$store.state.vuex_tempData = null
+			let _this = this
+			_this.pageInit()
+			uni.$on('refreshOrder',function(data){
+				 _this.list = []
+				 _this.status = "loading"
+			     _this.pageInit()
+			})
+		},
+		methods:{
+			message(title){
+				uni.showToast({
+					icon:'none',
+					title: title
+				})
+			},
+			pageInit(){
+				this.total = 0
+				this.pageNo = 1
+				this.getRow()
+			},
+			// tabs通知swiper切换
+			tabsChange(index) {
+				if(index != this.swiperCurrent && this.status !='loading'){
+					this.list = []
+					this.status = "loading"
+					this.swiperCurrent = index;
+				}
+			},
+			swiperChange(event){
+				this.list = []
+				this.status = "loading"
+				this.swiperCurrent = event.detail.current
+			},
+			// 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() {
+				if(this.list.length < this.total){
+					this.pageNo += 1
+					this.getRow()
+				}else{
+					this.status = "nomore"
+				}
+			},
+			// 取消订单
+			cancelOrder(item){
+				let _this = this
+				uni.showModal({
+					title: '提示',
+					content: '确定取消订单吗?',
+					success: function (res) {
+						if (res.confirm) {
+							purchaseCancel({purchaseSn:item.purchaseSn}).then(res => {
+								if (res.status == 200) {
+									_this.message('取消成功')
+									_this.pageInit()
+								} else {
+									_this.message(res.message)
+								}
+							})
+						}
+					}
+				});
+			},
+			// 确认收货
+			receiveOrder(item){
+				let _this = this
+				uni.showModal({
+					title: '提示',
+					content: '确定收货吗?',
+					success: function (res) {
+						if (res.confirm) {
+							purchaseReceive({purchaseSn:item.purchaseSn}).then(res => {
+								if (res.status == 200) {
+									_this.message('收货成功')
+									_this.pageInit()
+								} else {
+									_this.message(res.message)
+								}
+							})
+						}
+					}
+				});
+			},
+			// 查询列表
+			getRow (pageNo) {
+			  let _this = this
+			  if (pageNo) {
+			    this.pageNo = pageNo
+			  }
+			  let params = {
+			    pageNo: this.pageNo,
+			    pageSize: this.pageSize,
+			  }
+			  // 状态条件
+			  if(this.swiperCurrent == 1){
+				  params.billStatusList = ['WAIT_AUDIT','AUDIT_REJECT','WAIT_OUT_WAREHOUSE','WAIT_RECEIVE']
+			  }
+			  if(this.swiperCurrent == 2){
+				  params.billStatusList = ['FINISH']
+			  }
+			  if(this.swiperCurrent == 3){
+			  	  params.billStatusList = ['CANCEL']
+			  }
+			  this.status = "loading"
+			  purchaseQueryPage(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
+				  // 待收货
+				  if(_this.swiperCurrent == 1){
+					  _this.tabList[1].count = _this.total
+				  }
+				} else {
+				  _this.list = []
+				  _this.total = 0
+				  _this.noDataText = res.message
+				}
+				_this.status = _this.total>=_this.list.length ? "nomore" : 'loadmore'
+			  })
+			},
+			// 详细页
+			viewRow(item){
+				this.$store.state.vuex_tempData = item
+				uni.navigateTo({
+					url: "/pagesB/procureOrder?purchaseSn="+item.purchaseSn+"&state="+item.billStatus
+				})
+			}
+		}
+	}
+</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{
+						 .price{
+							 color: red;
+							 font-size: 28upx;
+						 }
+					}
+					 
+					.finish{
+						background-color: #2d8cf0;
+					}
+					.del{
+						color: #666;
+						border:2rpx solid #EDEDED;
+						background: none;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 244 - 0
pagesB/promoProduct.vue

@@ -0,0 +1,244 @@
+<template>
+	<view class="scrollPage">
+		<!-- head -->
+		<sklineHeader :title="title"></sklineHeader>
+		<!-- body -->
+		<scroll-view 
+		class="scrollPage-body" 
+		:style="{height: bodyHeight + 'px'}" 
+		scroll-y="true" 
+		type="custom" 
+		:bounces="false"
+		@scrolltolower="reachBottom">
+			<!-- 搜索,吸顶 -->
+			<sticky-header>
+				<view class="search-head">
+					<uni-search-bar radius="100" placeholder="请输入产品名称/轮胎规格" clearButton="auto" cancelButton="none" @confirm="searchList" @clear="searchList" />
+				</view>
+			</sticky-header>
+			<!-- 产品列表 -->
+			<productItem
+			v-for="(item,index) in list"
+			:key="index" 
+			:list="item" 
+			:index="index"
+			:itemWidth="(screenWidth*0.96-screenWidth*0.02)*0.5"
+			:gap="screenWidth*0.02"
+			@detail="toDetail"
+			></productItem>
+			<!-- loading -->
+			<view class="loading-bar" v-if="total>0 && (loading||loadEnd)">{{loadText}}</view>
+			<view class="empty-bar" v-if="total==0&&!loading">
+				<image mode="aspectFit" :src="empty.imgUrl"></image>
+				<view>{{empty.tip}}</view>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	import {
+	    mapState,
+	    mapMutations,
+	} from 'vuex'
+	import { getShopProductList } from '@/api/shop.js'
+	import productItem from '@/pagesB/components/productItemSkline.vue'
+	import sklineHeader from '@/components/skline/sklineHeader.vue'
+	export default {
+		components:{
+			productItem,
+			sklineHeader
+		},
+		data() {
+			return {
+				title: '促销产品列表',
+				pageNo:1,
+				pageSize:8,
+				total:0,
+				list:[],
+				loading:false,
+				loadEnd: false,
+				loadText: '加载中...',
+				empty: {
+					tip: '暂无产品',
+					imgUrl: '/static/nodata.png'
+				},
+				queryWord:'',
+				promoSn:'',
+				screenWidth: 750,
+				screenHeight: 0,
+				statusBarHeight: 44,
+				safeAreaBottom: 0,
+				bodyHeight: 0
+			};
+		},
+		computed: {
+			...mapState(['hasLogin']),
+			userInfo(){
+				return this.$store.state.vuex_userInfo
+			},
+			storeShelf(){
+				return this.$store.state.vuex_storeShelf
+			}
+		},
+		onLoad(opts) {
+			this.title = opts.title||'促销产品列表'
+			this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
+			this.screenWidth = uni.getSystemInfoSync().windowWidth
+			this.screenHeight = uni.getSystemInfoSync().windowHeight
+			this.safeAreaBottom = uni.getSystemInfoSync().safeAreaInsets.bottom
+			this.bodyHeight = this.screenHeight - this.statusBarHeight - this.safeAreaBottom - 44
+			
+			// 清空临时数据
+			this.$store.state.vuex_tempData = null
+			this.promoSn = opts.promoSn
+			console.log(opts)
+			// 查询列表
+			this.getList()
+		},
+		onUnload(){
+			this.list = null
+		},
+		methods: {
+			goBack() {
+				uni.navigateBack();
+			},
+			toDetail(item){
+				uni.navigateTo({
+					url:'/pagesB/shopiing/productDetail?sn='+item.shopProductSn
+				})
+			},
+			// 滚动到底部
+			reachBottom() {
+				if(!this.loading && !this.loadEnd){
+					this.pageNo++
+					this.getList()
+				}
+			},
+			// 搜索
+			searchList(event){
+				this.loadEnd = false
+				this.loadText = '加载中...'
+				this.queryWord = event.value
+				this.list = []
+				this.pageNo = 1
+				this.getList()
+			},
+			// 列表查询
+			getList(){
+				this.loading = true
+				const dealerSn = this.hasLogin && this.userInfo && this.userInfo.sysUserFlag == '1'&&this.storeShelf ? this.storeShelf.dealerSn : ''
+				getShopProductList({
+					pageNo: this.pageNo,
+					pageSize: this.pageSize,
+					productCode: this.queryWord,
+					promoSn: this.promoSn,
+					status: 1,
+					dealerSn: dealerSn
+				}).then(res => {
+					this.loading = false
+					if(res.status == 200){
+						this.total = res.data.count
+						if(this.total){
+							const list = res.data.list || []
+							const ret = []
+							// 更新已选状态
+							list.forEach(k => {
+								const a = k.shopPromoProduct
+								if(a){
+								  k.promoType = a.promoType
+								  k.resultValue = a.resultValue
+								  k.conditionValue = a.conditionValue
+								  k.discountType = a.discountType
+								  k.promoProductSn = a.promoProductSn
+								  k.promoSn = a.promoSn
+								  k.orginPrice = k.price
+								  // 特价
+								  if(k.promoType=='PROMO_PROD'){
+									k.price = k.conditionValue
+								  }
+								}
+							  // 如果筛选或分页后,更新页面列表产品数量
+							  ret.push({
+								  id: k.id,
+								  checked: false,
+								  qty: 0,
+								  price: k.price,
+								  orginPrice: k.orginPrice,
+								  priceStr: Number(k.price).toFixed(2).toString().split('.'),
+								  productCode: k.productCode,
+								  productSn: k.productSn,
+								  productImage: k.productMsg,
+								  productName: k.productName,
+								  productOrigCode: k.productOrigCode,
+								  categorySn: k.categorySn,
+								  hotFlag: k.hotFlag,
+								  productSn: k.productSn,
+								  priceType: k.priceType,
+								  shopProductSn: k.shopProductSn,
+								  status: k.status,
+								  statusDictValue: k.statusDictValue,
+								  dealerScopeFlag: k.dealerScopeFlag,
+								  promoType: k.promoType,
+								  resultValue: k.resultValue,
+								  conditionValue: k.conditionValue,
+								  discountType: k.discountType,
+								  promoProductSn: k.promoProductSn,
+								  promoSn: k.promoSn
+							  })
+							})
+							// 追加数据
+							this.list.push(ret)
+							// 判断是否最后一页
+							const maxPages = Math.ceil(this.total / this.pageSize)
+							if(this.pageNo >= maxPages){
+								this.loadEnd = true
+								this.loadText = '没有更多了'
+							}
+						}else{
+							this.loadEnd = false
+							this.loadText = '暂无产品'
+						}
+					}
+				}).catch(err => {
+					this.loading = false
+				})
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+.scrollPage{
+	height: 100vh;
+	display: flex;
+	flex-direction: column;
+	.loading-bar{
+		text-align: center;
+		padding: 10px 0;
+		color: #999999;
+	}
+	.empty-bar{
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		padding: 20px 0;
+		image{
+			width: 100px;
+			height: 100px;
+		}
+		view{
+			font-size: 14px;
+			color: #999999;
+			margin-top: 10px;
+		}
+	}
+	.scrollPage-body{
+		height: 100%;
+		.search-head{
+			background: #fff;
+		}
+	}
+}
+</style>

+ 1 - 1
pages/morePage/redPacket.vue → pagesB/redPacket.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="content">
 		<view class="header-img">
-			<u-image src="/static/hbheader.jpg" width="750" height="578"></u-image>
+			<u-image src="/pagesB/static/hbheader.jpg" width="750" height="578"></u-image>
 			<!-- 滚动区域 -->
 			<view class="scroll-list" v-if="slist.length">
 				<scrollBox :list="slist" bgColor="rgba(250, 224, 188, 0.6)"></scrollBox>

+ 153 - 0
pagesB/shopShow/shopShow.vue

@@ -0,0 +1,153 @@
+<template>
+	<view class="page-body scroll-list">
+		<scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom">
+			<view style="height: 20rpx;" ></view>
+			<view  
+			class="check-order-list" 
+			v-for="(item,index) in list" 
+			:key="item.userId" 
+			>
+				<view class="flex align_center justify_between" @click="editPerson(item)">
+					<view class="u-name">
+						<text style="margin-right: 0.5rem;">{{item.userName}}</text>
+					</view>
+					<view class="u-mobile">
+						<text v-if="item.isManager == 1">门店负责人/ </text>
+						<text v-if="item.isManager == 0 && item.roleName">{{item.roleName}} / </text>
+						{{item.phone}}
+					</view>
+				</view>
+				<view class="set-item flex align_center justify_between">
+					商城是否显示:
+					<u-radio-group @change="e=>changeShow(e,item)" v-model="item.show" :width="150">
+						<u-radio :name="1">是</u-radio>
+						<u-radio :name="0">否</u-radio>
+					</u-radio-group>
+				</view>
+			 </view>
+			 <view style="padding:0 30upx 30upx;">
+				 <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>
+</template>
+
+<script>
+	import {getShopUserParamList, updateShopUserParam } from '@/api/bizParam.js'
+	import moment from 'moment'
+	export default{
+		name:'personnel',
+		data(){
+			return{
+				status: 'loading',
+				noDataText: '暂无数据',
+				// 查询条件
+				pageNo: 1,
+				pageSize: 1000,
+				list: [],
+				total: 0,
+			}
+		},
+		onShow() {
+			this.getRow(1)
+		},
+		computed:{
+			userInfo(){
+				return this.$store.state.vuex_userInfo
+			},
+			hasOnlyAdmin(){
+				return this.list.length ==1 && this.list[0].isManager == 1 || this.list.length == 0
+			}
+		},
+		methods:{
+			// 查询列表
+			getRow (pageNo) {
+			  let _this = this
+			  const shelf = this.$store.state.vuex_storeShelf
+			  let params = {
+				shelfSn: shelf.shelfSn
+			  }
+			  this.status = "loading"
+			  getShopUserParamList(params).then(res => {
+				if (res.code == 200 || res.status == 204 || res.status == 200) {
+				  const list = res.data || []
+				  list.forEach(item=>{
+					  item.show = item.paramMap && item.paramMap.mall_flag && item.paramMap.mall_flag.paramValue
+				  })
+				  if(_this.pageNo>1){
+					  _this.list = _this.list.concat(list)
+				  }else{
+					  _this.list = list
+				  }
+				  _this.total = list.length || 0
+				} else {
+				  _this.list = []
+				  _this.total = 0
+				  _this.noDataText = res.message
+				}
+				 
+				_this.status = _this.total>=_this.list.length ? "nomore" : 'loadmore'
+			  })
+			},
+			// scroll-view到底部加载更多
+			onreachBottom() {
+				if(this.list.length < this.total){
+					this.pageNo += 1
+					this.getRow()
+				}else{
+					this.status = "nomore"
+				}
+			},
+			changeShow(e,item){
+				console.log(e,item)
+				uni.showLoading({
+					title: '加载中'
+				})
+				const userId = item.userId
+				const shelf = this.$store.state.vuex_storeShelf
+				updateShopUserParam({'userId':userId,'paramValue':e,shelfSn: shelf.shelfSn}).then(res=>{
+					uni.hideLoading()
+					if(res.status == 200){
+						item.show = e
+						uni.$emit("refashHome")
+					}else{
+						item.show = !e ? 1 : 0
+					}
+					this.list.splice()
+					uni.showToast(res.message)
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.page-body{
+		height: 100vh;
+		padding:0;
+	}
+	.scroll-list{
+		.check-order-list{
+			background: #ffffff;
+			padding: 10upx 20upx;
+			margin: 0 25rpx 25rpx 25rpx;
+			border-radius: 20upx;
+			box-shadow: 1px 1px 3px #EEEEEE;
+			> view{
+				padding: 0.5rem;
+				.u-name{
+					font-size: 32rpx;
+				}
+				.u-mobile{
+					color: #666;
+				}
+			}
+		}
+		.set-item {
+			/deep/ .u-radio__label{
+				flex: 1;
+			}
+		}
+	}
+</style>

+ 803 - 0
pagesB/shopiing/productDetail.vue

@@ -0,0 +1,803 @@
+<template>
+	<view class="pages">
+		<!-- head -->
+		<view class="scrollPage-header">
+			<view :style="{height:statusBarHeight+'px'}"></view>
+			<view class="header-title">
+				<view class="header-left" @click="goBack">
+					<uni-icons type="arrowleft" size="20"></uni-icons>
+					<text>{{isShare?'首页':'返回'}}</text>
+				</view>
+				<view class="header-right"></view>
+			</view>
+		</view>
+		<!-- 内容 -->
+		<view class="scrollPage-content">
+			<view class="product-info" v-if="detail">
+				<view :style="{height:statusBarHeight+'px'}"></view>
+				<u-swiper mode="number" :border-radius="0" img-mode="aspectFit" :interval="3000" :height="450" :list="imgList" @click="viewImg"></u-swiper>
+				<view class="product-info-text">
+					<view class="product-info-text-title">
+						{{detail.productName}} 
+						<!-- <view class="copyText" @click="copy(detail.productName)">复制</view> -->
+						<uni-tag style="margin-left: 10px;" size="mini" :circle="true" v-if="detail.status==0 || detail.dealerScopeFlag==0" :text="detail.status==0?'已下架':'已售罄'"></uni-tag>
+					</view>
+					<view class="product-info-text-attr">
+						<view class="product-info-price flex align_center" v-if="!hasLogin">
+							¥***
+						</view>
+						<view class="flex align_center" v-else>
+							<view class="product-info-price">
+								¥<text>{{detail.priceStr[0]}}</text>.{{detail.priceStr[1]}}
+							</view>
+							<view class="flex align_center rebate-tag" v-if="detail.promoType=='BUY_PROD_GIVE_VALID'">
+								返<text>{{detail.resultValue}}</text>元
+							</view>
+							<view class="flex align_center rebate-tag" v-if="detail.promoType=='BUY_PROD_GIVE_PROD'">
+								买{{detail.conditionValue}}赠{{detail.resultValue}}
+							</view>
+							<view class="flex align_center tejia-tag" v-if="detail.promoType=='PROMO_PROD'">
+								特价<text>¥{{detail.orginPrice}}</text>
+							</view>
+						</view>
+						<view class="product-info-nums">
+							<view class="share">
+								<button open-type="share"><u-icon :size='24' name="zhuanfa"></u-icon> 分享</button>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<u-divider bg-color="">商品详情</u-divider>
+			<view class="product-info-guige" v-if="detail&&detail.product">
+				<view class="row">品牌:<text>{{detail.product.productBrandName||'--'}}</text></view>
+				<view class="row">原厂编码:<text>{{detail.product.origCode||'--'}} </text> <view class="copyText" v-if="detail.product.origCode" @click="copy(detail.product.origCode)">复制</view></view>
+				<view class="row">产品编码:<text>{{detail.product.code||'--'}}</text> <view class="copyText" v-if="detail.product.code" @click="copy(detail.product.code)">复制</view></view>
+				<view class="row">条形码:<text>{{detail.product.qrCode||'--'}}</text> <view class="copyText" v-if="detail.product.qrCode" @click="copy(detail.product.qrCode)">复制</view></view>
+				<view class="row-ban">商品尺寸:<text>{{detail.product.size||'--'}}</text></view>
+				<view class="row-ban">计量单位:<text>{{detail.product.unit||'--'}}</text></view>
+				<view class="row-ban">重量:<text>{{detail.product.weight||'--'}}</text></view>
+				<view class="row-ban">包装数:<text>{{ (detail.product.packQty) || '--' }}{{ detail.product.packQty ? detail.product.unit : '' }}/{{ detail.product.packQtyUnit||'--' }}</text></view>
+			</view>
+			<view class="product-info-content">
+				<rich-text v-if="detail && detail.product && detail.product.description" :nodes="detail.product.description"></rich-text>
+				<view v-else style="font-size: 12px;color: #999;text-align: center;">暂无产品介绍</view>
+			</view>
+		</view>
+		<!-- 底部栏 -->
+		<view class="scrollPage-footer">
+			<view class="scrollPage-footer-box">
+				<view class="footer-left">
+					<view v-if="isShare" class="footer-left-item" @click="goBack">
+						<u-icon :size='50' color="#666" name="home"></u-icon>
+						<text class="footer-left-item-text">首页</text>
+					</view>
+					<view class="footer-left-item" @click="toCart">
+						<u-icon :size='50' color="#666" name="shopping-cart"></u-icon>
+						<text class="footer-left-item-text">购物车</text>
+						<text class="badge" v-if="totalNum">{{totalNum>99?'99+':totalNum}}</text>
+					</view>
+				</view>
+				<view class="footer-right">
+					<view class="footer-right-item" @click="addCart($event)">
+						<text>加入购物车</text>
+					</view>
+					<view class="footer-right-item" @click="toBuy">
+						<text>立即购买</text>
+					</view>
+				</view>
+			</view>
+			<view :style="{height:safeAreaBottom+'px'}"></view>
+		</view>
+		<!-- 购物车动画 -->
+		<uni-cart-animation ref="cartAnimation" @animationfinish="animationfinish"></uni-cart-animation>
+		<!-- 立即购买 -->
+		<page-container
+		:show="showPopu" 
+		:round="true"
+		:z-index="100"
+		position="center" 
+		customStyle="right: 0; left: 0; top: 0; bottom: 0; margin: auto 10%;width: fit-content;height: fit-content;border-radius:15px;"
+		@afterleave="closePopu">
+			<view class="popu-content" v-if="detail">
+				<view class="popu-close" @click="showPopu=false">
+					<uni-icons size="26" type="closeempty"></uni-icons>
+				</view>
+				<view class="pupu-box">
+					<view class="popu-content-img">
+						<image style="width: 80px; height: 80px;" mode="aspectFit" :src="detail.productMsg||'/static/def_imgs.png'"></image>
+					</view>
+					<view class="popu-content-info">
+						<view class="popu-content-info-title">
+							<text class="ellipsis-two">{{detail.productName}}</text>
+						</view>
+						<view class="popu-content-box">
+							<view class="popu-content-price" v-if="hasLogin">
+								¥<text>{{detail.priceStr[0]}}</text>.{{detail.priceStr[1]}}
+							</view>
+							<view class="popu-content-price" v-else>¥***</view>
+							<view class="flex align_center rebate-tag" v-if="hasLogin&&detail.promoType=='BUY_PROD_GIVE_VALID'">
+								返<text>{{detail.resultValue}}</text>元
+							</view>
+							<view class="flex align_center rebate-tag" v-if="hasLogin&&detail.promoType=='BUY_PROD_GIVE_PROD'">
+								买{{detail.conditionValue}}赠{{detail.resultValue}}
+							</view>
+							<view class="flex align_center tejia-tag" v-if="hasLogin&&detail.promoType=='PROMO_PROD'">
+								特价<text>¥{{detail.orginPrice}}</text>
+							</view>
+						</view>
+						<view class="popu-content-num flex align_center justify_between">
+							<text>数量</text>
+							<uni-number-box v-model="qty" :input-width="150" :input-height="60" :min="1" :max="999"></uni-number-box>
+						</view>
+					</view>
+				</view>
+				<view class="pupu-box gift-box" v-if="giftNum">
+					<view class="popu-content-img">
+						<image style="width: 58px; height: 58px;" mode="aspectFit" :src="detail.productMsg||'/static/def_imgs.png'"></image>
+					</view>
+					<view class="popu-content-info">
+						<view class="popu-content-info-title flex align_center">
+							<view class="flex align_center rebate-tag">
+								赠品
+							</view>
+							<view class="ellipsis-two">{{detail.productName}}</view>
+						</view>
+						<view class="popu-content-box justify_between">
+							<view></view>
+							<view class="popu-content-num flex align_center">
+								<text>X</text> {{giftNum}}
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="popu-content-btn">
+					<view class="popu-content-btn-item cancelBtn" @click="showPopu=false">取消</view>
+					<view class="popu-content-btn-item okbtn" @click="toBuy">确定采购</view>
+				</view>
+			</view>
+		</page-container>
+	</view>
+</template>
+
+<script>
+	import {
+	    mapState,
+	    mapMutations,
+	} from 'vuex'
+	import { addCart, getCartCount } from '@/api/cart.js'
+	import { getShopDetail } from '@/api/shop.js'
+	import { purchaseSave, purchaseCheck } from '@/api/purchase.js'
+	import { toAuthStore, toLogin } from "@/utils/index.js"
+	export default {
+		data() {
+			return {
+				loading: false,
+				showPopu: false, // 弹框
+				statusBarHeight: 0, // 状态栏高度
+				safeAreaBottom: 0, // 底部安全区域高度
+				imgList: [],
+				shopProductSn: null,
+				detail: null,
+				qty: 1,// 数量
+				isShare: false ,// 是否从分享打开的
+				busPos:{
+				    x: 10,
+				    y:uni.getSystemInfoSync().windowHeight - 30
+				},
+				submitOk: false,
+				refashOk: false
+			}
+		},
+		onLoad(option) {
+			this.isShare = !!option.share
+			// 计算安全区域
+			this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
+			this.safeAreaBottom = uni.getSystemInfoSync().safeAreaInsets.bottom
+			this.shopProductSn = option.sn
+			// 获取产品详情
+			this.getDetail()
+		},
+		// 分享
+		onShareAppMessage(e){
+			return {
+			  title: this.detail ? this.detail.productName : '商品名称',
+			  path: '/pagesB/shopiing/productDetail?sn='+this.shopProductSn+'&share=1',
+			  imageUrl:this.detail ? this.detail.productMsg : '',
+			  type: '1'
+			}
+		},
+		computed: {
+			...mapState(['hasLogin']),
+			// 登录用户信息
+			userInfo(){
+				return this.$store.state.vuex_userInfo
+			},
+			totalNum(){
+				return this.hasLogin&&this.userInfo.sysUserFlag == '1' ? this.$store.state.vuex_cartTotal : 0
+			},
+			// 赠品数量
+			giftNum(){
+				return this.detail && this.detail.promoType=='BUY_PROD_GIVE_PROD' ? Math.floor(this.qty / this.detail.conditionValue)*this.detail.resultValue : 0
+			}
+		},
+		methods: {
+			// 返回
+			goBack(){
+				if(this.isShare){
+					uni.reLaunch({
+						url: '/pages/index/index'
+					})
+				}else{
+					uni.navigateBack()
+				}
+			},
+			// 复制
+			copy(text){
+				uni.setClipboardData({
+					data: text,
+				})
+			},
+			viewImg(index){
+				uni.previewImage({
+					urls: this.imgList
+				})
+			},
+			// 产品详情
+			getDetail(){
+				uni.showLoading({
+					title: '加载中'
+				})
+				const storeShelf = this.$store.state.vuex_storeShelf
+				const dealerSn = this.hasLogin && this.userInfo && this.userInfo.sysUserFlag == '1'&&storeShelf ? storeShelf.dealerSn : ''
+				// 获取产品详情
+				getShopDetail({
+					shopProductSn: this.shopProductSn,
+					dealerSn: dealerSn
+				}).then(res => {
+					if(res.status == 200){
+						this.detail = res.data
+						if(res.data){
+							if(res.data.productPicList){
+								res.data.productPicList.forEach(item => {
+									this.imgList.push(item.imageUrl||'/static/def_imgs.png')
+								})
+							}else{
+								this.imgList.push(res.data.productMsg||'/static/def_imgs.png')
+							}
+							const a = res.data.shopPromoProduct
+							let bprice = res.data.price
+							if(a){
+							  res.data.promoType = a.promoType
+							  res.data.resultValue = a.resultValue
+							  res.data.conditionValue = a.conditionValue
+							  res.data.discountType = a.discountType
+							  res.data.promoProductSn = a.promoProductSn
+							  res.data.promoSn = a.promoSn
+							  res.data.orginPrice = res.data.price
+							  // 特价
+							  if(res.data.promoType=='PROMO_PROD'){
+								  bprice =res.data.conditionValue
+							  }
+							}
+							res.data.priceStr = Number(bprice).toFixed(2).toString().split('.')
+						}
+					}
+					uni.hideLoading()
+				})
+			},
+			animationfinish(){
+				this.loading = false
+			},
+			// 加入购物车
+			addCart(event){
+				if(this.hasLogin){
+					// 游客未认证
+					if(this.userInfo.sysUserFlag == '0'){
+						toAuthStore()
+					}else{
+						if(this.loading){
+							return
+						}
+						this.loading = true
+						this.$refs.cartAnimation.touchOnGoods(event,this.busPos);
+						// 加入购物车
+						addCart({
+							qty: 1,
+							price: this.detail.price,
+							productSn: this.detail.productSn
+						}).then(res => {
+							if(res.status == 200){
+								uni.$emit('refashCart')
+							}
+						})
+					}
+				}else{
+					toLogin()
+				}
+			},
+			// 打开购物车
+			toCart(){
+				if(this.hasLogin){
+					// 游客未认证
+					if(this.userInfo.sysUserFlag == '0'){
+						toAuthStore()
+					}else{
+						uni.navigateTo({
+							url: '/pagesB/cart/index'
+						})
+					}
+				}else{
+					toLogin()
+				}
+			},
+			// 立即购买
+			toBuy(){
+				if(this.hasLogin){
+					// 游客未认证
+					if(this.userInfo.sysUserFlag == '0'){
+						toAuthStore()
+					}else{
+						if(this.detail.status==0 || this.detail.dealerScopeFlag==0){
+							uni.showToast({
+								title: '此商品已'+(this.detail.status==0?'下架':'售罄'),
+								icon: 'none'
+							})
+						}else{
+							// 打开数量选择弹框
+							if(!this.showPopu){
+								this.showPopu = true
+							}else{
+								// 提交
+								this.submitOrder()
+							}
+						}
+					}
+				}else{
+					toLogin()
+				}
+			},
+			// 去结算
+			submitOrder(){
+				uni.showLoading({
+					title: '提交中...',
+					mask: true
+				})
+				const _this = this
+				purchaseCheck({detailList: [{
+							productSn:this.detail.productSn,
+							productCode:this.detail.productCode,
+							qty: this.qty,
+							price:this.detail.price,
+							promoSn: this.detail.promoSn
+						}]}).then(res => {
+							uni.hideLoading()
+							if(res.status == 200){
+								const successList = res.data.successList ? res.data.successList.map(item => {
+									return {
+										productSn:item.productSn,
+										productCode: item.productCode,
+										qty: item.qty,
+										price:item.price,
+										promoSn: item.promoSn
+									}
+								}) : []
+								const removeList = res.data.removeList ? res.data.removeList.map(item => item.productCode) : []
+								const selloutList = res.data.selloutList ? res.data.selloutList.map(item => item.productCode) : []
+								// 有已下架或已售罄产品提示
+								if(removeList.length || selloutList.length){
+									uni.showModal({
+										title: '提示',
+										content: (removeList.length ? `产品${removeList.join(',')}已下架,`:'')+(selloutList.length?`产品${selloutList.join(',')}已售罄,`:'')+`不可采购。`+(successList.length?'是否继续采购其他产品?':''),
+										showCancel: successList.length,
+										confirmText: successList.length?'确定':'知道了',
+										success(ret) {
+											if(ret.confirm && successList.length){
+												_this.submitForm(successList)
+											}
+										}
+									})
+								}else{
+									const promoChangeFlag = res.data.promoChangeFlag
+									// 活动变更
+									if(promoChangeFlag){
+										uni.showModal({
+											title: '提示',
+											content: '促销活动已变更,请刷新?',
+											confirmText:'确定刷新',
+											success(ret) {
+												if(ret.confirm){
+													_this.showPopu = false
+													_this.refashOk = true
+												}
+											}
+										})
+										return
+									}
+									// 直接提交
+									_this.submitForm(successList)
+								}
+							}else{
+								uni.showToast({
+									title: res.message,
+									icon: 'none'
+								})
+							}
+				})
+			},
+			submitForm(detailList){
+				uni.showLoading({
+					title: '提交中...',
+					mask: true
+				})
+				purchaseSave({
+					detailList: detailList
+				}).then(res => {
+					if(res.status == 200){
+						res.data.detailList = []
+						this.$store.state.vuex_tempData = res.data
+						this.showPopu = false
+						this.submitOk = true
+					}else{
+						uni.hideLoading()
+						uni.showToast({
+							title: res.message,
+							icon: 'none'
+						})
+					}
+				})
+			},
+			// 关闭后
+			closePopu(){
+				this.showPopu = false
+				this.qty = 1
+				// 刷新页面
+				if(this.refashOk){
+					this.getDetail()
+				}
+				// 提交代码
+				if(this.submitOk){
+					this.submitOk = false
+					uni.navigateTo({
+						url: "/pagesB/procureOrder"
+					})
+				}
+				setTimeout(()=>{
+					uni.hideLoading()
+				},300)
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+	.pages {
+		height: 100vh;
+		display: flex;
+		flex-direction: column;
+		.scrollPage-header{
+			z-index: 1;
+			width: 100%;
+			position:fixed;
+			left: 0;
+			top: 0;
+			.header-title{
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 0 10px;
+				height: 44px;
+				.header-left{
+					display: flex;
+					align-items: center;
+					text{
+						font-size: 14px;
+						color: #333333;
+					}
+					background-color: rgba(255,255,255,0.6);
+					box-shadow: 0px 1px 0px 0px #E6E6E6;
+					border-radius: 50px;
+					padding: 3px 6px 3px;
+				}
+				.header-right{
+					width: 50px;
+				}
+			}
+		}
+		.copyText{
+			background-color: #efefef;
+			border-radius: 100rpx;
+			padding: 0 20rpx;
+			color: #03A9F4;
+			font-size: 20rpx;
+			display: inline-block;
+			margin-left: 20rpx;
+			height: 44rpx;
+			line-height: 44rpx;
+		}
+		.scrollPage-content{
+				flex: 1;
+				overflow-y: auto;
+				.product-info{
+					background:#fff;
+					margin-bottom: 10px;
+					.product-info-text{
+						padding: 10px;
+						.product-info-text-title{
+							font-weight: bold;
+							color: #333333;
+							line-height: 22px;
+							margin-bottom: 5px;
+						}
+						.product-info-text-attr{
+							display: flex;
+							align-items: center;
+							justify-content: space-between;
+							.product-info-price{
+								color: red;
+								display: flex;
+								align-items: baseline;
+								font-size: 12px;
+								text{
+									font-size: 38rpx;
+								}
+							}
+							.product-info-nums{
+								font-size: 12px;
+								color: #999999;
+								>view{
+									display: flex;
+									align-items: center;
+								}
+								.share{
+									button{
+										width: auto;
+										padding: 0;
+										border: 0;
+										background: none;
+										line-height: normal;
+										margin: 0;
+										display: inline;
+										font-size: 12px;
+										color: #999;
+										&::after{
+											border:none;
+										}
+										/deep/ .u-icon{
+											margin-right: 3px;
+										}
+									}
+								}
+							}
+						}
+					}
+				}
+				.product-info-guige{
+					display: flex;
+					flex-wrap: wrap;
+					justify-content: space-between;
+					background:#fff;
+					margin: 10px 0;
+					padding: 10px;
+					line-height: 28px;
+					.row{
+						width: 100%;
+					}
+					.row-ban{
+						width: 50%;
+					}
+					>view{
+						color: #999;
+						text{
+							color: #333333;
+						}
+					}
+				}
+				.product-info-content{
+					background:#fff;
+					margin-bottom: 10px;
+					padding: 10px;
+					line-height: 28px;
+				}
+		}
+		.rebate-tag{
+			background: #ffe7df;
+			color: #E91E63;
+			padding: 2px 5px;
+			font-size: 10px;
+			border-radius: 3px;
+			margin-left: 6px;
+		}
+		.tejia-tag{
+			color: #E91E63;
+			margin-left: 6px;
+			font-size: 12px;
+			text{
+				font-size: 12px;
+				color: #999;
+				margin-left: 5px;
+				text-decoration: line-through;
+			}
+		}
+		.scrollPage-footer{
+			background-color: #FFFFFF;
+			width: 100%;
+			position: fixed;
+			left: 0;
+			bottom: 0;
+			.scrollPage-footer-box{
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				height: 50px;
+			}
+			.footer-left{
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				width: 35%;
+				.footer-left-item{
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					justify-content: center;
+					padding: 0 15px;
+					position: relative;
+					.footer-left-item-text{
+						font-size: 12px;
+						color: #666666;
+					}
+					.badge{
+						background: #f44336;
+						color: #fff;
+						position: absolute;
+						right: 5px;
+						top: -8px;
+						font-size: 12px;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						border-radius: 50rpx;
+						padding: 0 10rpx;
+					}
+				}
+			}
+			.footer-right{
+				width: 60%;
+				height: 100%;
+				display: flex;
+				align-items: center;
+				.footer-right-item{
+					height: 100%;
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					justify-content: center;
+					width: 50%;
+					font-size: 14px;
+					color: #FFFFFF;
+				}
+				.footer-right-item:first-child{
+					background-color: #FF9900;
+				}
+				.footer-right-item:last-child{
+					background-color: #FF0000;
+				}
+			}
+		}
+		
+		.popu-content{
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				padding: 10px 15px;
+				.popu-close{
+					padding: 10px;
+					position: absolute;
+					right: 0;
+					top: 0;
+				}
+				.pupu-box{
+					display: flex;
+					justify-content: space-between;
+					margin-top: 35px;
+					width: 100%;
+				}
+				.popu-content-img{
+					border-radius: 6px;
+					border: 1px solid #eee;
+					overflow: hidden;
+					width: 80px;
+					height: 80px;
+				}
+				.popu-content-info{
+					padding: 0 0 0 10px;
+					flex-grow: 1;
+					overflow: hidden;
+					width: 50%;
+					.popu-content-info-title{
+						font-size: 14px;
+					}
+				}
+				.gift-box{
+					padding-left: 8%;
+					margin-top: 0;
+					border-top: 1px solid #eee;
+					padding-top: 10px;
+					.popu-content-img{
+						width: 58px;
+						height: 58px;
+					}
+					.popu-content-info-title{
+						font-size: 12px;
+						color: #666;
+					}
+					.popu-content-box{
+						margin-top: 0;
+					}
+					.popu-content-num{
+						padding:5px 0;
+					}
+					.rebate-tag{
+						margin: 0 5px 0 0;
+						background: #ff0000;
+						color: #fff;
+						flex-grow: 1;
+						display: flex;
+						justify-content: center;
+					}
+					.ellipsis-two{
+						width: 80%;
+						flex-grow: 1;
+					}
+				}
+				.popu-content-box{
+					display: flex;
+					align-items: baseline;
+					margin-top: 5px;
+					.popu-content-price{
+						color: red;
+						display: flex;
+						align-items: baseline;
+						font-size: 12px;
+						text{
+							font-size: 38rpx;
+						}
+					}
+				}
+				.popu-content-num{
+					font-size: 12px;
+					color: #999999;
+					padding: 10px 0;
+					> text{
+						margin-right: 10px;
+						font-size: 10px;
+					}
+				}
+				.popu-content-btn{
+					width: 100%;
+					display: flex;
+					align-items: center;
+					justify-content: space-around;
+					margin: 20px 0 10px;
+					.popu-content-btn-item{
+						width: 40%;
+						height: 34px;
+						font-size: 14px;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						border-radius: 100px;
+					}
+					.cancelBtn{
+						background-color: #f8f8f8;
+						color: #666;
+					}
+					.okbtn{
+						background-color: #f70000;
+						color: #FFFFFF;
+					}
+				}
+		}
+	}
+</style>

+ 364 - 0
pagesB/shopiing/searchProduct.vue

@@ -0,0 +1,364 @@
+<template>
+	<view class="pages">
+		<!-- head -->
+		<sklineHeader :title="title"></sklineHeader>
+		<!-- body -->
+		<scroll-view 
+		class="scrollPage-body" 
+		:style="{height: (screenHeight - statusBarHeight - safeAreaBottom - 40) + 'px'}" 
+		scroll-y="true" 
+		type="custom" 
+		:bounces="false"
+		@scrolltolower="reachBottom">
+			<!-- 搜索,吸顶 -->
+			<sticky-header>
+				<view class="search-head">
+					<uni-search-bar v-model="queryWord" :focus="focus" radius="100" placeholder="请输入商品名称/产品编码/原厂编码" textColor="#666" clearButton="auto" cancelButton="none" @input="searchChange" @confirm="searchList" @clear="clearList" />
+				</view>
+			</sticky-header>
+			<!-- 产品列表 -->
+			<chooseProductItem
+			v-for="(item, index) in list"
+			:key="item.id"  
+			:index="index"
+			:list="item" 
+			:isLogin="hasLogin"
+			@toDetail="viewDetail"
+			>
+			</chooseProductItem>
+			<!-- loading -->
+			<view class="loading-bar" v-if="loading||loadEnd">{{loadText}}</view>
+			<!-- <view class="empty-bar" v-if="total==0&&!loading">
+				<image mode="aspectFit" :src="empty.imgUrl"></image>
+				<view>{{empty.tip}}</view>
+			</view> -->
+			<!-- 搜索记录 -->
+			<view class="search-history" v-if="historyList.length&&list.length==0&&queryWord==''&&clzId==''">
+				<view class="search-history-title">
+					<text>搜索记录</text>
+					<view class="search-history-right">
+						<view class="search-history-expend" v-if="searchHistoryList.length>10" @click="expend=!expend">
+							{{expend?'收起':'展开'}}
+							<uni-icons :type="expend?'arrowup':'arrowdown'" size="14"></uni-icons>
+						</view>
+						<uni-icons type="trash" size="18" @click="clearHistory" color="#eb0000"></uni-icons>
+					</view>
+				</view>
+				<view class="search-history-body">
+					<view class="item" v-for="item in historyList" :key="item.id" @click="toSearch(item)">
+						<text class="ellipsis-one" max-lines="1" overflow="ellipsis">{{item.text}}</text>
+					</view>
+				</view>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	import {
+	    mapState,
+	    mapMutations,
+	} from 'vuex'
+	import sklineHeader from '@/components/skline/sklineHeader.vue'
+	import chooseProductItem from '@/pagesB/components/chooseProductItemSkline.vue'
+	import { getShopProductList } from '@/api/shop.js'
+	export default {
+		components:{
+			chooseProductItem,
+			sklineHeader
+		},
+		data() {
+			return {
+				title: '',
+				loadText: '加载中...',
+				empty: {
+					tip: '暂无商品',
+					imgUrl: '/static/nodata.png'
+				},
+				queryWord:'',
+				screenWidth: 325,
+				screenHeight: 0,
+				statusBarHeight: 44,
+				safeAreaBottom: 0,
+				pageSize: 10,
+				pageNo:1,
+				total:0,
+				list: [],
+				loading:false,
+				loadEnd: false,
+				searchHistoryList: [],
+				focus: false,
+				expend: false,
+				clzId: null, // 一级分类
+				categorySn: null ,// 当前分类sn
+			};
+		},
+		computed: {
+			...mapState(['hasLogin']),
+			historyList() {
+				return this.searchHistoryList.filter(item=>!!item.text).reverse().slice(0,this.expend?20:10)
+			},
+			// 登录用户信息
+			userInfo(){
+				return this.$store.state.vuex_userInfo
+			},
+		},
+		onLoad(opts) {
+			// 计算区域高度
+			this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
+			this.screenWidth = uni.getSystemInfoSync().windowWidth
+			this.screenHeight = uni.getSystemInfoSync().windowHeight
+			this.safeAreaBottom = uni.getSystemInfoSync().safeAreaInsets.bottom
+			// 一级分类id
+			this.clzId = opts.clzId
+			// 搜索商品
+			if(opts.clzId==''){
+				this.title = '商品搜索'
+				this.focus = true
+			} 
+			// 搜索历史
+			this.searchHistoryList = uni.getStorageSync('searchHistoryList') || []
+		},
+		onUnload() {
+			// 历史记录最多存30条
+			if(this.searchHistoryList.length>30){
+				this.searchHistoryList = this.searchHistoryList.slice(this.searchHistoryList.length-30,this.searchHistoryList.length)
+				uni.setStorageSync('searchHistoryList', this.searchHistoryList)
+			}
+		},
+		methods: {
+			// 返回
+			goBack(){
+				uni.navigateBack()
+			},
+			// 清空历史记录
+			clearHistory(){
+				const _this = this
+				uni.showModal({
+					title: '提示',
+					content: '确定清空搜索历史?',
+					confirmText: '确定',
+					success(res) {
+						if(res.confirm){
+							_this.searchHistoryList = []
+							uni.setStorageSync('searchHistoryList', _this.searchHistoryList)
+						}
+					}
+				})
+			},
+			// 清空搜索
+			clearList(){
+				this.queryWord = ''
+				this.list = []
+				this.total = 0
+				this.pageNo = 1
+				this.loadEnd = false
+				this.loadText = '没有找到相关产品'
+			},
+			// 失去焦点
+			searchChange(){
+				if(this.queryWord == ''){
+					this.clearList()
+				}
+			},
+			// 选择搜索记录
+			toSearch(item){
+				this.queryWord = item.text
+				this.searchList()
+			},
+			// 搜索列表
+			searchList(event) {
+				 //  存储搜索记录
+				 const has = this.searchHistoryList.some(k => k.text == this.queryWord)
+				 if(!has && this.queryWord!=''){
+					 this.searchHistoryList.push({
+						 id: new Date().getTime(),
+						 text: this.queryWord
+					 })
+					 uni.setStorageSync('searchHistoryList', this.searchHistoryList)
+				 }
+				 if(this.queryWord != ''){
+					 this.loadEnd = false
+					 this.loadText = '加载中...'
+					 this.list = []
+					 this.pageNo = 1
+					 this.getList()
+				 }
+			},
+			// 滚动到底部
+			reachBottom() {
+				console.log(11)
+				if(!this.loading && !this.loadEnd){
+					this.pageNo++
+					this.getList()
+				}
+			},
+			// 列表查询
+			getList(){
+				this.loading = true
+				uni.showLoading({
+					title: '加载中...',
+					mask: true
+				})
+				const storeShelf = this.$store.state.vuex_storeShelf
+				const dealerSn = this.hasLogin && this.userInfo && this.userInfo.sysUserFlag == '1'&&storeShelf ? storeShelf.dealerSn : ''
+				getShopProductList({
+					pageNo: this.pageNo,
+					pageSize: this.pageSize,
+					productCode: this.queryWord,
+					categorySn: this.categorySn,
+					dealerSn: dealerSn,
+					status: 1
+				}).then(res => {
+					if(res.status == 200){
+						this.total = Number(res.data.count)
+						if(this.total){
+							const list = res.data.list || []
+							const ret = list.map(k => {
+								const a = k.shopPromoProduct
+								if(a){
+								  k.promoType = a.promoType
+								  k.resultValue = a.resultValue
+								  k.conditionValue = a.conditionValue
+								  k.discountType = a.discountType
+								  k.promoProductSn = a.promoProductSn
+								  k.promoSn = a.promoSn
+								  k.orginPrice = k.price
+								  // 特价
+								  if(k.promoType=='PROMO_PROD'){
+									 k.price = k.conditionValue
+								  }
+								}
+								return {
+								  id: k.id,
+								  price: k.price,
+								  orginPrice: k.orginPrice,
+								  priceStr: Number(k.price).toFixed(2).toString().split('.'),
+								  productCode: k.productCode,
+								  productSn: k.productSn,
+								  productImage: k.productMsg,
+								  productName: k.productName,
+								  productOrigCode: k.productOrigCode,
+								  categorySn: k.categorySn,
+								  hotFlag: k.hotFlag,
+								  productSn: k.productSn,
+								  priceType: k.priceType,
+								  shopProductSn: k.shopProductSn,
+								  status: k.status,
+								  statusDictValue: k.statusDictValue,
+								  dealerScopeFlag: k.dealerScopeFlag,
+								  promoType: k.promoType,
+								  resultValue: k.resultValue,
+								  conditionValue: k.conditionValue,
+								  discountType: k.discountType,
+								  promoProductSn: k.promoProductSn,
+								  promoSn: k.promoSn
+							  }
+							})
+							// 追加数据
+							this.list.push(ret)
+							// 判断是否最后一页
+							const maxPages = Math.ceil(this.total / this.pageSize)
+							if(this.pageNo >= maxPages){
+								this.loadEnd = true
+								this.loadText = '没有更多了'
+							}
+						}else{
+							this.loadEnd = false
+							this.loadText = '没有找到相关产品'
+						}
+					}else{
+						this.loadEnd = false
+						this.loadText = res.message
+					}
+					uni.hideLoading()
+					this.loading = false
+				}).catch(err => {
+					this.loading = false
+				})
+			},
+			// 产品详情查看
+			viewDetail(item){
+				uni.navigateTo({
+					url:'/pagesB/shopiing/productDetail?sn='+item.shopProductSn
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.pages{
+	height: 100vh;
+	display: flex;
+	flex-direction: column;
+	.scrollPage-body{
+		width:100%;
+		.uni-searchbar{
+			background-color: #FFFFFF;
+		}
+		/deep/ .choose-product-item{
+			background-color: #FFFFFF;
+			margin: 6px 10px;
+			border-radius: 6px;
+		}
+		.loading-bar{
+			text-align: center;
+			padding: 10px 0;
+			color: #999999;
+		}
+		.empty-bar{
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+			padding: 20px 0;
+			image{
+				width: 100px;
+				height: 100px;
+			}
+			view{
+				font-size: 12px;
+				color: #999999;
+			}
+		}
+		.search-history{
+			padding: 0 1.5rem;
+			.search-history-title{
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				padding: 6px 0;
+				font-size: 14px;
+				color: #333333;
+				border-bottom: 1px solid #E6E6E6;
+			}
+			.search-history-right{
+				display: flex;
+				align-items: center;
+			}
+			.search-history-expend{
+				display: flex;
+				align-items: center;
+				font-size: 12px;
+				margin-right: 15px;
+			}
+			.search-history-body{
+				display: flex;
+				flex-wrap: wrap;
+				align-items: center;
+				justify-content: space-between;
+				padding: 10px 10px;
+				.item{
+					padding: 6px 0;
+					background-color: #f8f8f8;
+					border-radius: 20px;
+					font-size: 12px;
+					color: #333333;
+					width: 46%;
+				}
+			}
+		}
+	}
+}
+</style>

+ 474 - 0
pagesB/shopiing/shopProduct.vue

@@ -0,0 +1,474 @@
+<template>
+	<view class="pages">
+		<!-- head -->
+		<view class="scrollPage-header">
+			<view :style="{height:statusBarHeight+'px'}"></view>
+			<view class="header-title-box">
+				<view class="header-left" @click="goBack">
+					<uni-icons type="arrowleft" size="20"></uni-icons>
+					<text>返回</text>
+				</view>
+				<view class="header-title">
+					<text :max-lines="1" overflow="ellipsis">{{title}}</text>
+				</view>
+				<view class="header-right"></view>
+			</view>
+			<view class="search-head" @click="goSearch">
+				<uni-search-bar readonly radius="100" placeholder="请输入商品名称/产品编码/原厂编码" textColor="#666" clearButton="auto" cancelButton="none" />
+			</view>
+		</view>
+		<view class="search-result">
+			<view class="tab-left" v-if="clzId&&categoryList.length>0">
+				<scroll-view
+				:style="{height: (screenHeight - statusBarHeight - 44 - 43) + 'px'}" 
+				scroll-y="true" 
+				:bounces="false"
+				type="list" 
+				>
+					<view class="item-clz" 
+					v-for="item in categoryList" 
+					:key="item.categorySn" 
+					:class="item.categorySn==categorySn?'active':''" 
+					@click="handleTab(item)">
+					{{item.categoryName}}
+					</view>
+				</scroll-view>
+			</view>
+			<view class="right-box" :style="{width:clzId&&categoryList.length?'75%':'100%'}">
+				<!-- body -->
+				<scroll-view 
+				class="scrollPage-body" 
+				:class="clzId&&categoryList.length?'right-item':''"
+				:style="{height: (screenHeight - statusBarHeight - 44 - 43) + 'px'}" 
+				scroll-y="true" 
+				type="list" 
+				:bounces="false"
+				:refresher-enabled="enableRefresh" 
+				:refresher-triggered="triggered" 
+				@refresherpulling="onPulling"
+				@refresherrefresh="onRefresh"
+				@refresherrestore="onRestore"
+				@refresherabort="onAbort"
+				@scrolltolower="reachBottom">
+					<!-- 产品列表 -->
+					<chooseProductItem
+					v-for="(item, index) in list"
+					:key="item.id"  
+					:index="index"
+					:list="item" 
+					:isLogin="hasLogin"
+					@toDetail="viewDetail"
+					>
+					</chooseProductItem>
+					<!-- loading -->
+					<view class="loading-bar" v-if="total>0 && (loading||loadEnd)">{{loadText}}</view>
+					<view class="empty-bar" v-if="total==0&&!loading">
+						<image mode="aspectFit" :src="empty.imgUrl"></image>
+						<view>{{empty.tip}}</view>
+					</view>
+				</scroll-view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+	    mapState,
+	    mapMutations,
+	} from 'vuex'
+	import chooseProductItem from '@/pagesB/components/chooseProductItemSkline.vue'
+	import { getShopCategory, getShopProductList } from '@/api/shop.js'
+	export default {
+		components:{
+			chooseProductItem
+		},
+		data() {
+			return {
+				title: '',
+				loadText: '加载中...',
+				empty: {
+					tip: '暂无商品',
+					imgUrl: '/static/nodata.png'
+				},
+				queryWord:'',
+				screenWidth: 325,
+				screenHeight: 0,
+				statusBarHeight: 44,
+				safeAreaBottom: 0,
+				pageSize: 10,
+				pageNo:1,
+				total:0,
+				list: [],
+				loading:false,
+				loadEnd: false,
+				focus: false,
+				expend: false,
+				clzId: null, // 一级分类
+				categorySn: null ,// 当前分类sn
+				categoryList: [], // 二级分类列表
+				enableRefresh: true,
+				triggered: false,
+				pulling: false
+			};
+		},
+		computed: {
+			...mapState(['hasLogin']),
+			// 登录用户信息
+			userInfo(){
+				return this.$store.state.vuex_userInfo
+			},
+		},
+		onLoad(opts) {
+			// 计算区域高度
+			this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight
+			this.screenWidth = uni.getSystemInfoSync().windowWidth
+			this.screenHeight = uni.getSystemInfoSync().windowHeight
+			this.safeAreaBottom = uni.getSystemInfoSync().safeAreaInsets.bottom
+			
+			// 一级分类id
+			this.clzId = opts.clzId
+			// 一级分类名称
+			this.title = opts.clzName
+			
+			// 一级分类下是二级目录
+			if(opts.shopCategoryCount>0){
+				// 查二级目录
+				this.getCategory()
+			}
+			// 一级分类下是产品
+			if(opts.shopProductCount>0){
+				this.categorySn = opts.clzId
+				// 目录下商品
+				this.searchList()
+			}
+		},
+		methods: {
+			// 返回
+			goBack(){
+				uni.navigateBack()
+			},
+			// 去搜索产品
+			goSearch(event){
+				uni.navigateTo({
+					url:'/pagesB/shopiing/searchProduct?queryWord='+event.value+'&clzId='
+				})
+			},
+			// 获取二级目录
+			getCategory(){
+				getShopCategory({
+					parentSn: this.clzId,
+					categoryLevel: 2
+				}).then(res => {
+					if(res.status == 200){
+						// 二级目录
+						this.categoryList = res.data || []
+						// 如果有二级目录
+						if(this.categoryList.length > 0){
+							// 默认显示第一个
+							this.categorySn = this.categoryList[0].categorySn
+							// 目录下商品
+							this.searchList()
+						} 
+					}else{
+						uni.showToast({
+							title: res.message,
+							icon: 'none'
+						})
+					}
+				})
+			},
+			// 搜索列表
+			searchList(event) {
+				 this.loadEnd = false
+				 this.loadText = '加载中...'
+				 this.list = []
+				 this.pageNo = 1
+				 this.getList()
+			},
+			// 单击二级分类
+			handleTab(item){
+				this.categorySn = item.categorySn
+				this.queryWord = ''
+				this.searchList()
+			},
+			// 自定义下拉刷新控件被下拉
+			onPulling(e){
+				console.log('onPulling')
+				this.triggered = true
+				this.pulling = true
+			},
+			// 自定义下拉刷新被触发
+			onRefresh(e){
+				console.log('onRefresh')
+				setTimeout(() => {      
+					this.triggered = false 
+				}, 500); 
+			},
+			// 自定义下拉刷新被复位
+			onRestore(e){
+				console.log('onRestore')
+				this.queryWord = ''
+				if(this.categorySn!=null){
+					this.searchList()
+				}
+			},
+			// 自定义下拉刷新被中止
+			onAbort(e){
+				console.log('onAbort')
+				this.triggered = false 
+			},
+			// 滚动到底部
+			reachBottom() {
+				if(this.enableRefresh&&this.categorySn!=null){
+					if(!this.loading && !this.loadEnd){
+						if(!this.pulling){
+							this.pageNo++
+							this.getList()
+						}
+					}
+					if(this.pulling){
+						this.pulling = false
+					}
+				}
+			},
+			// 列表查询
+			getList(){
+				this.loading = true
+				uni.showLoading({
+					title: '加载中...',
+					mask: true
+				})
+				const dealerSn = this.hasLogin && this.userInfo && this.userInfo.sysUserFlag == '1' ? this.$store.state.vuex_storeShelf.dealerSn : ''
+				getShopProductList({
+					pageNo: this.pageNo,
+					pageSize: this.pageSize,
+					queryWord: this.queryWord,
+					categorySn: this.categorySn,
+					dealerSn: dealerSn,
+					status: 1
+				}).then(res => {
+					if(res.status == 200){
+						this.total = Number(res.data.count)
+						if(this.total){
+							const list = res.data.list || []
+							// 更新已选状态
+							const ret = list.map(k => {
+								const a = k.shopPromoProduct
+								if(a){
+								  k.promoType = a.promoType
+								  k.resultValue = a.resultValue
+								  k.conditionValue = a.conditionValue
+								  k.discountType = a.discountType
+								  k.promoProductSn = a.promoProductSn
+								  k.promoSn = a.promoSn
+								  k.orginPrice = k.price
+								  // 特价
+								  if(k.promoType=='PROMO_PROD'){
+									  k.price = k.conditionValue
+								  }
+								}
+								return {
+								  id: k.id,
+								  price: k.price,
+								  orginPrice: k.orginPrice,
+								  priceStr: Number(k.price).toFixed(2).toString().split('.'),
+								  productCode: k.productCode,
+								  productSn: k.productSn,
+								  productImage: k.productMsg,
+								  productName: k.productName,
+								  productOrigCode: k.productOrigCode,
+								  categorySn: k.categorySn,
+								  hotFlag: k.hotFlag,
+								  productSn: k.productSn,
+								  priceType: k.priceType,
+								  shopProductSn: k.shopProductSn,
+								  status: k.status,
+								  statusDictValue: k.statusDictValue,
+								  dealerScopeFlag: k.dealerScopeFlag,
+								  promoType: k.promoType,
+								  resultValue: k.resultValue,
+								  conditionValue: k.conditionValue,
+								  discountType: k.discountType,
+								  promoProductSn: k.promoProductSn,
+								  promoSn: k.promoSn
+							  }
+							})
+							// 追加数据
+							this.list.push(ret)
+							// 判断是否最后一页
+							const maxPages = Math.ceil(this.total / this.pageSize)
+							if(this.pageNo >= maxPages){
+								this.loadEnd = true
+								this.loadText = '没有更多了'
+							}
+						}else{
+							this.loadEnd = false
+							this.loadText = '没有找到相关产品'
+						}
+					}else{
+						this.loadEnd = false
+						this.loadText = res.message
+					}
+					uni.hideLoading()
+					this.loading = false
+				}).catch(err => {
+					this.loading = false
+				})
+			},
+			// 产品详情查看
+			viewDetail(item){
+				uni.navigateTo({
+					url:'/pagesB/shopiing/productDetail?sn='+item.shopProductSn
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.pages{
+	height: 100vh;
+	display: flex;
+	flex-direction: column;
+	.scrollPage-header{
+		z-index: 1;
+		.header-title-box{
+			display: flex;
+			align-items: center;
+			padding: 0 10px;
+			height: 44px;
+			background-color: #FFFFFF;
+			border-bottom: 1px solid #e8e8e8;
+			.header-title{
+				flex-grow: 1;
+				color: #333333;
+				padding: 10px;
+				text-align: center;
+			}
+			.header-left{
+				display: flex;
+				align-items: center;
+				text{
+					font-size: 14px;
+					color: #333333;
+					margin-left: 5px;
+				}
+			}
+			.header-right{
+				width: 50px;
+			}
+		}
+	}
+	.search-head{
+		background-color: #FFFFFF;
+		/deep/ .uni-searchbar{
+			padding: 5px 6px;
+		}
+	}
+	.search-result{
+		flex-grow: 1;
+		display: flex;
+		justify-content: space-between;
+		.tab-left{
+			width: 25%;
+			flex-grow: 1;
+			background: #FFFFFF;
+			.item-clz{
+				font-size: 14px;
+				padding: 8px 10px;
+				line-height: 30px;
+			}
+			.active{
+				border-left: 3px solid #00aaff;
+				background: #f8f8f8;
+			}
+		}
+		.right-box{
+			width: 75%;
+			.scrollPage-body{
+				width:100%;
+				.uni-searchbar{
+					background-color: #FFFFFF;
+				}
+				/deep/ .choose-product-item{
+					background-color: #FFFFFF;
+					margin: 6px 10px;
+					border-radius: 6px;
+				}
+				.loading-bar{
+					text-align: center;
+					padding: 10px 0;
+					color: #999999;
+				}
+				.empty-bar{
+					display: flex;
+					flex-direction: column;
+					align-items: center;
+					justify-content: center;
+					padding: 20px 0;
+					image{
+						width: 100px;
+						height: 100px;
+					}
+					view{
+						font-size: 12px;
+						color: #999999;
+					}
+				}
+				.search-history{
+					padding: 0 1.5rem;
+					.search-history-title{
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						padding: 6px 0;
+						font-size: 14px;
+						color: #333333;
+						border-bottom: 1px solid #E6E6E6;
+					}
+					.search-history-right{
+						display: flex;
+						align-items: center;
+					}
+					.search-history-expend{
+						display: flex;
+						align-items: center;
+						font-size: 12px;
+						margin-right: 15px;
+					}
+					.search-history-body{
+						display: flex;
+						flex-wrap: wrap;
+						align-items: center;
+						justify-content: space-between;
+						padding: 10px 10px;
+						.item{
+							padding: 6px 0;
+							background-color: #f8f8f8;
+							border-radius: 20px;
+							font-size: 12px;
+							color: #333333;
+							width: 46%;
+						}
+					}
+				}
+			}
+			.right-item{
+				/deep/ .choose-product-item{
+					margin: 5px 8px;
+					.choose-product-item-img{
+						height: 130rpx;
+					}
+					.choose-product-item-img .choose-product-item-left-info-code{
+						font-size:12px;
+					}
+					.choose-product-item-info .choose-product-item-left-info-name{
+						font-weight: normal;
+					}
+				}
+			}
+		}
+	}
+}
+</style>

BIN
pagesB/static/add.png


BIN
pagesB/static/arrow-left.png


BIN
pagesB/static/cart.png


+ 0 - 0
static/hbheader.jpg → pagesB/static/hbheader.jpg


BIN
pagesB/static/search.png


+ 12 - 7
pages/stockQuery/stockQuery.vue → pagesB/stockQuery/stockQuery.vue

@@ -8,16 +8,13 @@
 				<scroll-view scroll-y style="height: 100%;width: 100%;overflow: auto;" @scrolltolower="onreachBottom">
 					 <view class="list-item flex align_center justify_between" v-for="item in list" :key="item.id">
 					 	<view>
-					 		<u-image :src="item.images||'@/static/def_imgs.png'" width='120' height="120"></u-image>
+					 		<u-image :src="item.images||'/static/def_imgs.png'" width='120' height="120"></u-image>
 					 	</view>
 					 	<view>
-					 		<view class="flex align_center justify_between">
+					 		<view class="flex justify_between">
 					 			<view class="vin-text">
 					 				<text class="hj-no">{{item.shelfPlaceCode}}</text>
-					 				<text>{{item.code}}</text>
-					 			</view>
-					 			<view class="time-text">
-					 				库存:<text>{{item.qty}}个</text>
+									{{item.productName}}
 					 			</view>
 					 		</view>
 							<view class="flex" v-if="item.productTypeSn3=='543766811373752320'" style="padding-top: 5px;">
@@ -26,7 +23,12 @@
 									<u-tag :text="item.origCode" mode="light" borderColor="#ffffff" type="warning" size="large"></u-tag>
 								</view>
 							</view>
-					 		<view>{{item.productName}}</view>
+							<view class="flex align_center justify_between">
+								<view>{{item.code}}</view>
+								<view class="time-text">
+									库存:<text>{{item.qty}}个</text>
+								</view>
+							</view>
 					 	</view>
 					 </view>
 					 <view style="padding: 20upx;">
@@ -143,13 +145,16 @@
 			}
 		}
 		.vin-text{
+			font-weight: bold;
 			.hj-no{
 				background: #2196F3;
 				color: #ffffff;
 				display: inline-block;
 				border-radius: 10rpx;
 				padding: 0 10rpx;
+				font-weight: normal;
 				margin-right: 10rpx;
+				font-size: 12px;
 			}
 		}
 		&:first-child{

+ 6 - 6
pages/videos/detail.vue → pagesB/videos/detail.vue

@@ -8,13 +8,13 @@
 </template>
 
 <script>
-	import { promoTerminalDetail } from '@/api/video.js'
+	import { shopBannerDetail } from '@/api/video.js'
 	export default {
 		data() {
 			return {
 				title: null,
 				content: '',
-				id: null
+				bannerSn: null
 			}
 		},
 		onLoad(opts) {
@@ -23,7 +23,7 @@
 				this.content = opts.content
 				this.videoFull()
 			}else{
-				this.id = opts.sn
+				this.bannerSn = opts.sn
 				this.getDetail()
 			}
 		},
@@ -38,11 +38,11 @@
 				videos.requestFullScreen()
 			},
 			getDetail(){
-				promoTerminalDetail({sn:this.id}).then(res => {
-					this.title = res.data.name
+				shopBannerDetail({bannerSn:this.bannerSn}).then(res => {
+					this.title = res.data.bannerName
 					this.content = res.data.content
 					uni.setNavigationBarTitle({
-						title: res.data.name || '活动内容'
+						title: '视频内容'
 					})
 					this.videoFull()
 				})

+ 246 - 0
pagesB/videos/index.vue

@@ -0,0 +1,246 @@
+<template>
+	<view class="video-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 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" v-if="swiperCurrent==indexs">
+							<view  
+							class="check-order-list" 
+							v-for="(item,index) in list" 
+							:key="item.id" 
+							 @click="viewRow(item)"
+							>
+								<view class="video-item">
+									<view>
+										<view class="play-btn" v-if="!item.showVideo&&item.contentType == 'VIDEO'">
+											<u-icon size="24" color="#fff" name="play-right-fill"></u-icon>
+										</view>
+										<view class="pnums" v-if="!item.showVideo&&item.contentType == 'VIDEO'">
+											<u-icon size="30" color="#fff" name="eye-fill"></u-icon>
+											{{item.viewNum}}
+										</view>
+										<u-image :src="item.images" height="200px" width="100%"></u-image>
+									</view>
+									<view class="ellipsis-two">{{item.titile}}</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 {
+	    mapState,
+	    mapMutations,
+	} from 'vuex'
+	import { getVideoList, videoDetail } from "@/api/video.js"
+	import { openWebView } from "@/utils/index.js"
+	export default {
+		data() {
+			return {
+				status: 'loading',
+				noDataText: '暂无数据',
+				current: 0,
+				swiperCurrent: 0,
+				// 查询条件
+				pageNo: 1,
+				pageSize: 5,
+				list: [],
+				total: 0,
+				videoObj:null
+			}
+		},
+		computed: {
+			...mapState(['hasLogin','vuex_videoTypeList']),
+			userInfo(){
+				return this.$store.state.vuex_userInfo
+			},
+			tabList(){
+				return this.$store.state.vuex_videoTypeList
+			}
+		},
+		onLoad() {
+			this.pageInit()
+		},
+		// 页面卸载
+		onUnload() {
+			uni.$off('refashProm')
+		},
+		onHide() {
+			this.list.map(item => {
+				item.showVideo = false
+			})
+		},
+		methods: {
+			pageInit(){
+				this.total = 0
+				this.pageNo = 1
+				this.list = []
+				this.getRow()
+			},
+			// tabs通知swiper切换
+			tabsChange(index) {
+				this.list = []
+				this.status = "loading"
+				this.swiperCurrent = index;
+			},
+			swiperChange(event){
+				this.list = []
+				this.status = "loading"
+				this.swiperCurrent = event.detail.current;
+			},
+			// 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() {
+				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,
+			  }
+			  params.category = this.tabList ? this.tabList[this.swiperCurrent].code : ''
+			  this.status = "loading"
+			  getVideoList(params).then(res => {
+				if (res.status == 200) {
+				  const list = res.data.list || []
+				  const ret = []
+				  list.map(item => {
+					  ret.push({
+						  id: item.id,
+						  showVideo: false,
+						  contentType: item.contentType,
+						  titile: item.titile,
+						  viewNum: item.viewNum,
+						  images: item.images,
+						  content: item.content
+					  })
+				  })
+				  _this.list = _this.list.concat(ret)
+				  _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){
+				if(item.contentType == 'VIDEO' && !item.showVideo){
+					// item.showVideo = true
+					videoDetail({id: item.id}).then(res => {
+						if(res.data){
+							item.viewNum = res.data.viewNum
+							this.list.splice()
+							uni.navigateTo({
+								url: "/pagesB/videos/detail?form=videoList&&title="+item.titile+"&&content="+item.content
+							})
+						}
+					})
+				}
+				if(item.contentType == 'LINK'){
+					openWebView({url:item.content})
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+    page{
+		height: 100vh;
+	}
+	.video-pagesCons{
+		height: 100%;
+		display: flex;
+		flex-direction: column;
+		.tab-body{
+			.check-list{
+				height: calc(100vh - 42px);
+			}
+			.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;
+							.play-btn{
+								width: 40rpx;
+								height: 40rpx;
+								background: rgba(0,0,0,0.35);
+								border-radius: 150rpx;
+								position: absolute;
+								top: 20rpx;
+								right:30rpx;
+								z-index: 100;
+								display: flex;
+								align-items: center;
+								justify-content: center;
+							}
+							.pnums{
+								position: absolute;
+								left:20rpx;
+								bottom: 20rpx;
+								background: rgba(0,0,0,0.35);
+								padding: 4rpx 10rpx;
+								border-radius: 50rpx;
+								display: flex;
+								align-items: center;
+								color:#fff;
+								z-index: 110;
+								font-size: 24rpx;
+							}
+						}
+						&:last-child{
+							text-align: center;
+							font-size: 36rpx;
+							margin: 20rpx 0 0;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

BIN
static/arrow-left.png


BIN
static/banner1.jpg


BIN
static/banner1.png


BIN
static/banner2.jpg


BIN
static/banner2.png


BIN
static/def_imgs.png


BIN
static/hot.png


BIN
static/icon_delete@3x.png


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 1
static/iconfont/iconfont.css


BIN
static/kongCart.png


BIN
static/nav_icon1.jpg


BIN
static/nav_icon2.jpg


BIN
static/nav_icon3.jpg


BIN
static/nav_icon4.jpg


BIN
static/tab/tab_cart_normal.png


BIN
static/tab/tab_cart_pressed.png


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


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است