瀏覽代碼

Merge branch 'master' of http://118.195.146.34:3000/ygtx/ygoa_miniapp

HMY 1 年之前
父節點
當前提交
05a9fc6ba6
共有 9 個文件被更改,包括 651 次插入584 次删除
  1. 15 0
      api/process.js
  2. 10 6
      pages/login.vue
  3. 16 17
      pages/message/index.vue
  4. 469 473
      pages/mine/clockIn/clockIn.vue
  5. 51 49
      pages/mine/setting/setting.vue
  6. 81 28
      pages/process/detail/index.vue
  7. 6 5
      pages/process/index.vue
  8. 2 5
      pages/work/edit/index.vue
  9. 1 1
      utils/ygoa.js

+ 15 - 0
api/process.js

@@ -158,4 +158,19 @@ export function submitProcessFlow(flow, form, control) {
 			}
 		}
 	})
+}
+
+export function cancelProcessFlow(staffId, cancelRemark, {insId, control}) {return request({
+		url: preUrl,
+		method: 'post',
+		data: {
+			serviceId: 'bpm_20191025BpmClientCancelFlow',
+			params: {
+				staffId,
+				cancelRemark,
+				insId,
+				control
+			}
+		}
+	})
 }

+ 10 - 6
pages/login.vue

@@ -32,15 +32,15 @@ import { getLoginInfo } from '@/utils/auth'
 const userStore = useUserStore()
 
 const loginForm = ref({
-	username: getLoginInfo().username,
-	password: getLoginInfo().password
+	username: getLoginInfo().username || '',
+	password: getLoginInfo().password || ''
 })
 function handleLogin() {
 	const username = loginForm.value.username
 	const password = loginForm.value.password
-	if (username === "") {
+	if (username == '') {
 		$modal.msgError("请输入您的账号")
-	} else if (password === "") {
+	} else if (password == '') {
 		$modal.msgError("请输入您的密码")
 	} else {
 		$modal.loading("登录中,请耐心等待...")
@@ -177,6 +177,11 @@ image {
 				border-radius: 20px;
 			}
 
+			.login-btn::after {
+				border: 0px;
+				border-radius: 20px;
+			}
+
 			.cu-btn.block {
 				display: flex;
 			}
@@ -202,8 +207,7 @@ image {
 				text-align: center;
 				text-decoration: none;
 				overflow: visible;
-				margin-left: initial;
-				transform: translate(0rpx, 0rpx);
+				margin-left: initial;		transform: translate(0rpx, 0rpx);
 				margin-right: initial;
 			}
 		}

+ 16 - 17
pages/message/index.vue

@@ -14,7 +14,7 @@
 				</template>
 				<view class="process_container">
 					<view class="process_list">
-						<process-list ref="processListRef"  @clickSegment="getProcessData"
+						<process-list ref="processListRef" @clickSegment="getProcessData"
 							@clickItem="handleToProcessDetail" @scrollToBottom="getProcessPage" :current="0" :pSize="5"
 							:pageNo="1" contentHeight="69.5vh"></process-list>
 					</view>
@@ -23,15 +23,14 @@
 		</uni-collapse>
 
 		<!-- 公告列表  -->
-		<message-list  @clickSegment="getNoticeData" @clickItem="handleToNoticeDetail"
-			@scrollToBottom="getNoticePage" :pSize="5" :pageNo="1" :anime="true" :open="false"
-			title="公告"></message-list>
+		<message-list @clickSegment="getNoticeData" @clickItem="handleToNoticeDetail" @scrollToBottom="getNoticePage"
+			:pSize="5" :pageNo="1" :anime="true" :open="false" title="公告"></message-list>
 
 		<!-- 消息列表 -->
-		<message-list ref="msgListRef" @readMsg="setAllMsgRead" :unReadNum="unReadMsgNum" 
-			@clickSegment="getMessageData" @clickItem="handleToMessageDetail" @scrollToBottom="getMessagePage"
-			:defaultCurrent="1" :pSize="5" :pageNo="1" :anime="true" :open="true"
-			:segments="{ '全部': '', '未读': '0', '已读': '1' }" title="消息"></message-list>
+		<message-list ref="msgListRef" @readMsg="setAllMsgRead" :unReadNum="unReadMsgNum" @clickSegment="getMessageData"
+			@clickItem="handleToMessageDetail" @scrollToBottom="getMessagePage" :defaultCurrent="1" :pSize="5"
+			:pageNo="1" :anime="true" :open="true" :segments="{ '全部': '', '未读': '0', '已读': '1' }"
+			title="消息"></message-list>
 
 		<!-- 跳转打卡页按钮 -->
 		<view class="fab_button toClockInBtn">
@@ -49,7 +48,7 @@
 
 <script setup lang="ts">
 import { onBeforeMount, onMounted, onUpdated, ref } from 'vue';
-import { onLoad,onShow } from '@dcloudio/uni-app'
+import { onLoad, onShow } from '@dcloudio/uni-app'
 import { getMessageList, getNoticeList, getUnReadMessageNum, setMsgIsRead } from '@/api/message.js';
 import { getUserProcess, getUnProcessNum } from '@/api/process';
 import $tab from '@/plugins/tab.js';
@@ -72,7 +71,7 @@ onLoad((options) => {
 	// 是否跳转打卡页
 	if (options.to == 'clockIn') toClockIn()
 })
-onShow(()=>{
+onShow(() => {
 	showTabBarBadge();
 })
 onBeforeMount(() => {
@@ -86,7 +85,7 @@ function toClockIn() {
 	// 确认是否跳转打卡页
 	$modal.confirm('当前未打卡,是否前往打卡').then(() => {
 		$tab.navigateTo('/pages/mine/clockIn/clockIn')
-	})
+	}).catch(() => { })
 }
 
 //子组件
@@ -208,12 +207,12 @@ function handleToMessageDetail({ messageid, universalid }) {
 			$tab.navigateTo('/pages/message/detail/index?messageId=' + messageid + '&universalId=' + universalid)
 		} else {
 			$modal.confirm('登录状态失效,您可以继续留在该页面,或者重新登录?').then(res => {
-				const loginInfo=getLoginInfo();
-				userStore.LogOut().then(res=>{
-					uni.setStorageSync('loginInfo',loginInfo)
+				const loginInfo = getLoginInfo();
+				userStore.LogOut().then(res => {
+					uni.setStorageSync('loginInfo', loginInfo)
 					$tab.reLaunch('/pages/login')
 				})
-			})
+			}).catch(() => { })
 		}
 	})
 }
@@ -293,12 +292,12 @@ function setAllMsgRead() {
 							userStore.LogOut().then(res => {
 								uni.reLaunch({ url: '/pages/login' })
 							})
-						})
+						}).catch(()=>{})
 					}
 				})
 			})
 		}
