浏览代码

历史消费 分享授权

twt 1 年之前
父节点
当前提交
b04fef6d08
共有 6 个文件被更改,包括 130 次插入19 次删除
  1. 28 1
      pages/index/aboutUS.vue
  2. 3 3
      pages/index/index.vue
  3. 21 1
      pages/user/addCar/cailist.vue
  4. 73 12
      pages/user/historyDetail.vue
  5. 4 1
      pages/user/historySpend.vue
  6. 1 1
      utils/request.js

+ 28 - 1
pages/index/aboutUS.vue

@@ -21,10 +21,13 @@
 				detail:'',
 			    unionID:'',
 				memberTitle:'',
+				scene:'',
 			}
 		},
 		onLoad(opt) {
 			this.unionID=opt.unionID
+			//this.scene='9B81E74B30734601BAFB5C3CD1C71584'
+			
 			this.memberTitle=opt.memberTitle
 			if(this.memberTitle){
 				this.getAboutMember();
@@ -32,7 +35,20 @@
 					title: this.memberTitle,
 				});
 			}else{
-				this.getExplain();
+				if(opt.scene&&opt.scene!='undefined'){
+					this.scene=opt.scene;
+					this.getShareParams()
+				}else{
+				    this.getExplain();
+				}
+				
+				/* if(opt.scene&&opt.scene!='undefined'){
+					this.scene=opt.scene;
+					this.getShareParams()
+				}else{
+					this.getExplain();
+				} */
+				
 			}
 			
 		},
