Ver código fonte

2024-09-26 新增 / 修改

新增:
1. 财务模块 费用审核

修改:
1. 部分IU修改,界面逻辑修改
zhaiy 6 meses atrás
pai
commit
1d6cc22480
24 arquivos alterados com 388 adições e 349 exclusões
  1. 2 1
      .idea/misc.xml
  2. 3 0
      app/src/main/AndroidManifest.xml
  3. 0 2
      app/src/main/java/com/pan_american/android/ui/customer_resource/company_customer/AddNewCustomerActivity.kt
  4. 62 62
      app/src/main/java/com/pan_american/android/ui/customer_resource/company_customer/MarketCustomerActivity.kt
  5. 41 43
      app/src/main/java/com/pan_american/android/ui/customer_resource/related_invitee/RelatedInviteeListFragment.kt
  6. 10 11
      app/src/main/java/com/pan_american/android/ui/efficiency_tools/address_book/AddressBookActivity.kt
  7. 29 36
      app/src/main/java/com/pan_american/android/ui/efficiency_tools/address_book/CompanyListFragment.kt
  8. 29 36
      app/src/main/java/com/pan_american/android/ui/efficiency_tools/address_book/DepartmentListFragment.kt
  9. 21 26
      app/src/main/java/com/pan_american/android/ui/efficiency_tools/address_book/MemberListFragment.kt
  10. 1 1
      app/src/main/java/com/pan_american/android/ui/efficiency_tools/daily_payment/AddDailyPaymentActivity.kt
  11. 3 6
      app/src/main/java/com/pan_american/android/ui/efficiency_tools/daily_payment/DailyPaymentListActivity.kt
  12. 1 1
      app/src/main/java/com/pan_american/android/ui/group_airplane_ticket/airplane_payment_insert/AddAirplaneTicketActivity.kt
  13. 87 101
      app/src/main/java/com/pan_american/android/ui/group_airplane_ticket/airplane_payment_insert/AirplaneTicketListFragment.kt
  14. 0 1
      app/src/main/java/com/pan_american/android/ui/workspace/WorkspaceActivity.kt
  15. 14 0
      app/src/main/java/com/pan_american/android/ui/workspace/WorkspaceFragment.kt
  16. 2 2
      app/src/main/res/layout/activity_address_book.xml
  17. 1 0
      app/src/main/res/layout/activity_daliy_payment_list.xml
  18. 0 1
      app/src/main/res/layout/fragment_company_list.xml
  19. 3 12
      app/src/main/res/layout/fragment_department_list.xml
  20. 4 1
      app/src/main/res/layout/fragment_hotel_predetermine_payment.xml
  21. 65 3
      app/src/main/res/layout/fragment_workspace.xml
  22. 4 2
      app/src/main/res/layout/item_material_list.xml
  23. 0 0
      app/src/main/res/mipmap-xxhdpi/icon_material_operate.png
  24. 6 1
      app/src/main/res/values/strings.xml

+ 2 - 1
.idea/misc.xml

@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="EntryPointsManager">
     <list size="1">
@@ -13,7 +14,7 @@
   <component name="VisualizationToolProject">
     <option name="state">
       <ProjectState>
-        <option name="scale" value="0.7245508982035929" />
+        <option name="scale" value="0.07694248234106962" />
       </ProjectState>
     </option>
   </component>

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

@@ -35,6 +35,9 @@
         android:supportsRtl="true"
         android:theme="@style/AppTheme"
         tools:targetApi="31">
+        <activity
+            android:name=".ui.financial_module.expense_approval.ExpenseApprovalActivity"
+            android:exported="false" />
         <activity
             android:name=".ui.personnel_module.materials_operate.MaterialApplicationHistoryActivity"
             android:exported="false" />

+ 0 - 2
app/src/main/java/com/pan_american/android/ui/customer_resource/company_customer/AddNewCustomerActivity.kt

@@ -2,7 +2,6 @@ package com.pan_american.android.ui.customer_resource.company_customer
 
 import android.Manifest
 import android.app.Activity
-import android.content.Context
 import android.content.Intent
 import android.content.pm.PackageManager
 import android.graphics.Bitmap
@@ -14,7 +13,6 @@ import android.util.Base64
 import android.view.Gravity
 import android.view.View
 import android.view.ViewGroup
-import android.view.inputmethod.InputMethodManager
 import android.widget.CheckedTextView
 import android.widget.PopupWindow
 import android.widget.TextView

+ 62 - 62
app/src/main/java/com/pan_american/android/ui/customer_resource/company_customer/MarketCustomerActivity.kt

@@ -94,6 +94,7 @@ class MarketCustomerActivity : BaseActivity<ActivityMarketCustomerBinding>() {
         //先获取客户筛选列表
         initCustomerSiftList()
 
+        initTitle()
     }
 
     override fun onStart() {
@@ -103,7 +104,13 @@ class MarketCustomerActivity : BaseActivity<ActivityMarketCustomerBinding>() {
             EventBus.getDefault().register(this)
         }
 
-        initViews()
+        if (OASystem.needRefresh) {
+            pageIndex = 1
+            marketCustomerRequest.pageIndex = pageIndex
+            marketCustomerListItemList.clear()
+            OASystem.needRefresh = false
+            initMarketCustomerList(2)
+        }
     }
 
     override fun onStop() {
@@ -114,13 +121,18 @@ class MarketCustomerActivity : BaseActivity<ActivityMarketCustomerBinding>() {
         }
     }
 
