Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
regional-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 4597d250
authored
Jun 09, 2026
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
驻店管理需求开发
1 parent
7253a473
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
648 additions
and
335 deletions
app.json
packageWorkspace/components/selectPopup/selectPopup.js
packageWorkspace/pages/residentManage/api.js
packageWorkspace/pages/residentManage/components/accountAllocation/index.js
packageWorkspace/pages/residentManage/components/accountAllocation/index.sass
packageWorkspace/pages/residentManage/components/accountAllocation/index.wxml
packageWorkspace/pages/residentManage/components/addStaff/index.js
packageWorkspace/pages/residentManage/components/addStaff/index.json
packageWorkspace/pages/residentManage/components/addStaff/index.sass
packageWorkspace/pages/residentManage/components/addStaff/index.wxml
packageWorkspace/pages/residentManage/components/businessType/index.js
packageWorkspace/pages/residentManage/components/businessType/index.sass
packageWorkspace/pages/residentManage/components/businessType/index.wxml
packageWorkspace/pages/residentManage/components/shopMerchant/index.js
packageWorkspace/pages/residentManage/components/shopMerchant/index.wxml
packageWorkspace/pages/residentManage/components/staffSelectPopup/index.js
packageWorkspace/pages/residentManage/components/staffSelectPopup/index.json
packageWorkspace/pages/residentManage/components/staffSelectPopup/index.scss
packageWorkspace/pages/residentManage/components/staffSelectPopup/index.wxml
packageWorkspace/pages/residentManage/createStaff.js
packageWorkspace/pages/residentManage/createStaff.json
packageWorkspace/pages/residentManage/createStaff.sass
packageWorkspace/pages/residentManage/createStaff.wxml
packageWorkspace/pages/residentManage/residentManage.js
packageWorkspace/pages/residentManage/residentManage.json
packageWorkspace/pages/residentManage/residentManage.sass
packageWorkspace/pages/residentManage/residentManage.wxml
app.json
View file @
4597d25
...
...
@@ -100,8 +100,7 @@
"pages/performanceRating/batchOperation/batchOperation"
,
"pages/validReferralCount/referraCountEdit/referraCountEdit"
,
"pages/attendanceStatis/attendanceDetail/attendanceDetail"
,
"pages/appealFormManage/appealFormDetail/appealFormDetail"
,
"pages/residentManage/createStaff"
"pages/appealFormManage/appealFormDetail/appealFormDetail"
]
},
{
...
...
packageWorkspace/components/selectPopup/selectPopup.js
View file @
4597d25
...
...
@@ -126,8 +126,10 @@ Component({
// 单选:取消其他,选中当前
const
currentVal
=
item
[
valueKey
]
const
display
=
this
.
data
.
displayOptions
.
map
((
it
,
idx
)
=>
({
...
it
,
checked
:
idx
===
index
?
!
it
.
checked
:
false
}))
const
selected
=
display
[
index
].
checked
?
[
currentVal
]
:
[]
this
.
setData
({
displayOptions
:
display
,
selectedValues
:
selected
})
const
selected
=
display
[
index
].
checked
?
[
currentVal
]
:
[]
this
.
setData
({
displayOptions
:
display
,
selectedValues
:
selected
})
const
copyDisplay
=
this
.
data
.
copyDisplayOptions
.
map
((
it
,
idx
)
=>
({
...
it
,
checked
:
idx
===
index
?
!
it
.
checked
:
false
}))
this
.
setData
({
copyDisplayOptions
:
copyDisplay
})
this
.
triggerEvent
(
'change'
,
{
values
:
selected
,
items
:
this
.
getSelectedItems
()
})
if
(
this
.
properties
.
confirmOnSelect
)
{
this
.
onConfirm
()
...
...
@@ -164,8 +166,8 @@ Component({
this
.
triggerEvent
(
'cancel'
)
},
onConfirm
()
{
const
values
=
this
.
data
.
selectedValues
const
items
=
this
.
getSelectedItems
()
const
values
=
this
.
data
.
selectedValues
const
items
=
this
.
getSelectedItems
()
this
.
triggerEvent
(
'confirm'
,
{
values
,
items
})
},
getSelectedItems
()
{
...
...
packageWorkspace/pages/residentManage/api.js
View file @
4597d25
...
...
@@ -38,5 +38,10 @@ module.exports = {
/** 根据人员获取业务场景数据 */
getBaseSceneCodeList
(
data
)
{
return
api
.
post
(
"dj.api.scenemerchantref.findAllSceneByMerchantId"
,
data
)
},
/** 新增员工-获取北森待激活的员工数据 */
getEmployeeOnTheJobList
(
data
)
{
return
api
.
post
(
"dj.api.smartcarlife.staffBaseInfo.pageList"
,
data
)
}
};
\ No newline at end of file
};
packageWorkspace/pages/residentManage/components/accountAllocation/index.js
View file @
4597d25
...
...
@@ -309,20 +309,31 @@ Component({
})
},
goToStaff
(
e
)
{
let
{
index
}
=
e
.
currentTarget
.
dataset
,
{
accountList
}
=
this
.
data
;
let
{
staffPhone
,
staffName
,
staffId
}
=
accountList
[
index
]
wx
.
navigateTo
({
url
:
`/packageWorkspace/pages/residentManage/createStaff?staffPhone=
${
staffPhone
}
&staffName=
${
staffName
}
&staffId=
${
staffId
}
`
})
},
let
{
index
}
=
e
.
currentTarget
.
dataset
,
{
accountList
}
=
this
.
data
;
let
{
staffPhone
,
staffName
,
staffId
}
=
accountList
[
index
]
let
pageInstance
=
wx
.
$router
.
getPageInstance
()
pageInstance
.
setData
({
activeIndex
:
0
},
()
=>
{
let
thisPage
=
pageInstance
.
selectComponent
(
`#componet-0`
)
thisPage
.
setData
({
'staffObj.staffName'
:
staffName
,
'staffObj.staffPhone'
:
staffPhone
,
'staffObj.staffId'
:
staffId
,
namePhoneDisabled
:
true
})
})
},
// 触底刷新
mineReachBottom
()
{
console
.
log
(
'触底'
)
...
...
@@ -354,11 +365,9 @@ Component({
})
},
},
// lifetimes: {
// attached: function () {
// this.getData()
// }
// },
lifetimes
:
{
attached
:
function
()
{
this
.
getData
()
}
},
})
\ No newline at end of file
packageWorkspace/pages/residentManage/components/accountAllocation/index.sass
View file @
4597d25
/* tabWorkOrder/pages/residentManage/components/accountAllocation/index.wxss */
.container
{
height
:
calc
(
100%
-
104rpx
)
;
}
.search-input
{
// border: 1rpx solid #979797;
background
:
#ffffff
;
...
...
packageWorkspace/pages/residentManage/components/accountAllocation/index.wxml
View file @
4597d25
...
...
@@ -23,7 +23,7 @@
<block wx:if="{{ isFlag }}">
<scroll-view
class="account-box"
style="height: calc(100
vh - var(--fontSize5
40));"
style="height: calc(100
% - var(--fontSize3
40));"
enhanced="{{ true }}"
show-scrollbar="{{ false }}"
scroll-y
...
...
packageWorkspace/pages/residentManage/components/addStaff/index.js
View file @
4597d25
This diff is collapsed.
Click to expand it.
packageWorkspace/pages/residentManage/components/addStaff/index.json
View file @
4597d25
...
...
@@ -3,6 +3,8 @@
"usingComponents"
:
{
"business-type"
:
"../businessType/index"
,
"shop-merchant"
:
"../shopMerchant/index"
,
"yq-merchant"
:
"../yqMerchant/index"
"yq-merchant"
:
"../yqMerchant/index"
,
"select-popup"
:
"../../../../components/selectPopup/selectPopup"
,
"staff-select-popup"
:
"../staffSelectPopup/index"
}
}
\ No newline at end of file
}
packageWorkspace/pages/residentManage/components/addStaff/index.sass
View file @
4597d25
/* tabWorkOrder/pages/residentManage/components/addStaff/index.wxss */
.container
{
margin
:
var
(
--
fontSize16
)
var
(
--
fontSize24
)
;
margin
:
0
var
(
--
fontSize24
)
;
border-radius
:
16rpx
;
opacity
:
1
;
box-sizing
:
border-box
;
...
...
@@ -39,7 +39,10 @@
height
:
100%
;
}
.between
{
text-align
:right
;
text-align
:right
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.placeholder-class
{
color
:
#BBBBBB
;
...
...
packageWorkspace/pages/residentManage/components/addStaff/index.wxml
View file @
4597d25
<!--tabWorkOrder/pages/residentManage/components/addStaff/index.wxml-->
<view class="container">
<view class="top-box">
<view>
<view class="title">增设新员工门店账号</view>
<view class="info">增设的员工账号支持该手机号所绑定的员工登录「嘀加区域助手」小程序开展业务录单。
仅支持新增深圳嘀加服务商下的员工账号</view>
</view>
<image class="staff-icon" src="{{IMG_URL}}add-staff.png" mode=""/>
</view>
<view class="box">
<gl-cell border valueAlign="right" label="员工姓名" cellHeight="{{cellHeight}}" cellStyle="{{cellStyle}}" requiredAfter labelWidth="var(--fontSize290)" required>
<input placeholder="请输入" disabled style="color: #BBBBBB;" value="{{staffObj.staffName}}" class="input" placeholder-class="placeholder-class" bindinput="input" data-name="staffObj.staffName" always-embed></input>
</gl-cell>
<gl-cell border valueAlign="right" label="手机号" cellHeight="{{cellHeight}}" cellStyle="{{cellStyle}}" requiredAfter labelWidth="var(--fontSize140)" required>
<input placeholder="请输入" disabled class="input" style="color: #BBBBBB;" value="{{staffObj.staffPhone}}" type="number" maxlength="11" placeholder-class="placeholder-class" bindinput="input" bindblur="phoneBlur" data-name="staffObj.staffPhone" always-embed></input>
</gl-cell>
<gl-cell border valueAlign="right" required label="归属门店" cellHeight="{{cellHeight}}" cellStyle="{{cellStyle}}" requiredAfter labelWidth="var(--fontSize180)" haveArrow bindclick="showPopup" data-show-name="shopMerchantBox" placeholder="点击选择">
<block wx:if="{{ staffObj.merchantId }}">
<view class="between">{{staffObj.merchantName}}{{staffObj.merchantId}}</view>
</block>
</gl-cell>
<gl-cell border valueAlign="right" label="所属业务" cellHeight="{{cellHeight}}" cellStyle="{{cellStyle}}" requiredAfter labelWidth="var(--fontSize180)" required haveArrow bindclick="showPopup"data-show-name="isBusiness" placeholder="点击选择">
<block wx:if="{{ staffObj.staffSceneLabelText }}">
<view class="between">{{staffObj.staffSceneLabelText}}</view>
</block>
</gl-cell>
<gl-cell valueAlign="right" label="关联账号" required cellHeight="{{cellHeight}}" cellBoxStyle="{{cellBoxStyle}}" cellStyle="{{cellStyle}}" requiredAfter labelWidth="var(--fontSize290)" haveArrow="{{yqMerchartList.length>1}}" bindclick="showPopup" data-show-name="yqMerchartBox" placeholder="点击选择" >
<block wx:if="{{ staffObj.yqMerchantName }}">
<view class="between">{{staffObj.yqMerchantName}}{{staffObj.yqMerchantId}}</view>
</block>
</gl-cell>
</view>
</view>
<view class="btn" bind:tap="submit">确认开通</view>
<text class="hint">请核对员工姓名、手机号,开通账号后即可</text>
<text class="hint">投入使用。登录密码默认为Aa+手机号</text>
<business-type show="{{isBusiness}}" scene-label="{{staffObj.staffSceneLabel}}" baseSceneList="{{baseSceneList}}" bindconfirm="selectChoose"></business-type>
<shop-merchant show="{{shopMerchantBox}}" scene-label="{{staffObj.staffSceneLabel}}" bindconfirm="selectChooseShop" merchantId="{{staffObj.merchantId}}"></shop-merchant>
<yq-merchant show="{{yqMerchartBox}}" merchantId="{{staffObj.yqMerchantId}}" yqMerchartList="{{yqMerchartList}}"></yq-merchant>
\ No newline at end of file
<scroll-view class="content-box"
style="height: calc(100% - 104rpx);"
scroll-y>
<view style="width: 100%; height: 16rpx;background: transparent;"></view>
<view class="container">
<view class="top-box">
<view>
<view class="title">
增设新员工门店账号
</view>
<view class="info">
增设的员工账号支持该手机号所绑定的员工登录「嘀加区域助手」小程序开展业务录单。仅支持新增深圳嘀加服务商下的员工账号
</view>
</view>
<image class="staff-icon"
src="{{ IMG_URL }}add-staff.png"
mode="" />
</view>
<view class="box">
<gl-cell border
valueAlign="right"
label="员工姓名"
cellHeight="{{ cellHeight }}"
cellStyle="{{ cellStyle }}"
requiredAfter
labelWidth="var(--fontSize160)"
required
haveArrow="{{ !namePhoneDisabled }}"
bindclick="openStaffSelect"
placeholder="点击选择">
<block wx:if="{{ namePhoneDisabled }}">
<input placeholder="请输入"
disabled="{{ namePhoneDisabled }}"
style="color: {{ namePhoneDisabled ? '#BBBBBB' : '' }}"
value="{{ staffObj.staffName }}"
class="input"
placeholder-class="placeholder-class"
bindinput="input"
data-name="staffObj.staffName"
always-embed></input>
</block>
<block wx:else>
<view class="between {{ staffObj.staffName ? '' : 'placeholder-class' }}">
{{ staffObj.staffName || '点击选择' }}
</view>
</block>
</gl-cell>
<gl-cell border
valueAlign="right"
label="手机号"
cellHeight="{{ cellHeight }}"
cellStyle="{{ cellStyle }}"
requiredAfter
labelWidth="var(--fontSize160)"
required>
<input placeholder="请输入"
disabled="{{ true }}"
class="input"
style="color: #BBBBBB"
value="{{ staffObj.staffPhone }}"
type="number"
maxlength="11"
placeholder-class="placeholder-class"
always-embed></input>
</gl-cell>
<gl-cell border
valueAlign="right"
required
label="归属门店"
cellHeight="{{ cellHeight }}"
cellStyle="{{ cellStyle }}"
requiredAfter
labelWidth="var(--fontSize160)"
haveArrow
bindclick="showPopup"
data-show-name="shopMerchantBox"
placeholder="点击选择">
<block wx:if="{{ staffObj.merchantId }}">
<view class="between">
{{ staffObj.merchantName }}{{ staffObj.merchantId }}
</view>
</block>
</gl-cell>
<gl-cell border
valueAlign="right"
label="所属业务"
cellHeight="{{ cellHeight }}"
cellStyle="{{ cellStyle }}"
requiredAfter
labelWidth="var(--fontSize160)"
required
haveArrow
bindclick="showPopup"
data-show-name="isBusiness"
placeholder="点击选择">
<block wx:if="{{ staffObj.staffSceneLabelText }}">
<view class="between">
{{ staffObj.staffSceneLabelText }}
</view>
</block>
</gl-cell>
<gl-cell valueAlign="right"
border
label="关联账号"
required
cellHeight="{{ cellHeight }}"
cellBoxStyle="{{ cellBoxStyle }}"
cellStyle="{{ cellStyle }}"
requiredAfter
labelWidth="var(--fontSize160)"
placeholder="自动关联">
<block wx:if="{{ staffObj.yqMerchantListText }}">
<view class="between" bindtap="showAllYqMerchantListText">
{{ staffObj.yqMerchantListText }}
</view>
</block>
</gl-cell>
<gl-cell valueAlign="right"
label="驻店类型"
required
requiredAfter
cellHeight="{{ cellHeight }}"
cellBoxStyle="{{ cellBoxStyle }}"
cellStyle="{{ cellStyle }}"
labelWidth="var(--fontSize160)"
haveArrow
bindclick="openResidentType"
placeholder="点击选择">
<block wx:if="{{ staffObj.stationTypeText }}">
<view class="between">
{{ staffObj.stationTypeText }}
</view>
</block>
</gl-cell>
</view>
</view>
<view class="btn" bind:tap="submit">
确认开通
</view>
<text class="hint">请核对员工姓名、手机号,开通账号后即可</text><text class="hint">投入使用。登录密码默认为Aa+手机号</text>
</scroll-view>
<business-type show="{{ isBusiness }}"
scene-label="{{ staffObj.staffSceneLabel }}"
baseSceneList="{{ baseSceneList }}"
bindconfirm="selectChoose"></business-type>
<shop-merchant show="{{ shopMerchantBox }}"
scene-label="{{ staffObj.staffSceneLabel }}"
bindconfirm="selectChooseShop"
selectedObj="{{ selectedShopObj }}"></shop-merchant>
<staff-select-popup show="{{staffSelectBox}}" bindconfirm="selectChooseStaff" selectedObj="{{selectedStaffObj}}"></staff-select-popup>
<select-popup show="{{ stationTypeBox }}"
title="选择驻店类型"
options="{{ stationTypeOptions }}"
labelKey="label"
valueKey="value"
value="{{ [staffObj.stationType] }}"
height="40%"
bindconfirm="onResidentTypeConfirm"
bindcancel="onResidentTypeCancel" />
packageWorkspace/pages/residentManage/components/businessType/index.js
View file @
4597d25
...
...
@@ -48,10 +48,10 @@ Component({
}
=
this
.
data
,
{
index
}
=
e
.
currentTarget
.
dataset
;
list
.
forEach
(
item
=>
{
item
.
active
=
false
})
list
[
index
].
active
=
tru
e
if
(
index
===
undefined
||
index
===
null
)
return
const
item
=
list
[
index
]
if
(
!
item
)
return
item
.
active
=
!
item
.
activ
e
this
.
setData
({
list
,
});
...
...
@@ -84,4 +84,4 @@ Component({
});
},
}
})
\ No newline at end of file
})
packageWorkspace/pages/residentManage/components/businessType/index.sass
View file @
4597d25
...
...
@@ -2,47 +2,46 @@
.box
{
// height:200rpx;
height
:
100%
;
// width: calc(100% + var(--fontSize64));
// margin-left: calc(-1 * var(--fontSize32));
}
.item
{
padding
:
24rpx
4rpx
;
box-sizing
:
border-box
;
.item
{
display
:
flex
;
height
:
var
(
--
fontSize88
)
;
align-items
:
center
;
color
:
#292D33
;
border-bottom
:
var
(
--
fontSize1
)
solid
#EFF0F2
;
.item-hd
{
display
:
flex
;
align-items
:
center
;
}
.item
:last-child
{
border-bottom
:
none
;
}
.item.active
{
color
:
#2C66F7
;
}
.name
{
max-width
:
400rpx
;
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#292D33
;
margin-left
:
20rpx
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.merchant_item
{
height
:
var
(
--
fontSize88
)
;
font-size
:
var
(
--
fontSize28
)
;
display
:
flex
;
align-items
:
center
;
width
:
94%
;
}
.total-price
{
font-weight
:
500
;
font-size
:
28rpx
;
color
:
#2C66F7
;
margin-left
:
auto
;
}
.merchant_item
.text-hide
{
max-width
:
calc
(
100%
-
var
(
--
fontSize192
))
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.icon
{
display
:
block
;
width
:
var
(
--
fontSize32
)
;
height
:
var
(
--
fontSize32
)
;
}
.mark
{
width
:var
(
--fontSize32
);
height
:
var
(
--
fontSize32
)
;
}
.icon
.arc
{
width
:
100%
;
height
:
100%
;
border
:
var
(
--
fontSize2
)
solid
#979797
;
border-radius
:
100%
;
box-sizing
:
border-box
;
}
}
}
\ No newline at end of file
.icon
{
width
:
var
(
--
fontSize32
)
;
height
:
var
(
--
fontSize32
)
;
display
:
block
;
margin-right
:
var
(
--
fontSize20
)
;
flex-shrink
:
0
;
}
packageWorkspace/pages/residentManage/components/businessType/index.wxml
View file @
4597d25
<popup show="{{ show }}" title="选择所属业务" bindconfirm="confirm" bindcancel="cancel" height="40%">
<scroll-view scroll-y show-scrollbar="{{false}}" enhanced="true" class="box">
<block wx:if="{{list.length}}">
<view class="item" wx:for="{{ list }}">
<view class="item-hd" catchtap="choose" data-index="{{ index }}">
<view class="icon" >
<block wx:if="{{ item.active }}">
<image src="../../image/radio.png" />
</block>
<block wx:else>
<view class="arc" />
</block>
<block wx:for="{{ list }}" wx:key="index">
<view class="item {{ item.active ? 'active' : '' }}" bindtap="choose" data-index="{{ index }}">
<view class="merchant_item">
<view class="text-hide">{{item.baseSceneCodeName}}</view>
</view>
<view class="mark" wx:if="{{ item.active }}">
<gl-image class="icon" src="/equity/mark.png" />
</view>
<view class="name">{{item.baseSceneCodeName}}</view>
</view>
</
view
>
</
block
>
</block>
<view class="safeAreaInset"></view>
</scroll-view>
</popup>
\ No newline at end of file
</popup>
packageWorkspace/pages/residentManage/components/shopMerchant/index.js
View file @
4597d25
...
...
@@ -11,22 +11,24 @@ Component({
if
(
n
)
{
this
.
setData
({
pageNum
:
1
,
storeIndex
:
null
,
nothing
:
false
,
keyword
:
''
,
merchantIdName
:
''
,
tempMerchantId
:
this
.
data
.
merchantId
,
scrollTop
:
0
scrollTop
:
0
,
isFlag
:
false
,
shopMerchantList
:
[]
},
()
=>
{
this
.
getData
()
this
.
setData
({
selectItem
:
wx
.
$util
.
deepClone
(
this
.
data
.
selectedObj
)
})
})
}
}
},
sceneLabel
:
String
,
merchantId
:
String
selectedObj
:
Object
},
/**
...
...
@@ -41,8 +43,7 @@ Component({
total
:
0
,
pageNum
:
1
,
pageSize
:
20
,
storeIndex
:
null
,
tempMerchantId
:
''
,
selectItem
:
{},
shopMerchantList
:
[]
},
/**
...
...
@@ -88,21 +89,28 @@ Component({
merchantIdName
,
pageNum
,
pageSize
}
}
this
.
setData
({
requestLoading
:
true
})
if
(
pageNum
==
1
)
wx
.
$util
.
showLoading
()
api
.
getshopMerchantList
(
params
).
then
(
res
=>
{
wx
.
$util
.
hideLoading
()
this
.
setData
({
requestLoading
:
false
})
if
(
res
.
code
==
0
)
{
let
{
list
,
total
total
,
pages
}
=
res
.
data
;
let
tempList
=
pageNum
==
1
?
list
:
[...
shopMerchantList
,
...
res
.
data
.
list
];
this
.
setData
({
shopMerchantList
:
tempList
,
isFlag
:
true
,
total
:
total
,
nothing
:
pageNum
==
1
?
false
:
total
==
tempList
.
length
,
},
()
=>
{
if
(
this
.
data
.
tempMerchantId
)
this
.
initData
()
nothing
:
pages
==
pageNum
,
})
}
...
...
@@ -117,59 +125,40 @@ Component({
}
=
this
.
data
if
(
pageNum
*
pageSize
>=
total
)
{
return
}
}
if
(
this
.
data
.
requestLoading
)
return
this
.
setData
({
pageNum
:
pageNum
+
1
},
()
=>
{
this
.
getData
()
})
},
initData
(
n
)
{
let
{
shopMerchantList
,
storeIndex
,
tempMerchantId
,
}
=
this
.
data
;
storeIndex
=
null
shopMerchantList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
shopMerchantId
==
tempMerchantId
)
{
storeIndex
=
index
}
})
this
.
setData
({
storeIndex
})
},
choose
(
e
)
{
let
{
index
item
}
=
e
.
currentTarget
.
dataset
,
{
shopMerchantList
}
=
this
.
data
,
{
shopMerchantId
}
=
shopMerchantList
[
index
];
}
=
this
.
data
console
.
log
(
item
)
this
.
setData
({
storeIndex
:
index
,
tempMerchantId
:
shopMerchantId
selectItem
:
item
,
shopMerchantList
})
},
confirm
()
{
if
(
this
.
data
.
shopMerchantList
.
length
==
0
)
return
let
{
shopMerchantList
,
storeIndex
selectItem
}
=
this
.
data
;
if
(
storeIndex
===
null
)
{
if
(
!
Object
.
keys
(
selectItem
).
length
)
{
wx
.
$util
.
showToast
(
'请选择门店'
);
return
}
let
{
shopMerchantId
,
shopMerchantName
}
=
s
hopMerchantList
[
storeIndex
]
;
}
=
s
electItem
;
this
.
setData
({
show
:
false
},
()
=>
{
...
...
@@ -193,9 +182,6 @@ Component({
thisPage
.
setData
({
shopMerchantBox
:
false
,
})
this
.
setData
({
storeIndex
:
0
})
},
}
...
...
packageWorkspace/pages/residentManage/components/shopMerchant/index.wxml
View file @
4597d25
...
...
@@ -10,16 +10,19 @@
<scroll-view class="store-select-box" scroll-top="{{scrollTop}}" style="height: calc(100% - var(--fontSize82));" enhanced="{{true}}" show-scrollbar="{{false}}" scroll-y bindscrolltolower="mineReachBottom">
<view class="merchant-box" wx:if="{{shopMerchantList.length>0}}">
<block wx:for="{{shopMerchantList}}" wx:key="index">
<view class="item {{s
toreIndex===index?'active':''}}" bindtap="choose
" data-index="{{index}}">
<view class="item {{s
electItem.shopMerchantId == item.shopMerchantId ? 'active' : ''}}" bindtap="choose" data-item="{{item}}
" data-index="{{index}}">
<view class="merchant_item">
<view class="text-hide">{{item.shopMerchantName}}</view>
<view>{{item.shopMerchantId}}</view>
</view>
<view class="mark" wx:if="{{s
toreIndex===index
}}">
<view class="mark" wx:if="{{s
electItem.shopMerchantId == item.shopMerchantId
}}">
<gl-image class="icon" src="/equity/mark.png" />
</view>
</view>
</block>
<block wx:if="{{requestLoading}}">
<view class="list-nothing">加载中</view>
</block>
<block wx:if="{{nothing}}">
<view class="list-nothing">到底了~</view>
</block>
...
...
packageWorkspace/pages/residentManage/components/staffSelectPopup/index.js
0 → 100644
View file @
4597d25
// packageWorkspace/pages/residentManage/components/staffSelectPopup/index.js
import
api
from
'../../api'
Component
({
/**
* 组件的属性列表
*/
properties
:
{
show
:
{
type
:
Boolean
,
observer
:
function
(
n
)
{
if
(
n
)
{
this
.
setData
({
pageNum
:
1
,
nothing
:
false
,
keyword
:
''
,
staffName
:
''
,
scrollTop
:
0
,
selectedObj
:
wx
.
$util
.
deepClone
(
this
.
data
.
selectedObj
),
staffList
:
[],
isFlag
:
false
},
()
=>
{
this
.
getData
()
})
}
}
},
sceneLabel
:
String
,
selectedObj
:
Object
},
/**
* 组件的初始数据
*/
data
:
{
keyword
:
''
,
staffName
:
''
,
scrollTop
:
0
,
nothing
:
false
,
isFlag
:
false
,
total
:
0
,
pageNum
:
1
,
pageSize
:
20
,
selectItem
:
{},
staffList
:
[]
},
/**
* 组件的方法列表
*/
methods
:
{
clear
()
{
this
.
setData
({
keyword
:
""
,
staffName
:
''
});
this
.
search
();
},
input
(
e
)
{
let
{
value
}
=
e
.
detail
;
this
.
setData
({
keyword
:
value
});
},
search
()
{
this
.
setData
({
staffName
:
this
.
data
.
keyword
,
pageNum
:
1
,
accountList
:
[],
isFlag
:
false
,
nothing
:
false
,
},
()
=>
{
this
.
getData
()
});
},
getData
()
{
let
{
staffList
,
staffName
,
pageNum
,
pageSize
}
=
this
.
data
let
params
=
{
staffName
,
pageNum
,
pageSize
}
if
(
pageNum
==
1
)
wx
.
$util
.
showLoading
()
if
(
this
.
data
.
requestLoading
)
return
this
.
setData
({
requestLoading
:
true
})
api
.
getEmployeeOnTheJobList
(
params
).
then
(
res
=>
{
wx
.
$util
.
hideLoading
()
this
.
setData
({
requestLoading
:
false
})
if
(
res
.
code
==
0
)
{
let
{
list
,
total
,
pages
}
=
res
.
data
;
res
.
data
?.
list
?.
forEach
(
val
=>
{
val
.
staffId
=
val
.
id
})
let
tempList
=
pageNum
==
1
?
list
:
[...
staffList
,
...
res
.
data
.
list
];
this
.
setData
({
staffList
:
tempList
,
isFlag
:
true
,
total
:
total
,
nothing
:
pageNum
==
pages
})
}
})
},
// 触底刷新
mineReachBottom
()
{
let
{
pageNum
,
total
,
pageSize
}
=
this
.
data
if
(
this
.
data
.
requestLoading
)
return
if
(
pageNum
*
pageSize
>=
total
)
{
return
}
this
.
setData
({
pageNum
:
pageNum
+
1
},
()
=>
{
this
.
getData
()
})
},
choose
(
e
)
{
let
{
item
}
=
e
.
currentTarget
.
dataset
,
{
staffList
}
=
this
.
data
this
.
setData
({
selectItem
:
item
,
staffList
})
},
confirm
()
{
if
(
this
.
data
.
staffList
.
length
==
0
)
return
let
{
selectItem
}
=
this
.
data
;
if
(
!
Object
.
keys
(
selectItem
).
length
)
{
wx
.
$util
.
showToast
(
'请选择员工'
);
return
}
let
{
staffPhone
,
staffName
,
staffId
}
=
selectItem
;
this
.
setData
({
show
:
false
},
()
=>
{
this
.
triggerEvent
(
"confirm"
,{
staffPhone
,
staffName
,
staffId
})
})
},
hidePopup
()
{
let
pageInstance
=
wx
.
$router
.
getPageInstance
()
let
thisPage
=
pageInstance
.
selectComponent
(
`#componet-0`
)
thisPage
.
setData
({
staffSelectBox
:
false
,
})
},
}
})
\ No newline at end of file
packageWorkspace/pages/residentManage/components/staffSelectPopup/index.json
0 → 100644
View file @
4597d25
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
packageWorkspace/pages/residentManage/components/staffSelectPopup/index.scss
0 → 100644
View file @
4597d25
/* packageWorkspace/pages/residentManage/components/staffSelectPopup/index.wxss */
.title
{
margin-bottom
:
var
(
--
fontSize20
);
color
:
#292D33
;
font-weight
:
400
;
font-size
:
var
(
--
fontSize32
);
}
.staff-select-box
{
height
:
calc
(
100%
-
var
(
--
fontSize168
));
}
.staff-box
{
height
:
100%
;
}
.staff-box
.item
{
display
:
flex
;
height
:
var
(
--
fontSize88
);
align-items
:
center
;
color
:
#292D33
;
border-bottom
:
var
(
--
fontSize1
)
solid
#EFF0F2
;
}
.staff-box
.item
:last-child
{
border-bottom
:
none
;
}
.staff-box
.item.active
{
color
:
#2C66F7
;
}
.item
.staff_item
{
height
:
var
(
--
fontSize88
);
font-size
:
var
(
--
fontSize28
);
display
:
flex
;
align-items
:
center
;
width
:
94%
;
}
.item
.staff_item
.text-hide
{
max-width
:
calc
(
100%
-
var
(
--
fontSize192
));
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.item
.icon
{
width
:
var
(
--
fontSize32
);
height
:
var
(
--
fontSize32
);
display
:
block
;
margin-right
:
var
(
--
fontSize20
);
flex-shrink
:
0
;
}
.item
.icon
.arc
{
width
:
100%
;
height
:
100%
;
border
:
var
(
--
fontSize2
)
solid
#979797
;
border-radius
:
100%
;
box-sizing
:
border-box
;
}
.mark
{
width
:var
(
--fontSize32
)
;
height
:
var
(
--
fontSize32
);
}
.list-nothing
,
.list-not
{
text-align
:
center
;
font-size
:
28rpx
;
color
:
#979797
;
}
.search-input
{
// border: 1rpx solid #979797;
background
:
#F7F8FA
;
border-radius
:
var
(
--
fontSize38
);
//width: calc(100% - var(--fontSize64));
height
:
var
(
--
fontSize72
);
display
:
flex
;
align-items
:
center
;
margin
:
16rpx
0
;
}
.search-input
.search-icon
{
width
:
var
(
--
fontSize28
);
height
:
var
(
--
fontSize28
);
margin
:
0
var
(
--
fontSize10
)
0
var
(
--
fontSize26
);
}
.search-input
.search-clear
{
width
:
var
(
--
fontSize36
);
height
:
var
(
--
fontSize36
);
margin
:
0
var
(
--
fontSize26
)
0
var
(
--
fontSize10
);
}
.search-input
.input
{
font-size
:
var
(
--
fontSize28
);
height
:
var
(
--
fontSize38
);
line-height
:
var
(
--
fontSize38
);
width
:
calc
(
100%
-
var
(
--
fontSize136
));
}
.input-placeholder
{
color
:
rgba
(
200
,
201
,
204
,
.89
);
}
\ No newline at end of file
packageWorkspace/pages/residentManage/components/staffSelectPopup/index.wxml
0 → 100644
View file @
4597d25
<!--packageWorkspace/pages/residentManage/components/staffSelectPopup/index.wxml-->
<popup title="选择员工" show="{{ show }}" bindconfirm="confirm" height="85%" bindcancel="hidePopup" class="staff-wrap">
<view class="search-input">
<image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="员工查询" class="input" value="{{ keyword }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
<block wx:if="{{ keyword }}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
<block wx:if="{{isFlag}}">
<scroll-view class="staff-select-box" scroll-top="{{scrollTop}}" style="height: calc(100% - var(--fontSize82));" enhanced="{{true}}" show-scrollbar="{{false}}" scroll-y bindscrolltolower="mineReachBottom">
<view class="staff-box" wx:if="{{staffList.length>0}}">
<block wx:for="{{staffList}}" wx:key="index">
<view class="item {{selectItem.staffId == item.id ? 'active' : ''}}" bindtap="choose" data-item="{{item}}">
<view class="staff_item">
<view class="text-hide">{{item.staffName}}</view>
</view>
<view class="mark" wx:if="{{selectItem.staffId == item.id}}">
<gl-image class="icon" src="/equity/mark.png" />
</view>
</view>
</block>
<view class="list-nothing" wx:if="{{requestLoading}}">加载中</view>
<block wx:if="{{nothing}}">
<view class="list-nothing">到底了~</view>
</block>
</view>
<view class="no-data" wx:if="{{!staffList.length}}">
<empty-data />
</view>
</scroll-view>
</block>
</popup>
\ No newline at end of file
packageWorkspace/pages/residentManage/createStaff.js
deleted
100644 → 0
View file @
7253a47
// packageWorkspace/pages/residentManage/createStaff.js
const
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
;
Page
({
/**
* 页面的初始数据
*/
data
:
{
navStyle
:
'background-color: transparent'
,
navBarHeight
:
88
,
},
navbarReady
(
e
)
{
let
navBarHeight
=
e
.
detail
.
height
this
.
setData
({
navBarHeight
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
let
comp
=
this
.
selectComponent
(
'#componet-0'
)
if
(
comp
)
{
comp
.
setData
({
'staffObj.staffName'
:
options
?.
staffName
,
'staffObj.staffPhone'
:
options
?.
staffPhone
,
'staffObj.staffId'
:
options
?.
staffId
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
},
back
()
{
wx
.
$router
.
back
()
},
getBaseSceneList
()
{
getBaseSceneCodeList
},
checkRequired
(
obj
)
{
let
target
=
[
"staffName"
,
"staffPhone"
,
"staffSceneLabel"
,
"merchantId"
,
"yqMerchantId"
];
obj
=
{
...
obj
};
if
(
!
phoneRex
.
test
(
obj
.
staffPhone
))
{
this
.
showToast
(
"请输入正确的手机号"
);
return
true
;
}
try
{
target
.
map
((
key
)
=>
{
if
(
!
obj
[
key
])
{
throw
key
;
}
});
}
catch
(
error
)
{
return
error
;
}
return
false
;
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{
}
})
\ No newline at end of file
packageWorkspace/pages/residentManage/createStaff.json
deleted
100644 → 0
View file @
7253a47
{
"usingComponents"
:
{
"add-staff"
:
"./components/addStaff/index"
},
"navigationStyle"
:
"custom"
}
\ No newline at end of file
packageWorkspace/pages/residentManage/createStaff.sass
deleted
100644 → 0
View file @
7253a47
/* packageWorkspace/pages/residentManage/createStaff.wxss */
page
{
background
:
#F7F8FA
;
}
.bg
{
width
:
100%
;
height
:
var
(
--
fontSize400
)
;
background
:
linear-gradient
(
0deg
,
#e8f0fb
00
0%
,
#dde8fb
100%
)
;
position
:
fixed
;
left
:
0
;
top
:
0
;
z-index
:
-1
;
}
\ No newline at end of file
packageWorkspace/pages/residentManage/createStaff.wxml
deleted
100644 → 0
View file @
7253a47
<!--packageWorkspace/pages/residentManage/createStaff.wxml-->
<navigation-bar bindnavbarReady="navbarReady" class="navigation-bar-wrap" bindback="back" showBack="true" navStyle="{{navStyle}}">新增员工</navigation-bar>
<view class="bg"></view>
<view class="content" style="margin-top: {{navBarHeight}}px;">
<add-staff id="componet-0"></add-staff>
</view>
packageWorkspace/pages/residentManage/residentManage.js
View file @
4597d25
...
...
@@ -10,7 +10,15 @@ Page({
data
:
{
navStyle
:
'background-color: transparent'
,
list
:
[
'新增员工'
,
'调店账号分配'
],
activeIndex
:
0
activeIndex
:
0
,
navBarHeight
:
113.5
},
navbarReady
(
e
)
{
let
navBarHeight
=
e
.
detail
.
height
this
.
setData
({
navBarHeight
})
},
/**
...
...
@@ -22,28 +30,35 @@ Page({
checkRequired
(
obj
)
{
let
target
=
[
"staffName"
,
"staffPhone"
,
"staffPhone"
,
"merchantId"
,
"staffSceneLabel"
,
"merchantId
"
,
"yqMerchantId
"
"yqMerchantList
"
,
"stationType
"
];
obj
=
{
...
obj
};
if
(
!
phoneRex
.
test
(
obj
.
staffPhone
))
{
this
.
showToast
(
"请输入正确的手机号"
);
return
true
;
}
try
{
target
.
map
((
key
)
=>
{
if
(
key
===
"yqMerchantList"
)
{
const
hasList
=
Array
.
isArray
(
obj
.
yqMerchantList
)
&&
obj
.
yqMerchantList
.
length
>
0
if
(
!
hasList
)
throw
key
return
}
if
(
!
obj
[
key
])
{
throw
key
;
}
});
}
catch
(
error
)
{
return
error
;
}
}
if
(
!
phoneRex
.
test
(
obj
.
staffPhone
))
{
this
.
showToast
(
"请输入正确的手机号"
);
return
true
;
}
return
false
;
},
/**
...
...
@@ -57,8 +72,6 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow
()
{
const
comp
=
this
.
selectComponent
(
"#componet-1"
);
comp
.
getData
&&
comp
.
getData
()
},
back
()
{
wx
.
$router
.
back
()
...
...
@@ -106,4 +119,4 @@ Page({
onShareAppMessage
()
{
}
})
\ No newline at end of file
})
packageWorkspace/pages/residentManage/residentManage.json
View file @
4597d25
{
"navigationStyle"
:
"custom"
,
"usingComponents"
:
{
"add-staff"
:
"./components/addStaff/index"
,
"account-allocation"
:
"./components/accountAllocation/index"
}
}
\ No newline at end of file
packageWorkspace/pages/residentManage/residentManage.sass
View file @
4597d25
...
...
@@ -14,8 +14,8 @@ page {
}
.content
{
margin-top
:
176rp
x
;
box-sizing
:
border-bo
x
;
height
:
100vh
;
.tabs
{
margin
:
0
40rpx
;
display
:
flex
;
...
...
packageWorkspace/pages/residentManage/residentManage.wxml
View file @
4597d25
<navigation-bar bindnavbarReady="navbarReady" class="navigation-bar-wrap" bindback="back" showBack="true" navStyle="{{navStyle}}">驻店管理</navigation-bar>
<view class="bg"></view>
<view class="content">
<account-allocation id="componet-1"></account-allocation>
<view class="content" style="padding-top: {{navBarHeight}}px;">
<view class="tabs" >
<view wx:for="{{list}}" wx:key="index" class="tab {{activeIndex==index?'active':''}}" data-index="{{index}}" bind:tap="changeHandle">{{item}}</view>
</view>
<add-staff id="componet-0" wx:if="{{activeIndex===0}}"></add-staff>
<account-allocation id="componet-1" wx:if="{{activeIndex===1}}"></account-allocation>
</view>
\ No newline at end of file
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