Browse Source

Merge remote-tracking branch 'origin/developer' into developer

# Conflicts:
#	WeiChat/src/main/AndroidManifest.xml
#	WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/fragment/WorksFragment.java
Bitliker 9 years ago
parent
commit
b2dddcb6c6
55 changed files with 5224 additions and 144 deletions
  1. 16 15
      WeiChat/src/main/AndroidManifest.xml
  2. 86 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/BusinessActivity.java
  3. 86 4
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/ClientActivity.java
  4. 1 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/CustomerDetailActivity.java
  5. 24 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/CustomerListActivity.java
  6. 161 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/CustomerListSelectActivity.java
  7. 137 5
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/SalesRankingActivity.java
  8. 1 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/AddMeetingActivity.java
  9. 1 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/fragment/WorksFragment.java
  10. 1 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/net/ViewUtil.java
  11. 1 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/message/MessageFragment.java
  12. 13 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/view/FunnelView.java
  13. 228 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/BottomPopup.java
  14. 304 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/ConfirmPopup.java
  15. 542 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/ConvertUtils.java
  16. 411 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/DatePicker.java
  17. 287 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/DateUtils.java
  18. 322 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/LogUtils.java
  19. 172 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/Popup.java
  20. 111 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/ScreenUtils.java
  21. 106 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/WheelPicker.java
  22. 616 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/WheelView.java
  23. BIN
      WeiChat/src/main/res/drawable-hdpi/icon_date.png
  24. BIN
      WeiChat/src/main/res/drawable-hdpi/icon_select.png
  25. BIN
      WeiChat/src/main/res/drawable-hdpi/icon_sunzhang.png
  26. BIN
      WeiChat/src/main/res/drawable-hdpi/icon_touxiang.png
  27. 2 2
      WeiChat/src/main/res/drawable/oa_rb_button_bg.xml
  28. 2 2
      WeiChat/src/main/res/drawable/select_weixin_list_item.xml
  29. 1 1
      WeiChat/src/main/res/drawable/shape_btn_bussine.xml
  30. 8 0
      WeiChat/src/main/res/drawable/shape_pop_ll.xml
  31. 2 2
      WeiChat/src/main/res/drawable/tab_signin_play.xml
  32. 0 1
      WeiChat/src/main/res/layout/activity_add_meet_main.xml
  33. 347 6
      WeiChat/src/main/res/layout/activity_customer_detail.xml
  34. 1 1
      WeiChat/src/main/res/layout/activity_customer_list.xml
  35. 35 6
      WeiChat/src/main/res/layout/activity_customer_list_select.xml
  36. 334 6
      WeiChat/src/main/res/layout/activity_customer_mutil_select.xml
  37. 40 41
      WeiChat/src/main/res/layout/activity_login.xml
  38. 28 22
      WeiChat/src/main/res/layout/activity_sales_ranking.xml
  39. 3 3
      WeiChat/src/main/res/layout/activity_signin_set.xml
  40. 401 7
      WeiChat/src/main/res/layout/activity_visit_report_add.xml
  41. 202 6
      WeiChat/src/main/res/layout/activity_visit_report_plan.xml
  42. 2 1
      WeiChat/src/main/res/layout/activity_work_logs.xml
  43. 18 0
      WeiChat/src/main/res/layout/item_pop_list.xml
  44. 82 0
      WeiChat/src/main/res/layout/item_sale_ranking.xml
  45. 14 0
      WeiChat/src/main/res/layout/pop_crm_list.xml
  46. 2 1
      WeiChat/src/main/res/layout/rating_bar_view.xml
  47. 19 0
      WeiChat/src/main/res/menu/main_customer_top.xml
  48. 9 0
      WeiChat/src/main/res/menu/main_sale_ranking.xml
  49. 19 1
      WeiChat/src/main/res/menu/menu_crm.xml
  50. 1 1
      WeiChat/src/main/res/menu/menu_oa_meeting.xml
  51. 1 1
      WeiChat/src/main/res/menu/menu_oa_signin.xml
  52. 1 0
      WeiChat/src/main/res/values/colors.xml
  53. 2 2
      WeiChat/src/main/res/values/dimens.xml
  54. 1 1
      WeiChat/src/main/res/values/strings.xml
  55. 20 0
      WeiChat/src/main/res/values/styles.xml

+ 16 - 15
WeiChat/src/main/AndroidManifest.xml

@@ -2,7 +2,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.xzjmyk.pm.activity"
     android:versionCode="45"
-    android:versionName="4.5">
+    android:versionName="4.5" >
 
     <uses-sdk
         android:minSdkVersion="11"
@@ -69,7 +69,7 @@
         android:allowBackup="true"
         android:icon="@drawable/uuu"
         android:label="@string/app_name"
-        android:theme="@style/AppTheme">
+        android:theme="@style/AppTheme" >
         <meta-data
             android:name="UMENG_APPKEY"
             android:value="574504a167e58eec520017df" />
@@ -80,7 +80,7 @@
         <!-- 启动页面 -->
         <activity
             android:name=".ui.SplashActivity"
-            android:theme="@style/SplashTheme">
+            android:theme="@style/SplashTheme" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 
@@ -240,7 +240,7 @@
             android:exported="true"
             android:icon="@drawable/ic_chooser"
             android:label="@string/choose_file"
-            android:theme="@style/ChooserTheme">
+            android:theme="@style/ChooserTheme" >
             <intent-filter>
                 <action android:name="android.intent.action.GET_CONTENT" />
 
@@ -257,13 +257,13 @@
             android:enabled="@bool/use_provider"
             android:exported="true"
             android:grantUriPermissions="true"
-            android:permission="android.permission.MANAGE_DOCUMENTS">
+            android:permission="android.permission.MANAGE_DOCUMENTS" >
             <intent-filter>
                 <action android:name="android.content.action.DOCUMENTS_PROVIDER" />
             </intent-filter>
         </provider>
 
-        <receiver android:name=".broadcast.ScrenLockedBroadCastReceiver">
+        <receiver android:name=".broadcast.ScrenLockedBroadCastReceiver" >
             <intent-filter>
                 <action android:name="android.intent.action.SCREEN_OFF" />
                 <action android:name="android.intent.action.SCREEN_ON" />
@@ -290,7 +290,7 @@
         <!-- 用于接收系统消息以保证PushService正常运行 -->
         <receiver
             android:name="com.baidu.android.pushservice.PushServiceReceiver"
-            android:process=":bdservice_v1">
+            android:process=":bdservice_v1" >
             <intent-filter>
                 <action android:name="android.intent.action.BOOT_COMPLETED" />
                 <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
@@ -306,7 +306,7 @@
         <!-- Push服务接收客户端发送的各种请求 -->
         <receiver
             android:name="com.baidu.android.pushservice.RegistrationReceiver"
-            android:process=":bdservice_v1">
+            android:process=":bdservice_v1" >
             <intent-filter>
                 <action android:name="com.baidu.android.pushservice.action.METHOD" />
                 <action android:name="com.baidu.android.pushservice.action.BIND_SYNC" />
@@ -325,7 +325,7 @@
             android:name="com.baidu.android.pushservice.PushService"
             android:exported="true"
             android:persistent="true"
-            android:process=":bdservice_v1">
+            android:process=":bdservice_v1" >
             <intent-filter>
                 <action android:name="com.baidu.android.pushservice.action.PUSH_SERVICE" />
             </intent-filter>
@@ -339,7 +339,7 @@
 
 
         <!-- 此处Receiver名字修改为当前包名路径 -->
-        <receiver android:name=".ui.PushNetMessageReceiver">
+        <receiver android:name=".ui.PushNetMessageReceiver" >
             <intent-filter>
 
                 <!-- 接收push消息 -->
@@ -360,7 +360,7 @@
             </intent-filter>
         </activity>
         -->
-        <activity android:name=".ui.message.SelectCardActivity">
+        <activity android:name=".ui.message.SelectCardActivity" >
             <intent-filter>
                 <action android:name="com.xzjmyk.pm.activity.ui.message.SelectCardActivity" />
             </intent-filter>
@@ -384,7 +384,7 @@
 
         <receiver
             android:name="com.baidu.autoupdatesdk.receiver.BDBroadcastReceiver"
-            android:exported="false">
+            android:exported="false" >
             <intent-filter>
                 <action android:name="com.baidu.autoupdatesdk.ACTION_NEW_UPDATE" />
                 <action android:name="com.baidu.autoupdatesdk.ACTION_DOWNLOAD_COMPLETE" />
@@ -401,7 +401,7 @@
         <activity android:name=".ui.circle.PhoneSelectActivity" />
         <activity android:name=".ui.erp.activity.crm.ClientActivity" />
         <activity android:name=".ui.erp.activity.oa.SigninActivity" />
-        <activity android:name=".ui.erp.activity.oa.AlarmaActivity" />
+        <activity android:name=".ui.erp.activity.oa.OA_AlarmaActivity" />
         <activity android:name=".ui.erp.activity.oa.MeetingActivity" />
         <activity android:name=".ui.erp.activity.oa.AddMeetingActivity" />
         <activity
@@ -430,8 +430,7 @@
         <activity android:name=".ui.erp.activity.crm.CustomerMutilSelectActivity" />
         <activity
             android:name=".ui.erp.activity.crm.SalesRankingActivity"
-            android:label="@string/title_activity_sales_ranking"
-            android:theme="@style/AppTheme.NoActionBar" />
+            android:label="@string/title_activity_sales_ranking" />
         <activity android:name=".ui.erp.activity.crm.VisitReportAddActivity" />
         <activity android:name=".ui.erp.activity.crm.VisitReportPlanActivity" />
         <activity android:name=".ui.erp.activity.crm.AddressSelectActivity" />
@@ -445,6 +444,8 @@
         <activity android:name=".ui.erp.activity.oa.SuperSetActivity" />
         <activity android:name=".ui.erp.activity.oa.AddLogActivity" />
         <activity android:name=".ui.circle.view.SelectLocationActivity"></activity>
+        <activity android:name=".ui.erp.activity.oa.SigninTimeSetActivity"></activity>
+        <activity android:name=".ui.erp.activity.oa.SuperSetActivity"></activity>
     </application>
 
 </manifest>

+ 86 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/BusinessActivity.java

@@ -1,12 +1,21 @@
 package com.xzjmyk.pm.activity.ui.erp.activity.crm;
 
+import android.content.Context;
 import android.content.Intent;
+import android.graphics.drawable.BitmapDrawable;
 import android.os.Bundle;
+import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
+import android.view.ViewGroup;
+import android.view.WindowManager;
+import android.widget.AdapterView;
 import android.widget.Button;
 import android.widget.HorizontalScrollView;
+import android.widget.ListView;
+import android.widget.PopupWindow;
+import android.widget.SimpleAdapter;
 
 import com.alibaba.fastjson.JSON;
 import com.lidroid.xutils.ViewUtils;
@@ -19,7 +28,9 @@ import com.xzjmyk.pm.activity.ui.erp.view.ListViewInScroller;
 import com.xzjmyk.pm.activity.view.FunnelView;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 public class BusinessActivity extends BaseActivity implements View.OnClickListener {
 
@@ -106,7 +117,13 @@ public class BusinessActivity extends BaseActivity implements View.OnClickListen
 
     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
-        return super.onOptionsItemSelected(item);
+        switch (item.getItemId()) {
+            case R.id.crm_data_find:
+                View view = getWindow().findViewById(item.getItemId());
+                showPopupWindow(view);
+                break;
+        }
+        return true;
     }
 
     @Override
@@ -123,4 +140,72 @@ public class BusinessActivity extends BaseActivity implements View.OnClickListen
                 break;
         }
     }
+
+
+    private PopupWindow popupWindow = null;
+
+    public void showPopupWindow(View parent) {
+        View view = null;
+        WindowManager windowManager = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
+        if (popupWindow == null) {
+            LayoutInflater layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+            view = layoutInflater.inflate(R.layout.pop_crm_list, null);
+            ListView plist = (ListView) view.findViewById(R.id.mList);
+            SimpleAdapter adapter = new SimpleAdapter(
+                    this,
+                    getPopData(),
+                    R.layout.item_pop_list,
+                    new String[]{"item_name"}, new int[]{R.id.tv_item_name});
+            plist.setAdapter(adapter);
+            plist.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+                @Override
+                public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+
+                }
+            });
+            popupWindow = new PopupWindow(view, windowManager.getDefaultDisplay().getWidth() / 3, windowManager.getDefaultDisplay().getHeight() / 3);
+        }
+        // 使其聚集
+        popupWindow.setFocusable(true);
+        // 设置允许在外点击消失
+        popupWindow.setOutsideTouchable(true);
+        // 这个是为了点击“返回Back”也能使其消失,并且并不会影响你的背景
+        popupWindow.setBackgroundDrawable(new BitmapDrawable());
+        popupWindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
+        // 显示的位置为:屏幕的宽度的一半-PopupWindow的高度的一半
+        popupWindow.showAsDropDown(parent, windowManager.getDefaultDisplay().getWidth(), 0);
+    }
+
+    private List<Map<String, Object>> getPopData() {
+        List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put("item_name", "时间");
+        list.add(map);
+
+        map = new HashMap<String, Object>();
+        map.put("item_name", "本月");
+        list.add(map);
+
+        map = new HashMap<String, Object>();
+        map.put("item_name", "上月");
+        list.add(map);
+
+        map = new HashMap<String, Object>();
+        map.put("item_name", "本季度");
+        list.add(map);
+
+        map = new HashMap<String, Object>();
+        map.put("item_name", "上季度");
+        list.add(map);
+
+        map = new HashMap<String, Object>();
+        map.put("item_name", "本年度");
+        list.add(map);
+
+        map = new HashMap<String, Object>();
+        map.put("item_name", "上年度");
+        list.add(map);
+
+        return list;
+    }
 }

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

@@ -1,13 +1,22 @@
 package com.xzjmyk.pm.activity.ui.erp.activity.crm;
 
+import android.content.Context;
 import android.content.Intent;
 import android.graphics.Color;
 import android.graphics.Typeface;
+import android.graphics.drawable.BitmapDrawable;
 import android.os.Bundle;
+import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
+import android.view.ViewGroup;
+import android.view.WindowManager;
+import android.widget.AdapterView;
 import android.widget.ImageButton;
+import android.widget.ListView;
+import android.widget.PopupWindow;
+import android.widget.SimpleAdapter;
 
 import com.github.mikephil.charting.charts.BarChart;
 import com.github.mikephil.charting.components.Legend;
@@ -25,11 +34,15 @@ import com.lidroid.xutils.ViewUtils;
 import com.lidroid.xutils.view.annotation.ViewInject;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
+import com.xzjmyk.pm.activity.ui.erp.activity.DetailTaskActivity;
 import com.xzjmyk.pm.activity.ui.erp.activity.crm.BusinessActivity;
 import com.xzjmyk.pm.activity.ui.erp.activity.crm.CustomerListActivity;
 import com.xzjmyk.pm.activity.ui.erp.view.MyMarkerView;
 
 import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @功能:CRM 功能模块
@@ -43,9 +56,9 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
     private ImageButton ib_business;
     @ViewInject(R.id.ib_customer)
     private ImageButton ib_customer;
-    @ViewInject(R.id.crm_chart_bar)
+    @ViewInject(R.id.ib_customer_vistor)
     private ImageButton ib_customer_vistor;
-    @ViewInject(R.id.crm_chart_bar)
+    @ViewInject(R.id.ib_waller)
     private ImageButton ib_waller;
 
     @ViewInject(R.id.crm_chart_bar)
@@ -75,6 +88,7 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
     private void initListener() {
         ib_business.setOnClickListener(this);
         ib_customer.setOnClickListener(this);
+        ib_waller.setOnClickListener(this);
     }
 
     private void initData() {
@@ -152,7 +166,13 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
 
     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
-        return super.onOptionsItemSelected(item);
+        switch (item.getItemId()) {
+            case R.id.crm_add:
+                View view = getWindow().findViewById(item.getItemId());
+                showPopupWindow(view);
+                break;
+        }
+        return true;
     }
 
     @Override
@@ -205,8 +225,70 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
             case R.id.ib_customer_vistor:
                 break;
             case R.id.ib_waller:
-
+                startActivity(new Intent(this, SalesRankingActivity.class));
                 break;
         }
     }
+
+    private PopupWindow popupWindow = null;
+
+    public void showPopupWindow(View parent) {
+        View view = null;
+        WindowManager windowManager = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
+        if (popupWindow == null) {
+            LayoutInflater layoutInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+            view = layoutInflater.inflate(R.layout.pop_crm_list, null);
+            ListView plist = (ListView) view.findViewById(R.id.mList);
+            SimpleAdapter adapter = new SimpleAdapter(
+                    this,
+                    getPopData(),
+                    R.layout.item_pop_list,
+                    new String[]{"item_name"}, new int[]{R.id.tv_item_name});
+            plist.setAdapter(adapter);
+            plist.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+                @Override
+                public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+
+                }
+            });
+            popupWindow = new PopupWindow(view, windowManager.getDefaultDisplay().getWidth() / 3, windowManager.getDefaultDisplay().getHeight() / 3);
+        }
+        // 使其聚集
+        popupWindow.setFocusable(true);
+        // 设置允许在外点击消失
+        popupWindow.setOutsideTouchable(true);
+        // 这个是为了点击“返回Back”也能使其消失,并且并不会影响你的背景
+        popupWindow.setBackgroundDrawable(new BitmapDrawable());
+        popupWindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
+        // 显示的位置为:屏幕的宽度的一半-PopupWindow的高度的一半
+        popupWindow.showAsDropDown(parent, windowManager.getDefaultDisplay().getWidth(), 0);
+    }
+
+
+    private List<Map<String, Object>> getPopData() {
+        List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put("item_name", "新建联系人");
+        list.add(map);
+
+        map = new HashMap<String, Object>();
+        map.put("item_name", "新建商机");
+        list.add(map);
+
+        map = new HashMap<String, Object>();
+        map.put("item_name", "新增预录入客户");
+        list.add(map);
+
+        map = new HashMap<String, Object>();
+        map.put("item_name", "新增任务");
+        list.add(map);
+
+        map = new HashMap<String, Object>();
+        map.put("item_name", "新增分享");
+        list.add(map);
+
+
+        return list;
+    }
 }
+

+ 1 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/CustomerDetailActivity.java

