|
|
@@ -24,6 +24,7 @@ import com.kfzs.libs.IView;
|
|
|
import com.kfzs.libs.widget.CompleteCommitEditText;
|
|
|
import com.kfzs.libs.widget.alpha.AlphaButton;
|
|
|
import com.sheep.jiuyan.samllsheep.R;
|
|
|
+import com.sheep.jiuyan.samllsheep.SheepApp;
|
|
|
|
|
|
import java.util.Calendar;
|
|
|
import java.util.HashMap;
|
|
|
@@ -85,9 +86,9 @@ public class ApplyForCreditCardDetailsFragment extends DaggerFragment implements
|
|
|
@BindView(R.id.cb_agreement)
|
|
|
CheckBox cbAgreement;
|
|
|
@BindView(R.id.sp_relationship_immediate_relatives)
|
|
|
- Spinner spImmediateRelationship;
|
|
|
+ AppCompatSpinner spImmediateRelationship;
|
|
|
@BindView(R.id.sp_relationship_other)
|
|
|
- Spinner spOtherRelationship;
|
|
|
+ AppCompatSpinner spOtherRelationship;
|
|
|
@BindView(R.id.cb_expire)
|
|
|
CheckBox cbExpire;
|
|
|
|
|
|
@@ -112,7 +113,7 @@ public class ApplyForCreditCardDetailsFragment extends DaggerFragment implements
|
|
|
|
|
|
@Override
|
|
|
public void setupDaggerComponent() {
|
|
|
-
|
|
|
+ DaggerDetailsComponent.builder().httpComponent(SheepApp.getInstance().getHttpComponent()).build().inject(this);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -173,23 +174,35 @@ public class ApplyForCreditCardDetailsFragment extends DaggerFragment implements
|
|
|
setOnCompleteEdit(etIRName,"c_d_name");
|
|
|
setOnCompleteEdit(etIRMobile,"c_d_mobile");
|
|
|
//c_d_relation
|
|
|
- spImmediateRelationship.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
+ spImmediateRelationship.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
|
|
@Override
|
|
|
- public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
+ 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.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
|
|
+ spOtherRelationship.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
|
|
@Override
|
|
|
- public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
|
|
+ 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() {
|
|
|
@@ -209,7 +222,7 @@ public class ApplyForCreditCardDetailsFragment extends DaggerFragment implements
|
|
|
CreditCardInfosManager.getInstance().c_id_expire = expire;
|
|
|
presenter.commitFormData("c_id_expire",expire,CreditCardInfosManager.getInstance().card_id);
|
|
|
}
|
|
|
- else CreditCardInfosManager.getInstance().c_id_expire = (String) tvIdCardExpire.getText();
|
|
|
+ else CreditCardInfosManager.getInstance().c_id_expire = tvIdCardExpire.getText().toString();
|
|
|
|
|
|
}
|
|
|
});
|
|
|
@@ -359,38 +372,90 @@ public class ApplyForCreditCardDetailsFragment extends DaggerFragment implements
|
|
|
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("p_city",etCity.getText().toString());
|
|
|
- map.put("p_address",etAddress.getText().toString());
|
|
|
- map.put("p_email",etEmail.getText().toString());
|
|
|
- map.put("p_marray",CreditCardInfosManager.getInstance().p_marray);
|
|
|
-
|
|
|
- map.put("p_edu",etEducation.getText().toString());
|
|
|
- map.put("w_name",etCompanyName.getText().toString());
|
|
|
- map.put("w_city",etCompanyCity.getText().toString());
|
|
|
- map.put("w_address",etCompanyAddress.getText().toString());
|
|
|
- map.put("w_tel",etCompanyPhoneQ.getText().toString() + etCompanyPhoneNo.getText().toString());
|
|
|
- map.put("w_age",etWorkYear.getText().toString());
|
|
|
- map.put("c_d_name",etIRName.getText().toString());
|
|
|
- map.put("c_d_mobile",etIRMobile.getText().toString());
|
|
|
map.put("c_d_relation",CreditCardInfosManager.getInstance().c_d_relation);
|
|
|
|
|
|
- map.put("c_o_name",etOtherName.getText().toString());
|
|
|
- map.put("c_o_mobile",etOtherMobile.getText().toString());
|
|
|
+ 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 {
|
|
|
- map.put("c_id_expire",tvIdCardExpire.getText().toString());
|
|
|
+ String c_id_expire = tvIdCardExpire.getText().toString();
|
|
|
+ map.put("c_id_expire",c_id_expire);
|
|
|
+ manager.c_id_expire = c_id_expire;
|
|
|
}
|
|
|
|
|
|
- map.put("o_p_number",etCarNo.getText().toString());
|
|
|
- map.put("o_tel",etHomeQ.getText().toString() + etHomePhone.getText().toString());
|
|
|
- map.put("o_qq",etQQ.getText().toString());
|
|
|
+ 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);
|
|
|
}
|
|
|
@@ -403,7 +468,7 @@ public class ApplyForCreditCardDetailsFragment extends DaggerFragment implements
|
|
|
|
|
|
@Override
|
|
|
public void showProgress(String msg) {
|
|
|
-
|
|
|
+ Toast.makeText(activity,msg,Toast.LENGTH_SHORT).show();
|
|
|
}
|
|
|
|
|
|
@Override
|