Browse Source

2024-08-27 修改 / 新增

新增:
1. 提成确认 界面绘制

修改:
1. 部分逻辑修改
zhaiy 7 months ago
parent
commit
6463e8ca09

+ 4 - 3
app/src/main/AndroidManifest.xml

@@ -33,7 +33,8 @@
         tools:targetApi="31">
         <activity
             android:name=".ui.group_common.commission_confirm.CommissionConfirmActivity"
-            android:exported="false" />
+            android:exported="false"
+            android:launchMode="singleTop"/>
         <activity
             android:name=".ui.picture_preview.PicturePreviewActivity"
             android:exported="false"
@@ -83,11 +84,11 @@
             android:exported="false"
             android:launchMode="singleTop" />
         <activity
-            android:name=".ui.group_common.insurance_payment_insert.AddInsurancePaymentActivity"
+            android:name=".ui.group_visa.insurance_payment_insert.AddInsurancePaymentActivity"
             android:exported="false"
             android:launchMode="singleTop" />
         <activity
-            android:name=".ui.group_common.insurance_payment_insert.InsurancePaymentInsertActivity"
+            android:name=".ui.group_visa.insurance_payment_insert.InsurancePaymentInsertActivity"
             android:exported="false"
             android:launchMode="singleTop" />
         <activity

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

@@ -259,6 +259,9 @@ class OASystem : Application() {
         //票据管理
         const val BILL_MANAGEMENT = 185
 
+        //提成确认
+        const val COMMISSION_CONFIRM = 188
+
         //CTableId
         //酒店预定
         const val C_TABLE_HOTEL_PREDETERMINE = 76

+ 57 - 0
app/src/main/java/com/pan_american/android/ui/group_common/commission_confirm/CommissionConfirmActivity.kt

@@ -0,0 +1,57 @@
+package com.pan_american.android.ui.group_common.commission_confirm
+
+import android.os.Bundle
+import android.view.View
+import com.pan_american.android.OASystem
+import com.pan_american.android.R
+import com.pan_american.android.base.BaseActivity
+import com.pan_american.android.databinding.ActivityCommissionConfirmBinding
+
+class CommissionConfirmActivity : BaseActivity<ActivityCommissionConfirmBinding>() {
+
+    override fun getViewBinding() = ActivityCommissionConfirmBinding.inflate(layoutInflater)
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+
+        initViews()
+        initEvents()
+    }
+
+    override fun initViews() {
+
+        binding.companyName.text = OASystem.userInfo.companyName
+        binding.department.text = OASystem.userInfo.depName
+        binding.staff.text = OASystem.userInfo.cnName
+        binding.commit.setText(resources.getString(R.string.search))
+
+
+    }
+
+    override fun initEvents() {
+
+        binding.filterSwitch.setOnClickListener {
+            binding.commissionFilter.apply {
+                if (binding.commissionFilter.visibility == View.VISIBLE) {
+                    visibility = View.GONE
+                    binding.filterSwitch.text = resources.getString(R.string.show)
+                } else {
+                    visibility = View.VISIBLE
+                    binding.filterSwitch.text = resources.getString(R.string.hide)
+                }
+            }
+        }
+
+        binding.startTime.setOnClickListener {
+            showDatePicker(resources.getString(R.string.start_time_select_hint), binding.startTime) {}
+        }
+
+        binding.endTime.setOnClickListener {
+            showDatePicker(resources.getString(R.string.end_time_select_hint), binding.endTime) {}
+        }
+
+        binding.commit.setOnClickListener {
+
+        }
+    }
+}

+ 1 - 1
app/src/main/java/com/pan_american/android/ui/group_simple_info/GroupSimpleInfoFragment.kt

@@ -19,7 +19,7 @@ import com.pan_american.android.data.network.APIService
 import com.pan_american.android.data.network.ServiceCreator
 import com.pan_american.android.databinding.FragmentSimpleGroupBinding
 import com.pan_american.android.ui.group_airplane_ticket.airplane_payment_insert.AirplaneTicketListFragment
-import com.pan_american.android.ui.group_common.insurance_payment_insert.InsuranceListFragment
+import com.pan_american.android.ui.group_visa.insurance_payment_insert.InsuranceListFragment
 import com.pan_american.android.ui.group_hotel.hotel_predetermine.HotelPredetermineListFragment
 import com.pan_american.android.ui.group_invite_official.invite_official_payment_insert.GroupInvitePaymentListFragment
 import com.pan_american.android.ui.group_op.ground_convey_payment_insert.GroundConveyPaymentListFragment

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