@@ -6,7 +6,7 @@ import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
 
 /**
- * @功能:客户预录入
+ * @功能:客户详情
  * @author:Arisono
  * @param:
  * @return:

+ 24 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/CustomerListActivity.java

@@ -4,6 +4,8 @@ import android.content.Context;
 import android.content.Intent;
 import android.os.Bundle;
 import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.AdapterView;
@@ -64,7 +66,7 @@ public class CustomerListActivity extends BaseActivity {
         mlist.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
             public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-                startActivity(new Intent(ct, BusinessDetailInfoActivity.class));
+                startActivity(new Intent(ct, CustomerDetailActivity.class));
             }
         });
     }
@@ -85,6 +87,27 @@ public class CustomerListActivity extends BaseActivity {
 
     }
 
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        getMenuInflater().inflate(R.menu.main_customer_top, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.crm_data_add:
+                startActivity(new Intent(ct, CustomerAddActivity.class));
+                break;
+            case R.id.crm_data_find:
+                startActivity(new Intent(ct, CustomerListSelectActivity.class));
+                break;
+            case R.id.crm_data_select:
+                startActivity(new Intent(ct, CustomerMutilSelectActivity.class));
+                break;
+        }
+        return true;
+    }
 
     private class BussinessDetailAdapter extends BaseAdapter {
         private Context ct;

+ 161 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/CustomerListSelectActivity.java

@@ -1,16 +1,176 @@
 package com.xzjmyk.pm.activity.ui.erp.activity.crm;
 
-import android.support.v7.app.AppCompatActivity;
+import android.content.Context;
+import android.content.Intent;
 import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.BaseAdapter;
+import android.widget.Button;
+import android.widget.ListView;
+import android.widget.TextView;
 
+import com.handmark.pulltorefresh.library.PullToRefreshBase;
+import com.handmark.pulltorefresh.library.PullToRefreshListView;
+import com.lidroid.xutils.ViewUtils;
+import com.lidroid.xutils.view.annotation.ViewInject;
 import com.xzjmyk.pm.activity.R;
+import com.xzjmyk.pm.activity.bean.crm.Business;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
 
+import java.util.ArrayList;
+
 public class CustomerListSelectActivity extends BaseActivity {
 
+    @ViewInject(R.id.list_business)
+    private PullToRefreshListView mlist;
+    private ArrayList<Business> mData = new ArrayList<Business>();
+    private Context ct;
+    private BussinessDetailAdapter mAdapter;
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_customer_list_select);
+        initView();
+        initData();
+        initListener();
+    }
+
+    private void initView() {
+        ct = this;
+        ViewUtils.inject(this);
+    }
+
+    private void initListener() {
+        mlist.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2<ListView>() {
+            @Override
+            public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {
+
+            }
+
+            @Override
+            public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {
+
+            }
+        });
+        mlist.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+            @Override
+            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+                startActivity(new Intent(ct, CustomerDetailActivity.class));
+            }
+        });
+    }
+
+    private void initData() {
+        for (int i = 0; i < 22; i++) {
+            Business model = new Business();
+            model.setNum("013223" + i);
+            model.setName("xxx" + i);
+            model.setLeader("****" + i);
+            model.setNote("xxxxxxxxxxxx" + i);
+            model.setPhone("*********" + i);
+            model.setSource("####" + i);
+            mData.add(model);
+        }
+        mAdapter = new BussinessDetailAdapter(this, mData);
+        mlist.setAdapter(mAdapter);
+
+    }
+
+
+    private class BussinessDetailAdapter extends BaseAdapter {
+        private Context ct;
+        private ArrayList<Business> mdata = new ArrayList<>();
+        private LayoutInflater inflater;
+
+        public BussinessDetailAdapter(Context ct, ArrayList<Business> data) {
+            this.ct = ct;
+            this.mdata = data;
+            this.inflater = LayoutInflater.from(ct);
+        }
+
+        @Override
+        public int getCount() {
+            return mdata.size();
+        }
+
+        @Override
+        public Object getItem(int position) {
+            return mdata.get(position);
+        }
+
+        @Override
+        public long getItemId(int position) {
+            return position;
+        }
+
+        @Override
+        public View getView(final int position, View convertView, ViewGroup parent) {
+            ViewHolder holder = null;
+            if (convertView == null) {
+                convertView = inflater.inflate(R.layout.item_customer_main, null);
+                holder = new ViewHolder();
+                holder.tv_num = (TextView) convertView.findViewById(R.id.tv_crm_business_num);
+                holder.tv_name = (TextView) convertView.findViewById(R.id.tv_crm_business_name);
+                holder.tv_note = (TextView) convertView.findViewById(R.id.tv_crm_business_note);
+                holder.tv_date = (TextView) convertView.findViewById(R.id.tv_crm_business_date);
+                holder.tv_datetv = (TextView) convertView.findViewById(R.id.tv_crm_business_datetv);
+                holder.tv_phone = (TextView) convertView.findViewById(R.id.tv_crm_business_phone);
+                holder.tv_source = (TextView) convertView.findViewById(R.id.tv_crm_business_source);
+                //  holder.tv_num= (TextView) convertView.findViewById(R.id.tv_crm_business_num);
+                holder.bt_event = (Button) convertView.findViewById(R.id.bt_business_qiang);
+                convertView.setTag(holder);
+            } else {
+                holder = (ViewHolder) convertView.getTag();
+            }
+            holder.tv_num.setText(mdata.get(position).getNum());
+            holder.tv_name.setText(mdata.get(position).getName());
+            holder.tv_date.setText(mdata.get(position).getDate());
+            holder.tv_datetv.setText("");
+            //holder.tv_leader.setText(mdata.get(position).getLeader());
+            holder.tv_note.setText(mdata.get(position).getNote());
+            holder.tv_phone.setText(mdata.get(position).getPhone());
+            holder.tv_source.setText(mdata.get(position).getSource());
+            if (mdata.get(position).getType() == 0) {
+                holder.bt_event.setVisibility(View.GONE);
+            } else if (mdata.get(position).getType() == 1) {
+                holder.bt_event.setVisibility(View.VISIBLE);
+                holder.bt_event.setText("抢");
+            } else if (mdata.get(position).getType() == 2) {
+                holder.bt_event.setVisibility(View.VISIBLE);
+                holder.bt_event.setText("分配");
+            }
+            holder.bt_event.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    if (mdata.get(position).getType() == 1) {
+//                        holder.bt_event.setVisibility(View.VISIBLE);
+//                        holder.bt_event.setText("抢");
+                    } else if (mdata.get(position).getType() == 2) {
+//                        holder.bt_event.setVisibility(View.VISIBLE);
+//                        holder.bt_event.setText("分配");
+                    }
+                }
+            });
+            return convertView;
+        }
+
+
+        class ViewHolder {
+            TextView tv_num;
+            TextView tv_name;
+            TextView tv_leader;
+            TextView tv_source;
+            TextView tv_phone;
+            TextView tv_note;
+            TextView tv_datetv;
+            TextView tv_date;
+            Button bt_event;
+        }
     }
 }

+ 137 - 5
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/SalesRankingActivity.java

@@ -1,13 +1,30 @@
 package com.xzjmyk.pm.activity.ui.erp.activity.crm;
 
+import android.content.Context;
 import android.os.Bundle;
 
-import android.support.v7.app.AppCompatActivity;
-import android.support.v7.widget.Toolbar;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuItem;
 import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.Button;
+import android.widget.TextView;
 
+import com.handmark.pulltorefresh.library.PullToRefreshBase;
+import com.handmark.pulltorefresh.library.PullToRefreshGridView;
+import com.handmark.pulltorefresh.library.PullToRefreshListView;
+import com.lidroid.xutils.ViewUtils;
+import com.lidroid.xutils.view.annotation.ViewInject;
 import com.xzjmyk.pm.activity.R;
+import com.xzjmyk.pm.activity.bean.crm.Business;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
+import com.xzjmyk.pm.activity.util.ToastUtil;
+import com.xzjmyk.pm.activity.view.wheel.DatePicker;
+
+import java.util.ArrayList;
+import java.util.Calendar;
 
 /**
  * @功能:荣誉墙,销售排行榜
@@ -16,15 +33,130 @@ import com.xzjmyk.pm.activity.ui.base.BaseActivity;
  * @return:
  */
 public class SalesRankingActivity extends BaseActivity {
-
+    private BussinessDetailAdapter mAdapter;
+    @ViewInject(R.id.list_business)
+    private PullToRefreshGridView mlist;
+    private ArrayList<Business> mData = new ArrayList<Business>();
+    private Context ct;
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_sales_ranking);
-        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
-        setSupportActionBar(toolbar);
+
+        initView();
+        initData();
+        initListener();
+    }
+
+    private void initListener() {
+        mlist.setEnabled(false);
+        mlist.setMode(PullToRefreshBase.Mode.DISABLED);
+
+    }
+
+    private void initData() {
+        for (int i = 0; i < 22; i++) {
+            Business model = new Business();
+            model.setNum("013223" + i);
+            model.setName("xxx" + i);
+            model.setLeader("****" + i);
+            model.setNote("xxxxxxxxxxxx" + i);
+            model.setPhone("*********" + i);
+            model.setSource("####" + i);
+            mData.add(model);
+        }
+        mAdapter = new BussinessDetailAdapter(this, mData);
+        mlist.setAdapter(mAdapter);
+    }
+
+    private void initView() {
+        ct = this;
+        ViewUtils.inject(this);
+    }
+
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        getMenuInflater().inflate(R.menu.main_sale_ranking, menu);
+        return true;
+    }
+
+    private Calendar calendar = Calendar.getInstance();
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.sale_date_select:
+                DatePicker picker = new DatePicker(this);
+                picker.setRange(2000, 2030);
+                picker.setSelectedItem(
+                        calendar.get(Calendar.YEAR),
+                        calendar.get(Calendar.MONTH) + 1,
+                        calendar.get(Calendar.DAY_OF_MONTH));
+                picker.setOnDatePickListener(new DatePicker.OnYearMonthDayPickListener() {
+                    @Override
+                    public void onDatePicked(String year, String month, String day) {
+                        ToastUtil.showToast(ct, year + "-" + month + "-" + day);
+                    }
+                });
+                picker.show();
+                break;
+        }
+        return true;
+    }
+
+    private class BussinessDetailAdapter extends BaseAdapter {
+        private Context ct;
+        private ArrayList<Business> mdata = new ArrayList<>();
+        private LayoutInflater inflater;
+
+        public BussinessDetailAdapter(Context ct, ArrayList<Business> data) {
+            this.ct = ct;
+            this.mdata = data;
+            this.inflater = LayoutInflater.from(ct);
+        }
+
+        @Override
+        public int getCount() {
+            return mdata.size();
+        }
+
+        @Override
+        public Object getItem(int position) {
+            return mdata.get(position);
+        }
+
+        @Override
+        public long getItemId(int position) {
+            return position;
+        }
+
+        @Override
+        public View getView(final int position, View convertView, ViewGroup parent) {
+            ViewHolder holder = null;
+            if (convertView == null) {
+                convertView = inflater.inflate(R.layout.item_sale_ranking, null);
+                holder = new ViewHolder();
+                convertView.setTag(holder);
+            } else {
+                holder = (ViewHolder) convertView.getTag();
+            }
+
+            return convertView;
+        }
 
 
+        class ViewHolder {
+            TextView tv_num;
+            TextView tv_name;
+            TextView tv_leader;
+            TextView tv_source;
+            TextView tv_phone;
+            TextView tv_note;
+            TextView tv_datetv;
+            TextView tv_date;
+            Button bt_event;
+        }
     }
 
 }

+ 1 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/AddMeetingActivity.java

@@ -22,6 +22,7 @@ public class AddMeetingActivity extends BaseActivity implements View.OnClickList
     private void initView() {
         findViewById(R.id.meet_main_rl).setOnClickListener(this);
     }
+
     @Override
     public void onClick(View view) {
         switch (view.getId()) {

+ 1 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/fragment/WorksFragment.java

@@ -94,7 +94,7 @@ public class WorksFragment extends XutilsFragment implements View.OnClickListene
                 break;
             case R.id.rl_uas_sys:
 //                ct.startActivity(new Intent(ct, ErpMenActivity.class));
-                 ct.startActivity(new Intent(ct, OAActivity.class));
+                        ct.startActivity(new Intent(ct, OAActivity.class));
                 break;
             case R.id.my_client_rl:
                 // ct.startActivity(new Intent(ct, ClientActivity.class));

+ 1 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/net/ViewUtil.java

@@ -796,6 +796,7 @@ public class ViewUtil {
         params.put("username", username);
         params.put("password", password);
         params.put("master", master);
+        Log.i("Arison", "erp login:" + JSON.toJSONString(params));
         httpSendRequest(ct, url, params, handler, null, Constants.SUCCESS_ERP, null, null, "post");
     }
 

+ 1 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/message/MessageFragment.java

@@ -916,7 +916,7 @@ public class MessageFragment extends EasyFragment {
                         task_num++;
                     } else if (allProcesses.get(i).getTypecode()
                             .contains("dingyue")) {
-                        if (allProcesses.get(i).getStatus() == "0"){
+                        if (allProcesses.get(i).getStatus() == "0") {
 
                             pagin_num++;
                         }

+ 13 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/view/FunnelView.java

@@ -518,6 +518,7 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
         draw7(canvas);
         draw8(canvas);
         draw9(canvas);
+        drawText9(canvas);
         //  draw10(canvas);
 
     }
@@ -630,6 +631,18 @@ public class FunnelView extends View implements ValueAnimator.AnimatorUpdateList
         canvas.drawText("商务谈判(10%)", maxWidth + textStartOffsetX, mLastY - mPath4Height / 2 + offY, mPaintText);
     }
 
+
+    private void drawText9(Canvas canvas) {
+        Paint.FontMetrics fontMetrics = mPaintText.getFontMetrics();
+
+        float fontTotalHeight = fontMetrics.bottom - fontMetrics.top;
+
+        float offY = fontTotalHeight / 2 - fontMetrics.bottom;
+        //float newY = baseY + offY;
+
+        canvas.drawText("销售漏斗", maxWidth + textStartOffsetX, mLastY - mPath9Height / 2 + offY, mPaintText);
+    }
+
     private void drawLine5(Canvas canvas) {
         canvas.drawLine(mPath5LineStartX + lineStartOffsetX, mPath5LineStartY, maxWidth, mPath5LineStartY, mPaintLine);
     }

+ 228 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/BottomPopup.java

@@ -0,0 +1,228 @@
+package com.xzjmyk.pm.activity.view.wheel;
+
+import android.app.Activity;
+import android.content.DialogInterface;
+import android.support.annotation.CallSuper;
+import android.support.annotation.StyleRes;
+import android.util.DisplayMetrics;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
+
+
+/**
+ * 底部弹窗基类
+ *
+ * @param <V> the type parameter
+ * @author 李玉江[QQ :1023694760]
+ * @since 2015/7/19
+ */
+public abstract class BottomPopup<V extends View> implements DialogInterface.OnKeyListener {
+    public static final int MATCH_PARENT = ViewGroup.LayoutParams.MATCH_PARENT;
+    public static final int WRAP_CONTENT = ViewGroup.LayoutParams.WRAP_CONTENT;
+    protected Activity activity;
+    protected int screenWidthPixels;
+    protected int screenHeightPixels;
+    private Popup popup;
+    private int width = 0, height = 0;
+    private boolean isFillScreen = false;
+    private boolean isHalfScreen = false;
+    private boolean isPrepared = false;
+
+    /**
+     * Instantiates a new Bottom popup.
+     *
+     * @param activity the activity
+     */
+    public BottomPopup(Activity activity) {
+        this.activity = activity;
+        DisplayMetrics displayMetrics = ScreenUtils.displayMetrics(activity);
+        screenWidthPixels = displayMetrics.widthPixels;
+        screenHeightPixels = displayMetrics.heightPixels;
+        popup = new Popup(activity);
+        popup.setOnKeyListener(this);
+    }
+
+    /**
+     * Gets view.
+     *
+     * @return the view
+     */
+    protected abstract V makeContentView();
+
+    /**
+     * 弹出窗显示之前调用
+     */
+    private void onShowPrepare() {
+        if (isPrepared) {
+            return;
+        }
+        setContentViewBefore();
+        V view = makeContentView();
+        popup.setContentView(view);// 设置弹出窗体的布局
+        setContentViewAfter(view);
+        LogUtils.verbose("do something before popup show");
+        if (width == 0 && height == 0) {
+            //未明确指定宽高,优先考虑全屏再考虑半屏然后再考虑包裹内容
+            width = screenWidthPixels;
+            if (isFillScreen) {
+                height = MATCH_PARENT;
+            } else if (isHalfScreen) {
+                height = screenHeightPixels / 2;
+            } else {
+                height = WRAP_CONTENT;
+            }
+        }
+        popup.setSize(width, height);
+        isPrepared = true;
+    }
+
+    /**
+     * 固定高度为屏幕的高
+     *
+     * @param fillScreen the fill screen
+     */
+    public void setFillScreen(boolean fillScreen) {
+        isFillScreen = fillScreen;
+    }
+
+    /**
+     * 固定高度为屏幕的一半
+     *
+     * @param halfScreen the half screen
+     */
+    public void setHalfScreen(boolean halfScreen) {
+        isHalfScreen = halfScreen;
+    }
+
+    /**
+     * Sets content view before.
+     */
+    protected void setContentViewBefore() {
+    }
+
+    /**
+     * Sets content view after.
+     *
+     * @param contentView the content view
+     */
+    protected void setContentViewAfter(V contentView) {
+    }
+
+    /**
+     * Sets animation.
+     *
+     * @param animRes the anim res
+     */
+    public void setAnimationStyle(@StyleRes int animRes) {
+        popup.setAnimationStyle(animRes);
+    }
+
+    /**
+     * Sets on dismiss listener.
+     *
+     * @param onDismissListener the on dismiss listener
+     */
+    public void setOnDismissListener(DialogInterface.OnDismissListener onDismissListener) {
+        popup.setOnDismissListener(onDismissListener);
+        LogUtils.verbose("popup setOnDismissListener");
+    }
+
+    /**
+     * Sets size.
+     *
+     * @param width  the width
+     * @param height the height
+     */
+    public void setSize(int width, int height) {
+        // fixed: 2016/1/26 修复显示之前设置宽高无效问题
+        this.width = width;
+        this.height = height;
+    }
+
+    /**
+     * Sets width.
+     *
+     * @param width the width
+     * @see #setSize(int, int) #setSize(int, int)
+     */
+    public void setWidth(int width) {
+        this.width = width;
+    }
+
+    /**
+     * Sets height.
+     *
+     * @param height the height
+     * @see #setSize(int, int) #setSize(int, int)
+     */
+    public void setHeight(int height) {
+        this.height = height;
+    }
+
+    /**
+     * Is showing boolean.
+     *
+     * @return the boolean
+     */
+    public boolean isShowing() {
+        return popup.isShowing();
+    }
+
+    /**
+     * Show.
+     */
+    @CallSuper
+    public void show() {
+        onShowPrepare();
+        popup.show();
+        LogUtils.verbose("popup show");
+    }
+
+    /**
+     * Dismiss.
+     */
+    public void dismiss() {
+        popup.dismiss();
+        LogUtils.verbose("popup dismiss");
+    }
+
+    /**
+     * On key down boolean.
+     *
+     * @param keyCode the key code
+     * @param event   the event
+     * @return the boolean
+     */
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        return false;
+    }
+
+    @Override
+    public final boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
+        if (event.getAction() == KeyEvent.ACTION_DOWN) {
+            return onKeyDown(keyCode, event);
+        }
+        return false;
+    }
+
+    /**
+     * Gets window.
+     *
+     * @return the window
+     */
+    public Window getWindow() {
+        return popup.getWindow();
+    }
+
+    /**
+     * Gets root view.
+     *
+     * @return the root view
+     */
+    public ViewGroup getRootView() {
+        return popup.getRootView();
+    }
+
+}

+ 304 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/ConfirmPopup.java

