Browse Source

更新版本

Bitliker 9 years ago
parent
commit
9ef412a2fa
42 changed files with 412 additions and 127 deletions
  1. 8 5
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/account/LoginActivity.java
  2. 112 60
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/OAActivity.java
  3. 2 5
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/VisitActivity.java
  4. 3 3
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/fragment/WorksFragment.java
  5. 1 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/net/ViewUtil.java
  6. 17 8
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/message/SubscriptionActivity.java
  7. 1 3
      WeiChat/src/main/java/com/xzjmyk/pm/activity/util/BaiduMapUtil.java
  8. 72 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/util/LoadLocalImageUtil.java
  9. 121 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/view/LoadingView.java
  10. BIN
      WeiChat/src/main/res/drawable-xhdpi/dingyue.png
  11. BIN
      WeiChat/src/main/res/drawable-xhdpi/dingyue1.jpg
  12. BIN
      WeiChat/src/main/res/drawable-xhdpi/dingyue2.jpg
  13. BIN
      WeiChat/src/main/res/drawable-xhdpi/dingyue3.jpg
  14. BIN
      WeiChat/src/main/res/drawable-xhdpi/dingyue4.jpg
  15. BIN
      WeiChat/src/main/res/drawable-xhdpi/dingyue5.jpg
  16. BIN
      WeiChat/src/main/res/drawable-xhdpi/dingyue6.jpg
  17. BIN
      WeiChat/src/main/res/drawable-xhdpi/list_01.png
  18. BIN
      WeiChat/src/main/res/drawable-xhdpi/list_02.png
  19. BIN
      WeiChat/src/main/res/drawable-xhdpi/list_03.png
  20. BIN
      WeiChat/src/main/res/drawable-xhdpi/list_04.png
  21. BIN
      WeiChat/src/main/res/drawable-xhdpi/list_05.png
  22. BIN
      WeiChat/src/main/res/drawable-xhdpi/list_06.png
  23. BIN
      WeiChat/src/main/res/drawable-xhdpi/list_07.png
  24. BIN
      WeiChat/src/main/res/drawable-xhdpi/list_08.png
  25. BIN
      WeiChat/src/main/res/drawable-xhdpi/list_09.png
  26. BIN
      WeiChat/src/main/res/drawable-xhdpi/list_10.png
  27. BIN
      WeiChat/src/main/res/drawable-xhdpi/list_11.png
  28. BIN
      WeiChat/src/main/res/drawable-xhdpi/list_12.png
  29. BIN
      WeiChat/src/main/res/drawable-xhdpi/list_13.png
  30. BIN
      WeiChat/src/main/res/drawable-xhdpi/list_14.png
  31. BIN
      WeiChat/src/main/res/drawable-xhdpi/list_15.png
  32. BIN
      WeiChat/src/main/res/drawable-xhdpi/oa_data_back.png
  33. BIN
      WeiChat/src/main/res/drawable-xhdpi/oa_data_next.png
  34. BIN
      WeiChat/src/main/res/drawable-xxhdpi/uu_dy_image1.png
  35. BIN
      WeiChat/src/main/res/drawable-xxhdpi/uu_dy_image2.png
  36. BIN
      WeiChat/src/main/res/drawable-xxhdpi/uu_dy_image3.png
  37. BIN
      WeiChat/src/main/res/drawable-xxhdpi/uu_dy_image4.png
  38. BIN
      WeiChat/src/main/res/drawable-xxhdpi/uu_dy_image5.png
  39. BIN
      WeiChat/src/main/res/drawable-xxhdpi/uu_dy_image6.png
  40. BIN
      WeiChat/src/main/res/drawable-xxhdpi/uu_dy_image7.png
  41. 54 18
      WeiChat/src/main/res/layout/activity_oa.xml
  42. 21 25
      WeiChat/src/main/res/layout/bigimage_subscription.xml

+ 8 - 5
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/account/LoginActivity.java

@@ -143,11 +143,12 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
             params.put("latitude", String.valueOf(latitude));
         if (longitude != 0)
             params.put("longitude", String.valueOf(longitude));
-        Log.i("Arison","LoginActivity:login:159:model="+DeviceInfoUtil.getModel());
-        Log.i("Arison","LoginActivity:login:160:osVersion="+DeviceInfoUtil.getOsVersion());
-        Log.i("Arison","LoginActivity:login:161:serial="+DeviceInfoUtil.getDeviceId(mContext));
+        Log.i("Arison", "LoginActivity:login:159:model=" + DeviceInfoUtil.getModel());
+        Log.i("Arison", "LoginActivity:login:160:osVersion=" + DeviceInfoUtil.getOsVersion());
+        Log.i("Arison", "LoginActivity:login:161:serial=" + DeviceInfoUtil.getDeviceId(mContext));
         Log.i("Arison", "LoginActivity:login:162:latitude=" + String.valueOf(latitude));
