Browse Source

2024-04-23 修改

修改:

1. 签证费用录入,优化判断,调整签证列表UI
zhaiy 1 year ago
parent
commit
f55972467a

+ 7 - 6
app/src/main/java/com/pan_american/android/ui/group_visa/visa_payment_insert/AddVisaPaymentActivity.kt

@@ -506,9 +506,7 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
                 return@setOnClickListener
             }
 
-            if (binding.visaHandleNumber.text.isBlank() || binding.visaHandleNumber.text.toString()
-                    .toInt() == 0
-            ) {
+            if (binding.visaHandleNumber.text.isBlank()) {
                 showMessage(resources.getString(R.string.visa_handle_number_input_hint))
                 return@setOnClickListener
             } else {
@@ -516,9 +514,7 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
                     binding.visaHandleNumber.text.toString().toInt()
             }
 
-            if (binding.visaExemptionNumber.text.isBlank() || binding.visaExemptionNumber.text.toString()
-                    .toInt() == 0
-            ) {
+            if (binding.visaExemptionNumber.text.isBlank()) {
                 showMessage(resources.getString(R.string.visa_exemption_number_input_hint))
                 return@setOnClickListener
             } else {
@@ -526,6 +522,11 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
                     binding.visaExemptionNumber.text.toString().toInt()
             }
 
+            if (binding.visaHandleNumber.text.toString().toInt() + binding.visaExemptionNumber.text.toString().toInt() != customerSelectList.size) {
+                showMessage(resources.getString(R.string.customer_number_input_hint))
+                return@setOnClickListener
+            }
+
             if (binding.notes.getText().isNotBlank()) {
                 updateVisaPaymentRequest.remark = binding.notes.getText()
             }

+ 0 - 1
app/src/main/java/com/pan_american/android/ui/group_visa/visa_payment_insert/VisaPaymentListFragment.kt

@@ -232,7 +232,6 @@ class VisaPaymentListFragment : BaseFragment<FragmentVisaPaymentListBinding>() {
                 itemView.findViewById<TextView>(R.id.visa_number).text = data.visaNumber.toString()
                 itemView.findViewById<TextView>(R.id.visa_free_number).text =
                     data.visaFreeNumber.toString()
-                itemView.findViewById<TextView>(R.id.create_time).text = data.createTime
 
                 when (data.isThird) {
                     0 -> {

+ 1 - 34
app/src/main/res/layout/item_visa_payment.xml

@@ -185,6 +185,7 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="@dimen/common_padding"
+            android:layout_marginBottom="@dimen/common_padding_huge"
             android:orientation="horizontal">
 
             <TextView
@@ -206,40 +207,6 @@
 
         </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"
-            android:layout_marginTop="@dimen/common_padding"
-            android:layout_marginBottom="@dimen/common_padding_huge"
-            android:orientation="horizontal">
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center"
-                android:text="@string/create_time"
-                android:textSize="@dimen/text_size_medium" />
-
-            <TextView
-                android:id="@+id/create_time"
-                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:singleLine="true"
-                android:textSize="@dimen/text_size_medium" />
-
-        </LinearLayout>
-
     </LinearLayout>
 
 </LinearLayout>

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

@@ -633,6 +633,7 @@
     <string name="customer_type_select_hint">请选择客户类型</string>
     <string name="visa_handle_number_input_hint">请输入正确的签证办理人数</string>
     <string name="visa_exemption_number_input_hint">请输入正确的免签人数</string>
+    <string name="customer_number_input_hint">请输入正确的人数</string>
 
     <!-- 酒店费用录入 -->
     <string name="hotel_payment_list">酒店费用列表</string>