@@ -40,6 +56,16 @@
 			
 		},
 		methods: {
+			getShareParams(){
+				this.$http('openMall/getShareParamsCache', {
+				  scene:this.scene,
+				 },'GET').then(res => {
+					var data= JSON.parse(res.data) ;
+					console.log(data)
+					this.unionID=data.unionID;
+					this.getExplain();
+				 })
+			},
 			getAboutMember(){
 				uni.showLoading({
 					title: '加载中'
@@ -62,6 +88,7 @@
 				    unionID:this.unionID
 				}, 'GET').then(res => {
 					uni.hideLoading();
+					console.log(res.data)
 					this.detail = res.data;
 					this.detail = this.detail.replace(/\<img/gi, '<img style="max-width:100%;height:auto" ');
 					//console.log('list+=', this.queryShopList);

+ 3 - 3
pages/index/index.vue

@@ -477,16 +477,16 @@
 				})
 			},
 			changeCar(){
-			    /* uni.scanCode({
+			   /* uni.scanCode({
 				 	success: function (res) {
 				 		console.log('条码类型:' + res.scanType);
 						console.log( res);
 				 	}
 				 });
 				 return false; */
-				uni.navigateTo({
+				 uni.navigateTo({
 					url:'../user/addCar/cailist'
-				})
+				}) 
 			},
 			goMUsers(){
 				if(!this.userInfo){

+ 21 - 1
pages/user/addCar/cailist.vue

@@ -13,8 +13,16 @@
 						<!-- 	<span>{{item.brand?item.brand:''}} {{item.series?item.series:''}}</span> -->
 						    <span>{{item.plateNumber}}</span>
 							<view class="plateNumber" v-if="item.milage">{{item.milage}}km</view>
+							<view class="nextCare" v-if="item.nextReturnDate||item.nextCareMilage">
+								<image class="carByIcon" src="../../../static/timg/car2.png" mode=""></image>
+							   <span class="nextCareTitle">下次保养</span>
+							   <span class="nextCaretxt" v-if="item.nextReturnDate">{{item.nextReturnDate}}天后</span>
+							   <span class="nextCaretxt" v-if="item.nextReturnDate&&item.nextCareMilage">或</span>
+							   <span class="nextCaretxt" v-if="item.nextCareMilage">{{item.nextCareMilage}}km</span>
+							</view>
 						</view>
-						<view class="carMS">{{item.carModel?item.carModel:''}}</view>
+						<!-- <view class="carMS">{{item.carModel?item.carModel:''}}</view> -->
+						<view class="carMS">{{item.brand?item.brand:''}} {{item.series?item.series:''}}</view>
 					</view>
 				</view>
 				<view class="lineBottom">
@@ -138,6 +146,18 @@
 </script>
 
 <style scoped>
+	.carByIcon{
+		width: 34rpx;height: 34rpx;
+	}
+	.nextCaretxt{
+		color: #FF0000;
+	}
+	.nextCare{
+		font-size: 20rpx;
+		line-height: 36rpx;
+		display: flex;
+		padding-left: 6rpx;
+	}
 	.box {
 		min-height: 100vh;
 		background: #F4F5F7;

+ 73 - 12
pages/user/historyDetail.vue

@@ -166,7 +166,14 @@
 						  	{{item.AmountMoney?item.AmountMoney:0}}
 						  </view>
 					  </view>
-						
+						<view class="itemWorkHoursBox">
+							<view class="itemWorkHours" v-if="itemWorkHours">
+								工时:{{item.SaleQty}}
+							</view>
+							<view class="itemPrice" v-if="itemPrice">
+								单价:{{item.SalePrice}}
+							</view>
+						</view>
 						<view class="secondBox" v-if="ItemComment" :class="{noLine:index == orderData.listItems.length-1}">
 							<view class="comment" >{{item.Comment}}</view>
 							<view class="secondRight">
@@ -189,14 +196,19 @@
 
 						<view class="goodTop">
 							<view class="detailedName"><span v-if="item.CardDetailID"
-									class="kaColor">卡</span>{{item.Brand}} {{item.GoodsName}}</view>
-							<view class="qty">x{{item.SaleQty}}</view>
+									class="kaColor">卡</span> 
+									<span v-if="brandSetting">{{item.Brand}}</span>
+									 {{item.GoodsName}}
+									 <span v-if="specSetting">{{item.Spec}}</span>
+									 <span v-if="factoryNumber">{{item.FactoryCode}}</span>
+							</view>
+							<view class="qty" v-if="goodsNumber">x{{item.SaleQty}}</view>
 						</view>
 						<view class="secondBox" :class="{noLine:index == orderData.listParts.length-1}">
 							<view class="comment" v-if="GoodsComment">{{item.Comment}}</view>
 							<view class="secondRight">
 								<!-- <view class="grayPrice">¥{{item.CheckOutTaxRate}}</view> -->
-								<view class="price" v-if="ItemMoney">
+								<view class="price" v-if="goodsPrice">
 									<span>¥</span>
 									{{item.AmountMoney?item.AmountMoney:0}}
 								</view>
@@ -218,15 +230,15 @@
 				</view>
 				<view class="goodscostLine" v-if="TotalDiscountMoney">
 					<view class="goodscostTxt">优惠总计</view>
-					<view class="goodsCostNum">¥{{orderData.billsheet.TotalDiscountMoney?orderData.billsheet.TotalDiscountMoney:0}}</view>
+					<view class="goodsCostNum3">¥{{orderData.billsheet.TotalDiscountMoney?orderData.billsheet.TotalDiscountMoney:0}}</view>
 				</view>
 				<view class="goodscostLine" v-if="CardMoneyT">
 					<view class="goodscostTxt">计次卡冲销</view>
-					<view class="goodsCostNum">¥{{orderData.billsheet.CardMoneyT?orderData.billsheet.CardMoneyT:0}}</view>
+					<view class="goodsCostNum3">¥{{orderData.billsheet.CardMoneyT?orderData.billsheet.CardMoneyT:0}}</view>
 				</view>
 				<view class="goodscostLine" v-if="CardMoneyC">
 					<view class="goodscostTxt">储值卡冲销</view>
-					<view class="goodsCostNum">¥{{orderData.billsheet.CardMoneyCWriteOff?orderData.billsheet.CardMoneyCWriteOff:0}}</view>
+					<view class="goodsCostNum3">¥{{orderData.billsheet.CardMoneyCWriteOff?orderData.billsheet.CardMoneyCWriteOff:0}}</view>
 				</view>
 				<view class="goodscostLine" v-if="ReceiptsMoney">
 					<view class="goodscostTxt">支付金额</view>
@@ -297,7 +309,15 @@
 				CardMoneyT: false, //计次卡冲销
 				CardMoneyC: false, //储值卡冲销
 				ReceiptsMoney: false, //支付金额
+				brandSetting:false,
+				specSetting:false,
+				factoryNumber:false,
+				goodsNumber:false,
+				goodsPrice:false,
+				itemWorkHours:false,
+				itemPrice:false,
 				iStatusBarHeight:'',
+				ShowSetting:'',
 			}
 		},
 		onLoad(opt) {
@@ -308,20 +328,23 @@
 			this.ext = this.$common.getExtStoreId();
 			if (this.userInfo) {
 				this.getData()
+				this.myPower();
+				this.showPower();
 			} else {
 				this.$common.automaticlogin().then(val => {
 					this.userInfo = this.$store.state.userInfo;
 					this.wxOpenData = this.$store.state.wxOpenData;
 					this.themeColor = uni.getStorageSync("themeColor");
 					this.getData()
+					this.myPower();
+					this.showPower();
 					if(!this.userInfo){
 						this.authorizShow=true
 					}
 				})
 			}
 
-			this.myPower();
-			this.showPower();
+			
 		},
 
 		methods: {
@@ -346,7 +369,7 @@
 					// CardMoneyC:false,//储值卡冲销
 					// ReceiptsMoney:false,//支付金额
 
-
+                    this.ShowSetting=res.data
 					var list = res.data
 					list.forEach((item, index) => {
 						if (item.fieldValue == 'FaultDescription') {
@@ -382,7 +405,29 @@
 						if (item.fieldValue == 'TotalDiscountMoney') {
 							this.TotalDiscountMoney = item.isChecked
 						}
-
+						if (item.fieldValue == 'brand') {
+							this.brandSetting = item.isChecked
+						}
+						if (item.fieldValue == 'spec') {
+							this.specSetting = item.isChecked
+						}
+						if (item.fieldValue == 'factoryNumber') {
+							this.factoryNumber = item.isChecked
+						}
+						if (item.fieldValue == 'goodsNumber') {
+							this.goodsNumber = item.isChecked
+						}
+						if (item.fieldValue == 'goodsPrice') {
+							this.goodsPrice = item.isChecked
+						}
+						if (item.fieldValue == 'itemWorkHours') {
+							this.itemWorkHours = item.isChecked
+						}
+						if (item.fieldValue == 'itemPrice') {
+							this.itemPrice = item.isChecked
+						}
+						
+                        
 
 
 					})
@@ -564,6 +609,19 @@
 </script>
 
 <style scoped>
+	.itemWorkHoursBox{
+		display: flex;
+		font-size: 24rpx;
+		font-weight: 400;
+		color: #999999;
+	}
+	.itemWorkHours{
+		padding-top: 15rpx;padding-bottom: 15rpx;
+		padding-right: 50rpx;
+	}
+	.itemPrice{
+		padding-top: 15rpx;padding-bottom: 15rpx;
+	}
 	.newboxTop{
 		display: flex;
 		padding-left: 20rpx;
@@ -878,7 +936,7 @@
 
 		font-size: 32rpx;
 		font-weight: 500;
-		color: #FF0000;
+		/* color: #FF0000; */
 		display: flex;
 
 		align-items: center;
@@ -918,6 +976,9 @@
     .goodsCostNumJsfs{
 		color: #333333;
 	}
+	.goodsCostNum3{
+		font-weight: bold;
+	}
 	.information {
 		width: 702rpx;
 		background: #FFFFFF;

+ 4 - 1
pages/user/historySpend.vue

@@ -167,7 +167,10 @@
 			this.userInfo=this.$store.state.userInfo;
 			this.ext=this.$common.getExtStoreId();
 			if(this.userInfo){
-				
+				this.myOrderCoupon()
+				this.myPower()
+				this.showPower()
+				this.getplateNumber()
 			}else{
 				this.$common.automaticlogin().then(val => {
 					this.userInfo=this.$store.state.userInfo;

+ 1 - 1
utils/request.js

@@ -10,7 +10,7 @@ const extConfig = uni.getExtConfigSync();
 console.log(extConfig)
 const baseUrl=extConfig.url+'/'
 
-//const baseUrl='http://192.168.0.131:20189/'
+//const baseUrl='http://192.168.0.132:20189/'
 //const baseUrl='https://store-api.qdbtl.cn/'
 //const baseUrl='https://apidms.66km.com/'