Browse Source

2024-05-09 修改

修改

1. OP费用录入界面,增加 “费用名称项”
zhaiy 11 months ago
parent
commit
6cead3b507

+ 3 - 0
app/src/main/java/com/pan_american/android/data/model/group_op/ground_convey_payment_insert/network/UpdateGroundConveyRequest.kt

@@ -23,4 +23,7 @@ class UpdateGroundConveyRequest {
 
     //2024-04-29 新增OP费用录入 款项类型
     var priceType = 0
+
+    //2024-05-09 新增OP费用录入 费用名称
+    var priceName = ""
 }

+ 11 - 0
app/src/main/java/com/pan_american/android/ui/group_op/ground_convey_payment_insert/AddGroundConveyInfoActivity.kt

@@ -352,6 +352,14 @@ class AddGroundConveyInfoActivity : BaseActivity<ActivityAddGroupOpPaymentBindin
             updateGroundConveyRequest.id = paymentId
             updateGroundConveyRequest.diId = groupId
 
+            //2024-05-09 新增OP费用录入 费用名称
+            if (binding.paymentName.text.isNullOrBlank()) {
+                showMessage(resources.getString(R.string.payment_name_input_hint))
+                return@setOnClickListener
+            } else {
+                updateGroundConveyRequest.priceName = binding.paymentName.text.toString()
+            }
+
             if (areaId == -1) {
                 showMessage(resources.getString(R.string.area_select_hint))
                 return@setOnClickListener
@@ -490,6 +498,9 @@ class AddGroundConveyInfoActivity : BaseActivity<ActivityAddGroupOpPaymentBindin
 
                             updateGroundConveyRequest.apply {
 
+                                //2024-05-09 新增OP费用录入 费用名称
+                                binding.paymentName.setText(priceName)
+
                                 //匹配旧数据
                                 if (area.matches(regex)) {
                                     binding.area.text = area

+ 38 - 0
app/src/main/res/layout/activity_add_group_op_payment.xml

@@ -150,6 +150,44 @@
                     android:textSize="@dimen/text_size_medium" />
             </LinearLayout>
 
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/line"
+                android:layout_marginTop="@dimen/common_padding"
+                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:layout_marginBottom="@dimen/common_padding"
+                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" />
+
+                <EditText
+                    android:id="@+id/payment_name"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="@dimen/common_padding"
+                    android:layout_weight="1"
+                    android:background="@color/white"
+                    android:gravity="end"
+                    android:hint="@string/please_input"
+                    android:importantForAutofill="no"
+                    android:inputType="text"
+                    android:singleLine="true"
+                    android:textColor="@color/text_color"
+                    android:textColorHint="@color/hint_text_color"
+                    android:textSize="@dimen/text_size_medium" />
+            </LinearLayout>
+
             <View
                 android:layout_width="match_parent"
                 android:layout_height="@dimen/line"

+ 1 - 0
app/src/main/res/values/strings.xml

@@ -607,6 +607,7 @@
 
     <string name="payment_detail">详细费用</string>
 
+    <string name="payment_name_input_hint">请输入费用名称</string>
     <string name="area_select_hint">请选择地区</string>
     <string name="price_type_hint">请选择款项类型</string>
     <string name="start_time_select_hint">请选择起始时间</string>