소스 검색

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-app

wangchao 2 년 전
부모
커밋
5599df6a34

+ 1 - 1
pages/clock/supp_clock.vue

@@ -5,7 +5,7 @@
 				<view class="c-row">
 					<view class="title">补卡原因</view>
 					<view class="con-list">
-						<u-radio-group v-model="typevalue">
+						<u-radio-group  activeColor="#22C572" v-model="typevalue">
 							<u-radio key="1" label="上班" name="1">上班</u-radio>
 							<u-radio key="3" label="下班" name="3">下班</u-radio>
 						</u-radio-group>

+ 13 - 4
pages/clock/the_clock.vue

@@ -3,8 +3,8 @@
 		<view class='wrap'>
 			<view class="c-row">
 				<view class="title">打卡原因</view>
-				<view class="con-list">
-					<u-radio-group v-model="typevalue">
+				<view style='padding:0;' class="con-list">
+					<u-radio-group activeColor="#22C572" v-model="typevalue">
 						<u-radio key="3" label="下班" name="3">下班</u-radio>
 						<u-radio key="1" label="上班" name="1">上班</u-radio>
 					</u-radio-group>
@@ -26,6 +26,9 @@
 				</view>
 			</view>
 		</view>
+		<view>
+			<u-button type="primary" class="submit" hover-class="none" @click="submit">提交</u-button>
+		</view>
 		<!-- <view class="footer">
 			<view @click='clockRecord' class="button">记录</view>
 			<view @click='submit' class="button">提交</view>
@@ -33,7 +36,7 @@
 		<u-toast ref="uToast" />
 		<view class="bottom-btn">
 			<u-button type="primary" class="submit" hover-class="none" @click="clockRecord">记录</u-button>
-			<u-button type="primary" class="submit" hover-class="none" @click="submit">提交</u-button>
+			
 		</view>
 	</view>
 </template>
@@ -58,7 +61,12 @@
 			}
 		},
 		onLoad() {
-			this.getWarehouse()
+			if(!uni.getStorageSync("clockwerehouse")){
+				this.getWarehouse()
+			}else{
+				this.detailData.targetLocation=uni.getStorageSync("clockwerehouse")
+			}
+			
 			// this.getLocation()
 		},
 		methods: {
@@ -102,6 +110,7 @@
 				})
 			},
 			targetLPicker(e) {
+				uni.setStorageSync("clockwerehouse",this.warehouseBaseInfoList[e[0]].warehouseName)
 				this.detailData.targetLocation = this.warehouseBaseInfoList[e[0]].warehouseName
 				this.clockDistance = this.utils.getDistance(this.warehouseBaseInfoList[e[0]].warehousePositioning.split(
 						',')[0],

+ 7 - 4
pages/clock/the_clock_record.vue

@@ -62,7 +62,8 @@
 					month: true
 				},
 				isLoadMore: false,
-
+				createDate:'',
+				createDate1:'',
 
 			}
 		},
