Commit 35b38638 by chenyu

update: update

parent 48faa9fd
......@@ -124,7 +124,7 @@
<template slot="header" slot-scope="scope">
费用(元)
<el-tooltip :open-delay="200" class="item" effect="dark" placement="top">
<div slot="content" style="width:300px;line-height:1.5;">由于运营商的计费单价会有调整以及海外短信是按不同地区进行费用扣除。但此处是用统一用当下的单价乘以计费条数进行合计,所以可能导致此处的费用和详情不一致,最终以详情的合计金额为准。</div>
<div slot="content" style="width:300px;line-height:1.5;" :key="scope.$index">由于运营商的计费单价会有调整以及海外短信是按不同地区进行费用扣除。但此处是用统一用当下的单价乘以计费条数进行合计,所以可能导致此处的费用和详情不一致,最终以详情的合计金额为准。</div>
<i class="iconfont icon-QuestionCircleOutlined minor-font-color cursor-pointer ml5"></i>
</el-tooltip>
</template>
......@@ -177,9 +177,9 @@ export default {
if (this.minDate) {
const curTime = this.minDate.getTime();
const min = curTime - oneMothods > halfYearBefore ? curTime - oneMothods : halfYearBefore;
return val.getTime() > curTime + oneMothods || val.getTime() < min || val.getTime() > this.maxDate;
return val.getTime() > curTime + oneMothods || val.getTime() < min || val.getTime() > this.maxDate.getTime();
}
return val.getTime() <= halfYearBefore || val.getTime() > this.maxDate;
return val.getTime() <= halfYearBefore || val.getTime() > this.maxDate.getTime();
},
onPick: ({ maxDate, minDate }) => {
this.minDate = minDate;
......
......@@ -273,7 +273,7 @@
<div class="export-time text-center">
<h2>选择导出日期范围</h2>
<p class="tip mb10">日期最大可选择范围为3个月,不支持导出当天的数据</p>
<el-date-picker :clearable="false" :pickerOptions="exportDialog.pickerOptions" v-model="exportDialog.time" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
<el-date-picker :clearable="false" :pickerOptions="exportDialog.pickerOptions" v-model="exportDialog.time" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @click.native="exportDialog.minDate = null"></el-date-picker>
<div class="mt40 mb40">
<el-button type="primary" @click="createRepoert">去生成报告</el-button>
</div>
......@@ -328,7 +328,7 @@ export default {
const min = curTime - oneMothods > halfYearBefore ? curTime - oneMothods : halfYearBefore;
return val.getTime() > curTime + oneMothods || val.getTime() < min || val.getTime() > this.maxDate;
}
return val.getTime() <= halfYearBefore || val.getTime() > this.maxDate;
return val.getTime() <= halfYearBefore || val.getTime() > this.maxDate.getTime();
},
onPick: ({ maxDate, minDate }) => {
this.minDate = minDate;
......@@ -365,12 +365,15 @@ export default {
const isSms = this.$route.params.type == 'marketing'; // 是否为营销类型
const beforeDay = Date.now() - 24 * 60 * 60 * 1000; // 营销类型最大选择时间为当天的前一天
// 只能筛选一年之内得数据,并且最大跨度为三个月
const oneYearBefore = Date.now() - 12 * 30 * 24 * 60 * 60 * 1000;
const threeMothods = 3 * 30 * 24 * 60 * 60 * 1000;
const curTime = this.exportDialog.minDate.getTime();
const min = curTime - threeMothods > oneYearBefore ? curTime - threeMothods : oneYearBefore;
const max = isSms ? beforeDay : curTime + threeMothods;
return val.getTime() > max || val.getTime() < min;
const oneYearBefore = Date.now() - 365 * 24 * 60 * 60 * 1000;
const threeMonths = 3 * 30 * 24 * 60 * 60 * 1000;
if (this.exportDialog.minDate) {
const curTime = this.exportDialog.minDate.getTime();
const min = curTime - threeMonths > oneYearBefore ? curTime - threeMonths : oneYearBefore;
const max = isSms ? (curTime + threeMonths > beforeDay ? beforeDay : beforeDay + threeMonths) : curTime + threeMonths > new Date().getTime() ? new Date().getTime() : curTime + threeMonths;
return val.getTime() > max || val.getTime() < min;
}
return val.getTime() < oneYearBefore || val.getTime() > (isSms ? beforeDay : this.maxDate.getTime());
},
onPick: ({ maxDate, minDate }) => {
this.exportDialog.minDate = minDate;
......
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