@@ -129,6 +129,8 @@ public class IFCode { | |||
public static final String IFCODE164 = "164"; //修改订单地址 | |||
public static final String IFCODE888 = "888"; //换卡签申请 | |||
public static final String IFCODE887 = "887"; //换货/换卡签填写信息接口 | |||
public static final String IFCODE884 = "884"; //换货/换卡签取消接口 | |||
public static final String IFCODE885 = "885"; //换货/换卡签查询接口 | |||
public static final String IFCODE886 = "886"; //换货/换卡签审核接口 | |||
public static final String IFCODE966 = "966"; //统一会员平台验证码校验接口 | |||
public static final String IFCODE92 = "92"; //卡签注销验证接口 |
@@ -241,70 +241,10 @@ public class ResultBean<T> { | |||
public String vehPosImgUrl; //行驶证正面 | |||
public String vehNegImgUrl; //行驶证反面 | |||
public String applyId; //申请单编号 | |||
public String applyType; //申请单类型 | |||
public String damageMode; //0-人为损坏 1-自然损坏 | |||
public List<BizContent> list; //申请单列表(更换ETC时使用) | |||
public OrderInfoExt getOrderInfoExt() { | |||
return orderInfoExt; | |||
} | |||
public void setOrderInfoExt(OrderInfoExt orderInfoExt) { | |||
this.orderInfoExt = orderInfoExt; | |||
} | |||
public String getOrderType() { | |||
return orderType; | |||
} | |||
public void setOrderType(String orderType) { | |||
this.orderType = orderType; | |||
} | |||
public String getStaffName() { | |||
return staffName; | |||
} | |||
public void setStaffName(String staffName) { | |||
this.staffName = staffName; | |||
} | |||
public String getTrackingNumber() { | |||
return trackingNumber; | |||
} | |||
public void setTrackingNumber(String trackingNumber) { | |||
this.trackingNumber = trackingNumber; | |||
} | |||
public String getCourierCompany() { | |||
return courierCompany; | |||
} | |||
public void setCourierCompany(String courierCompany) { | |||
this.courierCompany = courierCompany; | |||
} | |||
public String getCardEnableTime() { | |||
return cardEnableTime; | |||
} | |||
public void setCardEnableTime(String cardEnableTime) { | |||
this.cardEnableTime = cardEnableTime; | |||
} | |||
public String getTotalCount() { | |||
return totalCount; | |||
} | |||
public void setTotalCount(String totalCount) { | |||
this.totalCount = totalCount; | |||
} | |||
public String getOssFilePath() { | |||
return ossFilePath; | |||
} | |||
public void setOssFilePath(String ossFilePath) { | |||
this.ossFilePath = ossFilePath; | |||
} | |||
private String appId = "52030131"; | |||
private boolean init; | |||
@@ -340,14 +280,6 @@ public class ResultBean<T> { | |||
private String command; | |||
private String commandType; | |||
public String getCommandType() { | |||
return commandType; | |||
} | |||
public void setCommandType(String commandType) { | |||
this.commandType = commandType; | |||
} | |||
private String cosRecordId; | |||
private String cosResponse; | |||
private String applyOrderNo; | |||
@@ -478,6 +410,78 @@ public class ResultBean<T> { | |||
private ObuDetailInfoBean.UserPromiseCBBean userPromiseCBBean; | |||
private ObuDetailInfoBean.QueryCarInfoCBBean queryCarInfoCBBean; | |||
public String getCommandType() { | |||
return commandType; | |||
} | |||
public OrderInfoExt getOrderInfoExt() { | |||
return orderInfoExt; | |||
} | |||
public void setOrderInfoExt(OrderInfoExt orderInfoExt) { | |||
this.orderInfoExt = orderInfoExt; | |||
} | |||
public String getOrderType() { | |||
return orderType; | |||
} | |||
public void setOrderType(String orderType) { | |||
this.orderType = orderType; | |||
} | |||
public String getStaffName() { | |||
return staffName; | |||
} | |||
public void setStaffName(String staffName) { | |||
this.staffName = staffName; | |||
} | |||
public String getTrackingNumber() { | |||
return trackingNumber; | |||
} | |||
public void setTrackingNumber(String trackingNumber) { | |||
this.trackingNumber = trackingNumber; | |||
} | |||
public String getCourierCompany() { | |||
return courierCompany; | |||
} | |||
public void setCourierCompany(String courierCompany) { | |||
this.courierCompany = courierCompany; | |||
} | |||
public String getCardEnableTime() { | |||
return cardEnableTime; | |||
} | |||
public void setCardEnableTime(String cardEnableTime) { | |||
this.cardEnableTime = cardEnableTime; | |||
} | |||
public String getTotalCount() { | |||
return totalCount; | |||
} | |||
public void setTotalCount(String totalCount) { | |||
this.totalCount = totalCount; | |||
} | |||
public String getOssFilePath() { | |||
return ossFilePath; | |||
} | |||
public void setOssFilePath(String ossFilePath) { | |||
this.ossFilePath = ossFilePath; | |||
} | |||
public void setCommandType(String commandType) { | |||
this.commandType = commandType; | |||
} | |||
public String getFileData() { | |||
return FileData; | |||
} |
@@ -1,8 +1,11 @@ | |||
package com.huntersun.vkyes.etcopencard.project.ui.activity.after; | |||
import android.content.Intent; | |||
import android.os.Bundle; | |||
import android.view.View; | |||
import com.huntersun.vkyes.etcopencard.databinding.ActivityCommonDealSuccessBinding; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.order.OrderDetailsActivity; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||
/** | |||
@@ -15,6 +18,9 @@ public class CommonDealSuccessActivity extends AppActivity { | |||
//0-注销成功 1-欠费补缴 2-余额补领 4-更换ETC设备成功 5-停用成功 6-启用成功 7-卡签续期 8-储值卡转记账卡 | |||
private String from; | |||
//传递的订单ID | |||
private String id; | |||
@Override | |||
protected View getLayoutView() { | |||
binding = ActivityCommonDealSuccessBinding.inflate(getLayoutInflater()); | |||
@@ -24,6 +30,7 @@ public class CommonDealSuccessActivity extends AppActivity { | |||
@Override | |||
protected void initView() { | |||
from = getIntent().getStringExtra("from"); | |||
id = getIntent().getStringExtra("id"); | |||
if (from.equals("0")){ | |||
binding.tvHint.setText("注销成功"); | |||
setTitle("卡签注销"); | |||
@@ -56,12 +63,18 @@ public class CommonDealSuccessActivity extends AppActivity { | |||
}else if (from.equals("8")){ | |||
setTitle("储值卡转记账卡"); | |||
binding.tvHint.setText("储值卡转记账卡成功"); | |||
binding.btnHome.setText("去签约"); | |||
binding.tvHint.setText("当前换卡申请已完成,请点击按钮完成记账卡签约"); | |||
} | |||
binding.btnHome.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
if (from.equals("8")){ | |||
Bundle bundle = new Bundle(); | |||
bundle.putString("id", id); | |||
jumpToPage(OrderDetailsActivity.class,bundle); | |||
} | |||
finish(); | |||
} | |||
}); |
@@ -15,6 +15,7 @@ import com.huntersun.vkyes.etcopencard.project.api.Result; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.IFCode; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.SendTheVerificationCodeBean; | |||
import com.huntersun.vkyes.etcopencard.project.dialog.ConfirmDialog; | |||
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; | |||
import com.huntersun.vkyes.etcopencard.src.aop.SingleClick; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||
@@ -31,7 +32,7 @@ public class DevicePendingActivity extends AppActivity { | |||
private PopupKeyboard mPopupKeyboard; | |||
private int licensePlateColor = 0; //默认蓝色 | |||
//private String opeartion = "1"; //操作 1-卡挂起, 2-牵挂起, 3-卡签挂起, 4-卡解挂 ,5-签解挂 | |||
private String opeartion = ""; //操作 1-卡挂起, 2-牵挂起, 3-卡签挂起, 4-卡解挂 ,5-签解挂 | |||
private String provider = "2"; //挂起类型 2-有卡挂起,3-无卡挂起 | |||
@Override | |||
@@ -42,7 +43,7 @@ public class DevicePendingActivity extends AppActivity { | |||
@Override | |||
protected void initView() { | |||
setTitle("设备挂起"); | |||
setTitle("设备挂起/解挂"); | |||
binding.buttomOne.setOnClickListener(this); | |||
binding.buttomTwo.setOnClickListener(this); | |||
binding.buttomThree.setOnClickListener(this); | |||
@@ -93,6 +94,25 @@ public class DevicePendingActivity extends AppActivity { | |||
}); | |||
} | |||
private void showHintDialog(ResultBean.BizContent bizContent){ | |||
String msg = "";String confirmTxt = "确定"; | |||
//1-卡挂起, 2-牵挂起, 3-卡签挂起, 4-卡解挂 ,5-签解挂 6-卡签解挂 | |||
if(bizContent.getCardStatus().equals("6") || bizContent.getObuStatus().equals("6")){//卡挂失或者签挂失 -- 只能执行解挂 | |||
msg = "检测到您已执行过挂起操作,请先解挂";confirmTxt = "确定解挂"; | |||
opeartion = "4"; | |||
}else{ | |||
msg = "确定执行挂起操作码?";confirmTxt = "确定挂起"; | |||
} | |||
new ConfirmDialog.Builder(DevicePendingActivity.this).setMsg(msg, "提示",confirmTxt,"取消", R.mipmap.icon_lotgout_etc_hint, 0,false) | |||
.onClick(new ConfirmDialog.Result() { | |||
@Override | |||
public void confirm() { | |||
cardReportTheLoss(bizContent); | |||
} | |||
}).show(); | |||
} | |||
/** | |||
* 根据车牌获取订单信息 | |||
*/ | |||
@@ -102,7 +122,7 @@ public class DevicePendingActivity extends AppActivity { | |||
return; | |||
} | |||
showDialog("挂起中..."); | |||
showDialog("申请中..."); | |||
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean(); | |||
bean.setVehicleId(binding.inputView.getNumber() + "_" + licensePlateColor); | |||
RequestParameters parameters = new RequestParameters(IFCode.IFCODE171, new Gson().toJson(bean)); | |||
@@ -110,7 +130,7 @@ public class DevicePendingActivity extends AppActivity { | |||
.enqueue(new Converter<Result>(getContext(), "请稍后...") { | |||
@Override | |||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
cardReportTheLoss(bizContent); | |||
showHintDialog(bizContent); | |||
} | |||
@Override | |||
@@ -130,7 +150,9 @@ public class DevicePendingActivity extends AppActivity { | |||
bean.setCardId(bizContent.getCardId()); //卡号 | |||
bean.setObuId(bizContent.getObuId()); //签号 | |||
bean.setOrderId(bizContent.getOrderId()); //订单id | |||
//bean.setOperation(String.valueOf(opeartion)); //1-卡挂失, 2-签挂失, 3-卡签挂失, 4-卡解挂 ,5-签解挂(APP端不需要) | |||
if (!FunHelper.isEmpty(opeartion)){//只有挂起才执行 | |||
bean.setOperation(String.valueOf(opeartion)); | |||
} | |||
bean.setProvider(String.valueOf(provider)); | |||
bean.setReason(FunHelper.getText(binding.etReason)); | |||
RequestParameters parameters1 = new RequestParameters(IFCode.IFCODE81, new Gson().toJson(bean)); |
@@ -15,6 +15,7 @@ import com.huntersun.vkyes.etcopencard.project.api.Result; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.IFCode; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.SendTheVerificationCodeBean; | |||
import com.huntersun.vkyes.etcopencard.project.dialog.ConfirmDialog; | |||
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; | |||
import com.huntersun.vkyes.etcopencard.src.aop.SingleClick; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||
@@ -40,7 +41,7 @@ public class EquipmentLossReportActivity extends AppActivity { | |||
@Override | |||
protected void initView() { | |||
setTitle("卡签挂失"); | |||
setTitle("卡签挂失/解挂"); | |||
binding.buttomOne.setOnClickListener(this); | |||
binding.buttomTwo.setOnClickListener(this); | |||
@@ -54,10 +55,10 @@ public class EquipmentLossReportActivity extends AppActivity { | |||
binding.son2.setOnClickListener(this::Choice); | |||
binding.choice3.setOnClickListener(this::Choice); | |||
binding.son3.setOnClickListener(this::Choice); | |||
/* binding.son1.setEnabled(false); | |||
/*binding.son1.setEnabled(false); | |||
binding.son2.setEnabled(false); | |||
binding.son3.setEnabled(false);*/ | |||
binding.nextStep.setOnClickListener(new View.OnClickListener() { | |||
binding.btnNext.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View v) { | |||
@@ -84,16 +85,41 @@ public class EquipmentLossReportActivity extends AppActivity { | |||
}); | |||
} | |||
private void showHintDialog(ResultBean.BizContent bizContent){ | |||
String msg = "";String confirmTxt = "确定"; | |||
//1-卡挂失, 2-牵挂失, 3-卡签挂失, 4-卡解挂 ,5-签解挂 6-卡签解挂 | |||
if(bizContent.getCardStatus().equals("6") || bizContent.getObuStatus().equals("6")){//卡挂失或者签挂失 -- 只能执行解挂 | |||
msg = "检测到您已执行过挂失操作,请先解挂";confirmTxt = "确定解挂"; | |||
if (opeartion.equals("1")){ | |||
opeartion = "4"; | |||
}else if (opeartion.equals("2")){ | |||
opeartion = "5"; | |||
}else if (opeartion.equals("3")){ | |||
opeartion = "6"; | |||
} | |||
}else{ | |||
msg = "确定执行挂失操作码?";confirmTxt = "确定挂失"; | |||
} | |||
new ConfirmDialog.Builder(EquipmentLossReportActivity.this).setMsg(msg, "提示",confirmTxt,"取消", R.mipmap.icon_lotgout_etc_hint, 0,false) | |||
.onClick(new ConfirmDialog.Result() { | |||
@Override | |||
public void confirm() { | |||
cardReportTheLoss(bizContent); | |||
} | |||
}).show(); | |||
} | |||
/** | |||
* 根据车牌获取订单信息 | |||
*/ | |||
private void getOrderInfoByVehiclePlate(){ | |||
if(FunHelper.isEmpty(binding.inputView.getNumber())){ | |||
toast("请输入想要挂失的车牌号!"); | |||
toast("请输入想要挂失/解挂的车牌号!"); | |||
return; | |||
} | |||
showDialog("挂失中..."); | |||
showDialog("申请中..."); | |||
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean(); | |||
bean.setVehicleId(binding.inputView.getNumber() + "_" + licensePlateColor); | |||
RequestParameters parameters = new RequestParameters(IFCode.IFCODE171, new Gson().toJson(bean)); | |||
@@ -101,7 +127,7 @@ public class EquipmentLossReportActivity extends AppActivity { | |||
.enqueue(new Converter<Result>(getContext(), "请稍后...") { | |||
@Override | |||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
cardReportTheLoss(bizContent); | |||
showHintDialog(bizContent); | |||
} | |||
@Override | |||
@@ -127,7 +153,11 @@ public class EquipmentLossReportActivity extends AppActivity { | |||
@Override | |||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
hideDialog(); | |||
toast("设备已挂失!"); | |||
if (Integer.parseInt(opeartion) > 3){ | |||
toast("挂失成功!"); | |||
}else{ | |||
toast("解挂成功!"); | |||
} | |||
finish(); | |||
} | |||
@@ -158,6 +158,7 @@ public class PetCardToAccountCardStep5Activity extends AppActivity { | |||
hideDialog(); | |||
Bundle bundle = new Bundle(); | |||
bundle.putString("from","8"); | |||
bundle.putString("id",bizContent.getId()); | |||
jumpToPage(CommonDealSuccessActivity.class,bundle); | |||
finish(); | |||
} |
@@ -108,6 +108,10 @@ public class ReplaceEtcStep1Activity extends AppActivity { | |||
bean.setVehicleId(FunHelper.getText(binding.etSearch) + "_" + 0); | |||
RequestParameters parameters = new RequestParameters(IFCode.IFCODE171, new Gson().toJson(bean)); | |||
//TODO 测试 | |||
//bean.setId("26994de66cb646d0a0ec80d785a49923"); | |||
//RequestParameters parameters = new RequestParameters(IFCode.IFCODE9, new Gson().toJson(bean)); | |||
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters) | |||
.enqueue(new Converter<Result>(getContext(), "储值卡信息查询中...") { | |||
@Override |
@@ -4,6 +4,7 @@ import android.os.Bundle; | |||
import android.view.View; | |||
import com.alibaba.fastjson.JSON; | |||
import com.blankj.utilcode.util.LogUtils; | |||
import com.huntersun.vkyes.etcopencard.R; | |||
import com.huntersun.vkyes.etcopencard.databinding.ActivityReplaceEtcStep4Binding; | |||
import com.huntersun.vkyes.etcopencard.project.api.MyRetrofit; | |||
@@ -41,6 +42,8 @@ public class ReplaceEtcStep4Activity extends AppActivity { | |||
private String json; | |||
private ResultBean.BizContent data; | |||
private ResultBean.BizContent applyData; | |||
private boolean haveApplyInfo; //有申请单信息 | |||
@Override | |||
protected View getLayoutView() { | |||
@@ -57,30 +60,6 @@ public class ReplaceEtcStep4Activity extends AppActivity { | |||
if (data == null) return; | |||
binding.tvMobile.setText(data.getCustomerTel()); | |||
if (FunHelper.isEmpty(data.getCardId())){ | |||
binding.card.setEnabled(false); | |||
binding.cardobu.setEnabled(false); | |||
applyType = EX_OBU; | |||
} | |||
if (FunHelper.isEmpty(data.getObuId())){ | |||
binding.obu.setEnabled(false); | |||
binding.cardobu.setEnabled(false); | |||
applyType = EX_CARD; | |||
} | |||
if (!FunHelper.isEmpty(data.getCardId()) && !FunHelper.isEmpty(data.getObuId())){ | |||
applyType = EX_CARD_OBU; | |||
} | |||
if (applyType.equals(EX_CARD)){ | |||
binding.card.setChecked(true); | |||
}else if (applyType.equals(EX_OBU)){ | |||
binding.obu.setChecked(true); | |||
}else if (applyType.equals(EX_CARD_OBU)){ | |||
binding.cardobu.setChecked(true); | |||
} | |||
binding.LLPeople.setOnClickListener(this::ChoiceDamageMode); | |||
binding.people.setOnClickListener(this::ChoiceDamageMode); | |||
binding.LLNature.setOnClickListener(this::ChoiceDamageMode); | |||
@@ -95,23 +74,80 @@ public class ReplaceEtcStep4Activity extends AppActivity { | |||
binding.btnNext.setOnClickListener(this::initClick); | |||
binding.mGetCodeBtn.setOnClickListener(this::initClick); | |||
binding.btnCancel.setOnClickListener(this::initClick); | |||
} | |||
/** | |||
* 设置信息展示 | |||
*/ | |||
private void setDataToView(){ | |||
if (applyData != null && !FunHelper.isEmpty(applyData.applyId)){ | |||
haveApplyInfo = true; | |||
damageMode = FunHelper.isEmpty(applyData.damageMode) ? -1 : Integer.parseInt(applyData.damageMode); | |||
applyType = applyData.applyType; | |||
}else{ | |||
haveApplyInfo = false; | |||
if (FunHelper.isEmpty(data.getCardId())){ | |||
binding.card.setEnabled(false); | |||
binding.cardobu.setEnabled(false); | |||
applyType = EX_OBU; | |||
} | |||
if (FunHelper.isEmpty(data.getObuId())){ | |||
binding.obu.setEnabled(false); | |||
binding.cardobu.setEnabled(false); | |||
applyType = EX_CARD; | |||
} | |||
if (!FunHelper.isEmpty(data.getCardId()) && !FunHelper.isEmpty(data.getObuId())){ | |||
applyType = EX_CARD_OBU; | |||
} | |||
} | |||
binding.card.setEnabled(!haveApplyInfo); | |||
binding.cardobu.setEnabled(!haveApplyInfo); | |||
binding.obu.setEnabled(!haveApplyInfo); | |||
binding.nature.setEnabled(!haveApplyInfo); | |||
binding.people.setEnabled(!haveApplyInfo); | |||
binding.btnCancel.setVisibility(haveApplyInfo ? View.VISIBLE : View.GONE); | |||
binding.btnNext.setEnabled(haveApplyInfo ? false : true); | |||
if (applyType.equals(EX_CARD)){ | |||
binding.card.setChecked(true); | |||
}else if (applyType.equals(EX_OBU)){ | |||
binding.obu.setChecked(true); | |||
}else if (applyType.equals(EX_CARD_OBU)){ | |||
binding.cardobu.setChecked(true); | |||
} | |||
if (damageMode != -1){ | |||
binding.nature.setChecked(damageMode == 1 ? true : false); | |||
binding.people.setChecked(damageMode == 0 ? true : false); | |||
} | |||
//有申请单,提示信息 | |||
if (haveApplyInfo){ | |||
showErrorMsg(""); | |||
} | |||
} | |||
/* | |||
* 提示错误信息 | |||
* @param errorMsg | |||
*/ | |||
private void showErrorMsg(Result result){ | |||
String msg = result.statusCode == 704 ? "已存在未办理完成的订单,是否继续办理?" : result.errorMsg; | |||
String title = result.statusCode == 704 ? "订单重复" : "无法更换"; | |||
String cancelTxt = result.statusCode == 704 ? "取消" : ""; | |||
String confirmTxt = result.statusCode == 704 ? "继续办理" : "确定"; | |||
new ConfirmDialog.Builder(ReplaceEtcStep4Activity.this).setMsg(msg, title,confirmTxt,cancelTxt, R.mipmap.icon_lotgout_etc_hint, 0,true) | |||
private void showErrorMsg(String errorMsg){ | |||
String msg = haveApplyInfo ? "已存在更换的订单,是否撤销重新申请?" : errorMsg; | |||
String title = haveApplyInfo ? "订单重复" : "无法更换"; | |||
String cancelTxt = haveApplyInfo ? "取消" : ""; | |||
String confirmTxt = haveApplyInfo ? "撤销申请单" : "确定"; | |||
new ConfirmDialog.Builder(ReplaceEtcStep4Activity.this).setMsg(msg, title,confirmTxt,cancelTxt, R.mipmap.icon_lotgout_etc_hint, 0,!haveApplyInfo) | |||
.onClick(new ConfirmDialog.Result() { | |||
@Override | |||
public void confirm() { | |||
if (result.statusCode == 704){ | |||
gotoNextPage(result.errorMsg); | |||
if (haveApplyInfo){ | |||
if (FunHelper.isEmpty(FunHelper.getText(binding.etCode))){ | |||
toast("请输入验证码"); | |||
return; | |||
} | |||
checkUser(true); | |||
} | |||
} | |||
}).show(); | |||
@@ -132,8 +168,8 @@ public class ReplaceEtcStep4Activity extends AppActivity { | |||
/* | |||
* 验证用户信息并申请更换ETC | |||
*/ | |||
private void checkUser(){ | |||
showDialog("申请中..."); | |||
private void checkUser(boolean cancel){ | |||
showDialog("信息校验中..."); | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("mobile", data.getCustomerTel()); | |||
params.put("code", FunHelper.getText(binding.etCode)); | |||
@@ -141,29 +177,63 @@ public class ReplaceEtcStep4Activity extends AppActivity { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
hideDialog(); | |||
if (cancel){ | |||
cancelApply(); | |||
}else{ | |||
applyExchange(); | |||
} | |||
} | |||
@Override | |||
public void onError(Response<Result> resp) { | |||
hideDialog(); | |||
} | |||
}); | |||
} | |||
/** | |||
* 申请更换 | |||
*/ | |||
private void applyExchange(){ | |||
showDialog("申请中..."); | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("orderId", data.getOrderId()); | |||
params.put("applyType", applyType); | |||
params.put("damageMode", String.valueOf(damageMode)); | |||
MyRetrofit.newInstance(IFCode.IFCODE888, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
hideDialog(); | |||
gotoNextPage(bizContent.getId()); | |||
} | |||
//申请更换 | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("orderId", data.getOrderId()); | |||
params.put("applyType", applyType); | |||
params.put("damageMode", String.valueOf(damageMode)); | |||
MyRetrofit.newInstance(IFCode.IFCODE888, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
hideDialog(); | |||
gotoNextPage(bizContent.getId()); | |||
} | |||
@Override | |||
public void onError(Response<Result> resp) { | |||
hideDialog(); | |||
showErrorMsg(resp.body().errorMsg); | |||
} | |||
}); | |||
} | |||
@Override | |||
public void onError(Response<Result> resp) { | |||
hideDialog(); | |||
showErrorMsg(resp.body()); | |||
} | |||
}); | |||
/** | |||
* 取消申请单 | |||
*/ | |||
private void cancelApply(){ | |||
showDialog("撤销中..."); | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("id", applyData.getId()); | |||
params.put("cancelRes", "业务员操作取消"); | |||
MyRetrofit.newInstance(IFCode.IFCODE884, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
hideDialog(); | |||
toast("申请单已撤销,请重新申请"); | |||
applyData = null; | |||
setDataToView(); | |||
} | |||
@Override | |||
public void onError(Response<Result> resp) { | |||
hideDialog(); | |||
showErrorMsg(resp.body().errorMsg); | |||
} | |||
}); | |||
} | |||
@@ -192,16 +262,20 @@ public class ReplaceEtcStep4Activity extends AppActivity { | |||
} | |||
public void Choice(View view) { | |||
if (haveApplyInfo) return; | |||
binding.card.setChecked(false); | |||
binding.obu.setChecked(false); | |||
binding.cardobu.setChecked(false); | |||
if (view == binding.choiceCard || view == binding.card) { | |||
if (applyType.equals(EX_OBU)) return; //只支持OBU不能选择 | |||
binding.card.setChecked(true); | |||
applyType = EX_CARD; | |||
} else if (view == binding.choiceOBU || view == binding.obu) { | |||
if (applyType.equals(EX_CARD)) return; //只支持CARD不能选择 | |||
binding.obu.setChecked(true); | |||
applyType = EX_OBU; | |||
} else if (view == binding.choiceCardObu || view == binding.cardobu) { | |||
if (!applyType.equals(EX_CARD_OBU)) return; //只支持一项的不能选择 | |||
binding.cardobu.setChecked(true); | |||
applyType = EX_CARD_OBU; | |||
} | |||
@@ -212,6 +286,7 @@ public class ReplaceEtcStep4Activity extends AppActivity { | |||
* @param view | |||
*/ | |||
public void ChoiceDamageMode(View view) { | |||
if (haveApplyInfo) return; | |||
binding.nature.setChecked(false); | |||
binding.people.setChecked(false); | |||
if (view == binding.LLNature || view == binding.nature) { | |||
@@ -239,16 +314,39 @@ public class ReplaceEtcStep4Activity extends AppActivity { | |||
toast("请输入验证码"); | |||
return; | |||
} | |||
checkUser(); | |||
checkUser(false); | |||
}else if (view == binding.mGetCodeBtn){//获取验证码 | |||
sendCode(); | |||
}if (view == binding.btnCancel){//下一步 | |||
if (FunHelper.isEmpty(FunHelper.getText(binding.etCode))){ | |||
toast("请输入验证码"); | |||
return; | |||
} | |||
checkUser(true); | |||
} | |||
} | |||
@Override | |||
protected void initData() { | |||
if (FunHelper.isEmpty(data.getOrderId())) return; | |||
showDialog("申请单查询中..."); | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("orderId", data.getOrderId()); | |||
MyRetrofit.newInstance(IFCode.IFCODE885, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
hideDialog(); | |||
if (!FunHelper.isEmpty(bizContent.list)){ | |||
applyData = (ResultBean.BizContent) bizContent.list.get(0); | |||
} | |||
setDataToView(); | |||
} | |||
@Override | |||
public void onError(Response<Result> resp) { | |||
hideDialog(); | |||
} | |||
}); | |||
} | |||
@Override |
@@ -172,37 +172,37 @@ public class OrderDetailsActivity extends AppActivity implements StatusAction { | |||
binding.LLStaffInfo.setVisibility(View.VISIBLE); | |||
//售后信息 | |||
binding.LLAfterSaleInfo.removeAllViews(); | |||
addItemView(binding.LLAfterSaleInfo,"售后单号","",1,false); | |||
addItemView(binding.LLAfterSaleInfo,"业务类型",FunHelper.isEmpty(orderData.orderInfoExt.exchangeMode) ? "换货" : "退货",1,false); | |||
addItemView(binding.LLAfterSaleInfo,"创建时间","",1,false); | |||
binding.LLAfterSaleInfoContent.removeAllViews(); | |||
addItemView(binding.LLAfterSaleInfoContent,"售后单号","",1,false); | |||
addItemView(binding.LLAfterSaleInfoContent,"业务类型",!FunHelper.isEmpty(orderData.orderInfoExt.exchangeMode) ? "换货" : "退货",1,false); | |||
addItemView(binding.LLAfterSaleInfoContent,"创建时间","",1,false); | |||
if (orderData.getOrderStep().equals(String.valueOf(Constants.ORDER_STATUS_EX_GOODS))){ | |||
binding.tvAfterSaleTitle.setText("用户换货信息"); | |||
binding.tvStaffTitle.setText("业务员发起换货"); | |||
addItemView(binding.LLAfterSaleInfo,"换货物流公司",FunHelper.isEmpty(orderData.orderInfoExt.exchangeLogisticsCompany) ? "" : orderData.orderInfoExt.exchangeLogisticsCompany,1,false); | |||
addItemView(binding.LLAfterSaleInfo,"换货物流单号",FunHelper.isEmpty(orderData.orderInfoExt.exchangeLogisticsNumber) ? "" : orderData.orderInfoExt.exchangeLogisticsNumber,1,false); | |||
addItemView(binding.LLAfterSaleInfo,"换货原因",FunHelper.isEmpty(orderData.orderInfoExt.cancelReason) ? "" : orderData.orderInfoExt.cancelReason,1,false); | |||
addItemView(binding.LLAfterSaleInfoContent,"换货物流公司",FunHelper.isEmpty(orderData.orderInfoExt.exchangeLogisticsCompany) ? "" : orderData.orderInfoExt.exchangeLogisticsCompany,1,false); | |||
addItemView(binding.LLAfterSaleInfoContent,"换货物流单号",FunHelper.isEmpty(orderData.orderInfoExt.exchangeLogisticsNumber) ? "" : orderData.orderInfoExt.exchangeLogisticsNumber,1,false); | |||
addItemView(binding.LLAfterSaleInfoContent,"换货原因",FunHelper.isEmpty(orderData.orderInfoExt.cancelReason) ? "" : orderData.orderInfoExt.cancelReason,1,false); | |||
}else{ | |||
binding.tvAfterSaleTitle.setText("用户退货信息"); | |||
binding.tvStaffTitle.setText("业务员发起退货"); | |||
addItemView(binding.LLAfterSaleInfo,"退货物流公司",FunHelper.isEmpty(orderData.orderInfoExt.returnLogisticsCompany) ? " " :orderData.orderInfoExt.returnLogisticsCompany,1,false); | |||
addItemView(binding.LLAfterSaleInfo,"退货物流单号",FunHelper.isEmpty(orderData.orderInfoExt.returnLogisticsNumber) ? "" :orderData.orderInfoExt.returnLogisticsNumber,1,false); | |||
addItemView(binding.LLAfterSaleInfo,"退货原因",FunHelper.isEmpty(orderData.orderInfoExt.cancelReason) ? "" : orderData.orderInfoExt.cancelReason,1,false); | |||
addItemView(binding.LLAfterSaleInfoContent,"退货物流公司",FunHelper.isEmpty(orderData.orderInfoExt.returnLogisticsCompany) ? " " :orderData.orderInfoExt.returnLogisticsCompany,1,false); | |||
addItemView(binding.LLAfterSaleInfoContent,"退货物流单号",FunHelper.isEmpty(orderData.orderInfoExt.returnLogisticsNumber) ? "" :orderData.orderInfoExt.returnLogisticsNumber,1,false); | |||
addItemView(binding.LLAfterSaleInfoContent,"退货原因",FunHelper.isEmpty(orderData.orderInfoExt.cancelReason) ? "" : orderData.orderInfoExt.cancelReason,1,false); | |||
} | |||
//业务员信息 | |||
binding.LLStaffInfo.removeAllViews(); | |||
addItemView(binding.LLStaffInfo,"售后单号","",1,false); | |||
addItemView(binding.LLStaffInfo,"业务类型",FunHelper.isEmpty(orderData.orderInfoExt.exchangeMode) ? "换货" : "退货",1,false); | |||
addItemView(binding.LLStaffInfo,"创建时间","",1,false); | |||
binding.LLStaffInfoContent.removeAllViews(); | |||
addItemView(binding.LLStaffInfoContent,"售后单号","",1,false); | |||
addItemView(binding.LLStaffInfoContent,"业务类型",!FunHelper.isEmpty(orderData.orderInfoExt.exchangeMode) ? "换货" : "退货",1,false); | |||
addItemView(binding.LLStaffInfoContent,"创建时间","",1,false); | |||
if (orderData.getOrderStep().equals(String.valueOf(Constants.ORDER_STATUS_EX_GOODS))){ | |||
addItemView(binding.LLStaffInfo,"换货网点",FunHelper.isEmpty(orderData.orderInfoExt.exchangeNetworkName) ? " ":orderData.orderInfoExt.exchangeNetworkName,1,false); | |||
addItemView(binding.LLStaffInfo,"换货原因",FunHelper.isEmpty(orderData.orderInfoExt.exchangeReason) ? "" : orderData.orderInfoExt.exchangeReason,1,true); | |||
addItemView(binding.LLStaffInfoContent,"换货网点",FunHelper.isEmpty(orderData.orderInfoExt.exchangeNetworkName) ? " ":orderData.orderInfoExt.exchangeNetworkName,1,false); | |||
addItemView(binding.LLStaffInfoContent,"换货原因",FunHelper.isEmpty(orderData.orderInfoExt.exchangeReason) ? "" : orderData.orderInfoExt.exchangeReason,1,true); | |||
}else{ | |||
addItemView(binding.LLStaffInfo,"退货网点",FunHelper.isEmpty(orderData.orderInfoExt.returnNetworkName) ? "" :orderData.orderInfoExt.returnNetworkName,1,false); | |||
addItemView(binding.LLStaffInfo,"退货原因",FunHelper.isEmpty(orderData.orderInfoExt.returnReason) ? "" : orderData.orderInfoExt.returnReason,1,true); | |||
addItemView(binding.LLStaffInfoContent,"退货网点",FunHelper.isEmpty(orderData.orderInfoExt.returnNetworkName) ? "" :orderData.orderInfoExt.returnNetworkName,1,false); | |||
addItemView(binding.LLStaffInfoContent,"退货原因",FunHelper.isEmpty(orderData.orderInfoExt.returnReason) ? "" : orderData.orderInfoExt.returnReason,1,true); | |||
} | |||
addItemView(binding.LLStaffInfo,"业务员",FunHelper.isEmpty(orderData.staffName) ? "" : orderData.staffName,1,false); | |||
addItemView(binding.LLStaffInfoContent,"业务员",FunHelper.isEmpty(orderData.staffName) ? "" : orderData.staffName,1,false); | |||
} | |||
//初始化按钮信息 |
@@ -50,8 +50,8 @@ public class FragmentHomeTow extends TitleBarFragment<MainActivity> { | |||
{R.mipmap.card3, "充值圈存"}, | |||
{R.mipmap.card8, "设备激活"}, | |||
{R.mipmap.card1, "卡签信息查询"}, | |||
{R.mipmap.card5, "卡签挂失"}, | |||
{R.mipmap.card6, "卡签挂起"}, | |||
{R.mipmap.card5, "卡签挂失/解挂"}, | |||
{R.mipmap.card6, "卡签挂起/解挂"}, | |||
{R.mipmap.card4, "卡签注销"}, | |||
{R.mipmap.card10, "更换卡签"}, | |||
{R.mipmap.card15, "审核管理"}, | |||
@@ -161,10 +161,10 @@ public class FragmentHomeTow extends TitleBarFragment<MainActivity> { | |||
//startActivity(CancellationActivity.class); | |||
jumpToPage(LogoutEtcStep1Activity.class); | |||
break; | |||
case "卡签挂失": | |||
case "卡签挂失/解挂": | |||
startActivity(EquipmentLossReportActivity.class); | |||
break; | |||
case "卡签挂起": | |||
case "卡签挂起/解挂": | |||
startActivity(DevicePendingActivity.class); | |||
break; | |||
case "满意度评价": |
@@ -158,7 +158,7 @@ public class FunHelper { | |||
case 5: | |||
return "无签注销"; | |||
case 6: | |||
return "标签挂失"; | |||
return "签挂失"; | |||
case 7: | |||
return "已过户"; | |||
case 8: |
@@ -272,18 +272,37 @@ | |||
</LinearLayout> | |||
</LinearLayout> | |||
<Button | |||
android:id="@+id/btnNext" | |||
style="@style/BtnShortStyle" | |||
android:layout_width="@dimen/dp_150" | |||
android:layout_height="@dimen/dp_40" | |||
android:layout_alignParentBottom="true" | |||
android:layout_centerHorizontal="true" | |||
android:layout_gravity="center" | |||
android:layout_marginTop="@dimen/dp_30" | |||
android:layout_marginBottom="@dimen/dp_30" | |||
android:text="下一步" | |||
android:textSize="@dimen/sp_14" /> | |||
<LinearLayout | |||
style="@style/MatchWrap.Horizontal" | |||
android:gravity="center"> | |||
<Button | |||
android:id="@+id/btnNext" | |||
style="@style/FullBtnStyle" | |||
android:layout_width="@dimen/dp_150" | |||
android:layout_height="@dimen/dp_40" | |||
android:layout_alignParentBottom="true" | |||
android:layout_centerHorizontal="true" | |||
android:layout_gravity="center" | |||
android:enabled="true" | |||
android:layout_marginTop="@dimen/dp_30" | |||
android:layout_marginBottom="@dimen/dp_30" | |||
android:text="下一步" | |||
android:textSize="@dimen/sp_14" /> | |||
<Button | |||
android:id="@+id/btnCancel" | |||
style="@style/BtnShortStyle" | |||
android:visibility="gone" | |||
android:layout_width="@dimen/dp_150" | |||
android:layout_height="@dimen/dp_40" | |||
android:layout_alignParentBottom="true" | |||
android:layout_centerHorizontal="true" | |||
android:layout_marginLeft="@dimen/dp_20" | |||
android:layout_gravity="center" | |||
android:layout_marginTop="@dimen/dp_30" | |||
android:layout_marginBottom="@dimen/dp_30" | |||
android:text="撤销申请单" | |||
android:textSize="@dimen/sp_14" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</androidx.core.widget.NestedScrollView> |
@@ -254,7 +254,7 @@ | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_17" | |||
android:text="请选择挂起类型" | |||
android:text="请选择挂起/解挂类型" | |||
android:textColor="#333333" | |||
android:textSize="@dimen/sp_12" /> | |||
@@ -392,7 +392,7 @@ | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="请输入挂起原因" | |||
android:text="请输入挂起/解挂原因" | |||
android:textColor="#333333" | |||
android:textSize="@dimen/sp_12" /> | |||
@@ -411,7 +411,7 @@ | |||
android:paddingLeft="@dimen/dp_7" | |||
android:gravity="left" | |||
android:maxLength="50" | |||
android:hint="请输入挂起原因" | |||
android:hint="请输入原因" | |||
android:textColorHint="@color/text98" | |||
android:minHeight="@dimen/dp_100" | |||
style="@style/black02TextStyle14"/> |
@@ -253,10 +253,11 @@ | |||
</LinearLayout> | |||
<TextView | |||
android:id="@+id/tvTitle" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_17" | |||
android:text="请选择挂失设备" | |||
android:text="请选择挂失/解挂类型" | |||
android:textColor="#333333" | |||
android:textSize="@dimen/sp_12" /> | |||
@@ -335,24 +336,22 @@ | |||
android:text="卡和OBU" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<Button | |||
android:id="@+id/nextStep" | |||
android:layout_width="match_parent" | |||
android:layout_height="@dimen/dp_45" | |||
android:layout_marginHorizontal="@dimen/dp_112" | |||
android:id="@+id/btnNext" | |||
style="@style/BtnShortStyle" | |||
android:layout_width="@dimen/dp_120" | |||
android:layout_height="@dimen/dp_40" | |||
android:layout_alignParentBottom="true" | |||
android:layout_centerHorizontal="true" | |||
android:layout_gravity="center" | |||
android:layout_marginTop="@dimen/dp_30" | |||
android:layout_marginBottom="@dimen/dp_20" | |||
android:background="@drawable/button_circle_selector3" | |||
android:layout_marginBottom="@dimen/dp_30" | |||
android:text="提交" | |||
android:textColor="#FFFFFF" /> | |||
android:textSize="@dimen/sp_14" /> | |||
</LinearLayout> | |||
</androidx.core.widget.NestedScrollView> | |||
@@ -123,6 +123,7 @@ | |||
android:text="用户换货信息" /> | |||
<com.ruffian.library.widget.RLinearLayout | |||
android:id="@+id/LLAfterSaleInfoContent" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginHorizontal="@dimen/dp_15" | |||
@@ -160,6 +161,7 @@ | |||
android:text="业务员发起换货" /> | |||
<com.ruffian.library.widget.RLinearLayout | |||
android:id="@+id/LLStaffInfoContent" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginHorizontal="@dimen/dp_15" |