Browse Source

bug 修复

lilei 3 years ago
parent
commit
5f075cfac8

+ 0 - 9
pages/digitalShelf/choosePart.vue

@@ -199,7 +199,6 @@
 				total: 0, // 列表总数
 				total: 0, // 列表总数
 				noMore: false ,// 没有更多
 				noMore: false ,// 没有更多
 				showCart: false, // 购物车
 				showCart: false, // 购物车
-				showSelCarModel: false, // 切换车型
 				carList:[], // 车型列表
 				carList:[], // 车型列表
 				partList: [], // 配件列表
 				partList: [], // 配件列表
 				partListData: [], // 已选配件
 				partListData: [], // 已选配件
@@ -381,14 +380,6 @@
 					this.status = "nomore"
 					this.status = "nomore"
 				}
 				}
 			},
 			},
-			// 打开切换车型弹窗
-			openSelCarModel(){
-				this.showSelCarModel = true
-			},
-			selCarModel(item){
-				this.showSelCarModel = false
-				this.carInfo = item
-			},
 			// 添加到购物车
 			// 添加到购物车
 			addPart(item){
 			addPart(item){
 				item.checked = true
 				item.checked = true

+ 15 - 2
pages/index/index.vue

@@ -48,7 +48,7 @@
 		<!-- 扫描记录 -->
 		<!-- 扫描记录 -->
 		<view class="list-box">
 		<view class="list-box">
 			<u-cell-group :border="false" v-if="hasLogin">
 			<u-cell-group :border="false" v-if="hasLogin">
-				<u-cell-item v-for="item in vinList" :key="item.id" :title="item.vinCode" :title-style="{fontSize:'1em'}" :value="item.brandName +' '+item.modelName">
+				<u-cell-item v-for="item in vinList" @click="toChoosePart(item)" :key="item.id" :title="item.vinCode" :title-style="{fontSize:'1em'}" :label="item.brandName +' '+item.modelName">
 					<text slot="icon"></text>
 					<text slot="icon"></text>
 				</u-cell-item>
 				</u-cell-item>
 				<view style="padding: 20upx;">
 				<view style="padding: 20upx;">
@@ -109,8 +109,8 @@
 				this.getStoreShelf()
 				this.getStoreShelf()
 				// 获取扫描记录
 				// 获取扫描记录
 				this.getVinLog()
 				this.getVinLog()
-				this.getScrollLog()
 			}
 			}
+			this.getScrollLog()
 		},
 		},
 		methods: {
 		methods: {
 			//  获取数据字典
 			//  获取数据字典
@@ -182,6 +182,19 @@
 				uni.navigateTo({
 				uni.navigateTo({
 					url: this.hasLogin ? '/pages/personData/personData' : '/pages/login/login'
 					url: this.hasLogin ? '/pages/personData/personData' : '/pages/login/login'
 				})
 				})
+			},
+			toChoosePart(item){
+				if(this.hasShelf){
+					item.text = item.modelInfo
+					uni.navigateTo({
+						url: "/pages/digitalShelf/choosePart?vinNumber="+item.vinCode+"&carList="+encodeURIComponent(JSON.stringify(item))
+					})
+				}else{
+					uni.showToast({
+						icon:'none',
+						title: '当前门店没有数字货架!'
+					})
+				}
 			}
 			}
 		}
 		}
 	}
 	}

+ 15 - 5
pages/morePage/morePage.vue

@@ -39,7 +39,7 @@
 				</u-cell-item>
 				</u-cell-item>
 			</u-cell-group>
 			</u-cell-group>
 		</view>
 		</view>
-		<view class="list-box">
+		<view class="list-box" v-if="hasLogin&&dealerPhone">
 			<view class="list-title flex justify_center phone" @click="call">
 			<view class="list-title flex justify_center phone" @click="call">
 				<u-icon size="36" name="phone"></u-icon> <text>联系汽配商</text>
 				<u-icon size="36" name="phone"></u-icon> <text>联系汽配商</text>
 			</view>
 			</view>
