guo 2 years ago
parent
commit
8dc8f65efd
3 changed files with 56 additions and 26 deletions
  1. 11 4
      pages/index/paint.vue
  2. 1 3
      pages/index/paintShopList.vue
  3. 44 19
      pages/index/paintSure.vue

+ 11 - 4
pages/index/paint.vue

@@ -43,7 +43,12 @@
 					<view class="itemBox" v-if="item2.open==true">
 						<view class="type" :class="{orangeLine:item2.type==1}" @click="select(item2)">
 							<view class="typeName" :class="{orangeColor:item2.type==1}">喷漆</view>
-							<view class="money"><span class="renminbi">¥</span>{{item2.PSalePrice?item2.PSalePrice:'0'}}
+							
+							<view class="priceBox">
+								<view class="money"><span class="renminbi">¥</span>{{item2.PSalePrice?item2.PSalePrice:'0'}}
+								</view>
+								<view class="money old" v-if="item2.PShowScribingType==1"><span
+										class="renminbi">¥</span>{{item2.PScribingPrice?item2.PScribingPrice:'0'}}</view>
 							</view>
 						</view>
 						<view class="type marginLeft" :class="{orangeLine:item2.type==2}" @click="select2(item2)">
@@ -51,8 +56,8 @@
 							<view class="priceBox">
 								<view class="money"><span
 										class="renminbi">¥</span>{{item2.BPSalePrice?item2.BPSalePrice:'0'}}</view>
-								<view class="money old"><span
-										class="renminbi">¥</span>{{item2.BPSalePrice?item2.BPSalePrice:'0'}}</view>
+								<view class="money old" v-if="item2.BPShowScribingType==1"><span
+										class="renminbi">¥</span>{{item2.BPScribingPrice?item2.BPScribingPrice:'0'}}</view>
 							</view>
 									
 						</view>
@@ -143,6 +148,7 @@
 				uni.navigateTo({
 					url:'paintSure?itemList='+JSON.stringify(this.selectItemList)
 				})
+				 this.$store.commit('mutationsckshopInfo', "")	
 			},
 			goCarlist() {
 				uni.navigateTo({
@@ -308,7 +314,8 @@
 		padding: 30rpx 20rpx;
 		display: flex;
 		justify-content: space-between;
-		align-items: center;
+		align-items: center;
+		border-bottom: 1rpx solid #EEEEEE;
 	}
 
 	.left {

+ 1 - 3
pages/index/paintShopList.vue

@@ -66,9 +66,7 @@
 					title: '加载中'
 				})
 				this.$http('openSheetMetalSprayPaint/queryBpshopList', {
-     //                goodsId:this.goodsId,
-					// lat: this.location.lat ? this.location.lat : '',
-					// lng: this.location.lng ? this.location.lng : '',
+     
 				}, 'GET').then(res => {
 					uni.hideLoading();
 					this.queryShopList = res.data

+ 44 - 19
pages/index/paintSure.vue

@@ -136,12 +136,8 @@
 			this.userInfo = uni.getStorageSync("userInfo");
 			this.goodsInfo = uni.getStorageSync("goodsDetail");
 			this.jsMoney()
-			//this.openGoodsDetailById()
-			/* var a=[
-				{name:1},{name:2}
-			]
-			var b=a.map(i=>i.name);
-			console.log(b) */
+			
+			
 			this.$http('openreservation/getInfo', {
 				lat: '',
 				lng: '',
@@ -149,18 +145,10 @@
 				this.mydata = res.data
 				this.customerName = this.mydata.customerInfo.customerName
 				this.mobilePhone = this.mydata.customerInfo.mobilePhone
-				this.shopInfo = this.mydata.shopInfo
-				this.shopID=this.shopInfo.id
-				uni.setStorage({
-					key: 'yyshopInfo',
-					data:this.shopInfo,
-					 success: function () {
-					    
-					 }
-				}); 
-				
-				console.log('默认服务门店-=',this.shopInfo)
-			})
+				
+			}),
+			
+			this.getqueryShopList()
 			
 			this.$http('openSheetMetalSprayPaint/queryPayType', {
 				
@@ -190,6 +178,38 @@
 			console.log('服务门店选择过-=',this.shopInfo)
 		},
 		methods: {
+			getqueryShopList() {
+				uni.showLoading({
+					title: '加载中'
+				})
+				this.$http('openSheetMetalSprayPaint/queryBpshopList', {
+			     
+				}, 'GET').then(res => {
+					uni.hideLoading();
+					let list = res.data
+					//console.log('list+=', this.queryShopList);
+					list.forEach((item)=>{
+						if (item.thedefault=="true") {
+							this.shopInfo = item
+							this.shopInfo.id = this.shopInfo.shopId
+							this.shopID=this.shopInfo.id
+							uni.setStorage({
+								key: 'yyshopInfo',
+								data:this.shopInfo,
+								 success: function () {
+								    
+								 }
+							}); 
+							
+							console.log('item-=',item)
+						}
+					})
+					
+			
+				})
+				
+				console.log('默认服务门店-=',this.shopInfo)
+			},
 			changeTime(data){
 				console.log(data)
 				this.billDate=data
@@ -243,7 +263,12 @@
 								title: '提交成功',
 								icon: 'none',
 								duration: 2000
-							});
+							});
+							if (this.orderData.sheetType==5){
+								uni.navigateTo({
+									url: "../user/myOrder/paintOrderDetail?id=" +that.orderData.id
+								})
+							}
 						}
 						
 					} else {