Browse Source

修改bug

Bitliker 9 years ago
parent
commit
aa436e656e
26 changed files with 398 additions and 306 deletions
  1. 4 0
      WeiChat/build.gradle
  2. 3 2
      WeiChat/src/main/AndroidManifest.xml
  3. 0 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/MyApplication.java
  4. 2 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/ErpMenActivity.java
  5. 47 44
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/BusinessDetailInfoActivity.java
  6. 78 40
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/TaskAddActivity.java
  7. 44 32
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/VisitReportAddActivity.java
  8. 41 33
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/VisitReportPlanActivity.java
  9. 2 4
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/AddMeetingActivity.java
  10. 3 3
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/AlarmReceiver.java
  11. 9 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/AlarmaActivity.java
  12. 12 14
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/MeetDetailsActivity.java
  13. 3 5
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/OAActivity.java
  14. 1 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/OARegisterActivity.java
  15. 16 5
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/UserSelectActivity.java
  16. 6 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/fragment/OutofficeFragment.java
  17. 4 3
      WeiChat/src/main/java/com/xzjmyk/pm/activity/util/BaiduMapUtil.java
  18. 0 6
      WeiChat/src/main/java/com/xzjmyk/pm/activity/util/TimeUtils.java
  19. 46 26
      WeiChat/src/main/java/com/xzjmyk/pm/activity/view/CalendarView.java
  20. 0 8
      WeiChat/src/main/res/drawable/bg_btn_pass.xml
  21. 3 0
      WeiChat/src/main/res/layout/activity_meet_details.xml
  22. 1 1
      WeiChat/src/main/res/layout/activity_meet_select.xml
  23. 0 7
      WeiChat/src/main/res/layout/activity_oa.xml
  24. 13 19
      WeiChat/src/main/res/layout/activity_task_add.xml
  25. 24 20
      WeiChat/src/main/res/layout/activity_visit_report_add.xml
  26. 36 31
      WeiChat/src/main/res/layout/activity_visit_report_plan.xml

+ 4 - 0
WeiChat/build.gradle

@@ -34,6 +34,10 @@ android {
         }
         }
         debug {
         debug {
             signingConfig signingConfigs.config
             signingConfig signingConfigs.config
+            debuggable true
+            jniDebuggable true
+            renderscriptDebuggable true
+            minifyEnabled true
         }
         }
     }
     }
     productFlavors {
     productFlavors {

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

@@ -403,7 +403,8 @@
         <activity android:name=".ui.circle.PhoneSelectActivity" />
         <activity android:name=".ui.circle.PhoneSelectActivity" />
         <activity android:name=".ui.erp.activity.crm.ClientActivity" />
         <activity android:name=".ui.erp.activity.crm.ClientActivity" />
         <activity android:name=".ui.erp.activity.oa.SigninActivity" />
         <activity android:name=".ui.erp.activity.oa.SigninActivity" />
-        <activity android:name=".ui.erp.activity.oa.AddMeetingActivity" />
+        <activity android:name=".ui.erp.activity.oa.AddMeetingActivity"
+            android:label="新增会议"/>
         <activity
         <activity
             android:name=".ui.erp.activity.oa.OAActivity"
             android:name=".ui.erp.activity.oa.OAActivity"
             android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
             android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
@@ -485,7 +486,7 @@
         <activity android:name=".ui.erp.activity.crm.ContactManAddActivity"></activity>
         <activity android:name=".ui.erp.activity.crm.ContactManAddActivity"></activity>
         <activity android:name=".ui.erp.activity.oa.SaveMeetActivity" />
         <activity android:name=".ui.erp.activity.oa.SaveMeetActivity" />
         <activity
         <activity
-            android:name=".ui.erp.activity.oa.MeetSelectActivity"
+            android:name=".ui.erp.activity.oa.UserSelectActivity"
             android:label="选择与会人员" />
             android:label="选择与会人员" />
     </application>
     </application>
 
 

+ 0 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/MyApplication.java

@@ -145,7 +145,6 @@ public class MyApplication extends Application {
             mNetWorkObservable.unregisterObserver(observer);
             mNetWorkObservable.unregisterObserver(observer);
         }
         }
     }
     }
-
     /* 文件缓存的目录 */
     /* 文件缓存的目录 */
     public String mAppDir;
     public String mAppDir;
     public String mPicturesDir;
     public String mPicturesDir;

+ 2 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/ErpMenActivity.java

@@ -35,10 +35,11 @@ public class ErpMenActivity extends BaseActivity {
         setContentView(R.layout.fragment_tool_layout);
         setContentView(R.layout.fragment_tool_layout);
         ViewUtils.inject(this);
         ViewUtils.inject(this);
         ct = this;
         ct = this;
+
         initData();
         initData();
     }
     }
     private void initData() {
     private void initData() {
-        getSupportActionBar().setTitle("工作");
+        getSupportActionBar().setTitle("考勤单据");
         menus = new ArrayList<String>();
         menus = new ArrayList<String>();
         menus.add("请假单");
         menus.add("请假单");
         menus.add("出差单");
         menus.add("出差单");

+ 47 - 44
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/BusinessDetailInfoActivity.java

@@ -92,16 +92,17 @@ public class BusinessDetailInfoActivity extends BaseActivity implements View.OnC
     private int type = 0;
     private int type = 0;
     private String formCondition;
     private String formCondition;
     private String gridCondition;
     private String gridCondition;
+
     private void initView() {
     private void initView() {
         ViewUtils.inject(this);
         ViewUtils.inject(this);
         getSupportActionBar().setTitle("商机详情");
         getSupportActionBar().setTitle("商机详情");
         Intent intent = getIntent();
         Intent intent = getIntent();
         if (intent != null) {
         if (intent != null) {
             type = intent.getIntExtra("type", 0);
             type = intent.getIntExtra("type", 0);
-            formCondition=intent.getStringExtra("formCondition");
-            gridCondition=intent.getStringExtra("gridCondition");
-            Log.i(TAG, "initView:" + formCondition );
-            Log.i(TAG, "initView:" +  gridCondition );
+            formCondition = intent.getStringExtra("formCondition");
+            gridCondition = intent.getStringExtra("gridCondition");
+            Log.i(TAG, "initView:" + formCondition);
+            Log.i(TAG, "initView:" + gridCondition);
         }
         }
         switch (type) {
         switch (type) {
             case 0:
             case 0:
@@ -131,11 +132,9 @@ public class BusinessDetailInfoActivity extends BaseActivity implements View.OnC
         bt_qiang.setOnClickListener(this);
         bt_qiang.setOnClickListener(this);
         bt_fenpei.setOnClickListener(this);
         bt_fenpei.setOnClickListener(this);
     }
     }
-
     private void initData() {
     private void initData() {
-        sendHttpResquest(Constants.HTTP_SUCCESS_INIT,formCondition,gridCondition);
+        sendHttpResquest(Constants.HTTP_SUCCESS_INIT, formCondition, gridCondition);
     }
     }
-
     @Override
     @Override
     public void onClick(View v) {
     public void onClick(View v) {
         switch (v.getId()) {
         switch (v.getId()) {
@@ -143,12 +142,16 @@ public class BusinessDetailInfoActivity extends BaseActivity implements View.OnC
                 showPopupWindow(v.findViewById(R.id.bt_manage_go));
                 showPopupWindow(v.findViewById(R.id.bt_manage_go));
                 break;
                 break;
             case R.id.bt_manage_date:
             case R.id.bt_manage_date:
+                Intent intent = new Intent(ct, TaskAddActivity.class);
+                intent.putExtra("type", 1);
+                intent.putExtra("data", bt_code);
+                startActivityForResult(intent, 0x11);
                 break;
                 break;
             case R.id.bt_qiang:
             case R.id.bt_qiang:
-                sendHttpBusinessQiang(BUSINESS_QIANG,bt_code,bt_doman);
+                sendHttpBusinessQiang(BUSINESS_QIANG, bt_code, bt_doman);
                 break;
                 break;
             case R.id.bt_fenpei:
             case R.id.bt_fenpei:
-                startActivityForResult(new Intent(ct, DbfindListActivity.class),1);
+                startActivityForResult(new Intent(ct, DbfindListActivity.class), 1);
                 //sendHttpBusinessQiang(BUSINESS_FENPEI,bt_code,bt_doman);
                 //sendHttpBusinessQiang(BUSINESS_FENPEI,bt_code,bt_doman);
                 break;
                 break;
         }
         }
@@ -176,7 +179,7 @@ public class BusinessDetailInfoActivity extends BaseActivity implements View.OnC
                     position = position + 1;
                     position = position + 1;
                     switch (position) {
                     switch (position) {
                         case 1:
                         case 1:
-                           // ViewUtil.ToastMessage(BusinessDetailInfoActivity.this, "释放");
+                            // ViewUtil.ToastMessage(BusinessDetailInfoActivity.this, "释放");
                             new MaterialDialog.Builder(ct).title("系统提示")
                             new MaterialDialog.Builder(ct).title("系统提示")
                                     .content("确定释放这个线索?")
                                     .content("确定释放这个线索?")
                                     .negativeText("取消")
                                     .negativeText("取消")
@@ -200,13 +203,13 @@ public class BusinessDetailInfoActivity extends BaseActivity implements View.OnC
                                     .putExtra("type", 1)
                                     .putExtra("type", 1)
                                     .putExtra("code", bt_code)
                                     .putExtra("code", bt_code)
                                     .putExtra("process", bt_process)
                                     .putExtra("process", bt_process)
-                            .putExtra("doman",bt_doman));
+                                    .putExtra("doman", bt_doman));
                             break;
                             break;
                         case 3:
                         case 3:
                             startActivity(new Intent(BusinessDetailInfoActivity.this, BusinessLessActivity.class)
                             startActivity(new Intent(BusinessDetailInfoActivity.this, BusinessLessActivity.class)
                                     .putExtra("type", 2)
                                     .putExtra("type", 2)
-                            .putExtra("code", bt_code)
-                            .putExtra("process",bt_process)
+                                    .putExtra("code", bt_code)
+                                    .putExtra("process", bt_process)
                                     .putExtra("doman", bt_doman));
                                     .putExtra("doman", bt_doman));
                             break;
                             break;
                         case 4:
                         case 4:
@@ -215,17 +218,17 @@ public class BusinessDetailInfoActivity extends BaseActivity implements View.OnC
                             break;
                             break;
                         case 5:
                         case 5:
                             startActivity(new Intent(BusinessDetailInfoActivity.this, CustomerAddActivity.class)
                             startActivity(new Intent(BusinessDetailInfoActivity.this, CustomerAddActivity.class)
-                                   );
+                            );
                             break;
                             break;
                         case 6:
                         case 6:
                             startActivity(new Intent(BusinessDetailInfoActivity.this, BusinessSelectCustomerActivity.class)
                             startActivity(new Intent(BusinessDetailInfoActivity.this, BusinessSelectCustomerActivity.class)
-                            .putExtra("code",bt_code));
+                                    .putExtra("code", bt_code));
                             break;
                             break;
                     }
                     }
                 }
                 }
             });
             });
 
 
-            popupWindow = new PopupWindow(view, parent.getWidth(), ViewUtil.setListViewHeightBasedOnChildren1(plist)+DisplayUtil.dip2px(this,10));
+            popupWindow = new PopupWindow(view, parent.getWidth(), ViewUtil.setListViewHeightBasedOnChildren1(plist) + DisplayUtil.dip2px(this, 10));
         }
         }
         // 使其聚集
         // 使其聚集
         popupWindow.setFocusable(true);
         popupWindow.setFocusable(true);
@@ -267,17 +270,17 @@ public class BusinessDetailInfoActivity extends BaseActivity implements View.OnC
         return list;
         return list;
     }
     }
 
 
-    private final  int BUSINESS_QIANG=2;
-    private final  int BUSINESS_FENPEI=3;
-    private final  int BUSINESS_RELEASE=4;
+    private final int BUSINESS_QIANG = 2;
+    private final int BUSINESS_FENPEI = 3;
+    private final int BUSINESS_RELEASE = 4;
 
 
     private String bt_doman;//跟进人
     private String bt_doman;//跟进人
     private String bt_code;//编号
     private String bt_code;//编号
     private String bt_process;//商机阶段
     private String bt_process;//商机阶段
