|
@@ -278,7 +278,9 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
mChart.getAxisRight().setEnabled(false);
|
|
mChart.getAxisRight().setEnabled(false);
|
|
|
mChart.getAxisLeft().setEnabled(true);
|
|
mChart.getAxisLeft().setEnabled(true);
|
|
|
mChart.setMaxVisibleValueCount(10);
|
|
mChart.setMaxVisibleValueCount(10);
|
|
|
-
|
|
|
|
|
|
|
+ mChart.setPinchZoom(false);
|
|
|
|
|
+ mChart.setDoubleTapToZoomEnabled(false);
|
|
|
|
|
+
|
|
|
ArrayList<BarEntry> yVals1 = new ArrayList<BarEntry>();
|
|
ArrayList<BarEntry> yVals1 = new ArrayList<BarEntry>();
|
|
|
ArrayList<String> xVals = new ArrayList<String>();
|
|
ArrayList<String> xVals = new ArrayList<String>();
|
|
|
BarDataSet set1 = new BarDataSet(yVals1, "日销售额");
|
|
BarDataSet set1 = new BarDataSet(yVals1, "日销售额");
|
|
@@ -383,7 +385,8 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
|
|
|
|
|
|
|
|
|
|
protected String[] mMonths = new String[]{
|
|
protected String[] mMonths = new String[]{
|
|
|
- "实际销售额", "计划销售额", "实际毛利润", "计划毛利润", " ", " ", " ", " ", " ", " ", " ", ""
|
|
|
|
|
|
|
+ "实际销售额", "计划销售额", "实际毛利润", "计划毛利润"
|
|
|
|
|
+ // , " ", " ", " ", " ", " ", " ", " ", ""
|
|
|
};
|
|
};
|
|
|
protected String[] sales = new String[]{
|
|
protected String[] sales = new String[]{
|
|
|
"客户", "联系人", "商机数", "商机变更", "销售订单", "拜访客户数", "拜访次数", "Aug", "Sep", "Okt", "Nov", "Dec"
|
|
"客户", "联系人", "商机数", "商机变更", "销售订单", "拜访客户数", "拜访次数", "Aug", "Sep", "Okt", "Nov", "Dec"
|
|
@@ -392,7 +395,7 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
private void setData(int count, float[] ydata) {
|
|
private void setData(int count, float[] ydata) {
|
|
|
ArrayList<String> xVals = new ArrayList<String>();
|
|
ArrayList<String> xVals = new ArrayList<String>();
|
|
|
for (int i = 0; i < count; i++) {
|
|
for (int i = 0; i < count; i++) {
|
|
|
- xVals.add(mMonths[i % 12]);
|
|
|
|
|
|
|
+ xVals.add(mMonths[i % 4]);
|
|
|
}
|
|
}
|
|
|
ArrayList<BarEntry> yVals1 = new ArrayList<BarEntry>();
|
|
ArrayList<BarEntry> yVals1 = new ArrayList<BarEntry>();
|
|
|
for (int i = 0; i < count; i++) {
|
|
for (int i = 0; i < count; i++) {
|
|
@@ -441,8 +444,8 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
data.setDrawValues(true);
|
|
data.setDrawValues(true);
|
|
|
mChart.setData(data);
|
|
mChart.setData(data);
|
|
|
/**@注释:清空任何缩放 */
|
|
/**@注释:清空任何缩放 */
|
|
|
- mChart.zoom(0, 0, 0, 0);
|
|
|
|
|
- mChart.zoom(ydata.length / 4.2f, 0, 0, 0);
|
|
|
|
|
|
|
+// mChart.zoom(0, 0, 0, 0);
|
|
|
|
|
+// mChart.zoom(ydata.length / 4.2f, 0, 0, 0);
|
|
|
mChart.invalidate();
|
|
mChart.invalidate();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -814,7 +817,7 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
JSONObject target = root.getJSONArray("target").getJSONObject(0);
|
|
JSONObject target = root.getJSONArray("target").getJSONObject(0);
|
|
|
if (date.equals(DateFormatUtil.getStrDate4Date(new Date(), "yyyyMM")))
|
|
if (date.equals(DateFormatUtil.getStrDate4Date(new Date(), "yyyyMM")))
|
|
|
tv_em_a.setText(target.getString("CUSTOMERCOUNT"));
|
|
tv_em_a.setText(target.getString("CUSTOMERCOUNT"));
|
|
|
- float[] ydata = {0, 0, 0, 0, 0, 0, 0};
|
|
|
|
|
|
|
+ float[] ydata = {0, 0, 0, 0};
|
|
|
ydata[1] = target.getIntValue("RANK");
|
|
ydata[1] = target.getIntValue("RANK");
|
|
|
float firstbfcount = target.getFloatValue("FIRSTBFCOUNT");
|
|
float firstbfcount = target.getFloatValue("FIRSTBFCOUNT");
|
|
|
BigDecimal bigDecimal = new BigDecimal(firstbfcount);
|
|
BigDecimal bigDecimal = new BigDecimal(firstbfcount);
|
|
@@ -822,10 +825,10 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
|
|
|
ydata[3] = target.getIntValue("TOPCOUNT");
|
|
ydata[3] = target.getIntValue("TOPCOUNT");
|
|
|
bigDecimal = new BigDecimal(target.getFloatValue("ACTUALPROFIT"));
|
|
bigDecimal = new BigDecimal(target.getFloatValue("ACTUALPROFIT"));
|
|
|
ydata[2] = bigDecimal.setScale(2,BigDecimal.ROUND_HALF_UP).floatValue();
|
|
ydata[2] = bigDecimal.setScale(2,BigDecimal.ROUND_HALF_UP).floatValue();
|
|
|
- setData(7, ydata);
|
|
|
|
|
|
|
+ setData(4, ydata);
|
|
|
} else {
|
|
} else {
|
|
|
- float[] ydata = {0, 0, 0, 0, 0, 0, 0};
|
|
|
|
|
- setData(7, ydata);
|
|
|
|
|
|
|
+ float[] ydata = {0, 0, 0, 0};
|
|
|
|
|
+ setData(4, ydata);
|
|
|
}
|
|
}
|
|
|
if (!date.equals(DateFormatUtil.getStrDate4Date(new Date(), "yyyyMM"))) return;
|
|
if (!date.equals(DateFormatUtil.getStrDate4Date(new Date(), "yyyyMM"))) return;
|
|
|
subs = root.containsKey("subs") ? root.getJSONArray("subs") : new JSONArray();
|
|
subs = root.containsKey("subs") ? root.getJSONArray("subs") : new JSONArray();
|