|
@@ -1,17 +1,36 @@
|
|
|
package com.sheep.groups.creditcard;
|
|
package com.sheep.groups.creditcard;
|
|
|
|
|
|
|
|
|
|
+import android.app.DatePickerDialog;
|
|
|
import android.content.Context;
|
|
import android.content.Context;
|
|
|
import android.os.Bundle;
|
|
import android.os.Bundle;
|
|
|
import android.support.annotation.Nullable;
|
|
import android.support.annotation.Nullable;
|
|
|
import android.support.v7.widget.AppCompatSpinner;
|
|
import android.support.v7.widget.AppCompatSpinner;
|
|
|
|
|
+import android.text.TextUtils;
|
|
|
import android.view.View;
|
|
import android.view.View;
|
|
|
|
|
+import android.widget.AdapterView;
|
|
|
import android.widget.ArrayAdapter;
|
|
import android.widget.ArrayAdapter;
|
|
|
|
|
+import android.widget.Button;
|
|
|
|
|
+import android.widget.CheckBox;
|
|
|
|
|
+import android.widget.CompoundButton;
|
|
|
|
|
+import android.widget.DatePicker;
|
|
|
|
|
+import android.widget.RadioGroup;
|
|
|
|
|
+import android.widget.Spinner;
|
|
|
|
|
+import android.widget.TextView;
|
|
|
|
|
+import android.widget.Toast;
|
|
|
|
|
|
|
|
import com.kfzs.libs.DaggerFragment;
|
|
import com.kfzs.libs.DaggerFragment;
|
|
|
import com.kfzs.libs.IPresenter;
|
|
import com.kfzs.libs.IPresenter;
|
|
|
import com.kfzs.libs.IView;
|
|
import com.kfzs.libs.IView;
|
|
|
import com.kfzs.libs.widget.CompleteCommitEditText;
|
|
import com.kfzs.libs.widget.CompleteCommitEditText;
|
|
|
|
|
+import com.kfzs.libs.widget.alpha.AlphaButton;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
|
|
+import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
|
|
+
|
|
|
|
|
+import java.util.Calendar;
|
|
|
|
|
+import java.util.HashMap;
|
|
|
|
|
+import java.util.Map;
|
|
|
|
|
+
|
|
|
|
|
+import javax.inject.Inject;
|
|
|
|
|
|
|
|
import butterknife.BindView;
|
|
import butterknife.BindView;
|
|
|
import butterknife.OnClick;
|
|
import butterknife.OnClick;
|
|
@@ -20,12 +39,8 @@ import butterknife.OnClick;
|
|
|
* Created by guoxin on 2018/4/2.
|
|
* Created by guoxin on 2018/4/2.
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
-public class ApplyForCreditCardDetailsFragment extends DaggerFragment{
|
|
|
|
|
|
|
+public class ApplyForCreditCardDetailsFragment extends DaggerFragment implements DetailsContact.View{
|
|
|
|
|
|
|
|
- @BindView(R.id.sp_relationship_immediate_relatives)
|
|
|
|
|
- AppCompatSpinner spRelationshipImmediateRelatives;
|
|
|
|
|
- @BindView(R.id.sp_relationship_other)
|
|
|
|
|
- AppCompatSpinner spRelationshipOther;
|
|
|
|
|
|
|
|
|
|
@BindView(R.id.et_city)
|
|
@BindView(R.id.et_city)
|
|
|
CompleteCommitEditText etCity;
|
|
CompleteCommitEditText etCity;
|
|
@@ -55,8 +70,8 @@ public class ApplyForCreditCardDetailsFragment extends DaggerFragment{
|
|
|
CompleteCommitEditText etOtherName;
|
|
CompleteCommitEditText etOtherName;
|
|
|
@BindView(R.id.et_other_r_mobile)
|
|
@BindView(R.id.et_other_r_mobile)
|
|
|
CompleteCommitEditText etOtherMobile;
|
|
CompleteCommitEditText etOtherMobile;
|
|
|
- @BindView(R.id.et_id_no_expire)
|
|
|
|
|
- CompleteCommitEditText etIdCardExpire;
|
|
|
|
|
|
|
+ @BindView(R.id.tv_id_no_expire)
|
|
|
|
|
+ TextView tvIdCardExpire;
|
|
|
@BindView(R.id.et_car_no)
|
|
@BindView(R.id.et_car_no)
|
|
|
CompleteCommitEditText etCarNo;
|
|
CompleteCommitEditText etCarNo;
|
|
|
@BindView(R.id.et_home_q)
|
|
@BindView(R.id.et_home_q)
|
|
@@ -66,7 +81,26 @@ public class ApplyForCreditCardDetailsFragment extends DaggerFragment{
|
|
|
@BindView(R.id.et_qq)
|
|
@BindView(R.id.et_qq)
|
|
|
CompleteCommitEditText etQQ;
|
|
CompleteCommitEditText etQQ;
|
|
|
|
|
|
|
|
|
|
+ @BindView(R.id.rg_marray)
|
|
|
|
|
+ RadioGroup rgMarray;
|
|
|
|
|
+ @BindView(R.id.cb_agreement)
|
|
|
|
|
+ CheckBox cbAgreement;
|
|
|
|
|
+ @BindView(R.id.sp_relationship_immediate_relatives)
|
|
|
|
|
+ AppCompatSpinner spImmediateRelationship;
|
|
|
|
|
+ @BindView(R.id.sp_relationship_other)
|
|
|
|
|
+ AppCompatSpinner spOtherRelationship;
|
|
|
|
|
+ @BindView(R.id.cb_expire)
|
|
|
|
|
+ CheckBox cbExpire;
|
|
|
|
|
+
|
|
|
|
|
+ @BindView(R.id.btn_next)
|
|
|
|
|
+ AlphaButton btnNext;
|
|
|
|
|
+
|
|
|
|
|
+ @Inject
|
|
|
|
|
+ DetailsPresenter presenter;
|
|
|
OnNextStepCallback onNextStepCallback;
|
|
OnNextStepCallback onNextStepCallback;
|
|
|
|
|
+ private ArrayAdapter<CharSequence> adapterImmediateRelatives;
|
|
|
|
|
+ private ArrayAdapter<CharSequence> adapterOther;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public void onAttach(Context context) {
|
|
public void onAttach(Context context) {
|
|
|
super.onAttach(context);
|
|
super.onAttach(context);
|
|
@@ -79,17 +113,17 @@ public class ApplyForCreditCardDetailsFragment extends DaggerFragment{
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void setupDaggerComponent() {
|
|
public void setupDaggerComponent() {
|
|
|
-
|
|
|
|
|
|
|
+ DaggerDetailsComponent.builder().httpComponent(SheepApp.getInstance().getHttpComponent()).build().inject(this);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public IPresenter currentPresenter() {
|
|
public IPresenter currentPresenter() {
|
|
|
- return null;
|
|
|
|
|
|
|
+ return presenter;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public IView currentIView() {
|
|
public IView currentIView() {
|
|
|
- return null;
|
|
|
|
|
|
|
+ return this;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -100,16 +134,345 @@ public class ApplyForCreditCardDetailsFragment extends DaggerFragment{
|
|
|
@Override
|
|
@Override
|
|
|
public void setupViews(@Nullable Bundle savedInstanceState) {
|
|
public void setupViews(@Nullable Bundle savedInstanceState) {
|
|
|
|
|
|
|
|
- ArrayAdapter<CharSequence> adapterImmediateRelatives = ArrayAdapter.createFromResource(activity, R.array.credit_card_relationship_immediate_relatives_type, R.layout.spinner_text_item);
|
|
|
|
|
- spRelationshipImmediateRelatives.setAdapter(adapterImmediateRelatives);
|
|
|
|
|
|
|
+ adapterImmediateRelatives = ArrayAdapter.createFromResource(activity, R.array.credit_card_relationship_immediate_relatives_type, R.layout.spinner_text_item);
|
|
|
|
|
+ spImmediateRelationship.setAdapter(adapterImmediateRelatives);
|
|
|
|
|
+
|
|
|
|
|
+ adapterOther = ArrayAdapter.createFromResource(activity, R.array.credit_card_relationship_other_type, R.layout.spinner_text_item);
|
|
|
|
|
+ spOtherRelationship.setAdapter(adapterOther);
|
|
|
|
|
+
|
|
|
|
|
+ //
|
|
|
|
|
+ setOnCompleteEdit(etCity,"p_city");
|
|
|
|
|
+ setOnCompleteEdit(etAddress,"p_address");
|
|
|
|
|
+ setOnCompleteEdit(etEmail,"p_email");
|
|
|
|
|
+ //p_marray
|
|
|
|
|
+ rgMarray.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onCheckedChanged(RadioGroup group, int checkedId) {
|
|
|
|
|
+ String value = (String) group.findViewById(group.getCheckedRadioButtonId()).getTag();
|
|
|
|
|
+// if(checkedId == R.id.rb_marray_n){
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
+// else if(checkedId == R.id.rb_marray_y){
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
+// else if(checkedId == R.id.rb_marray_o){
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
+ presenter.commitFormData("p_marray",value,CreditCardInfosManager.getInstance().card_id);
|
|
|
|
|
+ CreditCardInfosManager.getInstance().p_marray = value;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ setOnCompleteEdit(etEducation,"p_edu");
|
|
|
|
|
+ setOnCompleteEdit(etCompanyName,"w_name");
|
|
|
|
|
+ setOnCompleteEdit(etCompanyCity,"w_city");
|
|
|
|
|
+ setOnCompleteEdit(etCompanyAddress,"w_address");
|
|
|
|
|
+ setOnCompleteEditDouble(etCompanyPhoneNo,etCompanyPhoneQ,"w_tel");//要取得两个值,所以单独设置
|
|
|
|
|
+// setOnCompleteEdit(etCompanyPhoneQ,"p_city");
|
|
|
|
|
+ setOnCompleteEdit(etWorkYear,"w_age");
|
|
|
|
|
+ setOnCompleteEdit(etIRName,"c_d_name");
|
|
|
|
|
+ setOnCompleteEdit(etIRMobile,"c_d_mobile");
|
|
|
|
|
+ //c_d_relation
|
|
|
|
|
+ spImmediateRelationship.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
|
|
|
|
+ String value = (String) adapterImmediateRelatives.getItem(position);
|
|
|
|
|
+ CreditCardInfosManager.getInstance().c_d_relation = value;
|
|
|
|
|
+ presenter.commitFormData("c_d_relation",value,CreditCardInfosManager.getInstance().card_id);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onNothingSelected(AdapterView<?> parent) {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ //c_o_relation
|
|
|
|
|
+ spOtherRelationship.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
|
|
|
|
+ String value = (String) adapterOther.getItem(position);
|
|
|
|
|
+ CreditCardInfosManager.getInstance().c_d_relation = value;
|
|
|
|
|
+ presenter.commitFormData("c_o_relation",value,CreditCardInfosManager.getInstance().card_id);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onNothingSelected(AdapterView<?> parent) {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ setOnCompleteEdit(etOtherName,"c_o_name");
|
|
|
|
|
+ setOnCompleteEdit(etOtherMobile,"c_o_mobile");
|
|
|
|
|
+ tvIdCardExpire.setOnClickListener(new View.OnClickListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onClick(View v) {
|
|
|
|
|
+ //显示日历,key为c_id_expire
|
|
|
|
|
+ showDatePicker();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ //c_id_expire
|
|
|
|
|
+ cbExpire.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
|
|
|
|
+ tvIdCardExpire.setVisibility(isChecked ? View.GONE : View.VISIBLE);
|
|
|
|
|
+ if(isChecked){
|
|
|
|
|
+ String expire = "2099-12-31";
|
|
|
|
|
+ CreditCardInfosManager.getInstance().c_id_expire = expire;
|
|
|
|
|
+ presenter.commitFormData("c_id_expire",expire,CreditCardInfosManager.getInstance().card_id);
|
|
|
|
|
+ }
|
|
|
|
|
+ else CreditCardInfosManager.getInstance().c_id_expire = tvIdCardExpire.getText().toString();
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
- ArrayAdapter<CharSequence> adapterOther = ArrayAdapter.createFromResource(activity, R.array.credit_card_relationship_other_type, R.layout.spinner_text_item);
|
|
|
|
|
- spRelationshipOther.setAdapter(adapterOther);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ setOnCompleteEdit(etCarNo,"o_p_number");
|
|
|
|
|
+// setOnCompleteEdit(etHomeQ,"p_city");
|
|
|
|
|
+ setOnCompleteEditDouble(etHomePhone,etHomeQ,"o_tel");//要取得两个值,所以单独设置
|
|
|
|
|
+ setOnCompleteEdit(etQQ,"o_qq");
|
|
|
|
|
+ //is_agree
|
|
|
|
|
+ cbAgreement.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
|
|
|
|
+ CreditCardInfosManager.getInstance().is_agree = isChecked;
|
|
|
|
|
+ presenter.commitFormData("is_agree",String.valueOf(isChecked),CreditCardInfosManager.getInstance().card_id);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private void showDatePicker(){
|
|
|
|
|
+ // 获得日历对象
|
|
|
|
|
+ Calendar c = Calendar.getInstance();
|
|
|
|
|
+ // 获取当前年份
|
|
|
|
|
+ int year = c.get(Calendar.YEAR);
|
|
|
|
|
+ // 获取当前月份
|
|
|
|
|
+ int monthOfYear = c.get(Calendar.MONTH);
|
|
|
|
|
+ // 获取当前月份的天数
|
|
|
|
|
+ int dayOfMonth = c.get(Calendar.DAY_OF_MONTH);
|
|
|
|
|
+
|
|
|
|
|
+ new DatePickerDialog(activity, new DatePickerDialog.OnDateSetListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {
|
|
|
|
|
+ String expire = year + "-" + month + "-" + dayOfMonth;
|
|
|
|
|
+ tvIdCardExpire.setText(expire);
|
|
|
|
|
+ CreditCardInfosManager.getInstance().c_id_expire = expire;
|
|
|
|
|
+ presenter.commitFormData("c_id_expire",expire,CreditCardInfosManager.getInstance().card_id);
|
|
|
|
|
+ }
|
|
|
|
|
+ },year,monthOfYear,dayOfMonth).show();
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private void setOnCompleteEdit(final CompleteCommitEditText et, final String key){
|
|
|
|
|
+ et.setOnCompleteEditListener(new CompleteCommitEditText.OnCompleteEditListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onCompleteEdit(String text) {
|
|
|
|
|
+ presenter.commitFormData(key,et.getText().toString(),CreditCardInfosManager.getInstance().card_id);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private void setOnCompleteEditDouble(final CompleteCommitEditText et,final CompleteCommitEditText etQ, final String key){
|
|
|
|
|
+ et.setOnCompleteEditListener(new CompleteCommitEditText.OnCompleteEditListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onCompleteEdit(String text) {
|
|
|
|
|
+ presenter.commitFormData(key,etQ.getText().toString()+et.getText().toString(),CreditCardInfosManager.getInstance().card_id);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@OnClick(R.id.btn_next)
|
|
@OnClick(R.id.btn_next)
|
|
|
public void btnClick(View view){
|
|
public void btnClick(View view){
|
|
|
|
|
+
|
|
|
|
|
+ if(TextUtils.isEmpty(etCity.getText().toString())){
|
|
|
|
|
+ Toast.makeText(activity,"请填写住宅城市",Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(TextUtils.isEmpty(etAddress.getText().toString())){
|
|
|
|
|
+ Toast.makeText(activity,"请填写住宅地址",Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(TextUtils.isEmpty(etEmail.getText().toString())){
|
|
|
|
|
+ Toast.makeText(activity,"请填写电子邮箱",Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(TextUtils.isEmpty(CreditCardInfosManager.getInstance().p_marray)){
|
|
|
|
|
+ Toast.makeText(activity,"请选择婚姻状况",Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(TextUtils.isEmpty(etEducation.getText().toString())){
|
|
|
|
|
+ Toast.makeText(activity,"请填写教育程度",Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(TextUtils.isEmpty(etCompanyName.getText().toString())){
|
|
|
|
|
+ Toast.makeText(activity,"请填写单位名称",Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(TextUtils.isEmpty(etCompanyAddress.getText().toString())){
|
|
|
|
|
+ Toast.makeText(activity,"请填写单位地址",Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(TextUtils.isEmpty(etCompanyPhoneNo.getText().toString()) || TextUtils.isEmpty(etCompanyPhoneQ.getText().toString())){
|
|
|
|
|
+ Toast.makeText(activity,"请填写单位电话",Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(TextUtils.isEmpty(etWorkYear.getText().toString())){
|
|
|
|
|
+ Toast.makeText(activity,"请填写工作年限",Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(TextUtils.isEmpty(etIRName.getText().toString())){
|
|
|
|
|
+ Toast.makeText(activity,"请填写直属亲属姓名",Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(TextUtils.isEmpty(etIRMobile.getText().toString())){
|
|
|
|
|
+ Toast.makeText(activity,"请填写直属亲属手机号",Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(TextUtils.isEmpty(CreditCardInfosManager.getInstance().c_d_relation)){
|
|
|
|
|
+ Toast.makeText(activity,"请选择直属亲属关系",Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(TextUtils.isEmpty(etOtherName.getText().toString())){
|
|
|
|
|
+ Toast.makeText(activity,"请填写其他联系人姓名",Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(TextUtils.isEmpty(etOtherMobile.getText().toString())){
|
|
|
|
|
+ Toast.makeText(activity,"请填写其他联系人手机号",Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(TextUtils.isEmpty(CreditCardInfosManager.getInstance().c_o_relation)){
|
|
|
|
|
+ Toast.makeText(activity,"请选择其他联系人关系",Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //有效期
|
|
|
|
|
+ if(TextUtils.isEmpty(tvIdCardExpire.getText().toString())){
|
|
|
|
|
+ Toast.makeText(activity,"请选择证件有效期",Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(TextUtils.isEmpty(etCarNo.getText().toString())){
|
|
|
|
|
+ Toast.makeText(activity,"请填写车牌号码",Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if(TextUtils.isEmpty(etHomePhone.getText().toString()) || TextUtils.isEmpty(etHomeQ.getText().toString())){
|
|
|
|
|
+ Toast.makeText(activity,"请填写住宅电话",Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if(TextUtils.isEmpty(etQQ.getText().toString())){
|
|
|
|
|
+ Toast.makeText(activity,"请填写常用QQ号码",Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ CreditCardInfosManager manager = CreditCardInfosManager.getInstance();
|
|
|
|
|
+
|
|
|
|
|
+ Map<String,String> map = new HashMap<>();
|
|
|
|
|
+ String p_city = etCity.getText().toString();
|
|
|
|
|
+ map.put("p_city",p_city);
|
|
|
|
|
+ manager.p_city = p_city;
|
|
|
|
|
+
|
|
|
|
|
+ String p_address = etAddress.getText().toString();
|
|
|
|
|
+ map.put("p_address",p_address);
|
|
|
|
|
+ manager.p_address = p_address;
|
|
|
|
|
+
|
|
|
|
|
+ String p_email = etEmail.getText().toString();
|
|
|
|
|
+ map.put("p_email",p_email);
|
|
|
|
|
+ manager.p_email = p_email;
|
|
|
|
|
+
|
|
|
|
|
+ String p_marray = CreditCardInfosManager.getInstance().p_marray;
|
|
|
|
|
+ map.put("p_marray",p_marray);
|
|
|
|
|
+ manager.p_marray = p_marray;
|
|
|
|
|
+
|
|
|
|
|
+ String p_edu = etEducation.getText().toString();
|
|
|
|
|
+ map.put("p_edu",p_edu);
|
|
|
|
|
+ manager.p_edu =p_edu;
|
|
|
|
|
+
|
|
|
|
|
+ String w_name = etCompanyName.getText().toString();
|
|
|
|
|
+ map.put("w_name",w_name);
|
|
|
|
|
+ manager.w_name = w_name;
|
|
|
|
|
+
|
|
|
|
|
+ String w_city = etCompanyCity.getText().toString();
|
|
|
|
|
+ map.put("w_city",w_city);
|
|
|
|
|
+ manager.w_city = w_city;
|
|
|
|
|
+
|
|
|
|
|
+ String w_address = etCompanyAddress.getText().toString();
|
|
|
|
|
+ map.put("w_address",w_address);
|
|
|
|
|
+ manager.w_address = w_address;
|
|
|
|
|
+
|
|
|
|
|
+ String w_tel = etCompanyPhoneQ.getText().toString() + etCompanyPhoneNo.getText().toString();
|
|
|
|
|
+ map.put("w_tel",w_tel);
|
|
|
|
|
+ manager.w_tel = w_tel;
|
|
|
|
|
+
|
|
|
|
|
+ String w_age = etWorkYear.getText().toString();
|
|
|
|
|
+ map.put("w_age",w_age);
|
|
|
|
|
+ manager.w_age = w_age;
|
|
|
|
|
+
|
|
|
|
|
+ String c_d_name = etIRName.getText().toString();
|
|
|
|
|
+ map.put("c_d_name",c_d_name);
|
|
|
|
|
+ manager.c_d_name = c_d_name;
|
|
|
|
|
+
|
|
|
|
|
+ String c_d_mobile = etIRMobile.getText().toString();
|
|
|
|
|
+ map.put("c_d_mobile",c_d_mobile);
|
|
|
|
|
+ manager.c_d_mobile = c_d_mobile;
|
|
|
|
|
+
|
|
|
|
|
+ map.put("c_d_relation",CreditCardInfosManager.getInstance().c_d_relation);
|
|
|
|
|
+
|
|
|
|
|
+ String c_o_name = etOtherName.getText().toString();
|
|
|
|
|
+ map.put("c_o_name",c_o_name);
|
|
|
|
|
+ manager.c_o_name =c_o_name;
|
|
|
|
|
+
|
|
|
|
|
+ String c_o_mobile = etOtherMobile.getText().toString();
|
|
|
|
|
+ map.put("c_o_mobile",c_o_mobile);
|
|
|
|
|
+ manager.c_o_mobile = c_o_mobile;
|
|
|
|
|
+
|
|
|
|
|
+ map.put("c_o_relation",CreditCardInfosManager.getInstance().c_o_relation);
|
|
|
|
|
+
|
|
|
|
|
+ if(cbExpire.isChecked()){
|
|
|
|
|
+ map.put("c_id_expire",CreditCardInfosManager.getInstance().c_id_expire);
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ String c_id_expire = tvIdCardExpire.getText().toString();
|
|
|
|
|
+ map.put("c_id_expire",c_id_expire);
|
|
|
|
|
+ manager.c_id_expire = c_id_expire;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ String o_p_number = etCarNo.getText().toString();
|
|
|
|
|
+ map.put("o_p_number",o_p_number);
|
|
|
|
|
+ manager.o_p_number = o_p_number;
|
|
|
|
|
+
|
|
|
|
|
+ String o_tel = etHomeQ.getText().toString() + etHomePhone.getText().toString();
|
|
|
|
|
+ map.put("o_tel",o_tel);
|
|
|
|
|
+ manager.o_tel = o_tel;
|
|
|
|
|
+
|
|
|
|
|
+ String o_qq = etQQ.getText().toString();
|
|
|
|
|
+ map.put("o_qq",o_qq);
|
|
|
|
|
+ manager.o_qq = o_qq;
|
|
|
|
|
+
|
|
|
|
|
+ map.put("is_agree",String.valueOf(CreditCardInfosManager.getInstance().is_agree));
|
|
|
|
|
+ presenter.commitDetails(map);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public boolean isViewActive() {
|
|
|
|
|
+ return isAdded();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void showProgress(String msg) {
|
|
|
|
|
+ Toast.makeText(activity,msg,Toast.LENGTH_SHORT).show();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void goNext() {
|
|
|
onNextStepCallback.onNextStep(ApplyForCreditCardActivity.STEP_DETAILS);
|
|
onNextStepCallback.onNextStep(ApplyForCreditCardActivity.STEP_DETAILS);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|