Explorar el Código

Merge branch 'developer' of https://gitlab.com/Arisono/SkWeiChat-Baidu into developer

Bitliker hace 7 años
padre
commit
6926e8a53a

+ 13 - 2
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/ClientActivity.java

@@ -216,6 +216,7 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
     private RecyclerView mHonorRecyclerView;
     private SellHonorAdapter mSellHonorAdapter;
     private List<SellHonorBean> mSellHonorBeans;
+    private TextView mHonorEmptyView;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -238,6 +239,8 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
         mSellHonorAdapter = new SellHonorAdapter(mSellHonorBeans);
         mHonorRecyclerView.setAdapter(mSellHonorAdapter);
 
+        mHonorEmptyView = findViewById(R.id.client_sell_honor_empty_tv);
+
         initBarChart();
         initSaleBarChart();
         initListener();
@@ -331,15 +334,23 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
                                     mSellHonorBeans.add(profitsHonor);
 
                                     mSellHonorAdapter.notifyDataSetChanged();
+
+                                    if (mSellHonorBeans.size() > 0) {
+                                        mHonorEmptyView.setVisibility(View.GONE);
+                                    } else {
+                                        mHonorEmptyView.setVisibility(View.VISIBLE);
+                                    }
+                                } else {
+                                    mHonorEmptyView.setVisibility(View.VISIBLE);
                                 }
                             } catch (Exception e) {
-
+                                mHonorEmptyView.setVisibility(View.VISIBLE);
                             }
                         }
 
                         @Override
                         public void onFail(int flag, String failStr) throws Exception {
-
+                            mHonorEmptyView.setVisibility(View.VISIBLE);
                         }
                     });
         } else {

+ 50 - 34
app_core/common/src/main/res/layout/activity_client.xml

@@ -115,6 +115,56 @@
             android:layout_height="match_parent"
             android:orientation="vertical">
 
+            <LinearLayout
+                style="@style/crm_ll_card"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="0dp"
+                android:layout_marginRight="0dp"
+                android:layout_marginTop="10dp">
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal"
+                    android:padding="10dp">
+
+                    <ImageView
+                        android:layout_width="56dp"
+                        android:layout_height="56dp"
+                        android:layout_marginLeft="10dp"
+                        android:src="@drawable/ic_sell_honor" />
+
+                    <TextView
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:padding="5dp"
+                        android:text="@string/Wall_of_Fame_description"
+                        android:textColor="#FF666666"
+                        android:textSize="12sp" />
+                </LinearLayout>
+
+                <FrameLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+
+                    <android.support.v7.widget.RecyclerView
+                        android:id="@+id/client_sell_honor_rv"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content" />
+
+                    <TextView
+                        android:id="@+id/client_sell_honor_empty_tv"
+                        android:layout_width="match_parent"
+                        android:layout_height="200dp"
+                        android:background="@color/white"
+                        android:gravity="center"
+                        android:textSize="12sp"
+                        android:text="暂时没有数据"
+                        android:visibility="gone" />
+                </FrameLayout>
+
+            </LinearLayout>
+
             <!--我的排名-->
             <LinearLayout
                 style="@style/crm_ll_card"
@@ -1076,40 +1126,6 @@
 
             </LinearLayout>
 
-            <LinearLayout
-                style="@style/crm_ll_card"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="0dp"
-                android:layout_marginRight="0dp"
-                android:layout_marginTop="10dp">
-
-                <LinearLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:orientation="horizontal"
-                    android:padding="10dp">
-
-                    <ImageView
-                        android:layout_width="56dp"
-                        android:layout_height="56dp"
-                        android:layout_marginLeft="10dp"
-                        android:src="@drawable/ic_sell_honor" />
-
-                    <TextView
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:padding="5dp"
-                        android:text="@string/Wall_of_Fame_description"
-                        android:textColor="#FF666666"
-                        android:textSize="12sp" />
-                </LinearLayout>
-
-                <android.support.v7.widget.RecyclerView
-                    android:id="@+id/client_sell_honor_rv"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content" />
-            </LinearLayout>
-
         </LinearLayout>
     </com.handmark.pulltorefresh.library.PullToRefreshScrollView>
 

+ 2 - 1
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/BusinessDetailActivty.java

@@ -138,7 +138,8 @@ public class BusinessDetailActivty extends BaseActivity {
                         .putExtra("id", holder.bc_id)
                 );*/
                 try {
-                    Business business = mData.get(position);
+                    int itemAtPosition = (int) parent.getItemIdAtPosition(position);
+                    Business business = mData.get(itemAtPosition);
                     startActivity(new Intent(mContext, BusinessDetailNewActivity.class)
                             .putExtra("id", business.getBc_id())
                             .putExtra("type", mBusinessType)