@@ -366,6 +366,14 @@ | |||
<activity android:name=".project.ui.activity.order.CancelOrderStep2Activity" | |||
android:launchMode="singleTop" | |||
android:screenOrientation="portrait"/> | |||
<!--申请退货第一步--> | |||
<activity android:name=".project.ui.activity.order.ApplyReturnGoodsStep1Activity" | |||
android:launchMode="singleTop" | |||
android:screenOrientation="portrait"/> | |||
<!--申请退货第二步--> | |||
<activity android:name=".project.ui.activity.order.ApplyReturnGoodsStep2Activity" | |||
android:launchMode="singleTop" | |||
android:screenOrientation="portrait"/> | |||
</application> | |||
</manifest> |
@@ -30,6 +30,7 @@ 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.utils.FunHelper; | |||
import com.huntersun.vkyes.etcopencard.src.action.StatusAction; | |||
@@ -182,7 +183,10 @@ public class HomeListInfo extends AppActivity implements StatusAction { | |||
//jumpToPage(ApplyExGoodsStep1Activity.class,bundle); | |||
//取消订单 | |||
jumpToPage(CancelOrderStep1Activity.class,bundle); | |||
//jumpToPage(CancelOrderStep1Activity.class,bundle); | |||
//申请退货 | |||
jumpToPage(ApplyReturnGoodsStep1Activity.class,bundle); | |||
} | |||
}); | |||
//下一步按钮 |
@@ -0,0 +1,158 @@ | |||
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.ActivityApplyReturnGoodsStep1Binding; | |||
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.ResultBean; | |||
import com.huntersun.vkyes.etcopencard.project.dialog.DotListDialog; | |||
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.app.AppActivity; | |||
import com.jeremyliao.liveeventbus.LiveEventBus; | |||
import java.util.HashMap; | |||
import java.util.Map; | |||
/** | |||
* Date :2023-03-14 | |||
* Description:申请退货activity | |||
*/ | |||
public class ApplyReturnGoodsStep1Activity extends AppActivity { | |||
private ActivityApplyReturnGoodsStep1Binding binding; | |||
private String id; //订单id | |||
private String orderId;//订单编号 | |||
private String vehiclePlate; //订单车牌 | |||
private String amount; //订单金额 | |||
private String orderStep; //订单状态 | |||
private DotBean curDotBean; //当前选择的退货网点 | |||
@Override | |||
protected View getLayoutView() { | |||
binding = ActivityApplyReturnGoodsStep1Binding.inflate(getLayoutInflater()); | |||
return binding.getRoot(); | |||
} | |||
@Override | |||
protected void initView() { | |||
getParams(); | |||
setDataToView(); | |||
binding.btnApply.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
checkParams(); | |||
} | |||
}); | |||
binding.LLOutlet.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
showChooseDotDialog(); | |||
} | |||
}); | |||
} | |||
/* | |||
* 获取参数 | |||
*/ | |||
private void getParams(){ | |||
id = getIntent().getStringExtra("id"); | |||
orderId = getIntent().getStringExtra("orderId"); | |||
vehiclePlate = getIntent().getStringExtra("vehiclePlate"); | |||
amount = getIntent().getStringExtra("amount"); | |||
orderStep = getIntent().getStringExtra("orderStep"); | |||
} | |||
/* | |||
* 设置界面数据 | |||
*/ | |||
private void setDataToView(){ | |||
binding.tvOrderId.setText(orderId); | |||
binding.tvVehiclePlate.setText(vehiclePlate); | |||
binding.tvAmount.setText("¥ " + (Integer.parseInt(amount) * 0.01)); | |||
binding.tvOrderStep.setText(FunHelper.getOrderStatusName(Integer.parseInt(orderStep))); | |||
} | |||
/* | |||
* 显示选择网点弹窗 | |||
*/ | |||
private void showChooseDotDialog(){ | |||
new DotListDialog.Builder(getActivity(), new DotListDialog.ResultItem() { | |||
@Override | |||
public void success(DotBean item) { | |||
curDotBean = item; | |||
binding.tvDot.setText(item.name); | |||
} | |||
}).setBottom().show(); | |||
} | |||
/* | |||
* 提交参数校验 | |||
*/ | |||
private void checkParams(){ | |||
if (curDotBean == null || FunHelper.isEmpty(curDotBean.servicehallId)){ | |||
toast("请选择退货网点"); | |||
return; | |||
} | |||
if (FunHelper.isEmpty(FunHelper.getText(binding.etReason))){ | |||
toast("请输入退货原因"); | |||
return; | |||
} | |||
if (FunHelper.isEmpty(id)){ | |||
toast("订单id为空,请返回重试"); | |||
return; | |||
} | |||
new Utils().showMessDialog(getActivity(), "是否确认发起退货?", dialog -> { | |||
doExGoods(); | |||
}); | |||
} | |||
/* | |||
* 执行换货 | |||
*/ | |||
private void doExGoods(){ | |||
showDialog("退货申请中..."); | |||
Map<String, String> params = new HashMap<>(); | |||
params.put("id", id); | |||
params.put("returnMode", "OFFLINE"); | |||
params.put("returnNetworkId", curDotBean.servicehallId); | |||
params.put("returnNetworkName", curDotBean.name); | |||
params.put("returnReason", FunHelper.getText(binding.etReason)); | |||
params.put("opId", (String) MyShared.getInstance().get(MyShared.OPENID,"")); | |||
MyRetrofit.newInstance(IFCode.IFCODE165, params, new MyRetrofit.ReturnResult() { | |||
@Override | |||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||
hideDialog(); | |||
LiveEventBus.get("homeOneUpdateData").post(""); | |||
Bundle bundle = new Bundle(); | |||
bundle.putString("id",id); | |||
jumpToPage(ApplyReturnGoodsStep2Activity.class,bundle); | |||
finish(); | |||
} | |||
@Override | |||
public void onError() { | |||
MyRetrofit.ReturnResult.super.onError(); | |||
hideDialog(); | |||
} | |||
}); | |||
} | |||
@Override | |||
protected void initData() { | |||
} | |||
} |
@@ -0,0 +1,46 @@ | |||
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; | |||
/** | |||
* Date :2023-03-14 | |||
* Description:申请退货activity | |||
*/ | |||
public class ApplyReturnGoodsStep2Activity extends AppActivity { | |||
private ActivityApplyReturnGoodsStep2Binding binding; | |||
//订单id | |||
private String id; | |||
@Override | |||
protected View getLayoutView() { | |||
binding = ActivityApplyReturnGoodsStep2Binding.inflate(getLayoutInflater()); | |||
return binding.getRoot(); | |||
} | |||
@Override | |||
protected void initView() { | |||
id = getIntent().getStringExtra("id"); | |||
binding.btnCheckOrder.setOnClickListener(new View.OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
Bundle bundle = new Bundle(); | |||
bundle.putString("id", id); | |||
jumpToPage(HomeListInfo.class,bundle); | |||
finish(); | |||
} | |||
}); | |||
} | |||
@Override | |||
protected void initData() { | |||
} | |||
} |
@@ -0,0 +1,233 @@ | |||
<?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:background="@color/background_color" | |||
android:layout_height="match_parent"> | |||
<com.hjq.bar.TitleBar | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:background="@color/transparent" | |||
app:leftIcon="@mipmap/back_black" | |||
android:id="@+id/title" | |||
app:lineVisible="false" | |||
app:title="申请退货" | |||
app:titleColor="@color/black" /> | |||
<com.huntersun.vkyes.etcopencard.src.widget.StatusLayout | |||
android:id="@+id/hl_status_hint" | |||
android:layout_width="match_parent" | |||
android:layout_below="@+id/title" | |||
android:layout_height="match_parent"> | |||
<LinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="match_parent" | |||
android:padding="@dimen/dp_15" | |||
android:orientation="vertical"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="订单详情" | |||
style="@style/blackTextStyleBold16"/> | |||
<com.ruffian.library.widget.RLinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
app:corner_radius="@dimen/dp_10" | |||
app:background_normal="@color/white" | |||
android:paddingLeft="@dimen/dp_15" | |||
android:paddingTop="@dimen/dp_15" | |||
android:paddingBottom="@dimen/dp_15" | |||
android:paddingRight="@dimen/dp_20" | |||
android:orientation="vertical" | |||
android:layout_marginTop="@dimen/dp_12"> | |||
<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/tvOrderId" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
/> | |||
</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/tvVehiclePlate" | |||
style="@style/blackTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
/> | |||
</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/tvAmount" | |||
style="@style/greenTextStyle14" | |||
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/tvOrderStep" | |||
style="@style/redTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="" /> | |||
</LinearLayout> | |||
</com.ruffian.library.widget.RLinearLayout> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:text="退货填写" | |||
style="@style/blackTextStyleBold16"/> | |||
<com.ruffian.library.widget.RLinearLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
app:corner_radius="@dimen/dp_10" | |||
app:background_normal="@color/white" | |||
android:paddingLeft="@dimen/dp_15" | |||
android:paddingBottom="@dimen/dp_15" | |||
android:paddingRight="@dimen/dp_20" | |||
android:orientation="vertical" | |||
android:layout_marginTop="@dimen/dp_12"> | |||
<LinearLayout | |||
android:id="@+id/LLOutlet" | |||
style="@style/MatchWrap" | |||
android:paddingTop="@dimen/dp_15" | |||
android:paddingBottom="@dimen/dp_15" | |||
android:gravity="center_vertical" | |||
android:orientation="horizontal"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
style="@style/redStar"/> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="退货网点" /> | |||
<TextView | |||
android:id="@+id/tvDot" | |||
style="@style/grayTextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_weight="1" | |||
android:gravity="center" | |||
android:textColorHint="@color/text98" | |||
android:textColor="@color/color_333333" | |||
android:layout_height="wrap_content" | |||
android:hint="请选择" /> | |||
<ImageView | |||
android:layout_width="@dimen/dp_15" | |||
android:layout_height="@dimen/dp_15" | |||
android:scaleType="centerCrop" | |||
android:src="@mipmap/the_right"/> | |||
</LinearLayout> | |||
<View | |||
android:layout_width="match_parent" | |||
android:layout_height="0.5dp" | |||
android:background="@color/gray01"/> | |||
<RelativeLayout | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_15" | |||
android:orientation="horizontal"> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:id="@+id/red_star" | |||
style="@style/redStar"/> | |||
<TextView | |||
style="@style/black02TextStyle14" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:id="@+id/tv_hhyy_title" | |||
android:layout_toRightOf="@+id/red_star" | |||
android:layout_weight="1" | |||
android:text="退货原因" /> | |||
<EditText | |||
android:id="@+id/etReason" | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:background="@color/white" | |||
android:layout_below="@+id/tv_hhyy_title" | |||
android:paddingTop="@dimen/dp_15" | |||
android:paddingLeft="@dimen/dp_7" | |||
android:gravity="left" | |||
android:maxLength="50" | |||
android:hint="请输入退货原因,限制50字以内" | |||
android:textColorHint="@color/text98" | |||
android:minHeight="@dimen/dp_100" | |||
style="@style/black02TextStyle14"/> | |||
</RelativeLayout> | |||
</com.ruffian.library.widget.RLinearLayout> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:text="请核对实收物与上述货物编号是否一致" | |||
android:drawableLeft="@mipmap/tips" | |||
android:layout_marginTop="@dimen/dp_12" | |||
android:drawablePadding="@dimen/dp_10" | |||
android:visibility="gone" | |||
style="@style/orangeTextStyle10"/> | |||
</LinearLayout> | |||
</com.huntersun.vkyes.etcopencard.src.widget.StatusLayout> | |||
<Button | |||
android:id="@+id/btnApply" | |||
style="@style/BtnShortStyle" | |||
android:layout_width="@dimen/dp_150" | |||
android:layout_height="@dimen/dp_40" | |||
android:layout_gravity="center" | |||
android:layout_marginTop="@dimen/dp_200" | |||
android:text="申请退货" | |||
android:textSize="@dimen/sp_14" | |||
android:layout_marginBottom="@dimen/dp_37" | |||
android:layout_alignParentBottom="true" | |||
android:layout_centerHorizontal="true"/> | |||
</RelativeLayout> |
@@ -0,0 +1,42 @@ | |||
<?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" | |||
android:layout_width="match_parent" | |||
android:orientation="vertical" | |||
android:gravity="center_horizontal" | |||
android:background="@color/background_color" | |||
android:layout_height="match_parent"> | |||
<com.hjq.bar.TitleBar | |||
android:layout_width="match_parent" | |||
android:layout_height="wrap_content" | |||
android:background="@color/transparent" | |||
app:leftIcon="@mipmap/back_black" | |||
android:id="@+id/title" | |||
app:lineVisible="false" | |||
app:title="申请退货" | |||
app:titleColor="@color/black" /> | |||
<ImageView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
android:layout_marginTop="@dimen/dp_48" | |||
android:scaleType="centerCrop" | |||
android:src="@mipmap/icon_return_success"/> | |||
<TextView | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content" | |||
style="@style/blackTextStyleBold17" | |||
android:layout_marginTop="@dimen/dp_21" | |||
android:text="申请成功"/> | |||
<Button | |||
android:id="@+id/btnCheckOrder" | |||
style="@style/BtnShortStyle" | |||
android:layout_width="@dimen/dp_150" | |||
android:layout_height="@dimen/dp_40" | |||
android:layout_gravity="center" | |||
android:layout_marginTop="@dimen/dp_70" | |||
android:text="查看订单" | |||
android:textSize="@dimen/sp_14" | |||
android:layout_marginBottom="@dimen/dp_37" | |||
android:layout_alignParentBottom="true" | |||
android:layout_centerHorizontal="true"/> | |||
</LinearLayout> |