@@ -0,0 +1,304 @@
+package com.xzjmyk.pm.activity.view.wheel;
+
+import android.app.Activity;
+import android.graphics.Color;
+import android.support.annotation.ColorInt;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.support.annotation.StringRes;
+import android.text.TextUtils;
+import android.view.Gravity;
+import android.view.View;
+import android.widget.Button;
+import android.widget.LinearLayout;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+
+/**
+ * 带确定及取消按钮的
+ *
+ * @param <V> the type parameter
+ * @author 李玉江[QQ:1032694760]
+ * @since 2015/10/21
+ */
+public abstract class ConfirmPopup<V extends View> extends BottomPopup<View> {
+    protected boolean topLineVisible = true;
+    protected int topLineColor = 0xFFDDDDDD;
+    protected int topBackgroundColor = Color.WHITE;
+    protected boolean cancelVisible = true;
+    protected CharSequence cancelText = "";
+    protected CharSequence submitText = "";
+    protected CharSequence titleText = "";
+    protected int cancelTextColor = Color.BLACK;
+    protected int submitTextColor = Color.BLACK;
+    protected int titleTextColor = Color.BLACK;
+
+    /**
+     * Instantiates a new Confirm popup.
+     *
+     * @param activity the activity
+     */
+    public ConfirmPopup(Activity activity) {
+        super(activity);
+        cancelText = activity.getString(android.R.string.cancel);
+        submitText = activity.getString(android.R.string.ok);
+    }
+
+    /**
+     * Sets top line color.
+     *
+     * @param topLineColor the top line color
+     */
+    public void setTopLineColor(@ColorInt int topLineColor) {
+        this.topLineColor = topLineColor;
+    }
+
+    /**
+     * Sets top background color.
+     *
+     * @param topBackgroundColor the top background color
+     */
+    public void setTopBackgroundColor(@ColorInt int topBackgroundColor) {
+        this.topBackgroundColor = topBackgroundColor;
+    }
+
+    /**
+     * Sets top line visible.
+     *
+     * @param topLineVisible the top line visible
+     */
+    public void setTopLineVisible(boolean topLineVisible) {
+        this.topLineVisible = topLineVisible;
+    }
+
+    /**
+     * Sets cancel visible.
+     *
+     * @param cancelVisible the cancel visible
+     */
+    public void setCancelVisible(boolean cancelVisible) {
+        this.cancelVisible = cancelVisible;
+    }
+
+    /**
+     * Sets cancel text.
+     *
+     * @param cancelText the cancel text
+     */
+    public void setCancelText(CharSequence cancelText) {
+        this.cancelText = cancelText;
+    }
+
+    /**
+     * Sets cancel text.
+     *
+     * @param textRes the text res
+     */
+    public void setCancelText(@StringRes int textRes) {
+        this.cancelText = activity.getString(textRes);
+    }
+
+    /**
+     * Sets submit text.
+     *
+     * @param submitText the submit text
+     */
+    public void setSubmitText(CharSequence submitText) {
+        this.submitText = submitText;
+    }
+
+    /**
+     * Sets submit text.
+     *
+     * @param textRes the text res
+     */
+    public void setSubmitText(@StringRes int textRes) {
+        this.submitText = activity.getString(textRes);
+    }
+
+    /**
+     * Sets title text.
+     *
+     * @param titleText the title text
+     */
+    public void setTitleText(CharSequence titleText) {
+        this.titleText = titleText;
+    }
+
+    /**
+     * Sets title text.
+     *
+     * @param textRes the text res
+     */
+    public void setTitleText(@StringRes int textRes) {
+        this.titleText = activity.getString(textRes);
+    }
+
+    /**
+     * Sets cancel text color.
+     *
+     * @param cancelTextColor the cancel text color
+     */
+    public void setCancelTextColor(@ColorInt int cancelTextColor) {
+        this.cancelTextColor = cancelTextColor;
+    }
+
+    /**
+     * Sets submit text color.
+     *
+     * @param submitTextColor the submit text color
+     */
+    public void setSubmitTextColor(@ColorInt int submitTextColor) {
+        this.submitTextColor = submitTextColor;
+    }
+
+    /**
+     * Sets title text color.
+     *
+     * @param titleTextColor the title text color
+     */
+    public void setTitleTextColor(@ColorInt int titleTextColor) {
+        this.titleTextColor = titleTextColor;
+    }
+
+    /**
+     * @see #makeHeaderView()
+     * @see #makeCenterView()
+     * @see #makeFooterView()
+     */
+    @Override
+    protected final View makeContentView() {
+        LinearLayout rootLayout = new LinearLayout(activity);
+        rootLayout.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT));
+        rootLayout.setBackgroundColor(Color.WHITE);
+        rootLayout.setOrientation(LinearLayout.VERTICAL);
+        rootLayout.setGravity(Gravity.CENTER);
+        rootLayout.setPadding(0, 0, 0, 0);
+        rootLayout.setClipToPadding(false);
+        View headerView = makeHeaderView();
+        if (headerView != null) {
+            rootLayout.addView(headerView);
+        }
+        if (topLineVisible) {
+            View lineView = new View(activity);
+            lineView.setLayoutParams(new LinearLayout.LayoutParams(MATCH_PARENT, 1));
+            lineView.setBackgroundColor(topLineColor);
+            rootLayout.addView(lineView);
+        }
+        rootLayout.addView(makeCenterView(), new LinearLayout.LayoutParams(MATCH_PARENT, 0, 1.0f));
+        View footerView = makeFooterView();
+        if (footerView != null) {
+            rootLayout.addView(footerView);
+        }
+        return rootLayout;
+    }
+
+    /**
+     * Make header view view.
+     *
+     * @return the view
+     */
+    @Nullable
+    protected View makeHeaderView() {
+        RelativeLayout topButtonLayout = new RelativeLayout(activity);
+        topButtonLayout.setLayoutParams(new RelativeLayout.LayoutParams(MATCH_PARENT, ConvertUtils.toPx(activity, 40)));
+        topButtonLayout.setBackgroundColor(topBackgroundColor);
+        topButtonLayout.setGravity(Gravity.CENTER_VERTICAL);
+
+        Button cancelButton = new Button(activity);
+        cancelButton.setVisibility(cancelVisible ? View.VISIBLE : View.GONE);
+        RelativeLayout.LayoutParams cancelButtonLayoutParams = new RelativeLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
+        cancelButtonLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT, RelativeLayout.TRUE);
+        cancelButtonLayoutParams.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);
+        cancelButtonLayoutParams.leftMargin = ConvertUtils.toPx(activity, 10);
+        cancelButton.setLayoutParams(cancelButtonLayoutParams);
+        cancelButton.setBackgroundColor(Color.TRANSPARENT);
+        cancelButton.setGravity(Gravity.CENTER);
+        cancelButton.setTextSize(18f);
+        if (!TextUtils.isEmpty(cancelText)) {
+            cancelButton.setText(cancelText);
+        }
+        cancelButton.setTextColor(cancelTextColor);
+        cancelButton.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                dismiss();
+                onCancel();
+            }
+        });
+        topButtonLayout.addView(cancelButton);
+
+        TextView titleView = new TextView(activity);
+        RelativeLayout.LayoutParams titleLayoutParams = new RelativeLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
+        int margin = ConvertUtils.toPx(activity, 20);
+        titleLayoutParams.leftMargin = margin;
+        titleLayoutParams.rightMargin = margin;
+        titleLayoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL, RelativeLayout.TRUE);
+        titleLayoutParams.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);
+        titleView.setLayoutParams(titleLayoutParams);
+        titleView.setGravity(Gravity.CENTER);
+        if (!TextUtils.isEmpty(titleText)) {
+            titleView.setText(titleText);
+        }
+        titleView.setTextColor(titleTextColor);
+        topButtonLayout.addView(titleView);
+
+        Button submitButton = new Button(activity);
+        RelativeLayout.LayoutParams submitButtonLayoutParams = new RelativeLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT);
+        submitButtonLayoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT, RelativeLayout.TRUE);
+        submitButtonLayoutParams.addRule(RelativeLayout.CENTER_VERTICAL, RelativeLayout.TRUE);
+        submitButtonLayoutParams.rightMargin = ConvertUtils.toPx(activity, 10);
+        submitButton.setLayoutParams(submitButtonLayoutParams);
+        submitButton.setBackgroundColor(Color.TRANSPARENT);
+        submitButton.setTextSize(18f);
+        submitButton.setGravity(Gravity.CENTER);
+        if (!TextUtils.isEmpty(submitText)) {
+            submitButton.setText(submitText);
+        }
+        submitButton.setTextColor(submitTextColor);
+        submitButton.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                dismiss();
+                onSubmit();
+            }
+        });
+        topButtonLayout.addView(submitButton);
+
+        return topButtonLayout;
+    }
+
+    /**
+     * Init center view v.
+     *
+     * @return the v
+     */
+    @NonNull
+    protected abstract V makeCenterView();
+
+    /**
+     * Make footer view view.
+     *
+     * @return the view
+     */
+    @Nullable
+    protected View makeFooterView() {
+        return null;
+    }
+
+    /**
+     * On submit.
+     */
+    protected void onSubmit() {
+
+    }
+
+    /**
+     * On cancel.
+     */
+    protected void onCancel() {
+
+    }
+
+}

+ 542 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/ConvertUtils.java

@@ -0,0 +1,542 @@
+package com.xzjmyk.pm.activity.view.wheel;
+
+import android.annotation.TargetApi;
+import android.content.Context;
+import android.content.res.ColorStateList;
+import android.content.res.Resources;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.Canvas;
+import android.graphics.Color;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.ColorDrawable;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.NinePatchDrawable;
+import android.graphics.drawable.ShapeDrawable;
+import android.graphics.drawable.StateListDrawable;
+import android.graphics.drawable.shapes.RoundRectShape;
+import android.os.Build;
+import android.util.TypedValue;
+
+import java.io.BufferedReader;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
+import java.text.DecimalFormat;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Locale;
+
+/**
+ * 数据类型转换、单位转换
+ *
+ * @author 李玉江[QQ:1023694760]
+ * @since 2014-4-18
+ */
+public class ConvertUtils {
+    /**
+     * The constant GB.
+     */
+    public static final long GB = 1073741824;
+    /**
+     * The constant MB.
+     */
+    public static final long MB = 1048576;
+    /**
+     * The constant KB.
+     */
+    public static final long KB = 1024;
+
+    /**
+     * 转换为6位十六进制颜色代码,不含“#”
+     *
+     * @param color the color
+     * @return string string
+     */
+    public static String toColorString(int color) {
+        return toColorString(color, false);
+    }
+
+    /**
+     * 转换为6位十六进制颜色代码,不含“#”
+     *
+     * @param color        the color
+     * @param includeAlpha the include alpha
+     * @return string string
+     */
+    public static String toColorString(int color, boolean includeAlpha) {
+        String alpha = Integer.toHexString(Color.alpha(color));
+        String red = Integer.toHexString(Color.red(color));
+        String green = Integer.toHexString(Color.green(color));
+        String blue = Integer.toHexString(Color.blue(color));
+        if (alpha.length() == 1) {
+            alpha = "0" + alpha;
+        }
+        if (red.length() == 1) {
+            red = "0" + red;
+        }
+        if (green.length() == 1) {
+            green = "0" + green;
+        }
+        if (blue.length() == 1) {
+            blue = "0" + blue;
+        }
+        String colorString;
+        if (includeAlpha) {
+            colorString = alpha + red + green + blue;
+            LogUtils.verbose(String.format(Locale.CHINA, "%d to color string is %s", color, colorString));
+        } else {
+            colorString = red + green + blue;
+            LogUtils.verbose(String.format(Locale.CHINA, "%d to color string is %s%s%s%s, exclude alpha is %s", color, alpha, red, green, blue, colorString));
+        }
+        return colorString;
+    }
+
+    /**
+     * 将指定的日期转换为一定格式的字符串
+     *
+     * @param date   the date
+     * @param format the format
+     * @return string string
+     */
+    public static String toDateString(Date date, String format) {
+        SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.CHINA);
+        return sdf.format(date);
+    }
+
+    /**
+     * 将当前的日期转换为一定格式的字符串
+     *
+     * @param format the format
+     * @return string string
+     */
+    public static String toDateString(String format) {
+        return toDateString(Calendar.getInstance(Locale.CHINA).getTime(), format);
+    }
+
+    /**
+     * 将指定的日期字符串转换为日期时间
+     *
+     * @param dateStr 如:2014-04-08 23:02
+     * @return date date
+     */
+    public static Date toDate(String dateStr) {
+        return DateUtils.parseDate(dateStr);
+    }
+
+    /**
+     * 将指定的日期字符串转换为时间戳
+     *
+     * @param dateStr 如:2014-04-08 23:02
+     * @return long long
+     */
+    public static long toTimemillis(String dateStr) {
+        return toDate(dateStr).getTime();
+    }
+
+    /**
+     * To string string.
+     *
+     * @param objects the objects
+     * @return the string
+     */
+    public static String toString(Object[] objects) {
+        return Arrays.deepToString(objects);
+    }
+
+    /**
+     * To string string.
+     *
+     * @param objects the objects
+     * @param tag     the tag
+     * @return the string
+     */
+    public static String toString(Object[] objects, String tag) {
+        StringBuilder sb = new StringBuilder();
+        for (Object object : objects) {
+            sb.append(object);
+            sb.append(tag);
+        }
+        return sb.toString();
+    }
+
+    /**
+     * To byte array byte [ ].
+     *
+     * @param is the is
+     * @return the byte [ ]
+     */
+    public static byte[] toByteArray(InputStream is) {
+        if (is == null) {
+            return null;
+        }
+        try {
+            ByteArrayOutputStream os = new ByteArrayOutputStream();
+            byte[] buff = new byte[100];
+            int rc = 0;
+            while ((rc = is.read(buff, 0, 100)) > 0) {
+                os.write(buff, 0, rc);
+            }
+            byte[] bytes = os.toByteArray();
+            os.close();
+            return bytes;
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    /**
+     * To byte array byte [ ].
+     *
+     * @param bitmap the bitmap
+     * @return the byte [ ]
+     */
+    public static byte[] toByteArray(Bitmap bitmap) {
+        if (bitmap == null) {
+            return null;
+        }
+        ByteArrayOutputStream os = new ByteArrayOutputStream();
+        // 将Bitmap压缩成PNG编码,质量为100%存储,除了PNG还有很多常见格式,如jpeg等。
+        bitmap.compress(Bitmap.CompressFormat.PNG, 100, os);
+        byte[] bytes = os.toByteArray();
+        try {
+            os.close();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return bytes;
+    }
+
+    /**
+     * To bitmap bitmap.
+     *
+     * @param bytes  the bytes
+     * @param width  the width
+     * @param height the height
+     * @return the bitmap
+     */
+    public static Bitmap toBitmap(byte[] bytes, int width, int height) {
+        Bitmap bitmap = null;
+        if (bytes.length != 0) {
+            try {
+                BitmapFactory.Options options = new BitmapFactory.Options();
+                // 不进行图片抖动处理
+                options.inDither = false;
+                // 设置让解码器以最佳方式解码
+                options.inPreferredConfig = null;
+                if (width > 0 && height > 0) {
+                    options.outWidth = width;
+                    options.outHeight = height;
+                }
+                bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length, options);
+            } catch (Exception e) {
+                LogUtils.error(e);
+            }
+        }
+        return bitmap;
+    }
+
+    /**
+     * To bitmap bitmap.
+     *
+     * @param bytes the bytes
+     * @return the bitmap
+     */
+    public static Bitmap toBitmap(byte[] bytes) {
+        return toBitmap(bytes, -1, -1);
+    }
+
+    /**
+     * convert Drawable to Bitmap
+     * 参考:http://kylines.iteye.com/blog/1660184
+     *
+     * @param drawable the drawable
+     * @return bitmap bitmap
+     */
+    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
+    public static Bitmap toBitmap(Drawable drawable) {
+        if (drawable instanceof BitmapDrawable) {
+            return ((BitmapDrawable) drawable).getBitmap();
+        } else if (drawable instanceof ColorDrawable) {
+            //color
+            Bitmap bitmap = Bitmap.createBitmap(32, 32, Bitmap.Config.ARGB_8888);
+            if (Build.VERSION.SDK_INT >= 11) {
+                Canvas canvas = new Canvas(bitmap);
+                canvas.drawColor(((ColorDrawable) drawable).getColor());
+            }
+            return bitmap;
+        } else if (drawable instanceof NinePatchDrawable) {
+            //.9.png
+            Bitmap bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(),
+                    drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
+            Canvas canvas = new Canvas(bitmap);
+            drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
+            drawable.draw(canvas);
+            return bitmap;
+        }
+        return null;
+    }
+
+    /**
+     * convert Bitmap to Drawable
+     *
+     * @param bitmap the bitmap
+     * @return drawable drawable
+     */
+    public static Drawable toDrawable(Bitmap bitmap) {
+        return bitmap == null ? null : new BitmapDrawable(null, bitmap);
+    }
+
+    /**
+     * convert Drawable to byte array
+     *
+     * @param drawable the drawable
+     * @return byte [ ]
+     */
+    public static byte[] toByteArray(Drawable drawable) {
+        return toByteArray(toBitmap(drawable));
+    }
+
+    /**
+     * convert byte array to Drawable
+     *
+     * @param bytes the bytes
+     * @return drawable drawable
+     */
+    public static Drawable toDrawable(byte[] bytes) {
+        return toDrawable(toBitmap(bytes));
+    }
+
+    /**
+     * dp转换为px
+     *
+     * @param context the context
+     * @param dpValue the dp value
+     * @return int int
+     */
+    public static int toPx(Context context, float dpValue) {
+        final float scale = context.getResources().getDisplayMetrics().density;
+        int pxValue = (int) (dpValue * scale + 0.5f);
+        LogUtils.verbose(dpValue + " dp == " + pxValue + " px");
+        return pxValue;
+    }
+
+    /**
+     * To px int.
+     *
+     * @param dpValue the dp value
+     * @return the int
+     */
+    public static int toPx(float dpValue) {
+        Resources resources = Resources.getSystem();
+        float px = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dpValue, resources.getDisplayMetrics());
+        return (int) px;
+    }
+
+    /**
+     * px转换为dp
+     *
+     * @param context the context
+     * @param pxValue the px value
+     * @return int int
+     */
+    public static int toDp(Context context, float pxValue) {
+        final float scale = context.getResources().getDisplayMetrics().density;
+        int dpValue = (int) (pxValue / scale + 0.5f);
+        LogUtils.verbose(pxValue + " px == " + dpValue + " dp");
+        return dpValue;
+    }
+
+    /**
+     * px转换为sp
+     *
+     * @param context the context
+     * @param pxValue the px value
+     * @return int int
+     */
+    public static int toSp(Context context, float pxValue) {
+        final float fontScale = context.getResources().getDisplayMetrics().scaledDensity;
+        int spValue = (int) (pxValue / fontScale + 0.5f);
+        LogUtils.verbose(pxValue + " px == " + spValue + " sp");
+        return spValue;
+    }
+
+    /**
+     * To gbk string.
+     *
+     * @param str the str
+     * @return the string
+     */
+    public static String toGbk(String str) {
+        try {
+            return new String(str.getBytes("utf-8"), "gbk");
+        } catch (UnsupportedEncodingException e) {
+            LogUtils.warn(e.getMessage());
+            return str;
+        }
+    }
+
+    /**
+     * To file size string string.
+     *
+     * @param fileSize the file size
+     * @return the string
+     */
+    public static String toFileSizeString(long fileSize) {
+        DecimalFormat df = new DecimalFormat("0.00");
+        String fileSizeString;
+        if (fileSize < KB) {
+            fileSizeString = fileSize + "B";
+        } else if (fileSize < MB) {
+            fileSizeString = df.format((double) fileSize / KB) + "K";
+        } else if (fileSize < GB) {
+            fileSizeString = df.format((double) fileSize / MB) + "M";
+        } else {
+            fileSizeString = df.format((double) fileSize / GB) + "G";
+        }
+        return fileSizeString;
+    }
+
+    /**
+     * To string string.
+     *
+     * @param is the is
+     * @return the string
+     */
+    public static String toString(InputStream is) {
+        StringBuilder sb = new StringBuilder();
+        try {
+            BufferedReader reader = new BufferedReader(new InputStreamReader(is));
+            String line = null;
+            while ((line = reader.readLine()) != null) {
+                sb.append(line);
+            }
+            is.close();
+        } catch (IOException e) {
+            LogUtils.error(e);
+        }
+        return sb.toString();
+    }
+
+    /**
+     * To round drawable shape drawable.
+     *
+     * @param color  the color
+     * @param radius the radius
+     * @return the shape drawable
+     */
+    public static ShapeDrawable toRoundDrawable(int color, int radius) {
+        int r = toPx(radius);
+        float[] outerR = new float[]{r, r, r, r, r, r, r, r};
+        RoundRectShape shape = new RoundRectShape(outerR, null, null);
+        ShapeDrawable drawable = new ShapeDrawable(shape);
+        drawable.getPaint().setColor(color);
+        return drawable;
+    }
+
+    /**
+     * 对TextView、Button等设置不同状态时其文字颜色。
+     * 参见:http://blog.csdn.net/sodino/article/details/6797821
+     * Modified by liyujiang at 2015.08.13
+     *
+     * @param normalColor  the normal color
+     * @param pressedColor the pressed color
+     * @param focusedColor the focused color
+     * @param unableColor  the unable color
+     * @return the color state list
+     */
+    public static ColorStateList toColorStateList(int normalColor, int pressedColor, int focusedColor, int unableColor) {
+        int[] colors = new int[]{pressedColor, focusedColor, normalColor, focusedColor, unableColor, normalColor};
+        int[][] states = new int[6][];
+        states[0] = new int[]{android.R.attr.state_pressed, android.R.attr.state_enabled};
+        states[1] = new int[]{android.R.attr.state_enabled, android.R.attr.state_focused};
+        states[2] = new int[]{android.R.attr.state_enabled};
+        states[3] = new int[]{android.R.attr.state_focused};
+        states[4] = new int[]{android.R.attr.state_window_focused};
+        states[5] = new int[]{};
+        return new ColorStateList(states, colors);
+    }
+
+    /**
+     * To color state list color state list.
+     *
+     * @param normalColor  the normal color
+     * @param pressedColor the pressed color
+     * @return the color state list
+     */
+    public static ColorStateList toColorStateList(int normalColor, int pressedColor) {
+        return toColorStateList(normalColor, pressedColor, pressedColor, normalColor);
+    }
+
+    /**
+     * To state list drawable state list drawable.
+     *
+     * @param normal  the normal
+     * @param pressed the pressed
+     * @param focused the focused
+     * @param unable  the unable
+     * @return the state list drawable
+     */
+    public static StateListDrawable toStateListDrawable(Drawable normal, Drawable pressed, Drawable focused, Drawable unable) {
+        StateListDrawable drawable = new StateListDrawable();
+        drawable.addState(new int[]{android.R.attr.state_pressed, android.R.attr.state_enabled}, pressed);
+        drawable.addState(new int[]{android.R.attr.state_enabled, android.R.attr.state_focused}, focused);
+        drawable.addState(new int[]{android.R.attr.state_enabled}, normal);
+        drawable.addState(new int[]{android.R.attr.state_focused}, focused);
+        drawable.addState(new int[]{android.R.attr.state_window_focused}, unable);
+        drawable.addState(new int[]{}, normal);
+        return drawable;
+    }
+
+    /**
+     * To state list drawable state list drawable.
+     *
+     * @param normalColor  the normal color
+     * @param pressedColor the pressed color
+     * @param focusedColor the focused color
+     * @param unableColor  the unable color
+     * @return the state list drawable
+     */
+    public static StateListDrawable toStateListDrawable(int normalColor, int pressedColor, int focusedColor, int unableColor) {
+        StateListDrawable drawable = new StateListDrawable();
+        Drawable normal = new ColorDrawable(normalColor);
+        Drawable pressed = new ColorDrawable(pressedColor);
+        Drawable focused = new ColorDrawable(focusedColor);
+        Drawable unable = new ColorDrawable(unableColor);
+        drawable.addState(new int[]{android.R.attr.state_pressed, android.R.attr.state_enabled}, pressed);
+        drawable.addState(new int[]{android.R.attr.state_enabled, android.R.attr.state_focused}, focused);
+        drawable.addState(new int[]{android.R.attr.state_enabled}, normal);
+        drawable.addState(new int[]{android.R.attr.state_focused}, focused);
+        drawable.addState(new int[]{android.R.attr.state_window_focused}, unable);
+        drawable.addState(new int[]{}, normal);
+        return drawable;
+    }
+
+    /**
+     * To state list drawable state list drawable.
+     *
+     * @param normal  the normal
+     * @param pressed the pressed
+     * @return the state list drawable
+     */
+    public static StateListDrawable toStateListDrawable(Drawable normal, Drawable pressed) {
+        return toStateListDrawable(normal, pressed, pressed, normal);
+    }
+
+    /**
+     * To state list drawable state list drawable.
+     *
+     * @param normalColor  the normal color
+     * @param pressedColor the pressed color
+     * @return the state list drawable
+     */
+    public static StateListDrawable toStateListDrawable(int normalColor, int pressedColor) {
+        return toStateListDrawable(normalColor, pressedColor, pressedColor, normalColor);
+    }
+
+}

+ 411 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/DatePicker.java

