|
|
@@ -193,6 +193,7 @@ public class CustomerListActivity extends BaseActivity implements View.OnClickLi
|
|
|
switch (v.getId()) {
|
|
|
case R.id.tv_count_unend:
|
|
|
type = 0;
|
|
|
+ jsonArray.clear();
|
|
|
// Crouton.makeText(this,"切换成功", 0xffff8888, 10000).show();
|
|
|
page = 1;
|
|
|
sendHttpResquest(Constants.HTTP_SUCCESS_INIT, kind, page, 0, "");
|
|
|
@@ -200,10 +201,12 @@ public class CustomerListActivity extends BaseActivity implements View.OnClickLi
|
|
|
case R.id.tv_count_end:
|
|
|
type = 1;
|
|
|
page = 1;
|
|
|
+ jsonArray.clear();
|
|
|
// Crouton.makeText(this,"切换成功", Style.CONFIRM).show();
|
|
|
sendHttpResquest(Constants.HTTP_SUCCESS_INIT, kind, page, 0, "");
|
|
|
break;
|
|
|
case R.id.tv_count_total:
|
|
|
+ jsonArray.clear();
|
|
|
type = 2;
|
|
|
page = 1;
|
|
|
// Crouton.makeText(this,"切换成功", Style.CONFIRM).show();
|
|
|
@@ -386,9 +389,18 @@ public class CustomerListActivity extends BaseActivity implements View.OnClickLi
|
|
|
JSONArray json1 = JSON.parseObject(msg.getData().getString("result")).getJSONArray("customers1");
|
|
|
if (json0 != null && json1 != null) {
|
|
|
if (page == 1){
|
|
|
- unEndSize = json0.getJSONObject(0).getIntValue("count");
|
|
|
- endSize = json1.getJSONObject(0).getIntValue("count");
|
|
|
- totalSize = json.getJSONObject(0).getIntValue("count");
|
|
|
+ if (json0.size()>0){
|
|
|
+ unEndSize = json0.getJSONObject(0).getIntValue("count");
|
|
|
+ }
|
|
|
+ if (json.size()>0){
|
|
|
+ totalSize = json.getJSONObject(0).getIntValue("count");
|
|
|
+ }
|
|
|
+ if (json1.size()>0){
|
|
|
+ endSize = json1.getJSONObject(0).getIntValue("count");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
CommonUtil.textSpanForStyle(tv_count_unend, unEndSize + "\n未成交", String.valueOf(unEndSize),
|
|
|
ct.getResources().getColor(R.color.yellow_home));
|