@@ -78,7 +79,8 @@
 		onLoad(options) {
 			let _day = new Date();
 			_day.setTime(_day.getTime());
-			this.createDate = _day.getFullYear() + "-" + (_day.getMonth() + 1);
+			this.createDate = _day.getFullYear() + "." + (_day.getMonth() + 1);
+			this.createDate1 = _day.getFullYear() + "-" + (_day.getMonth() + 1);
 		},
 		onReachBottom() { //上拉触底函数
 			if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
@@ -89,7 +91,8 @@
 		methods: {
 			dateChange(e) {
 				console.log(e)
-				this.createDate = e.year + "-" + e.month
+				this.createDate = e.year + "." + e.month
+				this.createDate1 = e.year + "-" + e.month
 				this.getList()
 			},
 			getData() {
@@ -113,7 +116,7 @@
 					pageSize: this.pageSize,
 					currentPage: this.currentPage,
 					pcFlag: 0,
-					yearMonth: this.createDate,
+					yearMonth: this.createDate1,
 					compId: uni.getStorageSync('pcUserInfo').compId,
 					commonId: uni.getStorageSync('pcUserInfo').userId,
 				}).then(res => {

+ 54 - 6
pages/leave/the_leave.vue

@@ -4,7 +4,7 @@
 			<view class="c-row">
 				<view class="title">请假类型</view>
 				<view class="con-list">
-					<view @click='show=true'>{{detailData.leaveType}}</view>
+					<view @click='show=true'>{{detailData.leaveType}} ></view>
 					<u-picker :range="leaveTypeList" range-key="leaveType"@confirm='ltCheck($event)' v-model="show" mode="selector">
 					</u-picker>
 				</view>
@@ -12,7 +12,7 @@
 			<view class="c-row">
 				<view class="title">开始时间</view>
 				<view class="con-list">
-					<view @click='show1=true'>{{detailData.startDate}}</view>
+					<view @click='show1=true'>{{detailData.startDate}} ></view>
 					<u-picker v-model="show1" mode="time" @confirm='dateChange($event)' :params="params">
 					</u-picker>
 				</view>
@@ -20,7 +20,7 @@
 			<view class="c-row">
 				<view class="title">结束时间</view>
 				<view class="con-list">
-					<view @click='show2=true'>{{detailData.endDate}}</view>
+					<view @click='show2=true'>{{detailData.endDate}} ></view>
 					<u-picker v-model="show2" mode="time" @confirm='dateChange1($event)' :params="params">
 					</u-picker>
 				</view>
@@ -42,14 +42,49 @@
 				</view>
 			</view>
 		</view>
+		
 		<!-- <view class="footer">
 			<view @click='clockRecord' class="button">记录</view>
 			<view @click='submit' class="button">提交</view>
 		</view> -->
 		<u-toast ref="uToast" />
 		<view class="bottom-btn">
-			<u-button type="primary" class="submit" hover-class="none" @click="clockRecord">记录</u-button>
-			<u-button type="primary" class="submit" hover-class="none" @click="submit">提交</u-button>
+			<view style='margin:5px 0;'>
+				<u-button type="primary" class="submit" hover-class="none" @click="submit">提交</u-button>
+			</view>
+			<view>
+				<view style='width:100%;' class='flex flex-space-between'>
+					<view @click='clocksubmit' style='width:50%;text-align:center;'>
+						<image
+						v-if='value==0'
+							class="u-page__item__slot-icon"
+							src="../../static/img/oa_office/leave/qingjia-check.png"
+						></image>
+						<image
+						v-else
+							class="u-page__item__slot-icon"
+							src="../../static/img/oa_office/leave/qingjia.png"
+						></image>
+						<view :style='{"color":value==0?"#22C572":"#000"}'>请假</view>
+					</view>
+					<view @click='clockRecord' style='width:50%;text-align:center;'>
+						<image
+						v-if='value==1'
+							class="u-page__item__slot-icon"
+							src="../../static/img/oa_office/leave/jilu-check.png"
+						></image>
+						<image
+						v-else
+							class="u-page__item__slot-icon"
+							src="../../static/img/oa_office/leave/jilu.png"
+						></image>
+						<view :style='{"color":value==1?"#22C572":"#000"}'>记录</view>
+					</view>
+				</view>
+			</view>
+			
+			<!-- <u-button type="primary" class="submit" hover-class="none" @click="clockRecord">记录</u-button> -->
+			
 		</view>
 	</view>
 </template>
@@ -77,6 +112,7 @@
 					minute: true,
 					
 				},
+				value:0,
 				type: 'textarea',
 				border: true,
 				height: 150,
@@ -136,6 +172,10 @@
 			},
 			dateChange1(e) {
 				this.detailData.endDate = e.year + "-" + e.month + "-" + e.day + " " + e.hour + ":" + e.minute
+				var endtime=new Date(this.detailData.endDate)
+				var starttime=new Date(this.detailData.startDate)
+				console.log(endtime-starttime)
+				this.detailData.leaveDuration=Math.floor((endtime-starttime)/(3600*1000))
 				// this.endDate1 = e.year + "-" + e.month + "-" + e.day + "-" + e.hour + "-" + e.minute + "-" + e.second
 			},
 			submit() {
@@ -191,6 +231,11 @@
 					url: '/pages/leave/the_leave_record'
 				})
 			},