@@ -1,4 +1,4 @@
-package com.pan_american.android.ui.group_common.insurance_payment_insert
+package com.pan_american.android.ui.group_visa.insurance_payment_insert
 
 import android.os.Bundle
 import android.text.Editable

+ 1 - 1
app/src/main/java/com/pan_american/android/ui/group_common/insurance_payment_insert/InsuranceListFragment.kt

@@ -1,4 +1,4 @@
-package com.pan_american.android.ui.group_common.insurance_payment_insert
+package com.pan_american.android.ui.group_visa.insurance_payment_insert
 
 import android.content.Intent
 import android.graphics.Color

+ 1 - 1
app/src/main/java/com/pan_american/android/ui/group_common/insurance_payment_insert/InsurancePaymentInsertActivity.kt

@@ -1,4 +1,4 @@
-package com.pan_american.android.ui.group_common.insurance_payment_insert
+package com.pan_american.android.ui.group_visa.insurance_payment_insert
 
 import android.os.Bundle
 import com.pan_american.android.OASystem

+ 17 - 1
app/src/main/java/com/pan_american/android/ui/workspace/WorkspaceFragment.kt

@@ -19,13 +19,14 @@ import com.pan_american.android.ui.efficiency_tools.exchange_tool.ExchangeToolAc
 import com.pan_american.android.ui.efficiency_tools.itinerary.ItineraryActivity
 import com.pan_american.android.ui.group_airplane_ticket.airplane_payment_insert.AirplaneTicketPaymentActivity
 import com.pan_american.android.ui.group_common.bill_management.BillManagementActivity
-import com.pan_american.android.ui.group_common.insurance_payment_insert.InsurancePaymentInsertActivity
+import com.pan_american.android.ui.group_common.commission_confirm.CommissionConfirmActivity
 import com.pan_american.android.ui.group_hotel.hotel_predetermine.HotelPredetermineActivity
 import com.pan_american.android.ui.group_invite_official.invite_data.InviteDataActivity
 import com.pan_american.android.ui.group_invite_official.invite_official_payment_insert.InviteOfficialPaymentInsertActivity
 import com.pan_american.android.ui.group_invite_official.official_visits.InviteVisitsActivity
 import com.pan_american.android.ui.group_management.group_info.GroupInfoActivity
 import com.pan_american.android.ui.group_op.ground_convey_payment_insert.GroundConveyPaymentInsertActivity
+import com.pan_american.android.ui.group_visa.insurance_payment_insert.InsurancePaymentInsertActivity
 import com.pan_american.android.ui.group_visa.visa_payment_insert.VisaPaymentInsertActivity
 import com.pan_american.android.ui.resource_management.airplane_three_code.AirplaneThreeCodeActivity
 import com.pan_american.android.ui.resource_management.car_resource.CarResourceActivity
@@ -255,6 +256,16 @@ class WorkspaceFragment : BaseFragment<FragmentWorkspaceBinding>(), OnClickListe
                     }
                 }
 
