Browse Source

新增单据完成!

Arison 9 years ago
parent
commit
75affc8a58
36 changed files with 2054 additions and 490 deletions
  1. 20 17
      WeiChat/src/main/AndroidManifest.xml
  2. 2 5
      WeiChat/src/main/java/com/xzjmyk/pm/activity/BdLocationHelper.java
  3. 25 33
      WeiChat/src/main/java/com/xzjmyk/pm/activity/bean/oa/MeetBean.java
  4. 84 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/bean/oa/MeetEntity.java
  5. 85 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/bean/oa/MeetUserEntity.java
  6. 170 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/bean/oa/MeetingDocBean.java
  7. 0 28
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/AddTaskActivity.java
  8. 256 24
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/AddMeetingActivity.java
  9. 43 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/MeetDetailsActivity.java
  10. 181 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/MeetSelectActivity.java
  11. 72 16
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/MeetingActivity.java
  12. 93 23
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/OAActivity.java
  13. 49 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/OARegisterActivity.java
  14. 34 10
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/OutSigninOKActivity.java
  15. 63 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/OutofficeSetActivity.java
  16. 76 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/SaveMeetActivity.java
  17. 40 9
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/fragment/OutofficeFragment.java
  18. 150 8
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/fragment/SigninFragment.java
  19. 24 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/util/AutoCreateRoomUtil.java
  20. 4 4
      WeiChat/src/main/java/com/xzjmyk/pm/activity/util/BaiduMapUtil.java
  21. 5 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/util/TimeUtils.java
  22. 169 0
      WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/OptionPicker.java
  23. 1 1
      WeiChat/src/main/res/drawable/button_round_shape.xml
  24. 10 0
      WeiChat/src/main/res/drawable/button_signin.xml
  25. 231 248
      WeiChat/src/main/res/layout/activity_add_meeting.xml
  26. 2 0
      WeiChat/src/main/res/layout/activity_meet_details.xml
  27. 32 0
      WeiChat/src/main/res/layout/activity_meet_select.xml
  28. 4 2
      WeiChat/src/main/res/layout/activity_oa.xml
  29. 8 4
      WeiChat/src/main/res/layout/activity_out_signin_ok.xml
  30. 24 7
      WeiChat/src/main/res/layout/activity_outoffice_set.xml
  31. 12 0
      WeiChat/src/main/res/layout/activity_save_meet.xml
  32. 26 27
      WeiChat/src/main/res/layout/fragment_outoffice.xml
  33. 15 13
      WeiChat/src/main/res/layout/fragment_signin.xml
  34. 40 0
      WeiChat/src/main/res/layout/meet_select_item.xml
  35. 1 2
      WeiChat/src/main/res/layout/oa_meeting_item.xml
  36. 3 8
      WeiChat/src/main/res/values/gpm_values.xml

+ 20 - 17
WeiChat/src/main/AndroidManifest.xml

@@ -3,7 +3,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     package="com.xzjmyk.pm.activity"
     android:versionCode="45"
-    android:versionName="4.5" >
+    android:versionName="4.5">
 
     <uses-sdk
         android:minSdkVersion="11"
@@ -70,7 +70,7 @@
         android:allowBackup="true"
         android:icon="@drawable/uuu"
         android:label="@string/app_name"
-        android:theme="@style/AppTheme" >
+        android:theme="@style/AppTheme">
         <meta-data
             android:name="UMENG_APPKEY"
             android:value="574504a167e58eec520017df" />
@@ -81,7 +81,7 @@
         <!-- 启动页面 -->
         <activity
             android:name=".ui.SplashActivity"
-            android:theme="@style/SplashTheme" >
+            android:theme="@style/SplashTheme">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 
@@ -241,7 +241,7 @@
             android:exported="true"
             android:icon="@drawable/ic_chooser"
             android:label="@string/choose_file"
-            android:theme="@style/ChooserTheme" >
+            android:theme="@style/ChooserTheme">
             <intent-filter>
                 <action android:name="android.intent.action.GET_CONTENT" />
 
@@ -258,13 +258,13 @@
             android:enabled="@bool/use_provider"
             android:exported="true"
             android:grantUriPermissions="true"
-            android:permission="android.permission.MANAGE_DOCUMENTS" >
+            android:permission="android.permission.MANAGE_DOCUMENTS">
             <intent-filter>
                 <action android:name="android.content.action.DOCUMENTS_PROVIDER" />
             </intent-filter>
         </provider>
 
-        <receiver android:name=".broadcast.ScrenLockedBroadCastReceiver" >
+        <receiver android:name=".broadcast.ScrenLockedBroadCastReceiver">
             <intent-filter>
                 <action android:name="android.intent.action.SCREEN_OFF" />
                 <action android:name="android.intent.action.SCREEN_ON" />
@@ -291,7 +291,7 @@
         <!-- 用于接收系统消息以保证PushService正常运行 -->
         <receiver
             android:name="com.baidu.android.pushservice.PushServiceReceiver"
-            android:process=":bdservice_v1" >
+            android:process=":bdservice_v1">
             <intent-filter>
                 <action android:name="android.intent.action.BOOT_COMPLETED" />
                 <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
@@ -309,7 +309,7 @@
         <!-- Push服务接收客户端发送的各种请求 -->
         <receiver
             android:name="com.baidu.android.pushservice.RegistrationReceiver"
-            android:process=":bdservice_v1" >
+            android:process=":bdservice_v1">
             <intent-filter>
                 <action android:name="com.baidu.android.pushservice.action.METHOD" />
                 <action android:name="com.baidu.android.pushservice.action.BIND_SYNC" />
@@ -328,7 +328,7 @@
             android:name="com.baidu.android.pushservice.PushService"
             android:exported="true"
             android:persistent="true"
-            android:process=":bdservice_v1" >
+            android:process=":bdservice_v1">
             <intent-filter>
                 <action android:name="com.baidu.android.pushservice.action.PUSH_SERVICE" />
             </intent-filter>
@@ -342,7 +342,7 @@
 
 
         <!-- 此处Receiver名字修改为当前包名路径 -->
-        <receiver android:name=".ui.PushNetMessageReceiver" >
+        <receiver android:name=".ui.PushNetMessageReceiver">
             <intent-filter>
 
                 <!-- 接收push消息 -->
@@ -363,7 +363,7 @@
             </intent-filter>
         </activity>
         -->
-        <activity android:name=".ui.message.SelectCardActivity" >
+        <activity android:name=".ui.message.SelectCardActivity">
             <intent-filter>
                 <action android:name="com.xzjmyk.pm.activity.ui.message.SelectCardActivity" />
             </intent-filter>
@@ -387,7 +387,7 @@
 
         <receiver
             android:name="com.baidu.autoupdatesdk.receiver.BDBroadcastReceiver"
-            android:exported="false" >
+            android:exported="false">
             <intent-filter>
                 <action android:name="com.baidu.autoupdatesdk.ACTION_NEW_UPDATE" />
                 <action android:name="com.baidu.autoupdatesdk.ACTION_DOWNLOAD_COMPLETE" />
@@ -471,14 +471,17 @@
         <activity
             android:name=".ui.erp.activity.oa.OutofficeSetActivity"
             android:label="签到设置" />
-        <activity android:name=".ui.erp.activity.oa.TestActivity" />
-        <activity
-            android:name=".ui.erp.activity.oa.OutSigninOKActivity"
-            android:label="签到" />
+        <activity android:name=".ui.erp.activity.oa.TestActivity"></activity>
+        <activity android:name=".ui.erp.activity.oa.OutSigninOKActivity"
+            android:label="签到"/>
         <activity android:name=".ui.erp.activity.crm.ContactManAddActivity" >
         </activity>
         <activity android:name=".ui.erp.activity.crm.TaskAddActivity" >
         </activity>
+        <activity android:name=".ui.erp.activity.oa.SaveMeetActivity" />
+        <activity
+            android:name=".ui.erp.activity.oa.MeetSelectActivity"
+            android:label="选择与会人员" />
     </application>
 
-</manifest>
+</manifest>

+ 2 - 5
WeiChat/src/main/java/com/xzjmyk/pm/activity/BdLocationHelper.java

