Ver Fonte

打卡时间改成年月日时分

htc há 1 mês atrás
pai
commit
ff46acae7a
2 ficheiros alterados com 2 adições e 2 exclusões
  1. 1 1
      pagesClockin/fieldService.vue
  2. 1 1
      pagesClockin/index.vue

+ 1 - 1
pagesClockin/fieldService.vue

@@ -174,7 +174,7 @@
 			confirm() {
 				if(this.fileList.length===0) return this.$showToast('请先外出签到拍照')
 				let params = { outUserId:this.outUserId };
-				params[this.isSW==1?'checkInTime':'clockOutTime'] = new Date().Format('hh:mm');
+				params[this.isSW==1?'checkInTime':'clockOutTime'] = new Date().Format('yyyy-MM-dd hh:mm');
 				params.file = this.fileList[0].url;
 				params.position = this.address;
 				this.$api.post(this.url,params).then(res=>{

+ 1 - 1
pagesClockin/index.vue

@@ -149,7 +149,7 @@
 			clock(){
 				let url = this.isSW?'/wms/outsourced/attendance/checkIn':'/wms/outsourced/attendance/clockOut';
 				let params = {outUserId:this.userInfo?.id};
-				params[this.isSW?'checkInTime':'clockOutTime'] = new Date().Format('hh:mm');
+				params[this.isSW?'checkInTime':'clockOutTime'] = new Date().Format('yyyy-MM-dd hh:mm');
 				if(!this.canClock){
 					uni.navigateTo({
 						url:`/pagesClockin/fieldService?url=${url}&outUserId=${this.userInfo?.id}&isSW=${this.isSW?1:0}`