Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9fb68234
authored
Nov 10, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
汇总
1 parent
1076831d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
131 additions
and
62 deletions
api/outputApi/output.js
packagesList/packageOutput/components/outputCrowdfund/outputCrowdfund.js
packagesList/packageOutput/components/outputCrowdfund/outputCrowdfund.scss
packagesList/packageOutput/components/outputCrowdfund/outputCrowdfund.wxml
packagesList/packageOutput/index.wxs
packagesList/packageOutput/pages/summary.js
packagesList/packageOutput/pages/summary.wxml
pages/tab/output/output.js
api/outputApi/output.js
View file @
9fb6823
...
@@ -91,5 +91,13 @@ class outputApi {
...
@@ -91,5 +91,13 @@ class outputApi {
...
data
...
data
})
})
}
}
/**获取活动最新战报 */
getNewReportUrl
(
data
)
{
return
api
.
post
({
method
:
'scrm.api.assistant.crowd.activity.newest.report'
,
...
data
})
}
}
}
export
default
outputApi
export
default
outputApi
packagesList/packageOutput/components/outputCrowdfund/outputCrowdfund.js
View file @
9fb6823
...
@@ -14,7 +14,7 @@ Component({
...
@@ -14,7 +14,7 @@ Component({
properties
:
{
properties
:
{
orderObj
:
{
orderObj
:
{
type
:
Object
,
type
:
Object
,
value
:
()
=>
{},
value
:
()
=>
{
},
observer
(
n
)
{
observer
(
n
)
{
n
&&
this
.
dealStaffList
()
n
&&
this
.
dealStaffList
()
}
}
...
@@ -33,37 +33,45 @@ Component({
...
@@ -33,37 +33,45 @@ Component({
IMAGES
,
IMAGES
,
isShowTip
:
true
,
isShowTip
:
true
,
orderFormList
:
[{
orderFormList
:
[{
label
:
'总场次'
,
label
:
'总场次'
,
name
:
'totalNum'
name
:
'totalNum'
},
},
{
label
:
'总订单'
,
name
:
'totalOrderCount'
},
{
label
:
'成交金额'
,
name
:
'totalAmount'
,
prefix
:
'¥'
}
],
merchantFormList
:
[
{
{
label
:
'
总订单
'
,
label
:
'
预计活动时间
'
,
name
:
't
otalOrderCount
'
name
:
't
ime
'
},
},
{
{
label
:
'成交金额'
,
label
:
'实际活动时间'
,
name
:
'totalAmount'
,
name
:
'realTime'
prefix
:
'¥'
}
],
merchantFormList
:
[{
label
:
'活动时间'
,
name
:
'time'
},
},
{
{
label
:
'订单数'
,
label
:
'订单数'
,
name
:
'orderCount'
name
:
'orderCount'
,
isNumber
:
true
},
},
{
{
label
:
'产值'
,
label
:
'产值'
,
name
:
'realAmount'
,
name
:
'realAmount'
,
className
:
'red'
,
className
:
'red'
,
prefix
:
'¥'
prefix
:
'¥'
,
isNumber
:
true
},
},
{
{
label
:
'预估产值'
,
label
:
'预估产值'
,
name
:
'predictAmount'
,
name
:
'predictAmount'
,
prefix
:
'¥'
prefix
:
'¥'
,
isNumber
:
true
}
}
],
],
tableHeadList
:
[
tableHeadList
:
[
...
@@ -94,34 +102,6 @@ Component({
...
@@ -94,34 +102,6 @@ Component({
prefix
:
'¥'
prefix
:
'¥'
}
}
]
]
// tableHeadList: [
// {
// label: 'rankIdx',
// width: '40rpx'
// },
// {
// label: '业务员',
// name: 'shareName'
// },
// {
// label: '转发',
// name: 'shareCount'
// },
// {
// label: '浏览',
// name: 'browseCount'
// },
// {
// label: '成交',
// name: 'dealCount',
// width: '92rpx'
// },
// {
// label: '产值',
// name: 'totalAmount',
// prefix: '¥'
// }
// ]
},
},
/**
/**
...
@@ -186,7 +166,7 @@ Component({
...
@@ -186,7 +166,7 @@ Component({
path
:
obj
.
path
path
:
obj
.
path
})
})
},
},
fail
()
{}
fail
()
{
}
})
})
})
})
},
},
...
@@ -199,7 +179,7 @@ Component({
...
@@ -199,7 +179,7 @@ Component({
item
item
}
=
e
.
currentTarget
.
dataset
,
}
=
e
.
currentTarget
.
dataset
,
posterObj
=
this
.
selectComponent
(
'#poster'
),
posterObj
=
this
.
selectComponent
(
'#poster'
),
{
options
}
=
wx
.
$router
.
getPageInstance
()
{
options
}
=
wx
.
$router
.
getPageInstance
()
console
.
log
(
options
)
console
.
log
(
options
)
try
{
try
{
let
flag
=
await
posterObj
.
check
(
item
)
let
flag
=
await
posterObj
.
check
(
item
)
...
@@ -232,6 +212,22 @@ Component({
...
@@ -232,6 +212,22 @@ Component({
activityId
activityId
})
})
console
.
log
(
res
)
console
.
log
(
res
)
},
/**战报 */
handleReport
(
e
)
{
const
{
item
}
=
e
.
currentTarget
.
dataset
outputApi
.
getNewReportUrl
({
activityId
:
item
.
activityId
}).
then
(
res
=>
{
console
.
log
(
res
)
// item.posterUrl = res
// this.setData({
// posterItem: item,
// isShowTip: false
// })
}).
catch
(()
=>
{
wx
.
$api
.
showToast
(
'下载战报失败'
)
})
}
}
}
}
})
})
\ No newline at end of file
\ No newline at end of file
packagesList/packageOutput/components/outputCrowdfund/outputCrowdfund.scss
View file @
9fb6823
...
@@ -116,7 +116,7 @@
...
@@ -116,7 +116,7 @@
}
}
&
-label
{
&
-label
{
width
:
1
04
rpx
;
width
:
1
56
rpx
;
flex-shrink
:
0
;
flex-shrink
:
0
;
margin-right
:
16rpx
;
margin-right
:
16rpx
;
}
}
...
...
packagesList/packageOutput/components/outputCrowdfund/outputCrowdfund.wxml
View file @
9fb6823
<!-- packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxml -->
<!-- packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxml -->
<wxs src="../../index.wxs" module="filter" />
<view class="crowdfund-layout">
<view class="crowdfund-layout">
<view class="box order">
<view class="box order">
<view class="order-block" wx:for="{{orderFormList}}" wx:key="index">
<view class="order-block" wx:for="{{orderFormList}}" wx:key="index">
<view class="order-txt font-number">
<view class="order-txt font-number">
<text wx:if="{{item.prefix}}">{{item.prefix}}</text>
<text wx:if="{{item.prefix}}">{{item.prefix}}</text>
{{
orderObj[item.name] || 0
}}
{{
filter.money_three_for_two_thousands(orderObj[item.name] || 0.00)
}}
</view>
</view>
<view class="order-label">{{item.label}}</view>
<view class="order-label">{{item.label}}</view>
</view>
</view>
...
@@ -29,9 +30,9 @@
...
@@ -29,9 +30,9 @@
wx:for-index="idx"
wx:for-index="idx"
wx:key="idx">
wx:key="idx">
<view class="content-label">{{subItem.label}}</view>
<view class="content-label">{{subItem.label}}</view>
<view class="content-txt
font-number
{{subItem.className}}">
<view class="content-txt
{{subItem.isNumber ? 'font-number': ''}}
{{subItem.className}}">
<text wx:if="{{subItem.prefix}}">{{subItem.prefix}}</text>
<text wx:if="{{subItem.prefix}}">{{subItem.prefix}}</text>
{{item[subItem.name]}}
{{
subItem.isNumber ? filter.money_three_for_two_thousands(item[subItem.name]) :
item[subItem.name]}}
</view>
</view>
</view>
</view>
<!-- 排名 -->
<!-- 排名 -->
...
@@ -118,7 +119,7 @@
...
@@ -118,7 +119,7 @@
</view>
</view>
<!-- 战报 -->
<!-- 战报 -->
<view class="new-report">
<view class="new-report">
<view class="report-left">
<view class="report-left"
bindtap="handleReport" data-item="{{item}}"
>
<glsx-image class="icon-report" src="output/icon-report.webp"></glsx-image>
<glsx-image class="icon-report" src="output/icon-report.webp"></glsx-image>
生成最新战报
生成最新战报
</view>
</view>
...
...
packagesList/packageOutput/index.wxs
0 → 100644
View file @
9fb6823
/**设置千分位 */
var setPrice = function (n = 0.0) {
if ((typeof n == 'string' || typeof n == 'number') && !isNaN(n)) {
n = parseFloat(n).toFixed(2)
var r = getRegExp('(d{1,3})(?=(d{3})+(?:.))', 'g')
var p = n.replace(r, ',')
return p
// var r = getRegExp('/./', 'g')
// var p = n.replace(r, 'test')
// return n
} else {
console.log(n, '不是一个数字', !isNaN(n))
}
}
var threeNumForTwo = {
money_three_for_two_thousands: function (num) {
//num = parseInt(num);
// return num
var num = num + ''
var d = ''
if (num.slice(0, 1) == '-') {
d = num.slice(0, 1)
num = num.slice(1)
}
var len = num.length
var index = num.indexOf('.')
if (index == -1) {
num = num + '.00'
} else if (index + 2 == len) {
num = num + '0'
}
var index = num.indexOf('.') // 字符出现的位置
var num2 = num.slice(-3)
num = num.slice(0, index)
var result = ''
while (num.length > 3) {
result = ',' + num.slice(-3) + result
num = num.slice(0, num.length - 3)
}
if (num) {
result = num + result
}
// return result
return d + (result + num2)
}
}
/*
* 导出
*/
module.exports = {
setPrice: setPrice,
money_three_for_two_thousands: threeNumForTwo.money_three_for_two_thousands //暴露接口调用
}
packagesList/packageOutput/pages/summary.js
View file @
9fb6823
...
@@ -71,7 +71,9 @@ Page({
...
@@ -71,7 +71,9 @@ Page({
handleActChange
(
e
)
{
handleActChange
(
e
)
{
var
idx
=
e
.
currentTarget
.
dataset
.
idx
var
idx
=
e
.
currentTarget
.
dataset
.
idx
this
.
setData
({
this
.
setData
({
activityActive
:
idx
activityActive
:
idx
,
// productStatus:0未申请;1申请中;2已开通;3:已结束
isShowData
:
[
2
,
3
].
includes
(
+
this
.
data
.
activityList
[
idx
].
productStatus
)
})
})
if
([
2
,
3
].
includes
(
this
.
data
.
sceneActive
))
{
if
([
2
,
3
].
includes
(
this
.
data
.
sceneActive
))
{
this
.
getCustomerDetail
(
false
,
false
)
this
.
getCustomerDetail
(
false
,
false
)
...
@@ -80,7 +82,9 @@ Page({
...
@@ -80,7 +82,9 @@ Page({
setCurActivity
()
{
setCurActivity
()
{
this
.
setData
({
this
.
setData
({
activityList
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
.
sceneActivityObj
[
'scene'
+
(
this
.
data
.
sceneActive
)]))
activityList
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
.
sceneActivityObj
[
'scene'
+
(
this
.
data
.
sceneActive
)])),
// productStatus:0未申请;1申请中;2已开通;3:已结束
isShowData
:
[
2
,
3
].
includes
(
+
this
.
data
.
sceneActivityObj
[
'scene'
+
(
this
.
data
.
sceneActive
)][
this
.
data
.
activityActive
].
productStatus
)
})
})
// activityActive为0时,触发置顶(左)
// activityActive为0时,触发置顶(左)
if
(
this
.
data
.
activityActive
==
0
)
{
if
(
this
.
data
.
activityActive
==
0
)
{
...
@@ -298,28 +302,32 @@ Page({
...
@@ -298,28 +302,32 @@ Page({
curItem
.
totalNum
=
curItem
.
activityList
.
length
curItem
.
totalNum
=
curItem
.
activityList
.
length
curItem
.
activityList
.
forEach
(
k
=>
{
curItem
.
activityList
.
forEach
(
k
=>
{
// 时间
// 时间
k
.
time
=
k
.
startTime
.
slice
(
5
).
replace
(
/-/g
,
'/'
)
+
'~'
+
k
.
endTime
.
slice
(
5
).
replace
(
/-/g
,
'/
'
)
k
.
time
=
k
.
startTime
.
slice
(
0
,
16
).
replace
(
/-/g
,
'.'
)
+
' - '
+
k
.
endTime
.
slice
(
0
,
16
).
replace
(
/-/g
,
'.
'
)
let
startTimeFormat
=
k
.
startTime
.
slice
(
0
,
10
).
replace
(
/-/g
,
'/'
)
+
' 00:00:00'
let
startTimeFormat
=
k
.
startTime
.
slice
(
0
,
10
).
replace
(
/-/g
,
'/'
)
+
' 00:00:00'
let
nowDateFormat
=
new
Date
().
toLocaleDateString
().
replace
(
/-/g
,
'/'
)
+
' 23:59:59'
let
nowDateFormat
=
new
Date
().
toLocaleDateString
().
replace
(
/-/g
,
'/'
)
+
' 23:59:59'
// activityStatus 1:未开始 2:进行中 3:已结束
// activityStatus 1:未开始 2:进行中 3:已结束
switch
(
k
.
activityStatus
)
{
switch
(
k
.
activityStatus
)
{
case
1
:
case
1
:
k
.
interDays
=
parseInt
((
new
Date
(
startTimeFormat
).
getTime
()
-
new
Date
().
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
interDays
=
parseInt
((
new
Date
(
startTimeFormat
).
getTime
()
-
new
Date
().
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
realTime
=
'-'
break
break
case
2
:
case
2
:
let
endTimeFormat
=
k
.
endTime
.
slice
(
0
,
10
).
replace
(
/-/g
,
'/'
)
+
' 23:59:59'
let
endTimeFormat
=
k
.
endTime
.
slice
(
0
,
10
).
replace
(
/-/g
,
'/'
)
+
' 23:59:59'
k
.
interDays
=
parseInt
((
new
Date
().
getTime
()
-
new
Date
(
startTimeFormat
).
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
interDays
=
parseInt
((
new
Date
().
getTime
()
-
new
Date
(
startTimeFormat
).
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
toEndDays
=
parseInt
((
new
Date
(
endTimeFormat
).
getTime
()
-
new
Date
(
nowDateFormat
).
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
toEndDays
=
parseInt
((
new
Date
(
endTimeFormat
).
getTime
()
-
new
Date
(
nowDateFormat
).
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
realTime
=
'-'
break
break
case
3
:
case
3
:
k
.
interDays
=
parseInt
((
new
Date
(
nowDateFormat
).
getTime
()
-
new
Date
(
k
.
endTime
.
replace
(
/-/g
,
'/'
)).
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
interDays
=
parseInt
((
new
Date
(
nowDateFormat
).
getTime
()
-
new
Date
(
k
.
endTime
.
replace
(
/-/g
,
'/'
)).
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
1
k
.
realTime
=
'-'
break
break
}
}
k
.
suggestTxtList
=
[]
k
.
suggestTxtList
=
[]
k
.
suggestList
=
[]
k
.
suggestList
=
[]
if
(
k
.
activityStatus
==
2
)
{
if
(
k
.
activityStatus
==
2
)
{
k
.
suggestTxtList
.
push
(
'距离活动结束剩余'
+
k
.
toEndDays
+
'天'
)
if
(
k
.
visitCount
<
200
)
{
if
(
k
.
visitCount
<
200
)
{
k
.
suggestTxtList
.
push
(
'
距离活动结束剩余'
+
k
.
toEndDays
+
'天
'
)
k
.
suggestTxtList
.
push
(
'
低于200个独立访客
'
)
k
.
suggestList
.
push
(
'低于200个独立访客,触达车主的数量太少,建议与4S店关键人沟通注册员工的转发执行情况'
)
k
.
suggestList
.
push
(
'低于200个独立访客,触达车主的数量太少,建议与4S店关键人沟通注册员工的转发执行情况'
)
}
}
if
(
k
.
shareRate
<
0.4
)
{
if
(
k
.
shareRate
<
0.4
)
{
...
...
packagesList/packageOutput/pages/summary.wxml
View file @
9fb6823
<!-- packageOutput/pages/summary/summary.wxml -->
<!-- packageOutput/pages/summary/summary.wxml -->
<view class="summary">
<view class="summary">
<view class="layout {{ (sceneActive != 1 &&
activityList[activityActive].productStatus == 2
) ? 'bg-grey' : 'bg-white'}}">
<view class="layout {{ (sceneActive != 1 &&
isShowData
) ? 'bg-grey' : 'bg-white'}}">
<view class="{{ (sceneActive != 1 &&
activityList[activityActive].productStatus == 2
) ? 'bg-white' : 'p-rl-20'}}">
<view class="{{ (sceneActive != 1 &&
isShowData
) ? 'bg-white' : 'p-rl-20'}}">
<view class="{{ (sceneActive != 1 &&
activityList[activityActive].productStatus == 2
) ? 'm-rl-20' : ''}}">
<view class="{{ (sceneActive != 1 &&
isShowData
) ? 'm-rl-20' : ''}}">
<view class="title bg-white">
<view class="title bg-white">
选产品/活动
选产品/活动
<view class="title-open" bindtap="handleJump">
<view class="title-open" bindtap="handleJump">
...
@@ -26,8 +26,8 @@
...
@@ -26,8 +26,8 @@
</scroll-view>
</scroll-view>
</view>
</view>
<!-- 活动内容 -->
<!-- 活动内容 -->
<view class="activity-content {{ (sceneActive != 1 &&
activityList[activityActive].productStatus == 2
) ? '' : 'p-rl-20'}}">
<view class="activity-content {{ (sceneActive != 1 &&
isShowData
) ? '' : 'p-rl-20'}}">
<view wx:if="{{
activityList[activityActive].productStatus == 2
&& sceneActive != 1}}">
<view wx:if="{{
isShowData
&& sceneActive != 1}}">
<view class="activity-title title bg-white p-l-20 no-border">
<view class="activity-title title bg-white p-l-20 no-border">
<view>看产值</view>
<view>看产值</view>
<view class="select" bindtap="handleSearch">
<view class="select" bindtap="handleSearch">
...
...
pages/tab/output/output.js
View file @
9fb6823
...
@@ -9,7 +9,7 @@ Page({
...
@@ -9,7 +9,7 @@ Page({
navStyle
:
'background-color: rgba(0,0,0,0);'
,
navStyle
:
'background-color: rgba(0,0,0,0);'
,
loginType
:
0
,
loginType
:
0
,
agree
:
true
,
agree
:
true
,
tabIndx
:
1
,
tabIndx
:
0
,
tabList
:
[
'我的客户'
,
'我的门店'
,
'我的员工'
],
tabList
:
[
'我的客户'
,
'我的门店'
,
'我的员工'
],
popupShow
:
false
,
popupShow
:
false
,
subIndex
:
-
1
,
subIndex
:
-
1
,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment