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
2c77faf1
提交
2c77faf1
authored
5月 07, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.erp用户激活bug
2.//TODO ,质检接口数据无对应问题,内部交易订单审核,审核规则,领用申请列表/退件列表/参数,坩埚下单,mes其他页面,mes质量反馈,编辑任务担当无法修改.
上级
4a46cea3
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
105 行增加
和
26 行删除
+105
-26
ErpActivationTwoActivity.java
...orkoffice/ui/activity/login/ErpActivationTwoActivity.java
+72
-25
activity_erp_activation_one.xml
app/src/main/res/layout/activity_erp_activation_one.xml
+2
-1
activity_erp_activation_two.xml
app/src/main/res/layout/activity_erp_activation_two.xml
+31
-0
没有找到文件。
app/src/main/java/com/wd/workoffice/ui/activity/login/ErpActivationTwoActivity.java
浏览文件 @
2c77faf1
package
com
.
wd
.
workoffice
.
ui
.
activity
.
login
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.text.Editable
;
import
android.text.TextUtils
;
import
android.text.TextWatcher
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.EditText
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
com.alibaba.fastjson.JSON
;
import
com.wd.workoffice.R
;
...
...
@@ -12,15 +17,15 @@ import com.wd.workoffice.app.BaseBean;
import
com.wd.workoffice.app.Config
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.ActivationUserBean
;
import
com.wd.workoffice.bean.
Flow
Bean
;
import
com.wd.workoffice.bean.
Dep
Bean
;
import
com.wd.workoffice.retrofit.RtfUtils
;
import
com.wd.workoffice.retrofit.WorkObserver
;
import
com.wd.workoffice.util.WorkUtils
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
androidx.annotation.Nullable
;
import
butterknife.BindView
;
import
butterknife.ButterKnife
;
import
butterknife.OnClick
;
...
...
@@ -41,7 +46,15 @@ public class ErpActivationTwoActivity extends WorkToolBarActivity {
EditText
etConfirmPwd
;
@BindView
(
R
.
id
.
btn_next
)
Button
btnNext
;
@BindView
(
R
.
id
.
tv_dep
)
TextView
tvDep
;
@BindView
(
R
.
id
.
ll_dep
)
LinearLayout
llDep
;
@BindView
(
R
.
id
.
tv_go_protocol
)
TextView
tvGoProtocol
;
private
Map
<
String
,
Object
>
param
;
private
Integer
depId
;
private
DepBean
dep
;
@Override
protected
void
initView
()
{
...
...
@@ -132,8 +145,40 @@ public class ErpActivationTwoActivity extends WorkToolBarActivity {
}
@OnClick
(
R
.
id
.
btn_next
)
public
void
onViewClicked
()
{
private
void
submit
()
{
RtfUtils
.
getRtf
().
activation
(
WorkUtils
.
convertMapToBody
(
param
)).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
@Override
public
void
onFail
(
String
errorMsg
)
{
hideLoading
();
toast
(
errorMsg
);
}
@Override
public
void
onSuccess
(
BaseBean
data
)
{
hideLoading
();
if
(
data
.
getCode
()
!=
0
)
{
toast
(
data
.
getMessage
());
return
;
}
finish
();
toast
(
data
.
getMessage
());
startActivity
(
LoginActivity
.
class
);
}
});
}
@OnClick
({
R
.
id
.
ll_dep
,
R
.
id
.
btn_next
,
R
.
id
.
tv_go_protocol
})
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
case
R
.
id
.
ll_dep
:
startActivityForResult
(
UserRegisterDepActivity
.
class
,
10001
);
break
;
case
R
.
id
.
btn_next
:
String
name
=
etName
.
getText
().
toString
();
String
pwd
=
etPwd
.
getText
().
toString
();
String
confirmPwd
=
etConfirmPwd
.
getText
().
toString
();
...
...
@@ -153,34 +198,36 @@ public class ErpActivationTwoActivity extends WorkToolBarActivity {
toast
(
"两次输入的密码不一致"
);
return
;
}
if
(
dep
==
null
)
{
toast
(
"请选择部门"
);
return
;
}
param
.
put
(
"userName"
,
name
);
param
.
put
(
"password"
,
pwd
);
submit
();
param
.
put
(
"ofRegisterNewDept"
,
dep
.
getOfRegisterNewDept
());
if
(
dep
.
getOfRegisterNewDept
()
==
1
)
{
param
.
put
(
"newDeptName"
,
dep
.
getName
());
param
.
put
(
"newDeptErpId"
,
dep
.
getCode
());
param
.
put
(
"newDeptType"
,
dep
.
getType
());
}
else
{
param
.
put
(
"deptId"
,
dep
.
getId
());
}
private
void
submit
()
{
RtfUtils
.
getRtf
().
activation
(
WorkUtils
.
convertMapToBody
(
param
)).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
submit
();
break
;
case
R
.
id
.
tv_go_protocol
:
break
;
}
@Override
public
void
onFail
(
String
errorMsg
)
{
hideLoading
();
toast
(
errorMsg
);
}
@Override
public
void
onSuccess
(
BaseBean
data
)
{
hideLoading
();
if
(
data
.
getCode
()
!=
0
)
{
toast
(
data
.
getMessage
());
return
;
}
finish
();
toast
(
data
.
getMessage
());
startActivity
(
LoginActivity
.
class
);
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
@Nullable
Intent
data
)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
if
(
requestCode
==
10001
&&
resultCode
==
10001
)
{
String
depName
=
data
.
getStringExtra
(
"depName"
);
depId
=
data
.
getIntExtra
(
"id"
,
0
);
tvDep
.
setText
(
depName
);
dep
=
JSON
.
parseObject
(
data
.
getStringExtra
(
"dep"
),
DepBean
.
class
);
}
});
}
}
app/src/main/res/layout/activity_erp_activation_one.xml
浏览文件 @
2c77faf1
...
...
@@ -50,6 +50,7 @@
android:layout_marginLeft=
"10mm"
android:layout_weight=
"1"
android:background=
"@null"
android:inputType=
"phone"
android:hint=
"输入手机号检测是否为ERP员工"
android:textSize=
"12sp"
/>
...
...
@@ -141,7 +142,7 @@
android:background=
"@null"
android:gravity=
"center_vertical"
android:hint=
"输入验证码"
android:inputType=
"
textPassword
"
android:inputType=
"
number
"
android:textColorHint=
"@color/flexible_text_sup"
android:textSize=
"14sp"
/>
...
...
app/src/main/res/layout/activity_erp_activation_two.xml
浏览文件 @
2c77faf1
...
...
@@ -113,6 +113,37 @@
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_dep"
android:layout_width=
"match_parent"
android:layout_height=
"50mm"
android:layout_centerInParent=
"true"
android:layout_marginTop=
"20mm"
android:background=
"@drawable/shape_login_et"
android:gravity=
"center_vertical"
>
<ImageView
android:layout_width=
"20mm"
android:layout_height=
"20mm"
android:layout_marginLeft=
"13mm"
android:background=
"@mipmap/login_pwd"
/>
<TextView
android:id=
"@+id/tv_dep"
android:layout_width=
"0dp"
android:gravity=
"center_vertical"
android:layout_height=
"match_parent"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10mm"
android:layout_weight=
"1"
android:hint=
"选择部门"
android:textSize=
"12sp"
/>
<ImageView
android:layout_width=
"20mm"
android:layout_height=
"20mm"
android:layout_marginLeft=
"13mm"
android:background=
"@mipmap/arrow_right"
/>
</LinearLayout>
</LinearLayout>
<Button
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论