Commit f231c7e4 by huaying

Merge branch 'bugfix/积分订单导出订单时间限制' into dev

# Conflicts:
#	dist/index.html
#	dist/js/main.3e93be7f63c33716a44e.js
#	dist/js/main.3e93be7f63c33716a44e.js.LICENSE.txt
#	dist/js/main.4941ef2eb41daab57d1a.js
#	dist/js/main.4941ef2eb41daab57d1a.js.LICENSE.txt
#	dist/js/main.683e795d0bbc2fac0039.js
#	dist/js/main.683e795d0bbc2fac0039.js.LICENSE.txt
parents 40848265 b9883a80
This source diff could not be displayed because it is too large. You can view the blob instead.
<<<<<<< HEAD
<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="stylesheet" href="./static/css/iconfont.css"><link rel="stylesheet" href="./static/css/common.css"><link rel="shortcut icon" type="image/x-icon" href="./static/img/favicon.ico"><title></title><script defer="defer" src="/integral-mall/js/main.4941ef2eb41daab57d1a.js"></script><link href="/integral-mall/css/main.b6d9f5ce35822089f90c.css" rel="stylesheet"></head><body><div id="app"><div class="el-loading-spinner" style="width: 98%;"><svg viewBox="25 25 50 50" class="circular"><circle cx="50" cy="50" r="20" fill="none" class="path"></circle></svg></div></div><script>(function() { <!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="stylesheet" href="./static/css/iconfont.css"><link rel="stylesheet" href="./static/css/common.css"><link rel="shortcut icon" type="image/x-icon" href="./static/img/favicon.ico"><title></title><script defer="defer" src="/integral-mall/js/main.4941ef2eb41daab57d1a.js"></script><link href="/integral-mall/css/main.b6d9f5ce35822089f90c.css" rel="stylesheet"></head><body><div id="app"><div class="el-loading-spinner" style="width: 98%;"><svg viewBox="25 25 50 50" class="circular"><circle cx="50" cy="50" r="20" fill="none" class="path"></circle></svg></div></div><script>(function() {
=======
<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="stylesheet" href="./static/css/iconfont.css"><link rel="stylesheet" href="./static/css/common.css"><link rel="shortcut icon" type="image/x-icon" href="./static/img/favicon.ico"><title></title><script defer="defer" src="/integral-mall/js/main.683e795d0bbc2fac0039.js"></script><link href="/integral-mall/css/main.f88012e450cda23e9e52.css" rel="stylesheet"></head><body><div id="app"><div class="el-loading-spinner" style="width: 98%;"><svg viewBox="25 25 50 50" class="circular"><circle cx="50" cy="50" r="20" fill="none" class="path"></circle></svg></div></div><script>(function() {
>>>>>>> bugfix/积分订单导出订单时间限制
var src = '/component/static/import-component.js?timestrap=' + new Date().getTime(); var src = '/component/static/import-component.js?timestrap=' + new Date().getTime();
var host = window.location.host; var host = window.location.host;
host = host.indexOf('localhost') > -1 || host.indexOf('192.168') > -1 ? 'www.gicdev.com' : host; host = host.indexOf('localhost') > -1 || host.indexOf('192.168') > -1 ? 'www.gicdev.com' : host;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.6+9869a4bc
*/
/*!
* clipboard.js v2.0.1
* https://zenorocha.github.io/clipboard.js
*
* Licensed MIT © Zeno Rocha
*/
/*!
* vue-treeselect v0.0.35 | (c) 2017-2018 Riophae Lee
* Released under the MIT License.
* https://vue-treeselect.js.org/
*/
/**!
* Sortable 1.10.2
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/
...@@ -833,6 +833,30 @@ export default { ...@@ -833,6 +833,30 @@ export default {
betachDeliver () { betachDeliver () {
this.deliverModal.dialogVisible = true; this.deliverModal.dialogVisible = true;
}, },
// 计算自然月
natureMonth (curDate, step) {
if (!curDate || !step) return curDate;
if (typeof curDate === 'string') curDate = new Date(curDate.replace(/[\/|\.]/g, '-')); // new Date(str) 对str格式的,ios只支持yyyy-MM-dd
const targetDateLastDay = new Date(curDate.getFullYear(), curDate.getMonth() + step + 1, 0);
const targetDate = new Date(curDate.getFullYear(), curDate.getMonth() + step, Math.min(curDate.getDate(), targetDateLastDay.getDate()));
return this.formatDate(targetDate, 'yyyy-MM-dd');
},
formatDate (dateObj, format) {
const month = dateObj.getMonth() + 1;
const date = dateObj.getDate();
return format.replace(/yyyy|MM|dd/g, field => {
switch (field) {
case 'yyyy':
return dateObj.getFullYear();
case 'MM':
return month < 10 ? '0' + month : month;
case 'dd':
return date < 10 ? '0' + date : date;
}
});
},
// 导出发货单 // 导出发货单
exportExcel () { exportExcel () {
if (this.dateValue) { if (this.dateValue) {
...@@ -846,10 +870,19 @@ export default { ...@@ -846,10 +870,19 @@ export default {
this.$message.error('时间不能为空'); this.$message.error('时间不能为空');
return; return;
} }
if (new Date(this.endTime).getTime() - new Date(this.beginTime).getTime() > 90 * 24 * 3600 * 1000) { const data = this.natureMonth(this.beginTime, 3);
this.endTime = this.endTime.split(' ')[0];
// console.log(this.endTime.split(' '), 'iiii');
// console.log(data, typeof data, '选择时间', this.endTime, typeof this.endTime);
// console.log(new Date(data).getTime(), new Date(this.endTime).getTime());
if (new Date(data).getTime() - 1 * 24 * 1000 < new Date(this.endTime).getTime()) {
this.$message.error('导出订单不支持导出超过3个月时长的数据,请重新选择时间'); this.$message.error('导出订单不支持导出超过3个月时长的数据,请重新选择时间');
return; return;
} }
// if (new Date(this.endTime).getTime() - new Date(this.beginTime).getTime() > 90 * 24 * 3600 * 1000) {
// this.$message.error('导出订单不支持导出超过3个月时长的数据,请重新选择时间');
// return;
// }
this.params = { this.params = {
orderStatus: this.orderStatus, orderStatus: this.orderStatus,
changeType: this.changeType ? this.changeType : -1, changeType: this.changeType ? this.changeType : -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