@@ -0,0 +1,411 @@
+package com.xzjmyk.pm.activity.view.wheel;
+
+import android.app.Activity;
+import android.support.annotation.IntDef;
+import android.support.annotation.NonNull;
+import android.text.TextUtils;
+import android.view.Gravity;
+import android.view.View;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+
+
+/**
+ * 日期选择器
+ *
+ * @author 李玉江[QQ :1032694760]
+ * @since 2015/12/14
+ */
+public class DatePicker extends WheelPicker {
+    /**
+     * 年月日
+     */
+    public static final int YEAR_MONTH_DAY = 0;
+    /**
+     * 年月
+     */
+    public static final int YEAR_MONTH = 1;
+    /**
+     * 月日
+     */
+    public static final int MONTH_DAY = 2;
+    private ArrayList<String> years = new ArrayList<String>();
+    private ArrayList<String> months = new ArrayList<String>();
+    private ArrayList<String> days = new ArrayList<String>();
+    private OnDatePickListener onDatePickListener;
+    private String yearLabel = "年", monthLabel = "月", dayLabel = "日";
+    private int selectedYearIndex = 0, selectedMonthIndex = 0, selectedDayIndex = 0;
+    private int mode = YEAR_MONTH_DAY;
+
+    /**
+     * 安卓开发应避免使用枚举类(enum),因为相比于静态常量enum会花费两倍以上的内存。
+     * http://developer.android.com/training/articles/memory.html#Overhead
+     */
+    @IntDef(flag = false, value = {YEAR_MONTH_DAY, YEAR_MONTH, MONTH_DAY})
+    @Retention(RetentionPolicy.SOURCE)
+    public @interface Mode {
+    }
+
+    /**
+     * Instantiates a new Date picker.
+     *
+     * @param activity the activity
+     */
+    public DatePicker(Activity activity) {
+        this(activity, YEAR_MONTH_DAY);
+    }
+
+    /**
+     * Instantiates a new Date picker.
+     *
+     * @param activity the activity
+     * @param mode     the mode
+     * @see #YEAR_MONTH_DAY
+     * @see #YEAR_MONTH
+     * @see #MONTH_DAY
+     */
+    public DatePicker(Activity activity, @Mode int mode) {
+        super(activity);
+        this.mode = mode;
+        for (int i = 2000; i <= 2050; i++) {
+            years.add(String.valueOf(i));
+        }
+        for (int i = 1; i <= 12; i++) {
+            months.add(DateUtils.fillZero(i));
+        }
+        for (int i = 1; i <= 31; i++) {
+            days.add(DateUtils.fillZero(i));
+        }
+    }
+
+    /**
+     * Sets label.
+     *
+     * @param yearLabel  the year label
+     * @param monthLabel the month label
+     * @param dayLabel   the day label
+     */
+    public void setLabel(String yearLabel, String monthLabel, String dayLabel) {
+        this.yearLabel = yearLabel;
+        this.monthLabel = monthLabel;
+        this.dayLabel = dayLabel;
+    }
+
+    /**
+     * Sets range.
+     *
+     * @param startYear the start year
+     * @param endYear   the end year
+     */
+    public void setRange(int startYear, int endYear) {
+        years.clear();
+        for (int i = startYear; i <= endYear; i++) {
+            years.add(String.valueOf(i));
+        }
+    }
+
+    private int findItemIndex(ArrayList<String> items, int item) {
+        //折半查找有序元素的索引
+        int index = Collections.binarySearch(items, item, new Comparator<Object>() {
+            @Override
+            public int compare(Object lhs, Object rhs) {
+                String lhsStr = lhs.toString();
+                String rhsStr = rhs.toString();
+                lhsStr = lhsStr.startsWith("0") ? lhsStr.substring(1) : lhsStr;
+                rhsStr = rhsStr.startsWith("0") ? rhsStr.substring(1) : rhsStr;
+                return Integer.parseInt(lhsStr) - Integer.parseInt(rhsStr);
+            }
+        });
+        if (index < 0) {
+            index = 0;
+        }
+        return index;
+    }
+
+    /**
+     * Sets selected item.
+     *
+     * @param year  the year
+     * @param month the month
+     * @param day   the day
+     */
+    public void setSelectedItem(int year, int month, int day) {
+        selectedYearIndex = findItemIndex(years, year);
+        selectedMonthIndex = findItemIndex(months, month);
+        selectedDayIndex = findItemIndex(days, day);
+    }
+
+    /**
+     * Sets selected item.
+     *
+     * @param yearOrMonth the year or month
+     * @param monthOrDay  the month or day
+     */
+    public void setSelectedItem(int yearOrMonth, int monthOrDay) {
+        if (mode == MONTH_DAY) {
+            selectedMonthIndex = findItemIndex(months, yearOrMonth);
+            selectedDayIndex = findItemIndex(days, monthOrDay);
+        } else {
+            selectedYearIndex = findItemIndex(years, yearOrMonth);
+            selectedMonthIndex = findItemIndex(months, monthOrDay);
+        }
+    }
+
+    /**
+     * Sets on date pick listener.
+     *
+     * @param listener the listener
+     */
+    public void setOnDatePickListener(OnDatePickListener listener) {
+        this.onDatePickListener = listener;
+    }
+
+    @Override
+    @NonNull
+    protected View makeCenterView() {
+        LinearLayout layout = new LinearLayout(activity);
+        layout.setOrientation(LinearLayout.HORIZONTAL);
+        layout.setGravity(Gravity.CENTER);
+        WheelView yearView = new WheelView(activity.getBaseContext());
+        yearView.setLayoutParams(new LinearLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT));
+        yearView.setTextSize(textSize);
+        yearView.setTextColor(textColorNormal, textColorFocus);
+        yearView.setLineVisible(lineVisible);
+        yearView.setLineColor(lineColor);
+        yearView.setOffset(offset);
+        layout.addView(yearView);
+        TextView yearTextView = new TextView(activity);
+        yearTextView.setLayoutParams(new LinearLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT));
+        yearTextView.setTextSize(textSize);
+        yearTextView.setTextColor(textColorFocus);
+        if (!TextUtils.isEmpty(yearLabel)) {
+            yearTextView.setText(yearLabel);
+        }
+        layout.addView(yearTextView);
+        WheelView monthView = new WheelView(activity.getBaseContext());
+        monthView.setLayoutParams(new LinearLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT));
+        monthView.setTextSize(textSize);
+        monthView.setTextColor(textColorNormal, textColorFocus);
+        monthView.setLineVisible(lineVisible);
+        monthView.setLineColor(lineColor);
+        monthView.setOffset(offset);
+        layout.addView(monthView);
+        TextView monthTextView = new TextView(activity);
+        monthTextView.setLayoutParams(new LinearLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT));
+        monthTextView.setTextSize(textSize);
+        monthTextView.setTextColor(textColorFocus);
+        if (!TextUtils.isEmpty(monthLabel)) {
+            monthTextView.setText(monthLabel);
+        }
+        layout.addView(monthTextView);
+        final WheelView dayView = new WheelView(activity.getBaseContext());
+        dayView.setLayoutParams(new LinearLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT));
+        dayView.setTextSize(textSize);
+        dayView.setTextColor(textColorNormal, textColorFocus);
+        dayView.setLineVisible(lineVisible);
+        dayView.setLineColor(lineColor);
+        dayView.setOffset(offset);
+        layout.addView(dayView);
+        TextView dayTextView = new TextView(activity);
+        dayTextView.setLayoutParams(new LinearLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT));
+        dayTextView.setTextSize(textSize);
+        dayTextView.setTextColor(textColorFocus);
+        if (!TextUtils.isEmpty(dayLabel)) {
+            dayTextView.setText(dayLabel);
+        }
+        layout.addView(dayTextView);
+        if (mode == YEAR_MONTH) {
+            dayView.setVisibility(View.GONE);
+            dayTextView.setVisibility(View.GONE);
+        } else if (mode == MONTH_DAY) {
+            yearView.setVisibility(View.GONE);
+            yearTextView.setVisibility(View.GONE);
+        }
+        if (mode != MONTH_DAY) {
+            if (!TextUtils.isEmpty(yearLabel)) {
+                yearTextView.setText(yearLabel);
+            }
+            if (selectedYearIndex == 0) {
+                yearView.setItems(years);
+            } else {
+                yearView.setItems(years, selectedYearIndex);
+            }
+            yearView.setOnWheelViewListener(new WheelView.OnWheelViewListener() {
+                @Override
+                public void onSelected(boolean isUserScroll, int selectedIndex, String item) {
+                    selectedYearIndex = selectedIndex;
+                    //需要根据年份及月份动态计算天数
+                    days.clear();
+                    int maxDays = DateUtils.calculateDaysInMonth(stringToYearMonthDay(item), stringToYearMonthDay(months.get(selectedMonthIndex)));
+                    for (int i = 1; i <= maxDays; i++) {
+                        days.add(DateUtils.fillZero(i));
+                    }
+                    if (selectedDayIndex >= maxDays) {
+                        //年或月变动时,保持之前选择的日不动:如果之前选择的日是之前年月的最大日,则日自动为该年月的最大日
+                        selectedDayIndex = days.size() - 1;
+                    }
+                    dayView.setItems(days, selectedDayIndex);
+                }
+            });
+        }
+        if (!TextUtils.isEmpty(monthLabel)) {
+            monthTextView.setText(monthLabel);
+        }
+        if (selectedMonthIndex == 0) {
+            monthView.setItems(months);
+        } else {
+            monthView.setItems(months, selectedMonthIndex);
+        }
+        monthView.setOnWheelViewListener(new WheelView.OnWheelViewListener() {
+            @Override
+            public void onSelected(boolean isUserScroll, int selectedIndex, String item) {
+                selectedMonthIndex = selectedIndex;
+                if (mode != YEAR_MONTH) {
+                    //年月日或年月模式下,需要根据年份及月份动态计算天数
+                    days.clear();
+                    int maxDays = DateUtils.calculateDaysInMonth(stringToYearMonthDay(years.get(selectedYearIndex)), stringToYearMonthDay(item));
+                    for (int i = 1; i <= maxDays; i++) {
+                        days.add(DateUtils.fillZero(i));
+                    }
+                    if (selectedDayIndex >= maxDays) {
+                        //年或月变动时,保持之前选择的日不动:如果之前选择的日是之前年月的最大日,则日自动为该年月的最大日
+                        selectedDayIndex = days.size() - 1;
+                    }
+                    dayView.setItems(days, selectedDayIndex);
+                }
+            }
+        });
+        if (mode != YEAR_MONTH) {
+            if (!TextUtils.isEmpty(dayLabel)) {
+                dayTextView.setText(dayLabel);
+            }
+            if (selectedDayIndex == 0) {
+                dayView.setItems(days);
+            } else {
+                dayView.setItems(days, selectedDayIndex);
+            }
+            dayView.setOnWheelViewListener(new WheelView.OnWheelViewListener() {
+                @Override
+                public void onSelected(boolean isUserScroll, int selectedIndex, String item) {
+                    selectedDayIndex = selectedIndex;
+                }
+            });
+        }
+        return layout;
+    }
+
+    private int stringToYearMonthDay(String text) {
+        if (text.startsWith("0")) {
+            //截取掉前缀0以便转换为整数
+            text = text.substring(1);
+        }
+        return Integer.parseInt(text);
+    }
+
+    @Override
+    protected void onSubmit() {
+        if (onDatePickListener != null) {
+            String year = getSelectedYear();
+            String month = getSelectedMonth();
+            String day = getSelectedDay();
+            switch (mode) {
+                case YEAR_MONTH:
+                    ((OnYearMonthPickListener) onDatePickListener).onDatePicked(year, month);
+                    break;
+                case MONTH_DAY:
+                    ((OnMonthDayPickListener) onDatePickListener).onDatePicked(month, day);
+                    break;
+                default:
+                    ((OnYearMonthDayPickListener) onDatePickListener).onDatePicked(year, month, day);
+                    break;
+            }
+        }
+    }
+
+    /**
+     * Gets selected year.
+     *
+     * @return the selected year
+     */
+    public String getSelectedYear() {
+        return years.get(selectedYearIndex);
+    }
+
+    /**
+     * Gets selected month.
+     *
+     * @return the selected month
+     */
+    public String getSelectedMonth() {
+        return months.get(selectedMonthIndex);
+    }
+
+    /**
+     * Gets selected day.
+     *
+     * @return the selected day
+     */
+    public String getSelectedDay() {
+        return days.get(selectedDayIndex);
+    }
+
+    /**
+     * The interface On date pick listener.
+     */
+    protected interface OnDatePickListener {
+
+    }
+
+    /**
+     * The interface On year month day pick listener.
+     */
+    public interface OnYearMonthDayPickListener extends OnDatePickListener {
+
+        /**
+         * On date picked.
+         *
+         * @param year  the year
+         * @param month the month
+         * @param day   the day
+         */
+        void onDatePicked(String year, String month, String day);
+
+    }
+
+    /**
+     * The interface On year month pick listener.
+     */
+    public interface OnYearMonthPickListener extends OnDatePickListener {
+
+        /**
+         * On date picked.
+         *
+         * @param year  the year
+         * @param month the month
+         */
+        void onDatePicked(String year, String month);
+
+    }
+
+    /**
+     * The interface On month day pick listener.
+     */
+    public interface OnMonthDayPickListener extends OnDatePickListener {
+
+        /**
+         * On date picked.
+         *
+         * @param month the month
+         * @param day   the day
+         */
+        void onDatePicked(String month, String day);
+
+    }
+
+}

+ 287 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/DateUtils.java

@@ -0,0 +1,287 @@
+package com.xzjmyk.pm.activity.view.wheel;
+
+import android.annotation.SuppressLint;
+import android.support.annotation.NonNull;
+
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * 日期时间工具类
+ *
+ * @author 李玉江[QQ:1023694760]
+ * @since 2015/8/5
+ */
+public class DateUtils extends android.text.format.DateUtils {
+
+    /**
+     * The enum Difference mode.
+     */
+    public enum DifferenceMode {
+        Second,
+        Minute,
+        Hour,
+        Day
+    }
+
+    /**
+     * Calculate different second long.
+     *
+     * @param startDate the start date
+     * @param endDate   the end date
+     * @return the long
+     */
+    public static long calculateDifferentSecond(Date startDate, Date endDate) {
+        return calculateDifference(startDate, endDate, DifferenceMode.Second);
+    }
+
+    /**
+     * Calculate different minute long.
+     *
+     * @param startDate the start date
+     * @param endDate   the end date
+     * @return the long
+     */
+    public static long calculateDifferentMinute(Date startDate, Date endDate) {
+        return calculateDifference(startDate, endDate, DifferenceMode.Minute);
+    }
+
+    /**
+     * Calculate different hour long.
+     *
+     * @param startDate the start date
+     * @param endDate   the end date
+     * @return the long
+     */
+    public static long calculateDifferentHour(Date startDate, Date endDate) {
+        return calculateDifference(startDate, endDate, DifferenceMode.Hour);
+    }
+
+    /**
+     * Calculate different day long.
+     *
+     * @param startDate the start date
+     * @param endDate   the end date
+     * @return the long
+     */
+    public static long calculateDifferentDay(Date startDate, Date endDate) {
+        return calculateDifference(startDate, endDate, DifferenceMode.Day);
+    }
+
+    /**
+     * Calculate different second long.
+     *
+     * @param startTimeMillis the start time millis
+     * @param endTimeMillis   the end time millis
+     * @return the long
+     */
+    public static long calculateDifferentSecond(long startTimeMillis, long endTimeMillis) {
+        return calculateDifference(startTimeMillis, endTimeMillis, DifferenceMode.Second);
+    }
+
+    /**
+     * Calculate different minute long.
+     *
+     * @param startTimeMillis the start time millis
+     * @param endTimeMillis   the end time millis
+     * @return the long
+     */
+    public static long calculateDifferentMinute(long startTimeMillis, long endTimeMillis) {
+        return calculateDifference(startTimeMillis, endTimeMillis, DifferenceMode.Minute);
+    }
+
+    /**
+     * Calculate different hour long.
+     *
+     * @param startTimeMillis the start time millis
+     * @param endTimeMillis   the end time millis
+     * @return the long
+     */
+    public static long calculateDifferentHour(long startTimeMillis, long endTimeMillis) {
+        return calculateDifference(startTimeMillis, endTimeMillis, DifferenceMode.Hour);
+    }
+
+    /**
+     * Calculate different day long.
+     *
+     * @param startTimeMillis the start time millis
+     * @param endTimeMillis   the end time millis
+     * @return the long
+     */
+    public static long calculateDifferentDay(long startTimeMillis, long endTimeMillis) {
+        return calculateDifference(startTimeMillis, endTimeMillis, DifferenceMode.Day);
+    }
+
+    /**
+     * Calculate difference long.
+     *
+     * @param startTimeMillis the start time millis
+     * @param endTimeMillis   the end time millis
+     * @param mode            the mode
+     * @return the long
+     */
+    public static long calculateDifference(long startTimeMillis, long endTimeMillis, DifferenceMode mode) {
+        return calculateDifference(new Date(startTimeMillis), new Date(endTimeMillis), mode);
+    }
+
+    /**
+     * Calculate difference long.
+     *
+     * @param startDate the start date
+     * @param endDate   the end date
+     * @param mode      the mode
+     * @return the long
+     */
+    public static long calculateDifference(Date startDate, Date endDate, DifferenceMode mode) {
+        long[] different = calculateDifference(startDate, endDate);
+        if (mode.equals(DifferenceMode.Minute)) {
+            return different[2];
+        } else if (mode.equals(DifferenceMode.Hour)) {
+            return different[1];
+        } else if (mode.equals(DifferenceMode.Day)) {
+            return different[0];
+        } else {
+            return different[3];
+        }
+    }
+
+    /**
+     * Calculate difference long [ ].
+     *
+     * @param startDate the start date
+     * @param endDate   the end date
+     * @return the long [ ]
+     */
+    public static long[] calculateDifference(Date startDate, Date endDate) {
+        return calculateDifference(endDate.getTime() - startDate.getTime());
+    }
+
+    /**
+     * Calculate difference long [ ].
+     *
+     * @param differentMilliSeconds the different milli seconds
+     * @return the long [ ]
+     */
+    public static long[] calculateDifference(long differentMilliSeconds) {
+        long secondsInMilli = 1000;//1s==1000ms
+        long minutesInMilli = secondsInMilli * 60;
+        long hoursInMilli = minutesInMilli * 60;
+        long daysInMilli = hoursInMilli * 24;
+        long elapsedDays = differentMilliSeconds / daysInMilli;
+        differentMilliSeconds = differentMilliSeconds % daysInMilli;
+        long elapsedHours = differentMilliSeconds / hoursInMilli;
+        differentMilliSeconds = differentMilliSeconds % hoursInMilli;
+        long elapsedMinutes = differentMilliSeconds / minutesInMilli;
+        differentMilliSeconds = differentMilliSeconds % minutesInMilli;
+        long elapsedSeconds = differentMilliSeconds / secondsInMilli;
+        LogUtils.debug(String.format(Locale.CHINA, "different: %d ms, %d days, %d hours, %d minutes, %d seconds",
+                differentMilliSeconds, elapsedDays, elapsedHours, elapsedMinutes, elapsedSeconds));
+        return new long[]{elapsedDays, elapsedHours, elapsedMinutes, elapsedSeconds};
+    }
+
+    /**
+     * Calculate days in month int.
+     *
+     * @param month the month
+     * @return the int
+     */
+    public static int calculateDaysInMonth(int month) {
+        return calculateDaysInMonth(0, month);
+    }
+
+    /**
+     * Calculate days in month int.
+     *
+     * @param year  the year
+     * @param month the month
+     * @return the int
+     */
+    public static int calculateDaysInMonth(int year, int month) {
+        // 添加大小月月份并将其转换为list,方便之后的判断
+        String[] bigMonths = {"1", "3", "5", "7", "8", "10", "12"};
+        String[] littleMonths = {"4", "6", "9", "11"};
+        List<String> bigList = Arrays.asList(bigMonths);
+        List<String> littleList = Arrays.asList(littleMonths);
+        // 判断大小月及是否闰年,用来确定"日"的数据
+        if (bigList.contains(String.valueOf(month))) {
+            return 31;
+        } else if (littleList.contains(String.valueOf(month))) {
+            return 30;
+        } else {
+            if (year <= 0) {
+                return 29;
+            }
+            // 是否闰年
+            if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {
+                return 29;
+            } else {
+                return 28;
+            }
+        }
+    }
+
+    /**
+     * 月日时分秒,0-9前补0
+     *
+     * @param number the number
+     * @return the string
+     */
+    @NonNull
+    public static String fillZero(int number) {
+        return number < 10 ? "0" + number : "" + number;
+    }
+
+    /**
+     * 功能:判断日期是否和当前date对象在同一天。
+     * 参见:http://www.cnblogs.com/myzhijie/p/3330970.html
+     *
+     * @param date 比较的日期
+     * @return boolean 如果在返回true,否则返回false。
+     * @author 沙琪玛 QQ:862990787 Aug 21, 2013 7:15:53 AM
+     */
+    public static boolean isSameDay(Date date) {
+        if (date == null) {
+            throw new IllegalArgumentException("date is null");
+        }
+        Calendar nowCalendar = Calendar.getInstance();
+        Calendar newCalendar = Calendar.getInstance();
+        newCalendar.setTime(date);
+        return (nowCalendar.get(Calendar.ERA) == newCalendar.get(Calendar.ERA) &&
+                nowCalendar.get(Calendar.YEAR) == newCalendar.get(Calendar.YEAR) &&
+                nowCalendar.get(Calendar.DAY_OF_YEAR) == newCalendar.get(Calendar.DAY_OF_YEAR));
+    }
+
+    /**
+     * 将yyyy-MM-dd HH:mm:ss字符串转换成日期<br/>
+     *
+     * @param dateStr    时间字符串
+     * @param dataFormat 当前时间字符串的格式。
+     * @return Date 日期 ,转换异常时返回null。
+     */
+    public static Date parseDate(String dateStr, String dataFormat) {
+        try {
+            @SuppressLint("SimpleDateFormat")
+            SimpleDateFormat dateFormat = new SimpleDateFormat(dataFormat);
+            Date date = dateFormat.parse(dateStr);
+            return new Date(date.getTime());
+        } catch (Exception e) {
+            LogUtils.warn(e);
+            return null;
+        }
+    }
+
+    /**
+     * 将yyyy-MM-dd HH:mm:ss字符串转换成日期<br/>
+     *
+     * @param dateStr yyyy-MM-dd HH:mm:ss字符串
+     * @return Date 日期 ,转换异常时返回null。
+     */
+    public static Date parseDate(String dateStr) {
+        return parseDate(dateStr, "yyyy-MM-dd HH:mm:ss");
+    }
+
+}