-	})
+	}).catch(()=>{})
 }
 </script>
 

+ 469 - 473
pages/mine/clockIn/clockIn.vue

@@ -12,14 +12,14 @@
 				<text class="ygoa-icon icon-goToWork"></text>
 				<text class="title">上班</text>
 				<text class="time">{{ signInTime || '未打卡' }}</text>
-				<text class="signStatus" v-if="!isSignInStatusDisabled">({{signInStatusName}})</text>
+				<text class="signStatus" v-if="!isSignInStatusDisabled">({{ signInStatusName }})</text>
 			</view>
 			<view class="record-item">
 				<text class="ygoa-icon icon-afterWork"></text>
 				<text class="title">下班</text>
 				<text class="time">{{ signOutTime || '未打卡' }}</text>
 				<text class="signStatus" v-if="!isSignOutStatusDisabled"
-					style="color: #e64340;">({{signOutStatusName}})</text>
+					style="color: #e64340;">({{ signOutStatusName }})</text>
 			</view>
 			<view class="record-item" @click="getAddress">
 				<text class="ygoa-icon icon-location"></text>
@@ -35,324 +35,323 @@
 		<!-- 打卡按钮 -->
 		<view class="footer">
 			<button type="default" @click="signInOrOut" style="background-color: #3c9cff; color: #fcfcfc;"
-				v-if="signName=='上班签到'">上班签到</button>
+				v-if="signName == '上班签到'">上班签到</button>
 			<button type="default" @click="signInOrOut" style="background-color: #1aad19; color: #fcfcfc;"
-				v-else-if="signName=='下班签退'">下班签退</button>
+				v-else-if="signName == '下班签退'">下班签退</button>
 		</view>
 	</view>
 </template>
 
 
 <script setup lang="ts">
