guo 2 роки тому
батько
коміт
b2ca568340

+ 128 - 40
pages/mobile/OemDetail.vue

@@ -15,45 +15,45 @@
 		<view class="mainBox" v-if="tabIndex==0">
 			<view class="comtent">
 				<view class="left">零件编号</view>
-				<view class="right">EQ867-51LO</view>
+				<view class="right">{{mesData.partsnum}}</view>
 			</view>
 			<view class="comtent">
 				<view class="left">名称</view>
-				<view class="right">EQ867-51LO</view>
+				<view class="right">{{mesData.caption}}</view>
 			</view>
 			<view class="comtent">
 				<view class="left">位置</view>
-				<view class="right">EQ867-51LO</view>
+				<view class="right">{{weizhi}}</view>
 			</view>
 			<view class="comtent">
 				<view class="left">用量</view>
-				<view class="right">EQ867-51LO</view>
+				<view class="right">{{yongliang}}</view>
 			</view>
 			<view class="comtent">
 				<view class="left">备注</view>
-				<view class="right">这是备注这是备注这是备注这是备注过长换行这是备注这是备注这是备注这是备注过长换行</view>
+				<view class="right">{{mesData.remark}}</view>
 			</view>
 			<view class="comtent">
 				<view class="left">英文名称</view>
-				<view class="right">EQ867-51LO</view>
+				<view class="right">{{mesData.remark}}</view>
 			</view>
 			<view class="comtent">
 				<view class="left">适用车型代码</view>
-				<view class="right">EQ867-51LO</view>
+				<view class="right"></view>
 			</view>
 			<view class="comtent">
 				<view class="left">是否颜色配件</view>
-				<view class="right">EQ867-51LO</view>
+				<view class="right"></view>
 			</view>
 			<view class="comtent">
 				<view class="left">4S价格</view>
-				<view class="right" style="color: #FF4F00; font-weight: bold;">¥265.00</view>
+				<view class="right" style="color: #FF4F00; font-weight: bold;">¥{{mesData.price}}</view>
 			</view>
 
 		</view>
 
 		<!-- 维修工时 -->
-		<view class="mainBox" v-if="tabIndex==1">
+		<!-- <view class="mainBox" v-if="tabIndex==1">
 				<view class="workBox" v-for="(item,index) in workHourseList" :key="index">
 					<view class="oneBox">
 						<view class="comtent2">
@@ -84,31 +84,32 @@
 					
 				</view>
 		</view>
-
+ -->
+		
 		<!-- 通用件 -->
-		<view class="mainBox" v-if="tabIndex==2" style="margin-top: 0rpx; padding: 0rpx">
+		<view class="mainBox" v-if="tabIndex==1" style="margin-top: 0rpx; padding: 0rpx">
 			<view class="topTitle"><span style="color: #FF3B30;">*</span>通用件数据仅供参考,采购前请谨慎核对是否为相同配件</view>
 			
 			<view class="workBox2" v-for="(item,index) in tongyongList" :key="index">
 				<view class="oneBox">
 					<view class="comtent2">
 						<view class="left2">品牌:</view>
-						<view class="right2">1201D0</view>
+						<view class="right2">{{item.brand}}</view>
 					</view>
 					<view class="comtent2">
 						<view class="left2" style="width: 26%;">零件号:</view>z
-						<view class="right2">12</view>
+						<view class="right2">{{item.partsnum}}</view>
 					</view>
 				</view>
 				
 				<view class="oneBox">
 					<view class="comtent2">
 						<view class="left2">名称:</view>
-						<view class="right2">1201D0</view>
+						<view class="right2">{{item.description}}</view>
 					</view>
 					<view class="comtent2">
 						<view class="left2">价格:</view>
-						<view class="right2">12</view>
+						<view class="right2">{{item.price}}</view>
 					</view>
 				</view>
 				
@@ -117,58 +118,58 @@
 		</view>
 
 		<!-- EPC车型 -->
-		<view class="mainBox" v-if="tabIndex==3" style="margin-top: 0rpx; padding: 0rpx">
-			<view class="topTitle">共<span style="color: #FF3B30;">999</span>条</view>
+		<view class="mainBox" v-if="tabIndex==2" style="margin-top: 0rpx; padding: 0rpx">
+			<view class="topTitle">共<span style="color: #FF3B30;">{{epc_Count}}</span>条</view>
 			