+ 322 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/LogUtils.java

@@ -0,0 +1,322 @@
+package com.xzjmyk.pm.activity.view.wheel;
+
+import android.os.Debug;
+import android.os.Environment;
+import android.text.TextUtils;
+import android.util.Log;
+
+import com.xzjmyk.pm.activity.AppConfig;
+
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+
+/**
+ * 将信息记录到“LogCat”,显示调用方法及所在的文件、行号,方便调试查错。
+ * 在Debug状态下开启,在Release状态下关闭以提高程序性能。
+ *
+ * @author 李玉江[QQ:1023694760]
+ * @since 2013/11/2
+ */
+public final class LogUtils {
+    private static final int MIN_STACK_OFFSET = 3;// starts at this class after two native calls
+    private static final int MAX_STACK_TRACE_SIZE = 131071; //128 KB - 1
+    private static final int METHOD_COUNT = 2; // show method count in trace
+    private static boolean isDebug = true;// 是否调试模式
+    private static String debugTag = "wheel";// LogCat的标记
+
+    /**
+     * Verbose.
+     *
+     * @param message the message
+     */
+    public static void verbose(String message) {
+        verbose("", message);
+    }
+
+    /**
+     * Verbose.
+     *
+     * @param object  the object
+     * @param message the message
+     */
+    public static void verbose(Object object, String message) {
+        verbose(object.getClass().getSimpleName(), message);
+    }
+
+    /**
+     * 记录“verbose”级别的信息
+     *
+     * @param tag     the tag
+     * @param message the message
+     */
+    public static void verbose(String tag, String message) {
+        if (isDebug) {
+            tag = debugTag + (TextUtils.isEmpty(tag) ? "" : "-" + tag);
+            String msg = message + getTraceElement();
+            try {
+                Log.v(tag, msg);
+            } catch (Exception e) {
+                System.out.println(tag + ">>>" + msg);
+            }
+        }
+    }
+
+    /**
+     * Debug.
+     *
+     * @param message the message
+     */
+    public static void debug(String message) {
+        debug("", message);
+    }
+
+    /**
+     * Debug.
+     *
+     * @param object  the object
+     * @param message the message
+     */
+    public static void debug(Object object, String message) {
+        debug(object.getClass().getSimpleName(), message);
+    }
+
+    /**
+     * 记录“debug”级别的信息
+     *
+     * @param tag     the tag
+     * @param message the message
+     */
+    public static void debug(String tag, String message) {
+        if (isDebug) {
+            tag = debugTag + (TextUtils.isEmpty(tag) ? "" : "-" + tag);
+            String msg = message + getTraceElement();
+            try {
+                Log.d(tag, msg);
+            } catch (Exception e) {
+                System.out.println(tag + ">>>" + msg);
+            }
+        }
+    }
+
+    /**
+     * Warn.
+     *
+     * @param e the e
+     */
+    public static void warn(Throwable e) {
+        warn(toStackTraceString(e));
+    }
+
+    /**
+     * Warn.
+     *
+     * @param message the message
+     */
+    public static void warn(String message) {
+        warn("", message);
+    }
+
+    /**
+     * Warn.
+     *
+     * @param object  the object
+     * @param message the message
+     */
+    public static void warn(Object object, String message) {
+        warn(object.getClass().getSimpleName(), message);
+    }
+
+    /**
+     * Warn.
+     *
+     * @param object the object
+     * @param e      the e
+     */
+    public static void warn(Object object, Throwable e) {
+        warn(object.getClass().getSimpleName(), toStackTraceString(e));
+    }
+
+    /**
+     * 记录“warn”级别的信息
+     *
+     * @param tag     the tag
+     * @param message the message
+     */
+    public static void warn(String tag, String message) {
+        if (isDebug) {
+            tag = debugTag + (TextUtils.isEmpty(tag) ? "" : "-" + tag);
+            String msg = message + getTraceElement();
+            try {
+                Log.w(tag, msg);
+            } catch (Exception e) {
+                System.out.println(tag + ">>>" + msg);
+            }
+        }
+    }
+
+    /**
+     * Error.
+     *
+     * @param e the e
+     */
+    public static void error(Throwable e) {
+        error(toStackTraceString(e));
+    }
+
+    /**
+     * Error.
+     *
+     * @param message the message
+     */
+    public static void error(String message) {
+        error("", message);
+    }
+
+    /**
+     * Error.
+     *
+     * @param object  the object
+     * @param message the message
+     */
+    public static void error(Object object, String message) {
+        error(object.getClass().getSimpleName(), message);
+    }
+
+    /**
+     * Error.
+     *
+     * @param object the object
+     * @param e      the e
+     */
+    public static void error(Object object, Throwable e) {
+        error(object.getClass().getSimpleName(), toStackTraceString(e));
+    }
+
+    /**
+     * 记录“error”级别的信息
+     *
+     * @param tag     the tag
+     * @param message the message
+     */
+    public static void error(String tag, String message) {
+        if (isDebug) {
+            tag = debugTag + (TextUtils.isEmpty(tag) ? "" : "-" + tag);
+            String msg = message + getTraceElement();
+            try {
+                Log.e(tag, msg);
+            } catch (Exception e) {
+                System.err.println(tag + ">>>" + msg);
+            }
+        }
+    }
+
+    /**
+     * 在某个方法中调用生成.trace文件。然后拿到电脑上用DDMS工具打开分析
+     *
+     * @see #stopMethodTracing()
+     */
+    public static void startMethodTracing() {
+        if (isDebug) {
+            Debug.startMethodTracing(Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + debugTag + ".trace");
+        }
+    }
+
+    /**
+     * Stop method tracing.
+     */
+    public static void stopMethodTracing() {
+        if (isDebug) {
+            Debug.stopMethodTracing();
+        }
+    }
+
+    /**
+     * To stack trace string string.
+     * <p/>
+     * 此方法参见:https://github.com/Ereza/CustomActivityOnCrash
+     *
+     * @param throwable the throwable
+     * @return the string
+     */
+    public static String toStackTraceString(Throwable throwable) {
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        throwable.printStackTrace(pw);
+        String stackTraceString = sw.toString();
+        //Reduce data to 128KB so we don't get a TransactionTooLargeException when sending the intent.
+        //The limit is 1MB on Android but some devices seem to have it lower.
+        //See: http://developer.android.com/reference/android/os/TransactionTooLargeException.html
+        //And: http://stackoverflow.com/questions/11451393/what-to-do-on-transactiontoolargeexception#comment46697371_12809171
+        if (stackTraceString.length() > MAX_STACK_TRACE_SIZE) {
+            String disclaimer = " [stack trace too large]";
+            stackTraceString = stackTraceString.substring(0, MAX_STACK_TRACE_SIZE - disclaimer.length()) + disclaimer;
+        }
+        return stackTraceString;
+    }
+
+    /**
+     * 可显示调用方法所在的文件行号,在AndroidStudio的logcat处可点击定位。
+     * 此方法参考:https://github.com/orhanobut/logger
+     */
+    private static String getTraceElement() {
+        try {
+            int methodCount = METHOD_COUNT;
+            StackTraceElement[] trace = Thread.currentThread().getStackTrace();
+            int stackOffset = _getStackOffset(trace);
+
+            //corresponding method count with the current stack may exceeds the stack trace. Trims the count
+            if (methodCount + stackOffset > trace.length) {
+                methodCount = trace.length - stackOffset - 1;
+            }
+
+            String level = "    ";
+            StringBuilder builder = new StringBuilder();
+            for (int i = methodCount; i > 0; i--) {
+                int stackIndex = i + stackOffset;
+                if (stackIndex >= trace.length) {
+                    continue;
+                }
+                builder.append("\n")
+                        .append(level)
+                        .append(_getSimpleClassName(trace[stackIndex].getClassName()))
+                        .append(".")
+                        .append(trace[stackIndex].getMethodName())
+                        .append(" ")
+                        .append("(")
+                        .append(trace[stackIndex].getFileName())
+                        .append(":")
+                        .append(trace[stackIndex].getLineNumber())
+                        .append(")");
+                level += "    ";
+            }
+            return builder.toString();
+        } catch (Exception e) {
+            return "";
+        }
+    }
+
+    /**
+     * Determines the starting index of the stack trace, after method calls made by this class.
+     *
+     * @param trace the stack trace
+     * @return the stack offset
+     */
+    private static int _getStackOffset(StackTraceElement[] trace) {
+        for (int i = MIN_STACK_OFFSET; i < trace.length; i++) {
+            StackTraceElement e = trace[i];
+            String name = e.getClassName();
+            if (!name.equals(LogUtils.class.getName())) {
+                return --i;
+            }
+        }
+        return -1;
+    }
+
+    private static String _getSimpleClassName(String name) {
+        int lastIndex = name.lastIndexOf(".");
+        return name.substring(lastIndex + 1);
+    }
+
+}

+ 172 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/Popup.java

@@ -0,0 +1,172 @@
+package com.xzjmyk.pm.activity.view.wheel;
+
+import android.content.Context;
+import android.content.DialogInterface;
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
+import android.support.annotation.CallSuper;
+import android.support.annotation.StyleRes;
+import android.view.Gravity;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
+import android.widget.FrameLayout;
+
+import com.xzjmyk.pm.activity.R;
+
+
+/**
+ * 弹窗
+ *
+ * @author 李玉江[QQ :1023694760]
+ * @see android.widget.PopupWindow
+ * @since 2015-10-19
+ */
+public class Popup {
+    private android.app.Dialog dialog;
+    private FrameLayout contentLayout;
+
+    /**
+     * Instantiates a new Popup.
+     *
+     * @param context the context
+     */
+    public Popup(Context context) {
+        init(context);
+    }
+
+    private void init(Context context) {
+        contentLayout = new FrameLayout(context);
+        contentLayout.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
+        contentLayout.setFocusable(true);
+        contentLayout.setFocusableInTouchMode(true);
+        dialog = new android.app.Dialog(context);
+        dialog.setCanceledOnTouchOutside(true);//触摸屏幕取消窗体
+        dialog.setCancelable(true);//按返回键取消窗体
+        Window window = dialog.getWindow();
+        window.setGravity(Gravity.BOTTOM);//位于屏幕底部
+        window.setWindowAnimations(R.style.Animation_Popup);
+        window.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
+        //android.util.AndroidRuntimeException: requestFeature() must be called before adding content
+        window.requestFeature(Window.FEATURE_NO_TITLE);
+        window.setContentView(contentLayout);
+    }
+
+    /**
+     * Gets context.
+     *
+     * @return the context
+     */
+    public Context getContext() {
+        return contentLayout.getContext();
+    }
+
+    /**
+     * Sets animation.
+     *
+     * @param animRes the anim res
+     */
+    public void setAnimationStyle(@StyleRes int animRes) {
+        Window window = dialog.getWindow();
+        window.setWindowAnimations(animRes);
+    }
+
+    /**
+     * Is showing boolean.
+     *
+     * @return the boolean
+     */
+    public boolean isShowing() {
+        return dialog.isShowing();
+    }
+
+    /**
+     * Show.
+     */
+    @CallSuper
+    public void show() {
+        dialog.show();
+    }
+
+    /**
+     * Dismiss.
+     */
+    @CallSuper
+    public void dismiss() {
+        dialog.dismiss();
+    }
+
+    /**
+     * Sets content view.
+     *
+     * @param view the view
+     */
+    public void setContentView(View view) {
+        contentLayout.removeAllViews();
+        contentLayout.addView(view);
+    }
+
+    /**
+     * Gets content view.
+     *
+     * @return the content view
+     */
+    public View getContentView() {
+        return contentLayout.getChildAt(0);
+    }
+
+    /**
+     * Sets size.
+     *
+     * @param width  the width
+     * @param height the height
+     */
+    public void setSize(int width, int height) {
+        LogUtils.verbose(String.format("will set popup width/height to: %s/%s", width, height));
+        ViewGroup.LayoutParams params = contentLayout.getLayoutParams();
+        if (params == null) {
+            params = new ViewGroup.LayoutParams(width, height);
+        } else {
+            params.width = width;
+            params.height = height;
+        }
+        contentLayout.setLayoutParams(params);
+    }
+
+    /**
+     * Sets on dismiss listener.
+     *
+     * @param onDismissListener the on dismiss listener
+     */
+    public void setOnDismissListener(DialogInterface.OnDismissListener onDismissListener) {
+        dialog.setOnDismissListener(onDismissListener);
+    }
+
+    /**
+     * Sets on key listener.
+     *
+     * @param onKeyListener the on key listener
+     */
+    public void setOnKeyListener(DialogInterface.OnKeyListener onKeyListener) {
+        dialog.setOnKeyListener(onKeyListener);
+    }
+
+    /**
+     * Gets window.
+     *
+     * @return the window
+     */
+    public Window getWindow() {
+        return dialog.getWindow();
+    }
+
+    /**
+     * Gets root view.
+     *
+     * @return the root view
+     */
+    public ViewGroup getRootView() {
+        return contentLayout;
+    }
+
+}

+ 111 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/ScreenUtils.java

@@ -0,0 +1,111 @@
+package com.xzjmyk.pm.activity.view.wheel;
+
+import android.app.Activity;
+import android.content.Context;
+import android.util.DisplayMetrics;
+import android.view.Window;
+import android.view.WindowManager;
+
+/**
+ * 获取屏幕宽高等信息、全屏切换、保持屏幕常亮、截屏等
+ *
+ * @author liyujiang[QQ:1032694760]
+ * @since 2015/11/26
+ */
+public final class ScreenUtils {
+    private static boolean isFullScreen = false;
+
+    /**
+     * Display metrics display metrics.
+     *
+     * @param context the context
+     * @return the display metrics
+     */
+    public static DisplayMetrics displayMetrics(Context context) {
+        DisplayMetrics dm = new DisplayMetrics();
+        WindowManager windowManager = (WindowManager) context
+                .getSystemService(Context.WINDOW_SERVICE);
+        windowManager.getDefaultDisplay().getMetrics(dm);
+        LogUtils.verbose("screen width=" + dm.widthPixels + "px, screen height=" + dm.heightPixels
+                + "px, densityDpi=" + dm.densityDpi + ", density=" + dm.density);
+        return dm;
+    }
+
+    /**
+     * Width pixels int.
+     *
+     * @param context the context
+     * @return the int
+     */
+    public static int widthPixels(Context context) {
+        return displayMetrics(context).widthPixels;
+    }
+
+    /**
+     * Height pixels int.
+     *
+     * @param context the context
+     * @return the int
+     */
+    public static int heightPixels(Context context) {
+        return displayMetrics(context).heightPixels;
+    }
+
+    /**
+     * Density float.
+     *
+     * @param context the context
+     * @return the float
+     */
+    public static float density(Context context) {
+        return displayMetrics(context).density;
+    }
+
+    /**
+     * Density dpi int.
+     *
+     * @param context the context
+     * @return the int
+     */
+    public static int densityDpi(Context context) {
+        return displayMetrics(context).densityDpi;
+    }
+
+    /**
+     * Is full screen boolean.
+     *
+     * @return the boolean
+     */
+    public static boolean isFullScreen() {
+        return isFullScreen;
+    }
+
+    /**
+     * Toggle full displayMetrics.
+     *
+     * @param activity the activity
+     */
+    public static void toggleFullScreen(Activity activity) {
+        Window window = activity.getWindow();
+        int flagFullscreen = WindowManager.LayoutParams.FLAG_FULLSCREEN;
+        if (isFullScreen) {
+            window.clearFlags(flagFullscreen);
+            isFullScreen = false;
+        } else {
+            window.setFlags(flagFullscreen, flagFullscreen);
+            isFullScreen = true;
+        }
+    }
+
+    /**
+     * 保持屏幕常亮
+     *
+     * @param activity the activity
+     */
+    public static void keepBright(Activity activity) {
+        //需在setContentView前调用
+        int keepScreenOn = WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
+        activity.getWindow().setFlags(keepScreenOn, keepScreenOn);
+    }
+
+}

+ 106 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/WheelPicker.java

@@ -0,0 +1,106 @@
+package com.xzjmyk.pm.activity.view.wheel;
+
+import android.app.Activity;
+import android.support.annotation.ColorInt;
+import android.support.annotation.IntRange;
+import android.view.View;
+
+
+/**
+ * 滑轮选择器
+ *
+ * @author 李玉江[QQ :1032694760]
+ * @version 2015 /12/22
+ */
+public abstract class WheelPicker extends ConfirmPopup<View> {
+    /**
+     * The Text size.
+     */
+    protected int textSize = WheelView.TEXT_SIZE;
+    /**
+     * The Text color normal.
+     */
+    protected int textColorNormal = WheelView.TEXT_COLOR_NORMAL;
+    /**
+     * The Text color focus.
+     */
+    protected int textColorFocus = WheelView.TEXT_COLOR_FOCUS;
+    /**
+     * The Line color.
+     */
+    protected int lineColor = WheelView.LINE_COLOR;
+    /**
+     * The Line visible.
+     */
+    protected boolean lineVisible = true;
+    /**
+     * The Offset.
+     */
+    protected int offset = WheelView.OFF_SET;
+
+    /**
+     * Instantiates a new Wheel picker.
+     *
+     * @param activity the activity
+     */
+    public WheelPicker(Activity activity) {
+        super(activity);
+    }
+
+    /**
+     * Sets text size.
+     *
+     * @param textSize the text size
+     */
+    public void setTextSize(int textSize) {
+        this.textSize = textSize;
+    }
+
+    /**
+     * Sets text color.
+     *
+     * @param textColorFocus  the text color focus
+     * @param textColorNormal the text color normal
+     */
+    public void setTextColor(@ColorInt int textColorFocus, @ColorInt int textColorNormal) {
+        this.textColorFocus = textColorFocus;
+        this.textColorNormal = textColorNormal;
+    }
+
+    /**
+     * Sets text color.
+     *
+     * @param textColor the text color
+     */
+    public void setTextColor(@ColorInt int textColor) {
+        this.textColorFocus = textColor;
+    }
+
+    /**
+     * Sets line visible.
+     *
+     * @param lineVisible the line visible
+     */
+    public void setLineVisible(boolean lineVisible) {
+        this.lineVisible = lineVisible;
+    }
+
+    /**
+     * Sets line color.
+     *
+     * @param lineColor the line color
+     */
+    public void setLineColor(@ColorInt int lineColor) {
+        this.lineColor = lineColor;
+    }
+
+    /**
+     * Sets offset.
+     *
+     * @param offset the offset
+     */
+    public void setOffset(@IntRange(from = 1, to = 4) int offset) {
+        this.offset = offset;
+    }
+
+}

+ 616 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/WheelView.java

