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 40ec4276
authored
Aug 23, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
看产值-全部,指定场景
1 parent
93233a2f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
23 deletions
api/outputValueApi/outputValue.js
pages/tab/outputValue/components/merchant/merchant.js
pages/tab/outputValue/components/merchantCom/merchantAll/merchantAll.js
api/outputValueApi/outputValue.js
View file @
40ec427
...
@@ -15,5 +15,26 @@ class outputValueApi {
...
@@ -15,5 +15,26 @@ class outputValueApi {
...
data
...
data
})
})
}
}
/** 获取服务商(生意助手看产值)全场景我的门店数据 */
getAllSceneList
(
data
)
{
return
api
.
post
({
method
:
'scrm.api.boutiquecoupon.partnermerchantTotal.allSceneShopList'
,
...
data
})
}
/** 获取服务商(生意助手看产值)我的门店页总累计产值 */
getMerchantTotal
(
data
)
{
return
api
.
post
({
method
:
'scrm.api.boutiquecoupon.partnermerchantTotal.getMerchantTotal'
,
...
data
})
}
/** 获取服务商(生意助手看产值)指定场景我的门店数据 */
getQuerySceneList
(
data
)
{
return
api
.
post
({
method
:
'scrm.api.boutiquecoupon.partnermerchantTotal.querySceneShopList'
,
...
data
})
}
}
}
export
default
outputValueApi
export
default
outputValueApi
pages/tab/outputValue/components/merchant/merchant.js
View file @
40ec427
// pages/tab/outputValue/components/merchant/merchant.js
// pages/tab/outputValue/components/merchant/merchant.js
import
{
IMG_URL
}
from
'~/utils/constantData'
import
{
IMG_URL
}
from
'~/utils/constantData'
import
outputApi
from
'~/api/outputApi/index'
// import outputApi from '~/api/outputApi/index'
import
outputValueApi
from
'~/api/outputValueApi/index'
Component
({
Component
({
/**
/**
* 组件的属性列表
* 组件的属性列表
...
@@ -35,6 +36,10 @@ Component({
...
@@ -35,6 +36,10 @@ Component({
formData
:
{},
formData
:
{},
serviceName
:
''
,
serviceName
:
''
,
totalObj
:
{},
totalObj
:
{},
pageCof
:
{
startYearMonth
:
''
,
endYearMonth
:
''
},
// totalObj: {
// totalObj: {
// scene1Total: '72536',
// scene1Total: '72536',
// scene0Total: '76400',
// scene0Total: '76400',
...
@@ -205,40 +210,69 @@ Component({
...
@@ -205,40 +210,69 @@ Component({
// })
// })
// },
// },
merchantRefresh
(
isReset
=
false
)
{
merchantRefresh
(
isReset
=
false
)
{
// wx.showLoading()
this
.
getTotal
()
this
.
getTotal
()
this
.
getMerchantList
(
isReset
)
this
.
getMerchantList
(
isReset
)
},
},
getTotal
()
{
getTotal
()
{
let
{
searchForm
}
=
this
.
data
let
params
=
{
merchantId
:
searchForm
.
shopMerchantIds
.
length
?
searchForm
.
shopMerchantIds
[
0
]
:
''
}
outputValueApi
.
getMerchantTotal
(
params
).
then
(
res
=>
{
this
.
setData
({
totalObj
:
res
||
{}
})
})
},
// month作为分页参数
dealMonth
(
isReset
=
false
,
monthInterval
=
2
)
{
let
{
startTime
,
endTime
}
=
this
.
data
.
searchForm
let
{
startYearMonth
,
endYearMonth
}
=
this
.
data
.
pageCof
// 起始为空
if
(
!
startTime
&&
!
endTime
)
{
// 获取当前日期
var
_currentDate
=
new
Date
()
// 获取前n个月的日期
var
_endMonthDate
=
new
Date
()
_endMonthDate
.
setMonth
(
_currentDate
.
getMonth
()
-
monthInterval
)
var
_startMonthDate
=
new
Date
()
_startMonthDate
.
setMonth
(
isReset
?
_currentDate
.
getMonth
()
-
monthInterval
:
_endMonthDate
.
getMonth
()
-
monthInterval
)
endYearMonth
=
isReset
?
_currentDate
.
format
(
'yyyy-MM'
)
:
_endMonthDate
.
format
(
'yyyy-MM'
)
startYearMonth
=
_startMonthDate
.
format
(
'yyyy-MM'
)
}
this
.
setData
({
[
'pageCof.startYearMonth'
]:
startYearMonth
,
[
'pageCof.endYearMonth'
]:
endYearMonth
})
},
},
getMerchantList
(
isReset
=
false
)
{
getMerchantList
(
isReset
=
false
)
{
let
{
userInfo
}
=
wx
.
$storage
.
get
()
let
{
userInfo
}
=
wx
.
$storage
.
get
()
console
.
log
(
this
.
data
.
searchForm
,
'searchForm---'
)
let
{
searchForm
,
merchantList
}
=
this
.
data
let
{
searchForm
}
=
this
.
data
this
.
setData
({
this
.
setData
({
serviceName
:
userInfo
.
subLoginUser
.
merchantName
serviceName
:
userInfo
.
subLoginUser
.
merchantName
})
})
this
.
dealMonth
(
isReset
)
let
params
=
{
let
params
=
{
partnerMerchantId
:
userInfo
.
subLoginUser
.
merchantId
,
partnerMerchantId
:
userInfo
.
subLoginUser
.
merchantId
,
merchantId
:
searchForm
.
shopMerchantIds
.
length
?
searchForm
.
shopMerchantIds
[
0
]
:
''
merchantId
:
searchForm
.
shopMerchantIds
.
length
?
searchForm
.
shopMerchantIds
[
0
]
:
''
,
sceneType
:
searchForm
.
sceneType
,
...
this
.
data
.
pageCof
}
console
.
log
(
params
)
const
paiName
=
searchForm
.
sceneType
?
'getQuerySceneList'
:
'getAllSceneList'
outputValueApi
[
paiName
](
params
).
then
(
res
=>
{
console
.
log
(
res
,
'res---'
)
this
.
setData
({
merchantList
:
isReset
?
(
res
||
[])
:
merchantList
.
push
(
res
||
[])
})
if
(
isReset
)
{
this
.
setData
({
busiScrollTop
:
0
})
}
})
}
}
// outputApi.getStaffList(params).then(res => {
// if (isReset) {
// this.setData({
// busiScrollTop: 0
// })
// }
// this.setData({
// triggered: false
// })
// // let _list = []
// // _list = res || []
// // this.setData({
// // merchantList: _list
// // })
// })
},
}
}
})
})
pages/tab/outputValue/components/merchantCom/merchantAll/merchantAll.js
View file @
40ec427
...
@@ -9,7 +9,10 @@ Component({
...
@@ -9,7 +9,10 @@ Component({
type
:
Object
,
type
:
Object
,
value
:
()
=>
{
},
value
:
()
=>
{
},
observer
(
n
)
{
observer
(
n
)
{
n
&&
this
.
dealCompare
()
if
(
n
)
{
this
.
dealYearMonth
()
this
.
dealCompare
()
}
}
}
}
}
},
},
...
@@ -27,6 +30,9 @@ Component({
...
@@ -27,6 +30,9 @@ Component({
* 组件的方法列表
* 组件的方法列表
*/
*/
methods
:
{
methods
:
{
dealYearMonth
()
{
let
{
merchantDataList
}
=
this
.
data
.
curInfo
},
dealCompare
()
{
dealCompare
()
{
let
{
merchantDataList
}
=
this
.
data
.
curInfo
let
{
merchantDataList
}
=
this
.
data
.
curInfo
let
list
=
[]
let
list
=
[]
...
...
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