-        Log.i("Arison","LoginActivity:login:163:longitude="+String.valueOf(longitude));
+        Log.i("Arison", "LoginActivity:login:163:longitude=" + String.valueOf(longitude));
+        Log.i("gongpengming11", "phone=" + phoneNumber + "\n" + "password" + password);
         final StringJsonObjectRequest<LoginRegisterResult> request = new StringJsonObjectRequest<LoginRegisterResult>(mConfig.USER_LOGIN,
                 new ErrorListener() {
                     @Override
@@ -174,6 +175,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
                 if (success) {// 登陆IM成功
                     login_manage(phoneNumber, password);//登录管理平台
                 } else {// 登录失败
+                    Log.i("gongpengming", result.getResultMsg());
                     String message = TextUtils.isEmpty(result.getResultMsg()) ? getString(R.string.login_failed) : result.getResultMsg();
                     ToastUtil.showToast(mContext, message);
                 }
@@ -206,7 +208,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
 //		final ProgressDialog dialog = ProgressDialogUtil.init(mContext, null, getString(R.string.please_wait), true);
 //		ProgressDialogUtil.show(dialog);
         /*StringJsonObjectRequest<String> mRequest = new StringJsonObjectRequest<String>(
-				Request.Method.GET, url,
+                Request.Method.GET, url,
 				new ErrorListener() {
 					@Override
 					public void onErrorResponse(VolleyError volleyError) {
@@ -226,6 +228,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
 				}, String.class, params, true);
 		mRequest.setTag(requestTag);
 		addDefaultRequest(mRequest);*/
+        Log.i("gongpengming", "phone=" + phone + "\n" + "password" + password);
         ViewUtil.LoginTask(phone, password, mContext);
     }
 

+ 112 - 60
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/OAActivity.java

@@ -4,6 +4,8 @@ import android.annotation.TargetApi;
 import android.content.Intent;
 import android.os.Build;
 import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.MenuItem;
@@ -17,59 +19,79 @@ import android.widget.ScrollView;
 import android.widget.Spinner;
 import android.widget.TextView;
 
+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.SaleSelectActivity;
+import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
+import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
 import com.xzjmyk.pm.activity.util.ToastUtil;
 import com.xzjmyk.pm.activity.view.CalendarView;
 import com.xzjmyk.pm.activity.view.MyListView;
 
 import java.util.Date;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
 
-public class OAActivity extends BaseActivity implements View.OnClickListener {
-    private OAActivity activity = this;
+public class OAActivity extends BaseActivity implements View.OnClickListener, AdapterView.OnItemSelectedListener {
+
+    //start improt View
+    @ViewInject(R.id.oa_rootview)
+    private ScrollView rootScrollView;
+    @ViewInject(R.id.oa_picker)
+    private CalendarView picker;
+    @ViewInject(R.id.oa_listview)
     private MyListView listview;
-    private Spinner state, show_type, type;
+    @ViewInject(R.id.state)
+    private Spinner state;
+    @ViewInject(R.id.show_type)
+    private Spinner show_type;
+    @ViewInject(R.id.type)
+    private Spinner type;
+    @ViewInject(R.id.all_task_num)
+    private TextView all_task_num;  //所有任务个数
+    @ViewInject(R.id.ok_task_num)
+    private TextView ok_task_num;//完成任务个数
+    @ViewInject(R.id.uok_task_num)
+    private TextView uok_task_num;//未完成个数
+    @ViewInject(R.id.ok_scale)
+    private TextView ok_scale;//完成比例
+    @ViewInject(R.id.date_tv)
+    private TextView date_tv;  //当前月份
+    //end improt View
+
+    //init
+    private OAActivity activity;
     private String[] stateItems = {"状态", "确认中", "进行中", "已完成"};
     private String[] typeItems = {"类型", "任务", "日程", "拜访"};
     private String[] show_typeItems = {"展示方式", "日程", "列表"};
-    private CalendarView picker;
+    private String baseUrl;
     private PopupMenu poAddMenu;
-    private ScrollView rootScrollView;
+    private final int what = 0x10;
+    private Handler handler = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
 
+        }
+    };
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_oa);
+        ViewUtils.inject(this);
         init();
         initView();
     }
 
     private void init() {
-
+        activity = this;
+        baseUrl = CommonUtil.getSharedPreferences(this, "erp_baseurl");
     }
 
     private void initView() {
-        findViewById(R.id.ll_signin).setOnClickListener(this);
-        findViewById(R.id.oa_img_add).setOnClickListener(this);
-        findViewById(R.id.ll_outside).setOnClickListener(this);
-        findViewById(R.id.ll_meeting).setOnClickListener(this);
-        findViewById(R.id.ll_worklog).setOnClickListener(this);
-        findViewById(R.id.ll_subject).setOnClickListener(this);
-
-        findViewById(R.id.ll_leave).setOnClickListener(this);
-        findViewById(R.id.ll_overtime).setOnClickListener(this);
-        findViewById(R.id.ll_travel).setOnClickListener(this);
-        findViewById(R.id.ll_).setOnClickListener(this);
-        findViewById(R.id.ll_attendance).setOnClickListener(this);
-
-        state = (Spinner) findViewById(R.id.state);
-        type = (Spinner) findViewById(R.id.type);
-        show_type = (Spinner) findViewById(R.id.show_type);
-        picker = (CalendarView) findViewById(R.id.oa_picker);
-        listview = (MyListView) findViewById(R.id.oa_listview);
-        rootScrollView = (ScrollView) findViewById(R.id.oa_rootview);
         rootScrollView.requestDisallowInterceptTouchEvent(false);
         picker.setCalendarData(new Date());
         picker.setSelectMore(false);
@@ -79,18 +101,34 @@ public class OAActivity extends BaseActivity implements View.OnClickListener {
                 Log.i("gongpengming", selectedStartDate.toString());
                 Log.i("gongpengming", selectedEndDate.toString());
                 Log.i("gongpengming", downDate.toString());
-                updateUI(selectedStartDate,selectedEndDate,downDate);
+                updateUI(selectedStartDate, selectedEndDate, downDate);
             }
-
-
         });
         bindAdapterForSpinner();
         listview.setAdapter(new MyListViewAdapter());
         rootScrollView.smoothScrollTo(0, 20);
