Browse Source

增加时间

zhengkaixin 4 years ago
parent
commit
70f5d14503

+ 7 - 2
src/projects/business/views/Master/Guest/Goto.vue

@@ -44,6 +44,10 @@
 		mapGetters,
 		mapMutations
 	} from 'vuex'
+	import {
+		currentTimeStamp,
+		parseUnixTime
+	} from '$project/utils'
 	export default {
 		name: 'MasterGuestGoto',
 		components: {
@@ -61,7 +65,8 @@
 					pageIndex: 1,
 					pageSize: 20,
 					//	token: '',
-					isToDay:1,//是否只查今天
+					queryDate:'',
+					//isToDay:1,//是否只查今天
 					totalPage: 1,
 					result: 0,
 				},
@@ -72,7 +77,7 @@
 			}
 		},
 		created() {
-
+			this.listForm.queryDate = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}');
 		},
 		methods: {
 			sub(time){

+ 30 - 2
src/projects/business/views/Master/Guest/List.vue

@@ -4,6 +4,12 @@
 		<top-header :pageTitle="pageTitle"    ></top-header>
 
 		<div class="mui-content vongi-fklist">
+
+			<div class="mui-content-padded fyy-date mui-clearfix">
+				<h5>{{person_data.companyName}}
+					<a class="mui-navigate-right mui-pull-right" @click="selectData">{{listForm.queryDate}}</a>
+				</h5>
+			</div>
 			<div style="text-align: center;margin-top: 100px"  v-if="!recordList.length">
 				<img src="~$project/assets/img/lad.png" width="50%"  >
 			</div>
@@ -44,7 +50,9 @@
 	import TopHeader from '$project/components/TopHeader.vue'
 	import isReachBottom from '$project/utils/isReachBottom'
 	import {
-		hourDistance
+		hourDistance,
+		currentTimeStamp,
+		parseUnixTime
 	} from '$project/utils'
 	import {
 		mapGetters,
@@ -68,6 +76,7 @@
 					pageSize: 20,
 					//	token: '',
 					//isToDay:1,//是否只查今天
+					queryDate:'',
 					totalPage: 1,
 					result: 0,
 				},
@@ -78,9 +87,26 @@
 			}
 		},
 		created() {
-
+			this.listForm.queryDate = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}');
 		},
 		methods: {
+			//选择日期
+			selectData() {
+				var _this = this;
+				var picker = new mui.DtPicker({
+					"type": "date",
+					"beginYear": 2020,
+					"endYear": 2040,
+					"endDate": new Date(),
+					"value": _this.listForm.queryDate
+				});
+				picker.show(function(rs) {
+					_this.listForm.queryDate = rs.text;
+					_this.listForm.pageIndex = 1;
+					_this.getList();
+					picker.dispose();
+				});
+			},
 			gethour(t1,t2){
 				return hourDistance(t1,t2)
 			},
@@ -156,6 +182,8 @@
 			...mapGetters({
 				openId: 'wx_openid',
 				token: 'token',
+				person_data: 'person_data',
+				person_popedom: 'person_popedom',
 			})
 		},
 

+ 5 - 2
src/projects/business/views/Master/Guest/Scan.vue

@@ -83,7 +83,8 @@
 				listForm: {
 					pageIndex: 1,
 					pageSize: 3,
-					//	token: '',
+					//	token: ''
+					queryDate:'',
 					isToDay:1,//是否只查今天
 					totalPage: 1,
 					result: 0,
@@ -95,7 +96,9 @@
 				step:'1'
 			}
 		},
-		created() {},
+		created() {
+			this.listForm.queryDate = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}');
+		},
 		methods: {
 			scan(){
 				var _this= this;