|
|
@@ -320,11 +320,19 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
if (!sales.isEmpty()){
|
|
|
if (sales.size() != 2) {
|
|
|
//__元/第__名 第一名:__金额:__元
|
|
|
- tv_rank_sale_left.setText("__" + "元/第"+"__"+"名");
|
|
|
- tv_rank_sale_right.setText("第一名:" + sales.getJSONArray(0).getString(1)
|
|
|
- + "金额:" + sales.getJSONArray(0).getIntValue(0) + "元");
|
|
|
-// sales.getJSONArray(0).getIntValue(0);//第一名 元
|
|
|
-// sales.getJSONArray(0).getString(1);//第一名
|
|
|
+ CommonUtil.textAarrySpanForStyle(tv_rank_sale_left,
|
|
|
+ "__" + "元/第"+"__"+"名",
|
|
|
+ new String[]{"__"},ct.getResources().getColor(R.color.yellow_home)
|
|
|
+ );
|
|
|
+ CommonUtil.textAarrySpanForStyle(tv_rank_sale_right,
|
|
|
+ "第一名:" + sales.getJSONArray(0).getString(1)
|
|
|
+ + "金额:" + sales.getJSONArray(0).getIntValue(0) + " 元"
|
|
|
+ ,new String[]{sales.getJSONArray(0).getString(1),
|
|
|
+ String.valueOf(sales.getJSONArray(0).getIntValue(0))},
|
|
|
+ ct.getResources().getColor(R.color.yellow_home));
|
|
|
+// tv_rank_sale_right.setText("第一名:" + sales.getJSONArray(0).getString(1)
|
|
|
+// + "金额:" + sales.getJSONArray(0).getIntValue(0) + "元");
|
|
|
+
|
|
|
} else {
|
|
|
tv_rank_sale_left.setText(sales.getJSONArray(1).getIntValue(0) + "元/第1名");
|
|
|
tv_rank_sale_right.setText("第一名:" + sales.getJSONArray(0).getString(1)
|
|
|
@@ -337,19 +345,24 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
}
|
|
|
|
|
|
if (visits != null&&!visits.isEmpty()) {
|
|
|
-
|
|
|
if (visits.size() != 2) {
|
|
|
//名称 拜访次数,拜访个数,排名
|
|
|
- tv_rank_visit_left.setText(visits.getJSONArray(0).getIntValue(2) + "个/" +
|
|
|
- visits.getJSONArray(0).getIntValue(1) + "次/第"
|
|
|
- + visits.getJSONArray(0).getIntValue(3) + "名");
|
|
|
- tv_rank_visit_right.setText("第一名:" + visits.getJSONArray(0).getString(0)
|
|
|
- + "拜访:" + visits.getJSONArray(0).getIntValue(2)
|
|
|
- + "个/" + visits.getJSONArray(0).getIntValue(1) + "次");
|
|
|
- visits.getJSONArray(0).getString(0);//第一名 元
|
|
|
- visits.getJSONArray(0).getIntValue(1);//第一名
|
|
|
- visits.getJSONArray(0).getIntValue(2);//第一名 元
|
|
|
- visits.getJSONArray(0).getIntValue(3);//第一名
|
|
|
+ CommonUtil.textAarrySpanForStyle(tv_rank_visit_left,
|
|
|
+ visits.getJSONArray(0).getIntValue(2) + "个/" +
|
|
|
+ visits.getJSONArray(0).getIntValue(1) + "次/第"
|
|
|
+ + visits.getJSONArray(0).getIntValue(3) + "名",
|
|
|
+ new String[]{String.valueOf(visits.getJSONArray(0).getIntValue(2))
|
|
|
+ , String.valueOf(visits.getJSONArray(0).getIntValue(1))
|
|
|
+ , String.valueOf(visits.getJSONArray(0).getIntValue(3))
|
|
|
+ }, ct.getResources().getColor(R.color.yellow_home));
|
|
|
+ CommonUtil.textAarrySpanForStyle(tv_rank_visit_right,
|
|
|
+ "第一名:" + visits.getJSONArray(0).getString(0)
|
|
|
+ + "拜访:" + visits.getJSONArray(0).getIntValue(2)
|
|
|
+ + "个/" + visits.getJSONArray(0).getIntValue(1) + " 次"
|
|
|
+ , new String[]{visits.getJSONArray(0).getString(0)
|
|
|
+ , String.valueOf(visits.getJSONArray(0).getIntValue(2))
|
|
|
+ , String.valueOf(visits.getJSONArray(0).getIntValue(1))},
|
|
|
+ ct.getResources().getColor(R.color.yellow_home));
|
|
|
} else {
|
|
|
tv_rank_visit_left.setText(visits.getJSONArray(1).getIntValue(2) + "个/" +
|
|
|
visits.getJSONArray(1).getIntValue(1) + "次/第"
|
|
|
@@ -357,11 +370,21 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
tv_rank_visit_right.setText("第一名:" + visits.getJSONArray(1).getString(0)
|
|
|
+ "拜访:" + visits.getJSONArray(1).getIntValue(2)
|
|
|
+ "个/" + visits.getJSONArray(1).getIntValue(1) + "次");
|
|
|
- visits.getJSONArray(1).getString(0);//第一名 元
|
|
|
- visits.getJSONArray(1).getIntValue(1);//第一名
|
|
|
- visits.getJSONArray(1).getIntValue(2);//第一名 元
|
|
|
- visits.getJSONArray(1).getIntValue(3);//第一名
|
|
|
+
|
|
|
}
|
|
|
+ }else{
|
|
|
+ CommonUtil.textAarrySpanForStyle(tv_rank_visit_left,
|
|
|
+ "__" + "个/" +
|
|
|
+ "__" + "次/第"
|
|
|
+ + "__" + "名",
|
|
|
+ new String[]{"__"}
|
|
|
+ , ct.getResources().getColor(R.color.yellow_home));
|
|
|
+ CommonUtil.textAarrySpanForStyle(tv_rank_visit_right,
|
|
|
+ "第一名:" + "__"
|
|
|
+ + "拜访:" + "__"
|
|
|
+ + "个/" + "__" + "次"
|
|
|
+ , new String[]{ "__"},
|
|
|
+ ct.getResources().getColor(R.color.yellow_home));
|
|
|
}
|
|
|
|
|
|
if (profits != null&&!profits.isEmpty()) {
|
|
|
@@ -373,12 +396,18 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
profits.getJSONArray(1).getString(1);//第一名
|
|
|
profits.getJSONArray(1).getIntValue(2);//第一名 元
|
|
|
} else {
|
|
|
- tv_rank_rirun_left.setText("__" + "元/第"+"__"+"名");
|
|
|
- tv_rank_rirun_right.setText("第一名:" + profits.getJSONArray(0).getString(1)
|
|
|
- + "金额:" + profits.getJSONArray(0).getIntValue(0) + "元");
|
|
|
- profits.getJSONArray(0).getIntValue(0);//第一名 元
|
|
|
- profits.getJSONArray(0).getString(1);//第一名
|
|
|
- profits.getJSONArray(0).getIntValue(2);//第一名 元
|
|
|
+ CommonUtil.textAarrySpanForStyle(tv_rank_rirun_left,
|
|
|
+ profits.getJSONArray(0).getIntValue(0)+ " 元/第"+1+"名",
|
|
|
+ new String[]{String.valueOf(profits.getJSONArray(0).getIntValue(0)
|
|
|
+ ),"1"},ct.getResources().getColor(R.color.yellow_home));
|
|
|
+ CommonUtil.textAarrySpanForStyle(tv_rank_rirun_right,
|
|
|
+ "第一名:" + profits.getJSONArray(0).getString(1)
|
|
|
+ + " 金额:" + profits.getJSONArray(0).getIntValue(0) + " 元"
|
|
|
+ , new String[]{
|
|
|
+ profits.getJSONArray(0).getString(1),
|
|
|
+ String.valueOf(profits.getJSONArray(0).getIntValue(0))
|
|
|
+ }, ct.getResources().getColor(R.color.yellow_home));
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -392,12 +421,16 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
receivables.getJSONArray(1).getString(1);//第一名
|
|
|
receivables.getJSONArray(1).getIntValue(2);//第一名 元
|
|
|
} else {
|
|
|
- tv_rank_income_left.setText(receivables.getJSONArray(0).getIntValue(0) + "元/第1名");
|
|
|
- tv_rank_income_right.setText("第一名:" + receivables.getJSONArray(0).getString(1)
|
|
|
- + "超期应收:" + receivables.getJSONArray(0).getIntValue(0) + "元");
|
|
|
- receivables.getJSONArray(0).getIntValue(0);//第一名 元
|
|
|
- receivables.getJSONArray(0).getString(1);//第一名
|
|
|
- receivables.getJSONArray(0).getIntValue(2);//第一名 元
|
|
|
+ CommonUtil.textSpanForStyle(tv_rank_income_left,
|
|
|
+ receivables.getJSONArray(0).getIntValue(0) + " 元/第1名"
|
|
|
+ , String.valueOf(receivables.getJSONArray(0).getIntValue(0)),
|
|
|
+ ct.getResources().getColor(R.color.yellow_home));
|
|
|
+ CommonUtil.textAarrySpanForStyle(tv_rank_income_right,
|
|
|
+ "第一名:" + receivables.getJSONArray(0).getString(1)
|
|
|
+ + " 超期应收:" + receivables.getJSONArray(0).getIntValue(0) + " 元"
|
|
|
+ , new String[]{receivables.getJSONArray(0).getString(1),
|
|
|
+ String.valueOf(receivables.getJSONArray(0).getIntValue(0))},
|
|
|
+ ct.getResources().getColor(R.color.yellow_home));
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
@@ -405,16 +438,26 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
progressDialog.dismiss();
|
|
|
Log.i(TAG, "handleMessage SalesKit:" + msg.getData().getString("result"));
|
|
|
root = JSON.parseObject(msg.getData().getString("result")).getJSONObject("datas");
|
|
|
- tv_sale_chuhuo.setText(root.getIntValue("saleamount") + "元出货单金额");
|
|
|
- tv_sale_customer.setText(root.getIntValue("customercount") + "个新增客户");
|
|
|
- tv_sale_linkman.setText(root.getIntValue("contactcount") + "个新增联系人");
|
|
|
- tv_sale_order.setText(root.getIntValue("salecount") + "个新增销售单");
|
|
|
- tv_sale_businessChange.setText(root.getIntValue("nichechangecount") + "个新增商机变更");
|
|
|
- tv_sale_business.setText(root.getIntValue("nichecount") + "个新增商机数");
|
|
|
- tv_sale_huikuan.setText(root.getIntValue("backamount") + "元回款");
|
|
|
-
|
|
|
- tv_sale_visit.setText(root.getJSONArray("visit").getIntValue(0) + "个/" + root.getJSONArray("visit").getIntValue(1) + "次");
|
|
|
-
|
|
|
+
|
|
|
+ CommonUtil.textAarrySpanForStyle(tv_sale_chuhuo
|
|
|
+ ,root.getIntValue("saleamount") + " 元出货单金额",
|
|
|
+ new String[]{String.valueOf(root.getIntValue("saleamount"))},
|
|
|
+ ct.getResources().getColor(R.color.yellow_home));
|
|
|
+ CommonUtil.textAarrySpanForStyle(tv_sale_customer,root.getIntValue("customercount") + " 个新增客户"
|
|
|
+ ,new String[]{String.valueOf(root.getIntValue("customercount"))},ct.getResources().getColor(R.color.yellow_home));
|
|
|
+ CommonUtil.textAarrySpanForStyle( tv_sale_linkman,root.getIntValue("contactcount") + " 个新增联系人"
|
|
|
+ ,new String[]{String.valueOf(root.getIntValue("contactcount"))},ct.getResources().getColor(R.color.yellow_home));
|
|
|
+ CommonUtil.textAarrySpanForStyle( tv_sale_order,root.getIntValue("salecount") + " 个新增销售单"
|
|
|
+ ,new String[]{String.valueOf(root.getIntValue("salecount") )},ct.getResources().getColor(R.color.yellow_home));
|
|
|
+ CommonUtil.textAarrySpanForStyle(tv_sale_businessChange,root.getIntValue("nichechangecount") + " 个新增商机变更"
|
|
|
+ ,new String[]{String.valueOf(root.getIntValue("nichechangecount"))},ct.getResources().getColor(R.color.yellow_home));
|
|
|
+ CommonUtil.textAarrySpanForStyle(tv_sale_business,root.getIntValue("nichecount") + " 个新增商机数"
|
|
|
+ ,new String[]{String.valueOf(root.getIntValue("nichecount"))},ct.getResources().getColor(R.color.yellow_home));
|
|
|
+ CommonUtil.textAarrySpanForStyle(tv_sale_huikuan, root.getIntValue("backamount") + " 元回款"
|
|
|
+ , new String[]{String.valueOf(root.getIntValue("backamount"))}, ct.getResources().getColor(R.color.yellow_home));
|
|
|
+ CommonUtil.textAarrySpanForStyle(tv_sale_visit, root.getJSONArray("visit").getIntValue(0) + " 个/" + root.getJSONArray("visit").getIntValue(1) + " 次"
|
|
|
+ , new String[]{String.valueOf(root.getJSONArray("visit").getIntValue(0)),
|
|
|
+ String.valueOf(root.getJSONArray("visit").getIntValue(1))}, ct.getResources().getColor(R.color.yellow_home));
|
|
|
break;
|
|
|
case INIT_Targets:
|
|
|
progressDialog.dismiss();
|
|
|
@@ -425,6 +468,8 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
tv_em_name.setText(target.getString("EM_CODE"));
|
|
|
tv_em_name.setText(target.getString("CUSTOMERCOUNT"));
|
|
|
tv_em_depart.setText(target.getString("BFCOUNT"));
|
|
|
+
|
|
|
+
|
|
|
tv_em_plan.setText(target.getIntValue("RANK")+"");
|
|
|
tv_em_sale.setText(target.getIntValue("FIRSTBFCOUNT")+"");
|
|
|
tv_em_planrirun.setText(target.getIntValue("TOPCOUNT")+"");
|
|
|
@@ -443,8 +488,12 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
progressDialog.dismiss();
|
|
|
Log.i(TAG, "handleMessage InactionCusts:" + msg.getData().getString("result"));
|
|
|
root = JSON.parseObject(msg.getData().getString("result")).getJSONObject("datas");
|
|
|
- root.getIntValue("customernum");
|
|
|
- tv_cu_count.setText(root.getIntValue("customernum")+"个");
|
|
|
+
|
|
|
+ CommonUtil.textAarrySpanForStyle(tv_cu_count,
|
|
|
+ root.getIntValue("customernum") + " 个"
|
|
|
+ , new String[]{String.valueOf(root.getIntValue("customernum"))},
|
|
|
+ ct.getResources().getColor(R.color.yellow_home));
|
|
|
+
|
|
|
break;
|
|
|
case Constants.APP_SOCKETIMEOUTEXCEPTION:
|
|
|
Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
|