-			<view class="workBox2" v-for="(item,index) in epsList" :key="index">
+			<view class="workBox2" v-for="(item,index) in epcList" :key="index">
 				<view class="oneBox">
 					<view class="comtent2">
 						<view class="left2">名称:</view>
-						<view class="right2">1201D0</view>
+						<view class="right2">{{item.caption}}</view>
 					</view>
 					<view class="comtent2">
 						<view class="left2">车型:</view>z
-						<view class="right2">12</view>
+						<view class="right2">{{item.vin_11}}</view>
 					</view>
 				</view>
 				
 				<view class="oneBox">
 					<view class="comtent2">
 						<view class="left2">年份:</view>
-						<view class="right2">1201D0</view>
+						<view class="right2">{{item.year}}</view>
 					</view>
 					<view class="comtent2">
 						<view class="left2" style="width: 28%;">发动机:</view>
-						<view class="right2">12</view>
+						<view class="right2">{{item.engine_prefix}}</view>
 					</view>
 				</view>
 				
 				<view class="oneBox">
 					<view class="comtent2">
 						<view class="left2" style="width: 28%;">变数箱:</view>
-						<view class="right2">1201D0</view>
+						<view class="right2">{{item.trans}}</view>
 					</view>
 					<view class="comtent2">
 						<view class="left2">地区:</view>
-						<view class="right2">12</view>
+						<view class="right2">{{item.area}}</view>
 					</view>
 				</view>
 				
 				<view class="oneBox">
 					<view class="comtent2">
 						<view class="left2">配置:</view>
-						<view class="right2">1201D0</view>
+						<view class="right2">{{item.equips}}</view>
 					</view>
 					<view class="comtent2">
 						<view class="left2">级别:</view>
-						<view class="right2">12</view>
+						<view class="right2">{{item.grade}}</view>
 					</view>
 				</view>
 				
 				<view class="oneBox">
 					<view class="comtent2">
 						<view class="left2" style="width: 35%;">模型代码:</view>
-						<view class="right2">1201D0</view>
+						<view class="right2">{{item.model_code}}</view>
 					</view>
 					
 				</view>
@@ -176,15 +177,14 @@
 		</view>
 
 		<!-- 4S销售车型 -->
-		<view class="mainBox" v-if="tabIndex==4" style="margin-top: 0rpx; padding: 0rpx">
+		<!-- <view class="mainBox" v-if="tabIndex==4" style="margin-top: 0rpx; padding: 0rpx">
 			<view class="topTitle">共<span style="color: #FF3B30;">999</span>条</view>
 			
-			<view class="workBox3" v-for="(item,index) in epsList" :key="index">
-				<view class="carMode">2009 手自一体变速器(MT)模拟7档 前置四驱 S5 Ca
-briolet</view>
+			<view class="workBox3" v-for="(item,index) in xiaoshouList" :key="index">
+				<view class="carMode">2009 手自一体变速器(MT)模拟7档 前置四驱 S5 </view>
 			</view>
 		</view>
-
+ -->
 
 
 
