Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
marketing-web
marketing
Commits
16b2d65d
Commit
16b2d65d
authored
Dec 20, 2021
by
liuchenxi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 消费详情导出时间限制
parent
279378a9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
15 deletions
+27
-15
view-store.vue
src/views/recharge/components/view-store.vue
+2
-1
consume.vue
src/views/recharge/consume.vue
+25
-14
No files found.
src/views/recharge/components/view-store.vue
View file @
16b2d65d
...
...
@@ -3,7 +3,7 @@
<div
class=
"alert"
>
<i
class=
"iconfont icon-warning-circle-fill"
></i>
<span
class=
"ml10"
>
若要修改门店请前往【企业管理-权限管理-用户列表】进行修改
</span>
<el-button
v-if=
"$getButtonLimit($buttonCode.marketingToUserList)"
:limit-code=
"$buttonCode.marketingToUserList"
type=
"text"
class=
"ml10"
@
click=
"toUserList"
>
立即前往
</el-button>
<el-button
:limit-code=
"$buttonCode.marketingToUserList"
type=
"text"
class=
"ml10"
@
click=
"toUserList"
>
立即前往
</el-button>
</div>
<el-input
class=
"mt20 mb20 w260"
v-model=
"search"
clearable
prefix-icon=
"el-icon-search"
placeholder=
"请输入门店名称或code"
@
change=
"onSearch"
/>
<el-table
:data=
"tableData.data"
element-loading-text=
"拼命加载中"
max-height=
"288"
>
...
...
@@ -84,6 +84,7 @@ export default {
this
.
tableData
.
currentPage
=
1
;
},
toUserList
()
{
if
(
!
this
.
$getButtonLimit
(
this
.
$buttonCode
.
marketingToUserList
))
return
this
.
$message
.
warning
({
message
:
'无部门管理权限,请联系管理员开启权限配置'
,
showClose
:
true
});
window
.
open
(
'/gic-web/#/userManager'
);
}
},
...
...
src/views/recharge/consume.vue
View file @
16b2d65d
...
...
@@ -310,17 +310,15 @@ export default {
// 只能筛选半年之内得数据,并且最大跨度为一个月
const
halfYearBefore
=
Date
.
now
()
-
6
*
30
*
24
*
60
*
60
*
1000
;
const
oneMothods
=
30
*
24
*
60
*
60
*
1000
;
if
(
this
.
minDate
)
{
const
curTime
=
this
.
minDate
.
getTime
();
const
min
=
curTime
-
oneMothods
>
halfYearBefore
?
curTime
-
oneMothods
:
halfYearBefore
;
return
val
.
getTime
()
>
curTime
+
oneMothods
||
val
.
getTime
()
<
min
;
}
return
val
.
getTime
()
<=
halfYearBefore
;
const
curTime
=
this
.
minDate
.
getTime
();
const
min
=
curTime
-
oneMothods
>
halfYearBefore
?
curTime
-
oneMothods
:
halfYearBefore
;
return
val
.
getTime
()
>
curTime
+
oneMothods
||
val
.
getTime
()
<
min
;
},
onPick
:
({
maxDate
,
minDate
})
=>
{
this
.
minDate
=
minDate
;
}
},
minDate
:
new
Date
(
Date
.
now
()
-
30
*
24
*
60
*
60
*
1000
),
videoListParams
:
{
currentPage
:
1
,
pageSize
:
20
,
...
...
@@ -343,26 +341,25 @@ export default {
departId
:
''
,
// 选中时得id
zbFlag
:
1
},
minDate
:
new
Date
(
Date
.
now
()
-
30
*
24
*
60
*
60
*
1000
),
exportDialog
:
{
dialogVisible
:
false
,
pickerOptions
:
{
disabledDate
:
val
=>
{
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
;
if
(
this
.
exportDialog
.
minDate
)
{
const
curTime
=
this
.
exportDialog
.
minDate
.
getTime
();
const
min
=
curTime
-
threeMothods
>
oneYearBefore
?
curTime
-
threeMothods
:
oneYearBefore
;
return
val
.
getTime
()
>
curTime
+
threeMothods
||
val
.
getTime
()
<
min
;
}
return
val
.
getTime
()
<=
oneYearBefore
;
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
;
},
onPick
:
({
maxDate
,
minDate
})
=>
{
this
.
exportDialog
.
minDate
=
minDate
;
}
},
time
:
[
Date
.
now
()
-
30
*
24
*
60
*
60
*
1000
,
Date
.
now
()
],
time
:
[],
minDate
:
new
Date
(
Date
.
now
()
-
30
*
24
*
60
*
60
*
1000
)
},
exportData
:
{
...
...
@@ -710,6 +707,20 @@ export default {
return
this
.
$buttonCode
[
code
];
};
}
},
watch
:
{
'exportDialog.dialogVisible'
:
{
handler
:
function
(
newVal
)
{
if
(
newVal
)
{
const
isSms
=
this
.
$route
.
params
.
type
==
'marketing'
;
// 是否为短信营销
const
beforeDay
=
Date
.
now
()
-
24
*
60
*
60
*
1000
;
const
begenTime
=
isSms
&&
this
.
dateTime
[
0
]
>
beforeDay
?
beforeDay
:
this
.
dateTime
[
0
];
const
endTime
=
isSms
&&
this
.
dateTime
[
1
]
>
beforeDay
?
beforeDay
:
this
.
dateTime
[
1
];
this
.
exportDialog
.
time
=
[
begenTime
,
endTime
];
this
.
exportDialog
.
minDate
=
new
Date
(
begenTime
);
}
}
}
}
};
</
script
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment