Skip to content
项目
Groups
代码片段
帮助
正在加载...
Sign in / Register
Toggle navigation
W
workoffice
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图表
统计图
Create a new issue
作业
提交
议题看板
Open sidebar
冷广德
workoffice
Commits
1182eaf1
提交
1182eaf1
authored
6月 05, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.我的页面样式
2.//TODO 坩埚下单,mes其他页面,mes用户反馈空也展示,编辑任务担当无法修改
上级
5d81ede7
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
130 行增加
和
6 行删除
+130
-6
UserInfoActivity.java
.../com/wd/workoffice/ui/activity/user/UserInfoActivity.java
+9
-1
UserSettingActivity.java
...m/wd/workoffice/ui/activity/user/UserSettingActivity.java
+6
-0
MyFragment.java
app/src/main/java/com/wd/workoffice/ui/fg/MyFragment.java
+21
-1
UserKeeper.java
app/src/main/java/com/wd/workoffice/util/UserKeeper.java
+61
-3
fg_my.xml
app/src/main/res/layout/fg_my.xml
+33
-1
没有找到文件。
app/src/main/java/com/wd/workoffice/ui/activity/user/UserInfoActivity.java
浏览文件 @
1182eaf1
package
com
.
wd
.
workoffice
.
ui
.
activity
.
user
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.widget.TextView
;
import
com.alibaba.fastjson.JSON
;
...
...
@@ -39,13 +40,20 @@ public class UserInfoActivity extends WorkToolBarActivity {
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
if
(!
TextUtils
.
isEmpty
(
UserKeeper
.
getInstance
().
getLoginInfo
()))
{
String
userInfo
=
UserKeeper
.
getInstance
().
getUserInfo
();
if
(!
TextUtils
.
isEmpty
(
userInfo
))
{
UserInfoBean
userInfoBean
=
JSON
.
parseObject
(
userInfo
,
UserInfoBean
.
class
);
tvName
.
setText
(
userInfoBean
.
getUserName
());
tvPhone
.
setText
(
userInfoBean
.
getPhone
());
tvNo
.
setText
(
userInfoBean
.
getErpId
());
tvDep
.
setText
(
userInfoBean
.
getOfDept
().
getName
()
);
tvDep
.
setText
(
userInfoBean
.
getOfDept
().
getName
());
}
}
else
{
tvName
.
setText
(
UserKeeper
.
getInstance
().
getMesNickName
());
tvPhone
.
setText
(
UserKeeper
.
getInstance
().
getMesMobile
());
tvNo
.
setText
(
UserKeeper
.
getInstance
().
getMesUserCode
());
tvDep
.
setText
(
UserKeeper
.
getInstance
().
getMesDep
());
}
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/user/UserSettingActivity.java
浏览文件 @
1182eaf1
...
...
@@ -57,12 +57,18 @@ public class UserSettingActivity extends WorkToolBarActivity {
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
if
(!
TextUtils
.
isEmpty
(
UserKeeper
.
getInstance
().
getLoginInfo
()))
{
String
userInfo
=
UserKeeper
.
getInstance
().
getUserInfo
();
if
(!
TextUtils
.
isEmpty
(
userInfo
))
{
UserInfoBean
userInfoBean
=
JSON
.
parseObject
(
userInfo
,
UserInfoBean
.
class
);
tvName
.
setText
(
userInfoBean
.
getUserName
());
tvPhone
.
setText
(
userInfoBean
.
getPhone
());
}
}
else
{
rlPwd
.
setVisibility
(
View
.
GONE
);
tvName
.
setText
(
UserKeeper
.
getInstance
().
getMesNickName
());
tvPhone
.
setText
(
UserKeeper
.
getInstance
().
getMesMobile
());
}
}
@Override
...
...
app/src/main/java/com/wd/workoffice/ui/fg/MyFragment.java
浏览文件 @
1182eaf1
package
com
.
wd
.
workoffice
.
ui
.
fg
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
...
...
@@ -36,13 +37,29 @@ public class MyFragment extends WorkBaseFg {
LinearLayout
llSetting
;
@BindView
(
R
.
id
.
tv_dep
)
TextView
tvDep
;
@BindView
(
R
.
id
.
ll_money
)
LinearLayout
llMoney
;
@BindView
(
R
.
id
.
ll_mes_setting
)
LinearLayout
llMesSetting
;
@Override
protected
void
initView
()
{
ButterKnife
.
bind
(
this
,
getContentView
());
if
(!
TextUtils
.
isEmpty
(
UserKeeper
.
getInstance
().
getLoginInfo
()))
{
tvNo
.
setText
(
"员工编号:"
+
UserKeeper
.
getInstance
().
getUserErpId
());
tvName
.
setText
(
UserKeeper
.
getInstance
().
getUserNickName
());
tvDep
.
setText
(
UserKeeper
.
getInstance
().
getUserDepName
());
if
(!
UserKeeper
.
getInstance
().
getMesLogin
())
{
llMesSetting
.
setVisibility
(
View
.
GONE
);
}
}
else
{
tvNo
.
setText
(
"员工编号:"
+
UserKeeper
.
getInstance
().
getMesUserCode
());
tvName
.
setText
(
UserKeeper
.
getInstance
().
getMesNickName
());
tvDep
.
setText
(
UserKeeper
.
getInstance
().
getMesDep
());
llSetting
.
setVisibility
(
View
.
GONE
);
llRole
.
setVisibility
(
View
.
GONE
);
llMoney
.
setVisibility
(
View
.
GONE
);
}
}
...
...
@@ -61,7 +78,7 @@ public class MyFragment extends WorkBaseFg {
}
@OnClick
({
R
.
id
.
ll_
role
,
R
.
id
.
ll_money
,
R
.
id
.
ll_info
,
R
.
id
.
ll_setting
})
@OnClick
({
R
.
id
.
ll_
mes_setting
,
R
.
id
.
ll_role
,
R
.
id
.
ll_money
,
R
.
id
.
ll_info
,
R
.
id
.
ll_setting
})
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
ll_role
:
...
...
@@ -73,6 +90,9 @@ public class MyFragment extends WorkBaseFg {
case
R
.
id
.
ll_setting
:
startActivity
(
UserSettingActivity
.
class
);
break
;
case
R
.
id
.
ll_mes_setting
:
startActivity
(
UserSettingActivity
.
class
);
break
;
case
R
.
id
.
ll_money
:
startActivity
(
UserMoneyActivity
.
class
);
break
;
...
...
app/src/main/java/com/wd/workoffice/util/UserKeeper.java
浏览文件 @
1182eaf1
...
...
@@ -93,6 +93,17 @@ public class UserKeeper {
/**
* mes的用户信息
* {
* "userId": "91c7f1d7722d11ea8334fa163e1166bd",
* "name": "吴同得",
* "cardid": "91c7f1d7722d11ea8334fa163e1166bd",
* "roleid": "",
* "rolename": "",
* "userCode": "wtd",
* "departmentId": "1c37c889ffa211e98334fa163e1166bd",
* "departmentName": "铝碳厂",
* "mobile": "1"
* },
*
* @param info
*/
...
...
@@ -107,6 +118,7 @@ public class UserKeeper {
public
void
clearMesLoginInfo
()
{
sp
.
put
(
MES_LOGIN_INFO
,
""
);
}
/**
* mes的用户id
*
...
...
@@ -115,14 +127,15 @@ public class UserKeeper {
public
String
getMesUid
()
{
JSONObject
mesInfo
=
JSON
.
parseObject
(
getMesLoginInfo
());
if
(!
TextUtils
.
isEmpty
(
getMesLoginInfo
())){
if
(!
TextUtils
.
isEmpty
(
getMesLoginInfo
()))
{
return
mesInfo
.
getString
(
"userId"
);
}
return
""
;
}
public
String
getMesErpId
()
{
JSONObject
mesInfo
=
JSON
.
parseObject
(
getMesLoginInfo
());
if
(!
TextUtils
.
isEmpty
(
getMesLoginInfo
())){
if
(!
TextUtils
.
isEmpty
(
getMesLoginInfo
()))
{
return
mesInfo
.
getString
(
"userCode"
);
}
return
""
;
...
...
@@ -130,6 +143,7 @@ public class UserKeeper {
/**
* bat 用户信息
*
* @param info
*/
public
void
keepLoginInfo
(
String
info
)
{
...
...
@@ -206,7 +220,7 @@ public class UserKeeper {
return
""
;
}
UserInfoBean
infoBean
=
JSON
.
parseObject
(
sp
.
getString
(
USER_INFO
),
UserInfoBean
.
class
);
if
(
infoBean
==
null
)
{
if
(
infoBean
==
null
)
{
return
""
;
}
return
infoBean
.
getOfDeptRuler
();
...
...
@@ -256,6 +270,50 @@ public class UserKeeper {
return
infoBean
.
getNickName
();
}
public
String
getMesNickName
()
{
if
(
TextUtils
.
isEmpty
(
sp
.
getString
(
MES_LOGIN_INFO
)))
{
return
""
;
}
JSONObject
infoBean
=
JSON
.
parseObject
(
sp
.
getString
(
MES_LOGIN_INFO
));
if
(
infoBean
==
null
)
{
return
""
;
}
return
infoBean
.
getString
(
"name"
);
}
public
String
getMesDep
()
{
if
(
TextUtils
.
isEmpty
(
sp
.
getString
(
MES_LOGIN_INFO
)))
{
return
""
;
}
JSONObject
infoBean
=
JSON
.
parseObject
(
sp
.
getString
(
MES_LOGIN_INFO
));
if
(
infoBean
==
null
)
{
return
""
;
}
return
infoBean
.
getString
(
"departmentName"
);
}
public
String
getMesUserCode
()
{
if
(
TextUtils
.
isEmpty
(
sp
.
getString
(
MES_LOGIN_INFO
)))
{
return
""
;
}
JSONObject
infoBean
=
JSON
.
parseObject
(
sp
.
getString
(
MES_LOGIN_INFO
));
if
(
infoBean
==
null
)
{
return
""
;
}
return
infoBean
.
getString
(
"userCode"
);
}
public
String
getMesMobile
()
{
if
(
TextUtils
.
isEmpty
(
sp
.
getString
(
MES_LOGIN_INFO
)))
{
return
""
;
}
JSONObject
infoBean
=
JSON
.
parseObject
(
sp
.
getString
(
MES_LOGIN_INFO
));
if
(
infoBean
==
null
)
{
return
""
;
}
return
infoBean
.
getString
(
"mobile"
);
}
public
void
clearAll
()
{
clearLoginInfo
();
clearUserInfo
();
...
...
app/src/main/res/layout/fg_my.xml
浏览文件 @
1182eaf1
...
...
@@ -178,7 +178,39 @@
android:layout_gravity=
"center"
android:layout_marginLeft=
"10mm"
android:layout_weight=
"1"
android:text=
"系统设置"
android:text=
"BAT系统设置"
android:textSize=
"16sp"
/>
<ImageView
android:layout_width=
"20mm"
android:layout_height=
"20mm"
android:background=
"@mipmap/arrow_right_my"
/>
</LinearLayout>
<View
style=
"@style/dividerX"
android:layout_marginHorizontal=
"26mm"
/>
<LinearLayout
android:id=
"@+id/ll_mes_setting"
style=
"@style/llStyle"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<ImageView
android:layout_width=
"24mm"
android:layout_height=
"24mm"
android:background=
"@mipmap/my_setting"
/>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginLeft=
"10mm"
android:layout_weight=
"1"
android:text=
"MES系统设置"
android:textSize=
"16sp"
/>
<ImageView
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论