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 049fc3ee
authored
Aug 18, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
我的门店
1 parent
6ebf37b5
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
247 additions
and
5 deletions
pages/tab/outputValue/components/merchant/merchant.js
pages/tab/outputValue/components/merchant/merchant.json
pages/tab/outputValue/components/merchant/merchant.scss
pages/tab/outputValue/components/merchant/merchant.wxml
pages/tab/outputValue/index.wxs
pages/tab/outputValue/outputValue.json
pages/tab/outputValue/outputValue.wxml
pages/tab/outputValue/components/merchant/merchant.js
0 → 100644
View file @
049fc3e
// pages/tab/outputValue/components/merchant/merchant.js
import
{
IMG_URL
}
from
'~/utils/constantData'
import
outputApi
from
'~/api/outputApi/index'
Component
({
/**
* 组件的属性列表
*/
properties
:
{
},
/**
* 组件的初始数据
*/
data
:
{
IMG_URL
,
bgUrl
:
`
${
IMG_URL
}
/personal/empty_tran.png`
,
formData
:
{},
serviceName
:
'四川精手指鑫都汽车服务有限公司'
,
totalObj
:
{
scene1Total
:
'72536'
,
scene0Total
:
'76400'
,
scene3Total
:
'15486'
,
total
:
'164422'
},
// 1精品升级(太阳膜),3众筹,0会员权益)
// 服务商-多4s店
merchantList
:
[{
yearMonth
:
'2023年8月'
,
curMonthTotalData
:
{
scene1Total
:
'5986'
,
scene0Total
:
'76400'
,
scene3Total
:
'11000'
,
total
:
'19567'
},
merchantDataList
:
[{
merchantName
:
'四川申蓉汇亚汽车贸易有限公司'
,
curMonthTotalData
:
{
scene1Total
:
'5986'
,
scene0Total
:
'76400'
,
scene3Total
:
'11000'
,
total
:
'19567'
},
lastMonthTotalData
:
{
scene1Total
:
'51122'
,
scene0Total
:
'2355'
,
scene3Total
:
'65400'
,
total
:
'0'
}
},
{
merchantName
:
'四川港宏新通汽车销售服务有限公司'
,
curMonthTotalData
:
{
scene1Total
:
'960'
,
scene0Total
:
'0'
,
scene3Total
:
'0'
,
total
:
'960'
},
lastMonthTotalData
:
{
scene1Total
:
'123223'
,
scene0Total
:
'0'
,
scene3Total
:
'0'
,
total
:
'0'
}
}]
}]
},
lifetimes
:
{
attached
()
{
this
.
getMerchant
()
}
},
/**
* 组件的方法列表
*/
methods
:
{
getMerchant
(
isReset
=
false
)
{
let
{
userInfo
}
=
wx
.
$storage
.
get
()
let
params
=
{
partnerMerchantId
:
userInfo
.
subLoginUser
.
merchantId
}
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/merchant/merchant.json
0 → 100644
View file @
049fc3e
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
pages/tab/outputValue/components/merchant/merchant.scss
0 → 100644
View file @
049fc3e
/* pages/tab/outputValue/components/merchant/merchant.wxss */
.merchantCon
{
box-sizing
:
border-box
;
background-color
:
#fff
;
height
:
100%
;
padding
:
24rpx
16rpx
;
}
.merchant
{
box-sizing
:
border-box
;
color
:
#323436
;
// padding-top: 16rpx;
// background-color: #F2F3F7;
background-color
:
#FFFFFF
;
}
.merchant-content
{
margin
:
0
16rpx
;
}
.all-container
{
height
:
388rpx
;
background-image
:
url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/output/bg-merchant.png")
;
background-size
:
100%
100%
;
.name
{
display
:
flex
;
align-items
:
center
;
height
:
80rpx
;
font-weight
:
600
;
font-size
:
28rpx
;
color
:
#323436
;
padding
:
0
24rpx
;
.tips
{
width
:
84rpx
;
height
:
28rpx
;
font-size
:
20rpx
;
text-align
:
center
;
color
:
#3666FE
;
background
:
#3666fe
1a
;
border-radius
:
5rpx
;
margin-left
:
8rpx
;
}
}
}
.end-txt
{
font-size
:
24rpx
;
text-align
:
center
;
color
:
#CCCED1
;
padding-bottom
:
60rpx
;
}
\ No newline at end of file
pages/tab/outputValue/components/merchant/merchant.wxml
0 → 100644
View file @
049fc3e
<!--pages/tab/outputValue/components/merchant/merchant.wxml-->
<wxs src="/pages/tab/outputValue/index.wxs" module="filter" />
<view class="merchantCon">
<scroll-view class="merchant" id="scroller" scroll-y="{{true}}" refresher-enabled="{{true}}" refresher-triggered="{{triggered}}" bindrefresherrefresh="handleSearch" lower-threshold='50' scroll-top="{{busiScrollTop}}">
<view wx:for="{{merchantList}}" wx:key="index" class="merchant-content">
<!-- 全部 -->
<view class="all-container">
<view class="name">
{{serviceName}}
<view class="tips">服务商</view>
</view>
<view>
<view>总产值</view>
<view>¥{{filter.money_three_for_two_thousands(totalObj.total)}}</view>
</view>
<view>
</view>
</view>
</view>
<view wx:if="{{!merchantList.length}}" class="end-txt">
<nothing-tips tips="暂无数据~" bgColor="{{'#FFFFFF'}}" bg="{{bgUrl}}" />
</view>
<view wx:else class="end-txt">
<view>到底啦~</view>
</view>
</scroll-view>
</view>
\ No newline at end of file
pages/tab/outputValue/index.wxs
0 → 100644
View file @
049fc3e
/**设置千分位 */
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 //暴露接口调用
}
pages/tab/outputValue/outputValue.json
View file @
049fc3e
...
...
@@ -2,7 +2,8 @@
"usingComponents"
:
{
"navigation-bar"
:
"../../../components/NavigationBar/NavigationBar"
,
"tab"
:
"./components/Tab/Tab"
,
"screen-box"
:
"./components/ScreenBox/ScreenBox"
"screen-box"
:
"./components/ScreenBox/ScreenBox"
,
"merchant"
:
"./components/merchant/merchant"
},
"navigationStyle"
:
"custom"
}
pages/tab/outputValue/outputValue.wxml
View file @
049fc3e
...
...
@@ -14,10 +14,10 @@
</block>
</navigation-bar>
<view class="layout" style="padding-top:calc({{tabBarStyle}}px + 88rpx);">
<!-- 我的
客户
-->
<
!-- <
view class="comCom" hidden="{{tabIndx != 0}}">
<
client id="clie
nt" />
</view>
-->
<!-- 我的
门店
-->
<view class="comCom" hidden="{{tabIndx != 0}}">
<
merchant id="mercha
nt" />
</view>
<!-- 我的员工 -->
<!-- <view class="comCom" hidden="{{tabIndx != 1}}">
<staff id="staff" />
...
...
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