Переглянути джерело

'2023年3月22日18:27:07'

master
wq 2 роки тому
джерело
коміт
9d55e524fc

+ 1
- 0
app/src/main/java/com/huntersun/vkyes/etcopencard/project/api/bean/IFCode.java Переглянути файл

@@ -128,6 +128,7 @@ public class IFCode {
public static final String IFCODE168 = "168"; //根据机构号获取服务网点信息
public static final String IFCODE164 = "164"; //修改订单地址
public static final String IFCODE888 = "888"; //换卡签申请
public static final String IFCODE887 = "887"; //换货/换卡签填写信息接口
public static final String IFCODE886 = "886"; //换货/换卡签审核接口
public static final String IFCODE966 = "966"; //统一会员平台验证码校验接口
public static final String IFCODE92 = "92"; //卡签注销验证接口

+ 1
- 0
app/src/main/java/com/huntersun/vkyes/etcopencard/project/api/bean/ResultBean.java Переглянути файл

@@ -222,6 +222,7 @@ public class ResultBean<T> {
public String exchangeReason;
public String returnNetworkName;
public String returnReason;
public String postalCode;
public String finishTime; //后端无此字段
}


+ 2
- 2
app/src/main/java/com/huntersun/vkyes/etcopencard/project/bluetooth/BluetoothWriteCardWriteTab.java Переглянути файл

@@ -37,7 +37,7 @@ import retrofit2.Response;

/**
* 蓝牙写卡写签
* 注意调用该内容方法时,要在链接玩蓝牙设备后调用
*
* @author admin
*/
public class BluetoothWriteCardWriteTab {
@@ -146,7 +146,7 @@ public class BluetoothWriteCardWriteTab {
}

/**
* 写卡
* 写卡 注意调用该内容方法时,要在链接玩蓝牙设备后调用
*
* @param commands 指令内容
* @return 执行指令返回结果 9000 为成功

+ 103
- 110
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/after/ReplaceEtcStep4Activity.java Переглянути файл

@@ -9,10 +9,8 @@ import com.huntersun.vkyes.etcopencard.databinding.ActivityReplaceEtcStep4Bindin
import com.huntersun.vkyes.etcopencard.project.api.MyRetrofit;
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.ReasonBean;
import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean;
import com.huntersun.vkyes.etcopencard.project.dialog.ConfirmDialog;
import com.huntersun.vkyes.etcopencard.project.dialog.ReasonListDialog;
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper;
import com.huntersun.vkyes.etcopencard.src.aop.SingleClick;
import com.huntersun.vkyes.etcopencard.src.app.AppActivity;
@@ -36,10 +34,10 @@ public class ReplaceEtcStep4Activity extends AppActivity {
//倒计时
private CodeCountDown mCountDownTimerUtils;

private int cardStatus = 2; //卡是否正常 2-不正常
private int moneyStatus = 2; //钱是否正常 2-不正常
//EXCHANGE_CARD-换卡签-换卡 EXCHANGE_OBU -换卡签-换签 EXCHANGE_ALL-换卡签-换卡签
private String applyType = EX_CARD_OBU;
//申请类型:EXCHANGE_CARD-换卡签-换卡 EXCHANGE_OBU -换卡签-换签 EXCHANGE_ALL-换卡签-换卡签
private String applyType = "";
//设备损坏方式 0-人为损坏 1-自然损坏
private int damageMode = -1;

private String json;
private ResultBean.BizContent data;
@@ -56,99 +54,84 @@ public class ReplaceEtcStep4Activity extends AppActivity {
if (!FunHelper.isEmpty(json)){
data = JSON.parseObject(json,ResultBean.BizContent.class);
}
if (data == null) return;
binding.tvMobile.setText(data.getCustomerTel());

/*binding.choiceCard1.setOnClickListener(this::ChoiceCardType);
binding.card1.setOnClickListener(this::ChoiceCardType);
binding.choiceCard2.setOnClickListener(this::ChoiceCardType);
binding.card2.setOnClickListener(this::ChoiceCardType);*/
/*binding.choiceMoney1.setOnClickListener(this::ChoiceMoneyType);
binding.money1.setOnClickListener(this::ChoiceMoneyType);
binding.choiceMoney2.setOnClickListener(this::ChoiceMoneyType);
binding.money2.setOnClickListener(this::ChoiceMoneyType);*/

binding.choiceCard.setOnClickListener(this::Choice);
binding.card.setOnClickListener(this::Choice);
binding.choiceOBU.setOnClickListener(this::Choice);
binding.obu.setOnClickListener(this::Choice);
binding.choiceCardObu.setOnClickListener(this::Choice);
binding.cardobu.setOnClickListener(this::Choice);
if (FunHelper.isEmpty(data.getCardId())){
binding.card.setEnabled(false);
binding.cardobu.setEnabled(false);
applyType = EX_OBU;
}

binding.tvMobile.setText(data.getCustomerTel());
binding.LLCard.setVisibility(View.GONE);
binding.LLObu.setVisibility(View.GONE);
binding.LLType.setVisibility(View.GONE);
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())){
binding.LLType.setVisibility(View.VISIBLE);
applyType = EX_CARD_OBU;
}else{
applyType = FunHelper.isEmpty(data.getCardId()) ? EX_OBU : EX_CARD;
}

