Commit daae17f7 authored by xishifeng's avatar xishifeng

业绩查询bug

parent 4cbbf5ea
......@@ -13,7 +13,7 @@
<div id="app">
<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>
<a class="word-link" :href="reportLink">我的日报</a>
</header>
......
......@@ -141,15 +141,19 @@ require(['vue', 'css!style/achieve_temp.css', 'jquery0325', 'common'], function(
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;
if(_tempTimeNow === _tempTimeStart && _tempTimeNow === _tempTimeEnd){
console.log('搜索为今天');
}else{
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);
......
......@@ -120,7 +120,9 @@ require(['vue', 'css!style/achieve_tonglian_ac.css', 'jquery0325', 'common'], fu
var _this = this;
Vue.set(vm.tabsMain[1], 'houseDataInit', obj);
_this.resetSomeData(2);
_this.ajaxUl();
_this.ajaxMainNum(function(){
_this.ajaxUl();
});
},
resetSomeData: function(type) {
var _this = this;
......@@ -238,15 +240,19 @@ require(['vue', 'css!style/achieve_tonglian_ac.css', 'jquery0325', 'common'], fu
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;
if(_tempTimeNow === _tempTimeStart && _tempTimeNow === _tempTimeEnd){
console.log('搜索为今天');
}else{
if(_tempTimeStart > _tempTimeEnd || _tempTimeEnd >= _tempTimeNow){
layer.open({
content: '开始时间不能大于结束时间,且搜索日期需要小于今天。请重新选择日期',
btn: ['确定', '取消'],
yes: function(_index){
layer.close(_index);
}
});
return false;
};
};
};
_this.resetSomeData(1);
......
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