-	import {
-		onBeforeUnmount,
-		onMounted,
-		reactive,
-		ref
-	} from 'vue';
-	// 导入地理位置相关函数
-	import booleanPointInPolygon from "@turf/boolean-point-in-polygon";
-	import {
-		point,
-		polygon
-	} from "@turf/helpers";
-	import {
-		useUserStore
-	} from '@/store/user';
-	import $modal from '@/plugins/modal.js'
-	import $tab from '@/plugins/tab.js';
-	import config from '@/config.js';
-	import {
-		createAttendance,
-		tranAddress,
-		checkAttendance
-	} from '@/api/mine.js'
-	const userStore = useUserStore();
-	const thisUser = userStore.user;
-	const intervalId = ref(null); // 定时器ID
-	onBeforeUnmount(() => {
-		clearInterval(intervalId.value);
-	})
-	// 组件挂载后初始化当前日期与位置
-	onMounted(() => {
-		dateInit();
-		// getlocation();
-	});
-
-
-	function showNowTime() {
-		// let nowMilliseconds=Date.now();
-		// intervalId.value = setInterval(() => {
-		// 	nowMilliseconds+=1000;
-		// 	 nowTime.value = new Date(nowMilliseconds).toLocaleString('zh-CN', {
-		// 	        year: 'numeric',
-		// 	        month: '2-digit',
-		// 	        day: '2-digit',
-		// 	        hour: '2-digit',
-		// 	        minute: '2-digit',
-		// 	        second: '2-digit',
-		// 	        hour12: false // 24小时制
-		// 	    });
-		// 	}, 1000); // 每1秒更新一次
-
-		intervalId.value = setInterval(() => {
-			nowTime.value = getNowTime()
-		}, 1000); // 每1秒更新一次
-
-	}
-	// 当前日期和时间相关信息
-	const currentDate = ref('2023-04-01');
-	const currentDay = ref('星期三');
-	const nowTime = ref(''); // 当前时间
-	const weekArr = reactive(['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']); // 星期数组
-
-
-	// 初始化日期
-	function dateInit() {
-		const nowDate = new Date();
-		const year = nowDate.getFullYear(); // 获取年份
-		const month = nowDate.getMonth() + 1; // 获取月份
-		const day = nowDate.getDate(); // 获取日期
-		// 格式化月份和日期为两位数
-		const formattedMonth = month < 10 ? '0' + month : month;
-		const formattedDay = day < 10 ? '0' + day : day;
-		currentDate.value = `${year}-${formattedMonth}-${formattedDay}`; // 设置当前日期
-		const dayOfWeek = nowDate.getDay(); // 获取当前星期
-		currentDay.value = weekArr[dayOfWeek]; // 设置当前星期
-		showNowTime();
-		getTodayAtt();
+import {
+	onBeforeUnmount,
+	onMounted,
+	reactive,
+	ref
+} from 'vue';
+// 导入地理位置相关函数
+import booleanPointInPolygon from "@turf/boolean-point-in-polygon";
+import {
+	point,
+	polygon
+} from "@turf/helpers";
+import {
+	useUserStore
+} from '@/store/user';
+import $modal from '@/plugins/modal.js'
+import $tab from '@/plugins/tab.js';
+import config from '@/config.js';
+import {
+	createAttendance,
+	tranAddress,
+	checkAttendance
+} from '@/api/mine.js'
+const userStore = useUserStore();
+const thisUser = userStore.user;
+const intervalId = ref(null); // 定时器ID
+onBeforeUnmount(() => {
+	clearInterval(intervalId.value);
+})
+// 组件挂载后初始化当前日期与位置
+onMounted(() => {
+	dateInit();
+	// getlocation();
+});
+
+
+function showNowTime() {
+	// let nowMilliseconds=Date.now();
+	// intervalId.value = setInterval(() => {
+	// 	nowMilliseconds+=1000;
+	// 	 nowTime.value = new Date(nowMilliseconds).toLocaleString('zh-CN', {
+	// 	        year: 'numeric',
+	// 	        month: '2-digit',
+	// 	        day: '2-digit',
+	// 	        hour: '2-digit',
+	// 	        minute: '2-digit',
+	// 	        second: '2-digit',
+	// 	        hour12: false // 24小时制
+	// 	    });
+	// 	}, 1000); // 每1秒更新一次
+
+	intervalId.value = setInterval(() => {
+		nowTime.value = getNowTime()
+	}, 1000); // 每1秒更新一次
+
+}
+// 当前日期和时间相关信息
+const currentDate = ref('2023-04-01');
+const currentDay = ref('星期三');
+const nowTime = ref(''); // 当前时间
+const weekArr = reactive(['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']); // 星期数组
+
+
+// 初始化日期
+function dateInit() {
+	const nowDate = new Date();
+	const year = nowDate.getFullYear(); // 获取年份
+	const month = nowDate.getMonth() + 1; // 获取月份
+	const day = nowDate.getDate(); // 获取日期
+	// 格式化月份和日期为两位数
+	const formattedMonth = month < 10 ? '0' + month : month;
+	const formattedDay = day < 10 ? '0' + day : day;
+	currentDate.value = `${year}-${formattedMonth}-${formattedDay}`; // 设置当前日期
+	const dayOfWeek = nowDate.getDay(); // 获取当前星期
+	currentDay.value = weekArr[dayOfWeek]; // 设置当前星期
+	showNowTime();
+	getTodayAtt();
+}
+
+
+const signInTime = ref(''); // 上班签到时间
+const signOutTime = ref(''); // 下班签到时间
+//打卡按钮文字显示
+const signName = ref('')
+
+//迟到早退状态,默认隐藏
+const signInStatusName = ref('迟到')
+const signOutStatusName = ref('早退')
+const isSignInStatusDisabled = ref(true)
+const isSignOutStatusDisabled = ref(true)
+//获取今天考勤状态
+function getTodayAtt() {
+	const params = {
+		universalid: thisUser.useId,
+		rizi: currentDate.value
 	}
-
-
-	const signInTime = ref(''); // 上班签到时间
-	const signOutTime = ref(''); // 下班签到时间
-	//打卡按钮文字显示
-	const signName = ref('')
-
-	//迟到早退状态,默认隐藏
-	const signInStatusName = ref('迟到')
-	const signOutStatusName = ref('早退')
-	const isSignInStatusDisabled = ref(true)
-	const isSignOutStatusDisabled = ref(true)
-	//获取今天考勤状态
-	function getTodayAtt() {
-		const params = {
-			universalid: thisUser.useId,
-			rizi: currentDate.value
-		}
-		checkAttendance(params).then(res => {
-
-			if ("success" == res.returnMsg) {
-				// console.log("kaoqin",res);
-				const attList = res.returnParams.list;
-				const time1 = attList.find(item => item.att_type_id === '1');
-				//拿到所有签退数据后,用pop取最后一个
-				const time2 = attList.filter(item => item.att_type_id === '2').pop();
-				console.log('time2', time2);
-				if (time1 !== undefined) {
-					// console.log('getTime1',time1);
-					signInTime.value = time1.att_time.split(' ')[1];
-					signName.value = '下班签退';
-					if (Array.isArray(config.lateTimeRange) && isTimeInRange(signInTime.value, config
-							.lateTimeRange[0], '23:59:59')) {
-						isSignInStatusDisabled.value = false; //迟到
-					}
-				} else {
-					signName.value = '上班签到';
+	checkAttendance(params).then(res => {
+
+		if ("success" == res.returnMsg) {
+			// console.log("kaoqin",res);
+			const attList = res.returnParams.list;
+			const time1 = attList.find(item => item.att_type_id === '1');
+			//拿到所有签退数据后,用pop取最后一个
+			const time2 = attList.filter(item => item.att_type_id === '2').pop();
+			console.log('time2', time2);
+			if (time1 !== undefined) {
+				// console.log('getTime1',time1);
+				signInTime.value = time1.att_time.split(' ')[1];
+				signName.value = '下班签退';
+				if (Array.isArray(config.lateTimeRange) && isTimeInRange(signInTime.value, config
+					.lateTimeRange[0], '23:59:59')) {
+					isSignInStatusDisabled.value = false; //迟到
 				}
-				if (time2 !== undefined) {
-					signOutTime.value = time2.att_time.split(' ')[1];
-					if (Array.isArray(config.signOutTimeRange) && isTimeInRange(signOutTime.value, "00:00:00",
-							config.signOutTimeRange[0])) {
-						isSignOutStatusDisabled.value = false; //早退
-					} else {
-						isSignOutStatusDisabled.value = true; //隐藏早退状态
-					}
+			} else {
+				signName.value = '上班签到';
+			}
+			if (time2 !== undefined) {
+				signOutTime.value = time2.att_time.split(' ')[1];
+				if (Array.isArray(config.signOutTimeRange) && isTimeInRange(signOutTime.value, "00:00:00",
+					config.signOutTimeRange[0])) {
+					isSignOutStatusDisabled.value = false; //早退
+				} else {
+					isSignOutStatusDisabled.value = true; //隐藏早退状态
 				}
 			}
-		})
-	}
+		}
+	})
+}
 
 
 
-	//上班卡或下班卡
-	function signInOrOut() {
-		if ('上班签到' == signName.value) {
-			signIn();
-		} else {
-			signOut();
-		}
+//上班卡或下班卡
+function signInOrOut() {
+	if ('上班签到' == signName.value) {
+		signIn();
+	} else {
+		signOut();
 	}
+}
 
 
 
-	function signIn() {
-		const now = getNowTime();
-		//判断打卡时间是否符合
-		if (!isTimeInRange(now, ...config.signInTimeRange)) {
-			$modal.msg('不在签到时间8:30--9:30内,请前往补卡')
-			return;
-		}
-		// attType.value=1;
-		const signIn = 1;
+function signIn() {
+	const now = getNowTime();
+	//判断打卡时间是否符合
+	if (!isTimeInRange(now, ...config.signInTimeRange)) {
+		$modal.msg('不在签到时间8:30--9:30内,请前往补卡')
+		return;
+	}
+	// attType.value=1;
+	const signIn = 1;
+	getAddress().then(() => {
+		clockIn(signIn);
+	});
+};
+
+// 下班签退
+function signOut() {
+	const now = getNowTime();
+	const signOut = 2;
+	//判断打卡时间是否符合
+	console.log('now', now);
+	if (!isTimeInRange(now, ...config.signOutTimeRange)) {
+		$modal.confirm('当前非正常签退时间,是否继续?').then(res => {
+			if (res) {
+				getAddress().then(() => {
+					clockIn(signOut); // 执行打卡并获取结果
+				});
+			}
+		}).catch(() => { })
+	} else {
 		getAddress().then(() => {
-			clockIn(signIn); 
+			clockIn(signOut);
 		});
-	};
-
-	// 下班签退
-	function signOut() {
-		const now = getNowTime();
-		const signOut = 2;
-		//判断打卡时间是否符合
-		console.log('now', now);
-		if (!isTimeInRange(now, ...config.signOutTimeRange)) {
-			$modal.confirm('当前非正常签退时间,是否继续?').then(res => {
-				if (res) {
-					getAddress().then(() => {
-						clockIn(signOut); // 执行打卡并获取结果
-					});
-				}
-			})
-		} else {
-			getAddress().then(() => {
-				clockIn(signOut); 
-			});
-		}
-
-
-	};
-
-	//获取当前时间
-	function getNowTime() {
-		return new Date().toLocaleTimeString('en-US', {
-			hour12: false
-		}).substring(0, 8)
 	}
 
-	//判断时间是否在区间内
-	function isTimeInRange(time, startTime, endTime) {
-		// 将时间字符串转换为Date对象
-		const timeObj = new Date('1970-01-01T' + time + 'Z');
-		const startObj = new Date('1970-01-01T' + startTime + 'Z');
-		const endObj = new Date('1970-01-01T' + endTime + 'Z');
-		// 比较时间
-		return timeObj >= startObj && timeObj <= endObj;
-	}
-
-
-	// 地图配置信息
-	// const mapKey = config.mapKey; // 地图API密钥
-	const mapType = ref('tmap'); // 地图类型
-	const address = ref(''); // 初始化地址
-
-	// 打卡定位信息
-	const longitude = ref(0); // 经度
-	const latitude = ref(0); // 纬度
 
-	// 标记信息
-	const marker = reactive({
-		id: 1,
-		latitude: 25.958812,
-		longitude: 119.213036,
-		width: 50, // 标记宽度
-		height: 50, // 标记高度
-		title: '宇光同行' // 标记标题
-	});
-
-	// 获取当前定位经纬度
-	function getlocation() {
-		return new Promise((resolve, reject) => {
-			//判断用户是否打开位置权限
-			uni.getSetting({
-				success(res) {
-					// 如果用户未授权
-					if (!res.authSetting['scope.userLocation']) {
-						$modal.confirm('需要您授权获取地理位置信息').then(res => {
-								if (res) {
-									// 打开权限设置页面
-									uni.openSetting({
-										success: (settingData) => {
-											if (settingData.authSetting[
-													'scope.userLocation']) {
-												$modal.msg('授权后请重新打开此页面')
-												// reject("用户未授权");
-											}
-										}
-									});
+};
+
+//获取当前时间
+function getNowTime() {
+	return new Date().toLocaleTimeString('en-US', {
+		hour12: false
+	}).substring(0, 8)
+}
+
+//判断时间是否在区间内
+function isTimeInRange(time, startTime, endTime) {
+	// 将时间字符串转换为Date对象
+	const timeObj = new Date('1970-01-01T' + time + 'Z');
+	const startObj = new Date('1970-01-01T' + startTime + 'Z');
+	const endObj = new Date('1970-01-01T' + endTime + 'Z');
+	// 比较时间
+	return timeObj >= startObj && timeObj <= endObj;
+}
+
+
+// 地图配置信息
+// const mapKey = config.mapKey; // 地图API密钥
+const mapType = ref('tmap'); // 地图类型
+const address = ref(''); // 初始化地址
+
+// 打卡定位信息
+const longitude = ref(0); // 经度
+const latitude = ref(0); // 纬度
+
+// 标记信息
+const marker = reactive({
+	id: 1,
+	latitude: 25.958812,
+	longitude: 119.213036,
+	width: 50, // 标记宽度
+	height: 50, // 标记高度
+	title: '宇光同行' // 标记标题
+});
+
+// 获取当前定位经纬度
+function getlocation() {
+	return new Promise((resolve, reject) => {
+		//判断用户是否打开位置权限
+		uni.getSetting({
+			success(res) {
+				// 如果用户未授权
+				if (!res.authSetting['scope.userLocation']) {
+					$modal.confirm('需要您授权获取地理位置信息').then(res => {
+						if (res) {
+							// 打开权限设置页面
+							uni.openSetting({
+								success: (settingData) => {
+									if (settingData.authSetting[
+										'scope.userLocation']) {
+										$modal.msg('授权后请重新打开此页面')
+										// reject("用户未授权");
+									}
 								}
-							})
-							.catch(err => {
-								//用户点击取消
-								if (!err) {
-									uni.showToast({
-										title: '获取地理位置授权失败',
-										icon: 'none',
-										success: () => {
-											// 返回上一页
-											setTimeout(() => {
-												$tab.navigateBack()
-											}, 1000);
-										}
-									});
-									// reject("用户未授权");
-								}
-							})
-					} else {
-						// 已授权,获取位置
-						fetchLocation(resolve, reject);
-					}
-				},
-				fail(err) {
-					reject(err); // 拒绝 Promise
+							});
+						}
+					})
+						.catch(err => {
+							//用户点击取消
+							if (!err) {
+								uni.showToast({
+									title: '获取地理位置授权失败',
+									icon: 'none',
+									success: () => {
+										// 返回上一页
+										setTimeout(() => {
+											$tab.navigateBack()
+										}, 1000);
+									}
+								});
+								// reject("用户未授权");
+							}
+						})
+				} else {
+					// 已授权,获取位置
+					fetchLocation(resolve, reject);
 				}
-			});
-		});
-	}
-
-	// 封装获取位置的函数
-	function fetchLocation(resolve, reject) {
-		wx.getLocation({
-			success: (res) => {
-				longitude.value = res.longitude; // 保存经度
-				latitude.value = res.latitude; // 保存纬度
-				$modal.alert('坐标',longitude.value+','+latitude.value)
-				resolve(); // 解析 Promise
 			},
-			fail: (err) => {
-				if (err.errMsg.includes("频繁调用")) {
-					$modal.msg('请勿频繁调用');
-					// reject("频繁调用错误");
-					return;
-				}
-				console.log('getLocationErr', err);
+			fail(err) {
 				reject(err); // 拒绝 Promise
-			},
-		});
-	}
-
-
-	// 获取当前位置地址
-	function getAddress() {
-		// getlocation()
-		// 	.then(() => {
-		// 		tranLocationToAddress(); // 执行地址转换
-		// 	})
-		// 	.catch(err => {
-		// 		console.error('获取地址失败', err);
-		// 	});
-		return new Promise((resolve, reject) => {
-			getlocation()
-				.then(res => {
-					tranLocationToAddress(); // 执行地址转换
-					resolve(res); // 地址获取成功
-				})
-				.catch(err => {
-					// console.error('获取地址失败', err);
-					reject(err); // 地址获取失败
-				});
+			}
 		});
-	}
+	});
+}
+
+// 封装获取位置的函数
+function fetchLocation(resolve, reject) {
+	wx.getLocation({
+		success: (res) => {
+			longitude.value = res.longitude; // 保存经度
+			latitude.value = res.latitude; // 保存纬度
+			resolve(); // 解析 Promise
+		},
+		fail: (err) => {
+			if (err.errMsg.includes("频繁调用")) {
+				$modal.msg('请勿频繁调用');
+				// reject("频繁调用错误");
+				return;
+			}
+			console.log('getLocationErr', err);
+			reject(err); // 拒绝 Promise
+		},
+	});
+}
+
+
+// 获取当前位置地址
+function getAddress() {
+	// getlocation()
+	// 	.then(() => {
+	// 		tranLocationToAddress(); // 执行地址转换
+	// 	})
+	// 	.catch(err => {
+	// 		console.error('获取地址失败', err);
+	// 	});
+	return new Promise((resolve, reject) => {
+		getlocation()
+			.then(res => {
+				tranLocationToAddress(); // 执行地址转换
+				resolve(res); // 地址获取成功
+			})
+			.catch(err => {
+				// console.error('获取地址失败', err);
+				reject(err); // 地址获取失败
+			});
+	});
+}
 
 	// 经纬度转地址
 	function tranLocationToAddress() {
@@ -367,198 +366,195 @@
 	}
 
 
-	// 多边形区域设置
-	const polygons = reactive([{
-		points: [{
-				latitude: 25.9591401,
-				longitude: 119.21292356
-			},
-			{
-				latitude: 25.95828592,
-				longitude: 119.21261955
-			},
-			{
-				latitude: 25.9576709,
-				longitude: 119.21458294
-			},
-			{
-				latitude: 25.95845106,
-				longitude: 119.21486162
-			},
-			{
-				latitude: 25.9591401,
-				longitude: 119.21292356
-			}
-		],
-		strokeWidth: 1, // 边框宽度
-		strokeColor: "#ff000066", // 边框颜色
-		fillColor: "#ff000016", // 填充颜色
-	}]);
-
-	// 打卡
-	function clockIn(attType) {
-		// 发起打卡请求相关业务逻辑
-		//判断是否已经打过卡
-		if (isClockIn(attType)) {
-			return;
-		}
-		var now = new Date();
-		// 使用toISOString()获取一个ISO格式的字符串,然后替换T为空格,并去除最后的Z(表示UTC时间)
-		var formatted = now.toISOString().replace('T', ' ').replace('Z', '');
-		var localString = new Date(formatted + '-08:00').toISOString().replace('T', ' ').replace('Z', '');
-		// console.log('nowtime',formatted,localString);
-		const params = {
-			user_name: thisUser.userName,
-			user_id: thisUser.useId,
-			kaoqin_type: attType,
-			now_date: localString,
-			longitude: longitude.value,
-			latitude: latitude.value,
-			address: address.value,
-			unitId: thisUser.unitId
-		};
-		createAttendance(params).then(res => {
-			// console.log('createAttendance',res);
-			if ("success" == res.returnMsg) {
-				uni.showToast({
-					title: "打卡成功",
-					icon: 'none'
-				});
-				getTodayAtt(); //更新今日考勤数据
-				return true;
-			} else {
-				uni.showToast({
-					title: "未在指定范围,打卡失败",
-					icon: 'none'
-				});
-				return false;
-			}
-		})
-		// const _polygons = polygons.map((polygon) => {
-		// 	return polygon.points.map((i) => [
-		// 		Number(i.longitude),
-		// 		Number(i.latitude),
-		// 	]);
-		// });
-		// const _point = point([longitude.value, latitude.value]); // 用当前坐标创建点
-		// const _polygon = polygon(_polygons); // 创建多边形
-		// const f = booleanPointInPolygon(_point, _polygon); // 判断点是否在多边形内	
+// 多边形区域设置
+const polygons = reactive([{
+	points: [{
+		latitude: 25.9591401,
+		longitude: 119.21292356
+	},
+	{
+		latitude: 25.95828592,
+		longitude: 119.21261955
+	},
+	{
+		latitude: 25.9576709,
+		longitude: 119.21458294
+	},
+	{
+		latitude: 25.95845106,
+		longitude: 119.21486162
+	},
+	{
+		latitude: 25.9591401,
+		longitude: 119.21292356
 	}
-
-	//判断是否已经打卡
-	function isClockIn(attType) {
-		var attTypeData = '';
-		switch (attType) {
-			case 1:
-				attTypeData = signInTime.value;
-				break;
-			case 2:
-				break;
-		}
-		console.log('attTypeData', attTypeData);
-		if ('' !== attTypeData) {
+	],
+	strokeWidth: 1, // 边框宽度
+	strokeColor: "#ff000066", // 边框颜色
+	fillColor: "#ff000016", // 填充颜色
+}]);
+
+// 打卡
+function clockIn(attType) {
+	// 发起打卡请求相关业务逻辑
+	//判断是否已经打过卡
+	if (isClockIn(attType)) {
+		return;
+	}
+	var now = new Date();
+	// 使用toISOString()获取一个ISO格式的字符串,然后替换T为空格,并去除最后的Z(表示UTC时间)
+	var formatted = now.toISOString().replace('T', ' ').replace('Z', '');
+	var localString = new Date(formatted + '-08:00').toISOString().replace('T', ' ').replace('Z', '');
+	// console.log('nowtime',formatted,localString);
+	const params = {
+		user_name: thisUser.userName,
+		user_id: thisUser.useId,
+		kaoqin_type: attType,
+		now_date: localString,
+		longitude: longitude.value,
+		latitude: latitude.value,
+		address: address.value,
+		unitId: thisUser.unitId
+	};
+	createAttendance(params).then(res => {
+		// console.log('createAttendance',res);
+		if ("success" == res.returnMsg) {
 			uni.showToast({
-				title: "请勿重复打卡",
+				title: "打卡成功",
 				icon: 'none'
 			});
+			getTodayAtt(); //更新今日考勤数据
 			return true;
+		} else {
+			uni.showToast({
+				title: "未在指定范围,打卡失败",
+				icon: 'none'
+			});
+			return false;
 		}
+	})
+	// const _polygons = polygons.map((polygon) => {
+	// 	return polygon.points.map((i) => [
+	// 		Number(i.longitude),
+	// 		Number(i.latitude),
+	// 	]);
+	// });
+	// const _point = point([longitude.value, latitude.value]); // 用当前坐标创建点
+	// const _polygon = polygon(_polygons); // 创建多边形
+	// const f = booleanPointInPolygon(_point, _polygon); // 判断点是否在多边形内	
+}
+
+//判断是否已经打卡
+function isClockIn(attType) {
+	var attTypeData = '';
+	switch (attType) {
+		case 1:
+			attTypeData = signInTime.value;
+			break;
+		case 2:
+			break;
+	}
+	console.log('attTypeData', attTypeData);
+	if ('' !== attTypeData) {
+		uni.showToast({
+			title: "请勿重复打卡",
+			icon: 'none'
+		});
+		return true;
+	}
 		return false;
 	}
 </script>
 
 <style>
-	@import "@/static/font/ygoa/iconfont.css";
-
-	.ygoa-icon {
-		margin-right: 20rpx;
-		font-size: 50rpx;
-	}
-
-	.container {
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		padding: 20rpx;
-	}
-
-	.header {
-		width: 100%;
-		height: 200rpx;
-		background-color: #f8f8f8;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.day {
-		font-size: 24px;
-		color: #333;
-		/* font-weight: bold; */
-	}
-
-	.date {
-		font-size: 16px;
-		color: #666;
-	}
-
-	.nowTime {
-		font-size: 16px;
-		color: #666;
-	}
-
-	.record {
-		width: 100%;
-		margin-top: 20rpx;
-		border-top: 1px solid #ddd;
-		border-bottom: 1px solid #ddd;
-		padding: 0 15rpx;
-	}
-
-	.record-item {
-		display: flex;
-		align-items: center;
-		height: 100rpx;
-		border-bottom: 1px solid #eee;
-	}
-
-	.icon {
-		width: 50rpx;
-		height: 50rpx;
-		margin-right: 10rpx;
-	}
-
-	.title {
-		font-size: 28rpx;
-	}
-
-	.time {
-		font-size: 24rpx;
-		color: #999;
-		margin-left: auto;
-	}
-
-	.signStatus {
-		font-size: 24rpx;
-		color: orange;
-		/* margin-left: auto; */
-	}
-
-	.map {
-		width: 100%;
-		height: 500rpx;
-		margin-top: 20rpx;
-	}
-
-	.footer {
-		width: 100%;
-		margin-top: 20rpx;
-		display: flex;
-		justify-content: space-around;
-
-
-	}
+@import "@/static/font/ygoa/iconfont.css";
+
+.ygoa-icon {
+	margin-right: 20rpx;
+	font-size: 50rpx;
+}
+
+.container {
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	padding: 20rpx;
+}
+
+.header {
+	width: 100%;
+	height: 200rpx;
+	background-color: #f8f8f8;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: center;
+}
+
+.day {
+	font-size: 24px;
+	color: #333;
+	/* font-weight: bold; */
+}
+
+.date {
+	font-size: 16px;
+	color: #666;
+}
+
+.nowTime {
+	font-size: 16px;
+	color: #666;
+}
+
+.record {
+	width: 100%;
+	margin-top: 20rpx;
+	border-top: 1px solid #ddd;
+	border-bottom: 1px solid #ddd;
+	padding: 0 15rpx;
+}
+
+.record-item {
+	display: flex;
+	align-items: center;
+	height: 100rpx;
+	border-bottom: 1px solid #eee;
+}
+
+.icon {
+	width: 50rpx;
+	height: 50rpx;
+	margin-right: 10rpx;
+}
+
+.title {
+	font-size: 28rpx;
+}
+
+.time {
+	font-size: 24rpx;
+	color: #999;
+	margin-left: auto;
+}
+
+.signStatus {
+	font-size: 24rpx;
+	color: orange;
+	/* margin-left: auto; */
+}
+
+.map {
+	width: 100%;
+	height: 500rpx;
+	margin-top: 20rpx;
+}
+
+.footer {
+	width: 100%;
+	margin-top: 20rpx;
+	display: flex;
+	justify-content: space-around;	}
 
 	.footer button {
 		width: 100%;

+ 51 - 49
pages/mine/setting/setting.vue

@@ -35,62 +35,64 @@
 </template>
 
 <script setup lang="ts">
-	import $tab from "@/plugins/tab.js"
-	import $modal from '@/plugins/modal.js'
-	import { useUserStore } from '@/store/user.js'
-	import {clearCache} from '@/utils/ygoa.js'
-	const userStore = useUserStore()
-	// 退出登录
-	function logOut() {
-		$modal.confirm('确定注销并退出系统吗?')
-			.then(res=>{
-				userStore.LogOut()
-				$tab.reLaunch('/pages/login')
-			})
-	};
-	// 修改密码
-	function pwdEdit() {
-		$tab.navigateTo('/pages/mine/setting/pwdEdit/pwdEdit');
-	};
-	// 检查更新
-	function checkUpdate() {
-		const updateManager = uni.getUpdateManager();
-		updateManager.onCheckForUpdate(function(res) {
-			// 请求完新版本信息的回调
-			if (res.hasUpdate) {
-				updateManager.onUpdateReady(function(res) {
-					$modal.confirm('新版本已经准备好,是否重启应用?','更新提示').then(res=>{
-						// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
-						updateManager.applyUpdate();
-					})
-				});
-			} else {
-				$modal.showToast('暂无版本更新')
+import $tab from "@/plugins/tab.js"
+import $modal from '@/plugins/modal.js'
+import { useUserStore } from '@/store/user.js'
+import { clearCache } from '@/utils/ygoa.js'
+const userStore = useUserStore()
+// 退出登录
+function logOut() {
+	$modal.confirm('确定注销并退出系统吗?')
+		.then(res => {
+			userStore.LogOut()
+			$tab.reLaunch('/pages/login')
+		}).catch(() => { })
+};
+// 修改密码
+function pwdEdit() {
+	$tab.navigateTo('/pages/mine/setting/pwdEdit/pwdEdit');
+};
+// 检查更新
+function checkUpdate() {
+	const updateManager = uni.getUpdateManager();
+	updateManager.onCheckForUpdate(function (res) {
+		// 请求完新版本信息的回调
+		if (res.hasUpdate) {
+			updateManager.onUpdateReady(function (res) {
+				$modal.confirm('新版本已经准备好,是否重启应用?', '更新提示').then(res => {
+					// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+					updateManager.applyUpdate();
+				}).catch(() => { })
+			});
+		} else {
+			$modal.showToast('暂无版本更新')
 			}
 		});
 	}
 </script>
 
 <style lang="scss" scoped>
-	.container {
-		padding: 20px;
-	}
+.container {
+	padding: 20px;
+}
+
+.list-item {
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	font-size: 1rem;
+	padding: 0.75rem;
+	background-color: #ffffff;
+	border-radius: 10rpx;
+	margin-bottom: 0.75rem;
+	border-bottom: 1px solid gainsboro;
 
-	.list-item {
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		font-size: 1rem;
-		padding: 0.75rem;
-		background-color: #ffffff;
-		border-radius: 10rpx;
-		margin-bottom: 0.75rem;
-		border-bottom: 1px solid gainsboro;
-		uni-icons{
-			margin-right: 6px;
-		}
+	uni-icons {
+		margin-right: 6px;
 	}
-	.logOut{
-		margin-top: 2rem;
+}
+
+.logOut {
+	margin-top: 2rem;
 	}
 </style>

+ 81 - 28
pages/process/detail/index.vue

@@ -56,30 +56,34 @@
 				<attachment-list :attachments="item.files"></attachment-list>
 			</uni-card>
 		</view>
-		<view class="flow_step_container">
+		<view>
 			<uni-card>
-				<uni-section titleFontSize="1.3rem" title="流转过程" type="line"></uni-section>
-				<up-steps :current="stepActive" activeColor="#18bc37" inactiveColor="#2979ff" direction="column">
-					<view v-for="(step, index) in options">
-						<up-steps-item v-if="step.state == 3" :title="step.title" :desc="step.desc" :key="index" error>
-						</up-steps-item>
-						<up-steps-item v-else-if="index == stepActive" :title="step.title" :desc="step.desc"
-							:key="index">
-							<template #icon>
-								<view class="active_step_circle">
-									<text class="active_step_text">{{ index + 1 }}</text>
-								</view>
-							</template>
-						</up-steps-item>
-						<up-steps-item v-else :title="step.title" :desc="step.desc" :key="index"></up-steps-item>
-					</view>
-				</up-steps>
+				<view class="flow_step_container">
+					<uni-section titleFontSize="1.3rem" title="流转过程" type="line"></uni-section>
+					<up-steps :current="stepActive" activeColor="#18bc37" inactiveColor="#2979ff" direction="column">
+						<view v-for="(step, index) in options">
+							<up-steps-item v-if="step.state == 3" :title="step.title + ' 退回'" :desc="step.desc"
+								:key="index" error></up-steps-item>
+							<up-steps-item v-else-if="step.state == 0" :title="step.title + ' 撤销'" :desc="step.desc"
+								:key="index" error></up-steps-item>
+							<up-steps-item v-else-if="index == stepActive" :title="step.title" :desc="step.desc"
+								:key="index">
+								<template #icon>
+									<view class="active_step_circle">
+										<text class="active_step_text">{{ index + 1 }}</text>
+									</view>
+								</template>
+							</up-steps-item>
+							<up-steps-item v-else :title="step.title" :desc="step.desc" :key="index"></up-steps-item>
+						</view>
+					</up-steps>
+				</view>
 			</uni-card>
 		</view>
 		<view v-if="processInfo.tinsId">
 			<view class="remark_container">
 				<uni-card>
-					<uni-section titleFontSize="1.3rem" title="备注" type="line"></uni-section>
+					<uni-section titleFontSize="1.3rem" title="环节备注" type="line"></uni-section>
 					<view class="remark_content">
 						<uni-easyinput type="textarea" autoHeight v-model="remark" placeholder="请输入"></uni-easyinput>
 					</view>
@@ -88,7 +92,7 @@
 		</view>
 		<view v-if="processInfo.tinsId" class="approve_button">
 			<uni-card spacing="0" padding="0">
-				<button :loading="!button_state" type="primary" @click="submitProcess('1')">通过</button>
+				<button :loading="!button_state" type="primary" @click="handleSubmitProcess('1')">通过</button>
 			</uni-card>
 		</view>
 	</view>
@@ -97,16 +101,31 @@
 			<uni-card spacing="0" padding="0" :is-shadow="false" :border="false">
 				<uni-row>
 					<uni-col :span="11">
-						<button :loading="!button_state" type="warn" @click="submitProcess('0')">退回上一级</button>
+						<button :loading="!button_state" type="warn" @click="handleSubmitProcess('0')">退回上一级</button>
 					</uni-col>
 					<uni-col :span="11" :offset="2">
-						<button :loading="!button_state" type="warn" @click="submitProcess('2')">退回发起人</button>
+						<button :loading="!button_state" type="warn" @click="handleSubmitProcess('2')">退回发起人</button>
 					</uni-col>
 				</uni-row>
 			</uni-card>
 		</view>
 	</view>
-	<view style="height: 5px; margin-top: 10px;"></view>
+	<view v-else-if="processInfo.username == userStore.user.name">
+		<view class="remark_container">
+			<uni-card>
+				<uni-section titleFontSize="1.3rem" title="撤销备注" type="line"></uni-section>
+				<view class="remark_content">
+					<uni-easyinput type="textarea" autoHeight v-model="remark" placeholder="请输入"></uni-easyinput>
+				</view>
+			</uni-card>
+		</view>
+		<view class="cancel_button_container">
+			<uni-card spacing="0" padding="0">
+				<button :loading="!button_state" type="warn" @click="handleCancelProcess">撤销</button>
+			</uni-card>
+		</view>
+	</view>
+	<view style="height: 5px; margin-top: 20px;"></view>
 </template>
 
 <script setup lang="ts">
@@ -115,21 +134,23 @@ import { onLoad } from '@dcloudio/uni-app'
 import attachmentList from '@/components/ygoa/attachmentList.vue'
 import $tab from '@/plugins/tab.js'
 import $modal from '@/plugins/modal.js'
-import { getProcessFlowInfo, getProcessFormInfo, getProcessFormInfoInFlow, getProcessFlow, submitProcessFlow } from '@/api/process.js'
+import { getProcessFlowInfo, getProcessFormInfo, getProcessFormInfoInFlow, getProcessFlow, submitProcessFlow, cancelProcessFlow } from '@/api/process.js'
 import { useUserStore } from '@/store/user.js'
 const userStore = useUserStore()
 const processInfo = reactive({
 	insId: '',
 	insName: '',
 	control: 1,
+	username: '',
 	tinsId: undefined
 })
-onLoad(({ insId, tinsId, insName, control }) => {
+onLoad(({ username, insId, tinsId, insName, control }) => {
 	// 获取传入的标题参数
 	const title = insName || '流程信息';
 	processInfo.insId = insId
 	processInfo.insName = insName
 	processInfo.control = control
+	processInfo.username = username
 	if (tinsId) {
 		processInfo['tinsId'] = tinsId
 	}
@@ -228,8 +249,16 @@ function handlerepeatingForm() {
 
 const button_state = ref(true)
 const remark = ref('')
+function handleSubmitProcess(result) {
+	let content = '确认退回'
+	if (result == "1") {
+		content = '确认通过'
+	}
+	$modal.confirm(content).then(() => {
+		submitProcess(result)
+	}).catch(() => { })
+}
 function submitProcess(result) {
-	console.log('formElements: ', formElements);
 	formInfo.value.formElements = formElements.value.map(({ tableField, defaultValue }) => {
 		return {
 			name: tableField,
@@ -253,13 +282,35 @@ function submitProcess(result) {
 		} else {
 			$modal.msgSuccess(returnMsg)
 			// 通知列表刷新数据
-			uni.$emit('ReloadProcessData', '测试$emit');
+			uni.$emit('ReloadProcessData');
 			setTimeout(() => {
 				$tab.navigateBack();
 			}, 1000)
 		}
 	})
 }
+
+function handleCancelProcess() {
+	$modal.confirm('确认撤销').then(() => {
+		cancelProcess()
+	}).catch(() => { })
+}
+function cancelProcess() {
+	cancelProcessFlow(userStore.user.useId, remark.value, processInfo).then(({ returnMsg }) => {
+		if (returnMsg.includes('success')) {
+			$modal.msgSuccess('撤销成功')
+			// 通知列表刷新数据
+			uni.$emit('ReloadProcessData');
+			setTimeout(() => {
+				$tab.navigateBack();
+			}, 1000)
+		} else {
+			// 启用按钮
+			button_state.value = true
+			$modal.msgError(returnMsg)
+		}
+	})
+}
 </script>
 
 <style lang="scss">
@@ -304,6 +355,8 @@ function submitProcess(result) {
 	}
 
 	.flow_step_container {
+		min-height: 200px;
+
 		.u-steps {
 			.u-steps-item {
 				padding-bottom: 11px;
@@ -365,8 +418,8 @@ function submitProcess(result) {
 	}
 
 	.reject_button {
-		.uni-card {
-			background-color: transparent;
+		::v-deep uni-card {
+			background-color: #f5f5f5;
 		}
 	}
 }

+ 6 - 5
pages/process/index.vue

@@ -46,7 +46,7 @@
 <script setup lang="ts">
 import processList from '@/components/ygoa/processList.vue'
 import { onShow } from '@dcloudio/uni-app'
-import { reactive, ref,onMounted, onUpdated } from 'vue';
+import { reactive, ref, onMounted, onUpdated } from 'vue';
 import $tab from '@/plugins/tab.js'
 import { getUserProcess, getUserProcessed, getUserProcessing, getUserAllProcess } from '@/api/process';
 import { useUserStore } from '@/store/user';
@@ -54,12 +54,11 @@ import { useUserStore } from '@/store/user';
 
 onMounted(() => {
 	uni.$on('ReloadProcessData', (res) => {
-		console.log('res: ',res);
 		processListRef.value.onClickItem()
 	})
 })
-onShow(()=>{
-		uni.$emit('showTabBarBadge')
+onShow(() => {
+	uni.$emit('showTabBarBadge')
 })
 const userStore = useUserStore();
 // 分段器选项
@@ -151,10 +150,12 @@ function getProcessPage({ pageNo, pSize }, callback) {
 	})
 }
 // 跳转到流程详情页
-function handleToProcessDetail({ insId, tinsId, insName, control }) {
+function handleToProcessDetail({ username, insId, tinsId, insName, control }) {
 	let url = '/pages/process/detail/index?insId=' + insId + '&insName=' + insName + '&control=' + control
 	if (tinsId) {
 		url = url + '&tinsId=' + tinsId
+	} else if (current.value != 3) {
+		url = url + '&username=' + username
 	}
 	$tab.navigateTo(url)
 }

+ 2 - 5
pages/work/edit/index.vue

@@ -180,10 +180,7 @@ function delrepeatingFormItem(index) {
 	$modal.confirm('', '确认删除该重复表数据')
 		.then(() => {
 			repeatingForm.value.elements.splice(index, 1)
-		})
-		.catch(err => {
-
-		})
+		}).catch(() => { })
 }
 function computedrepeatingFormItemValue(item, table) {
 	let res = 1
@@ -304,7 +301,7 @@ function submitProcess() { // 提交表单
 		} else {
 			$modal.msgSuccess(res.returnMsg)
 			// 通知列表刷新数据
-			uni.$emit('ReloadProcessData', '测试$emit');
+			uni.$emit('ReloadProcessData');
 			setTimeout(() => {
 				// 返回上一页
 				$tab.navigateBack();

+ 1 - 1
utils/ygoa.js

@@ -78,5 +78,5 @@ export function clearCache() {
 			icon: 'success',
 			duration: 2000
 		});
-	})
+	}).catch(()=>{})
 }