if (!FunHelper.isEmpty(data.getCardId())){
binding.LLCard.setVisibility(View.VISIBLE);
binding.card1.setChecked(true);
binding.card2.setEnabled(false);
}else{
binding.card1.setChecked(false);
binding.card2.setEnabled(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 (!FunHelper.isEmpty(data.getObuId())){
binding.LLObu.setVisibility(View.VISIBLE);
binding.money1.setChecked(true);
binding.money2.setEnabled(false);
}else{
binding.money1.setChecked(false);
binding.money2.setEnabled(true);
}
binding.LLPeople.setOnClickListener(this::ChoiceDamageMode);
binding.people.setOnClickListener(this::ChoiceDamageMode);
binding.LLNature.setOnClickListener(this::ChoiceDamageMode);
binding.nature.setOnClickListener(this::ChoiceDamageMode);

binding.choiceCard.setOnClickListener(this::Choice);
binding.card.setOnClickListener(this::Choice);
binding.choiceOBU.setOnClickListener(this::Choice);
binding.obu.setOnClickListener(this::Choice);
binding.choiceCardObu.setOnClickListener(this::Choice);
binding.cardobu.setOnClickListener(this::Choice);

binding.btnNext.setOnClickListener(this::initClick);
binding.mGetCodeBtn.setOnClickListener(this::initClick);
binding.LLReason.setOnClickListener(this::initClick);
}

@SingleClick
private void initClick(View view){
if (view == binding.btnNext){//下一步
if (FunHelper.isEmpty(FunHelper.getText(binding.etCode))){
toast("请输入验证码");
return;
}
checkUser();

}else if (view == binding.mGetCodeBtn){//获取验证码
sendCode();

}else if (view == binding.LLReason){//选择原因
new ReasonListDialog.Builder(getActivity(),"更换原因", new ReasonListDialog.ResultItem() {
@Override
public void success(ReasonBean item) {
if (item.reason.equals("其他")){
binding.LLInputReason.setVisibility(View.VISIBLE);
binding.tvReason.setText("");
}else{
binding.LLInputReason.setVisibility(View.GONE);
binding.tvReason.setText(item.reason);
}
}
}).setBottom().show();
}
}

/**
/*
* 提示错误信息
* @param errorMsg
*/
private void showErrorMsg(String errorMsg){
new ConfirmDialog.Builder(ReplaceEtcStep4Activity.this).setMsg(errorMsg, "无法更换","确定","", R.mipmap.icon_lotgout_etc_hint, 0,true)
private void showErrorMsg(Result result){
//gotoNextPage("1234555"); //TODO 测试

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)
.onClick(new ConfirmDialog.Result() {
@Override
public void confirm() { }
public void confirm() {
if (result.statusCode == 704){
gotoNextPage(result.errorMsg);
}
}
}).show();
}

/**
* 跳转下个界面
* @param id
*/
private void gotoNextPage(String id){
Bundle bundle = new Bundle();
bundle.putString("json",json);
bundle.putString("id",id);
jumpToPage(ReplaceEtcStep5Activity.class,bundle);
finish();
}

/*
* 验证用户信息并申请更换ETC
*/
private void checkUser(){
@@ -165,36 +148,31 @@ public class ReplaceEtcStep4Activity extends AppActivity {
Map<String, String> params = new HashMap<>();
params.put("orderId", data.getOrderId());
params.put("applyType", applyType);
params.put("applyRes", FunHelper.isEmpty(FunHelper.getText(binding.tvReason)) ? FunHelper.getText(binding.etReason) : FunHelper.getText(binding.tvReason));
params.put("damageMode", String.valueOf(damageMode));
MyRetrofit.newInstance(IFCode.IFCODE888, params, new MyRetrofit.ReturnResult() {
@Override
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) {
hideDialog();
Bundle bundle = new Bundle();
bundle.putString("json",json);
jumpToPage(ReplaceEtcStep5Activity.class,bundle);
finish();
gotoNextPage(bizContent.getId());
}

@Override
public void onError(Response<Result> resp) {
MyRetrofit.ReturnResult.super.onError();
hideDialog();
showErrorMsg(resp.body().errorMsg);
showErrorMsg(resp.body());
}
});
}
@Override
public void onError(Response<Result> resp) {
MyRetrofit.ReturnResult.super.onError();
hideDialog();
showErrorMsg(resp.body().errorMsg);
showErrorMsg(resp.body());
}
});
}