@@ -0,0 +1,616 @@
+package com.xzjmyk.pm.activity.view.wheel;
+
+import android.app.Activity;
+import android.content.Context;
+import android.graphics.Canvas;
+import android.graphics.ColorFilter;
+import android.graphics.Paint;
+import android.graphics.drawable.Drawable;
+import android.os.Build;
+import android.support.annotation.ColorInt;
+import android.support.annotation.IntRange;
+import android.text.TextUtils;
+import android.util.AttributeSet;
+import android.view.Gravity;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.LinearLayout;
+import android.widget.ScrollView;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * 基于原版(https://github.com/wangjiegulu/WheelView)作了一下修改:
+ * 去掉回弹阴影
+ * 修正以便支持联动效果
+ * 可设置颜色
+ * 设置文字大小
+ * 分隔线是否可见
+ * 初始设置选中选项
+ *
+ * @author 李玉江[QQ:1023694760]
+ * @since 2015/12/17
+ */
+public class WheelView extends ScrollView {
+    /**
+     * The constant TEXT_SIZE.
+     */
+    public static final int TEXT_SIZE = 20;
+    /**
+     * The constant TEXT_COLOR_FOCUS.
+     */
+    public static final int TEXT_COLOR_FOCUS = 0XFF0288CE;
+    /**
+     * The constant TEXT_COLOR_NORMAL.
+     */
+    public static final int TEXT_COLOR_NORMAL = 0XFFBBBBBB;
+    /**
+     * The constant LINE_COLOR.
+     */
+    public static final int LINE_COLOR = 0XFF83CDE6;
+    /**
+     * The constant OFF_SET.
+     */
+    public static final int OFF_SET = 1;
+    private static final int DELAY = 50;
+
+    private Context context;
+    private LinearLayout views;
+    private List<String> items = new ArrayList<String>();
+    private int offset = OFF_SET; // 偏移量(需要在最前面和最后面补全)
+
+    private int displayItemCount; // 每页显示的数量
+
+    private int selectedIndex = OFF_SET;
+    private int initialY;
+
+    private Runnable scrollerTask = new ScrollerTask();
+    private int itemHeight = 0;
+    private int[] selectedAreaBorder;//获取选中区域的边界
+    private OnWheelViewListener onWheelViewListener;
+
+    private Paint paint;
+    private int viewWidth;
+    private int textSize = TEXT_SIZE;
+    private int textColorNormal = TEXT_COLOR_NORMAL;
+    private int textColorFocus = TEXT_COLOR_FOCUS;
+    private int lineColor = LINE_COLOR;
+    private boolean lineVisible = true;
+    private boolean isUserScroll = false;//是否用户手动滚动
+    private float previousY = 0;//记录按下时的Y坐标
+
+    /**
+     * Instantiates a new Wheel view.
+     *
+     * @param context the context
+     */
+    public WheelView(Context context) {
+        super(context);
+        init(context);
+    }
+
+    /**
+     * Instantiates a new Wheel view.
+     *
+     * @param context the context
+     * @param attrs   the attrs
+     */
+    public WheelView(Context context, AttributeSet attrs) {
+        super(context, attrs);
+        init(context);
+    }
+
+    /**
+     * Instantiates a new Wheel view.
+     *
+     * @param context  the context
+     * @param attrs    the attrs
+     * @param defStyle the def style
+     */
+    public WheelView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+        init(context);
+    }
+
+    private void init(Context context) {
+        this.context = context;
+
+        // 2015/12/15 去掉ScrollView的阴影
+        setFadingEdgeLength(0);
+        if (Build.VERSION.SDK_INT >= 9) {
+            setOverScrollMode(OVER_SCROLL_NEVER);
+        }
+
+        setVerticalScrollBarEnabled(false);
+
+        views = new LinearLayout(context);
+        views.setOrientation(LinearLayout.VERTICAL);
+        addView(views);
+    }
+
+    private void startScrollerTask() {
+        initialY = getScrollY();
+        postDelayed(scrollerTask, DELAY);
+    }
+
+    private void initData() {
+        displayItemCount = offset * 2 + 1;
+
+        // 2015/12/15 添加此句才可以支持联动效果
+        views.removeAllViews();
+
+        for (String item : items) {
+            views.addView(createView(item));
+        }
+
+        // 2016/1/15 焦点文字颜色高亮位置,逆推“int position = y / itemHeight + offset”
+        refreshItemView(itemHeight * (selectedIndex - offset));
+    }
+
+    private TextView createView(String item) {
+        TextView tv = new TextView(context);
+        tv.setLayoutParams(new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
+        tv.setSingleLine(true);
+        tv.setEllipsize(TextUtils.TruncateAt.END);
+        tv.setText(item);
+        tv.setTextSize(textSize);
+        tv.setGravity(Gravity.CENTER);
+        int padding = dip2px(15);
+        tv.setPadding(padding, padding, padding, padding);
+        if (0 == itemHeight) {
+            itemHeight = getViewMeasuredHeight(tv);
+            LogUtils.debug(this, "itemHeight: " + itemHeight);
+            views.setLayoutParams(new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, itemHeight * displayItemCount));
+            LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) this.getLayoutParams();
+            setLayoutParams(new LinearLayout.LayoutParams(lp.width, itemHeight * displayItemCount));
+        }
+        return tv;
+    }
+
+
+    private void refreshItemView(int y) {
+        int position = y / itemHeight + offset;
+        int remainder = y % itemHeight;
+        int divided = y / itemHeight;
+
+        if (remainder == 0) {
+            position = divided + offset;
+        } else {
+            if (remainder > itemHeight / 2) {
+                position = divided + offset + 1;
+            }
+        }
+
+        int childSize = views.getChildCount();
+        for (int i = 0; i < childSize; i++) {
+            TextView itemView = (TextView) views.getChildAt(i);
+            if (null == itemView) {
+                return;
+            }
+            // 2015/12/15 可设置颜色
+            if (position == i) {
+                itemView.setTextColor(textColorFocus);
+            } else {
+                itemView.setTextColor(textColorNormal);
+            }
+        }
+    }
+
+    private int[] obtainSelectedAreaBorder() {
+        if (null == selectedAreaBorder) {
+            selectedAreaBorder = new int[2];
+            selectedAreaBorder[0] = itemHeight * offset;
+            selectedAreaBorder[1] = itemHeight * (offset + 1);
+        }
+        return selectedAreaBorder;
+    }
+
+    /**
+     * 选中回调
+     */
+    private void onSelectedCallBack() {
+        if (null != onWheelViewListener) {
+            // 2015/12/25 真实的index应该忽略偏移量
+            onWheelViewListener.onSelected(isUserScroll, selectedIndex - offset, items.get(selectedIndex));
+        }
+    }
+
+    private int dip2px(float dpValue) {
+        final float scale = context.getResources().getDisplayMetrics().density;
+        return (int) (dpValue * scale + 0.5f);
+    }
+
+    private int getViewMeasuredHeight(View view) {
+        int width = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
+        int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
+        view.measure(width, expandSpec);
+        return view.getMeasuredHeight();
+    }
+
+    @Override
+    public void setBackground(Drawable background) {
+        setBackgroundDrawable(background);
+    }
+
+    @SuppressWarnings("deprecation")
+    @Override
+    public void setBackgroundDrawable(Drawable background) {
+        if (viewWidth == 0) {
+            viewWidth = ((Activity) context).getWindowManager().getDefaultDisplay().getWidth();
+            LogUtils.debug(this, "viewWidth: " + viewWidth);
+        }
+
+        // 2015/12/22 可设置分隔线是否可见
+        if (!lineVisible) {
+            return;
+        }
+
+        if (null == paint) {
+            paint = new Paint();
+            paint.setColor(lineColor);
+            paint.setStrokeWidth(dip2px(1f));
+        }
+
+        background = new Drawable() {
+            @Override
+            public void draw(Canvas canvas) {
+                int[] areaBorder = obtainSelectedAreaBorder();
+                canvas.drawLine(viewWidth / 6, areaBorder[0], viewWidth * 5 / 6, areaBorder[0], paint);
+                canvas.drawLine(viewWidth / 6, areaBorder[1], viewWidth * 5 / 6, areaBorder[1], paint);
+            }
+
+            @Override
+            public void setAlpha(int alpha) {
+
+            }
+
+            @Override
+            public void setColorFilter(ColorFilter cf) {
+
+            }
+
+            @Override
+            public int getOpacity() {
+                return 0;
+            }
+        };
+        super.setBackgroundDrawable(background);
+    }
+
+    @Override
+    protected void onScrollChanged(int l, int t, int oldl, int oldt) {
+        super.onScrollChanged(l, t, oldl, oldt);
+        refreshItemView(t);
+    }
+
+    @Override
+    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+        super.onSizeChanged(w, h, oldw, oldh);
+        LogUtils.debug(this, "w: " + w + ", h: " + h + ", oldw: " + oldw + ", oldh: " + oldh);
+        viewWidth = w;
+        setBackgroundDrawable(null);
+    }
+
+    @Override
+    public void fling(int velocityY) {
+        super.fling(velocityY / 3);
+    }
+
+    @Override
+    public boolean onTouchEvent(MotionEvent ev) {
+        switch (ev.getAction()) {
+            case MotionEvent.ACTION_DOWN:
+                previousY = ev.getY();
+                break;
+            case MotionEvent.ACTION_UP:
+                LogUtils.debug(this, String.format("items=%s, offset=%s", items.size(), offset));
+                LogUtils.debug(this, "selectedIndex=" + selectedIndex);
+                float delta = ev.getY() - previousY;
+                LogUtils.debug(this, "delta=" + delta);
+                if (selectedIndex == offset && delta > 0) {
+                    //滑动到第一项时,若继续向下滑动,则自动跳到最后一项
+                    setSelectedIndex(items.size() - offset * 2 - 1);
+                } else if (selectedIndex == items.size() - offset - 1 && delta < 0) {
+                    //滑动到最后一项时,若继续向上滑动,则自动跳到第一项
+                    setSelectedIndex(0);
+                } else {
+                    isUserScroll = true;
+                    startScrollerTask();
+                }
+                break;
+        }
+        return super.onTouchEvent(ev);
+    }
+
+    private void _setItems(List<String> list) {
+        items.clear();
+        items.addAll(list);
+
+        // 前面和后面补全
+        for (int i = 0; i < offset; i++) {
+            items.add(0, "");
+            items.add("");
+        }
+
+        initData();
+
+    }
+
+    /**
+     * Sets items.
+     *
+     * @param list the list
+     */
+    public void setItems(List<String> list) {
+        _setItems(list);
+        // 2015/12/25 初始化时设置默认选中项
+        setSelectedIndex(0);
+    }
+
+    /**
+     * Sets items.
+     *
+     * @param list  the list
+     * @param index the index
+     */
+    public void setItems(List<String> list, int index) {
+        _setItems(list);
+        setSelectedIndex(index);
+    }
+
+    /**
+     * Sets items.
+     *
+     * @param list the list
+     * @param item the item
+     */
+    public void setItems(List<String> list, String item) {
+        _setItems(list);
+        setSelectedItem(item);
+    }
+
+    /**
+     * Gets text size.
+     *
+     * @return the text size
+     */
+    public int getTextSize() {
+        return textSize;
+    }
+
+    /**
+     * Sets text size.
+     *
+     * @param textSize the text size
+     */
+    public void setTextSize(int textSize) {
+        this.textSize = textSize;
+    }
+
+    /**
+     * Gets text color.
+     *
+     * @return the text color
+     */
+    public int getTextColor() {
+        return textColorFocus;
+    }
+
+    /**
+     * Sets text color.
+     *
+     * @param textColorNormal the text color normal
+     * @param textColorFocus  the text color focus
+     */
+    public void setTextColor(@ColorInt int textColorNormal, @ColorInt int textColorFocus) {
+        this.textColorNormal = textColorNormal;
+        this.textColorFocus = textColorFocus;
+    }
+
+    /**
+     * Sets text color.
+     *
+     * @param textColor the text color
+     */
+    public void setTextColor(@ColorInt int textColor) {
+        this.textColorFocus = textColor;
+    }
+
+    /**
+     * Is line visible boolean.
+     *
+     * @return the boolean
+     */
+    public boolean isLineVisible() {
+        return lineVisible;
+    }
+
+    /**
+     * Sets line visible.
+     *
+     * @param lineVisible the line visible
+     */
+    public void setLineVisible(boolean lineVisible) {
+        this.lineVisible = lineVisible;
+    }
+
+    /**
+     * Gets line color.
+     *
+     * @return the line color
+     */
+    public int getLineColor() {
+        return lineColor;
+    }
+
+    /**
+     * Sets line color.
+     *
+     * @param lineColor the line color
+     */
+    public void setLineColor(@ColorInt int lineColor) {
+        this.lineColor = lineColor;
+    }
+
+    /**
+     * Gets offset.
+     *
+     * @return the offset
+     */
+    public int getOffset() {
+        return offset;
+    }
+
+    /**
+     * Sets offset.
+     *
+     * @param offset the offset
+     */
+    public void setOffset(@IntRange(from = 1, to = 4) int offset) {
+        if (offset < 1 || offset > 4) {
+            throw new IllegalArgumentException("Offset must between 1 and 4");
+        }
+        this.offset = offset;
+    }
+
+    /**
+     * 从0开始计数,所有项包括偏移量
+     *
+     * @param index
+     */
+    private void setSelectedIndex(@IntRange(from = 0) final int index) {
+        isUserScroll = false;
+        this.post(new Runnable() {
+            @Override
+            public void run() {
+                //滚动到选中项的位置
+                smoothScrollTo(0, index * itemHeight);
+                //选中这一项的值
+                selectedIndex = index + offset;
+                onSelectedCallBack();
+            }
+        });
+    }
+
+    /**
+     * Sets selected item.
+     *
+     * @param item the item
+     */
+    public void setSelectedItem(String item) {
+        for (int i = 0; i < items.size(); i++) {
+            if (items.get(i).equals(item)) {
+                //调用_setItems(List)时额外添加了offset个占位符到items里,需要忽略占位符所占的位
+                setSelectedIndex(i - offset);
+                break;
+            }
+        }
+    }
+
+    /**
+     * Use {@link #getSelectedItem()} instead
+     */
+    @Deprecated
+    public String getSeletedItem() {
+        return getSelectedItem();
+    }
+
+    /**
+     * Gets selected item.
+     *
+     * @return the selected item
+     */
+    public String getSelectedItem() {
+        return items.get(selectedIndex);
+    }
+
+    /**
+     * Use {@link #getSelectedIndex()} instead
+     */
+    @Deprecated
+    public int getSeletedIndex() {
+        return getSelectedIndex();
+    }
+
+    /**
+     * Gets selected index.
+     *
+     * @return the selected index
+     */
+    public int getSelectedIndex() {
+        return selectedIndex - offset;
+    }
+
+    /**
+     * Sets on wheel view listener.
+     *
+     * @param onWheelViewListener the on wheel view listener
+     */
+    public void setOnWheelViewListener(OnWheelViewListener onWheelViewListener) {
+        this.onWheelViewListener = onWheelViewListener;
+    }
+
+    /**
+     * The interface On wheel view listener.
+     */
+    public interface OnWheelViewListener {
+        /**
+         * On selected.
+         *
+         * @param isUserScroll  the is user scroll
+         * @param selectedIndex the selected index
+         * @param item          the item
+         */
+        void onSelected(boolean isUserScroll, int selectedIndex, String item);
+    }
+
+    private class ScrollerTask implements Runnable {
+
+        @Override
+        public void run() {
+            // 2015/12/17 java.lang.ArithmeticException: divide by zero
+            if (itemHeight == 0) {
+                LogUtils.debug(this, "itemHeight is zero");
+                return;
+            }
+            int newY = getScrollY();
+            if (initialY - newY == 0) { // stopped
+                final int remainder = initialY % itemHeight;
+                final int divided = initialY / itemHeight;
+                LogUtils.debug(this, "initialY: " + initialY + ", remainder: " + remainder + ", divided: " + divided);
+                if (remainder == 0) {
+                    selectedIndex = divided + offset;
+                    onSelectedCallBack();
+                } else {
+                    if (remainder > itemHeight / 2) {
+                        post(new Runnable() {
+                            @Override
+                            public void run() {
+                                smoothScrollTo(0, initialY - remainder + itemHeight);
+                                selectedIndex = divided + offset + 1;
+                                onSelectedCallBack();
+                            }
+                        });
+                    } else {
+                        post(new Runnable() {
+                            @Override
+                            public void run() {
+                                smoothScrollTo(0, initialY - remainder);
+                                selectedIndex = divided + offset;
+                                onSelectedCallBack();
+                            }
+                        });
+                    }
+                }
+            } else {
+                startScrollerTask();
+            }
+        }
+
+    }
+
+}

BIN
WeiChat/src/main/res/drawable-hdpi/icon_date.png


BIN
WeiChat/src/main/res/drawable-hdpi/icon_select.png


BIN
WeiChat/src/main/res/drawable-hdpi/icon_sunzhang.png


BIN
WeiChat/src/main/res/drawable-hdpi/icon_touxiang.png


+ 2 - 2
WeiChat/src/main/res/drawable/oa_rb_button_bg.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:drawable="@drawable/oa_rb_pass" android:state_checked="true" android:state_enabled="true"/>
-    <item android:drawable="@drawable/oa_rb"/>
+    <item android:drawable="@drawable/oa_rb_pass" android:state_checked="true" android:state_enabled="true" />
+    <item android:drawable="@drawable/oa_rb" />
 </selector>

+ 2 - 2
WeiChat/src/main/res/drawable/select_weixin_list_item.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:drawable="@color/item_color2" android:state_pressed="true"/>
+    <item android:drawable="@color/item_color1" android:state_pressed="true" />
     <item android:drawable="@color/item_color1" android:state_selected="true"/>
-    <item android:drawable="@color/item_color1"/>
+    <item android:drawable="@color/item_color2" />
 </selector>

+ 1 - 1
WeiChat/src/main/res/drawable/shape_btn_bussine.xml

@@ -7,7 +7,7 @@
         android:bottomRightRadius="6dp"
         android:bottomLeftRadius="6dp"></corners>
     <stroke
-        android:width="3dp"
+        android:width="1dp"
         android:color="#999999"></stroke>
     <solid android:color="#fefefe"></solid>
 </shape>

+ 8 - 0
WeiChat/src/main/res/drawable/shape_pop_ll.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <stroke
+        android:width="1dp"
+        android:color="@color/item_color1"></stroke>
+    <solid android:color="#fefefe"></solid>
+</shape>

+ 2 - 2
WeiChat/src/main/res/drawable/tab_signin_play.xml

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:drawable="@drawable/oa_signin_play_pass" android:state_checked="true" android:state_enabled="true"/>
-    <item android:drawable="@drawable/oa_signin_play"/>
+    <item android:drawable="@drawable/oa_signin_play_pass" android:state_checked="true" android:state_enabled="true" />
+    <item android:drawable="@drawable/oa_signin_play" />
 </selector>

+ 0 - 1
WeiChat/src/main/res/layout/activity_add_meet_main.xml

@@ -15,5 +15,4 @@
         android:dividerHeight="2px" />
 
 
-
 </RelativeLayout>

+ 347 - 6
WeiChat/src/main/res/layout/activity_customer_detail.xml

@@ -1,12 +1,353 @@
 <?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:paddingLeft="@dimen/activity_horizontal_margin"
-    android:paddingRight="@dimen/activity_horizontal_margin"
-    android:paddingTop="@dimen/activity_vertical_margin"
-    android:paddingBottom="@dimen/activity_vertical_margin"
     tools:context="com.xzjmyk.pm.activity.ui.erp.activity.crm.CustomerDetailActivity">
 
