gjy пре 1 година
родитељ
комит
a5d5e04063

+ 4 - 4
App.vue

@@ -184,7 +184,6 @@
 			// console.log(this.$scope.globalData.userRelease);
 			// #ifdef APP-PLUS
 			let type = uni.getSystemInfoSync().platform
-			console.log(type)
 			if (type == "android") {
 				APPUpdate()
 				const plugin = uni.requireNativePlugin("DCloud-PushSound");
@@ -1067,14 +1066,15 @@
 	.uni-page-head-ft {
 		margin-right: 10rpx;
 	}
+
 	uni-checkbox .uni-checkbox-input {
 		border-radius: 80rpx !important;
-		background-color:#F5F6FA !important;
+		background-color: #F5F6FA !important;
 	}
-	
+
 	uni-checkbox .uni-checkbox-input-checked {
 		background-color: #22C572 !important;
 		border-color: #22C572 !important;
-		color:#fff !important;
+		color: #fff !important;
 	}
 </style>

+ 140 - 0
components/xbd-maptrack/xbd-maptrack.vue

@@ -0,0 +1,140 @@
+<template>
+	<view class="content">
+		<map
+			style="width: 100%; height: 100%;position: fixed;"
+			:markers="covers"
+			:polyline="polyline"
+			:include-points="covers"
+			@markertap="showRoute"
+			id="myMap"
+			show-location
+		></map>
+		<slider :value="progress" @change="sliderChange" @changing="trackState = 2" activeColor="#FFD090" block-color="#D65600" />
+		<view class="fn">
+			<button @tap="trackState = trackState == 1 ? 2 : 1">{{ ['开始', '暂停', '继续'][trackState] }}</button>
+			<button @tap="trackState = 0">终止</button>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'xbdMaptrack',
+	props: ['isauto', 'covers', 'polyline'], //是否自动播放和轨迹数据
+	data() {
+		return {
+			trackLength: 0, //轨迹长度
+			trackkey: 0, //轨迹点
+			progress: 0, // 进度条
+			mapContext: '',
+			terval: false, //计时器
+			trackState: 0 //轨迹播放状态 0未开始 1播放 2暂停
+		};
+	},
+	watch: {
+		trackState(k) {
+			//监听播放状态改变
+			if (k == 1 && !this.terval) return this.trackplay();
+			clearInterval(this.terval);
+			this.terval = false;
+			//进度停止时返回当前轨迹的key值与坐标值
+			this.$emit('getStopTrack',{key:this.trackkey,track:this.polyline[0].points[this.trackkey]})
+			if (k !== 0) return;
+			this.trackkey = 0;
+			this.progress = 0;
+			this.trackMove();
+		},
+	},
+	created() {
+		this.mapContext = uni.createMapContext('myMap', this);
+		setTimeout(() => {
+			//mapContext 创建后延时设置定位
+			this.trackLength = this.polyline[0].points.length - 1;
+			this.mapContext.moveToLocation(this.covers[0]);
+			if (this.isauto) this.trackState = 1;
+		}, 888);
+	},
+	methods: {
+		/**
+		 * 轨迹播放方法
+		 * @param {number} s = 10 控制移动速度
+		 *
+		 * */
+		trackplay(s = 10) {
+			this.terval = setInterval(() => {
+				this.trackkey++;
+				if (this.trackkey >= this.trackLength) {
+					clearInterval(this.terval);
+					this.trackState = 0;
+					this.trackkey = 0;
+					this.terval = false;
+				}
+				this.progress = ((this.trackkey * 100) / this.trackLength).toFixed(1);
+				this.trackMove();
+			}, s);
+		},
+		/**
+		 * 轨迹移动方法
+		 * @param {number} markerId = 2  指定 marker的id
+		 * @param {object} destination ={latitude,longitude} 指定 marker 移动到的目标点
+		 * @param {number} duration = 100 动画持续时长
+		 * @param {void} animationEnd = ()=>{} 轨迹动画完成后回调
+		 * @param {void} fail 轨迹回放失败回调
+		 *
+		 * */
+		trackMove(markerId = 2, destination = this.polyline[0].points[this.trackkey], duration = 100, animationEnd = () => {}, fail = e => console.log('轨迹回放失败', e)) {
+			this.mapContext.translateMarker({
+				markerId,
+				destination,
+				duration,
+				animationEnd,
+				fail
+			});
+		},
+		//进度条改变了调用方法
+		sliderChange(e) {
+			this.trackkey = ((e.detail.value / 100) * this.trackLength).toFixed(0);
+			//进度条改变时返回当前轨迹的key值与坐标值
+			this.$emit('getStopTrack',{key:this.trackkey,track:this.polyline[0].points[this.trackkey]})
+		}
+	}
+};
+</script>
+
+<style>
+.content {
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: center;
+}
+
+.logo {
+	height: 200rpx;
+	width: 200rpx;
+	margin-top: 200rpx;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 50rpx;
+}
+
+.text-area {
+	display: flex;
+	justify-content: center;
+}
+.fn {
+	position: fixed;
+	bottom: 22%;
+	text-align: center;
+	z-index: 100;
+}
+.title {
+	font-size: 36rpx;
+	color: #8f8f94;
+}
+slider {
+	width: 88%;
+	height: 12px;
+	margin-left: 2.5%;
+}
+</style>

+ 145 - 0
components/xbdMaptrack/xbdMaptrack.vue

