Bläddra i källkod

2024-09-02 修改

修改:
1. 市场客户资料 负责人筛选 逻辑更改,仅经理和张总可以进行筛选
2. 市场客户资料 UI逻辑修改
zhaiy 7 månader sedan
förälder
incheckning
1ef529dce7

+ 7 - 0
app/src/main/java/com/pan_american/android/data/model/customer_resource/company_customer/network/CompanyCustomerBaseDataRequest.kt

@@ -0,0 +1,7 @@
+package com.pan_american.android.data.model.customer_resource.company_customer.network
+
+import com.pan_american.android.OASystem
+
+class CompanyCustomerBaseDataRequest(val portType: Int = 2) {
+    val userId = OASystem.userInfo.userId
+}

+ 0 - 3
app/src/main/java/com/pan_american/android/data/model/customer_resource/company_customer/network/CustomerSiftRequest.kt

@@ -1,3 +0,0 @@
-package com.pan_american.android.data.model.customer_resource.company_customer.network
-
-class CustomerSiftRequest(val id: Int)

+ 2 - 1
app/src/main/java/com/pan_american/android/data/network/APIService.kt

@@ -29,6 +29,7 @@ import com.pan_american.android.data.model.customer_resource.company_customer.en
 import com.pan_american.android.data.model.customer_resource.company_customer.network.BatchAssignmentRequest
 import com.pan_american.android.data.model.customer_resource.company_customer.network.BusinessCardInfoRequest
 import com.pan_american.android.data.model.customer_resource.company_customer.network.BusinessCardInfoResponse
+import com.pan_american.android.data.model.customer_resource.company_customer.network.CompanyCustomerBaseDataRequest
 import com.pan_american.android.data.model.customer_resource.company_customer.network.GroupInfoResponse
 import com.pan_american.android.data.model.customer_resource.company_customer.network.MarketCustomerDetailRequest
 import com.pan_american.android.data.model.customer_resource.company_customer.network.MarketCustomerDetailResponse
@@ -387,7 +388,7 @@ interface APIService {
      * 市场客户资料,基础数据源
      */
     @POST("/api/MarketCustomerResources/MarketCustomerInit")
-    fun marketCustomerQuerySelectData(@Body baseRequest: BaseRequest): Call<MarketCustomerSiftListResponse>
+    fun marketCustomerQuerySelectData(@Body companyCustomerBaseDataRequest: CompanyCustomerBaseDataRequest): Call<MarketCustomerSiftListResponse>
 
     /**
      * 市场客户资料,批量客户指派

+ 1 - 1
app/src/main/java/com/pan_american/android/ui/customer_resource/company_customer/CustomerSiftFragment.kt

@@ -139,7 +139,7 @@ class CustomerSiftFragment : BaseFragment<FragmentCustomerFilterBinding>() {
 
         initServiceClass()
 
-        if (OASystem.userInfo.userId != 21) {
+        if (OASystem.userInfo.userId != 21 && OASystem.userInfo.userId != 95) {
             binding.director.visibility = View.GONE
         }
     }

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

@@ -18,7 +18,6 @@ import androidx.recyclerview.widget.StaggeredGridLayoutManager
 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.BaseRequest
 import com.pan_american.android.base.BaseResponse
 import com.pan_american.android.base.ListAdapter
 import com.pan_american.android.data.model.common.entity.SiftListItem
@@ -26,6 +25,7 @@ import com.pan_american.android.data.model.customer_resource.company_customer.ad
 import com.pan_american.android.data.model.customer_resource.company_customer.entity.MarketCustomer
 import com.pan_american.android.data.model.customer_resource.company_customer.entity.MarketCustomerListItem
 import com.pan_american.android.data.model.customer_resource.company_customer.network.BatchAssignmentRequest
+import com.pan_american.android.data.model.customer_resource.company_customer.network.CompanyCustomerBaseDataRequest
 import com.pan_american.android.data.model.customer_resource.company_customer.network.MarketCustomerRequest
 import com.pan_american.android.data.model.customer_resource.company_customer.network.MarketCustomerResponse
 import com.pan_american.android.data.model.customer_resource.company_customer.network.MarketCustomerSiftListResponse
@@ -273,7 +273,7 @@ class MarketCustomerActivity : BaseActivity<ActivityMarketCustomerBinding>() {
     }
 
     private fun initCustomerSiftList() {
-        apiService.marketCustomerQuerySelectData(BaseRequest())
+        apiService.marketCustomerQuerySelectData(CompanyCustomerBaseDataRequest())
             .enqueue(object : Callback<MarketCustomerSiftListResponse> {
                 override fun onResponse(
                     call: Call<MarketCustomerSiftListResponse>,