/**
/*
* 发送验证码
*/
private void sendCode(){
@@ -217,30 +195,6 @@ public class ReplaceEtcStep4Activity extends AppActivity {
});
}

public void ChoiceCardType(View view) {
binding.card1.setChecked(false);
binding.card2.setChecked(false);
if (view == binding.choiceCard1 || view == binding.card1) {
binding.card1.setChecked(true);
cardStatus = 1;
} else if (view == binding.choiceCard2 || view == binding.card2) {
binding.card2.setChecked(true);
cardStatus = 2;
}
}

public void ChoiceMoneyType(View view) {
binding.money1.setChecked(false);
binding.money2.setChecked(false);
if (view == binding.choiceMoney1 || view == binding.money1) {
binding.money1.setChecked(true);
moneyStatus = 1;
} else if (view == binding.choiceMoney2 || view == binding.money2) {
binding.money2.setChecked(true);
moneyStatus = 2;
}
}

public void Choice(View view) {
binding.card.setChecked(false);
binding.obu.setChecked(false);
@@ -257,6 +211,45 @@ public class ReplaceEtcStep4Activity extends AppActivity {
}
}

/*
* 损坏方式
* @param view
*/
public void ChoiceDamageMode(View view) {
binding.nature.setChecked(false);
binding.people.setChecked(false);
if (view == binding.LLNature || view == binding.nature) {
binding.nature.setChecked(true);
damageMode = 1;
} else if (view == binding.LLPeople || view == binding.people) {
binding.people.setChecked(true);
damageMode = 0;
}
}

@SingleClick
private void initClick(View view){
if (view == binding.btnNext){//下一步
if (FunHelper.isEmpty(applyType)){
toast("请选择更换类型");
return;
}

if (damageMode == -1){
toast("请选择设备损坏方式");
return;
}
if (FunHelper.isEmpty(FunHelper.getText(binding.etCode))){
toast("请输入验证码");
return;
}
checkUser();

}else if (view == binding.mGetCodeBtn){//获取验证码
sendCode();
}
}

