浏览代码

2024-09-20 新增 / 修改

新增:
1. 人事模块 物资进销存 部分页面实现 查询功能实现

修改:
1. 部分UI逻辑修改
zhaiy 6 月之前
父节点
当前提交
a929dbbe6e
共有 34 个文件被更改,包括 1197 次插入68 次删除
  1. 1 0
      app/build.gradle
  2. 4 1
      app/src/main/AndroidManifest.xml
  3. 7 0
      app/src/main/java/com/pan_american/android/OASystem.kt
  4. 93 0
      app/src/main/java/com/pan_american/android/data/model/personnel_module/materials_operate/adapter/MaterialListAdapter.kt
  5. 13 0
      app/src/main/java/com/pan_american/android/data/model/personnel_module/materials_operate/entity/MaterialListItem.kt
  6. 14 0
      app/src/main/java/com/pan_american/android/data/model/personnel_module/materials_operate/entity/MaterialTypeData.kt
  7. 9 0
      app/src/main/java/com/pan_american/android/data/model/personnel_module/materials_operate/network/MaterialBaseDataResponse.kt
  8. 9 0
      app/src/main/java/com/pan_american/android/data/model/personnel_module/materials_operate/network/MaterialSearchRequest.kt
  9. 6 0
      app/src/main/java/com/pan_american/android/data/model/personnel_module/materials_operate/network/MaterialSearchResponse.kt
  10. 15 0
      app/src/main/java/com/pan_american/android/data/network/APIService.kt
  11. 3 2
      app/src/main/java/com/pan_american/android/ui/customer_resource/company_customer/AddNewCustomerActivity.kt
  12. 4 3
      app/src/main/java/com/pan_american/android/ui/efficiency_tools/daily_payment/AddDailyPaymentActivity.kt
  13. 4 3
      app/src/main/java/com/pan_american/android/ui/efficiency_tools/daily_payment/DailyPaymentListActivity.kt
  14. 4 3
      app/src/main/java/com/pan_american/android/ui/group_airplane_ticket/airplane_payment_insert/AddAirplaneTicketActivity.kt
  15. 4 3
      app/src/main/java/com/pan_american/android/ui/group_invite_official/invite_data/AddInviteDataActivity.kt
  16. 4 4
      app/src/main/java/com/pan_american/android/ui/group_invite_official/invite_official_payment_insert/AddInvitePaymentActivity.kt
  17. 4 3
      app/src/main/java/com/pan_american/android/ui/group_op/ground_convey_payment_insert/AddGroundConveyInfoActivity.kt
  18. 4 3
      app/src/main/java/com/pan_american/android/ui/group_op/ground_convey_payment_insert/GroundConveyPaymentDetailActivity.kt
  19. 4 3
      app/src/main/java/com/pan_american/android/ui/group_visa/insurance_payment_insert/AddInsurancePaymentActivity.kt
  20. 4 3
      app/src/main/java/com/pan_american/android/ui/group_visa/visa_payment_insert/AddVisaPaymentActivity.kt
  21. 4 3
      app/src/main/java/com/pan_american/android/ui/login/LoginActivity.kt
  22. 410 0
      app/src/main/java/com/pan_american/android/ui/personnel_module/materials_operate/MaterialOperateActivity.kt
  23. 4 3
      app/src/main/java/com/pan_american/android/ui/resource_management/airplane_three_code/AddAirplaneThreeCodeActivity.kt
  24. 3 2
      app/src/main/java/com/pan_american/android/ui/resource_management/car_resource/AddCarResourceActivity.kt
  25. 4 3
      app/src/main/java/com/pan_american/android/ui/resource_management/guide_resource/AddGuideResourceActivity.kt
  26. 2 1
      app/src/main/java/com/pan_american/android/ui/resource_management/hotel_resource/AddHotelResourceActivity.kt
  27. 17 0
      app/src/main/java/com/pan_american/android/ui/workspace/WorkspaceFragment.kt
  28. 11 13
      app/src/main/java/com/pan_american/android/util/CommitButton.kt
  29. 192 0
      app/src/main/res/layout/activity_material_operate.xml
  30. 60 0
      app/src/main/res/layout/fragment_workspace.xml
  31. 245 0
      app/src/main/res/layout/item_material_list.xml
  32. 11 6
      app/src/main/res/layout/item_visit_history_list.xml
  33. 二进制
      app/src/main/res/mipmap-xxhdpi/icon_material_opterate.png
  34. 24 6
      app/src/main/res/values/strings.xml

+ 1 - 0
app/build.gradle

