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 e4f245d8
authored
Aug 23, 2023
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
联调修改
1 parent
40ec4276
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
71 additions
and
56 deletions
components/Popup/Popup.js
components/Popup/Popup.wxml
packageMine/components/staffTypePopup/staffTypePopup.js
packageMine/components/staffTypePopup/staffTypePopup.wxml
packageMine/pages/staffManage/createStaff/constant/data.js
packageMine/pages/staffManage/createStaff/createStaff.js
packageMine/pages/staffManage/index.wxs
packageMine/pages/staffManage/staffList/staffList.js
packageMine/pages/staffManage/staffList/staffList.scss
packageMine/pages/staffManage/staffList/staffList.wxml
pages/tab/outputValue/components/CommissionPopup/CommissionPopup.scss
pages/tab/outputValue/components/CommissionPopup/CommissionPopup.wxml
pages/tab/outputValue/components/ScreenBox/ScreenBox.js
pages/tab/outputValue/components/ScreenBox/ScreenBox.wxml
pages/tab/outputValue/components/ScreenConfirmBox/ScreenConfirmBox.js
pages/tab/outputValue/components/ScreenConfirmBox/ScreenConfirmBox.wxml
pages/tab/outputValue/components/SwitchAccountPopup/SwitchAccountPopup.js
pages/tab/outputValue/components/SwitchAccountPopup/SwitchAccountPopup.wxml
pages/tab/outputValue/components/employees/employess.wxml
pages/tab/outputValue/components/selectMerchantPopup/selectMerchantPopup.js
pages/tab/outputValue/components/selectMerchantPopup/selectMerchantPopup.wxml
components/Popup/Popup.js
View file @
e4f245d
...
@@ -19,11 +19,11 @@ Component({
...
@@ -19,11 +19,11 @@ Component({
})
})
},
0.2
*
1000
)
},
0.2
*
1000
)
}
else
{
}
else
{
//
let hideTab = wx.$hideTab
let
hideTab
=
wx
.
$hideTab
this
.
setData
({
this
.
setData
({
showPopup
:
true
,
showPopup
:
true
,
close
:
false
,
close
:
false
,
//
hideTab
hideTab
})
})
}
}
}
}
...
@@ -37,9 +37,9 @@ Component({
...
@@ -37,9 +37,9 @@ Component({
type
:
Boolean
,
type
:
Boolean
,
value
:
true
value
:
true
},
},
h
ideTab
:
Boolean
,
customH
ideTab
:
Boolean
,
i
sTab
:
Boolean
,
customI
sTab
:
Boolean
,
p
opupSlotStyle
:
String
customP
opupSlotStyle
:
String
},
},
/**
/**
...
@@ -65,9 +65,10 @@ Component({
...
@@ -65,9 +65,10 @@ Component({
}
}
},
},
attached
()
{
attached
()
{
// const { isTab } = wx.$router.getRouterList().find(item => item.url === `/${wx.$router.getPageInstance().route}`)
const
{
isTab
}
=
wx
.
$router
.
getRouterList
().
find
(
item
=>
item
.
url
===
`/
${
wx
.
$router
.
getPageInstance
().
route
}
`
)
// this.setData({
this
.
setData
({
// isTab
isTab
// })
})
console
.
log
(
isTab
)
}
}
})
})
components/Popup/Popup.wxml
View file @
e4f245d
...
@@ -4,14 +4,14 @@
...
@@ -4,14 +4,14 @@
<block wx:if="{{title}}">
<block wx:if="{{title}}">
<view class="popup-title text-center">{{title}}</view>
<view class="popup-title text-center">{{title}}</view>
</block>
</block>
<view class="popup-slot {{
isTab && !hideTab? '': title?'isFullSucreen':'isFullSucreen-notitle'}}" style="{{p
opupSlotStyle}}">
<view class="popup-slot {{
(isTab || customIsTab) && (!hideTab || !customHideTab) ? '': title?'isFullSucreen':'isFullSucreen-notitle'}}" style="{{customP
opupSlotStyle}}">
<slot></slot>
<slot></slot>
</view>
</view>
<view class="popup-footer {{
isTab && !hideTab
?'':'isFullSucreen'}}" wx:if="{{only}}">
<view class="popup-footer {{
(isTab || customIsTab) && (!hideTab || !customHideTab)
?'':'isFullSucreen'}}" wx:if="{{only}}">
<view class="cancel btn text-center" bindtap="hidePopup">取消</view>
<view class="cancel btn text-center" bindtap="hidePopup">取消</view>
<view class="confirm btn text-center" bindtap="confirm">确认</view>
<view class="confirm btn text-center" bindtap="confirm">确认</view>
</view>
</view>
<view class="popup-footer {{
isTab && !hideTabb
?'':'isFullSucreen'}}" wx:else>
<view class="popup-footer {{
(isTab || customIsTab) && (!hideTab || !customHideTab)
?'':'isFullSucreen'}}" wx:else>
<view class="confirm doubtn text-center" bindtap="confirm">确认</view>
<view class="confirm doubtn text-center" bindtap="confirm">确认</view>
</view>
</view>
</view>
</view>
...
...
packageMine/components/staffTypePopup/staffTypePopup.js
View file @
e4f245d
...
@@ -7,6 +7,7 @@ Component({
...
@@ -7,6 +7,7 @@ Component({
selectInfo
:
{
selectInfo
:
{
type
:
Object
,
type
:
Object
,
observer
:
function
(
n
)
{
observer
:
function
(
n
)
{
console
.
log
(
n
)
this
.
setData
({
this
.
setData
({
copySelectInfo
:
n
copySelectInfo
:
n
})
})
...
@@ -18,7 +19,7 @@ Component({
...
@@ -18,7 +19,7 @@ Component({
if
(
n
)
{
if
(
n
)
{
let
{
staffTypeList
,
notAll
}
=
this
.
data
let
{
staffTypeList
,
notAll
}
=
this
.
data
if
(
notAll
)
{
if
(
notAll
)
{
let
index
=
staffTypeList
.
findIndex
(
v
=>
v
.
staffType
==
''
)
let
index
=
staffTypeList
.
findIndex
(
v
=>
v
.
staff
Business
Type
==
''
)
if
(
index
>
-
1
)
staffTypeList
.
splice
(
index
,
1
)
if
(
index
>
-
1
)
staffTypeList
.
splice
(
index
,
1
)
this
.
setData
({
this
.
setData
({
staffTypeList
staffTypeList
...
@@ -36,16 +37,16 @@ Component({
...
@@ -36,16 +37,16 @@ Component({
data
:
{
data
:
{
staffTypeList
:
[
staffTypeList
:
[
{
{
staffType
:
''
,
staff
Business
Type
:
''
,
staffTypeStr
:
'全部'
staff
Business
TypeStr
:
'全部'
},
},
{
{
staffType
:
'0'
,
staff
Business
Type
:
'0'
,
staffTypeStr
:
'驻店'
staff
Business
TypeStr
:
'驻店'
},
},
{
{
staffType
:
'1'
,
staff
Business
Type
:
'1'
,
staffTypeStr
:
'技师'
staff
Business
TypeStr
:
'技师'
}
}
],
],
copySelectInfo
:
{}
copySelectInfo
:
{}
...
...
packageMine/components/staffTypePopup/staffTypePopup.wxml
View file @
e4f245d
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
height="500rpx">
height="500rpx">
<block wx:for="{{staffTypeList}}" wx:key="index">
<block wx:for="{{staffTypeList}}" wx:key="index">
<view
<view
class="itemCon text-hide {{item.staff
Type == copySelectInfo.staff
Type?'active':''}}"
class="itemCon text-hide {{item.staff
BusinessType == copySelectInfo.staffBusiness
Type?'active':''}}"
data-target="{{item}}"
data-target="{{item}}"
bindtap="select">
bindtap="select">
{{item.staffTypeStr}}
{{item.staff
Business
TypeStr}}
</view>
</view>
</block>
</block>
</popup>
</popup>
packageMine/pages/staffManage/createStaff/constant/data.js
View file @
e4f245d
const
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
const
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
const
formRule
=
{
const
formRule
=
{
selectInfo
:
[{
required
:
true
,
message
:
'所属服务中心不能为空'
}],
selectInfo
:
[{
required
:
true
,
message
:
'所属服务中心不能为空'
}],
staffType
:
[{
required
:
true
,
message
:
'员工类型不能为空'
}],
staff
Business
Type
:
[{
required
:
true
,
message
:
'员工类型不能为空'
}],
staffName
:
[{
required
:
true
,
message
:
'员工姓名不能为空'
}],
staffName
:
[{
required
:
true
,
message
:
'员工姓名不能为空'
}],
staffPhone
:
[
staffPhone
:
[
{
required
:
true
,
message
:
'手机号码不能为空'
},
{
required
:
true
,
message
:
'手机号码不能为空'
},
...
@@ -22,8 +22,8 @@ const formItems = [{
...
@@ -22,8 +22,8 @@ const formItems = [{
pageType
:
1
pageType
:
1
},
{
},
{
label
:
'员工类型'
,
label
:
'员工类型'
,
props
:
'staffType'
,
props
:
'staff
Business
Type'
,
valueFn
:
'staffTypeStr'
,
valueFn
:
'staff
Business
TypeStr'
,
type
:
'select'
,
type
:
'select'
,
placeholder
:
'请选择员工类型'
,
placeholder
:
'请选择员工类型'
,
pageType
:
3
pageType
:
3
...
...
packageMine/pages/staffManage/createStaff/createStaff.js
View file @
e4f245d
...
@@ -52,12 +52,12 @@ Page({
...
@@ -52,12 +52,12 @@ Page({
let
optionsInfo
=
options
?.
info
||
{}
let
optionsInfo
=
options
?.
info
||
{}
let
data
=
options
?.
info
?
{
let
data
=
options
?.
info
?
{
...
options
?.
info
,
...
options
?.
info
,
selectInfo
:
{
yqMerchantId
:
optionsInfo
.
merchantNo
,
yqMerchantName
:
optionsInfo
.
merchantName
},
selectInfo
:
{
yqMerchantId
:
optionsInfo
.
merchantNo
,
yqMerchantName
:
optionsInfo
.
merchantName
,
staffBusinessType
:
optionsInfo
?.
staffBusinessType
},
serviceValue
:
optionsInfo
.
merchantName
,
serviceValue
:
optionsInfo
.
merchantName
,
visualType
:
optionsInfo
.
visualType
||
0
,
visualType
:
optionsInfo
.
visualType
||
0
,
connectionValue
:
optionsInfo
.
visualType
==
1
?
`已选
${
optionsInfo
.
visibleMerchantNo
?.
split
(
','
)?.
length
}
位客户
`: '全部',
connectionValue
:
optionsInfo
.
visualType
==
1
?
`已选
${
optionsInfo
.
visibleMerchantNo
?.
split
(
','
)?.
length
}
位客户
`: '全部',
selectedConnectionIds: optionsInfo.visualType == 1 ? optionsInfo.visibleMerchantNo?.split(',').map((v) => {return v && Number(v)}) : [],
selectedConnectionIds: optionsInfo.visualType == 1 ? optionsInfo.visibleMerchantNo?.split(',').map((v) => {return v && Number(v)}) : [],
staff
TypeStr: optionsInfo.staffType == 0 ? '驻店' : optionsInfo.staff
Type == 1 ? '技师' : ''
staff
BusinessTypeStr: optionsInfo.staffBusinessType == 0 ? '驻店' : optionsInfo.staffBusiness
Type == 1 ? '技师' : ''
} : {}
} : {}
this.setData({
this.setData({
addOrEdit: options?.info ? 'edit' : 'add',
addOrEdit: options?.info ? 'edit' : 'add',
...
@@ -133,7 +133,7 @@ Page({
...
@@ -133,7 +133,7 @@ Page({
this.hiddenSelectConfirm()
this.hiddenSelectConfirm()
break
break
case 2:
case 2:
if (!formData
.selectInfo
) return wx.$api.showToast('请先选择所属服务中心')
if (!formData
?.selectInfo?.yqMerchantId
) return wx.$api.showToast('请先选择所属服务中心')
wx.$router.go('packageMine.selectConnectionPage', this.data.formData)
wx.$router.go('packageMine.selectConnectionPage', this.data.formData)
break
break
case 3:
case 3:
...
@@ -164,7 +164,11 @@ Page({
...
@@ -164,7 +164,11 @@ Page({
},
},
hiddenSelectConfirm(e) {
hiddenSelectConfirm(e) {
let selectInfo = e?.detail
let { formData } = this.data
let selectInfo = {
...formData.selectInfo,
...e?.detail
}
this.setData({ showServiceConfirm: !this.data.showServiceConfirm })
this.setData({ showServiceConfirm: !this.data.showServiceConfirm })
if (!selectInfo) return
if (!selectInfo) return
this.setData({
this.setData({
...
@@ -204,7 +208,7 @@ Page({
...
@@ -204,7 +208,7 @@ Page({
createdSource: 3, // 创建来源 固定3 生意助手
createdSource: 3, // 创建来源 固定3 生意助手
visualType: formData?.visualType,
visualType: formData?.visualType,
visibleMerchantNoList: formData?.visualType == 0 ? undefined : formData?.selectedConnectionIds, // 全部 无需传可见客户数据
visibleMerchantNoList: formData?.visualType == 0 ? undefined : formData?.selectedConnectionIds, // 全部 无需传可见客户数据
staffType: Number(formData?.staffType)
staffType: Number(formData?.staff
Business
Type)
}
}
let message = addOrEdit == 'add' ? '是否确定创建员工?' : '是否确定修改员工信息?'
let message = addOrEdit == 'add' ? '是否确定创建员工?' : '是否确定修改员工信息?'
wx.showModal({
wx.showModal({
...
...
packageMine/pages/staffManage/index.wxs
View file @
e4f245d
...
@@ -3,7 +3,8 @@ var formatMobile = function (item) {
...
@@ -3,7 +3,8 @@ var formatMobile = function (item) {
}
}
var filterType = function (item) {
var filterType = function (item) {
return ['驻店', '员工'][item.type] || ''
console.log(item, '123123')
return ['驻店', '技师'][item] || ''
}
}
module.exports = {
module.exports = {
...
...
packageMine/pages/staffManage/staffList/staffList.js
View file @
e4f245d
...
@@ -11,7 +11,7 @@ Page({
...
@@ -11,7 +11,7 @@ Page({
bgUrl
:
`
${
IMG_URL
}
/personal/empty_tran.png`
,
bgUrl
:
`
${
IMG_URL
}
/personal/empty_tran.png`
,
popupShow
:
false
,
popupShow
:
false
,
staffList
:
[],
staffList
:
[],
selectInfo
:
{
yqMerchantName
:
'全部服务中心'
,
staff
TypeStr
:
'全部员工类型'
,
staff
Type
:
''
},
selectInfo
:
{
yqMerchantName
:
'全部服务中心'
,
staff
BusinessTypeStr
:
'全部员工类型'
,
staffBusiness
Type
:
''
},
total
:
0
,
total
:
0
,
serviceList
:
[],
serviceList
:
[],
currentPage
:
1
,
currentPage
:
1
,
...
@@ -62,7 +62,7 @@ Page({
...
@@ -62,7 +62,7 @@ Page({
pageSize
:
10
,
pageSize
:
10
,
pageNum
:
currentPage
,
pageNum
:
currentPage
,
merchantNoList
:
selectInfo
?.
yqMerchantId
?
[
selectInfo
?.
yqMerchantId
]
:
allServiceIds
,
merchantNoList
:
selectInfo
?.
yqMerchantId
?
[
selectInfo
?.
yqMerchantId
]
:
allServiceIds
,
staff
Type
:
selectInfo
.
staff
Type
staff
BusinessType
:
selectInfo
.
staffBusiness
Type
}
}
if
(
nothing
||
isAsk
)
{
if
(
nothing
||
isAsk
)
{
return
return
...
@@ -71,9 +71,6 @@ Page({
...
@@ -71,9 +71,6 @@ Page({
isAsk
:
true
isAsk
:
true
})
})
mineApi
.
getStaffListAPI
(
params
).
then
(
res
=>
{
mineApi
.
getStaffListAPI
(
params
).
then
(
res
=>
{
res
?.
list
?.
forEach
(
val
=>
{
val
.
staffTypeStr
=
val
.
staffType
==
0
?
'驻店'
:
'技师'
})
let
tempList
=
isReset
?
res
?.
list
||
[]
:
this
.
data
.
staffList
.
concat
(
res
?.
list
||
[])
let
tempList
=
isReset
?
res
?.
list
||
[]
:
this
.
data
.
staffList
.
concat
(
res
?.
list
||
[])
this
.
setData
({
this
.
setData
({
staffList
:
tempList
,
staffList
:
tempList
,
...
@@ -125,8 +122,8 @@ Page({
...
@@ -125,8 +122,8 @@ Page({
getStaffList
(
e
)
{
getStaffList
(
e
)
{
wx
.
$api
.
hideLoading
()
wx
.
$api
.
hideLoading
()
let
{
selectInfo
}
=
this
.
data
let
{
selectInfo
}
=
this
.
data
let
{
staff
Type
,
staff
TypeStr
}
=
e
.
detail
let
{
staff
BusinessType
,
staffBusiness
TypeStr
}
=
e
.
detail
if
(
staff
Type
==
''
&&
staffTypeStr
==
'全部'
)
e
.
detail
.
staff
TypeStr
=
'全部员工类型'
if
(
staff
BusinessType
==
''
&&
staffBusinessTypeStr
==
'全部'
)
e
.
detail
.
staffBusiness
TypeStr
=
'全部员工类型'
let
obj
=
{
let
obj
=
{
...
selectInfo
,
...
selectInfo
,
...
e
.
detail
...
e
.
detail
...
...
packageMine/pages/staffManage/staffList/staffList.scss
View file @
e4f245d
...
@@ -101,6 +101,7 @@
...
@@ -101,6 +101,7 @@
background
:
#F1F3F9
;
background
:
#F1F3F9
;
border
:
2rpx
solid
#FFFFFF
;
border
:
2rpx
solid
#FFFFFF
;
border-radius
:
8rpx
;
border-radius
:
8rpx
;
padding
:
0
8rpx
;
font-size
:
22rpx
;
font-size
:
22rpx
;
margin-left
:
16rpx
;
margin-left
:
16rpx
;
color
:
#6B7384
;
color
:
#6B7384
;
...
...
packageMine/pages/staffManage/staffList/staffList.wxml
View file @
e4f245d
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<view class="select-box">
<view class="select-box">
<view class="select-btn">
<view class="select-btn">
<view class="type" bindtap="handleStaffTypeChange">
<view class="type" bindtap="handleStaffTypeChange">
<text>{{selectInfo.staffTypeStr}}</text>
<text>{{selectInfo.staff
Business
TypeStr}}</text>
<glsx-image class="point" src="index/point.png" />
<glsx-image class="point" src="index/point.png" />
</view>
</view>
</view>
</view>
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
<glsx-image wx:if="{{!item.weChatAvatarUrl}}" src="personal/staff_defalut_avatar.png" class="avatar"/>
<glsx-image wx:if="{{!item.weChatAvatarUrl}}" src="personal/staff_defalut_avatar.png" class="avatar"/>
<image wx:else src="{{item.weChatAvatarUrl}}" class="avatar"></image>
<image wx:else src="{{item.weChatAvatarUrl}}" class="avatar"></image>
<view class="message-text">
<view class="message-text">
<view class="name"><text>{{item.staffName}}</text><text
wx:if="{{item.staffTypeStr}}" class="type_tips">{{filter.filterType(item.staffTypeStr
)}}</text></view>
<view class="name"><text>{{item.staffName}}</text><text
class="type_tips" wx:if="{{format.filterType(item.staffBusinessType)}}">{{format.filterType(item.staffBusinessType
)}}</text></view>
<view class="mobile">{{format.formatMobile(item.staffPhone)}}</view>
<view class="mobile">{{format.formatMobile(item.staffPhone)}}</view>
</view>
</view>
</view>
</view>
...
...
pages/tab/outputValue/components/CommissionPopup/CommissionPopup.scss
View file @
e4f245d
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
padding
:
0
32rpx
;
padding
:
0
32rpx
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
font-size
:
28rpx
;
font-size
:
28rpx
;
height
:
calc
(
100%
-
2
00rpx
);
height
:
calc
(
100%
-
1
00rpx
);
.month_item
{
.month_item
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
...
pages/tab/outputValue/components/CommissionPopup/CommissionPopup.wxml
View file @
e4f245d
...
@@ -6,8 +6,8 @@
...
@@ -6,8 +6,8 @@
bindconfirm="confirm"
bindconfirm="confirm"
height="60%"
height="60%"
title="员工提成"
title="员工提成"
i
sTab="{{true}}"
customI
sTab="{{true}}"
p
opupSlotStyle="height: calc(100% - 200rpx)">
customP
opupSlotStyle="height: calc(100% - 200rpx)">
<!-- 服务多家门店不显示门店名称 -->
<!-- 服务多家门店不显示门店名称 -->
<view class="title_tips">
<view class="title_tips">
<view decode="{{true}}" class="merchant_text" wx:if="{{(handleCommissionObj.constructionStats && handleCommissionObj.constructionStats.length == 1) || (handleCommissionObj.outputValueStats && handleCommissionObj.outputValueStats.length == 1)}}">
<view decode="{{true}}" class="merchant_text" wx:if="{{(handleCommissionObj.constructionStats && handleCommissionObj.constructionStats.length == 1) || (handleCommissionObj.outputValueStats && handleCommissionObj.outputValueStats.length == 1)}}">
...
...
pages/tab/outputValue/components/ScreenBox/ScreenBox.js
View file @
e4f245d
...
@@ -37,6 +37,10 @@ Component({
...
@@ -37,6 +37,10 @@ Component({
screenFlag
:
true
screenFlag
:
true
})
})
},
},
// 超管切换服务商
hanbleChangeService
()
{
this
.
getMerchantList
()
},
// 选择门店
// 选择门店
handleSlectMerchant
()
{
handleSlectMerchant
()
{
this
.
setData
({
this
.
setData
({
...
...
pages/tab/outputValue/components/ScreenBox/ScreenBox.wxml
View file @
e4f245d
...
@@ -10,6 +10,6 @@
...
@@ -10,6 +10,6 @@
</view>
</view>
</view>
</view>
<!-- 选择门店 -->
<!-- 选择门店 -->
<select-merchant-popup wx:if="{{popupShow}}" bind:hidePopup="handleSlectMerchant" bindmerchantConfirm="handleMerchantChange" selectInfo="{{formData}}" popShow="{{popupShow}}" merchantRange="{{merchantList}}"
isTab="{{true}}"
/>
<select-merchant-popup wx:if="{{popupShow}}" bind:hidePopup="handleSlectMerchant" bindmerchantConfirm="handleMerchantChange" selectInfo="{{formData}}" popShow="{{popupShow}}" merchantRange="{{merchantList}}"/>
<!-- 筛选 -->
<!-- 筛选 -->
<screen-confirm-box wx:if="{{pageLoaded}}" bindscreenFlag="handleScreenFlag" tabBarStyle="{{tabBarStyle}}" show="{{confirmShow}}" userInfo="{{userInfo}}" formData="{{formData}}" tabType="{{tabType}}"></screen-confirm-box>
\ No newline at end of file
\ No newline at end of file
<screen-confirm-box wx:if="{{pageLoaded}}" bindscreenFlag="handleScreenFlag" tabBarStyle="{{tabBarStyle}}" show="{{confirmShow}}" userInfo="{{userInfo}}" formData="{{formData}}" tabType="{{tabType}}" bindchangeService="hanbleChangeService"></screen-confirm-box>
\ No newline at end of file
\ No newline at end of file
pages/tab/outputValue/components/ScreenConfirmBox/ScreenConfirmBox.js
View file @
e4f245d
...
@@ -87,7 +87,7 @@ Component({
...
@@ -87,7 +87,7 @@ Component({
})
})
.
catch
(
err
=>
{
})
.
catch
(
err
=>
{
})
}
else
{
}
else
{
let
merchantRange
=
[{
merchantId
:
userInfo
.
subLoginUser
.
merchantId
,
merchantName
:
userInfo
.
subLoginUser
.
merchantName
}]
let
merchantRange
=
[{
merchantId
:
userInfo
?.
subLoginUser
?.
merchantId
,
merchantName
:
userInfo
?.
subLoginUser
?
.
merchantName
}]
this
.
setData
({
this
.
setData
({
merchantRange
merchantRange
})
})
...
@@ -96,6 +96,7 @@ Component({
...
@@ -96,6 +96,7 @@ Component({
changeMerchantRange
(
e
)
{
changeMerchantRange
(
e
)
{
let
{
merchantRange
,
subIndex
,
formData
}
=
this
.
data
let
{
merchantRange
,
subIndex
,
formData
}
=
this
.
data
let
{
merchantId
}
=
e
.
detail
let
{
merchantId
}
=
e
.
detail
this
.
reset
()
merchantRange
.
forEach
((
item
,
index
)
=>
{
merchantRange
.
forEach
((
item
,
index
)
=>
{
item
.
show
=
true
item
.
show
=
true
if
(
item
.
merchantId
==
merchantId
)
{
if
(
item
.
merchantId
==
merchantId
)
{
...
@@ -104,12 +105,13 @@ Component({
...
@@ -104,12 +105,13 @@ Component({
}
}
})
})
formData
.
partnerMerchantIds
=
[
merchantId
]
formData
.
partnerMerchantIds
=
[
merchantId
]
if
(
!
this
.
data
.
formData
.
startTime
||
!
this
.
data
.
formData
.
endTime
)
this
.
setDate
()
// 未选择时间默认展示当前月份
this
.
setData
({
this
.
setData
({
merchantRange
,
merchantRange
,
subIndex
,
subIndex
,
formData
formData
})
})
if
(
this
.
data
.
tabType
==
1
&&
merchantId
!==
userInfo
?.
subLoginUser
?.
merchantId
)
this
.
getStaffList
()
this
.
getStaffList
()
this
.
servicePicker
()
this
.
servicePicker
()
},
},
// 服务商切换
// 服务商切换
...
@@ -154,7 +156,11 @@ Component({
...
@@ -154,7 +156,11 @@ Component({
// 员工数据
// 员工数据
getStaffList
()
{
getStaffList
()
{
let
{
partnerMerchantIds
}
=
this
.
data
.
formData
let
{
partnerMerchantIds
}
=
this
.
data
.
formData
outputValueApi
.
GETALLSTAFFDATAAPI
({
partnerMerchantId
:
partnerMerchantIds
[
0
]}).
then
(
res
=>
{
let
{
userInfo
}
=
this
.
data
let
params
=
{
partnerMerchantIds
:
partnerMerchantIds
.
length
?
partnerMerchantIds
:
userInfo
?.
subLoginUser
?.
merchantId
}
outputValueApi
.
GETALLSTAFFDATAAPI
(
params
).
then
(
res
=>
{
let
arr
=
res
||
[]
let
arr
=
res
||
[]
if
(
!
arr
?.
length
||
arr
[
0
]?.
staffName
!==
'全部'
)
{
if
(
!
arr
?.
length
||
arr
[
0
]?.
staffName
!==
'全部'
)
{
arr
.
unshift
({
arr
.
unshift
({
...
@@ -216,6 +222,8 @@ Component({
...
@@ -216,6 +222,8 @@ Component({
// 切换服务商 清空已选的门店
// 切换服务商 清空已选的门店
formData
.
shopMerchantIds
=
[]
formData
.
shopMerchantIds
=
[]
formData
.
shopMerchantNames
=
'全部门店'
formData
.
shopMerchantNames
=
'全部门店'
// 获取服务商下门店
this
.
triggerEvent
(
'changeService'
)
thisPage
.
setData
({
thisPage
.
setData
({
screenFormData
:
formData
,
screenFormData
:
formData
,
})
})
...
@@ -245,7 +253,7 @@ Component({
...
@@ -245,7 +253,7 @@ Component({
}
}
merchantRange
.
forEach
((
item
,
index
)
=>
{
merchantRange
.
forEach
((
item
,
index
)
=>
{
item
.
show
=
true
item
.
show
=
true
if
(
item
.
merchantId
==
userInfo
.
subLoginUser
.
merchantId
)
{
if
(
item
.
merchantId
==
userInfo
?.
subLoginUser
?
.
merchantId
)
{
subIndex
=
index
subIndex
=
index
}
}
})
})
...
@@ -256,7 +264,6 @@ Component({
...
@@ -256,7 +264,6 @@ Component({
merchantRange
,
merchantRange
,
subIndex
subIndex
})
})
this
.
init
()
}
}
},
},
attached
()
{
attached
()
{
...
...
pages/tab/outputValue/components/ScreenConfirmBox/ScreenConfirmBox.wxml
View file @
e4f245d
...
@@ -84,4 +84,4 @@
...
@@ -84,4 +84,4 @@
</view>
</view>
</scroll-view>
</scroll-view>
<switchAccountPopup wx:if="{{servicePopupShow}}" bind:hidePopup="servicePicker" bindchangeAccount="changeMerchantRange" popShow="{{servicePopupShow}}" merchantRange="{{merchantRange}}" selectInfo="{{formData}}"
h
ideTab="{{true}}"/>
<switchAccountPopup wx:if="{{servicePopupShow}}" bind:hidePopup="servicePicker" bindchangeAccount="changeMerchantRange" popShow="{{servicePopupShow}}" merchantRange="{{merchantRange}}" selectInfo="{{formData}}"
customH
ideTab="{{true}}"/>
pages/tab/outputValue/components/SwitchAccountPopup/SwitchAccountPopup.js
View file @
e4f245d
...
@@ -35,7 +35,7 @@ Component({
...
@@ -35,7 +35,7 @@ Component({
},
},
merchantRange
:
Object
,
merchantRange
:
Object
,
selectInfo
:
Object
,
selectInfo
:
Object
,
h
ideTab
:
Boolean
customH
ideTab
:
Boolean
},
},
/**
/**
...
...
pages/tab/outputValue/components/SwitchAccountPopup/SwitchAccountPopup.wxml
View file @
e4f245d
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
bind:hidePopup="hidePopup"
bind:hidePopup="hidePopup"
bindconfirm="confirm"
bindconfirm="confirm"
height="60%"
height="60%"
hideTab="{{h
ideTab}}">
customHideTab="{{customH
ideTab}}">
<!-- <search-input placeholder="请搜索服务商账号名" ></search-input> -->
<!-- <search-input placeholder="请搜索服务商账号名" ></search-input> -->
<view class="search-box">
<view class="search-box">
<view class="search-input">
<view class="search-input">
...
...
pages/tab/outputValue/components/employees/employess.wxml
View file @
e4f245d
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<view class="merchant_num">服务门店·{{item.outputValueType == 1 ? item.outputValueStats.length : item.constructionStats.length}}家</view>
<view class="merchant_num">服务门店·{{item.outputValueType == 1 ? item.outputValueStats.length : item.constructionStats.length}}家</view>
<view class="commission">
<view class="commission">
<view class="flex" wx:if="{{item.commissionFlag}}" data-target="{{item}}" bindtap="handleCommissionPopup"><text>提成</text><text class="arrow"></text></view>
<view class="flex" wx:if="{{item.commissionFlag}}" data-target="{{item}}" bindtap="handleCommissionPopup"><text>提成</text><text class="arrow"></text></view>
<view class="disabled" wx:else
=""
>提成未设置</view>
<view class="disabled" wx:else>提成未设置</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
pages/tab/outputValue/components/selectMerchantPopup/selectMerchantPopup.js
View file @
e4f245d
...
@@ -37,8 +37,7 @@ Component({
...
@@ -37,8 +37,7 @@ Component({
},
},
merchantRange
:
Object
,
merchantRange
:
Object
,
selectInfo
:
Object
,
selectInfo
:
Object
,
isMerchant
:
Boolean
,
isMerchant
:
Boolean
isTab
:
Boolean
},
},
/**
/**
...
...
pages/tab/outputValue/components/selectMerchantPopup/selectMerchantPopup.wxml
View file @
e4f245d
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
bind:hidePopup="hidePopup"
bind:hidePopup="hidePopup"
bindconfirm="confirm"
bindconfirm="confirm"
height="60%"
height="60%"
isTab="{{isTab
}}">
customIsTab="{{true
}}">
<view class="search-box">
<view class="search-box">
<view class="search-input">
<view class="search-input">
<glsx-image src="output/searchIcon.png" class="search-icon" />
<glsx-image src="output/searchIcon.png" class="search-icon" />
...
...
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