+        setListener();
+    }
+    //获取网络数据
+    public void loadNetData(long date) {
+        //获取网络数据
+        String url = baseUrl + "common/desktop/subs/getSubs.action";
+        final Map<String, Object> param = new HashMap<>();
+        param.put("sessionId", CommonUtil.getSharedPreferences(this, "sessionId"));
+        LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
+        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(this, "sessionId"));
+        ViewUtil.httpSendRequest(this, url, param, handler, headers, what, null, null, "get");
     }
-
     private void updateUI(Date selectedStartDate, Date selectedEndDate, Date downDate) {
         //TODO 更改数据显示
+        all_task_num.setText("我的任务日程:");
+        ok_task_num.setText("已完成:");
+        uok_task_num.setText("未完成:");
+        ok_scale.setText("完成比例:");
+    }
+
+    //下载网络数据完成
+    private void loadNetSuccess(String requestData) {
 
     }
 
@@ -98,45 +136,59 @@ public class OAActivity extends BaseActivity implements View.OnClickListener {
         state.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, stateItems));
         type.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, typeItems));
         show_type.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, show_typeItems));
+        state.setOnItemSelectedListener(this);
+        type.setOnItemSelectedListener(this);
+        show_type.setOnItemSelectedListener(this);
+    }
 
-        state.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
-            @Override
-            public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
-                //TODO 选择菜单
-            }
-
-            @Override
-            public void onNothingSelected(AdapterView<?> adapterView) {
-
-            }
-        });
-        type.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
-            @Override
-            public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
-                //TODO 选择菜单
-            }
-
-            @Override
-            public void onNothingSelected(AdapterView<?> adapterView) {
-                //TODO 选择菜单
-            }
-        });
-        show_type.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
-            @Override
-            public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
-                ToastMessage(show_typeItems[i]);
-            }
+    //设置控件点击事件
+    private void setListener() {
+        findViewById(R.id.ll_signin).setOnClickListener(this);
+        findViewById(R.id.oa_img_add).setOnClickListener(this);
+        findViewById(R.id.ll_outside).setOnClickListener(this);
+        findViewById(R.id.ll_meeting).setOnClickListener(this);
+        findViewById(R.id.ll_worklog).setOnClickListener(this);
+        findViewById(R.id.ll_subject).setOnClickListener(this);
+        findViewById(R.id.ll_leave).setOnClickListener(this);
+        findViewById(R.id.ll_overtime).setOnClickListener(this);
+        findViewById(R.id.ll_travel).setOnClickListener(this);
+        findViewById(R.id.ll_).setOnClickListener(this);
+        findViewById(R.id.ll_attendance).setOnClickListener(this);
+        findViewById(R.id.date_back_img).setOnClickListener(this);
+        findViewById(R.id.date_next_img).setOnClickListener(this);
+        findViewById(R.id.oa_img_infile).setOnClickListener(this);
+    }
 
-            @Override
-            public void onNothingSelected(AdapterView<?> adapterView) {
-            }
-        });
+    //start Spinner itemSelected
+    @Override
+    public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
+        switch (adapterView.getId()) {
+            case R.id.state:
+                Log.i("gongpengming", stateItems[i]);
+                break;
+            case R.id.show_type:
+                Log.i("gongpengming", show_typeItems[i]);
+                break;
+            case R.id.type:
+                Log.i("gongpengming", typeItems[i]);
+                break;
+        }
     }