@Override
protected void initData() {


+ 200
- 4
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/after/ReplaceEtcStep5Activity.java Переглянути файл

@@ -2,12 +2,29 @@ package com.huntersun.vkyes.etcopencard.project.ui.activity.after;

import android.os.Bundle;
import android.view.View;
import android.widget.RadioGroup;

import com.alibaba.fastjson.JSON;
import com.huntersun.vkyes.etcopencard.R;
import com.huntersun.vkyes.etcopencard.databinding.ActivityReplaceEtcStep5Binding;
import com.huntersun.vkyes.etcopencard.project.api.MyRetrofit;
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.ReasonBean;
import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean;
import com.huntersun.vkyes.etcopencard.project.dialog.ConfirmDialog;
import com.huntersun.vkyes.etcopencard.project.dialog.MenuMailDialog;
import com.huntersun.vkyes.etcopencard.project.dialog.ReasonListDialog;
import com.huntersun.vkyes.etcopencard.project.ui.activity.order.EditOrderAddrActivity;
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.ui.dialog.AddressDialog;

import java.util.HashMap;
import java.util.Map;

import retrofit2.Response;

/**
* Date :2023-03-20
@@ -18,6 +35,12 @@ public class ReplaceEtcStep5Activity extends AppActivity {

private String json;
private ResultBean.BizContent data;
private String id; //上个接口返回的id

//邮寄方式 0-不邮寄 1-邮寄
private int sendStatus = 0;
//收货方式 0-线下 1-线上
private int receiveMethod = 0;

@Override
protected View getLayoutView() {
@@ -28,14 +51,187 @@ public class ReplaceEtcStep5Activity extends AppActivity {
@Override
protected void initView() {
json = getIntent().getStringExtra("json");
id = getIntent().getStringExtra("id");
if (!FunHelper.isEmpty(json)){
data = JSON.parseObject(json, ResultBean.BizContent.class);
}

Bundle bundle = new Bundle();
bundle.putString("from","4");
jumpToPage(CommonDealSuccessActivity.class,bundle);
finish();
binding.LLReason.setOnClickListener(this::initClick);
binding.LLLogisticCompany.setOnClickListener(this::initClick);
binding.LLArea.setOnClickListener(this::initClick);
binding.btnNext.setOnClickListener(this::initClick);
initRadioButtonListener();

if (data == null) return;
initDefaultDataToView();
}

/*
* 设置默认值显示
*/
private void initDefaultDataToView(){
if (data.orderInfoExt == null) data.orderInfoExt = new ResultBean.OrderInfoExt();
binding.etUserName.setText(FunHelper.isEmpty(data.getCustomerName()) ? "" : data.getCustomerName());
binding.etPhone.setText(FunHelper.isEmpty(data.getCustomerTel()) ? "" : data.getCustomerTel());
binding.tvArea.setText(FunHelper.isEmpty(data.orderInfoExt.region) ? "" : data.orderInfoExt.region);
binding.etAddr.setText(FunHelper.isEmpty(data.orderInfoExt.address) ? "" : data.orderInfoExt.address);
binding.etPostCard.setText(FunHelper.isEmpty(data.orderInfoExt.postalCode) ? "" : data.orderInfoExt.postalCode);

binding.tvLogisticName.setText(FunHelper.isEmpty(data.getCourierCompany()) ? "" : data.getCourierCompany());
binding.etLogisticNum.setText(FunHelper.isEmpty(data.getTrackingNumber()) ? "" : data.getTrackingNumber());

binding.rbNoMail.setChecked(true);
binding.rbOffline.setChecked(true);
setViewByRbChange();
}

private void setViewByRbChange(){
binding.LLMailInfo.setVisibility(binding.rbMail.isChecked() ? View.VISIBLE : View.GONE);
binding.LLOnLine.setVisibility(binding.rbOnline.isChecked() ? View.VISIBLE : View.GONE);
sendStatus = binding.rbMail.isChecked() ? 1 : 0;
receiveMethod = binding.rbOffline.isChecked() ? 0 : 1;
}

private void checkParams(){
if (!binding.rbMail.isChecked() && !binding.rbNoMail.isChecked()){
toast("请选择邮寄方式");
return;
}
if (!binding.rbOffline.isChecked() && !binding.rbOnline.isChecked()){
toast("请选择收货方式");
return;
}

if (sendStatus == 1){
if (FunHelper.isEmpty(FunHelper.getText(binding.etUserName))){
toast("请输入姓名");
return;
}
if (FunHelper.isEmpty(FunHelper.getText(binding.etPhone))){
toast("请输入电话");
return;
}
if (FunHelper.isEmpty(FunHelper.getText(binding.tvArea))){
toast("请选择地区");
return;
}
if (FunHelper.isEmpty(FunHelper.getText(binding.etAddr))){
toast("请输入详细地址");
return;
}
}

if (receiveMethod == 1){
if (FunHelper.isEmpty(FunHelper.getText(binding.tvLogisticName))){
toast("请选择物流公司");
return;
}
if (FunHelper.isEmpty(FunHelper.getText(binding.etLogisticNum))){
toast("请输入物流单号");
return;
}
}

if (FunHelper.isEmpty(FunHelper.getText(binding.tvReason)) && FunHelper.isEmpty(FunHelper.getText(binding.etReason))){
toast("更换原因不能为空!");
return;
}

submit();
}

private void submit(){
Map<String, String> params = new HashMap<>();
params.put("id", data.getOrderId());
params.put("configId", "6a9a54bc01f6443faea7ffeb8b5b19f6");
params.put("sendStatus", String.valueOf(sendStatus));
params.put("receiveMethod", String.valueOf(receiveMethod));
params.put("courierCompany", FunHelper.getText(binding.tvLogisticName));
params.put("courierOrderId", FunHelper.getText(binding.etLogisticNum));
params.put("customerName", FunHelper.getText(binding.etUserName));
params.put("customerTel", FunHelper.getText(binding.etPhone));
params.put("address", FunHelper.getText(binding.etAddr));
params.put("area", FunHelper.getText(binding.tvArea));
params.put("postCode", FunHelper.getText(binding.etPostCard));
params.put("applyRes", FunHelper.isEmpty(FunHelper.getText(binding.etReason)) ? FunHelper.getText(binding.tvReason) : FunHelper.getText(binding.etReason));
MyRetrofit.newInstance(IFCode.IFCODE887, params, new MyRetrofit.ReturnResult() {
@Override
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) {
hideDialog();
Bundle bundle = new Bundle();
bundle.putString("from","4");
jumpToPage(CommonDealSuccessActivity.class,bundle);
finish();
}

@Override
public void onError(Response<Result> resp) {
hideDialog();
showErrorMsg(resp.body().errorMsg);
}
});
}

private void showErrorMsg(String errorMsg){
new ConfirmDialog.Builder(ReplaceEtcStep5Activity.this).setMsg(errorMsg, "无法更换","确定","", R.mipmap.icon_lotgout_etc_hint, 0,true)
.onClick(new ConfirmDialog.Result() {
@Override
public void confirm() { }
}).show();
}

private void initRadioButtonListener(){
binding.rgMail.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup radioGroup, int i) {
setViewByRbChange();
}
});

binding.rgReceive.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup radioGroup, int i) {
setViewByRbChange();
}
});
}

