Browse Source

途宝报单bug修改

wangzhuo 1 year ago
parent
commit
d8d7b4fa49
2 changed files with 37 additions and 4 deletions
  1. 20 1
      pages/particulars/claimExpense/index.vue
  2. 17 3
      pages/particulars/index.vue

+ 20 - 1
pages/particulars/claimExpense/index.vue

@@ -398,7 +398,8 @@
 				}, {
 				}, {
 					name: '其他费用'
 					name: '其他费用'
 				}, {
 				}, {
-					name: '行程绕路'
+					name: '行程绕路',
+					badge: {},
 				}],
 				}],
 				isTabs: '行程费用',
 				isTabs: '行程费用',
 				// 报销金额
 				// 报销金额
@@ -508,6 +509,14 @@
 					// 	this.saveDisabled = false;
 					// 	this.saveDisabled = false;
 					// 	this.upDisabled = true;
 					// 	this.upDisabled = true;
 					// }
 					// }
+					if ((res.data.detourEmptyMile != null && res.data.detourEmptyMile != 0) || (res.data.detourLoadMile != null && res.data.detourLoadMile != 0)) {
+
+						for (var i = 0; i < this.tabs.length; i++) {
+							if (this.tabs[i].name === '行程绕路') {
+								this.tabs[i].badge.isDot = true;
+							}
+						}
+					}
 				
 				
 					this.formData = res.data;
 					this.formData = res.data;
 					var costBreakdownList = res.data.loadFeeItemsList;
 					var costBreakdownList = res.data.loadFeeItemsList;
@@ -1354,6 +1363,16 @@
 									type: 'wgs84',
 									type: 'wgs84',
 									isHighAccuracy: true,
 									isHighAccuracy: true,
 									geocode: true,
 									geocode: true,
+									fail: () => {
+										this.fileList1.pop();
+										this.$refs.uToast.show({
+											type: 'warning',
+											icon: false,
+											message: "请打开定位!",
+											iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
+										})
+										return
+									},
 									success: (map) => {
 									success: (map) => {
 										longitude = map.longitude
 										longitude = map.longitude
 										latitude = map.latitude
 										latitude = map.latitude

+ 17 - 3
pages/particulars/index.vue

@@ -748,8 +748,12 @@
 						iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
 						iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
 					})
 					})
 				} else {
 				} else {
-					this.event = event;
-					this.deleteShow = true;
+					for (let role of this.formData.roleList) {
+						if (role == 'JSY') {
+							this.event = event;
+							this.deleteShow = true;
+						}
+					}
 				}
 				}
 			},
 			},
 			deleteImg() {
 			deleteImg() {
@@ -801,7 +805,7 @@
 							uni.compressImage({
 							uni.compressImage({
 							  src: lists[i].url,
 							  src: lists[i].url,
 							  quality: 80,
 							  quality: 80,
-							  success: ress => {
+							  complete: ress => {
 								let data = {
 								let data = {
 									name: 'avatarfile',
 									name: 'avatarfile',
 									filePath: ress.tempFilePath
 									filePath: ress.tempFilePath
@@ -813,6 +817,16 @@
 									type: 'wgs84',
 									type: 'wgs84',
 									isHighAccuracy: true,
 									isHighAccuracy: true,
 									geocode: true,
 									geocode: true,
+									fail: () => {
+										this.fileList1.pop();
+										this.$refs.uToast.show({
+											type: 'warning',
+											icon: false,
+											message: "请打开定位!",
+											iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/warning.png'
+										})
+										return
+									},
 									success: (map) => {
 									success: (map) => {
 										longitude = map.longitude
 										longitude = map.longitude
 										latitude = map.latitude
 										latitude = map.latitude