浏览代码

快递柜改造
1.投递员投递流程更改

zyh 2 年之前
父节点
当前提交
c07e30bae1

+ 6 - 1
app/src/main/java/com/emato/ich/fragment/ChooseCabinetFragment.java

@@ -328,7 +328,12 @@ public class ChooseCabinetFragment extends Fragment {
                 if(!StringUtils.isNullOrEmpty(pageType) && "expressDelivery".equals(pageType)){
                     NavUtils.navigate(this, R.id.action_chooseCabinetFragment_to_expressDeliveryFragment, bundle);
                 }else {
-                    NavUtils.navigate(this, R.id.action_chooseCabinetFragment_to_InputInfoKeyBoardFragment, bundle);
+                    String isPay = activity.getBundleMap().get(SendKeyBoardFragment.class.getName()).getString("isPay");
+                    if ("0".equals(isPay)){
+                        NavUtils.navigate(this, R.id.action_chooseCabinetFragment_to_paymentFragment);
+                    }else {
+                        NavUtils.navigate(this, R.id.action_chooseCabinetFragment_to_InputInfoKeyBoardFragment, bundle);
+                    }
                 }
 
             }

+ 1 - 1
app/src/main/java/com/emato/ich/fragment/PaymentFragment.java

@@ -134,7 +134,7 @@ public class PaymentFragment extends Fragment {
                                     try {
                                         ResponseData responseData = JacksonUtils.objectmapper.readValue(parseResponse, ResponseData.class);
                                         if (null != responseData && ICSPConstant.OK.equals(responseData.getCode())) {
-                                            NavUtils.navigate(PaymentFragment.this, R.id.action_paymentFragment_to_sendMainFragment);
+                                            NavUtils.navigate(PaymentFragment.this, R.id.action_paymentFragment_to_InputInfoKeyBoardFragment);
                                         } else {
                                             ToastUtils.make(getContext(), responseData.getMsg());
                                         }

+ 9 - 5
app/src/main/java/com/emato/ich/fragment/SendKeyBoardFragment.java

@@ -282,11 +282,15 @@ public class SendKeyBoardFragment extends Fragment {
                                             timer.cancel();
                                         }
                                         if ("store".equals(finalLoginType) || "courier".equals(finalLoginType)){
-                                            if ("0".equals(data.getIsPay())){
-                                                NavUtils.navigate(SendKeyBoardFragment.this, R.id.action_sendFragment_to_paymentFragment);
-                                            }else {
-                                                NavUtils.navigate(SendKeyBoardFragment.this, R.id.action_sendFragment_to_sendMainFragment);
-                                            }
+                                            Bundle isPayBundle = new Bundle();
+                                            isPayBundle.putString("isPay",data.getIsPay());
+                                            activity.getBundleMap().put(SendKeyBoardFragment.class.getName(), isPayBundle);
+                                            NavUtils.navigate(SendKeyBoardFragment.this, R.id.action_sendFragment_to_sendMainFragment);
+//                                            if ("0".equals(data.getIsPay())){
+//                                                NavUtils.navigate(SendKeyBoardFragment.this, R.id.action_sendFragment_to_paymentFragment);
+//                                            }else {
+//                                                NavUtils.navigate(SendKeyBoardFragment.this, R.id.action_sendFragment_to_sendMainFragment);
+//                                            }
                                         }else{
                                             NavUtils.navigate(SendKeyBoardFragment.this, R.id.action_sendFragment_to_collectMaterialsFragment);
                                         }

+ 12 - 3
app/src/main/res/navigation/nav_graph.xml

@@ -42,9 +42,9 @@
             android:id="@+id/action_sendFragment_to_sendMainFragment"
             app:destination="@id/SendMainFragment" />
 
-        <action
-            android:id="@+id/action_sendFragment_to_paymentFragment"
-            app:destination="@id/PaymentFragment" />
+<!--        <action-->
+<!--            android:id="@+id/action_sendFragment_to_paymentFragment"-->
+<!--            app:destination="@id/PaymentFragment" />-->
 
         <action
             android:id="@+id/action_sendFragment_to_collectMaterialsFragment"
@@ -188,6 +188,10 @@
         <action
             android:id="@+id/action_paymentFragment_to_sendMainFragment"
             app:destination="@id/SendMainFragment"/>
+
+        <action
+            android:id="@+id/action_paymentFragment_to_InputInfoKeyBoardFragment"
+            app:destination="@id/InputInfoKeyBoardFragment"/>
     </fragment>
     <!--  选择投递还是异常处理  -->
     <fragment
@@ -220,6 +224,11 @@
         <action
             android:id="@+id/action_chooseCabinetFragment_to_InputInfoKeyBoardFragment"
             app:destination="@id/InputInfoKeyBoardFragment"/>
+
+        <action
+            android:id="@+id/action_chooseCabinetFragment_to_paymentFragment"
+            app:destination="@id/PaymentFragment"/>
+
         <action
             android:id="@+id/action_chooseCabinetFragment_to_sendInfoConfirmFragment"
             app:destination="@id/SendInfoConfirmFragment"/>