@SingleClick
private void initClick(View view){
if (view == binding.LLReason){//选择原因
new ReasonListDialog.Builder(getActivity(),"更换原因", new ReasonListDialog.ResultItem() {
@Override
public void success(ReasonBean item) {
if (item.reason.equals("其他")){
binding.LLInputReason.setVisibility(View.VISIBLE);
binding.tvReason.setText("");
}else{
binding.LLInputReason.setVisibility(View.GONE);
binding.tvReason.setText(item.reason);
}
}
}).setBottom().show();

}else if (view == binding.LLLogisticCompany){//选择快递公司
new MenuMailDialog.Builder(getActivity(), new MenuMailDialog.ResultItem() {
@Override
public void success(String item) {
binding.tvLogisticName.setText(item);
}
}).setBottom().show();

}else if (view == binding.LLArea){//选择地区
new AddressDialog.Builder(ReplaceEtcStep5Activity.this)
.setProvince("贵州省")
.setCity("贵阳市")
.setListener((dialog, province, city, area) -> {
String address = province + "/" + city + "/" + area;
binding.tvArea.setText(address);
}).show();

}else if (view == binding.btnNext){//提交
checkParams();
}
}

@Override

+ 51
- 162
app/src/main/res/layout-v4/activity_replace_etc_step4.xml Переглянути файл

@@ -18,129 +18,103 @@
<LinearLayout style="@style/MatchWrap.Vertical">

<LinearLayout
android:id="@+id/LLType"
android:visibility="visible"
style="@style/MatchWrap.Vertical"
android:layout_margin="@dimen/dp_15"
android:background="@drawable/bg_white_radius"
android:paddingHorizontal="@dimen/dp_15"
android:paddingVertical="@dimen/dp_10">
android:layout_marginHorizontal="@dimen/dp_15"
android:gravity="center_vertical"
android:layout_marginVertical="@dimen/dp_15">

<TextView
style="@style/WrapWrap"
android:paddingRight="@dimen/dp_15"
android:text="请选择需要更换的设备"
android:textColor="@color/color_333333"
android:textSize="@dimen/sp_16"
android:textStyle="bold" />

<LinearLayout
android:id="@+id/LLCard"
style="@style/MatchWrap.Horizontal"
android:paddingVertical="@dimen/dp_5">

<TextView
style="@style/AutoWrap"
android:text="卡是否正常"
android:textColor="@color/color_333333"
android:textSize="@dimen/sp_14" />
android:gravity="center_vertical"
android:background="@drawable/bg_white_radius"
android:padding="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_15"
android:layout_height="match_parent">

<LinearLayout
android:id="@+id/choiceCard1"
style="@style/WrapWrap"
android:id="@+id/choiceCard"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:clickable="true"
android:orientation="horizontal">

<androidx.appcompat.widget.AppCompatCheckBox
android:id="@+id/card1"
android:id="@+id/card"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:checked="false"
android:enabled="false"
app:buttonCompat="@drawable/checkbox_selector" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_12"
android:text="" />
android:text="" />
</LinearLayout>

<LinearLayout
android:id="@+id/choiceCard2"
style="@style/WrapWrap"
android:layout_marginLeft="@dimen/dp_30"
android:id="@+id/choiceOBU"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:clickable="true"
android:orientation="horizontal">

<androidx.appcompat.widget.AppCompatCheckBox
android:id="@+id/card2"
android:id="@+id/obu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:enabled="false"
app:buttonCompat="@drawable/checkbox_selector" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_12"
android:text="否" />
</LinearLayout>
</LinearLayout>

<TextView
android:id="@+id/tvLine"
style="@style/MatchOne.HorLine"
android:layout_marginVertical="@dimen/dp_8" />

<LinearLayout
android:id="@+id/LLObu"
style="@style/MatchWrap.Horizontal"
android:paddingVertical="@dimen/dp_5">

<TextView
style="@style/AutoWrap"
android:text="签是否正常"
android:textColor="@color/color_333333"
android:textSize="@dimen/sp_14" />

<LinearLayout
android:id="@+id/choiceMoney1"
style="@style/WrapWrap"
android:orientation="horizontal">

<androidx.appcompat.widget.AppCompatCheckBox
android:id="@+id/money1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:checked="false"
android:enabled="false"
app:buttonCompat="@drawable/checkbox_selector" />
android:text="OBU" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_12"
android:text="是" />
</LinearLayout>

<LinearLayout
android:id="@+id/choiceMoney2"
style="@style/WrapWrap"
android:layout_marginLeft="@dimen/dp_30"
android:id="@+id/choiceCardObu"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:clickable="true"
android:orientation="horizontal">

<androidx.appcompat.widget.AppCompatCheckBox
android:id="@+id/money2"
android:id="@+id/cardobu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:enabled="false"
android:checked="false"
app:buttonCompat="@drawable/checkbox_selector" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_12"
android:text="" />
android:text="卡和OBU" />
</LinearLayout>
</LinearLayout>
</LinearLayout>