-    private Handler mHandler=new Handler(){
+    private Handler mHandler = new Handler() {
         @Override
         @Override
         public void handleMessage(Message msg) {
         public void handleMessage(Message msg) {
-            switch (msg.what){
+            switch (msg.what) {
                 case Constants.HTTP_SUCCESS_INIT:
                 case Constants.HTTP_SUCCESS_INIT:
                     progressDialog.dismiss();
                     progressDialog.dismiss();
 //                    "bc_code":"2016050004",
 //                    "bc_code":"2016050004",
@@ -289,8 +292,8 @@ public class BusinessDetailInfoActivity extends BaseActivity implements View.OnC
 //                        "bc_doman":"黄耀鹏",
 //                        "bc_doman":"黄耀鹏",
 //                        "bc_remark":""
 //                        "bc_remark":""
                     Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
                     Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
-                    JSONObject root= JSON.parseObject(msg.getData().getString("result")).getJSONObject("panelData");
-                    if (root!=null) {
+                    JSONObject root = JSON.parseObject(msg.getData().getString("result")).getJSONObject("panelData");
+                    if (root != null) {
                         bc_from.setText(root.getString("bc_from"));
                         bc_from.setText(root.getString("bc_from"));
                         bc_name.setText(root.getString("bc_nichehouse"));
                         bc_name.setText(root.getString("bc_nichehouse"));
                         bc_phone.setText("无");
                         bc_phone.setText("无");
@@ -306,10 +309,10 @@ public class BusinessDetailInfoActivity extends BaseActivity implements View.OnC
                     break;
                     break;
                 case BUSINESS_QIANG:
                 case BUSINESS_QIANG:
                     Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
                     Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
-                   // ViewUtil.ToastMessage(ct, msg.getData().getString("result"));
+                    // ViewUtil.ToastMessage(ct, msg.getData().getString("result"));
                     progressDialog.dismiss();
                     progressDialog.dismiss();
                     ToastMessage("抢商机成功!");
                     ToastMessage("抢商机成功!");
-                    startActivity(new Intent(ct,BusinessActivity.class));
+                    startActivity(new Intent(ct, BusinessActivity.class));
                     break;
                     break;
                 case BUSINESS_FENPEI:
                 case BUSINESS_FENPEI:
                     progressDialog.dismiss();
                     progressDialog.dismiss();
@@ -330,41 +333,41 @@ public class BusinessDetailInfoActivity extends BaseActivity implements View.OnC
         }
         }
     };
     };
 
 
-    private void sendHttpResquest(int what,String formCondition,String gridCondition){
+    private void sendHttpResquest(int what, String formCondition, String gridCondition) {
         progressDialog.show();
         progressDialog.show();
-        String url= Constants.getAppBaseUrl(ct)+"mobile/common/getPanel.action";
-        Map<String,Object> params=new HashMap<>();
+        String url = Constants.getAppBaseUrl(ct) + "mobile/common/getPanel.action";
+        Map<String, Object> params = new HashMap<>();
         params.put("caller", "BusinessChance");
         params.put("caller", "BusinessChance");
         params.put("formCondition", formCondition);
         params.put("formCondition", formCondition);
         params.put("gridCondition", gridCondition);
         params.put("gridCondition", gridCondition);
-        LinkedHashMap<String , Object> headers=new LinkedHashMap<>();
+        LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
         ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
     }
     }
 
 
-    private void sendHttpBusinessQiang(int what,String bc_code,String bc_doman){
+    private void sendHttpBusinessQiang(int what, String bc_code, String bc_doman) {
         progressDialog.show();
         progressDialog.show();
-        String url= Constants.getAppBaseUrl(ct)+"mobile/crm/updateBusinessChanceDoman.action";
-        Map<String,Object> params=new HashMap<>();
+        String url = Constants.getAppBaseUrl(ct) + "mobile/crm/updateBusinessChanceDoman.action";
+        Map<String, Object> params = new HashMap<>();
         params.put("bc_code", bc_code);
         params.put("bc_code", bc_code);
         params.put("bc_doman", bc_doman);
         params.put("bc_doman", bc_doman);
-        params.put("bc_domancode",CommonUtil.getSharedPreferences(ct,"erp_username"));
-        LinkedHashMap<String , Object> headers=new LinkedHashMap<>();
+        params.put("bc_domancode", CommonUtil.getSharedPreferences(ct, "erp_username"));
+        LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
         ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
     }
     }
 
 
 
 
     /**
     /**
-      * @desc:商机释放
-      * @author:Arison on 2016/7/25
-      */
-    public void sendHttpResquestRelease(int what){
-        String url=Constants.getAppBaseUrl(ct)+"mobile/crm/updateBusinessChanceType.action";
+     * @desc:商机释放
+     * @author:Arison on 2016/7/25
+     */
+    public void sendHttpResquestRelease(int what) {
+        String url = Constants.getAppBaseUrl(ct) + "mobile/crm/updateBusinessChanceType.action";
         progressDialog.show();
         progressDialog.show();
-        Map<String,Object> params=new HashMap<>();
+        Map<String, Object> params = new HashMap<>();
         params.put("bc_code", bt_code);
         params.put("bc_code", bt_code);
-        LinkedHashMap<String , Object> headers=new LinkedHashMap<>();
+        LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
         ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
 
 
@@ -372,14 +375,14 @@ public class BusinessDetailInfoActivity extends BaseActivity implements View.OnC
 
 
     @Override
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-        switch (requestCode){
+        switch (requestCode) {
             case 1:
             case 1:
                 if (data == null) {
                 if (data == null) {
                     return;
                     return;
                 }
                 }
                 bt_doman = data.getStringExtra("en_name");
                 bt_doman = data.getStringExtra("en_name");
-                sendHttpBusinessQiang(BUSINESS_FENPEI,bt_code,bt_doman);
-            break;
+                sendHttpBusinessQiang(BUSINESS_FENPEI, bt_code, bt_doman);
+                break;
         }
         }
         super.onActivityResult(requestCode, resultCode, data);
         super.onActivityResult(requestCode, resultCode, data);
     }
     }

+ 78 - 40
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/TaskAddActivity.java

@@ -13,12 +13,14 @@ import android.widget.TextView;
 
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSON;
 import com.lidroid.xutils.ViewUtils;
 import com.lidroid.xutils.ViewUtils;
-import com.lidroid.xutils.view.ViewInjectInfo;
 import com.lidroid.xutils.view.annotation.ViewInject;
 import com.lidroid.xutils.view.annotation.ViewInject;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.R;
+import com.xzjmyk.pm.activity.bean.oa.MeetUserEntity;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
+import com.xzjmyk.pm.activity.ui.erp.activity.oa.UserSelectActivity;
 import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
 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.Constants;
+import com.xzjmyk.pm.activity.ui.erp.util.StringUtils;
 import com.xzjmyk.pm.activity.ui.erp.util.ViewUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.ViewUtil;
 import com.xzjmyk.pm.activity.view.wheel.DatePicker;
 import com.xzjmyk.pm.activity.view.wheel.DatePicker;
 import com.xzjmyk.pm.activity.view.wheel.OptionPicker;
 import com.xzjmyk.pm.activity.view.wheel.OptionPicker;
@@ -29,7 +31,7 @@ import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Map;
 
 
 public class TaskAddActivity extends BaseActivity implements View.OnClickListener {
 public class TaskAddActivity extends BaseActivity implements View.OnClickListener {
-    
+
     @ViewInject(R.id.tv_name)
     @ViewInject(R.id.tv_name)
     private EditText tv_name;
     private EditText tv_name;
     @ViewInject(R.id.tv_executive)
     @ViewInject(R.id.tv_executive)
@@ -39,7 +41,7 @@ public class TaskAddActivity extends BaseActivity implements View.OnClickListene
     @ViewInject(R.id.tv_priority)
     @ViewInject(R.id.tv_priority)
     private EditText tv_priority;
     private EditText tv_priority;
     @ViewInject(R.id.tv_type)
     @ViewInject(R.id.tv_type)
-    private EditText tv_type;
+    private TextView tv_type;
     @ViewInject(R.id.tv_customer)
     @ViewInject(R.id.tv_customer)
     private EditText tv_customer;
     private EditText tv_customer;
     @ViewInject(R.id.tv_notice)
     @ViewInject(R.id.tv_notice)
@@ -47,6 +49,7 @@ public class TaskAddActivity extends BaseActivity implements View.OnClickListene
     @ViewInject(R.id.tv_content)
     @ViewInject(R.id.tv_content)
     private EditText tv_content;
     private EditText tv_content;
 
 
+    private String code = null;
 
 
     @Override
     @Override
     protected void onCreate(Bundle savedInstanceState) {
     protected void onCreate(Bundle savedInstanceState) {
@@ -54,41 +57,38 @@ public class TaskAddActivity extends BaseActivity implements View.OnClickListene
         setContentView(R.layout.activity_task_add);
         setContentView(R.layout.activity_task_add);
         initView();
         initView();
         initData();
         initData();
-        initListener();
     }
     }
 
 
     private void initView() {
     private void initView() {
         ViewUtils.inject(this);
         ViewUtils.inject(this);
-        int type=getIntent().getIntExtra("type",0);
-        if (type==0){
+        int type = getIntent().getIntExtra("type", 0);
+        code = getIntent().getStringExtra("data");
+        if (type == 0) {
             getSupportActionBar().setTitle("新增任务");
             getSupportActionBar().setTitle("新增任务");
             tv_type.setText("任务");
             tv_type.setText("任务");
-        }else if (type==1){
+        } else if (type == 1) {
             getSupportActionBar().setTitle("新增日程");
             getSupportActionBar().setTitle("新增日程");
             tv_type.setText("日程");
             tv_type.setText("日程");
         }
         }
         tv_notice.setOnClickListener(this);
         tv_notice.setOnClickListener(this);
         tv_priority.setOnClickListener(this);
         tv_priority.setOnClickListener(this);
         tv_date.setOnClickListener(this);
         tv_date.setOnClickListener(this);
-        
+        findViewById(R.id.sex_erp_rl).setOnClickListener(this);
         tv_date.setKeyListener(null);
         tv_date.setKeyListener(null);
         tv_date.setFocusable(false);
         tv_date.setFocusable(false);
         tv_notice.setKeyListener(null);
         tv_notice.setKeyListener(null);
         tv_notice.setFocusable(false);
         tv_notice.setFocusable(false);
         tv_priority.setKeyListener(null);
         tv_priority.setKeyListener(null);
         tv_priority.setFocusable(false);
         tv_priority.setFocusable(false);
-     
 
 
-    }
-    private void initData() {
-     getCodeByNet();
-    }
 
 
-  
+    }
 
 
-    private void initListener() {
+    private void initData() {
+        getCodeByNet();
 
 
     }
     }
+
     @Override
     @Override
     public boolean onCreateOptionsMenu(Menu menu) {
     public boolean onCreateOptionsMenu(Menu menu) {
         getMenuInflater().inflate(R.menu.main_btn_submit, menu);
         getMenuInflater().inflate(R.menu.main_btn_submit, menu);
@@ -108,33 +108,40 @@ public class TaskAddActivity extends BaseActivity implements View.OnClickListene
         return true;
         return true;
     }
     }
 
 
-    private Handler mHandler=new Handler(){
+    private Handler mHandler = new Handler() {
         @Override
         @Override
         public void handleMessage(Message msg) {
         public void handleMessage(Message msg) {
-            switch (msg.what){
+            switch (msg.what) {
                 case Constants.HTTP_SUCCESS_INIT:
                 case Constants.HTTP_SUCCESS_INIT:
                     progressDialog.dismiss();
                     progressDialog.dismiss();
                     Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
                     Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
                     ToastMessage("保存成功!");
                     ToastMessage("保存成功!");
+                    if (!StringUtils.isEmpty(code))
+                        setCodeByNet(code);
+//                    finish();
                     break;
                     break;
                 case Constants.APP_SOCKETIMEOUTEXCEPTION:
                 case Constants.APP_SOCKETIMEOUTEXCEPTION:
                     progressDialog.dismiss();
                     progressDialog.dismiss();
                     Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
                     Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
                     ToastMessage("保存异常!");
                     ToastMessage("保存异常!");
                     break;
                     break;
+                case endCodeWhat:
+                    Log.i("gongpengming", msg.getData().getString("result"));
+                    ToastMessage("保存上传成功!");
+                    break;
                 case codeWhat://获取编号
                 case codeWhat://获取编号
                     progressDialog.dismiss();
                     progressDialog.dismiss();
-                    tv_code= JSON.parseObject(msg.getData().getString("result")).getString("code");
+                    tv_code = JSON.parseObject(msg.getData().getString("result")).getString("code");
                     break;
                     break;
             }
             }
         }
         }
     };
     };
 
 
-    private void sendHttpResquest(int what){
+    private void sendHttpResquest(int what) {
         progressDialog.show();
         progressDialog.show();
-        String formStore="{\n" +
-                "\"taskcode\":\"" + tv_code+ "\",\n" +
-                "\"name\":\"" + tv_name.getText().toString()+ "\",\n" +
+        String formStore = "{\n" +
+                "\"taskcode\":\"" + tv_code + "\",\n" +
+                "\"name\":\"" + tv_name.getText().toString() + "\",\n" +
                 "\"resourcename\":\"" +
                 "\"resourcename\":\"" +
                 tv_executive.getText().toString() +
                 tv_executive.getText().toString() +
                 "\",\n" +
                 "\",\n" +
@@ -144,7 +151,7 @@ public class TaskAddActivity extends BaseActivity implements View.OnClickListene
                 "\"tasklevel\":\"" +
                 "\"tasklevel\":\"" +
                 tv_priority.getText().toString() +
                 tv_priority.getText().toString() +
                 "\",\n" +
                 "\",\n" +
-                "\"taskorschedule\":\""+tv_type.getText().toString()+"\",\n" +
+                "\"taskorschedule\":\"" + tv_type.getText().toString() + "\",\n" +
                 "\"custname\":\"" +
                 "\"custname\":\"" +
                 tv_customer.getText().toString() +
                 tv_customer.getText().toString() +
                 "\",\n" +
                 "\",\n" +
@@ -156,17 +163,17 @@ public class TaskAddActivity extends BaseActivity implements View.OnClickListene
                 "\",\n" +
                 "\",\n" +
           /*      "\"SOURCECOD\":\"U0316\"\n" +*/
           /*      "\"SOURCECOD\":\"U0316\"\n" +*/
                 "}";
                 "}";
-        String url= Constants.getAppBaseUrl(ct)+"plm/task/addbilltask.action";
-        Map<String,Object> params=new HashMap<>();
+        String url = Constants.getAppBaseUrl(ct) + "plm/task/addbilltask.action";
+        Map<String, Object> params = new HashMap<>();
         params.put("formStore", formStore);
         params.put("formStore", formStore);
-        LinkedHashMap<String , Object> headers=new LinkedHashMap<>();
+        LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
         ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
     }
     }
 
 
     private void showNoticeDialog() {
     private void showNoticeDialog() {
         OptionPicker sex_option = new OptionPicker(this, new String[]{
         OptionPicker sex_option = new OptionPicker(this, new String[]{
-                "10分钟", "30分钟","60分钟"
+                "10分钟", "30分钟", "60分钟"
         });
         });
         sex_option.setOffset(1);
         sex_option.setOffset(1);
         sex_option.setSelectedIndex(1);
         sex_option.setSelectedIndex(1);
@@ -174,7 +181,6 @@ public class TaskAddActivity extends BaseActivity implements View.OnClickListene
         sex_option.setOnOptionPickListener(new OptionPicker.OnOptionPickListener() {
         sex_option.setOnOptionPickListener(new OptionPicker.OnOptionPickListener() {
             @Override
             @Override
             public void onOptionPicked(int position, String option) {
             public void onOptionPicked(int position, String option) {
-//                ToastMessage(position+option);
                 tv_notice.setText(option);
                 tv_notice.setText(option);
             }
             }
 
 
@@ -182,18 +188,25 @@ public class TaskAddActivity extends BaseActivity implements View.OnClickListene
         sex_option.show();
         sex_option.show();
     }
     }
 
 
-    private void showPriorityDialog() {
-        OptionPicker sex_option = new OptionPicker(this, new String[]{
-                "紧急", "一般","不紧急"
-        });
+    private void showPriorityDialog(final EditText et, int type) {
+        String[] str = null;
+        if (type == 0x11) {//
+            str = new String[]{
+                    "紧急", "一般", "不紧急"
+            };
+        } else if (type == 0x12) {
+            str = new String[]{
+                    "任务", "日程"
+            };
+        }
+        OptionPicker sex_option = new OptionPicker(this, str);
         sex_option.setOffset(1);
         sex_option.setOffset(1);
         sex_option.setSelectedIndex(1);
         sex_option.setSelectedIndex(1);
         sex_option.setTextSize(18);
         sex_option.setTextSize(18);
         sex_option.setOnOptionPickListener(new OptionPicker.OnOptionPickListener() {
         sex_option.setOnOptionPickListener(new OptionPicker.OnOptionPickListener() {
             @Override
             @Override
             public void onOptionPicked(int position, String option) {
             public void onOptionPicked(int position, String option) {
-//                ToastMessage(position+option);
-                tv_priority.setText(option);
+                et.setText(option);
             }
             }
 
 
         });
         });
@@ -210,7 +223,6 @@ public class TaskAddActivity extends BaseActivity implements View.OnClickListene
         picker.setOnDatePickListener(new DatePicker.OnYearMonthDayPickListener() {
         picker.setOnDatePickListener(new DatePicker.OnYearMonthDayPickListener() {
             @Override
             @Override
             public void onDatePicked(String year, String month, String day) {
             public void onDatePicked(String year, String month, String day) {
-//                        ToastUtil.showToast(ct, year + "-" + month + "-" + day);
                 tv_date.setText(year + "-" + month + "-" + day);
                 tv_date.setText(year + "-" + month + "-" + day);
             }
             }
         });
         });
@@ -219,7 +231,7 @@ public class TaskAddActivity extends BaseActivity implements View.OnClickListene
 
 
     @Override
     @Override
     public void onClick(View v) {
     public void onClick(View v) {
-        switch (v.getId()){
+        switch (v.getId()) {
             case R.id.tv_date:
             case R.id.tv_date:
                 showDateDialog();
                 showDateDialog();
                 break;
                 break;
@@ -227,14 +239,20 @@ public class TaskAddActivity extends BaseActivity implements View.OnClickListene
                 showNoticeDialog();
                 showNoticeDialog();
                 break;
                 break;
             case R.id.tv_priority:
             case R.id.tv_priority:
-                showPriorityDialog();
+                showPriorityDialog(tv_priority, 0x11);
+                break;
+            case R.id.sex_erp_rl:
+                Intent intent = new Intent(ct, UserSelectActivity.class);
+                intent.putExtra("data", true);
+                startActivityForResult(intent, 0x11);
                 break;
                 break;
         }
         }
     }
     }
 
 
-
     private static final int codeWhat = 0x11;
     private static final int codeWhat = 0x11;
-    private  String tv_code;
+    private static final int endCodeWhat = 0x12;
+    private String tv_code;
+
     private void getCodeByNet() {
     private void getCodeByNet() {
         String url = Constants.getAppBaseUrl(ct) + "common/getCodeString.action";
         String url = Constants.getAppBaseUrl(ct) + "common/getCodeString.action";
         final Map<String, Object> param = new HashMap<>();
         final Map<String, Object> param = new HashMap<>();
@@ -244,6 +262,26 @@ public class TaskAddActivity extends BaseActivity implements View.OnClickListene
         param.put("sessionId", CommonUtil.getSharedPreferences(ct, "sessionId"));
         param.put("sessionId", CommonUtil.getSharedPreferences(ct, "sessionId"));
         LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
         LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
-       ViewUtil.httpSendRequest(ct, url, param, mHandler, headers, codeWhat, null, null, "post");
+        ViewUtil.httpSendRequest(ct, url, param, mHandler, headers, codeWhat, null, null, "post");
+    }
+
+    private void setCodeByNet(String code) {
+        String url = Constants.getAppBaseUrl(ct) + "mobile/crm/updateLastdate.action";
+        final Map<String, Object> param = new HashMap<>();
+        param.put("bc_code", code);
+        param.put("sessionId", CommonUtil.getSharedPreferences(ct, "sessionId"));
+        LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
+        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
+        ViewUtil.httpSendRequest(ct, url, param, mHandler, headers, endCodeWhat, null, null, "post");
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        if (data == null) return;
+        if (requestCode == 0x11 && resultCode == 0x11) {
+            MeetUserEntity entity = data.getParcelableExtra("data");
+            if (entity == null || entity.getName() == null) return;
+            tv_executive.setText(entity.getName());
+        }
     }
     }
 }
 }

+ 44 - 32
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/VisitReportAddActivity.java

@@ -1,7 +1,6 @@
 package com.xzjmyk.pm.activity.ui.erp.activity.crm;
 package com.xzjmyk.pm.activity.ui.erp.activity.crm;
 
 
 
 
-import android.content.Intent;
 import android.os.Bundle;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Handler;
 import android.os.Message;
 import android.os.Message;
@@ -15,43 +14,45 @@ import android.widget.TextView;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSON;
 import com.lidroid.xutils.ViewUtils;
 import com.lidroid.xutils.ViewUtils;
 import com.lidroid.xutils.view.annotation.ViewInject;
 import com.lidroid.xutils.view.annotation.ViewInject;
+import com.xzjmyk.pm.activity.MyApplication;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
 import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
 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.Constants;
 import com.xzjmyk.pm.activity.ui.erp.util.ViewUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.ViewUtil;
-import com.xzjmyk.pm.activity.util.DateFormatUtil;
+import com.xzjmyk.pm.activity.util.BaiduMapUtil;
+import com.xzjmyk.pm.activity.util.TimeUtils;
 import com.xzjmyk.pm.activity.view.wheel.DatePicker;
 import com.xzjmyk.pm.activity.view.wheel.DatePicker;
 
 
 import java.util.Calendar;
 import java.util.Calendar;
-import java.util.Date;
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Map;
 
 
-public class VisitReportAddActivity extends BaseActivity  implements View.OnClickListener {
+public class VisitReportAddActivity extends BaseActivity implements View.OnClickListener {
     @ViewInject(R.id.tv_date_select)
     @ViewInject(R.id.tv_date_select)
-    private EditText  tv_date_select;
+    private EditText tv_date_select;
     @ViewInject(R.id.tv_address_login)
     @ViewInject(R.id.tv_address_login)
-    private EditText       tv_address_login;
+    private EditText tv_address_login;
     @ViewInject(R.id.tv_address_refresh)
     @ViewInject(R.id.tv_address_refresh)
     private TextView tv_address_refresh;
     private TextView tv_address_refresh;
     @ViewInject(R.id.tv_customer_login)
     @ViewInject(R.id.tv_customer_login)
-    private EditText        tv_customer_login;
+    private EditText tv_customer_login;
     @ViewInject(R.id.tv_linksman_login)
     @ViewInject(R.id.tv_linksman_login)
     private EditText tv_linksman_login;
     private EditText tv_linksman_login;
     @ViewInject(R.id.tv_visit_login)
     @ViewInject(R.id.tv_visit_login)
-    private EditText        tv_visit_login;
+    private EditText tv_visit_login;
     @ViewInject(R.id.tv_depart_login)
     @ViewInject(R.id.tv_depart_login)
     private EditText tv_depart_login;
     private EditText tv_depart_login;
     @ViewInject(R.id.tv_startTim_login)
     @ViewInject(R.id.tv_startTim_login)
-    private EditText       tv_startTim_login;
+    private EditText tv_startTim_login;
     @ViewInject(R.id.tv_endTime_login)
     @ViewInject(R.id.tv_endTime_login)
     private EditText tv_endTime_login;
     private EditText tv_endTime_login;
     @ViewInject(R.id.tv_businessState_login)
     @ViewInject(R.id.tv_businessState_login)
-    private EditText        tv_businessState_login;
+    private EditText tv_businessState_login;
     @ViewInject(R.id.tv_notes_login)
     @ViewInject(R.id.tv_notes_login)
     private EditText tv_notes_login;
     private EditText tv_notes_login;
+
     @Override
     @Override
     protected void onCreate(Bundle savedInstanceState) {
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         super.onCreate(savedInstanceState);
@@ -64,6 +65,8 @@ public class VisitReportAddActivity extends BaseActivity  implements View.OnClic
     private void initView() {
     private void initView() {
         ViewUtils.inject(this);
         ViewUtils.inject(this);
         getSupportActionBar().setTitle("拜访报告");
         getSupportActionBar().setTitle("拜访报告");
+        tv_date_select.setText(TimeUtils.s_long_2_str(System.currentTimeMillis()));
+        tv_address_login.setText(MyApplication.getInstance().getBdLocationHelper().getAddress());
     }
     }
 
 
     private void initListener() {
     private void initListener() {
@@ -71,11 +74,11 @@ public class VisitReportAddActivity extends BaseActivity  implements View.OnClic
         tv_date_select.setOnClickListener(this);
         tv_date_select.setOnClickListener(this);
         tv_startTim_login.setOnClickListener(this);
         tv_startTim_login.setOnClickListener(this);
         tv_endTime_login.setOnClickListener(this);
         tv_endTime_login.setOnClickListener(this);
-        
+
         tv_date_select.setKeyListener(null);
         tv_date_select.setKeyListener(null);
         tv_endTime_login.setKeyListener(null);
         tv_endTime_login.setKeyListener(null);
         tv_startTim_login.setKeyListener(null);
         tv_startTim_login.setKeyListener(null);
-        
+
     }
     }
 
 
     private void initData() {
     private void initData() {
@@ -101,10 +104,10 @@ public class VisitReportAddActivity extends BaseActivity  implements View.OnClic
         return true;
         return true;
     }
     }
 
 
-    private Handler mHandler=new Handler(){
+    private Handler mHandler = new Handler() {
         @Override
         @Override
         public void handleMessage(Message msg) {
         public void handleMessage(Message msg) {
-            switch (msg.what){
+            switch (msg.what) {
                 case Constants.HTTP_SUCCESS_INIT:
                 case Constants.HTTP_SUCCESS_INIT:
                     progressDialog.dismiss();
                     progressDialog.dismiss();
                     Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
                     Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
@@ -117,19 +120,19 @@ public class VisitReportAddActivity extends BaseActivity  implements View.OnClic
                     break;
                     break;
                 case codeWhat://获取编号
                 case codeWhat://获取编号
                     progressDialog.dismiss();
                     progressDialog.dismiss();
-                    tv_code= JSON.parseObject(msg.getData().getString("result")).getString("code");
+                    tv_code = JSON.parseObject(msg.getData().getString("result")).getString("code");
                     break;
                     break;
             }
             }
         }
         }
     };
     };
 
 
-    private void sendHttpResquest(int what){
+    private void sendHttpResquest(int what) {
         progressDialog.show();
         progressDialog.show();
-        String formStore="{\n" +
-                "\"vr_code\":\"" + tv_code+ "\",\n" +
-                "\"vr_visittime\":\"" + tv_date_select.getText().toString()+ "\",\n" +
+        String formStore = "{\n" +
+                "\"vr_code\":\"" + tv_code + "\",\n" +
+                "\"vr_visittime\":\"" + tv_date_select.getText().toString() + "\",\n" +
                 "\"vr_visitplace\":\"" +
                 "\"vr_visitplace\":\"" +
-              tv_address_login.getText().toString()+
+                tv_address_login.getText().toString() +
                 "\",\n" +
                 "\",\n" +
                 "\"vr_cuname\":\"" +
                 "\"vr_cuname\":\"" +
                 tv_customer_login.getText().toString() +
                 tv_customer_login.getText().toString() +
@@ -144,17 +147,17 @@ public class VisitReportAddActivity extends BaseActivity  implements View.OnClic
                 "初次沟通" +
                 "初次沟通" +
                 "\",\n" +
                 "\",\n" +
                 "\"vr_remark\":\"" +
                 "\"vr_remark\":\"" +
-                tv_notes_login.getText().toString()+
+                tv_notes_login.getText().toString() +
                 "\",\n" +
                 "\",\n" +
                 "\"vr_recorddate\":\"" +
                 "\"vr_recorddate\":\"" +
-              tv_startTim_login.getText().toString() +
+                tv_startTim_login.getText().toString() +
                 "\",\n" +
                 "\",\n" +
                 "\"vr_recorder\":\"" +
                 "\"vr_recorder\":\"" +
-                CommonUtil.getSharedPreferences(ct,"erp_username") +
+                CommonUtil.getSharedPreferences(ct, "erp_username") +
                 "\"\n" +
                 "\"\n" +
                 "}";
                 "}";
-        String url= Constants.getAppBaseUrl(ct)+"crm/customermgr/saveVisitRecord.action";
-        Map<String,Object> params=new HashMap<>();
+        String url = Constants.getAppBaseUrl(ct) + "crm/customermgr/saveVisitRecord.action";
+        Map<String, Object> params = new HashMap<>();
         params.put("formStore", formStore);
         params.put("formStore", formStore);
         params.put("caller", "VisitRecord");
         params.put("caller", "VisitRecord");
         params.put("param1", "[]");
         params.put("param1", "[]");
@@ -164,22 +167,30 @@ public class VisitReportAddActivity extends BaseActivity  implements View.OnClic
         params.put("param5", "[]");
         params.put("param5", "[]");
         params.put("param6", "[]");
         params.put("param6", "[]");
         params.put("param7", "[]");
         params.put("param7", "[]");
-        LinkedHashMap<String , Object> headers=new LinkedHashMap<>();
+        LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
         ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
     }
     }
 
 
     @Override
     @Override
     public void onClick(View v) {
     public void onClick(View v) {
-        switch (v.getId()){
+        switch (v.getId()) {
             case R.id.tv_date_select:
             case R.id.tv_date_select:
-                showDateDialog((EditText)v.findViewById(R.id.tv_date_select));
+                showDateDialog((EditText) v.findViewById(R.id.tv_date_select));
                 break;
                 break;
             case R.id.tv_startTim_login:
             case R.id.tv_startTim_login:
-                showDateDialog((EditText)v.findViewById(R.id.tv_startTim_login));
+                showDateDialog((EditText) v.findViewById(R.id.tv_startTim_login));
+                break;
+            case R.id.tv_endTime_login:
+                showDateDialog((EditText) v.findViewById(R.id.tv_endTime_login));
                 break;
                 break;
-            case  R.id.tv_endTime_login:
-                showDateDialog((EditText)v.findViewById(R.id.tv_endTime_login));
+            case R.id.tv_address_refresh:
+                BaiduMapUtil.getInstence().getPoiInfo(ct, new BaiduMapUtil.OnLocationListener() {
+                    @Override
+                    public void result(Map<String, Object> map) {
+                        tv_address_login.setText(map.get("poi")+"");
+                    }
+                });
                 break;
                 break;
         }
         }
     }
     }
@@ -203,7 +214,8 @@ public class VisitReportAddActivity extends BaseActivity  implements View.OnClic
     }
     }
 
 
     private static final int codeWhat = 0x11;
     private static final int codeWhat = 0x11;
-    private  String tv_code;
+    private String tv_code;
+
     private void getCodeByNet() {
     private void getCodeByNet() {
         String url = Constants.getAppBaseUrl(ct) + "common/getCodeString.action";
         String url = Constants.getAppBaseUrl(ct) + "common/getCodeString.action";
         final Map<String, Object> param = new HashMap<>();
         final Map<String, Object> param = new HashMap<>();

+ 41 - 33
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/VisitReportPlanActivity.java

@@ -1,9 +1,8 @@
 package com.xzjmyk.pm.activity.ui.erp.activity.crm;
 package com.xzjmyk.pm.activity.ui.erp.activity.crm;
 
 
+import android.os.Bundle;
 import android.os.Handler;
 import android.os.Handler;
 import android.os.Message;
 import android.os.Message;
-import android.support.v7.app.AppCompatActivity;
-import android.os.Bundle;
 import android.util.Log;
 import android.util.Log;
 import android.view.Menu;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.MenuItem;
@@ -14,12 +13,15 @@ import android.widget.TextView;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSON;
 import com.lidroid.xutils.ViewUtils;
 import com.lidroid.xutils.ViewUtils;
 import com.lidroid.xutils.view.annotation.ViewInject;
 import com.lidroid.xutils.view.annotation.ViewInject;
+import com.xzjmyk.pm.activity.MyApplication;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
 import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
 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.Constants;
 import com.xzjmyk.pm.activity.ui.erp.util.ViewUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.ViewUtil;
+import com.xzjmyk.pm.activity.util.BaiduMapUtil;
 import com.xzjmyk.pm.activity.util.DateFormatUtil;
 import com.xzjmyk.pm.activity.util.DateFormatUtil;
+import com.xzjmyk.pm.activity.util.TimeUtils;
 import com.xzjmyk.pm.activity.view.wheel.DatePicker;
 import com.xzjmyk.pm.activity.view.wheel.DatePicker;
 
 
 import java.util.Calendar;
 import java.util.Calendar;
@@ -34,19 +36,19 @@ import java.util.Map;
  * @param:
  * @param:
  * @return:
  * @return:
  */
  */
-public class VisitReportPlanActivity extends BaseActivity  implements View.OnClickListener{
+public class VisitReportPlanActivity extends BaseActivity implements View.OnClickListener {
     @ViewInject(R.id.tv_date_select)
     @ViewInject(R.id.tv_date_select)
     private EditText tv_date_select;
     private EditText tv_date_select;
     @ViewInject(R.id.tv_address_login)
     @ViewInject(R.id.tv_address_login)
-    private EditText  tv_address_login;
+    private EditText tv_address_login;
     @ViewInject(R.id.tv_address_refresh)
     @ViewInject(R.id.tv_address_refresh)
-    private TextView  tv_address_refresh;
+    private TextView tv_address_refresh;
     @ViewInject(R.id.tv_customer_login)
     @ViewInject(R.id.tv_customer_login)
-    private EditText  tv_customer_login;
+    private EditText tv_customer_login;
     @ViewInject(R.id.tv_linksman_login)
     @ViewInject(R.id.tv_linksman_login)
-    private EditText  tv_linksman_login;
+    private EditText tv_linksman_login;
     @ViewInject(R.id.tv_visit_login)
     @ViewInject(R.id.tv_visit_login)
-    private EditText  tv_visit_login;
+    private EditText tv_visit_login;
 
 
     @Override
     @Override
     protected void onCreate(Bundle savedInstanceState) {
     protected void onCreate(Bundle savedInstanceState) {
@@ -54,26 +56,23 @@ public class VisitReportPlanActivity extends BaseActivity  implements View.OnCli
         setContentView(R.layout.activity_visit_report_plan);
         setContentView(R.layout.activity_visit_report_plan);
         initView();
         initView();
         initData();
         initData();
-        initListener();
     }
     }
 
 
 
 
     private void initView() {
     private void initView() {
         ViewUtils.inject(this);
         ViewUtils.inject(this);
         getSupportActionBar().setTitle("拜访计划");
         getSupportActionBar().setTitle("拜访计划");
+        tv_date_select.setText(TimeUtils.s_long_2_str(System.currentTimeMillis()));
+        tv_address_login.setText(MyApplication.getInstance().getBdLocationHelper().getAddress());
         tv_date_select.setKeyListener(null);
         tv_date_select.setKeyListener(null);
         tv_date_select.setFocusable(false);
         tv_date_select.setFocusable(false);
-        
         tv_date_select.setOnClickListener(this);
         tv_date_select.setOnClickListener(this);
         tv_address_refresh.setOnClickListener(this);
         tv_address_refresh.setOnClickListener(this);
     }
     }
 
 
-    private void initListener() {
-
-    }
 
 
     private void initData() {
     private void initData() {
-      getCodeByNet();
+        getCodeByNet();
     }
     }
 
 
     @Override
     @Override
@@ -96,14 +95,14 @@ public class VisitReportPlanActivity extends BaseActivity  implements View.OnCli
     }
     }
 
 
 
 
-    private Handler mHandler=new Handler(){
+    private Handler mHandler = new Handler() {
         @Override
         @Override
         public void handleMessage(Message msg) {
         public void handleMessage(Message msg) {
-            switch (msg.what){
+            switch (msg.what) {
                 case Constants.HTTP_SUCCESS_INIT:
                 case Constants.HTTP_SUCCESS_INIT:
                     progressDialog.dismiss();
                     progressDialog.dismiss();
                     Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
                     Log.i(TAG, "handleMessage:" + msg.getData().getString("result"));
-                     ToastMessage("保存成功!");
+                    ToastMessage("保存成功!");
                     break;
                     break;
                 case Constants.APP_SOCKETIMEOUTEXCEPTION:
                 case Constants.APP_SOCKETIMEOUTEXCEPTION:
                     progressDialog.dismiss();
                     progressDialog.dismiss();
@@ -112,19 +111,19 @@ public class VisitReportPlanActivity extends BaseActivity  implements View.OnCli
                     break;
                     break;
                 case codeWhat://获取编号
                 case codeWhat://获取编号
                     progressDialog.dismiss();
                     progressDialog.dismiss();
-                    tv_code= JSON.parseObject(msg.getData().getString("result")).getString("code");
+                    tv_code = JSON.parseObject(msg.getData().getString("result")).getString("code");
                     break;
                     break;
             }
             }
         }
         }
     };
     };
 
 
-    private void sendHttpResquest(int what){
+    private void sendHttpResquest(int what) {
         progressDialog.show();
         progressDialog.show();
-        String formStore ="\n" +
+        String formStore = "\n" +
                 "{\n" +
                 "{\n" +
-                "\"vp_code\":\""+tv_code+"\",\n" +
+                "\"vp_code\":\"" + tv_code + "\",\n" +
                 "\"vp_date\":\"" +
                 "\"vp_date\":\"" +
-               tv_date_select.getText().toString() +
+                tv_date_select.getText().toString() +
                 "\",\n" +
                 "\",\n" +
                 "\"vp_custcode\":\"" +
                 "\"vp_custcode\":\"" +
                 "12321312" +
                 "12321312" +
@@ -133,35 +132,35 @@ public class VisitReportPlanActivity extends BaseActivity  implements View.OnCli
                 tv_customer_login.getText().toString() +
                 tv_customer_login.getText().toString() +
                 "\",\n" +
                 "\",\n" +
                 "\"vp_address\":\"" +
                 "\"vp_address\":\"" +
-               tv_address_login.getText().toString() +
+                tv_address_login.getText().toString() +
                 "\",\n" +
                 "\",\n" +
                 "\"vp_contact\":\"" +
                 "\"vp_contact\":\"" +
                 tv_linksman_login.getText().toString() +
                 tv_linksman_login.getText().toString() +
                 "\",\n" +
                 "\",\n" +
                 "\"vp_visitman\":\"" +
                 "\"vp_visitman\":\"" +
-               tv_visit_login.getText().toString() +
+                tv_visit_login.getText().toString() +
                 "\",\n" +
                 "\",\n" +
                 "\"vp_recordman\":\"" +
                 "\"vp_recordman\":\"" +
-                CommonUtil.getSharedPreferences(ct,"erp_username") +
+                CommonUtil.getSharedPreferences(ct, "erp_username") +
                 "\",\n" +
                 "\",\n" +
                 "\"vp_status\":\"" +
                 "\"vp_status\":\"" +
                 "未拜访" +
                 "未拜访" +
                 "\",\n" +
                 "\",\n" +
                 "\"vp_visitmancode\":\"" +
                 "\"vp_visitmancode\":\"" +
-                CommonUtil.getSharedPreferences(ct,"erp_username") +
+                CommonUtil.getSharedPreferences(ct, "erp_username") +
                 "\",\n" +
                 "\",\n" +
                 "\"vp_nichestep\":\"" +
                 "\"vp_nichestep\":\"" +
                 "初次沟通" +
                 "初次沟通" +
                 "\",\n" +
                 "\",\n" +
                 "\"vp_recordate\":\"" +
                 "\"vp_recordate\":\"" +
-                DateFormatUtil.getStrDate4Date(new Date(),"yyyy-MM-dd") +
+                DateFormatUtil.getStrDate4Date(new Date(), "yyyy-MM-dd") +
                 "\"\n" +
                 "\"\n" +
                 "}";
                 "}";
-        String url= Constants.getAppBaseUrl(ct)+"mobile/crm/saveVisitPlan.action";
-        Map<String,Object> params=new HashMap<>();
+        String url = Constants.getAppBaseUrl(ct) + "mobile/crm/saveVisitPlan.action";
+        Map<String, Object> params = new HashMap<>();
         params.put("formStore", formStore);
         params.put("formStore", formStore);
         params.put("caller", "visitplan");
         params.put("caller", "visitplan");
-        LinkedHashMap<String , Object> headers=new LinkedHashMap<>();
+        LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
         ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, what, null, null, "post");
     }
     }
@@ -186,15 +185,24 @@ public class VisitReportPlanActivity extends BaseActivity  implements View.OnCli
 
 
     @Override
     @Override
     public void onClick(View v) {
     public void onClick(View v) {
-        switch (v.getId()){
+        switch (v.getId()) {
             case R.id.tv_date_select:
             case R.id.tv_date_select:
                 showDateDialog();
                 showDateDialog();
                 break;
                 break;
+            case R.id.tv_address_refresh:
+                BaiduMapUtil.getInstence().getPoiInfo(ct, new BaiduMapUtil.OnLocationListener() {
+                    @Override
+                    public void result(Map<String, Object> map) {
+                        tv_address_login.setText((String) map.get("poi"));
+                    }
+                });
+                break;
         }
         }
     }
     }
 
 
     private static final int codeWhat = 0x11;
     private static final int codeWhat = 0x11;
-    private  String tv_code;
+    private String tv_code;
+
     private void getCodeByNet() {
     private void getCodeByNet() {
         String url = Constants.getAppBaseUrl(ct) + "common/getCodeString.action";
         String url = Constants.getAppBaseUrl(ct) + "common/getCodeString.action";
         final Map<String, Object> param = new HashMap<>();
         final Map<String, Object> param = new HashMap<>();
@@ -206,5 +214,5 @@ public class VisitReportPlanActivity extends BaseActivity  implements View.OnCli
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         ViewUtil.httpSendRequest(ct, url, param, mHandler, headers, codeWhat, null, null, "post");
         ViewUtil.httpSendRequest(ct, url, param, mHandler, headers, codeWhat, null, null, "post");
     }
     }
-    
+
 }
 }

+ 2 - 4
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/AddMeetingActivity.java

@@ -10,7 +10,6 @@ import android.os.Handler;
 import android.os.IBinder;
 import android.os.IBinder;
 import android.os.Message;
 import android.os.Message;
 import android.text.TextUtils;
 import android.text.TextUtils;
-import android.util.Log;
 import android.view.Gravity;
 import android.view.Gravity;
 import android.view.View;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewGroup;
@@ -82,7 +81,6 @@ public class AddMeetingActivity extends BaseActivity implements View.OnClickList
     private final int whatAdd = 0x11;
     private final int whatAdd = 0x11;
     private String baseUrl;
     private String baseUrl;
     private int request = 0x13;
     private int request = 0x13;
-    public static int resultCode = 0x14;
     ArrayList<MeetUserEntity> entities = null;//成员
     ArrayList<MeetUserEntity> entities = null;//成员
     private Handler handler = new Handler() {
     private Handler handler = new Handler() {
         @Override
         @Override
@@ -222,7 +220,7 @@ public class AddMeetingActivity extends BaseActivity implements View.OnClickList
                 });
                 });
                 break;
                 break;
             case R.id.users_rl://选择参会人员
             case R.id.users_rl://选择参会人员
-                Intent intent = new Intent(ct, MeetSelectActivity.class);
+                Intent intent = new Intent(ct, UserSelectActivity.class);
                 startActivityForResult(intent, request);
                 startActivityForResult(intent, request);
                 break;
                 break;
             case R.id.tag_rl://点击会议标签
             case R.id.tag_rl://点击会议标签
@@ -479,7 +477,7 @@ public class AddMeetingActivity extends BaseActivity implements View.OnClickList
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
         if (data == null) return;
         if (data == null) return;
         if (requestCode == this.request) {
         if (requestCode == this.request) {
-            if (resultCode == this.resultCode) {
+            if (resultCode == 0x11) {
                 entities = data.getParcelableArrayListExtra("data");
                 entities = data.getParcelableArrayListExtra("data");
                 users_tv.setText("选择" + entities.size() + "人");
                 users_tv.setText("选择" + entities.size() + "人");
             }
             }

+ 3 - 3
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/AlarmReceiver.java

@@ -8,16 +8,15 @@ import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Context;
 import android.content.Intent;
 import android.content.Intent;
 import android.support.v7.app.NotificationCompat;
 import android.support.v7.app.NotificationCompat;
-import android.util.Log;
 
 
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
 import com.xzjmyk.pm.activity.util.TimeUtils;
 import com.xzjmyk.pm.activity.util.TimeUtils;
 
 
 import java.util.Calendar;
 import java.util.Calendar;
+
 /**
 /**
- *AlarmReceiver
- *
+ * AlarmReceiver
  */
  */
 public class AlarmReceiver extends BroadcastReceiver {
 public class AlarmReceiver extends BroadcastReceiver {
 
 
@@ -95,6 +94,7 @@ public class AlarmReceiver extends BroadcastReceiver {
         } else {
         } else {
             dateTime = CommonUtil.getSharedPreferences(context, AlarmaActivity.KEY_UALAR_TIME);//获取下班时间
             dateTime = CommonUtil.getSharedPreferences(context, AlarmaActivity.KEY_UALAR_TIME);//获取下班时间
         }
         }
+        if (dateTime == null || dateTime.length() <= 0) return;//异常处理
         int[] hm = getHourAndM(dateTime);
         int[] hm = getHourAndM(dateTime);
         String time = getTimeFormat(hm[0], hm[1]);
         String time = getTimeFormat(hm[0], hm[1]);
         long timeLong = TimeUtils.f_str_2_long(time);
         long timeLong = TimeUtils.f_str_2_long(time);

+ 9 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/AlarmaActivity.java

@@ -5,7 +5,6 @@ import android.app.PendingIntent;
 import android.app.TimePickerDialog;
 import android.app.TimePickerDialog;
 import android.content.Intent;
 import android.content.Intent;
 import android.os.Bundle;
 import android.os.Bundle;
-import android.util.Log;
 import android.view.View;
 import android.view.View;
 import android.widget.TextView;
 import android.widget.TextView;
 import android.widget.TimePicker;
 import android.widget.TimePicker;
@@ -211,4 +210,13 @@ public class AlarmaActivity extends BaseActivity implements View.OnClickListener
                 break;
                 break;
         }
         }
     }
     }
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        //退出时候保存时间到本地
+        String ti = TimeUtils.s_long_2_str(System.currentTimeMillis()) + " " + tv_alar.getText().toString().trim() + ":00";
+        String me = TimeUtils.s_long_2_str(System.currentTimeMillis()) + " " + tv_ualar.getText().toString().trim() + ":00";
+        CommonUtil.setSharedPreferences(ct, KEY_ALAR_TIME, ti);//保存上班签到的
+        CommonUtil.setSharedPreferences(ct, KEY_UALAR_TIME, me);//保存下班签到的时间
+    }
 }
 }

+ 12 - 14
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/MeetDetailsActivity.java

@@ -71,6 +71,7 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
                     ToastUtil.showToast(ct, "会议签到成功");
                     ToastUtil.showToast(ct, "会议签到成功");
                     click_btn.setFocusable(false);
                     click_btn.setFocusable(false);
                     click_btn.setClickable(false);
                     click_btn.setClickable(false);
+//                    click_btn.setBackgroundResource(R.drawable.bg_btn);
                     break;
                     break;
                 case 0x14:
                 case 0x14:
                     JSONObject numlist = JSON.parseObject(message).getJSONObject("participants");
                     JSONObject numlist = JSON.parseObject(message).getJSONObject("participants");
@@ -102,16 +103,22 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
         initView();
         initView();
     }
     }
 
 
-    private void initView() {
+    private void getPoinfo() {
         BaiduMapUtil.getInstence().getPoiInfo(ct, new BaiduMapUtil.OnLocationListener() {
         BaiduMapUtil.getInstence().getPoiInfo(ct, new BaiduMapUtil.OnLocationListener() {
             @Override
             @Override
             public void result(Map<String, Object> map) {
             public void result(Map<String, Object> map) {
-                progressDialog.dismiss();
                 if (map == null || map.isEmpty()) return;
                 if (map == null || map.isEmpty()) return;
-                if (map.get("poi") == null) return;
-                location_tv.setText(map.get("poi") + "");
+                if (map.get("poi") != null) {
+                    location_tv.setText(map.get("poi") + "");
+                } else if (map.get("name") != null) {
+                    location_tv.setText(map.get("name") + "");
+                }
             }
             }
         });
         });
+    }
+
+    private void initView() {
+//        getPoinfo();
         findViewById(R.id.meet_save).setOnClickListener(this);
         findViewById(R.id.meet_save).setOnClickListener(this);
         findViewById(R.id.num_tag).setOnClickListener(this);
         findViewById(R.id.num_tag).setOnClickListener(this);
         findViewById(R.id.end_meet_tv).setOnClickListener(this);
         findViewById(R.id.end_meet_tv).setOnClickListener(this);
@@ -264,16 +271,7 @@ public class MeetDetailsActivity extends BaseActivity implements View.OnClickLis
                 doNetSubmit(SIGNNIN);
                 doNetSubmit(SIGNNIN);
                 break;
                 break;
             case R.id.location_tag://点击重新定位
             case R.id.location_tag://点击重新定位
-                progressDialog.show();
-                BaiduMapUtil.getInstence().getPoiInfo(ct, new BaiduMapUtil.OnLocationListener() {
-                    @Override
-                    public void result(Map<String, Object> map) {
-                        progressDialog.dismiss();
-                        if (map == null || map.isEmpty()) return;
-                        if (map.get("poi") == null) return;
-                        location_tv.setText(map.get("poi") + "");
-                    }
-                });
+                getPoinfo();
                 break;
                 break;
         }
         }
     }
     }

+ 3 - 5
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/OAActivity.java

@@ -6,7 +6,6 @@ import android.os.Build;
 import android.os.Bundle;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Handler;
 import android.os.Message;
 import android.os.Message;
-import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.LayoutInflater;
 import android.view.MenuItem;
 import android.view.MenuItem;
 import android.view.View;
 import android.view.View;
@@ -433,20 +432,19 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Ad
                         case R.id.add_task:
                         case R.id.add_task:
                             intent = new Intent(ct, TaskAddActivity.class);
                             intent = new Intent(ct, TaskAddActivity.class);
                             intent.putExtra("type", 0);
                             intent.putExtra("type", 0);
-                            startActivity(intent);
                             break;
                             break;
                         case R.id.add_date:
                         case R.id.add_date:
                             intent = new Intent(ct, TaskAddActivity.class);
                             intent = new Intent(ct, TaskAddActivity.class);
                             intent.putExtra("type", 1);
                             intent.putExtra("type", 1);
-                            startActivity(intent);
                             break;
                             break;
                         case R.id.add_visit:
                         case R.id.add_visit:
-                            startActivity(new Intent(ct, VisitReportPlanActivity.class));
+                            intent = new Intent(ct, VisitReportPlanActivity.class);
                             break;
                             break;
                         case R.id.add_visit_item:
                         case R.id.add_visit_item:
-                            startActivity(new Intent(ct, VisitReportAddActivity.class));
+                            intent = new Intent(ct, VisitReportAddActivity.class);
                             break;
                             break;
                     }
                     }
+                    startActivity(intent);
                     poAddMenu.dismiss();
                     poAddMenu.dismiss();
                     return false;
                     return false;
                 }
                 }

+ 1 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/OARegisterActivity.java

@@ -117,4 +117,5 @@ public class OARegisterActivity extends BaseActivity {
             return title.length;
             return title.length;
         }
         }
     }
     }
+
 }
 }

+ 16 - 5
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/MeetSelectActivity.java → WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/UserSelectActivity.java

@@ -30,12 +30,13 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 
 
 //添加会议人员界面
 //添加会议人员界面
-public class MeetSelectActivity extends BaseActivity {
+public class UserSelectActivity extends BaseActivity {
     @ViewInject(R.id.listview)
     @ViewInject(R.id.listview)
     private ListView listview;
     private ListView listview;
     @ViewInject(R.id.search_edit)
     @ViewInject(R.id.search_edit)
     private ClearEditText search_edit;
     private ClearEditText search_edit;
 
 
+    private boolean isSingle = false;
     private DBManager manager;
     private DBManager manager;
     private ArrayList<MeetUserEntity> entities;
     private ArrayList<MeetUserEntity> entities;
     private MeetSelectAdapter adapter;
     private MeetSelectAdapter adapter;
@@ -69,8 +70,16 @@ public class MeetSelectActivity extends BaseActivity {
         listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
         listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
             @Override
             public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
             public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
-                entities.get(i).setClick(!entities.get(i).isClick());
-                adapter.notifyDataSetChanged();
+                if (isSingle) {//单选
+                    MeetUserEntity entity = entities.get(i);
+                    Intent intent = new Intent();
+                    intent.putExtra("data", entity);
+                    setResult(0x11, intent);
+                    finish();
+                } else {//默认多选
+                    entities.get(i).setClick(!entities.get(i).isClick());
+                    adapter.notifyDataSetChanged();
+                }
             }
             }
         });
         });
     }
     }
@@ -83,7 +92,7 @@ public class MeetSelectActivity extends BaseActivity {
         }
         }
         Intent intent = new Intent();
         Intent intent = new Intent();
         intent.putExtra("data", list);
         intent.putExtra("data", list);
-        setResult(AddMeetingActivity.resultCode, intent);
+        setResult(0x11, intent);
         finish();
         finish();
     }
     }
 
 
@@ -100,9 +109,12 @@ public class MeetSelectActivity extends BaseActivity {
         getMenuInflater().inflate(R.menu.menu_visit_save, menu);
         getMenuInflater().inflate(R.menu.menu_visit_save, menu);
         return super.onCreateOptionsMenu(menu);
         return super.onCreateOptionsMenu(menu);
     }
     }
+
     private void init() {
     private void init() {
+        isSingle = getIntent().getBooleanExtra("data", false);
         getDataByDB();
         getDataByDB();
     }
     }
+
     private void getDataByDB() {  //企业通讯录好友
     private void getDataByDB() {  //企业通讯录好友
         if (entities == null)
         if (entities == null)
             entities = new ArrayList<>();
             entities = new ArrayList<>();
@@ -132,7 +144,6 @@ public class MeetSelectActivity extends BaseActivity {
         public int getCount() {
         public int getCount() {
             return entities == null ? 0 : entities.size();
             return entities == null ? 0 : entities.size();
         }
         }
-
         @Override
         @Override
         public Object getItem(int i) {
         public Object getItem(int i) {
             return entities == null ? 0 : entities.get(i);
             return entities == null ? 0 : entities.get(i);

+ 6 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/fragment/OutofficeFragment.java

@@ -134,6 +134,12 @@ public class OutofficeFragment extends EasyFragment implements View.OnClickListe
         }
         }
     };
     };
 
 
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+        timeTask.cancel(true);
+    }
+
     @Override
     @Override
     public void onClick(View view) {
     public void onClick(View view) {
         switch (view.getId()) {
         switch (view.getId()) {

+ 4 - 3
WeiChat/src/main/java/com/xzjmyk/pm/activity/util/BaiduMapUtil.java

@@ -184,13 +184,13 @@ public class BaiduMapUtil {
         if (mLocationClient == null)
         if (mLocationClient == null)
             mLocationClient = new LocationClient(context); // 声明LocationClient类
             mLocationClient = new LocationClient(context); // 声明LocationClient类
         mLocationClient.registerLocationListener(bdLocationListener); // 注册监听函数
         mLocationClient.registerLocationListener(bdLocationListener); // 注册监听函数
-        initLocation();
+        mLocationClient.setLocOption(initLocation());
         if (!mLocationClient.isStarted()) {
         if (!mLocationClient.isStarted()) {
             mLocationClient.start();
             mLocationClient.start();
         }
         }
     }
     }
 
 
-    private void initLocation() {
+    private LocationClientOption initLocation() {
         LocationClientOption option = new LocationClientOption();
         LocationClientOption option = new LocationClientOption();
         option.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy
         option.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy
         );//可选,默认高精度,设置定位模式,高精度,低功耗,仅设备
         );//可选,默认高精度,设置定位模式,高精度,低功耗,仅设备
@@ -205,7 +205,7 @@ public class BaiduMapUtil {
         option.setIgnoreKillProcess(false);//可选,默认true,定位SDK内部是一个SERVICE,并放到了独立进程,设置是否在stop的时候杀死这个进程,默认不杀死
         option.setIgnoreKillProcess(false);//可选,默认true,定位SDK内部是一个SERVICE,并放到了独立进程,设置是否在stop的时候杀死这个进程,默认不杀死
         option.SetIgnoreCacheException(false);//可选,默认false,设置是否收集CRASH信息,默认收集
         option.SetIgnoreCacheException(false);//可选,默认false,设置是否收集CRASH信息,默认收集
         option.setEnableSimulateGps(false);//可选,默认false,设置是否需要过滤gps仿真结果,默认需要
         option.setEnableSimulateGps(false);//可选,默认false,设置是否需要过滤gps仿真结果,默认需要
-        mLocationClient.setLocOption(option);
+        return option;
     }
     }
 
 
     public interface OnLocationListener {
     public interface OnLocationListener {
@@ -247,6 +247,7 @@ public class BaiduMapUtil {
             map.put("poi", list.get(0).getName());//
             map.put("poi", list.get(0).getName());//
             if (locationListener == null) return;
             if (locationListener == null) return;
             locationListener.result(map);
             locationListener.result(map);
+            mLocationClient.unRegisterLocationListener(this);
         }
         }
     };
     };
 }
 }

+ 0 - 6
WeiChat/src/main/java/com/xzjmyk/pm/activity/util/TimeUtils.java

@@ -101,7 +101,6 @@ public class TimeUtils {
     public static String day_long_2_str(long timestamp) {
     public static String day_long_2_str(long timestamp) {
         return day_format.format(new Date(timestamp));
         return day_format.format(new Date(timestamp));
     }
     }
-
     public static long int_str_2_long(String date) {
     public static long int_str_2_long(String date) {
         try {
         try {
             Date d = int_format.parse(date);
             Date d = int_format.parse(date);
@@ -111,26 +110,21 @@ public class TimeUtils {
         }
         }
         return 0;
         return 0;
     }
     }
-
     public static int int_long_2_str(long timestamp) {
     public static int int_long_2_str(long timestamp) {
         return Integer.parseInt(int_format.format(new Date(timestamp)));
         return Integer.parseInt(int_format.format(new Date(timestamp)));
     }
     }
-
     public static int ym_long_2_str(long timestamp) {
     public static int ym_long_2_str(long timestamp) {
         return Integer.parseInt(ym_format.format(new Date(timestamp)));
         return Integer.parseInt(ym_format.format(new Date(timestamp)));
     }
     }
-
     public static long f_str_2_long(String dateString) {
     public static long f_str_2_long(String dateString) {
         try {
         try {
             Date d = f_format.parse(dateString);
             Date d = f_format.parse(dateString);
-
             return d.getTime();
             return d.getTime();
         } catch (ParseException e) {
         } catch (ParseException e) {
             e.printStackTrace();
             e.printStackTrace();
         }
         }
         return 0;
         return 0;
     }
     }
-
     public static String ss_long_2_str(long timestamp) {
     public static String ss_long_2_str(long timestamp) {
         return ss_format.format(new Date(timestamp));
         return ss_format.format(new Date(timestamp));
     }
     }

+ 46 - 26
WeiChat/src/main/java/com/xzjmyk/pm/activity/view/CalendarView.java

@@ -91,7 +91,7 @@ public class CalendarView extends View implements View.OnTouchListener {
     @Override
     @Override
     protected void onDraw(Canvas canvas) {
     protected void onDraw(Canvas canvas) {
         // 画框
         // 画框
-        canvas.drawPath(surface.boxPath, surface.borderPaint);
+//        canvas.drawPath(surface.boxPath, surface.borderPaint);
         float weekTextY = surface.monthHeight + surface.weekHeight * 3 / 4f;
         float weekTextY = surface.monthHeight + surface.weekHeight * 3 / 4f;
         for (int i = 0; i < surface.weekText.length; i++) {
         for (int i = 0; i < surface.weekText.length; i++) {
             float weekTextX = i
             float weekTextX = i
@@ -126,19 +126,21 @@ public class CalendarView extends View implements View.OnTouchListener {
             } else if (isNextMonth(i)) {//是下个月日期
             } else if (isNextMonth(i)) {//是下个月日期
                 color = surface.borderColor;
                 color = surface.borderColor;
             } else {//是这个月日期
             } else {//是这个月日期
-                if (taskDay != null && taskDay.size() > 0) {//如果有的日期又任务
-                    for (int j : taskDay) {
-                        if (j == date[i]) {//当前日期为由任务日期
-                            drawTask(canvas, i, color);
-                        }
-                    }
-
+                drawTask(canvas, i);
+                if (todayIndex != -1 && i == todayIndex) {
+                    color = surface.todayNumberColor;
+                    drawCellText(canvas, i, "今", color);
+                } else {
+                    drawCellText(canvas, i, date[i] + "", color);
                 }
                 }
+//                if (taskDay != null && taskDay.size() > 0) {//如果有的日期又任务
+//                    for (int j : taskDay) {
+//                        if (j == date[i]) {//当前日期为由任务日期
+//
+//                        }
+//                    }
+//                }
             }
             }
-            if (todayIndex != -1 && i == todayIndex) {
-                color = surface.todayNumberColor;
-            }
-            drawCellText(canvas, i, date[i] + "", color);
         }
         }
         super.onDraw(canvas);
         super.onDraw(canvas);
     }
     }
@@ -194,17 +196,17 @@ public class CalendarView extends View implements View.OnTouchListener {
      * @param canvas
      * @param canvas
      * @param index
      * @param index
      */
      */
-    private void drawTask(Canvas canvas, int index, int color) {
+    private void drawTask(Canvas canvas, int index) {
         int x = getXByIndex(index);
         int x = getXByIndex(index);
         int y = getYByIndex(index);
         int y = getYByIndex(index);
-        surface.datePaint.setColor(color);
         float cellY = surface.monthHeight + surface.weekHeight + (y - 1)
         float cellY = surface.monthHeight + surface.weekHeight + (y - 1)
                 * surface.cellHeight + //当前日期框最上方
                 * surface.cellHeight + //当前日期框最上方
-                surface.cellHeight - 5f;
+                surface.cellHeight / 2;//当前框的中心Y
         float cellX = (surface.cellWidth * (x - 1)) //当前日期框左边框
         float cellX = (surface.cellWidth * (x - 1)) //当前日期框左边框
-                + (surface.cellWidth - surface.datePaint.measureText("*")) - 5f;
-        surface.datePaint.setColor(Color.RED);
-        canvas.drawText("*", cellX, cellY, surface.datePaint);
+                + surface.cellWidth / 2;//当前中心X
+        float radius = Math.min(surface.cellHeight, surface.cellWidth) / 2 - 10;//获取最短的长度的
+// 绘制圆,参数一是中心点的x轴,参数二是中心点的y轴,参数三是半径,参数四是paint对象;
+        canvas.drawCircle(cellX, cellY, radius, surface.circlePaint);
     }
     }
 
 
     /**
     /**
@@ -226,6 +228,8 @@ public class CalendarView extends View implements View.OnTouchListener {
     }
     }
 
 
     /**
     /**
+     * 画被点击的背景
+     *
      * @param canvas
      * @param canvas
      * @param index
      * @param index
      * @param color
      * @param color
@@ -233,13 +237,22 @@ public class CalendarView extends View implements View.OnTouchListener {
     private void drawCellBg(Canvas canvas, int index, int color) {
     private void drawCellBg(Canvas canvas, int index, int color) {
         int x = getXByIndex(index);
         int x = getXByIndex(index);
         int y = getYByIndex(index);
         int y = getYByIndex(index);
-        surface.cellBgPaint.setColor(color);
-        float left = surface.cellWidth * (x - 1) + surface.borderWidth;
-        float top = surface.monthHeight + surface.weekHeight + (y - 1)
-                * surface.cellHeight + surface.borderWidth;
-        canvas.drawRect(left, top, left + surface.cellWidth
-                - surface.borderWidth, top + surface.cellHeight
-                - surface.borderWidth, surface.cellBgPaint);
+//        surface.cellBgPaint.setColor(color);
+//        float left = surface.cellWidth * (x - 1) + surface.borderWidth;
+//        float top = surface.monthHeight + surface.weekHeight + (y - 1)
+//                * surface.cellHeight + surface.borderWidth;
+//        canvas.drawRect(left, top, left + surface.cellWidth
+//                - surface.borderWidth, top + surface.cellHeight
+//                - surface.borderWidth, surface.cellBgPaint);
+        float cellY = surface.monthHeight + surface.weekHeight + (y - 1)
+                * surface.cellHeight + //当前日期框最上方
+                surface.cellHeight / 2;//当前框的中心Y
+        float cellX = (surface.cellWidth * (x - 1)) //当前日期框左边框
+                + surface.cellWidth / 2;//当前中心X
+        float radius = Math.min(surface.cellHeight, surface.cellWidth) / 2 - 10;//获取最短的长度的
+// 绘制圆,参数一是中心点的x轴,参数二是中心点的y轴,参数三是半径,参数四是paint对象;
+        canvas.drawCircle(cellX, cellY, radius, surface.cellBgPaint);
+
     }
     }
 
 
     private void drawDownOrSelectedBg(Canvas canvas) {
     private void drawDownOrSelectedBg(Canvas canvas) {
@@ -450,11 +463,12 @@ public class CalendarView extends View implements View.OnTouchListener {
         private int borderColor = Color.parseColor("#CCCCCC");
         private int borderColor = Color.parseColor("#CCCCCC");
         public int todayNumberColor = Color.RED;
         public int todayNumberColor = Color.RED;
         public int cellDownColor = Color.parseColor("#CCFFFF");
         public int cellDownColor = Color.parseColor("#CCFFFF");
-        public int cellSelectedColor = Color.parseColor("#99CCFF");
+        public int cellSelectedColor = Color.parseColor("#FF69B4");
         public Paint borderPaint;
         public Paint borderPaint;
         public Paint monthPaint;
         public Paint monthPaint;
         public Paint weekPaint;
         public Paint weekPaint;
         public Paint datePaint;
         public Paint datePaint;
+        public Paint circlePaint;
         public Paint monthChangeBtnPaint;
         public Paint monthChangeBtnPaint;
         public Paint cellBgPaint;
         public Paint cellBgPaint;
         public Path boxPath; // 边框路径
         public Path boxPath; // 边框路径
@@ -487,6 +501,12 @@ public class CalendarView extends View implements View.OnTouchListener {
             datePaint = new Paint();
             datePaint = new Paint();
             datePaint.setColor(textColor);
             datePaint.setColor(textColor);
             datePaint.setAntiAlias(true);
             datePaint.setAntiAlias(true);
+            circlePaint = new Paint();
+            circlePaint.setColor(Color.RED);
+            circlePaint.setAntiAlias(true);//抗锯齿 不然会不好看
+            circlePaint.setFilterBitmap(true);
+            circlePaint.setStyle(Paint.Style.STROKE);//空心
+            circlePaint.setStrokeWidth(3);
             float cellTextSize = cellHeight * 0.5f;
             float cellTextSize = cellHeight * 0.5f;
             datePaint.setTextSize(cellTextSize);
             datePaint.setTextSize(cellTextSize);
             datePaint.setTypeface(Typeface.DEFAULT_BOLD);
             datePaint.setTypeface(Typeface.DEFAULT_BOLD);

+ 0 - 8
WeiChat/src/main/res/drawable/bg_btn_pass.xml

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <shape>
-        <solid android:color="@color/btn_login_press" />
-        <corners android:radius="8dp" />
-        <padding android:bottom="0.5dp" android:left="0.5dp" android:right="0.5dp" android:top="0.5dp" />
-    </shape>
-</selector>

+ 3 - 0
WeiChat/src/main/res/layout/activity_meet_details.xml

@@ -175,6 +175,7 @@
                 android:layout_marginTop="5dp"
                 android:layout_marginTop="5dp"
                 android:text="无"
                 android:text="无"
                 android:textColor="@color/text_hine" />
                 android:textColor="@color/text_hine" />
+
             <TextView
             <TextView
                 android:id="@+id/user"
                 android:id="@+id/user"
                 android:layout_width="wrap_content"
                 android:layout_width="wrap_content"
@@ -229,6 +230,7 @@
                 android:layout_height="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_below="@+id/click_btn"
                 android:layout_below="@+id/click_btn"
                 android:layout_centerHorizontal="true"
                 android:layout_centerHorizontal="true"
+                android:layout_marginTop="10dp"
                 android:orientation="horizontal">
                 android:orientation="horizontal">
 
 
                 <TextView
                 <TextView
@@ -245,6 +247,7 @@
                     android:id="@+id/location_tag"
                     android:id="@+id/location_tag"
                     android:layout_width="wrap_content"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_height="wrap_content"
+                    android:clickable="true"
                     android:text="@string/agare"
                     android:text="@string/agare"
                     android:textColor="@color/blue" />
                     android:textColor="@color/blue" />
 
 

+ 1 - 1
WeiChat/src/main/res/layout/activity_meet_select.xml

@@ -5,7 +5,7 @@
     android:layout_height="match_parent"
     android:layout_height="match_parent"
     android:background="@drawable/bg_main"
     android:background="@drawable/bg_main"
     android:padding="10dp"
     android:padding="10dp"
-    tools:context="com.xzjmyk.pm.activity.ui.erp.activity.oa.MeetSelectActivity">
+    tools:context=".ui.erp.activity.oa.UserSelectActivity">
 
 
     <com.xzjmyk.pm.activity.view.ClearEditText
     <com.xzjmyk.pm.activity.view.ClearEditText
         android:id="@+id/search_edit"
         android:id="@+id/search_edit"

+ 0 - 7
WeiChat/src/main/res/layout/activity_oa.xml

@@ -7,8 +7,6 @@
     android:focusable="true"
     android:focusable="true"
     android:focusableInTouchMode="true"
     android:focusableInTouchMode="true"
     tools:context="com.xzjmyk.pm.activity.ui.erp.activity.crm.ClientActivity">
     tools:context="com.xzjmyk.pm.activity.ui.erp.activity.crm.ClientActivity">
-
-
     <LinearLayout
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:layout_height="match_parent"
@@ -22,8 +20,6 @@
             android:text="O A"
             android:text="O A"
             android:textColor="@color/white"
             android:textColor="@color/white"
             android:textSize="35dp" />
             android:textSize="35dp" />
-
-
         <LinearLayout
         <LinearLayout
             android:id="@+id/oa_rl_choose"
             android:id="@+id/oa_rl_choose"
             android:layout_width="match_parent"
             android:layout_width="match_parent"
@@ -31,12 +27,10 @@
             android:layout_below="@+id/toobar"
             android:layout_below="@+id/toobar"
             android:background="@color/text_black"
             android:background="@color/text_black"
             android:orientation="vertical">
             android:orientation="vertical">
-
             <LinearLayout
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_height="wrap_content"
                 android:orientation="horizontal">
                 android:orientation="horizontal">
-
                 <LinearLayout
                 <LinearLayout
                     android:id="@+id/ll_signin"
                     android:id="@+id/ll_signin"
                     android:layout_width="0dp"
                     android:layout_width="0dp"
@@ -45,7 +39,6 @@
                     android:clickable="true"
                     android:clickable="true"
                     android:gravity="center"
                     android:gravity="center"
                     android:orientation="vertical">
                     android:orientation="vertical">
-
                     <Button
                     <Button
                         style="@style/oa_btn_style"
                         style="@style/oa_btn_style"
                         android:background="@drawable/text_button_stye" />
                         android:background="@drawable/text_button_stye" />

+ 13 - 19
WeiChat/src/main/res/layout/activity_task_add.xml

@@ -30,11 +30,10 @@
                 android:textSize="@dimen/text_main" />
                 android:textSize="@dimen/text_main" />
 
 
             <EditText
             <EditText
-                android:background="@null"
                 android:id="@+id/tv_name"
                 android:id="@+id/tv_name"
                 style="@style/IMTbleLine_TextValue"
                 style="@style/IMTbleLine_TextValue"
                 android:layout_toRightOf="@+id/name_text"
                 android:layout_toRightOf="@+id/name_text"
-                android:text="2016-07-05"
+                android:background="@null"
                 android:textColor="@color/text_hine"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
                 android:textSize="@dimen/text_hine" />
 
 
@@ -59,12 +58,12 @@
                 android:textSize="@dimen/text_main" />
                 android:textSize="@dimen/text_main" />
 
 
             <EditText
             <EditText
-                android:background="@null"
                 android:id="@+id/tv_executive"
                 android:id="@+id/tv_executive"
                 style="@style/IMTbleLine_TextValue"
                 style="@style/IMTbleLine_TextValue"
                 android:layout_toLeftOf="@+id/sex_arrow_img"
                 android:layout_toLeftOf="@+id/sex_arrow_img"
                 android:layout_toRightOf="@+id/sex_text"
                 android:layout_toRightOf="@+id/sex_text"
-                android:text="深圳市******"
+                android:background="@null"
+                android:focusable="false"
                 android:textColor="@color/text_hine"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
                 android:textSize="@dimen/text_hine" />
 
 
@@ -98,12 +97,12 @@
                 android:textSize="@dimen/text_main" />
                 android:textSize="@dimen/text_main" />
 
 
             <EditText
             <EditText
-                android:background="@null"
                 android:id="@+id/tv_date"
                 android:id="@+id/tv_date"
                 style="@style/IMTbleLine_TextValue"
                 style="@style/IMTbleLine_TextValue"
                 android:layout_toLeftOf="@+id/company_arrow_img"
                 android:layout_toLeftOf="@+id/company_arrow_img"
                 android:layout_toRightOf="@+id/company_text"
                 android:layout_toRightOf="@+id/company_text"
-                android:text="北京******公司"
+                android:background="@null"
+                android:focusable="false"
                 android:textColor="@color/text_hine"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
                 android:textSize="@dimen/text_hine" />
 
 
@@ -137,12 +136,12 @@
                 android:textSize="@dimen/text_main" />
                 android:textSize="@dimen/text_main" />
 
 
             <EditText
             <EditText
-                android:background="@null"
                 android:id="@+id/tv_priority"
                 android:id="@+id/tv_priority"
                 style="@style/IMTbleLine_TextValue"
                 style="@style/IMTbleLine_TextValue"
                 android:layout_toLeftOf="@+id/deparment_arrow_img"
                 android:layout_toLeftOf="@+id/deparment_arrow_img"
                 android:layout_toRightOf="@+id/deparment_text"
                 android:layout_toRightOf="@+id/deparment_text"
-                android:text="***"
+                android:background="@null"
+                android:focusable="false"
                 android:textColor="@color/text_hine"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
                 android:textSize="@dimen/text_hine" />
 
 
@@ -175,12 +174,11 @@
                 android:textColor="@color/text_main"
                 android:textColor="@color/text_main"
                 android:textSize="@dimen/text_main" />
                 android:textSize="@dimen/text_main" />
 
 
-            <EditText
-                android:background="@null"
+            <TextView
                 android:id="@+id/tv_type"
                 android:id="@+id/tv_type"
                 style="@style/IMTbleLine_TextValue"
                 style="@style/IMTbleLine_TextValue"
                 android:layout_toRightOf="@+id/position_text"
                 android:layout_toRightOf="@+id/position_text"
-                android:text="xxxxx"
+                android:background="@null"
                 android:textColor="@color/text_hine"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
                 android:textSize="@dimen/text_hine" />
 
 
@@ -205,16 +203,14 @@
                 android:textSize="@dimen/text_main" />
                 android:textSize="@dimen/text_main" />
 
 
             <EditText
             <EditText
-                android:background="@null"
                 android:id="@+id/tv_customer"
                 android:id="@+id/tv_customer"
                 style="@style/IMTbleLine_TextValue"
                 style="@style/IMTbleLine_TextValue"
                 android:layout_marginBottom="1dp"
                 android:layout_marginBottom="1dp"
                 android:layout_toLeftOf="@+id/customer_arrow_img"
                 android:layout_toLeftOf="@+id/customer_arrow_img"
                 android:layout_toRightOf="@+id/customer_text"
                 android:layout_toRightOf="@+id/customer_text"
-                android:text="xxxxx"
+                android:background="@null"
                 android:textColor="@color/text_hine"
                 android:textColor="@color/text_hine"
-                android:textSize="@dimen/text_hine"
-                 />
+                android:textSize="@dimen/text_hine" />
 
 
             <ImageView
             <ImageView
                 android:id="@+id/customer_arrow_img"
                 android:id="@+id/customer_arrow_img"
@@ -247,12 +243,11 @@
                 android:textSize="@dimen/text_main" />
                 android:textSize="@dimen/text_main" />
 
 
             <EditText
             <EditText
-                android:background="@null"
                 android:id="@+id/tv_notice"
                 android:id="@+id/tv_notice"
                 style="@style/IMTbleLine_TextValue"
                 style="@style/IMTbleLine_TextValue"
                 android:layout_toLeftOf="@+id/startTime_arrow_img"
                 android:layout_toLeftOf="@+id/startTime_arrow_img"
                 android:layout_toRightOf="@+id/startTime_text"
                 android:layout_toRightOf="@+id/startTime_text"
-                android:text="xxxxx"
+                android:background="@null"
                 android:textColor="@color/text_hine"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
                 android:textSize="@dimen/text_hine" />
 
 
@@ -288,11 +283,10 @@
                 android:textSize="@dimen/text_main" />
                 android:textSize="@dimen/text_main" />
 
 
             <EditText
             <EditText
-                android:background="@null"
                 android:id="@+id/tv_content"
                 android:id="@+id/tv_content"
                 style="@style/IMTbleLine_TextValue"
                 style="@style/IMTbleLine_TextValue"
                 android:layout_toRightOf="@+id/email_text"
                 android:layout_toRightOf="@+id/email_text"
-                android:text="xxxxx"
+                android:background="@null"
                 android:textColor="@color/text_hine"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
                 android:textSize="@dimen/text_hine" />
 
 

+ 24 - 20
WeiChat/src/main/res/layout/activity_visit_report_add.xml

@@ -30,12 +30,11 @@
                 android:textSize="@dimen/text_main" />
                 android:textSize="@dimen/text_main" />
 
 
             <EditText
             <EditText
-                android:background="@null"
                 android:id="@+id/tv_date_select"
                 android:id="@+id/tv_date_select"
                 style="@style/IMTbleLine_TextValue"
                 style="@style/IMTbleLine_TextValue"
                 android:layout_toLeftOf="@+id/name_arrow_img"
                 android:layout_toLeftOf="@+id/name_arrow_img"
                 android:layout_toRightOf="@+id/date_text"
                 android:layout_toRightOf="@+id/date_text"
-                android:text="2016-07-05"
+                android:background="@null"
                 android:textColor="@color/text_hine"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
                 android:textSize="@dimen/text_hine" />
 
 
@@ -69,12 +68,11 @@
                 android:textSize="@dimen/text_main" />
                 android:textSize="@dimen/text_main" />
 
 
             <EditText
             <EditText
-                android:background="@null"
                 android:id="@+id/tv_address_login"
                 android:id="@+id/tv_address_login"
                 style="@style/IMTbleLine_TextValue"
                 style="@style/IMTbleLine_TextValue"
                 android:layout_toLeftOf="@+id/address_arrow_img"
                 android:layout_toLeftOf="@+id/address_arrow_img"
                 android:layout_toRightOf="@+id/address_text"
                 android:layout_toRightOf="@+id/address_text"
-                android:text="深圳市******"
+                android:background="@null"
                 android:textColor="@color/text_hine"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
                 android:textSize="@dimen/text_hine" />
 
 
@@ -89,15 +87,21 @@
                 android:contentDescription="@string/app_name" />
                 android:contentDescription="@string/app_name" />
         </RelativeLayout>
         </RelativeLayout>
 
 
-        <TextView
+        <RelativeLayout
             android:layout_width="match_parent"
             android:layout_width="match_parent"
-            android:layout_height="40dp"
-            android:layout_marginRight="10dp"
-            android:gravity="right|center_vertical"
-            android:text="定位不准?点我重试"
-            android:textColor="#415dea"
-            android:textSize="13sp"
-            android:id="@+id/tv_address_refresh" />
+            android:layout_height="40dp">
+
+            <TextView
+                android:id="@+id/tv_address_refresh"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerVertical="true"
+                android:layout_alignParentRight="true"
+                android:layout_marginRight="10dp"
+                android:text="定位不准?点我重试"
+                android:textColor="#415dea"
+                android:textSize="13sp" />
+        </RelativeLayout>
 
 
         <RelativeLayout
         <RelativeLayout
             android:id="@+id/customer_erp_rl"
             android:id="@+id/customer_erp_rl"
@@ -118,11 +122,11 @@
                 android:textSize="@dimen/text_main" />
                 android:textSize="@dimen/text_main" />
 
 
             <EditText
             <EditText
-                android:background="@null"
                 android:id="@+id/tv_customer_login"
                 android:id="@+id/tv_customer_login"
                 style="@style/IMTbleLine_TextValue"
                 style="@style/IMTbleLine_TextValue"
                 android:layout_toLeftOf="@+id/company_arrow_img"
                 android:layout_toLeftOf="@+id/company_arrow_img"
                 android:layout_toRightOf="@+id/company_text"
                 android:layout_toRightOf="@+id/company_text"
+                android:background="@null"
                 android:text="北京******公司"
                 android:text="北京******公司"
                 android:textColor="@color/text_hine"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
                 android:textSize="@dimen/text_hine" />
@@ -157,11 +161,11 @@
                 android:textSize="@dimen/text_main" />
                 android:textSize="@dimen/text_main" />
 
 
             <EditText
             <EditText
-                android:background="@null"
                 android:id="@+id/tv_linksman_login"
                 android:id="@+id/tv_linksman_login"
                 style="@style/IMTbleLine_TextValue"
                 style="@style/IMTbleLine_TextValue"
                 android:layout_toLeftOf="@+id/deparment_arrow_img"
                 android:layout_toLeftOf="@+id/deparment_arrow_img"
                 android:layout_toRightOf="@+id/deparment_text"
                 android:layout_toRightOf="@+id/deparment_text"
+                android:background="@null"
                 android:text="***"
                 android:text="***"
                 android:textColor="@color/text_hine"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
                 android:textSize="@dimen/text_hine" />
@@ -196,11 +200,11 @@
                 android:textSize="@dimen/text_main" />
                 android:textSize="@dimen/text_main" />
 
 
             <EditText
             <EditText
-                android:background="@null"
                 android:id="@+id/tv_visit_login"
                 android:id="@+id/tv_visit_login"
                 style="@style/IMTbleLine_TextValue"
                 style="@style/IMTbleLine_TextValue"
                 android:layout_toLeftOf="@+id/position_arrow_img"
                 android:layout_toLeftOf="@+id/position_arrow_img"
                 android:layout_toRightOf="@+id/position_text"
                 android:layout_toRightOf="@+id/position_text"
+                android:background="@null"
                 android:text="xxxxx"
                 android:text="xxxxx"
                 android:textColor="@color/text_hine"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
                 android:textSize="@dimen/text_hine" />
@@ -235,12 +239,12 @@
                 android:textSize="@dimen/text_main" />
                 android:textSize="@dimen/text_main" />
 
 
             <EditText
             <EditText
-                android:background="@null"
                 android:id="@+id/tv_depart_login"
                 android:id="@+id/tv_depart_login"
                 style="@style/IMTbleLine_TextValue"
                 style="@style/IMTbleLine_TextValue"
                 android:layout_marginBottom="1dp"
                 android:layout_marginBottom="1dp"
                 android:layout_toLeftOf="@+id/tel_arrow_img"
                 android:layout_toLeftOf="@+id/tel_arrow_img"
                 android:layout_toRightOf="@+id/tel_text"
                 android:layout_toRightOf="@+id/tel_text"
+                android:background="@null"
                 android:text="xxxxx"
                 android:text="xxxxx"
                 android:textColor="@color/text_hine"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
                 android:textSize="@dimen/text_hine" />
@@ -276,11 +280,11 @@
                 android:textSize="@dimen/text_main" />
                 android:textSize="@dimen/text_main" />
 
 
             <EditText
             <EditText
-                android:background="@null"
                 android:id="@+id/tv_startTim_login"
                 android:id="@+id/tv_startTim_login"
                 style="@style/IMTbleLine_TextValue"
                 style="@style/IMTbleLine_TextValue"
                 android:layout_toLeftOf="@+id/startTime_arrow_img"
                 android:layout_toLeftOf="@+id/startTime_arrow_img"
                 android:layout_toRightOf="@+id/startTime_text"
                 android:layout_toRightOf="@+id/startTime_text"
+                android:background="@null"
                 android:text="xxxxx"
                 android:text="xxxxx"
                 android:textColor="@color/text_hine"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
                 android:textSize="@dimen/text_hine" />
@@ -316,11 +320,11 @@
                 android:textSize="@dimen/text_main" />
                 android:textSize="@dimen/text_main" />
 
 
             <EditText
             <EditText
-                android:background="@null"
                 android:id="@+id/tv_endTime_login"
                 android:id="@+id/tv_endTime_login"
                 style="@style/IMTbleLine_TextValue"
                 style="@style/IMTbleLine_TextValue"
                 android:layout_toLeftOf="@+id/email_arrow_img"
                 android:layout_toLeftOf="@+id/email_arrow_img"
                 android:layout_toRightOf="@+id/email_text"
                 android:layout_toRightOf="@+id/email_text"
+                android:background="@null"
                 android:text="xxxxx"
                 android:text="xxxxx"
                 android:textColor="@color/text_hine"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
                 android:textSize="@dimen/text_hine" />
@@ -355,11 +359,11 @@
                 android:textSize="@dimen/text_main" />
                 android:textSize="@dimen/text_main" />
 
 
             <EditText
             <EditText
-                android:background="@null"
                 android:id="@+id/tv_businessState_login"
                 android:id="@+id/tv_businessState_login"
                 style="@style/IMTbleLine_TextValue"
                 style="@style/IMTbleLine_TextValue"
                 android:layout_toLeftOf="@+id/businessState_arrow_img"
                 android:layout_toLeftOf="@+id/businessState_arrow_img"
                 android:layout_toRightOf="@+id/businessState_text"
                 android:layout_toRightOf="@+id/businessState_text"
+                android:background="@null"
                 android:text="xxxxx"
                 android:text="xxxxx"
                 android:textColor="@color/text_hine"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
                 android:textSize="@dimen/text_hine" />
@@ -394,11 +398,11 @@
                 android:textSize="@dimen/text_main" />
                 android:textSize="@dimen/text_main" />
 
 
             <EditText
             <EditText
-                android:background="@null"
                 android:id="@+id/tv_notes_login"
                 android:id="@+id/tv_notes_login"
                 style="@style/IMTbleLine_TextValue"
                 style="@style/IMTbleLine_TextValue"
                 android:layout_toLeftOf="@+id/notes_arrow_img"
                 android:layout_toLeftOf="@+id/notes_arrow_img"
                 android:layout_toRightOf="@+id/notes_text"
                 android:layout_toRightOf="@+id/notes_text"
+                android:background="@null"
                 android:text="xxxxx"
                 android:text="xxxxx"
                 android:textColor="@color/text_hine"
                 android:textColor="@color/text_hine"
                 android:textSize="@dimen/text_hine" />
                 android:textSize="@dimen/text_hine" />

+ 36 - 31
WeiChat/src/main/res/layout/activity_visit_report_plan.xml

@@ -7,10 +7,10 @@
     tools:context="com.xzjmyk.pm.activity.ui.erp.activity.crm.VisitReportPlanActivity">
     tools:context="com.xzjmyk.pm.activity.ui.erp.activity.crm.VisitReportPlanActivity">
 
 
     <RelativeLayout
     <RelativeLayout
-        android:layout_marginBottom="20dp"
-        android:background="@color/white"
         android:id="@+id/rl_dateSelect"
         android:id="@+id/rl_dateSelect"
-        style="@style/IMTbleLine_UP_Me">
+        style="@style/IMTbleLine_UP_Me"
+        android:layout_marginBottom="20dp"
+        android:background="@color/white">
 
 
         <TextView
         <TextView
             android:id="@+id/date_text"
             android:id="@+id/date_text"
@@ -25,12 +25,11 @@
             android:textSize="@dimen/text_main" />
             android:textSize="@dimen/text_main" />
 
 
         <EditText
         <EditText
-            android:background="@null"
             android:id="@+id/tv_date_select"
             android:id="@+id/tv_date_select"
             style="@style/IMTbleLine_TextValue"
             style="@style/IMTbleLine_TextValue"
             android:layout_toLeftOf="@+id/name_arrow_img"
             android:layout_toLeftOf="@+id/name_arrow_img"
             android:layout_toRightOf="@+id/date_text"
             android:layout_toRightOf="@+id/date_text"
-            android:text="2016-07-05"
+            android:background="@null"
             android:textColor="@color/text_hine"
             android:textColor="@color/text_hine"
             android:textSize="@dimen/text_hine" />
             android:textSize="@dimen/text_hine" />
 
 
@@ -46,10 +45,10 @@
     </RelativeLayout>
     </RelativeLayout>
 
 
     <RelativeLayout
     <RelativeLayout
-        android:layout_marginBottom="1dp"
-        android:background="@color/white"
         android:id="@+id/address_erp_rl"
         android:id="@+id/address_erp_rl"
-        style="@style/IMTbleLine_UP_Me">
+        style="@style/IMTbleLine_UP_Me"
+        android:layout_marginBottom="1dp"
+        android:background="@color/white">
 
 
         <TextView
         <TextView
             android:id="@+id/address_text"
             android:id="@+id/address_text"
@@ -58,19 +57,18 @@
             android:layout_centerVertical="true"
             android:layout_centerVertical="true"
             android:drawableLeft="@drawable/oa_signin"
             android:drawableLeft="@drawable/oa_signin"
             android:drawablePadding="10dp"
             android:drawablePadding="10dp"
+            android:editable="true"
             android:gravity="center"
             android:gravity="center"
             android:text="地址"
             android:text="地址"
             android:textColor="@color/text_main"
             android:textColor="@color/text_main"
-            android:textSize="@dimen/text_main"
-            android:editable="true" />
+            android:textSize="@dimen/text_main" />
 
 
         <EditText
         <EditText
-            android:background="@null"
             android:id="@+id/tv_address_login"
             android:id="@+id/tv_address_login"
             style="@style/IMTbleLine_TextValue"
             style="@style/IMTbleLine_TextValue"
             android:layout_toLeftOf="@+id/address_arrow_img"
             android:layout_toLeftOf="@+id/address_arrow_img"
             android:layout_toRightOf="@+id/address_text"
             android:layout_toRightOf="@+id/address_text"
-            android:text="深圳市******"
+            android:background="@null"
             android:textColor="@color/text_hine"
             android:textColor="@color/text_hine"
             android:textSize="@dimen/text_hine" />
             android:textSize="@dimen/text_hine" />
 
 
@@ -85,21 +83,28 @@
             android:contentDescription="@string/app_name" />
             android:contentDescription="@string/app_name" />
     </RelativeLayout>
     </RelativeLayout>
 
 
-    <TextView
-        android:layout_marginRight="10dp"
-        android:text="定位不准?点我重试"
-        android:textSize="13sp"
-        android:textColor="@color/light_green"
-        android:gravity="right|center_vertical"
+    <RelativeLayout
         android:layout_width="match_parent"
         android:layout_width="match_parent"
-        android:layout_height="40dp"
-        android:id="@+id/tv_address_refresh" />
+        android:layout_height="40dp">
+
+        <TextView
+            android:id="@+id/tv_address_refresh"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_alignParentRight="true"
+            android:layout_centerVertical="true"
+            android:layout_marginRight="10dp"
+            android:text="定位不准?点我重试"
+            android:textColor="@color/light_green"
+            android:textSize="13sp" />
+    </RelativeLayout>
+
 
 
     <RelativeLayout
     <RelativeLayout
-        android:layout_marginBottom="1dp"
-        android:background="@color/white"
         android:id="@+id/customer_erp_rl"
         android:id="@+id/customer_erp_rl"
-        style="@style/IMTbleLine_UP_Me">
+        style="@style/IMTbleLine_UP_Me"
+        android:layout_marginBottom="1dp"
+        android:background="@color/white">
 
 
         <TextView
         <TextView
             android:id="@+id/company_text"
             android:id="@+id/company_text"
@@ -114,11 +119,11 @@
             android:textSize="@dimen/text_main" />
             android:textSize="@dimen/text_main" />
 
 
         <EditText
         <EditText
-            android:background="@null"
             android:id="@+id/tv_customer_login"
             android:id="@+id/tv_customer_login"
             style="@style/IMTbleLine_TextValue"
             style="@style/IMTbleLine_TextValue"
             android:layout_toLeftOf="@+id/company_arrow_img"
             android:layout_toLeftOf="@+id/company_arrow_img"
             android:layout_toRightOf="@+id/company_text"
             android:layout_toRightOf="@+id/company_text"
+            android:background="@null"
             android:text="北京******公司"
             android:text="北京******公司"
             android:textColor="@color/text_hine"
             android:textColor="@color/text_hine"
             android:textSize="@dimen/text_hine" />
             android:textSize="@dimen/text_hine" />
@@ -135,10 +140,10 @@
     </RelativeLayout>
     </RelativeLayout>
 
 
     <RelativeLayout
     <RelativeLayout
-        android:layout_marginBottom="1dp"
-        android:background="@color/white"
         android:id="@+id/linksman_erp_rl"
         android:id="@+id/linksman_erp_rl"
-        style="@style/IMTbleLine_UP_Me">
+        style="@style/IMTbleLine_UP_Me"
+        android:layout_marginBottom="1dp"
+        android:background="@color/white">
 
 
         <TextView
         <TextView
             android:id="@+id/deparment_text"
             android:id="@+id/deparment_text"
@@ -153,11 +158,11 @@
             android:textSize="@dimen/text_main" />
             android:textSize="@dimen/text_main" />
 
 
         <EditText
         <EditText
-            android:background="@null"
             android:id="@+id/tv_linksman_login"
             android:id="@+id/tv_linksman_login"
             style="@style/IMTbleLine_TextValue"
             style="@style/IMTbleLine_TextValue"
             android:layout_toLeftOf="@+id/deparment_arrow_img"
             android:layout_toLeftOf="@+id/deparment_arrow_img"
             android:layout_toRightOf="@+id/deparment_text"
             android:layout_toRightOf="@+id/deparment_text"
+            android:background="@null"
             android:text="***"
             android:text="***"
             android:textColor="@color/text_hine"
             android:textColor="@color/text_hine"
             android:textSize="@dimen/text_hine" />
             android:textSize="@dimen/text_hine" />
@@ -174,9 +179,9 @@
     </RelativeLayout>
     </RelativeLayout>
 
 
     <RelativeLayout
     <RelativeLayout
-        android:background="@color/white"
         android:id="@+id/visit_erp_rl"
         android:id="@+id/visit_erp_rl"
-        style="@style/IMTbleLine_UP_Me">
+        style="@style/IMTbleLine_UP_Me"
+        android:background="@color/white">
 
 
         <TextView
         <TextView
             android:id="@+id/position_text"
             android:id="@+id/position_text"
@@ -191,11 +196,11 @@
             android:textSize="@dimen/text_main" />
             android:textSize="@dimen/text_main" />
 
 
         <EditText
         <EditText
-            android:background="@null"
             android:id="@+id/tv_visit_login"
             android:id="@+id/tv_visit_login"
             style="@style/IMTbleLine_TextValue"
             style="@style/IMTbleLine_TextValue"
             android:layout_toLeftOf="@+id/position_arrow_img"
             android:layout_toLeftOf="@+id/position_arrow_img"
             android:layout_toRightOf="@+id/position_text"
             android:layout_toRightOf="@+id/position_text"
+            android:background="@null"
             android:text="xxxxx"
             android:text="xxxxx"
             android:textColor="@color/text_hine"
             android:textColor="@color/text_hine"
             android:textSize="@dimen/text_hine" />
             android:textSize="@dimen/text_hine" />