瀏覽代碼

2024-04-25 修改

修改:

1. 签证费用录入,新增时默认选中所有人数

2. 保险费用录入,默认支付方式为扫码付款

3. 酒店费用录入,取消 预定号码 项

4. 签证费用录入 / 保险费用录入,收款方设置为非必填项

5. 工作台界面,根据员工性别展示不同用户头像,工作台用户信息UI调整
zhaiy 11 月之前
父節點
當前提交
5be16c157b

+ 3 - 0
app/src/main/java/com/pan_american/android/OASystem.kt

@@ -210,6 +210,9 @@ class OASystem : Application() {
         //机票费用
         const val C_TABLE_AIRPLANE_TICKET = 85
 
+        //支付方式-保险 ID
+        const val PAYMENT_WAY_INSURANCE_ID = 1057
+
         // 权限判别
         fun authorization(pageId: Int, operation: Int): Boolean {
             authData.forEach {

+ 1 - 1
app/src/main/java/com/pan_american/android/data/model/login/entity/UserInfo.kt

@@ -1,3 +1,3 @@
 package com.pan_american.android.data.model.login.entity
 
-data class UserInfo(val userId: Int, val cnName: String, val companyName: String, val depName: String, val jobName: String, val email: String)
+data class UserInfo(val userId: Int, val cnName: String, val companyName: String, val depName: String, val jobName: String, val email: String, val sex: Int)

+ 13 - 4
app/src/main/java/com/pan_american/android/ui/group_common/insurance_payment_insert/AddInsurancePaymentActivity.kt

@@ -144,6 +144,16 @@ class AddInsurancePaymentActivity : BaseActivity<ActivityAddInsurancePaymentBind
 
         } else {
             binding.commit.text = resources.getString(R.string.add)
+
+            //2024-04-25 保险费用录入默认支付方式为扫码支付
+
+            for (item in paymentWayList) {
+                if (item.id == OASystem.PAYMENT_WAY_INSURANCE_ID) {
+                    binding.paymentWay.text = item.name
+
+                    paymentWayId = item.id
+                }
+            }
         }
     }
 
@@ -562,10 +572,9 @@ class AddInsurancePaymentActivity : BaseActivity<ActivityAddInsurancePaymentBind
 
             updateInsurancePaymentRequest.paymentCurrency = currencyId
 
-            if (binding.payee.text.isBlank()) {
-                showMessage(resources.getString(R.string.payee_hint))
-                return@setOnClickListener
-            } else {
+            //2024-04-25 保险费用录入 收款方 为非必填项
+
+            if (binding.payee.text.isNotBlank()) {
                 updateInsurancePaymentRequest.payee = binding.payee.text.trim().toString()
             }
 

+ 0 - 10
app/src/main/java/com/pan_american/android/ui/group_hotel/hotel_predetermine/AddHotelPredetermineActivity.kt

@@ -220,7 +220,6 @@ class AddHotelPredetermineActivity : BaseActivity<ActivityAddHotelPredetermineBi
                     customerType.isEnabled = false
                     bankCard.isEnabled = false
                     predetermineWebsite.isEnabled = false
-                    predetermineCode.isEnabled = false
                     hotelConfirmCode.isEnabled = false
                     locatedCity.isEnabled = false
                     hotelName.isEnabled = false
@@ -1115,13 +1114,6 @@ class AddHotelPredetermineActivity : BaseActivity<ActivityAddHotelPredetermineBi
                 updateHotelPredetermine.reservationsWebsite = websiteId
             }
 
-            if (binding.predetermineCode.text.isNullOrBlank()) {
-                showMessage(resources.getString(R.string.predetermine_code_hint))
-                return@setOnClickListener
-            } else {
-                updateHotelPredetermine.reservationsNo = binding.predetermineCode.text.toString()
-            }
-
             if (binding.hotelConfirmCode.text.isNullOrBlank()) {
                 showMessage(resources.getString(R.string.hotel_confirm_code_hint))
                 return@setOnClickListener
@@ -1580,8 +1572,6 @@ class AddHotelPredetermineActivity : BaseActivity<ActivityAddHotelPredetermineBi
                                     }
                                 }
 
-                                binding.predetermineCode.setText(reservationsNo)
-
                                 binding.hotelConfirmCode.setText(determineNo)
 
                                 binding.locatedCity.setText(city)

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

@@ -166,6 +166,14 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
 
         } else {
             binding.commit.text = resources.getString(R.string.add)
+
+            //2024-4-25 新增时默认选中所有客户
+
+            initCustomerList()
+
+            binding.visaHandleNumber.setText(customerSelectList.size.toString())
+
+            binding.visaExemptionNumber.setText("0")
         }
     }
 
@@ -626,10 +634,9 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
                 }
             }
 