<LinearLayout
android:id="@+id/LLType"
android:visibility="gone"
android:id="@+id/LLDamageMode"
android:visibility="visible"
style="@style/MatchWrap.Vertical"
android:layout_marginHorizontal="@dimen/dp_15"
android:gravity="center_vertical"
@@ -149,7 +123,7 @@
<TextView
style="@style/WrapWrap"
android:paddingRight="@dimen/dp_15"
android:text="请选择需要更换的设备"
android:text="请选择设备损坏类型"
android:textColor="@color/color_333333"
android:textSize="@dimen/sp_16"
android:textStyle="bold" />
@@ -163,7 +137,7 @@
android:layout_height="match_parent">

<LinearLayout
android:id="@+id/choiceCard"
android:id="@+id/LLPeople"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -171,7 +145,7 @@
android:orientation="horizontal">

<androidx.appcompat.widget.AppCompatCheckBox
android:id="@+id/card"
android:id="@+id/people"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
@@ -182,34 +156,11 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_12"
android:text="卡" />
</LinearLayout>

<LinearLayout
android:id="@+id/choiceOBU"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:clickable="true"
android:orientation="horizontal">

<androidx.appcompat.widget.AppCompatCheckBox
android:id="@+id/obu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
app:buttonCompat="@drawable/checkbox_selector" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_12"
android:text="OBU" />

android:text="人为损坏" />
</LinearLayout>

<LinearLayout
android:id="@+id/choiceCardObu"
android:id="@+id/LLNature"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -217,84 +168,22 @@
android:orientation="horizontal">

<androidx.appcompat.widget.AppCompatCheckBox
android:id="@+id/cardobu"
android:id="@+id/nature"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@null"
android:checked="true"
android:checked="false"
app:buttonCompat="@drawable/checkbox_selector" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_12"
android:text="卡和OBU" />
android:text="自然损坏" />
</LinearLayout>
</LinearLayout>
</LinearLayout>

<TextView
style="@style/WrapWrap"
android:paddingLeft="@dimen/dp_15"
android:paddingTop="@dimen/dp_15"
android:paddingRight="@dimen/dp_15"
android:text="更换原因"
android:textColor="@color/color_333333"
android:textSize="@dimen/sp_16"
android:textStyle="bold" />

<LinearLayout
android:id="@+id/LLReason"
style="@style/MatchWrap.Horizontal"
android:layout_height="@dimen/dp_45"
android:layout_marginBottom="@dimen/dp_15"
android:gravity="center_vertical"
android:paddingHorizontal="@dimen/dp_15"
android:background="@drawable/bg_white_radius"
android:layout_marginHorizontal="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_15">

<TextView
android:id="@+id/tvReason"
style="@style/AutoWrap"
android:hint="请选择更换原因"
android:textColorHint="@color/color_999999"/>

<ImageView
style="@style/WrapWrap"
android:layout_width="@dimen/dp_20"
android:layout_height="@dimen/dp_20"
android:src="@mipmap/the_right"/>
</LinearLayout>
<com.ruffian.library.widget.RLinearLayout
android:id="@+id/LLInputReason"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:corner_radius="@dimen/dp_10"
app:background_normal="@color/white"
android:layout_marginHorizontal="@dimen/dp_15"
android:layout_marginBottom="@dimen/dp_15"
android:paddingLeft="@dimen/dp_15"
android:paddingBottom="@dimen/dp_15"
android:paddingRight="@dimen/dp_20"
android:orientation="vertical"
android:layout_marginTop="@dimen/dp_12">
<EditText
android:id="@+id/etReason"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:layout_below="@+id/tv_hhyy_title"
android:paddingTop="@dimen/dp_15"
android:paddingLeft="@dimen/dp_7"
android:gravity="left"
android:maxLength="50"
android:hint="请输入更换原因,限制50字以内"
android:textColorHint="@color/text98"
android:minHeight="@dimen/dp_100"
style="@style/black02TextStyle14"/>
</com.ruffian.library.widget.RLinearLayout>

<TextView
style="@style/WrapWrap"
@@ -393,7 +282,7 @@
android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_30"
android:layout_marginBottom="@dimen/dp_30"
android:text="确定更换"
android:text="下一步"
android:textSize="@dimen/sp_14" />

</LinearLayout>

+ 520
- 2
app/src/main/res/layout/activity_replace_etc_step5.xml Переглянути файл

@@ -1,6 +1,524 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
xmlns:app="http://schemas.android.com/apk/res-auto"
style="@style/MatchMatch.Vertical"
android:background="@color/background_color">