@@ -0,0 +1,145 @@
+<template>
+	<view class="content">
+		<map style="width: 100%; height: 100%;position: fixed;" :markers="covers" :polyline="polyline"
+			:include-points="covers" @markertap="showRoute" id="myMap" show-location></map>
+		<slider :value="progress" @change="sliderChange" @changing="trackState = 2" activeColor="#FFD090"
+			block-color="#D65600" />
+		<view class="fn">
+			<button @tap="trackState = trackState == 1 ? 2 : 1">{{ ['开始', '暂停', '继续'][trackState] }}</button>
+			<button @tap="trackState = 0">终止</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: 'xbdMaptrack',
+		props: ['isauto', 'covers', 'polyline'], //是否自动播放和轨迹数据
+		data() {
+			return {
+				trackLength: 0, //轨迹长度
+				trackkey: 0, //轨迹点
+				progress: 0, // 进度条
+				mapContext: '',
+				terval: false, //计时器
+				trackState: 0 //轨迹播放状态 0未开始 1播放 2暂停
+			};
+		},
+		watch: {
+			trackState(k) {
+				//监听播放状态改变
+				if (k == 1 && !this.terval) return this.trackplay();
+				clearInterval(this.terval);
+				this.terval = false;
+				//进度停止时返回当前轨迹的key值与坐标值
+				this.$emit('getStopTrack', {
+					key: this.trackkey,
+					track: this.polyline[0].points[this.trackkey]
+				})
+				if (k !== 0) return;
+				this.trackkey = 0;
+				this.progress = 0;
+				this.trackMove();
+			},
+		},
+		created() {
+			this.mapContext = uni.createMapContext('myMap', this);
+			setTimeout(() => {
+				//mapContext 创建后延时设置定位
+				this.trackLength = this.polyline[0].points.length - 1;
+				this.mapContext.moveToLocation(this.covers[0]);
+				if (this.isauto) this.trackState = 1;
+			}, 888);
+		},
+		methods: {
+			showRoute() {},
+			/**
+			 * 轨迹播放方法
+			 * @param {number} s = 10 控制移动速度
+			 *
+			 * */
+			trackplay(s = 10) {
+				this.terval = setInterval(() => {
+					this.trackkey++;
+					if (this.trackkey >= this.trackLength) {
+						clearInterval(this.terval);
+						this.trackState = 0;
+						this.trackkey = 0;
+						this.terval = false;
+					}
+					this.progress = ((this.trackkey * 100) / this.trackLength).toFixed(1);
+					this.trackMove();
+				}, s);
+			},
+			/**
+			 * 轨迹移动方法
+			 * @param {number} markerId = 2  指定 marker的id
+			 * @param {object} destination ={latitude,longitude} 指定 marker 移动到的目标点
+			 * @param {number} duration = 100 动画持续时长
+			 * @param {void} animationEnd = ()=>{} 轨迹动画完成后回调
+			 * @param {void} fail 轨迹回放失败回调
+			 *
+			 * */
+			trackMove(markerId = 2, destination = this.polyline[0].points[this.trackkey], duration = 100, animationEnd =
+			() => {}, fail = e => console.log('轨迹回放失败', e)) {
+				this.mapContext.translateMarker({
+					markerId,
+					destination,
+					duration,
+					animationEnd,
+					fail
+				});
+			},
+			//进度条改变了调用方法
+			sliderChange(e) {
+				this.trackkey = ((e.detail.value / 100) * this.trackLength).toFixed(0);
+				//进度条改变时返回当前轨迹的key值与坐标值
+				this.$emit('getStopTrack', {
+					key: this.trackkey,
+					track: this.polyline[0].points[this.trackkey]
+				})
+			}
+		}
+	};
+</script>
+
+<style>
+	.content {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.logo {
+		height: 200rpx;
+		width: 200rpx;
+		margin-top: 200rpx;
+		margin-left: auto;
+		margin-right: auto;
+		margin-bottom: 50rpx;
+	}
+
+	.text-area {
+		display: flex;
+		justify-content: center;
+	}
+
+	.fn {
+		position: fixed;
+		bottom: 22%;
+		text-align: center;
+		z-index: 100;
+	}
+
+	.title {
+		font-size: 36rpx;
+		color: #8f8f94;
+	}
+
+	slider {
+		width: 88%;
+		height: 12px;
+		margin-left: 2.5%;
+	}
+</style>

+ 66 - 3
main.js

@@ -226,9 +226,9 @@ const doRequest = (method, url, data, header) => {
 			success: function(result) {
 				// console.log(result,111111111111)
 				// uni.hideLoading()
-					resolve(result)
+				resolve(result)
 				// resolve调用后,即可传递到调用方使用then或者async+await同步方式进行处理逻辑
-				
+
 			},
 			fail: function(e) {
 				uni.hideLoading()
@@ -244,6 +244,67 @@ const doRequest = (method, url, data, header) => {
 
 }
 
+//根据经纬度获取地点
+const getPlace = (method, url, data, header) => {
+	var contentheader = 'application/json'
+	if (header) {
+		contentheader = header
+	}
+	let baseUrl = "https://restapi.amap.com"
+	return new Promise((resolve, reject) => {
+		uni.request({
+			method: method,
+			url: baseUrl + url,
+			data: data,
+			header: {
+				'content-type': contentheader
+			},
+			success: function(result) {
+				resolve(result)
+			},
+			fail: function(e) {
+				uni.hideLoading()
+				console.log('error in...', e)
+				uni.showToast({
+					title: e
+				})
+				reject(e)
+			},
+		})
+	})
+
+}
+// 转换为高德经纬度
+const changeLocation = (method, url, data, header) => {
+	var contentheader = 'application/json'
+	if (header) {
+		contentheader = header
+	}
+	let baseUrl = "https://restapi.amap.com"
+	return new Promise((resolve, reject) => {
+		uni.request({
+			method: method,
+			url: baseUrl + url,
+			data: data,
+			header: {
+				'content-type': contentheader
+			},
+			success: function(result) {
+				resolve(result)
+			},
+			fail: function(e) {
+				uni.hideLoading()
+				console.log('error in...', e)
+				uni.showToast({
+					title: e
+				})
+				reject(e)
+			},
+		})
+	})
+
+}
+
 
 const uploadImg = (successCallback) => {
 	let baseUrl = config.def().baseUrl
@@ -362,7 +423,9 @@ Vue.prototype.$api = {
 	isVip,
 	setUserInfo,
 	defConfig,
-	globalData
+	globalData,
+	getPlace,
+	changeLocation
 };
 //#ifdef H5
 Vue.prototype.$jweixin = jweixin;

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "易粮易运",
     "appid" : "__UNI__7297DA2",
     "description" : "易粮易运——为天下粮食人服务的App",
-    "versionName" : "2.1.177",
-    "versionCode" : 21177,
+    "versionName" : "2.1.184",
+    "versionCode" : 21184,
     "transformPx" : false,
     /* SDK配置 */
     "quickapp" : {},

+ 39 - 28
pages.json

@@ -616,7 +616,7 @@
 				"navigationBarTitleText": "头像",
 				"enablePullDownRefresh": true
 			}
-		},{
+		}, {
 			"path": "pages/user/upload",
 			"style": {
 				"navigationBarTitleText": "头像",
@@ -1491,9 +1491,9 @@
 				"navigationBarTitleText": "添加轨迹",
 				"enablePullDownRefresh": false,
 				"app-plus": {
-					"titleNView": false , //禁用原生导航栏
-					"subNVues":[ {//弹出层
-						"id": "popview",//页面进行跳转时需要用,必须有,且要唯一
+					"titleNView": false, //禁用原生导航栏
+					"subNVues": [{ //弹出层
+						"id": "popview", //页面进行跳转时需要用,必须有,且要唯一
 						"path": "pages/fuelfilling/popup",
 						"style": {
 							"position": "absolute",
@@ -1501,9 +1501,9 @@
 							"mask": "rgba(0,0,0,0.3)",
 							"width": "100%",
 							"height": "100%",
-							"background":"rgba(0,0,0,0.3)"
+							"background": "rgba(0,0,0,0.3)"
 						}
-				 
+
 					}]
 				}
 			}
@@ -1515,12 +1515,20 @@
 				"enablePullDownRefresh": false
 			}
 
+		},
+		{
+			"path": "pages/fuelfilling/apply_for_edit_reimbursement",
+			"style": {
+				"navigationBarTitleText": "编辑申请",
+				"enablePullDownRefresh": false
+			}
+
 		}, {
 			"path": "pages/fuelfilling/apply_see_reimbursement",
 			"style": {
 				"navigationBarTitleText": "查看申请",
 				"enablePullDownRefresh": false,
-				"softinputMode":"adjustResize"
+				"softinputMode": "adjustResize"
 			}
 
 		}, {
@@ -1600,7 +1608,7 @@
 				"enablePullDownRefresh": false
 			}
 
-		},{
+		}, {
 			"path": "pages/fuelfilling/selectWarehouse",
 			"style": {
 				"navigationBarTitleText": "选择仓库",
@@ -1729,30 +1737,33 @@
 				"enablePullDownRefresh": false
 			}
 
+		}, {
+			"path": "pages/reimbursement/addaccessory",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/business/search",
+			"style": {
+				"navigationBarTitleText": "搜索",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/fuelfilling/popup",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
 		}
 	    ,{
-            "path" : "pages/reimbursement/addaccessory",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/business/search",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "搜索",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/fuelfilling/popup",
+            "path" : "pages/task/playMap",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "",
+                "navigationBarTitleText": "播放轨迹",
                 "enablePullDownRefresh": false
             }
             

+ 510 - 0
pages/fuelfilling/apply_for_edit_reimbursement.vue

@@ -0,0 +1,510 @@
+<template>
+	<view class="center">
+		<view>
+			<view class='wrap1'>
+				<view class="c-row">
+					<view class="title">车牌号</view>
+					<view class="con-list">
+						<picker :range="carNolist" range-key="carNo" @change='carnopicker($event)' mode="selector">
+							<view>{{detailData.carNo?detailData.carNo:'请选择车牌号 >'}}</view>
+						</picker>
+					</view>
+				</view>
+				<view class="c-row">
+					<view class="title">油耗(升)</view>
+					<view class="con-list">
+						<input type='digit' v-model='detailData.fillingDetailInfo.oilConsumption' placeholder="请输入油耗"
+							@input='calculate()'></input>
+					</view>
+				</view>
+				<view class="c-row">
+					<view class="title">当前油价(元/升)</view>
+					<view class="con-list">
+						<input type="digit" v-model='detailData.fillingDetailInfo.currentOilPrice' placeholder="请输入当前油价"
+							@input='calculate()'></input>
+					</view>
+				</view>
+				<view class="c-row">
+					<view class="title">计算金额(元)</view>
+					<view class="con-list">
+						<input type="digit" v-model='detailData.fillingDetailInfo.currentConsumption'
+							placeholder="不可编辑,自动计算" :disabled="true"></input>
+					</view>
+				</view>
+				<view class="c-row">
+					<view class="title">加油凭证</view>
+				</view>
+				<view class="voucher">
+					<u-upload imageMode='aspectFill' class="upload" :ref="'upload'" name='fileName'
+						:file-list="detailData.fillingDetailInfo.urlList" :form-data="{companyId: pcUserInfo.compId,
+								modelId: '',
+								vesselId: ''}" :action="action" :max-size="maxSize" :max-count="9" :size-type="['compressed']"
+						@on-success="getImgUrl($event)" @on-remove="onRemove($event)" :show-progress='false'
+						:limitType="['png', 'jpg', 'jpeg', 'webp', 'gif']" @on-progress="onProgress"></u-upload>
+				</view>
+			</view>
+			<view class="c-row">
+				<view class="left">备注</view>
+			</view>
+			<view style='position:relative;' class="wrap1 no-boder">
+				<u-input ref='textarea' class='textarea' v-model="detailData.remark" :type="typeRemark" :border="border"
+					placeholder="选填,不超过150字" :height="height" :auto-height="autoHeight" maxlength="150" />
+				<view class="remark">
+					{{detailData.remark?detailData.remark.length:'0'}}/150个字
+				</view>
+			</view>
+			<view class="footer">
+				<view @click='submitApply' class="button">提交申请</view>
+			</view>
+		</view>
+		<u-modal v-model="show" @confirm='submit' content="确定提交申请信息?" :show-cancel-button='true'></u-modal>
+	</view>
+</template>
+
+<script>
+	import * as config from '../../config'
+	import upload from '@/components/upload.vue';
+	export default {
+		components: {
+			upload,
+		},
+		data() {
+			return {
+				id: "",
+				carNolist: [],
+				detailData: {
+					fillingDetailInfo: {
+						oilConsumption: ''
+					}
+				},
+				height: 150,
+				autoHeight: true,
+				typeRemark: 'textarea',
+				border: true,
+				show: false,
+				show1: false,
+				purposeList: [{
+						purpose: "合同费用"
+					},
+					{
+						purpose: "库点费用"
+					},
+				],
+				pcUserInfo: uni.getStorageSync('pcUserInfo'),
+				action: config.def().baseUrlNew + 'appendix/api/uploadFiles',
+				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
+				btnLoading: false, //防止重复点击
+				isAdd: true,
+				tfc: "",
+				totalCost: "",
+			}
+		},
+		onLoad(options) {
+			console.log(options.id)
+			this.id = options.id
+			this.getInfo()
+
+		},
+		onShow() {
+
+		},
+		methods: {
+			getInfo() {
+				var that = this
+				uni.showLoading({
+					mask: true,
+					title: "加载中..."
+				})
+				this.$api.doRequest('get', '/fuelFillingInfo/getFilling', {
+					id: this.id
+				}).then(res => {
+					uni.hideLoading()
+					if (res.data.code == 200) {
+						this.detailData = res.data.data
+						// if (this.detailData.fillingDetailInfoList) {
+						// 	for (let i = 0; i < this.detailData.fillingDetailInfoList.length; i++) {
+						let urlList = []
+						if (this.detailData.fillingDetailInfo.addressUrl) {
+							let datalist = this.detailData.fillingDetailInfo.addressUrl.split(",")
+							for (let j = 0; j < datalist.length; j++) {
+								urlList.push({
+									url: datalist[j]
+								})
+							}
+							this.detailData.fillingDetailInfo.urlList = urlList
+						}
+					}
+				})
+			},
+			carnopicker(e) {
+				this.detailData.carNo = this.carNolist[e.target.value].carNo
+			},
+			selectCon() {
+				uni.navigateTo({
+					url: '/pages/fuelfilling/selectContract'
+				})
+			},
+			selectWare() {
+				uni.navigateTo({
+					url: '/pages/fuelfilling/selectWarehouse?warehouseType=1'
+				})
+			},
+			ltCheck(e) {
+				this.detailData.purpose = this.purposeList[e[0]].purpose
+				if (this.detailData.purpose == "合同费用") {
+					this.detailData.expensesPurpose = "1"
+					delete this.detailData.warehouseName
+
+				} else if (this.detailData.purpose == "库点费用") {
+					this.detailData.expensesPurpose = "3"
+					delete this.detailData.contractNo
+
+				}
+				console.log(this.detailData)
+			},
+			getImgUrl(res, index) {
+				if (typeof(this.detailData.fillingDetailInfo.addressUrl) == 'string') {
+					this.detailData.fillingDetailInfo.addressUrl = this.detailData.fillingDetailInfo.addressUrl.split(',')
+				}
+
+				this.detailData.fillingDetailInfo.addressUrl.push(res.data.appendixPath)
+
+				console.log(this.detailData.fillingDetailInfo)
+				// console.log('------------res-----------')
+			},
+			onError(error) {
+				alert(error)
+				console.log('------------error-----------')
+				console.log(error)
+			},
+			onProgress(e) {
+				console.log(e)
+			},
+			onRemove(index, num) {
+				if (typeof(this.detailData.fillingDetailInfo.addressUrl) == 'string') {
+					this.detailData.fillingDetailInfo.addressUrl = this.detailData.fillingDetailInfo.addressUrl.split(',')
+				}
+				this.detailData.fillingDetailInfo.addressUrl.splice(index, 1)
+			},
+			filterFileType(index, lists) {
+				console.log(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() {
+
+				this.detailData.fillingDetailInfo.currentConsumption = (this.detailData.fillingDetailInfo.oilConsumption *
+					this.detailData.fillingDetailInfo.currentOilPrice).toFixed(2)
+			},
+			submitApply() {
+				var that = this
+				if (!this.detailData.fillingDetailInfo.oilConsumption) {
+					uni.showToast({
+						title: "油耗不能为空!",
+						icon: "none"
+					})
+					return
+				}
+				if (!this.detailData.fillingDetailInfo.currentOilPrice) {
+					uni.showToast({
+						title: "当前油价不能为空!",
+						icon: "none"
+					})
+					return
+				}
+				if (this.detailData.fillingDetailInfo.addressUrl.length == 0) {
+					uni.showToast({
+						title: "请上传加油凭证!",
+						icon: "none"
+					})
+					return
+				}
+				this.show = true
+			},
+			submit() {
+				var that = this
+				uni.showLoading({
+					title: '加载中',
+					mask: true
+				});
+				this.detailData.fillingDetailInfo.tfc = that.tfc
+				this.detailData.fillingDetailInfo.totalCost = that.totalCost
+				this.detailData.fillingDetailInfo.compId = uni.getStorageSync('pcUserInfo').compId
+				this.detailData.fillingDetailInfo.addressUrl = this.detailData.fillingDetailInfo.addressUrl.toString()
+				this.detailData.fillingDetailInfo.compId = uni.getStorageSync('pcUserInfo').compId
+				this.detailData.flag = 2
+				delete this.detailData.fillingDetailInfo.urlList
+				that.$api.doRequest('post', '/fuelFillingInfo/api/addFilling', this.detailData)
+					.then(res => {
+						console.log(res)
+						uni.hideLoading()
+						// uni.navigateBack()
+						// if (res1.data.code == 200) {
+						// 	this.titleBtn = "申请报销"
+						// }
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			}
+		}
+	}
+</script>
+
+<style lang='scss' scoped>
+	.center {
+		overflow: hidden;
+	}
+
+	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: 20rpx 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;
+		width: 100%;
+		padding: 20px 10px;
+		position: fixed;
+		bottom: 0;
+
+		.button {
+			background: #4089ff;
+			width: 90%;
+			margin: 0px 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;
+	}
+
+	.remark {
+		position: absolute;
+		right: 10px;
+		bottom: 20px;
+		color: #AFB3BF;
+	}
+
+	.voucher {
+		margin-left: 20rpx;
+	}
+
+	.wrap1 {
+		/* padding-bottom: 10px; */
+		font-size: 14px;
+		/* background: #fff; */
+		margin: 10px;
+		border-radius: 10px;
+
+		input {
+			font-size: 14px;
+		}
+
+		>.title {
+			padding: 10px 16px;
+		}
+
+	}
+
+	/deep/.u-list-item {
+		width: 27vw !important;
+		height: 27vw !important;
+	}
+</style>

+ 214 - 307
pages/fuelfilling/apply_for_reimbursement.vue

@@ -2,97 +2,37 @@
 	<view class="center">
 		<view>
 			<view class='wrap'>
-				<view class="c-row">
-					<view class="title">车牌号</view>
-					<view class="con-list">
-						<input maxlength="7" v-model='detailData.carNo' type="text">
 
-					</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'>
+
 				<view class="c-row">
-					<view class="left">备注</view>
-				</view>
-				<view style='position:relative;' class="wrap1 no-boder">
-					<u-input ref='textarea' class='textarea' v-model="detailData.remark" :type="typeRemark" :border="border"
-						placeholder="选填,不超过150字" :height="height" :auto-height="autoHeight" maxlength="150" />
-					<view class="remark">
-						{{detailData.remark?detailData.remark.length:'0'}}/150个字
-					</view>
-				</view>
-				<!-- <view class="c-row">
-					<view class="title">用途</view>
-					<view class="con-list">
-						<view @click='show1=true'>{{detailData.purpose?detailData.purpose:'选择用途'}}
-							<u-icon name="arrow-right" color=""></u-icon>
-						</view>
-						<u-picker :range="purposeList" range-key="purpose" @confirm='ltCheck($event)' v-model="show1"
-							mode="selector">
-						</u-picker>
-					</view>
-				</view>
-				<view class="c-row" v-if="detailData.purpose == '库点费用'">
-					<view class="title">仓库名称</view>
+					<view class="title">车牌号</view>
 					<view class="con-list">
-						<view @click='selectWare()'>{{detailData.warehouseName?detailData.warehouseName:"请选择仓库名称"}}
-							<u-icon name="arrow-right" color=""></u-icon>
-						</view>
+						<picker :range="carNolist" range-key="carNo" @change='carnopicker($event)' mode="selector">
+							<view>{{detailData.carNo?detailData.carNo:'请选择车牌号 >'}}</view>
+						</picker>
 					</view>
 				</view>
-				<view class="c-row" v-if="detailData.purpose == '合同费用'">
-					<view class="title">合同编号</view>
-					<view class="con-list">
-						<view @click='selectCon'>{{detailData.contractNo?detailData.contractNo:"请选择合同编号"}}
-							<u-icon name="arrow-right" color=""></u-icon>
-						</view>
-					</view>
-				</view> -->
-			</view>
-			<view class='wrap1' v-for="(item , index) in fillingDetail.fillingDetailInfoList" :Key="index">
-				<view class="tit">加油-{{item.serialNumber}}</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)">
-				</image>
 				<view class="c-row">
 					<view class="title">油耗(升)</view>
 					<view class="con-list">
-						<input type='digit' v-model='item.oilConsumption' placeholder="请输入油耗" @input='calculate(index)'></input>
+						<input type='digit' v-model='fillingDetail.oilConsumption' placeholder="请输入油耗"
+							@input='calculate()'></input>
 					</view>
 				</view>
 				<view class="c-row">
 					<view class="title">当前油价(元/升)</view>
 					<view class="con-list">
-						<input type="digit" v-model='item.currentOilPrice' placeholder="请输入当前油价"
-							@input='calculate(index)'></input>
+						<input type="digit" v-model='fillingDetail.currentOilPrice' placeholder="请输入当前油价"
+							@input='calculate()'></input>
 					</view>
 				</view>
 				<view class="c-row">
 					<view class="title">计算金额(元)</view>
 					<view class="con-list">
-						<input type="digit" v-model='item.currentConsumption' placeholder="不可编辑,自动计算"
+						<input type="digit" v-model='fillingDetail.currentConsumption' placeholder="不可编辑,自动计算"
 							:disabled="true"></input>
 					</view>
 				</view>
@@ -100,20 +40,30 @@
 					<view class="title">加油凭证</view>
 				</view>
 				<view class="voucher">
-					<u-upload  imageMode='aspectFill' class="upload" :ref="'upload'+index" name='fileName' :file-list="item.fileList" :form-data="{companyId: pcUserInfo.compId,
+					<u-upload imageMode='aspectFill' class="upload" :ref="'upload'" name='fileName'
+						:file-list="fillingDetail.fileList" :form-data="{companyId: pcUserInfo.compId,
 								modelId: '',
-								vesselId: ''}" :action="action"  :max-size="maxSize" :max-count="9"
-						:size-type="['compressed']" @on-success="getImgUrl($event,index)" 
-						@on-remove="onRemove($event,index)" :show-progress='false' :limitType ="['png', 'jpg', 'jpeg', 'webp', 'gif']"
-						@on-progress="onProgress"></u-upload>
+								vesselId: ''}" :action="action" :max-size="maxSize" :max-count="9" :size-type="['compressed']"
+						@on-success="getImgUrl($event)" @on-remove="onRemove($event)" :show-progress='false'
+						:limitType="['png', 'jpg', 'jpeg', 'webp', 'gif']" @on-progress="onProgress"></u-upload>
 					<!-- <upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="9"
 						: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="c-row">
+				<view class="left">备注</view>
+			</view>
+			<view style='position:relative;' class="wrap1 no-boder">
+				<u-input ref='textarea' class='textarea' v-model="detailData.remark" :type="typeRemark" :border="border"
+					placeholder="选填,不超过150字" :height="height" :auto-height="autoHeight" maxlength="150" />
+				<view class="remark">
+					{{detailData.remark?detailData.remark.length:'0'}}/150个字
+				</view>
+			</view>
 			<view class="footer">
-				<view class="c-row">
+				<!-- 	<view class="c-row">
 					<view class="title">总油耗(升)</view>
 					<view class="con-list">
 						<input :disabled="true" v-model='tfc' placeholder="不可编辑,自动计算" type="digit"></input>
@@ -124,11 +74,13 @@
 					<view class="con-list">
 						<input :disabled="true" v-model='totalCost' placeholder="不可编辑,自动计算" type="digit"></input>
 					</view>
-				</view>
-				<view @click='submitApply' class="button">提交申请</view>
+				</view> -->
+				<view class="button1" v-if="isUseSubmit">提交申请</view>
+				<view @click='submitApply' class="button" v-else>提交申请</view>
 			</view>
 		</view>
-		<u-modal v-model="show" @confirm='submit' content="确定提交申请信息?" :show-cancel-button='true' ></u-modal>
+		<u-modal v-model="show" @confirm='submit' content="确定提交申请信息?" :show-cancel-button='true'></u-modal>
+		<u-toast ref="uToast" />
 	</view>
 </template>
 
@@ -141,6 +93,9 @@
 		},
 		data() {
 			return {
+				isUseSubmit: false,
+				amountDeadline: "",
+				carNolist: [],
 				detailData: {
 					carNo: '',
 					destinationProvince: "",
@@ -158,8 +113,8 @@
 				autoHeight: true,
 				typeRemark: 'textarea',
 				border: true,
-				show:false,
-				show1:false,
+				show: false,
+				show1: false,
 				purposeList: [{
 						purpose: "合同费用"
 					},
@@ -167,22 +122,20 @@
 						purpose: "库点费用"
 					},
 				],
-				pcUserInfo :uni.getStorageSync('pcUserInfo'),
+				pcUserInfo: uni.getStorageSync('pcUserInfo'),
 				fillingDetail: {
-					fillingDetailInfoList: [{
-						serialNumber:1,
-						oilConsumption: "",
-						currentOilPrice: "",
-						currentConsumption: "",
-						addressUrl: [],
-						compId: uni.getStorageSync('pcUserInfo').compId,
-						commonId: uni.getStorageSync('pcUserInfo').userId,
-						fillingId: "",
-					}],
+					serialNumber: 1,
+					oilConsumption: "",
+					currentOilPrice: "",
+					currentConsumption: "",
+					addressUrl: [],
+					compId: uni.getStorageSync('pcUserInfo').compId,
+					commonId: uni.getStorageSync('pcUserInfo').userId,
+					fillingId: "",
 					tfc: "",
 					totalCost: ""
 				},
-				action: config.def().baseUrlNew+ 'appendix/api/uploadFiles',
+				action: config.def().baseUrlNew + 'appendix/api/uploadFiles',
 				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
 				btnLoading: false, //防止重复点击
 				isAdd: true,
@@ -190,39 +143,69 @@
 				totalCost: "",
 			}
 		},
-		onLoad(options) {
-			this.height1 = uni.getSystemInfoSync().windowHeight
-			this.id = options.id
-			this.fillingDetail.fillingDetailInfoList[0].fillingId = this.id
-			var that = this
-			if (this.id) {
-				this.seeInfo()
-			}
+		async onLoad(options) {
+			//获取车牌号
+			await this.$api.doRequest('get', '/carInfo/selectCars', {
+					currentPage: 1,
+					pageSize: 9999,
+					compId: uni.getStorageSync('pcUserInfo').compId,
+				})
+				.then(res1 => {
+					console.log(111)
+					console.log(res1)
+					if (res1.data.code == 200) {
+						this.carNolist = res1.data.data.records
+					}
+				})
+				.catch(res => {
+					uni.$u.toast(res.message);
+				});
 		},
 		onShow() {
-			
-			// this.warehouseInfo = uni.getStorageSync('theWarehouse1');
-			// if (this.warehouseInfo && this.detailData.purpose == "库点费用") {
-			// 	this.detailData.warehouseName = this.warehouseInfo.warehouseName
-			// 	this.$forceUpdate()
-			// }
-			// this.contractNoInfo = uni.getStorageSync('reContractNo1');
-			// if (this.contractNoInfo && this.detailData.purpose == "合同费用") {
-			// 	this.detailData.contractId = this.contractNoInfo.id
-			// 	this.detailData.contractNo = this.contractNoInfo.contractNo
-			// 	this.$api.doRequest('get', 'customerInfo/getPayeeInfo', {
-			// 		contractNo: this.detailData.contractNo
-			// 	}).then(res => {
-			// 		this.detailData.payee=res.customerType=="企业客户"?res.compName:res.customerName
-			// 		this.detailData.accountNumber=res.bankCard
-			// 		this.detailData.bank=res.bankDeposit
-			// 		this.detailData.bankBranch=res.bankDepositBranch
-			// 		this.$forceUpdate()
-			// 	})
-			// }
-			
+
+
 		},
 		methods: {
+			carnopicker(e) {
+				this.detailData.carNo = this.carNolist[e.target.value].carNo
+				this.$api.doRequest('get', '/fuelFillingInfo/gettime', {
+						carNo: this.detailData.carNo,
+					})
+					.then(res => {
+						console.log(111)
+						console.log(res)
+						if (res.data.data) {
+							this.amountDeadline = res.data.data
+						} else {
+							uni.showModal({
+								content: res.data.message,
+							})
+							this.isUseSubmit = true
+						}
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
+			async getPlace() {
+				console.log(1)
+				//获取形势轨迹
+				await this.$api.doRequest('post', '/CarPostionController/api/gettrack', {
+						// startDate:uni.getStorageSync('jyStartTime'),
+						// endDate:uni.getStorageSync('jyEndTime'),
+						startDate: "2023-02-20 01:00:00",
+						endDate: "2023-02-20 24:00:00",
+
+					}).then(res => {
+						console.log(res)
+						if (res1.data.code == 200) {
+							// uni.hideLoading()
+						}
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+			},
 			selectCon() {
 				uni.navigateTo({
 					url: '/pages/fuelfilling/selectContract'
@@ -238,62 +221,23 @@
 				if (this.detailData.purpose == "合同费用") {
 					this.detailData.expensesPurpose = "1"
 					delete this.detailData.warehouseName
-			
+
 				} else if (this.detailData.purpose == "库点费用") {
 					this.detailData.expensesPurpose = "3"
 					delete this.detailData.contractNo
-			
+
 				}
 				console.log(this.detailData)
 			},
-			async seeInfo() {
-				await this.$api.doRequest('get', '/fuelFillingInfo/getFilling', {
-					id: this.id
-				}).then(res => {
-					if (res.data.code == 200) {
-						this.detailData = res.data.data
-						if(this.detailData.fillingDetailInfoList&&this.detailData.fillingDetailInfoList.length>0){
-							for (var i = 0; i < this.detailData.fillingDetailInfoList.length; i++) {
-									this.detailData.fillingDetailInfoList[i].serialNumber=i+1
-									this.tfc = (Number(this.tfc) + Number(this.detailData.fillingDetailInfoList[i].oilConsumption))
-										.toFixed(2)
-									this.totalCost = (Number(this.totalCost) + Number(this.detailData.fillingDetailInfoList[i]
-										.currentConsumption)).toFixed(2)
-								this.detailData.fillingDetailInfoList[i].fileList=[]
-								if(this.detailData.fillingDetailInfoList[i].addressUrl){
-									var arr=this.detailData.fillingDetailInfoList[i].addressUrl.split(',')
-									this.detailData.fillingDetailInfoList[i].addressUrl=arr
-									for (var q = 0; q < arr.length; q++) {
-										if(arr[q]!=''){
-											this.detailData.fillingDetailInfoList[i].fileList.push({url:arr[q]})
-										}
-									}
-									
-								}
-							}
-							this.fillingDetail.fillingDetailInfoList=this.detailData.fillingDetailInfoList
-							this.$forceUpdate()
-						}
-						console.log(this.fillingDetail.fillingDetailInfoList)
-						// if(this.detailData.fillingDetailInfoList){
-						// 	this.fillingDetail.fillingDetailInfoList[0].serialNumber=this.detailData.fillingDetailInfoList.length+1
-						// }
-					}
-				})
-			},
+
 			getImgUrl(res, index) {
-				if(typeof(this.fillingDetail.fillingDetailInfoList[index].addressUrl)=='string'){
-					this.fillingDetail.fillingDetailInfoList[index].addressUrl=this.fillingDetail.fillingDetailInfoList[index].addressUrl.split(',')
+				if (typeof(this.fillingDetail.addressUrl) == 'string') {
+					this.fillingDetail.addressUrl = this.fillingDetail.addressUrl.split(',')
 				}
-				
-				this.fillingDetail.fillingDetailInfoList[index].addressUrl.push(res.data.appendixPath)
-				// 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(this.fillingDetail.fillingDetailInfoList[index])
+
+				this.fillingDetail.addressUrl.push(res.data.appendixPath)
+
+				console.log(this.fillingDetail)
 				// console.log('------------res-----------')
 			},
 			onError(error) {
@@ -305,12 +249,12 @@
 				console.log(e)
 			},
 			onRemove(index, num) {
-				if(typeof(this.fillingDetail.fillingDetailInfoList[num].addressUrl)=='string'){
-					this.fillingDetail.fillingDetailInfoList[num].addressUrl=this.fillingDetail.fillingDetailInfoList[num].addressUrl.split(',')
+				if (typeof(this.fillingDetail.addressUrl) == 'string') {
+					this.fillingDetail.addressUrl = this.fillingDetail.addressUrl.split(',')
 				}
-				this.fillingDetail.fillingDetailInfoList[num].addressUrl.splice(index, 1)
-				
-				
+				this.fillingDetail.addressUrl.splice(index, 1)
+
+
 			},
 			filterFileType(index, lists) {
 				console.log(lists)
@@ -326,149 +270,93 @@
 				}
 			},
 			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()
-				}
+
+				this.fillingDetail.currentConsumption = (this.fillingDetail.oilConsumption * this.fillingDetail
+					.currentOilPrice).toFixed(2)
 			},
-			delApply(index) {
+			submitApply() {
 				var that = this
-				if(this.fillingDetail.fillingDetailInfoList.length>1){
-					if(this.fillingDetail.fillingDetailInfoList[index].id){
-						that.$api.doRequest('post', '/fillingDetailInfo/deleteInfo',
-								{id:this.fillingDetail.fillingDetailInfoList[index].id}
-							)
-							.then(res => {
-								uni.hideLoading()
-								if (res.data.code == 200) {
-									that.$api.msg('删除成功')
-					
-								} else {
-									that.$api.msg('删除失败')
-									return
-								}
-							})
-					}
-					console.log(this.$refs,this.$refs[`upload${index}`])
-					// this.$refs[`upload${index}`].clear
-					this.$refs[`upload${index}`][0].clear()
-					this.fillingDetail.fillingDetailInfoList[index].fileList=[]
-					this.fillingDetail.fillingDetailInfoList.splice(index, 1)
-					console.log(this.fillingDetail.fillingDetailInfoList)
-					this.tfc=0
-					this.totalCost=0
-					for (var i = 0; i < this.fillingDetail.fillingDetailInfoList.length; i++) {
-						if(this.fillingDetail.fillingDetailInfoList[i].addressUrl.length>0){
-							this.fillingDetail.fillingDetailInfoList[i].fileList=[]
-							var arr=this.fillingDetail.fillingDetailInfoList[i].addressUrl
-							for (var q = 0; q < arr.length; q++) {
-								if(arr[q]!=''){
-									this.fillingDetail.fillingDetailInfoList[i].fileList.push({url:arr[q]})
-								}
-							}
-						}
-						console.log(this.fillingDetail.fillingDetailInfoList)
-						this.fillingDetail.fillingDetailInfoList[i].serialNumber=i+1
-						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()
-				}else{
+				if (!that.fillingDetail.oilConsumption) {
 					uni.showToast({
-						title: "至少要保留1条不可删除的!",
+						title: "油耗不能为空!",
 						icon: "none"
 					})
+					return
 				}
-				
-			},
-			addApply() {
-				this.fillingDetail.fillingDetailInfoList.push({
-					serialNumber:Number(this.fillingDetail.fillingDetailInfoList[this.fillingDetail.fillingDetailInfoList.length-1].serialNumber)+1,
-					oilConsumption: "",
-					currentOilPrice: "",
-					currentConsumption: "",
-					addressUrl: [],
-					compId: uni.getStorageSync('pcUserInfo').compId,
-					commonId: uni.getStorageSync('pcUserInfo').userId,
-					fillingId: this.id
-				})
-			},
-			submitApply() {
-				var that = this
-				for (let i = 0; i < that.fillingDetail.fillingDetailInfoList.length; i++) {
-					let count = i + 1
-					if (!that.fillingDetail.fillingDetailInfoList[i].oilConsumption) {
-						uni.showToast({
-							title: "加油-" + count + " 油耗不能为空!",
-							icon: "none"
-						})
-						return
-					}
-					if (!that.fillingDetail.fillingDetailInfoList[i].currentOilPrice) {
-						uni.showToast({
-							title: "加油-" + count + " 当前油价不能为空!",
-							icon: "none"
-						})
-						return
-					}
-					if (that.fillingDetail.fillingDetailInfoList[i].addressUrl.length == 0) {
-						uni.showToast({
-							title: "加油-" + count + " 请上传加油凭证!",
-							icon: "none"
-						})
-						return
-					}
+				if (!that.fillingDetail.currentOilPrice) {
+					uni.showToast({
+						title: "当前油价不能为空!",
+						icon: "none"
+					})
+					return
+				}
+				if (that.fillingDetail.addressUrl.length == 0) {
+					uni.showToast({
+						title: "请上传加油凭证!",
+						icon: "none"
+					})
+					return
 				}
-				this.show=true
+				this.show = true
 			},
-			submit(){
-				var that = this
+			submit() {
 				uni.showLoading({
 					title: '加载中',
 					mask: true
 				});
-				that.fillingDetail.carNo=that.detailData.carNo
-				that.fillingDetail.tfc = that.tfc
-				that.fillingDetail.remark=that.detailData.remark
-				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()
+				this.fillingDetail.tfc = this.tfc
+				this.fillingDetail.totalCost = this.totalCost
+				this.fillingDetail.compId = uni.getStorageSync('pcUserInfo').compId
+				this.fillingDetail.addressUrl = this.fillingDetail.addressUrl.toString()
+
+
+				let _obj = {
+					compId: uni.getStorageSync('pcUserInfo').compId,
+					fillingDetailInfo: this.fillingDetail,
+					carNo: this.detailData.carNo,
+					flag: 1,
+					remark: this.detailData.remark,
+					amountDeadline: this.amountDeadline
+
 				}
-				that.$api.doRequest('post', '/fillingDetailInfo/api/addFillingDetail',
-						that.fillingDetail
-					)
+				console.log(_obj)
+				this.$api.doRequest('post', '/fuelFillingInfo/api/addFilling', _obj)
 					.then(res => {
+						console.log(res)
 						uni.hideLoading()
-						if (res.data.code == 200) {
-							that.$api.msg('提交成功')
-							uni.navigateBack({
-								delta: 2
-							});
-						} else {
-							that.$api.msg(res.data.message)
-						}
+						uni.navigateBack()
+						// if (res1.data.code == 200) {
+						// 	this.titleBtn = "申请报销"
+						// }
 					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
+
+
+				// that.$api.doRequest('post', '/fillingDetailInfo/api/addFillingDetail',
+				// 		that.fillingDetail
+				// 	)
+				// 	.then(res => {
+				// 		uni.hideLoading()
+				// 		if (res.data.code == 200) {
+				// 			that.$api.msg('提交成功')
+				// 			uni.navigateBack({
+				// 				delta: 1
+				// 			});
+				// 		} else {
+				// 			that.$api.msg(res.data.message)
+				// 		}
+				// 	})
 			}
 		}
 	}
 </script>
 
 <style lang='scss' scoped>
-	/* .center {
-		padding-bottom: 400rpx;
-	} */
+	.center {
+		overflow: hidden;
+	}
 
 	page {
 		background: #F5F6FA;
@@ -637,6 +525,8 @@
 		background: #fff;
 		width: 100%;
 		padding: 20px 10px;
+		position: fixed;
+		bottom: 0;
 
 		.button {
 			background: #4089ff;
@@ -648,6 +538,17 @@
 			border-radius: 30px;
 			margin-top: 10px;
 		}
+
+		.button1 {
+			background: #F5F6FA;
+			width: 90%;
+			margin: 0px auto;
+			padding: 10px;
+			color: #9b9fa5;
+			text-align: center;
+			border-radius: 30px;
+			margin-top: 10px;
+		}
 	}
 
 
@@ -673,36 +574,42 @@
 	.no-boder {
 		border: 0;
 	}
-	
+
 	.textarea {
 		background: #F9F9FA;
 		border: 1px solid #EEEEEE;
 	}
-	
+
 	.remark {
 		position: absolute;
 		right: 10px;
 		bottom: 20px;
 		color: #AFB3BF;
 	}
-	.voucher{
+
+	.voucher {
 		margin-left: 20rpx;
 	}
+
 	.wrap1 {
-		padding-bottom: 10px;
+		/* padding-bottom: 10px; */
 		font-size: 14px;
-		background: #fff;
+		/* background: #fff; */
 		margin: 10px;
 		border-radius: 10px;
-	
+
 		input {
 			font-size: 14px;
 		}
-	
+
 		>.title {
 			padding: 10px 16px;
 		}
-	
+
 	}
 
+	/deep/.u-list-item {
+		width: 27vw !important;
+		height: 27vw !important;
+	}
 </style>

+ 63 - 109
pages/fuelfilling/apply_see_reimbursement.vue

@@ -1,94 +1,50 @@
 <template>
-	<view>
-		<view class="center u-skeleton">
-			<view class='wrap'>
-				<view class="c-row">
-					<view class="title u-skeleton-rect">车牌号</view>
-					<view class="con-list u-skeleton-rect">
-						{{detailData.carNo}}
-					</view>
-				</view>
-				<view class="c-row u-skeleton-rect">
-					<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 class="c-row">
-					<view class="left">备注</view>
-				</view>
-				<view style='position:relative;' class="wrap1 no-boder">
-					<u-input disabled ref='textarea' class='textarea' v-model="detailData.remark" :type="typeRemark" :border="border"
-						placeholder="选填,不超过150字" :height="height" :auto-height="autoHeight" maxlength="150" />
-					<view class="remark">
-						{{detailData.remark?detailData.remark.length:'0'}}/150个字
-					</view>
+	<view style="overflow: hidden;">
+		<view class='wrap1' style="padding-bottom: 20rpx;">
+			<view class="c-row">
+				<view class="title">车牌号</view>
+				<view class="con-list ">
+					{{detailData.carNo}}
 				</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 class="voucher">
-					<u-upload :action="action" imageMode='aspectFill' :file-list="item.urlList" max-count="1" :deletable="false" :show-progress="false"></u-upload>
+			<view class="c-row">
+				<view class="title">油耗(升)</view>
+				<view class="con-list ">
+					{{detailData.fillingDetailInfo.oilConsumption}}
 				</view>
 			</view>
-			<view class="footer">
-				<view class="c-row">
-					<view class="title">总油耗(升)</view>
-					<view class="con-list  u-skeleton-rect">
-						<input :disabled="true" v-model='detailData.tfc' placeholder="不可编辑,自动计算" type="digit"></input>
-					</view>
+			<view class="c-row">
+				<view class="title">当前油价(元/升)</view>
+				<view class="con-list ">
+					{{detailData.fillingDetailInfo.currentOilPrice}}
 				</view>
-				<view class="c-row">
-					<view class="title">合计金额(元)</view>
-					<view class="con-list u-skeleton-rect">
-						<input :disabled="true" v-model='detailData.totalCost' placeholder="不可编辑,自动计算"
-							type="digit"></input>
-					</view>
+			</view>
+			<view class="c-row">
+				<view class="title">计算金额(元)</view>
+				<view class="con-list">
+					{{detailData.fillingDetailInfo.currentConsumption}}
 				</view>
-				<!-- <view @click='submitApply' class="button">提交申请</view> -->
 			</view>
+			<view class="c-row" style="justify-content: space-between;">
+				<view class="title">加油凭证</view>
+			</view>
+			<view class="voucher">
+				<u-upload :action="action" imageMode='aspectFill' :file-list="detailData.fillingDetailInfo.urlList"
+					max-count="1" :deletable="false" :show-progress="false"></u-upload>
+			</view>
+		</view>
+		<view class="c-row">
+			<view class="left">备注</view>
 		</view>
-		<!-- <u-skeleton class='skeletonwrap' :loading="loading" :animation="true" bgColor="#FFF"></u-skeleton> -->
+		<view style='position:relative;' class="wrap1 no-boder">
+			<u-input disabled ref='textarea' class='textarea' v-model="detailData.remark" :type="typeRemark"
+				:border="border" placeholder="选填,不超过150字" :height="height" :auto-height="autoHeight" maxlength="150" />
+			<view class="remark">
+				{{detailData.remark?detailData.remark.length:'0'}}/150个字
+			</view>
+		</view>
+	</view>
+	<!-- <u-skeleton class='skeletonwrap' :loading="loading" :animation="true" bgColor="#FFF"></u-skeleton> -->
 	</view>
 </template>
 
@@ -100,7 +56,9 @@
 		},
 		data() {
 			return {
-				detailData: {},
+				detailData: {
+					fillingDetailInfo: {}
+				},
 				action: this.$uploadUrl,
 				maxSize: 50 * 1024 * 1024, //限制文件大小 50M
 				btnLoading: false, //防止重复点击
@@ -146,21 +104,17 @@
 				}).then(res => {
 					if (res.data.code == 200) {
 						this.detailData = res.data.data
-						if(this.detailData.fillingDetailInfoList){
-							for (let i = 0; i < this.detailData.fillingDetailInfoList.length; i++) {
-								let urlList = []
-								if (this.detailData.fillingDetailInfoList[i].addressUrl) {
-									let datalist = this.detailData.fillingDetailInfoList[i].addressUrl.split(",")
-									for (let j = 0; j < datalist.length; j++) {
-										urlList.push({
-											url: datalist[j]
-										})
-									}
-									this.detailData.fillingDetailInfoList[i].urlList = urlList
-								}
+						let urlList = []
+						if (this.detailData.fillingDetailInfo.addressUrl) {
+							let datalist = this.detailData.fillingDetailInfo.addressUrl.split(",")
+							for (let j = 0; j < datalist.length; j++) {
+								urlList.push({
+									url: datalist[j]
+								})
 							}
+							this.detailData.fillingDetailInfo.urlList = urlList
 						}
-						
+
 						// setTimeout(()=>{
 						// 	that.loading=false
 						// },1000)
@@ -360,13 +314,10 @@
 	}
 
 	.wrap1 {
-		background: #fff;
 		margin: 10px;
 		border-radius: 15px 10px;
 		margin-top: 18px;
 
-		input {}
-
 		.tit {
 			margin-left: 14px;
 			width: 47px;
@@ -465,39 +416,42 @@
 	.no-boder {
 		border: 0;
 	}
-	
+
 	.textarea {
 		background: #F9F9FA;
 		border: 1px solid #EEEEEE;
 	}
-	
+
 	.remark {
 		position: absolute;
 		right: 10px;
 		bottom: 20px;
 		color: #AFB3BF;
 	}
-	.voucher{
+
+	.voucher {
 		margin-left: 20rpx;
 	}
+
 	.wrap1 {
-		padding-bottom: 10px;
+		/* padding-bottom: 10px; */
 		font-size: 14px;
 		background: #fff;
 		margin: 10px;
 		border-radius: 10px;
-	
+
 		input {
 			font-size: 14px;
 		}
-	
+
 		>.title {
 			padding: 10px 16px;
 		}
-	
+
 	}
-	/deep/.skeletonwrap{
-		height:100vh !important;
-		top:-18px !important;
+
+	/deep/.skeletonwrap {
+		height: 100vh !important;
+		top: -18px !important;
 	}
 </style>

+ 82 - 68
pages/fuelfilling/the_fuel_filling.vue

@@ -19,53 +19,49 @@
 				<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 == '已结束'">{{item.status?item.status:'已结束'}}
-								</view>
-								<view class="audit3" v-if="item.travelStatus == '已报销'">已报销</view>
+								<view class="audit1">{{item.approveStatus?item.approveStatus:item.status}}</view>
 							</view>
 						</view>
 						<view class="car-info">
 							<view class="car-num">车牌号 : {{item.carNo}}</view>
-							<view class="car-date">{{item.createDate.split(" ")[0]}}</view>
+							<view class="car-date">{{item.createDate}}</view>
 						</view>
-						<view v-if='item.tfc&&item.totalCost' class="car-yh">
+						<view class="car-yh">
 							<view class="row">
-								油耗
+								油耗
 								<view class="text">
-									{{item.tfc}}L
+									{{item.fillingDetailInfo.oilConsumption}}L
 								</view>
 							</view>
+							<!-- 			<view class="row">
+								油价
+								<view class="text">
+									{{item.fillingDetailInfo.currentOilPrice}}元
+								</view>
+							</view> -->
 							<view class="row">
-								总价
+								申请费用
 								<view class="text">
-									{{item.totalCost}}元
+									{{item.fillingDetailInfo.currentConsumption}}元
 								</view>
 							</view>
 						</view>
-						<view class="see" v-if="item.status=='已申请'||item.travelStatus=='已结束'" @click.stop="seeInfo(item.id)">
-							<view class="btn">
+						<view class="see">
+							<view class="btn" @click.stop="seeInfo(item.id)"
+								v-if="item.approveStatus=='待加油审批'||item.status=='已通过'">
 								查看
 							</view>
+							<view class="btn" @click.stop="backInfo(item)" v-if="item.approveStatus=='待加油审批'">
+								撤回
+							</view>
+							<view class="btn" @click.stop="editInfo(item.id)" v-if="item.approveStatus=='发起人撤回'">
+								编辑
+							</view>
+							<view class="btn" @click.stop="delInfo(item.id)" v-if="item.approveStatus=='发起人撤回'">
+								删除
+							</view>
 						</view>
 					</view>
 				</view>
@@ -80,27 +76,12 @@
 		mixins: [MescrollMixin],
 		data() {
 			return {
-				canReset:"",
+				canReset: "",
 				mescroll: null,
 				downOption: {
 					auto: false //是否在初始化后,自动执行downCallback; 默认true
 				},
 				searchType: 0,
-				// 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: [],
 			}
 		},
@@ -125,9 +106,46 @@
 					url: '/pages/fuelfilling/apply_see_reimbursement?id=' + id
 				})
 			},
+			backInfo(row) {
+				uni.showLoading({
+					mask: true,
+					title: "撤回中..."
+				})
+				console.log(row)
+				this.$api.doRequest('post', '/newWorkflow/api/stopInstance', {
+					workflowId: row.workflowId,
+					businessKey: row.id,
+				}).then(res => {
+					uni.hideLoading()
+					console.log(res)
+					if (res.data.code == 200) {
+						this.mescroll.resetUpScroll()
+					}
+				})
+			},
+			editInfo(id) {
+				uni.navigateTo({
+					url: '/pages/fuelfilling/apply_for_edit_reimbursement?id=' + id
+				})
+			},
+			delInfo(id) {
+				uni.showLoading({
+					title: "加载中",
+					mask: true
+				})
+				this.$api.doRequest('post', '/fuelFillingInfo/api/deleteFilling', {
+					id: id,
+				}).then(res => {
+					uni.hideLoading()
+					console.log(res)
+					if (res.data.code == 200) {
+						this.mescroll.resetUpScroll()
+					}
+				})
+			},
 			/*下拉刷新的回调 */
 			downCallback() {
-	this.mescroll.resetUpScroll();
+				this.mescroll.resetUpScroll();
 			},
 			/*上拉加载的回调: 其中page.num:当前页 从1开始, page.size:每页数据条数,默认10 */
 			upCallback(page) {
@@ -149,13 +167,6 @@
 						this.fuelFilling = this.fuelFilling.concat(curPageData);
 						console.log(curPageLen, totalPage)
 						this.mescroll.endByPage(curPageLen, totalPage);
-						// if (type == 'down') {
-						// 	this.mescroll.endSuccess();
-						// 	this.fuelFilling = []
-						// }
-						// this.mescroll.endBySize(res.data.data.records.length, res.data.data.total);
-						// this.fuelFilling = this.fuelFilling.concat(res.data.data.records)
-				
 					}
 				})
 				//联网加载数据
@@ -168,20 +179,21 @@
 			},
 			trackAddition() {
 				uni.navigateTo({
-					url: '/pages/fuelfilling/track_addition'
+					url: '/pages/fuelfilling/apply_for_reimbursement'
 				})
 			},
 			getList(size, page, type) {
-			
+
 			},
 			getInfo(item) {
 				if (item.travelStatus == '已报销') {
 					return
-				} else if(item.travelStatus == '已开始'&&!item.status||item.travelStatus == '已结束'&&!item.status||item.status=='已驳回') {
+				} else if (item.travelStatus == '已开始' && !item.status || item.travelStatus == '已结束' && !item.status || item
+					.status == '已驳回') {
 					uni.navigateTo({
 						url: '/pages/fuelfilling/track_addition?id=' + item.id
 					})
-				}else{
+				} else {
 					uni.navigateTo({
 						url: '/pages/fuelfilling/apply_see_reimbursement?id=' + item.id
 					})
@@ -268,9 +280,9 @@
 		padding: 10px 16px 0 10px;
 		border-radius: 0 0 15px 15px;
 		padding-bottom: 10px;
-		position:fixed;
-		width:100%;
-		z-index:10;
+		position: fixed;
+		width: 100%;
+		z-index: 10;
 	}
 
 	.top2 {
@@ -290,7 +302,8 @@
 				color: #fff;
 
 			}
-			uni-button.right-contrent1:after{
+
+			uni-button.right-contrent1:after {
 				border: 1px solid #22C572;
 			}
 		}
@@ -299,7 +312,7 @@
 	.good-list {
 		background-color: white;
 		margin: 0px 10px 20px 10px;
-		padding: 20px 0px 8px 0px;
+		padding: 20rpx 0px 8px 0px;
 		border-radius: 30rpx;
 		box-shadow: 0px 5rpx 20rpx #E3E3E3;
 
@@ -386,8 +399,9 @@
 	}
 
 	.top {
-		justify-content: space-between;
+		justify-content: flex-end;
 		align-items: center;
+		margin-bottom: 10rpx;
 
 		.left {
 			align-items: center;
@@ -441,11 +455,11 @@
 			border: 1px solid #CDCDCD;
 			padding: 15rpx 40rpx;
 			box-sizing: border-box;
-			margin-top: 20rpx;
+			margin: 20rpx 0 0 20rpx;
 		}
 	}
-	
-	/deep/.mescroll-body{
-		margin-top:50px;
+
+	/deep/.mescroll-body {
+		margin-top: 50px;
 	}
 </style>

+ 306 - 374
pages/fuelfilling/track_addition.vue

@@ -2,20 +2,20 @@
 	<view>
 		<map :latitude="detailData.originLatitude" :longitude="detailData.originLongitude" :markers="covers" class="map"
 			:polyline="polyline"></map>
-			<cover-view v-if='show'>
-				<view>确认行程已结束?</view>
-			</cover-view>
+		<!-- <cover-view v-if='show'>
+			<view>确认行程已结束?</view>
+		</cover-view> -->
 		<view class='wrap'>
 			<view class="c-row">
 				<view class="title">车牌号</view>
 				<view class="con-list">
-					
-					<input :disabled='titleBtn=="申请报销"' v-model='detailData.carNo' placeholder="请输入车牌号" maxlength="7"></input>
+
+					<!-- <input :disabled='titleBtn=="申请报销"' v-model='detailData.carNo' placeholder="请输入车牌号" maxlength="7"></input> -->
 				</view>
-				<!-- <picker :range="carNolist" range-key="carNo" @change='carnopicker($event)'
-					:disabled='titleBtn=="申请报销"' mode="selector">
-					<view >{{detailData.carNo?detailData.carNo:'请选择车牌号'}}</view>
-				</picker> -->
+				<picker :range="carNolist" range-key="carNo" @change='carnopicker($event)' :disabled='titleBtn=="申请报销"'
+					mode="selector">
+					<view>{{detailData.carNo?detailData.carNo:'请选择车牌号'}}</view>
+				</picker>
 			</view>
 			<view @click='startTrack' class="button" v-if='titleBtn=="开始轨迹"'>{{titleBtn}}</view>
 			<view @click='endTrack' class="button1" v-if='titleBtn=="结束轨迹"'>{{titleBtn}}</view>
@@ -31,6 +31,7 @@
 	export default {
 		data() {
 			return {
+				place: {},
 				fillingId: '',
 				polyline: [{ //指定一系列坐标点,从数组第一项连线至最后一项
 					points: [],
@@ -38,10 +39,10 @@
 					width: 1, //线的宽度
 					//     dottedLine:true,//是否虚线
 				}],
-				carNo:'',
-				show:false,
-				show4:false,
-				carNolist:[],
+				carNo: '',
+				show: false,
+				show4: false,
+				carNolist: [],
 				detailData: {
 					carNo: '',
 					travelStatus: '',
@@ -67,48 +68,57 @@
 			}
 		},
 		created() {
-		    // #ifdef APP-PLUS
-		    const subNVue = uni.getSubNVueById('popview') //'popview'就是你在                		 
-		    subNVue.hide('none', 100);
-		    
-		    uni.$on('page-popup-submit', (data) => {  
-		        console.log(data)
-		    	subNVue.hide('none', 100);
-		    	
-		    	this.submit()
-		    })
-		    uni.$on('page-popup-close', (data) => {
-		    	console.log(data)
-		        subNVue.hide('none', 100);
-		    })
-		    // #endif
-		  },
-		  destroyed() {
-		    // 移除监听事件
-		    uni.$off("page-popup-submit")
-		  },
+			// #ifdef APP-PLUS
+			const subNVue = uni.getSubNVueById('popview') //'popview'就是你在                		 
+			subNVue.hide('none', 100);
+
+			uni.$on('page-popup-submit', (data) => {
+				console.log(data)
+				subNVue.hide('none', 100);
+
+				this.submit()
+			})
+			uni.$on('page-popup-close', (data) => {
+				console.log(data)
+				subNVue.hide('none', 100);
+			})
+			// #endif
+		},
+		destroyed() {
+			// 移除监听事件
+			uni.$off("page-popup-submit")
+		},
 		onLoad(options) {
-			// this.$api.doRequest('get', '/carInfo/selectCars', { currentPage:1,
-   //          pageSize:9999,
-   //          compId: uni.getStorageSync('pcUserInfo').compId,})
-			// 	.then(res1 => {
-			// 		if(res1.data.code==200){
-			// 			this.carNolist=res1.data.data.records
-			// 		}
-			// 	})
-			// 	.catch(res => {
-			// 		uni.$u.toast(res.message);
-			// 	});
+			//获取车牌号
+			this.$api.doRequest('get', '/carInfo/selectCars', {
+					currentPage: 1,
+					pageSize: 9999,
+					compId: uni.getStorageSync('pcUserInfo').compId,
+				})
+				.then(res1 => {
+					console.log(111)
+					console.log(res1)
+					if (res1.data.code == 200) {
+						this.carNolist = res1.data.data.records
+					}
+				})
+				.catch(res => {
+					uni.$u.toast(res.message);
+				});
 			this.id = options.id
 			that = this
-			
+
 		},
 		onShow() {
-			// this.$api.doRequest('post', '/CarPostionController/api/getlocation', {currentPage:1,
-   //          pageSize:9999,compId: uni.getStorageSync('pcUserInfo').compId,})
+			this.getLngLat('开始轨迹');
+			// this.$api.doRequest('post', '/CarPostionController/api/getlocation', {
+			// 		currentPage: 1,
+			// 		pageSize: 9999,
+			// 		compId: uni.getStorageSync('pcUserInfo').compId,
+			// 	})
 			// 	.then(res1 => {
 			// 		// if(res1.data.code==200){
-			// 			console.log(res1,11111111)
+			// 		console.log(res1, 11111111)
 			// 		// }
 			// 	})
 			// 	.catch(res => {
@@ -116,7 +126,6 @@
 			// 	});
 			var that = this
 			if (this.id) {
-				console.log(1111111)
 				this.seeInfo()
 			} else {
 				// #ifdef APP-PLUS
@@ -125,177 +134,105 @@
 			}
 		},
 		methods: {
-			carnopicker(e){
-				this.detailData.carNo=this.carNolist[e.target.value].carNo
+			carnopicker(e) {
+				this.detailData.carNo = this.carNolist[e.target.value].carNo
 			},
-			getLngLat(type) {
-				this.checkOpenGPSServiceByAndroidIOS()
-				var that = this
+			async getLngLat(type) {
+				let that = this
 				uni.showLoading({
 					title: '获取定位中',
 					mask: true
 				})
-				var num=0
-				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 == '结束轨迹') {
-								// console.log("res",res)
-								that.detailData.carNo=that.carNo
-								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"
-								num++
-								console.log("asddfadsad",that.detailData,num)
-								if (!that.detailData.destinationAddress) {
-									uni.showToast({
-										title: "未获取结束位置,请开启定位在试!",
-										icon: "none"
-									})
-									return
-								}
-								that.$api.doRequest('post', '/fuelFillingInfo/api/addFilling', that.detailData)
-									.then(res1 => {
-										if (res1.data.code == 200) {
-											this.titleBtn = "申请报销"
-										}
-									})
-									.catch(res => {
-										uni.$u.toast(res.message);
-									});
-							}
+				let _location = {}
+				await that.$api.doRequest('post', '/CarPostionController/api/getlocation')
+					.then(res => {
+						this.place = JSON.parse(res.data.data)[0]
+						console.log(this.place)
+					})
+					.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服务页面
-											}
-										}
+				await that.$api.changeLocation('post', '/v3/assistant/coordinate/convert', {
+						key: 'dd701d394d116b50268dc16470ddd615',
+						locations: this.place.lng + "," + this.place.lat
+					})
+					.then(res => {
+						this.place = JSON.parse(res.data.data)[0]
+						console.log(this.place)
+					})
+					.catch(res => {
+						// uni.$u.toast(res.message);
+					});
+				let _data = {
+					key: 'dd701d394d116b50268dc16470ddd615',
+					location: this.place.lng + "," + this.place.lat
+				}
+				await that.$api.getPlace('get', '/v3/geocode/regeo', _data).then(res => {
+						console.log('111')
+						console.log("定位信息", res)
+						if (type == '开始轨迹' || type == '已开始') {
+							console.log(2)
+							that.detailData.originLongitude = that.place.lng;
+							that.detailData.originLatitude = that.place.lat;
+							that.detailData.originProvince = res.data.regeocode.addressComponent.province;
+							that.detailData.originCity = that.$helper.filterUrban(res.data.regeocode
+								.addressComponent.city)
+							that.detailData.originArea = that.$helper.filterUrban(res.data.regeocode
+								.addressComponent.district)
+							that.detailData.originAddress = res.data.regeocode.formatted_address
+							console.log("that.detailData", that.detailData)
+						} else if (type == '结束轨迹') {
+							console.log("结束")
+							// console.log("res",res)
+							that.detailData.carNo = that.carNo
+
+							that.detailData.destinationLongitude = that.place.lng;
+
+							that.detailData.destinationLatitude = that.place.lat;
+							that.detailData.destinationProvince = res.data.regeocode.addressComponent.province;
+							that.detailData.destinationCity = that.$helper.filterUrban(res.data.regeocode
+								.addressComponent.city)
+							that.detailData.destinationArea = that.$helper.filterUrban(res.data.regeocode
+								.addressComponent.district)
+							that.detailData.destinationAddress = res.data.regeocode.formatted_address
+							that.detailData.trackFlag = "1"
+							console.log("asddfadsad", that.detailData)
+							that.$api.doRequest('post', '/fuelFillingInfo/api/addFilling', that.detailData)
+								.then(res1 => {
+									if (res1.data.code == 200) {
+										this.titleBtn = "申请报销"
 									}
+								})
+								.catch(res => {
+									uni.$u.toast(res.message);
 								});
-								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);
-								}
-							}
-						});
-					}
-				}
+
+						this.covers = [{
+							id: 0,
+							latitude: that.place.lat,
+							longitude: that.place.lng,
+							iconPath: '../../../static/img/location.png',
+						}]
+
+
+					})
+					.catch(res => {
+						// uni.$u.toast(res.message);
+					});
+				that.$forceUpdate()
+				uni.hideLoading()
 			},
+
 			seeInfo() {
 				this.$api.doRequest('get', '/fuelFillingInfo/getFilling', {
 					id: this.id
 				}).then(res => {
-					console.log(222222,res.data,this.id)
+					console.log(222222, res.data, this.id)
 					if (res.data.code == 200) {
 						this.detailData = res.data.data
-						console.log(this.detailData,111111)
+						console.log(this.detailData, 111111)
 						if (this.detailData.travelStatus == "已开始") {
 							this.titleBtn = "结束轨迹"
 						} else if (this.detailData.travelStatus == "已结束") {
@@ -313,6 +250,7 @@
 				}).then(res => {
 					if (res.data.code == 200) {
 						this.detailData = res.data.data
+						this.getLngLat('结束轨迹')
 					}
 				})
 			},
@@ -324,119 +262,143 @@
 			},
 			// 结束轨迹
 			endTrack() {
-				this.carNo=this.detailData.carNo
-				// #ifdef APP-PLUS
-				const subNVue = uni.getSubNVueById('popview') //'popview'就是你在                		 
-				subNVue.show('zoom-fade-out', 300, function(){  });  
-				// #endif
+				this.carNo = this.detailData.carNo
+				let that = this
+				uni.showModal({
+					content: "确定结束轨迹?",
+					showCancel: true,
+					confirmText: '确定',
+					success: function(res) {
+						if (res.confirm) {
+							let time = new Date();
+							let timeInfo = (time.getFullYear() + '-' + time.getMonth() + '-' + time.getDate() +
+								" " + time
+								.getHours() +
+								':' + time.getMinutes() + ':' + time.getSeconds())
+							uni.setStorageSync('jyEndTime', timeInfo)
+							that.seeInfo1()
+						}
+					}
+				})
+				// // #ifdef APP-PLUS
+				// const subNVue = uni.getSubNVueById('popview') //'popview'就是你在                		 
+				// subNVue.show('zoom-fade-out', 300, function() {});
+				// // #endif
 			},
-			submit(){
-				if (that.$helper.fUN_AmapLocation) {
-					that.$helper.fUN_AmapLocation.stop({}, result => {
-						console.log('====fUN_AmapLocation定位stop====', JSON.stringify(result));
-						// 更新轨迹结束地点
-						// 更新结束地点位置
-						this.seeInfo1()
-						this.getLngLat('结束轨迹')
-					});
-				}
+			submit() {
+				// if (that.$helper.fUN_AmapLocation) {
+				// 	that.$helper.fUN_AmapLocation.stop({}, result => {
+				// 		console.log('====fUN_AmapLocation定位stop====', JSON.stringify(result));
+				// 		// 更新轨迹结束地点
+				// 		// 更新结束地点位置
+				// 		this.seeInfo1()
+				// 		this.getLngLat('结束轨迹')
+				// 	});
+				// }
 			},
 			//开始轨迹
-			startTrack() {
-				var that=this
-				if (!this.detailData.carNo) {
-					uni.showToast({
-						title: "车牌号不能为空!",
-						icon: "none"
-					})
-					return
-				}
-				if (!this.detailData.originAddress) {
-					uni.showToast({
-						title: "未获取起始位置,请开启定位在试!",
-						icon: "none"
-					})
-					return
-				}
+			async startTrack() {
+				var that = this
+				// if (!this.detailData.carNo) {
+				// 	uni.showToast({
+				// 		title: "车牌号不能为空!",
+				// 		icon: "none"
+				// 	})
+				// 	return
+				// }
+				// if (!this.detailData.originAddress) {
+				// 	uni.showToast({
+				// 		title: "未获取起始位置,请开启定位在试!",
+				// 		icon: "none"
+				// 	})
+				// 	return
+				// }
 				uni.showLoading({
-					title:'加载中',
-					mask:true
+					title: '加载中',
+					mask: true
 				})
 				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', '/fuelFillingInfo/api/addFilling', that.detailData).then(res1 => {
+				//存储开始时间
+
+				let time = new Date();
+				let timeInfo = (time.getFullYear() + '-' + time.getMonth() + '-' + time.getDate() + " " + time
+					.getHours() +
+					':' + time.getMinutes() + ':' + time.getSeconds())
+				await that.$api.doRequest('post', '/fuelFillingInfo/api/addFilling', that.detailData).then(res1 => {
 						console.log(res1.data)
 						if (res1.data.code == 200) {
-							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
-									this.seeInfo1()
-									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.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 > 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('mapGJ')
-											}).then(res => {
-												that.polyline[0].points.push({
-													latitude: _data.latitude,
-													longitude: _data.longitude
-												});
-												console.log('上传经纬度list', res)
-												uni.hideLoading()
-												uni.removeStorageSync('mapGJ');
-												this.$helper.gjList = []
-											})
-											.catch(res => {
-												uni.showToast({
-													icon: "none",
-													title: res.message
-												})
-											});
-									}
-								}
-							);
-							uni.showToast({
-								title: "轨迹持续监控中!",
-								icon: "none",
-								complete() {
-									that.titleBtn = '结束轨迹'
-								}
-							})
+							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
+							// 		this.seeInfo1()
+							// 		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.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 > 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('mapGJ')
+							// 		}).then(res => {
+							// 			that.polyline[0].points.push({
+							// 				latitude: _data.latitude,
+							// 				longitude: _data.longitude
+							// 			});
+							// 			console.log('上传经纬度list', res)
+							// 			uni.hideLoading()
+							// 			uni.removeStorageSync('mapGJ');
+							// 			this.$helper.gjList = []
+							// 		})
+							// 		.catch(res => {
+							// 			uni.showToast({
+							// 				icon: "none",
+							// 				title: res.message
+							// 			})
+							// 		});
+							// }
+							// }
+							// );
+							// uni.showToast({
+							// 	title: "轨迹持续监控中!",
+							// 	icon: "none",
+							// 	complete() {
+							// 		that.titleBtn = '结束轨迹'
+							// 	}
+							// })
 						}
 					})
 					.catch(res => {
@@ -444,75 +406,45 @@
 					});
 
 
-				// 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 = "202207040001"
-				// 				that.detailData.originProvince = "辽宁省"
-				// 				that.detailData.originCity = "营口市"
-				// 				that.detailData.originArea = "鲅鱼圈区"
-				// 				that.detailData.originLongitude = "122.21"
-				// 				that.detailData.originLatitude = "40.664"
-				// 				that.$api.doRequest('post', '/fuelFillingInfo/api/addFilling',
-				// 						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.destinationCity = "宿迁市"
-				// 				that.detailData.destinationArea = "宿城区"
-				// 				that.detailData.destinationLongitude = "118.291"
-				// 				that.detailData.destinationLatitude = "33.942"
-				// 				that.$api.doRequest('post', '/fuelFillingInfo/api/addFilling',
-				// 						that.detailData
-				// 					)
-				// 					.then(res => {
-				// 						if (res.data.code == 200) {
-				// 							that.$api.msg('提交成功')
-				// 							that.titleBtn = "申请报销"
-				// 						} else {
-				// 							that.$api.msg('提交失败')
-				// 						}
-				// 					})
-				// 			}
-				// 		}
-				// 	})
-				// } else {
-				// 	uni.navigateTo({
-				// 		url: '/pages/fuelfilling/apply_for_reimbursement?id=' + this.id
-				// 	})
-				// }
+				if (this.titleBtn == "开始轨迹") {
+					var that = this
+					uni.showModal({
+						content: "确定开始轨迹?",
+						showCancel: true,
+						confirmText: '确定',
+						success: function(res) {
+							if (res.confirm) {
+								uni.setStorageSync('jyStartTime', timeInfo)
+								// 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 = "202207040001"
+								// that.detailData.originProvince = "辽宁省"
+								// that.detailData.originCity = "营口市"
+								// that.detailData.originArea = "鲅鱼圈区"
+								// that.detailData.originLongitude = "122.21"
+								// that.detailData.originLatitude = "40.664"
+								// that.$api.doRequest('post', '/fuelFillingInfo/api/addFilling',
+								// 		that.detailData
+								// 	)
+								// 	.then(res => {
+								// 		that.id = res.data.data
+								// 		if (res.data.code == 200) {
+								// 			that.$api.msg('提交成功')
+								that.titleBtn = "结束轨迹"
+								// 		} else {
+								// 			that.$api.msg('提交失败')
+								// 		}
+								// 	})
+							}
+						}
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/fuelfilling/apply_for_reimbursement?id=' + this.id
+					})
+				}
 			},
 		}
 	}

+ 6 - 8
pages/reimbursement/request_funds.vue

@@ -83,7 +83,7 @@
 						placeholder="输入收款金额"></input>
 				</view>
 				<checkbox-group @change="checkboxChange" v-if="reType == '2' || expensesType == '2'">
-						<checkbox value="1" style="transform:scale(0.7)" />备用金支付
+					<checkbox value="1" style="transform:scale(0.7)" />备用金支付
 				</checkbox-group>
 			</view>
 			<view class="c-row">
@@ -366,11 +366,10 @@
 			}
 		},
 		methods: {
-			checkboxChange(e){
-				if(e.detail.value[0] == 1){
+			checkboxChange(e) {
+				if (e.detail.value[0] == 1) {
 					this.detailData.paymentIdentifi = 1
-				}
-				else{
+				} else {
 					this.detailData.paymentIdentifi = 0
 				}
 			},
@@ -459,11 +458,11 @@
 					this.detailData.expensesPurpose = "3"
 					delete this.detailData.contractNo
 
-				} else if(this.detailData.purpose == "备用金"){
+				} else if (this.detailData.purpose == "备用金") {
 					this.detailData.expensesPurpose = "7"
 					delete this.detailData.warehouseName
 					delete this.detailData.contractNo
-				}else {
+				} else {
 					this.detailData.expensesPurpose = "5"
 					delete this.detailData.warehouseName
 					delete this.detailData.contractNo
@@ -500,7 +499,6 @@
 					this.$api.msg('请选择合同编号')
 					return
 				}
-				debugger
 				if (this.expensesType == '2') {
 					if (!this.detailData.payerHeader) {
 						this.$api.msg('付款方不能为空')

+ 4 - 1
pages/task/audit/charge_against_revenue.vue

@@ -582,7 +582,8 @@
 						}
 						this.auditInfo.amountIngPayableTotal1 = helper.convertCurrency(this.auditInfo
 							.amountIngPayableTotal)
-						if(this.auditInfo.status == '已收款' || this.auditInfo.status == '待付款'){
+						if((this.auditInfo.status == '已收款' && this.vesselId == '点击切换任务状态') 
+						|| (this.auditInfo.status == '待付款' && this.vesselId == '点击切换任务状态')){
 							this.$api.doRequest('post', '/expenseInfo/editCollectionStatus',
 								that.detialData).then(res1 => {
 								if (res1.data.code == 200) {
@@ -590,6 +591,8 @@
 									setTimeout(function() {
 										uni.navigateBack();
 									}, 2000);
+								}else{
+									return
 								}
 							})
 						}

+ 279 - 307
pages/task/audit/refuel.vue

@@ -3,96 +3,59 @@
 
 		<u-form ref="uForm">
 			<view class="form_top">基本信息</view>
-			<u-form-item v-if='list.strokeType==1' label-width='260' :borderBottom="false" class="label_css"
-				label="车牌号">
+			<u-form-item label-width='260' :borderBottom="false" class="label_css" label="车牌号">
 				<u-input v-model="list.carNo" input-align="right" placeholder="--" disabled />
 			</u-form-item>
-			<u-form-item v-if='list.strokeType==1' label-width='150' :borderBottom="false" label="起点">
+			<!-- 	<u-form-item label-width='150' :borderBottom="false" label="起点">
 				<view class="place">
 					{{list.originProvince}}{{list.originCity}}{{list.originArea}}{{list.originAddress}}
 				</view>
 			</u-form-item>
-			<u-form-item v-if='list.strokeType==1' label-width='150' :borderBottom="false" label="终点">
+			<u-form-item label-width='150' :borderBottom="false" label="终点">
 				<view class="place">
 					{{list.destinationProvince}}{{list.destinationCity}}{{list.destinationArea}}{{list.destinationAddress}}
 				</view>
-			</u-form-item>
-			<u-form-item v-if='list.strokeType==1' label-width='150' :borderBottom="false" label="备注">
-				<view class="place">
-					{{list.remark}}
-				</view>
-			</u-form-item>
-			<u-form-item v-if='list.strokeType==1' label-width='260' :borderBottom="false" label="总油耗(升)">
-				<u-input v-model="list.tfc" input-align="right" placeholder="--" disabled />
-			</u-form-item>
-			<u-form-item v-if='list.strokeType==1' label-width='260' :borderBottom="false" label="总金额(元)">
-				<u-input v-model="list.totalCost" input-align="right" placeholder="--" disabled />
-			</u-form-item>
-			<!-- <u-form-item v-if='list.strokeType==1' label-width='260' :borderBottom="false" label="上次申请时间">
-				<u-input v-model="list.createDate" input-align="right" placeholder="--" disabled />
-			</u-form-item>
-			<u-form-item v-if='list.strokeType==1' label-width='260' :borderBottom="false" label="本次申请时间">
-				<u-input v-model="list.createDate" input-align="right" placeholder="--" disabled />
 			</u-form-item> -->
-			<u-form-item v-if='list.strokeType==1' label-width='260' :borderBottom="false" label="申请时间">
-				<u-input v-model="list.createDate" input-align="right" placeholder="--" disabled />
+
+			<u-form-item label-width='260' :borderBottom="false" label="油耗(升)">
+				<u-input v-model="list.fillingDetailInfo.oilConsumption" input-align="right" placeholder="--"
+					disabled />
 			</u-form-item>
-			<u-form-item v-if='list.strokeType==3' label-width='260' :borderBottom="false" label="仓库名">
-				<u-input v-model="list.warehouseName" input-align="right" placeholder="--" disabled />
+			<u-form-item label-width='260' :borderBottom="false" label="油耗单价(元)">
+				<u-input input-align="right" placeholder="--" disabled
+					v-model="list.fillingDetailInfo.currentOilPrice" />
 			</u-form-item>
-			<u-form-item v-if='list.strokeType==3' label-width='260' :borderBottom="false" label="备注">
-				<u-input v-model="list.remark" input-align="right" placeholder="--" disabled />
+			<u-form-item label-width='260' :borderBottom="false" label="金额(元)">
+				<u-input input-align="right" placeholder="--" disabled
+					v-model="list.fillingDetailInfo.currentConsumption" />
 			</u-form-item>
-			<u-form-item v-if='list.strokeType==3' label-width='260' :borderBottom="false" label="请款金额">
-				<u-input v-model="list.amountRequested" input-align="right" placeholder="--" disabled />
+			<u-form-item label-width='260' :borderBottom="false" label="申请时间">
+				<u-input input-align="right" placeholder="--" disabled v-model="list.fillingDetailInfo.createDate" />
 			</u-form-item>
-			<u-form-item v-if='list.strokeType==3' label-width='260' :borderBottom="false" label="请款时间">
-				<u-input v-model="list.createDate" input-align="right" placeholder="--" disabled />
+			<u-form-item label-width='150' :borderBottom="false" label="备注">
+				<view class="place">
+					{{list.remark}}
+				</view>
 			</u-form-item>
 		</u-form>
-		<view v-if="list.fillingDetailInfoList">
-			<u-form v-for="(item,index) in list.fillingDetailInfoList" :labelWidth="200">
-				<div>加油-{{index+1}}</div>
-				<u-form-item label="油耗(升)">
-					<!-- {{item.oilConsumption}} -->
-					<u-input v-model="item.oilConsumption" disabled inputAlign="right" />
-				</u-form-item>
-				<u-form-item label="单价(元/升)">
-					<!-- {{item.currentOilPrice}} -->
-					<u-input v-model="item.currentOilPrice" disabled inputAlign="right" />
-				</u-form-item>
-				<u-form-item label="油费(元)">
-					<!-- {{item.currentConsumption}} -->
-					<u-input v-model="item.currentConsumption" disabled inputAlign="right" />
-				</u-form-item>
-				<!-- <u-form-item label="凭证"> -->
-					<!-- <img :src="item.addressUrl" alt="" mode="aspectFill"> -->
-					<!-- <upload class="upload" ref="upload" :action="action" :max-size="maxSize" :max-count="1"
-						:size-type="['compressed']" :deletable="false" @on-uploaded="isAdd = true"
-						:before-upload="filterFileType" @on-progress="onProgress" :fileList="item.urlList">
-					</upload> -->
-				<!-- </u-form-item> -->
-				<view class="voucher">
-					<view class="voucher_tips">加油凭证</view>
-					<view >
-						<u-upload :action="action" imageMode='aspectFill' :file-list="item.urlList" max-count="1" :deletable="false" :show-progress="false"></u-upload>
-					</view>
-				</view>
-			</u-form>
-		</view>
-		<view v-if="list.shortFillingInfoList">
-			<u-form v-for="(item,index) in list.shortFillingInfoList">
-				<div>加油-{{index+1}}</div>
-				<u-form-item label="车牌号">
-					{{item.carNo}}
-				</u-form-item>
-				<u-form-item label="起始地">
-					{{item.originProvince}}{{item.originCity}}{{item.originArea}}{{item.originAddress}}
-				</u-form-item>
-				<u-form-item label="终到地">
-					{{item.destinationProvince}}{{item.destinationCity}}{{item.destinationArea}}{{item.destinationAddress}}
-				</u-form-item>
-			</u-form>
+		<view>
+			<view class="" @click.stop="playPlace">
+				查看轨迹
+			</view>
+			<view class="">
+				<map style="width: 100%; height: 300px;" :markers="covers" :polyline="polyline" :latitude="latitude"
+					:longitude="longitude" id="myMap">
+				</map>
+			</view>
+
+			<!-- 	<button v-if="startMove" @click="handleStopMove()">暂停移动</button>
+			<button v-else @click="handleStartMove()">开始移动</button> -->
+			<!-- <xbd-maptrack :polyline="polyline" :covers="covers" :isauto="false" @getStopTrack="getStopTrack">
+			</xbd-maptrack> -->
+			<!-- 			<view style="position: fixed;bottom: 11%;">
+				<view>播放停止或进度条拖动后的返回值: </view>
+				{{trackObj}}
+			</view> -->
 		</view>
 		<u-form ref="uForm">
 			<view class="form_top">流程</view>
@@ -144,7 +107,8 @@
 							</view>
 							<view class="flex audit_img">
 								<view v-for="(items,indexs) in item.fileUrl" class="url_css">
-									<image :src="items"  imageMode='aspectFill' class="url_img" @click="auditFile(items)"></image>
+									<image :src="items" imageMode='aspectFill' class="url_img"
+										@click="auditFile(items)"></image>
 								</view>
 							</view>
 						</view>
@@ -206,6 +170,7 @@
 						</view>
 						</u-upload>
 				</view>
+
 				</view>
 				<view @click='close()' class="cancel">取消</view>
 				<view @click='passSubmit()' class="confirm">确定</view>
@@ -221,21 +186,43 @@
 	import * as config from '../../../config'
 	import upload from '@/components/upload.vue';
 	import helper from '@/common/helper.js';
+	// import xbdMaptrack from '@/components/xbdMaptrack/xbdMaptrack';
 	export default {
 		components: {
 			upload
+			// xbdMaptrack
 		},
 		data() {
 			return {
+				mapContext: null, //地图对象
+				startMove: false, //是否开始回放
+				nextPointIndex: 1, //下一个坐标点的索引
+				durationTime: 1000, //相邻两点动画持续时长默认1秒
+				latitude: 39.909,
+				longitude: 116.39742,
+				covers: [{
+					id: 2,
+					latitude: 0,
+					longitude: 0
+				}],
+				polyline: [{
+					points: [], // 点集合
+					color: '#3591fc', // 线的颜色
+					arrowLine: true, //带箭头的线
+					width: 6 // 线的宽度
+				}],
 				everyCheck: '',
 				id: "",
-				pcUserInfo :uni.getStorageSync('pcUserInfo'),
-				action1: config.def().baseUrlNew+ 'appendix/api/uploadFiles',
-				maxSize: 50 * 1024 * 1024, 
+				pcUserInfo: uni.getStorageSync('pcUserInfo'),
+				action1: config.def().baseUrlNew + 'appendix/api/uploadFiles',
+				maxSize: 50 * 1024 * 1024,
 				currentPage: 1,
 				pageSize: 10,
-				fileUrl:[],
+				fileUrl: [],
 				list: {
+					fillingDetailInfo: {
+						oilConsumption: ''
+					},
 					status: "",
 					contractGoodsInfo: {},
 					contractProcessInfo: {}
@@ -275,6 +262,21 @@
 			this.getList()
 		},
 		methods: {
+			//播放轨迹
+			playPlace() {
+				console.log("tiaozhuan")
+				uni.navigateTo({
+					url: "/pages/task/playMap?startDate=" + this.datalist.amountDeadline + "&endDate=" + this
+						.datalist.amountDeadline.createDate
+				})
+				// startDate: "2023-02-20 01:00:00",
+				// endDate: "2023-02-20 24:00:00",
+				// uni.navigateTo({
+				// 	url: "/pages/task/playMap?startDate=2023-02-20 01:00:00&endDate=2023-02-20 24:00:00"
+				// })
+				//设置地图
+
+			},
 			auditFile(src) {
 				uni.downloadFile({
 					url: src,
@@ -327,39 +329,30 @@
 			showcontent(item) {
 				item.showflow = !item.showflow
 			},
-			getList(id) {
+			async getList(id) {
 				var that = this
 				uni.showLoading({
 					title: '加载中',
 					mask: true
 				})
-				that.$api.doRequest('get', '/fuelFillingInfo/getFilling', {
+				await that.$api.doRequest('get', '/fuelFillingInfo/getFilling', {
 					id: that.id
 				}).then(res => {
 					if (res.data.code == 200) {
+
 						that.list = res.data.data
-						for (let i = 0; i < that.list.fillingDetailInfoList.length; i++) {
-							let urlList = []
-							if (that.list.fillingDetailInfoList[i].addressUrl) {
-								let datalist = that.list.fillingDetailInfoList[i].addressUrl.split(",")
-								for (let j = 0; j < datalist.length; j++) {
-									urlList.push({
-										url: datalist[j]
-									})
-								}
-								that.list.fillingDetailInfoList[i].urlList = urlList
+						let urlList = []
+						console.log(this.list)
+						if (that.list.fillingDetailInfo.addressUrl) {
+							let datalist = that.list.fillingDetailInfo.addressUrl.split(",")
+							for (let j = 0; j < datalist.length; j++) {
+								urlList.push({
+									url: datalist[j]
+								})
 							}
+							that.list.fillingDetailInfo.urlList = urlList
 						}
-						// this.$api.doRequest('get', '/appendix/query/getFileList', {
-						// 	appendixIds: that.list.addressUrl
-						// }).then(res1 => {
-						// 	that.imglist = res1.data.data
-						// 	for (let i = 0; i < that.imglist.length; i++) {//获取后缀
-						// 		if (that.imglist[i].appendixName) {
-						// 			let index = that.imglist[i].appendixName.lastIndexOf(".") 
-						// 			that.imglist[i].type = that.imglist[i].appendixName.substring(index+1)
-						// 		}
-						// 	}
+
 						// 审核流程
 						this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
 							businessCode: 'JIAYOU-SHENHE-APPROVE',
@@ -372,227 +365,202 @@
 							}).then(response => {
 								uni.hideLoading()
 								for (let i = 0; i < response.data.data.length; i++) {
-									this.$set(response.data.data[i],'status','question')
+									this.$set(response.data.data[i], 'status', 'question')
 									// console.log(response.data.data[i].workflowHistoricTasks,i)
-									if(response.data.data[i].commonStaffs){
-										response.data.data[i].showflow=false
-										response.data.data[i].operatorTitle=response.data.data[i].desc.substring(0,2)
-										response.data.data[i].operatorName=response.data.data[i].desc
-										response.data.data[i].staffscontent='共'+response.data.data[i].commonStaffs.length+'人,当前审核'+response.data.data[i].workflowHistoricTasks.length+'人'
-										if(response.data.data[i].workflowHistoricTasks&&response.data.data[i].workflowHistoricTasks.length>0){
-											if(response.data.data[i].workflowHistoricTasks.length!=response.data.data[i].commonStaffs.length){
+									if (response.data.data[i].commonStaffs) {
+										response.data.data[i].showflow = false
+										response.data.data[i].operatorTitle = response.data
+											.data[i]
+											.desc.substring(0, 2)
+										response.data.data[i].operatorName = response.data
+											.data[i]
+											.desc
+										response.data.data[i].staffscontent = '共' + response
+											.data
+											.data[i].commonStaffs.length + '人,当前审核' + response
+											.data
+											.data[i].workflowHistoricTasks.length + '人'
+										if (response.data.data[i].workflowHistoricTasks &&
+											response
+											.data.data[i].workflowHistoricTasks.length > 0) {
+											if (response.data.data[i].workflowHistoricTasks
+												.length != response.data.data[i].commonStaffs
+												.length) {
 												// response.data.data[i].status='question'
-												this.$set(response.data.data[i],'status','question')
-											}else{
-												this.$set(response.data.data[i],'status','success')
+												this.$set(response.data.data[i], 'status',
+													'question')
+											} else {
+												this.$set(response.data.data[i], 'status',
+													'success')
 												// response.data.data[i].status='success'
 											}
-											response.data.data[i].workflowlen=response.data.data[i].workflowHistoricTasks.length
-											var workflowdata=response.data.data[i].workflowHistoricTasks
-											var staffsdata=response.data.data[i].commonStaffs
+											response.data.data[i].workflowlen = response.data
+												.data[
+													i].workflowHistoricTasks.length
+											var workflowdata = response.data.data[i]
+												.workflowHistoricTasks
+											var staffsdata = response.data.data[i].commonStaffs
 											for (let q = 0; q < staffsdata.length; q++) {
-												staffsdata[q].status=false
-												staffsdata[q].staffTitle=staffsdata[q].staffName
+												staffsdata[q].status = false
+												staffsdata[q].staffTitle = staffsdata[q]
+													.staffName
 												for (let k = 0; k < workflowdata.length; k++) {
-													if(staffsdata[q].staffId==workflowdata[k].operatorId){
-														staffsdata[q].status=true
+													if (staffsdata[q].staffId == workflowdata[
+															k]
+														.operatorId) {
+														staffsdata[q].status = true
 													}
 												}
 											}
 										}
-										response.data.data[i].commonStaffs1=response.data.data[i].commonStaffs
-									}else{
-										if(response.data.data[i].workflowHistoricTasks&&response.data.data[i].workflowHistoricTasks.length>0){
-											var len =response.data.data[i].workflowHistoricTasks.length-1
-											if(response.data.data[i].workflowHistoricTasks[len].approved){
-												this.$set(response.data.data[i],'status','success')
-											}else{
-												this.$set(response.data.data[i],'status','error')
+										response.data.data[i].commonStaffs1 = response.data
+											.data[i]
+											.commonStaffs
+									} else {
+										if (response.data.data[i].workflowHistoricTasks &&
+											response
+											.data.data[i].workflowHistoricTasks.length > 0) {
+											var len = response.data.data[i]
+												.workflowHistoricTasks
+												.length - 1
+											if (response.data.data[i].workflowHistoricTasks[
+													len]
+												.approved) {
+												this.$set(response.data.data[i], 'status',
+													'success')
+											} else {
+												this.$set(response.data.data[i], 'status',
+													'error')
 											}
-											response.data.data[i].operatorTitle=response.data.data[i].workflowHistoricTasks[len].operatorName.substring(response.data.data[i].workflowHistoricTasks[0].operatorName.length - 2)
-											response.data.data[i].operatorName=response.data.data[i].workflowHistoricTasks[len].operatorName
-											var time=new Date(response.data.data[i].workflowHistoricTasks[len].claimTime).getTime()
-											response.data.data[i].updateDate=this.$u.timeFormat(time, 'mm.dd hh:MM')
+											response.data.data[i].operatorTitle = response.data
+												.data[i].workflowHistoricTasks[len]
+												.operatorName
+												.substring(response.data.data[i]
+													.workflowHistoricTasks[0].operatorName
+													.length -
+													2)
+											response.data.data[i].operatorName = response.data
+												.data[i].workflowHistoricTasks[len]
+												.operatorName
+											var time = new Date(response.data.data[i]
+													.workflowHistoricTasks[len].claimTime)
+												.getTime()
+											response.data.data[i].updateDate = this.$u
+												.timeFormat(
+													time, 'mm.dd hh:MM')
 											// response.data.data[i].auditMind=response.data.data[i].workflowHistoricTasks[len].auditMind
-											if (response.data.data[i].workflowHistoricTasks[len].auditMind && response.data.data[i].workflowHistoricTasks[len].auditMind.indexOf("##") !=-1) {
-												response.data.data[i].auditMind = response.data.data[i].workflowHistoricTasks[len].auditMind.split("##")[0]
-												response.data.data[i].fileUrl = response.data.data[i].workflowHistoricTasks[len].auditMind.split("##")[1].split(",")
-											}else{
-												response.data.data[i].auditMind = response.data.data[i].workflowHistoricTasks[len].auditMind
+											if (response.data.data[i].workflowHistoricTasks[
+													len]
+												.auditMind && response.data.data[i]
+												.workflowHistoricTasks[len].auditMind.indexOf(
+													"##") != -1) {
+												response.data.data[i].auditMind = response.data
+													.data[i].workflowHistoricTasks[len]
+													.auditMind
+													.split("##")[0]
+												response.data.data[i].fileUrl = response.data
+													.data[
+														i].workflowHistoricTasks[len].auditMind
+													.split("##")[1].split(",")
+											} else {
+												response.data.data[i].auditMind = response.data
+													.data[i].workflowHistoricTasks[len]
+													.auditMind
 											}
-										}else{
-											this.$set(response.data.data[i],'status','question')
+										} else {
+											this.$set(response.data.data[i], 'status',
+												'question')
 											// response.data.data[i].status='question'
-											if(response.data.data[i].desc=='总经理助理审核'){
-												response.data.data[i].operatorTitle='总助'
-											}else if(response.data.data[i].desc=='杜大光审核'){
-												response.data.data[i].operatorTitle='大光'
-											}else{
-												response.data.data[i].operatorTitle=response.data.data[i].desc.substring(0,2)
+											if (response.data.data[i].desc == '总经理助理审核') {
+												response.data.data[i].operatorTitle = '总助'
+											} else if (response.data.data[i].desc == '杜大光审核') {
+												response.data.data[i].operatorTitle = '大光'
+											} else {
+												response.data.data[i].operatorTitle = response
+													.data
+													.data[i].desc.substring(0, 2)
 											}
-											response.data.data[i].operatorName=response.data.data[i].desc
-											var time1=new Date(response.data.data[i].updateDate).getTime()
-											response.data.data[i].updateDate=this.$u.timeFormat(time1, 'mm.dd hh:MM')
-											response.data.data[i].auditMind=''
+											response.data.data[i].operatorName = response.data
+												.data[i].desc
+											var time1 = new Date(response.data.data[i]
+													.updateDate)
+												.getTime()
+											response.data.data[i].updateDate = this.$u
+												.timeFormat(
+													time1, 'mm.dd hh:MM')
+											response.data.data[i].auditMind = ''
 										}
 									}
 								}
 								console.log(response.data.data)
-								for(let i = 0 ;i<response.data.data.length;i++){
-									if(response.data.data[i].status == "error"){
+								for (let i = 0; i < response.data.data.length; i++) {
+									if (response.data.data[i].status == "error") {
 										this.auditCheck = "error"
 										break;
-									}else if(response.data.data[i].status == "question"){
+									} else if (response.data.data[i].status == "question") {
 										this.auditCheck = "question"
 										break;
-									}else{ 
+									} else {
 										this.auditCheck = "success"
 									}
 								}
 								this.auditList = response.data.data
-								var time2=new Date(this.list.createDate).getTime()
-								var time3=this.$u.timeFormat(time2, 'mm.dd hh:MM')
+								var time2 = new Date(this.list.createDate).getTime()
+								var time3 = this.$u.timeFormat(time2, 'mm.dd hh:MM')
 								this.auditList.unshift({
-									operatorTitle:this.list.creater.substring(0,2),
-									operatorName:this.list.creater,
-									updateDate:time3,
-									auditMind:'',
-									desc:'发起申请',
-									showflow:false,
-									commonStaffs1:null,
-									commonStaffs:null,
-									workflowHistoricTasks:[],
-									status:'success'
+									operatorTitle: this.list.creater.substring(0, 2),
+									operatorName: this.list.creater,
+									updateDate: time3,
+									auditMind: '',
+									desc: '发起申请',
+									showflow: false,
+									commonStaffs1: null,
+									commonStaffs: null,
+									workflowHistoricTasks: [],
+									status: 'success'
 								})
 							})
-						// 	this.$api.doRequest('get', '/commonUser/getHis', {
-						// 		workflowId: res1.data.data[0].id,
-						// 		businessKey: this.id,
-						// 		// branch:that.list.jointVentureParties?that.list.jointVentureParties:'zt'
-						// 	}).then(response => {
-						// 		uni.hideLoading()
-						// 		for (let i = 0; i < response.data.data.length; i++) {
-						// 			this.$set(response.data.data[i], 'status', 'question')
-						// 			// console.log(response.data.data[i].workflowHistoricTasks,i)
-						// 			if (response.data.data[i].commonStaffs) {
-						// 				response.data.data[i].showflow = false
-						// 				response.data.data[i].operatorTitle = response.data.data[i]
-						// 					.desc.substring(0, 2)
-						// 				response.data.data[i].operatorName = response.data.data[i]
-						// 					.desc
-						// 				response.data.data[i].staffscontent = '共' + response.data
-						// 					.data[i].commonStaffs.length + '人,当前审核' + response.data
-						// 					.data[i].workflowHistoricTasks.length + '人'
-						// 				if (response.data.data[i].workflowHistoricTasks && response
-						// 					.data.data[i].workflowHistoricTasks.length > 0) {
-						// 					if (response.data.data[i].workflowHistoricTasks
-						// 						.length != response.data.data[i].commonStaffs
-						// 						.length) {
-						// 						// response.data.data[i].status='question'
-						// 						this.$set(response.data.data[i], 'status',
-						// 							'question')
-						// 					} else {
-						// 						this.$set(response.data.data[i], 'status',
-						// 							'success')
-						// 						// response.data.data[i].status='success'
-						// 					}
-						// 					response.data.data[i].workflowlen = response.data.data[
-						// 						i].workflowHistoricTasks.length
-						// 					var workflowdata = response.data.data[i]
-						// 						.workflowHistoricTasks
-						// 					var staffsdata = response.data.data[i].commonStaffs
-						// 					for (let q = 0; q < staffsdata.length; q++) {
-						// 						staffsdata[q].status = false
-						// 						staffsdata[q].staffTitle = staffsdata[q].staffName
-						// 						for (let k = 0; k < workflowdata.length; k++) {
-						// 							if (staffsdata[q].staffId == workflowdata[k]
-						// 								.operatorId) {
-						// 								staffsdata[q].status = true
-						// 							}
-						// 						}
-						// 					}
-						// 				}
-						// 				response.data.data[i].commonStaffs1 = response.data.data[i]
-						// 					.commonStaffs
-						// 			} else {
-						// 				if (response.data.data[i].workflowHistoricTasks && response
-						// 					.data.data[i].workflowHistoricTasks.length > 0) {
-						// 					var len = response.data.data[i].workflowHistoricTasks
-						// 						.length - 1
-						// 					if (response.data.data[i].workflowHistoricTasks[len]
-						// 						.approved) {
-						// 						this.$set(response.data.data[i], 'status',
-						// 							'success')
-						// 					} else {
-						// 						this.$set(response.data.data[i], 'status', 'error')
-						// 					}
-						// 					response.data.data[i].operatorTitle = response.data
-						// 						.data[i].workflowHistoricTasks[len].operatorName
-						// 						.substring(response.data.data[i]
-						// 							.workflowHistoricTasks[0].operatorName.length -
-						// 							2)
-						// 					response.data.data[i].operatorName = response.data
-						// 						.data[i].workflowHistoricTasks[len].operatorName
-						// 					var time = new Date(response.data.data[i]
-						// 							.workflowHistoricTasks[len].claimTime)
-						// 						.getTime()
-						// 					response.data.data[i].updateDate = this.$u.timeFormat(
-						// 						time, 'mm.dd hh:MM')
-						// 					response.data.data[i].auditMind = response.data.data[i]
-						// 						.workflowHistoricTasks[len].auditMind
-						// 				} else {
-						// 					this.$set(response.data.data[i], 'status', 'question')
-						// 					// response.data.data[i].status='question'
-						// 					if (response.data.data[i].desc == '总经理助理审核') {
-						// 						response.data.data[i].operatorTitle = '总助'
-						// 					} else if (response.data.data[i].desc == '杜大光审核') {
-						// 						response.data.data[i].operatorTitle = '大光'
-						// 					} else {
-						// 						response.data.data[i].operatorTitle = response.data
-						// 							.data[i].desc.substring(0, 2)
-						// 					}
-						// 					response.data.data[i].operatorName = response.data
-						// 						.data[i].desc
-						// 					var time1 = new Date(response.data.data[i].updateDate)
-						// 						.getTime()
-						// 					response.data.data[i].updateDate = this.$u.timeFormat(
-						// 						time1, 'mm.dd hh:MM')
-						// 					response.data.data[i].auditMind = ''
-						// 				}
-						// 			}
-						// 		}
-						// 		console.log(response.data.data)
-						// 		for (let i = 0; i < response.data.data.length; i++) {
-						// 			if (response.data.data[i].status == "error") {
-						// 				this.auditCheck = "error"
-						// 				break;
-						// 			} else if (response.data.data[i].status == "question") {
-						// 				this.auditCheck = "question"
-						// 				break;
-						// 			} else {
-						// 				this.auditCheck = "success"
-						// 			}
-						// 		}
-						// 		this.auditList = response.data.data
-						// 		var time2 = new Date(this.list.createDate).getTime()
-						// 		var time3 = this.$u.timeFormat(time2, 'mm.dd hh:MM')
-						// 		this.auditList.unshift({
-						// 			operatorTitle: this.list.creater.substring(0, 2),
-						// 			operatorName: this.list.creater,
-						// 			updateDate: time3,
-						// 			auditMind: '',
-						// 			desc: '发起申请',
-						// 			showflow: false,
-						// 			commonStaffs1: null,
-						// 			commonStaffs: null,
-						// 			workflowHistoricTasks: [],
-						// 			status: 'success'
-						// 		})
-						// 	})
-						// })
-					})
+
+						})
 					}
 				})
+				await this.$api.doRequest('post', '/CarPostionController/api/gettrack', {
+						// startDate:this.datalist.amountDeadline ,
+						// endDate: this.datalist.amountDeadline.createDate,
+						startDate: "2023-02-20 01:00:00",
+						endDate: "2023-02-20 24:00:00",
+
+					}).then(res => {
+						console.log(res)
+						if (res.data.code == 200) {
+							// uni.hideLoading()
+
+							let _list = JSON.parse(res.data.data)
+							this.latitude = _list[0].lat
+							this.longitude = _list[0].lng
+							this.covers[0].latitude = this.latitude;
+							this.covers[0].longitude = this.longitude;
+							console.log("_list", _list)
+							this.polyline[0].points = []
+							for (let i = 0; i < _list.length; i++) {
+								this.polyline[0].points.push({
+									latitude: _list[i].lat,
+									longitude: _list[i].lng
+								})
+
+							}
+							console.log(this.polyline)
+							// var that = this
+							// setTimeout(() => {
+							// 	that.durationTime = Math.ceil(30000 / that.polyline[0].points
+							// 		.length) //默认播放全程使用30秒,计算相连两点动画时长
+							// 	that.initMapData()
+							// }, 1000)
+						}
+					})
+					.catch(res => {
+						uni.$u.toast(res.message);
+					});
 			},
 			filterFileType(index, lists) {
 				if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
@@ -631,7 +599,7 @@
 				that.$api.doRequest('post', '/newWorkflow/api/handle', {
 					taskId: that.list.taskId,
 					approved: false,
-					auditMind: info?info:"",
+					auditMind: info ? info : "",
 					needReapply: true,
 				}).then(res => {
 					that.$api.msg('驳回成功')
@@ -664,7 +632,7 @@
 					that.$api.doRequest('post', '/newWorkflow/api/handle', {
 						taskId: that.list.taskId,
 						approved: true,
-						auditMind: info?info:"",
+						auditMind: info ? info : "",
 						needReapply: true,
 					}).then(res => {
 						that.$api.msg('通过成功')
@@ -892,8 +860,8 @@
 		padding: 10px;
 		border-top: 1px solid #eee;
 		font-size: 34rpx;
-		z-index:10;
-		background:#fff;
+		z-index: 10;
+		background: #fff;
 	}
 
 	.cancel {
@@ -982,8 +950,8 @@
 						position: absolute;
 						border-radius: 50%;
 						padding: 0px 8rpx;
-						width:40rpx;
-						height:40rpx;
+						width: 40rpx;
+						height: 40rpx;
 						right: -3px;
 						bottom: -3px;
 						background: #fff;
@@ -1049,11 +1017,12 @@
 						}
 					}
 				}
+
 				.audit_img {
 					flex-wrap: wrap;
 					// margin: 0 10rpx;
 					margin-left: 20rpx;
-				
+
 					.url_css {
 						border: 1px solid #999999;
 						border-radius: 10px;
@@ -1062,7 +1031,7 @@
 						overflow: hidden;
 						width: 73px;
 						height: 73px;
-				
+
 						.url_img {
 							width: 73px;
 							height: 73px;
@@ -1116,7 +1085,8 @@
 		font-size: 30rpx;
 		font-weight: 600;
 	}
-	.place{
+
+	.place {
 		margin: auto;
 		margin-right: 0px;
 		text-align: right;
@@ -1253,23 +1223,22 @@
 			text-align: right;
 		}
 	}
+
 	//凭证
-	.voucher{
-		.voucher_tips{
+	.voucher {
+		.voucher_tips {
 			margin-top: 20rpx;
 			color: #878C9C;
 		}
 	}
-	
+
 
 	.upload {
-	   margin: auto;
-	   margin-right: 0px;
-	}
-	/deep/.place{
-		color:#000;
+		margin: auto;
+		margin-right: 0px;
 	}
 
+
 /deep/.u-upload .u-list-item{
 		background:#fff;
 		border:1px dashed #ccc;
@@ -1282,5 +1251,8 @@
 		align-items: center;
 		justify-content: center;
 		flex-direction: column;
+}
+	/deep/.place {
+		color: #000;
 	}
 </style>

+ 183 - 128
pages/task/audit/warehouse_warrant.vue

@@ -37,8 +37,10 @@
 				<view class="right" style='width:33.3333%;text-align:center;'>金额(元)</view>
 			</view>
 			<view class="row" v-for='item in auditInfo.goodNameList'>
-				<view class="left" style='width:33.3333%;text-align:center;border-right:1px solid #ccc;'>{{item.goodsName}}</view>
-				<view class="right" style='width:33.3333%;text-align:center;border-right:1px solid #ccc;'>{{item.inWarehouseWeight}}</view>
+				<view class="left" style='width:33.3333%;text-align:center;border-right:1px solid #ccc;'>
+					{{item.goodsName}}</view>
+				<view class="right" style='width:33.3333%;text-align:center;border-right:1px solid #ccc;'>
+					{{item.inWarehouseWeight}}</view>
 				<view class="right" style='width:33.3333%;text-align:center;'>{{item.requestFunds}}</view>
 			</view>
 			<view class="row">
@@ -66,6 +68,14 @@
 				<view class="right">{{auditInfo.count}}</view>
 			</view> -->
 		</view>
+		<view class="content1" v-if="auditInfo.warehousingOrderList[0].remark">
+			<view class="title ">
+				备注信息
+			</view>
+			<view style="margin-top: 20rpx;">
+				{{auditInfo.warehousingOrderList[0].remark}}
+			</view>
+		</view>
 
 		<view class="content1">
 			<view class="title ">
@@ -129,14 +139,14 @@
 				<view class="row" v-if='item.desc!="_PLACEHOLDER_"'>
 					<view class="left">
 						<view class="item1">
-							<view class="item-content">{{item.operatorTitle}}</view> 
+							<view class="item-content">{{item.operatorTitle}}</view>
 							<view v-if="item.status=='success'" class='status success'>
 								<u-icon name="checkmark" color="#2979ff" size="24"></u-icon>
 							</view>
 							<view v-if="item.status=='error'" class='status error'>
 								<u-icon name="close" color="rgb(245, 108, 108)" size="24"></u-icon>
 							</view>
-							<view  v-if="item.status=='question'" class='status question'>
+							<view v-if="item.status=='question'" class='status question'>
 								<u-icon name="question" color="#f9ae3d" size="24"></u-icon>
 							</view>
 						</view>
@@ -147,14 +157,22 @@
 								<view class="name">{{item.desc}}
 								</view>
 								<!-- <view class='time'>{{item.updateDate}}</view> -->
-								<view  v-if="item.status=='success'" class="status success">{{item.commonStaffs1?item.staffscontent:item.operatorName}}<text v-if='!item.commonStaffs1&&index!=0'>已审核</text></view>
-								<view  v-if="item.status=='error'" class="status error">{{item.commonStaffs1?item.staffscontent:item.operatorName}}<text v-if='!item.commonStaffs1'>{{item.workflowHistoricTasks ? "已驳回":''}}</text></view>
-								<view  v-if="item.status=='question'" class="status question">{{item.commonStaffs1?item.staffscontent:''}}<text v-if='!item.commonStaffs1'>未审核</text></view>
+								<view v-if="item.status=='success'" class="status success">
+									{{item.commonStaffs1?item.staffscontent:item.operatorName}}<text
+										v-if='!item.commonStaffs1&&index!=0'>已审核</text></view>
+								<view v-if="item.status=='error'" class="status error">
+									{{item.commonStaffs1?item.staffscontent:item.operatorName}}<text
+										v-if='!item.commonStaffs1'>{{item.workflowHistoricTasks ? "已驳回":''}}</text>
+								</view>
+								<view v-if="item.status=='question'" class="status question">
+									{{item.commonStaffs1?item.staffscontent:''}}<text
+										v-if='!item.commonStaffs1'>未审核</text></view>
 								<!-- <view  class="status success">吕波(已审核)</view> -->
-								
+
 							</view>
-							<view v-if='index==0||item.workflowHistoricTasks&&item.workflowHistoricTasks.length>0' class='time'>
-							{{item.updateDate}}
+							<view v-if='index==0||item.workflowHistoricTasks&&item.workflowHistoricTasks.length>0'
+								class='time'>
+								{{item.updateDate}}
 							</view>
 						</view>
 						<view v-if='item.auditMind' class="right-content">
@@ -162,7 +180,8 @@
 						</view>
 					</view>
 					<view v-if='item.commonStaffs1' class="right">
-						<u-icon @click='showcontent(item)' :name="item.showflow?'arrow-up':'arrow-down'"  size="28"></u-icon>
+						<u-icon @click='showcontent(item)' :name="item.showflow?'arrow-up':'arrow-down'" size="28">
+						</u-icon>
 					</view>
 				</view>
 				<view v-if='item.showflow' style='padding:10px 0 0 50px;'>
@@ -171,8 +190,8 @@
 							<view class="item-content">
 								<u-icon v-if='item1.status' name="checkmark" color="#fff" size="14"></u-icon>
 								<u-icon v-if='!item1.status' name="question" color="#f9ae3d" size="14"></u-icon>
-							</view> 
-							<view class="name">{{item1.staffName}}</view> 
+							</view>
+							<view class="name">{{item1.staffName}}</view>
 						</view>
 					</view>
 				</view>
@@ -234,7 +253,7 @@
 				id: "",
 				auditList: [],
 				url: "11",
-				url2:""
+				url2: ""
 			}
 		},
 		onBackPress(e) {
@@ -258,19 +277,19 @@
 			...mapState(['hasLogin', 'userInfo']),
 		},
 		methods: {
-			detailed(data,status){
+			detailed(data, status) {
 				let obj
-				if(status==1){
-					 obj= JSON.stringify(this.auditInfo.warehousingOrderList)
-				}else{
+				if (status == 1) {
+					obj = JSON.stringify(this.auditInfo.warehousingOrderList)
+				} else {
 					obj = JSON.stringify([data])
 				}
-					uni.navigateTo({
-						url: '/pages/task/audit/viewDetail?data='+obj
-					});
+				uni.navigateTo({
+					url: '/pages/task/audit/viewDetail?data=' + obj
+				});
 			},
-			showcontent(item){
-				item.showflow=!item.showflow
+			showcontent(item) {
+				item.showflow = !item.showflow
 			},
 			openXls() {
 				if (this.url && this.url != "ng") {
@@ -311,7 +330,7 @@
 					title: "加载中...",
 					mask: true
 				})
-				var that =this
+				var that = this
 				// this.$api.doRequest('get', '/warehousingOrder/selectInfo', {
 				// 	currentPage: 1,
 				// 	pageSize: 100,
@@ -358,39 +377,44 @@
 				}).then(res1 => {
 					if (res1.data.code == 200) {
 						this.auditInfo = res1.data.data
-						var arr=[]
-						if(res1.data.data.warehousingOrderList){
-							var datalist=JSON.parse(JSON.stringify(res1.data.data.warehousingOrderList))
+						var arr = []
+						if (res1.data.data.warehousingOrderList) {
+							var datalist = JSON.parse(JSON.stringify(res1.data.data.warehousingOrderList))
 							for (var i = 0; i < datalist.length; i++) {
-								if(arr.length==0){
+								if (arr.length == 0) {
 									arr.push(datalist[i])
-								}else{
-									var arr1=arr.filter((item)=>{return item.goodsName==datalist[i].goodsName})
-									if(arr1.length>0){
+								} else {
+									var arr1 = arr.filter((item) => {
+										return item.goodsName == datalist[i].goodsName
+									})
+									if (arr1.length > 0) {
 										for (var q = 0; q < arr.length; q++) {
-											if(arr[q].goodsName==datalist[i].goodsName){console.log(22222)
-												console.log(arr[q].inWarehouseWeight,datalist[i].inWarehouseWeight)
-												arr[q].inWarehouseWeight+=datalist[i].inWarehouseWeight
-												arr[q].requestFunds+=datalist[i].requestFunds
+											if (arr[q].goodsName == datalist[i].goodsName) {
+												console.log(22222)
+												console.log(arr[q].inWarehouseWeight, datalist[i]
+													.inWarehouseWeight)
+												arr[q].inWarehouseWeight += datalist[i].inWarehouseWeight
+												arr[q].requestFunds += datalist[i].requestFunds
 											}
 										}
-									}else{
+									} else {
 										arr.push(datalist[i])
 									}
 								}
-								
+
 							}
 							for (var q = 0; q < arr.length; q++) {
-								arr[q].inWarehouseWeight=arr[q].inWarehouseWeight.toFixed(2)
-								arr[q].requestFunds=arr[q].requestFunds.toFixed(2)
+								arr[q].inWarehouseWeight = arr[q].inWarehouseWeight.toFixed(2)
+								arr[q].requestFunds = arr[q].requestFunds.toFixed(2)
 							}
 						}
-						console.log(arr,1111111)
-						this.auditInfo.goodNameList=arr
-						if(this.auditInfo.inWarehouseWeightTotal){
-							this.auditInfo.inWarehouseWeightTotal = this.auditInfo.inWarehouseWeightTotal.toFixed(2)
+						console.log(arr, 1111111)
+						this.auditInfo.goodNameList = arr
+						if (this.auditInfo.inWarehouseWeightTotal) {
+							this.auditInfo.inWarehouseWeightTotal = this.auditInfo.inWarehouseWeightTotal.toFixed(
+								2)
 						}
-						if(this.auditInfo.requestFundsTotal){
+						if (this.auditInfo.requestFundsTotal) {
 							this.auditInfo.requestFundsTotal = this.auditInfo.requestFundsTotal.toFixed(2)
 						}
 						this.auditInfo.amountIngPayableTotal1 = helper.convertCurrency(this.auditInfo
@@ -402,90 +426,121 @@
 							this.$api.doRequest('get', '/commonUser/getHis', {
 								workflowId: res1.data.data[0].id,
 								businessKey: this.id,
-								branch:that.auditInfo.jointVentureParties?that.auditInfo.jointVentureParties:'zt'
+								branch: that.auditInfo.jointVentureParties ? that.auditInfo
+									.jointVentureParties : 'zt'
 							}).then(response => {
 								uni.hideLoading()
 								for (let i = 0; i < response.data.data.length; i++) {
-									this.$set(response.data.data[i],'status','question')
-									console.log(response.data.data[i].workflowHistoricTasks,i)
-									if(response.data.data[i].commonStaffs){
-										response.data.data[i].showflow=false
-										response.data.data[i].operatorTitle=response.data.data[i].desc.substring(0,2)
-										response.data.data[i].operatorName=response.data.data[i].desc
-										response.data.data[i].staffscontent='共'+response.data.data[i].commonStaffs.length+'人,当前审核'+response.data.data[i].workflowHistoricTasks.length+'人'
-										if(response.data.data[i].workflowHistoricTasks&&response.data.data[i].workflowHistoricTasks.length>0){
-											if(response.data.data[i].workflowHistoricTasks.length!=response.data.data[i].commonStaffs.length){
+									this.$set(response.data.data[i], 'status', 'question')
+									console.log(response.data.data[i].workflowHistoricTasks, i)
+									if (response.data.data[i].commonStaffs) {
+										response.data.data[i].showflow = false
+										response.data.data[i].operatorTitle = response.data.data[i]
+											.desc.substring(0, 2)
+										response.data.data[i].operatorName = response.data.data[i]
+											.desc
+										response.data.data[i].staffscontent = '共' + response.data
+											.data[i].commonStaffs.length + '人,当前审核' + response.data
+											.data[i].workflowHistoricTasks.length + '人'
+										if (response.data.data[i].workflowHistoricTasks && response
+											.data.data[i].workflowHistoricTasks.length > 0) {
+											if (response.data.data[i].workflowHistoricTasks
+												.length != response.data.data[i].commonStaffs
+												.length) {
 												// response.data.data[i].status='question'
-												this.$set(response.data.data[i],'status','question')
-											}else{
-												this.$set(response.data.data[i],'status','success')
+												this.$set(response.data.data[i], 'status',
+													'question')
+											} else {
+												this.$set(response.data.data[i], 'status',
+													'success')
 												// response.data.data[i].status='success'
 											}
-											response.data.data[i].workflowlen=response.data.data[i].workflowHistoricTasks.length
-											var workflowdata=response.data.data[i].workflowHistoricTasks
-											var staffsdata=response.data.data[i].commonStaffs
+											response.data.data[i].workflowlen = response.data.data[
+												i].workflowHistoricTasks.length
+											var workflowdata = response.data.data[i]
+												.workflowHistoricTasks
+											var staffsdata = response.data.data[i].commonStaffs
 											for (let q = 0; q < staffsdata.length; q++) {
-												staffsdata[q].status=false
-												staffsdata[q].staffTitle=staffsdata[q].staffName
+												staffsdata[q].status = false
+												staffsdata[q].staffTitle = staffsdata[q].staffName
 												for (let k = 0; k < workflowdata.length; k++) {
-													if(staffsdata[q].staffId==workflowdata[k].operatorId){
-														staffsdata[q].status=true
+													if (staffsdata[q].staffId == workflowdata[k]
+														.operatorId) {
+														staffsdata[q].status = true
 													}
 												}
 											}
 										}
-										response.data.data[i].commonStaffs1=response.data.data[i].commonStaffs
-									}else{
-										if(response.data.data[i].workflowHistoricTasks&&response.data.data[i].workflowHistoricTasks.length>0){
-											var len =response.data.data[i].workflowHistoricTasks.length-1
-											if(response.data.data[i].workflowHistoricTasks[len].approved){
-												this.$set(response.data.data[i],'status','success')
-											}else{
-												this.$set(response.data.data[i],'status','error')
+										response.data.data[i].commonStaffs1 = response.data.data[i]
+											.commonStaffs
+									} else {
+										if (response.data.data[i].workflowHistoricTasks && response
+											.data.data[i].workflowHistoricTasks.length > 0) {
+											var len = response.data.data[i].workflowHistoricTasks
+												.length - 1
+											if (response.data.data[i].workflowHistoricTasks[len]
+												.approved) {
+												this.$set(response.data.data[i], 'status',
+													'success')
+											} else {
+												this.$set(response.data.data[i], 'status', 'error')
 											}
-											response.data.data[i].operatorTitle=response.data.data[i].workflowHistoricTasks[len].operatorName.substring(response.data.data[i].workflowHistoricTasks[0].operatorName.length - 2)
-											response.data.data[i].operatorName=response.data.data[i].workflowHistoricTasks[len].operatorName
-											var time=new Date(response.data.data[i].workflowHistoricTasks[len].claimTime).getTime()
-											response.data.data[i].updateDate=this.$u.timeFormat(time, 'mm.dd hh:MM')
-											response.data.data[i].auditMind=response.data.data[i].workflowHistoricTasks[len].auditMind
-										}else{
-											this.$set(response.data.data[i],'status','question')
+											response.data.data[i].operatorTitle = response.data
+												.data[i].workflowHistoricTasks[len].operatorName
+												.substring(response.data.data[i]
+													.workflowHistoricTasks[0].operatorName.length -
+													2)
+											response.data.data[i].operatorName = response.data
+												.data[i].workflowHistoricTasks[len].operatorName
+											var time = new Date(response.data.data[i]
+												.workflowHistoricTasks[len].claimTime)
+											.getTime()
+											response.data.data[i].updateDate = this.$u.timeFormat(
+												time, 'mm.dd hh:MM')
+											response.data.data[i].auditMind = response.data.data[i]
+												.workflowHistoricTasks[len].auditMind
+										} else {
+											this.$set(response.data.data[i], 'status', 'question')
 											// response.data.data[i].status='question'
-											if(response.data.data[i].desc=='总经理助理审核'){
-												response.data.data[i].operatorTitle='总助'
-											}else if(response.data.data[i].desc=='杜大光审核'){
-												response.data.data[i].operatorTitle='大光'
-											}else{
-												response.data.data[i].operatorTitle=response.data.data[i].desc.substring(0,2)
+											if (response.data.data[i].desc == '总经理助理审核') {
+												response.data.data[i].operatorTitle = '总助'
+											} else if (response.data.data[i].desc == '杜大光审核') {
+												response.data.data[i].operatorTitle = '大光'
+											} else {
+												response.data.data[i].operatorTitle = response.data
+													.data[i].desc.substring(0, 2)
 											}
-											
-											response.data.data[i].operatorName=response.data.data[i].desc
-											var time1=new Date(response.data.data[i].updateDate).getTime()
-											response.data.data[i].updateDate=this.$u.timeFormat(time1, 'mm.dd hh:MM')
-											response.data.data[i].auditMind=''
+
+											response.data.data[i].operatorName = response.data
+												.data[i].desc
+											var time1 = new Date(response.data.data[i].updateDate)
+												.getTime()
+											response.data.data[i].updateDate = this.$u.timeFormat(
+												time1, 'mm.dd hh:MM')
+											response.data.data[i].auditMind = ''
 										}
 									}
-									
+
 								}
 								console.log(response.data.data)
 								this.auditList = response.data.data
-								var time2=new Date(this.auditInfo.createDate).getTime()
-								var time3=this.$u.timeFormat(time2, 'mm.dd hh:MM')
+								var time2 = new Date(this.auditInfo.createDate).getTime()
+								var time3 = this.$u.timeFormat(time2, 'mm.dd hh:MM')
 								this.auditList.unshift({
-									operatorTitle:this.auditInfo.creater.substring(0,2),
-									operatorName:this.auditInfo.creater,
-									updateDate:time3,
-									auditMind:'',
-									desc:'发起申请',
-									showflow:false,
-									commonStaffs1:null,
-									commonStaffs:null,
-									workflowHistoricTasks:[],
-									status:'success'
+									operatorTitle: this.auditInfo.creater.substring(0, 2),
+									operatorName: this.auditInfo.creater,
+									updateDate: time3,
+									auditMind: '',
+									desc: '发起申请',
+									showflow: false,
+									commonStaffs1: null,
+									commonStaffs: null,
+									workflowHistoricTasks: [],
+									status: 'success'
 								})
 							})
 						})
-						
+
 					}
 				})
 				this.$api.doRequest('get', '/workflow/query/workflowDefinitions', {
@@ -757,17 +812,17 @@
 		margin: 20rpx 0;
 		border-radius: 20rpx;
 		padding: 20rpx;
-	
+
 		.row {
 			display: flex;
-	
+
 			.left {
 				display: flex;
 				align-items: center;
-	
+
 				.item1 {
 					position: relative;
-	
+
 					.item-content {
 						background: #617AE0;
 						width: 44px;
@@ -778,7 +833,7 @@
 						font-size: 15px;
 						color: #fff;
 					}
-	
+
 					.status {
 						position: absolute;
 						border-radius: 50%;
@@ -787,27 +842,27 @@
 						bottom: -3px;
 						background: #fff;
 					}
-	
+
 					.status.success {
 						border: 1px solid rgb(60, 156, 255);
 					}
-	
+
 					.status.error {
 						border: 1px solid rgb(245, 108, 108);
 					}
-	
+
 					.status.question {
 						border: 1px solid #f9ae3d;
 					}
 				}
-	
+
 			}
-	
+
 			.right {
 				width: 80%;
 				// color: #B0B1B5;
 				margin-top: 10px;
-	
+
 				.right-content {
 					background: #F2F3F7;
 					margin-left: 10px;
@@ -816,33 +871,33 @@
 					border-radius: 5px;
 					color: #B0B1B5;
 				}
-	
+
 				.right-item {
 					display: flex;
 					justify-content: space-between;
-	
+
 					.time {
 						color: #999;
 					}
-	
+
 					.item2 {
 						margin-left: 20rpx;
 						margin-top: -7px;
-	
+
 						.name {
 							font-size: 28rpx;
 							font-weight: 800;
 							margin-bottom: 4px;
 						}
-	
+
 						.status.success {
 							color: #6CC48C;
 						}
-	
+
 						.status.error {
 							color: rgb(245, 108, 108);
 						}
-	
+
 						.status.question {
 							color: #f9ae3d;
 						}
@@ -850,10 +905,10 @@
 				}
 			}
 		}
-	
+
 		.row2 {
 			display: flex;
-	
+
 			.item-content {
 				background: #22C572;
 				width: 30px;
@@ -866,22 +921,22 @@
 				padding: 0 2px;
 				margin: 0 auto;
 			}
-	
+
 			.status {
 				position: absolute;
 				top: 0;
 				right: 0;
 			}
 		}
-	
+
 		.row-line {
 			width: 1px;
 			height: 30px;
 			background: #F2F2F2;
 			margin: 10rpx 50rpx;
-	
+
 		}
-	
+
 		.audit {
 			margin-top: 20rpx;
 		}

+ 8 - 0
pages/task/audit/warehouse_warrant_detail.vue

@@ -72,6 +72,14 @@
 				<view class="right">{{auditInfo.count}}</view>
 			</view> -->
 		</view>
+		<view class="content1" v-if="auditInfo.warehousingOrderList[0].remark">
+			<view class="title ">
+				备注信息
+			</view>
+			<view style="margin-top: 20rpx;">
+				{{auditInfo.warehousingOrderList[0].remark}}
+			</view>
+		</view>
 
 		<view class="content1">
 			<view class="title ">

+ 1 - 1
pages/task/my_task.vue

@@ -799,7 +799,7 @@
 				} else if (item.businessCode == 'FEIYONGGUANLI-APPROVE') {
 					if (this.statusFlag == 1) {
 						uni.navigateTo({
-							url: `/pages/task/audit/charge_against_revenue?id=` + item.businessId
+							url: `/pages/task/audit/charge_against_revenue?id=` + item.businessId + '&vesselId=' + item.vesselId
 						})
 					} else {
 						uni.navigateTo({

+ 158 - 0
pages/task/playMap.nvue

@@ -0,0 +1,158 @@
+<template>
+	<view class="content">
+		<map ref="myMap" id="myMap" :markers="markers" :polyline="polyline" :latitude="polyline[0].points[0].latitude"
+			:longitude="polyline[0].points[0].longitude" style="width: 100%; height:3000rpx" />
+		<view class="place">
+			<!-- <text v-if="startMove" @click="handleStopMove()" class="play-text">暂停播放</text> -->
+			<text @click="handleStartMove()" class="play-text">播放轨迹</text>
+		</view>
+
+		<u-toast ref="uToast"></u-toast>
+	</view>
+
+</template>
+
+<script>
+	// const img = '/static/logo.png';
+	const img = '/static/live-camera/shutter.png';
+	import * as config from '@/config'
+	let baseUrl = config.def().baseUrlNew
+	export default {
+		data() {
+			return {
+				scaleNum: 10,
+				mapContext: null, //地图对象
+				startMove: false, //是否开始回放
+				nextPointIndex: 1, //下一个坐标点的索引
+				durationTime: 1000, //相邻两点动画持续时长默认1秒
+				//路线信息
+				polyline: [{
+					points: [], // 点集合
+					color: '#3591fc', // 线的颜色
+					arrowLine: true, //带箭头的线
+					width: 6 // 线的宽度
+				}],
+				//标记点(即移动标记物)
+				markers: [{
+					id: 1,
+					width: 40,
+					height: 40,
+					latitude: 0,
+					longitude: 0,
+					// iconPath: "../static/greenCar.png",
+					iconPath: "https://taohaoliang.oss-cn-beijing.aliyuncs.com/app/car.png",
+					anchor: {
+						x: 0.5,
+						y: 1
+					}
+				}],
+				infoData: {},
+				content: "",
+				show: false,
+				obj: {}
+			}
+		},
+		onLoad(option) {
+
+
+			this.getTrack(option.startDate, option.endDate) //获取轨迹信息(只做演示,未进行远程请求)
+		},
+		methods: {
+			//模拟获取远程数据
+			getTrack(startDate, endDate) {
+				let that = this
+				uni.request({
+					url: baseUrl + '/CarPostionController/api/gettrack',
+					data: {
+						startDate: startDate,
+						endDate: endDate
+					},
+					method: 'post',
+					header: {
+						'content-type': 'application/json' //'application/x-www-form-urlencoded; charset=UTF-8',
+					},
+					success: (res) => {
+						console.log("res", res)
+						if (res.data.code == 200) {
+							let _list = JSON.parse(res.data.data)
+							that.latitude = _list[0].lat
+							that.longitude = _list[0].lng
+							that.markers[0].latitude = that.latitude;
+							that.markers[0].longitude = that.longitude;
+							console.log("_list", _list)
+							that.polyline[0].points = []
+							for (let i = 0; i < _list.length; i++) {
+								that.polyline[0].points.push({
+									latitude: _list[i].lat,
+									longitude: _list[i].lng
+								})
+
+							}
+							console.log(that.polyline)
+							that.durationTime = Math.ceil(30000 / that.polyline[0].points
+								.length) //默认播放全程使用30秒,计算相连两点动画时长
+							that.initMapData()
+						}
+					}
+				})
+			},
+			//设置地图
+			initMapData() {
+				this.initMarkers()
+				this.mapContext = uni.createMapContext('myMap', this)
+			},
+			// test() {
+			// 	this.mapContext.includePoints({
+			// 		points: this.polyline[0].points,
+			// 		padding: [100, 100, 1000, 100]
+			// 	})
+			// },
+			//设置位置(从起点开始)
+			initMarkers() {
+				this.markers[0].latitude = this.polyline[0].points[0].latitude
+				this.markers[0].longitude = this.polyline[0].points[0].longitude
+			},
+			//开始移动
+			handleStartMove() {
+				this.startMove = true
+				this.movePoint()
+			},
+			//停止移动
+			handleStopMove() {
+				this.startMove = false
+			},
+			//移动坐标
+			movePoint() {
+				this.mapContext.includePoints({
+					points: this.polyline[0].points,
+				})
+				this.mapContext.moveAlong({
+					duration: 10000,
+					markerId: this.markers[0].id,
+					path: this.polyline[0].points
+				})
+				console.log("this.nextPointIndex1 ", this.nextPointIndex, this.polyline[0].points.length - 1)
+				console.log("this.startMove1", this.startMove)
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.play-text {
+		font-size: 36px;
+		background-color: #91B4F4;
+		color: #fff;
+		padding: 20rpx 50rpx;
+		border-radius: 50rpx;
+		width: 400rpx;
+		text-align: center;
+	}
+
+	.place {
+		position: absolute;
+		z-index: 999;
+		bottom: 100rpx;
+		left: 180rpx;
+	}
+</style>

+ 288 - 0
pages/task/playMap.vue

@@ -0,0 +1,288 @@
+<template>
+	<view class="content">
+		<map ref="myMap" id="myMap" :markers="markers" :polyline="polyline" :latitude="polyline[0].points[0].latitude"
+			:longitude="polyline[0].points[0].longitude" style="width: 100%; height: 2000rpx" @updated="test" />
+
+		<button v-if="startMove" @click="handleStopMove()">暂停移动</button>
+		<button v-else @click="handleStartMove()">开始移动</button>
+		<u-toast ref="uToast"></u-toast>
+	</view>
+
+</template>
+
+<script>
+	// const img = '/static/logo.png';
+	const img = '/static/live-camera/shutter.png';
+	import * as config from '@/config'
+	let baseUrl = config.def().baseUrlNew
+	export default {
+		data() {
+			return {
+				scaleNum: 10,
+				mapContext: null, //地图对象
+				startMove: false, //是否开始回放
+				nextPointIndex: 1, //下一个坐标点的索引
+				durationTime: 1000, //相邻两点动画持续时长默认1秒
+				//路线信息
+				polyline: [{
+					width: 20,
+					points: [],
+					arrowLine: true,
+					color: '#3591FC',
+				}],
+				//标记点(即移动标记物)
+				markers: [{
+					id: 1,
+					width: 40,
+					height: 40,
+					latitude: 0,
+					longitude: 0,
+					iconPath: img,
+					anchor: {
+						x: 0.5,
+						y: 1
+					}
+				}],
+				infoData: {},
+				content: "",
+				show: false,
+				obj: {}
+			}
+		},
+		onLoad(option) {
+
+
+			this.getTrack(option.startDate, option.endDate) //获取轨迹信息(只做演示,未进行远程请求)
+		},
+		methods: {
+			//模拟获取远程数据
+			getTrack(startDate, endDate) {
+				uni.request({
+					url: baseUrl + '/CarPostionController/api/gettrack',
+					data: {
+						startDate: startDate,
+						endDate: endDate
+					},
+					method: 'post',
+					header: {
+						'content-type': 'application/json' //'application/x-www-form-urlencoded; charset=UTF-8',
+					},
+					success: (res) => {
+						console.log("res", res)
+						if (res.data.code == 200) {
+							let _list = JSON.parse(res.data.data)
+							this.latitude = _list[0].lat
+							this.longitude = _list[0].lng
+							this.markers[0].latitude = this.latitude;
+							this.markers[0].longitude = this.longitude;
+							console.log("_list", _list)
+							this.polyline[0].points = []
+							for (let i = 0; i < _list.length; i++) {
+								this.polyline[0].points.push({
+									latitude: _list[i].lat,
+									longitude: _list[i].lng
+								})
+
+							}
+							console.log(this.polyline)
+							var that = this
+							setTimeout(() => {
+								that.durationTime = Math.ceil(30000 / that.polyline[0].points
+									.length) //默认播放全程使用30秒,计算相连两点动画时长
+								that.initMapData()
+							}, 1000)
+						}
+					}
+				})
+			},
+			//设置地图
+			initMapData() {
+				this.initMarkers()
+				this.mapContext = uni.createMapContext('myMap', this)
+			},
+			test() {
+				this.mapContext.includePoints({
+					points: this.polyline[0].points,
+					padding: [100, 100, 1000, 100]
+				})
+			},
+			//设置位置(从起点开始)
+			initMarkers() {
+				this.markers[0].latitude = this.polyline[0].points[0].latitude
+				this.markers[0].longitude = this.polyline[0].points[0].longitude
+			},
+			//开始移动
+			handleStartMove() {
+				this.startMove = true
+				this.movePoint()
+			},
+			//停止移动
+			handleStopMove() {
+				this.startMove = false
+			},
+			//移动坐标
+			movePoint() {
+				/*
+				//也可以用这个方法
+				this.mapContext.moveAlong({
+					duration: 30000,
+					markerId: this.markers[0].id,
+					path: this.polyline[0].points
+				})
+				return
+				*/
+				this.mapContext.moveAlong({
+					duration: 10000,
+					markerId: this.markers[0].id,
+					path: this.polyline[0].points
+				})
+				console.log("this.nextPointIndex1 ", this.nextPointIndex, this.polyline[0].points.length - 1)
+				console.log("this.startMove1", this.startMove)
+				// this.mapContext.translateMarker({
+				// 	duration: this.durationTime,
+				// 	markerId: this.markers[0].id,
+				// 	destination: {
+				// 		latitude: this.polyline[0].points[this.nextPointIndex].latitude,
+				// 		longitude: this.polyline[0].points[this.nextPointIndex].longitude
+				// 	},
+				// 	animationEnd: res => {
+
+				// 		console.log("this.nextPointIndex ",this.nextPointIndex ,this.polyline[0].points.length - 1)
+				// 		console.log("this.startMove",this.startMove)
+				// 		//播放结束,继续移动到下一个点,最后一个点时结束移动
+				// 		if (this.nextPointIndex < this.polyline[0].points.length - 1) {
+				// 			this.nextPointIndex++
+				// 			if (this.startMove) {
+				// 				this.movePoint()
+				// 			}
+				// 		} else {
+				// 			this.nextPointIndex = 1
+				// 			this.startMove = false
+				// 		}
+				// 	}
+				// })
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.hcp-bottom {
+		left: 0;
+		bottom: 0;
+		width: 750rpx;
+		// position: fixed;
+	}
+
+	.content {
+		.top_btn {
+			// background-color: red;
+			position: fixed;
+			top: 30rpx;
+			left: 10px;
+			right: 30rpx;
+			flex-direction: row;
+			display: flex;
+			margin-top: 30px;
+			justify-content: space-between;
+
+			.returnPage {
+				flex-direction: row;
+				display: flex;
+
+				.return-icon {
+					width: 90rpx;
+					height: 90rpx;
+				}
+
+			}
+
+			.qiehuan {
+				flex-direction: row;
+				display: flex;
+				// width: 240rpx;
+				height: 90rpx;
+				background-color: #ffffff;
+				border-radius: 50rpx;
+				padding: 0 30rpx;
+
+				.tips {
+					line-height: 90rpx;
+				}
+
+				.qiehuan-icon {
+					width: 30rpx;
+					height: 30rpx;
+					margin-top: 30rpx;
+					margin-right: 10rpx;
+				}
+			}
+		}
+
+		.infoBox {
+			// width: 90%;
+			height: 260rpx;
+			background-color: #FFFFFF;
+			position: fixed;
+			top: 30rpx;
+			left: 10px;
+			right: 30rpx;
+			border-radius: 40rpx;
+			// padding:50rpx;
+			display: flex;
+			flex-direction: row;
+			margin-top: 100px;
+
+			.infoBox_left {
+				padding-top: 50rpx;
+				width: 250rpx;
+				padding-top: 80rpx;
+				// background-color: #18BC37;
+			}
+
+			.infoBox_right {
+				background-image: linear-gradient(to right, #f9f7f7, #ffffff);
+				display: flex;
+				flex-direction: row;
+				border-bottom-right-radius: 40rpx;
+				border-top-right-radius: 40rpx;
+
+				.jt-icon {
+					position: relative;
+					top: 75rpx;
+					width: 60rpx;
+					margin: auto 10rpx;
+				}
+
+				.send {
+					padding-top: 80rpx;
+					width: 180rpx;
+					// background-color: #0077AA;
+				}
+
+				.end {
+					padding-top: 80rpx;
+					width: 180rpx;
+				}
+			}
+
+			.title {
+				font-size: 44rpx;
+				font-weight: 600;
+				text-align: center;
+			}
+
+			.address {
+				text-align: center;
+				color: #8F8F8F;
+				font-size: 30rpx;
+				margin-top: 15rpx;
+			}
+
+			.estimate {
+				width: 120px;
+				text-align: center;
+			}
+		}
+	}
+</style>

BIN
static/greenCar.png