Browse Source

2024-05-16 修改

修改

1. 地接费用详情列表,添加 费用名称 字段
zhaiy 11 months ago
parent
commit
bf1c0e644c

+ 7 - 1
app/src/main/java/com/pan_american/android/data/model/group_op/ground_convey_payment_insert/adapter/GroundConveyListAdapter.kt

@@ -20,6 +20,7 @@ class GroundConveyListAdapter(private val groundConveyList: ArrayList<GroundConv
 
     inner class ViewHolder(view: View): RecyclerView.ViewHolder(view) {
         val groundConveyArea: TextView = view.findViewById(R.id.group_convey_area)
+        val paymentName: TextView = view.findViewById(R.id.payment_name)
         val servicePrice: TextView = view.findViewById(R.id.service_price)
         val thisTimePayment: TextView = view.findViewById(R.id.this_time_payment)
         val balancePayment: TextView = view.findViewById(R.id.balance_payment)
@@ -58,12 +59,17 @@ class GroundConveyListAdapter(private val groundConveyList: ArrayList<GroundConv
         groundConveyList[position].apply {
 
             holder.groundConveyArea.text = area
+            holder.paymentName.text = priceName.ifBlank {
+                "暂无"
+            }
             holder.servicePrice.text = String.format("%.2f (%s)", payMoney, currencyStr)
             holder.thisTimePayment.text = String.format("%.2f (%s)", payThenMoney, currencyStr)
             holder.balancePayment.text = String.format("%.2f (%s)", remainingBalance, currencyStr)
             holder.serviceDuringTime.text = String.format("%s - %s", serviceStartTime, serviceEndTime)
 
-            holder.priceType.text = priceTypeStr
+            holder.priceType.text = priceTypeStr.ifBlank {
+                "暂无"
+            }
 
             when(isAuditGM) {
                 0 -> {

+ 2 - 0
app/src/main/java/com/pan_american/android/data/model/group_op/ground_convey_payment_insert/entity/GroundConveyListItem.kt

@@ -13,4 +13,6 @@ class GroundConveyListItem {
     var currencyStr = ""
 
     var priceTypeStr = ""
+
+    var priceName = ""
 }

+ 33 - 0
app/src/main/res/layout/item_ground_convey_info.xml

@@ -50,6 +50,39 @@
             android:layout_marginBottom="@dimen/common_padding"
             android:background="@color/line_color" />
 
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="@dimen/common_padding"
+            android:baselineAligned="false"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:text="@string/payment_name"
+                android:textSize="@dimen/text_size_medium" />
+
+            <TextView
+                android:id="@+id/payment_name"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="@dimen/common_padding"
+                android:background="@color/white"
+                android:gravity="end"
+                android:singleLine="true"
+                android:textSize="@dimen/text_size_medium" />
+
+        </LinearLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/line"
+            android:layout_marginTop="@dimen/common_padding_huge"
+            android:layout_marginBottom="@dimen/common_padding"
+            android:background="@color/line_color" />
+
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"