-    override fun initViews() {
-
+    override fun initTitle() {
         titleBinding = LayoutTitleBinding.bind(binding.root).apply {
             titleText.text = resources.getString(R.string.company_customer_resource)
             searchView.visibility = View.VISIBLE
         }
 
+        titleBinding.backButton.setOnClickListener {
+            back()
+        }
+    }
+
+    override fun initViews() {
         binding.resourceListContainer.setRefreshHeader(ClassicsHeader(OASystem.context))
         binding.resourceListContainer.setRefreshFooter(ClassicsFooter(OASystem.context))
 
@@ -129,10 +141,6 @@ class MarketCustomerActivity : BaseActivity<ActivityMarketCustomerBinding>() {
 
     override fun initEvents() {
 
-        titleBinding.backButton.setOnClickListener {
-            back()
-        }
-
         titleBinding.searchText.addTextChangedListener(object : TextWatcher {
             override fun beforeTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {
 
@@ -289,6 +297,8 @@ class MarketCustomerActivity : BaseActivity<ActivityMarketCustomerBinding>() {
                             OASystem.serviceClass = siftListResponse.data.serviceClass
                             OASystem.province = siftListResponse.data.provinceClass
 
+                            initViews()
+
                             initEvents()
 
                         } else {
@@ -304,71 +314,61 @@ class MarketCustomerActivity : BaseActivity<ActivityMarketCustomerBinding>() {
     }
 
     private fun initMarketCustomerList(type: Int) {
-        if (!listInit) {
-
-            apiService.queryNewClientData(marketCustomerRequest)
-                .enqueue(object : Callback<MarketCustomerResponse> {
-                    override fun onResponse(
-                        call: Call<MarketCustomerResponse>,
-                        response: Response<MarketCustomerResponse>
-                    ) {
-                        val marketCustomerResponse = response.body()
-
-                        if (marketCustomerResponse != null) {
-                            if (marketCustomerResponse.code == 200) {
-                                for (item in marketCustomerResponse.data.pageSource) {
-                                    marketCustomerListItemList.add(item)
+
+        apiService.queryNewClientData(marketCustomerRequest)
+            .enqueue(object : Callback<MarketCustomerResponse> {
+                override fun onResponse(
+                    call: Call<MarketCustomerResponse>,
+                    response: Response<MarketCustomerResponse>
+                ) {
+                    val marketCustomerResponse = response.body()
+
+                    if (marketCustomerResponse != null) {
+                        if (marketCustomerResponse.code == 200) {
+                            for (item in marketCustomerResponse.data.pageSource) {
+                                marketCustomerListItemList.add(item)
+                            }
+
+                            if (marketCustomerListItemList.size == 0) {
+                                showMessage(resources.getString(R.string.no_data))
+                            }
+
+                            when (type) {
+                                1 -> {
+                                    totalPage = marketCustomerResponse.data.totalPage
+                                    binding.resourceListContainer.setEnableLoadMore(pageIndex < totalPage)
+                                    initList()
+                                    listInit = true
                                 }
 
-                                if (marketCustomerListItemList.size == 0) {
-                                    showMessage(resources.getString(R.string.no_data))
+                                2 -> {
+                                    binding.resourceListContainer.finishRefresh()
+                                    totalPage = marketCustomerResponse.data.totalPage
+                                    binding.resourceListContainer.setEnableLoadMore(pageIndex < totalPage)
+                                    initList()
+                                    listInit = true
                                 }
 
-                                when (type) {
-                                    1 -> {
-                                        totalPage = marketCustomerResponse.data.totalPage
-                                        binding.resourceListContainer.setEnableLoadMore(pageIndex < totalPage)
-                                        initList()
-                                        listInit = true
-                                    }
-
-                                    2 -> {
-                                        binding.resourceListContainer.finishRefresh()
-                                        totalPage = marketCustomerResponse.data.totalPage
-                                        binding.resourceListContainer.setEnableLoadMore(pageIndex < totalPage)
-                                        initList()
-                                        listInit = true
-                                    }
-
-                                    3 -> {
-                                        binding.resourceListContainer.finishLoadMore()
-                                        binding.resourceListContainer.setEnableLoadMore(pageIndex < totalPage)
-                                        binding.marketCustomerList.adapter!!.notifyItemInserted(
-                                            marketCustomerListItemList.size
-                                        )
-                                        listInit = true
-                                    }
+                                3 -> {
+                                    binding.resourceListContainer.finishLoadMore()
+                                    binding.resourceListContainer.setEnableLoadMore(pageIndex < totalPage)
+                                    binding.marketCustomerList.adapter!!.notifyItemInserted(
+                                        marketCustomerListItemList.size
+                                    )
+                                    listInit = true
                                 }
-                            } else {
-                                showMessage(marketCustomerResponse.msg)
                             }
+                        } else {
+                            showMessage(marketCustomerResponse.msg)
                         }
                     }
+                }
 
-                    override fun onFailure(call: Call<MarketCustomerResponse>, t: Throwable) {
-                        showErrorInfo(R.string.market_customer_list_get_failed)
-                    }
+                override fun onFailure(call: Call<MarketCustomerResponse>, t: Throwable) {
+                    showErrorInfo(R.string.market_customer_list_get_failed)
+                }
 
-                })
-        } else {
-            if (OASystem.needRefresh) {
-                pageIndex = 1
-                marketCustomerRequest.pageIndex = pageIndex
-                marketCustomerListItemList.clear()
-                listInit = false
-                initMarketCustomerList(2)
-            }
-        }
+            })
     }
 
     private fun initList() {

+ 41 - 43
app/src/main/java/com/pan_american/android/ui/customer_resource/related_invitee/RelatedInviteeListFragment.kt

@@ -77,57 +77,55 @@ class RelatedInviteeListFragment : BaseFragment<FragmentRelatedInviteeListBindin
             return
         }
 
-        if (!listInit) {
-            apiService.getRelatedInviteeGroupList(relatedInviteeListRequest).enqueue(object :
-                Callback<RelatedInviteeListResponse> {
-                override fun onResponse(
-                    p0: Call<RelatedInviteeListResponse>,
-                    response: Response<RelatedInviteeListResponse>
-                ) {
-                    val listResponse = response.body()
-
-                    if (listResponse != null) {
-                        if (listResponse.code == 200) {
-
-                            for (item in listResponse.data) {
-                                relatedInviteeGroupList.add(item)
+        apiService.getRelatedInviteeGroupList(relatedInviteeListRequest).enqueue(object :
+            Callback<RelatedInviteeListResponse> {
+            override fun onResponse(
+                p0: Call<RelatedInviteeListResponse>,
+                response: Response<RelatedInviteeListResponse>
+            ) {
+                val listResponse = response.body()
+
+                if (listResponse != null) {
+                    if (listResponse.code == 200) {
+
+                        for (item in listResponse.data) {
+                            relatedInviteeGroupList.add(item)
+                        }
+
+                        when (type) {
+                            1 -> {
+                                totalPage = getTotalPage(listResponse.count)
+                                binding.relatedInviteeListContainer.setEnableLoadMore(pageIndex < totalPage)
+                                initList()
+                                listInit = true
                             }
 
-                            when (type) {
-                                1 -> {
-                                    totalPage = getTotalPage(listResponse.count)
-                                    binding.relatedInviteeListContainer.setEnableLoadMore(pageIndex < totalPage)
-                                    initList()
-                                    listInit = true
-                                }
-
-                                2 -> {
-                                    binding.relatedInviteeListContainer.finishRefresh()
-                                    totalPage = getTotalPage(listResponse.count)
-                                    binding.relatedInviteeListContainer.setEnableLoadMore(pageIndex < totalPage)
-                                    initList()
-                                    listInit = true
-                                }
-
-                                3 -> {
-                                    binding.relatedInviteeListContainer.finishLoadMore()
-                                    binding.relatedInviteeListContainer.setEnableLoadMore(pageIndex < totalPage)
-                                    binding.relatedInviteeList.adapter!!.notifyItemInserted(relatedInviteeGroupList.size)
-                                    listInit = true
-                                }
+                            2 -> {
+                                binding.relatedInviteeListContainer.finishRefresh()
+                                totalPage = getTotalPage(listResponse.count)
+                                binding.relatedInviteeListContainer.setEnableLoadMore(pageIndex < totalPage)
+                                initList()
+                                listInit = true
                             }
 
-                        } else {
-                            showMessage(listResponse.msg)
+                            3 -> {
+                                binding.relatedInviteeListContainer.finishLoadMore()
+                                binding.relatedInviteeListContainer.setEnableLoadMore(pageIndex < totalPage)
+                                binding.relatedInviteeList.adapter!!.notifyItemInserted(relatedInviteeGroupList.size)
+                                listInit = true
+                            }
                         }
+
+                    } else {
+                        showMessage(listResponse.msg)
                     }
                 }
+            }
 
-                override fun onFailure(p0: Call<RelatedInviteeListResponse>, p1: Throwable) {
-                    showErrorInfo(R.string.group_list_get_failed)
-                }
-            })
-        }
+            override fun onFailure(p0: Call<RelatedInviteeListResponse>, p1: Throwable) {
+                showErrorInfo(R.string.group_list_get_failed)
+            }
+        })
     }
 
     private fun initList() {

+ 10 - 11
app/src/main/java/com/pan_american/android/ui/efficiency_tools/address_book/AddressBookActivity.kt

@@ -50,7 +50,9 @@ class AddressBookActivity : BaseActivity<ActivityAddressBookBinding>() {
 
         titleBinding = LayoutTitleBinding.bind(binding.root).apply {
             titleText.text = resources.getString(R.string.address_book)
-            searchView.visibility = View.VISIBLE
+
+            searchView.visibility = View.GONE
+
             backButton.setOnClickListener {
                 back()
             }
@@ -69,7 +71,9 @@ class AddressBookActivity : BaseActivity<ActivityAddressBookBinding>() {
 
         val popView = View.inflate(this, R.layout.popup_member_info, null)
         popupWindow = PopupWindow(
-            popView, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT
+            popView,
+            ViewGroup.LayoutParams.MATCH_PARENT,
+            ViewGroup.LayoutParams.WRAP_CONTENT
         )
 
         showPopupWindow {
@@ -82,15 +86,10 @@ class AddressBookActivity : BaseActivity<ActivityAddressBookBinding>() {
 
             memberName.text = member.cnName
             jobName.text = member.jobName
-            phoneNumber.text = member.phone.ifBlank {
-                resources.getString(R.string.no_info)
-            }
-            phoneNumberEmergency.text = member.urgentPhone.ifBlank {
-                resources.getString(R.string.no_info)
-            }
-            email.text = member.email.ifBlank {
-                resources.getString(R.string.no_info)
-            }
+            phoneNumber.text = member.phone.ifBlank { resources.getString(R.string.no_info) }
+            phoneNumberEmergency.text =
+                member.urgentPhone.ifBlank { resources.getString(R.string.no_info) }
+            email.text = member.email.ifBlank { resources.getString(R.string.no_info) }
 
             popupWindow.showAtLocation(binding.root, Gravity.BOTTOM, 0, 0)
         }

+ 29 - 36
app/src/main/java/com/pan_american/android/ui/efficiency_tools/address_book/CompanyListFragment.kt

@@ -24,10 +24,7 @@ class CompanyListFragment : BaseFragment<FragmentCompanyListBinding>() {
 
     private val companyList = ArrayList<Company>()
 
-    private var listInit = false
-
     override fun getViewBinding(
-
         inflater: LayoutInflater, container: ViewGroup?, bundle: Bundle?
     ) = FragmentCompanyListBinding.inflate(layoutInflater, container, false)
 
@@ -48,38 +45,34 @@ class CompanyListFragment : BaseFragment<FragmentCompanyListBinding>() {
             return
         }
 
-        if (!listInit) {
-            ServiceCreator.create<APIService>().getCompanyList(BaseRequest())
-                .enqueue(object : Callback<CompanyListResponse> {
-                    override fun onResponse(
-                        call: Call<CompanyListResponse>, response: Response<CompanyListResponse>
-                    ) {
-                        val companyListResponse = response.body()
-                        if (companyListResponse != null) {
-                            if (companyListResponse.code == 200) {
-                                for (item in companyListResponse.data) {
-                                    companyList.add(item)
-                                }
-                                initList()
-                                listInit = true
-                                binding.totalText.text = String.format(
-                                    resources.getString(
-                                        R.string.company_total, companyList.size
-                                    )
-                                )
-                            } else {
-                                showMessage(companyListResponse.msg)
+        ServiceCreator.create<APIService>().getCompanyList(BaseRequest())
+            .enqueue(object : Callback<CompanyListResponse> {
+                override fun onResponse(
+                    call: Call<CompanyListResponse>, response: Response<CompanyListResponse>
+                ) {
+                    val companyListResponse = response.body()
+                    if (companyListResponse != null) {
+                        if (companyListResponse.code == 200) {
+                            for (item in companyListResponse.data) {
+                                companyList.add(item)
                             }
+
+                            initList()
+
+                            binding.totalText.text = String.format(
+                                resources.getString(R.string.company_total),
+                                companyList.size
+                            )
+                        } else {
+                            showMessage(companyListResponse.msg)
                         }
                     }
+                }
 
-                    override fun onFailure(call: Call<CompanyListResponse>, t: Throwable) {
-                        showErrorInfo(R.string.company_get_failed)
-                    }
-                })
-        } else {
-            initList()
-        }
+                override fun onFailure(call: Call<CompanyListResponse>, t: Throwable) {
+                    showErrorInfo(R.string.company_get_failed)
+                }
+            })
     }
 
     private fun initList() {
@@ -111,11 +104,11 @@ class CompanyListFragment : BaseFragment<FragmentCompanyListBinding>() {
                 departmentListFragment.arguments = bundle
 
                 parentFragmentManager.beginTransaction().setCustomAnimations(
-                        R.anim.slide_right_in,
-                        R.anim.slide_left_out,
-                        R.anim.slide_left_in,
-                        R.anim.slide_right_out
-                    ).addToBackStack(null)
+                    R.anim.slide_right_in,
+                    R.anim.slide_left_out,
+                    R.anim.slide_left_in,
+                    R.anim.slide_right_out
+                ).addToBackStack(null)
                     .add(R.id.address_book_container, departmentListFragment).commit()
             }
         }

+ 29 - 36
app/src/main/java/com/pan_american/android/ui/efficiency_tools/address_book/DepartmentListFragment.kt

@@ -24,8 +24,6 @@ class DepartmentListFragment : BaseFragment<FragmentDepartmentListBinding>() {
 
     private val departmentList = ArrayList<Department>()
 
-    private var listInit = false
-
     private var companyId = 0
 
     private var companyName = ""
@@ -57,39 +55,34 @@ class DepartmentListFragment : BaseFragment<FragmentDepartmentListBinding>() {
             return
         }
 
-        if (!listInit) {
-            ServiceCreator.create<APIService>().getDepartmentList(DepartmentListRequest(companyId))
-                .enqueue(object : Callback<DepartmentListResponse> {
-                    override fun onResponse(
-                        call: Call<DepartmentListResponse>,
-                        response: Response<DepartmentListResponse>
-                    ) {
-                        val departmentListResponse = response.body()
-                        if (departmentListResponse != null) {
-                            if (departmentListResponse.code == 200) {
-                                for (item in departmentListResponse.data) {
-                                    departmentList.add(item)
-                                }
-                                initList()
-                                listInit = true
-                                binding.totalText.text = String.format(
-                                    resources.getString(
-                                        R.string.department_total, departmentList.size
-                                    )
-                                )
-                            } else {
-                                showMessage(departmentListResponse.msg)
+        ServiceCreator.create<APIService>().getDepartmentList(DepartmentListRequest(companyId))
+            .enqueue(object : Callback<DepartmentListResponse> {
+                override fun onResponse(
+                    call: Call<DepartmentListResponse>,
+                    response: Response<DepartmentListResponse>
+                ) {
+                    val departmentListResponse = response.body()
+                    if (departmentListResponse != null) {
+                        if (departmentListResponse.code == 200) {
+                            for (item in departmentListResponse.data) {
+                                departmentList.add(item)
                             }
+
+                            initList()
+
+                            binding.totalText.text = String.format(
+                                resources.getString(R.string.department_total), departmentList.size
+                            )
+                        } else {
+                            showMessage(departmentListResponse.msg)
                         }
                     }
+                }
 
-                    override fun onFailure(call: Call<DepartmentListResponse>, t: Throwable) {
-                        showErrorInfo(R.string.department_get_failed)
-                    }
-                })
-        } else {
-            initList()
-        }
+                override fun onFailure(call: Call<DepartmentListResponse>, t: Throwable) {
+                    showErrorInfo(R.string.department_get_failed)
+                }
+            })
     }
 
     private fun initList() {
@@ -123,11 +116,11 @@ class DepartmentListFragment : BaseFragment<FragmentDepartmentListBinding>() {
                 memberListFragment.arguments = bundle
 
                 parentFragmentManager.beginTransaction().setCustomAnimations(
-                        R.anim.slide_right_in,
-                        R.anim.slide_left_out,
-                        R.anim.slide_left_in,
-                        R.anim.slide_right_out
-                    ).addToBackStack(null).add(R.id.address_book_container, memberListFragment)
+                    R.anim.slide_right_in,
+                    R.anim.slide_left_out,
+                    R.anim.slide_left_in,
+                    R.anim.slide_right_out
+                ).addToBackStack(null).add(R.id.address_book_container, memberListFragment)
                     .commit()
             }
         }

+ 21 - 26
app/src/main/java/com/pan_american/android/ui/efficiency_tools/address_book/MemberListFragment.kt

@@ -25,8 +25,6 @@ class MemberListFragment : BaseFragment<FragmentMemberListBinding>() {
 
     private var memberList = ArrayList<Member>()
 
-    private var listInit = false
-
     private var companyId = 0
 
     private var companyName = ""
@@ -54,7 +52,7 @@ class MemberListFragment : BaseFragment<FragmentMemberListBinding>() {
 
     override fun initViews() {
         binding.subtitle.text =
-            String.format(resources.getString(R.string.member_sub_title, companyName, depName))
+            String.format(resources.getString(R.string.member_sub_title), companyName, depName)
         initMemberList()
     }
 
@@ -64,33 +62,30 @@ class MemberListFragment : BaseFragment<FragmentMemberListBinding>() {
             return
         }
 
-        if (!listInit) {
-            ServiceCreator.create<APIService>().getMembersList(MemberListRequest(companyId, depId))
-                .enqueue(object : Callback<MemberListResponse> {
-                    override fun onResponse(
-                        call: Call<MemberListResponse>, response: Response<MemberListResponse>
-                    ) {
-                        val memberListResponse = response.body()
-                        if (memberListResponse != null) {
-                            if (memberListResponse.code == 200) {
-                                for (item in memberListResponse.data) {
-                                    memberList.add(item)
-                                }
-                                initList()
-                                listInit = true
-                            } else {
-                                showMessage(memberListResponse.msg)
+        ServiceCreator.create<APIService>().getMembersList(MemberListRequest(companyId, depId))
+            .enqueue(object : Callback<MemberListResponse> {
+                override fun onResponse(
+                    call: Call<MemberListResponse>, response: Response<MemberListResponse>
+                ) {
+                    val memberListResponse = response.body()
+                    if (memberListResponse != null) {
+                        if (memberListResponse.code == 200) {
+                            for (item in memberListResponse.data) {
+                                memberList.add(item)
                             }
+
+                            initList()
+
+                        } else {
+                            showMessage(memberListResponse.msg)
                         }
                     }
+                }
 
-                    override fun onFailure(call: Call<MemberListResponse>, t: Throwable) {
-                        showErrorInfo(R.string.member_get_failed)
-                    }
-                })
-        } else {
-            initList()
-        }
+                override fun onFailure(call: Call<MemberListResponse>, t: Throwable) {
+                    showErrorInfo(R.string.member_get_failed)
+                }
+            })
     }
 
     private fun initList() {

+ 1 - 1
app/src/main/java/com/pan_american/android/ui/efficiency_tools/daily_payment/AddDailyPaymentActivity.kt

@@ -697,7 +697,7 @@ class AddDailyPaymentActivity : BaseActivity<ActivityAddDailyPaymentBinding>() {
 
             override fun onFailure(call: Call<BaseResponse>, t: Throwable) {
 
-                binding.commit.setButtonStatus(0)
+                binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                 showMessage(resources.getString(R.string.network_error))
             }

+ 3 - 6
app/src/main/java/com/pan_american/android/ui/efficiency_tools/daily_payment/DailyPaymentListActivity.kt

@@ -77,12 +77,6 @@ class DailyPaymentListActivity : BaseActivity<ActivityDaliyPaymentListBinding>()
         initSiftItems()
     }
 
-    override fun onStart() {
-        super.onStart()
-
-        getDailyPaymentList()
-    }
-
     override fun initTitle() {
 
         titleBinding = LayoutTitleBinding.bind(binding.root).apply {
@@ -145,7 +139,10 @@ class DailyPaymentListActivity : BaseActivity<ActivityDaliyPaymentListBinding>()
 
                                 siftInit = true
 
+                                getDailyPaymentList()
+
                                 initEvents()
+
                             } else {
                                 showMessage(dailyPaymentSiftResponse.msg)
                             }

+ 1 - 1
app/src/main/java/com/pan_american/android/ui/group_airplane_ticket/airplane_payment_insert/AddAirplaneTicketActivity.kt

@@ -680,7 +680,7 @@ class AddAirplaneTicketActivity : BaseActivity<ActivityAddAirplaneTicketBinding>
 
                                 if (unitPriceCorrect) {
                                     binding.paymentSum.text = String.format(
-                                        "%.2f",
+                                        resources.getString(R.string.decimal_format),
                                         binding.unitPrice.text.trim().toString()
                                             .toDouble() * customerList.size
                                     )

+ 87 - 101
app/src/main/java/com/pan_american/android/ui/group_airplane_ticket/airplane_payment_insert/AirplaneTicketListFragment.kt

@@ -43,10 +43,6 @@ class AirplaneTicketListFragment : BaseFragment<FragmentAirplaneTicketListBindin
 
     private val apiService = ServiceCreator.create<APIService>()
 
-    private var currencyInit = false
-
-    private var listInit = false
-
     private var pageIndex = 1
 
     private var totalPage = 0
@@ -72,6 +68,21 @@ class AirplaneTicketListFragment : BaseFragment<FragmentAirplaneTicketListBindin
         }
 
         getGroupCurrency()
+
+        initEvents()
+    }
+
+    override fun onStart() {
+        super.onStart()
+
+        if (OASystem.needRefresh) {
+            pageIndex = 1
+            airplaneTicketListRequest.pageIndex = pageIndex
+            airplaneTicketList.clear()
+            getAirplaneTicketPaymentList(2)
+
+            OASystem.needRefresh = false
+        }
     }
 
     override fun initViews() {
@@ -128,44 +139,34 @@ class AirplaneTicketListFragment : BaseFragment<FragmentAirplaneTicketListBindin
             return
         }
 
-        if (!currencyInit) {
-
-            apiService.getGroupCurrency(GroupCurrencyRequest(groupId, 85))
-                .enqueue(object : Callback<GroupCurrencyResponse> {
-                    override fun onResponse(
-                        call: Call<GroupCurrencyResponse>, response: Response<GroupCurrencyResponse>
-                    ) {
-
-                        val currencyResponse = response.body()
+        apiService.getGroupCurrency(GroupCurrencyRequest(groupId, 85))
+            .enqueue(object : Callback<GroupCurrencyResponse> {
+                override fun onResponse(
+                    call: Call<GroupCurrencyResponse>, response: Response<GroupCurrencyResponse>
+                ) {
 
-                        if (currencyResponse != null) {
-                            if (currencyResponse.code == 200) {
-                                OASystem.currency.clear()
+                    val currencyResponse = response.body()
 
-                                for (item in currencyResponse.data.teamRates) {
-                                    OASystem.currency.add(item)
-                                }
+                    if (currencyResponse != null) {
+                        if (currencyResponse.code == 200) {
+                            OASystem.currency.clear()
 
-                                currencyInit = true
+                            for (item in currencyResponse.data.teamRates) {
+                                OASystem.currency.add(item)
+                            }
 
-                                initViews()
-                                initEvents()
+                            initViews()
 
-                            } else {
-                                showMessage(currencyResponse.msg)
-                            }
+                        } else {
+                            showMessage(currencyResponse.msg)
                         }
                     }
+                }
 
-                    override fun onFailure(call: Call<GroupCurrencyResponse>, t: Throwable) {
-                        showErrorInfo(R.string.group_currency_get_failed)
-                    }
-                })
-
-        } else {
-            initViews()
-            initEvents()
-        }
+                override fun onFailure(call: Call<GroupCurrencyResponse>, t: Throwable) {
+                    showErrorInfo(R.string.group_currency_get_failed)
+                }
+            })
     }
 
     private fun getAirplaneTicketPaymentList(type: Int) {
@@ -175,82 +176,69 @@ class AirplaneTicketListFragment : BaseFragment<FragmentAirplaneTicketListBindin
             return
         }
 
-        if (!listInit) {
-            apiService.getGroupAirplaneTicketListItem(airplaneTicketListRequest)
-                .enqueue(object : Callback<AirplaneTicketListResponse> {
-                    override fun onResponse(
-                        call: Call<AirplaneTicketListResponse>,
-                        response: Response<AirplaneTicketListResponse>
-                    ) {
+        apiService.getGroupAirplaneTicketListItem(airplaneTicketListRequest)
+            .enqueue(object : Callback<AirplaneTicketListResponse> {
+                override fun onResponse(
+                    call: Call<AirplaneTicketListResponse>,
+                    response: Response<AirplaneTicketListResponse>
+                ) {
+
+                    val airplaneTicketListResponse = response.body()
 
-                        val airplaneTicketListResponse = response.body()
+                    if (airplaneTicketListResponse != null) {
+                        if (airplaneTicketListResponse.code == 200) {
+                            for (item in airplaneTicketListResponse.data.airData.dataList) {
+                                airplaneTicketList.add(item)
+                            }
+
+                            if (airplaneTicketList.size == 0) {
+                                showMessage(resources.getString(R.string.no_data))
+                            }
 
-                        if (airplaneTicketListResponse != null) {
-                            if (airplaneTicketListResponse.code == 200) {
-                                for (item in airplaneTicketListResponse.data.airData.dataList) {
-                                    airplaneTicketList.add(item)
+                            when (type) {
+                                1 -> {
+                                    totalPage = getTotalPage(
+                                        airplaneTicketListResponse.data.airData.dataCount,
+                                        airplaneTicketListResponse.data.airData.currPageSize
+                                    )
+                                    binding.airplaneTicketPaymentContainer.setEnableLoadMore(
+                                        pageIndex < totalPage
+                                    )
+                                    initList()
                                 }
 
-                                if (airplaneTicketList.size == 0) {
-                                    showMessage(resources.getString(R.string.no_data))
+                                2 -> {
+                                    binding.airplaneTicketPaymentContainer.finishRefresh()
+                                    totalPage = getTotalPage(
+                                        airplaneTicketListResponse.data.airData.dataCount,
+                                        airplaneTicketListResponse.data.airData.currPageSize
+                                    )
+                                    binding.airplaneTicketPaymentContainer.setEnableLoadMore(
+                                        pageIndex < totalPage
+                                    )
+                                    initList()
                                 }
 
-                                when (type) {
-                                    1 -> {
-                                        totalPage = getTotalPage(
-                                            airplaneTicketListResponse.data.airData.dataCount,
-                                            airplaneTicketListResponse.data.airData.currPageSize
-                                        )
-                                        binding.airplaneTicketPaymentContainer.setEnableLoadMore(
-                                            pageIndex < totalPage
-                                        )
-                                        initList()
-                                        listInit = true
-                                    }
-
-                                    2 -> {
-                                        binding.airplaneTicketPaymentContainer.finishRefresh()
-                                        totalPage = getTotalPage(
-                                            airplaneTicketListResponse.data.airData.dataCount,
-                                            airplaneTicketListResponse.data.airData.currPageSize
-                                        )
-                                        binding.airplaneTicketPaymentContainer.setEnableLoadMore(
-                                            pageIndex < totalPage
-                                        )
-                                        initList()
-                                        listInit = true
-                                    }
-
-                                    3 -> {
-                                        binding.airplaneTicketPaymentContainer.finishLoadMore()
-                                        binding.airplaneTicketPaymentContainer.setEnableLoadMore(
-                                            pageIndex < totalPage
-                                        )
-                                        binding.airplaneTicketPaymentList.adapter!!.notifyItemInserted(
-                                            airplaneTicketList.size
-                                        )
-                                        listInit = true
-                                    }
+                                3 -> {
+                                    binding.airplaneTicketPaymentContainer.finishLoadMore()
+                                    binding.airplaneTicketPaymentContainer.setEnableLoadMore(
+                                        pageIndex < totalPage
+                                    )
+                                    binding.airplaneTicketPaymentList.adapter!!.notifyItemInserted(
+                                        airplaneTicketList.size
+                                    )
                                 }
-                            } else {
-                                showMessage(airplaneTicketListResponse.msg)
                             }
+                        } else {
+                            showMessage(airplaneTicketListResponse.msg)
                         }
                     }
+                }
 
-                    override fun onFailure(call: Call<AirplaneTicketListResponse>, t: Throwable) {
-                        showErrorInfo(R.string.airplane_ticket_list_get_failed)
-                    }
-                })
-        } else {
-            if (OASystem.needRefresh) {
-                pageIndex = 1
-                airplaneTicketListRequest.pageIndex = pageIndex
-                airplaneTicketList.clear()
-                listInit = false
-                getAirplaneTicketPaymentList(2)
-            }
-        }
+                override fun onFailure(call: Call<AirplaneTicketListResponse>, t: Throwable) {
+                    showErrorInfo(R.string.airplane_ticket_list_get_failed)
+                }
+            })
     }
 
     private fun getTotalPage(dataCount: Int, pageSize: Int): Int {
@@ -376,7 +364,6 @@ class AirplaneTicketListFragment : BaseFragment<FragmentAirplaneTicketListBindin
                 airplaneTicketListRequest.pageIndex = pageIndex
                 binding.airplaneTicketPaymentList.adapter!!.notifyItemRangeRemoved(0, airplaneTicketList.size)
                 airplaneTicketList.clear()
-                listInit = false
                 getAirplaneTicketPaymentList(2)
             }
 
@@ -384,7 +371,6 @@ class AirplaneTicketListFragment : BaseFragment<FragmentAirplaneTicketListBindin
                 if (pageIndex < totalPage) {
                     pageIndex += 1
                     airplaneTicketListRequest.pageIndex = pageIndex
-                    listInit = false
                     getAirplaneTicketPaymentList(3)
                 }
             }

+ 0 - 1
app/src/main/java/com/pan_american/android/ui/workspace/WorkspaceActivity.kt

@@ -114,7 +114,6 @@ class WorkspaceActivity : BaseActivity<ActivityWorkspaceBinding>() {
         operationNotification = intent.getBooleanExtra("operation_notification", false)
         announcementNotification = intent.getBooleanExtra("announcement_notification", false)
 
-
         if (operationNotification) {
             if (binding.navViewpage2.currentItem != 0) {
                 binding.navViewpage2.currentItem = 0

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

@@ -21,6 +21,7 @@ import com.pan_american.android.ui.efficiency_tools.address_book.AddressBookActi
 import com.pan_american.android.ui.efficiency_tools.daily_payment.DailyPaymentListActivity
 import com.pan_american.android.ui.efficiency_tools.exchange_tool.ExchangeToolActivity
 import com.pan_american.android.ui.efficiency_tools.itinerary.ItineraryActivity
+import com.pan_american.android.ui.financial_module.expense_approval.ExpenseApprovalActivity
 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.commission_confirm.CommissionConfirmActivity
@@ -305,6 +306,14 @@ class WorkspaceFragment : BaseFragment<FragmentWorkspaceBinding>(), OnClickListe
                 }
             }
         }
+
+        if (OASystem.userInfo.userId == 21 || OASystem.userInfo.userId == 22) {
+            if (binding.financialModule.visibility == View.GONE) {
+                binding.financialModule.visibility = View.VISIBLE
+            }
+            binding.expenseApproval.visibility = View.VISIBLE
+            binding.expenseApproval.setOnClickListener(this)
+        }
     }
 
     override fun onClick(view: View) {
@@ -469,6 +478,11 @@ class WorkspaceFragment : BaseFragment<FragmentWorkspaceBinding>(), OnClickListe
             val intent = Intent(OASystem.context, ExchangeToolActivity::class.java)
             startActivity(intent)
         }
+
+        binding.expenseApproval.setOnClickListener {
+            val intent = Intent(OASystem.context, ExpenseApprovalActivity::class.java)
+            startActivity(intent)
+        }
     }
 
 }

+ 2 - 2
app/src/main/res/layout/activity_address_book.xml

@@ -6,11 +6,11 @@
     android:background="@color/white"
     android:orientation="vertical">
 
-    <com.pan_american.android.util.TitleLayout
+    <include
+        layout="@layout/layout_title"
         android:layout_width="match_parent"
         android:layout_height="wrap_content" />
 
-
     <androidx.fragment.app.FragmentContainerView
         android:id="@+id/address_book_container"
         android:layout_width="match_parent"

+ 1 - 0
app/src/main/res/layout/activity_daliy_payment_list.xml

@@ -104,6 +104,7 @@
                         android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:gravity="end"
+                        android:maxLines="1"
                         android:text="@string/all"
                         android:textColor="@color/text_color" />
 

+ 0 - 1
app/src/main/res/layout/fragment_company_list.xml

@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="@color/white"

+ 3 - 12
app/src/main/res/layout/fragment_department_list.xml

@@ -1,12 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="@color/white"
     android:orientation="vertical">
 
-
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
@@ -39,18 +37,11 @@
         android:layout_marginEnd="@dimen/common_padding_huge"
         android:layout_weight="1" />
 
-    <LinearLayout
+    <TextView
+        android:id="@+id/total_text"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_marginBottom="@dimen/common_padding"
-        android:gravity="center"
-        android:orientation="horizontal">
-
-        <TextView
-            android:id="@+id/total_text"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content" />
-
-    </LinearLayout>
+        android:gravity="center" />
 
 </LinearLayout>

+ 4 - 1
app/src/main/res/layout/fragment_hotel_predetermine_payment.xml

@@ -1,14 +1,17 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:background="@color/white"
     android:orientation="vertical">
 
     <ScrollView
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:layout_margin="@dimen/common_padding"
-        android:scrollbars="none">
+        android:scrollbars="none"
+        tools:ignore="UselessParent">
 
         <LinearLayout
             android:layout_width="match_parent"

+ 65 - 3
app/src/main/res/layout/fragment_workspace.xml

@@ -143,7 +143,8 @@
                     android:layout_gravity="center"
                     android:layout_marginStart="25dp"
                     android:layout_marginEnd="25dp"
-                    android:orientation="vertical">
+                    android:orientation="vertical"
+                    tools:ignore="UselessParent">
 
                     <TextView
                         android:layout_width="match_parent"
@@ -284,6 +285,66 @@
 
             </LinearLayout>
 
+            <LinearLayout
+                android:id="@+id/financial_module"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:background="@color/white"
+                android:orientation="vertical"
+                android:visibility="gone">
+
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/common_padding"
+                    android:background="@color/background_color" />
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:layout_marginStart="25dp"
+                    android:layout_marginEnd="25dp"
+                    android:orientation="vertical">
+
+                    <TextView
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="@dimen/common_padding"
+                        android:text="@string/financial_module"
+                        android:textColor="@color/text_color"
+                        android:textSize="@dimen/text_size_minimum" />
+
+                    <View
+                        android:layout_width="match_parent"
+                        android:layout_height="1dp"
+                        android:layout_marginTop="@dimen/common_padding"
+                        android:background="@color/line_color" />
+
+                    <LinearLayout
+                        android:id="@+id/expense_approval"
+                        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/expense_approval"
+                            android:textColor="@color/text_color"
+                            android:textSize="@dimen/text_size_medium"
+                            app:drawableStartCompat="@mipmap/icon_expense_approval" />
+
+                    </LinearLayout>
+
+                </LinearLayout>
+
+            </LinearLayout>
+
             <LinearLayout
                 android:id="@+id/personnel_module"
                 android:layout_width="match_parent"
@@ -336,7 +397,7 @@
                             android:text="@string/material_application"
                             android:textColor="@color/text_color"
                             android:textSize="@dimen/text_size_medium"
-                            app:drawableStartCompat="@mipmap/icon_material_opterate" />
+                            app:drawableStartCompat="@mipmap/icon_material_operate" />
 
                     </LinearLayout>
 
@@ -684,7 +745,8 @@
                     android:layout_gravity="center"
                     android:layout_marginStart="25dp"
                     android:layout_marginEnd="25dp"
-                    android:orientation="vertical">
+                    android:orientation="vertical"
+                    tools:ignore="TooManyViews">
 
                     <TextView
                         android:layout_width="match_parent"

+ 4 - 2
app/src/main/res/layout/item_material_list.xml

@@ -12,13 +12,15 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_margin="@dimen/common_padding"
-        android:orientation="vertical">
+        android:orientation="vertical"
+        tools:ignore="UselessParent">
 
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="@dimen/common_padding"
-            android:orientation="horizontal">
+            android:orientation="horizontal"
+            tools:ignore="UseCompoundDrawables">
 
             <TextView
                 android:id="@+id/material_name"

app/src/main/res/mipmap-xxhdpi/icon_material_opterate.png → app/src/main/res/mipmap-xxhdpi/icon_material_operate.png


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

@@ -71,6 +71,8 @@
 
     <string name="price_and_currency_format">%.2f (%s)</string>
 
+    <string name="decimal_format">%.2f</string>
+
     <string name="during">至</string>
 
     <string name="create_time">创建时间</string>
@@ -177,6 +179,9 @@
     <string name="group_payment_application">团组费用申请</string>
     <string name="exchange_tool">汇率换算</string>
 
+    <string name="financial_module">财务模块</string>
+    <string name="expense_approval">费用审核</string>
+
     <string name="personnel_module">人事模块</string>
     <string name="material_application">物资领用</string>
 
@@ -1155,7 +1160,7 @@
     <string name="material_base_data_get_error">物资进存销基础数据源获取失败</string>
     <string name="material_search_error">物资列表数据查询失败</string>
 
-<!--    <string name="material_application">物品领用</string>-->
+    <!--    <string name="material_application">物品领用</string>-->
     <string name="application_count">领用数量</string>
     <string name="application_reason">领用原由</string>