+                OASystem.COMMISSION_CONFIRM -> {
+                    if (OASystem.authorization(OASystem.BILL_MANAGEMENT, OASystem.VIEW)) {
+                        if (binding.groupCommonModel.visibility == View.GONE) {
+                            binding.groupCommonModel.visibility = View.VISIBLE
+                        }
+                        binding.commissionConfirm.visibility = View.VISIBLE
+                        binding.commissionConfirm.setOnClickListener(this)
+                    }
+                }
+
                 //团组机票
                 OASystem.THREE_CODE_RESOURCE -> {
                     if (OASystem.authorization(OASystem.THREE_CODE_RESOURCE, OASystem.VIEW)) {
@@ -376,6 +387,11 @@ class WorkspaceFragment : BaseFragment<FragmentWorkspaceBinding>(), OnClickListe
                 startActivity(intent)
             }
 
+            binding.commissionConfirm.id -> {
+                val intent = Intent(OASystem.context, CommissionConfirmActivity::class.java)
+                startActivity(intent)
+            }
+
             binding.airplaneThreeCode.id -> {
                 val intent = Intent(OASystem.context, AirplaneThreeCodeActivity::class.java)
                 startActivity(intent)

+ 384 - 0
app/src/main/res/layout/activity_commission_confirm.xml

@@ -0,0 +1,384 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/main"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/white"
+    android:orientation="vertical"
+    tools:context=".ui.group_common.commission_confirm.CommissionConfirmActivity">
+
+    <include
+        layout="@layout/layout_title"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/white"
+        android:orientation="vertical">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="@dimen/common_padding"
+            android:layout_marginTop="@dimen/common_padding_large"
+            android:layout_marginEnd="@dimen/common_padding">
+
+            <TextView
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:text="@string/condition_filter"
+                android:textSize="@dimen/text_size_medium"
+                android:textStyle="bold" />
+
+            <TextView
+                android:id="@+id/filter_switch"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="end"
+                android:text="@string/hide"
+                android:textColor="@color/title_background_color"
+                android:textSize="@dimen/text_size_medium" />
+
+        </LinearLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1dp"
+            android:layout_marginStart="@dimen/common_padding"
+            android:layout_marginTop="@dimen/common_padding_large"
+            android:layout_marginEnd="@dimen/common_padding"
+            android:background="@color/line_color" />
+
+        <LinearLayout
+            android:id="@+id/commission_filter"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_margin="@dimen/common_padding"
+            android:orientation="vertical">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/company_name"
+                    android:textSize="@dimen/text_size_small" />
+
+                <TextView
+                    android:id="@+id/company_name"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="@dimen/common_padding"
+                    android:gravity="end"
+                    android:textColor="@color/text_color" />
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                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:orientation="horizontal"
+                android:baselineAligned="false">
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:layout_marginEnd="@dimen/common_padding_large"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="@string/department"
+                        android:textSize="@dimen/text_size_small" />
+
+                    <TextView
+                        android:id="@+id/department"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="@dimen/common_padding"
+                        android:gravity="end"
+                        android:textColor="@color/text_color" />
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="@string/staff"
+                        android:textSize="@dimen/text_size_small" />
+
+                    <TextView
+                        android:id="@+id/staff"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="@dimen/common_padding"
+                        android:gravity="end"
+                        android:textColor="@color/text_color" />
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                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:baselineAligned="false"
+                android:orientation="horizontal">
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_marginEnd="@dimen/common_padding_large"
+                    android:layout_weight="1"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="@string/start_time"
+                        android:textSize="@dimen/text_size_small" />
+
+                    <TextView
+                        android:id="@+id/start_time"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="@dimen/common_padding"
+                        android:gravity="end"
+                        android:hint="@string/please_select"
+                        android:textColor="@color/text_color"
+                        android:textColorHint="@color/hint_text_color" />
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="@string/end_time"
+                        android:textSize="@dimen/text_size_small" />
+
+                    <TextView
+                        android:id="@+id/end_time"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="@dimen/common_padding"
+                        android:gravity="end"
+                        android:hint="@string/please_select"
+                        android:textColor="@color/text_color"
+                        android:textColorHint="@color/hint_text_color" />
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                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:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:text="@string/confirm_status"
+                    android:textSize="@dimen/text_size_small" />
+
+                <RadioGroup
+                    android:id="@+id/confirm_status"
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/common_padding_heavy"
+                    android:layout_marginStart="@dimen/common_padding_large"
+                    android:gravity="center"
+                    android:orientation="horizontal">
+
+                    <RadioButton
+                        android:id="@+id/confirm_all"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1"
+                        android:background="@drawable/style_selector_sift"
+                        android:button="@null"
+                        android:checked="true"
+                        android:gravity="center"
+                        android:text="@string/all"
+                        android:textColor="@color/check_text_view_select" />
+
+                    <RadioButton
+                        android:id="@+id/unconfirmed"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="@dimen/common_padding"
+                        android:layout_weight="1"
+                        android:background="@drawable/style_selector_sift"
+                        android:button="@null"
+                        android:gravity="center"
+                        android:text="@string/unconfirmed"
+                        android:textColor="@color/check_text_view_select" />
+
+                    <RadioButton
+                        android:id="@+id/confirmed"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="@dimen/common_padding"
+                        android:layout_weight="1"
+                        android:background="@drawable/style_selector_sift"
+                        android:button="@null"
+                        android:gravity="center"
+                        android:text="@string/confirmed"
+                        android:textColor="@color/check_text_view_select" />
+
+                </RadioGroup>
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                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:orientation="horizontal">
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:text="@string/deliver_status"
+                    android:textSize="@dimen/text_size_small" />
+
+                <RadioGroup
+                    android:id="@+id/deliver_status"
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/common_padding_heavy"
+                    android:layout_marginStart="@dimen/common_padding_large"
+                    android:gravity="center"
+                    android:orientation="horizontal">
+
+                    <RadioButton
+                        android:id="@+id/deliver_all"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1"
+                        android:background="@drawable/style_selector_sift"
+                        android:button="@null"
+                        android:checked="true"
+                        android:gravity="center"
+                        android:text="@string/all"
+                        android:textColor="@color/check_text_view_select" />
+
+                    <RadioButton
+                        android:id="@+id/undelivered"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="@dimen/common_padding"
+                        android:layout_weight="1"
+                        android:background="@drawable/style_selector_sift"
+                        android:button="@null"
+                        android:gravity="center"
+                        android:text="@string/unconfirmed"
+                        android:textColor="@color/check_text_view_select" />
+
+                    <RadioButton
+                        android:id="@+id/delivered"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="@dimen/common_padding"
+                        android:layout_weight="1"
+                        android:background="@drawable/style_selector_sift"
+                        android:button="@null"
+                        android:gravity="center"
+                        android:text="@string/confirmed"
+                        android:textColor="@color/check_text_view_select" />
+
+                </RadioGroup>
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:layout_marginTop="@dimen/common_padding"
+                android:layout_marginBottom="@dimen/common_padding"
+                android:background="@color/line_color" />
+
+            <com.pan_american.android.util.CommitButton
+                android:id="@+id/commit"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/button_height"
+                android:layout_margin="@dimen/common_padding" />
+
+        </LinearLayout>
+
+    </LinearLayout>
+
+    <com.scwang.smart.refresh.layout.SmartRefreshLayout
+        android:id="@+id/daily_payment_container"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_margin="@dimen/common_padding"
+        android:layout_weight="1"
+        app:srlEnablePreviewInEditMode="true">
+
+        <com.scwang.smart.refresh.header.ClassicsHeader
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content" />
+
+        <androidx.recyclerview.widget.RecyclerView
+            android:id="@+id/daily_payment_list"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:overScrollMode="never" />
+
+        <com.scwang.smart.refresh.footer.ClassicsFooter
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content" />
+
+    </com.scwang.smart.refresh.layout.SmartRefreshLayout>
+
+</LinearLayout>

+ 27 - 0
app/src/main/res/layout/fragment_workspace.xml

@@ -957,6 +957,33 @@
 
                     </LinearLayout>
 
+                    <LinearLayout
+                        android:id="@+id/commission_confirm"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:orientation="vertical"
+                        android:visibility="gone">
+
+                        <TextView
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:drawablePadding="@dimen/common_padding"
+                            android:gravity="center_vertical"
+                            android:paddingTop="@dimen/common_padding"
+                            android:paddingBottom="@dimen/common_padding"
+                            android:text="@string/commission_confirm"
+                            android:textColor="@color/text_color"
+                            android:textSize="@dimen/text_size_medium"
+                            app:drawableStartCompat="@mipmap/icon_commission_confirm" />
+
+                        <View
+                            android:layout_width="match_parent"
+                            android:layout_height="1dp"
+                            android:layout_marginStart="35dp"
+                            android:background="@color/line_color" />
+
+                    </LinearLayout>
+
                 </LinearLayout>
 
             </LinearLayout>

BIN
app/src/main/res/mipmap-xxhdpi/icon_commission_confirm.png


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

@@ -1097,6 +1097,16 @@
     <string name="picture_preview">图片预览</string>
     <string name="picture_load_error">图片加载失败</string>
 
+    <!-- 提成确认 -->
+    <string name="commission_confirm">提成确认</string>
+    <string name="confirm_status">确认状态</string>
+    <string name="confirmed">已确认</string>
+    <string name="unconfirmed">未确认</string>
+    
+    <string name="deliver_status">发放状态</string>
+    <string name="delivered">已发放</string>
+    <string name="undelivered">未发放</string>
+
     <!-- TODO: Remove or change this placeholder text -->
     <string name="hello_blank_fragment">Hello blank fragment</string>