|
|
@@ -2,7 +2,6 @@ package com.huntersun.vkyes.etcopencard.project.ui.activity.after; |
|
|
|
|
|
|
|
import android.annotation.SuppressLint; |
|
|
|
import android.content.Intent; |
|
|
|
import android.text.Html; |
|
|
|
import android.text.TextUtils; |
|
|
|
import android.util.Log; |
|
|
|
import android.view.View; |
|
|
@@ -27,7 +26,6 @@ import com.huntersun.vkyes.etcopencard.project.ui.adapter.interfaces.INRechargeC |
|
|
|
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; |
|
|
|
import com.huntersun.vkyes.etcopencard.src.aop.SingleClick; |
|
|
|
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; |
|
|
|
import com.huntersun.vkyes.etcopencard.src.widget.BaseTextWatcher; |
|
|
|
import com.umeng.socialize.media.UMImage; |
|
|
|
import com.umeng.socialize.media.UMWeb; |
|
|
|
|
|
|
@@ -43,11 +41,12 @@ public class TopEntrapmentActivity extends AppActivity implements INRechargeChoo |
|
|
|
private ActivityToEntrapmentBinding binding; |
|
|
|
private String cardId, vehiclePlate, vehiclePlateColorStr, name, command; |
|
|
|
|
|
|
|
//模板适配器emo |
|
|
|
private RechargeAdapter rechargeMoneyAdapter; |
|
|
|
//选择模板事件回调 |
|
|
|
private INRechargeChoose inRechargeChoose; |
|
|
|
//选择的充值金额 |
|
|
|
private RechargeBean moneyInfo; |
|
|
|
private String inputValue; |
|
|
|
|
|
|
|
private ResultBean.BizContent rechargeOrder; //充值单 |
|
|
|
|
|
|
@@ -97,6 +96,7 @@ public class TopEntrapmentActivity extends AppActivity implements INRechargeChoo |
|
|
|
list.add(new RechargeBean("500")); |
|
|
|
list.add(new RechargeBean("1000")); |
|
|
|
|
|
|
|
moneyInfo = list.get(0); |
|
|
|
rechargeMoneyAdapter.setmDatas(list); |
|
|
|
binding.gvMoney.setAdapter(rechargeMoneyAdapter); |
|
|
|
rechargeMoneyAdapter.notifyDataSetChanged(); |
|
|
@@ -107,10 +107,8 @@ public class TopEntrapmentActivity extends AppActivity implements INRechargeChoo |
|
|
|
* @param payMoney |
|
|
|
*/ |
|
|
|
private void showConfirmDialog(String payMoney){ |
|
|
|
String msg = "请确认是否为车牌号为:<font color=\"#FF8000\">" + (vehiclePlate) + "</font>" + |
|
|
|
",车牌颜色为:" + "<font color=\"#FF8000\">" + vehiclePlateColorStr + "</font>的车充值"; |
|
|
|
new RechargeConfirmDialog.Builder(TopEntrapmentActivity.this) |
|
|
|
.setContent(payMoney, msg) |
|
|
|
.setContent(payMoney,"请确认是否为车牌号为:" + vehiclePlate + ",车牌颜色为:" + vehiclePlateColorStr + "的车充值。") |
|
|
|
.setListener(new RechargeConfirmDialog.InOnConfirmClick() { |
|
|
|
@Override |
|
|
|
public void onConfirmClick() { |
|
|
@@ -125,7 +123,6 @@ public class TopEntrapmentActivity extends AppActivity implements INRechargeChoo |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public void chooseRechargeMoney(RechargeBean rechargeBean) { |
|
|
|
binding.etInputMoney.setText(""); |
|
|
|
this.moneyInfo = rechargeBean; |
|
|
|
showConfirmDialog(rechargeBean.payMoney); |
|
|
|
} |
|
|
@@ -139,6 +136,7 @@ public class TopEntrapmentActivity extends AppActivity implements INRechargeChoo |
|
|
|
调用圈存检测->圈存修复->圈存确认 |
|
|
|
*/ |
|
|
|
private void doRecharge(){ |
|
|
|
toast("马上执行充值" + moneyInfo.payMoney); |
|
|
|
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean(); |
|
|
|
bean.setCardId(cardId); //卡号(传入) |
|
|
|
bean.setFee((long) (Double.parseDouble(moneyInfo.payMoney) * 100L)); //充值金额 |
|
|
@@ -304,7 +302,7 @@ public class TopEntrapmentActivity extends AppActivity implements INRechargeChoo |
|
|
|
@SuppressLint("LogNotTimber") |
|
|
|
@Override |
|
|
|
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { |
|
|
|
/* |
|
|
|
/** |
|
|
|
* 1-圈存修复COS指令Response信息不足,重新进行修复初始化 |
|
|
|
* 2-圈存修复完成,已充值成功 |
|
|
|
* 3-圈存修复 , 写卡失败,需要重新进行圈存 |
|
|
@@ -402,43 +400,19 @@ public class TopEntrapmentActivity extends AppActivity implements INRechargeChoo |
|
|
|
|
|
|
|
|
|
|
|
private void initClick(){ |
|
|
|
binding.etInputMoney.addTextChangedListener(new BaseTextWatcher(){ |
|
|
|
@Override |
|
|
|
public void onTextChanged(CharSequence s, int start, int before, int count) { |
|
|
|
super.onTextChanged(s, start, before, count); |
|
|
|
if(!FunHelper.isEmpty(FunHelper.getText(binding.etInputMoney)) || !FunHelper.isEmpty(inputValue)){ |
|
|
|
moneyInfo = null; |
|
|
|
if(rechargeMoneyAdapter != null) rechargeMoneyAdapter.clearSelected(); |
|
|
|
} |
|
|
|
inputValue = FunHelper.getText(binding.etInputMoney); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
//立即充值 |
|
|
|
binding.nextStep.setOnClickListener(new View.OnClickListener() { |
|
|
|
@Override |
|
|
|
public void onClick(View view) { |
|
|
|
if(!FunHelper.isEmpty(FunHelper.getText(binding.etInputMoney))){ |
|
|
|
moneyInfo = new RechargeBean(FunHelper.getText(binding.etInputMoney)); |
|
|
|
} |
|
|
|
|
|
|
|
if(moneyInfo == null){ |
|
|
|
if(FunHelper.isEmpty(FunHelper.getText(binding.etInputMoney))){ |
|
|
|
toast("请输入充值金额,或者选择需要充值的金额!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
<<<<<<< HEAD |
|
|
|
// if(Double.parseDouble(FunHelper.getText(binding.etInputMoney)) < 10){ |
|
|
|
// toast("最低充值金额不小于10元!"); |
|
|
|
// return; |
|
|
|
// } |
|
|
|
moneyInfo = new RechargeBean(FunHelper.getText(binding.etInputMoney)); |
|
|
|
======= |
|
|
|
|
|
|
|
if(Double.parseDouble(moneyInfo.payMoney) < 10){ |
|
|
|
toast("最低充值金额不小于10元!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
>>>>>>> c03e8c06c8c823800a0c6457f50cebd8c5a105ff |
|
|
|
doRecharge(); |
|
|
|
} |
|
|
|
}); |