|
@@ -194,6 +194,7 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
private JSONArray custs;
|
|
private JSONArray custs;
|
|
|
@ViewInject(R.id.client_ptrsv)
|
|
@ViewInject(R.id.client_ptrsv)
|
|
|
private PullToRefreshScrollView mPullToRefreshScrollView;
|
|
private PullToRefreshScrollView mPullToRefreshScrollView;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
super.onCreate(savedInstanceState);
|
|
super.onCreate(savedInstanceState);
|
|
@@ -224,11 +225,11 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
mPullToRefreshScrollView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2<ScrollView>() {
|
|
mPullToRefreshScrollView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2<ScrollView>() {
|
|
|
@Override
|
|
@Override
|
|
|
public void onPullDownToRefresh(PullToRefreshBase<ScrollView> refreshView) {
|
|
public void onPullDownToRefresh(PullToRefreshBase<ScrollView> refreshView) {
|
|
|
- if (CommonUtil.isNetWorkConnected(ClientActivity.this)){
|
|
|
|
|
|
|
+ if (CommonUtil.isNetWorkConnected(ClientActivity.this)) {
|
|
|
mHttpCount = 0;
|
|
mHttpCount = 0;
|
|
|
initData();
|
|
initData();
|
|
|
- }else {
|
|
|
|
|
- ViewUtil.ToastMessage(ClientActivity.this,"网络未连接",Style.holoRedLight,2000);
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ViewUtil.ToastMessage(ClientActivity.this, "网络未连接", Style.holoRedLight, 2000);
|
|
|
mPullToRefreshScrollView.onRefreshComplete(1000);
|
|
mPullToRefreshScrollView.onRefreshComplete(1000);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -693,8 +694,8 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
}, ct.getResources().getColor(R.color.red));
|
|
}, ct.getResources().getColor(R.color.red));
|
|
|
CommonUtil.textAarrySpanForStyle(tv_rank_rirun_right, profits.getJSONArray(1).get(0) + "万元"
|
|
CommonUtil.textAarrySpanForStyle(tv_rank_rirun_right, profits.getJSONArray(1).get(0) + "万元"
|
|
|
, new String[]{
|
|
, new String[]{
|
|
|
- String.valueOf(profits.getJSONArray(0).get(0))
|
|
|
|
|
- }, ct.getResources().getColor(R.color.gray));
|
|
|
|
|
|
|
+ String.valueOf(profits.getJSONArray(0).get(0))
|
|
|
|
|
+ }, ct.getResources().getColor(R.color.gray));
|
|
|
} else {
|
|
} else {
|
|
|
if (profits.getJSONArray(0).getString(2).equals(CommonUtil.getSharedPreferences(ct, "erp_username"))) {
|
|
if (profits.getJSONArray(0).getString(2).equals(CommonUtil.getSharedPreferences(ct, "erp_username"))) {
|
|
|
CommonUtil.textAarrySpanForStyle(tv_rank_rirun_left,
|
|
CommonUtil.textAarrySpanForStyle(tv_rank_rirun_left,
|
|
@@ -705,8 +706,8 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
|
|
|
|
|
CommonUtil.textAarrySpanForStyle(tv_rank_rirun_right, profits.getJSONArray(0).get(0) + "万元"
|
|
CommonUtil.textAarrySpanForStyle(tv_rank_rirun_right, profits.getJSONArray(0).get(0) + "万元"
|
|
|
, new String[]{
|
|
, new String[]{
|
|
|
- String.valueOf(profits.getJSONArray(0).get(0))
|
|
|
|
|
- }, ct.getResources().getColor(R.color.gray));
|
|
|
|
|
|
|
+ String.valueOf(profits.getJSONArray(0).get(0))
|
|
|
|
|
+ }, ct.getResources().getColor(R.color.gray));
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
CommonUtil.textAarrySpanForStyle(tv_rank_rirun_left,
|
|
CommonUtil.textAarrySpanForStyle(tv_rank_rirun_left,
|
|
@@ -929,7 +930,7 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
case Constants.APP_SOCKETIMEOUTEXCEPTION:
|
|
case Constants.APP_SOCKETIMEOUTEXCEPTION:
|
|
|
Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
|
|
Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
|
|
|
progressDialog.dismiss();
|
|
progressDialog.dismiss();
|
|
|
- if (mPullToRefreshScrollView.isRefreshing()){
|
|
|
|
|
|
|
+ if (mPullToRefreshScrollView.isRefreshing()) {
|
|
|
mPullToRefreshScrollView.onRefreshComplete();
|
|
mPullToRefreshScrollView.onRefreshComplete();
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
@@ -949,9 +950,9 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- if (mHttpCount > 4){
|
|
|
|
|
- if (mPullToRefreshScrollView.isRefreshing()){
|
|
|
|
|
- ViewUtil.ToastMessage(ClientActivity.this,"刷新成功", Style.holoGreenLight,2000);
|
|
|
|
|
|
|
+ if (mHttpCount > 4) {
|
|
|
|
|
+ if (mPullToRefreshScrollView.isRefreshing()) {
|
|
|
|
|
+ ViewUtil.ToastMessage(ClientActivity.this, "刷新成功", Style.holoGreenLight, 2000);
|
|
|
mPullToRefreshScrollView.onRefreshComplete();
|
|
mPullToRefreshScrollView.onRefreshComplete();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1039,7 +1040,7 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, INIT_PersonalRank, null, null, "post");
|
|
ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, INIT_PersonalRank, null, null, "post");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
private PopupWindow popupWindow = null;
|
|
private PopupWindow popupWindow = null;
|
|
|
|
|
|
|
|
public void showPopupWindow(View parent) {
|
|
public void showPopupWindow(View parent) {
|
|
@@ -1077,10 +1078,9 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
/*case 5:
|
|
/*case 5:
|
|
|
|
|
|
|
|
break;*/
|
|
break;*/
|
|
|
- case 2:
|
|
|
|
|
- startActivity(new Intent(ClientActivity.this, VisitReportPlanActivity.class));
|
|
|
|
|
- break;
|
|
|
|
|
case 3:
|
|
case 3:
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 2:
|
|
|
startActivity(new Intent(ClientActivity.this, VisitReportAddActivity.class));
|
|
startActivity(new Intent(ClientActivity.this, VisitReportAddActivity.class));
|
|
|
break;
|
|
break;
|
|
|
/* case 4:
|
|
/* case 4:
|
|
@@ -1144,9 +1144,9 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
map.put("item_name", "新增分享");
|
|
map.put("item_name", "新增分享");
|
|
|
list.add(map);*/
|
|
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 = new HashMap<String, Object>();
|
|
|
map.put("item_name", "新增拜访报告");
|
|
map.put("item_name", "新增拜访报告");
|