@@ -59,7 +59,10 @@
 			}
 			}
 		},
 		},
 		computed: {
 		computed: {
-			...mapState(['hasLogin'])
+			...mapState(['hasLogin']),
+			hasShelf(){
+				return this.$store.state.vuex_storeShelf
+			}
 		},
 		},
 		onShow() {
 		onShow() {
 			const shelfInfo = this.$store.state.vuex_storeShelf
 			const shelfInfo = this.$store.state.vuex_storeShelf
@@ -68,9 +71,16 @@
 		methods: {
 		methods: {
 			toPage(path){
 			toPage(path){
 				if(this.hasLogin){
 				if(this.hasLogin){
-					uni.navigateTo({
-						url: path
-					})
+					if(this.hasShelf){
+						uni.navigateTo({
+							url: path
+						})
+					}else{
+						uni.showToast({
+							icon:'none',
+							title: '当前门店没有数字货架!'
+						})
+					}
 				}else{
 				}else{
 					uni.navigateTo({
 					uni.navigateTo({
 						url: '/pages/login/login'
 						url: '/pages/login/login'

+ 1 - 9
pages/personData/personData.vue

@@ -34,7 +34,7 @@
 					<text>{{userInfo.orgName}}</text>
 					<text>{{userInfo.orgName}}</text>
 			    </view>
 			    </view>
 			</view>
 			</view>
-			<view class="list-item margin-bot">
+			<view class="list-item margin-bot" v-if="shelfInfo">
 				<view class="list-item-left">
 				<view class="list-item-left">
 					<text>汽配经销商</text>
 					<text>汽配经销商</text>
 				</view>
 				</view>
@@ -99,14 +99,6 @@
 		  }
 		  }
         },
         },
 		onLoad() {
 		onLoad() {
-			let UserInfo = uni.getStorageSync('userInfo');
-			this.userInfo = UserInfo;
-			console.log(UserInfo,"UserInfo")
-			// 开启分享
-			uni.showShareMenu({
-				withShareTicket: true,
-				menus: ['shareAppMessage', 'shareTimeline']
-			})
 		},
 		},
         onReady() {
         onReady() {
             
             

+ 10 - 1
pages/vinInput/confirmVin.vue

@@ -49,6 +49,9 @@
 		computed: {
 		computed: {
 			userInfo(){
 			userInfo(){
 				return this.$store.state.vuex_userInfo
 				return this.$store.state.vuex_userInfo
+			},
+			hasShelf(){
+				return this.$store.state.vuex_storeShelf
 			}
 			}
 		},
 		},
 		onLoad(opts) {
 		onLoad(opts) {
@@ -105,9 +108,15 @@
 			},
 			},
 			// 提交并匹配车型
 			// 提交并匹配车型
 			submitForm(){
 			submitForm(){
+				if(!this.hasShelf){
+					uni.showToast({
+						icon:'none',
+						title: '当前门店没有数字货架!'
+					})
+					return
+				}
 				const _this = this
 				const _this = this
 				const vinNo = this.verifyCode.toUpperCase()
 				const vinNo = this.verifyCode.toUpperCase()
-				console.log(vinNo, 'vinvinvinvinvin')
 				if(vinNo.length>=17){
 				if(vinNo.length>=17){
 					this.loading = true
 					this.loading = true
 					getVehicleInfoByVin({
 					getVehicleInfoByVin({

+ 22 - 4
pages/vinRecord/vinRecord.vue

@@ -1,10 +1,10 @@
 <template>
 <template>
 	<view class="vinRecord flex flex_column">
 	<view class="vinRecord flex flex_column">
-		<view class="des">仅可查看最近7天的VIN查询记录</view>
+		<!-- <view class="des">仅可查看最近7天的VIN查询记录</view> -->
 		<swiper class="list-box">
 		<swiper class="list-box">
 			<swiper-item class="swiper-item" style="height: 100%;width: 100%;overflow: hidden;">
 			<swiper-item class="swiper-item" style="height: 100%;width: 100%;overflow: hidden;">
 				<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">
-					<view class="list-item flex align_center justify_between" v-for="item in list" :key="item.id">
+					<view class="list-item flex align_center justify_between" v-for="item in list" :key="item.id" @click="toChoosePart(item)">
 						<view>
 						<view>
 							<u-image shape="circle" :src="item.icon||'@/static/def_imgs.png'" width='90' height="90"></u-image>
 							<u-image shape="circle" :src="item.icon||'@/static/def_imgs.png'" width='90' height="90"></u-image>
 						</view>
 						</view>
@@ -44,6 +44,11 @@
 		onLoad() {
 		onLoad() {
 			this.pageInit()
 			this.pageInit()
 		},
 		},
+		computed: {
+			hasShelf(){
+				return this.$store.state.vuex_storeShelf
+			}
+		},
 		methods: {
 		methods: {
 			pageInit(){
 			pageInit(){
 				this.total = 0
 				this.total = 0
@@ -59,8 +64,8 @@
 			  // 状态条件
 			  // 状态条件
 			  const state = ['WAIT','FINISH','CLOSE']
 			  const state = ['WAIT','FINISH','CLOSE']
 			  let params = {
 			  let params = {
-				beginDate: moment().subtract('days', 6).format('YYYY-MM-DD 00:00:00'),
-				endDate: moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59'),
+				// beginDate: moment().subtract('days', 6).format('YYYY-MM-DD 00:00:00'),
+				// endDate: moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59'),
 			    pageNo: this.pageNo,
 			    pageNo: this.pageNo,
 			    pageSize: this.pageSize,
 			    pageSize: this.pageSize,
 				billState: state[this.swiperCurrent]
 				billState: state[this.swiperCurrent]
@@ -92,6 +97,19 @@
 					this.status = "nomore"
 					this.status = "nomore"
 				}
 				}
 			},
 			},
+			toChoosePart(item){
+				if(this.hasShelf){
+					item.text = item.modelInfo
+					uni.navigateTo({
+						url: "/pages/digitalShelf/choosePart?vinNumber="+item.vinCode+"&carList="+encodeURIComponent(JSON.stringify(item))
+					})
+				}else{
+					uni.showToast({
+						icon:'none',
+						title: '当前门店没有数字货架!'
+					})
+				}
+			}
 		}
 		}
 	}
 	}
 </script>
 </script>