@@ -17,6 +17,7 @@ public class BdLocationHelper {
     private double mLongitude;
     private double mLatitude;
     private String mAddress;
+    private String name;
     private String mProvinceName;// 省份
     private String mCityName;// 城市
     private String mDistrictName;// 街道
@@ -34,7 +35,6 @@ public class BdLocationHelper {
         mProvinceName = LocationSp.getInstance(context).getProvinceName("");
         mCityName = LocationSp.getInstance(context).getCityName("");
         mDistrictName = LocationSp.getInstance(context).getDistrictName("");
-
         mLocationClient = new LocationClient(context); // 声明LocationClient类
         mLocationClient.registerLocationListener(mMyLocationListener); // 注册监听函数
         LocationClientOption option = new LocationClientOption();
@@ -42,10 +42,8 @@ public class BdLocationHelper {
         option.setCoorType("bd09ll");// 返回的定位结果是百度经纬度,默认值gcj02
         option.setScanSpan(5000);// 设置发起定位请求的间隔时间为10s
         option.setIsNeedAddress(true);
-
         option.setNeedDeviceDirect(false);
         option.setOpenGps(true);//可选,默认false,设置是否使用gps
-
         mLocationClient.setLocOption(option);
         requestLocation();
 
@@ -53,7 +51,6 @@ public class BdLocationHelper {
     }
 
 
-
     public void release() {
         if (mLocationClient.isStarted()) {
             mLocationClient.stop();
@@ -95,7 +92,7 @@ public class BdLocationHelper {
             // 百度定位成功
             mLongitude = location.getLongitude();
             mLatitude = location.getLatitude();
-
+            Log.i("gongpengming", "name==" + location.getPoiList().get(0).getName());
             if (location.getLocType() == BDLocation.TypeNetWorkLocation) {
                 mAddress = location.getAddrStr();
                 mProvinceName = location.getProvince();

+ 25 - 33
WeiChat/src/main/java/com/xzjmyk/pm/activity/bean/oa/MeetBean.java

@@ -4,8 +4,6 @@ package com.xzjmyk.pm.activity.bean.oa;
  * Created by gongpm on 2016/7/22.
  */
 public class MeetBean {
-    private String ma_code;
-    private String ma_mrcode;
     private String ma_theme;
     private String ma_status;
     private String ma_recorder;
@@ -14,35 +12,37 @@ public class MeetBean {
     private String ma_isturndoc;
     private String ma_remark;
     private String ma_group;
-    private String ma_id;
     private String ma_endtime;
-//    private int ma_groupid;
+    private String ma_groupid;
     private String ma_statuscode;
     private String ma_mrname;
+    private String ma_mrcode;
+//    private String ma_code;
 
-    public String getMa_mrname() {
-        return ma_mrname;
+    public String getMa_mrcode() {
+        return ma_mrcode;
     }
 
-    public void setMa_mrname(String ma_mrname) {
-        this.ma_mrname = ma_mrname;
+    public void setMa_mrcode(String ma_mrcode) {
+        this.ma_mrcode = ma_mrcode;
     }
 
-    public String getMa_code() {
-        return ma_code;
-    }
+//    public String getMa_code() {
+//        return ma_code;
+//    }
+//
+//    public void setMa_code(String ma_code) {
+//        this.ma_code = ma_code;
+//    }
 
-    public void setMa_code(String ma_code) {
-        this.ma_code = ma_code;
+    public String getMa_mrname() {
+        return ma_mrname;
     }
 
-    public String getMa_mrcode() {
-        return ma_mrcode;
+    public void setMa_mrname(String ma_mrname) {
+        this.ma_mrname = ma_mrname;
     }
 
-    public void setMa_mrcode(String ma_mrcode) {
-        this.ma_mrcode = ma_mrcode;
-    }
 
     public String getMa_theme() {
         return ma_theme;
@@ -108,14 +108,6 @@ public class MeetBean {
         this.ma_group = ma_group;
     }
 
-    public String getMa_id() {
-        return ma_id;
-    }
-
-    public void setMa_id(String ma_id) {
-        this.ma_id = ma_id;
-    }
-
     public String getMa_endtime() {
         return ma_endtime;
     }
@@ -124,13 +116,13 @@ public class MeetBean {
         this.ma_endtime = ma_endtime;
     }
 
-//    public int getMa_groupid() {
-//        return ma_groupid;
-//    }
-//
-//    public void setMa_groupid(int ma_groupid) {
-//        this.ma_groupid = ma_groupid;
-//    }
+    public String getMa_groupid() {
+        return ma_groupid;
+    }
+
+    public void setMa_groupid(String ma_groupid) {
+        this.ma_groupid = ma_groupid;
+    }
 
     public String getMa_statuscode() {
         return ma_statuscode;

+ 84 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/bean/oa/MeetEntity.java

@@ -0,0 +1,84 @@
+package com.xzjmyk.pm.activity.bean.oa;
+
+/**
+ * Created by gongpm on 2016/7/25.
+ */
+public class MeetEntity  {
+    private String ma_code;//编号
+    private String ma_recorder;//发起人
+    private String ma_starttime;//发起时间
+    private String ma_endtime;//结束时间
+    private String ma_theme;//主题
+    private String ma_mrname;//会议地点
+    private int ma_id;
+    private String ma_stage;
+
+
+
+    public MeetEntity() {
+    }
+
+    public String getMa_stage() {
+        return ma_stage;
+    }
+
+    public void setMa_stage(String ma_stage) {
+        this.ma_stage = ma_stage;
+    }
+
+    public String getMa_code() {
+        return ma_code;
+    }
+
+    public void setMa_code(String ma_code) {
+        this.ma_code = ma_code;
+    }
+
+    public String getMa_recorder() {
+        return ma_recorder;
+    }
+
+    public void setMa_recorder(String ma_recorder) {
+        this.ma_recorder = ma_recorder;
+    }
+
+    public String getMa_starttime() {
+        return ma_starttime;
+    }
+
+    public void setMa_starttime(String ma_starttime) {
+        this.ma_starttime = ma_starttime;
+    }
+
+    public String getMa_endtime() {
+        return ma_endtime;
+    }
+
+    public void setMa_endtime(String ma_endtime) {
+        this.ma_endtime = ma_endtime;
+    }
+
+    public String getMa_theme() {
+        return ma_theme;
+    }
+
+    public void setMa_theme(String ma_theme) {
+        this.ma_theme = ma_theme;
+    }
+
+    public String getMa_mrname() {
+        return ma_mrname;
+    }
+
+    public void setMa_mrname(String ma_mrname) {
+        this.ma_mrname = ma_mrname;
+    }
+
+    public int getMa_id() {
+        return ma_id;
+    }
+
+    public void setMa_id(int ma_id) {
+        this.ma_id = ma_id;
+    }
+}

+ 85 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/bean/oa/MeetUserEntity.java

@@ -0,0 +1,85 @@
+package com.xzjmyk.pm.activity.bean.oa;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+/**
+ * Created by gongpm on 2016/7/26.
+ */
+public class MeetUserEntity implements Parcelable {
+    private int imId;
+    private String name;
+    private String emCode;
+    private boolean isClick=false;
+
+    public MeetUserEntity() {
+    }
+
+
+    protected MeetUserEntity(Parcel in) {
+        imId = in.readInt();
+        name = in.readString();
+        emCode = in.readString();
+        isClick = in.readByte() != 0;
+    }
+
+    public static final Creator<MeetUserEntity> CREATOR = new Creator<MeetUserEntity>() {
+        @Override
+        public MeetUserEntity createFromParcel(Parcel in) {
+            return new MeetUserEntity(in);
+        }
+
+        @Override
+        public MeetUserEntity[] newArray(int size) {
+            return new MeetUserEntity[size];
+        }
+    };
+
+    public boolean isClick() {
+        return isClick;
+    }
+
+    public void setClick(boolean click) {
+        isClick = click;
+    }
+
+    public int getImId() {
+        return imId;
+    }
+
+    public void setImId(int imId) {
+        this.imId = imId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getEmCode() {
+        return emCode;
+    }
+
+    public void setEmCode(String emCode) {
+        this.emCode = emCode;
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public void writeToParcel(Parcel parcel, int i) {
+
+        parcel.writeInt(imId);
+        parcel.writeString(name);
+        parcel.writeString(emCode);
+        parcel.writeByte((byte) (isClick ? 1 : 0));
+    }
+
+
+}

+ 170 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/bean/oa/MeetingDocBean.java

@@ -0,0 +1,170 @@
+package com.xzjmyk.pm.activity.bean.oa;
+
+/**
+ * Created by gongpm on 2016/7/25.
+ */
+public class MeetingDocBean {
+    private String md_fileno;
+    private String md_recorder;
+    private String md_recorderdate;
+    private String md_status;
+    private String md_title;
+    private String md_mtname;
+    private String md_meetingname;
+    private String md_meetingcode;
+    private String md_mrcode;
+    private String md_mrname;
+    private String md_starttime;
+    private String md_statuscode;
+    private String md_endtime;
+
+    private String md_group;
+    private String md_attachs;
+    private String md_contents;
+    private String md_id;
+    private String md_groupid;
+
+    public String getMd_group() {
+        return md_group;
+    }
+
+    public void setMd_group(String md_group) {
+        this.md_group = md_group;
+    }
+
+    public String getMd_attachs() {
+        return md_attachs;
+    }
+
+    public void setMd_attachs(String md_attachs) {
+        this.md_attachs = md_attachs;
+    }
+
+    public String getMd_contents() {
+        return md_contents;
+    }
+
+    public void setMd_contents(String md_contents) {
+        this.md_contents = md_contents;
+    }
+
+    public String getMd_id() {
+        return md_id;
+    }
+
+    public void setMd_id(String md_id) {
+        this.md_id = md_id;
+    }
+
+    public String getMd_groupid() {
+        return md_groupid;
+    }
+
+    public void setMd_groupid(String md_groupid) {
+        this.md_groupid = md_groupid;
+    }
+
+    public String getMd_fileno() {
+        return md_fileno;
+    }
+
+    public void setMd_fileno(String md_fileno) {
+        this.md_fileno = md_fileno;
+    }
+
+    public String getMd_recorder() {
+        return md_recorder;
+    }
+
+    public void setMd_recorder(String md_recorder) {
+        this.md_recorder = md_recorder;
+    }
+
+    public String getMd_recorderdate() {
+        return md_recorderdate;
+    }
+
+    public void setMd_recorderdate(String md_recorderdate) {
+        this.md_recorderdate = md_recorderdate;
+    }
+
+    public String getMd_status() {
+        return md_status;
+    }
+
+    public void setMd_status(String md_status) {
+        this.md_status = md_status;
+    }
+
+    public String getMd_title() {
+        return md_title;
+    }
+
+    public void setMd_title(String md_title) {
+        this.md_title = md_title;
+    }
+
+    public String getMd_mtname() {
+        return md_mtname;
+    }
+
+    public void setMd_mtname(String md_mtname) {
+        this.md_mtname = md_mtname;
+    }
+
+    public String getMd_meetingname() {
+        return md_meetingname;
+    }
+
+    public void setMd_meetingname(String md_meetingname) {
+        this.md_meetingname = md_meetingname;
+    }
+
+    public String getMd_meetingcode() {
+        return md_meetingcode;
+    }
+
+    public void setMd_meetingcode(String md_meetingcode) {
+        this.md_meetingcode = md_meetingcode;
+    }
+
+    public String getMd_mrcode() {
+        return md_mrcode;
+    }
+
+    public void setMd_mrcode(String md_mrcode) {
+        this.md_mrcode = md_mrcode;
+    }
+
+    public String getMd_mrname() {
+        return md_mrname;
+    }
+
+    public void setMd_mrname(String md_mrname) {
+        this.md_mrname = md_mrname;
+    }
+
+    public String getMd_starttime() {
+        return md_starttime;
+    }
+
+    public void setMd_starttime(String md_starttime) {
+        this.md_starttime = md_starttime;
+    }
+
+    public String getMd_statuscode() {
+        return md_statuscode;
+    }
+
+    public void setMd_statuscode(String md_statuscode) {
+        this.md_statuscode = md_statuscode;
+    }
+
+    public String getMd_endtime() {
+        return md_endtime;
+    }
+
+    public void setMd_endtime(String md_endtime) {
+        this.md_endtime = md_endtime;
+    }
+}

+ 0 - 28
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/AddTaskActivity.java

@@ -4,7 +4,6 @@
 package com.xzjmyk.pm.activity.ui.erp.activity;
 
 import android.app.AlertDialog;
-import android.app.TimePickerDialog;
 import android.content.Context;
 import android.content.Intent;
 import android.graphics.Color;
@@ -29,7 +28,6 @@ import android.widget.LinearLayout;
 import android.widget.ProgressBar;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
-import android.widget.TimePicker;
 import android.widget.Toast;
 
 import com.alibaba.fastjson.JSON;
@@ -60,8 +58,6 @@ import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.List;
@@ -232,7 +228,6 @@ public class AddTaskActivity extends BaseActivity implements OnClickListener {
         year = time.year;
         month = time.month + 1;
         initView();
-        initData();
     }
 
     /* (non-Javadoc)
@@ -246,9 +241,7 @@ public class AddTaskActivity extends BaseActivity implements OnClickListener {
         getSupportActionBar().setTitle("添加任务");
         String people = getIntent().getStringExtra("people") == null ? "未填写" : getIntent().getStringExtra("people");
         bt_task_add.setOnClickListener(this);
-
         et_task_startime.setOnTouchListener(new OnTouchListener() {
-
             @Override
             public boolean onTouch(View v, MotionEvent event) {
                 if (event.getAction() == event.ACTION_DOWN)
@@ -294,27 +287,6 @@ public class AddTaskActivity extends BaseActivity implements OnClickListener {
         dialog.getWindow().setGravity(Gravity.CENTER);
     }
 
-    //by gongpm 时间选择
-    private void showSelectTimeDialog(final String date) {
-        Calendar calendar = new GregorianCalendar();
-        final TimePickerDialog dialogTime = new TimePickerDialog(mContext, new TimePickerDialog.OnTimeSetListener() {
-            @Override
-            public void onTimeSet(TimePicker timePicker, int i, int i1) {
-                et_task_startime.setText(date + "  " + timePicker.getCurrentHour() + ":" + timePicker.getCurrentMinute());
-
-            }
-        }, calendar.get(Calendar.HOUR_OF_DAY),
-                calendar.get(Calendar.MINUTE), true);
-        dialogTime.show();
-    }
-
-    /* (non-Javadoc)
-     * @see com.erp.base.BaseAcivity#initData()
-     */
-    public void initData() {
-
-    }
-
     @Override
     public void onClick(View v) {
         switch (v.getId()) {

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

@@ -1,42 +1,78 @@
 package com.xzjmyk.pm.activity.ui.erp.activity.oa;
 
+import android.app.AlertDialog;
 import android.content.Intent;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
 import android.util.Log;
+import android.view.Gravity;
 import android.view.View;
+import android.view.ViewGroup;
+import android.widget.EditText;
+import android.widget.TextView;
 
+import com.lidroid.xutils.ViewUtils;
+import com.lidroid.xutils.view.annotation.ViewInject;
+import com.xzjmyk.pm.activity.MyApplication;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.bean.oa.MeetBean;
+import com.xzjmyk.pm.activity.bean.oa.MeetUserEntity;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
+import com.xzjmyk.pm.activity.ui.calendar.cons.DPMode;
+import com.xzjmyk.pm.activity.ui.calendar.views.TaskDatePicker;
 import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.Constants;
 import com.xzjmyk.pm.activity.ui.erp.util.FlexJsonUtil;
+import com.xzjmyk.pm.activity.util.CalendarUtils;
+import com.xzjmyk.pm.activity.util.StringUtils;
+import com.xzjmyk.pm.activity.util.TimeUtils;
+import com.xzjmyk.pm.activity.util.ToastUtil;
+import com.xzjmyk.pm.activity.xmpp.CoreService;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
+import java.util.List;
 import java.util.Map;
 
 public class AddMeetingActivity extends BaseActivity implements View.OnClickListener {
 
+    @ViewInject(R.id.start_tv)
+    private TextView start_tv;
+    @ViewInject(R.id.end_tv)
+    private TextView end_tv;
+    @ViewInject(R.id.users_tv)
+    private TextView users_tv;
+    @ViewInject(R.id.user_tv)
+    private TextView user_tv;
+    @ViewInject(R.id.location_et)
+    private EditText location_et;
+    @ViewInject(R.id.name_et)
+    private EditText name_et;
+    @ViewInject(R.id.about_et)
+    private EditText about_et;
+    @ViewInject(R.id.tag_et)
+    private EditText tag_et;
+
     private AddMeetingActivity ct;
-    private final int whatLoad = 0x11;
     private final int whatSignin = 0x12;
     private String baseUrl;
+    private int request = 0x13;
+    public static int resultCode = 0x14;
+    ArrayList<MeetUserEntity> entities = null;//成员
+    private MeetUserEntity entity;//管理员
     private Handler handler = new Handler() {
         @Override
         public void handleMessage(Message msg) {
             ct.progressDialog.dismiss();
             String message = (String) msg.getData().get("result");
-            Log.i("gongpengming", message);
             switch (msg.what) {
-                case whatLoad:
-                    Log.i("gongpengming", "msg.what == whatLoad");
-                    break;
                 case whatSignin:
-                    Log.i("gongpengming", "msg.what == whatSignin");
+                    //TODO 创建会议成功  开始创建群组
+                    Log.i("gongpengming", "TODO 创建会议成功  开始创建群组");
+                    createRoom();
                     break;
                 case Constants.HTTP_SUCCESS_INIT:
                     break;
@@ -46,10 +82,85 @@ public class AddMeetingActivity extends BaseActivity implements View.OnClickList
         }
     };
 
+
+    private void createRoom() {
+        //创建群组
+        CoreService mXmppService;
+
+
+    }
+
+    private void createGroupChat(String nickName, String roomName, String roomSubject, String roomDesc,
+                                 List<String> inviteUsers, final int or_id) {
+//        try {
+//            roomJid = mXmppService.createMucRoom(nickName, roomName, roomSubject, roomDesc);
+//        } catch (NullPointerException e) {
+//            roomJid = mXmppService.createMucRoom(nickName, roomName, "", roomDesc);
+//        }
+//        if (TextUtils.isEmpty(roomJid)) {
+//            ToastUtil.showToast(mContext, R.string.create_room_failed);
+//            return;
+//        }
+//
+//        Map<String, String> params = new HashMap<String, String>();
+//        params.put("access_token", MyApplication.getInstance().mAccessToken);
+//        params.put("jid", roomJid);
+//        params.put("name", roomName);
+//        params.put("category", "1");
+//        params.put("desc", roomDesc);
+//        params.put("countryId", String.valueOf(Area.getDefaultCountyId()));// 国家Id
+//
+//        Area area = Area.getDefaultProvince();
+//        if (area != null) {
+//            params.put("provinceId", String.valueOf(area.getId()));// 省份Id
+//        }
+//        area = Area.getDefaultCity();
+//        if (area != null) {
+//            params.put("cityId", String.valueOf(area.getId()));// 城市Id
+//            area = Area.getDefaultDistrict(area.getId());
+//            if (area != null) {
+//                params.put("areaId", String.valueOf(area.getId()));// 城市Id
+//            }
+//        }
+//
+//        double latitude = MyApplication.getInstance().getBdLocationHelper().getLatitude();
+//        double longitude = MyApplication.getInstance().getBdLocationHelper().getLongitude();
+//        if (latitude != 0)
+//            params.put("latitude", String.valueOf(latitude));
+//        if (longitude != 0)
+//            params.put("longitude", String.valueOf(longitude));
+//        params.put("text", JSON.toJSONString(inviteUsers));
+//        ProgressDialogUtil.show(mProgressDialog);
+//        StringJsonObjectRequest<MucRoom> request = new StringJsonObjectRequest<MucRoom>(mConfig.ROOM_ADD,
+//                new Response.ErrorListener() {
+//                    @Override
+//                    public void onErrorResponse(VolleyError arg0) {
+//                        ProgressDialogUtil.dismiss(mProgressDialog);
+//                        ToastUtil.showErrorNet(mContext);
+//                    }
+//                }, new StringJsonObjectRequest.Listener<MucRoom>() {
+//            @Override
+//            public void onResponse(ObjectResult<MucRoom> result) {
+//                boolean parserResult = Result.defaultParser(mContext, result, true);
+//                if (parserResult && result.getData() != null) {
+//                    mPullToRefreshListView.setPullDownRefreshing(200);//加载列表
+//                    updateCreateFalgToERP(or_id);
+//                }
+//                ProgressDialogUtil.dismiss(mProgressDialog);
+//            }
+//        }, MucRoom.class, params);
+//        String HASHCODE = Integer.toHexString(this.hashCode()) + "@";
+//        MyApplication.getInstance().getFastVolley().addDefaultRequest(HASHCODE, request);
+    }
+
+
+    private boolean isSingle;
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_add_meeting);
+        ViewUtils.inject(this);
         baseUrl = CommonUtil.getSharedPreferences(this, "erp_baseurl");
         ct = this;
         initView();
@@ -57,23 +168,126 @@ public class AddMeetingActivity extends BaseActivity implements View.OnClickList
 
 
     private void initView() {
-        findViewById(R.id.meet_main_rl).setOnClickListener(this);
         findViewById(R.id.bt_save).setOnClickListener(this);
+        findViewById(R.id.start_rl).setOnClickListener(this);
+        findViewById(R.id.end_rl).setOnClickListener(this);
+        findViewById(R.id.users_rl).setOnClickListener(this);
+        findViewById(R.id.user_rl).setOnClickListener(this);
+
     }
 
     @Override
     public void onClick(View view) {
         switch (view.getId()) {
-            case R.id.meet_main_rl:
-                startActivity(new Intent(ct, AddMeetMainActivity.class));
+            case R.id.start_rl://开始时间
+                showDialog(true);
+                break;
+            case R.id.end_rl://结束时间
+                showDialog(false);
                 break;
             case R.id.bt_save:
-                doSignin();
+                signinAble();
+                break;
+            case R.id.users_rl://选择参会人员
+                isSingle = false;
+                startSelectActivity();
+                break;
+            case R.id.user_rl://选择管理员
+                isSingle = true;
+                startSelectActivity();
                 break;
         }
     }
 
-    private void doSignin() {
+    private void signinAble() {
+        if (StringUtils.isEmpty(name_et.getText().toString())) {
+            ToastUtil.showToast(this, "会议名为空或格式不正确");
+            return;
+        }
+        if (StringUtils.isEmpty(start_tv.getText().toString())) {
+            ToastUtil.showToast(this, "开始时间为空或格式不正确");
+            return;
+        }
+        if (StringUtils.isEmpty(end_tv.getText().toString())) {
+            ToastUtil.showToast(this, "结束时间为空或格式不正确");
+            return;
+        }
+        if (StringUtils.isEmpty(location_et.getText().toString())) {
+            ToastUtil.showToast(this, "地点为空或格式不正确");
+            return;
+        }
+        if (StringUtils.isEmpty(user_tv.getText().toString())) {
+            ToastUtil.showToast(this, "会议管理员为空或格式不正确");
+            return;
+        }
+        if (StringUtils.isEmpty(tag_et.getText().toString())) {
+            ToastUtil.showToast(this, "会议标签为空或格式不正确");
+            return;
+        }
+        if (StringUtils.isEmpty(about_et.getText().toString())) {
+            ToastUtil.showToast(this, "会议介绍为空或格式不正确");
+            return;
+        }
+        if (entities == null || entities.size() <= 0) {
+            ToastUtil.showToast(this, "参会人员不符要求");
+            return;
+        }
+        StringBuilder builder = new StringBuilder();
+        StringBuilder builderId = new StringBuilder();
+        for (int i = 0; i < entities.size(); i++) {
+            if (i == 0) {
+                builder.append(entities.get(i).getName());
+                builderId.append(entities.get(i).getImId());
+            } else {
+                builder.append(";" + entities.get(i).getName());
+                builderId.append(";" + entities.get(i).getImId());
+            }
+        }
+
+        doSignin(builder.toString(), builderId.toString());
+    }
+
+    public void startSelectActivity() {
+        Intent intent = new Intent(ct, MeetSelectActivity.class);
+        intent.putExtra(MeetSelectActivity.KEY_IS_SINGLE, isSingle);
+        startActivityForResult(intent, request);
+    }
+
+    //TODO 待修改方案
+    private void showDialog(final boolean isStart) {
+        final AlertDialog dialog = new AlertDialog.Builder(this).create();
+        dialog.show();
+        TaskDatePicker picker = new TaskDatePicker(this);
+        picker.setDate(CalendarUtils.getCurrentYear(), CalendarUtils.getCurrentMonth());
+        picker.setMode(DPMode.SINGLE);
+        picker.setOnDatePickedListener(new TaskDatePicker.OnDatePickedListener() {
+            @Override
+            public void onDatePicked(String date) {
+                if (isStart) {
+                    start_tv.setText(date + ":00:00");
+                } else {
+                    end_tv.setText(date + ":00:00");
+                }
+                dialog.dismiss();
+            }
+        });
+        picker.setOnTimeListener(new TaskDatePicker.OnDatePickedListener() {
+            @Override
+            public void onDatePicked(String date) {
+                if (isStart) {
+                    start_tv.setText(date);
+                } else {
+                    end_tv.setText(date);
+                }
+                dialog.dismiss();
+            }
+        });
+        ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+        dialog.getWindow().setContentView(picker, params);
+        dialog.getWindow().setGravity(Gravity.CENTER);
+    }
+
+    private void doSignin(String gruop, String ids) {
         //获取网络数据
         if (baseUrl == null) {
             baseUrl = CommonUtil.getSharedPreferences(this, "erp_baseurl");
@@ -81,24 +295,21 @@ public class AddMeetingActivity extends BaseActivity implements View.OnClickList
         String url = baseUrl + "oa/meeting/saveMeetingroomapply.action";
         final Map<String, Object> param = new HashMap<>();
         MeetBean bean = new MeetBean();
-        bean.setMa_code("20160700044");
-        bean.setMa_mrcode("2015120001");
-        bean.setMa_mrname("1212");
-        bean.setMa_theme("测试");
+        bean.setMa_mrcode("2015120001");//TODO ??????这个参数是什么
+        bean.setMa_mrname(name_et.getText().toString());
+        bean.setMa_theme(name_et.getText().toString());
         bean.setMa_status("在录入");
-        bean.setMa_recorder("陈萍");
-        bean.setMa_recorddate("2016-07-20");
-        bean.setMa_starttime("2016-07-20 14:54:00");
+        bean.setMa_recorder(MyApplication.getInstance().mLoginUser.getNickName());
+        bean.setMa_recorddate(TimeUtils.s_long_2_str(System.currentTimeMillis()));
+        bean.setMa_starttime(start_tv.getText().toString());
         bean.setMa_isturndoc("否");
-        bean.setMa_remark("");
-        bean.setMa_group("陈小小虎");
-        bean.setMa_id("10010");
-        bean.setMa_endtime("2016-07-21 19:54:00");
-//        bean.setMa_groupid(201);
+        bean.setMa_remark(about_et.getText().toString());
+        bean.setMa_group(gruop);
+        bean.setMa_endtime(end_tv.getText().toString());
+        bean.setMa_groupid(ids);
         bean.setMa_statuscode("ENTERING");
         String formStore = FlexJsonUtil.toJson(bean);
         Log.i("gongpengming", formStore);
-        Log.i("gongpengming", url);
         String caller = "Meetingroomapply";
         param.put("caller", caller);
         param.put("param", "[]");
@@ -108,4 +319,25 @@ public class AddMeetingActivity extends BaseActivity implements View.OnClickList
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
         ViewUtil.httpSendRequest(ct, url, param, handler, headers, whatSignin, null, null, "post");
     }
+
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        if (data == null) return;
+        Log.i("gongpengming", "return之后");
+        if (requestCode == this.request) {
+            Log.i("gongpengming", "requestCode之后");
+            Log.i("gongpengming", "resultCode==" + resultCode);
+            if (resultCode == this.resultCode) {
+                Log.i("gongpengming", "resultCode之后");
+                if (isSingle) {
+                    entity = data.getParcelableExtra("data");
+                    user_tv.setText(entity.getName());
+                } else {
+                    entities = data.getParcelableArrayListExtra("data");
+                    users_tv.setText("选择" + entities.size() + "人");
+                }
+            }
+        }
+    }
 }

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

@@ -21,15 +21,22 @@ public class
 MeetDetailsActivity extends BaseActivity implements View.OnClickListener {
     private CustomerListView meet_listview;
     private final int whatLoad = 0x11;
+    private final int whatEndMeet = 0x12;
+    private int ma_code;
     private Handler handler = new Handler() {
         @Override
         public void handleMessage(Message msg) {
+            progressDialog.dismiss();
             String message = (String) msg.getData().get("result");
             Log.i("gongpengming", message);
             switch (msg.what) {
                 case whatLoad:
                     Log.i("gongpengming", "what==whatLoad");
                     break;
+                case whatEndMeet:
+                    Log.i("gongpengming", "what==whatLoad");
+                    break;
+
             }
         }
     };
@@ -38,6 +45,7 @@ MeetDetailsActivity extends BaseActivity implements View.OnClickListener {
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_meet_details);
+        ma_code = getIntent().getIntExtra("code", 4864);
         getSupportActionBar().setTitle("会议详情");
         loadNetData();
         initView();
@@ -45,7 +53,9 @@ MeetDetailsActivity extends BaseActivity implements View.OnClickListener {
 
     private void initView() {
         meet_listview = (CustomerListView) findViewById(R.id.meet_listview);
+        findViewById(R.id.meet_save).setOnClickListener(this);
         findViewById(R.id.click_find).setOnClickListener(this);
+        findViewById(R.id.end_meet_tv).setOnClickListener(this);
     }
 
     String baseUrl;
@@ -64,6 +74,28 @@ MeetDetailsActivity extends BaseActivity implements View.OnClickListener {
         String caller = "Meetingroomapply";
         param.put("caller", caller);
         param.put("emcode", em_code);
+        param.put("formCondition", "ma_id=" + ma_code);
+        param.put("gridCondition", "ma_id=" + ma_code);
+        param.put("sessionId", sessionId);
+        Log.i("gongpengming", url + "?emcode=" + em_code + "sessionId=" + sessionId);
+        LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
+        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
+        ViewUtil.httpSendRequest(ct, url, param, handler, headers, whatLoad, null, null, "post");
+    }
+    private void endOfMeeting() {
+        progressDialog.show();
+        //获取网络数据
+        if (baseUrl == null) {
+            baseUrl = CommonUtil.getSharedPreferences(this, "erp_baseurl");
+        }
+        String url = baseUrl + "mobile/crm/updateMeeting.action";
+        String em_code = CommonUtil.getSharedPreferences(ct, "erp_username");
+        String sessionId = CommonUtil.getSharedPreferences(ct, "sessionId");
+        final Map<String, Object> param = new HashMap<>();
+        String caller = "Meetingroomapply";
+//        param.put("caller", caller);
+        param.put("emcode", em_code);
+        param.put("ma_id", +ma_code);
         param.put("sessionId", sessionId);
         Log.i("gongpengming", url + "?emcode=" + em_code + "sessionId=" + sessionId);
         LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
@@ -75,8 +107,18 @@ MeetDetailsActivity extends BaseActivity implements View.OnClickListener {
     public void onClick(View view) {
         switch (view.getId()) {
             case R.id.click_find:
-                startActivity(new Intent(MeetDetailsActivity.this, OARegisterActivity.class));
+                Intent intent = new Intent(MeetDetailsActivity.this, OARegisterActivity.class);
+                intent.putExtra("code", ma_code);
+                startActivity(intent);
+                break;
+            case R.id.meet_save:
+                startActivity(new Intent(ct, SaveMeetActivity.class));
+                break;
+            case R.id.end_meet_tv:
+                endOfMeeting();
                 break;
         }
     }
+
+
 }

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

@@ -0,0 +1,181 @@
+package com.xzjmyk.pm.activity.ui.erp.activity.oa;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.text.Editable;
+import android.text.TextWatcher;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.BaseAdapter;
+import android.widget.CheckBox;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import com.lidroid.xutils.ViewUtils;
+import com.lidroid.xutils.view.annotation.ViewInject;
+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.erp.db.DBManager;
+import com.xzjmyk.pm.activity.ui.erp.entity.EmployeesEntity;
+import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
+import com.xzjmyk.pm.activity.util.StringUtils;
+import com.xzjmyk.pm.activity.view.ClearEditText;
+
+import java.util.ArrayList;
+import java.util.List;
+
+//添加会议人员界面
+public class MeetSelectActivity extends BaseActivity {
+    @ViewInject(R.id.listview)
+    private ListView listview;
+    @ViewInject(R.id.search_edit)
+    private ClearEditText search_edit;
+
+    private DBManager manager;
+    public static final String KEY_IS_SINGLE = "KEY_IS_SINGLE";
+    private ArrayList<MeetUserEntity> entities;
+    private MeetSelectAdapter adapter;
+    private boolean isSingle = false;
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_meet_select);
+        ViewUtils.inject(this);
+        init();
+        initView();
+    }
+
+    private void initView() {
+        search_edit.addTextChangedListener(new TextWatcher() {
+            @Override
+            public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+            }
+
+            @Override
+            public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
+            }
+
+            @Override
+            public void afterTextChanged(Editable editable) {
+            }
+        });
+        if (entities == null || entities.size() <= 0) return;
+        adapter = new MeetSelectAdapter();
+        listview.setAdapter(adapter);
+        listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+            @Override
+            public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
+                if (isSingle) {
+                    entities.get(i).setClick(true);
+                    selectOK();
+                } else {
+                    entities.get(i).setClick(true);
+                    adapter.notifyDataSetChanged();
+                }
+            }
+        });
+    }
+
+    private void selectOK() {
+        //选择人员成功操作
+        ArrayList<MeetUserEntity> list = new ArrayList<>();
+        for (int i = 0; i < entities.size(); i++) {
+            if (entities.get(i).isClick()) list.add(entities.get(i));
+        }
+        Intent intent = new Intent();
+        if (isSingle) {
+            intent.putExtra("data", list.get(0));
+        } else
+            intent.putExtra("data", list);
+        setResult(AddMeetingActivity.resultCode, intent);
+        finish();
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        if (item.getItemId() == R.id.save) {
+            selectOK();
+        }
+        return super.onOptionsItemSelected(item);
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        if (!isSingle) {
+            getMenuInflater().inflate(R.menu.menu_visit_save, menu);
+        }
+        return super.onCreateOptionsMenu(menu);
+    }
+
+    private void init() {
+        isSingle = getIntent().getBooleanExtra(KEY_IS_SINGLE, false);
+        Log.i("gongpengming", "isSingle=" + isSingle);
+        if (entities == null)
+            entities = new ArrayList<>();
+        if (manager == null)
+            manager = new DBManager(ct);
+        String master = CommonUtil.getSharedPreferences(ct, "erp_master"); //待优化   每次都 读取文件耗性能
+        if (StringUtils.isEmpty(master)) return;
+        List<EmployeesEntity> emList = manager.select_getEmployee(new String[]{master}, "whichsys=?");//获取当前账套列表
+        if (emList == null || emList.size() <= 0) return;
+        MeetUserEntity entity = null;
+        for (int i = 0; i < emList.size(); i++) {
+            entity = new MeetUserEntity();
+            entity.setEmCode(emList.get(i).getEM_CODE());
+            entity.setImId(emList.get(i).getEM_ID());
+            entity.setName(emList.get(i).getEM_NAME());
+            entities.add(entity);
+        }//完成数据加载
+    }
+
+
+    class MeetSelectAdapter extends BaseAdapter {
+        @Override
+        public int getCount() {
+            return entities == null ? 0 : entities.size();
+        }
+
+        @Override
+        public Object getItem(int i) {
+            return entities == null ? 0 : entities.get(i);
+        }
+
+        @Override
+        public long getItemId(int i) {
+            return i;
+        }
+
+        @Override
+        public View getView(int i, View view, ViewGroup viewGroup) {
+            ViewHolder holder = null;
+            if (view == null) {
+                holder = new ViewHolder();
+                view = LayoutInflater.from(ct).inflate(R.layout.meet_select_item, null);
+                holder.select_scb = (CheckBox) view.findViewById(R.id.select_scb);
+                holder.id_tv = (TextView) view.findViewById(R.id.id_tv);
+                holder.name_tv = (TextView) view.findViewById(R.id.name_tv);
+                view.setTag(holder);
+            } else {
+                holder = (ViewHolder) view.getTag();
+            }
+            holder.select_scb.setChecked(entities.get(i).isClick());
+            holder.select_scb.setFocusable(false);
+            holder.select_scb.setClickable(false);
+            holder.id_tv.setText("imId:" + entities.get(i).getImId());
+            holder.name_tv.setText("姓名:" + entities.get(i).getName());
+            return view;
+        }
+
+        class ViewHolder {
+            CheckBox select_scb;
+            TextView name_tv, id_tv;
+        }
+    }
+}

+ 72 - 16
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/MeetingActivity.java

@@ -14,25 +14,33 @@ import android.widget.AdapterView;
 import android.widget.BaseAdapter;
 import android.widget.TextView;
 
+import com.alibaba.fastjson.JSON;
 import com.handmark.pulltorefresh.library.PullToRefreshListView;
 import com.xzjmyk.pm.activity.R;
+import com.xzjmyk.pm.activity.bean.oa.MeetEntity;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
 import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.Constants;
+import com.xzjmyk.pm.activity.util.TimeUtils;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
 
 import java.util.HashMap;
 import java.util.LinkedHashMap;
+import java.util.List;
 import java.util.Map;
 
 public class MeetingActivity extends BaseActivity {
     private MeetingActivity activity = this;
     private PullToRefreshListView listView;
-
+    private List<MeetEntity> entities;
 
     private String baseUrl;
     private final int whatLoad = 0x11;
-    private final int whatSignin = 0x12;
+
     private Handler handler = new Handler() {
         @Override
         public void handleMessage(Message msg) {
@@ -41,10 +49,15 @@ public class MeetingActivity extends BaseActivity {
             Log.i("gongpengming", message);
             switch (msg.what) {
                 case whatLoad:
-                    Log.i("gongpengming", "msg.what == whatLoad");
-                    break;
-                case whatSignin:
-                    Log.i("gongpengming", "msg.what == whatSignin");
+                    try {
+                        JSONObject json = new JSONObject(message);
+                        if (json.isNull("listdata")) return;
+                        JSONArray array = json.getJSONArray("listdata");
+                        entities = JSON.parseArray(array.toString(), MeetEntity.class);
+                        updateUI();
+                    } catch (JSONException e) {
+                        e.printStackTrace();
+                    }
                     break;
                 case Constants.HTTP_SUCCESS_INIT:
                     break;
@@ -53,6 +66,15 @@ public class MeetingActivity extends BaseActivity {
             }
         }
     };
+    private MesstingAdapter adapter;
+
+    private void updateUI() {
+        //更新界面
+        if (adapter == null)
+            adapter = new MesstingAdapter();
+        adapter.setData(entities);
+//        listView.setAdapter(adapter);
+    }
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -65,14 +87,17 @@ public class MeetingActivity extends BaseActivity {
 
     private void initView() {
         listView = (PullToRefreshListView) findViewById(R.id.listview);
-        listView.setAdapter(new MesstingAdapter());
+        if (adapter == null)
+            adapter = new MesstingAdapter();
+        listView.setAdapter(adapter);
         listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
             public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
-                startActivity(new Intent(MeetingActivity.this, MeetDetailsActivity.class));
+                Intent intent = new Intent(MeetingActivity.this, MeetDetailsActivity.class);
+                intent.putExtra("code", entities.get(i).getMa_id());
+                startActivity(intent);
             }
         });
-
         loadNetData();
     }
 
@@ -125,14 +150,29 @@ public class MeetingActivity extends BaseActivity {
     }
 
     class MesstingAdapter extends BaseAdapter {
+
+        private List<MeetEntity> entities;
+
+        public MesstingAdapter() {
+        }
+
+        public MesstingAdapter(List<MeetEntity> entities) {
+            this.entities = entities;
+        }
+
+        public void setData(List<MeetEntity> entities) {
+            this.entities = entities;
+            notifyDataSetChanged();
+        }
+
         @Override
         public int getCount() {
-            return 10;
+            return entities == null ? 0 : entities.size();
         }
 
         @Override
         public Object getItem(int i) {
-            return null;
+            return entities == null ? null : entities.get(i);
         }
 
         @Override
@@ -155,7 +195,6 @@ public class MeetingActivity extends BaseActivity {
                 viewholder.oa_meeting_end_date = (TextView) view.findViewById(R.id.oa_meeting_end_date);
                 viewholder.oa_meeting_addr_tv = (TextView) view.findViewById(R.id.oa_meeting_addr_tv);
                 viewholder.oa_meeting_user_tv = (TextView) view.findViewById(R.id.oa_meeting_user_tv);
-                viewholder.oa_meeting_tag_tv = (TextView) view.findViewById(R.id.oa_meeting_tag_tv);
                 view.setTag(viewholder);
             } else {
                 viewholder = (ViewHolder) view.getTag();
@@ -165,8 +204,26 @@ public class MeetingActivity extends BaseActivity {
         }
 
         private void bindData(ViewHolder viewholder, int i) {
-
-
+            MeetEntity entity = entities.get(i);
+            String str = "";
+            if (entity.getMa_stage() == null) {
+                if (TimeUtils.f_str_2_long(entity.getMa_starttime()) > System.currentTimeMillis())
+                    str = "未开始";
+                else
+                    str = "进行中";
+            } else {
+                str = entity.getMa_stage();
+            }
+            long startLong = TimeUtils.f_str_2_long(entity.getMa_starttime());
+            long endLong = TimeUtils.f_str_2_long(entity.getMa_endtime());
+            viewholder.oa_meeting_start.setText(TimeUtils.long2str(endLong, "MM月dd日"));
+            viewholder.oa_meeting_end.setText(TimeUtils.long2str(endLong, "MM月dd日"));
+            viewholder.oa_meeting_start_date.setText(TimeUtils.long2str(endLong, "HH:mm"));
+            viewholder.oa_meeting_end_date.setText(TimeUtils.long2str(endLong, "HH:mm"));
+            viewholder.oa_meeting_name_tv.setText(entity.getMa_theme());
+            viewholder.oa_meeting_status_tv.setText(str);
+            viewholder.oa_meeting_addr_tv.setText(entity.getMa_mrname());
+            viewholder.oa_meeting_user_tv.setText(entity.getMa_recorder());
         }
 
         class ViewHolder {
@@ -177,8 +234,7 @@ public class MeetingActivity extends BaseActivity {
                     oa_meeting_start_date,//会议开始时间
                     oa_meeting_end_date,//会议结束时间
                     oa_meeting_addr_tv,//会议地址
-                    oa_meeting_user_tv,//会议发起人
-                    oa_meeting_tag_tv;//会议标签
+                    oa_meeting_user_tv;//会议发起人
         }
 
     }

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

@@ -30,13 +30,15 @@ import com.xzjmyk.pm.activity.util.ToastUtil;
 import com.xzjmyk.pm.activity.view.CalendarView;
 import com.xzjmyk.pm.activity.view.MyListView;
 
+import org.json.JSONException;
+import org.json.JSONObject;
+
 import java.util.Date;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
 public class OAActivity extends BaseActivity implements View.OnClickListener, AdapterView.OnItemSelectedListener {
-
     //start improt View
     @ViewInject(R.id.oa_rootview)
     private ScrollView rootScrollView;
@@ -65,13 +67,44 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Ad
     private String[] typeItems = {"类型", "任务", "日程", "拜访"};
     private String baseUrl;
     private PopupMenu poAddMenu;
-    private final int what = 0x10;
+    private final int whatVisit = 0x10, whatTask = 0x11, whatSchedule = 0x12;
+    private final int whatTaskNum = 0x13;
     private Handler handler = new Handler() {
         @Override
         public void handleMessage(Message msg) {
+            String message = (String) msg.getData().get("result");
+            Log.i("gongpengming", message);
+            switch (msg.what) {
+                case whatVisit:
+                    Log.i("gongpengming", "拜访计划回调");
+                    break;
+                case whatTask:
+                    Log.i("gongpengming", "任务回调");
+                    break;
+                case whatSchedule:
+                    Log.i("gongpengming", "日程回调");
+                    break;
+                case whatTaskNum:
+                    try {
+                        JSONObject json = new JSONObject(message);
+                        if (json.isNull("success") || !json.getBoolean("success")) return;
+                        if (!json.isNull("taskAndScheMsg")) {
+                            JSONObject object = json.getJSONObject("taskAndScheMsg");
+                            int notcomplnum = object.isNull("notcomplnum") ? 0 : object.getInt("notcomplnum");
+                            int completenum = object.isNull("completenum") ? 0 : object.getInt("completenum");
+                            int complrate = object.isNull("complrate") ? 0 : object.getInt("complrate");
+                            int taskandschenum = object.isNull("taskandschenum") ? 0 : object.getInt("taskandschenum");
+                            updateUI(notcomplnum, completenum, complrate, taskandschenum);
+                        }
+                    } catch (JSONException e) {
+                        e.printStackTrace();
+                    }
 
+                    break;
+            }
         }
     };
+    private String date;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -94,42 +127,70 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Ad
         picker.setOnDateClickListener(new CalendarView.OnDateClickListener() {
             @Override
             public void onDateClick(int year, int month, int day) {
-                updateUI(year, month, day);
+                date = year + "" + month + "" + day;
+                loadNetData(whatTaskNum);
+
             }
         });
         bindAdapterForSpinner();
         listview.setAdapter(new MyListViewAdapter());
         rootScrollView.smoothScrollTo(0, 20);
         setListener();
+
     }
 
     //获取网络数据
-    public void loadNetData(long date) {
+    public void loadNetData(int what) {
+        //获取网络数据
+        String url = baseUrl + "mobile/crm/getVisitPlan.action";
+        String date = "";
+        switch (what) {
+            case whatVisit:
+                url = baseUrl + "mobile/crm/getVisitPlan.action";
+                date = "201607";
+                break;
+            case whatTask:
+                url = baseUrl + "mobile/crm/getTaskMsg.action";
+                date = "201607";
+                break;
+            case whatSchedule:
+                url = baseUrl + "mobile/crm/getScheduleMsg.action";
+                date = "201607";
+                break;
+            case whatTaskNum:
+                url = baseUrl + "mobile/crm/getTaskAndScheduleMsg.action";
+                date = this.date;
+                break;
+        }
+        loadNetData(what, url, date, 1);
+    }
+
+    //获取网络数据
+    public void loadNetData(int what, String url, String date, int pager) {
         //获取网络数据
-        String url = baseUrl + "common/desktop/subs/getSubs.action";
         final Map<String, Object> param = new HashMap<>();
+        param.put("emcode", CommonUtil.getSharedPreferences(this, "erp_username"));
+        param.put("date", date);
+        param.put("page", pager);
+        param.put("pageSize", 10);
         param.put("sessionId", CommonUtil.getSharedPreferences(this, "sessionId"));
         LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
         headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(this, "sessionId"));
         ViewUtil.httpSendRequest(this, url, param, handler, headers, what, null, null, "get");
     }
 
-    private void updateUI(int year, int month, int day) {
-        //TODO 更改数据显示
-        all_task_num.setText("我的任务日程:");
-        ok_task_num.setText("已完成:");
-        uok_task_num.setText("未完成:");
-        ok_scale.setText("完成比例:");
-    }
-
-    //下载网络数据完成
-    private void loadNetSuccess(String requestData) {
 
+    private void updateUI(int i, int completenum, int complrate, int notcomplnum) {
+        //TODO 更改数据显示
+        all_task_num.setText("我的任务日程:" + i);
+        ok_task_num.setText("已完成:" + completenum);
+        uok_task_num.setText("未完成:" + complrate);
+        ok_scale.setText("完成比例:" + notcomplnum);
     }
 
     private void bindAdapterForSpinner() {
-        state.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, stateItems));
-        type.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, typeItems));
+        state.setAdapter(new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, stateItems));
+        type.setAdapter(new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, typeItems));
         state.setOnItemSelectedListener(this);
         type.setOnItemSelectedListener(this);
     }
@@ -156,7 +217,6 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Ad
         findViewById(R.id.oa_img_add).setOnClickListener(this);
     }
 
-    //start Spinner itemSelected
     @Override
     public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
         switch (adapterView.getId()) {
@@ -165,6 +225,20 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Ad
                 break;
             case R.id.type:
                 Log.i("gongpengming", typeItems[i]);
+                switch (i) {
+                    case 0:
+                        //TODO 选择为类型时
+                        break;
+                    case 1:
+                        loadNetData(whatTask);
+                        break;
+                    case 2:
+                        loadNetData(whatSchedule);
+                        break;
+                    case 3:
+                        loadNetData(whatVisit);
+                        break;
+                }
                 break;
         }
     }
@@ -172,7 +246,7 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Ad
     @Override
     public void onNothingSelected(AdapterView<?> adapterView) {
 
-    }//end Spinner itemSelected
+    }
 
     @Override
     public void onClick(View view) {
@@ -244,7 +318,6 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Ad
                         case R.id.add_visit_item:
                             break;
                     }
-
                     poAddMenu.dismiss();
                     return false;
                 }
@@ -253,9 +326,7 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Ad
         poAddMenu.show();
     }
 
-
     class MyListViewAdapter extends BaseAdapter {
-
         @Override
         public int getCount() {
             return 10;
@@ -299,7 +370,6 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Ad
 
         private void bindItemData(Viewholder viewholder) {
             //TODO 绑定数据
-
         }
 
         class Viewholder {

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

@@ -1,27 +1,49 @@
 package com.xzjmyk.pm.activity.ui.erp.activity.oa;
 
 import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
 import android.support.design.widget.TabLayout;
 import android.support.v4.app.Fragment;
 import android.support.v4.app.FragmentManager;
 import android.support.v4.app.FragmentPagerAdapter;
 import android.support.v4.view.ViewPager;
+import android.util.Log;
 
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
 import com.xzjmyk.pm.activity.ui.erp.fragment.OaRegisterFragment;
+import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
+import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
 
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
 
 public class OARegisterActivity extends BaseActivity {
     private TabLayout tabLayout;
     private ViewPager viewPager;
     private String[] title = {"已签到", "未签到"};
+    private int ma_code;
+    private Handler handler = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            progressDialog.dismiss();
+            String message = (String) msg.getData().get("result");
+            Log.i("gongpengming", message);
+            if (msg.what == 0x11) {
+                Log.i("gongpengming", "msg.what==0x11");
+            }
+        }
+    };
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_oaregister);
+        ma_code = getIntent().getIntExtra("code", 4864);
         initView();
+        loadNetData();
     }
 
     private void initView() {
@@ -32,6 +54,33 @@ public class OARegisterActivity extends BaseActivity {
         tabLayout.setupWithViewPager(viewPager);
         tabLayout.setTabsFromPagerAdapter(adapter);//给Tabs设置适配器
     }
+
+    private String baseUrl;
+
+    //获取网络数据
+    private void loadNetData() {
+        progressDialog.show();
+        //获取网络数据
+        if (baseUrl == null) {
+            baseUrl = CommonUtil.getSharedPreferences(this, "erp_baseurl");
+        }
+        String url = baseUrl + "mobile/crm/getMeetingDetailParticipants.action";
+        String em_code = CommonUtil.getSharedPreferences(ct, "erp_username");
+        String sessionId = CommonUtil.getSharedPreferences(ct, "sessionId");
+        final Map<String, Object> param = new HashMap<>();
+        String caller = "Meetingroomapply";
+        param.put("caller", caller);
+        param.put("emcode", em_code);
+        param.put("formCondition", "ma_id=" + ma_code);
+        param.put("gridCondition", "ma_id=" + ma_code);
+        param.put("sessionId", sessionId);
+        Log.i("gongpengming", url + "?emcode=" + em_code + "sessionId=" + sessionId);
+        LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
+        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
+        ViewUtil.httpSendRequest(ct, url, param, handler, headers, 0x11, null, null, "post");
+    }
+
+
     class ViewPagerAdapter extends FragmentPagerAdapter {
         @Override
         public CharSequence getPageTitle(int position) {

+ 34 - 10
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/OutSigninOKActivity.java

@@ -7,10 +7,12 @@ import android.os.Message;
 import android.util.Log;
 import android.view.View;
 import android.widget.Button;
+import android.widget.EditText;
 import android.widget.TextView;
 
 import com.lidroid.xutils.ViewUtils;
 import com.lidroid.xutils.view.annotation.ViewInject;
+import com.xzjmyk.pm.activity.MyApplication;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.bean.oa.OutSigninBean;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
@@ -18,6 +20,11 @@ import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.Constants;
 import com.xzjmyk.pm.activity.ui.erp.util.FlexJsonUtil;
+import com.xzjmyk.pm.activity.util.TimeUtils;
+import com.xzjmyk.pm.activity.util.ToastUtil;
+
+import org.json.JSONException;
+import org.json.JSONObject;
 
 import java.util.HashMap;
 import java.util.LinkedHashMap;
@@ -25,14 +32,16 @@ import java.util.Map;
 
 //外勤签到
 public class OutSigninOKActivity extends BaseActivity {
-    @ViewInject(R.id.time_tv)
+    @ViewInject(R.id.time_tv)//签到时间
     private TextView time_tv;
-    @ViewInject(R.id.addr_tv)
+    @ViewInject(R.id.addr_tv)//签到地址
     private TextView addr_tv;
-    @ViewInject(R.id.com_tv)
+    @ViewInject(R.id.com_tv)//签到对应公司
     private TextView com_tv;
-    @ViewInject(R.id.exit_btn)
+    @ViewInject(R.id.exit_btn)//签到按钮
     private Button exit_btn;
+    @ViewInject(R.id.text_edit)//签到按钮
+    private EditText text_edit;
     private String baseUrl;
 
     @Override
@@ -59,6 +68,7 @@ public class OutSigninOKActivity extends BaseActivity {
             }
         });
     }
+
     private final int whatSignin = 0x12;
     private Handler handler = new Handler() {
         @Override
@@ -69,6 +79,19 @@ public class OutSigninOKActivity extends BaseActivity {
             switch (msg.what) {
                 case whatSignin:
                     Log.i("gongpengming", "msg.what == whatSignin");
+                    try {
+                        JSONObject json = new JSONObject(message);
+                        if (!json.isNull("success") && json.getBoolean("success")) {
+                            ToastUtil.showToast(ct, "签到成功");
+                            //TODO 签到成功
+                            Intent intent = new Intent();
+                            intent.putExtra("result", true);
+                            setResult(0x12, intent);
+                            finish();
+                        }
+                    } catch (JSONException e) {
+                        e.printStackTrace();
+                    }
                     break;
                 case Constants.HTTP_SUCCESS_INIT:
                     break;
@@ -79,17 +102,18 @@ public class OutSigninOKActivity extends BaseActivity {
     };
 
     private void doSignin() {
+        progressDialog.show();
         //获取网络数据
         String url = baseUrl + "mobile/oa/saveOutSign.action";
         final Map<String, Object> param = new HashMap<>();
         OutSigninBean bean = new OutSigninBean();
-        bean.setMo_address("广东深圳南山");
-        bean.setMo_mancode("U0735");
-        bean.setMo_man("gongpengming");
-        bean.setMo_remark("Tag");
+        bean.setMo_address(addr_tv.getText().toString().trim());
+        bean.setMo_mancode(CommonUtil.getSharedPreferences(this, "erp_username"));
+        bean.setMo_man(MyApplication.getInstance().mLoginUser.getNickName());
+        bean.setMo_remark(text_edit.getText().toString());
         bean.setMo_attachid(201);
-        bean.setMo_company("又软科技");
-        bean.setMo_signtime("2016-11-11 11:11:11");
+        bean.setMo_company(com_tv.getText().toString().trim());
+        bean.setMo_signtime(TimeUtils.f_long_2_str(System.currentTimeMillis()));
         String formStore = FlexJsonUtil.toJson(bean);
         Log.i("gongpengming", formStore);
         String caller = "mobile_outsign";

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

@@ -1,15 +1,78 @@
 package com.xzjmyk.pm.activity.ui.erp.activity.oa;
 
+import android.content.DialogInterface;
 import android.os.Bundle;
+import android.support.v7.app.AlertDialog;
+import android.view.View;
+import android.widget.TextView;
 
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
+import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
+import com.xzjmyk.pm.activity.ui.erp.view.SwitchView;
 
 public class OutofficeSetActivity extends BaseActivity {
 
+    private TextView location_tv;
+    private SwitchView allow_chance_location;
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_outoffice_set);
+        initview();
+    }
+
+    private void initview() {
+        location_tv = (TextView) findViewById(R.id.location_tv);
+        allow_chance_location = (SwitchView) findViewById(R.id.allow_chance_location);
+        allow_chance_location.setOnCheckedChangeListener(new SwitchView.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(View view, boolean isChecked) {
+                CommonUtil.setSharedPreferences(OutofficeSetActivity.this, "outoffice_allow", isChecked);
+            }
+        });
+        findViewById(R.id.location_rl).setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                ShowDalogs();
+            }
+        });
     }
+
+    private void ShowDalogs() {
+        AlertDialog.Builder builder = new AlertDialog.Builder(OutofficeSetActivity.this);
+        builder.setTitle("选择微调距离");
+        //    指定下拉列表的显示数据
+        final String[] cities = {"200米", "400米", "600米", "800米", "1000米"};
+        //    设置一个下拉的列表选择项
+        builder.setItems(cities, new DialogInterface.OnClickListener() {
+            @Override
+            public void onClick(DialogInterface dialog, int which) {
+                location_tv.setText(cities[which]);
+                long i = 0;
+                switch (which) {
+                    case 0:
+                        i = 200;
+                        break;
+                    case 1:
+                        i = 400;
+                        break;
+                    case 2:
+                        i = 600;
+                        break;
+                    case 3:
+                        i = 700;
+                        break;
+                    case 4:
+                        i = 1000;
+                        break;
+                }
+                CommonUtil.putSharedPreferencesLong(OutofficeSetActivity.this, "outoffice_location", i);
+            }
+        });
+        builder.show();
+    }
+
+
 }

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

@@ -0,0 +1,76 @@
+package com.xzjmyk.pm.activity.ui.erp.activity.oa;
+
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.support.v7.app.AppCompatActivity;
+import android.util.Log;
+
+import com.xzjmyk.pm.activity.R;
+import com.xzjmyk.pm.activity.bean.oa.MeetingDocBean;
+import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
+import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
+import com.xzjmyk.pm.activity.ui.erp.util.FlexJsonUtil;
+
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+public class SaveMeetActivity extends AppCompatActivity {
+
+    private Handler handler = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            String message = (String) msg.getData().get("result");
+            Log.i("gongpengming", message);
+            if (msg.what == 0x11) {
+                Log.i("gongpengming", "SaveMeetActivity++++msg.what == 0x11");
+            }
+        }
+    };
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_save_meet);
+        doSave();
+    }
+
+    private String baseUrl;
+
+    private void doSave() {
+        //获取网络数据
+        if (baseUrl == null)
+            baseUrl = CommonUtil.getSharedPreferences(this, "erp_baseurl");
+        String url = baseUrl + "oa/meeting/saveMeetingDoc.action";
+        final Map<String, Object> param = new HashMap<>();
+        MeetingDocBean bean = new MeetingDocBean();
+        bean.setMd_fileno("2016070019");
+        bean.setMd_recorder("陈萍萍");
+        bean.setMd_recorderdate("2016-07-20");
+        bean.setMd_status("再录入");
+        bean.setMd_title("测试");
+        bean.setMd_mtname("");
+        bean.setMd_meetingname("");
+        bean.setMd_meetingcode("");
+        bean.setMd_mrcode("");
+        bean.setMd_mrname("");
+        bean.setMd_starttime("2016-07-20 08:30:00");
+        bean.setMd_statuscode("ENTERING");
+        bean.setMd_endtime("2016-07-20 18:30:00");
+        bean.setMd_group("陈虎");
+        bean.setMd_attachs("");
+        bean.setMd_contents("jil");
+        bean.setMd_id("5411");
+        bean.setMd_groupid("1010913");
+        String formStore = FlexJsonUtil.toJson(bean);
+        Log.i("gongpengming", formStore);
+        String caller = "MeetingDoc";
+        param.put("caller", caller);
+        param.put("formStore", formStore);
+        param.put("sessionId", CommonUtil.getSharedPreferences(this, "sessionId"));
+        LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
+        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(this, "sessionId"));
+        ViewUtil.httpSendRequest(this, url, param, handler, headers, 0x11, null, null, "post");
+    }
+}

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

@@ -7,6 +7,7 @@ import android.view.MenuInflater;
 import android.view.MenuItem;
 import android.view.View;
 import android.widget.Button;
+import android.widget.ImageView;
 import android.widget.TextView;
 
 import com.baidu.mapapi.map.MapView;
@@ -20,7 +21,11 @@ import com.xzjmyk.pm.activity.ui.erp.activity.oa.LocationMapActivity;
 import com.xzjmyk.pm.activity.ui.erp.activity.oa.OutSigninOKActivity;
 import com.xzjmyk.pm.activity.ui.erp.activity.oa.OutofficeActivity;
 import com.xzjmyk.pm.activity.ui.erp.activity.oa.OutofficeSetActivity;
+import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
 import com.xzjmyk.pm.activity.util.BaiduMapUtil;
+import com.xzjmyk.pm.activity.util.TimeUtils;
+
+import java.util.Calendar;
 
 /**
  * Created by gongpm on 2016/7/14.
@@ -28,29 +33,26 @@ import com.xzjmyk.pm.activity.util.BaiduMapUtil;
 public class OutofficeFragment extends EasyFragment implements View.OnClickListener {
     private TextView num_tv; //签到次数
     private TextView out_add_name_tv;//地点名称
-    private TextView name_tv;//大名字
-    private TextView name2_tv;//名字
+    private ImageView name_img;//头像
+    private TextView name_tv;//名字
     private TextView out_date_tv;//日期
     private TextView out_time_tv;//当前时间
     private Button click_btn;//点击签到
     private TextView out_add_t_tv;//地址
     private OutofficeActivity ct;
-
     //当前位置
     private LatLng point;
     int requestCode = 0x11;
-
     private MapView mapView;
-
-
     private TextView com_tv;
+    private TextView date_tag;
+    private int sigNum = 0;
 
     @Override
     protected int inflateLayoutId() {
         return R.layout.fragment_outoffice;
     }
 
-    //mobile/oa/saveOutSign.action
     @Override
     protected void onCreateView(Bundle savedInstanceState, boolean createView) {
         setHasOptionsMenu(true);
@@ -58,24 +60,34 @@ public class OutofficeFragment extends EasyFragment implements View.OnClickListe
         initview();
     }
 
+    private void signinAble(boolean b) {
+        click_btn.setFocusable(b);
+        click_btn.setClickable(b);
+        if (b) {
+            click_btn.setBackgroundResource(R.drawable.button_round_shape);
+        } else {
+            click_btn.setBackgroundResource(R.drawable.button_signin);
+        }
+    }
+
     private void initview() {
         out_add_name_tv = (TextView) findViewById(R.id.out_add_name_tv);
         out_add_t_tv = (TextView) findViewById(R.id.out_add_t_tv);
         num_tv = (TextView) findViewById(R.id.num_tv);
+        name_img = (ImageView) findViewById(R.id.name_img);
         name_tv = (TextView) findViewById(R.id.name_tv);
-        name2_tv = (TextView) findViewById(R.id.name2_tv);
         out_date_tv = (TextView) findViewById(R.id.out_add_t_tv);
         out_time_tv = (TextView) findViewById(R.id.out_time_tv);
         click_btn = (Button) findViewById(R.id.click_btn);
         mapView = (MapView) findViewById(R.id.mapView);
         com_tv = (TextView) findViewById(R.id.com_tv);
+        date_tag = (TextView) findViewById(R.id.date_tag);
         findViewById(R.id.do_trim).setOnClickListener(this);
         initData();
         click_btn.setOnClickListener(this);
     }
 
 
-
     @Override
     public void onClick(View view) {
         switch (view.getId()) {
@@ -93,6 +105,18 @@ public class OutofficeFragment extends EasyFragment implements View.OnClickListe
     }
 
     private void initData() {
+        long time = System.currentTimeMillis();
+        Calendar mCalendar = Calendar.getInstance();
+        mCalendar.setTimeInMillis(time);
+        int mHour = mCalendar.get(Calendar.HOUR);
+        int mMin = mCalendar.get(Calendar.MINUTE);
+        num_tv.setText("" + sigNum);
+        name_tv.setText(MyApplication.getInstance().mLoginUser.getNickName());
+        com_tv.setText(CommonUtil.getSharedPreferences(ct, "erp_commpany"));
+        long timeLong = System.currentTimeMillis();
+        date_tag.setText(TimeUtils.getWeek(timeLong)+":");//星期
+        out_date_tv.setText(TimeUtils.s_long_2_str(time));//日期
+        out_time_tv.setText((mHour < 10 ? "0" : "") + mHour + ":" + (mMin < 10 ? "0" : "") + mMin);//时间点
         BdLocationHelper locationHelper = MyApplication.getInstance().getBdLocationHelper();
         double latitude = locationHelper.getLatitude();
         double longitude = locationHelper.getLongitude();
@@ -129,6 +153,13 @@ public class OutofficeFragment extends EasyFragment implements View.OnClickListe
                     point = info.location;
                     BaiduMapUtil.getInstence().setMapViewPoint(mapView, point, true);
                 }
+            } else if (resultCode == 0x12) {
+                boolean isOK = data.getBooleanExtra("result", false);
+                if (isOK) {
+                    signinAble(false);
+                    sigNum++;
+                    num_tv.setText("" + sigNum);
+                }
             }
         }
     }

+ 150 - 8
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/fragment/SigninFragment.java

@@ -16,6 +16,7 @@ import android.view.ViewGroup;
 import android.widget.Button;
 import android.widget.TextView;
 
+import com.baidu.mapapi.model.LatLng;
 import com.baidu.mapapi.search.core.PoiInfo;
 import com.xzjmyk.pm.activity.MyApplication;
 import com.xzjmyk.pm.activity.R;
@@ -31,12 +32,15 @@ import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.Constants;
 import com.xzjmyk.pm.activity.ui.erp.util.FlexJsonUtil;
+import com.xzjmyk.pm.activity.util.BaiduMapUtil;
 import com.xzjmyk.pm.activity.util.CalendarUtils;
 import com.xzjmyk.pm.activity.util.TimeUtils;
+import com.xzjmyk.pm.activity.util.ToastUtil;
 
 import org.json.JSONException;
 import org.json.JSONObject;
 
+import java.util.Calendar;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
@@ -51,29 +55,62 @@ public class SigninFragment extends EasyFragment {
     private int requcode = 0x11;
     private PoiInfo myPoInfo;
     private String baseUrl;
+    private int uHH, uMM, dHH, dMM;//上下班的时分
+    private int hh, mm;//距离时间
     private final int whatLoad = 0x11;
     private final int whatSignin = 0x12;
+    private final int thrad = 0x13;
+    private boolean isPlay = false;
     private Handler handler = new Handler() {
         @Override
         public void handleMessage(Message msg) {
-//            ct.progressDialog.dismiss();
-            String message = (String) msg.getData().get("result");
-            Log.i("gongpengming", message);
+            ct.progressDialog.dismiss();
+            Bundle message = msg.getData();
             switch (msg.what) {
                 case whatLoad:
                     Log.i("gongpengming", "msg.what == whatLoad");
                     try {
-                        JSONObject object = new JSONObject(message);
-                        time0fwork_tv.setText(object.isNull("ondutytime") ? "--:--" : object.getString("ondutytime"));
-                        time0fuwork_tv.setText(object.isNull("offdutytime") ? "--:--" : object.getString("offdutytime"));
+                        JSONObject object = new JSONObject(message.getString("result"));
+                        String u = object.isNull("ondutytime") ? "00:00" : object.getString("ondutytime");
+                        String d = object.isNull("offdutytime") ? "00:00" : object.getString("offdutytime");
+                        uHH = Integer.parseInt(u.split(":")[0]);
+                        uMM = Integer.parseInt(u.split(":")[1]);
+                        dHH = Integer.parseInt(d.split(":")[0]);
+                        dMM = Integer.parseInt(d.split(":")[1]);
+                        time0fwork_tv.setText((uHH < 10 ? "0" : "") + uHH + ":" + (uMM < 10 ? "0" : "") + uMM);
+                        time0fuwork_tv.setText((dHH < 10 ? "0" : "") + dHH + ":" + (dMM < 10 ? "0" : "") + dMM);
+                        //获取到签到时间后开线程计算距离签到时间
+                        double latitude = MyApplication.getInstance().getBdLocationHelper().getLatitude();
+                        double longitude = MyApplication.getInstance().getBdLocationHelper().getLongitude();
+                        Log.i("gongpengming", "latitude=" + latitude + "@@ longitude" + longitude);
+                        startThrad();
                     } catch (JSONException e) {
                         e.printStackTrace();
                     }
-
-
                     break;
                 case whatSignin:
                     Log.i("gongpengming", "msg.what == whatSignin");
+                    long time = System.currentTimeMillis();
+                    Calendar mCalendar = Calendar.getInstance();
+                    mCalendar.setTimeInMillis(time);
+                    int mHour = mCalendar.get(Calendar.HOUR);
+                    int mMin = mCalendar.get(Calendar.MINUTE);
+                    int h = Math.abs(mHour - uHH);
+                    int m = Math.abs(mHour - dHH);
+                    String strTime = (mHour < 10 ? "0" : "") + mHour + ":" + (mMin < 10 ? "0" : "") + mMin;
+                    if (h < m) {
+                        signin0fwork_tv.setText(strTime);
+                    } else {
+                        signin0fuwork_tv.setText(strTime);
+                    }
+                    isPlay = true;
+                    ToastUtil.showToast(ct, "签到成功");
+                    signinAble(false);
+                    break;
+                case thrad:
+                    String str = message.getString("result");
+                    if (str == null) return;
+                    untime_signin.setText(str);
                     break;
                 case Constants.HTTP_SUCCESS_INIT:
                     break;
@@ -82,6 +119,17 @@ public class SigninFragment extends EasyFragment {
             }
         }
     };
+
+    private void signinAble(boolean b) {
+        signin_btn.setFocusable(b);
+        signin_btn.setClickable(b);
+        if (b) {
+            signin_btn.setBackgroundResource(R.drawable.button_round_shape);
+        } else {
+            signin_btn.setBackgroundResource(R.drawable.button_signin);
+        }
+    }
+
     private TextView time0fwork_tv;
     private TextView signin0fwork_tv;
     private TextView time0fuwork_tv;
@@ -102,6 +150,97 @@ public class SigninFragment extends EasyFragment {
         ct = (SigninActivity) activity;
     }
 
+    //开启线程计算时间
+    private void startThrad() {
+        new Thread(new Runnable() {
+            @Override
+            public void run() {
+                long time = System.currentTimeMillis();
+                Calendar mCalendar = Calendar.getInstance();
+                mCalendar.setTimeInMillis(time);
+                int mHour = mCalendar.get(Calendar.HOUR);
+                int mMin = mCalendar.get(Calendar.MINUTE);
+                int mSecond = mCalendar.get(Calendar.SECOND);
+                if (mHour < uHH) {//当前时间在上班时间之前
+                    beforeTheTime(mHour, mMin,mSecond);
+                } else if (mHour == uHH) {//
+                    if (mMin < uMM) {//还没到上班考勤时间
+                        beforeTheTime(mHour, mMin,mSecond);
+                    } else {//过了上班考勤时间
+                        endTheTime(mHour, mMin,mSecond);
+                    }
+                } else if (mHour < dHH && mHour > uHH) {//当前时间在上班时间之后在下班时间之前
+                    endTheTime(mHour, mMin,mSecond);
+                } else {//当前时间在上班时间和下班时间之后  当天打卡时间已过
+                    sendHandle(-1, -1);
+                }
+
+            }
+        }).start();
+
+    }
+
+    private void endTheTime(int mHour, int mMin, int mSecond) {
+        try {
+            Log.i("gongpengming", "mHour=" + mHour + "@@mMin=" + mMin);
+            Log.i("gongpengming", "dHH=" + dHH + "@@dMM=" + dMM);
+            int m = dMM - mMin;
+            int h = dHH - mHour;
+            while (true) {
+                if (isPlay) break;
+                m--;
+                if (m < 0) {
+                    h--;
+                    m = 60 + m;
+                    if (h < 0) {
+                        sendHandle(00, 00);
+                        break;//退出
+                    }
+                }
+                sendHandle(h, m);
+                Thread.sleep(1000 * 60);
+            }
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+    }
+
+    private void beforeTheTime(int mHour, int mMin, int mSecond) {//当前时间在上班时间之前
+        try {
+            int m = mMin - uMM;
+            int h = uHH - mHour;
+            while (true) {
+                if (isPlay) break;
+                m--;
+                if (m < 0) {
+                    h--;
+                    m = 60 + m;
+                    if (h < 0) {
+                        sendHandle(00, 00);
+                        break;//退出
+                    }
+                }
+                sendHandle(h, m);
+                Thread.sleep(1000 * 60);
+            }
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+    }
+
+    private void sendHandle(int h, int m) {
+        Message message = handler.obtainMessage();
+        message.what = thrad;
+        String time;
+        if (h == -1 && m == -1) {
+            time = "今天打开时间已经过了";
+        } else {
+            time = (h < 10 ? "0" : "") + h + ":" + (m < 10 ? "0" : "") + m;
+        }
+        message.getData().putString("result", time);
+        handler.sendMessage(message);
+    }
+
     @Override
     protected void onCreateView(Bundle savedInstanceState, boolean createView) {
         setHasOptionsMenu(true);
@@ -228,6 +367,9 @@ public class SigninFragment extends EasyFragment {
                 if (resultCode == LocationMapActivity.REQUCODE) {//地图选择返回
                     myPoInfo = data.getParcelableExtra(LocationMapActivity.REQUESTNAME);
                     location_tv.setText(myPoInfo.name);
+                    LatLng location = new LatLng(MyApplication.getInstance().getBdLocationHelper().getLatitude(), MyApplication.getInstance().getBdLocationHelper().getLongitude());
+                    String str = BaiduMapUtil.getInstence().getDistance(myPoInfo.location, location);
+                    unoffice_mm.setText("距离考勤地点:" + str + "米");
                 }
             }
         }

+ 24 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/util/AutoCreateRoomUtil.java

@@ -0,0 +1,24 @@
+package com.xzjmyk.pm.activity.util;
+
+/**
+ * 自动创建群工具类
+ * Created by gongpm on 2016/7/26.
+ */
+public class AutoCreateRoomUtil {
+    private static AutoCreateRoomUtil instence = null;
+
+    public static AutoCreateRoomUtil getInstence() {
+        if (instence == null) {
+            synchronized (AutoCreateRoomUtil.class) {
+                instence = new AutoCreateRoomUtil();
+            }
+        }
+        return instence;
+    }
+
+
+
+
+
+
+}

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

@@ -108,7 +108,10 @@ public class BaiduMapUtil implements OnGetPoiSearchResultListener {
         mPoiSearch.searchNearby(option);
     }
 
-    private void getNearInfo(int radius, int pagerNum, LatLng location, Handler handler) {
+    public void getLocation(){
+
+    }
+    public  void getNearInfo(int radius, int pagerNum, LatLng location, Handler handler) {
         getNearInfo(radius, pagerNum, location, PoiSearch.newInstance(), handler, NEAR_WHAT);
     }
 
@@ -121,7 +124,6 @@ public class BaiduMapUtil implements OnGetPoiSearchResultListener {
         message.setData(bundle);
         handler.sendMessage(message);
     }
-
     @Override
     public void onGetPoiResult(PoiResult poiResult) {
         if (handler == null) return;
@@ -148,7 +150,6 @@ public class BaiduMapUtil implements OnGetPoiSearchResultListener {
      * 实现实位回调监听
      */
     public class MyLocationListener implements BDLocationListener {
-
         public void onReceiveLocation(BDLocation location) {
             //Receive Location
             StringBuffer sb = new StringBuffer(256);
@@ -166,7 +167,6 @@ public class BaiduMapUtil implements OnGetPoiSearchResultListener {
                 sb.append("\nspeed : ");
                 sb.append(location.getSpeed());//获得速度
                 sb.append("\nsatellite : ");
-
                 sb.append(location.getSatelliteNumber());
                 sb.append("\ndirection : ");
                 sb.append("\naddr : ");

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

@@ -181,6 +181,11 @@ public class TimeUtils {
         return 0;
     }
 
+    public static String long2str(long timestamp,String str){
+        SimpleDateFormat formart = new SimpleDateFormat(str);
+        return formart.format(new Date(timestamp));
+    }
+
     /**
      * 获取字符串时间的天
      *

+ 169 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/view/wheel/OptionPicker.java

@@ -0,0 +1,169 @@
+package com.xzjmyk.pm.activity.view.wheel;
+
+import android.app.Activity;
+import android.support.annotation.NonNull;
+import android.text.TextUtils;
+import android.view.Gravity;
+import android.view.View;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import cn.qqtheme.framework.widget.WheelView;
+
+/**
+ * 单项选择器
+ *
+ * @author 李玉江[QQ :1032694760]
+ * @version 2015 /9/29
+ */
+public class OptionPicker extends WheelPicker {
+    /**
+     * The Options.
+     */
+    protected ArrayList<String> options = new ArrayList<String>();
+    private OnOptionPickListener onOptionPickListener;
+    private int selectedOption = -1;
+    private String label = "";
+
+    /**
+     * Instantiates a new Option picker.
+     *
+     * @param activity the activity
+     * @param options  the options
+     */
+    public OptionPicker(Activity activity, String[] options) {
+        super(activity);
+        this.options.addAll(Arrays.asList(options));
+    }
+
+    /**
+     * Instantiates a new Option picker.
+     *
+     * @param activity the activity
+     * @param options  the options
+     */
+    public OptionPicker(Activity activity, ArrayList<String> options) {
+        super(activity);
+        this.options.addAll(options);
+    }
+
+    /**
+     * Sets label.
+     *
+     * @param label the label
+     */
+    public void setLabel(String label) {
+        this.label = label;
+    }
+
+    /**
+     * Sets selected index.
+     *
+     * @param index the index
+     */
+    public void setSelectedIndex(int index) {
+        if (index >=0 && index < options.size()) {
+            selectedOption = index;
+        }
+    }
+
+    /**
+     * Sets selected item.
+     *
+     * @param option the option
+     */
+    public void setSelectedItem(String option) {
+        selectedOption = options.indexOf(option);
+    }
+
+    /**
+     * Sets on option pick listener.
+     *
+     * @param listener the listener
+     */
+    public void setOnOptionPickListener(OnOptionPickListener listener) {
+        this.onOptionPickListener = listener;
+    }
+
+    @Override
+    @NonNull
+    protected View makeCenterView() {
+        if (options.size() == 0) {
+            throw new IllegalArgumentException("please initial options at first, can't be empty");
+        }
+        LinearLayout layout = new LinearLayout(activity);
+        layout.setOrientation(LinearLayout.HORIZONTAL);
+        layout.setGravity(Gravity.CENTER);
+        WheelView optionView = new WheelView(activity);
+        optionView.setLayoutParams(new LinearLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT));
+        optionView.setTextSize(textSize);
+        optionView.setTextColor(textColorNormal, textColorFocus);
+        optionView.setLineVisible(lineVisible);
+        optionView.setLineColor(lineColor);
+        optionView.setOffset(offset);
+        layout.addView(optionView);
+        TextView labelView = new TextView(activity);
+        labelView.setLayoutParams(new LinearLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT));
+        labelView.setTextColor(textColorFocus);
+        labelView.setTextSize(textSize);
+        layout.addView(labelView);
+        if (!TextUtils.isEmpty(label)) {
+            labelView.setText(label);
+        }
+        if (selectedOption < 0) {
+            optionView.setItems(options);
+        } else {
+            optionView.setItems(options, selectedOption);
+        }
+        optionView.setOnWheelViewListener(new WheelView.OnWheelViewListener() {
+            @Override
+            public void onSelected(boolean isUserScroll, int selectedIndex, String item) {
+                selectedOption = selectedIndex;
+            }
+        });
+        return layout;
+    }
+
+    @Override
+    public void onSubmit() {
+        if (onOptionPickListener != null) {
+            onOptionPickListener.onOptionPicked(selectedOption, options.get(selectedOption));
+        }
+    }
+
+    /**
+     * Gets selected option.
+     *
+     * @return the selected option
+     */
+    public String getSelectedOption() {
+        return options.get(selectedOption);
+    }
+
+    /**
+     * Get the selected position.
+     * @return the selected position
+     */
+    public int getSelectedPosition() {
+        return selectedOption;
+    }
+
+    /**
+     * The interface On option pick listener.
+     */
+    public interface OnOptionPickListener {
+
+        /**
+         * On option picked.
+         *
+         * @param position the position you selected
+         * @param option   the option
+         */
+        void onOptionPicked(int position, String option);
+
+    }
+
+}

+ 1 - 1
WeiChat/src/main/res/drawable/button_round_shape.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_pressed="true">
+    <item android:state_pressed="true"  >
         <shape>
             <solid android:color="@color/TextRed" />
             <corners android:radius="360dp" />

+ 10 - 0
WeiChat/src/main/res/drawable/button_signin.xml

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

+ 231 - 248
WeiChat/src/main/res/layout/activity_add_meeting.xml

@@ -1,262 +1,245 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:editTextFormExample="http://schemas.android.com/tools"
-    xmlns:whatever="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@drawable/bg_main"
-    android:orientation="vertical">
+    android:background="@drawable/line"
+    android:fillViewport="true">
 
-    <com.xzjmyk.pm.activity.ui.erp.view.CustomerScrollView
+    <LinearLayout
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:fillViewport="true">
-
-        <LinearLayout
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+
+        <RelativeLayout
+            android:id="@+id/ry_leave_man"
+            style="@style/add_meeting"
+            android:background="@color/item_color2">
+
+            <TextView
+                android:id="@+id/name_tag"
+                style="@style/form_relative_left_text"
+                android:text="会议名称:"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <EditText
+                android:id="@+id/name_et"
+                style="@style/add_meet_tv"
+                android:layout_toRightOf="@+id/name_tag"
+                android:inputType="text" />
+        </RelativeLayout>
+
+        <View
             android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical">
-
-            <LinearLayout
-                android:id="@+id/ly_head_display"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:orientation="vertical">
-
-                <RelativeLayout
-                    android:id="@+id/ry_leave_man"
-                    style="@style/add_meeting"
-                    android:background="@color/item_color1">
-
-
-                    <TextView
-                        android:id="@+id/tv_leave_man"
-                        style="@style/form_relative_left_text"
-                        android:text="会议名称:"
-                        android:textColor="@color/text_main"
-                        android:textSize="@dimen/text_main" />
-
-                    <EditText
-                        android:id="@+id/meet_name_et"
-                        style="@style/add_meet_tv"
-                        android:inputType="text" />
-                </RelativeLayout>
-
-                <!--<ImageView style="@style/app_comm_list_line_gray" />-->
-
-                <RelativeLayout
-                    android:id="@+id/ry_set_startTime"
-                    style="@style/add_meeting"
-                    android:background="@color/item_color2">
-
-
-                    <TextView
-                        android:id="@+id/tv_set_"
-                        style="@style/form_relative_left_text"
-                        android:text="开始时间:"
-                        android:textColor="@color/text_main"
-                        android:textSize="@dimen/text_main" />
-
-                    <EditText
-                        android:id="@+id/meet_start_time_et"
-                        style="@style/add_meet_tv" />
-                </RelativeLayout>
-
-
-                <RelativeLayout
-                    android:id="@+id/ry_set_endTime"
-                    style="@style/add_meeting"
-                    android:background="@color/item_color1">
-
-                    <TextView
-                        android:id="@+id/tv_date_gh"
-                        style="@style/form_relative_left_text"
-                        android:text="结束时间:"
-                        android:textColor="@color/text_main"
-                        android:textSize="@dimen/text_main" />
-
-                    <EditText
-                        android:id="@+id/meet_end_time_et"
-                        style="@style/add_meet_tv" />
-                </RelativeLayout>
-
-                <RelativeLayout
-                    android:id="@+id/ry_leave_mankind"
-                    style="@style/add_meeting"
-                    android:background="@color/item_color2">
-
-                    <TextView
-                        android:id="@+id/tv_leave_mankind"
-                        style="@style/form_relative_left_text"
-                        android:text="会议地点:"
-                        android:textColor="@color/text_main"
-                        android:textSize="@dimen/text_main" />
-
-                    <EditText
-                        android:id="@+id/meet_addr_tv"
-                        style="@style/add_meet_tv" />
-                </RelativeLayout>
-
-                <RelativeLayout
-                    android:id="@+id/ry_leave_type"
-                    style="@style/add_meeting"
-                    android:visibility="gone">
-
-
-                    <TextView
-                        android:id="@+id/tv_leave_type"
-                        style="@style/form_relative_left_text"
-                        android:text="请假类型:" />
-
-                    <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
-                        android:id="@+id/et_leave_type"
-                        style="@style/form_relative_right_text"
-                        android:focusableInTouchMode="false"
-                        editTextFormExample:testType="nocheck" />
-                </RelativeLayout>
-
-
-                <RelativeLayout
-                    android:id="@+id/ry_leave_category"
-                    style="@style/add_meeting"
-                    android:background="@color/item_color1">
-
-                    <TextView
-                        android:id="@+id/tv_leave_category"
-                        style="@style/form_relative_left_text"
-                        android:text="参会人员:"
-                        android:textColor="@color/text_main"
-                        android:textSize="@dimen/text_main" />
-
-                    <EditText
-                        android:id="@+id/meet_user_num_et"
-                        style="@style/add_meet_tv" />
-                </RelativeLayout>
-
-                <!--<ImageView style="@style/app_comm_list_line_gray" />-->
-
-                <RelativeLayout
-                    android:id="@+id/ry_set_website"
-                    style="@style/add_meeting"
-                    android:background="@color/item_color2">
-
-
-                    <TextView
-                        android:id="@+id/tv_iv_leave_days"
-                        style="@style/form_relative_left_text"
-                        android:text="管  理  员:"
-                        android:textColor="@color/text_main"
-                        android:textSize="@dimen/text_main" />
-
-                    <EditText
-                        android:id="@+id/meet_user_et"
-                        style="@style/add_meet_tv" />
-                </RelativeLayout>
-
-                <!--<ImageView style="@style/app_comm_list_line_gray" />-->
-
-                <RelativeLayout
-                    android:id="@+id/ry_leave_hours"
-                    style="@style/add_meeting"
-                    android:background="@color/item_color1">
-
-
-                    <TextView
-                        android:id="@+id/tv_leave_hours"
-                        style="@style/form_relative_left_text"
-                        android:text="会议标签:"
-                        android:textColor="@color/text_main"
-                        android:textSize="@dimen/text_main" />
-
-                    <EditText
-                        android:id="@+id/meet_tag_et"
-                        style="@style/add_meet_tv" />
-                </RelativeLayout>
-
-                <!--<ImageView style="@style/app_comm_list_line_gray" />-->
-
-                <RelativeLayout
-                    android:id="@+id/meet_main_rl"
-                    style="@style/add_meeting"
-                    android:background="@color/item_color2"
-                    android:clickable="true">
-
-
-                    <TextView
-                        android:id="@+id/tv_leave_reason"
-                        style="@style/form_relative_left_text"
-                        android:text="会议议程:"
-                        android:textColor="@color/text_main"
-                        android:textSize="@dimen/text_main" />
-
-                    <com.andreabaccega.widget.FormEditText
-                        android:id="@+id/meet_main_et"
-                        style="@style/add_meet_tv"
-                        android:focusable="false"
-                        editTextFormExample:testType="nocheck" />
-                </RelativeLayout>
-
-                <RelativeLayout
-                    android:id="@+id/meet_about"
-                    style="@style/add_meeting"
-                    android:background="@color/item_color1">
-
+            android:layout_height="1px" />
 
-                    <TextView
-                        android:id="@+id/meet_about_tv"
-                        style="@style/form_relative_left_text"
-                        android:text="会议介绍:"
-                        android:textColor="@color/text_main"
-                        android:textSize="@dimen/text_main" />
-
-                    <EditText
-                        android:id="@+id/meet_about_et"
-                        style="@style/add_meet_tv" />
-                </RelativeLayout>
+        <RelativeLayout
+            android:id="@+id/start_rl"
+            style="@style/add_meeting"
+            android:background="@color/item_color2">
 
-                <RelativeLayout
-                    style="@style/add_meeting"
-                    android:background="@color/item_color2">
-
-
-                    <TextView
-                        style="@style/form_relative_left_text"
-                        android:text="为参会人员创建日程:"
-                        android:textColor="@color/text_main"
-                        android:textSize="@dimen/text_main" />
-
-                    <com.xzjmyk.pm.activity.ui.erp.view.SwitchView
-                        android:id="@+id/cb_task_reply"
-                        android:layout_width="50dp"
-                        android:layout_height="35dp"
-                        android:layout_alignParentRight="true"
-                        android:layout_centerVertical="true"
-                        android:layout_marginRight="20dp" />
 
-                </RelativeLayout>
+            <TextView
+                android:id="@+id/start_tag"
+                style="@style/form_relative_left_text"
+                android:text="开始时间:"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
 
+            <TextView
+                android:id="@+id/start_tv"
+                style="@style/add_meet_tv"
+                android:layout_toRightOf="@id/start_tag"
+                android:drawableRight="@drawable/oa_next" />
+        </RelativeLayout>
 
-            </LinearLayout>
-
-            <LinearLayout
-                android:id="@+id/ly_bottom_display"
-                style="@style/form_linear_customer">
-
-            </LinearLayout>
-
-            <LinearLayout
-                android:id="@+id/ly_bottom_save"
-                style="@style/form_linear_customer">
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1px" />
+
+        <RelativeLayout
+            android:id="@+id/end_rl"
+            style="@style/add_meeting"
+            android:background="@color/item_color2">
+
+            <TextView
+                android:id="@+id/end_tag"
+                style="@style/form_relative_left_text"
+                android:text="结束时间:"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/end_tv"
+                style="@style/add_meet_tv"
+                android:layout_toRightOf="@id/end_tag"
+                android:drawableRight="@drawable/oa_next" />
+        </RelativeLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1px" />
+
+        <RelativeLayout
+            android:id="@+id/ry_leave_mankind"
+            style="@style/add_meeting"
+            android:background="@color/item_color2">
+
+            <TextView
+                android:id="@+id/location_tag"
+                style="@style/form_relative_left_text"
+                android:text="会议地点:"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <EditText
+                android:id="@+id/location_et"
+                style="@style/add_meet_tv"
+                android:layout_toRightOf="@id/location_tag" />
+        </RelativeLayout>
+
+        <RelativeLayout
+            android:id="@+id/ry_leave_type"
+            style="@style/add_meeting"
+            android:visibility="gone">
+
+            <TextView
+                android:id="@+id/tv_leave_type"
+                style="@style/form_relative_left_text"
+                android:text="请假类型:" />
+
+            <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
+                android:id="@+id/et_leave_type"
+                style="@style/form_relative_right_text"
+                android:focusableInTouchMode="false"
+                editTextFormExample:testType="nocheck" />
+        </RelativeLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="10dp" />
+
+        <RelativeLayout
+            android:id="@+id/users_rl"
+            style="@style/add_meeting"
+            android:background="@color/item_color2">
+
+            <TextView
+                android:id="@+id/users_tag"
+                style="@style/form_relative_left_text"
+                android:text="参会人员:"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/users_tv"
+                style="@style/add_meet_tv"
+                android:layout_toRightOf="@+id/users_tag"
+                android:drawableRight="@drawable/oa_next" />
+        </RelativeLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1px" />
+
+        <RelativeLayout
+            android:id="@+id/user_rl"
+            style="@style/add_meeting"
+            android:background="@color/item_color2">
+
+            <TextView
+                android:id="@+id/user_tag"
+                style="@style/form_relative_left_text"
+                android:text="管  理  员:"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <TextView
+                android:id="@+id/user_tv"
+                style="@style/add_meet_tv"
+                android:layout_toRightOf="@id/user_tag"
+                android:drawableRight="@drawable/oa_next" />
+        </RelativeLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="10dp" />
 
-                <Button
-                    android:id="@+id/bt_save"
-                    style="@style/from_button_base_bule"
-                    android:layout_marginBottom="30dp"
-                    android:text="保  存" />
-            </LinearLayout>
+        <RelativeLayout
+            android:id="@+id/ry_leave_hours"
+            style="@style/add_meeting"
+            android:background="@color/item_color2">
 
-            <include layout="@layout/item_work_view" />
-
-        </LinearLayout>
-    </com.xzjmyk.pm.activity.ui.erp.view.CustomerScrollView>
-</LinearLayout>
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1px"
+                android:background="@color/item_line" />
+
+            <TextView
+                android:id="@+id/tag_tag"
+                style="@style/form_relative_left_text"
+                android:text="会议标签:"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <EditText
+                android:id="@+id/tag_et"
+                style="@style/add_meet_tv"
+                android:layout_toRightOf="@+id/tag_tag"
+                android:drawableRight="@drawable/oa_next" />
+        </RelativeLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1px" />
+
+        <RelativeLayout
+            android:id="@+id/meet_about"
+            style="@style/add_meeting"
+            android:background="@color/item_color2">
+
+            <TextView
+                android:id="@+id/about_tag"
+                style="@style/form_relative_left_text"
+                android:text="会议介绍:"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <EditText
+                android:id="@+id/about_et"
+                style="@style/add_meet_tv"
+                android:layout_toRightOf="@id/about_tag" />
+        </RelativeLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="10dp" />
+
+        <RelativeLayout
+            style="@style/add_meeting"
+            android:background="@color/item_color2">
+
+            <TextView
+                style="@style/form_relative_left_text"
+                android:text="为参会人员创建日程:"
+                android:textColor="@color/text_main"
+                android:textSize="@dimen/text_main" />
+
+            <com.xzjmyk.pm.activity.ui.erp.view.SwitchView
+                android:id="@+id/create_ric_sv"
+                android:layout_width="50dp"
+                android:layout_height="35dp"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:layout_marginRight="20dp" />
+        </RelativeLayout>
+
+        <Button
+            android:id="@+id/bt_save"
+            style="@style/from_button_base_bule"
+            android:layout_marginBottom="30dp"
+            android:layout_marginTop="20dp"
+            android:text="保  存" />
+    </LinearLayout>
+</ScrollView>

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

@@ -18,6 +18,7 @@
             android:orientation="horizontal">
 
             <LinearLayout
+                android:id="@+id/meet_save"
                 android:layout_width="0dp"
                 android:layout_height="wrap_content"
                 android:layout_weight="1"
@@ -305,6 +306,7 @@
                 android:background="@color/item_line" />
 
             <TextView
+                android:id="@+id/end_meet_tv"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_below="@+id/meet_about"

+ 32 - 0
WeiChat/src/main/res/layout/activity_meet_select.xml

@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@drawable/bg_main"
+    android:padding="10dp"
+    tools:context="com.xzjmyk.pm.activity.ui.erp.activity.oa.MeetSelectActivity">
+
+    <com.xzjmyk.pm.activity.view.ClearEditText
+        android:id="@+id/search_edit"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:background="@drawable/search_input"
+        android:drawableLeft="@drawable/search"
+        android:drawableRight="@drawable/search_clear"
+        android:hint="@string/search"
+        android:textColor="@color/dark_grey"
+        android:textColorHint="@color/grey"
+        android:textSize="15sp" />
+
+    <ListView
+        android:id="@+id/listview"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_below="@+id/search_edit"
+        android:layout_marginTop="10dp"
+        android:divider="@color/item_line"
+        android:scrollbars="none" />
+</RelativeLayout>

+ 4 - 2
WeiChat/src/main/res/layout/activity_oa.xml

@@ -382,7 +382,8 @@
                 android:id="@+id/state"
                 android:layout_width="0dp"
                 android:layout_height="match_parent"
-                android:layout_weight="2.5" />
+                android:layout_weight="2.5"
+                android:spinnerMode="dropdown" />
 
             <View
                 android:layout_width="1px"
@@ -393,7 +394,8 @@
                 android:id="@+id/type"
                 android:layout_width="0dp"
                 android:layout_height="match_parent"
-                android:layout_weight="2" />
+                android:layout_weight="2"
+                android:spinnerMode="dropdown" />
 
             <View
                 android:layout_width="1px"

+ 8 - 4
WeiChat/src/main/res/layout/activity_out_signin_ok.xml

@@ -25,10 +25,11 @@
             android:id="@+id/time_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_toRightOf="@+id/time_tag" />
+            android:layout_alignBottom="@id/time_tag"
+            android:layout_toRightOf="@id/time_tag" />
 
         <TextView
-            android:id="@+id/addr_tag_tv"
+            android:id="@+id/addr_tag"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_below="@+id/time_tag"
@@ -40,7 +41,8 @@
             android:id="@+id/addr_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_toRightOf="@+id/addr_tag_tv"
+            android:layout_alignBottom="@id/addr_tag"
+            android:layout_toRightOf="@+id/addr_tag"
             android:maxLines="2" />
 
     </RelativeLayout>
@@ -87,7 +89,9 @@
             android:id="@+id/com_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_toRightOf="@+id/com_tag" />
+            android:layout_alignBottom="@+id/com_tag"
+            android:layout_toRightOf="@+id/com_tag"
+            android:textSize="@dimen/text_main" />
 
         <Button
             android:id="@+id/exit_btn"

+ 24 - 7
WeiChat/src/main/res/layout/activity_outoffice_set.xml

@@ -27,6 +27,11 @@
             android:layout_marginRight="20dp" />
     </RelativeLayout>
 
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="2px"
+        android:background="@color/item_line" />
+
     <RelativeLayout
         android:layout_width="match_parent"
         android:layout_height="@dimen/item_height"
@@ -41,6 +46,7 @@
             android:textSize="@dimen/text_main" />
 
         <com.xzjmyk.pm.activity.ui.erp.view.SwitchView
+            android:id="@+id/allow_chance_location"
             android:layout_width="50dp"
             android:layout_height="35dp"
             android:layout_alignParentRight="true"
@@ -48,7 +54,13 @@
             android:layout_marginRight="20dp" />
     </RelativeLayout>
 
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="2px"
+        android:background="@color/item_line" />
+
     <RelativeLayout
+        android:id="@+id/location_rl"
         android:layout_width="match_parent"
         android:layout_height="@dimen/item_height"
         android:padding="5dp">
@@ -61,12 +73,17 @@
             android:textColor="@color/text_main"
             android:textSize="@dimen/text_main" />
 
-    <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="match_parent"
-        android:gravity="center_vertical"
-        android:drawableRight="@drawable/oa_next"
-        android:layout_alignParentRight="true"
-        android:text="500米"/>
+        <TextView
+            android:id="@+id/location_tv"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:layout_alignParentRight="true"
+            android:drawableRight="@drawable/oa_next"
+            android:gravity="center_vertical"
+            android:text="500米" />
     </RelativeLayout>
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="2px"
+        android:background="@color/item_line"/>
 </LinearLayout>

+ 12 - 0
WeiChat/src/main/res/layout/activity_save_meet.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:paddingBottom="@dimen/activity_vertical_margin"
+    android:paddingLeft="@dimen/activity_horizontal_margin"
+    android:paddingRight="@dimen/activity_horizontal_margin"
+    android:paddingTop="@dimen/activity_vertical_margin"
+    tools:context="com.xzjmyk.pm.activity.ui.erp.activity.oa.SaveMeetActivity">
+
+</RelativeLayout>

+ 26 - 27
WeiChat/src/main/res/layout/fragment_outoffice.xml

@@ -4,32 +4,23 @@
     android:layout_height="match_parent"
     android:padding="20dp">
 
-    <TextView
-        android:id="@+id/name_tv"
+    <ImageView
+        android:id="@+id/name_img"
         android:layout_width="80dp"
         android:layout_height="80dp"
         android:background="@drawable/text_button_stye2"
         android:gravity="center"
-        android:padding="10dp"
-        android:text="晨阳"
+        android:scaleType="fitXY"
+        android:src="@drawable/home_image_01"
         android:textSize="25dp" />
-    <TextView
-        android:id="@+id/com_tv"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="10dp"
-        android:layout_alignBottom="@+id/name_tv"
-        android:layout_toRightOf="@+id/name_tv"
-        android:text="又软帝国"
 
-        android:textSize="@dimen/text_hine" />
     <TextView
-        android:id="@+id/name2_tv"
+        android:id="@+id/name_tv"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_alignTop="@+id/name_tv"
-        android:layout_marginTop="10dp"
-        android:layout_toRightOf="@+id/name_tv"
+        android:layout_alignTop="@+id/name_img"
+        android:layout_marginLeft="10dp"
+        android:layout_toRightOf="@+id/name_img"
         android:text="熊晨阳"
         android:textSize="20dp" />
 
@@ -37,9 +28,9 @@
         android:id="@+id/tv"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_above="@+id/com_tv"
-        android:layout_below="@+id/name2_tv"
-        android:layout_toRightOf="@+id/name_tv"
+        android:layout_alignLeft="@+id/name_tv"
+        android:layout_below="@+id/name_tv"
+        android:layout_marginTop="5dp"
         android:text="你今天完成签到"
         android:textSize="20dp" />
 
@@ -59,18 +50,27 @@
 
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_alignBottom="@+id/name_tv"
-        android:layout_alignTop="@+id/tv"
+        android:layout_alignBottom="@+id/tv"
         android:layout_marginLeft="2dp"
         android:layout_toRightOf="@+id/num_tv"
         android:text="次"
         android:textSize="20dp" />
 
+    <TextView
+        android:id="@+id/com_tv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignLeft="@+id/tv"
+        android:layout_below="@+id/tv"
+        android:layout_marginTop="5dp"
+        android:text="优软科技"
+        android:textSize="@dimen/text_hine" />
+
     <View
         android:id="@+id/line1"
         android:layout_width="match_parent"
         android:layout_height="2px"
-        android:layout_below="@+id/name_tv"
+        android:layout_below="@+id/name_img"
         android:layout_marginBottom="10dp"
         android:layout_marginTop="10dp"
         android:background="@color/item_line" />
@@ -82,7 +82,7 @@
         android:layout_below="@+id/line1"
         android:layout_marginTop="10dp"
         android:drawableLeft="@drawable/alarm"
-        android:text="星期一:"
+        android:text=":"
         android:textSize="@dimen/text_hine" />
 
     <TextView
@@ -157,9 +157,8 @@
         android:id="@+id/do_trim"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_below="@+id/out_add_t_tv"
-        android:layout_marginLeft="10dp"
-        android:layout_marginTop="5dp"
+        android:layout_alignBottom="@+id/mapView"
+        android:layout_alignLeft="@+id/out_add_name_tv"
         android:layout_toRightOf="@+id/mapView"
         android:maxLines="1"
         android:text="地点微调"

+ 15 - 13
WeiChat/src/main/res/layout/fragment_signin.xml

@@ -72,7 +72,7 @@
                 android:layout_height="0dp"
                 android:layout_weight="1"
                 android:gravity="center"
-                android:text="班时间" />
+                android:text="班时间" />
 
             <TextView
                 android:id="@+id/time0fuwork_tv"
@@ -98,7 +98,7 @@
                 android:layout_height="0dp"
                 android:layout_weight="1"
                 android:gravity="center"
-                android:text="班签到时间" />
+                android:text="班签到时间" />
 
             <TextView
                 android:id="@+id/signin0fuwork_tv"
@@ -129,13 +129,14 @@
                 android:text="--:--" />
         </RelativeLayout>
 
-        <RelativeLayout
+        <LinearLayout
             android:id="@+id/addr_rl"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_below="@+id/signin_rl"
             android:layout_marginTop="20dp"
-            android:background="@drawable/oa_signin_tv_bg">
+            android:background="@drawable/oa_signin_tv_bg"
+            android:orientation="horizontal">
 
             <TextView
                 android:id="@+id/addr_tag"
@@ -146,18 +147,19 @@
 
             <TextView
                 android:id="@+id/location_tv"
-                android:layout_width="wrap_content"
+                android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:layout_alignParentRight="true"
-                android:gravity="left"
-                android:layout_marginLeft="20dp"
-                android:layout_toRightOf="@+id/addr_tag"
                 android:drawableRight="@drawable/oa_next"
                 android:ellipsize="marquee"
+                android:focusable="true"
+                android:focusableInTouchMode="true"
+                android:gravity="right"
                 android:lines="1"
+                android:marqueeRepeatLimit="marquee_forever"
+                android:scrollHorizontally="true"
                 android:text="地址..."
                 android:textSize="@dimen/text_hine" />
-        </RelativeLayout>
+        </LinearLayout>
 
         <LinearLayout
             android:id="@+id/oa_range_addr_rl"
@@ -173,13 +175,13 @@
                 android:id="@+id/office_addr"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:text="考勤地点:XXXX" />
+                android:text="考勤地点:深圳优软科技" />
 
             <TextView
                 android:id="@+id/unoffice_mm"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:text="距离考勤地点:XX公里" />
+                android:text="距离考勤地点:0 公里" />
         </LinearLayout>
 
         <TextView
@@ -199,7 +201,7 @@
             android:layout_below="@+id/oa_range_addr_rl"
             android:layout_centerHorizontal="true"
             android:layout_marginTop="30dp"
-            android:background="@drawable/button_round_shape"
+            android:background="@drawable/button_signin"
             android:padding="20dp"
             android:text="打卡"
             android:textColor="@color/white"

+ 40 - 0
WeiChat/src/main/res/layout/meet_select_item.xml

@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="@dimen/item_height"
+    android:background="@color/bg_main"
+    android:paddingBottom="8dp"
+    android:paddingLeft="10dp"
+    android:paddingRight="10dp"
+    android:paddingTop="8dp">
+
+    <CheckBox
+        android:id="@+id/select_scb"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:button="@null"
+        android:checked="false"
+        android:drawableLeft="@drawable/oa_rb_button_bg"
+        android:padding="10dp" />
+
+    <TextView
+        android:id="@+id/name_tv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="10dp"
+        android:layout_toRightOf="@+id/select_scb"
+        android:text="名字"
+        android:textColor="@color/text_main"
+        android:textSize="@dimen/text_main" />
+
+    <TextView
+        android:id="@+id/id_tv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignLeft="@+id/name_tv"
+        android:layout_below="@+id/name_tv"
+        android:layout_marginTop="8dp"
+        android:text="id:id"
+        android:textColor="@color/text_hine"
+        android:textSize="@dimen/text_hine" />
+</RelativeLayout>

+ 1 - 2
WeiChat/src/main/res/layout/oa_meeting_item.xml

@@ -120,6 +120,5 @@
         android:layout_height="wrap_content"
         android:layout_alignTop="@+id/oa_meeting_tag"
         android:layout_marginLeft="10dp"
-        android:layout_toRightOf="@+id/oa_meeting_tag"
-        android:text="培训会议" />
+        android:layout_toRightOf="@+id/oa_meeting_tag" />
 </RelativeLayout>

+ 3 - 8
WeiChat/src/main/res/values/gpm_values.xml

@@ -80,16 +80,11 @@
         <item name="android:layout_width">match_parent</item>
         <item name="android:layout_height">wrap_content</item>
         <item name="android:layout_centerVertical">true</item>
-        <item name="android:layout_alignParentRight">true</item>
-        <item name="android:layout_marginRight">20dp</item>
-        <item name="android:layout_marginLeft">150dp</item>
-        <item name="android:background">@drawable/shape_from_edit</item>
+        <item name="android:layout_marginRight">10dp</item>
+        <item name="android:layout_marginLeft">10dp</item>
+        <item name="android:background">@null</item>
         <item name="android:gravity">left</item>
-        <item name="android:maxWidth">290dp</item>
         <item name="android:padding">5dp</item>
-        <item name="android:width">160dp</item>
-        <item name="android:layout_marginTop">8dp</item>
-        <item name="android:layout_marginBottom">8dp</item>
         <item name="android:textColorHint">@color/gray</item>
         <item name="android:textSize">15sp</item>
     </style>