wangchao před 2 roky
rodič
revize
f2720fc1fe

+ 4 - 1
common/helper.js

@@ -4,6 +4,7 @@ const detailData = {}
 const erpWarehouse = {}
 let rolesList = []
 const gjList = []
+const dtList = []
 const now = Date.now || function() {
 	return new Date().getTime();
 };
@@ -271,5 +272,7 @@ export default {
 	convertCurrency,
 	filterUrban,
 	filterArea,
-	gjList
+	gjList,
+	dtList,
+	fUN_AmapLocation
 }

+ 3 - 3
config/index.js

@@ -5,11 +5,11 @@ const dev = {
 	// baseUrlNew: 'http://192.168.1.118:8090/',
 	// baseUrlNew: 'http://192.168.1.114:8090/',
 	// baseUrlNew: 'http://192.168.1.122:8090/',
-	baseUrlNew: 'http://192.168.110.138:8090/',
+	baseUrlNew: 'http://192.168.110.82:8099/',
 	// baseUrlNew: 'http://192.168.110.202:8090/',
 	// baseUrlNew: 'http://192.168.110.138:8090/',
 	// 上传图片的
-	baseUrlNew1: 'http://192.168.110.138:9527/',
+	// baseUrlNew1: 'http://192.168.110.82:9527/',
 	// baseUrlNew1: 'https://api2.eliangeyun.com/',
 	// baseUrlNew: 'http://api1.eliangeyun.com/',
 	h5Appid: 'wxb66b599f7f61b46f',
@@ -18,4 +18,4 @@ const dev = {
 
 export function def() {
 	return dev
-}
+}

+ 12 - 11
manifest.json

@@ -174,7 +174,8 @@
                         "com.apple.developer.associated-domains" : [ "app.zthymaoyi.com" ]
                     }
                 },
-                "idfa" : false
+                "idfa" : false,
+                "dSYMs" : false
             },
             "splashscreen" : {
                 "androidStyle" : "default",
@@ -190,10 +191,10 @@
             "SQLite" : {},
             "Push" : {},
             "Maps" : {},
-            "LivePusher" : {},
             "VideoPlayer" : {},
             "Bluetooth" : {},
-            "Geolocation" : {}
+            "Geolocation" : {},
+            "LivePusher" : {}
         },
         "splashscreen" : {
             "waiting" : false
@@ -202,17 +203,17 @@
             "immersed" : false
         },
         "nativePlugins" : {
-            "service-keep-live" : {
+            "FUN-AmapLocation" : {
                 "__plugin_info__" : {
-                    "name" : "【推荐】安卓保活插件 防杀  增强保活,黑屏防睡眠(测试黑屏传数据一天多没问题)",
-                    "description" : "如果你的应用希望能够一直在后台运行而不被系统自动杀死的话,可以尝试一下。群485147231(已满) 598812409",
+                    "name" : "持续定位、后台定位、高德定位、保活 - [试用版,仅用于自定义调试基座]",
+                    "description" : "持续定位、后台定位、高德定位, 后台保活,购前先测是否符合需求[反馈819589789@qq.com] ",
                     "platforms" : "Android",
-                    "url" : "https://ext.dcloud.net.cn/plugin?id=3422",
-                    "android_package_name" : "uni.UNI7297DA2",
-                    "ios_bundle_id" : "uni.UNI7297DA2",
+                    "url" : "https://ext.dcloud.net.cn/plugin?id=2018",
+                    "android_package_name" : "",
+                    "ios_bundle_id" : "",
                     "isCloud" : true,
-                    "bought" : 1,
-                    "pid" : "3422",
+                    "bought" : 0,
+                    "pid" : "2018",
                     "parameters" : {}
                 }
             }

+ 210 - 241
pages.json

@@ -209,7 +209,7 @@
 				"enablePullDownRefresh": true,
 				"navigationBarTitleText": "销售订单详情"
 			}
-		},{
+		}, {
 			"path": "pages/task/audit_info",
 			"style": {
 				"enablePullDownRefresh": true,
@@ -859,7 +859,7 @@
 				"enablePullDownRefresh": false
 			}
 
-		}, 
+		},
 		{
 			"path": "pages/erpbusiness/sm/sm",
 			"style": {
@@ -875,7 +875,7 @@
 				"enablePullDownRefresh": false
 			}
 
-		}, 
+		},
 		{
 			"path": "pages/erpbusiness/acquisitionInspection/acquisitionInspection",
 			"style": {
@@ -1056,29 +1056,29 @@
 				"enablePullDownRefresh": false
 			}
 
-		}, 
+		},
 		{
 			"path": "pages/erp/deliveryfeedback/otherfeedback",
 			"style": {
 				"navigationBarTitleText": "发货反馈详情",
 				"enablePullDownRefresh": false
 			}
-		
-		},{
+
+		}, {
 			"path": "pages/erp/receivingfeedback/details",
 			"style": {
 				"navigationBarTitleText": "收货反馈详情",
 				"enablePullDownRefresh": false
 			}
 
-		},{
+		}, {
 			"path": "pages/erp/receivingfeedback/otherfeedback",
 			"style": {
 				"navigationBarTitleText": "收货反馈详情",
 				"enablePullDownRefresh": false
 			}
 
-		},{
+		}, {
 			"path": "pages/erp/openService/openService",
 			"style": {
 				"navigationBarTitleText": "开通服务",
@@ -1120,14 +1120,14 @@
 				"enablePullDownRefresh": false
 			}
 
-		}, 
+		},
 		{
 			"path": "pages/task/audit/tradeServices_audit",
 			"style": {
 				"navigationBarTitleText": "贸易服务审核",
 				"enablePullDownRefresh": false
 			}
-		
+
 		},
 		{
 			"path": "pages/task/audit/tradeServices_audit_approval",
@@ -1135,8 +1135,8 @@
 				"navigationBarTitleText": "贸易服务详情",
 				"enablePullDownRefresh": false
 			}
-		
-		},{
+
+		}, {
 			"path": "pages/task/audit/freight_settlement_approval",
 			"style": {
 				"navigationBarTitleText": "运费结算审核",
@@ -1178,7 +1178,7 @@
 				"navigationBarTitleText": "费用支出审核",
 				"enablePullDownRefresh": false
 			}
-		},{
+		}, {
 			"path": "pages/task/audit/charge_against_revenue_detail",
 			"style": {
 				"navigationBarTitleText": "费用支出详情",
@@ -1270,18 +1270,17 @@
 						"autoBackButton": false,
 						"backgroundColor": "#fff",
 						"buttons": [{
-							"fontSrc": "/pageC/static/car/iconfont.ttf",
-							"float": "right",
-							"text": "\ue639",
-							"fontSize": "18px"
-						}
-						,
-						{
-							"fontSrc": "pageC/static/iconfont/iconfont.ttf",
-							"float": "left",
-							"text": "\ue6f2",
-							"fontSize": "20px"
-						}
+								"fontSrc": "/pageC/static/car/iconfont.ttf",
+								"float": "right",
+								"text": "\ue639",
+								"fontSize": "18px"
+							},
+							{
+								"fontSrc": "pageC/static/iconfont/iconfont.ttf",
+								"float": "left",
+								"text": "\ue6f2",
+								"fontSize": "20px"
+							}
 						]
 					}
 				}
@@ -1316,223 +1315,193 @@
 				"enablePullDownRefresh": false
 			}
 
