Просмотр исходного кода

Merge branch 'master' of http://47.98.226.240:3000/twt/epc

* 'master' of http://47.98.226.240:3000/twt/epc:
  bug修改
  bug修改
guo лет назад: 2
Родитель
Сommit
337612c0d0

+ 40 - 5
pages/mobile/OEDetail.vue

@@ -18,10 +18,10 @@
 			<view class="switch" @click="switchBrand">切换</view>
 		</view> -->
 		<view >
-			 <picker   @change="bindChange" class="picker-view" :range="oedata.epc_info" :range-key="'brand'">
+			 <picker   @change="bindChange" :value="pkvalue" class="picker-view" :range="epc_info" :range-key="'brand'">
 				<view class="brandBox">
-					<span>共{{oedata.epc_info.length}}个品牌,已选品牌:{{oedata.brand}}</span>
-					<view class="switch" @click="switchBrand" v-if="oedata.epc_info.length>1">切换</view>
+					<span>共{{oedata.epc_info.length}}个品牌,已选品牌:{{brandName}}</span>
+					<view class="switch" @click="switchBrand" >切换</view><!-- v-if="oedata.epc_info.length>1" -->
 				</view>
 			</picker>
 			
@@ -38,10 +38,15 @@
 			<view class="lineLeft">配件名称</view>
 			<view class="lineRight">{{oedata.caption}}</view>
 		</view>
+		<view class="line">
+			<view class="lineLeft">4S店价:</view>
+			<view class="lineRight">¥{{oedata.price}}</view>
+		</view>
 		<view class="line">
 			<view class="lineLeft">备注</view>
 			<view class="lineRight">{{oedata.remark}}</view>
 		</view>
+		
 	</view>
 </template>
 
@@ -63,6 +68,9 @@
 				brand_id:'',
 				epc_id:'',
 				brandShow:false,
+				pkvalue:0,
+				brandName:'',
+				epc_info:'',
 			}
 		},
 		onLoad(opt) {
@@ -77,9 +85,10 @@
 			},
 			bindChange(e){
 				console.log(e)
+				this.brandName=this.epc_info[e.detail.value].brand
 				this.epc_id=this.oedata.epc_info[e.detail.value].epc_id;
 				this.brand_id=this.oedata.epc_info[e.detail.value].brand_id;
-				this.find()
+				this.find2()
 			},
 			
 			// 配件查询
@@ -95,7 +104,8 @@
 					uni.hideLoading();
                     if (res.data.number == 200 || res.data.number == 5212) {
                     	this.oedata=res.data.result
-                    				
+                    	this.brandName=res.data.result.brand;
+					    this.epc_info=res.data.result.epc_info;
                     } else {
                     	uni.showToast({
                     		title: res.data.message,
@@ -106,6 +116,31 @@
 					
 
 
+				});
+			},
+			find2() {
+				uni.showLoading({
+					title: '加载中'
+				});
+				this.$http('advancedEpc/parts/detail', {
+					partsnum: this.partsnum,
+					brand_id:this.brand_id,
+					epc_id:this.epc_id
+				}, 'GET').then(res => {
+					uni.hideLoading();
+			        if (res.data.number == 200 || res.data.number == 5212) {
+			        	this.oedata=res.data.result
+			        	
+			        } else {
+			        	uni.showToast({
+			        		title: res.data.message,
+			        		icon: 'none',
+			        		duration: 3000
+			        	});
+			        }
+					
+			
+			
 				});
 			},
 

+ 1 - 1
pages/mobile/OESearch.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="box">
-		<view class="brand">当前品牌:{{this.itemList[0].brands}}</view>
+		<!-- <view class="brand">当前品牌:{{this.itemList[0].brands}}</view> -->
 
 		<!-- <view class="tab">
 			<view class="tabLine" :class="{tabActive:tabIndex==0}" @click="tabClick(0)">品牌下搜索</view>

+ 1 - 1
pages/mobile/SelectCarModel.vue

@@ -122,7 +122,7 @@
 
 <style scoped lang="scss">
 	.box {
-		min-height: 100vh;
+		height: calc(100vh - 44px);
 		background: #F4F5F7;
 		padding-bottom: constant(safe-area-inset-bottom);
 		padding-bottom: env(safe-area-inset-bottom);

+ 25 - 3
pages/mobile/index.vue

@@ -50,9 +50,31 @@
 				this.gogroup()
 			},
             gogroup(){
-				uni.navigateTo({
-					url:'group?vin='+this.vin
-				})
+				uni.showLoading({
+					title: '加载中'
+				});
+				this.$http('advancedEpc/getVinGroup', {
+					vin: this.vin,
+				
+				}, 'GET').then(res => {
+					uni.hideLoading();
+					//console.log(res.data.number);
+					if (res.data.number == 200 || res.data.number == 5212) {
+						uni.navigateTo({
+							url:'group?vin='+this.vin
+						})
+						
+					} else {
+				
+						uni.showToast({
+							title: res.data.message,
+							icon: 'none',
+							duration: 3000
+						});
+					}
+				
+				});
+				
 			},
 			gogroup2(vin){
 				uni.navigateTo({

+ 15 - 6
pages/mobile/modelTwo.vue

@@ -73,13 +73,13 @@
 
 
 			</view>
-			<view class="mainBox" v-if="restrainShow1">
+			<view class="mainBox m1" v-if="restrainShow1">
 				<view class="mainLine2" v-for="(item,index) in restrainList1" @click="restrainClickOne(item)">
 					<view class="lineName2">{{item.caption}}</view>
 					<image src="../../static/img/jt.png" mode="" class="mainLineJt"></image>
 				</view>
 			</view>
-			<view class="mainBox" v-if="restrainShow2">
+			<view class="mainBox m2" v-if="restrainShow2">
 				<view class="mainLine2" v-for="(item,index) in restrainList2" @click="restrainClickTwo(item)">
 					<view class="lineName2">{{item.caption}}</view>
 					<image src="../../static/img/jt.png" mode="" class="mainLineJt"></image>
@@ -105,7 +105,7 @@
 				restrainShow1: false,
 				restrainList1: '',
 				restrainShow2: false,
-				restrainList1: '',
+				restrainList2: '',
 				lastShow: false,
 				childrenList: '',
 				oldList: '',
@@ -213,12 +213,21 @@
 						if (res.data.result.level_identify == 'group_restrain' || res.data.result.level_identify ==
 							'subgroup') { //约束
 							console.log("约束2")
-							this.restrainShow2 = true;
-							this.restrainShow1 = false;
-							this.restrainList2 = res.data.result.list;
+							if(res.data.result.list[0].next_restrain==1){
+								this.restrainShow2 = true;
+								this.restrainShow1 = false;
+								this.restrainList2 = res.data.result.list;
+							}else{
+								this.lastShow = true;
+								this.restrainShow1 = false;
+								this.childrenList = res.data.result.list;
+								this.oldList = this.childrenList
+							}
+							
 
 						} else {
 							this.lastShow = true;
+							this.restrainShow1 = false;
 							this.childrenList = res.data.result.list;
 							this.oldList = this.childrenList
 						}