@@ -199,17 +199,105 @@ briolet</view>
 <script>
 	export default {
 		data() {
-			return {
+			return {
+				epc_id:'',
+				partsnum:'',
 				tabIndex: 0,
-				tabList: ['配件信息', '维修工时', '通用件', 'EPC车型', '4S销售车型'],
-				workHourseList: [1, 2, 3],
-				tongyongList: [1, 2, 3],
-				epsList: [1, 2, 3],
+				// tabList: ['配件信息', '维修工时', '通用件', 'EPC车型', '4S销售车型'],
+				tabList: ['配件信息', '通用件', 'EPC车型'],
+				mesData:{},
+				weizhi:'',
+				yongliang:'',
+				workHourseList: [],
+				tongyongList: [],
+				epcList: [],
+				epc_Count:'',
+				xiaoshouList:[]
+				
 			}
+		},
+		onLoad(opt) {
+			this.epc_id = opt.epc_id;
+			this.partsnum = opt.partsnum;
+			this.weizhi = opt.weizhi;
+			this.yongliang = opt.yongliang;
+			this.getItemData();
 		},
-		methods: {
+		methods: {
+			// 配件信息
+			getItemData() {
+				uni.showLoading({
+					title: '加载中'
+				});
+				this.$http('advancedEpc/generalEpc/infoPc', {
+					epc_id:this.epc_id,
+					partsnum:this.partsnum,
+					
+				}, 'GET').then(res => {
+					uni.hideLoading();
+					
+					this.mesData = res.data.result;
+				
+					
+			
+				});
+			},
+			// 通用件
+			getTongData() {
+				uni.showLoading({
+					title: '加载中'
+				});
+				this.$http('advancedEpc/generalEpc/replacePc', {
+					epc_id:this.epc_id,
+					partsnum:this.partsnum,
+					
+				}, 'GET').then(res => {
+					uni.hideLoading();
+					
+					this.tongyongList = res.data.result;
+				
+					
+			
+				});
+			},
+			// EPC车型
+			getCarModelData() {
+				uni.showLoading({
+					title: '加载中'
+				});
+				this.$http('advancedEpc/findApplicableModelsPc', {
+					epc_id:this.epc_id,
+					partnum:this.partsnum
+				}, 'GET').then(res => {
+					uni.hideLoading();
+					
+					this.epcList = res.data.result.list;
+					this.epc_Count = res.data.result.total_count;
+				});
+			},
 			topClick(index) {
-				this.tabIndex = index
+				this.tabIndex = index
+				
+				if (this.tabIndex == 0) {
+					// 配件信息
+					this.getItemData();
+				} 
+				// else if (this.tabIndex == 1) {
+				// 	// 维修工时
+				// 	// this.getItemData();
+				// }
+				else if (this.tabIndex == 1) {
+					// 通用件
+					this.getTongData();
+				}
+				else if (this.tabIndex == 2) {
+					// EPC车型
+					this.getCarModelData();
+				}
+				// else if (this.tabIndex == 4) {
+				// 	// 4S销售车型
+				// 	// this.getItemData();
+				// }
 			},
 		}
 	}

+ 2 - 2
pages/mobile/OemSearch.vue

@@ -2,11 +2,11 @@
 	<view class="box">
 		<view class="brand">当前品牌:{{brand}}</view>
 
-		<view class="tab">
+		<!-- <view class="tab">
 			<view class="tabLine" :class="{tabActive:tabIndex==0}" @click="tabClick(0)">品牌下搜索</view>
 			<view class="tabLine" :class="{tabActive:tabIndex==1}" @click="tabClick(1)">车型下搜索</view>
 
-		</view>
+		</view> -->
 		<!-- 搜索 -->
 		<view class="searchBoxBg">
 			<searchBox placeholder="配件名称/原厂OEM" @search='search($event)'></searchBox>

+ 1 - 1
pages/mobile/SonGroup.vue

@@ -57,7 +57,7 @@
 			goModelThree(item) {
 				// console.log('num==',item);
 				uni.navigateTo({
-					url: 'modelThree?epc_id=' + this.epc_id + '&token=' + item.token + '&param=' + item.param+ '&access_time=' + this.itemData.access_time
+					url: 'modelThree?epc_id=' + this.epc_id + '&token=' + item.token + '&param=' + item.param+ '&access_time=' + this.itemData.access_time + '&oemSearch=true'
 				
 				})
 			}

+ 56 - 18
pages/mobile/modelThree.vue

@@ -8,7 +8,7 @@
 		</view>
 		<view style="height: 20rpx;background: #F4F5F7;"></view>
 		<view class="mainBox">
-			<view class="mainTop">
+			<!-- <view v-if="oemSearch == false" class="mainTop">
 				<view class="arrowBox">
 					<image src="../../static/img/icon_arrow_blue_l@2x.png" mode="" class="arrow"></image>
 					<view class="title" @click="upGroup">上一组</view>
@@ -18,17 +18,17 @@
 					<view class="title" @click="downGroup">下一组</view>
 					<image src="../../static/img/icon_arrow_blue_r@2x.png" mode="" class="arrow"></image>
 				</view>
-			</view>
+			</view> -->
 
 			<view class="commentBox" v-for="(item,index) in itemList" :key="index">
 				<view class="line">
-					<view class="wei">{{item.refernum}}</view>
-					<view class="yong">{{item.qty}}</view>
+					<view class="wei">位置{{item.refernum}}</view>
+					<view class="yong">用量{{item.qty}}</view>
 				</view>
 				<view class="name">{{item.description}}</view>
 				<view class="comment">{{item.remark}}</view>
 				<view class="forLine">
-					<view @click="goOemDetail()" class="code">{{item.extened}}</view>
+					<view @click="goOemDetail(item)" class="code">{{item.extened}}</view>
 					<view class="price">4S店价:
 						<span class="orangePrice">¥ {{item.price}}</span>
 					</view>
@@ -47,7 +47,8 @@
 				epc_id: '',
 				token: '',
 				param: '',
-				access_time: '',
+				access_time: '',
+				oemSearch:'',
 				groupData: [],
 				itemList: [],
 				imgUrl:'',
@@ -66,8 +67,16 @@
 			this.token = opt.token;
 			this.param = opt.param;
 			this.access_time = opt.access_time;
+			this.oemSearch = opt.oemSearch;
+			
+			if (this.oemSearch == 'true') {
+				//oem搜索过来的,没有分组概念
+				
+				this.getPeijianData();
+			} else{
+				// this.getGroupData();
+			}
 			
-			this.getGroupData();
 		},
 		methods: {
 			upGroup() {
@@ -94,6 +103,7 @@
 				
 				this.getItemData();
 			},
+			/*
 			// 车型子组列表
 			getGroupData() {
 				var that = this
@@ -112,25 +122,53 @@
 					this.groupData = res.data.result.list;
 					
 					this.son_epc_id = res.data.result.epc_id;
+					this.son_access_time = res.data.result.access_time;
+					
+					that.groupData.forEach((item, index) => {
+						if (item.group_no.includes(that.group_no)) {
+							console.log('有index',index);
+						}
+					})
 					this.son_param = this.groupData[0].param;
 					this.son_token = this.groupData[0].token;
-					this.son_access_time = res.data.result.access_time;
+					
 					
 					that.getItemData();
 				});
-			},
-			// 子组配件列表
-			getItemData() {
+			},
+			*/
+		   // 子组配件列表
+		   getItemData() {
+		   	
+		   	uni.showLoading({
+		   		title: '加载中'
+		   	});
+		   	this.$http('/advancedEpc/getPartsPc', {
+		   		vin: this.son_vin,
+		   		epc_id: this.son_epc_id,
+		   		token: this.son_token,
+		   		param: this.son_param,
+		   		access_time: this.son_access_time,
+		   	}, 'GET').then(res => {
+		   		uni.hideLoading();
+		   		
+		   		this.itemList = res.data.result.list.rows;
+		   		this.imgUrl = res.data.result.list.image_info[0].pic_url;
+		   		console.log('itemList++',this.itemList);
+		   	});
+		   },
+			// oem子组配件列表
+			getPeijianData() {
 				
 				uni.showLoading({
 					title: '加载中'
 				});
 				this.$http('/advancedEpc/getPartsPc', {
-					vin: this.son_vin,
-					epc_id: this.son_epc_id,
-					token: this.son_token,
-					param: this.son_param,
-					access_time: this.son_access_time,
+					vin: this.vin,
+					epc_id: this.epc_id,
+					token: this.token,
+					param: this.param,
+					access_time: this.access_time,
 				}, 'GET').then(res => {
 					uni.hideLoading();
 					
@@ -139,9 +177,9 @@
 					console.log('itemList++',this.itemList);
 				});
 			},
-			goOemDetail(id) {
+			goOemDetail(item) {
 				uni.navigateTo({
-					url: 'OemDetail?id=' + id
+					url: 'OemDetail?epc_id=' + this.epc_id + '&partsnum=' + item.partnum+ '&weizhi=' + item.refernum+ '&yongliang=' + item.qty
 				})
 			},
 			previewImage(imgUrl) {