Bladeren bron

1.历史消费
2.评价

guo 2 jaren geleden
bovenliggende
commit
1f6c0da42a
4 gewijzigde bestanden met toevoegingen van 657 en 345 verwijderingen
  1. 10 20
      pages/user/appraise.vue
  2. 567 314
      pages/user/historyDetail.vue
  3. 79 11
      pages/user/historySpend.vue
  4. 1 0
      utils/request.js

+ 10 - 20
pages/user/appraise.vue

@@ -191,30 +191,22 @@
 					});
 					return false;
 				}
-				uni.chooseImage({
+				uni.chooseMedia({
+					mediaType: ['image'],
 					sourceType: ['album','camera'],
 					count:num-length, 
 					sizeType:['compressed'],
+					
+					camera: 'back',
 					success: (chooseImageRes) => {
-						const tempFilePaths = chooseImageRes.tempFilePaths;
-						/* uni.uploadFile({
-					            url: that.$request.baseUrl+'accompany/SuperCheckSheet/uploadFile', //仅为示例,非真实的接口地址
-					            filePath: tempFilePaths[0],
-					            name: 'file',
-					            formData: {
-					                'user': 'test'
-					            },
-					            success: (uploadFileRes) => {
-					                console.log(JSON.parse(uploadFileRes.data).data );
-									that.imgArr=that.imgArr.concat(JSON.parse(uploadFileRes.data).data) ;
-									
-					            }
-					        }); */
-						tempFilePaths.forEach(v => {
+						console.log('图片',chooseImageRes);
+						const tempFiles = chooseImageRes.tempFiles;
+						
+						tempFiles.forEach(v => {
 							console.log(that.$request.baseUrl + 'tuhuUploadFile');
 							uni.uploadFile({
 								url: that.$request.baseUrl + 'tuhuUploadFile',
-								filePath: v,
+								filePath: v.tempFilePath,
 								name: 'file',
 								formData: {
 									'user': 'test'
@@ -228,9 +220,7 @@
 								}
 							});
 						})
-						/* that.$http('accompany/SuperCheckSheet/uploadFile', tempFilePaths[0], 'POST').then(res => {
-							
-						}) */
+						
 					}
 				});
 			},

File diff suppressed because it is too large
+ 567 - 314
pages/user/historyDetail.vue


+ 79 - 11
pages/user/historySpend.vue

@@ -1,11 +1,44 @@
 <template>
 	<view class="box">
 		<view class="itemHistory" v-for="(item,index) in itemData" :key="index" @click="goDetail(item)">
-			<view class="time">{{item.time}}</view>
+			<view class="topBox">
+				<view class="dan">{{item.code}}</view>
+				
+				<!-- SheetType单据类型(1维修单 2销售单3洗车单4销售退货) -->
+				<view v-if="item.SheetType == 1">
+					<!-- 0待施工(已保存)1施工中(已派工)2已完工 3已质检 4 已作废 -->
+					<view class="danState" v-if="item.SheetState == 0">待施工</view>
+					<view class="danState" v-if="item.SheetState == 1">施工中</view>
+					<view class="danState" v-if="item.SheetState == 2">已完工</view>
+					<view class="danState" v-if="item.SheetState == 3">已质检</view>
+					<view class="danState" v-if="item.SheetState == 4">已作废</view>
+					
+				</view>
+				<view v-if="item.SheetType == 2">
+					<!-- 0待施工(已保存)1施工中(已派工)2已审核 3已质检 4 已作废 -->
+					<view class="danState" v-if="item.SheetState < 2 ">未审核</view>
+					<view class="danState" v-if="item.SheetState == 2">已审核</view>
+					<view class="danState" v-if="item.SheetState == 4">已作废</view>
+					
+					
+					
+				</view>
+				<view v-if="item.SheetType == 3">
+					<!-- 0待施工(已保存)1施工中(已派工)2已完工 3已质检 4 已作废 -->
+					<view class="danState" v-if="item.SheetState == 0">已保存</view>
+					<view class="danState" v-if="item.SheetState == 4">已作废</view>
+				</view>
+			</view>
+			
+			
 			<view class="carPlate">
-				<view class="plate">{{item.PlateNumber}}</view>
-				<view class="mileage" v-if="item.CurrentMileage>0">{{item.CurrentMileage}}km</view>
-			</view>
+				<view class="">
+					<view class="plate">{{item.PlateNumber}}</view>
+					<view class="mileage" v-if="item.CurrentMileage>0">{{item.CurrentMileage}}km</view>
+				</view>
+				<view v-if="ReceiptsMoney" class="price"><span style="font-size: 22rpx;">¥</span>{{item.money}}</view>
+			</view>
+			<view class="time">{{item.time}}</view>
 
 			<view class="shopName">{{item.ShopName}}</view>
 			
@@ -16,8 +49,8 @@
 				<view class="itemContent" v-if="item.listParts.length != 0" v-for="(v,i) in item.listParts">{{v.GoodsName}},</view>
 			</view>
 			
-			<view v-if="((appraise == true) && ((item.lastDay <= 30 && item.EvaluateState == 0) || item.EvaluateState == 1))" class="bottom">
-				<view v-if="(item.EvaluateState == 0) && (item.lastDay <= 30) && appraise == true" @click.stop="goAppraise(item)" class="ping">评价</view>
+			<view v-if="((item.PayState == 2) && (appraise == true) && ((item.lastDay <= 30 && item.EvaluateState == 0) || item.EvaluateState == 1))" class="bottom">
+				<view v-if="(item.EvaluateState == 0) && (item.lastDay <= 30) && appraise == true && item.PayState == 2" @click.stop="goAppraise(item)" class="ping">评价</view>
 				<view v-if="item.EvaluateState == 1" @click.stop="goAppraiseDetail(item)" class="kan">查看评价</view>
 			</view>
 		</view>
@@ -43,17 +76,34 @@
 				itemData: [],
 				noMoreShow: false,
 				appraise:false,
-				
+				ReceiptsMoney:false,//支付金额
 			}
 		},
 		onLoad() {
 			this.page = 1
 			this.myOrderCoupon()
 			this.myPower()
-			
+			this.showPower()
 		},
 		methods: {
+			//显示权限
+			showPower() {
+				this.$http('openweiXinCardInfoController/getShowSetting', {
 			
+				}, 'GET').then(res => {
+					var list = res.data
+					list.forEach((item, index) => {
+						
+						if (item.fieldValue == 'ReceiptsMoney') {
+							this.ReceiptsMoney = item.isChecked
+						}
+						
+						
+						
+					})
+					
+				})
+			},
 			//评价权限
 			myPower() {
 				this.$http('openMiniEvaluate/getEvaluateSetting', {
@@ -203,8 +253,22 @@
 		background-color: #FFFFFF;
 		border-radius: 10rpx;
 
+	}
+	.topBox{
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+	}
+	.dan {
+		font-size: 24rpx;
+		
+		color: #999999;
+	}
+	.danState{
+		font-size: 24rpx;
+		
+		color: #FF4F00;
 	}
-
 	.time {
 		font-size: 24rpx;
 		color: #999999;
@@ -214,7 +278,7 @@
 		margin: 20rpx 0rpx 15rpx;
 		display: flex;
 		align-items: center;
-		justify-content: flex-start;
+		justify-content: space-between;
 	}
 
 	.plate {
@@ -232,7 +296,11 @@
 		border-radius: 4rpx;
 		height: 36rpx;
 	}
-
+	.price{
+		font-size: 32rpx;
+		font-weight: 500;
+		color: #FF0000;
+	}
 	.itemN {
 		margin-top: 15rpx;
 		display: flex;

+ 1 - 0
utils/request.js

@@ -9,6 +9,7 @@ import $store from '../store'
 const extConfig = uni.getExtConfigSync();		
 console.log(extConfig)
 const baseUrl=extConfig.url+'/'
+// const baseUrl='http://192.168.0.124:20187/'
 //wx2c6f04c0dcd15984正式  wx33053a645546ec31
 //测试地址
 //const webUrl = 'http://dms.32che.cn/'