-</RelativeLayout>
+    <LinearLayout
+        android:layout_margin="0dp"
+        android:layout_height="wrap_content"
+        android:background="@color/crm_basic_bg"
+        style="@style/crm_ll_card">
+
+        <LinearLayout
+            android:layout_height="wrap_content"
+            style="@style/LinearLayout_vertical">
+
+            <TextView
+                android:textSize="18sp"
+                android:layout_margin="20dp"
+                android:textColor="@color/white"
+                android:text="深圳市xxx公司"
+                style="@style/TextView_VerticalCenter" />
+
+            <TextView
+                android:layout_marginLeft="20dp"
+                android:layout_marginBottom="5dp"
+                android:textColor="@color/white"
+                android:text="负责人:深圳市xxx公司"
+                style="@style/TextView_VerticalCenter" />
+
+            <TextView
+                android:layout_marginLeft="20dp"
+                android:layout_marginBottom="5dp"
+                android:textColor="@color/white"
+                android:text="未成交:普通客户"
+                style="@style/TextView_VerticalCenter" />
+
+            <TextView
+                android:layout_marginLeft="20dp"
+                android:layout_marginBottom="5dp"
+                android:textColor="@color/white"
+                android:text="最后跟进:2016-07-05 08:08"
+                style="@style/TextView_VerticalCenter" />
+
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_height="wrap_content"
+            style="@style/crm_ll_card">
+
+            <LinearLayout style="@style/LinearLayout_horizontal">
+
+                <TextView
+                    android:layout_width="10dp"
+                    android:layout_height="15dp"
+                    android:layout_gravity="center_vertical"
+                    android:background="@drawable/shape_tv_color"
+                    android:textColor="#FF8E57" />
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_margin="10dp"
+                    android:textSize="15sp"
+                    android:textColor="#FF8E57"
+                    android:text="客户信息" />
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_margin="10dp"
+                style="@style/LinearLayout_horizontal">
+
+                <TextView
+                    android:text="地址"
+                    android:textColor="@color/gray_light"
+                    android:layout_marginLeft="10dp"
+                    android:layout_width="70dp"
+                    style="@style/TextView_VerticalCenter" />
+
+                <TextView
+                    android:layout_marginLeft="5dp"
+                    android:text="深圳市南山区科技园科技南五路"
+                    style="@style/TextView_VerticalCenter" />
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_margin="10dp"
+                style="@style/LinearLayout_horizontal">
+
+                <TextView
+                    android:text="领取时间"
+                    android:textColor="@color/gray_light"
+                    android:layout_marginLeft="10dp"
+                    android:layout_width="70dp"
+                    style="@style/TextView_VerticalCenter" />
+
+                <TextView
+                    android:layout_marginLeft="5dp"
+                    android:text="2016-07-05 18:00"
+                    style="@style/TextView_VerticalCenter" />
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_margin="10dp"
+                style="@style/LinearLayout_horizontal">
+
+                <TextView
+                    android:text="来源"
+                    android:textColor="@color/gray_light"
+                    android:layout_marginLeft="10dp"
+                    android:layout_width="70dp"
+                    style="@style/TextView_VerticalCenter" />
+
+                <TextView
+                    android:layout_marginLeft="5dp"
+                    android:text="线上注册"
+                    style="@style/TextView_VerticalCenter" />
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_margin="10dp"
+                style="@style/LinearLayout_horizontal">
+
+                <TextView
+                    android:text="行业"
+                    android:textColor="@color/gray_light"
+                    android:layout_marginLeft="10dp"
+                    android:layout_width="70dp"
+                    style="@style/TextView_VerticalCenter" />
+
+                <TextView
+                    android:layout_marginLeft="5dp"
+                    android:text="金融业"
+                    style="@style/TextView_VerticalCenter" />
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_margin="10dp"
+                style="@style/LinearLayout_horizontal">
+
+                <TextView
+                    android:text="电话"
+                    android:textColor="@color/gray_light"
+                    android:layout_marginLeft="10dp"
+                    android:layout_width="70dp"
+                    style="@style/TextView_VerticalCenter" />
+
+                <TextView
+                    android:layout_marginLeft="5dp"
+                    android:text="0755-21321312"
+                    style="@style/TextView_VerticalCenter" />
+            </LinearLayout>
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_height="wrap_content"
+            style="@style/crm_ll_card">
+
+            <LinearLayout style="@style/LinearLayout_horizontal">
+
+                <TextView
+                    android:layout_width="10dp"
+                    android:layout_height="15dp"
+                    android:layout_gravity="center_vertical"
+                    android:background="@drawable/shape_tv_color"
+                    android:textColor="#FF8E57" />
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_margin="10dp"
+                    android:textSize="15sp"
+                    android:textColor="#FF8E57"
+                    android:text="联系人" />
+
+                <TextView
+                    style="@style/TextView_VerticalCenter"
+                    android:textColor="@color/gray_light"
+                    android:text="1人" />
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_margin="10dp"
+                style="@style/LinearLayout_horizontal">
+
+                <TextView
+                    android:text="郑国栋"
+
+                    android:layout_marginLeft="10dp"
+                    android:layout_width="70dp"
+                    style="@style/TextView_VerticalCenter" />
+
+                <TextView
+                    android:textColor="@color/gray_light"
+                    android:layout_marginLeft="5dp"
+                    android:text="销售经理"
+                    style="@style/TextView_VerticalCenter" />
+            </LinearLayout>
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_height="wrap_content"
+            style="@style/crm_ll_card">
+
+            <LinearLayout style="@style/LinearLayout_horizontal">
+
+                <TextView
+                    android:layout_width="10dp"
+                    android:layout_height="15dp"
+                    android:layout_gravity="center_vertical"
+                    android:background="@drawable/shape_tv_color"
+                    android:textColor="#FF8E57" />
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_margin="10dp"
+                    android:textSize="15sp"
+                    android:textColor="#FF8E57"
+                    android:text="商机阶段" />
+            </LinearLayout>
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_height="wrap_content"
+            style="@style/crm_ll_card">
+
+            <LinearLayout style="@style/LinearLayout_horizontal">
+
+                <TextView
+                    android:layout_width="10dp"
+                    android:layout_height="15dp"
+                    android:layout_gravity="center_vertical"
+                    android:background="@drawable/shape_tv_color"
+                    android:textColor="#FF8E57" />
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_margin="10dp"
+                    android:textSize="15sp"
+                    android:textColor="#FF8E57"
+                    android:text="费用" />
+            </LinearLayout>
+
+            <RelativeLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+
+                <LinearLayout
+                    android:layout_width="wrap_content"
+                    android:layout_alignParentLeft="true"
+                    style="@style/LinearLayout_vertical">
+
+                    <TextView
+                        android:text="报销中"
+                        android:layout_margin="10dp"
+                        style="@style/TextView_VerticalCenter" />
+
+                    <TextView
+                        android:text="0元"
+                        android:layout_gravity="center_horizontal"
+                        android:layout_margin="10dp"
+                        style="@style/TextView_VerticalCenter" />
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="wrap_content"
+                    android:layout_alignParentRight="true"
+                    style="@style/LinearLayout_vertical">
+
+                    <TextView
+                        android:text="报销中"
+                        android:layout_margin="10dp"
+                        style="@style/TextView_VerticalCenter" />
+
+                    <TextView
+                        android:text="0元"
+                        android:layout_gravity="center_horizontal"
+                        android:layout_margin="10dp"
+                        style="@style/TextView_VerticalCenter" />
+                </LinearLayout>
+
+            </RelativeLayout>
+
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_height="wrap_content"
+            style="@style/crm_ll_card">
+
+            <LinearLayout style="@style/LinearLayout_horizontal">
+
+                <TextView
+                    android:layout_width="10dp"
+                    android:layout_height="15dp"
+                    android:layout_gravity="center_vertical"
+                    android:background="@drawable/shape_tv_color"
+                    android:textColor="#FF8E57" />
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_margin="10dp"
+                    android:textSize="15sp"
+                    android:textColor="#FF8E57"
+                    android:text="其它" />
+            </LinearLayout>
+
+            <RelativeLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+
+                <LinearLayout
+                    android:layout_width="wrap_content"
+                    android:layout_alignParentLeft="true"
+                    style="@style/LinearLayout_vertical">
+
+                    <TextView
+                        android:text="修改记录"
+                        android:layout_margin="10dp"
+                        style="@style/TextView_VerticalCenter" />
+
+                    <TextView
+                        android:text="0条"
+                        android:layout_gravity="center_horizontal"
+                        android:layout_margin="10dp"
+                        style="@style/TextView_VerticalCenter" />
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="wrap_content"
+                    android:layout_alignParentRight="true"
+                    style="@style/LinearLayout_vertical">
+
+                    <TextView
+                        android:text="拜访次数"
+                        android:layout_margin="10dp"
+                        style="@style/TextView_VerticalCenter" />
+
+                    <TextView
+                        android:text="0次"
+                        android:layout_gravity="center_horizontal"
+                        android:layout_margin="10dp"
+                        style="@style/TextView_VerticalCenter" />
+                </LinearLayout>
+
+            </RelativeLayout>
+        </LinearLayout>
+    </LinearLayout>
+
+</ScrollView>

+ 1 - 1
WeiChat/src/main/res/layout/activity_customer_list.xml

@@ -4,7 +4,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical"
-    android:background="#4B4B57"
+    android:background="@color/crm_basic_bg"
     tools:context="com.xzjmyk.pm.activity.ui.erp.activity.crm.CustomerListActivity">
 
     <RelativeLayout

+ 35 - 6
WeiChat/src/main/res/layout/activity_customer_list_select.xml

@@ -1,12 +1,41 @@
 <?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:paddingLeft="@dimen/activity_horizontal_margin"
-    android:paddingRight="@dimen/activity_horizontal_margin"
-    android:paddingTop="@dimen/activity_vertical_margin"
-    android:paddingBottom="@dimen/activity_vertical_margin"
+    android:orientation="vertical"
+    android:background="@color/crm_basic_bg"
     tools:context="com.xzjmyk.pm.activity.ui.erp.activity.crm.CustomerListSelectActivity">
 
-</RelativeLayout>
+    <RelativeLayout
+        android:background="@drawable/bg_bar"
+        android:layout_width="match_parent"
+        android:layout_height="48dp"
+        android:orientation="horizontal"
+        android:paddingBottom="5dp"
+        android:paddingLeft="15dp"
+        android:paddingRight="15dp"
+        android:paddingTop="5dp">
+
+        <com.xzjmyk.pm.activity.view.ClearEditText
+            android:id="@+id/search_edit"
+            android:layout_width="fill_parent"
+            android:layout_height="fill_parent"
+            android:layout_centerVertical="true"
+            android:background="@drawable/search_input"
+            android:drawableLeft="@drawable/search"
+            android:drawableRight="@drawable/search_clear"
+            android:hint="@string/search"
+            android:textColor="@color/dark_grey"
+            android:textColorHint="@color/grey"
+            android:textSize="15sp" />
+    </RelativeLayout>
+
+    <com.handmark.pulltorefresh.library.PullToRefreshListView
+        android:id="@+id/list_business"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        style="@style/ListViewBasic">
+
+    </com.handmark.pulltorefresh.library.PullToRefreshListView>
+</LinearLayout>

+ 334 - 6
WeiChat/src/main/res/layout/activity_customer_mutil_select.xml

@@ -1,12 +1,340 @@
 <?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:paddingLeft="@dimen/activity_horizontal_margin"
-    android:paddingRight="@dimen/activity_horizontal_margin"
-    android:paddingTop="@dimen/activity_vertical_margin"
-    android:paddingBottom="@dimen/activity_vertical_margin"
+    android:fillViewport="true"
     tools:context="com.xzjmyk.pm.activity.ui.erp.activity.crm.CustomerMutilSelectActivity">
 
-</RelativeLayout>
+    <LinearLayout style="@style/LinearLayout_vertical">
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+            <LinearLayout
+                android:layout_margin="0dp"
+                android:layout_height="wrap_content"
+                style="@style/crm_ll_card">
+
+                <TextView
+                    android:layout_marginTop="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:text="筛选场景"
+                    style="@style/TextView_Basic" />
+
+                <EditText
+                    android:layout_marginBottom="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:text="我负责的客户"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+            </LinearLayout>
+
+            <ImageView
+                android:layout_centerVertical="true"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:layout_marginRight="10dp"
+                android:src="@drawable/go" />
+        </RelativeLayout>
+
+        <View
+            android:layout_marginRight="10dp"
+            android:layout_marginLeft="10dp"
+            style="@style/app_line_horizontal_05p" />
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+            <LinearLayout
+                android:layout_margin="0dp"
+                android:layout_height="wrap_content"
+                style="@style/crm_ll_card">
+
+                <TextView
+                    android:layout_marginTop="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:text="客户名称"
+                    style="@style/TextView_Basic" />
+
+                <EditText
+                    android:layout_marginBottom="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:text="请输入"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+            </LinearLayout>
+
+            <ImageView
+                android:layout_centerVertical="true"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:layout_marginRight="10dp"
+                android:src="@drawable/go" />
+        </RelativeLayout>
+
+        <View
+            android:layout_marginRight="10dp"
+            android:layout_marginLeft="10dp"
+            style="@style/app_line_horizontal_05p" />
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+            <LinearLayout
+                android:layout_margin="0dp"
+                android:layout_height="wrap_content"
+                style="@style/crm_ll_card">
+
+                <TextView
+                    android:layout_marginTop="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:text="负责人"
+                    style="@style/TextView_Basic" />
+
+                <EditText
+                    android:layout_marginBottom="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:text="请选择"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+            </LinearLayout>
+
+            <ImageView
+                android:layout_centerVertical="true"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:layout_marginRight="10dp"
+                android:src="@drawable/go" />
+        </RelativeLayout>
+
+        <View
+            android:layout_marginRight="10dp"
+            android:layout_marginLeft="10dp"
+            style="@style/app_line_horizontal_05p" />
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+            <LinearLayout
+                android:layout_margin="0dp"
+                android:layout_height="wrap_content"
+                style="@style/crm_ll_card">
+
+                <TextView
+                    android:layout_marginTop="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:text="成交状态"
+                    style="@style/TextView_Basic" />
+
+                <EditText
+                    android:layout_marginBottom="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:text="请选择"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+            </LinearLayout>
+
+            <ImageView
+                android:layout_centerVertical="true"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:layout_marginRight="10dp"
+                android:src="@drawable/go" />
+        </RelativeLayout>
+
+        <View
+            android:layout_marginRight="10dp"
+            android:layout_marginLeft="10dp"
+            style="@style/app_line_horizontal_05p" />
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+            <LinearLayout
+                android:layout_margin="0dp"
+                android:layout_height="wrap_content"
+                style="@style/crm_ll_card">
+
+                <TextView
+                    android:layout_marginTop="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:text="负责人所在部门"
+                    style="@style/TextView_Basic" />
+
+                <EditText
+                    android:layout_marginBottom="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:text="请选择"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+            </LinearLayout>
+
+            <ImageView
+                android:layout_centerVertical="true"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:layout_marginRight="10dp"
+                android:src="@drawable/go" />
+        </RelativeLayout>
+
+        <View
+            android:layout_marginRight="10dp"
+            android:layout_marginLeft="10dp"
+            style="@style/app_line_horizontal_05p" />
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+            <LinearLayout
+                android:layout_margin="0dp"
+                android:layout_height="wrap_content"
+                style="@style/crm_ll_card">
+
+                <TextView
+                    android:layout_marginTop="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:text="客户级别"
+                    style="@style/TextView_Basic" />
+
+                <EditText
+                    android:layout_marginBottom="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:text="请选择"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+            </LinearLayout>
+
+            <ImageView
+                android:layout_centerVertical="true"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:layout_marginRight="10dp"
+                android:src="@drawable/go" />
+        </RelativeLayout>
+
+        <View
+            android:layout_marginRight="10dp"
+            android:layout_marginLeft="10dp"
+            style="@style/app_line_horizontal_05p" />
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+            <LinearLayout
+                android:layout_margin="0dp"
+                android:layout_height="wrap_content"
+                style="@style/crm_ll_card">
+
+                <TextView
+                    android:layout_marginTop="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:text="来源"
+                    style="@style/TextView_Basic" />
+
+                <EditText
+                    android:layout_marginBottom="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:text="请选择"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+            </LinearLayout>
+
+            <ImageView
+                android:layout_centerVertical="true"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:layout_marginRight="10dp"
+                android:src="@drawable/go" />
+        </RelativeLayout>
+
+        <View
+            android:layout_marginRight="10dp"
+            android:layout_marginLeft="10dp"
+            style="@style/app_line_horizontal_05p" />
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+            <LinearLayout
+                android:layout_margin="0dp"
+                android:layout_height="wrap_content"
+                style="@style/crm_ll_card">
+
+                <TextView
+                    android:layout_marginTop="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:text="行业"
+                    style="@style/TextView_Basic" />
+
+                <EditText
+                    android:layout_marginBottom="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:text="请输入"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+            </LinearLayout>
+
+            <ImageView
+                android:layout_centerVertical="true"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:layout_marginRight="10dp"
+                android:src="@drawable/go" />
+        </RelativeLayout>
+
+        <View
+            android:layout_marginRight="10dp"
+            android:layout_marginLeft="10dp"
+            style="@style/app_line_horizontal_05p" />
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+
+            <LinearLayout
+                android:layout_margin="0dp"
+                android:layout_height="wrap_content"
+                style="@style/crm_ll_card">
+
+                <TextView
+                    android:layout_marginTop="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:text="创建时间"
+                    style="@style/TextView_Basic" />
+
+                <EditText
+                    android:layout_marginBottom="10dp"
+                    android:layout_marginLeft="10dp"
+                    android:text="请选择"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+            </LinearLayout>
+
+            <ImageView
+                android:layout_centerVertical="true"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:layout_marginRight="10dp"
+                android:src="@drawable/go" />
+        </RelativeLayout>
+
+    </LinearLayout>
+</ScrollView>

+ 40 - 41
WeiChat/src/main/res/layout/activity_login.xml

@@ -4,48 +4,47 @@
     android:background="@drawable/login_bg">
 
 
-
-        <LinearLayout
+    <LinearLayout
+            android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignParentBottom="true"
+        android:layout_marginBottom="70dp"
+        android:orientation="vertical">
+
+        <com.xzjmyk.pm.activity.view.ClearEditText
+            android:id="@+id/phone_numer_edit"
+            style="@style/IMLineEditText"
+            android:layout_marginLeft="20dp"
+            android:layout_marginRight="20dp"
+            android:background="@color/wirtehine"
+            android:drawableLeft="@drawable/login_user_name"
+            android:hint="@string/please_input_phone_number"
+            android:inputType="phone" />
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1dp" />
+
+        <com.xzjmyk.pm.activity.view.ClearEditText
+            android:id="@+id/password_edit"
+            style="@style/IMLineEditPass"
+            android:layout_marginLeft="20dp"
+            android:layout_marginRight="20dp"
+            android:background="@color/wirtehine"
+            android:drawableLeft="@drawable/loginpw"
+            android:hint="@string/please_input_password" />
+
+        <Button
+            android:id="@+id/login_btn"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_alignParentBottom="true"
-            android:layout_marginBottom="70dp"
-            android:orientation="vertical">
-
-            <com.xzjmyk.pm.activity.view.ClearEditText
-                android:id="@+id/phone_numer_edit"
-                style="@style/IMLineEditText"
-                android:layout_marginLeft="20dp"
-                android:layout_marginRight="20dp"
-                android:background="@color/wirtehine"
-                android:drawableLeft="@drawable/login_user_name"
-                android:hint="@string/please_input_phone_number"
-                android:inputType="phone" />
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1dp" />
-
-            <com.xzjmyk.pm.activity.view.ClearEditText
-                android:id="@+id/password_edit"
-                style="@style/IMLineEditPass"
-                android:layout_marginLeft="20dp"
-                android:layout_marginRight="20dp"
-                android:background="@color/wirtehine"
-                android:drawableLeft="@drawable/loginpw"
-                android:hint="@string/please_input_password" />
-
-            <Button
-                android:id="@+id/login_btn"
-                android:layout_width="match_parent"
-                android:layout_height="50dp"
-                android:layout_marginLeft="40dp"
-                android:layout_marginRight="40dp"
-                android:layout_marginTop="10dp"
-                android:background="@drawable/bg_btn"
-                android:text="登  录"
-                android:textColor="@color/white" />
-        </LinearLayout>
+            android:layout_height="50dp"
+            android:layout_marginLeft="40dp"
+            android:layout_marginRight="40dp"
+            android:layout_marginTop="10dp"
+            android:background="@drawable/bg_btn"
+            android:text="登  录"
+            android:textColor="@color/white" />
+    </LinearLayout>
 
 
 </RelativeLayout>

+ 28 - 22
WeiChat/src/main/res/layout/activity_sales_ranking.xml

@@ -1,34 +1,40 @@
 <?xml version="1.0" encoding="utf-8"?>
-<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<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:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:orientation="vertical"
     android:fitsSystemWindows="true"
     tools:context="com.xzjmyk.pm.activity.ui.erp.activity.crm.SalesRankingActivity">
 
-    <android.support.design.widget.AppBarLayout
-        android:layout_height="wrap_content"
-        android:layout_width="match_parent"
-        android:theme="@style/AppTheme.AppBarOverlay">
+    <LinearLayout style="@style/LinearLayout_vertical">
 
-        <android.support.v7.widget.Toolbar
-            android:id="@+id/toolbar"
-            android:layout_width="match_parent"
-            android:layout_height="?attr/actionBarSize"
-            android:background="?attr/colorPrimary"
-            app:popupTheme="@style/AppTheme.PopupOverlay" />
+        <TextView
+            android:text="2016年7月荣誉墙"
+            android:layout_margin="10dp"
+            android:textSize="18sp"
+            android:textColor="@color/red"
+            android:layout_gravity="center_horizontal"
+            style="@style/TextView_Basic" />
 
-    </android.support.design.widget.AppBarLayout>
+        <TextView
+            android:layout_marginLeft="30dp"
+            android:layout_marginRight="30dp"
+            android:layout_marginTop="10dp"
+            android:layout_marginBottom="10dp"
+            android:layout_gravity="center_horizontal"
+            android:gravity="center"
+            android:text="这里展示的是试用UU互联表现突出的员工,
+荣誉墙每个月都会更新,若这个月还没上榜,
+请多加努力,还有机会哟~"
+            style="@style/TextView_Basic" />
 
-    <include layout="@layout/content_sales_ranking" />
+        <View style="@style/app_line_horizontal_05p"></View>
+    </LinearLayout>
 
-    <android.support.design.widget.FloatingActionButton
-        android:id="@+id/fab"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="bottom|end"
-        android:layout_margin="@dimen/fab_margin"
-        android:src="@android:drawable/ic_dialog_email" />
-
-</android.support.design.widget.CoordinatorLayout>
+    <com.handmark.pulltorefresh.library.PullToRefreshGridView
+        android:id="@+id/list_business"
+        android:layout_margin="10dp"
+        style="@style/GridViewSaleRanking"></com.handmark.pulltorefresh.library.PullToRefreshGridView>
+</LinearLayout>

+ 3 - 3
WeiChat/src/main/res/layout/activity_signin_set.xml

@@ -1,14 +1,14 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-  >
+    android:layout_height="match_parent">
 
     <RelativeLayout
         android:clickable="true"
         android:id="@+id/top"
         style="@style/IMTbleLine">
-        <TextView
+
+    <TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_centerVertical="true"

+ 401 - 7
WeiChat/src/main/res/layout/activity_visit_report_add.xml

@@ -1,12 +1,406 @@
 <?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:paddingLeft="@dimen/activity_horizontal_margin"