@@ -63,6 +63,7 @@ dependencies {
 
     implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
     implementation 'androidx.recyclerview:recyclerview:1.3.1'
+    implementation 'androidx.activity:activity:1.9.0'
 
     testImplementation 'junit:junit:4.13.2'
 

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

@@ -14,7 +14,6 @@
     <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
     <uses-permission android:name="android.permission.WAKE_LOCK" />
     <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
-
     <uses-permission
         android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
         android:maxSdkVersion="32"
@@ -36,6 +35,10 @@
         android:supportsRtl="true"
         android:theme="@style/AppTheme"
         tools:targetApi="31">
+        <activity
+            android:name=".ui.personnel_module.materials_operate.MaterialOperateActivity"
+            android:exported="false"
+            android:launchMode="singleTop" />
         <activity
             android:name=".ui.group_common.commission_confirm.CommissionConfirmActivity"
             android:exported="false"

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

@@ -11,6 +11,7 @@ import com.pan_american.android.data.model.group_management.group_info.entity.Gr
 import com.pan_american.android.data.model.group_management.group_info.network.GroupOperationRequest
 import com.pan_american.android.data.model.login.entity.Authority
 import com.pan_american.android.data.model.login.entity.UserInfo
+import com.pan_american.android.data.model.personnel_module.materials_operate.entity.MaterialTypeData
 
 class OASystem : Application() {
 
@@ -112,6 +113,9 @@ class OASystem : Application() {
 
         var marketSalesRevenueDateList = ArrayList<YearQuarterlyData>()
 
+        //物资进销存,基础数据源
+        var materialBaseData = ArrayList<MaterialTypeData>()
+
         //导游地接资料,导游地接类型
         val guideResourceGuideType = listOf(Selector().apply {
             id = 0
@@ -262,6 +266,9 @@ class OASystem : Application() {
         //提成确认
         const val COMMISSION_CONFIRM = 188
 
+        //物资进销存
+        const val MATERIAL_OPERATION = 191
+
         //CTableId
         //酒店预定
         const val C_TABLE_HOTEL_PREDETERMINE = 76

+ 93 - 0
app/src/main/java/com/pan_american/android/data/model/personnel_module/materials_operate/adapter/MaterialListAdapter.kt

@@ -0,0 +1,93 @@
+package com.pan_american.android.data.model.personnel_module.materials_operate.adapter
+
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.widget.ImageView
+import android.widget.TextView
+import androidx.recyclerview.widget.RecyclerView
+import com.pan_american.android.OASystem
+import com.pan_american.android.R
+import com.pan_american.android.data.model.personnel_module.materials_operate.entity.MaterialListItem
+import com.pan_american.android.util.ScrollEditText
+
+class MaterialListAdapter(private val list: ArrayList<MaterialListItem>): RecyclerView.Adapter<MaterialListAdapter.ViewHolder>() {
+
+    lateinit var onItemClickListener: OnItemClickListener
+
+    inner class ViewHolder(view: View): RecyclerView.ViewHolder(view) {
+        val materialName: TextView = view.findViewById(R.id.material_name)
+        val deleteButton: ImageView = view.findViewById(R.id.delete)
+        val materialType: TextView = view.findViewById(R.id.material_type)
+        val materialCount: TextView = view.findViewById(R.id.material_count)
+        val creator: TextView = view.findViewById(R.id.creator)
+        val createTime: TextView = view.findViewById(R.id.create_time)
+        val remark: ScrollEditText = view.findViewById(R.id.remark)
+        val putInStorage: TextView = view.findViewById(R.id.put_in_storage)
+        val usingApplication: TextView = view.findViewById(R.id.using_application)
+    }
+
+    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
+        val view = LayoutInflater.from(OASystem.context).inflate(R.layout.item_material_list, parent, false)
+
+        val viewHolder = ViewHolder(view)
+
+        if (OASystem.authorization(OASystem.MATERIAL_OPERATION, OASystem.EDIT)) {
+            viewHolder.itemView.setOnClickListener {
+                onItemClickListener.onItemClick(viewHolder.absoluteAdapterPosition)
+            }
+        }
+
+        viewHolder.deleteButton.setOnClickListener {
+            onItemClickListener.onItemDelete(viewHolder.absoluteAdapterPosition)
+        }
+
+        viewHolder.putInStorage.setOnClickListener {
+            onItemClickListener.onPutInClick(viewHolder.absoluteAdapterPosition)
+        }
+
+        viewHolder.usingApplication.setOnClickListener {
+            onItemClickListener.onUseClick(viewHolder.absoluteAdapterPosition)
+        }
+
+        return viewHolder
+    }
+
+    override fun getItemCount() = list.size
+
+    override fun onBindViewHolder(holder: ViewHolder, position: Int) {
+
+        holder.apply {
+            list[position].also {
+                materialName.text = it.name
+                materialType.text = it.typeName
+                materialCount.text = it.stockQuantity.toString()
+                creator.text = it.lastUpdateUserName
+                createTime.text = it.lastUpdateTime
+                remark.setText(it.remark)
+            }
+
+            if (OASystem.authorization(OASystem.MATERIAL_OPERATION, OASystem.DELETE)) {
+                deleteButton.visibility = View.VISIBLE
+            } else {
+                deleteButton.visibility = View.GONE
+            }
+
+            if (OASystem.authorization(OASystem.MATERIAL_OPERATION, OASystem.ADD)) {
+                putInStorage.visibility = View.VISIBLE
+            } else {
+                deleteButton.visibility = View.GONE
+            }
+        }
+    }
+
+    interface OnItemClickListener {
+        fun onItemClick(position: Int)
+
+        fun onPutInClick(position: Int)
+
+        fun onUseClick(position: Int)
+
+        fun onItemDelete(position: Int)
+    }
+}

+ 13 - 0
app/src/main/java/com/pan_american/android/data/model/personnel_module/materials_operate/entity/MaterialListItem.kt

@@ -0,0 +1,13 @@
+package com.pan_american.android.data.model.personnel_module.materials_operate.entity
+
+class MaterialListItem {
+
+    var id = 0
+    var lastUpdateTime = ""
+    var lastUpdateUserName = ""
+    var name = ""
+    var remark = ""
+    var stockQuantity = 0.0
+    var type = 0
+    var typeName = ""
+}

+ 14 - 0
app/src/main/java/com/pan_american/android/data/model/personnel_module/materials_operate/entity/MaterialTypeData.kt

@@ -0,0 +1,14 @@
+package com.pan_american.android.data.model.personnel_module.materials_operate.entity
+
+class MaterialTypeData {
+
+    var id = 0
+    var name = ""
+    val subTypeItems = ArrayList<SubTypeItem>()
+
+    inner class SubTypeItem {
+        var id = 0
+        var sTid = 0
+        var name = ""
+    }
+}

+ 9 - 0
app/src/main/java/com/pan_american/android/data/model/personnel_module/materials_operate/network/MaterialBaseDataResponse.kt

@@ -0,0 +1,9 @@
+package com.pan_american.android.data.model.personnel_module.materials_operate.network
+
+import com.pan_american.android.base.BaseResponse
+import com.pan_american.android.data.model.personnel_module.materials_operate.entity.MaterialTypeData
+
+class MaterialBaseDataResponse(val data: Data): BaseResponse() {
+
+    inner class Data(val goodsTypeData: ArrayList<MaterialTypeData>)
+}

+ 9 - 0
app/src/main/java/com/pan_american/android/data/model/personnel_module/materials_operate/network/MaterialSearchRequest.kt

@@ -0,0 +1,9 @@
+package com.pan_american.android.data.model.personnel_module.materials_operate.network
+
+import com.pan_american.android.base.BaseRequest
+
+class MaterialSearchRequest: BaseRequest() {
+
+    var typeIds = ""
+    var goodsName = ""
+}

+ 6 - 0
app/src/main/java/com/pan_american/android/data/model/personnel_module/materials_operate/network/MaterialSearchResponse.kt

@@ -0,0 +1,6 @@
+package com.pan_american.android.data.model.personnel_module.materials_operate.network
+
+import com.pan_american.android.base.BaseResponse
+import com.pan_american.android.data.model.personnel_module.materials_operate.entity.MaterialListItem
+
+class MaterialSearchResponse(val data: ArrayList<MaterialListItem>): BaseResponse()

+ 15 - 0
app/src/main/java/com/pan_american/android/data/network/APIService.kt

@@ -163,6 +163,9 @@ import com.pan_american.android.data.model.message.network.MessageListResponse
 import com.pan_american.android.data.model.message.network.MessageUnReadCountRequest
 import com.pan_american.android.data.model.message.network.MessageUnReadCountResponse
 import com.pan_american.android.data.model.message.network.MessageUnReadTotalResponse
+import com.pan_american.android.data.model.personnel_module.materials_operate.network.MaterialBaseDataResponse
+import com.pan_american.android.data.model.personnel_module.materials_operate.network.MaterialSearchRequest
+import com.pan_american.android.data.model.personnel_module.materials_operate.network.MaterialSearchResponse
 import com.pan_american.android.data.model.resource_management.airplane_three_code.entity.AirplaneThreeCode
 import com.pan_american.android.data.model.resource_management.airplane_three_code.network.AirplaneThreeCodeDetailRequest
 import com.pan_american.android.data.model.resource_management.airplane_three_code.network.AirplaneThreeCodeDetailResponse
@@ -1041,4 +1044,16 @@ interface APIService {
      */
     @POST("api/Financial/RoyaltyConfirmByUser")
     fun updateCommissionConfirmStatus(@Body updateCommissionStatusRequest: UpdateCommissionStatusRequest): Call<BaseResponse>
+
+    /**
+     * 物资进存销,获取基础数据源
+     */
+    @GET("api/PersonnelModule/GoodsInitDataSource")
+    fun getMaterialTypeDataResource(): Call<MaterialBaseDataResponse>
+
+    /**
+     * 物资存销,查询物资列表
+     */
+    @POST("api/PersonnelModule/GoodsList")
+    fun getMaterialList(@Body materialSearchRequest: MaterialSearchRequest): Call<MaterialSearchResponse>
 }

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

@@ -39,6 +39,7 @@ import com.pan_american.android.data.network.APIService
 import com.pan_american.android.data.network.ServiceCreator
 import com.pan_american.android.databinding.ActivityAddNewCustomerBinding
 import com.pan_american.android.databinding.LayoutTitleBinding
+import com.pan_american.android.util.CommitButton
 import retrofit2.Call
 import retrofit2.Callback
 import retrofit2.Response
@@ -768,7 +769,7 @@ class AddNewCustomerActivity : BaseActivity<ActivityAddNewCustomerBinding>() {
 
     private fun updateMarketCustomerInfo() {
 
-        binding.commit.setButtonStatus(1)
+        binding.commit.setButtonStatus(CommitButton.STATUS_IN_COMMITING)
 
         apiService.newClientOperation(marketCustomer).enqueue(object : Callback<BaseResponse> {
             override fun onResponse(call: Call<BaseResponse>, response: Response<BaseResponse>) {
@@ -788,7 +789,7 @@ class AddNewCustomerActivity : BaseActivity<ActivityAddNewCustomerBinding>() {
                     } else {
                         showMessage(baseResponse.msg)
 
-                        binding.commit.setButtonStatus(0)
+                        binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
                     }
                 }
             }

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

@@ -29,6 +29,7 @@ import com.pan_american.android.data.network.APIService
 import com.pan_american.android.data.network.ServiceCreator
 import com.pan_american.android.databinding.ActivityAddDailyPaymentBinding
 import com.pan_american.android.databinding.LayoutTitleBinding
+import com.pan_american.android.util.CommitButton
 import com.pan_american.android.util.MoneyInputFilter
 import com.pan_american.android.util.ScrollEditText
 import retrofit2.Call
@@ -498,7 +499,7 @@ class AddDailyPaymentActivity : BaseActivity<ActivityAddDailyPaymentBinding>() {
 
                 else -> {
 
-                    binding.commit.setButtonStatus(1)
+                    binding.commit.setButtonStatus(CommitButton.STATUS_IN_COMMITING)
 
                     if (fromList) {
                         updateDailyPayment()
@@ -810,7 +811,7 @@ class AddDailyPaymentActivity : BaseActivity<ActivityAddDailyPaymentBinding>() {
                         back()
                     } else {
 
-                        binding.commit.setButtonStatus(0)
+                        binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                         showMessage(baseResponse.msg)
                     }
@@ -819,7 +820,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))
             }

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

@@ -26,6 +26,7 @@ import com.pan_american.android.data.network.APIService
 import com.pan_american.android.data.network.ServiceCreator
 import com.pan_american.android.databinding.ActivityDaliyPaymentListBinding
 import com.pan_american.android.databinding.LayoutTitleBinding
+import com.pan_american.android.util.CommitButton
 import com.scwang.smart.refresh.footer.ClassicsFooter
 import com.scwang.smart.refresh.header.ClassicsHeader
 import com.scwang.smart.refresh.layout.api.RefreshLayout
@@ -405,7 +406,7 @@ class DailyPaymentListActivity : BaseActivity<ActivityDaliyPaymentListBinding>()
 
             dailyPaymentCardListItems.clear()
 
-            binding.commit.setButtonStatus(1)
+            binding.commit.setButtonStatus(CommitButton.STATUS_IN_COMMITING)
 
             initDailyPaymentList(1)
         }
@@ -468,11 +469,11 @@ class DailyPaymentListActivity : BaseActivity<ActivityDaliyPaymentListBinding>()
                             }
                         }
 
-                        binding.commit.setButtonStatus(0)
+                        binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
                     }
 
                     override fun onFailure(call: Call<DailyPaymentListResponse>, t: Throwable) {
-                        binding.commit.setButtonStatus(0)
+                        binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
                         showMessage(resources.getString(R.string.network_error))
                     }
                 })

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

@@ -34,6 +34,7 @@ import com.pan_american.android.data.network.APIService
 import com.pan_american.android.data.network.ServiceCreator
 import com.pan_american.android.databinding.ActivityAddAirplaneTicketBinding
 import com.pan_american.android.databinding.LayoutTitleBinding
+import com.pan_american.android.util.CommitButton
 import com.pan_american.android.util.MoneyInputFilter
 import retrofit2.Call
 import retrofit2.Callback
@@ -1213,7 +1214,7 @@ class AddAirplaneTicketActivity : BaseActivity<ActivityAddAirplaneTicketBinding>
 
     private fun updateAirplaneTicket(status: Int) {
 
-        binding.commit.setButtonStatus(1)
+        binding.commit.setButtonStatus(CommitButton.STATUS_IN_COMMITING)
 
         val updateAirplaneTicketRequest =
             UpdateAirplaneTicketRequest(status, airplaneTicketResource, cardPaymentResource)
@@ -1239,7 +1240,7 @@ class AddAirplaneTicketActivity : BaseActivity<ActivityAddAirplaneTicketBinding>
 
                         } else {
 
-                            binding.commit.setButtonStatus(0)
+                            binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                             showMessage(baseResponse.msg)
                         }
@@ -1248,7 +1249,7 @@ class AddAirplaneTicketActivity : BaseActivity<ActivityAddAirplaneTicketBinding>
 
                 override fun onFailure(call: Call<BaseResponse>, t: Throwable) {
 
-                    binding.commit.setButtonStatus(0)
+                    binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                     showErrorInfo(R.string.update_error)
                 }

+ 4 - 3
app/src/main/java/com/pan_american/android/ui/group_invite_official/invite_data/AddInviteDataActivity.kt

@@ -47,6 +47,7 @@ import com.pan_american.android.data.network.APIService
 import com.pan_american.android.data.network.ServiceCreator
 import com.pan_american.android.databinding.ActivityAddInviteDataBinding
 import com.pan_american.android.databinding.LayoutTitleBinding
+import com.pan_american.android.util.CommitButton
 import okhttp3.MediaType
 import okhttp3.MultipartBody
 import okhttp3.RequestBody
@@ -676,7 +677,7 @@ class AddInviteDataActivity : BaseActivity<ActivityAddInviteDataBinding>() {
 
     private fun updateInviteData() {
 
-        binding.commit.setButtonStatus(1)
+        binding.commit.setButtonStatus(CommitButton.STATUS_IN_COMMITING)
 
         val requestBody = MultipartBody.Builder().setType(MultipartBody.FORM).apply {
             addFormDataPart("Id", updateInviteDataDetailRequest.id.toString())
@@ -729,7 +730,7 @@ class AddInviteDataActivity : BaseActivity<ActivityAddInviteDataBinding>() {
 
                     } else {
 
-                        binding.commit.setButtonStatus(0)
+                        binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                         showMessage(updateResponse.msg)
                     }
@@ -739,7 +740,7 @@ class AddInviteDataActivity : BaseActivity<ActivityAddInviteDataBinding>() {
 
             override fun onFailure(call: Call<BaseResponse>, t: Throwable) {
 
-                binding.commit.setButtonStatus(0)
+                binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                 showErrorInfo(R.string.update_error)
             }

+ 4 - 4
app/src/main/java/com/pan_american/android/ui/group_invite_official/invite_official_payment_insert/AddInvitePaymentActivity.kt

@@ -30,6 +30,7 @@ import com.pan_american.android.data.network.APIService
 import com.pan_american.android.data.network.ServiceCreator
 import com.pan_american.android.databinding.ActivityAddInvitePaymentBinding
 import com.pan_american.android.databinding.LayoutTitleBinding
+import com.pan_american.android.util.CommitButton
 import com.pan_american.android.util.MoneyInputFilter
 import retrofit2.Call
 import retrofit2.Callback
@@ -1281,7 +1282,7 @@ class AddInvitePaymentActivity : BaseActivity<ActivityAddInvitePaymentBinding>()
 
     private fun updateInvitePayment(type: Int) {
 
-        binding.commit.setButtonStatus(1)
+        binding.commit.setButtonStatus(CommitButton.STATUS_IN_COMMITING)
 
         apiService.inviteOfficialPaymentOperate(updateInviteOfficialRequest)
             .enqueue(object : Callback<BaseResponse> {
@@ -1303,8 +1304,7 @@ class AddInvitePaymentActivity : BaseActivity<ActivityAddInvitePaymentBinding>()
                             back()
 
                         } else {
-
-                            binding.commit.setButtonStatus(0)
+                            binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                             showMessage(baseResponse.msg)
                         }
@@ -1313,7 +1313,7 @@ class AddInvitePaymentActivity : BaseActivity<ActivityAddInvitePaymentBinding>()
 
                 override fun onFailure(call: Call<BaseResponse>, t: Throwable) {
 
-                    binding.commit.setButtonStatus(0)
+                    binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                     showErrorInfo(R.string.update_error)
                 }

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

@@ -28,6 +28,7 @@ import com.pan_american.android.data.network.APIService
 import com.pan_american.android.data.network.ServiceCreator
 import com.pan_american.android.databinding.ActivityAddGroupOpPaymentBinding
 import com.pan_american.android.databinding.LayoutTitleBinding
+import com.pan_american.android.util.CommitButton
 import retrofit2.Call
 import retrofit2.Callback
 import retrofit2.Response
@@ -565,7 +566,7 @@ class AddGroundConveyInfoActivity : BaseActivity<ActivityAddGroupOpPaymentBindin
 
     private fun updateGroundConvey() {
 
-        binding.commit.setButtonStatus(1)
+        binding.commit.setButtonStatus(CommitButton.STATUS_IN_COMMITING)
 
         apiService.updateGroundConvey(updateGroundConveyRequest)
             .enqueue(object : Callback<BaseResponse> {
@@ -589,7 +590,7 @@ class AddGroundConveyInfoActivity : BaseActivity<ActivityAddGroupOpPaymentBindin
 
                         } else {
 
-                            binding.commit.setButtonStatus(0)
+                            binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                             showMessage(baseResponse.msg)
                         }
@@ -598,7 +599,7 @@ class AddGroundConveyInfoActivity : BaseActivity<ActivityAddGroupOpPaymentBindin
 
                 override fun onFailure(call: Call<BaseResponse>, t: Throwable) {
 
-                    binding.commit.setButtonStatus(0)
+                    binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                     showErrorInfo(R.string.update_error)
                 }

+ 4 - 3
app/src/main/java/com/pan_american/android/ui/group_op/ground_convey_payment_insert/GroundConveyPaymentDetailActivity.kt

@@ -37,6 +37,7 @@ import com.pan_american.android.data.network.APIService
 import com.pan_american.android.data.network.ServiceCreator
 import com.pan_american.android.databinding.ActivityGroundConveyPaymentDetailBinding
 import com.pan_american.android.databinding.LayoutTitleBinding
+import com.pan_american.android.util.CommitButton
 import retrofit2.Call
 import retrofit2.Callback
 import retrofit2.Response
@@ -820,7 +821,7 @@ class GroundConveyPaymentDetailActivity : BaseActivity<ActivityGroundConveyPayme
 
     private fun updateGroundConveyDetail() {
 
-        binding.commit.setButtonStatus(1)
+        binding.commit.setButtonStatus(CommitButton.STATUS_IN_COMMITING)
 
         for (item in carTouristGuides) {
             if (item.isNew) {
@@ -868,7 +869,7 @@ class GroundConveyPaymentDetailActivity : BaseActivity<ActivityGroundConveyPayme
                             back()
                         } else {
 
-                            binding.commit.setButtonStatus(0)
+                            binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                             showMessage(updateResponse.msg)
                         }
@@ -877,7 +878,7 @@ class GroundConveyPaymentDetailActivity : BaseActivity<ActivityGroundConveyPayme
 
                 override fun onFailure(call: Call<BaseResponse>, t: Throwable) {
 
-                    binding.commit.setButtonStatus(0)
+                    binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                     showErrorInfo(R.string.update_error)
                 }

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

@@ -25,6 +25,7 @@ import com.pan_american.android.data.network.APIService
 import com.pan_american.android.data.network.ServiceCreator
 import com.pan_american.android.databinding.ActivityAddInsurancePaymentBinding
 import com.pan_american.android.databinding.LayoutTitleBinding
+import com.pan_american.android.util.CommitButton
 import com.pan_american.android.util.MoneyInputFilter
 import retrofit2.Call
 import retrofit2.Callback
@@ -723,7 +724,7 @@ class AddInsurancePaymentActivity : BaseActivity<ActivityAddInsurancePaymentBind
 
     private fun updateInsurancePayment() {
 
-        binding.commit.setButtonStatus(1)
+        binding.commit.setButtonStatus(CommitButton.STATUS_IN_COMMITING)
 
         apiService.updateInsurancePayment(updateInsurancePaymentRequest)
             .enqueue(object : Callback<BaseResponse> {
@@ -747,7 +748,7 @@ class AddInsurancePaymentActivity : BaseActivity<ActivityAddInsurancePaymentBind
 
                         } else {
 
-                            binding.commit.setButtonStatus(0)
+                            binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                             showMessage(baseResponse.msg)
                         }
@@ -756,7 +757,7 @@ class AddInsurancePaymentActivity : BaseActivity<ActivityAddInsurancePaymentBind
 
                 override fun onFailure(call: Call<BaseResponse>, t: Throwable) {
 
-                    binding.commit.setButtonStatus(0)
+                    binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                     showErrorInfo(R.string.update_error)
                 }

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

@@ -26,6 +26,7 @@ import com.pan_american.android.data.network.APIService
 import com.pan_american.android.data.network.ServiceCreator
 import com.pan_american.android.databinding.ActivityAddVisaPaymentBinding
 import com.pan_american.android.databinding.LayoutTitleBinding
+import com.pan_american.android.util.CommitButton
 import com.pan_american.android.util.MoneyInputFilter
 import retrofit2.Call
 import retrofit2.Callback
@@ -966,7 +967,7 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
 
     private fun updateVisaPayment() {
 
-        binding.commit.setButtonStatus(1)
+        binding.commit.setButtonStatus(CommitButton.STATUS_IN_COMMITING)
 
         apiService.updateVisaPayment(updateVisaPaymentRequest)
             .enqueue(object : Callback<BaseResponse> {
@@ -990,7 +991,7 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
 
                         } else {
 
-                            binding.commit.setButtonStatus(0)
+                            binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                             showMessage(updateResponse.msg)
                         }
@@ -999,7 +1000,7 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
 
                 override fun onFailure(call: Call<BaseResponse>, t: Throwable) {
 
-                    binding.commit.setButtonStatus(0)
+                    binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                     showErrorInfo(R.string.update_error)
                 }

+ 4 - 3
app/src/main/java/com/pan_american/android/ui/login/LoginActivity.kt

@@ -14,6 +14,7 @@ import com.pan_american.android.data.network.APIService
 import com.pan_american.android.data.network.ServiceCreator
 import com.pan_american.android.databinding.ActivityLoginBinding
 import com.pan_american.android.ui.workspace.WorkspaceActivity
+import com.pan_american.android.util.CommitButton
 import retrofit2.Call
 import retrofit2.Callback
 import retrofit2.Response
@@ -72,7 +73,7 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
 
     private fun login() {
 
-        binding.loginButton.setButtonStatus(1)
+        binding.loginButton.setButtonStatus(CommitButton.STATUS_IN_COMMITING)
 
         val loginRequest =
             LoginRequest(binding.account.text.toString(), binding.password.text.toString())
@@ -93,7 +94,7 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
                         back()
                     } else {
                         //登陆失败重新显示登录按钮
-                        binding.loginButton.setButtonStatus(0)
+                        binding.loginButton.setButtonStatus(CommitButton.STATUS_COMMITTED)
                         showMessage(loginResponse.msg)
                     }
                 }
@@ -102,7 +103,7 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
             override fun onFailure(call: Call<LoginResponse>, t: Throwable) {
 
                 //登陆失败重新显示登录按钮
-                binding.loginButton.setButtonStatus(0)
+                binding.loginButton.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                 showErrorInfo(R.string.login_failed)
             }

+ 410 - 0
app/src/main/java/com/pan_american/android/ui/personnel_module/materials_operate/MaterialOperateActivity.kt

@@ -0,0 +1,410 @@
+package com.pan_american.android.ui.personnel_module.materials_operate
+
+import android.os.Bundle
+import android.view.View
+import android.widget.TextView
+import androidx.core.content.res.ResourcesCompat
+import androidx.recyclerview.widget.LinearLayoutManager
+import com.pan_american.android.OASystem
+import com.pan_american.android.R
+import com.pan_american.android.base.BaseActivity
+import com.pan_american.android.base.ListAdapter
+import com.pan_american.android.data.model.personnel_module.materials_operate.adapter.MaterialListAdapter
+import com.pan_american.android.data.model.personnel_module.materials_operate.entity.MaterialListItem
+import com.pan_american.android.data.model.personnel_module.materials_operate.entity.MaterialTypeData
+import com.pan_american.android.data.model.personnel_module.materials_operate.network.MaterialBaseDataResponse
+import com.pan_american.android.data.model.personnel_module.materials_operate.network.MaterialSearchRequest
+import com.pan_american.android.data.model.personnel_module.materials_operate.network.MaterialSearchResponse
+import com.pan_american.android.data.network.APIService
+import com.pan_american.android.data.network.ServiceCreator
+import com.pan_american.android.databinding.ActivityMaterialOperateBinding
+import com.pan_american.android.databinding.LayoutTitleBinding
+import com.pan_american.android.util.CommitButton
+import com.scwang.smart.refresh.footer.ClassicsFooter
+import com.scwang.smart.refresh.header.ClassicsHeader
+import com.scwang.smart.refresh.layout.api.RefreshLayout
+import com.scwang.smart.refresh.layout.listener.OnRefreshLoadMoreListener
+import retrofit2.Call
+import retrofit2.Callback
+import retrofit2.Response
+
+class MaterialOperateActivity : BaseActivity<ActivityMaterialOperateBinding>() {
+
+    private lateinit var titleBinding: LayoutTitleBinding
+
+    private var isHidden = false
+
+    private val apiService = ServiceCreator.create<APIService>()
+
+    private val materialSearchRequest = MaterialSearchRequest()
+
+    private var materialTypeId = 0
+
+    private var materialTypeSelected = false
+
+    private val materialTypeDetail = ArrayList<MaterialTypeData.SubTypeItem>()
+
+    private val materialList = ArrayList<MaterialListItem>()
+
+    private var pageIndex = 1
+
+    private var totalPage = 0
+
+    override fun getViewBinding() = ActivityMaterialOperateBinding.inflate(layoutInflater)
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+
+        initTitle()
+
+        initViews()
+
+        getMaterialBaseDataSource()
+    }
+
+    override fun initTitle() {
+        titleBinding = LayoutTitleBinding.bind(binding.root).apply {
+            titleText.text = resources.getString(R.string.material_operate)
+
+            if (OASystem.authorization(OASystem.MATERIAL_OPERATION, OASystem.ADD)) {
+                rightTextField.visibility = View.VISIBLE
+            }
+
+            rightTextField.text = resources.getString(R.string.add_material)
+
+            rightTextField.setOnClickListener {
+
+            }
+
+            backButton.setOnClickListener {
+                back()
+            }
+        }
+    }
+
+    override fun initViews() {
+        binding.commit.setText(resources.getString(R.string.search))
+
+        binding.materialContainer.setRefreshHeader(ClassicsHeader(OASystem.context))
+        binding.materialContainer.setRefreshFooter(ClassicsFooter(OASystem.context))
+    }
+
+    private fun getMaterialBaseDataSource() {
+        apiService.getMaterialTypeDataResource().enqueue(object : Callback<MaterialBaseDataResponse> {
+            override fun onResponse(
+                call: Call<MaterialBaseDataResponse>,
+                response: Response<MaterialBaseDataResponse>
+            ) {
+
+                val dataSourceResponse = response.body()
+
+                if (dataSourceResponse != null) {
+                    if (dataSourceResponse.code == 200) {
+
+                        OASystem.materialBaseData = dataSourceResponse.data.goodsTypeData
+
+                        initEvents()
+
+                    } else {
+                        showMessage(dataSourceResponse.msg)
+                    }
+                }
+            }
+
+            override fun onFailure(call: Call<MaterialBaseDataResponse>, t: Throwable) {
+                showErrorInfo(R.string.material_base_data_get_error)
+            }
+        })
+    }
+
+    override fun initEvents() {
+        binding.filterSwitch.setOnClickListener {
+            if (isHidden) {
+
+                binding.materialFilter.visibility = View.VISIBLE
+
+                binding.filterSwitch.text = resources.getString(R.string.hide)
+
+                isHidden = false
+
+            } else {
+                binding.materialFilter.visibility = View.GONE
+
+                binding.filterSwitch.text = resources.getString(R.string.show)
+
+                isHidden = true
+            }
+        }
+
+        binding.materialType.setOnClickListener {
+            showSelector {
+                val adapter = ListAdapter.Builder<MaterialTypeData>().apply {
+                    setData(OASystem.materialBaseData)
+                    setLayoutId(R.layout.item_selector)
+                    addBindView { itemView, data ->
+                        itemView.findViewById<TextView>(R.id.selector_item_name).apply {
+                            if (data.id == materialTypeId) {
+                                setTextColor(
+                                    ResourcesCompat.getColor(
+                                        resources,
+                                        R.color.text_color_blue,
+                                        null
+                                    )
+                                )
+                            } else {
+                                setTextColor(
+                                    ResourcesCompat.getColor(
+                                        resources,
+                                        R.color.text_color,
+                                        null
+                                    )
+                                )
+                            }
+
+                            text = data.name
+                        }
+                    }
+                }.create()
+
+                selector.adapter = adapter
+
+                adapter.onRecyclerViewItemClick = object : ListAdapter.OnRecyclerViewItemClick<MaterialTypeData> {
+                    override fun onItemClick(position: Int) {
+
+                        OASystem.materialBaseData[position].apply {
+
+                            if (materialTypeId != id) {
+                                materialTypeId = id
+
+                                binding.materialType.text = name
+
+                                materialTypeDetail.clear()
+
+                                binding.detailType.text = ""
+                            }
+
+                            materialTypeSelected = true
+
+                            popupWindow.dismiss()
+                        }
+                    }
+                }
+            }
+        }
+
+        binding.detailType.setOnClickListener {
+
+            if (materialTypeSelected) {
+                val subTypeItem = ArrayList<MaterialTypeData.SubTypeItem>()
+
+                showSelector {
+                    val adapter = ListAdapter.Builder<MaterialTypeData.SubTypeItem>().apply {
+                        for (item in OASystem.materialBaseData) {
+                            if (materialTypeId == item.id) {
+                                subTypeItem.clear()
+
+                                subTypeItem.addAll(item.subTypeItems)
+
+                                setData(subTypeItem)
+                            }
+                        }
+
+                        setLayoutId(R.layout.item_selector)
+
+                        addBindView { itemView, data ->
+                            itemView.findViewById<TextView>(R.id.selector_item_name).apply {
+
+                                if (materialTypeDetail.contains(data)) {
+                                    setTextColor(
+                                        ResourcesCompat.getColor(
+                                            resources,
+                                            R.color.text_color_blue,
+                                            null
+                                        )
+                                    )
+                                } else {
+                                    setTextColor(
+                                        ResourcesCompat.getColor(
+                                            resources,
+                                            R.color.text_color,
+                                            null
+                                        )
+                                    )
+                                }
+
+                                text = data.name
+                            }
+                        }
+                    }.create()
+
+                    selector.adapter = adapter
+
+                    adapter.onRecyclerViewItemClick = object : ListAdapter.OnRecyclerViewItemClick<MaterialTypeData.SubTypeItem> {
+                        override fun onItemClick(position: Int) {
+
+                            subTypeItem[position].apply {
+
+                                if (materialTypeDetail.contains(this)) {
+                                    materialTypeDetail.remove(this)
+                                } else {
+                                    materialTypeDetail.add(this)
+                                }
+
+                                var detailTypeText = ""
+
+                                for (item in materialTypeDetail) {
+                                    detailTypeText += item.name
+                                    detailTypeText += "\t"
+                                }
+
+                                binding.detailType.text = detailTypeText.trim()
+
+                                popupWindow.dismiss()
+                            }
+
+                        }
+                    }
+                }
+            } else {
+                showMessage(resources.getString(R.string.material_type_select_hint))
+            }
+        }
+
+        binding.commit.setOnClickListener {
+
+            binding.commit.setButtonStatus(CommitButton.STATUS_IN_COMMITING)
+
+            if (materialList.size != 0) {
+                materialList.clear()
+                binding.materialList.adapter!!.notifyItemRangeRemoved(0, materialList.size)
+            }
+
+            materialSearchRequest.apply {
+                pageIndex = this@MaterialOperateActivity.pageIndex
+                pageSize = 10
+
+                for (item in materialTypeDetail) {
+                    typeIds += item.name
+                    typeIds += ","
+                }
+
+                typeIds.substringBeforeLast(",")
+
+                goodsName = binding.materialName.text.toString()
+            }
+
+            materialSearch(1)
+        }
+    }
+
+    private fun materialSearch(type: Int) {
+        apiService.getMaterialList(materialSearchRequest).enqueue(object : Callback<MaterialSearchResponse> {
+            override fun onResponse(
+                call: Call<MaterialSearchResponse>,
+                response: Response<MaterialSearchResponse>
+            ) {
+                val listResponse = response.body()
+
+                if (listResponse != null) {
+                    if (listResponse.code == 200) {
+
+                        for (item in listResponse.data) {
+                            materialList.add(item)
+                        }
+
+                        if (materialList.size == 0) {
+                            showMessage(resources.getString(R.string.no_data))
+                        }
+
+                        when(type) {
+
+                            1 -> {
+                                totalPage = getTotalPage(listResponse.count)
+                                binding.materialContainer.setEnableLoadMore(pageIndex < totalPage)
+                                initList()
+                            }
+
+                            2 -> {
+                                binding.materialContainer.finishRefresh()
+                                totalPage = getTotalPage(listResponse.count)
+                                binding.materialContainer.setEnableLoadMore(pageIndex < totalPage)
+                                initList()
+                            }
+
+                            3 -> {
+                                binding.materialContainer.finishLoadMore()
+                                binding.materialContainer.setEnableLoadMore(pageIndex < totalPage)
+                                binding.materialList.adapter!!.notifyItemInserted(materialList.size)
+                            }
+                        }
+                    } else {
+                        showMessage(listResponse.msg)
+                    }
+
+                    binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
+                }
+            }
+
+            override fun onFailure(call: Call<MaterialSearchResponse>, t: Throwable) {
+                binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
+
+                showErrorInfo(R.string.material_search_error)
+            }
+        })
+    }
+
+    private fun getTotalPage(dataCount: Int): Int {
+        var totalPage = dataCount / 10
+        if (dataCount % 10 != 0) {
+            totalPage++
+        }
+
+        return totalPage
+    }
+
+    private fun initList() {
+
+        val layoutManager = LinearLayoutManager(OASystem.context)
+        binding.materialList.layoutManager = layoutManager
+
+        val adapter = MaterialListAdapter(materialList)
+
+        binding.materialList.adapter = adapter
+
+        adapter.onItemClickListener = object : MaterialListAdapter.OnItemClickListener {
+            override fun onItemClick(position: Int) {
+
+            }
+
+            override fun onPutInClick(position: Int) {
+
+            }
+
+            override fun onUseClick(position: Int) {
+
+            }
+
+            override fun onItemDelete(position: Int) {
+
+            }
+        }
+
+        binding.materialContainer.setOnRefreshLoadMoreListener(object : OnRefreshLoadMoreListener {
+            override fun onRefresh(refreshLayout: RefreshLayout) {
+                pageIndex = 1
+                materialSearchRequest.pageIndex = pageIndex
+                binding.materialList.adapter!!.notifyItemRangeRemoved(0, materialList.size)
+                materialList.clear()
+                materialSearch(2)
+            }
+
+            override fun onLoadMore(refreshLayout: RefreshLayout) {
+                if (pageIndex < totalPage) {
+                    pageIndex += 1
+                    materialSearchRequest.pageIndex = pageIndex
+                    materialSearch(3)
+                }
+            }
+        })
+    }
+}

+ 4 - 3
app/src/main/java/com/pan_american/android/ui/resource_management/airplane_three_code/AddAirplaneThreeCodeActivity.kt

@@ -12,6 +12,7 @@ import com.pan_american.android.data.network.APIService
 import com.pan_american.android.data.network.ServiceCreator
 import com.pan_american.android.databinding.ActivityAddAirplaneThreeCodeBinding
 import com.pan_american.android.databinding.LayoutTitleBinding
+import com.pan_american.android.util.CommitButton
 import retrofit2.Call
 import retrofit2.Callback
 import retrofit2.Response
@@ -170,7 +171,7 @@ class AddAirplaneThreeCodeActivity : BaseActivity<ActivityAddAirplaneThreeCodeBi
 
     private fun updateAirplaneResource() {
 
-        binding.commit.setButtonStatus(1)
+        binding.commit.setButtonStatus(CommitButton.STATUS_IN_COMMITING)
 
         apiService.airplaneThreeCodeOperation(airplaneThreeCode)
             .enqueue(object : Callback<BaseResponse> {
@@ -192,7 +193,7 @@ class AddAirplaneThreeCodeActivity : BaseActivity<ActivityAddAirplaneThreeCodeBi
 
                         } else {
 
-                            binding.commit.setButtonStatus(0)
+                            binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                             showMessage(baseResponse.msg)
                         }
@@ -201,7 +202,7 @@ class AddAirplaneThreeCodeActivity : BaseActivity<ActivityAddAirplaneThreeCodeBi
 
                 override fun onFailure(call: Call<BaseResponse>, t: Throwable) {
 
-                    binding.commit.setButtonStatus(0)
+                    binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                     showErrorInfo(R.string.update_error)
                 }

+ 3 - 2
app/src/main/java/com/pan_american/android/ui/resource_management/car_resource/AddCarResourceActivity.kt

@@ -16,6 +16,7 @@ import com.pan_american.android.data.network.APIService
 import com.pan_american.android.data.network.ServiceCreator
 import com.pan_american.android.databinding.ActivityAddCarResourceBinding
 import com.pan_american.android.databinding.LayoutTitleBinding
+import com.pan_american.android.util.CommitButton
 import retrofit2.Call
 import retrofit2.Callback
 import retrofit2.Response
@@ -202,7 +203,7 @@ class AddCarResourceActivity : BaseActivity<ActivityAddCarResourceBinding>() {
                 }
 
                 else -> {
-                    binding.commit.setButtonStatus(1)
+                    binding.commit.setButtonStatus(CommitButton.STATUS_IN_COMMITING)
 
                     initCarResource()
 
@@ -332,7 +333,7 @@ class AddCarResourceActivity : BaseActivity<ActivityAddCarResourceBinding>() {
                     } else {
                         showMessage(baseResponse.msg)
 
-                        binding.commit.setButtonStatus(0)
+                        binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
                     }
                 }
             }

+ 4 - 3
app/src/main/java/com/pan_american/android/ui/resource_management/guide_resource/AddGuideResourceActivity.kt

@@ -17,6 +17,7 @@ import com.pan_american.android.data.network.APIService
 import com.pan_american.android.data.network.ServiceCreator
 import com.pan_american.android.databinding.ActivityAddGuideResourceBinding
 import com.pan_american.android.databinding.LayoutTitleBinding
+import com.pan_american.android.util.CommitButton
 import retrofit2.Call
 import retrofit2.Callback
 import retrofit2.Response
@@ -379,7 +380,7 @@ class AddGuideResourceActivity : BaseActivity<ActivityAddGuideResourceBinding>()
 
     private fun updateGuideResourceInfo() {
 
-        binding.commit.setButtonStatus(1)
+        binding.commit.setButtonStatus(CommitButton.STATUS_IN_COMMITING)
 
         val apiService = ServiceCreator.create<APIService>()
 
@@ -400,7 +401,7 @@ class AddGuideResourceActivity : BaseActivity<ActivityAddGuideResourceBinding>()
 
                     } else {
 
-                        binding.commit.setButtonStatus(0)
+                        binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                         showMessage(baseResponse.msg)
                     }
@@ -409,7 +410,7 @@ class AddGuideResourceActivity : BaseActivity<ActivityAddGuideResourceBinding>()
 
             override fun onFailure(call: Call<BaseResponse>, t: Throwable) {
 
-                binding.commit.setButtonStatus(0)
+                binding.commit.setButtonStatus(CommitButton.STATUS_COMMITTED)
 
                 showErrorInfo(R.string.update_error)
             }

+ 2 - 1
app/src/main/java/com/pan_american/android/ui/resource_management/hotel_resource/AddHotelResourceActivity.kt

@@ -15,6 +15,7 @@ import com.pan_american.android.data.network.APIService
 import com.pan_american.android.data.network.ServiceCreator
 import com.pan_american.android.databinding.ActivityAddHotelResourceBinding
 import com.pan_american.android.databinding.LayoutTitleBinding
+import com.pan_american.android.util.CommitButton
 import retrofit2.Call
 import retrofit2.Callback
 import retrofit2.Response
@@ -163,7 +164,7 @@ class AddHotelResourceActivity : BaseActivity<ActivityAddHotelResourceBinding>()
                 }
 
                 else -> {
-                    binding.commit.setButtonStatus(1)
+                    binding.commit.setButtonStatus(CommitButton.STATUS_IN_COMMITING)
 
                     if (fromList) {
                         initHotelResource(2)

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

@@ -33,6 +33,7 @@ import com.pan_american.android.ui.group_op.ground_convey_payment_insert.GroundC
 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.login.LoginActivity
+import com.pan_american.android.ui.personnel_module.materials_operate.MaterialOperateActivity
 import com.pan_american.android.ui.resource_management.airplane_three_code.AirplaneThreeCodeActivity
 import com.pan_american.android.ui.resource_management.car_resource.CarResourceActivity
 import com.pan_american.android.ui.resource_management.guide_resource.GuideResourceActivity
@@ -99,6 +100,17 @@ class WorkspaceFragment : BaseFragment<FragmentWorkspaceBinding>(), OnClickListe
 //                    binding.groupPayment.setOnClickListener(this)
 //                }
 
+                //人事模块
+                OASystem.MATERIAL_OPERATION -> {
+                    if (OASystem.authorization(OASystem.MATERIAL_OPERATION, OASystem.VIEW)) {
+                        if (binding.personnelModule.visibility == View.GONE) {
+                            binding.personnelModule.visibility = View.VISIBLE
+                        }
+                        binding.materialOperate.visibility = View.VISIBLE
+                        binding.materialOperate.setOnClickListener(this)
+                    }
+                }
+
                 //团组酒店
                 OASystem.HOTEL_RESOURCE -> {
                     if (OASystem.authorization(OASystem.HOTEL_RESOURCE, OASystem.VIEW)) {
@@ -316,6 +328,11 @@ class WorkspaceFragment : BaseFragment<FragmentWorkspaceBinding>(), OnClickListe
 //
 //            }
 
+            binding.materialOperate.id -> {
+                val intent = Intent(OASystem.context, MaterialOperateActivity::class.java)
+                startActivity(intent)
+            }
+
             binding.hotelResource.id -> {
                 val intent = Intent(OASystem.context, HotelResourceActivity::class.java)
                 startActivity(intent)

+ 11 - 13
app/src/main/java/com/pan_american/android/util/CommitButton.kt

@@ -11,22 +11,20 @@ import com.pan_american.android.R
 
 class CommitButton(context: Context, attrs: AttributeSet?) : LinearLayout(context, attrs) {
 
-    private val view: View
+    companion object {
+        const val STATUS_IN_COMMITING = 1
+        const val STATUS_COMMITTED = 0
+    }
 
-    private val commitButton: LinearLayout
+    private val view: View = LayoutInflater.from(context).inflate(R.layout.layout_commit_button, this)
 
-    private val commitText: TextView
+    private val commitButton: LinearLayout = view.findViewById(R.id.commit_button)
 
-    private val commitLoading: ProgressBar
+    private val commitText: TextView = view.findViewById(R.id.commit_text)
 
-    private var buttonStatus = 0
+    private val commitLoading: ProgressBar = view.findViewById(R.id.commit_loading)
 
-    init {
-        view = LayoutInflater.from(context).inflate(R.layout.layout_commit_button, this)
-        commitButton = view.findViewById(R.id.commit_button)
-        commitText = view.findViewById(R.id.commit_text)
-        commitLoading = view.findViewById(R.id.commit_loading)
-    }
+    private var buttonStatus = 0
 
     fun setText(text: String) {
         commitText.text = text
@@ -34,7 +32,7 @@ class CommitButton(context: Context, attrs: AttributeSet?) : LinearLayout(contex
 
     fun setButtonStatus(type: Int) {
         when(type) {
-            1 -> {
+            STATUS_IN_COMMITING -> {
 
                 if (buttonStatus == 0) {
                     commitText.visibility = View.GONE
@@ -46,7 +44,7 @@ class CommitButton(context: Context, attrs: AttributeSet?) : LinearLayout(contex
 
             }
 
-            0 -> {
+            STATUS_COMMITTED -> {
 
                 if (buttonStatus == 1) {
                     commitText.visibility = View.VISIBLE

+ 192 - 0
app/src/main/res/layout/activity_material_operate.xml

@@ -0,0 +1,192 @@
+<?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/background_color"
+    android:orientation="vertical"
+    tools:context=".ui.personnel_module.materials_operate.MaterialOperateActivity">
+
+    <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/material_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/material_type"
+                    android:textSize="@dimen/text_size_small" />
+
+                <TextView
+                    android:id="@+id/material_type"
+                    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>
+
+            <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:text="@string/detail_type"
+                    android:textSize="@dimen/text_size_small" />
+
+                <TextView
+                    android:id="@+id/detail_type"
+                    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>
+
+            <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:text="@string/material_name"
+                    android:textSize="@dimen/text_size_small" />
+
+                <EditText
+                    android:id="@+id/material_name"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="@dimen/common_padding"
+                    android:background="@color/white"
+                    android:gravity="end"
+                    android:hint="@string/please_input"
+                    android:importantForAutofill="no"
+                    android:inputType="text"
+                    android:textColor="@color/text_color"
+                    android:textColorHint="@color/hint_text_color"
+                    android:textSize="@dimen/text_size_small" />
+
+            </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/material_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/material_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>

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

@@ -284,6 +284,66 @@
 
             </LinearLayout>
 
+            <LinearLayout
+                android:id="@+id/personnel_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/personnel_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/material_operate"
+                        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/material_operate"
+                            android:textColor="@color/text_color"
+                            android:textSize="@dimen/text_size_medium"
+                            app:drawableStartCompat="@mipmap/icon_material_opterate" />
+
+                    </LinearLayout>
+
+                </LinearLayout>
+
+            </LinearLayout>
+
             <LinearLayout
                 android:id="@+id/group_hotel"
                 android:layout_width="match_parent"

+ 245 - 0
app/src/main/res/layout/item_material_list.xml

@@ -0,0 +1,245 @@
+<?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="wrap_content"
+    android:layout_marginBottom="@dimen/common_padding_huge"
+    android:background="@drawable/shape_corner_stroke_white"
+    android:orientation="vertical"
+    tools:viewBindingIgnore="true">
+
+    <LinearLayout
+        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:layout_marginTop="@dimen/common_padding"
+            android:orientation="horizontal">
+
+            <TextView
+                android:id="@+id/material_name"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginEnd="@dimen/common_padding"
+                android:layout_weight="1"
+                android:textColor="@color/text_color_blue"
+                android:textSize="@dimen/text_size_medium"
+                android:textStyle="bold" />
+
+            <ImageView
+                android:id="@+id/delete"
+                android:layout_width="@dimen/common_padding_heavy"
+                android:layout_height="@dimen/common_padding_heavy"
+                android:layout_marginEnd="@dimen/common_padding"
+                android:src="@mipmap/icon_delete"
+                tools:ignore="ContentDescription" />
+
+        </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:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:text="@string/material_type"
+                android:textSize="@dimen/text_size_medium" />
+
+            <TextView
+                android:id="@+id/material_type"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginStart="@dimen/common_padding"
+                android:layout_weight="1"
+                android:background="@color/white"
+                android:gravity="end"
+                android:singleLine="true"
+                android:textSize="@dimen/text_size_medium" />
+
+        </LinearLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/line"
+            android:layout_marginTop="@dimen/common_padding_huge"
+            android:layout_marginBottom="@dimen/common_padding"
+            android:background="@color/line_color" />
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="@dimen/common_padding"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:text="@string/material_count"
+                android:textSize="@dimen/text_size_medium" />
+
+            <TextView
+                android:id="@+id/material_count"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginStart="@dimen/common_padding"
+                android:layout_weight="1"
+                android:background="@color/white"
+                android:gravity="end"
+                android:singleLine="true"
+                android:textSize="@dimen/text_size_medium" />
+
+        </LinearLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/line"
+            android:layout_marginTop="@dimen/common_padding_huge"
+            android:layout_marginBottom="@dimen/common_padding"
+            android:background="@color/line_color" />
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="@dimen/common_padding"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:text="@string/creator"
+                android:textSize="@dimen/text_size_medium" />
+
+            <TextView
+                android:id="@+id/creator"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginStart="@dimen/common_padding"
+                android:layout_weight="1"
+                android:background="@color/white"
+                android:gravity="end"
+                android:singleLine="true"
+                android:textSize="@dimen/text_size_medium" />
+
+        </LinearLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/line"
+            android:layout_marginTop="@dimen/common_padding_huge"
+            android:layout_marginBottom="@dimen/common_padding"
+            android:background="@color/line_color" />
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="@dimen/common_padding"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:text="@string/create_time"
+                android:textSize="@dimen/text_size_medium" />
+
+            <TextView
+                android:id="@+id/create_time"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginStart="@dimen/common_padding"
+                android:layout_weight="1"
+                android:background="@color/white"
+                android:gravity="end"
+                android:singleLine="true"
+                android:textSize="@dimen/text_size_medium" />
+
+        </LinearLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/line"
+            android:layout_marginTop="@dimen/common_padding_huge"
+            android:layout_marginBottom="@dimen/common_padding"
+            android:background="@color/line_color" />
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="@dimen/common_padding"
+            android:layout_marginBottom="@dimen/common_padding_huge"
+            android:orientation="vertical">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/notes"
+                android:textColorHint="@color/hint_text_color"
+                android:textSize="@dimen/text_size_medium" />
+
+            <com.pan_american.android.util.ScrollEditText
+                android:id="@+id/remark"
+                android:layout_width="match_parent"
+                android:layout_height="80dp"
+                android:layout_marginTop="@dimen/common_padding"
+                android:background="@color/white"
+                android:gravity="end"
+                android:singleLine="true"
+                android:textColorHint="@color/hint_text_color"
+                android:textSize="@dimen/text_size_medium" />
+
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginBottom="@dimen/common_padding_huge"
+            android:orientation="horizontal">
+
+            <TextView
+                android:id="@+id/put_in_storage"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginEnd="@dimen/common_padding"
+                android:layout_weight="1"
+                android:background="@drawable/shape_corner_solid_blue"
+                android:gravity="center"
+                android:padding="@dimen/common_padding_small"
+                android:text="@string/put_in_storage"
+                android:textColor="@color/white"
+                android:textSize="@dimen/text_size_medium" />
+
+            <TextView
+                android:id="@+id/using_application"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="@dimen/common_padding"
+                android:layout_weight="1"
+                android:background="@drawable/shape_corner_solid_blue"
+                android:gravity="center"
+                android:padding="@dimen/common_padding_small"
+                android:text="@string/using_application"
+                android:textColor="@color/white"
+                android:textSize="@dimen/text_size_medium" />
+
+        </LinearLayout>
+
+    </LinearLayout>
+
+</LinearLayout>

+ 11 - 6
app/src/main/res/layout/item_visit_history_list.xml

@@ -24,7 +24,7 @@
             <TextView
                 android:id="@+id/client_name"
                 android:layout_width="0dp"
-                android:layout_height="wrap_content"
+                android:layout_height="match_parent"
                 android:layout_marginEnd="@dimen/common_padding"
                 android:layout_weight="1"
                 android:textColor="@color/text_color_blue"
@@ -64,7 +64,8 @@
             <TextView
                 android:id="@+id/customer_company"
                 android:layout_width="0dp"
-                android:layout_height="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_marginStart="@dimen/common_padding"
                 android:layout_weight="1"
                 android:background="@color/white"
                 android:gravity="end"
@@ -96,7 +97,8 @@
             <TextView
                 android:id="@+id/customer_job_name"
                 android:layout_width="0dp"
-                android:layout_height="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_marginStart="@dimen/common_padding"
                 android:layout_weight="1"
                 android:background="@color/white"
                 android:gravity="end"
@@ -129,7 +131,8 @@
             <TextView
                 android:id="@+id/customer_contact_way"
                 android:layout_width="0dp"
-                android:layout_height="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_marginStart="@dimen/common_padding"
                 android:layout_weight="1"
                 android:background="@color/white"
                 android:gravity="end"
@@ -162,7 +165,8 @@
             <TextView
                 android:id="@+id/visit_start_time"
                 android:layout_width="0dp"
-                android:layout_height="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_marginStart="@dimen/common_padding"
                 android:layout_weight="1"
                 android:background="@color/white"
                 android:gravity="end"
@@ -196,7 +200,8 @@
             <TextView
                 android:id="@+id/visit_end_time"
                 android:layout_width="0dp"
-                android:layout_height="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_marginStart="@dimen/common_padding"
                 android:layout_weight="1"
                 android:background="@color/white"
                 android:gravity="end"

二进制
app/src/main/res/mipmap-xxhdpi/icon_material_opterate.png


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

@@ -177,6 +177,9 @@
     <string name="group_payment_application">团组费用申请</string>
     <string name="exchange_tool">汇率换算</string>
 
+    <string name="personnel_module">人事模块</string>
+    <string name="material_operate">物资进销存</string>
+    
     <string name="group_hotel">团组酒店</string>
     <string name="hotel_predetermine">酒店预订</string>
 
@@ -499,7 +502,7 @@
     <string name="name_spell_generate">生成拼音</string>
     <string name="name_spell_format">%s/%s</string>
     <string name="is_accompany">是否陪同</string>
-    
+
     <string name="berth_notes">舱位备注</string>
     <string name="room_notes">房间备注</string>
     <string name="meal_notes">餐食备注</string>
@@ -736,7 +739,7 @@
     <string name="payment_currency">费用币种</string>
     <string name="over_pay_currency">超支币种</string>
     <string name="payment_percentage_input_hint">请输入正确的付款百分比</string>
-    
+
     <string name="three_food_cost_hint">三公费用: 一人一顿费用 %.2f %s (%.2f %s)</string>
 
     <!-- OP费用款项详情,错误信息 -->
@@ -903,11 +906,11 @@
     <string name="face_book">FaceBook</string>
     <string name="instagram">Instagram</string>
     <string name="association_group">关联团组</string>
-    
+
     <string name="invite_data_document">邀请函文件</string>
     <string name="download_original_invite_data">下载原版文件</string>
     <string name="file_name">文件名称</string>
-    
+
     <string name="association_group_selected_hint">该团组已选择,请勿重复选择</string>
     <string name="invitee_country_input_hint">请输入邀请方国家</string>
     <string name="invitee_city_input_hint">请输入邀请方城市</string>
@@ -1121,13 +1124,13 @@
     <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>
 
     <string name="total_text_format">该时间段提成总额: %.2f</string>
-    
+
     <string name="commission_amount">提成金额</string>
     <string name="commission_detail">提成明细</string>
 
@@ -1136,6 +1139,21 @@
     <string name="commission_confirm_list_get_error">查询提成确认列表失败</string>
     <string name="commission_confirm_status_change_error">提成个人确认失败</string>
 
+    <!-- 物资进销存 -->
+    <string name="material_type">物资类型</string>
+    <string name="detail_type">详细类型</string>
+    <string name="material_name">物资名称</string>
+    <string name="add_material">新增物品</string>
+    <string name="material_count">物资数量</string>
+
+    <string name="put_in_storage">入库</string>
+    <string name="using_application">领用</string>
+
+    <string name="material_type_select_hint">请选择物资类型</string>
+
+    <string name="material_base_data_get_error">物资进存销基础数据源获取失败</string>
+    <string name="material_search_error">物资列表数据查询失败</string>
+
     <!-- TODO: Remove or change this placeholder text -->
     <string name="hello_blank_fragment">Hello blank fragment</string>