Commit daae17f7 authored by xishifeng's avatar xishifeng

业绩查询bug

parent 4cbbf5ea
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<div id="app"> <div id="app">
<header id="header"> <header id="header">
<a class="ps-back" href="javascript:(history.length>1?history.go(-1):window.location='/');"></a> <a class="ps-back" href="javascript:;" @click.stop.prevent="pageBack"></a>
<h2 id="title">业绩日报</h2> <h2 id="title">业绩日报</h2>
<a class="word-link" :href="reportLink">我的日报</a> <a class="word-link" :href="reportLink">我的日报</a>
</header> </header>
......
...@@ -141,6 +141,9 @@ require(['vue', 'css!style/achieve_temp.css', 'jquery0325', 'common'], function( ...@@ -141,6 +141,9 @@ require(['vue', 'css!style/achieve_temp.css', 'jquery0325', 'common'], function(
var _tempTimeNow = new Date(_this.nowDate).getTime(), var _tempTimeNow = new Date(_this.nowDate).getTime(),
_tempTimeStart = new Date(_this.startDate).getTime(), _tempTimeStart = new Date(_this.startDate).getTime(),
_tempTimeEnd = new Date(_this.endDate).getTime(); _tempTimeEnd = new Date(_this.endDate).getTime();
if(_tempTimeNow === _tempTimeStart && _tempTimeNow === _tempTimeEnd){
console.log('搜索为今天');
}else{
if(_tempTimeStart > _tempTimeEnd || _tempTimeEnd >= _tempTimeNow){ if(_tempTimeStart > _tempTimeEnd || _tempTimeEnd >= _tempTimeNow){
layer.open({ layer.open({
content: '开始时间不能大于结束时间,且搜索日期需要小于今天。请重新选择日期', content: '开始时间不能大于结束时间,且搜索日期需要小于今天。请重新选择日期',
...@@ -152,6 +155,7 @@ require(['vue', 'css!style/achieve_temp.css', 'jquery0325', 'common'], function( ...@@ -152,6 +155,7 @@ require(['vue', 'css!style/achieve_temp.css', 'jquery0325', 'common'], function(
return false; 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);
_this.ajaxMainNum(function(){ _this.ajaxMainNum(function(){
......
...@@ -120,7 +120,9 @@ require(['vue', 'css!style/achieve_tonglian_ac.css', 'jquery0325', 'common'], fu ...@@ -120,7 +120,9 @@ require(['vue', 'css!style/achieve_tonglian_ac.css', 'jquery0325', 'common'], fu
var _this = this; var _this = this;
Vue.set(vm.tabsMain[1], 'houseDataInit', obj); Vue.set(vm.tabsMain[1], 'houseDataInit', obj);
_this.resetSomeData(2); _this.resetSomeData(2);
_this.ajaxMainNum(function(){
_this.ajaxUl(); _this.ajaxUl();
});
}, },
resetSomeData: function(type) { resetSomeData: function(type) {
var _this = this; var _this = this;
...@@ -238,6 +240,9 @@ require(['vue', 'css!style/achieve_tonglian_ac.css', 'jquery0325', 'common'], fu ...@@ -238,6 +240,9 @@ require(['vue', 'css!style/achieve_tonglian_ac.css', 'jquery0325', 'common'], fu
var _tempTimeNow = new Date(_this.nowDate).getTime(), var _tempTimeNow = new Date(_this.nowDate).getTime(),
_tempTimeStart = new Date(_this.startDate).getTime(), _tempTimeStart = new Date(_this.startDate).getTime(),
_tempTimeEnd = new Date(_this.endDate).getTime(); _tempTimeEnd = new Date(_this.endDate).getTime();
if(_tempTimeNow === _tempTimeStart && _tempTimeNow === _tempTimeEnd){
console.log('搜索为今天');
}else{
if(_tempTimeStart > _tempTimeEnd || _tempTimeEnd >= _tempTimeNow){ if(_tempTimeStart > _tempTimeEnd || _tempTimeEnd >= _tempTimeNow){
layer.open({ layer.open({
content: '开始时间不能大于结束时间,且搜索日期需要小于今天。请重新选择日期', content: '开始时间不能大于结束时间,且搜索日期需要小于今天。请重新选择日期',
...@@ -249,6 +254,7 @@ require(['vue', 'css!style/achieve_tonglian_ac.css', 'jquery0325', 'common'], fu ...@@ -249,6 +254,7 @@ require(['vue', 'css!style/achieve_tonglian_ac.css', 'jquery0325', 'common'], fu
return false; return false;
}; };
}; };
};
_this.resetSomeData(1); _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);
......
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