lilei 3 лет назад
Родитель
Сommit
bf230841ac
1 измененных файлов с 31 добавлено и 3 удалено
  1. 31 3
      pages/index/index.vue

+ 31 - 3
pages/index/index.vue

@@ -13,6 +13,10 @@
 			<view class="notices flex align_center" v-if="bondRecord" @click="toPayBondAmount">
 				<view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 您有一笔保证金待支付 ¥{{bondRecord.bondAmount}}</view> <text>立即支付>></text>
 			</view>
+			<!-- 待取货提醒 -->
+			<view class="notices flex align_center" v-if="orderTodo" @click="toOrder">
+				<view><u-icon name="volume" color="#f2a557" :size="28" :margin-right='15'></u-icon> 您有待取货的货架订单哦!</view> <text>立即处理>></text>
+			</view>
 			<!-- 名片 -->
 			<view class="userCard flex align_center justify_between" @click="toUser">
 				<view class="userCard-info flex align_center justify_between">
@@ -56,7 +60,7 @@
 					<u-loadmore v-if="status=='loading'" :status="status" />
 				</view>
 			</u-cell-group>
-			<view class="des" v-if="vinList.length">仅展示最近10条记录,点击“全部”查看更多</view>
+			<view class="des" v-if="vinList.length&&hasLogin">仅展示最近10条记录,点击“全部”查看更多</view>
 			<view class="des" v-if="!hasLogin">请登录后,查看扫描记录</view>
 		</view>
 	</view>
@@ -68,7 +72,7 @@
 	    mapMutations,
 	} from 'vuex'
 	import scrollBox from '@/components/scrollBox.vue'
-	import { shelfBondRecordWaitPayRecord, findStoreShelf } from '@/api/shelf.js'
+	import { shelfBondRecordWaitPayRecord, findStoreShelf, shelfGetTotalWaitQty } from '@/api/shelf.js'
 	import { listLookUp, getLookUpDatas } from '@/api/data.js';
 	import { scanVinLogQueryRoll, getScanVinLogList }from '@/api/car.js'
 	export default {
@@ -81,7 +85,8 @@
 				noDataText: '暂无数据',
 				bondRecord: null, // 保证金
 				list:[],
-				vinList: []
+				vinList: [],
+				orderTodo: null,
 			}
 		},
 		computed: {
@@ -130,6 +135,27 @@
 					}
 				});
 			},
+			// 待取货数量合计
+			shelfGetTotalWaitQty(){
+				shelfGetTotalWaitQty({billState:'WAIT'}).then(res => {
+					if(res.status == 200){
+						this.orderTodo = res.data
+					}
+				})
+			},
+			// 货架订单列表
+			toOrder(){
+				if(this.hasShelf){
+					uni.navigateTo({
+						url: "/pages/digitalShelf/orderList"
+					})
+				}else{
+					uni.showToast({
+						icon:'none',
+						title: '当前门店没有数字货架!'
+					})
+				}
+			},
 			getScrollLog(){
 				scanVinLogQueryRoll({pageNo:1,pageSize:1000}).then(res => {
 					this.list = res.data.list || []
@@ -151,6 +177,8 @@
 						if(res.data){
 							// 保证金查询
 							this.getShelfBWPayRecord()
+							// 获取订单信息
+							this.shelfGetTotalWaitQty()
 						}
 				})
 			},