+			clocksubmit() {
+				uni.navigateTo({
+					url: '/pages/leave/the_leave'
+				})
+			},
 		},
 	}
 </script>
@@ -281,7 +326,6 @@
 		width: 100%;
 		position: fixed;
 		bottom: 0rpx;
-		display: flex;
 		z-index: 9999;
 	}
 
@@ -310,4 +354,8 @@
 		background: #F9F9FA;
 		border: 1px solid #EEEEEE;
 	}
+	.u-page__item__slot-icon{
+		width:20px;
+		height:20px;
+	}
 </style>

+ 90 - 0
pages/leave/the_leave_record.vue

@@ -20,6 +20,42 @@
 		<view v-show="isLoadMore">
 			<uni-load-more :status="loadStatus"></uni-load-more>
 		</view>
+		<view class="bottom-btn">
+				<view>
+					<view style='width:100%;' class='flex flex-space-between'>
+						<view @click='clocksubmit' style='width:50%;text-align:center;'>
+							<image
+							v-if='value==0'
+								class="u-page__item__slot-icon"
+								src="../../static/img/oa_office/leave/qingjia-check.png"
+							></image>
+							<image
+							v-else
+								class="u-page__item__slot-icon"
+								src="../../static/img/oa_office/leave/qingjia.png"
+							></image>
+							<view :style='{"color":value==0?"#22C572":"#000"}'>请假</view>
+						</view>
+						<view @click='clockRecord' style='width:50%;text-align:center;'>
+							<image
+							v-if='value==1'
+								class="u-page__item__slot-icon"
+								src="../../static/img/oa_office/leave/jilu-check.png"
+							></image>
+							<image
+							v-else
+								class="u-page__item__slot-icon"
+								src="../../static/img/oa_office/leave/jilu.png"
+							></image>
+							<view :style='{"color":value==1?"#22C572":"#000"}'>记录</view>
+						</view>
+					</view>
+				</view>
+				
+				<!-- <u-button type="primary" class="submit" hover-class="none" @click="clockRecord">记录</u-button> -->
+				
+			</view>
+		</view>
 	</view>
 </template>
 
@@ -30,6 +66,7 @@
 				pageSize: 10,
 				currentPage: 1,
 				tableData: [],
+				value:1,
 				isLoadMore: false, //是否加载中
 				loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
 			}
@@ -84,6 +121,16 @@
 					}
 				})
 			},
+			clockRecord() {
+				uni.navigateTo({
+					url: '/pages/leave/the_leave_record'
+				})
+			},
+			clocksubmit() {
+				uni.navigateTo({
+					url: '/pages/leave/the_leave'
+				})
+			},
 		}
 	}
 </script>
@@ -132,4 +179,47 @@
 		padding: 5rpx 30rpx;
 		position: relative;
 	}
+	.submit {
+		width: 40%;
+		background: #22C572;
+		border-radius: 10rpx;
+	}
+	.bottom-btn {
+		padding: 30rpx;
+		background: #FFFFFF;
+		width: 100%;
+		position: fixed;
+		bottom: 0rpx;
+		z-index: 9999;
+	}
+	
+	.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;
+	}
+	.u-page__item__slot-icon{
+		width:20px;
+		height:20px;
+	}
 </style>

+ 1 - 1
pages/shortDistance/short_distance_record.vue

@@ -130,7 +130,7 @@
 				height: 150,
 				autoHeight: true,
 				
-				infoList:[],
+				// infoList:[],
 
 			}
 		},

+ 4 - 0
pages/shortDistance/short_track_addition.vue

@@ -65,6 +65,10 @@
 				})
 			},
 			startTrack() {
+				if(this.detailData.carNo.length!=7){
+					this.$api.msg('车牌号输入错误!')
+					return
+				}
 				if (this.titleBtn == "开始轨迹") {
 					var that = this
 					uni.showModal({