+    @Override
+    public void onNothingSelected(AdapterView<?> adapterView) {
+
+    }//end Spinner itemSelected
 
     @Override
     public void onClick(View view) {
         Intent it_scale = null;
         switch (view.getId()) {
+            case R.id.oa_img_infile:  //筛选
+                break;
+            case R.id.date_back_img://日期返回一个月
+                break;
+            case R.id.date_next_img://日期前进一个月
+                break;
             case R.id.ll_signin://打卡签到
                 startActivity(new Intent(activity, SigninActivity.class));
                 break;

+ 2 - 5
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/VisitActivity.java

@@ -25,7 +25,7 @@ public class VisitActivity extends BaseActivity {
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-            setContentView(R.layout.activity_visit);
+        setContentView(R.layout.activity_visit);
         ViewUtils.inject(this);
         initView();
     }
@@ -61,13 +61,10 @@ public class VisitActivity extends BaseActivity {
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
         if (data != null) {
-            Log.i("gongpengming", requestCode + "  " + resultCode + "");
-
             if (this.resultCode == resultCode) {
                 if (resultCode == LocationMapActivity.REQUCODE) {
                     myPoInfo = data.getParcelableExtra(LocationMapActivity.REQUESTNAME);
-                    Log.i("gongpengming", myPoInfo.address);
-                    Log.i("gongpengming", myPoInfo.name + "@@@@" + myPoInfo.name);
+                    location_tv.setText(myPoInfo.name);
                 }
             }
         }

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

@@ -16,7 +16,7 @@ import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.MainActivity;
 import com.xzjmyk.pm.activity.ui.base.XutilsFragment;
 import com.xzjmyk.pm.activity.ui.circle.BusinessCircleActivity;
-import com.xzjmyk.pm.activity.ui.erp.activity.oa.OAActivity;
+import com.xzjmyk.pm.activity.ui.erp.activity.ErpMenActivity;
 import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
 import com.xzjmyk.pm.activity.util.PreferenceUtils;
@@ -93,8 +93,8 @@ public class WorksFragment extends XutilsFragment implements View.OnClickListene
                 ViewUtil.WebLinks(ct, url, "我的商务");
                 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, ErpMenActivity.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

@@ -364,6 +364,7 @@ public class ViewUtil {
                         ChangeStatusERP(msg.getData().getString("result"));
                     } else {
                         String reason = JSON.parseObject(result).getString("reason");
+
                         ToastMessage(ct, reason);
                     }
                     break;

+ 17 - 8
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/message/SubscriptionActivity.java

@@ -30,6 +30,7 @@ import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.Constants;
 import com.xzjmyk.pm.activity.ui.tool.ThreadPool;
+import com.xzjmyk.pm.activity.util.LoadLocalImageUtil;
 import com.xzjmyk.pm.activity.util.TimeUtils;
 import com.xzjmyk.pm.activity.view.MyListView;
 
@@ -59,10 +60,16 @@ public class SubscriptionActivity extends BaseActivity {
     private boolean isRef = true;
     private long oldTime = 0;
     private int[] srcs = {
-            R.drawable.list_01, R.drawable.list_02, R.drawable.list_03
+            R.drawable.list_01, R.drawable.list_02, R.drawable.list_03,
+            R.drawable.list_04, R.drawable.list_05, R.drawable.list_06,
+            R.drawable.list_07, R.drawable.list_08, R.drawable.list_09,
+            R.drawable.list_10, R.drawable.list_11, R.drawable.list_12,
+            R.drawable.list_13, R.drawable.list_14, R.drawable.list_15,
+
     };
     private int[] srcsBig = {
-            R.drawable.dingyue, R.drawable.dingyue1, R.drawable.dingyue2, R.drawable.dingyue3, R.drawable.dingyue4, R.drawable.dingyue5, R.drawable.dingyue6
+            R.drawable.uu_dy_image1, R.drawable.uu_dy_image2, R.drawable.uu_dy_image3, R.drawable.uu_dy_image4, R.drawable.uu_dy_image5, R.drawable.uu_dy_image6, R.drawable.uu_dy_image7
+
     };
 
     private Handler handler = new Handler() {
@@ -105,7 +112,7 @@ public class SubscriptionActivity extends BaseActivity {
 
     @Override
     public boolean onCreateOptionsMenu(Menu menu) {
-        getMenuInflater().inflate(R.menu.menu_subscription, menu);
+//        getMenuInflater().inflate(R.menu.menu_subscription, menu);
         return super.onCreateOptionsMenu(menu);
     }
 
@@ -386,8 +393,6 @@ public class SubscriptionActivity extends BaseActivity {
         public long getItemId(int position) {
             return position;
         }
-
-
         @Override
         public View getView(final int i, View contextView, ViewGroup viewGroup) {
             VieweHolder holder = null;
@@ -433,7 +438,9 @@ public class SubscriptionActivity extends BaseActivity {
                 Calendar c = Calendar.getInstance();
                 c.setTimeInMillis(Long.parseLong(beans.get(i).getCREATEDATE_()));
                 int mWay = c.get(Calendar.DAY_OF_WEEK);
-                holder.big_img.setImageDrawable(getResources().getDrawable(srcsBig[mWay - 1]));
+                //异步
+                LoadLocalImageUtil.getInstance().displayFromDrawable(srcsBig[mWay - 1], holder.big_img);
+//                holder.big_img.setImageDrawable(getResources().getDrawable(srcsBig[mWay - 1]));
             } else {
                 holder.ll.setVisibility(View.VISIBLE);
                 holder.rl.setVisibility(View.GONE);
@@ -447,8 +454,10 @@ public class SubscriptionActivity extends BaseActivity {
                     isReColor = R.color.text_color;
                 }
                 holder.isre_tv.setText(isRe);
-                holder.big_isre_tv.setTextColor(getResources().getColor(isReColor));
-                holder.small_img.setImageDrawable(getResources().getDrawable(srcs[i % 3]));
+                holder.isre_tv.setTextColor(getResources().getColor(isReColor));
+                //异步
+//                LoadLocalImageUtil.getInstance().displayFromDrawable(srcs[i % 15], holder.big_img);
+                holder.small_img.setImageDrawable(getResources().getDrawable(srcs[i % 15]));
             }
             contextView.setTag(R.id.position, position);
             contextView.setOnClickListener(new View.OnClickListener() {

+ 1 - 3
WeiChat/src/main/java/com/xzjmyk/pm/activity/util/BaiduMapUtil.java

@@ -63,9 +63,7 @@ public class BaiduMapUtil implements OnGetPoiSearchResultListener {
     public String getDistance(double a1, double a2, double b1, double b2) {
         LatLng a = new LatLng(a1, a2);
         LatLng b = new LatLng(b1, b2);
-        double distance = DistanceUtil.getDistance(a, b);
-        DecimalFormat df = new DecimalFormat(".##");
-        return df.format(distance);
+        return getDistance(a, b);
     }
 
     //显示当前位置

+ 72 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/util/LoadLocalImageUtil.java

@@ -0,0 +1,72 @@
+package com.xzjmyk.pm.activity.util;
+
+import android.widget.ImageView;
+
+import com.nostra13.universalimageloader.core.ImageLoader;
+
+/**
+ * 异步加载本地图片工具类
+ * 
+ * @author tony
+ * 
+ */
+public class LoadLocalImageUtil {
+    private LoadLocalImageUtil() {
+    }
+
+    private static LoadLocalImageUtil instance = null;
+
+    public static synchronized LoadLocalImageUtil getInstance() {
+        if (instance == null) {
+            instance = new LoadLocalImageUtil();
+        }
+        return instance;
+    }
+
+    /**
+     * 从内存卡中异步加载本地图片
+     * 
+     * @param uri
+     * @param imageView
+     */
+    public void displayFromSDCard(String uri, ImageView imageView) {
+        // String imageUri = "file:///mnt/sdcard/image.png"; // from SD card
+        ImageLoader.getInstance().displayImage("file://" + uri, imageView);
+    }
+
+    /**
+     * 从assets文件夹中异步加载图片
+     * 
+     * @param imageName
+     *            图片名称,带后缀的,例如:1.png
+     * @param imageView
+     */
+    public void dispalyFromAssets(String imageName, ImageView imageView) {
+        // String imageUri = "assets://image.png"; // from assets
+        ImageLoader.getInstance().displayImage("assets://" + imageName,
+                imageView);
+    }
+
+    /**
+     * 从drawable中异步加载本地图片
+     * 
+     * @param imageId
+     * @param imageView
+     */
+    public void displayFromDrawable(int imageId, ImageView imageView) {
+        // String imageUri = "drawable://" + R.drawable.image; // from drawables
+        // (only images, non-9patch)
+        ImageLoader.getInstance().displayImage("drawable://" + imageId,
+                imageView);
+    }
+
+    /**
+     * 从内容提提供者中抓取图片
+     */
+    public void displayFromContent(String uri, ImageView imageView) {
+        // String imageUri = "content://media/external/audio/albumart/13"; //
+        // from content provider
+        ImageLoader.getInstance().displayImage("content://" + uri, imageView);
+    }
+
+}

+ 121 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/view/LoadingView.java

@@ -0,0 +1,121 @@
+package com.xzjmyk.pm.activity.view;
+
+import android.app.ActionBar;
+import android.app.Activity;
+import android.content.Context;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.Window;
+import android.view.animation.AlphaAnimation;
+import android.view.animation.Animation;
+import android.view.animation.LinearInterpolator;
+import android.view.animation.RotateAnimation;
+import android.widget.PopupWindow;
+import android.widget.RelativeLayout;
+
+import com.xzjmyk.pm.activity.R;
+
+
+/**
+ * @note:自定义进度条页面
+ */
+public class LoadingView{
+    Context context;
+    //布局容器
+    RelativeLayout layoutFile,rlLoading;
+    View viewLoading;
+    //弹出框
+    PopupWindow popupWindow;
+
+    //布局解析器
+    private LayoutInflater inflater;
+    //旋转动画
+    private RotateAnimation rotateAnimation;
+    //渐进/出动画
+    private AlphaAnimation alphaAnimationIn,alphaAnimationOut;
+    //View的背景资源
+    int viewBgResid;
+    boolean isShowing = false;
+
+
+    //初始化动画
+    private void initAnimation(){
+        //建立旋转动画对象并为其配置参数
+        rotateAnimation = new RotateAnimation(0,360, Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
+        rotateAnimation.setDuration(2000);
+        rotateAnimation.setRepeatCount(-1);
+        rotateAnimation.setRepeatMode(Animation.RESTART);
+        rotateAnimation.setInterpolator(new LinearInterpolator());
+
+        //渐进动画
+        alphaAnimationIn = new AlphaAnimation(0f,1f);
+        alphaAnimationIn.setFillAfter(true);
+        alphaAnimationIn.setDuration(200);
+        alphaAnimationIn.setInterpolator(new LinearInterpolator());
+
+        //渐出动画
+        alphaAnimationOut = new AlphaAnimation(1f,0f);
+        alphaAnimationOut.setFillAfter(true);
+        alphaAnimationOut.setDuration(200);
+        alphaAnimationOut.setInterpolator(new LinearInterpolator());
+
+        //动画结束时,隐藏
+        alphaAnimationOut.setAnimationListener(new Animation.AnimationListener() {
+            @Override
+            public void onAnimationStart(Animation animation) {}
+
+            @Override
+            public void onAnimationEnd(Animation animation) {
+                dismiss();
+            }
+
+            @Override
+            public void onAnimationRepeat(Animation animation) {}
+        });
+
+    }
+
+    public void show(){
+        initAnimation();
+        //布局文件对象
+        layoutFile = (RelativeLayout) inflater.inflate(R.layout.view_loading, null);
+        //布局容器RelativeLayout
+//        rlLoading = (RelativeLayout) layoutFile.findViewById(R.id.rl_loading);
+//        //loading图片,并设置loading的背景图片
+//        viewLoading = layoutFile.findViewById(R.id.view_loading);
+        viewLoading.setBackgroundResource(viewBgResid);
+        //获得处了标题栏外的部分
+        View parentView = ((Activity)context).getWindow().findViewById(Window.ID_ANDROID_CONTENT);
+        //初始化弹窗
+        popupWindow = new PopupWindow(layoutFile, ActionBar.LayoutParams.FILL_PARENT,
+                ActionBar.LayoutParams.FILL_PARENT);
+        //标志已显示
+        isShowing = true;
+        //将标题栏外部分的View放入弹窗中
+        popupWindow.showAtLocation(parentView, Gravity.CENTER, 0, 0);
+        rlLoading.startAnimation(alphaAnimationIn);
+        viewLoading.startAnimation(rotateAnimation);
+    }
+
+    public void dismiss(){
+        if(popupWindow != null && popupWindow.isShowing()){
+            isShowing = false;
+            rlLoading.clearAnimation();
+            viewLoading.clearAnimation();
+            popupWindow.setFocusable(false);
+            popupWindow.dismiss();
+        }
+    }
+
+    //外界获得loadingView的状态
+    public boolean isShow(){
+        return isShowing;
+    }
+
+    public LoadingView(Context pContext){
+        context = pContext;
+//        viewBgResid = R.drawable.loading;
+        inflater = LayoutInflater.from(context);
+    }
+}

BIN
WeiChat/src/main/res/drawable-xhdpi/dingyue.png


BIN
WeiChat/src/main/res/drawable-xhdpi/dingyue1.jpg


BIN
WeiChat/src/main/res/drawable-xhdpi/dingyue2.jpg


BIN
WeiChat/src/main/res/drawable-xhdpi/dingyue3.jpg


BIN
WeiChat/src/main/res/drawable-xhdpi/dingyue4.jpg


BIN
WeiChat/src/main/res/drawable-xhdpi/dingyue5.jpg


BIN
WeiChat/src/main/res/drawable-xhdpi/dingyue6.jpg


BIN
WeiChat/src/main/res/drawable-xhdpi/list_01.png


BIN
WeiChat/src/main/res/drawable-xhdpi/list_02.png


BIN
WeiChat/src/main/res/drawable-xhdpi/list_03.png


BIN
WeiChat/src/main/res/drawable-xhdpi/list_04.png


BIN
WeiChat/src/main/res/drawable-xhdpi/list_05.png


BIN
WeiChat/src/main/res/drawable-xhdpi/list_06.png


BIN
WeiChat/src/main/res/drawable-xhdpi/list_07.png


BIN
WeiChat/src/main/res/drawable-xhdpi/list_08.png


BIN
WeiChat/src/main/res/drawable-xhdpi/list_09.png


BIN
WeiChat/src/main/res/drawable-xhdpi/list_10.png


BIN
WeiChat/src/main/res/drawable-xhdpi/list_11.png


BIN
WeiChat/src/main/res/drawable-xhdpi/list_12.png


BIN
WeiChat/src/main/res/drawable-xhdpi/list_13.png


BIN
WeiChat/src/main/res/drawable-xhdpi/list_14.png


BIN
WeiChat/src/main/res/drawable-xhdpi/list_15.png


BIN
WeiChat/src/main/res/drawable-xhdpi/oa_data_back.png


BIN
WeiChat/src/main/res/drawable-xhdpi/oa_data_next.png


BIN
WeiChat/src/main/res/drawable-xxhdpi/uu_dy_image1.png


BIN
WeiChat/src/main/res/drawable-xxhdpi/uu_dy_image2.png


BIN
WeiChat/src/main/res/drawable-xxhdpi/uu_dy_image3.png


BIN
WeiChat/src/main/res/drawable-xxhdpi/uu_dy_image4.png


BIN
WeiChat/src/main/res/drawable-xxhdpi/uu_dy_image5.png


BIN
WeiChat/src/main/res/drawable-xxhdpi/uu_dy_image6.png


BIN
WeiChat/src/main/res/drawable-xxhdpi/uu_dy_image7.png


+ 54 - 18
WeiChat/src/main/res/layout/activity_oa.xml

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
     android:id="@+id/oa_rootview"
-    android:focusableInTouchMode="true"
-    android:focusable="true"
+    android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:focusable="true"
+    android:focusableInTouchMode="true"
     tools:context="com.xzjmyk.pm.activity.ui.erp.activity.crm.ClientActivity">
 
 
@@ -275,19 +275,51 @@
                 android:layout_height="8dp" />
         </LinearLayout>
 
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:padding="6dp">
+
+            <TextView
+                android:id="@+id/date_tv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerHorizontal="true"
+                android:text="2016-07"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <ImageView
+                android:id="@+id/date_back_img"
+                android:layout_width="wrap_content"
+                android:layout_height="20dp"
+                android:layout_marginRight="20dp"
+                android:layout_toLeftOf="@+id/date_tv"
+                android:clickable="true"
+                android:src="@drawable/oa_data_back" />
+
+            <ImageView
+                android:id="@+id/date_next_img"
+                android:layout_width="wrap_content"
+                android:layout_height="20dp"
+                android:layout_marginLeft="20dp"
+                android:layout_toRightOf="@+id/date_tv"
+                android:clickable="true"
+                android:src="@drawable/oa_data_next" />
+        </RelativeLayout>
+
         <LinearLayout
             android:id="@+id/oa_function_ll"
             android:layout_width="match_parent"
             android:layout_height="40dp"
-            android:layout_below="@+id/oa_rl_choose"
             android:orientation="horizontal">
 
             <ImageView
                 android:id="@+id/oa_img_people"
-                android:clickable="true"
                 android:layout_width="0dp"
                 android:layout_height="match_parent"
                 android:layout_weight="1"
+                android:clickable="true"
                 android:padding="10dp"
                 android:src="@drawable/oa_head" />
 
@@ -309,12 +341,12 @@
                 android:layout_height="match_parent"
                 android:background="@color/item_line" />
 
-                <ImageView
+            <ImageView
                 android:id="@+id/oa_img_add"
-                android:clickable="true"
                 android:layout_width="0dp"
                 android:layout_height="match_parent"
                 android:layout_weight="1"
+                android:clickable="true"
                 android:padding="10dp"
                 android:src="@drawable/oa_add" />
         </LinearLayout>
@@ -379,10 +411,10 @@
 
             <ImageView
                 android:id="@+id/oa_img_infile"
-                android:clickable="true"
                 android:layout_width="0dp"
                 android:layout_height="match_parent"
                 android:layout_weight="1"
+                android:clickable="true"
                 android:padding="5dp"
                 android:src="@drawable/filter" />
         </LinearLayout>
@@ -408,7 +440,7 @@
             android:orientation="horizontal">
 
             <TextView
-                android:id="@+id/oa_all_task_num"
+                android:id="@+id/all_task_num"
                 android:layout_width="0dp"
                 android:layout_height="wrap_content"
                 android:layout_weight="2"
@@ -422,12 +454,13 @@
                 android:background="@color/item_line" />
 
             <TextView
+                android:id="@+id/ok_task_num"
                 android:layout_width="0dp"
                 android:layout_height="wrap_content"
                 android:layout_weight="1"
                 android:gravity="center"
                 android:text="已完成:2"
-                android:textSize="12sp"/>
+                android:textSize="12sp" />
 
             <View
                 android:layout_width="1px"
@@ -435,6 +468,7 @@
                 android:background="@color/item_line" />
 
             <TextView
+                android:id="@+id/uok_task_num"
                 android:layout_width="0dp"
                 android:layout_height="wrap_content"
                 android:layout_weight="1"
@@ -448,25 +482,27 @@
                 android:background="@color/item_line" />
 
             <TextView
+                android:id="@+id/ok_scale"
                 android:layout_width="0dp"
                 android:layout_height="wrap_content"
                 android:layout_weight="1"
                 android:gravity="center"
                 android:text="达成率:10%"
-                android:textSize="12sp"/>
+                android:textSize="12sp" />
         </LinearLayout>
 
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="1px"
-            android:background="@color/item_line" />
+        <!--<View-->
+            <!--android:layout_width="match_parent"-->
+            <!--android:layout_height="1px"-->
+            <!--android:background="@color/item_line"-->
+            <!--android:date_tv="match_parent" />-->
 
         <com.xzjmyk.pm.activity.view.MyListView
             android:id="@+id/oa_listview"
-            android:focusableInTouchMode="false"
-            android:focusable="false"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content" />
+            android:layout_height="wrap_content"
+            android:focusable="false"
+            android:focusableInTouchMode="false" />
         />
 
     </LinearLayout>

+ 21 - 25
WeiChat/src/main/res/layout/bigimage_subscription.xml

@@ -7,18 +7,17 @@
     <RelativeLayout
         android:id="@+id/small_ll"
         android:layout_width="match_parent"
-        android:layout_height="80dp"
-        android:orientation="horizontal"
-        android:visibility="gone">
+        android:layout_height="60dp"
+        android:padding="3dp"
+        android:visibility="gone"
+        android:orientation="horizontal">
 
         <TextView
             android:id="@+id/small_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="8dp"
-            android:layout_marginTop="8dp"
             android:maxLines="3"
-            android:padding="8dp"
+            android:padding="5dp"
             android:textSize="@dimen/text_main" />
 
         <TextView
@@ -26,8 +25,6 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_alignParentBottom="true"
-            android:layout_marginBottom="10dp"
-            android:layout_marginLeft="8dp"
             android:layout_toLeftOf="@+id/small_img"
             android:ellipsize="end"
             android:lines="1"
@@ -38,8 +35,7 @@
             android:id="@+id/isre_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_alignBottom="@+id/small_tv"
-            android:layout_marginTop="6dp"
+            android:layout_alignTop="@+id/small_img"
             android:layout_toLeftOf="@+id/small_img"
             android:maxLines="3"
             android:padding="8dp"
@@ -47,8 +43,8 @@
 
         <ImageView
             android:id="@+id/small_img"
-            android:layout_width="60dp"
-            android:layout_height="60dp"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
             android:layout_alignParentRight="true"
             android:layout_centerVertical="true"
             android:layout_marginRight="5dp"
@@ -60,43 +56,43 @@
     <RelativeLayout
         android:id="@+id/big_rl"
         android:layout_width="match_parent"
-        android:layout_height="130dp">
+        android:layout_height="130dp"
+        android:visibility="gone">
 
         <ImageView
             android:id="@+id/big_img"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:scaleType="fitXY"
-            android:src="@drawable/dingyue" />
+            android:scaleType="fitXY" />
 
         <TextView
-            android:id="@+id/big_tv"
+            android:id="@+id/big_sub_title_tv"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
+            android:layout_alignParentBottom="true"
+            android:layout_marginBottom="5dp"
             android:background="@color/subscrip_text"
-            android:gravity="center_horizontal"
+            android:ellipsize="end"
+            android:paddingLeft="10dp"
             android:textColor="@color/white"
-            android:textSize="@dimen/text_main" />
+            android:textSize="@dimen/text_min" />
 
         <TextView
-            android:id="@+id/big_sub_title_tv"
+            android:id="@+id/big_tv"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_alignParentBottom="true"
-            android:layout_marginBottom="5dp"
+            android:layout_above="@+id/big_sub_title_tv"
             android:background="@color/subscrip_text"
-            android:ellipsize="end"
             android:paddingLeft="10dp"
             android:textColor="@color/white"
-            android:textSize="@dimen/text_min" />
+            android:textSize="@dimen/text_main" />
 
         <TextView
             android:id="@+id/big_isre_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_alignParentRight="true"
-            android:layout_below="@+id/big_tv"
-            android:layout_marginRight="5dp"
+            android:layout_margin="10dp"
             android:textSize="@dimen/text_hine" />
     </RelativeLayout>
 </FrameLayout>