<com.hjq.bar.TitleBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
app:leftIcon="@mipmap/back_black"
app:lineVisible="false"
app:title="更换ETC设备"
app:titleColor="@color/black" />

<androidx.core.widget.NestedScrollView style="@style/MatchWrap">
<LinearLayout style="@style/MatchWrap.Vertical">

<TextView
style="@style/WrapWrap"
android:paddingLeft="@dimen/dp_15"
android:paddingTop="@dimen/dp_20"
android:paddingRight="@dimen/dp_15"
android:text="邮寄方式"
android:textColor="@color/color_333333"
android:textSize="@dimen/sp_16"
android:textStyle="bold" />

<com.ruffian.library.widget.RLinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/title"
android:layout_marginStart="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_15"
android:layout_marginEnd="@dimen/dp_15"
android:layout_marginBottom="@dimen/dp_15"
android:orientation="vertical"
app:background_normal="@color/white"
app:corner_radius="@dimen/dp_10">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="@dimen/dp_15">

<TextView
style="@style/redStar"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

<TextView
style="@style/blackTextStyle14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="是否需要邮寄" />

<RadioGroup
android:id="@+id/rgMail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/dp_25"
android:orientation="horizontal">

<RadioButton
android:id="@+id/rbMail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/white"
android:button="@null"
android:drawableLeft="@drawable/radio_btn_1"
android:drawablePadding="@dimen/dp_12"
android:text="邮寄" />

<RadioButton
android:id="@+id/rbNoMail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_20"
android:background="@color/white"
android:button="@null"
android:drawableLeft="@drawable/radio_btn_1"
android:drawablePadding="@dimen/dp_12"
android:text="不邮寄" />
</RadioGroup>
</LinearLayout>

<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_0_5"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:background="@color/common_line_color" />

<!--填写邮寄信息-->
<LinearLayout
android:id="@+id/LLMailInfo"
android:visibility="gone"
style="@style/MatchWrap.Vertical">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/dp_15">

<TextView
style="@style/redStar"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

<TextView
style="@style/blackTextStyle14"
android:layout_width="@dimen/dp_127"
android:layout_height="wrap_content"
android:text="姓名" />

<EditText
android:id="@+id/etUserName"
style="@style/blackTextStyle14"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:hint="请输入"
android:textColorHint="@color/gray07" />
</LinearLayout>

<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_0_5"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:background="@color/common_line_color" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/dp_15">

<TextView
style="@style/redStar"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

<TextView
style="@style/blackTextStyle14"
android:layout_width="@dimen/dp_127"
android:layout_height="wrap_content"
android:text="电话" />

<EditText
android:id="@+id/etPhone"
style="@style/blackTextStyle14"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:hint="请输入"
android:inputType="number"
android:textColorHint="@color/gray07" />
</LinearLayout>

<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_0_5"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:background="@color/common_line_color" />

<LinearLayout
android:id="@+id/LLArea"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="@dimen/dp_15">

<TextView
style="@style/redStar"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

<TextView
style="@style/blackTextStyle14"
android:layout_width="@dimen/dp_127"
android:layout_height="wrap_content"
android:text="地区" />

<TextView
android:id="@+id/tvArea"
style="@style/gray07TextStyle14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:textColor="@color/color_333333"
android:textColorHint="@color/color_999999"
android:hint="请选择" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_13"
android:src="@mipmap/the_right" />
</LinearLayout>

<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_0_5"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:background="@color/common_line_color" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/dp_15">

<TextView
style="@style/redStar"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

<TextView
style="@style/blackTextStyle14"
android:layout_width="@dimen/dp_127"
android:layout_height="wrap_content"
android:text="详细地址" />

<EditText
android:id="@+id/etAddr"
style="@style/blackTextStyle14"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:hint="请输入"
android:textColorHint="@color/gray07" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_0_5"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:background="@color/common_line_color" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/dp_15">

<TextView
style="@style/redStar"
android:visibility="invisible"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

<TextView
style="@style/blackTextStyle14"
android:layout_width="@dimen/dp_127"
android:layout_height="wrap_content"
android:text="邮政编码" />

<EditText
android:id="@+id/etPostCard"
style="@style/blackTextStyle14"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:hint="请输入"
android:textColorHint="@color/gray07" />
</LinearLayout>

<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_0_5"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:background="@color/common_line_color" />
</LinearLayout>
</com.ruffian.library.widget.RLinearLayout>

<TextView
style="@style/WrapWrap"
android:paddingLeft="@dimen/dp_15"
android:paddingTop="@dimen/dp_15"
android:paddingRight="@dimen/dp_15"
android:text="收货方式"
android:textColor="@color/color_333333"
android:textSize="@dimen/sp_16"
android:textStyle="bold" />

