Commit 73addde4 authored by xishifeng's avatar xishifeng

业绩搜索日期限制

parent 14be0b53
...@@ -7,6 +7,7 @@ require(['vue', 'css!style/achieve_temp.css', 'jquery0325', 'common'], function( ...@@ -7,6 +7,7 @@ require(['vue', 'css!style/achieve_temp.css', 'jquery0325', 'common'], function(
token: '', token: '',
startDate: '', startDate: '',
endDate: '', endDate: '',
nowDate: backNowDate(),
headerTitle: '', headerTitle: '',
ywyId: getUrlParam('ywyId'), ywyId: getUrlParam('ywyId'),
userLevel: '', userLevel: '',
...@@ -135,8 +136,21 @@ require(['vue', 'css!style/achieve_temp.css', 'jquery0325', 'common'], function( ...@@ -135,8 +136,21 @@ require(['vue', 'css!style/achieve_temp.css', 'jquery0325', 'common'], function(
var _this = this; var _this = this;
_this.resetSomeData(1); _this.resetSomeData(1);
if(type =='today'){ if(type =='today'){
_this.startDate = backNowDate(); _this.endDate = _this.startDate = _this.nowDate;
_this.endDate = _this.startDate; }else{
var _tempTimeNow = new Date(_this.nowDate).getTime(),
_tempTimeStart = new Date(_this.startDate).getTime(),
_tempTimeEnd = new Date(_this.endDate).getTime();
if(_tempTimeStart > _tempTimeEnd || _tempTimeEnd >= _tempTimeNow){
layer.open({
content: '开始时间不能大于结束时间,且搜索日期需要小于今天。请重新选择日期',
btn: ['确定', '取消'],
yes: function(_index){
layer.close(_index);
}
});
return false;
};
}; };
sessionStorage.setItem('achieve_search_start_date', _this.startDate); sessionStorage.setItem('achieve_search_start_date', _this.startDate);
sessionStorage.setItem('achieve_search_end_date', _this.endDate); sessionStorage.setItem('achieve_search_end_date', _this.endDate);
......
...@@ -7,6 +7,7 @@ require(['vue', 'css!style/achieve_tonglian_ac.css', 'jquery0325', 'common'], fu ...@@ -7,6 +7,7 @@ require(['vue', 'css!style/achieve_tonglian_ac.css', 'jquery0325', 'common'], fu
testBtn: null, testBtn: null,
startDate: '', startDate: '',
endDate: '', endDate: '',
nowDate: backNowDate(),
tabsMain: [{ tabsMain: [{
'title': '经纪人', 'title': '经纪人',
'token': '', 'token': '',
...@@ -231,11 +232,24 @@ require(['vue', 'css!style/achieve_tonglian_ac.css', 'jquery0325', 'common'], fu ...@@ -231,11 +232,24 @@ require(['vue', 'css!style/achieve_tonglian_ac.css', 'jquery0325', 'common'], fu
}, },
search: function(type) { search: function(type) {
var _this = this; var _this = this;
_this.resetSomeData(1);
if(type =='today'){ if(type =='today'){
_this.startDate = backNowDate(); _this.endDate = _this.startDate = _this.nowDate;
_this.endDate = _this.startDate; }else{
var _tempTimeNow = new Date(_this.nowDate).getTime(),
_tempTimeStart = new Date(_this.startDate).getTime(),
_tempTimeEnd = new Date(_this.endDate).getTime();
if(_tempTimeStart > _tempTimeEnd || _tempTimeEnd >= _tempTimeNow){
layer.open({
content: '开始时间不能大于结束时间,且搜索日期需要小于今天。请重新选择日期',
btn: ['确定', '取消'],
yes: function(_index){
layer.close(_index);
}
});
return false;
};
}; };
_this.resetSomeData(1);
_this.ajaxMainNum(function(){ _this.ajaxMainNum(function(){
sessionStorage.setItem('achieve_search_start_date', _this.startDate); sessionStorage.setItem('achieve_search_start_date', _this.startDate);
sessionStorage.setItem('achieve_search_end_date', _this.endDate); sessionStorage.setItem('achieve_search_end_date', _this.endDate);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment