Browse Source

MPAndroidChart优化;日期控件优化;

Arison 9 years ago
parent
commit
bfa0fe1df8

+ 2 - 2
WeiChat/src/main/AndroidManifest.xml

@@ -2,8 +2,8 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     package="com.xzjmyk.pm.activity"
-    android:versionCode="49"
-    android:versionName="4.9">
+    android:versionCode="50"
+    android:versionName="5.0">
 
     <uses-sdk
         android:minSdkVersion="11"

+ 10 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/BusinessAddActivity.java

@@ -76,6 +76,7 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
 
 
     private List<String> lists = new ArrayList<String>();
+    private int et_business_enterCode;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -295,11 +296,17 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
         String bc_remark = getEditText(et_business_remark);//备注
         String bc_position = getEditText(et_company_position); //职位
         String bc_type = getEditText(et_business_type);  //商机类型
+        String enterCode=null;
+        if (et_business_enterCode==0){
+            enterCode="";
+        }else{
+            enterCode=CommonUtil.getSharedPreferences(ct,"erp_username");
+        }
         String formStore =
                 "{\n" +
                         "\"bc_code\":\"" + et_business_no.getText().toString() + "\",\n" +   //商机名称
                         "\"bc_status\":\"" + "在录入" + "\",\n" +
-                        "\"bc_domancode\":\"" + CommonUtil.getSharedPreferences(ct, "erp_username") + "\",\n" +
+                        "\"bc_domancode\":\"" + enterCode+ "\",\n" +
                         "\"bc_statuscode\":\"" + "ENTERING" + "\",\n" +
                         "\"bc_description\":\"" + name + "\",\n" +   //商机名称
                         "\"bc_from\":\"" + from + "\",\n" +          //商机来源
@@ -419,8 +426,10 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
                                     et_business_enterMan.setClickable(false);
                                     et_business_enterMan.setEnabled(false);
                                     et_business_enterMan.setText("");
+                                    et_business_enterCode=0;
                                 }else{
                                     //跟进人可编辑
+                                    et_business_enterCode=1;
                                     et_business_enterMan.setEnabled(true);
                                     et_business_enterMan.setClickable(true);
                                     et_business_enterMan.setText(MyApplication.getInstance().mLoginUser.getNickName());

+ 1 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/BusinessDetailActivty.java

@@ -466,7 +466,7 @@ public class BusinessDetailActivty extends BaseActivity {
         Map<String, Object> params = new HashMap<>();
         params.put("bc_code", bc_code);
         params.put("bc_doman", bc_doman);
-        params.put("bc_domancode", bc_code);//CommonUtil.getSharedPreferences(ct, "erp_username")
+        params.put("bc_domancode", CommonUtil.getSharedPreferences(ct, "erp_username"));//
         LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");

+ 17 - 3
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/CustomerDetailActivity.java

@@ -21,6 +21,7 @@ import com.xzjmyk.pm.activity.ui.base.BaseActivity;
 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.erp.util.StringUtils;
 import com.xzjmyk.pm.activity.view.steps.StepsView;
 
 import java.util.HashMap;
@@ -117,10 +118,10 @@ public class CustomerDetailActivity extends BaseActivity {
         String code = getIntent().getStringExtra("code");
         sendHttpResquest(Constants.HTTP_SUCCESS_INIT, code);
         // sendAdd(Constants.HTTP_SUCCESS_INIT);
-        mStepsView.setCompletedPosition(5 % labels.length)
+        mStepsView.setCompletedPosition(0 % labels.length)
                 .setLabels(labels)
                 .setBarColorIndicator(
-                        ct.getResources().getColor(R.color.material_blue_grey_800))
+                        ct.getResources().getColor(R.color.light_gray))
                 .setProgressColorIndicator(ct.getResources().getColor(R.color.orange))
                 .setLabelColorIndicator(ct.getResources().getColor(R.color.orange))
                 .drawView();
@@ -169,7 +170,20 @@ public class CustomerDetailActivity extends BaseActivity {
                         tv_mobile.setText(jsonArray.getString("cu_mobile"));
                         tv_position.setText(jsonArray.getString("cu_degree"));
                         tv_name.setText(jsonArray.getString("cu_name"));
-                        
+                        String steps= jsonArray.getString("cu_nichestep");
+                        for (int i=0;i<labels.length;i++){
+                            if (!StringUtils.isEmpty(steps)){
+                                if (labels[i].equals(steps)){
+                                    mStepsView.setCompletedPosition(i% labels.length)
+                                            .setLabels(labels)
+                                            .setBarColorIndicator(
+                                                    ct.getResources().getColor(R.color.light_gray))
+                                            .setProgressColorIndicator(ct.getResources().getColor(R.color.orange))
+                                            .setLabelColorIndicator(ct.getResources().getColor(R.color.orange))
+                                            .drawView();
+                                }
+                            }
+                        }
                         tv_visitTimes.setText(jsonArray.getString("bfcount"));
                         tv_modifyRecord.setText(jsonArray.getString("cu_remark"));
                         tv_feilv.setText(jsonArray.getString("cu_taxrate"));

+ 1 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/CustomerListActivity.java

@@ -260,7 +260,7 @@ public class CustomerListActivity extends BaseActivity implements View.OnClickLi
             holder.tv_step.setText(mdata.getJSONObject(position).getString("cu_nichestep"));
             holder.tv_date.setText(mdata.getJSONObject(position).getString("cu_lastdate"));
             holder.tv_datetv.setText("最后跟进时间:");
-            holder.tv_leader.setText(mdata.getJSONObject(position).getString("cu_contact"));
+            holder.tv_leader.setText(mdata.getJSONObject(position).getString("cu_sellername"));//cu_contact
             holder.tv_code.setText(mdata.getJSONObject(position).getString("cu_code"));
             if (type == 0) {
                 holder.tv_state.setText("未成交");