-            if (binding.payee.text.isBlank()) {
-                showMessage(resources.getString(R.string.payee_hint))
-                return@setOnClickListener
-            } else {
+            //2024-04-25 签证费用录入 收款方 为非必填项
+
+            if (binding.payee.text.isNotBlank()) {
                 updateVisaPaymentRequest.payee = binding.payee.text.trim().toString()
             }
 
@@ -707,6 +714,11 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
                         if (customerListResponse.code == 200) {
                             for (item in customerListResponse.data) {
                                 customerList.add(item)
+
+                                //2024-4-25 新增时默认选中所有客户
+                                if (!fromList) {
+                                    customerSelectList.add(item)
+                                }
                             }
 
                             getCurrencyByGroupId()

+ 12 - 0
app/src/main/java/com/pan_american/android/ui/workspace/WorkspaceFragment.kt

@@ -7,6 +7,7 @@ import android.view.View
 import android.view.View.OnClickListener
 import android.view.ViewGroup
 import com.pan_american.android.OASystem
+import com.pan_american.android.R
 import com.pan_american.android.base.BaseFragment
 import com.pan_american.android.databinding.FragmentWorkspaceBinding
 import com.pan_american.android.ui.efficiency_tools.address_book.AddressBookActivity
@@ -41,6 +42,17 @@ class WorkspaceFragment : BaseFragment<FragmentWorkspaceBinding>(), OnClickListe
     }
 
     override fun initViews() {
+
+        when (OASystem.userInfo.sex) {
+            0 -> {
+                binding.userIcon.setImageResource(R.mipmap.icon_user_male)
+            }
+
+            1 -> {
+                binding.userIcon.setImageResource(R.mipmap.icon_user_female)
+            }
+        }
+
         binding.userName.text = OASystem.userInfo.cnName
         binding.departmentName.text = OASystem.userInfo.depName
         binding.jobName.text = OASystem.userInfo.jobName

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

@@ -293,44 +293,6 @@
                     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/predetermine_code"
-                    android:textSize="@dimen/text_size_medium" />
-
-                <EditText
-                    android:id="@+id/predetermine_code"
-                    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"

+ 75 - 64
app/src/main/res/layout/fragment_workspace.xml

@@ -26,7 +26,7 @@
 
     </LinearLayout>
 
-    <RelativeLayout
+    <LinearLayout
         android:id="@+id/user_info"
         android:layout_width="match_parent"
         android:layout_height="80dp"
@@ -37,79 +37,90 @@
 
         <ImageView
             android:id="@+id/user_icon"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
+            android:layout_width="50dp"
+            android:layout_height="50dp"
             android:layout_marginStart="25dp"
-            android:layout_marginTop="@dimen/common_padding_large"
-            android:src="@mipmap/icon_user" />
+            android:layout_gravity="center_vertical"
+            android:src="@mipmap/icon_user"
+            tools:ignore="ContentDescription"/>
 
-        <TextView
-            android:id="@+id/user"
-            android:layout_width="wrap_content"
+        <LinearLayout
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginStart="@dimen/common_padding_large"
-            android:layout_marginTop="@dimen/common_padding_large"
-            android:layout_toEndOf="@id/user_icon"
-            android:text="@string/staff"
-            android:textColor="@color/text_color"
-            android:textSize="@dimen/text_size_small"
-            android:textStyle="bold" />
+            android:layout_marginStart="@dimen/common_padding"
+            android:layout_marginEnd="@dimen/common_padding"
+            android:orientation="vertical"
+            android:layout_gravity="center">
 
-        <TextView
-            android:id="@+id/user_name"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="@dimen/common_padding_large"
-            android:layout_toEndOf="@id/user"
-            android:textColor="@color/text_color"
-            android:textSize="@dimen/text_size_small" />
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal">
 
-        <TextView
-            android:id="@+id/department"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginStart="@dimen/common_padding_large"
-            android:layout_marginTop="@dimen/common_padding_large"
-            android:layout_toEndOf="@id/user_name"
-            android:text="@string/department"
-            android:textColor="@color/text_color"
-            android:textSize="@dimen/text_size_small"
-            android:textStyle="bold" />
+                <TextView
+                    android:id="@+id/user"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="@dimen/common_padding_large"
+                    android:text="@string/staff"
+                    android:textColor="@color/text_color"
+                    android:textSize="@dimen/text_size_small"
+                    android:textStyle="bold" />
+
+                <TextView
+                    android:id="@+id/user_name"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/text_color"
+                    android:textSize="@dimen/text_size_small" />
 
-        <TextView
-            android:id="@+id/department_name"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="@dimen/common_padding_large"
-            android:layout_toEndOf="@id/department"
-            android:textColor="@color/text_color"
-            android:textSize="@dimen/text_size_small" />
+                <TextView
+                    android:id="@+id/department"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="@dimen/common_padding_large"
+                    android:text="@string/department"
+                    android:textColor="@color/text_color"
+                    android:textSize="@dimen/text_size_small"
+                    android:textStyle="bold" />
+
+                <TextView
+                    android:id="@+id/department_name"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/text_color"
+                    android:textSize="@dimen/text_size_small" />
 
+            </LinearLayout>
 
-        <TextView
-            android:id="@+id/job"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_below="@+id/user"
-            android:layout_marginStart="@dimen/common_padding_large"
-            android:layout_marginTop="5dp"
-            android:layout_toEndOf="@id/user_icon"
-            android:text="@string/job"
-            android:textColor="@color/text_color"
-            android:textSize="@dimen/text_size_small"
-            android:textStyle="bold" />
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/common_padding"
+                android:orientation="horizontal">
 
-        <TextView
-            android:id="@+id/job_name"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_below="@+id/user"
-            android:layout_marginTop="5dp"
-            android:layout_toEndOf="@id/job"
-            android:textColor="@color/text_color"
-            android:textSize="@dimen/text_size_small" />
+                <TextView
+                    android:id="@+id/job"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="@dimen/common_padding_large"
+                    android:text="@string/job"
+                    android:textColor="@color/text_color"
+                    android:textSize="@dimen/text_size_small"
+                    android:textStyle="bold" />
+
+                <TextView
+                    android:id="@+id/job_name"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/text_color"
+                    android:textSize="@dimen/text_size_small" />
 
-    </RelativeLayout>
+            </LinearLayout>
+
+        </LinearLayout>
+
+    </LinearLayout>
 
     <ScrollView
         android:layout_width="match_parent"

二進制
app/src/main/res/mipmap-xxhdpi/icon_user_female.png


二進制
app/src/main/res/mipmap-xxhdpi/icon_user_male.png