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
0282b79c
Commit
0282b79c
authored
Mar 18, 2022
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: AI营销-计费中心
parent
a0b29457
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
12 deletions
+25
-12
rechargeApi.js
src/service/api/rechargeApi.js
+2
-0
consume.vue
src/views/recharge/consume.vue
+23
-12
No files found.
src/service/api/rechargeApi.js
View file @
0282b79c
...
...
@@ -31,6 +31,8 @@ export const callData = params => requests(PREFIX + 'call-data', params);
export
const
recordData
=
params
=>
requests
(
PREFIX
+
'call-record-data'
,
params
);
//计费中心--ai电话详情
export
const
aiCallData
=
params
=>
requests
(
PREFIX
+
'ai-billling-page'
,
params
);
//计费中心--AI电话详情消费总额
export
const
getAiTotalFee
=
params
=>
requests
(
PREFIX
+
'get-ai-total-fee'
,
params
);
//计费中心--点击充值后--第一步:获取余额, 各项服务单价
export
const
rechargeStep0
=
params
=>
requests
(
PREFIX
+
'recharge-step-1'
,
params
);
...
...
src/views/recharge/consume.vue
View file @
0282b79c
...
...
@@ -319,7 +319,7 @@
</section>
</template>
<
script
>
import
{
messageMarketingChart
,
messageMarketingPage
,
smsData
,
voiceData
,
callData
,
recordData
,
aiCallData
,
videoPage
,
videoChartData
,
downloadTrafficCostListExcel
,
getDepartList
}
from
'@/service/api/rechargeApi.js'
;
import
{
messageMarketingChart
,
messageMarketingPage
,
smsData
,
voiceData
,
callData
,
recordData
,
aiCallData
,
getAiTotalFee
,
videoPage
,
videoChartData
,
downloadTrafficCostListExcel
,
getDepartList
}
from
'@/service/api/rechargeApi.js'
;
import
{
formatDateTimeByType
}
from
'@/utils/index.js'
;
import
SelectDepart
from
'./components/select-depart.vue'
;
import
intel
from
'./recharge_mixin'
;
...
...
@@ -404,7 +404,7 @@ export default {
dialogVisible
:
false
,
pickerOptions
:
{
disabledDate
:
val
=>
{
const
isSms
=
this
.
$route
.
params
.
type
==
'marketing'
;
// 是否为营销类型
const
isSms
=
this
.
$route
.
params
.
type
==
'marketing'
||
this
.
$route
.
params
.
type
==
'ai-call'
;
// 是否为营销类型
const
beforeDay
=
Date
.
now
()
-
24
*
60
*
60
*
1000
;
// 营销类型最大选择时间为当天的前一天
// 只能筛选一年之内得数据,并且最大跨度为三个月
const
oneYearBefore
=
Date
.
now
()
-
365
*
24
*
60
*
60
*
1000
;
...
...
@@ -449,6 +449,9 @@ export default {
case
'record'
:
width
=
320
;
break
;
case
'ai-call'
:
width
=
280
;
break
;
default
:
width
=
250
;
}
...
...
@@ -609,15 +612,20 @@ export default {
this
.
loading
=
true
;
try
{
const
{
accountDepartId
,
searchParam
,
beginTime
,
endTime
,
pageSize
,
currentPage
}
=
this
.
listParams
;
let
res
=
await
aiCallData
({
accountDepartId
,
searchParam
,
beginTime
,
endTime
,
pageSize
,
currentPage
});
if
(
res
.
errorCode
===
0
&&
res
.
result
.
result
)
{
res
.
result
.
result
=
false
;
this
.
tableList
=
res
.
result
.
result
||
[];
this
.
total
=
res
.
result
.
totalCount
;
// this.sumFee = fee / 1000;
}
else
{
this
.
tableList
=
[];
}
aiCallData
({
accountDepartId
,
searchParam
,
beginTime
,
endTime
,
pageSize
,
currentPage
}).
then
(
res
=>
{
if
(
res
.
errorCode
===
0
&&
res
.
result
.
result
)
{
this
.
tableList
=
res
.
result
.
result
||
[];
this
.
total
=
res
.
result
.
totalCount
;
}
else
{
this
.
tableList
=
[];
}
});
getAiTotalFee
({
accountDepartId
,
searchParam
,
beginTime
,
endTime
}).
then
(
data
=>
{
const
{
errorCode
,
result
}
=
data
;
if
(
errorCode
==
0
)
{
this
.
sumFee
=
result
!=
null
?
result
/
1000
:
0
;
}
});
}
catch
(
err
)
{}
this
.
loading
=
false
;
},
...
...
@@ -753,6 +761,9 @@ export default {
case
'record'
:
meth
=
'/api-marketing/excel/recharge-call-storage-excel'
;
break
;
case
'ai-call'
:
meth
=
'/api-marketing/excel/recharge-ai-excel'
;
break
;
}
const
params
=
{
requestProject
:
'marketing'
,
...
...
@@ -790,7 +801,7 @@ export default {
'exportDialog.dialogVisible'
:
{
handler
:
function
(
newVal
)
{
if
(
newVal
)
{
const
isSms
=
this
.
$route
.
params
.
type
==
'marketing'
;
// 是否为短信营销
const
isSms
=
this
.
$route
.
params
.
type
==
'marketing'
||
this
.
$route
.
params
.
type
==
'ai-call'
;
// 是否为短信营销
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
];
...
...
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