Przeglądaj źródła

Merge branch 'cabinet_req_2023_05_04' of zyh/ich-android into cabinet_req_2023_05_04

张永豪 1 rok temu
rodzic
commit
45b36338b1

+ 12 - 0
app/src/main/java/com/emato/ich/entity/vo/ResponseTokenVo.java

@@ -2,6 +2,8 @@ package com.emato.ich.entity.vo;
 
 import org.jetbrains.annotations.NotNull;
 
+import java.math.BigDecimal;
+
 /**
  * 响应的token
  */
@@ -14,6 +16,8 @@ public class ResponseTokenVo {
 
     //是否需要付款:0:需要,1:不需要
     private String isPay;
+    // 需要付款的金额
+    private BigDecimal payAmount;
 
     public String getIsPay() {
         return isPay;
@@ -39,6 +43,14 @@ public class ResponseTokenVo {
         this.delType = delType;
     }
 
+    public BigDecimal getPayAmount() {
+        return payAmount;
+    }
+
+    public void setPayAmount(BigDecimal payAmount) {
+        this.payAmount = payAmount;
+    }
+
     @NotNull
     @Override
     public String toString() {

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

@@ -83,6 +83,8 @@ public class PaymentFragment extends Fragment {
             MainActivity activity = (MainActivity) getActivity();
             timer = TimeOutUtils.timeout(activity, PaymentFragment.this, binding.timeout, 90);
             timer.start();
+            String payAmount = activity.getBundleMap().get(SendKeyBoardFragment.class.getName()).getString("payAmount");
+            binding.paymentMoney.setText(payAmount);
         } catch (Exception e) {
             Log.e(TAG, "onViewCreated: 倒计时出现异常! ", e);
             LoggingUtils.sendErrorLog("业务异常: 输入投递信息页面倒计时出现异常! ", e);

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

@@ -289,6 +289,7 @@ public class SendKeyBoardFragment extends Fragment {
                                         if ("store".equals(finalLoginType) || "courier".equals(finalLoginType)){
                                             Bundle isPayBundle = new Bundle();
                                             isPayBundle.putString("isPay",data.getIsPay());
+                                            isPayBundle.putString("payAmount",data.getPayAmount().toString());
                                             activity.getBundleMap().put(SendKeyBoardFragment.class.getName(), isPayBundle);
                                             // "30"为供应链账号,定为管理员账号
                                             if("store".equals(finalLoginType) ){

BIN
app/src/main/res/drawable/pay.png


+ 71 - 50
app/src/main/res/layout/fragment_payment.xml

@@ -5,67 +5,88 @@
     android:focusable="true"
     android:focusableInTouchMode="true">
 
-    <!-- 引入键盘页面 -->
-    <include
-        android:id="@+id/key_board"
-        layout="@layout/fragment_my_key_board"/>
+    <TextView
+        android:id="@+id/timeout"
+        android:layout_width="50dp"
+        android:layout_height="50dp"
+        android:layout_x="271dp"
+        android:layout_y="35dp"
+        android:gravity="center"
+        android:textSize="22dp"
+        android:textStyle="bold" />
 
+    <TextView
+        android:id="@+id/take_text_title"
+        android:layout_width="120dp"
+        android:layout_height="40dp"
+        android:layout_x="122dp"
+        android:layout_y="40dp"
+        android:gravity="center"
+        android:text="@string/pay_title"
+        android:textColor="@color/black"
+        android:textSize="16dp" />
+
+    <TextView
+        android:id="@+id/return_btn"
+        android:layout_width="80dp"
+        android:layout_height="30dp"
+        android:layout_x="10dp"
+        android:layout_y="44dp"
+        android:background="@drawable/back_btn" />
+
+    <TextView
+        android:id="@+id/pay_text"
+        android:layout_width="100dp"
+        android:layout_height="25dp"
+        android:layout_x="100dp"
+        android:layout_y="100dp"
+        android:gravity="center_horizontal"
+        android:text="@string/pay_text"
+        android:textSize="16dp"
+        android:textColor="@color/edt_text_color"/>
+
+    <TextView
+        android:id="@+id/payment_money"
+        android:layout_width="100dp"
+        android:layout_height="25dp"
+        android:layout_x="190dp"
+        android:layout_y="100dp"
+        android:gravity="center_horizontal"
+        android:textSize="16dp"
+        android:textColor="@color/edt_text_color"/>
+
+    <TextView
+        android:id="@+id/pay_prompt"
+        android:layout_width="200dp"
+        android:layout_height="30dp"
+        android:layout_x="80dp"
+        android:layout_y="140dp"
+        android:gravity="center_horizontal"
+        android:text="@string/pay_prompt"
+        android:textSize="10dp" />
+
+    <!-- 引入键盘页面 -->
     <EditText
         android:id="@+id/payment_no"
         android:layout_width="245dp"
         android:layout_height="50dp"
-        android:layout_x="55dp"
-        android:layout_y="290dp"
+        android:layout_x="56dp"
+        android:layout_y="164dp"
         android:ems="10"
         android:hint="@string/input_payment_number"
         android:inputType="none"
         android:longClickable="false"
         android:textSize="10dp" />
 
-<!--    <EditText
-        android:id="@+id/deliverer_phone_confirm"
-        android:layout_width="145dp"
-        android:layout_height="50dp"
-        android:layout_x="181dp"
-        android:layout_y="290dp"
-        android:ems="10"
-        android:hint="@string/input_recipients_phone"
-        android:inputType="phone"
-        android:longClickable="false"
-        android:textSize="10dp" />-->
-
-
-
-    <!--  返回按钮  -->
-    <TextView
-        android:id="@+id/return_btn"
-        android:layout_width="80dp"
-        android:layout_height="29dp"
-        android:layout_x="29dp"
-        android:layout_y="529dp"
-        android:background="@drawable/return1" />
-
-    <!-- 倒计时 -->
     <TextView
-        android:id="@+id/timeout"
-        android:layout_width="55dp"
-        android:layout_height="55dp"
-        android:layout_x="276dp"
-        android:layout_y="518dp"
-        android:gravity="center"
-        android:textSize="30dp"
-        android:textStyle="bold" />
-
-    <!--    <EditText-->
-<!--        android:id="@+id/deliverer_phone"-->
-<!--        android:layout_width="150dp"-->
-<!--        android:layout_height="50dp"-->
-<!--        android:layout_x="10dp"-->
-<!--        android:layout_y="405dp"-->
-<!--        android:longClickable="false"-->
-<!--        android:textSize="10dp"-->
-<!--        android:ems="10"-->
-<!--        android:hint="@string/input_recipients_phone_confirm"-->
-<!--        android:inputType="phone" />-->
+        android:id="@+id/success"
+        android:layout_width="100dp"
+        android:layout_height="120dp"
+        android:layout_x="130dp"
+        android:layout_y="212dp"
+        android:background="@drawable/pay" />
 
+    <include
+        android:id="@+id/key_board"
+        layout="@layout/fragment_my_key_board"/>
 </AbsoluteLayout>