提交 2c77faf1 authored 作者: lgd's avatar lgd

1.erp用户激活bug

2.//TODO ,质检接口数据无对应问题,内部交易订单审核,审核规则,领用申请列表/退件列表/参数,坩埚下单,mes其他页面,mes质量反馈,编辑任务担当无法修改.
上级 4a46cea3
package com.wd.workoffice.ui.activity.login; package com.wd.workoffice.ui.activity.login;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable; import android.text.Editable;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.view.View;
import android.widget.Button; import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R; import com.wd.workoffice.R;
...@@ -12,15 +17,15 @@ import com.wd.workoffice.app.BaseBean; ...@@ -12,15 +17,15 @@ import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.Config; import com.wd.workoffice.app.Config;
import com.wd.workoffice.app.WorkToolBarActivity; import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.ActivationUserBean; import com.wd.workoffice.bean.ActivationUserBean;
import com.wd.workoffice.bean.FlowBean; import com.wd.workoffice.bean.DepBean;
import com.wd.workoffice.retrofit.RtfUtils; import com.wd.workoffice.retrofit.RtfUtils;
import com.wd.workoffice.retrofit.WorkObserver; import com.wd.workoffice.retrofit.WorkObserver;
import com.wd.workoffice.util.WorkUtils; import com.wd.workoffice.util.WorkUtils;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import androidx.annotation.Nullable;
import butterknife.BindView; import butterknife.BindView;
import butterknife.ButterKnife; import butterknife.ButterKnife;
import butterknife.OnClick; import butterknife.OnClick;
...@@ -41,7 +46,15 @@ public class ErpActivationTwoActivity extends WorkToolBarActivity { ...@@ -41,7 +46,15 @@ public class ErpActivationTwoActivity extends WorkToolBarActivity {
EditText etConfirmPwd; EditText etConfirmPwd;
@BindView(R.id.btn_next) @BindView(R.id.btn_next)
Button btnNext; 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 Map<String, Object> param;
private Integer depId;
private DepBean dep;
@Override @Override
protected void initView() { protected void initView() {
...@@ -132,32 +145,6 @@ public class ErpActivationTwoActivity extends WorkToolBarActivity { ...@@ -132,32 +145,6 @@ public class ErpActivationTwoActivity extends WorkToolBarActivity {
} }
@OnClick(R.id.btn_next)
public void onViewClicked() {
String name = etName.getText().toString();
String pwd = etPwd.getText().toString();
String confirmPwd = etConfirmPwd.getText().toString();
if (!RegexUtils.isMatch(Config.REGEX_USERNAME, name)) {
toast("账号名称数字和字母4-16位");
return;
}
if (!RegexUtils.isMatch(Config.REGEX_PASSWORD, pwd)) {
toast("设置密码数字或字母6-16位");
return;
}
if (TextUtils.equals(pwd, "123456")) {
toast("密码不能为123456");
return;
}
if (!TextUtils.equals(pwd, confirmPwd)) {
toast("两次输入的密码不一致");
return;
}
param.put("userName", name);
param.put("password", pwd);
submit();
}
private void submit() { private void submit() {
RtfUtils.getRtf().activation(WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() { RtfUtils.getRtf().activation(WorkUtils.convertMapToBody(param)).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
@Override @Override
...@@ -183,4 +170,64 @@ public class ErpActivationTwoActivity extends WorkToolBarActivity { ...@@ -183,4 +170,64 @@ public class ErpActivationTwoActivity extends WorkToolBarActivity {
} }
}); });
} }
@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();
if (!RegexUtils.isMatch(Config.REGEX_USERNAME, name)) {
toast("账号名称数字和字母4-16位");
return;
}
if (!RegexUtils.isMatch(Config.REGEX_PASSWORD, pwd)) {
toast("设置密码数字或字母6-16位");
return;
}
if (TextUtils.equals(pwd, "123456")) {
toast("密码不能为123456");
return;
}
if (!TextUtils.equals(pwd, confirmPwd)) {
toast("两次输入的密码不一致");
return;
}
if (dep == null) {
toast("请选择部门");
return;
}
param.put("userName", name);
param.put("password", pwd);
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());
}
submit();
break;
case R.id.tv_go_protocol:
break;
}
}
@Override
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);
}
}
} }
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
android:layout_marginLeft="10mm" android:layout_marginLeft="10mm"
android:layout_weight="1" android:layout_weight="1"
android:background="@null" android:background="@null"
android:inputType="phone"
android:hint="输入手机号检测是否为ERP员工" android:hint="输入手机号检测是否为ERP员工"
android:textSize="12sp" /> android:textSize="12sp" />
...@@ -141,7 +142,7 @@ ...@@ -141,7 +142,7 @@
android:background="@null" android:background="@null"
android:gravity="center_vertical" android:gravity="center_vertical"
android:hint="输入验证码" android:hint="输入验证码"
android:inputType="textPassword" android:inputType="number"
android:textColorHint="@color/flexible_text_sup" android:textColorHint="@color/flexible_text_sup"
android:textSize="14sp" /> android:textSize="14sp" />
......
...@@ -86,6 +86,35 @@ ...@@ -86,6 +86,35 @@
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
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" />
<EditText
android:id="@+id/et_confirm_pwd"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_marginLeft="10mm"
android:layout_weight="1"
android:inputType="textPassword"
android:background="@null"
android:hint="再次确认密码"
android:textSize="12sp" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_dep"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50mm" android:layout_height="50mm"
android:layout_centerInParent="true" android:layout_centerInParent="true"
...@@ -99,20 +128,22 @@ ...@@ -99,20 +128,22 @@
android:layout_marginLeft="13mm" android:layout_marginLeft="13mm"
android:background="@mipmap/login_pwd" /> android:background="@mipmap/login_pwd" />
<EditText <TextView
android:id="@+id/et_confirm_pwd" android:id="@+id/tv_dep"
android:layout_width="0dp" android:layout_width="0dp"
android:gravity="center_vertical"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="10mm" android:layout_marginLeft="10mm"
android:layout_weight="1" android:layout_weight="1"
android:inputType="textPassword" android:hint="选择部门"
android:background="@null"
android:hint="再次确认密码"
android:textSize="12sp" /> android:textSize="12sp" />
<ImageView
android:layout_width="20mm"
android:layout_height="20mm"
android:layout_marginLeft="13mm"
android:background="@mipmap/arrow_right" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<Button <Button
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论