-    android:paddingRight="@dimen/activity_horizontal_margin"
-    android:paddingTop="@dimen/activity_vertical_margin"
-    android:paddingBottom="@dimen/activity_vertical_margin"
-    tools:context="com.xzjmyk.pm.activity.ui.erp.activity.crm.VisitReportAddActivity">
+    android:fillViewport="true">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        tools:context="com.xzjmyk.pm.activity.ui.erp.activity.crm.VisitReportPlanActivity">
+
+        <RelativeLayout
+            android:layout_marginBottom="20dp"
+            android:background="@color/white"
+            android:id="@+id/rl_dateSelect"
+            style="@style/IMTbleLine_UP_Me">
+
+            <TextView
+                android:id="@+id/date_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="拜访日期"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/tv_date_select"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/date_arrow_img"
+                android:layout_toRightOf="@+id/date_text"
+                android:text="2016-07-05"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/date_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:layout_marginBottom="1dp"
+            android:background="@color/white"
+            android:id="@+id/address_erp_rl"
+            style="@style/IMTbleLine_UP_Me">
+
+            <TextView
+                android:id="@+id/address_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="地址"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/tv_address_login"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/address_arrow_img"
+                android:layout_toRightOf="@+id/address_text"
+                android:text="深圳市******"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/address_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+        <TextView
+            android:layout_marginRight="10dp"
+            android:text="定位不准?点我重试"
+            android:textSize="13sp"
+            android:textColor="@color/light_green"
+            android:gravity="right|center_vertical"
+            android:layout_width="match_parent"
+            android:layout_height="40dp" />
+
+        <RelativeLayout
+            android:layout_marginBottom="1dp"
+            android:background="@color/white"
+            android:id="@+id/customer_erp_rl"
+            style="@style/IMTbleLine_UP_Me">
+
+            <TextView
+                android:id="@+id/customer_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="客户"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/tv_customer_login"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/customer_arrow_img"
+                android:layout_toRightOf="@+id/customer_text"
+                android:text="北京******公司"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/customer_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:layout_marginBottom="20dp"
+            android:background="@color/white"
+            android:id="@+id/linksman_erp_rl"
+            style="@style/IMTbleLine_UP_Me">
+
+            <TextView
+                android:id="@+id/linksman_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="联系人"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/tv_linksman_login"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/linksman_arrow_img"
+                android:layout_toRightOf="@+id/linksman_text"
+                android:text="***"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/linksman_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:background="@color/white"
+            android:id="@+id/visit_erp_rl"
+            style="@style/IMTbleLine_UP_Me">
+
+            <TextView
+                android:id="@+id/visit_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="业务员"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/tv_visit_login"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/visit_arrow_img"
+                android:layout_toRightOf="@+id/visit_text"
+                android:text="xxxxx"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/visit_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:background="@color/white"
+            android:id="@+id/depart_erp_rl"
+            style="@style/IMTbleLine_UP_Me">
+
+            <TextView
+                android:id="@+id/depart_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="部门"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/tv_depart_login"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/depart_arrow_img"
+                android:layout_toRightOf="@+id/depart_text"
+                android:text="xxxxx"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/depart_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+
+        <RelativeLayout
+            android:background="@color/white"
+            android:id="@+id/startTime_erp_rl"
+            style="@style/IMTbleLine_UP_Me">
+
+            <TextView
+                android:id="@+id/startTime_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="开始时间"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/tv_startTim_login"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/startTime_arrow_img"
+                android:layout_toRightOf="@+id/startTime_text"
+                android:text="xxxxx"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/startTime_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+
+        <RelativeLayout
+            android:background="@color/white"
+            android:id="@+id/endTime_erp_rl"
+            style="@style/IMTbleLine_UP_Me">
+
+            <TextView
+                android:id="@+id/endTime_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="截止时间"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/tv_endTime_login"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/endTime_arrow_img"
+                android:layout_toRightOf="@+id/endTime_text"
+                android:text="xxxxx"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/endTime_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+
+        <RelativeLayout
+            android:background="@color/white"
+            android:id="@+id/businessState_erp_rl"
+            style="@style/IMTbleLine_UP_Me">
+
+            <TextView
+                android:id="@+id/businessState_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="当前商机阶段"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/tv_businessState_login"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/businessState_arrow_img"
+                android:layout_toRightOf="@+id/businessState_text"
+                android:text="xxxxx"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/businessState_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+
+        <RelativeLayout
+            android:background="@color/white"
+            android:id="@+id/notes_erp_rl"
+            style="@style/IMTbleLine_UP_Me">
+
+            <TextView
+                android:id="@+id/notes_text"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:drawableLeft="@drawable/usa_zhanghu"
+                android:drawablePadding="10dp"
+                android:gravity="center"
+                android:text="备注"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/tv_notes_login"
+                style="@style/IMTbleLine_TextValue"
+                android:layout_toLeftOf="@+id/notes_arrow_img"
+                android:layout_toRightOf="@+id/notes_text"
+                android:text="xxxxx"
+                android:textColor="@color/text_hine"
+                android:textSize="@dimen/text_hine" />
+
+            <ImageView
+                android:id="@+id/notes_arrow_img"
+                android:layout_width="@dimen/next_width"
+                android:layout_height="@dimen/next_height"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:alpha="0.26"
+                android:background="@drawable/set_list_next"
+                android:contentDescription="@string/app_name" />
+        </RelativeLayout>
+
+    </LinearLayout>
+
+
+</ScrollView>
+
 
-</RelativeLayout>

+ 202 - 6
WeiChat/src/main/res/layout/activity_visit_report_plan.xml

@@ -1,12 +1,208 @@
 <?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:paddingLeft="@dimen/activity_horizontal_margin"
-    android:paddingRight="@dimen/activity_horizontal_margin"
-    android:paddingTop="@dimen/activity_vertical_margin"
-    android:paddingBottom="@dimen/activity_vertical_margin"
+    android:orientation="vertical"
     tools:context="com.xzjmyk.pm.activity.ui.erp.activity.crm.VisitReportPlanActivity">
 
-</RelativeLayout>
+    <RelativeLayout
+        android:layout_marginBottom="20dp"
+        android:background="@color/white"
+        android:id="@+id/rl_dateSelect"
+        style="@style/IMTbleLine_UP_Me">
+
+        <TextView
+            android:id="@+id/date_text"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerVertical="true"
+            android:drawableLeft="@drawable/usa_zhanghu"
+            android:drawablePadding="10dp"
+            android:gravity="center"
+            android:text="日期"
+            android:textColor="@color/text_main"
+            android:textSize="@dimen/text_main" />
+
+        <TextView
+            android:id="@+id/tv_date_select"
+            style="@style/IMTbleLine_TextValue"
+            android:layout_toLeftOf="@+id/date_arrow_img"
+            android:layout_toRightOf="@+id/date_text"
+            android:text="2016-07-05"
+            android:textColor="@color/text_hine"
+            android:textSize="@dimen/text_hine" />
+
+        <ImageView
+            android:id="@+id/date_arrow_img"
+            android:layout_width="@dimen/next_width"
+            android:layout_height="@dimen/next_height"
+            android:layout_alignParentRight="true"
+            android:layout_centerVertical="true"
+            android:alpha="0.26"
+            android:background="@drawable/set_list_next"
+            android:contentDescription="@string/app_name" />
+    </RelativeLayout>
+
+    <RelativeLayout
+        android:layout_marginBottom="1dp"
+        android:background="@color/white"
+        android:id="@+id/address_erp_rl"
+        style="@style/IMTbleLine_UP_Me">
+
+        <TextView
+            android:id="@+id/address_text"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerVertical="true"
+            android:drawableLeft="@drawable/usa_zhanghu"
+            android:drawablePadding="10dp"
+            android:gravity="center"
+            android:text="地址"
+            android:textColor="@color/text_main"
+            android:textSize="@dimen/text_main" />
+
+        <TextView
+            android:id="@+id/tv_address_login"
+            style="@style/IMTbleLine_TextValue"
+            android:layout_toLeftOf="@+id/address_arrow_img"
+            android:layout_toRightOf="@+id/address_text"
+            android:text="深圳市******"
+            android:textColor="@color/text_hine"
+            android:textSize="@dimen/text_hine" />
+
+        <ImageView
+            android:id="@+id/address_arrow_img"
+            android:layout_width="@dimen/next_width"
+            android:layout_height="@dimen/next_height"
+            android:layout_alignParentRight="true"
+            android:layout_centerVertical="true"
+            android:alpha="0.26"
+            android:background="@drawable/set_list_next"
+            android:contentDescription="@string/app_name" />
+    </RelativeLayout>
+
+    <TextView
+        android:layout_marginRight="10dp"
+        android:text="定位不准?点我重试"
+        android:textSize="13sp"
+        android:textColor="@color/light_green"
+        android:gravity="right|center_vertical"
+        android:layout_width="match_parent"
+        android:layout_height="40dp" />
+
+    <RelativeLayout
+        android:layout_marginBottom="1dp"
+        android:background="@color/white"
+        android:id="@+id/customer_erp_rl"
+        style="@style/IMTbleLine_UP_Me">
+
+        <TextView
+            android:id="@+id/customer_text"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerVertical="true"
+            android:drawableLeft="@drawable/usa_zhanghu"
+            android:drawablePadding="10dp"
+            android:gravity="center"
+            android:text="客户"
+            android:textColor="@color/text_main"
+            android:textSize="@dimen/text_main" />
+
+        <TextView
+            android:id="@+id/tv_customer_login"
+            style="@style/IMTbleLine_TextValue"
+            android:layout_toLeftOf="@+id/customer_arrow_img"
+            android:layout_toRightOf="@+id/customer_text"
+            android:text="北京******公司"
+            android:textColor="@color/text_hine"
+            android:textSize="@dimen/text_hine" />
+
+        <ImageView
+            android:id="@+id/customer_arrow_img"
+            android:layout_width="@dimen/next_width"
+            android:layout_height="@dimen/next_height"
+            android:layout_alignParentRight="true"
+            android:layout_centerVertical="true"
+            android:alpha="0.26"
+            android:background="@drawable/set_list_next"
+            android:contentDescription="@string/app_name" />
+    </RelativeLayout>
+
+    <RelativeLayout
+        android:layout_marginBottom="1dp"
+        android:background="@color/white"
+        android:id="@+id/linksman_erp_rl"
+        style="@style/IMTbleLine_UP_Me">
+
+        <TextView
+            android:id="@+id/linksman_text"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerVertical="true"
+            android:drawableLeft="@drawable/usa_zhanghu"
+            android:drawablePadding="10dp"
+            android:gravity="center"
+            android:text="联系人"
+            android:textColor="@color/text_main"
+            android:textSize="@dimen/text_main" />
+
+        <TextView
+            android:id="@+id/tv_linksman_login"
+            style="@style/IMTbleLine_TextValue"
+            android:layout_toLeftOf="@+id/linksman_arrow_img"
+            android:layout_toRightOf="@+id/linksman_text"
+            android:text="***"
+            android:textColor="@color/text_hine"
+            android:textSize="@dimen/text_hine" />
+
+        <ImageView
+            android:id="@+id/linksman_arrow_img"
+            android:layout_width="@dimen/next_width"
+            android:layout_height="@dimen/next_height"
+            android:layout_alignParentRight="true"
+            android:layout_centerVertical="true"
+            android:alpha="0.26"
+            android:background="@drawable/set_list_next"
+            android:contentDescription="@string/app_name" />
+    </RelativeLayout>
+
+    <RelativeLayout
+        android:background="@color/white"
+        android:id="@+id/visit_erp_rl"
+        style="@style/IMTbleLine_UP_Me">
+
+        <TextView
+            android:id="@+id/visit_text"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_centerVertical="true"
+            android:drawableLeft="@drawable/usa_zhanghu"
+            android:drawablePadding="10dp"
+            android:gravity="center"
+            android:text="拜访人"
+            android:textColor="@color/text_main"
+            android:textSize="@dimen/text_main" />
+
+        <TextView
+            android:id="@+id/tv_visit_login"
+            style="@style/IMTbleLine_TextValue"
+            android:layout_toLeftOf="@+id/visit_arrow_img"
+            android:layout_toRightOf="@+id/visit_text"
+            android:text="xxxxx"
+            android:textColor="@color/text_hine"
+            android:textSize="@dimen/text_hine" />
+
+        <ImageView
+            android:id="@+id/visit_arrow_img"
+            android:layout_width="@dimen/next_width"
+            android:layout_height="@dimen/next_height"
+            android:layout_alignParentRight="true"
+            android:layout_centerVertical="true"
+            android:alpha="0.26"
+            android:background="@drawable/set_list_next"
+            android:contentDescription="@string/app_name" />
+    </RelativeLayout>
+
+
+</LinearLayout>

+ 2 - 1
WeiChat/src/main/res/layout/activity_work_logs.xml

@@ -4,7 +4,8 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     tools:context="com.xzjmyk.pm.activity.ui.erp.activity.oa.WorkLogsActivity">
-    <com.handmark.pulltorefresh.library.PullToRefreshListView
+
+<com.handmark.pulltorefresh.library.PullToRefreshListView
         android:id="@+id/listView"
         android:layout_width="match_parent"
         android:layout_height="match_parent"

+ 18 - 0
WeiChat/src/main/res/layout/item_pop_list.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+
+    <TextView
+        android:id="@+id/tv_item_name"
+        android:paddingLeft="2dp"
+        android:paddingRight="2dp"
+        android:paddingTop="10dp"
+        android:paddingBottom="10dp"
+        android:textSize="14sp"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@drawable/select_weixin_list_item"
+        android:gravity="center"
+        android:text="xxx" />
+</LinearLayout>

+ 82 - 0
WeiChat/src/main/res/layout/item_sale_ranking.xml

@@ -0,0 +1,82 @@
+<?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"
+    android:orientation="horizontal"
+    style="@style/crm_ll_card"
+    android:layout_height="match_parent">
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <ImageView
+            android:id="@+id/iv_sale_head"
+            android:layout_width="match_parent"
+            android:layout_height="150dp"
+            android:src="@drawable/icon_touxiang" />
+
+        <TextView
+            android:text="签单金额最高"
+            android:layout_marginTop="5dp"
+            android:layout_marginLeft="10dp"
+            android:textSize="15sp"
+            android:id="@+id/tv_sale_desc"
+            android:layout_below="@+id/iv_sale_head"
+            style="@style/TextView_Basic" />
+
+        <TextView
+            android:layout_marginTop="5dp"
+            android:layout_marginLeft="10dp"
+            android:id="@+id/tv_sale_num"
+            android:textSize="14sp"
+            android:textColor="@color/yellow_home"
+            android:text="380000元"
+            android:layout_below="@+id/tv_sale_desc"
+            style="@style/TextView_Basic" />
+
+        <TextView
+            android:id="@+id/tv_sale_name"
+            android:textSize="19sp"
+            android:layout_margin="10dp"
+            android:layout_centerHorizontal="true"
+            android:textColor="@color/black"
+            android:text="钱大勇"
+            android:layout_below="@+id/tv_sale_num"
+            style="@style/TextView_Basic" />
+
+        <TextView
+            android:id="@+id/tv_sale_dep"
+            android:textSize="15sp"
+            android:layout_margin="5dp"
+            android:layout_centerHorizontal="true"
+            android:textColor="@color/gray_light"
+            android:gravity="center"
+            android:text="销售总监\n深圳销售部"
+            android:layout_below="@+id/tv_sale_name"
+            style="@style/TextView_Basic" />
+
+
+        <ImageView
+            android:layout_centerVertical="true"
+            android:layout_alignParentRight="true"
+            android:layout_width="50dp"
+            android:layout_height="50dp"
+            android:src="@drawable/icon_sunzhang" />
+    </RelativeLayout>
+
+    <LinearLayout
+        style="@style/crm_ll_card"
+        android:layout_height="match_parent">
+
+        <TextView
+            android:text="xxxx"
+            android:textColor="@color/black"
+            style="@style/TextView_Basic" />
+
+        <TextView
+            android:text="xxxx"
+            android:textColor="@color/black"
+            style="@style/TextView_Basic" />
+    </LinearLayout>
+
+</LinearLayout>

+ 14 - 0
WeiChat/src/main/res/layout/pop_crm_list.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@drawable/shape_pop_ll"
+    android:padding="0.5dp"
+    android:orientation="vertical">
+
+    <ListView
+        android:layout_height="wrap_content"
+        android:dividerHeight="0dp"
+        android:id="@+id/mList"
+        style="@style/ListViewBasic"></ListView>
+</LinearLayout>

+ 2 - 1
WeiChat/src/main/res/layout/rating_bar_view.xml

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical" android:layout_width="match_parent"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
     android:layout_height="match_parent">
 
 

+ 19 - 0
WeiChat/src/main/res/menu/main_customer_top.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto">
+    <item
+        android:id="@+id/crm_data_find"
+        android:icon="@drawable/abc_ic_search_api_mtrl_alpha"
+        android:title="查找"
+        app:showAsAction="ifRoom" />
+    <item
+        android:id="@+id/crm_data_select"
+        android:icon="@drawable/icon_select"
+        android:title="筛选"
+        app:showAsAction="ifRoom" />
+    <item
+        android:id="@+id/crm_data_add"
+        android:icon="@drawable/fab_add"
+        android:title="新增"
+        app:showAsAction="ifRoom" />
+</menu>

+ 9 - 0
WeiChat/src/main/res/menu/main_sale_ranking.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto">
+    <item
+        android:id="@+id/sale_date_select"
+        android:icon="@drawable/icon_date"
+        android:title="筛选"
+        app:showAsAction="ifRoom" />
+</menu>

+ 19 - 1
WeiChat/src/main/res/menu/menu_crm.xml

@@ -8,9 +8,27 @@
         android:title="@string/search"
         app:showAsAction="ifRoom" />
     <item
-        android:id="@+id/search"
+        android:id="@+id/crm_add"
         android:icon="@drawable/icon_crm_add"
         android:title="@string/search"
         app:showAsAction="ifRoom" />
 
+    <!--    <item
+            android:icon="@drawable/icon_crm_add"
+            android:title="@string/search"
+            app:showAsAction="ifRoom" />
+        <item
+
+            android:icon="@drawable/icon_crm_add"
+            android:title="@string/search"
+            app:showAsAction="ifRoom" />
+        <item
+
+            android:icon="@drawable/icon_crm_add"
+            android:title="@string/search"
+            app:showAsAction="ifRoom" />
+        <item
+            android:icon="@drawable/icon_crm_add"
+            android:title="@string/search"
+            app:showAsAction="ifRoom" />-->
 </menu>

+ 1 - 1
WeiChat/src/main/res/menu/menu_oa_meeting.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <menu xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto" >
+    xmlns:app="http://schemas.android.com/apk/res-auto">
 
     <item
         android:id="@+id/add"

+ 1 - 1
WeiChat/src/main/res/menu/menu_oa_signin.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <menu xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto" >
+    xmlns:app="http://schemas.android.com/apk/res-auto">
     <item
         android:id="@+id/oa_alarma"
         android:icon="@drawable/alarm"

+ 1 - 0
WeiChat/src/main/res/values/colors.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
+    <color name="crm_basic_bg">#4B4B57</color>
     <!--by gongpengming-->
     <color name="subscrip_text">#60a0a0a0</color>
     <color name="item_color1">#30a0a0a0</color>

+ 2 - 2
WeiChat/src/main/res/values/dimens.xml

@@ -6,11 +6,11 @@
     <!-- end oa 考勤统计页面-->
 
 
-    <dimen name="next_width">10.0dip</dimen>
+    <dimen name="next_width">5.0dip</dimen>
     <dimen name="line">1px</dimen>
     <dimen name="line_big">7.0dip</dimen>
     <dimen name="line_min">2.0dip</dimen>
-    <dimen name="next_height">20.0dip</dimen>
+    <dimen name="next_height">10.0dip</dimen>
     <dimen name="text_main">17.0sp</dimen>
     <dimen name="text_hine">14.0sp</dimen>
     <dimen name="text_min">12.0sp</dimen>

+ 1 - 1
WeiChat/src/main/res/values/strings.xml

@@ -370,5 +370,5 @@
 
 
     <string name="add_tag">Add Tag</string>
-    <string name="title_activity_sales_ranking">SalesRankingActivity</string>
+    <string name="title_activity_sales_ranking">荣誉墙</string>
 </resources>

+ 20 - 0
WeiChat/src/main/res/values/styles.xml

@@ -1,5 +1,10 @@
 <resources>
 
+    <style name="Animation.Popup" parent="@android:style/Animation">
+        <item name="android:windowEnterAnimation">@android:anim/fade_in</item>
+        <item name="android:windowExitAnimation">@android:anim/fade_out</item>
+    </style>
+
     <style name="style_bg_bar">
         <item name="android:background">@color/antionbarcolor</item>
     </style>
@@ -680,6 +685,21 @@
         <item name="android:listSelector">@android:color/transparent</item>
     </style>
 
+    <style name="GridViewBasic">
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:layout_height">match_parent</item>
+        <item name="android:scrollbars">none</item>
+        <item name="android:listSelector">@android:color/transparent</item>
+    </style>
+
+    <style name="GridViewSaleRanking" parent="GridViewBasic">
+        <item name="android:verticalSpacing">10dp</item>
+        <item name="android:horizontalSpacing">10dp</item>
+        <item name="android:numColumns">2</item>
+        <!--  <item name="android:columnWidth"></item>-->
+    </style>
+
+
     <style name="LinearLayout_horizontal">
         <item name="android:layout_width">match_parent</item>
         <item name="android:layout_height">wrap_content</item>