@@ -275,7 +275,7 @@ | |||
android:launchMode="singleTop" | |||
android:screenOrientation="portrait" /> <!-- 首页信息查询 --> | |||
<activity | |||
android:name=".project.ui.activity.HomeListInfo" | |||
android:name=".project.ui.activity.order.OrderDetailsActivity" | |||
android:launchMode="singleTop" | |||
android:screenOrientation="portrait" /> <!-- 信息确认 --> | |||
<activity |
@@ -201,10 +201,40 @@ public class ResultBean<T> { | |||
} | |||
} | |||
//订单扩展字段 | |||
public static class OrderInfoExt{ | |||
public String consignee; | |||
public String consigneeTel; | |||
public String region; | |||
public String address; | |||
public String payTime; | |||
public String cancelTime; | |||
public String cancelReason; | |||
public String deliveryTime; | |||
public String receivingTime; | |||
public String returnMode; | |||
public String exchangeMode; | |||
public String returnLogisticsCompany; | |||
public String returnLogisticsNumber; | |||
public String exchangeLogisticsCompany; | |||
public String exchangeLogisticsNumber; | |||
public String exchangeNetworkName; | |||
public String exchangeReason; | |||
public String returnNetworkName; | |||
public String returnReason; | |||
public String finishTime; //后端无此字段 | |||
} | |||
public static class BizContent<T> { | |||
public OrderInfoExt orderInfoExt;//额外信息 | |||
public ProductInfo product; //产品额外信息 | |||
public String productId; //产品ID | |||
public String ossFilePath; //产品ID | |||
public String orderType; //订单类型 | |||
public String staffName; //业务员姓名 | |||
public String trackingNumber; //物流公司 | |||
public String courierCompany; //物流单号 | |||
public String cardEnableTime; //激活时间 | |||
public String getOssFilePath() { | |||
return ossFilePath; |
@@ -1,422 +0,0 @@ | |||
package com.huntersun.vkyes.etcopencard.project.ui.activity; | |||
import android.annotation.SuppressLint; | |||
import android.bluetooth.BluetoothAdapter; | |||
import android.content.Intent; | |||
import android.os.Bundle; | |||
import android.text.TextUtils; | |||
import android.util.Log; | |||
import android.view.View; | |||
import android.widget.TextView; | |||
import com.alibaba.fastjson.JSON; | |||
import com.google.gson.Gson; | |||
import com.huntersun.vky.obublelib.box.BoxManagers; | |||
import com.huntersun.vkyes.etcopencard.databinding.ActivityHomeListInfoBinding; | |||
import com.huntersun.vkyes.etcopencard.project.api.Api; | |||
import com.huntersun.vkyes.etcopencard.project.api.Converter; | |||
import com.huntersun.vkyes.etcopencard.project.api.FatherBean; | |||
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.copapply.ApplyRequst; | |||
import com.huntersun.vkyes.etcopencard.project.copapply.OBURequest; | |||
import com.huntersun.vkyes.etcopencard.project.copapply.ObuActivateRequester; | |||
import com.huntersun.vkyes.etcopencard.project.copapply.ObuActivation; | |||
import com.huntersun.vkyes.etcopencard.project.tool.Utils; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.mail.FormDeliveryActivity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.order.ApplyExGoodsStep1Activity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.order.ApplyReturnGoodsStep1Activity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.order.CancelOrderStep1Activity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.order.ConfirmReceiveGoodsStep1Activity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.order.EditOrderAddrActivity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.order.OrderLogisticsActivity; | |||
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; | |||
import com.huntersun.vkyes.etcopencard.src.action.StatusAction; | |||
import com.huntersun.vkyes.etcopencard.src.aop.SingleClick; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||
import com.huntersun.vkyes.etcopencard.src.widget.StatusLayout; | |||
import com.jeremyliao.liveeventbus.LiveEventBus; | |||
import retrofit2.Response; | |||
/** | |||
* 订单详情 | |||
* @author admin | |||
*/ | |||
public class HomeListInfo extends AppActivity implements StatusAction { | |||
private ActivityHomeListInfoBinding binding; | |||
@Override | |||
protected View getLayoutView() { | |||
binding = ActivityHomeListInfoBinding.inflate(getLayoutInflater()); | |||
return binding.getRoot(); | |||
} | |||
public void transformation(TextView view, String text) { | |||
transformation(view, text, ""); | |||
} | |||
public void transformation(TextView view, String text, String company) { | |||
if (TextUtils.isEmpty(text)) { | |||
view.setVisibility(View.GONE); | |||
} else { | |||
view.setText(text); | |||
} | |||
} | |||
@SuppressLint("LogNotTimber") | |||
@Override | |||
protected void initView() { | |||
setTitle("订单详情"); | |||
LiveEventBus.get("credentialsUpdateData", String.class) | |||
.observe(this, s -> { | |||
Log.e("log", "打印标题:" + s); | |||
initView(); | |||
}); | |||
showLoading(); | |||
FatherBean<SendTheVerificationCodeBean> fatherBean = new FatherBean<>(); | |||
fatherBean.bizContent = new SendTheVerificationCodeBean(); | |||
fatherBean.bizContent.setId(getIntent().getStringExtra("id")); | |||
Log.e("okhttp", "打印标题:" + new Gson().toJson(fatherBean)); | |||
RequestParameters parameters = | |||
new RequestParameters(IFCode.IFCODE9, new Gson().toJson(fatherBean.bizContent)); | |||
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters).enqueue(new Converter<Result>() { | |||
@SuppressLint("SetTextI18n") | |||
@Override | |||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent1) { | |||
showComplete(); | |||
try { | |||
bizContent1.setVehiclePlateColor(Double.valueOf(bizContent1.getVehiclePlateColor()).intValue() + ""); | |||
} catch (Exception e) { | |||
Log.e("log", "打印标题:" + e.getMessage()); | |||
} | |||
transformation(binding.tvOrderStatus, FunHelper.getOrderStatusName(Integer.parseInt(bizContent1.getOrderStep()))); | |||
transformation(binding.text1, bizContent1.getVehiclePlate()); //车牌号 | |||
transformation(binding.text2, bizContent1.getVehiclePlateColorStr()); //车牌颜色 | |||
transformation(binding.text3, bizContent1.getVehicleClassStr()); //收费车型 | |||
transformation(binding.text4, bizContent1.getVehicleApprovedCount(), "人"); //核载人数 | |||
transformation(binding.text6, bizContent1.getVehicleDimensions(), " mm"); //车辆尺寸 | |||
transformation(binding.text10, bizContent1.getVehicleAxleCount()); //车轴数 | |||
transformation(binding.text5, bizContent1.getVehiclePermittedWeight()); //核定载质量 | |||
transformation(binding.text7, bizContent1.getCustomerName()); //姓名 | |||
transformation(binding.text8, bizContent1.getCustomerIdtype()); //证件类型 | |||
transformation(binding.text9, bizContent1.getCustomerIdnum()); //证件号 | |||
transformation(binding.text11, bizContent1.getCustomerIdVld()); //证件有效日期 | |||
transformation(binding.text12, bizContent1.getCustomerTel()); //用户联系方式 | |||
binding.cancel.setVisibility(View.VISIBLE); | |||
binding.nextStep.setVisibility(View.VISIBLE); | |||
String start = bizContent1.getOrderStep(); | |||
switch (start) { | |||
case "1": //(1, "完成填写基本信息") | |||
binding.certificates.setVisibility(View.GONE); | |||
binding.vehicleInformation.setVisibility(View.GONE); | |||
binding.nextStep.setText("身份证信息上传"); | |||
break; | |||
case "2": //(2, "完成个人/单位信息上传") | |||
binding.vehicleInformation.setVisibility(View.GONE); | |||
binding.nextStep.setText("车辆信息上传"); | |||
break; | |||
case "3": //(3, "完成车辆信息上传") | |||
binding.nextStep.setText("信息确认");//绑定签约 | |||
break; | |||
case "4": //(4, "完成签约。待支付") | |||
binding.nextStep.setText("支付"); | |||
break; | |||
case "5": //(5, "完成订单支付。已支付") | |||
break; | |||
case "8": //(8, "待发货") | |||
binding.nextStep.setText("快速发货"); | |||
break; | |||
case "9": //(9, "待收货") | |||
binding.nextStep.setText("确认收货"); | |||
break; | |||
case "10": //(10, "待激活") | |||
binding.nextStep.setText("设备激活"); | |||
binding.cancel.setVisibility(View.GONE); | |||
break; | |||
case "11": //(11, "已完成") | |||
binding.nextStep.setVisibility(View.GONE); | |||
binding.vehicleInformation.setVisibility(View.GONE); | |||
break; | |||
default: | |||
binding.cancel.setVisibility(View.GONE); | |||
binding.nextStep.setVisibility(View.GONE); | |||
break; | |||
} | |||
//取消订单 | |||
binding.cancel.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View v) { | |||
/*new Utils().showMessDialog(getActivity(), "是否确认取消订单?", dialog -> { | |||
FatherBean<SendTheVerificationCodeBean> fatherBean2 = new FatherBean<>(); | |||
fatherBean2.bizContent = new SendTheVerificationCodeBean(); | |||
fatherBean2.bizContent.setId(bizContent1.getId()); | |||
fatherBean2.bizContent.setOrderId(bizContent1.getOrderId()); | |||
fatherBean2.bizContent.setReason("业务员取消"); | |||
RequestParameters parameters1 = | |||
new RequestParameters(IFCode.IFCODE7, new Gson().toJson(fatherBean2.bizContent)); | |||
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters1) | |||
.enqueue(new Converter<Result>() { | |||
@Override | |||
protected void onSuccess(ResultBean resultBean1, ResultBean.BizContent bizContent) { | |||
LiveEventBus.get("homeOneUpdateData").post(""); | |||
toast(resultBean1.getRmsg()); | |||
post(() -> finish()); | |||
} | |||
}); | |||
});*/ | |||
//TODO 订单功能入口测试 | |||
Bundle bundle = new Bundle(); | |||
bundle.putString("id",FunHelper.isEmpty(bizContent1.getId()) ? "" : bizContent1.getId()); | |||
bundle.putString("orderId",FunHelper.isEmpty(bizContent1.getOrderId()) ? "" : bizContent1.getOrderId()); | |||
bundle.putString("vehiclePlate",FunHelper.isEmpty(bizContent1.getVehiclePlate()) ? "" : bizContent1.getVehiclePlate()); | |||
bundle.putString("amount",FunHelper.isEmpty(bizContent1.getAmount()) ? "0" : bizContent1.getAmount()); | |||
bundle.putString("orderStep",FunHelper.isEmpty(bizContent1.getOrderStep()) ? "" : bizContent1.getOrderStep()); | |||
bundle.putString("cardId",FunHelper.isEmpty(bizContent1.getCardId()) ? "" : bizContent1.getCardId()); | |||
bundle.putString("obuId",FunHelper.isEmpty(bizContent1.getObuId()) ? "" : bizContent1.getObuId()); | |||
//换货 | |||
//jumpToPage(ApplyExGoodsStep1Activity.class,bundle); | |||
//取消订单 | |||
//jumpToPage(CancelOrderStep1Activity.class,bundle); | |||
//申请退货 | |||
//jumpToPage(ApplyReturnGoodsStep1Activity.class,bundle); | |||
//确认收货 | |||
//jumpToPage(ConfirmReceiveGoodsStep1Activity.class,bundle); | |||
//查看物流 | |||
//jumpToPage(OrderLogisticsActivity.class,bundle); | |||
//修改订单地址 | |||
jumpToPage(EditOrderAddrActivity.class,bundle); | |||
} | |||
}); | |||
//下一步按钮 | |||
binding.nextStep.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
@SingleClick | |||
public void onClick(View v) { | |||
switch (start) { | |||
case "1": { //订单已创建 | |||
Intent intent = new Intent(); | |||
intent.putExtra("vehiclePlate", bizContent1.getVehiclePlate()); //车牌号 | |||
intent.putExtra("vehiclePlateColor", bizContent1.getVehiclePlateColor()); //车牌颜色 | |||
intent.putExtra("type", bizContent1.getTowing()); //根据不同的车牌类型进行传参(车型) 0 客车 1 货车 | |||
intent.putExtra("orderId", bizContent1.getOrderId()); //订单号 | |||
intent.setClass(HomeListInfo.this, IdentityInformationUploadActivity.class); | |||
startActivity(intent); | |||
break; | |||
} | |||
case "2": { //用户已上传 | |||
Intent intent = new Intent(); | |||
intent.putExtra("vehiclePlate", bizContent1.getVehiclePlate()); //车牌号 | |||
intent.putExtra("vehiclePlateColor", bizContent1.getVehiclePlateColor()); //车牌颜色 | |||
intent.putExtra("orderId", bizContent1.getOrderId() + ""); //订单号 | |||
intent.setClass(HomeListInfo.this, VehicleInformationActivity.class); | |||
startActivity(intent); | |||
break; | |||
} | |||
case "3": { //车辆已上传 | |||
Intent intent = new Intent(); | |||
intent.putExtra("vehiclePlate", bizContent1.getVehiclePlate()); //车牌号 | |||
intent.putExtra("vehiclePlateColor", bizContent1.getVehiclePlateColor()); //车牌号 | |||
intent.putExtra("orderId", bizContent1.getOrderId()); | |||
intent.putExtra("id", bizContent1.getId()); | |||
intent.setClass(HomeListInfo.this, InformationConfirmedActivity.class); | |||
startActivity(intent); | |||
break; | |||
} | |||
case "4": { //"完成签约。待支付"-跳转到支付确认页面 | |||
ResultBean.BizContent productBean = new ResultBean.BizContent(); | |||
productBean.setId(bizContent1.productId); | |||
productBean.setName(bizContent1.getProductName()); | |||
if (bizContent1.product != null) { | |||
productBean.setProductMsg(bizContent1.product.productMsg); | |||
productBean.setFee(bizContent1.product.fee); | |||
} | |||
Bundle bundle = new Bundle(); | |||
bundle.putString("bizContent", JSON.toJSONString(productBean)); | |||
bundle.putString("orderId", bizContent1.getOrderId()); | |||
jumpToPage(ETCHandleSonActivity.class, bundle); | |||
/*Intent intent = new Intent(); | |||
intent.putExtra("orderId", bizContent1.getOrderId()); //客车 | |||
intent.setClass(HomeListInfo.this, ETCHandleActivity.class); | |||
startActivity(intent);*/ | |||
break; | |||
} | |||
case "8": { //快速发货 | |||
Intent intent = new Intent(); | |||
intent.putExtra("id", bizContent1.getId()); | |||
intent.putExtra("isValueCard", bizContent1.getIsValueCard()); | |||
intent.setClass(HomeListInfo.this, FormDeliveryActivity.class); | |||
startActivity(intent); | |||
finish(); | |||
break; | |||
} | |||
case "9": //确认收货 | |||
FatherBean<SendTheVerificationCodeBean> fatherBean2 = new FatherBean<>(); | |||
fatherBean2.bizContent = new SendTheVerificationCodeBean(); | |||
fatherBean2.bizContent.setId(bizContent1.getId()); | |||
RequestParameters parameters1 = | |||
new RequestParameters(IFCode.IFCODE155, new Gson().toJson(fatherBean2.bizContent)); | |||
//订单完成收货 | |||
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters1) | |||
.enqueue(new Converter<Result>() { | |||
@Override | |||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
} | |||
}); | |||
break; | |||
case "10"://(10, "待激活") | |||
releaseActivation(bizContent1); | |||
break; | |||
default: //已审核 if ("8".equals(start)) | |||
break; | |||
} | |||
} | |||
}); | |||
} | |||
@Override | |||
public void onError(String err, Response<Result> resp) { | |||
super.onError(err, resp); | |||
showError(new StatusLayout.OnRetryListener() { | |||
@Override | |||
public void onRetry(StatusLayout layout) { | |||
initView(); | |||
} | |||
}); | |||
} | |||
}); | |||
} | |||
//激活 | |||
public void releaseActivation(ResultBean.BizContent bizContent1) { | |||
new BluetoothDialog.Builder(HomeListInfo.this) | |||
.setResult(new BluetoothDialog.Builder.OnResult() { | |||
/** | |||
* 未打开的蓝牙 | |||
*/ | |||
@Override | |||
public void unopenedBluetooth() { | |||
Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); | |||
startActivityForResult(intent, 1); | |||
} | |||
/** | |||
* 蓝牙连接成功 | |||
* @param boxManagers 盒子对象 | |||
*/ | |||
@SuppressLint("LogNotTimber") | |||
@Override | |||
public void BluetoothLinkIsSuccessful(BoxManagers boxManagers) { | |||
boolean cardId = TextUtils.isEmpty(bizContent1.getCardId()); | |||
String cardStatus = bizContent1.getCardStatus() == null ? "0" : bizContent1.getCardStatus(); | |||
boolean obuId = TextUtils.isEmpty(bizContent1.getObuId()); | |||
//0 未安装 11 已发行 -> 走激活 9 发行申请 -> 发行 | |||
String obuStatus = bizContent1.getObuStatus() == null ? "9" : bizContent1.getObuStatus(); | |||
//OBU状态为 -> 1 2 3 4 5 6 7(直接走激活) 且卡状态不为 0 9 99 | |||
//卡号 1 2 3 4 5 6(走申请) //签号 0 11 7 8 9 99(反向直接走申请) | |||
if (cardId) { //卡号为空 | |||
cardOpeningApplication(bizContent1); | |||
//走卡发行 | |||
} else if (!cardId && "0".equals(cardStatus)) { //卡号不为空 且状态为 0 (申请) | |||
//走卡发行 | |||
cardOpeningApplication(bizContent1); | |||
} else if (obuId) { //签号为空 | |||
//走OBU发行 | |||
openingApplication(bizContent1); | |||
} else if (!obuId && "9".equals(obuStatus)) { //签号不为空 且状态为 9 (申请) | |||
//走OBU发行 | |||
openingApplication(bizContent1); | |||
} else if (!cardId && !obuId && ("1".equals(obuStatus) || "11".equals(obuStatus) || | |||
"0".equals(obuStatus))) { | |||
//走发行申请 | |||
deviceActivation(bizContent1); | |||
} else { | |||
cardOpeningApplication(bizContent1); | |||
} | |||
} | |||
}) | |||
.show(); | |||
} | |||
//输入状态码判断是否为ture | |||
public boolean statusCode(String key, String... value) { | |||
for (String item : value) { | |||
if (item.equals(key)) { | |||
return true; | |||
} | |||
} | |||
return false; | |||
} | |||
/** | |||
* 开卡申请 | |||
*/ | |||
public void cardOpeningApplication(ResultBean.BizContent bizContent1) { | |||
new ApplyRequst(BoxManagers.mDecryptVehicleApduBean, bizContent1, | |||
getActivity()).releasesCardApply( | |||
new ApplyRequst.CallBack() { | |||
@Override | |||
public void onSuccess() { | |||
openingApplication(bizContent1); | |||
} | |||
} | |||
); | |||
} | |||
/** | |||
* 开签申请 | |||
*/ | |||
public void openingApplication(ResultBean.BizContent bizContent1) { | |||
//开签完以后走激活 | |||
new OBURequest(BoxManagers.mDecryptVehicleApduBean, bizContent1, | |||
getActivity()) | |||
.obuPublishRequest(new OBURequest.CallBack() { | |||
@Override | |||
public void onSuccess() { | |||
deviceActivation(bizContent1); | |||
} | |||
}); | |||
} | |||
/** | |||
* 设备激活 | |||
*/ | |||
public void deviceActivation(ResultBean.BizContent content) { | |||
//设备激活 | |||
new ObuActivation(BoxManagers.mDecryptVehicleApduBean, | |||
getActivity()).start(bizContent -> { | |||
bizContent.setOrderId(content.getOrderId()); | |||
//激活步骤 | |||
new ObuActivateRequester().start(bizContent, getActivity()); | |||
}); | |||
} | |||
@Override | |||
protected void initData() { | |||
} | |||
@Override | |||
public StatusLayout getStatusLayout() { | |||
return binding.hlStatusHint; | |||
} | |||
} |
@@ -1,11 +1,10 @@ | |||
package com.huntersun.vkyes.etcopencard.project.ui.activity.order; | |||
import android.os.Bundle; | |||
import android.view.View; | |||
import com.huntersun.vkyes.etcopencard.databinding.ActivityApplyExGoodsStep2Binding; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.HomeListInfo; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||
import com.jeremyliao.liveeventbus.LiveEventBus; | |||
/** | |||
* Date :2023-03-14 | |||
@@ -29,9 +28,10 @@ public class ApplyExGoodsStep2Activity extends AppActivity { | |||
binding.btnCheckOrder.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
Bundle bundle = new Bundle(); | |||
LiveEventBus.get("credentialsUpdateData").post("刷新订单"); | |||
/* Bundle bundle = new Bundle(); | |||
bundle.putString("id", id); | |||
jumpToPage(HomeListInfo.class,bundle); | |||
jumpToPage(OrderDetailsActivity.class,bundle);*/ | |||
finish(); | |||
} | |||
}); |
@@ -3,11 +3,9 @@ package com.huntersun.vkyes.etcopencard.project.ui.activity.order; | |||
import android.os.Bundle; | |||
import android.view.View; | |||
import com.huntersun.vkyes.etcopencard.databinding.ActivityApplyExGoodsStep2Binding; | |||
import com.huntersun.vkyes.etcopencard.databinding.ActivityApplyReturnGoodsStep2Binding; | |||
import com.huntersun.vkyes.etcopencard.databinding.ActivityApplyReturnMoneyBinding; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.HomeListInfo; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||
import com.jeremyliao.liveeventbus.LiveEventBus; | |||
/** | |||
* Date :2023-03-14 | |||
@@ -31,9 +29,10 @@ public class ApplyReturnGoodsStep2Activity extends AppActivity { | |||
binding.btnCheckOrder.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
Bundle bundle = new Bundle(); | |||
LiveEventBus.get("credentialsUpdateData").post("刷新订单"); | |||
/*Bundle bundle = new Bundle(); | |||
bundle.putString("id", id); | |||
jumpToPage(HomeListInfo.class,bundle); | |||
jumpToPage(OrderDetailsActivity.class,bundle);*/ | |||
finish(); | |||
} | |||
}); |
@@ -4,8 +4,8 @@ import android.os.Bundle; | |||
import android.view.View; | |||
import com.huntersun.vkyes.etcopencard.databinding.ActivityCancelOrderStep2Binding; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.HomeListInfo; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||
import com.jeremyliao.liveeventbus.LiveEventBus; | |||
/** | |||
* Date :2023-03-14 | |||
@@ -29,9 +29,10 @@ public class CancelOrderStep2Activity extends AppActivity { | |||
binding.btnCheckOrder.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
Bundle bundle = new Bundle(); | |||
/*Bundle bundle = new Bundle(); | |||
bundle.putString("id", id); | |||
jumpToPage(HomeListInfo.class,bundle); | |||
jumpToPage(OrderDetailsActivity.class,bundle);*/ | |||
LiveEventBus.get("credentialsUpdateData").post("刷新订单"); | |||
finish(); | |||
} | |||
}); |
@@ -3,11 +3,9 @@ package com.huntersun.vkyes.etcopencard.project.ui.activity.order; | |||
import android.os.Bundle; | |||
import android.view.View; | |||
import com.huntersun.vkyes.etcopencard.databinding.ActivityApplyExGoodsStep1Binding; | |||
import com.huntersun.vkyes.etcopencard.databinding.ActivityConfirmReceiveGoodsStep1Binding; | |||
import com.huntersun.vkyes.etcopencard.databinding.ActivityConfirmReceiveGoodsStep2Binding; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.HomeListInfo; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||
import com.jeremyliao.liveeventbus.LiveEventBus; | |||
/** | |||
* Date :2023-03-14 | |||
@@ -31,9 +29,10 @@ public class ConfirmReceiveGoodsStep2Activity extends AppActivity { | |||
binding.btnCheckOrder.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
Bundle bundle = new Bundle(); | |||
/*Bundle bundle = new Bundle(); | |||
bundle.putString("id", id); | |||
jumpToPage(HomeListInfo.class,bundle); | |||
jumpToPage(OrderDetailsActivity.class,bundle);*/ | |||
LiveEventBus.get("credentialsUpdateData").post("刷新订单"); | |||
finish(); | |||
} | |||
}); |
@@ -132,6 +132,7 @@ public class EditOrderAddrActivity extends AppActivity { | |||
toast("修改订单收货地址成功!"); | |||
hideDialog(); | |||
LiveEventBus.get("homeOneUpdateData").post(""); | |||
LiveEventBus.get("credentialsUpdateData").post(""); | |||
finish(); | |||
} | |||
@@ -0,0 +1,275 @@ | |||
package com.huntersun.vkyes.etcopencard.project.ui.activity.order; | |||
import android.view.View; | |||
import android.widget.LinearLayout; | |||
import com.google.gson.Gson; | |||
import com.huntersun.vkyes.etcopencard.R; | |||
import com.huntersun.vkyes.etcopencard.databinding.ActivityOrderDetailsBinding; | |||
import com.huntersun.vkyes.etcopencard.project.api.Api; | |||
import com.huntersun.vkyes.etcopencard.project.api.Converter; | |||
import com.huntersun.vkyes.etcopencard.project.api.FatherBean; | |||
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.utils.Constants; | |||
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; | |||
import com.huntersun.vkyes.etcopencard.src.action.StatusAction; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||
import com.huntersun.vkyes.etcopencard.src.ui.adapter.AddViewHolder; | |||
import com.huntersun.vkyes.etcopencard.src.widget.StatusLayout; | |||
import com.jeremyliao.liveeventbus.LiveEventBus; | |||
import retrofit2.Response; | |||
/** | |||
* 订单详情 | |||
* @author ht | |||
*/ | |||
public class OrderDetailsActivity extends AppActivity implements StatusAction { | |||
private ActivityOrderDetailsBinding binding; | |||
//订单id | |||
private String id; | |||
//订单详情数据 | |||
private ResultBean.BizContent orderData; | |||
@Override | |||
protected View getLayoutView() { | |||
binding = ActivityOrderDetailsBinding.inflate(getLayoutInflater()); | |||
return binding.getRoot(); | |||
} | |||
@Override | |||
protected void initView() { | |||
id = getIntent().getStringExtra("id"); | |||
//监听信息 | |||
LiveEventBus.get("credentialsUpdateData", String.class) .observe(this, s -> { | |||
getOrderDetails(); | |||
}); | |||
} | |||
@Override | |||
protected void initData() { | |||
if(FunHelper.isEmpty(id)){ | |||
toast("订单id不能为空!"); | |||
return; | |||
} | |||
getOrderDetails(); | |||
} | |||
/** | |||
* 设置订单列表数据 | |||
*/ | |||
private void setOrderView(){ | |||
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.getOrderStep().equals(String.valueOf(Constants.ORDER_STATUS_WAIT_AUDIT)) | |||
|| orderData.getOrderStep().equals(String.valueOf(Constants.ORDER_STATUS_WAIT_DELIVERY)) | |||
|| orderData.getOrderStep().equals(Constants.ORDER_STATUS_WAIT_TAKE_DELIVERY)){ | |||
binding.rlAddrInfo.setVisibility(View.VISIBLE); | |||
if(!FunHelper.isEmpty(orderData.orderInfoExt.consignee)){ | |||
binding.tvConsignee.setText(orderData.orderInfoExt.consignee + " " + orderData.orderInfoExt.consigneeTel); | |||
binding.tvAddress.setText(orderData.orderInfoExt.region + ' ' + orderData.orderInfoExt.address); | |||
} | |||
}else{ | |||
binding.rlAddrInfo.setVisibility(View.GONE); | |||
} | |||
//基本信息 | |||
binding.LLBaseInfoContent.removeAllViews(); | |||
addItemView(binding.LLBaseInfoContent,"产品名称",FunHelper.isEmpty(orderData.getProductName()) ? "" : orderData.getProductName(),1,false); | |||
addItemView(binding.LLBaseInfoContent,"订单编号",FunHelper.isEmpty(orderData.getOrderId()) ? "" : orderData.getOrderId(),1,false); | |||
addItemView(binding.LLBaseInfoContent,"业务类型",FunHelper.getOrderTypeName(FunHelper.isEmpty(orderData.orderType) ? "" : orderData.orderType),1,false); | |||
addItemView(binding.LLBaseInfoContent,"订单车牌号",FunHelper.isEmpty(orderData.getVehiclePlate()) ? "" : orderData.getVehiclePlate(),1,false); | |||
addItemView(binding.LLBaseInfoContent,"用户类型",orderData.getUserType().equals("UNIT_USER") ? "单位" : "个人",1,false); | |||
addItemView(binding.LLBaseInfoContent,"车辆类型",FunHelper.getCarTypeName(FunHelper.isEmpty(orderData.getType()) ? "":orderData.getType()),1,false); | |||
addItemView(binding.LLBaseInfoContent,"订单金额","¥ " + (Integer.parseInt(FunHelper.isEmpty(orderData.getAmount()) ? "0" : orderData.getAmount()) * 0.01),2,false); | |||
addItemView(binding.LLBaseInfoContent,"订单状态",FunHelper.getOrderStatusName(Integer.parseInt(FunHelper.isEmpty(orderData.getOrderStep()) ? "" : orderData.getOrderStep())),1,false); | |||
//addItemView(binding.LLBaseInfoContent,"设备型号",orderData.getProductName(),1,true); | |||
addItemView(binding.LLBaseInfoContent,"创建时间",FunHelper.isEmpty(orderData.getInsertTime()) ? "" : orderData.getInsertTime(),1,false); | |||
addItemView(binding.LLBaseInfoContent,"付款时间",FunHelper.isEmpty(orderData.orderInfoExt.payTime) ? "" : orderData.orderInfoExt.payTime,1,true); | |||
if (orderData.getOrderStatus().equals(Constants.ORDER_STATUS_CANCEL + "")){//已取消 | |||
addItemView(binding.LLBaseInfoContent,"取消时间",FunHelper.isEmpty(orderData.orderInfoExt.cancelTime) ? "" : orderData.orderInfoExt.cancelTime,1,false); | |||
addItemView(binding.LLBaseInfoContent,"取消原因",FunHelper.isEmpty(orderData.orderInfoExt.cancelReason) ? "" : orderData.orderInfoExt.cancelReason,1,true); | |||
addItemView(binding.LLBaseInfoContent,"业务员",FunHelper.isEmpty(orderData.staffName) ? "" : orderData.staffName,1,false); | |||
}else{ | |||
switch (Integer.parseInt(orderData.getOrderStep())){ | |||
case Constants.ORDER_STATUS_WAIT_AUDIT://待审核 | |||
addItemView(binding.LLBaseInfoContent,"业务员",FunHelper.isEmpty(orderData.staffName) ? "" : orderData.staffName,1,false); | |||
break; | |||
case Constants.ORDER_STATUS_WAIT_DELIVERY://待发货 | |||
addItemView(binding.LLBaseInfoContent,"业务员",FunHelper.isEmpty(orderData.staffName) ? "" : orderData.staffName,1,false); | |||
break; | |||
case Constants.ORDER_STATUS_WAIT_TAKE_DELIVERY://待收货 | |||
addItemView(binding.LLBaseInfoContent,"发货时间",FunHelper.isEmpty(orderData.orderInfoExt.deliveryTime) ?"":orderData.orderInfoExt.deliveryTime,1,false); | |||
addItemView(binding.LLBaseInfoContent,"物流单号",FunHelper.isEmpty(orderData.trackingNumber) ? "" : orderData.trackingNumber,1,false); | |||
addItemView(binding.LLBaseInfoContent,"物流公司",FunHelper.isEmpty(orderData.courierCompany) ? "" : orderData.courierCompany,1,true); | |||
addItemView(binding.LLBaseInfoContent,"业务员",FunHelper.isEmpty(orderData.staffName) ? "" : orderData.staffName,1,false); | |||
break; | |||
case Constants.ORDER_STATUS_WAIT_ACTIVE://待激活 | |||
addItemView(binding.LLBaseInfoContent,"发货时间",FunHelper.isEmpty(orderData.orderInfoExt.deliveryTime) ? "" : orderData.orderInfoExt.deliveryTime,1,false); | |||
addItemView(binding.LLBaseInfoContent,"收货时间",FunHelper.isEmpty(orderData.orderInfoExt.receivingTime) ? "" : orderData.orderInfoExt.receivingTime,1,false); | |||
addItemView(binding.LLBaseInfoContent,"物流单号",FunHelper.isEmpty(orderData.trackingNumber) ? "" : orderData.trackingNumber,1,false); | |||
addItemView(binding.LLBaseInfoContent,"物流公司",FunHelper.isEmpty(orderData.courierCompany) ? "" : orderData.courierCompany,1,true); | |||
addItemView(binding.LLBaseInfoContent,"业务员",FunHelper.isEmpty(orderData.staffName) ? "" : orderData.staffName,1,false); | |||
break; | |||
case Constants.ORDER_STATUS_EX_GOODS://换货 | |||
addItemView(binding.LLBaseInfoContent,"发货时间",FunHelper.isEmpty(orderData.orderInfoExt.deliveryTime) ? "" : orderData.orderInfoExt.deliveryTime,1,false); | |||
addItemView(binding.LLBaseInfoContent,"物流单号",FunHelper.isEmpty(orderData.trackingNumber) ? "" : orderData.trackingNumber,1,false); | |||
addItemView(binding.LLBaseInfoContent,"物流公司",FunHelper.isEmpty(orderData.courierCompany) ? "" : orderData.courierCompany,1,true); | |||
addItemView(binding.LLBaseInfoContent,"业务员",FunHelper.isEmpty(orderData.staffName) ?"":orderData.staffName,1,false); | |||
break; | |||
case Constants.ORDER_STATUS_RETURN_GOODS://退货 | |||
addItemView(binding.LLBaseInfoContent,"发货时间",FunHelper.isEmpty(orderData.orderInfoExt.deliveryTime) ?"":orderData.orderInfoExt.deliveryTime,1,false); | |||
addItemView(binding.LLBaseInfoContent,"物流单号",FunHelper.isEmpty(orderData.trackingNumber) ? "" : orderData.trackingNumber,1,false); | |||
addItemView(binding.LLBaseInfoContent,"物流公司",FunHelper.isEmpty(orderData.courierCompany) ? "": orderData.courierCompany,1,true); | |||
addItemView(binding.LLBaseInfoContent,"业务员",FunHelper.isEmpty(orderData.staffName) ? "" : orderData.staffName,1,false); | |||
break; | |||
case Constants.ORDER_STATUS_FINISH://已结束 | |||
addItemView(binding.LLBaseInfoContent,"发货时间",FunHelper.isEmpty(orderData.orderInfoExt.deliveryTime) ? "" :orderData.orderInfoExt.deliveryTime,1,false); | |||
addItemView(binding.LLBaseInfoContent,"收货时间",FunHelper.isEmpty(orderData.orderInfoExt.receivingTime) ? "" : orderData.orderInfoExt.receivingTime,1,false); | |||
addItemView(binding.LLBaseInfoContent,"订单结束时间",FunHelper.isEmpty(orderData.orderInfoExt.finishTime) ? "" : orderData.orderInfoExt.finishTime,1,false); | |||
addItemView(binding.LLBaseInfoContent,"物流单号",FunHelper.isEmpty(orderData.trackingNumber) ? "" : orderData.trackingNumber,1,false); | |||
addItemView(binding.LLBaseInfoContent,"物流公司",FunHelper.isEmpty(orderData.courierCompany) ? "" : orderData.courierCompany,1,true); | |||
addItemView(binding.LLBaseInfoContent,"业务员",FunHelper.isEmpty(orderData.staffName) ? "" : orderData.staffName,1,false); | |||
break; | |||
case Constants.ORDER_STATUS_COMPLETE://已完成 | |||
addItemView(binding.LLBaseInfoContent,"发货时间",FunHelper.isEmpty(orderData.orderInfoExt.deliveryTime) ? "" : orderData.orderInfoExt.deliveryTime,1,false); | |||
addItemView(binding.LLBaseInfoContent,"收货时间",FunHelper.isEmpty(orderData.orderInfoExt.receivingTime) ? "":orderData.orderInfoExt.receivingTime,1,false); | |||
addItemView(binding.LLBaseInfoContent,"物流单号",FunHelper.isEmpty(orderData.trackingNumber) ? "" : orderData.trackingNumber,1,false); | |||
addItemView(binding.LLBaseInfoContent,"物流公司",FunHelper.isEmpty(orderData.courierCompany) ?"":orderData.courierCompany,1,true); | |||
addItemView(binding.LLBaseInfoContent,"激活时间",FunHelper.isEmpty(orderData.cardEnableTime) ? "" : orderData.cardEnableTime,1,false); | |||
addItemView(binding.LLBaseInfoContent,"卡号",FunHelper.isEmpty(orderData.getCardId()) ? "" : orderData.getCardId(),1,false); | |||
addItemView(binding.LLBaseInfoContent,"卡状态",FunHelper.getETCStatusName(Integer.parseInt(FunHelper.isEmpty(orderData.getCardStatus()) ? "0" : orderData.getCardStatus())),2,false); | |||
addItemView(binding.LLBaseInfoContent,"OBU号",FunHelper.isEmpty(orderData.getObuId()) ? "" : orderData.getObuId(),1,false); | |||
addItemView(binding.LLBaseInfoContent,"OBU状态",FunHelper.getOBUStatusName(Integer.parseInt(FunHelper.isEmpty(orderData.getObuStatus()) ? "0" : orderData.getObuStatus())),2,false); | |||
addItemView(binding.LLBaseInfoContent,"业务员",FunHelper.isEmpty(orderData.staffName) ? "" : orderData.staffName,1,false); | |||
break; | |||
default: | |||
addItemView(binding.LLBaseInfoContent,"业务员",FunHelper.isEmpty(orderData.staffName) ? "" : orderData.staffName,1,false); | |||
break; | |||
} | |||
} | |||
//换货、退货 | |||
if (orderData.getOrderStep().equals(String.valueOf(Constants.ORDER_STATUS_EX_GOODS)) || | |||
orderData.getOrderStep().equals(String.valueOf(Constants.ORDER_STATUS_RETURN_GOODS))){ | |||
binding.LLAfterSaleInfo.setVisibility(View.VISIBLE); | |||
binding.LLStaffInfo.setVisibility(View.VISIBLE); | |||
//售后信息 | |||
binding.LLAfterSaleInfo.removeAllViews(); | |||
addItemView(binding.LLAfterSaleInfo,"售后单号","",1,false); | |||
addItemView(binding.LLAfterSaleInfo,"业务类型",FunHelper.isEmpty(orderData.orderInfoExt.exchangeMode) ? "换货" : "退货",1,false); | |||
addItemView(binding.LLAfterSaleInfo,"创建时间","",1,false); | |||
if (orderData.getOrderStep().equals(String.valueOf(Constants.ORDER_STATUS_EX_GOODS))){ | |||
binding.tvAfterSaleTitle.setText("用户换货信息"); | |||
binding.tvStaffTitle.setText("业务员发起换货"); | |||
addItemView(binding.LLAfterSaleInfo,"换货物流公司",FunHelper.isEmpty(orderData.orderInfoExt.exchangeLogisticsCompany) ? "" : orderData.orderInfoExt.exchangeLogisticsCompany,1,false); | |||
addItemView(binding.LLAfterSaleInfo,"换货物流单号",FunHelper.isEmpty(orderData.orderInfoExt.exchangeLogisticsNumber) ? "" : orderData.orderInfoExt.exchangeLogisticsNumber,1,false); | |||
addItemView(binding.LLAfterSaleInfo,"换货原因",FunHelper.isEmpty(orderData.orderInfoExt.cancelReason) ? "" : orderData.orderInfoExt.cancelReason,1,false); | |||
}else{ | |||
binding.tvAfterSaleTitle.setText("用户退货信息"); | |||
binding.tvStaffTitle.setText("业务员发起退货"); | |||
addItemView(binding.LLAfterSaleInfo,"退货物流公司",FunHelper.isEmpty(orderData.orderInfoExt.returnLogisticsCompany) ? " " :orderData.orderInfoExt.returnLogisticsCompany,1,false); | |||
addItemView(binding.LLAfterSaleInfo,"退货物流单号",FunHelper.isEmpty(orderData.orderInfoExt.returnLogisticsNumber) ? "" :orderData.orderInfoExt.returnLogisticsNumber,1,false); | |||
addItemView(binding.LLAfterSaleInfo,"退货原因",FunHelper.isEmpty(orderData.orderInfoExt.cancelReason) ? "" : orderData.orderInfoExt.cancelReason,1,false); | |||
} | |||
//业务员信息 | |||
binding.LLStaffInfo.removeAllViews(); | |||
addItemView(binding.LLStaffInfo,"售后单号","",1,false); | |||
addItemView(binding.LLStaffInfo,"业务类型",FunHelper.isEmpty(orderData.orderInfoExt.exchangeMode) ? "换货" : "退货",1,false); | |||
addItemView(binding.LLStaffInfo,"创建时间","",1,false); | |||
if (orderData.getOrderStep().equals(String.valueOf(Constants.ORDER_STATUS_EX_GOODS))){ | |||
addItemView(binding.LLStaffInfo,"换货网点",FunHelper.isEmpty(orderData.orderInfoExt.exchangeNetworkName) ? " ":orderData.orderInfoExt.exchangeNetworkName,1,false); | |||
addItemView(binding.LLStaffInfo,"换货原因",FunHelper.isEmpty(orderData.orderInfoExt.exchangeReason) ? "" : orderData.orderInfoExt.exchangeReason,1,true); | |||
}else{ | |||
addItemView(binding.LLStaffInfo,"退货网点",FunHelper.isEmpty(orderData.orderInfoExt.returnNetworkName) ? "" :orderData.orderInfoExt.returnNetworkName,1,false); | |||
addItemView(binding.LLStaffInfo,"退货原因",FunHelper.isEmpty(orderData.orderInfoExt.returnReason) ? "" : orderData.orderInfoExt.returnReason,1,true); | |||
} | |||
addItemView(binding.LLStaffInfo,"业务员",FunHelper.isEmpty(orderData.staffName) ? "" : orderData.staffName,1,false); | |||
} | |||
//初始化按钮信息 | |||
new OrderUtils(this,orderData,false,binding.LLBtns,binding.btnFinish, | |||
binding.btnLogistics, binding.btnReturnGoods, binding.btnExGoods, | |||
binding.btnCancelOrder, binding.btnEditAddr, binding.btnAudit, | |||
binding.btnDeliver, binding.btnActive, binding.btnAgainActive, binding.btnReceiveGoods, | |||
binding.btnUserInfoUpload, binding.btnCarInfoUpload, binding.btnConfirmInfo, binding.btnPay); | |||
} | |||
/** | |||
* 加载item信息 | |||
* | |||
* @param linearLayout | |||
* @param label | |||
* @param value | |||
* @param colorType 1-黑色 2-绿色 3-红色 | |||
* @param isDivider 是否有分割线 | |||
*/ | |||
private void addItemView(LinearLayout linearLayout,String label,String value,int colorType,boolean isDivider){ | |||
AddViewHolder holder = new AddViewHolder(this,R.layout.layout_order_details_item); | |||
holder.setText(R.id.tvLabel,label); | |||
holder.setText(R.id.tvValue,value); | |||
if (colorType == 1){ | |||
holder.setTextColor(R.id.tvValue,R.color.black01); | |||
}else if (colorType == 2){ | |||
holder.setTextColor(R.id.tvValue,R.color.common_accent_color); | |||
}else if (colorType == 3){ | |||
holder.setTextColor(R.id.tvValue,R.color.red01); | |||
} | |||
holder.setVisible(R.id.tvLine,isDivider); | |||
linearLayout.addView(holder.getCustomView()); | |||
} | |||
/** | |||
* 获取订单详情信息 | |||
*/ | |||
private void getOrderDetails(){ | |||
showLoading(); | |||
FatherBean<SendTheVerificationCodeBean> fatherBean = new FatherBean<>(); | |||
fatherBean.bizContent = new SendTheVerificationCodeBean(); | |||
fatherBean.bizContent.setId(id); | |||
RequestParameters parameters = new RequestParameters(IFCode.IFCODE9, new Gson().toJson(fatherBean.bizContent)); | |||
new MyRetrofit().getRetrofit().create(Api.class).message2(parameters).enqueue(new Converter<Result>() { | |||
@Override | |||
protected void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent1) { | |||
showComplete(); | |||
try { | |||
bizContent1.setVehiclePlateColor(Double.valueOf(bizContent1.getVehiclePlateColor()).intValue() + ""); | |||
orderData = bizContent1; | |||
} catch (Exception e) { | |||
} | |||
setOrderView(); | |||
} | |||
@Override | |||
public void onError(String err, Response<Result> resp) { | |||
super.onError(err, resp); | |||
showError(new StatusLayout.OnRetryListener() { | |||
@Override | |||
public void onRetry(StatusLayout layout) { | |||
getOrderDetails(); | |||
} | |||
}); | |||
} | |||
}); | |||
} | |||
@Override | |||
public StatusLayout getStatusLayout() { | |||
return binding.hlStatusHint; | |||
} | |||
} |
@@ -1,15 +1,32 @@ | |||
package com.huntersun.vkyes.etcopencard.project.ui.activity.order; | |||
import android.annotation.SuppressLint; | |||
import android.app.Activity; | |||
import android.bluetooth.BluetoothAdapter; | |||
import android.content.Context; | |||
import android.content.Intent; | |||
import android.os.Bundle; | |||
import android.text.TextUtils; | |||
import android.view.View; | |||
import android.widget.Button; | |||
import android.widget.LinearLayout; | |||
import com.alibaba.fastjson.JSON; | |||
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.bean.ResultBean; | |||
import com.huntersun.vkyes.etcopencard.project.bluetooth.BluetoothDialog; | |||
import com.huntersun.vkyes.etcopencard.project.copapply.ApplyRequst; | |||
import com.huntersun.vkyes.etcopencard.project.copapply.OBURequest; | |||
import com.huntersun.vkyes.etcopencard.project.copapply.ObuActivateRequester; | |||
import com.huntersun.vkyes.etcopencard.project.copapply.ObuActivation; | |||
import com.huntersun.vkyes.etcopencard.project.tool.Utils; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.ETCHandleActivity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.IdentityInformationUploadActivity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.InformationConfirmedActivity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.VehicleInformationActivity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.mail.FormDeliveryActivity; | |||
import com.huntersun.vkyes.etcopencard.project.utils.Constants; | |||
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||
@@ -19,7 +36,7 @@ import com.huntersun.vkyes.etcopencard.src.app.AppActivity; | |||
* Description:订单列表和详情操作工具类 | |||
*/ | |||
public class OrderUtils { | |||
private Context context; | |||
private Activity context; | |||
private LinearLayout LLBtns; | |||
private Button btnFinish; | |||
@@ -33,15 +50,20 @@ public class OrderUtils { | |||
private Button btnActive; | |||
private Button btnAgainActive; | |||
private Button btnReceiveGoods; | |||
private Button btnUserInfoUpload; | |||
private Button btnCarInfoUpload; | |||
private Button btnConfirmInfo; | |||
private Button btnPay; | |||
//数据 | |||
private ResultBean.BizContent orderData; //订单数据 | |||
private boolean isFromList; //是否来自订单列表 | |||
public OrderUtils(Context context,ResultBean.BizContent orderData,boolean isFromList,LinearLayout LLBtns,Button btnFinish, | |||
public OrderUtils(Activity context,ResultBean.BizContent orderData,boolean isFromList,LinearLayout LLBtns,Button btnFinish, | |||
Button btnLogistics,Button btnReturnGoods,Button btnExGoods, | |||
Button btnCancelOrder,Button btnEditAddr,Button btnAudit,Button btnDeliver, | |||
Button btnActive,Button btnAgainActive,Button btnReceiveGoods) { | |||
Button btnActive,Button btnAgainActive,Button btnReceiveGoods, | |||
Button btnUserInfoUpload, Button btnCarInfoUpload,Button btnConfirmInfo,Button btnPay) { | |||
this.context = context; | |||
this.orderData = orderData; | |||
this.isFromList = isFromList; | |||
@@ -57,7 +79,11 @@ public class OrderUtils { | |||
this.btnActive = btnActive; | |||
this.btnAgainActive = btnAgainActive; | |||
this.btnReceiveGoods = btnReceiveGoods; | |||
this.btnUserInfoUpload = btnUserInfoUpload; | |||
this.btnCarInfoUpload = btnCarInfoUpload; | |||
this.btnConfirmInfo = btnConfirmInfo; | |||
this.btnPay = btnPay; | |||
initBtnClick(); | |||
setBtnViewVisibleOrHide(); | |||
} | |||
@@ -78,44 +104,67 @@ public class OrderUtils { | |||
btnActive.setVisibility(View.GONE); | |||
btnAgainActive.setVisibility(View.GONE); | |||
btnReceiveGoods.setVisibility(View.GONE); | |||
btnUserInfoUpload.setVisibility(View.GONE); | |||
btnCarInfoUpload.setVisibility(View.GONE); | |||
btnConfirmInfo.setVisibility(View.GONE); | |||
btnPay.setVisibility(View.GONE); | |||
if(FunHelper.isEmpty(orderData.getOrderStep())){ | |||
orderData.setOrderStep("0"); | |||
} | |||
switch (Integer.parseInt(orderData.getOrderStep())){ | |||
case Constants.ORDER_STATUS_WAIT_AUDIT://待审核 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnEditAddr.setVisibility(View.VISIBLE); | |||
btnAudit.setVisibility(View.VISIBLE); | |||
break; | |||
case Constants.ORDER_STATUS_WAIT_DELIVERY://待发货 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnCancelOrder.setVisibility(View.VISIBLE); | |||
btnEditAddr.setVisibility(View.VISIBLE); | |||
btnDeliver.setVisibility(View.VISIBLE); | |||
break; | |||
case Constants.ORDER_STATUS_WAIT_TAKE_DELIVERY://待收货 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnLogistics.setVisibility(View.VISIBLE); | |||
btnReturnGoods.setVisibility(View.VISIBLE); | |||
break; | |||
case Constants.ORDER_STATUS_WAIT_ACTIVE://待激活 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnFinish.setVisibility(View.VISIBLE); | |||
btnReturnGoods.setVisibility(View.VISIBLE); | |||
btnExGoods.setVisibility(View.VISIBLE); | |||
btnActive.setVisibility(View.VISIBLE); | |||
break; | |||
case Constants.ORDER_STATUS_FINISH://已结束 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnAgainActive.setVisibility(View.VISIBLE); | |||
break; | |||
case Constants.ORDER_STATUS_RETURN_GOODS://退货中 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnReceiveGoods.setVisibility(View.VISIBLE); | |||
break; | |||
case Constants.ORDER_STATUS_EX_GOODS://换货中 | |||
break; | |||
if (!orderData.getOrderStatus().equals(String.valueOf(Constants.ORDER_STATUS_CANCEL))){ | |||
switch (Integer.parseInt(orderData.getOrderStep())){ | |||
case Constants.ORDER_STATUS_BASE://完成填写基本信息 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnUserInfoUpload.setVisibility(View.VISIBLE); | |||
break; | |||
case Constants.ORDER_STATUS_INFO://完成个人/单位信息上传 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnCarInfoUpload.setVisibility(View.VISIBLE); | |||
break; | |||
case Constants.ORDER_STATUS_CAR://完成车辆信息上传 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnConfirmInfo.setVisibility(View.VISIBLE); | |||
break; | |||
case Constants.ORDER_STATUS_WAIT_PAY://完成签约。待支付 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnPay.setVisibility(View.VISIBLE); | |||
break; | |||
case Constants.ORDER_STATUS_WAIT_AUDIT://待审核 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnEditAddr.setVisibility(View.VISIBLE); | |||
btnAudit.setVisibility(View.VISIBLE); | |||
break; | |||
case Constants.ORDER_STATUS_WAIT_DELIVERY://待发货 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnCancelOrder.setVisibility(View.VISIBLE); | |||
btnEditAddr.setVisibility(View.VISIBLE); | |||
btnDeliver.setVisibility(View.VISIBLE); | |||
break; | |||
case Constants.ORDER_STATUS_WAIT_TAKE_DELIVERY://待收货 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnLogistics.setVisibility(View.VISIBLE); | |||
btnReturnGoods.setVisibility(View.VISIBLE); | |||
break; | |||
case Constants.ORDER_STATUS_WAIT_ACTIVE://待激活 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnFinish.setVisibility(View.VISIBLE); | |||
btnReturnGoods.setVisibility(View.VISIBLE); | |||
btnExGoods.setVisibility(View.VISIBLE); | |||
btnActive.setVisibility(View.VISIBLE); | |||
break; | |||
case Constants.ORDER_STATUS_FINISH://已结束 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnAgainActive.setVisibility(View.VISIBLE); | |||
break; | |||
case Constants.ORDER_STATUS_RETURN_GOODS://退货中 | |||
LLBtns.setVisibility(View.VISIBLE); | |||
btnReceiveGoods.setVisibility(View.VISIBLE); | |||
break; | |||
case Constants.ORDER_STATUS_EX_GOODS://换货中 | |||
break; | |||
} | |||
} | |||
} | |||
@@ -123,11 +172,59 @@ public class OrderUtils { | |||
* 设置点击事件 | |||
*/ | |||
private void initBtnClick(){ | |||
//身份证信息上传 | |||
btnUserInfoUpload.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
startActivity(IdentityInformationUploadActivity.class); | |||
} | |||
}); | |||
//车辆信息上传 | |||
btnCarInfoUpload.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
startActivity(VehicleInformationActivity.class); | |||
} | |||
}); | |||
//信息确认 | |||
btnConfirmInfo.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
startActivity(InformationConfirmedActivity.class); | |||
} | |||
}); | |||
//支付 | |||
btnPay.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
ResultBean.BizContent productBean = new ResultBean.BizContent(); | |||
productBean.setId(orderData.productId); | |||
productBean.setName(orderData.getProductName()); | |||
if (orderData.product != null) { | |||
productBean.setProductMsg(orderData.product.productMsg); | |||
productBean.setFee(orderData.product.fee); | |||
} | |||
Bundle bundle = new Bundle(); | |||
bundle.putString("bizContent", JSON.toJSONString(productBean)); | |||
bundle.putString("orderId", orderData.getOrderId()); | |||
Intent intent = new Intent(); | |||
intent.setClass(context, ETCHandleActivity.class); | |||
intent.putExtras(bundle); | |||
context.startActivity(intent); | |||
} | |||
}); | |||
//结束订单 | |||
btnFinish.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
ToastUtil.showS(context,"确定是否结束订单"); | |||
new Utils().showMessDialog(context, "确定是否结束订单?", dialog -> { | |||
ToastUtil.showS(context,"结束订单"); | |||
}); | |||
} | |||
}); | |||
@@ -184,6 +281,7 @@ public class OrderUtils { | |||
@Override | |||
public void onClick(View view) { | |||
ToastUtil.showS(context,"发货"); | |||
startActivity(FormDeliveryActivity.class); | |||
} | |||
}); | |||
@@ -191,7 +289,7 @@ public class OrderUtils { | |||
btnActive.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
ToastUtil.showS(context,"激活"); | |||
releaseActivation(orderData); | |||
} | |||
}); | |||
@@ -199,7 +297,9 @@ public class OrderUtils { | |||
btnAgainActive.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
ToastUtil.showS(context,"再次唤起"); | |||
new Utils().showMessDialog(context, "确定是否再次唤醒订单?", dialog -> { | |||
ToastUtil.showS(context,"再次唤起"); | |||
}); | |||
} | |||
}); | |||
@@ -212,6 +312,107 @@ public class OrderUtils { | |||
}); | |||
} | |||
//激活 | |||
public void releaseActivation(ResultBean.BizContent bizContent1) { | |||
new BluetoothDialog.Builder(context) .setResult(new BluetoothDialog.Builder.OnResult() { | |||
/** | |||
* 未打开的蓝牙 | |||
*/ | |||
@Override | |||
public void unopenedBluetooth() { | |||
Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); | |||
context.startActivityForResult(intent, 1); | |||
} | |||
/** | |||
* 蓝牙连接成功 | |||
* @param boxManagers 盒子对象 | |||
*/ | |||
@SuppressLint("LogNotTimber") | |||
@Override | |||
public void BluetoothLinkIsSuccessful(BoxManagers boxManagers) { | |||
boolean cardId = TextUtils.isEmpty(bizContent1.getCardId()); | |||
String cardStatus = bizContent1.getCardStatus() == null ? "0" : bizContent1.getCardStatus(); | |||
boolean obuId = TextUtils.isEmpty(bizContent1.getObuId()); | |||
//0 未安装 11 已发行 -> 走激活 9 发行申请 -> 发行 | |||
String obuStatus = bizContent1.getObuStatus() == null ? "9" : bizContent1.getObuStatus(); | |||
//OBU状态为 -> 1 2 3 4 5 6 7(直接走激活) 且卡状态不为 0 9 99 | |||
//卡号 1 2 3 4 5 6(走申请) //签号 0 11 7 8 9 99(反向直接走申请) | |||
if (cardId) { //卡号为空 | |||
cardOpeningApplication(bizContent1); | |||
//走卡发行 | |||
} else if (!cardId && "0".equals(cardStatus)) { //卡号不为空 且状态为 0 (申请) | |||
//走卡发行 | |||
cardOpeningApplication(bizContent1); | |||
} else if (obuId) { //签号为空 | |||
//走OBU发行 | |||
openingApplication(bizContent1); | |||
} else if (!obuId && "9".equals(obuStatus)) { //签号不为空 且状态为 9 (申请) | |||
//走OBU发行 | |||
openingApplication(bizContent1); | |||
} else if (!cardId && !obuId && ("1".equals(obuStatus) || "11".equals(obuStatus) || | |||
"0".equals(obuStatus))) { | |||
//走发行申请 | |||
deviceActivation(bizContent1); | |||
} else { | |||
cardOpeningApplication(bizContent1); | |||
} | |||
} | |||
}) | |||
.show(); | |||
} | |||
//输入状态码判断是否为ture | |||
public boolean statusCode(String key, String... value) { | |||
for (String item : value) { | |||
if (item.equals(key)) { | |||
return true; | |||
} | |||
} | |||
return false; | |||
} | |||
/** | |||
* 开卡申请 | |||
*/ | |||
public void cardOpeningApplication(ResultBean.BizContent bizContent1) { | |||
new ApplyRequst(BoxManagers.mDecryptVehicleApduBean, bizContent1, context).releasesCardApply( | |||
new ApplyRequst.CallBack() { | |||
@Override | |||
public void onSuccess() { | |||
openingApplication(bizContent1); | |||
} | |||
} | |||
); | |||
} | |||
/** | |||
* 开签申请 | |||
*/ | |||
public void openingApplication(ResultBean.BizContent bizContent1) { | |||
//开签完以后走激活 | |||
new OBURequest(BoxManagers.mDecryptVehicleApduBean, bizContent1,context) | |||
.obuPublishRequest(new OBURequest.CallBack() { | |||
@Override | |||
public void onSuccess() { | |||
deviceActivation(bizContent1); | |||
} | |||
}); | |||
} | |||
/** | |||
* 设备激活 | |||
*/ | |||
public void deviceActivation(ResultBean.BizContent content) { | |||
//设备激活 | |||
new ObuActivation(BoxManagers.mDecryptVehicleApduBean,context).start(bizContent -> { | |||
bizContent.setOrderId(content.getOrderId()); | |||
//激活步骤 | |||
new ObuActivateRequester().start(bizContent, context); | |||
}); | |||
} | |||
/** | |||
* 跳转 | |||
* @param activityClass | |||
@@ -221,10 +422,13 @@ public class OrderUtils { | |||
bundle.putString("id",FunHelper.isEmpty(orderData.getId()) ? "" : orderData.getId()); | |||
bundle.putString("orderId",FunHelper.isEmpty(orderData.getOrderId()) ? "" : orderData.getOrderId()); | |||
bundle.putString("vehiclePlate",FunHelper.isEmpty(orderData.getVehiclePlate()) ? "" : orderData.getVehiclePlate()); | |||
bundle.putString("vehiclePlateColor",FunHelper.isEmpty(orderData.getVehiclePlateColor()) ? "" : orderData.getVehiclePlateColor()); | |||
bundle.putString("amount",FunHelper.isEmpty(orderData.getAmount()) ? "0" : orderData.getAmount()); | |||
bundle.putString("orderStep",FunHelper.isEmpty(orderData.getOrderStep()) ? "" : orderData.getOrderStep()); | |||
bundle.putString("cardId",FunHelper.isEmpty(orderData.getCardId()) ? "" : orderData.getCardId()); | |||
bundle.putString("obuId",FunHelper.isEmpty(orderData.getObuId()) ? "" : orderData.getObuId()); | |||
bundle.putString("type",FunHelper.isEmpty(orderData.getTowing()) ? "" : orderData.getTowing()); | |||
bundle.putString("isValueCard",FunHelper.isEmpty(orderData.getIsValueCard()) ? "" : orderData.getIsValueCard()); | |||
Intent intent = new Intent(); | |||
intent.setClass(context, activityClass); |
@@ -1,48 +1,28 @@ | |||
package com.huntersun.vkyes.etcopencard.project.ui.fragment; | |||
import android.annotation.SuppressLint; | |||
import android.content.Context; | |||
import android.content.Intent; | |||
import android.util.Log; | |||
import android.view.KeyEvent; | |||
import android.view.LayoutInflater; | |||
import android.view.MotionEvent; | |||
import android.view.View; | |||
import android.view.ViewGroup; | |||
import android.view.inputmethod.EditorInfo; | |||
import android.view.inputmethod.InputMethodManager; | |||
import android.widget.TextView; | |||
import androidx.annotation.NonNull; | |||
import androidx.core.content.ContextCompat; | |||
import androidx.recyclerview.widget.LinearLayoutManager; | |||
import androidx.viewpager.widget.ViewPager; | |||
import com.chad.library.adapter.base.BaseQuickAdapter; | |||
import com.chad.library.adapter.base.BaseViewHolder; | |||
import com.google.gson.Gson; | |||
import com.hjq.base.FragmentPagerAdapter; | |||
import com.huntersun.vkyes.etcopencard.R; | |||
import com.huntersun.vkyes.etcopencard.databinding.FragmentHomeTwoBinding; | |||
import com.huntersun.vkyes.etcopencard.project.api.Api; | |||
import com.huntersun.vkyes.etcopencard.project.api.Converter; | |||
import com.huntersun.vkyes.etcopencard.project.api.FatherBean; | |||
import com.huntersun.vkyes.etcopencard.project.api.MyRetrofit; | |||
import com.huntersun.vkyes.etcopencard.project.api.Result; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.EnumBean; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.SendTheVerificationCodeBean; | |||
import com.huntersun.vkyes.etcopencard.project.tool.MyShared; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.HomeListInfo; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.MainActivity; | |||
import com.huntersun.vkyes.etcopencard.src.aop.SingleClick; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppFragment; | |||
import com.huntersun.vkyes.etcopencard.src.app.TitleBarFragment; | |||
import com.jeremyliao.liveeventbus.LiveEventBus; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
/** | |||
* @author admin | |||
*/ |
@@ -11,6 +11,7 @@ import android.widget.TextView; | |||
import com.chad.library.adapter.base.BaseQuickAdapter; | |||
import com.chad.library.adapter.base.BaseViewHolder; | |||
import com.google.gson.Gson; | |||
import com.huntersun.vky.obublelib.constant.Constant; | |||
import com.huntersun.vkyes.etcopencard.R; | |||
import com.huntersun.vkyes.etcopencard.databinding.FragmentSonOneBinding; | |||
import com.huntersun.vkyes.etcopencard.project.api.Api; | |||
@@ -22,11 +23,10 @@ import com.huntersun.vkyes.etcopencard.project.api.Result; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.EnumBean; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.IFCode; | |||
import com.huntersun.vkyes.etcopencard.project.api.bean.ResultBean; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.HomeListInfo; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.order.OrderDetailsActivity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.MainActivity; | |||
import com.huntersun.vkyes.etcopencard.project.ui.activity.order.OrderUtils; | |||
import com.huntersun.vkyes.etcopencard.project.utils.Constants; | |||
import com.huntersun.vkyes.etcopencard.project.utils.FunHelper; | |||
import com.huntersun.vkyes.etcopencard.src.action.StatusAction; | |||
import com.huntersun.vkyes.etcopencard.src.aop.SingleClick; | |||
import com.huntersun.vkyes.etcopencard.src.app.AppFragment; | |||
@@ -190,7 +190,7 @@ public class FragmentSonOne extends TitleBarFragment<MainActivity> | |||
@Override | |||
protected void convert(BaseViewHolder helper, ResultBean.BizContent item) { | |||
helper.setText(R.id.text, item.getInsertTime()); | |||
helper.setText(R.id.text1, EnumBean.backValue(item.getOrderStep(), EnumBean.OrderStage)); | |||
helper.setText(R.id.text1, item.getOrderStatus().equals(String.valueOf(Constants.ORDER_STATUS_CANCEL)) ? "已取消" : EnumBean.backValue(item.getOrderStep(), EnumBean.OrderStage)); | |||
helper.setText(R.id.text2, item.getVehiclePlate()); | |||
helper.setText(R.id.text3, EnumBean.backValue(item.getVehiclePlateColor(), EnumBean.VehicleColorArray)); | |||
helper.setText(R.id.text4, "PERSONAL_USER".equals(item.getUserType()) ? "个人用户" : "单位用户"); | |||
@@ -204,7 +204,11 @@ public class FragmentSonOne extends TitleBarFragment<MainActivity> | |||
helper.getView(R.id.btnCancelOrder),helper.getView(R.id.btnEditAddr), | |||
helper.getView(R.id.btnAudit),helper.getView(R.id.btnDeliver), | |||
helper.getView(R.id.btnActive),helper.getView(R.id.btnAgainActive), | |||
helper.getView(R.id.btnReceiveGoods)); | |||
helper.getView(R.id.btnReceiveGoods), | |||
helper.getView(R.id.btnUserInfoUpload), | |||
helper.getView(R.id.btnCarInfoUpload), | |||
helper.getView(R.id.btnConfirmInfo), | |||
helper.getView(R.id.btnPay)); | |||
helper.setOnClickListener(R.id.layout, new View.OnClickListener() { | |||
@Override | |||
@@ -212,7 +216,7 @@ public class FragmentSonOne extends TitleBarFragment<MainActivity> | |||
public void onClick(View v) {//跳转订单详情 | |||
Intent intent = new Intent(); | |||
intent.putExtra("id", item.getId()); | |||
intent.setClass(getContext(), HomeListInfo.class); | |||
intent.setClass(getContext(), OrderDetailsActivity.class); | |||
startActivity(intent); | |||
} | |||
}); |
@@ -92,6 +92,82 @@ public class FunHelper { | |||
} | |||
} | |||
/** | |||
* 获取车辆类型 | |||
* @param carType | |||
* @return | |||
*/ | |||
public static String getCarTypeName(String carType){ | |||
switch (carType){ | |||
case "0": | |||
return "客车"; | |||
case "1": | |||
return "货车"; | |||
default: | |||
return ""; | |||
} | |||
} | |||
//根据ETC卡状态获取ETC卡状态文字 | |||
public static String getETCStatusName (int cardStatus) { | |||
switch (cardStatus){ | |||
case 0: | |||
return "申请"; | |||
case 1: | |||
return "正常"; | |||
case 2: | |||
return "有卡挂起"; | |||
case 3: | |||
return "无卡挂起"; | |||
case 4: | |||
return "有卡注销"; | |||
case 5: | |||
return "无卡注销"; | |||
case 6: | |||
return "卡挂失"; | |||
case 9: | |||
return "预注销"; | |||
case 99: | |||
return "已删除"; | |||
default: | |||
return ""; | |||
} | |||
} | |||
//根据OBU状态获取OBU状态文字 | |||
public static String getOBUStatusName (int obuStatus){ | |||
switch (obuStatus){ | |||
case 0: | |||
return "未安装"; | |||
case 1: | |||
return "正常"; | |||
case 2: | |||
return "有签挂起"; | |||
case 3: | |||
return "无签挂起"; | |||
case 4: | |||
return "有签注销"; | |||
case 5: | |||
return "无签注销"; | |||
case 6: | |||
return "标签挂失"; | |||
case 7: | |||
return "已过户"; | |||
case 8: | |||
return "维修中"; | |||
case 9: | |||
return "发行申请"; | |||
case 10: | |||
return "车型不符"; | |||
case 11: | |||
return "已发行"; | |||
case 99: | |||
return "已删除"; | |||
default: | |||
return ""; | |||
} | |||
} | |||
/* | |||
* 判断集合为空 | |||
* |
@@ -1,429 +0,0 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
xmlns:app="http://schemas.android.com/apk/res-auto" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:background="@color/background_color"> | |||
<com.huntersun.vkyes.etcopencard.src.widget.StatusLayout | |||
android:id="@+id/hl_status_hint" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content"> | |||
<androidx.core.widget.NestedScrollView | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:layout_above="@+id/rly_1"> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:paddingBottom="@dimen/dp_30"> | |||
<ImageView | |||
android:id="@+id/img_top_bg" | |||
android:layout_width="match_parent" | |||
android:layout_height="@dimen/dp_180" | |||
android:background="@mipmap/order_detail_top_bg" /> | |||
<TextView | |||
android:id="@+id/tv_order_status" | |||
style="@style/greenTextStyleBold20" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:gravity="left" | |||
android:layout_alignTop="@+id/img_green_card" | |||
android:layout_marginLeft="@dimen/dp_30" | |||
android:layout_marginTop="@dimen/dp_12" | |||
android:layout_toLeftOf="@+id/img_green_card" | |||
android:text="" /> | |||
<ImageView | |||
android:id="@+id/img_green_card" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignBottom="@+id/img_top_bg" | |||
android:layout_alignParentRight="true" | |||
android:layout_marginRight="@dimen/dp_47" | |||
android:layout_marginBottom="@dimen/dp_29" | |||
android:src="@mipmap/ic_order_detail_green_card" /> | |||
<!-- 车辆信息--> | |||
<com.ruffian.library.widget.RLinearLayout | |||
android:id="@+id/cardInfo" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_below="@+id/img_green_card" | |||
android:layout_marginLeft="@dimen/dp_15" | |||
android:layout_marginTop="-24dp" | |||
android:layout_marginRight="@dimen/dp_15" | |||
android:orientation="vertical" | |||
android:padding="@dimen/dp_10" | |||
app:background_normal="@color/white" | |||
app:corner_radius="@dimen/dp_10"> | |||
<!--车辆信息--> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:orientation="vertical" | |||
android:paddingLeft="@dimen/dp_5" | |||
android:paddingRight="@dimen/dp_10" | |||
android:paddingBottom="@dimen/dp_5"> | |||
<TextView | |||
android:id="@+id/tv_yhhh_title" | |||
style="@style/blackTextStyleBold16" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_below="@+id/rlinear_ddxx" | |||
android:layout_marginBottom="@dimen/dp_12" | |||
android:text="车辆信息" /> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:orientation="horizontal"> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="车牌号" /> | |||
<TextView | |||
android:id="@+id/text1" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:orientation="horizontal"> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="车牌颜色" /> | |||
<TextView | |||
android:id="@+id/text2" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:id="@+id/vehicle_information" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:orientation="horizontal"> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="收费车型" /> | |||
<TextView | |||
android:id="@+id/text3" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:orientation="horizontal"> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="核载人数" /> | |||
<TextView | |||
android:id="@+id/text4" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:orientation="horizontal"> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="核定载质量" /> | |||
<TextView | |||
android:id="@+id/text5" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:orientation="horizontal"> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="车辆尺寸" /> | |||
<TextView | |||
android:id="@+id/text6" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:id="@+id/layout" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:orientation="horizontal"> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="车轴数" /> | |||
<TextView | |||
android:id="@+id/text10" | |||
style="@style/black02TextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</com.ruffian.library.widget.RLinearLayout> | |||
<!-- 证件信息--> | |||
<LinearLayout | |||
android:id="@+id/certificates" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_below="@+id/cardInfo" | |||
android:orientation="vertical"> | |||
<TextView | |||
style="@style/blackTextStyleBold16" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_below="@+id/rlinear_ddxx" | |||
android:layout_marginLeft="@dimen/dp_15" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:layout_marginBottom="@dimen/dp_12" | |||
android:text="证件信息" /> | |||
<com.ruffian.library.widget.RLinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_below="@+id/tv_yhhh_title" | |||
android:layout_marginLeft="@dimen/dp_15" | |||
android:layout_marginRight="@dimen/dp_15" | |||
android:orientation="vertical" | |||
android:paddingLeft="@dimen/dp_10" | |||
android:paddingTop="@dimen/dp_15" | |||
android:paddingRight="@dimen/dp_10" | |||
android:paddingBottom="@dimen/dp_15" | |||
app:background_normal="@color/white" | |||
app:corner_radius="@dimen/dp_10"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:orientation="horizontal" | |||
android:paddingLeft="@dimen/dp_5" | |||
android:paddingRight="@dimen/dp_10"> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="姓名" /> | |||
<TextView | |||
android:id="@+id/text7" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:orientation="horizontal" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:paddingLeft="@dimen/dp_5" | |||
android:paddingRight="@dimen/dp_10"> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="证件类型" /> | |||
<TextView | |||
android:id="@+id/text8" | |||
style="@style/black02TextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:orientation="horizontal" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:paddingLeft="@dimen/dp_5" | |||
android:paddingRight="@dimen/dp_10"> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="证件号" /> | |||
<TextView | |||
android:id="@+id/text9" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:orientation="horizontal" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:paddingLeft="@dimen/dp_5" | |||
android:paddingRight="@dimen/dp_10"> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="证件有效日期" /> | |||
<TextView | |||
android:id="@+id/text11" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:orientation="horizontal" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:paddingLeft="@dimen/dp_5" | |||
android:paddingRight="@dimen/dp_10"> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="手机号" /> | |||
<TextView | |||
android:id="@+id/text12" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
</com.ruffian.library.widget.RLinearLayout> | |||
</LinearLayout> | |||
</RelativeLayout> | |||
</androidx.core.widget.NestedScrollView> | |||
</com.huntersun.vkyes.etcopencard.src.widget.StatusLayout> | |||
<androidx.constraintlayout.widget.ConstraintLayout | |||
android:id="@+id/rly_1" | |||
android:layout_width="match_parent" | |||
android:layout_height="@dimen/dp_45" | |||
android:layout_alignParentBottom="true" | |||
android:background="@color/white"> | |||
<com.ruffian.library.widget.RTextView | |||
android:id="@+id/cancel" | |||
style="@style/black02TextStyle12" | |||
android:layout_width="wrap_content" | |||
android:layout_height="@dimen/dp_30" | |||
android:layout_marginRight="@dimen/dp_20" | |||
android:gravity="center" | |||
android:paddingLeft="@dimen/dp_12" | |||
android:paddingRight="@dimen/dp_12" | |||
android:text="取消订单" | |||
app:border_color_normal="@color/gray02" | |||
app:border_width_normal="0.5dp" | |||
app:corner_radius="@dimen/dp_50" | |||
app:layout_constraintBottom_toBottomOf="parent" | |||
app:layout_constraintRight_toLeftOf="@+id/nextStep" | |||
app:layout_constraintTop_toTopOf="parent" /> | |||
<com.ruffian.library.widget.RTextView | |||
android:id="@+id/nextStep" | |||
style="@style/whiteTextStyle12" | |||
android:layout_width="wrap_content" | |||
android:layout_height="@dimen/dp_30" | |||
android:layout_marginRight="@dimen/dp_35" | |||
android:gravity="center" | |||
android:paddingLeft="@dimen/dp_12" | |||
android:paddingRight="@dimen/dp_12" | |||
android:text="设备激活" | |||
app:background_normal="@color/green01" | |||
app:corner_radius="@dimen/dp_50" | |||
app:layout_constraintBottom_toBottomOf="parent" | |||
app:layout_constraintRight_toRightOf="parent" | |||
app:layout_constraintTop_toTopOf="parent" /> | |||
</androidx.constraintlayout.widget.ConstraintLayout> | |||
<com.hjq.bar.TitleBar | |||
android:id="@+id/title_bar" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:background="@color/transparent" | |||
app:leftIcon="@mipmap/back_black" | |||
app:lineVisible="false" | |||
app:title="订单详情" | |||
app:titleColor="@color/black" | |||
/> | |||
</RelativeLayout> |
@@ -0,0 +1,361 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
xmlns:app="http://schemas.android.com/apk/res-auto" | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:background="@color/background_color"> | |||
<com.huntersun.vkyes.etcopencard.src.widget.StatusLayout | |||
android:id="@+id/hl_status_hint" | |||
style="@style/MatchWrap"> | |||
<androidx.core.widget.NestedScrollView style="@style/MatchWrap"> | |||
<LinearLayout | |||
style="@style/MatchWrap.Vertical" | |||
android:paddingBottom="@dimen/dp_80"> | |||
<!--top信息--> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent"> | |||
<ImageView | |||
android:id="@+id/img_top_bg" | |||
android:layout_width="match_parent" | |||
android:layout_height="@dimen/dp_180" | |||
android:background="@mipmap/order_detail_top_bg" /> | |||
<TextView | |||
android:id="@+id/tvOrderStep" | |||
style="@style/greenTextStyleBold20" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignTop="@+id/img_green_card" | |||
android:layout_marginLeft="@dimen/dp_40" | |||
android:layout_marginTop="@dimen/dp_22" | |||
android:text="待审核" /> | |||
<ImageView | |||
android:id="@+id/img_green_card" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_alignBottom="@+id/img_top_bg" | |||
android:layout_alignParentRight="true" | |||
android:layout_marginRight="@dimen/dp_47" | |||
android:layout_marginBottom="@dimen/dp_29" | |||
android:src="@mipmap/ic_order_detail_green_card" /> | |||
</RelativeLayout> | |||
<!--基本信息--> | |||
<com.ruffian.library.widget.RLinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_below="@+id/img_green_card" | |||
android:layout_marginLeft="@dimen/dp_15" | |||
android:layout_marginTop="-24dp" | |||
android:layout_marginRight="@dimen/dp_15" | |||
android:orientation="vertical" | |||
android:padding="@dimen/dp_10" | |||
app:background_normal="@color/white" | |||
app:corner_radius="@dimen/dp_10"> | |||
<!--地址信息--> | |||
<RelativeLayout | |||
android:id="@+id/rlAddrInfo" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:padding="@dimen/dp_5" | |||
android:visibility="visible"> | |||
<ImageView | |||
android:id="@+id/img_green_edit" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:src="@mipmap/ic_order_detail_green_edit" /> | |||
<TextView | |||
android:id="@+id/tvConsignee" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginLeft="8.5dp" | |||
android:layout_toRightOf="@+id/img_green_edit" | |||
/> | |||
<TextView | |||
android:id="@+id/tvAddress" | |||
style="@style/black02TextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_below="@+id/tvConsignee" | |||
android:layout_alignLeft="@+id/tvConsignee" | |||
android:layout_marginTop="@dimen/dp_12" | |||
/> | |||
<TextView | |||
style="@style/MatchOne.HorLine" | |||
android:layout_below="@+id/tvAddress" | |||
android:layout_marginTop="@dimen/dp_10" /> | |||
</RelativeLayout> | |||
<!-- 产品基本信息--> | |||
<LinearLayout | |||
android:id="@+id/LLBaseInfoContent" | |||
style="@style/MatchWrap.Vertical"> | |||
</LinearLayout> | |||
</com.ruffian.library.widget.RLinearLayout> | |||
<!--售后信息--> | |||
<LinearLayout | |||
android:id="@+id/LLAfterSaleInfo" | |||
android:visibility="gone" | |||
style="@style/MatchWrap.Vertical"> | |||
<TextView | |||
android:id="@+id/tvAfterSaleTitle" | |||
style="@style/blackTextStyleBold16" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_below="@+id/rlinear_ddxx" | |||
android:layout_marginLeft="@dimen/dp_15" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:layout_marginBottom="@dimen/dp_12" | |||
android:text="用户换货信息" /> | |||
<com.ruffian.library.widget.RLinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginHorizontal="@dimen/dp_15" | |||
android:orientation="vertical" | |||
android:paddingLeft="@dimen/dp_10" | |||
android:paddingTop="@dimen/dp_5" | |||
android:paddingRight="@dimen/dp_10" | |||
android:paddingBottom="@dimen/dp_15" | |||
app:background_normal="@color/white" | |||
app:corner_radius="@dimen/dp_10"> | |||
<LinearLayout | |||
android:id="@+id/LLAfterSaleContent" | |||
style="@style/MatchWrap.Vertical"> | |||
</LinearLayout> | |||
</com.ruffian.library.widget.RLinearLayout> | |||
</LinearLayout> | |||
<!--业务员信息--> | |||
<LinearLayout | |||
android:id="@+id/LLStaffInfo" | |||
android:visibility="gone" | |||
style="@style/MatchWrap.Vertical"> | |||
<TextView | |||
android:id="@+id/tvStaffTitle" | |||
style="@style/blackTextStyleBold16" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_below="@+id/rlinear_ddxx" | |||
android:layout_marginLeft="@dimen/dp_15" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:layout_marginBottom="@dimen/dp_12" | |||
android:text="业务员发起换货" /> | |||
<com.ruffian.library.widget.RLinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginHorizontal="@dimen/dp_15" | |||
android:orientation="vertical" | |||
android:paddingLeft="@dimen/dp_10" | |||
android:paddingTop="@dimen/dp_5" | |||
android:paddingRight="@dimen/dp_10" | |||
android:paddingBottom="@dimen/dp_15" | |||
app:background_normal="@color/white" | |||
app:corner_radius="@dimen/dp_10"> | |||
<LinearLayout | |||
android:id="@+id/LLStaffContent" | |||
style="@style/MatchWrap.Vertical"> | |||
<include layout="@layout/layout_order_details_item" /> | |||
<include layout="@layout/layout_order_details_item" /> | |||
</LinearLayout> | |||
</com.ruffian.library.widget.RLinearLayout> | |||
</LinearLayout> | |||
</LinearLayout> | |||
</androidx.core.widget.NestedScrollView> | |||
</com.huntersun.vkyes.etcopencard.src.widget.StatusLayout> | |||
<!--按钮信息--> | |||
<LinearLayout | |||
android:id="@+id/LLBtns" | |||
style="@style/MatchWrap.Horizontal" | |||
android:padding="@dimen/dp_10" | |||
android:background="@color/white" | |||
android:gravity="center_vertical|right" | |||
android:layout_height="@dimen/dp_45" | |||
android:layout_alignParentBottom="true" | |||
android:visibility="gone"> | |||
<Button | |||
android:id="@+id/btnFinish" | |||
android:layout_width="@dimen/dp_67" | |||
android:layout_height="@dimen/dp_25" | |||
android:background="@drawable/border_dark_grey_radius" | |||
android:text="结束订单" | |||
android:visibility="gone" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:textColor="@color/color_666666" | |||
android:textSize="@dimen/sp_12" /> | |||
<Button | |||
android:id="@+id/btnLogistics" | |||
android:layout_width="@dimen/dp_67" | |||
android:layout_height="@dimen/dp_25" | |||
android:background="@drawable/border_dark_grey_radius" | |||
android:text="查看物流" | |||
android:visibility="gone" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:textColor="@color/color_666666" | |||
android:textSize="@dimen/sp_12" /> | |||
<Button | |||
android:id="@+id/btnReturnGoods" | |||
android:layout_width="@dimen/dp_67" | |||
android:layout_height="@dimen/dp_25" | |||
android:background="@drawable/border_dark_grey_radius" | |||
android:text="申请退货" | |||
android:visibility="gone" | |||
android:textColor="#B3B3B3" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:textSize="@dimen/sp_12" /> | |||
<Button | |||
android:id="@+id/btnExGoods" | |||
android:layout_width="@dimen/dp_67" | |||
android:layout_height="@dimen/dp_25" | |||
android:background="@drawable/border_dark_grey_radius" | |||
android:text="申请换货" | |||
android:visibility="gone" | |||
android:textColor="#B3B3B3" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:textSize="@dimen/sp_12" /> | |||
<Button | |||
android:id="@+id/btnCancelOrder" | |||
android:layout_width="@dimen/dp_67" | |||
android:layout_height="@dimen/dp_25" | |||
android:background="@drawable/border_dark_grey_radius" | |||
android:text="取消订单" | |||
android:visibility="gone" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:textColor="#B3B3B3" | |||
android:textSize="@dimen/sp_12" /> | |||
<Button | |||
android:id="@+id/btnEditAddr" | |||
android:layout_width="@dimen/dp_67" | |||
android:layout_height="@dimen/dp_25" | |||
android:background="@drawable/button_status1" | |||
android:text="修改地址" | |||
android:visibility="gone" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:textColor="#00B38B" | |||
android:textSize="@dimen/sp_12" /> | |||
<Button | |||
android:id="@+id/btnAudit" | |||
style="@style/BtnShortStyle" | |||
android:layout_width="@dimen/dp_67" | |||
android:layout_height="@dimen/dp_25" | |||
android:layout_gravity="center_vertical|center_horizontal" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:text="审核" | |||
android:visibility="gone" | |||
android:textSize="@dimen/sp_12" /> | |||
<Button | |||
android:id="@+id/btnDeliver" | |||
style="@style/BtnShortStyle" | |||
android:layout_width="@dimen/dp_67" | |||
android:layout_height="@dimen/dp_25" | |||
android:layout_gravity="center_vertical|center_horizontal" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:text="发货" | |||
android:visibility="gone" | |||
android:textSize="@dimen/sp_12" /> | |||
<Button | |||
android:id="@+id/btnActive" | |||
style="@style/BtnShortStyle" | |||
android:layout_width="@dimen/dp_67" | |||
android:layout_height="@dimen/dp_25" | |||
android:layout_gravity="center_vertical|center_horizontal" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:text="去激活" | |||
android:visibility="gone" | |||
android:textSize="@dimen/sp_12" /> | |||
<Button | |||
android:id="@+id/btnAgainActive" | |||
style="@style/BtnShortStyle" | |||
android:layout_width="@dimen/dp_67" | |||
android:layout_height="@dimen/dp_25" | |||
android:layout_gravity="center_vertical|center_horizontal" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:text="再次唤起" | |||
android:visibility="gone" | |||
android:textSize="@dimen/sp_12" /> | |||
<Button | |||
android:id="@+id/btnReceiveGoods" | |||
style="@style/BtnShortStyle" | |||
android:layout_width="@dimen/dp_67" | |||
android:layout_height="@dimen/dp_25" | |||
android:layout_gravity="center_vertical|center_horizontal" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:text="确认完成" | |||
android:visibility="gone" | |||
android:textSize="@dimen/sp_12" /> | |||
<Button | |||
android:id="@+id/btnUserInfoUpload" | |||
style="@style/BtnShortStyle" | |||
android:layout_width="@dimen/dp_100" | |||
android:layout_height="@dimen/dp_25" | |||
android:layout_gravity="center_vertical|center_horizontal" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:text="身份证信息上传" | |||
android:visibility="gone" | |||
android:textSize="@dimen/sp_12" /> | |||
<Button | |||
android:id="@+id/btnCarInfoUpload" | |||
style="@style/BtnShortStyle" | |||
android:layout_width="@dimen/dp_100" | |||
android:layout_height="@dimen/dp_25" | |||
android:layout_gravity="center_vertical|center_horizontal" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:text="车辆信息上传" | |||
android:visibility="gone" | |||
android:textSize="@dimen/sp_12" /> | |||
<Button | |||
android:id="@+id/btnConfirmInfo" | |||
style="@style/BtnShortStyle" | |||
android:layout_width="@dimen/dp_67" | |||
android:layout_height="@dimen/dp_25" | |||
android:layout_gravity="center_vertical|center_horizontal" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:text="信息确认" | |||
android:visibility="gone" | |||
android:textSize="@dimen/sp_12" /> | |||
<Button | |||
android:id="@+id/btnPay" | |||
style="@style/BtnShortStyle" | |||
android:layout_width="@dimen/dp_67" | |||
android:layout_height="@dimen/dp_25" | |||
android:layout_gravity="center_vertical|center_horizontal" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:text="支付" | |||
android:visibility="gone" | |||
android:textSize="@dimen/sp_12" /> | |||
</LinearLayout> | |||
<com.hjq.bar.TitleBar | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:background="@color/transparent" | |||
app:leftIcon="@mipmap/back_black" | |||
app:lineVisible="false" | |||
app:title="订单详情" | |||
app:titleColor="@color/black" /> | |||
</RelativeLayout> |
@@ -6,6 +6,7 @@ | |||
android:id="@+id/LLBtns" | |||
style="@style/MatchWrap.Horizontal" | |||
android:padding="@dimen/dp_10" | |||
android:background="@color/white" | |||
android:gravity="center_vertical|right" | |||
android:visibility="gone"> | |||
<Button | |||
@@ -118,6 +119,46 @@ | |||
android:text="确认完成" | |||
android:visibility="gone" | |||
android:textSize="@dimen/sp_12" /> | |||
<Button | |||
android:id="@+id/btnUserInfoUpload" | |||
style="@style/BtnShortStyle" | |||
android:layout_width="@dimen/dp_100" | |||
android:layout_height="@dimen/dp_25" | |||
android:layout_gravity="center_vertical|center_horizontal" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:text="身份证信息上传" | |||
android:visibility="gone" | |||
android:textSize="@dimen/sp_12" /> | |||
<Button | |||
android:id="@+id/btnCarInfoUpload" | |||
style="@style/BtnShortStyle" | |||
android:layout_width="@dimen/dp_100" | |||
android:layout_height="@dimen/dp_25" | |||
android:layout_gravity="center_vertical|center_horizontal" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:text="车辆信息上传" | |||
android:visibility="gone" | |||
android:textSize="@dimen/sp_12" /> | |||
<Button | |||
android:id="@+id/btnConfirmInfo" | |||
style="@style/BtnShortStyle" | |||
android:layout_width="@dimen/dp_67" | |||
android:layout_height="@dimen/dp_25" | |||
android:layout_gravity="center_vertical|center_horizontal" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:text="信息确认" | |||
android:visibility="gone" | |||
android:textSize="@dimen/sp_12" /> | |||
<Button | |||
android:id="@+id/btnPay" | |||
style="@style/BtnShortStyle" | |||
android:layout_width="@dimen/dp_67" | |||
android:layout_height="@dimen/dp_25" | |||
android:layout_gravity="center_vertical|center_horizontal" | |||
android:layout_marginLeft="@dimen/dp_10" | |||
android:text="支付" | |||
android:visibility="gone" | |||
android:textSize="@dimen/sp_12" /> | |||
</LinearLayout> | |||
</LinearLayout> |
@@ -0,0 +1,30 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |||
style="@style/MatchWrap.Vertical"> | |||
<LinearLayout | |||
style="@style/MatchWrap.Horizontal" | |||
android:layout_marginTop="@dimen/dp_10"> | |||
<TextView | |||
android:id="@+id/tvLabel" | |||
style="@style/black02TextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_weight="1" | |||
android:text="" /> | |||
<TextView | |||
android:id="@+id/tvValue" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
<TextView | |||
android:id="@+id/tvLine" | |||
android:layout_marginTop="@dimen/dp_10" | |||
style="@style/MatchOne.HorLine" | |||
android:visibility="gone"/> | |||
</LinearLayout> |