+		}, {
+			"path": "pages/user/contractLook/inventoryCost",
+			"style": {
+				"navigationBarTitleText": "库存成本",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/task/audit/collection_business_approval",
+			"style": {
+				"navigationBarTitleText": "代收业务记录审核",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/task/audit/collection_business_details",
+			"style": {
+				"navigationBarTitleText": "代收业务记录查看",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/user/contractLook/position",
+			"style": {
+				"navigationBarTitleText": "仓位库存成本",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/clock/the_clock",
+			"style": {
+				"navigationBarTitleText": "打卡",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/clock/the_clock_record",
+			"style": {
+				"navigationBarTitleText": "打卡记录",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/clock/supp_clock",
+			"style": {
+				"navigationBarTitleText": "补卡",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/leave/the_leave",
+			"style": {
+				"navigationBarTitleText": "请假",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/leave/the_leave_record",
+			"style": {
+				"navigationBarTitleText": "请假记录",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/fuelfilling/the_fuel_filling",
+			"style": {
+				"navigationBarTitleText": "加油",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/fuelfilling/track_addition",
+			"style": {
+				"navigationBarTitleText": "添加轨迹",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/fuelfilling/apply_for_reimbursement",
+			"style": {
+				"navigationBarTitleText": "添加申请",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/fuelfilling/apply_see_reimbursement",
+			"style": {
+				"navigationBarTitleText": "查看申请",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/shortDistance/short_distance_record",
+			"style": {
+				"navigationBarTitleText": "短途记录",
+				"enablePullDownRefresh": false,
+				"titleNView": {
+					"autoBackButton": false,
+					"buttons": [{
+						"float": "right",
+						"text": "批量请款",
+						"fontSize": "18px",
+						"fontWeight": "700"
+					}]
+				}
+
+			}
+
+		}, {
+			"path": "pages/shortDistance/short_track_addition",
+			"style": {
+				"navigationBarTitleText": "短途添加轨迹",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/task/audit/supp_clock_approve",
+			"style": {
+				"navigationBarTitleText": "补卡审核",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/task/audit/supp_clock_details",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/task/audit/leave_approve",
+			"style": {
+				"navigationBarTitleText": "请假审核",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/task/audit/leave_details",
+			"style": {
+				"navigationBarTitleText": "请假详情",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/oa_office/the_oaOffice",
+			"style": {
+				"navigationBarTitleText": "OA办公",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/reimbursement/the_reimbursement",
+			"style": {
+				"navigationBarTitleText": "报销",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/reimbursement/request_funds",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/reimbursement/selectWarehouse",
+			"style": {
+				"navigationBarTitleText": "选择仓库",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/reimbursement/selectContract",
+			"style": {
+				"navigationBarTitleText": "选择合同",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/reimbursement/get_request_funds",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
 		}
-	    ,{
-            "path" : "pages/user/contractLook/inventoryCost",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "库存成本",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/task/audit/collection_business_approval",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "代收业务记录审核",
-                "enablePullDownRefresh": false
-            }
-            
-        } ,{
-            "path" : "pages/task/audit/collection_business_details",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "代收业务记录查看",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/user/contractLook/position",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "仓位库存成本",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/clock/the_clock",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "打卡",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/clock/the_clock_record",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "打卡记录",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/clock/supp_clock",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "补卡",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/leave/the_leave",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "请假",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/leave/the_leave_record",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "请假记录",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/fuelfilling/the_fuel_filling",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "加油",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/fuelfilling/track_addition",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "添加轨迹",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/fuelfilling/apply_for_reimbursement",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "添加申请",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/shortDistance/short_distance_record",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "短途记录",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/shortDistance/short_track_addition",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "短途添加轨迹",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/task/audit/supp_clock_approve",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "补卡审核",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/task/audit/supp_clock_details",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/task/audit/leave_approve",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "请假审核",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/task/audit/leave_details",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "请假详情",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/oa_office/the_oaOffice",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "OA办公",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/reimbursement/the_reimbursement",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "报销",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/reimbursement/request_funds",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/reimbursement/selectWarehouse",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "选择仓库",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/reimbursement/selectContract",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "选择合同",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/reimbursement/get_request_funds",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-    ],
+	],
 	"subpackages": [{
 			"root": "pageA",
 			"pages": [{

+ 29 - 18
pages/clock/the_clock.vue

@@ -29,14 +29,11 @@
 		<view>
 			<u-button type="primary" class="submit" hover-class="none" @click="submit">提交</u-button>
 		</view>
-		<!-- <view class="footer">
-			<view @click='clockRecord' class="button">记录</view>
-			<view @click='submit' class="button">提交</view>
-		</view> -->
+
 		<u-toast ref="uToast" />
 		<view class="bottom-btn">
 			<u-button type="primary" class="submit" hover-class="none" @click="clockRecord">记录</u-button>
-			
+
 		</view>
 	</view>
 </template>
@@ -61,12 +58,17 @@
 			}
 		},
 		onLoad() {
-			if(!uni.getStorageSync("clockwerehouse")){
+			console.log(uni.getStorageSync("clockwerehouse"))
+			if (!uni.getStorageSync("clockwerehouse")) {
+				uni.showLoading({
+					mask: true,
+					title: '加载中'
+				})
 				this.getWarehouse()
-			}else{
-				this.detailData.targetLocation=uni.getStorageSync("clockwerehouse")
+			} else {
+				this.detailData.targetLocation = uni.getStorageSync("clockwerehouse")
 			}
-			
+
 			// this.getLocation()
 		},
 		methods: {
@@ -81,8 +83,14 @@
 					compId: uni.getStorageSync("pcUserInfo").compId,
 					warehouseType: '1'
 				}).then(res => {
+					uni.hideLoading()
 					if (res.data.data.length != 0) {
 						that.warehouseBaseInfoList = res.data.data
+						that.warehouseBaseInfoList.unshift({
+							warehouseName: '黑龙江中天昊元贸易有限公司',
+							warehousePositioning: '40.63070,122.22580'
+
+						})
 						uni.getLocation({
 							type: 'gcj02',
 							geocode: true,
@@ -98,7 +106,8 @@
 											0],
 										that.warehouseBaseInfoList[0].warehousePositioning.split(
 											',')[1], that.lat2, that.lng2)
-											that.detailData.targetLocation = that.warehouseBaseInfoList[0].warehouseName
+									that.detailData.targetLocation = that.warehouseBaseInfoList[0]
+										.warehouseName
 								}
 							},
 							fail: function(req) {
@@ -110,12 +119,12 @@
 				})
 			},
 			targetLPicker(e) {
-				uni.setStorageSync("clockwerehouse",this.warehouseBaseInfoList[e[0]].warehouseName)
+				uni.setStorageSync("clockwerehouse", this.warehouseBaseInfoList[e[0]].warehouseName)
 				this.detailData.targetLocation = this.warehouseBaseInfoList[e[0]].warehouseName
 				this.clockDistance = this.utils.getDistance(this.warehouseBaseInfoList[e[0]].warehousePositioning.split(
 						',')[0],
 					this.warehouseBaseInfoList[e[0]].warehousePositioning.split(',')[1], this.lat2, this.lng2)
-					
+
 			},
 			submit() {
 				if (!this.typevalue) {
@@ -139,10 +148,10 @@
 							that.detailData.phone = uni.getStorageSync('pcUserInfo').userMobilePhone
 							that.detailData.empName = uni.getStorageSync('userInfo').userName
 							that.detailData.clockType = that.typevalue
-							if(that.clockDistance.indexOf("km") > -1){
-								that.detailData.clockDistance = that.clockDistance.replace("km","")*1000
-							}else{
-								that.detailData.clockDistance = that.clockDistance.replace("m","")
+							if (that.clockDistance.indexOf("km") > -1) {
+								that.detailData.clockDistance = that.clockDistance.replace("km", "") * 1000
+							} else {
+								that.detailData.clockDistance = that.clockDistance.replace("m", "")
 							}
 							console.log(that.detailData)
 							that.$api.doRequest('post', '/clockInfo/api/addClock', that.detailData)
@@ -163,7 +172,7 @@
 					url: '/pages/clock/the_clock_record'
 				})
 			},
-		},
+		}
 	}
 </script>
 
@@ -224,7 +233,7 @@
 
 	}
 
-/* 	.footer {
+	/* 	.footer {
 		background: #fff;
 		position: fixed;
 		bottom: 0;
@@ -247,6 +256,7 @@
 		background: #22C572;
 		border-radius: 10rpx;
 	}
+
 	.bottom-btn {
 		padding: 30rpx;
 		background: #FFFFFF;
@@ -256,6 +266,7 @@
 		display: flex;
 		z-index: 9999;
 	}
+
 	.buns_item {
 		display: flex;
 		padding: 80rpx 0 50rpx 0;

+ 10 - 23
pages/fuelfilling/apply_for_reimbursement.vue

@@ -14,7 +14,7 @@
 						<view class="flex align-center">
 							<view class="item1">
 								<view class="ssx">{{$helper.getProvinceAbbreviation(detailData.originProvince)}}</view>
-								<view class="level2-title" style="font-size: 5px;">
+								<view class="level2-title">
 									{{$helper.filterUrban(detailData.originCity)}}
 									{{$helper.filterArea(detailData.originArea)}}
 								</view>
@@ -33,7 +33,7 @@
 				</view>
 			</view>
 			<view class='wrap1' v-for="(item , index) in fillingDetail.fillingDetailInfoList" :Key="index">
-				<view class="tit" style="font-size: 16px;">加油-{{index+1}}</view>
+				<view class="tit">加油-{{index+1}}</view>
 				<image src="../../static/img/sign/jian@2x.png" class="eliminate1" @click="delApply(index)">
 				</image>
 				<image src="../../static/img/sign/jia@2x.png" class="eliminate2" @click="addApply(index)">
@@ -60,9 +60,10 @@
 				</view>
 				<view class="c-row">
 					<view class="title">加油凭证</view>
-					<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :size-type="['compressed']"
-						@on-success="getImgUrl($event,index)" @on-error="onError" @on-remove="onRemove($event,index)"
-						@on-uploaded="isAdd = true" :before-upload="filterFileType" @on-progress="onProgress"></upload>
+					<upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
+						:size-type="['compressed']" @on-success="getImgUrl($event,index)" @on-error="onError"
+						@on-remove="onRemove($event,index)" @on-uploaded="isAdd = true" :before-upload="filterFileType"
+						@on-progress="onProgress"></upload>
 				</view>
 			</view>
 			<view class="footer">
@@ -253,7 +254,6 @@
 	.title_b {
 		margin: 20rpx 20rpx 0rpx 20rpx;
 		padding: 20rpx 10rpx 20rpx 10rpx;
-		font-size: 18px;
 		font-weight: 550;
 	}
 
@@ -268,9 +268,7 @@
 		position: relative;
 	}
 
-	.level2-title {
-		font-size: 14rpx;
-	}
+	.level2-title {}
 
 	.level2-title {
 		font-weight: 700;
@@ -297,7 +295,6 @@
 		width: 20px;
 		height: 20px;
 		background: linear-gradient(180deg, #C8D7E5 0%, #AFC1D6 100%);
-		font-size: 13px;
 		font-family: PingFangSC-Medium, PingFang SC;
 		font-weight: 500;
 		color: #FFFFFF;
@@ -322,7 +319,6 @@
 		color: #303133;
 		line-height: 40rpx;
 		text-align: right;
-		padding-right: 20rpx;
 
 		.item1,
 		.item3 {
@@ -348,20 +344,16 @@
 
 	.align-center {
 		align-items: center;
-		margin-left: 64px;
-		width: 83%;
+		justify-content: flex-end;
 	}
 
 	.wrap1 {
-		font-size: 14px;
 		background: #fff;
 		margin: 10px;
 		border-radius: 15px 10px;
 		margin-top: 18px;
 
-		input {
-			font-size: 14px;
-		}
+		input {}
 
 		.tit {
 			margin-left: 14px;
@@ -373,7 +365,6 @@
 			max-width: 50%;
 			width: 20px;
 			height: 20px;
-			font-size: 13px;
 			font-family: PingFangSC-Medium, PingFang SC;
 			font-weight: 500;
 			border-radius: 50%;
@@ -389,7 +380,6 @@
 			max-width: 50%;
 			width: 20px;
 			height: 20px;
-			font-size: 13px;
 			font-family: PingFangSC-Medium, PingFang SC;
 			font-weight: 500;
 			border-radius: 50%;
@@ -407,15 +397,12 @@
 	}
 
 	.wrap {
-		font-size: 14px;
 		background: #fff;
 		margin: 10px;
 		border-radius: 15px 10px;
 		margin-top: 18px;
 
-		input {
-			font-size: 14px;
-		}
+		input {}
 
 		>.title {
 			padding: 10px 16px;

+ 446 - 0
pages/fuelfilling/apply_see_reimbursement.vue

@@ -0,0 +1,446 @@
+<template>
+	<view class="center">
+		<view>
+			<view class='wrap'>
+				<view class="c-row">
+					<view class="title">车牌号</view>
+					<view class="con-list">
+						{{detailData.carNo}}
+					</view>
+				</view>
+				<view class="c-row">
+					<view class="title">行程轨迹</view>
+					<view class="con-list">
+						<view class="flex align-center">
+							<view class="item1">
+								<view class="ssx">{{$helper.getProvinceAbbreviation(detailData.originProvince)}}</view>
+								<view class="level2-title">
+									{{$helper.filterUrban(detailData.originCity)}}
+									{{$helper.filterArea(detailData.originArea)}}
+								</view>
+							</view>
+							<image class="jt-icon item2" src="@/static/images/fuel/jt.png" mode='widthFix'>
+							</image>
+							<view class="item3">
+								<view class="ssx">{{$helper.getProvinceAbbreviation(detailData.destinationProvince)}}
+								</view>
+								<view class="level2-title">{{$helper.filterUrban(detailData.destinationCity)}}
+									{{$helper.filterArea(detailData.destinationArea)}}
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class='wrap1' v-for="(item , index) in detailData.fillingDetailInfoList" :Key="index">
+				<view class="tit">加油-{{index+1}}</view>
+				<view class="c-row">
+					<view class="title">油耗(升)</view>
+					<view class="con-list">
+						{{item.oilConsumption}}
+					</view>
+				</view>
+				<view class="c-row">
+					<view class="title">当前油价(元/升)</view>
+					<view class="con-list">
+						{{item.currentOilPrice}}
+					</view>
+				</view>
+				<view class="c-row">
+					<view class="title">计算金额(元)</view>
+					<view class="con-list">
+						{{item.currentConsumption}}
+					</view>
+				</view>
+				<view class="c-row" style="justify-content: space-between;">
+					<view class="title">加油凭证</view>
+					<image :src="item.addressUrl" mode="widthFix" style="width: 200rpx;" v-if='item.addressUrl'
+						@click="previewImage(item.addressUrl)"></image>
+				</view>
+			</view>
+			<view class="footer">
+				<view class="c-row">
+					<view class="title">总油耗(L)</view>
+					<view class="con-list">
+						<input :disabled="true" v-model='detailData.tfc' placeholder="不可编辑,自动计算" type="digit"></input>
+					</view>
+				</view>
+				<view class="c-row">
+					<view class="title">合计金额(元)</view>
+					<view class="con-list">
+						<input :disabled="true" v-model='detailData.totalCost' placeholder="不可编辑,自动计算"
+							type="digit"></input>
+					</view>
+				</view>
+				<!-- <view @click='submitApply' class="button">提交申请</view> -->
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import upload from '@/components/upload.vue';
+	export default {
+		components: {
+			upload,
+		},
+		data() {
+			return {
+				detailData: {},
+				action: this.$uploadUrl,
+				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
+				btnLoading: false, //防止重复点击
+				isAdd: true,
+				tfc: "",
+				totalCost: ""
+			}
+		},
+		onLoad(options) {
+			this.id = options.id
+			this.fillingDetail.fillingDetailInfoList[0].fillingId = this.id
+		},
+		onShow() {
+			var that = this
+			if (this.id) {
+				this.seeInfo()
+			}
+		},
+		methods: {
+			previewImage(src) {
+				uni.previewImage({
+					urls: [src],
+					longPressActions: {
+						itemList: ['发送给朋友', '保存图片', '收藏'],
+						success: function(data) {
+							console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
+						},
+						fail: function(err) {
+							console.log(err.errMsg);
+						}
+					}
+				});
+			},
+			seeInfo() {
+				this.$api.doRequest('get', '/fuelFillingInfo/getFilling', {
+					id: this.id
+				}).then(res => {
+					if (res.data.code == 200) {
+						this.detailData = res.data.data
+					}
+				})
+			},
+			getImgUrl(res, index) {
+				this.fillingDetail.fillingDetailInfoList[index].addressUrl.push(res)
+				// if(this.fillingDetail.fillingDetailInfoList[index].addressUrl){
+				// 	this.fillingDetail.fillingDetailInfoList[index].addressUrl = this.fillingDetail.fillingDetailInfoList[index].addressUrl +","+res
+				// }else{
+				// 	this.fillingDetail.fillingDetailInfoList[index].addressUrl = res
+				// }
+
+				// console.log(res)
+				// console.log('------------res-----------')
+			},
+			onError(error) {
+				alert(error)
+				console.log('------------error-----------')
+				console.log(error)
+			},
+			onProgress(e) {
+				console.log(e)
+			},
+			onRemove(index, num) {
+				this.fillingDetail.fillingDetailInfoList[num].addressUrl.splice(index, 1)
+			},
+			filterFileType(index, lists) {
+				if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
+					lists.splice(index, 1);
+					// 当前文件不支持
+					uni.showModal({
+						title: '暂不支持当前图片类型',
+						showCancel: false
+					});
+				} else {
+					this.isAdd = false;
+				}
+			},
+			calculate(index) {
+				this.fillingDetail.fillingDetailInfoList[index].currentConsumption = (this.fillingDetail
+						.fillingDetailInfoList[index].oilConsumption * this.fillingDetail.fillingDetailInfoList[index]
+						.currentOilPrice)
+					.toFixed(2)
+				this.tfc = ""
+				this.totalCost = ""
+				for (let i = 0; i < this.fillingDetail.fillingDetailInfoList.length; i++) {
+					this.tfc = (Number(this.tfc) + Number(this.fillingDetail.fillingDetailInfoList[i].oilConsumption))
+						.toFixed(2)
+					this.totalCost = (Number(this.totalCost) + Number(this.fillingDetail.fillingDetailInfoList[i]
+						.currentConsumption)).toFixed(2)
+					this.$forceUpdate()
+				}
+			},
+			delApply(index) {
+				this.fillingDetail.fillingDetailInfoList.splice(index, 1)
+			},
+			addApply() {
+				this.fillingDetail.fillingDetailInfoList.push({
+					oilConsumption: "",
+					currentOilPrice: "",
+					currentConsumption: "",
+					addressUrl: [],
+					compId: uni.getStorageSync('pcUserInfo').compId,
+					commonId: uni.getStorageSync('pcUserInfo').userId,
+					fillingId: this.id
+				})
+			},
+			submitApply() {
+				var that = this
+				uni.showModal({
+					content: "确定提交申请信息?",
+					showCancel: true,
+					confirmText: '提交',
+					success: function(res) {
+						if (res.confirm) {
+							that.fillingDetail.tfc = that.tfc
+							that.fillingDetail.totalCost = that.totalCost
+							for (let i = 0; i < that.fillingDetail.fillingDetailInfoList.length; i++) {
+								that.fillingDetail.fillingDetailInfoList[i].addressUrl = that.fillingDetail
+									.fillingDetailInfoList[i].addressUrl.toString()
+							}
+							that.$api.doRequest('post', '/fillingDetailInfo/api/addFillingDetail',
+									that.fillingDetail
+								)
+								.then(res => {
+									if (res.data.code == 200) {
+										that.$api.msg('提交成功')
+										uni.navigateTo({
+											url: '/pages/fuelfilling/the_fuel_filling'
+										})
+									} else {
+										that.$api.msg('提交失败')
+									}
+								})
+						}
+					}
+				})
+			},
+		}
+	}
+</script>
+
+<style lang='scss' scoped>
+	.center {
+		padding-bottom: 330rpx;
+	}
+
+	page {
+		background: #F5F6FA;
+	}
+
+	.title_b {
+		margin: 20rpx 20rpx 0rpx 20rpx;
+		padding: 20rpx 10rpx 20rpx 10rpx;
+		font-weight: 550;
+	}
+
+	.c-row {
+		display: -webkit-box;
+		display: -webkit-flex;
+		display: flex;
+		-webkit-box-align: center;
+		-webkit-align-items: center;
+		align-items: center;
+		padding: 10rpx 30rpx;
+		position: relative;
+	}
+
+	.level2-title {}
+
+	.level2-title {
+		font-weight: 700;
+		color: #000000;
+	}
+
+	.jt-icon {
+		position: relative;
+		top: 6rpx;
+		width: 60rpx;
+		margin: 0 20rpx;
+
+	}
+
+	.xf-iamge {
+		width: 74rpx;
+		height: 43rpx;
+		position: absolute;
+		top: -20rpx;
+		right: 0;
+	}
+
+	.ssx {
+		width: 20px;
+		height: 20px;
+		background: linear-gradient(180deg, #C8D7E5 0%, #AFC1D6 100%);
+		font-family: PingFangSC-Medium, PingFang SC;
+		font-weight: 500;
+		color: #FFFFFF;
+		border-radius: 50%;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		margin-right: 5px;
+	}
+
+	.con-list {
+		-webkit-box-flex: 1;
+		-webkit-flex: 1;
+		flex: 1;
+		display: -webkit-box;
+		display: -webkit-flex;
+		display: flex;
+		-webkit-box-orient: vertical;
+		-webkit-box-direction: normal;
+		-webkit-flex-direction: column;
+		flex-direction: column;
+		color: #303133;
+		line-height: 40rpx;
+		text-align: right;
+
+		.item1,
+		.item3 {
+			// width: 40%;
+			display: flex;
+
+			.text {
+				text-overflow: ellipsis;
+				overflow: hidden;
+				white-space: nowrap;
+			}
+
+		}
+
+		.item1 .text {
+			text-align: left;
+		}
+
+		.item3 .text {
+			text-align: right;
+		}
+	}
+
+	.align-center {
+		align-items: center;
+		justify-content: flex-end;
+	}
+
+	.wrap1 {
+		background: #fff;
+		margin: 10px;
+		border-radius: 15px 10px;
+		margin-top: 18px;
+
+		input {}
+
+		.tit {
+			margin-left: 14px;
+			width: 47px;
+			padding-top: 10px;
+		}
+
+		.eliminate1 {
+			max-width: 50%;
+			width: 20px;
+			height: 20px;
+			font-family: PingFangSC-Medium, PingFang SC;
+			font-weight: 500;
+			border-radius: 50%;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			margin-right: 5px;
+			margin-top: -20px;
+			margin-left: 73px;
+		}
+
+		.eliminate2 {
+			max-width: 50%;
+			width: 20px;
+			height: 20px;
+			font-family: PingFangSC-Medium, PingFang SC;
+			font-weight: 500;
+			border-radius: 50%;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			margin-right: 5px;
+			margin-top: -20px;
+			margin-left: 100px;
+		}
+
+		.upload {
+			margin-left: 157px;
+		}
+	}
+
+	.wrap {
+		background: #fff;
+		margin: 10px;
+		border-radius: 15px 10px;
+		margin-top: 18px;
+
+		input {}
+
+		>.title {
+			padding: 10px 16px;
+		}
+
+	}
+
+	.footer {
+		background: #fff;
+		position: fixed;
+		bottom: 0;
+		width: 100%;
+		padding: 20px 10px;
+		z-index: 10;
+
+		.button {
+			background: #4089ff;
+			width: 90%;
+			margin: 250px auto;
+			padding: 10px;
+			color: #fff;
+			text-align: center;
+			border-radius: 30px;
+			margin-top: 10px;
+		}
+	}
+
+
+	.buns_item {
+		display: flex;
+		padding: 80rpx 0 50rpx 0;
+		justify-content: space-around;
+	}
+
+	.but_css {
+		background: #22C572;
+		width: 40%;
+		padding: 20rpx;
+		color: #fff;
+		text-align: center;
+		border-radius: 20rpx;
+	}
+
+	/deep/.u-radio-group {
+		flex-direction: row-reverse;
+	}
+
+	.no-boder {
+		border: 0;
+	}
+
+	.textarea {
+		background: #F9F9FA;
+		border: 1px solid #EEEEEE;
+	}
+</style>

+ 109 - 58
pages/fuelfilling/the_fuel_filling.vue

@@ -14,99 +14,127 @@
 				</view>
 			</view>
 		</view>
-		<view v-for="(item,index) in fuelFilling" :key="index" @click="getInfo(item)">
-			<view class="good-list">
-				<view style="padding: 0 35rpx 20rpx 35rpx;position: relative;">
-					<view class="flex top">
-						<view class="flex left">
-							<view class="item1">
-								<view class="ssx">{{$helper.getProvinceAbbreviation(item.originProvince)}}</view>
-								<view class="level2-title" style="font-size: 14px;">
-									{{$helper.filterUrban(item.originCity)}}
-									{{$helper.filterArea(item.originArea)}}
+		<mescroll-body ref="mescrollRef" :down="downOption" @down="downCallback" @up="upCallback">
+			<view v-for="(item,index) in fuelFilling" :key="index" @click.stop="getInfo(item)">
+				<view class="good-list">
+					<view style="padding: 0 35rpx 20rpx 35rpx;position: relative;">
+						<view class="flex top">
+							<view class="flex left">
+								<view class="item1">
+									<view class="ssx">{{$helper.getProvinceAbbreviation(item.originProvince)}}</view>
+									<view class="level2-title" style="font-size: 14px;">
+										{{$helper.filterUrban(item.originCity)}}
+										{{$helper.filterArea(item.originArea)}}
+									</view>
+								</view>
+								<image class="jt-icon item2" src="@/static/images/fuel/jt.png" mode='widthFix'>
+								</image>
+								<view class="item3">
+									<view class="ssx">{{$helper.getProvinceAbbreviation(item.destinationProvince)}}
+									</view>
+									<view class="level2-title">{{$helper.filterUrban(item.destinationCity)}}
+										{{$helper.filterArea(item.destinationArea)}}
+									</view>
 								</view>
 							</view>
-							<image class="jt-icon item2" src="@/static/images/fuel/jt.png" mode='widthFix'>
-							</image>
-							<view class="item3">
-								<view class="ssx">{{$helper.getProvinceAbbreviation(item.destinationProvince)}}</view>
-								<view class="level2-title">{{$helper.filterUrban(item.destinationCity)}}
-									{{$helper.filterArea(item.destinationArea)}}
+							<view class="flex">
+								<view class="audit1" v-if="item.travelStatus == '已开始'">已开始</view>
+								<view class="audit2" v-if="item.travelStatus == '已结束'">{{item.status?item.status:'已结束'}}
 								</view>
+								<view class="audit3" v-if="item.travelStatus == '已报销'">已报销</view>
 							</view>
 						</view>
-						<view class="flex">
-							<view class="audit1" v-if="item.travelStatus == '已开始'">已开始</view>
-							<view class="audit2" v-if="item.travelStatus == '已结束'">已结束</view>
-							<view class="audit3" v-if="item.travelStatus == '已报销'">已报销</view>
+						<view class="car-info">
+							<view class="car-num">车牌号 : {{item.carNo}}</view>
+							<view class="car-date">{{item.createDate.split(" ")[0]}}</view>
 						</view>
-					</view>
-					<view class="car-info">
-						<view class="car-num">车牌号 : {{item.carNo}}</view>
-						<view class="car-date">{{item.createDate.split(" ")[0]}}</view>
-					</view>
-					<view class="car-yh">
-						<view class="row">
-							总油耗
-							<view class="text">
-								{{item.tfc}}L
+						<view class="car-yh">
+							<view class="row">
+								总油耗
+								<view class="text">
+									{{item.tfc}}L
+								</view>
+							</view>
+							<view class="row">
+								总价
+								<view class="text">
+									{{item.totalCost}}元
+								</view>
 							</view>
 						</view>
-						<view class="row">
-							总价
-							<view class="text">
-								{{item.totalCost}}元
+						<view class="see" v-if="item.status=='已申请'" @click.stop="seeInfo(item.id)">
+							<view class="btn">
+								查看
 							</view>
 						</view>
 					</view>
 				</view>
 			</view>
-		</view>
+		</mescroll-body>
 	</view>
 </template>
 
 <script>
+	import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
 	export default {
+		mixins: [MescrollMixin],
 		data() {
 			return {
+				downOption: {
+					auto: false //是否在初始化后,自动执行downCallback; 默认true
+				},
 				searchType: 0,
-				pageSize: 10,
-				currentPage: 1,
-				fuelFilling: [{
-					destinationProvince: "辽宁省",
-					destinationCity: "营口市",
-					destinationArea: "鲅鱼圈区",
-					destinationAddress: '鲅鱼圈5号门',
-					carNo: "辽H11111",
-					originProvince: "辽宁省",
-					originCity: "营口",
-					originArea: "鲅鱼圈区",
-					originAddress: '中天昊元',
-					createDate: "2022-01-01 15:30:20",
-					travelStatus: "已开始",
-					totalCost: "233.20",
-					tfc: "60L"
-				}],
+				// fuelFilling: [{
+				// 	destinationProvince: "辽宁省",
+				// 	destinationCity: "营口市",
+				// 	destinationArea: "鲅鱼圈区",
+				// 	destinationAddress: '鲅鱼圈5号门',
+				// 	carNo: "辽H11111",
+				// 	originProvince: "辽宁省",
+				// 	originCity: "营口",
+				// 	originArea: "鲅鱼圈区",
+				// 	originAddress: '中天昊元',
+				// 	createDate: "2022-01-01 15:30:20",
+				// 	travelStatus: "已开始",
+				// 	totalCost: "233.20",
+				// 	tfc: "60L"
+				// }],
+				fuelFilling: [],
 			}
 		},
 		onShow() {
 			// this.getList()
 		},
 		methods: {
+			seeInfo(id) {
+				uni.navigateTo({
+					url: '/pages/fuelfilling/apply_see_reimbursement?id=' + id
+				})
+			},
+			/*下拉刷新的回调 */
+			downCallback() {
+				this.getList(10, 1, 'down')
+			},
+			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
+			upCallback(page) {
+				//联网加载数据
+				this.getList(page.size, page.num, 'up')
+			},
+
 			tabcarchange(searchType) {
 				this.searchType = searchType
-				this.pageSize = 10
-				this.getList()
+
+				this.getList(10, 1, 'down')
 			},
 			trackAddition() {
 				uni.navigateTo({
 					url: '/pages/fuelfilling/track_addition'
 				})
 			},
-			getList() {
+			getList(size, page, type) {
 				this.$api.doRequest('get', '/fuelFillingInfo/selectFilling', {
-					pageSize: this.pageSize,
-					currentPage: this.currentPage,
+					pageSize: size,
+					currentPage: page,
 					// pcFlag: 0,
 					searchType: this.searchType,
 					compId: uni.getStorageSync('pcUserInfo').compId,
@@ -114,7 +142,14 @@
 				}).then(res => {
 					debugger
 					if (res.data.code == 200) {
-						this.fuelFilling = res.data.data.records
+						if (type == 'down') {
+							this.mescroll.endSuccess();
+							this.fuelFilling = []
+						} else {
+							this.mescroll.endBySize(res.data.data.records.length, res.data.data.records
+								.length); //必传参数(当前页的数据个数, 总数据量)
+						}
+						this.fuelFilling = this.fuelFilling.concat(res.data.data.records)
 
 					}
 				})
@@ -362,6 +397,22 @@
 				margin: 0 20rpx;
 			}
 		}
+	}
+
+	.see {
+		display: flex;
+		justify-content: flex-end;
 
+		.btn {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			background: #FFFFFF;
+			border-radius: 33px;
+			border: 1px solid #CDCDCD;
+			padding: 15rpx 40rpx;
+			box-sizing: border-box;
+			margin-top: 20rpx;
+		}
 	}
 </style>

+ 101 - 36
pages/fuelfilling/track_addition.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
-		<map :latitude="detailData.originLatitude" :longitude="detailData.originLongitude" :markers="covers"
-			class="map"></map>
+		<map :latitude="detailData.originLatitude" :longitude="detailData.originLongitude" :markers="covers" class="map"
+			:polyline="polyline"></map>
 		<view class='wrap'>
 			<view class="c-row">
 				<view class="title">车牌号</view>
@@ -13,8 +13,7 @@
 			<view @click='endTrack' class="button1" v-if='titleBtn=="结束轨迹"'>{{titleBtn}}</view>
 			<view @click='reimbursement' class="button2" v-if='titleBtn=="申请报销"'>{{titleBtn}}</view>
 		</view>
-
-
+		<u-toast ref="uToast" />
 	</view>
 </template>
 
@@ -23,6 +22,13 @@
 	export default {
 		data() {
 			return {
+				fillingId: '',
+				polyline: [{ //指定一系列坐标点,从数组第一项连线至最后一项
+					points: [],
+					color: "#0000AA", //线的颜色
+					width: 1, //线的宽度
+					//     dottedLine:true,//是否虚线
+				}],
 				detailData: {
 					carNo: '',
 					travelStatus: '',
@@ -49,19 +55,20 @@
 		},
 		onLoad(options) {
 			this.id = options.id
-			// #ifdef APP-PLUS
-			this.getLngLat();
-			// #endif
 			that = this
 		},
 		onShow() {
 			var that = this
 			if (this.id) {
 				this.seeInfo()
+			} else {
+				// #ifdef APP-PLUS
+				this.getLngLat('开始轨迹');
+				// #endif
 			}
 		},
 		methods: {
-			getLngLat() {
+			getLngLat(type) {
 				this.checkOpenGPSServiceByAndroidIOS()
 				var that = this
 				uni.showLoading({
@@ -73,11 +80,39 @@
 					geocode: true,
 					success: res => {
 						if (res.latitude) {
-							console.log(res)
-							that.detailData.originLongitude = res.longitude;
-							that.detailData.originLatitude = res.latitude;
-							that.detailData.destinationCity = that.$helper.filterUrban(res.address.city)
-							that.detailData.originArea = that.$helper.filterUrban(res.address.district)
+							console.log("定位信息", res)
+							if (type == '开始轨迹' || type == '已开始') {
+								that.detailData.originLongitude = res.longitude;
+								that.detailData.originLatitude = res.latitude;
+								that.detailData.originProvince = res.address.province;
+								that.detailData.originCity = that.$helper.filterUrban(res.address.city)
+								that.detailData.originArea = that.$helper.filterUrban(res.address.district)
+								that.detailData.originAddress = res.address.street + res.address.streetNum
+							} else if (type == '结束轨迹') {
+								that.detailData.destinationLongitude = res.longitude;
+								that.detailData.destinationLatitude = res.latitude;
+								that.detailData.destinationProvince = res.address.province;
+								that.detailData.destinationCity = that.$helper.filterUrban(res.address.city)
+								that.detailData.destinationArea = that.$helper.filterUrban(res.address
+									.district)
+								that.detailData.destinationAddress = res.address.street + res.address.streetNum
+								that.detailData.trackFlag = "1"
+								console.log(that.detailData)
+								that.$api.doRequest('post', '/fuelFillingInfo/api/addFilling', that.detailData)
+									.then(res1 => {
+										console.log(111)
+										console.log(res1)
+										if (res1.data.code == 200) {
+
+											this.titleBtn = "申请报销"
+										}
+
+									})
+									.catch(res => {
+										uni.$u.toast(res.message);
+									});
+							}
+
 							this.covers = [{
 								id: 0,
 								latitude: res.latitude,
@@ -197,6 +232,9 @@
 						} else if (this.detailData.travelStatus == "已结束") {
 							this.titleBtn = "申请报销"
 						}
+						// #ifdef APP-PLUS
+						this.getLngLat(this.detailData.travelStatus);
+						// #endif
 					}
 				})
 			},
@@ -212,32 +250,48 @@
 					that.$helper.fUN_AmapLocation.stop({}, result => {
 						console.log('====fUN_AmapLocation定位stop====', JSON.stringify(result));
 						// 更新轨迹结束地点
-
-						this.titleBtn = "申请报销"
+						// 更新结束地点位置
+						this.getLngLat('结束轨迹')
 					});
 				}
 			},
 			//开始轨迹
 			startTrack() {
+				console.log('车牌号')
+				console.log(this.detailData.carNo)
+				if (!this.detailData.carNo) {
+					uni.showToast({
+						title: "车牌号不能为空!",
+						icon: "none"
+					})
+
+					return
+				}
 				that.detailData.compId = uni.getStorageSync('pcUserInfo').compId
 				that.detailData.commonId = uni.getStorageSync('pcUserInfo').userId
 				that.detailData.driverName = uni.getStorageSync('userInfo').userName
-				that.detailData.trackFlag = "1"
-				that.detailData.destinationProvince = ""
-				that.detailData.destinationCity = ""
-				that.detailData.destinationArea = ""
-				that.detailData.destinationLongitude = ""
-				that.detailData.destinationLatitude = ""
-				that.$api.doRequest('post', '/fuelFillingInfo/api/addFilling', that.detailData).then(res => {
-						if (res.code == 200) {
+				that.detailData.trackFlag = "0"
+				console.log(that.detailData)
+				that.$api.doRequest('post', '/fuelFillingInfo/api/addFilling', that.detailData).then(res1 => {
+						console.log(111)
+						console.log(res1)
+						if (res1.data.code == 200) {
+							console.log(222)
 							uni.hideLoading()
 							that.$helper.fUN_AmapLocation.start({
 									intervalTime: 5000,
 									isReport: false
 								},
 								res => {
+									this.covers = [{
+										id: 0,
+										latitude: res.latitude,
+										longitude: res.longitude,
+										iconPath: '../../../static/img/location.png',
+									}]
+									this.id = res1.data.data
 									let _data = {
-										orderId: that.id,
+										fillingId: res1.data.data,
 										longitude: res.longitude,
 										latitude: res.latitude,
 										province: res.province,
@@ -252,30 +306,41 @@
 									// 	}
 									// }
 									this.$helper.gjList.push(_data)
+
 									uni.setStorageSync('mapGJ', this.$helper.gjList);
-									// console.log('this.$helper.gjList')
-									// console.log(this.$helper.gjList)
-									// console.log("条数", uni.getStorageSync('mapGJ').length)
-									if (uni.getStorageSync('mapGJ').length > 100) {
+									console.log('this.$helper.gjList')
+									console.log(this.$helper.gjList)
+									console.log("条数", uni.getStorageSync('mapGJ').length)
+									if (uni.getStorageSync('mapGJ').length > 5) {
 										//存储轨迹经纬度list
-										this.$request.baseRequest('post', 'xx', {
-												orderId: that.id,
-												longitudeLatitude: JSON.stringify(uni.getStorageSync('mapGJ'))
+										that.$api.doRequest('post', '/trackDetailInfo/api/addTrackDetail', {
+												fillingId: _data.fillingId,
+												carNo: that.detailData.carNo,
+												// trackDetailInfos: JSON.stringify(uni.getStorageSync('mapGJ'))
+												trackDetailInfos: uni.getStorageSync('mapGJ')
 											}).then(res => {
+												that.polyline[0].points.push({
+													latitude: _data.latitude,
+													longitude: _data.longitude
+												});
+												console.log('上传经纬度list', res)
 												uni.removeStorageSync('mapGJ');
 												this.$helper.gjList = []
 											})
 											.catch(res => {
-												uni.$u.toast(res.message);
+												uni.showToast({
+													icon: "none",
+													title: res.message
+												})
 											});
 									}
 								}
 							);
-							this.$refs.uToast.show({
-								type: 'success',
-								message: "轨迹持续监控中!",
+							uni.showToast({
+								title: "轨迹持续监控中!",
+								icon: "none",
 								complete() {
-									this.titleBtn = '结束轨迹'
+									that.titleBtn = '结束轨迹'
 								}
 							})
 						}

+ 9 - 9
pages/oa_office/the_oaOffice.vue

@@ -67,7 +67,7 @@
 					},
 					{
 						num: 2,
-						name: '加油',
+						name: '加油申请',
 						// icon: 'cuIcon-edit',
 						src: '../../static/img/oa_office/fulling.png',
 						tips: 0,
@@ -97,14 +97,14 @@
 			}
 		},
 		onShow() {
-			uni.hideKeyboard()
-			uni.showTabBar()
-			this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
-				console.log("checkSession", res)
-				if (res.data.data == "INVALID") {
-					this.isShowAlert1 = true;
-				}
-			})
+			// uni.hideKeyboard()
+			// uni.showTabBar()
+			// this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
+			// 	console.log("checkSession", res)
+			// 	if (res.data.data == "INVALID") {
+			// 		this.isShowAlert1 = true;
+			// 	}
+			// })
 			console.log("hasLogin", this.hasLogin)
 			if (this.userInfo) {
 				if (!this.userInfo.avatarUrl) {

+ 286 - 89
pages/shortDistance/short_distance_record.vue

@@ -1,61 +1,69 @@
 <template>
-	<view>
-		<view class="content">
-			<view class="content1-top">
-				<view class="top2">
-					<view class="left">
-						<view @click='tabcarchange(1)' class='line' :class='searchType==1?"active":""'>未完成</view>
-						<view @click='tabcarchange(3)' class='line' :class='searchType==3?"active":""'>已完成</view>
-					</view>
-					<view class="right uni-button">
-						<button v-if="searchType==3" style="line-height: 28px;margin-right: 5px;"
-							class="right-contrent1" @click="requestFunds">请款</button>
-						<button style="line-height: 28px;" class="right-contrent1" @click="trackAddition">添加</button>
-					</view>
-				</view>
+	<view class="content">
+		<view class="content1-top">
+			<view class="top2">
+				<!-- <view class="left top-content"> -->
+				<view @click='tabcarchange(0)' class='line' :class='searchType==0?"active":""'>全部</view>
+				<view @click='tabcarchange(1)' class='line' :class='searchType==1?"active":""'>未完成</view>
+				<view @click='tabcarchange(3)' class='line' :class='searchType==3?"active":""'>已完成</view>
+				<!-- </view> -->
+
 			</view>
 		</view>
-		<view v-for="(item,index) in shortDetail.shortFillingList" :key="index" @click="getInfo(item)">
-			<view class="good-list flex">
-				<view style="margin-top: 20px;width: 30px;">
-					<label v-model="show2" class="fuxuankuang" @click.stop="checkedChange(item)" v-if="searchType==3">
-						<checkbox value="cb" style="transform:scale(0.7)" :disabled="item.travelStatus == '已报销'" />
-					</label>
-				</view>
-
-				<view style="padding: 0 35rpx 20rpx 0rpx;">
-					<view class="flex align-center" style="width: 103%;margin-left: 12px;">
-						<view class="item1">
-							<view class="ssx">{{$helper.getProvinceAbbreviation(item.originProvince)}}</view>
-							<view class="level2-title" style="font-size: 14px;">{{item.sendWarehouse}}
-							</view>
-						</view>
-						<image class="jt-icon item2" src="@/static/images/fuel/jt.png" mode='widthFix'>
-						</image>
-						<view class="item3">
-							<view class="ssx">{{$helper.getProvinceAbbreviation(item.destinationProvince)}}</view>
-							<view class="level2-title">{{item.receiveWarehouse}}
-							</view>
-						</view>
-						<view class="wenzi audit1" v-if="item.travelStatus == '已开始'">已开始</view>
-						<view class="wenzi audit2" v-if="item.travelStatus == '已结束'">已结束</view>
-						<view class="wenzi audit3" v-if="item.travelStatus == '已报销'">已报销</view>
+		<mescroll-body ref="mescrollRef" :down="downOption" @down="downCallback" @up="upCallback">
+			<checkbox-group>
+				<view v-for="(item,index) in shortDetail.shortFillingList" :key="index" @click="getInfo(item)"
+					class="list-content">
+					<view class="fuxuankuang" @click.stop="checkedChange(item)" v-if="isShowCheck">
+						<checkbox value="cb" style="transform:scale(0.7)" :disabled="item.travelStatus == '已报销'"
+							:checked="item.check" />
 					</view>
-					<view class="flex flex-space-between yf-style">
-						<view class="left">
-							<view class="flex">
-								<view style="min-width: 130px;margin-top: 10px;">车牌号 : {{item.carNo}}</view>
-								<view style="min-width: 110px;margin-top: 10px;">里程 :
-									{{item.mileage}}公里
+					<view class="good-list">
+						<view style="padding: 0 35rpx 20rpx 35rpx;position: relative;">
+							<view class="flex top">
+								<view class="flex left">
+									<view class="item1">
+										<view class="ssx">{{$helper.getProvinceAbbreviation(item.originProvince)}}
+										</view>
+										<view class="level2-title" style="font-size: 14px;">
+											{{$helper.filterUrban(item.originCity)}}
+											{{$helper.filterArea(item.originArea)}}
+										</view>
+									</view>
+									<image class="jt-icon item2" src="@/static/images/fuel/jt.png" mode='widthFix'>
+									</image>
+									<view class="item3">
+										<view class="ssx">{{$helper.getProvinceAbbreviation(item.destinationProvince)}}
+										</view>
+										<view class="level2-title">{{$helper.filterUrban(item.destinationCity)}}
+											{{$helper.filterArea(item.destinationArea)}}
+										</view>
+									</view>
+								</view>
+								<view class="flex">
+									<view class="audit1" v-if="item.travelStatus == '已开始'">已开始</view>
+									<view class="audit2" v-if="item.travelStatus == '已结束'">已结束</view>
+									<view class="audit3" v-if="item.travelStatus == '已报销'">已报销</view>
 								</view>
-								<view style="width: 90px;margin-top: 12px;">{{item.createDate.split(" ")[0]}}
+							</view>
+							<view class="car-info">
+								<view style="display: flex;">
+									<view class="car-num">车牌号 : {{item.carNo}}</view>
+									<view style="margin-left: 20rpx;" v-if="item.travelStatus != '已开始'">
+										{{item.mileage}}km
+									</view>
 								</view>
+
+								<view class="car-date">{{item.createDate.split(" ")[0]}}</view>
+							</view>
+							<view class="qk" v-if="item.travelStatus == '已结束'">
+								<view class="qkbtn" @click="qkClick(item)">请款</view>
 							</view>
 						</view>
 					</view>
 				</view>
-			</view>
-		</view>
+			</checkbox-group>
+		</mescroll-body>
 		<view v-if='show1' class="shade">
 			<view class="wrap1">
 				<view class="alert-top">
@@ -67,15 +75,14 @@
 				<view class="c-row">
 					<view class="title2">请款金额</view>
 					<view class="con-list">
-						<input type="digit" style="width: 100px;margin-left: 60px;"
-							v-model='shortDetail.amountRequested' placeholder="请输入请款金额">
-						<view style="width: 0px;margin-left: 162px;margin-top: -20px;">元</view></input>
+						<input type="digit" v-model='shortDetail.amountRequested' placeholder="请输入请款金额(元)">
+						<view style="width: 0px;margin-left: 162px;margin-top: -20px;"></view></input>
 					</view>
 				</view>
 				<view class="c-row">
 					<view class="title2">仓库名称</view>
 					<view class="con-list">
-						<view @click='show=true'>{{shortDetail.warehouseName}}</view>
+						<view @click='show=true'>{{shortDetail.warehouseName?shortDetail.warehouseName:"请选择仓库"}}</view>
 						<u-picker :range="warehouseBaseInfoList" range-key="warehouseName"
 							@confirm='targetLPicker($event)' v-model="show" mode="selector">
 						</u-picker>
@@ -87,72 +94,149 @@
 				<view class="con-list">
 					<u-input class='textarea' v-model="shortDetail.remark" :type="type" :border="border"
 						:height="height" :auto-height="autoHeight" />
-					<view style='right:10px;bottom:20px;color:#AFB3BF;'>
+					<!-- <view style='right:10px;bottom:20px;color:#AFB3BF;'>
 						{{shortDetail.remark.length}}/150个字
-					</view>
+					</view> -->
 				</view>
 				<view @click="close()" class="cancel">取消</view>
 				<view @click='requestFundsSubmit()' class="confirm">确定</view>
 			</view>
 		</view>
+		<view class="bottom-view">
+			<!-- 	<button v-if="searchType==3" style="line-height: 28px;margin-right: 5px;"
+				class="right-contrent1" @click="requestFunds">请款</button> -->
+			<view class="bottom-btn" @click="trackAddition" v-if="!isShowCheck">添加</view>
+			<view class="row2" v-if="isShowCheck">
+				<view class="left" v-if="!isSelectChecked">
+					请选择要请款的记录
+				</view>
+				<view class="left" v-if="isSelectChecked">
+					已选择{{selectTotal}}个
+				</view>
+				<view class="right" v-if="!isSelectChecked">
+					一键请款
+				</view>
+				<view class="right green" @click="yjqkClick" v-if="isSelectChecked">
+					一键请款
+				</view>
+			</view>
+		</view>
 	</view>
 </template>
 
 <script>
+	import MescrollMixin from "@/components/mescroll-uni/mescroll-mixins.js";
 	export default {
+		mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
 		data() {
 			return {
+				downOption: {
+					auto: false //是否在初始化后,自动执行downCallback; 默认true
+				},
+				selectTotal: 0,
+				isSelectChecked: false,
+				isShowCheck: false,
 				show2: false,
-				searchType: 1,
+				searchType: 0,
 				pageSize: 10,
 				show1: false,
 				show: false,
 				currentPage: 1,
 				shortDetail: {
-					shortFillingList: [{
-						destinationProvince: "",
-						carNo: "",
-						originProvince: "",
-						createDate: "",
-						travelStatus: "",
-						mileage: "",
-						sendWarehouse: "",
-						receiveWarehouse: "",
-					}],
-					amountRequested: '',
-					warehouseName: '请选择仓库名称',
-					remark: '',
+					shortFillingList: []
 				},
+				// shortDetail: {
+				// 	shortFillingList: [{
+				// 		destinationProvince: "辽宁省",
+				// 		destinationCity: "营口市",
+				// 		destinationArea: "鲅鱼圈区",
+				// 		destinationAddress: '鲅鱼圈5号门',
+				// 		carNo: "辽H11111",
+				// 		originProvince: "辽宁省",
+				// 		originCity: "营口",
+				// 		originArea: "鲅鱼圈区",
+				// 		originAddress: '中天昊元',
+				// 		createDate: "2022-01-01 15:30:20",
+				// 		travelStatus: "已开始",
+				// 		totalCost: "233.20",
+				// 		tfc: "60L",
+				// 		check: false
+				// 	}],
+				// 	amountRequested: '',
+				// 	warehouseName: '请选择仓库名称',
+				// 	remark: '',
+				// },
 				warehouseType: '1',
 				warehouseBaseInfoList: [],
 				type: 'textarea',
 				border: true,
 				height: 150,
 				autoHeight: true,
-				
+
 				// infoList:[],
 
 			}
 		},
-		onLoad() {
-			this.getWarehouse()
-		},
+
+		onLoad() {},
 		onShow() {
-			this.getList()
+			// this.getList()
+		},
+		onNavigationBarButtonTap(e) {
+			console.log(e)
+			this.isShowCheck = !this.isShowCheck
+			// this.isSelectChecked = false
+			// 	const index = e.index;
+			// 	if (index == 1) {
+			// 		uni.navigateBack()
+			// 	} else {
+
+			// 		this.naviageToPage("/pages/user/depotAcquisition/grainDeliveryRecord")
+			// 	}
 		},
 		methods: {
+			// 单条请款
+			qkClick(item) {
+				this.infoList = []
+				this.infoList.push(item)
+				this.show1 = true
+
+			},
+			// 一键请款
+			yjqkClick() {
+				// this.requestFundsSubmit()
+				this.show1 = true
+			},
+			/*下拉刷新的回调 */
+			downCallback() {
+				this.getList(10, 1, 'down')
+			},
+			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
+			upCallback(page) {
+				//联网加载数据
+				this.getList(page.size, page.num, 'up')
+			},
 			checkedChange(item) {
+				item.check = !item.check
+				this.isSelectChecked = false
+				this.selectTotal = 0
+				for (let i = 0; i < this.shortDetail.shortFillingList.length; i++) {
+					if (this.shortDetail.shortFillingList[i].check) {
+						this.isSelectChecked = true
+						this.selectTotal++
+					}
+				}
 				if (item.travelStatus == '已报销') {
 					this.show2 = false
 					this.$api.msg('已报销的不可再选')
 					return
-				}else{
+				} else {
+
 					this.infoList.push(item)
 				}
 			},
 			tabcarchange(searchType) {
 				this.searchType = searchType
-				this.pageSize = 10
 				this.getList()
 			},
 			trackAddition() {
@@ -160,17 +244,35 @@
 					url: '/pages/shortDistance/short_track_addition'
 				})
 			},
-			getList() {
+			getList(size, page, type) {
 				this.$api.doRequest('get', '/shortFillingInfo/selectShortFilling', {
-					pageSize: this.pageSize,
-					currentPage: this.currentPage,
+					pageSize: size,
+					currentPage: page,
 					// pcFlag: 0,
 					searchType: this.searchType,
 					compId: uni.getStorageSync('pcUserInfo').compId,
 					commonId: uni.getStorageSync('pcUserInfo').userId,
 				}).then(res => {
 					if (res.data.code == 200) {
-						this.shortDetail.shortFillingList = res.data.data.records
+						uni.showLoading({
+							mask: true,
+							title: '加载中'
+						})
+						this.getWarehouse()
+						if (type == 'down') {
+							this.mescroll.endSuccess();
+							this.shortDetail.shortFillingList = []
+						} else {
+							console.log(res.data)
+							this.mescroll.endBySize(res.data.data.records.length, res.data.data.total
+								.length); //必传参数(当前页的数据个数, 总数据量)
+						}
+
+						this.shortDetail.shortFillingList = this.shortDetail.shortFillingList.concat(res.data.data
+							.records)
+						for (let i = 0; i < this.shortDetail.shortFillingList.length; i++) {
+							this.shortDetail.shortFillingList[i].check = false
+						}
 
 					}
 				})
@@ -181,6 +283,7 @@
 					warehouseType: '1'
 				}).then(res => {
 					if (res.data.data.length != 0) {
+						uni.hideLoading()
 						this.warehouseBaseInfoList = res.data.data
 					}
 				})
@@ -215,8 +318,8 @@
 							// that.shortDetail.remark = that.remark
 							// that.shortDetail.amountRequested = that.amountRequested
 							// that.shortDetail.warehouseName = that.warehouseName
-							let dataInfo={}
-							dataInfo.amountRequested = that.shortDetail.amountRequested 
+							let dataInfo = {}
+							dataInfo.amountRequested = that.shortDetail.amountRequested
 							dataInfo.warehouseName = that.shortDetail.warehouseName
 							dataInfo.remark = that.shortDetail.remark
 							// dataInfo.compId = uni.getStorageSync('pcUserInfo').compId
@@ -244,7 +347,7 @@
 
 <style lang="scss" scoped>
 	.content {
-		padding-bottom: 50rpx;
+		padding-bottom: 180rpx;
 	}
 
 	.tag {
@@ -319,6 +422,7 @@
 		padding: 10px 16px 0 10px;
 		border-radius: 0 0 15px 15px;
 		padding-bottom: 10px;
+		margin-bottom: 20rpx;
 	}
 
 	.top2 {
@@ -343,13 +447,13 @@
 	}
 
 	.good-list {
-		width: 95%;
-		margin: 0 auto;
 		background-color: white;
-		padding: 33px 0px 25px 0px;
+		// margin: -10px 10px 20px 10px;
+		padding: 20px 0px;
+		width: 100%;
+		margin: 10rpx 20rpx;
 		border-radius: 30rpx;
 		box-shadow: 0px 5rpx 20rpx #E3E3E3;
-		margin-bottom: 10px;
 
 		.item1,
 		.item3 {
@@ -372,6 +476,49 @@
 			text-align: right;
 		}
 
+		.top {
+			align-items: center;
+			justify-content: space-between;
+
+			.left {
+				align-items: center;
+			}
+		}
+
+		.car-info {
+			background: #F9F9FA;
+			padding: 20rpx;
+			display: flex;
+			border-radius: 20rpx;
+			flex-direction: column;
+
+			.car-num {
+				font-size: 26rpx;
+				// font-weight: 700;
+			}
+
+			.car-date {
+				margin-top: 10rpx;
+				color: #878C9C;
+			}
+		}
+
+		.qk {
+			display: flex;
+			justify-content: flex-end;
+		}
+
+		.qkbtn {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			background: #FFFFFF;
+			border-radius: 33px;
+			border: 1px solid #CDCDCD;
+			padding: 15rpx 40rpx;
+			box-sizing: border-box;
+			margin-top: 20rpx;
+		}
 	}
 
 	.fuxuankuang {
@@ -431,7 +578,7 @@
 	}
 
 	.audit2 {
-		color: #22C572;
+		color: #ff0000;
 	}
 
 	.audit3 {
@@ -464,7 +611,7 @@
 			margin: auto;
 			background: #fff;
 			width: calc(100% - 198rpx);
-			height: 320px;
+			height: 340px;
 			border-radius: 20rpx;
 
 			input {
@@ -568,6 +715,56 @@
 	.textarea {
 		background: #F9F9FA;
 		border: 1px solid #EEEEEE;
-		margin-left: 10px;
+		margin: 20rpx;
+
+	}
+
+	// .top-content{
+	// 	display: flex;
+	// 	// justify-content: ;
+	// }
+	.list-content {
+		display: flex;
+		align-items: center;
+	}
+
+	.bottom-view {
+		position: fixed;
+		bottom: 0;
+		width: 100%;
+		padding: 40rpx;
+		background-color: #fff;
+
+		.bottom-btn {
+			background-color: #22C572;
+			width: 100%;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			color: #fff;
+			font-size: 32rpx;
+			padding: 20rpx;
+			border-radius: 50rpx;
+
+		}
+
+		.row2 {
+			display: flex;
+			justify-content: space-around;
+			align-items: center;
+			color: #ACAFB6;
+
+			.right {
+				background-color: #F7F8FA;
+				padding: 20rpx 60rpx;
+				border-radius: 50rpx;
+			}
+
+			.green {
+				background: #22C572;
+				color: #fff;
+			}
+
+		}
 	}
 </style>

+ 321 - 96
pages/shortDistance/short_track_addition.vue

@@ -1,24 +1,34 @@
 <template>
 	<view>
-		<view>
-			<view class='wrap'>
-				<view class="c-row">
-					<view class="title">车牌号</view>
-					<view class="con-list">
-						<input v-model='detailData.carNo' placeholder="请输入车牌号" maxlength="7"></input>
-					</view>
+		<map :latitude="detailData.originLatitude" :longitude="detailData.originLongitude" :markers="covers" class="map"
+			:polyline="polyline"></map>
+		<view class='wrap'>
+			<view class="c-row">
+				<view class="title">车牌号</view>
+				<view class="con-list">
+					<input v-model='detailData.carNo' placeholder="请输入车牌号" maxlength="7"></input>
 				</view>
 			</view>
 			<view @click='startTrack' class="button" v-if='titleBtn=="开始轨迹"'>{{titleBtn}}</view>
-			<view @click='startTrack' class="button1" v-if='titleBtn=="结束轨迹"'>{{titleBtn}}</view>
+			<view @click='endTrack' class="button1" v-if='titleBtn=="结束轨迹"'>{{titleBtn}}</view>
+			<!-- <view @click='reimbursement' class="button2" v-if='titleBtn=="申请报销"'>{{titleBtn}}</view> -->
 		</view>
+		<u-toast ref="uToast" />
 	</view>
 </template>
 
 <script>
+	var that
 	export default {
 		data() {
 			return {
+				fillingId: '',
+				polyline: [{ //指定一系列坐标点,从数组第一项连线至最后一项
+					points: [],
+					color: "#0000AA", //线的颜色
+					width: 1, //线的宽度
+					//     dottedLine:true,//是否虚线
+				}],
 				detailData: {
 					carNo: '',
 					travelStatus: '',
@@ -32,26 +42,190 @@
 					destinationArea: '',
 					destinationLongitude: '',
 					destinationLatitude: '',
-					trackFlag: '0',
+					trackFlag: '',
 					compId: '',
 					commonId: '',
-					mileage: '',
-					sendWarehouse:'',
-					receiveWarehouse:'',
+					driverName: '',
+					fillingNo: '',
+					strokeType: '1',
 				},
+				covers: [],
 				titleBtn: "开始轨迹",
 			}
 		},
 		onLoad(options) {
 			this.id = options.id
+			that = this
 		},
 		onShow() {
 			var that = this
 			if (this.id) {
 				this.seeInfo()
+			} else {
+				// #ifdef APP-PLUS
+				this.getLngLat('开始轨迹');
+				// #endif
 			}
 		},
 		methods: {
+			getLngLat(type) {
+				this.checkOpenGPSServiceByAndroidIOS()
+				var that = this
+				uni.showLoading({
+					title: '获取定位中',
+					mask: true
+				})
+				uni.getLocation({
+					type: 'gcj02',
+					geocode: true,
+					success: res => {
+						if (res.latitude) {
+							console.log("定位信息", res)
+							if (type == '开始轨迹' || type == '已开始') {
+								that.detailData.originLongitude = res.longitude;
+								that.detailData.originLatitude = res.latitude;
+								that.detailData.originProvince = res.address.province;
+								that.detailData.originCity = that.$helper.filterUrban(res.address.city)
+								that.detailData.originArea = that.$helper.filterUrban(res.address.district)
+								that.detailData.originAddress = res.address.street + res.address.streetNum
+							} else if (type == '结束轨迹') {
+								that.detailData.destinationLongitude = res.longitude;
+								that.detailData.destinationLatitude = res.latitude;
+								that.detailData.destinationProvince = res.address.province;
+								that.detailData.destinationCity = that.$helper.filterUrban(res.address.city)
+								that.detailData.destinationArea = that.$helper.filterUrban(res.address
+									.district)
+								that.detailData.destinationAddress = res.address.street + res.address.streetNum
+								that.detailData.trackFlag = "1"
+								console.log(that.detailData)
+								that.$api.doRequest('post', '/shortFillingInfo/api/addShortFilling', that
+										.detailData)
+									.then(res1 => {
+										console.log(111)
+										console.log(res1)
+										if (res1.data.code == 200) {
+											that.$api.msg('提交成功')
+											uni.navigateTo({
+												url: '/pages/shortDistance/short_distance_record'
+											})
+										} else {
+											that.$api.msg('提交失败')
+										}
+
+									})
+									.catch(res => {
+										uni.$u.toast(res.message);
+									});
+							}
+
+							this.covers = [{
+								id: 0,
+								latitude: res.latitude,
+								longitude: res.longitude,
+								iconPath: '../../../static/img/location.png',
+							}]
+							that.$forceUpdate()
+							uni.hideLoading()
+						} else {
+							if (uni.getSystemInfoSync().platform == 'android') {
+								var context = plus.android.importClass("android.content.Context");
+								var locationManager = plus.android.importClass(
+									"android.location.LocationManager");
+								var main = plus.android.runtimeMainActivity();
+								var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
+								that.bool = mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)
+							}
+							if (that.bool === false) {
+								uni.showModal({
+									title: '提示',
+									content: '请打开定位服务',
+									success: ({
+										confirm,
+										cancel
+									}) => {
+										if (confirm) {
+											if (uni.getSystemInfoSync().platform == 'android') {
+												var Intent = plus.android.importClass(
+													'android.content.Intent');
+												var Settings = plus.android.importClass(
+													'android.provider.Settings');
+												var intent = new Intent(Settings
+													.ACTION_LOCATION_SOURCE_SETTINGS);
+												var main = plus.android.runtimeMainActivity();
+												main.startActivity(intent); // 打开系统设置GPS服务页面
+											}
+										}
+									}
+								});
+								uni.hideLoading()
+							}
+						}
+					},
+					fail: res => {
+						console.log('定位失败')
+						console.log(res)
+						uni.hideLoading()
+					}
+				});
+			},
+			checkOpenGPSServiceByAndroidIOS() {
+				let system = uni.getSystemInfoSync(); // 获取系统信息
+				if (system.platform === 'android') { // 判断平台
+					var context = plus.android.importClass("android.content.Context");
+					var locationManager = plus.android.importClass("android.location.LocationManager");
+					var main = plus.android.runtimeMainActivity();
+					var mainSvr = main.getSystemService(context.LOCATION_SERVICE);
+					if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
+						uni.showModal({
+							title: '提示',
+							content: '请打开定位服务功能',
+							// showCancel: false, // 不显示取消按钮
+							success(res) {
+								if (res.confirm) {
+									if (!mainSvr.isProviderEnabled(locationManager.GPS_PROVIDER)) {
+										var Intent = plus.android.importClass('android.content.Intent');
+										var Settings = plus.android.importClass('android.provider.Settings');
+										var intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
+										main.startActivity(intent); // 打开系统设置GPS服务页面
+									}
+								}
+							}
+						});
+					}
+				} else if (system.platform === 'ios') {
+					// console.log("苹果");
+					var cllocationManger = plus.ios.import("CLLocationManager");
+					var enable = cllocationManger.locationServicesEnabled();
+					var status = cllocationManger.authorizationStatus();
+					plus.ios.deleteObject(cllocationManger);
+					if (enable && status != 2) {
+						console.log("手机系统的定位已经打开");
+					} else {
+						console.log("手机系统的定位没有打开");
+						uni.showModal({
+							title: '提示',
+							content: '请前往设置-隐私-定位服务打开定位服务功能',
+							// showCancel: false, // 不显示取消按钮
+							success(res) {
+								if (res.confirm) {
+									var UIApplication = plus.ios.import("UIApplication");
+									var application2 = UIApplication.sharedApplication();
+									var NSURL2 = plus.ios.import("NSURL");
+									// var setting2 = NSURL2.URLWithString("prefs:root=LOCATION_SERVICES");
+									// var setting2 = NSURL2.URLWithString("App-Prefs:root=LOCATION_SERVICES");
+									// var setting2 = NSURL2.URLWithString("app-settings");
+									var setting2 = NSURL2.URLWithString("App-Prefs:root=Privacy&path=LOCATION");
+									// var setting2 = NSURL2.URLWithString("App-Prefs:root=Privacy&path=LOCATION_SERVICES");
+									application2.openURL(setting2);
+									plus.ios.deleteObject(setting2);
+									plus.ios.deleteObject(NSURL2);
+									plus.ios.deleteObject(application2);
+								}
+							}
+						});
+					}
+				}
+			},
 			seeInfo() {
 				this.$api.doRequest('get', '/shortFillingInfo/getShortFilling', {
 					id: this.id
@@ -60,84 +234,125 @@
 						this.detailData = res.data.data
 						if (this.detailData.travelStatus == "已开始") {
 							this.titleBtn = "结束轨迹"
-						} 
+						} else if (this.detailData.travelStatus == "已结束") {
+							this.titleBtn = "申请报销"
+						}
+						// #ifdef APP-PLUS
+						this.getLngLat(this.detailData.travelStatus);
+						// #endif
 					}
 				})
 			},
+			// 申请报销
+			// reimbursement() {
+			// 	uni.navigateTo({
+			// 		url: '/pages/fuelfilling/apply_for_reimbursement?id=' + this.id
+			// 	})
+			// },
+			// 结束轨迹
+			endTrack() {
+				if (that.$helper.fUN_AmapLocation) {
+					that.$helper.fUN_AmapLocation.stop({}, result => {
+						console.log('====fUN_AmapLocation定位stop====', JSON.stringify(result));
+						// 更新轨迹结束地点
+						// 更新结束地点位置
+						this.getLngLat('结束轨迹')
+					});
+				}
+			},
+			//开始轨迹
 			startTrack() {
-				if(this.detailData.carNo.length!=7){
-					this.$api.msg('车牌号输入错误!')
+				console.log('车牌号')
+				console.log(this.detailData.carNo)
+				if (!this.detailData.carNo) {
+					uni.showToast({
+						title: "车牌号不能为空!",
+						icon: "none"
+					})
+
 					return
 				}
-				if (this.titleBtn == "开始轨迹") {
-					var that = this
-					uni.showModal({
-						content: "确定开始轨迹?",
-						showCancel: true,
-						confirmText: '确定',
-						success: function(res) {
-							if (res.confirm) {
-								that.detailData.compId = uni.getStorageSync('pcUserInfo').compId
-								that.detailData.commonId = uni.getStorageSync('pcUserInfo').userId
-								that.detailData.driverName = uni.getStorageSync('userInfo').userName
-								that.detailData.trackFlag = "0"
-								that.detailData.fillingNo = "202207040004"
-								that.detailData.originProvince = "黑龙江省"
-								that.detailData.originCity = "齐齐哈尔市"
-								that.detailData.originArea = "克东县"
-								that.detailData.sendWarehouse = "克东千丰库"
-								that.detailData.originLongitude = "123.188"
-								that.detailData.originLatitude = "41.737"
-								that.$api.doRequest('post', '/shortFillingInfo/api/addShortFilling',
-										that.detailData
-									)
-									.then(res => {
-										that.id = res.data.data
-										if (res.data.code == 200) {
-											that.$api.msg('提交成功')
-											that.titleBtn = "结束轨迹"
-										} else {
-											that.$api.msg('提交失败')
-										}
-									})
-							}
-						}
-					})
-				} else if (this.titleBtn == "结束轨迹") {
-					var that = this
-					uni.showModal({
-						content: "确定结束轨迹?",
-						showCancel: true,
-						confirmText: '确定',
-						success: function(res) {
-							if (res.confirm) {
-								that.detailData.compId = uni.getStorageSync('pcUserInfo').compId
-								that.detailData.commonId = uni.getStorageSync('pcUserInfo').userId
-								that.detailData.driverName = uni.getStorageSync('userInfo').userName
-								that.detailData.trackFlag = "1"
-								that.detailData.destinationProvince = "辽宁省"
-								that.detailData.receiveWarehouse = "鲅鱼圈红运库"
-								that.detailData.carNo
-								that.detailData.mileage = "15"
-								that.detailData.destinationLongitude = "118.291"
-								that.detailData.destinationLatitude = "33.942"
-								that.$api.doRequest('post', '/shortFillingInfo/api/addShortFilling',
-										that.detailData
-									)
-									.then(res => {
-										if (res.data.code == 200) {
-											that.$api.msg('提交成功')
-											uni.navigateTo({
-												url: '/pages/shortDistance/short_distance_record'
+				that.detailData.compId = uni.getStorageSync('pcUserInfo').compId
+				that.detailData.commonId = uni.getStorageSync('pcUserInfo').userId
+				that.detailData.driverName = uni.getStorageSync('userInfo').userName
+				that.detailData.trackFlag = "0"
+				console.log(that.detailData)
+				that.$api.doRequest('post', '/shortFillingInfo/api/addShortFilling', that.detailData).then(res1 => {
+						console.log(111)
+						console.log(res1)
+						if (res1.data.code == 200) {
+							console.log(222)
+							uni.hideLoading()
+							that.$helper.fUN_AmapLocation.start({
+									intervalTime: 5000,
+									isReport: false
+								},
+								res => {
+									this.covers = [{
+										id: 0,
+										latitude: res.latitude,
+										longitude: res.longitude,
+										iconPath: '../../../static/img/location.png',
+									}]
+									this.id = res1.data.data
+									let _data = {
+										fillingId: res1.data.data,
+										longitude: res.longitude,
+										latitude: res.latitude,
+										province: res.province,
+										city: res.city,
+										area: res.district
+									}
+									// if (this.shippingNoteInfos && this.shippingNoteInfos.length > 0) { //更新持续定位经纬度
+									// 	for (let i = 0; i < this.shippingNoteInfos.length; i++) {
+									// 		this.shippingNoteInfos[i].startLatitude = _data.latitude //纬度
+									// 		this.shippingNoteInfos[i].startLocationText = _data.city //起点
+									// 		this.shippingNoteInfos[i].startLongitude = _data.longitude //经度
+									// 	}
+									// }
+									this.$helper.dtList.push(_data)
+
+									uni.setStorageSync('mapDT', this.$helper.dtList);
+									console.log('this.$helper.dtList')
+									console.log(this.$helper.dtList)
+									console.log("条数", uni.getStorageSync('mapDT').length)
+									if (uni.getStorageSync('mapDT').length > 5) {
+										//存储轨迹经纬度list
+										that.$api.doRequest('post', '/trackDetailInfo/api/addTrackDetail', {
+												fillingId: _data.fillingId,
+												carNo: that.detailData.carNo,
+												// trackDetailInfos: JSON.stringify(uni.getStorageSync('mapGJ'))
+												trackDetailInfos: uni.getStorageSync('mapDT')
+											}).then(res => {
+												that.polyline[0].points.push({
+													latitude: _data.latitude,
+													longitude: _data.longitude
+												});
+												console.log('上传经纬度list', res)
+												uni.removeStorageSync('mapDT');
+												this.$helper.dtList = []
 											})
-										} else {
-											that.$api.msg('提交失败')
-										}
-									})
-							}
+											.catch(res => {
+												uni.showToast({
+													icon: "none",
+													title: res.message
+												})
+											});
+									}
+								}
+							);
+							uni.showToast({
+								title: "轨迹持续监控中!",
+								icon: "none",
+								complete() {
+									that.titleBtn = '结束轨迹'
+								}
+							})
 						}
 					})
-				} 
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
 			},
 		}
 	}
@@ -162,7 +377,10 @@
 		-webkit-box-align: center;
 		-webkit-align-items: center;
 		align-items: center;
-		padding: 20rpx 30rpx;
+		/* 	padding: 20rpx 30rpx;
+		margin: 20rpx 0; */
+
+
 	}
 
 	.con-list {
@@ -183,24 +401,16 @@
 	}
 
 	.wrap {
-		font-size: 14px;
 		background: #fff;
-		margin: 10px;
-		border-radius: 15px 10px;
-
-		input {
-			font-size: 14px;
-		}
-
-		>.title {
-			padding: 10px 16px;
-		}
+		padding: 40rpx 20rpx;
+		box-sizing: border-box;
+		height: 20vh;
 	}
 
 	.button {
 		background: #22C572;
 		width: 90%;
-		margin: 250px auto;
+		margin: 40rpx auto;
 		padding: 10px;
 		color: #fff;
 		text-align: center;
@@ -210,7 +420,17 @@
 	.button1 {
 		background: #ff0000;
 		width: 90%;
-		margin: 250px auto;
+		margin: 0 auto;
+		padding: 10px;
+		color: #fff;
+		text-align: center;
+		border-radius: 30px;
+	}
+
+	.button2 {
+		background: #4089ff;
+		width: 90%;
+		margin: 0 auto;
 		padding: 10px;
 		color: #fff;
 		text-align: center;
@@ -244,5 +464,10 @@
 		background: #F9F9FA;
 		border: 1px solid #EEEEEE;
 	}
-</style>
 
+	.map {
+		width: 100vw;
+		height: 80vh;
+
+	}
+</style>

+ 36 - 36
pages/user/user.vue

@@ -321,42 +321,42 @@
 						url: `/pages/oa_office/the_oaOffice`,
 						show: true
 					},
-					{
-						num: 9,
-						name: '打卡',
-						// icon: 'cuIcon-edit',
-						src: '../../static/img/sign/daka.png',
-						tips: 0,
-						url: `/pages/clock/the_clock`,
-						show: true
-					},
-					{
-						num: 10,
-						name: '请假',
-						// icon: 'cuIcon-edit',
-						src: '../../static/img/sign/qingjia.png',
-						tips: 0,
-						url: `/pages/leave/the_leave`,
-						show: true
-					},
-					{
-						num: 11,
-						name: '加油',
-						// icon: 'cuIcon-edit',
-						src: '../../static/img/sign/jiayou.png',
-						tips: 0,
-						url: `/pages/fuelfilling/the_fuel_filling`,
-						show: true
-					},
-					{
-						num: 10,
-						name: '短途记录',
-						// icon: 'cuIcon-edit',
-						src: '../../static/img/sign/dt.png',
-						tips: 0,
-						url: `/pages/shortDistance/short_distance_record`,
-						show: true
-					}
+					// {
+					// 	num: 9,
+					// 	name: '打卡',
+					// 	// icon: 'cuIcon-edit',
+					// 	src: '../../static/img/sign/daka.png',
+					// 	tips: 0,
+					// 	url: `/pages/clock/the_clock`,
+					// 	show: true
+					// },
+					// {
+					// 	num: 10,
+					// 	name: '请假',
+					// 	// icon: 'cuIcon-edit',
+					// 	src: '../../static/img/sign/qingjia.png',
+					// 	tips: 0,
+					// 	url: `/pages/leave/the_leave`,
+					// 	show: true
+					// },
+					// {
+					// 	num: 11,
+					// 	name: '加油',
+					// 	// icon: 'cuIcon-edit',
+					// 	src: '../../static/img/sign/jiayou.png',
+					// 	tips: 0,
+					// 	url: `/pages/fuelfilling/the_fuel_filling`,
+					// 	show: true
+					// },
+					// {
+					// 	num: 10,
+					// 	name: '短途记录',
+					// 	// icon: 'cuIcon-edit',
+					// 	src: '../../static/img/sign/dt.png',
+					// 	tips: 0,
+					// 	url: `/pages/shortDistance/short_distance_record`,
+					// 	show: true
+					// }
 				],
 				showTran: true,
 				companyId: 1,