<com.ruffian.library.widget.RLinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/title"
android:layout_marginStart="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_15"
android:layout_marginEnd="@dimen/dp_15"
android:layout_marginBottom="@dimen/dp_15"
android:orientation="vertical"
app:background_normal="@color/white"
app:corner_radius="@dimen/dp_10">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:padding="@dimen/dp_15">

<TextView
style="@style/redStar"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

<TextView
style="@style/blackTextStyle14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="拿到货物方式" />

<RadioGroup
android:id="@+id/rgReceive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="@dimen/dp_25"
android:checkedButton="@+id/radio1"
android:orientation="horizontal">

<RadioButton
android:id="@+id/rbOnline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/white"
android:button="@null"
android:drawableLeft="@drawable/radio_btn_1"
android:drawablePadding="@dimen/dp_12"
android:text="线上" />

<RadioButton
android:id="@+id/rbOffline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/dp_20"
android:background="@color/white"
android:button="@null"
android:drawableLeft="@drawable/radio_btn_1"
android:drawablePadding="@dimen/dp_12"
android:text="线下" />
</RadioGroup>
</LinearLayout>

<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_0_5"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:background="@color/common_line_color" />

<!--填写邮寄信息-->
<LinearLayout
android:id="@+id/LLOnLine"
android:visibility="gone"
style="@style/MatchWrap.Vertical">

<LinearLayout
android:id="@+id/LLLogisticCompany"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_45"
android:background="#FFFFFF"
android:gravity="center_vertical"
android:paddingHorizontal="@dimen/dp_15">

<TextView
style="@style/redStar"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

<TextView
style="@style/blackTextStyle14"
android:layout_width="@dimen/dp_127"
android:layout_height="wrap_content"
android:text="快递公司" />

<TextView
android:id="@+id/tvLogisticName"
style="@style/EditTextStyle"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@color/white"
android:gravity="center_vertical"
android:hint="请选择"
android:paddingHorizontal="@dimen/dp_20" />

<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/arrows_right_ic" />

</LinearLayout>

<View
android:layout_width="match_parent"
android:layout_height="@dimen/dp_0_5"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:background="@color/common_line_color" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/dp_45"
android:background="#FFFFFF"
android:gravity="center_vertical"
android:paddingHorizontal="@dimen/dp_15">

<TextView
style="@style/redStar"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

<TextView
style="@style/blackTextStyle14"
android:layout_width="@dimen/dp_127"
android:layout_height="wrap_content"
android:text="快递单号" />

<com.hjq.widget.view.ClearEditText
android:id="@+id/etLogisticNum"
style="@style/EditTextStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:drawablePadding="@dimen/dp_15"
android:hint="请输入"
android:paddingHorizontal="@dimen/dp_20" />
</LinearLayout>

</LinearLayout>
</com.ruffian.library.widget.RLinearLayout>

<TextView
style="@style/WrapWrap"
android:paddingLeft="@dimen/dp_15"
android:paddingTop="@dimen/dp_15"
android:paddingRight="@dimen/dp_15"
android:text="更换原因"
android:textColor="@color/color_333333"
android:textSize="@dimen/sp_16"
android:textStyle="bold" />

<LinearLayout
android:id="@+id/LLReason"
style="@style/MatchWrap.Horizontal"
android:layout_height="@dimen/dp_45"
android:layout_marginHorizontal="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_15"
android:layout_marginBottom="@dimen/dp_15"
android:background="@drawable/bg_white_radius"
android:gravity="center_vertical"
android:paddingHorizontal="@dimen/dp_15">

<TextView
android:id="@+id/tvReason"
style="@style/AutoWrap"
android:hint="请选择更换原因"
android:textColorHint="@color/color_999999" />

<ImageView
style="@style/WrapWrap"
android:layout_width="@dimen/dp_20"
android:layout_height="@dimen/dp_20"
android:src="@mipmap/the_right" />
</LinearLayout>

<com.ruffian.library.widget.RLinearLayout
android:id="@+id/LLInputReason"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginBottom="@dimen/dp_15"
android:orientation="vertical"
android:paddingLeft="@dimen/dp_15"
android:paddingRight="@dimen/dp_20"
android:paddingBottom="@dimen/dp_15"
android:visibility="gone"
app:background_normal="@color/white"
app:corner_radius="@dimen/dp_10">

<EditText
android:id="@+id/etReason"
style="@style/black02TextStyle14"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_hhyy_title"
android:background="@color/white"
android:gravity="left"
android:hint="请输入更换原因,限制50字以内"
android:maxLength="50"
android:minHeight="@dimen/dp_100"
android:paddingLeft="@dimen/dp_7"
android:paddingTop="@dimen/dp_15"
android:textColorHint="@color/text98" />
</com.ruffian.library.widget.RLinearLayout>

<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>
</androidx.core.widget.NestedScrollView>
</LinearLayout>

Завантаження…
Відмінити
Зберегти