@@ -531,6 +531,12 @@ | |||
android:launchMode="singleTop" | |||
android:screenOrientation="portrait" /> | |||
<!--卡签启用、停用--> | |||
<activity | |||
android:name=".project.ui.activity.after.StartStopEtcActivity" | |||
android:launchMode="singleTop" | |||
android:screenOrientation="portrait" /> | |||
</application> | |||
</manifest> |
@@ -45,9 +45,9 @@ public class MyRetrofit { | |||
* 修改文件上传地址:VPN访问:192.168.101.145:6001、办公网络访问:222.85.144.89:19003 | |||
* 回显地址:222.85.144.89:19002/xxxxxx | |||
*/ | |||
// private final String BaseUrl = "http://192.168.100.63:8087/ifzt/api/"; | |||
private final String BaseUrl = "http://192.168.100.63:8087/ifzt/api/"; | |||
// private final String BaseUrl = "http://58.16.58.161:19002/ifzt/api/"; | |||
private final String BaseUrl = "http://222.85.144.89:19002/ifzt/api/"; | |||
// private final String BaseUrl = "http://222.85.144.89:19002/ifzt/api/"; | |||
private final String appId = "admin001"; | |||
private final String IFCODE = ""; | |||
private final String bizContent = ""; |
@@ -128,9 +128,13 @@ 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 IFCODE886 = "886"; //换货/换卡签审核接口 | |||
public static final String IFCODE966 = "966"; //统一会员平台验证码校验接口 | |||
public static final String IFCODE92 = "92"; //卡签注销验证接口 | |||
public static final String IFCODE92 = "92"; //卡签注销验证接口 | |||
public static final String IFCODE146 = "146"; //卡签注销 | |||
public static final String IFCODE897 = "897"; //卡确认注销接口 | |||
public static final String IFCODE891 = "891"; //卡续期 | |||
public static final String IFCODE892 = "892"; //卡签停用启用 | |||
public static final String IFCODE898 = "898"; //卡信息变更确认 | |||
} |
@@ -5,6 +5,7 @@ package com.huntersun.vkyes.etcopencard.project.api.bean; | |||
* Description:退款原因 | |||
*/ | |||
public class ReasonBean { | |||
public String id; | |||
public String reason; | |||
public boolean isCheck; | |||
@@ -1,12 +1,12 @@ | |||
package com.huntersun.vkyes.etcopencard.project.api.bean; | |||
import com.alibaba.fastjson.annotation.JSONField; | |||
import com.huntersun.vkyes.etcopencard.project.tool.MyShared; | |||
import com.huntersun.vkyes.etcopencard.project.utils.Constants; | |||
import java.util.List; | |||
/** | |||
* 请求参数bean | |||
* @author admin | |||
*/ | |||
public class SendTheVerificationCodeBean { |
@@ -1,14 +1,39 @@ | |||
package com.huntersun.vkyes.etcopencard.project.bluetooth; | |||
import android.annotation.SuppressLint; | |||
import android.app.Activity; | |||
import android.bluetooth.BluetoothAdapter; | |||
import android.content.Context; | |||
import android.content.Intent; | |||
import android.text.TextUtils; | |||
import android.util.Log; | |||
import com.blankj.utilcode.util.LogUtils; | |||
import com.google.gson.Gson; | |||
import com.hjq.base.BaseDialog; | |||
import com.huntersun.vky.obublelib.box.BoxManagers; | |||
import com.huntersun.vky.obublelib.util.ToastUtil; | |||
import com.huntersun.vkyes.etcopencard.R; | |||
import com.huntersun.vkyes.etcopencard.project.api.Api; | |||
import com.huntersun.vkyes.etcopencard.project.api.Converter; | |||
import com.huntersun.vkyes.etcopencard.project.api.MyRetrofit; | |||
import com.huntersun.vkyes.etcopencard.project.api.RequestParameters; | |||
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.ui.activity.after.StartStopEtcActivity; | |||
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; | |||
import com.huntersun.vkyes.etcopencard.src.ui.dialog.WaitDialog; | |||
import java.util.Objects; | |||
import io.reactivex.Observable; | |||
import io.reactivex.ObservableOnSubscribe; | |||
import io.reactivex.android.schedulers.AndroidSchedulers; | |||
import io.reactivex.schedulers.Schedulers; | |||
import retrofit2.Response; | |||
/** | |||
* 蓝牙写卡写签 | |||
@@ -16,6 +41,109 @@ import io.reactivex.schedulers.Schedulers; | |||
* @author admin | |||
*/ | |||
public class BluetoothWriteCardWriteTab { | |||
/** | |||
* 写卡(带搜索蓝牙操作) | |||
* @param command 指令 | |||
* @param cardId 卡号 | |||
* @param cosRecordId 卡指令步骤编号 | |||
* @param cosType 写卡操作类型 1- 开卡. 2- 修改卡内信息 4- 卡签绑定 9- 销卡 | |||
* @param callback | |||
*/ | |||
public static void writeCommandToCardWithCode51(Activity context, | |||
String command, | |||
String cardId, | |||
int cosType, | |||
String cosRecordId, | |||
Callback callback){ | |||
if (FunHelper.isEmpty(command)){ | |||
ToastUtil.showS(context,"写卡指令为空,请重试!"); | |||
return; | |||
} | |||
BaseDialog mDialog = new WaitDialog.Builder(context).setCancelable(false).setMessage("卡指令写入中...").create(); | |||
mDialog.show(); | |||
new BluetoothDialog.Builder(context).setResult(new BluetoothDialog.Builder.OnResult() { | |||
/*未打开的蓝牙*/ | |||
@Override | |||
public void unopenedBluetooth() { | |||
if (mDialog != null)mDialog.dismiss(); | |||
Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); | |||
context.startActivityForResult(intent, 1); | |||
} | |||
/*蓝牙连接成功*/ | |||
@SuppressLint("LogNotTimber") | |||
@Override | |||
public void BluetoothLinkIsSuccessful(BoxManagers boxManagers) { | |||
writeCommandToCard(context,mDialog,command,cardId,cosType,cosRecordId,callback); | |||
} | |||
@Override | |||
public void close() { | |||
if (mDialog != null)mDialog.dismiss(); | |||
} | |||
}).show(); | |||
} | |||
/** | |||
* 写卡指令返回 | |||
* @param context | |||
* @param commands | |||
* @param callback | |||
*/ | |||
private static void writeCommandToCard(Activity context, | |||
BaseDialog mDialog, | |||
String commands, | |||
String cardId, | |||
int cosType, | |||
String cosRecordId, | |||
Callback callback){ | |||
String result = writeCard(commands); | |||
//LogUtils.e("写入结果>>>>>>",result); | |||
if (!result.endsWith("9000")){ | |||
ToastUtil.showS(context,"写卡失败,请重试!"); | |||
mDialog.dismiss(); | |||
return; | |||
} | |||
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean(); | |||
bean.setCardId(cardId); //卡号 | |||
bean.setCommand(commands); //指令 | |||
bean.setResponse(result); //卡响应 | |||
bean.setCosRecordId(cosRecordId); //卡指令步骤编号 | |||
bean.setCosType(cosType == 0 ? "2" : String.valueOf(cosType)); | |||
bean.setStaffId(bean.getOpId()); //人 | |||
bean.setAgentId("52010106004"); //机构号 | |||
bean.setTerminalId("999999999999"); | |||
bean.setChannelId("5201010200601130001"); //网点编号 | |||
bean.setChannelType("1"); //网点类型 | |||
RequestParameters parameters = new RequestParameters(IFCode.IFCODE51, new Gson().toJson(bean)); | |||
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters) | |||
.enqueue(new Converter<Result>(context) { | |||
@Override | |||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent1) { | |||
if (Objects.equals(bizContent1.getOrderStatus(), "1")) {//cos 继续执行 | |||
writeCommandToCard(context,mDialog,bizContent1.getCommand(),cardId,cosType,cosRecordId,callback); | |||
} else if (Objects.equals(bizContent1.getOrderStatus(), "2")) {//cos执行完成 if (mDialog != null)mDialog.dismiss(); | |||
if (mDialog != null) mDialog.dismiss(); | |||
if (callback != null){ | |||
callback.success(); | |||
callback.success(bizContent1); | |||
} | |||
} | |||
} | |||
@Override | |||
public void onError(String err, Response<Result> resp) { | |||
super.onError(err, resp); | |||
if (mDialog != null) mDialog.dismiss(); | |||
if (callback != null){ | |||
callback.fail(resp.body().errorMsg); | |||
} | |||
} | |||
}); | |||
} | |||
/** | |||
* 写卡 | |||
@@ -79,10 +207,10 @@ public class BluetoothWriteCardWriteTab { | |||
return false; | |||
} | |||
interface Callback { | |||
void success(); | |||
void fail(String str); | |||
public interface Callback { | |||
default void success(){}; | |||
default void success(ResultBean.BizContent result){} | |||
default void fail(String str){}; | |||
} | |||
} |
@@ -48,11 +48,11 @@ public class ConfirmDialog { | |||
public ConfirmDialog.Builder onClick(ConfirmDialog.Result result) { | |||
btnConfirm.setOnClickListener(v -> { | |||
result.confirm(); | |||
if(result != null) result.confirm(); | |||
dismiss(); | |||
}); | |||
tvCancel.setOnClickListener(v -> { | |||
result.cancel(); | |||
if(result != null) result.cancel(); | |||
dismiss(); | |||
}); | |||
return this; |
@@ -0,0 +1,158 @@ | |||
package com.huntersun.vkyes.etcopencard.project.dialog; | |||
import android.content.Context; | |||
import android.text.TextUtils; | |||
import android.view.Gravity; | |||
import android.view.View; | |||
import android.widget.Button; | |||
import android.widget.EditText; | |||
import com.alibaba.fastjson.JSONArray; | |||
import com.chad.library.adapter.base.BaseQuickAdapter; | |||
import com.chad.library.adapter.base.BaseViewHolder; | |||
import com.google.gson.Gson; | |||
import com.huntersun.vkyes.etcopencard.R; | |||
import com.huntersun.vkyes.etcopencard.project.api.Api; | |||
import com.huntersun.vkyes.etcopencard.project.api.Converter; | |||
import com.huntersun.vkyes.etcopencard.project.api.MyRetrofit; | |||
import com.huntersun.vkyes.etcopencard.project.api.RequestParameters; | |||
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.api.bean.SendTheVerificationCodeBean; | |||
import com.huntersun.vkyes.etcopencard.src.action.ToastAction; | |||
import com.huntersun.vkyes.etcopencard.src.ui.dialog.CommonDialog; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import androidx.recyclerview.widget.RecyclerView; | |||
import retrofit2.Response; | |||
/** | |||
* 原因列表 | |||
*/ | |||
public class ReasonListDialog { | |||
public static final class Builder extends CommonDialog.Builder<Builder> implements ToastAction { | |||
private final Context Context; | |||
private final EditText mInputView; | |||
private final RecyclerView recyclerView; | |||
private final Button search; | |||
private List<ReasonBean> list; | |||
private String code; //请求code | |||
public Builder(Context context,String code, ResultItem result) { | |||
super(context); | |||
Context = context; | |||
this.code = code; | |||
setCustomView(R.layout.dialog_menu_mail); | |||
mInputView = findViewById(R.id.tv_input_message); | |||
recyclerView = findViewById(R.id.recycler); | |||
search = findViewById(R.id.search); | |||
recyclerView.setAdapter(adapter); | |||
//背景层开关 | |||
setCanceledOnTouchOutside(true); | |||
list = new ArrayList<>(); | |||
setTitle("请选择原因"); | |||
initData(result); | |||
search.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View v) { | |||
if (TextUtils.isEmpty(mInputView.getText() + "")) { | |||
adapter.replaceData(list); | |||
return; | |||
} | |||
List<ReasonBean> list2 = new ArrayList<>(); | |||
for (ReasonBean item : list) { | |||
if (item.reason.contains(mInputView.getText() + "")) { | |||
list2.add(item); | |||
} | |||
} | |||
if (list2.size() > 0) { | |||
adapter.replaceData(list2); | |||
} else { | |||
toast("无包含内容"); | |||
} | |||
} | |||
}); | |||
} | |||
public void initData(ResultItem resultItem) { | |||
//TODO 测试 测试数据编写 | |||
if (code.equals("注销原因")){//注销原因 | |||
list.add(new ReasonBean("注销原因1")); | |||
list.add(new ReasonBean("注销原因2")); | |||
list.add(new ReasonBean("注销原因3")); | |||
list.add(new ReasonBean("注销原因4")); | |||
list.add(new ReasonBean("其他")); | |||
}else if (code.equals("更换原因")){//更换原因 | |||
list.add(new ReasonBean("更换原因1")); | |||
list.add(new ReasonBean("更换原因2")); | |||
list.add(new ReasonBean("更换原因3")); | |||
list.add(new ReasonBean("更换原因4")); | |||
list.add(new ReasonBean("其他")); | |||
} | |||
if (list.size() > 0) { | |||
adapter.replaceData(list); | |||
} | |||
/*SendTheVerificationCodeBean bizContent = new SendTheVerificationCodeBean(); | |||
RequestParameters parameters = new RequestParameters(IFCode.IFCODE168, new Gson().toJson(bizContent)); | |||
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters) | |||
.enqueue(new Converter<Result>(true) { | |||
@Override | |||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
list = JSONArray.parseArray(resultBean.getBizContent() + "", ReasonBean.class); | |||
if (list.size() > 0) { | |||
adapter.replaceData(list); | |||
} | |||
} | |||
@Override | |||
public void onError(String err, Response<Result> resp) { | |||
super.onError(err, resp); | |||
} | |||
});*/ | |||
adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() { | |||
@Override | |||
public void onItemClick(BaseQuickAdapter baseQuickAdapter, View view, int i) { | |||
if (view.getId() == R.id.text) { | |||
resultItem.success((ReasonBean) baseQuickAdapter.getData().get(i)); | |||
dismiss(); | |||
} | |||
} | |||
}); | |||
} | |||
BaseQuickAdapter<ReasonBean, BaseViewHolder> adapter = new BaseQuickAdapter<ReasonBean, BaseViewHolder>(R.layout.item_msg) { | |||
@Override | |||
protected void convert(BaseViewHolder helper, ReasonBean item) { | |||
helper.setText(R.id.text, item.reason); | |||
} | |||
}; | |||
@Override | |||
public Builder setBottom() { | |||
return super.setBottom(); | |||
} | |||
@Override | |||
public Builder setCancel(CharSequence text) { | |||
return super.setCancel(null); | |||
} | |||
@Override | |||
public Builder setGravity(int gravity) { | |||
return super.setGravity(Gravity.CENTER); | |||
} | |||
} | |||
public interface ResultItem { | |||
void success(ReasonBean item); | |||
} | |||
} |
@@ -152,6 +152,7 @@ public class LogoutEtcStep1Activity extends AppActivity { | |||
params.put("channelId", "5201010200601130001"); | |||
params.put("channelType", "1"); | |||
params.put("TerminalId", "999999999999"); | |||
params.put("terminalId", "999999999999"); | |||
params.put("staffId", (String) MyShared.getInstance().get(MyShared.OPENID, "")); | |||
MyRetrofit.newInstance(IFCode.IFCODE92, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
@@ -181,19 +182,14 @@ public class LogoutEtcStep1Activity extends AppActivity { | |||
return; | |||
} | |||
/*if (!FunHelper.isRightVehiclePlate(FunHelper.getText(binding.etSearch))){ | |||
if (!FunHelper.isRightVehiclePlate(FunHelper.getText(binding.etSearch))){ | |||
toast("请输入正确的车牌号进行搜索!"); | |||
return; | |||
}*/ | |||
} | |||
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean(); | |||
bean.setVehicleId(FunHelper.getText(binding.etSearch) + "_" + 0); | |||
RequestParameters parameters = new RequestParameters(IFCode.IFCODE171, new Gson().toJson(bean)); | |||
//TODO 测试 需删除 | |||
//bean.setId("c72dc3cb085c4a9b8943da8f43f41189"); | |||
//RequestParameters parameters = new RequestParameters(IFCode.IFCODE9, new Gson().toJson(bean)); | |||
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters) | |||
.enqueue(new Converter<Result>(getContext(), "储值卡信息查询中...") { | |||
@Override |
@@ -10,6 +10,7 @@ import android.view.View; | |||
import com.alibaba.fastjson.JSON; | |||
import com.blankj.utilcode.util.LogUtils; | |||
import com.google.gson.Gson; | |||
import com.hjq.base.BaseDialog; | |||
import com.huntersun.vky.obublelib.box.BoxManagers; | |||
import com.huntersun.vkyes.etcopencard.databinding.ActivityLogoutEtcStep2Binding; | |||
import com.huntersun.vkyes.etcopencard.project.api.Api; | |||
@@ -19,10 +20,12 @@ import com.huntersun.vkyes.etcopencard.project.api.MyRetrofit; | |||
import com.huntersun.vkyes.etcopencard.project.api.RequestParameters; | |||
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.api.bean.SendTheVerificationCodeBean; | |||
import com.huntersun.vkyes.etcopencard.project.bluetooth.BluetoothDialog; | |||
import com.huntersun.vkyes.etcopencard.project.bluetooth.BluetoothWriteCardWriteTab; | |||
import com.huntersun.vkyes.etcopencard.project.dialog.ReasonListDialog; | |||
import com.huntersun.vkyes.etcopencard.project.tool.MyShared; | |||
import com.huntersun.vkyes.etcopencard.project.tool.QRCode; | |||
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; | |||
@@ -31,6 +34,7 @@ import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||
import com.huntersun.vkyes.etcopencard.src.http.glide.GlideApp; | |||
import com.huntersun.vkyes.etcopencard.src.other.CodeCountDown; | |||
import com.huntersun.vkyes.etcopencard.src.ui.activity.ImageSelectActivity; | |||
import com.huntersun.vkyes.etcopencard.src.ui.dialog.WaitDialog; | |||
import java.util.HashMap; | |||
import java.util.Map; | |||
@@ -132,6 +136,33 @@ public class LogoutEtcStep2Activity extends AppActivity { | |||
onImage(); | |||
} | |||
}); | |||
//选择取消原因 | |||
binding.LLReason.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
showReasonDialog(); | |||
} | |||
}); | |||
} | |||
/** | |||
* 选择 | |||
*/ | |||
private void showReasonDialog(){ | |||
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(); | |||
} | |||
private void checkParams(){ | |||
@@ -160,7 +191,7 @@ public class LogoutEtcStep2Activity extends AppActivity { | |||
return; | |||
} | |||
doLogoutEtc(); | |||
checkUser(); | |||
} | |||
private void setIsHaveCard(){ | |||
@@ -256,31 +287,15 @@ public class LogoutEtcStep2Activity extends AppActivity { | |||
} | |||
/** | |||
* 写卡 | |||
* @param command | |||
* 写卡->确认注销 | |||
*/ | |||
private void toWriteCommand(String command){ | |||
new BluetoothDialog.Builder(this).setResult(new BluetoothDialog.Builder.OnResult() { | |||
/*未打开的蓝牙*/ | |||
@Override | |||
public void unopenedBluetooth() { | |||
Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); | |||
startActivityForResult(intent, 1); | |||
} | |||
/*蓝牙连接成功*/ | |||
@SuppressLint("LogNotTimber") | |||
private void toWriteCommand(ResultBean.BizContent bizContent){ | |||
BluetoothWriteCardWriteTab.writeCommandToCardWithCode51(this, bizContent.getCommand(), curBizContent.getCardId(), 9, bizContent.getCosRecordId(), new BluetoothWriteCardWriteTab.Callback() { | |||
@Override | |||
public void BluetoothLinkIsSuccessful(BoxManagers boxManagers) { | |||
String result = BluetoothWriteCardWriteTab.writeCard(command); | |||
LogUtils.e("写卡结果>>>>>",result); | |||
if (!result.equals("9000")){ | |||
toast("写卡失败,请重试!"); | |||
return; | |||
} | |||
public void success(ResultBean.BizContent result) { | |||
confirmLogoutEtc(); | |||
} | |||
}).show(); | |||
}); | |||
} | |||
/** | |||
@@ -308,10 +323,30 @@ public class LogoutEtcStep2Activity extends AppActivity { | |||
} | |||
/** | |||
* 注销ETC | |||
* 校验用户 | |||
*/ | |||
private void doLogoutEtc() { | |||
private void checkUser() { | |||
showDialog("注销申请中..."); | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("mobile", curBizContent.getCustomerTel()); | |||
params.put("code", FunHelper.getText(binding.etCode)); | |||
MyRetrofit.newInstance(IFCode.IFCODE966, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
doLogoutEtc(); | |||
} | |||
@Override | |||
public void onError() { | |||
MyRetrofit.ReturnResult.super.onError(); | |||
hideDialog(); | |||
} | |||
}); | |||
} | |||
/** | |||
* 注销ETC | |||
*/ | |||
private void doLogoutEtc(){ | |||
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean(); | |||
bean.setOrderId(curBizContent.getOrderId()); | |||
bean.setCardId(curBizContent.getCardId()); | |||
@@ -320,7 +355,7 @@ public class LogoutEtcStep2Activity extends AppActivity { | |||
bean.setHasCard(hasCard); //是否有卡 0-无,1-有 | |||
bean.setHasObu(hasOBU); //是否有Obu 0-无,1-有 | |||
bean.setCosProvider((curType == 3 && isDamage == 2) ? "1" : "0"); //是否需要写卡指令(有卡有签且签正常需要写卡) 0-不需要 1-需要 | |||
bean.setReasonCancellation(FunHelper.getText(binding.etReason)); //注销原因 | |||
bean.setReasonCancellation(FunHelper.isEmpty(FunHelper.getText(binding.tvReason)) ? FunHelper.getText(binding.etReason) : FunHelper.getText(binding.tvReason)); //注销原因 | |||
if (needClipCard){ | |||
bean.setCancelImgUrl(ivClipImg); | |||
} | |||
@@ -335,11 +370,8 @@ public class LogoutEtcStep2Activity extends AppActivity { | |||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
hideDialog(); | |||
if (curType == 3 && isDamage == 2){//需要写卡 | |||
if (FunHelper.isEmpty(bizContent.getCommand())){ | |||
toast("写卡指令为空!"); | |||
return; | |||
} | |||
toWriteCommand(bizContent.getCommand()); | |||
toWriteCommand(bizContent); | |||
}else{//不需要写卡 | |||
confirmLogoutEtc(); | |||
} | |||
@@ -366,6 +398,7 @@ public class LogoutEtcStep2Activity extends AppActivity { | |||
params.put("channelId", "5201010200601130001"); | |||
params.put("channelType", "1"); | |||
params.put("TerminalId", "999999999999"); | |||
params.put("terminalId", "999999999999"); | |||
params.put("staffId", (String) MyShared.getInstance().get(MyShared.OPENID, "")); | |||
MyRetrofit.newInstance(IFCode.IFCODE897, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
@@ -420,4 +453,13 @@ public class LogoutEtcStep2Activity extends AppActivity { | |||
protected void initData() { | |||
} | |||
@Override | |||
protected void onDestroy() { | |||
super.onDestroy(); | |||
if (mCountDownTimerUtils != null){ | |||
mCountDownTimerUtils.cancel(); | |||
mCountDownTimerUtils = null; | |||
} | |||
} | |||
} |
@@ -12,7 +12,8 @@ import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||
public class LogoutEtcSuccessActivity extends AppActivity { | |||
private ActivityLogoutEtcSuccessBinding binding; | |||
private String from; //0-注销成功 1-欠费补缴 2-余额补领 4-更换ETC设备成功 | |||
//0-注销成功 1-欠费补缴 2-余额补领 4-更换ETC设备成功 5-停用成功 6-启用成功 | |||
private String from; | |||
@Override | |||
protected View getLayoutView() { | |||
@@ -33,7 +34,11 @@ public class LogoutEtcSuccessActivity extends AppActivity { | |||
binding.tvMsg.setVisibility(View.VISIBLE); | |||
binding.tvMsg.setText("您的旧卡余额已成功转移至新卡中"); | |||
}else if (from.equals("4")){ | |||
binding.tvHint.setText("办理成功"); | |||
binding.tvHint.setText("申请成功"); | |||
}else if (from.equals("5")){ | |||
binding.tvHint.setText("停用成功"); | |||
}else if (from.equals("6")){ | |||
binding.tvHint.setText("启用成功"); | |||
} | |||
binding.btnHome.setOnClickListener(new View.OnClickListener() { | |||
@Override |
@@ -6,8 +6,12 @@ import android.view.View; | |||
import com.alibaba.fastjson.JSON; | |||
import com.huntersun.vkyes.etcopencard.databinding.ActivityReplaceEtcStep4Binding; | |||
import com.huntersun.vkyes.etcopencard.project.api.MyRetrofit; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.DotBean; | |||
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.DotListDialog; | |||
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; | |||
@@ -98,19 +102,34 @@ public class ReplaceEtcStep4Activity extends AppActivity { | |||
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 (view == binding.btnNext){//下一步 | |||
if (FunHelper.isEmpty(FunHelper.getText(binding.etCode))){ | |||
toast("请输入验证码"); | |||
return; | |||
} | |||
checkUser(); | |||
}else if (view == binding.mGetCodeBtn){ | |||
}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(); | |||
} | |||
} | |||
@@ -122,19 +141,21 @@ public class ReplaceEtcStep4Activity extends AppActivity { | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("mobile", data.getCustomerTel()); | |||
params.put("code", FunHelper.getText(binding.etCode)); | |||
MyRetrofit.newInstance(IFCode.IFCODE2, params, new MyRetrofit.ReturnResult() { | |||
MyRetrofit.newInstance(IFCode.IFCODE966, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
hideDialog(); | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("orderId", data.getOrderId()); | |||
params.put("applyType", applyType); | |||
params.put("applyRes", FunHelper.getText(binding.etReason)); | |||
params.put("applyRes", FunHelper.isEmpty(FunHelper.getText(binding.tvReason)) ? FunHelper.getText(binding.etReason) : FunHelper.getText(binding.tvReason)); | |||
MyRetrofit.newInstance(IFCode.IFCODE888, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
hideDialog(); | |||
toast("申请成功!"); | |||
Bundle bundle = new Bundle(); | |||
bundle.putString("from","4"); | |||
jumpToPage(LogoutEtcSuccessActivity.class,bundle); | |||
finish(); | |||
} | |||
@Override | |||
@@ -160,12 +181,13 @@ public class ReplaceEtcStep4Activity extends AppActivity { | |||
showDialog("发送中..."); | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("mobile", data.getCustomerTel()); | |||
MyRetrofit.newInstance(IFCode.IFCODE966, params, new MyRetrofit.ReturnResult() { | |||
MyRetrofit.newInstance(IFCode.IFCODE2, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
Bundle bundle = new Bundle(); | |||
bundle.putString("from","4"); | |||
jumpToPage(LogoutEtcSuccessActivity.class,bundle); | |||
hideDialog(); | |||
toast("验证码发送成功!"); | |||
mCountDownTimerUtils = new CodeCountDown(ReplaceEtcStep4Activity.this, binding.mGetCodeBtn, 60000, 1000); | |||
mCountDownTimerUtils.start(); | |||
} | |||
@Override | |||
public void onError() { | |||
@@ -219,4 +241,13 @@ public class ReplaceEtcStep4Activity extends AppActivity { | |||
protected void initData() { | |||
} | |||
@Override | |||
protected void onDestroy() { | |||
super.onDestroy(); | |||
if (mCountDownTimerUtils != null){ | |||
mCountDownTimerUtils.cancel(); | |||
mCountDownTimerUtils = null; | |||
} | |||
} | |||
} |
@@ -0,0 +1,244 @@ | |||
package com.huntersun.vkyes.etcopencard.project.ui.activity.after; | |||
import android.annotation.SuppressLint; | |||
import android.bluetooth.BluetoothAdapter; | |||
import android.content.Intent; | |||
import android.os.Bundle; | |||
import android.view.View; | |||
import com.alibaba.fastjson.JSON; | |||
import com.blankj.utilcode.util.LogUtils; | |||
import com.google.gson.Gson; | |||
import com.hjq.base.BaseDialog; | |||
import com.huntersun.vky.obublelib.box.BoxManagers; | |||
import com.huntersun.vkyes.etcopencard.R; | |||
import com.huntersun.vkyes.etcopencard.databinding.ActivityReplaceEtcStep1Binding; | |||
import com.huntersun.vkyes.etcopencard.databinding.ActivityStartStopEtcBinding; | |||
import com.huntersun.vkyes.etcopencard.project.api.Api; | |||
import com.huntersun.vkyes.etcopencard.project.api.Converter; | |||
import com.huntersun.vkyes.etcopencard.project.api.MyRetrofit; | |||
import com.huntersun.vkyes.etcopencard.project.api.RequestParameters; | |||
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.bluetooth.BluetoothDialog; | |||
import com.huntersun.vkyes.etcopencard.project.bluetooth.BluetoothWriteCardWriteTab; | |||
import com.huntersun.vkyes.etcopencard.project.dialog.ConfirmDialog; | |||
import com.huntersun.vkyes.etcopencard.project.tool.MyShared; | |||
import com.huntersun.vkyes.etcopencard.project.tool.Utils; | |||
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.manager.ActivityManager; | |||
import com.huntersun.vkyes.etcopencard.src.ui.activity.LoginActivity; | |||
import com.huntersun.vkyes.etcopencard.src.ui.dialog.WaitDialog; | |||
import java.util.HashMap; | |||
import java.util.Map; | |||
import retrofit2.Response; | |||
/** | |||
* Date :2023-03-20 | |||
* Description:启用停用ETC设备 | |||
*/ | |||
public class StartStopEtcActivity extends AppActivity { | |||
private ActivityStartStopEtcBinding binding; | |||
private ResultBean.BizContent curBizContent; | |||
//操作 1-停用 2-启用 | |||
private int operation = -1; | |||
@Override | |||
protected View getLayoutView() { | |||
binding = ActivityStartStopEtcBinding.inflate(getLayoutInflater()); | |||
return binding.getRoot(); | |||
} | |||
@Override | |||
protected void initView() { | |||
binding.LLSearchResult.setVisibility(View.GONE); | |||
binding.btnSearch.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
doSearch(); | |||
} | |||
}); | |||
binding.btnStop.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
doStartOrStop(); | |||
} | |||
}); | |||
binding.btnStart.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View view) { | |||
doStartOrStop(); | |||
} | |||
}); | |||
} | |||
private void setDataToView(){ | |||
if (curBizContent == null) return; | |||
binding.LLSearchResult.setVisibility(View.VISIBLE); | |||
binding.LLCardInfo.setVisibility(View.GONE); | |||
binding.LLObuInfo.setVisibility(View.GONE); | |||
binding.tvOrderId.setText(curBizContent.getOrderId()); | |||
binding.tvUserName.setText(FunHelper.isEmpty(curBizContent.getCustomerName()) ? "" : curBizContent.getCustomerName()); | |||
binding.tvCardType.setText(FunHelper.isEmpty(curBizContent.getCustomerIdtype()) ? "" : curBizContent.getCustomerIdtype()); | |||
binding.tvCardNum.setText(FunHelper.isEmpty(curBizContent.getCustomerIdnum()) ? "" : curBizContent.getCustomerIdnum()); | |||
binding.tvVehiclePlate.setText(FunHelper.isEmpty(curBizContent.getVehiclePlate()) ? "" : curBizContent.getVehiclePlate()); | |||
binding.tvColor.setText(FunHelper.isEmpty(curBizContent.getVehiclePlateColorStr()) ? "" : curBizContent.getVehiclePlateColorStr()); | |||
binding.tvCarType.setText(FunHelper.isEmpty(curBizContent.getType()) ? "" : FunHelper.getCarTypeName(curBizContent.getType())); | |||
if (curBizContent.getCardStatus().equals("11")){//停用状态-需启用 | |||
binding.btnStart.setEnabled(true); | |||
binding.btnStop.setEnabled(false); | |||
operation = 2; | |||
}else{//启用-需办理停用 | |||
binding.btnStart.setEnabled(false); | |||
binding.btnStop.setEnabled(true); | |||
operation = 1; | |||
} | |||
//显示卡信息 | |||
if (!FunHelper.isEmpty(curBizContent.getCardId())){ | |||
binding.LLCardInfo.setVisibility(View.VISIBLE); | |||
binding.tvCardIdInfo.setText(FunHelper.isEmpty(curBizContent.getCardId()) ? "卡号:" : "卡号:" + curBizContent.getCardId()); | |||
binding.tvCardTypeInfo.setText(FunHelper.isEmpty(curBizContent.getIsValueCard()) ? "卡类型:" : "卡类型:" + (curBizContent.getIsValueCard().equals("1") ? "记账卡" : "储值卡")); | |||
binding.tvCardStatusInfo.setText(FunHelper.isEmpty(curBizContent.getCardStatus()) ? "卡状态:" : "卡状态:" + FunHelper.getETCStatusName(Integer.parseInt(curBizContent.getCardStatus()))); | |||
} | |||
//显示签信息 | |||
if (!FunHelper.isEmpty(curBizContent.getObuId())){ | |||
binding.LLObuInfo.setVisibility(View.VISIBLE); | |||
binding.tvOBUIdInfo.setText(FunHelper.isEmpty(curBizContent.getObuId()) ? "OBU:" : "OBU:" + curBizContent.getObuId()); | |||
binding.tvOBUTypeInfo.setText(FunHelper.isEmpty(curBizContent.getObuStatus()) ? "OBU状态:" : "OBU状态:" + FunHelper.getOBUStatusName(Integer.parseInt(curBizContent.getObuStatus()))); | |||
} | |||
} | |||
/** | |||
* 写卡 -> 确认变更卡信息 | |||
*/ | |||
private void toWriteCardCommand(ResultBean.BizContent bizContent){ | |||
BluetoothWriteCardWriteTab.writeCommandToCardWithCode51(this, bizContent.getCommand(), curBizContent.getCardId(), 2, bizContent.getCosRecordId(), new BluetoothWriteCardWriteTab.Callback() { | |||
@Override | |||
public void success(ResultBean.BizContent result) { | |||
showDialog("卡信息变更中..."); | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("cardId", curBizContent.getCardId()); | |||
params.put("orderId", curBizContent.getOrderId()); | |||
params.put("cosRecordId", bizContent.getCosRecordId()); | |||
params.put("operation", operation == 1 ? "3" : "2"); //操作类型:1-续期确认,2-启用确认,3-停用确认,4-设备升级确认 | |||
params.put("agentId", "52010106004"); | |||
params.put("channelId", "5201010200601130001"); | |||
params.put("channelType", "1"); | |||
params.put("TerminalId", "999999999999"); | |||
params.put("terminalId", "999999999999"); | |||
params.put("staffId", (String) MyShared.getInstance().get(MyShared.OPENID, "")); | |||
MyRetrofit.newInstance(IFCode.IFCODE898, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
hideDialog(); | |||
Bundle bundle = new Bundle(); | |||
bundle.putString("from",operation == 1 ? "5" : "6"); | |||
jumpToPage(LogoutEtcSuccessActivity.class,bundle); | |||
finish(); | |||
} | |||
@Override | |||
public void onError() { | |||
MyRetrofit.ReturnResult.super.onError(); | |||
hideDialog(); | |||
} | |||
}); | |||
} | |||
}); | |||
} | |||
/** | |||
* 卡签停用启用申请 | |||
*/ | |||
private void doStartOrStop(){ | |||
new Utils().showMessDialog(getActivity(), "是否确认" + (operation == 1 ? "停用" : "启用") + "卡签?", new Utils.dialogCallback() { | |||
@Override | |||
public void onConfirm(BaseDialog dialog) { | |||
showDialog("申请中..."); | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("cardId", curBizContent.getCardId()); | |||
params.put("orderId", curBizContent.getOrderId()); | |||
params.put("operation", String.valueOf(operation)); | |||
params.put("agentId", "52010106004"); | |||
params.put("channelId", "5201010200601130001"); | |||
params.put("channelType", "1"); | |||
params.put("terminalId", "999999999999"); | |||
params.put("TerminalId", "999999999999"); | |||
params.put("staffId", (String) MyShared.getInstance().get(MyShared.OPENID, "")); | |||
MyRetrofit.newInstance(IFCode.IFCODE892, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
hideDialog(); | |||
toWriteCardCommand(bizContent); | |||
} | |||
@Override | |||
public void onError() { | |||
MyRetrofit.ReturnResult.super.onError(); | |||
hideDialog(); | |||
} | |||
}); | |||
} | |||
}); | |||
} | |||
/** | |||
* 搜索信息 | |||
*/ | |||
private void doSearch(){ | |||
if (FunHelper.isEmpty(FunHelper.getText(binding.etSearch))){ | |||
toast("请输入搜索关键词!"); | |||
return; | |||
} | |||
if (!FunHelper.isRightVehiclePlate(FunHelper.getText(binding.etSearch))){ | |||
toast("请输入正确的车牌号进行搜索!"); | |||
return; | |||
} | |||
SendTheVerificationCodeBean bean = new SendTheVerificationCodeBean(); | |||
bean.setVehicleId(FunHelper.getText(binding.etSearch) + "_" + 0); | |||
RequestParameters parameters = new RequestParameters(IFCode.IFCODE171, new Gson().toJson(bean)); | |||
//TODO 测试 需删除 | |||
//bean.setId("c72dc3cb085c4a9b8943da8f44f41189"); | |||
//RequestParameters parameters = new RequestParameters(IFCode.IFCODE9, new Gson().toJson(bean)); | |||
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters) | |||
.enqueue(new Converter<Result>(getContext(), "储值卡信息查询中...") { | |||
@Override | |||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
curBizContent = bizContent; | |||
if (curBizContent == null){ | |||
return; | |||
} | |||
setDataToView(); | |||
} | |||
@Override | |||
public void onError(String err, Response<Result> resp) { | |||
super.onError(err, resp); | |||
} | |||
}); | |||
} | |||
@Override | |||
protected void initData() { | |||
} | |||
} |
@@ -69,6 +69,9 @@ public class OrderDetailsActivity extends AppActivity implements StatusAction { | |||
binding.tvOrderStep.setText(orderData.getOrderStatus().equals(Constants.ORDER_STATUS_CANCEL + "") ? "已取消" : FunHelper.getOrderStatusName(Integer.parseInt(orderData.getOrderStep()))); | |||
binding.LLAfterSaleInfo.setVisibility(View.GONE); | |||
binding.LLStaffInfo.setVisibility(View.GONE); | |||
if (orderData.orderInfoExt == null){ | |||
orderData.orderInfoExt = new ResultBean.OrderInfoExt(); | |||
} | |||
//地址信息 | |||
if (orderData.getOrderStep().equals(String.valueOf(Constants.ORDER_STATUS_WAIT_AUDIT)) |
@@ -21,6 +21,7 @@ import com.huntersun.vkyes.etcopencard.project.ui.activity.after.EquipmentLossRe | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.after.LogoutEtcStep1Activity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.after.PayTheArrearsStep1Activity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.after.ReplaceEtcStep1Activity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.after.StartStopEtcActivity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.after.TopUpActivity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.card.ValueToBookkeepingCardActivity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.evaluate.UserEvaluateActivity; | |||
@@ -181,6 +182,9 @@ public class FragmentHomeTow extends TitleBarFragment<MainActivity> { | |||
case "余额补领": | |||
jumpToPage(BalanceReplacementActivity.class); | |||
break; | |||
case "卡签停用启用": | |||
jumpToPage(StartStopEtcActivity.class); | |||
break; | |||
default: | |||
new Utils().showMessDialog(getActivity(), "功能正在开发中..."); | |||
break; |
@@ -135,6 +135,8 @@ public class FunHelper { | |||
return "预注销"; | |||
case 99: | |||
return "已删除"; | |||
case 11: | |||
return "停用"; | |||
default: | |||
return ""; | |||
} |
@@ -238,16 +238,43 @@ | |||
android:paddingLeft="@dimen/dp_15" | |||
android:paddingTop="@dimen/dp_15" | |||
android:paddingRight="@dimen/dp_15" | |||
android:text="申请原因" | |||
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" | |||
@@ -263,7 +290,7 @@ | |||
android:paddingLeft="@dimen/dp_7" | |||
android:gravity="left" | |||
android:maxLength="50" | |||
android:hint="请输入申请原因,限制50字以内" | |||
android:hint="请输入更换原因,限制50字以内" | |||
android:textColorHint="@color/text98" | |||
android:minHeight="@dimen/dp_100" | |||
style="@style/black02TextStyle14"/> | |||
@@ -364,7 +391,7 @@ | |||
android:layout_alignParentBottom="true" | |||
android:layout_centerHorizontal="true" | |||
android:layout_gravity="center" | |||
android:layout_marginTop="@dimen/dp_150" | |||
android:layout_marginTop="@dimen/dp_30" | |||
android:layout_marginBottom="@dimen/dp_30" | |||
android:text="确定更换" | |||
android:textSize="@dimen/sp_14" /> |
@@ -295,7 +295,32 @@ | |||
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:layout_marginHorizontal="@dimen/dp_15" | |||
@@ -304,6 +329,7 @@ | |||
android:paddingHorizontal="@dimen/dp_15" | |||
android:paddingBottom="@dimen/dp_15" | |||
app:background_normal="@color/white" | |||
android:visibility="gone" | |||
app:corner_radius="@dimen/dp_10"> | |||
<RelativeLayout | |||
@@ -325,7 +351,7 @@ | |||
android:layout_height="wrap_content" | |||
android:background="@color/white" | |||
android:gravity="left" | |||
android:hint="请输入取消原因,限制50字以内" | |||
android:hint="请输入注销原因,限制50字以内" | |||
android:maxLength="50" | |||
android:minHeight="@dimen/dp_100" | |||
android:paddingLeft="@dimen/dp_7" | |||
@@ -364,9 +390,9 @@ | |||
android:layout_alignParentBottom="true" | |||
android:layout_centerHorizontal="true" | |||
android:layout_gravity="center" | |||
android:layout_marginTop="@dimen/dp_100" | |||
android:layout_marginTop="@dimen/dp_30" | |||
android:layout_marginBottom="@dimen/dp_30" | |||
android:text="下一步" | |||
android:text="确认注销" | |||
android:textSize="@dimen/sp_14" /> | |||
</LinearLayout> |
@@ -0,0 +1,381 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
xmlns:app="http://schemas.android.com/apk/res-auto" | |||
style="@style/MatchWrap.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="卡签停用和启用" | |||
app:titleColor="@color/black" /> | |||
<androidx.core.widget.NestedScrollView style="@style/MatchWrap"> | |||
<LinearLayout style="@style/MatchWrap.Vertical"> | |||
<!--搜索框--> | |||
<LinearLayout | |||
style="@style/MatchWrap.Horizontal" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:layout_marginRight="@dimen/dp_15" | |||
android:gravity="center"> | |||
<LinearLayout | |||
style="@style/AutoWrap.Horizontal" | |||
android:layout_height="@dimen/dp_35" | |||
android:layout_marginHorizontal="@dimen/dp_25" | |||
android:background="@drawable/item_home_frame3" | |||
android:gravity="center_vertical" | |||
android:paddingHorizontal="@dimen/dp_12"> | |||
<ImageView | |||
android:layout_width="@dimen/dp_15" | |||
android:layout_height="@dimen/dp_15" | |||
android:src="@drawable/search_ic" /> | |||
<com.hjq.widget.view.ClearEditText | |||
android:id="@+id/etSearch" | |||
style="@style/EditTextStyle" | |||
android:layout_width="match_parent" | |||
android:layout_height="@dimen/dp_30" | |||
android:drawablePadding="@dimen/dp_10" | |||
android:gravity="center_vertical" | |||
android:hint="请输入订单编号/车牌号" | |||
android:paddingTop="0dp" | |||
android:paddingBottom="0dp" | |||
android:textColor="@color/color_333333" | |||
android:textColorHint="@color/color_999999" | |||
android:textSize="@dimen/sp_12" /> | |||
</LinearLayout> | |||
<Button | |||
android:id="@+id/btnSearch" | |||
style="@style/BtnShortStyle" | |||
android:layout_width="@dimen/dp_70" | |||
android:layout_height="@dimen/dp_35" | |||
android:layout_gravity="center_vertical|right" | |||
android:text="搜索" | |||
android:textSize="@dimen/sp_12" /> | |||
</LinearLayout> | |||
<!--搜索结果--> | |||
<LinearLayout | |||
android:id="@+id/LLSearchResult" | |||
android:visibility="gone" | |||
style="@style/MatchWrap.Vertical"> | |||
<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 | |||
style="@style/MatchWrap.Vertical" | |||
android:layout_marginHorizontal="@dimen/dp_15" | |||
android:layout_marginTop="@dimen/dp_10" | |||
android:background="@drawable/bg_white_radius" | |||
android:padding="@dimen/dp_15"> | |||
<LinearLayout style="@style/MatchWrap.Horizontal"> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="0dp" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="订单编号" /> | |||
<TextView | |||
android:id="@+id/tvOrderId" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
style="@style/MatchWrap.Horizontal" | |||
android:layout_marginTop="@dimen/dp_12"> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="0dp" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="用户名称" /> | |||
<TextView | |||
android:id="@+id/tvUserName" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
style="@style/MatchWrap.Horizontal" | |||
android:layout_marginTop="@dimen/dp_12"> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="0dp" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="用户证件类型" /> | |||
<TextView | |||
android:id="@+id/tvCardType" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
style="@style/MatchWrap.Horizontal" | |||
android:layout_marginTop="@dimen/dp_12"> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="0dp" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="用户证件号" /> | |||
<TextView | |||
android:id="@+id/tvCardNum" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
style="@style/MatchWrap.Horizontal" | |||
android:layout_marginTop="@dimen/dp_12"> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="0dp" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="订单车牌号" /> | |||
<TextView | |||
android:id="@+id/tvVehiclePlate" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
style="@style/MatchWrap.Horizontal" | |||
android:layout_marginTop="@dimen/dp_12"> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="0dp" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="车牌颜色" /> | |||
<TextView | |||
android:id="@+id/tv_color" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
style="@style/MatchWrap.Horizontal" | |||
android:layout_marginTop="@dimen/dp_12"> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="0dp" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="收费车型" /> | |||
<TextView | |||
android:id="@+id/tvCarType" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<!--卡信息--> | |||
<LinearLayout | |||
android:id="@+id/LLCardInfo" | |||
android:visibility="gone" | |||
style="@style/MatchWrap.Vertical"> | |||
<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 | |||
style="@style/MatchWrap.Vertical" | |||
android:layout_marginHorizontal="@dimen/dp_15" | |||
android:layout_marginVertical="@dimen/dp_10" | |||
android:background="@drawable/bg_white_radius" | |||
android:paddingHorizontal="@dimen/dp_20" | |||
android:paddingVertical="@dimen/dp_15"> | |||
<LinearLayout | |||
style="@style/MatchWrap.Horizontal" | |||
android:background="@drawable/bg_card_obu_info" | |||
android:gravity="center_vertical" | |||
android:paddingTop="@dimen/dp_15" | |||
android:paddingLeft="@dimen/dp_15" | |||
android:paddingBottom="@dimen/dp_15" | |||
android:paddingRight="@dimen/dp_5"> | |||
<ImageView | |||
style="@style/WrapWrap" | |||
android:layout_width="@dimen/dp_67" | |||
android:layout_height="@dimen/dp_46" | |||
android:src="@mipmap/icon_card" /> | |||
<LinearLayout | |||
style="@style/MatchWrap.Vertical" | |||
android:layout_marginLeft="@dimen/dp_15"> | |||
<TextView | |||
android:id="@+id/tvCardIdInfo" | |||
style="@style/MatchWrap" | |||
android:text="卡号:" | |||
android:textColor="@color/common_accent_color" | |||
android:textSize="@dimen/sp_13" /> | |||
<TextView | |||
android:id="@+id/tvCardTypeInfo" | |||
style="@style/MatchWrap" | |||
android:layout_marginTop="@dimen/dp_2" | |||
android:text="卡类型:" | |||
android:textColor="@color/common_accent_color" | |||
android:textSize="@dimen/sp_13" /> | |||
<TextView | |||
android:id="@+id/tvCardStatusInfo" | |||
style="@style/MatchWrap" | |||
android:layout_marginTop="@dimen/dp_2" | |||
android:text="卡状态:" | |||
android:textColor="@color/common_accent_color" | |||
android:textSize="@dimen/sp_13" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<!--OBU设备信息--> | |||
<LinearLayout | |||
android:id="@+id/LLObuInfo" | |||
android:visibility="gone" | |||
style="@style/MatchWrap.Vertical"> | |||
<TextView | |||
style="@style/WrapWrap" | |||
android:paddingLeft="@dimen/dp_15" | |||
android:paddingTop="@dimen/dp_15" | |||
android:paddingRight="@dimen/dp_15" | |||
android:text="OBU设备信息" | |||
android:textColor="@color/color_333333" | |||
android:textSize="@dimen/sp_16" | |||
android:textStyle="bold" /> | |||
<LinearLayout | |||
style="@style/MatchWrap.Vertical" | |||
android:layout_marginHorizontal="@dimen/dp_15" | |||
android:layout_marginVertical="@dimen/dp_10" | |||
android:background="@drawable/bg_white_radius" | |||
android:paddingHorizontal="@dimen/dp_20" | |||
android:paddingVertical="@dimen/dp_15"> | |||
<LinearLayout | |||
style="@style/MatchWrap.Horizontal" | |||
android:background="@drawable/bg_card_obu_info" | |||
android:gravity="center_vertical" | |||
android:padding="@dimen/dp_15"> | |||
<ImageView | |||
style="@style/WrapWrap" | |||
android:layout_width="@dimen/dp_67" | |||
android:layout_height="@dimen/dp_46" | |||
android:src="@mipmap/icon_obu" /> | |||
<LinearLayout | |||
style="@style/MatchWrap.Vertical" | |||
android:layout_marginLeft="@dimen/dp_15"> | |||
<TextView | |||
android:id="@+id/tvOBUIdInfo" | |||
style="@style/MatchWrap" | |||
android:text="OBU:" | |||
android:textColor="@color/common_accent_color" | |||
android:textSize="@dimen/sp_13" /> | |||
<TextView | |||
android:id="@+id/tvOBUTypeInfo" | |||
style="@style/MatchWrap" | |||
android:layout_marginTop="@dimen/dp_2" | |||
android:text="OBU状态:" | |||
android:textColor="@color/common_accent_color" | |||
android:textSize="@dimen/sp_13" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</LinearLayout> | |||
<LinearLayout | |||
style="@style/MatchWrap.Horizontal" | |||
android:gravity="center" | |||
android:paddingHorizontal="@dimen/dp_15" | |||
android:layout_marginTop="@dimen/dp_40" | |||
android:layout_marginBottom="@dimen/dp_30"> | |||
<Button | |||
android:id="@+id/btnStop" | |||
style="@style/FullBtnStyle" | |||
android:layout_width="0dp" | |||
android:layout_weight="1" | |||
android:layout_height="@dimen/dp_40" | |||
android:layout_alignParentBottom="true" | |||
android:layout_centerHorizontal="true" | |||
android:layout_gravity="center" | |||
android:text="停用" | |||
android:textSize="@dimen/sp_14" /> | |||
<Button | |||
android:id="@+id/btnStart" | |||
style="@style/FullBtnStyle" | |||
android:layout_width="0dp" | |||
android:layout_weight="1" | |||
android:layout_height="@dimen/dp_40" | |||
android:layout_alignParentBottom="true" | |||
android:layout_centerHorizontal="true" | |||
android:layout_gravity="center" | |||
android:layout_marginLeft="@dimen/dp_50" | |||
android:text="启用" | |||
android:textSize="@dimen/sp_14" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</androidx.core.widget.NestedScrollView> | |||
</LinearLayout> |