Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
ShenghuoquanBusiness
Commits
dfbc617e
Commit
dfbc617e
authored
Jun 17, 2021
by
shiyuelong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 优化添加员工逻辑
parent
7e13a0bd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
27 deletions
+31
-27
AddStaffActivity.kt
...shenghuoquan/newscontent/personnel/ui/AddStaffActivity.kt
+4
-4
ManagerChangeActivity.kt
...huoquan/newscontent/personnel/ui/ManagerChangeActivity.kt
+3
-5
MyStaffActivity.kt
.../shenghuoquan/newscontent/personnel/ui/MyStaffActivity.kt
+19
-18
MerchantCenterActivity.kt
...nghuoquan/newscontent/ui/center/MerchantCenterActivity.kt
+4
-0
activity_my_staff.xml
...nts/newscontent/src/main/res/layout/activity_my_staff.xml
+1
-0
No files found.
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/personnel/ui/AddStaffActivity.kt
View file @
dfbc617e
...
@@ -74,7 +74,7 @@ class AddStaffActivity : BaseActivity<ActivityAddStaffBinding>() {
...
@@ -74,7 +74,7 @@ class AddStaffActivity : BaseActivity<ActivityAddStaffBinding>() {
// 发送验证码
// 发送验证码
viewBind
.
tvGetCode
.
setOnClickListener
{
viewBind
.
tvGetCode
.
setOnClickListener
{
val
mobile
=
viewBind
.
etMobile
.
text
.
toString
().
replace
(
" "
,
""
)
val
mobile
=
viewBind
.
etMobile
.
text
.
toString
().
replace
(
" "
,
""
)
if
(
mobile
.
length
==
1
3
)
{
if
(
mobile
.
length
==
1
1
)
{
requestSmsCode
(
mobile
)
requestSmsCode
(
mobile
)
}
else
{
}
else
{
ToastUtil
.
showToast
(
this
,
"请输入11位手机号"
)
ToastUtil
.
showToast
(
this
,
"请输入11位手机号"
)
...
@@ -96,7 +96,7 @@ class AddStaffActivity : BaseActivity<ActivityAddStaffBinding>() {
...
@@ -96,7 +96,7 @@ class AddStaffActivity : BaseActivity<ActivityAddStaffBinding>() {
private
fun
requestAddUser
()
{
private
fun
requestAddUser
()
{
val
hashMap
=
HashMap
<
String
,
String
?>()
val
hashMap
=
HashMap
<
String
,
String
?>()
hashMap
[
"mobile"
]
=
viewBind
.
etMobile
.
text
.
toString
()
hashMap
[
"mobile"
]
=
viewBind
.
etMobile
.
text
.
toString
()
.
replace
(
" "
,
""
)
hashMap
[
"code"
]
=
viewBind
.
etSmsCode
.
text
.
toString
()
hashMap
[
"code"
]
=
viewBind
.
etSmsCode
.
text
.
toString
()
PersonalRemoteDataSource
.
postAddUser
(
postAddUserCallBack
,
hashMap
)
PersonalRemoteDataSource
.
postAddUser
(
postAddUserCallBack
,
hashMap
)
}
}
...
@@ -111,10 +111,10 @@ class AddStaffActivity : BaseActivity<ActivityAddStaffBinding>() {
...
@@ -111,10 +111,10 @@ class AddStaffActivity : BaseActivity<ActivityAddStaffBinding>() {
private
fun
setChangeButtonStatus
(
flag
:
Boolean
)
{
private
fun
setChangeButtonStatus
(
flag
:
Boolean
)
{
if
(
flag
)
{
if
(
flag
)
{
viewBind
.
include
.
tvMenu
.
alpha
=
1.0f
viewBind
.
include
.
tvMenu
.
setTextColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
color_1852F1
))
viewBind
.
include
.
tvMenu
.
isEnabled
=
true
viewBind
.
include
.
tvMenu
.
isEnabled
=
true
}
else
{
}
else
{
viewBind
.
include
.
tvMenu
.
alpha
=
0.32f
viewBind
.
include
.
tvMenu
.
setTextColor
(
ContextCompat
.
getColor
(
this
,
R
.
color
.
color_661852F1
))
viewBind
.
include
.
tvMenu
.
isEnabled
=
false
viewBind
.
include
.
tvMenu
.
isEnabled
=
false
}
}
}
}
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/personnel/ui/ManagerChangeActivity.kt
View file @
dfbc617e
...
@@ -111,7 +111,7 @@ class ManagerChangeActivity : BaseActivity<ActivityManagerChangeBinding>() {
...
@@ -111,7 +111,7 @@ class ManagerChangeActivity : BaseActivity<ActivityManagerChangeBinding>() {
}
}
2
->
{
2
->
{
val
mobile
=
viewBind
.
etNewMobile
.
text
.
toString
().
replace
(
" "
,
""
)
val
mobile
=
viewBind
.
etNewMobile
.
text
.
toString
().
replace
(
" "
,
""
)
if
(
mobile
.
length
==
1
3
)
{
if
(
mobile
.
length
==
1
1
)
{
requestSmsCode
(
mobile
)
requestSmsCode
(
mobile
)
}
else
{
}
else
{
ToastUtil
.
showToast
(
this
,
"请输入11位手机号"
)
ToastUtil
.
showToast
(
this
,
"请输入11位手机号"
)
...
@@ -125,7 +125,7 @@ class ManagerChangeActivity : BaseActivity<ActivityManagerChangeBinding>() {
...
@@ -125,7 +125,7 @@ class ManagerChangeActivity : BaseActivity<ActivityManagerChangeBinding>() {
// 更换账号,进行验证码校验
// 更换账号,进行验证码校验
val
code
=
viewBind
.
etOldCode
.
text
.
toString
()
val
code
=
viewBind
.
etOldCode
.
text
.
toString
()
val
paramsMap
=
HashMap
<
String
,
String
?>()
val
paramsMap
=
HashMap
<
String
,
String
?>()
paramsMap
[
"mobile"
]
=
managerOldMobile
paramsMap
[
"mobile"
]
=
managerOldMobile
.
replace
(
" "
,
""
)
paramsMap
[
"code"
]
=
code
paramsMap
[
"code"
]
=
code
PersonalRemoteDataSource
.
getCheckSmsCode
(
getCheckOldSmsCodeCallBack
,
paramsMap
)
PersonalRemoteDataSource
.
getCheckSmsCode
(
getCheckOldSmsCodeCallBack
,
paramsMap
)
}
}
...
@@ -162,7 +162,7 @@ class ManagerChangeActivity : BaseActivity<ActivityManagerChangeBinding>() {
...
@@ -162,7 +162,7 @@ class ManagerChangeActivity : BaseActivity<ActivityManagerChangeBinding>() {
managerNewMobile
=
viewBind
.
etNewMobile
.
text
.
toString
().
replace
(
" "
,
""
)
managerNewMobile
=
viewBind
.
etNewMobile
.
text
.
toString
().
replace
(
" "
,
""
)
val
code
=
viewBind
.
etNewCode
.
text
.
toString
()
val
code
=
viewBind
.
etNewCode
.
text
.
toString
()
val
paramsMap
=
HashMap
<
String
,
String
?>()
val
paramsMap
=
HashMap
<
String
,
String
?>()
paramsMap
[
"mobile"
]
=
managerNewMobile
paramsMap
[
"mobile"
]
=
managerNewMobile
.
replace
(
" "
,
""
)
paramsMap
[
"code"
]
=
code
paramsMap
[
"code"
]
=
code
// todo 生活号id待赋值
// todo 生活号id待赋值
paramsMap
[
"life_account_id"
]
=
""
paramsMap
[
"life_account_id"
]
=
""
...
@@ -177,7 +177,6 @@ class ManagerChangeActivity : BaseActivity<ActivityManagerChangeBinding>() {
...
@@ -177,7 +177,6 @@ class ManagerChangeActivity : BaseActivity<ActivityManagerChangeBinding>() {
it
.
setSpan
(
ForegroundColorSpan
(
Color
.
parseColor
(
"#1852F1"
)),
28
,
39
,
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
)
it
.
setSpan
(
ForegroundColorSpan
(
Color
.
parseColor
(
"#1852F1"
)),
28
,
39
,
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
)
it
.
setSpan
(
object
:
ClickableSpan
()
{
it
.
setSpan
(
object
:
ClickableSpan
()
{
override
fun
onClick
(
widget
:
View
)
{
override
fun
onClick
(
widget
:
View
)
{
// todo 待修改为用户协议
val
urlMap
=
HashMap
<
String
,
String
>()
val
urlMap
=
HashMap
<
String
,
String
>()
urlMap
[
ProtocolActivity
.
ProtocolUrlKey
]
=
AppConfig
.
privacyPolicyStatement
urlMap
[
ProtocolActivity
.
ProtocolUrlKey
]
=
AppConfig
.
privacyPolicyStatement
XPageManager
.
push
(
XRouterPathConstants
.
PROTOCOL
,
urlMap
)
XPageManager
.
push
(
XRouterPathConstants
.
PROTOCOL
,
urlMap
)
...
@@ -185,7 +184,6 @@ class ManagerChangeActivity : BaseActivity<ActivityManagerChangeBinding>() {
...
@@ -185,7 +184,6 @@ class ManagerChangeActivity : BaseActivity<ActivityManagerChangeBinding>() {
},
28
,
33
,
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
)
},
28
,
33
,
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
)
it
.
setSpan
(
object
:
ClickableSpan
()
{
it
.
setSpan
(
object
:
ClickableSpan
()
{
override
fun
onClick
(
widget
:
View
)
{
override
fun
onClick
(
widget
:
View
)
{
// todo 待修改为隐私政策
val
urlMap
=
HashMap
<
String
,
String
>()
val
urlMap
=
HashMap
<
String
,
String
>()
urlMap
[
ProtocolActivity
.
ProtocolUrlKey
]
=
AppConfig
.
privacyPolicyStatement
urlMap
[
ProtocolActivity
.
ProtocolUrlKey
]
=
AppConfig
.
privacyPolicyStatement
XPageManager
.
push
(
XRouterPathConstants
.
PROTOCOL
,
urlMap
)
XPageManager
.
push
(
XRouterPathConstants
.
PROTOCOL
,
urlMap
)
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/personnel/ui/MyStaffActivity.kt
View file @
dfbc617e
...
@@ -46,12 +46,13 @@ class MyStaffActivity : BaseActivity<ActivityMyStaffBinding>(), IPersonalAccount
...
@@ -46,12 +46,13 @@ class MyStaffActivity : BaseActivity<ActivityMyStaffBinding>(), IPersonalAccount
}
}
private
fun
requestAccountList
()
{
private
fun
requestAccountList
()
{
val
lifeAccountId
=
Hawk
.
get
(
HawkConfig
.
LifeAccountId
,
""
)
val
lifeAccountId
=
Hawk
.
get
(
HawkConfig
.
LifeAccountId
,
0L
)
if
(
lifeAccountId
.
isNotBlank
())
{
//
if (lifeAccountId.isNotBlank()) {
val
paramsMap
=
HashMap
<
String
,
String
?>()
val
paramsMap
=
HashMap
<
String
,
String
?>()
paramsMap
[
"life_account_id"
]
=
lifeAccountId
// paramsMap["life_account_id"] = lifeAccountId.toString()
paramsMap
[
"life_account_id"
]
=
"9018797088604161"
PersonalRemoteDataSource
.
getAccountList
(
this
,
paramsMap
)
PersonalRemoteDataSource
.
getAccountList
(
this
,
paramsMap
)
}
//
}
}
}
private
fun
initView
()
{
private
fun
initView
()
{
...
@@ -61,21 +62,21 @@ class MyStaffActivity : BaseActivity<ActivityMyStaffBinding>(), IPersonalAccount
...
@@ -61,21 +62,21 @@ class MyStaffActivity : BaseActivity<ActivityMyStaffBinding>(), IPersonalAccount
private
fun
initClick
()
{
private
fun
initClick
()
{
// 管理员信息
// 管理员信息
viewBind
.
clManager
.
setOnClickListener
{
//
viewBind.clManager.setOnClickListener {
managerInfo
?.
let
{
//
managerInfo?.let {
val
hashMap
=
HashMap
<
String
,
Any
?>()
//
val hashMap = HashMap<String, Any?>()
hashMap
[
"managerInfo"
]
=
it
//
hashMap["managerInfo"] = it
XPageManager
.
push
(
XRouterPathConstants
.
PERSONAL_MANAGER_INFO
,
hashMap
)
//
XPageManager.push(XRouterPathConstants.PERSONAL_MANAGER_INFO, hashMap)
}
//
}
}
//
}
// 更新管理员
// 更新管理员
viewBind
.
tvChange
.
setOnClickListener
{
//
viewBind.tvChange.setOnClickListener {
managerInfo
?.
let
{
//
managerInfo?.let {
val
hashMap
=
HashMap
<
String
,
String
?>()
//
val hashMap = HashMap<String, String?>()
hashMap
[
"mobile"
]
=
it
.
mobile
//
hashMap["mobile"] = it.mobile
XPageManager
.
push
(
XRouterPathConstants
.
PERSONAL_MANAGER_CHANGE
,
hashMap
)
//
XPageManager.push(XRouterPathConstants.PERSONAL_MANAGER_CHANGE, hashMap)
}
//
}
}
//
}
// 点击添加
// 点击添加
viewBind
.
tvAddStaff
.
setOnClickListener
{
viewBind
.
tvAddStaff
.
setOnClickListener
{
XPageManager
.
push
(
XRouterPathConstants
.
PERSONAL_ADD_STAFF
,
null
)
XPageManager
.
push
(
XRouterPathConstants
.
PERSONAL_ADD_STAFF
,
null
)
...
...
Components/newscontent/src/main/java/com/yidian/shenghuoquan/newscontent/ui/center/MerchantCenterActivity.kt
View file @
dfbc617e
...
@@ -93,6 +93,10 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(),
...
@@ -93,6 +93,10 @@ class MerchantCenterActivity : BaseActivity<ActivityMerchantCenterBinding>(),
// 本期需求无资产功能 仅做UI展示
// 本期需求无资产功能 仅做UI展示
viewBind
.
avMerchantAsset
.
setMerchantAssetData
(
"8856.88"
,
"675.00"
)
viewBind
.
avMerchantAsset
.
setMerchantAssetData
(
"8856.88"
,
"675.00"
)
// todo 测试代码
viewBind
.
avMerchantAsset
.
setOnClickListener
{
XPageManager
.
push
(
XRouterPathConstants
.
PERSONAL_MY_STAFF
,
null
)
}
}
}
private
fun
initListener
()
{
private
fun
initListener
()
{
...
...
Components/newscontent/src/main/res/layout/activity_my_staff.xml
View file @
dfbc617e
...
@@ -54,6 +54,7 @@
...
@@ -54,6 +54,7 @@
android:text=
"更换"
android:text=
"更换"
android:textColor=
"@color/color_333333"
android:textColor=
"@color/color_333333"
android:textSize=
"14sp"
android:textSize=
"14sp"
android:visibility=
"invisible"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"1"
app:layout_constraintHorizontal_bias=
"1"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment