Browse Source

Merge branch 'feature_bitliker' of https://gitlab.com/Arisono/SkWeiChat-Baidu into feature

# Conflicts:
#	WeiChat/version.properties
Arison 8 years ago
parent
commit
d8cedfd753
98 changed files with 1469 additions and 1461 deletions
  1. 6 3
      WeiChat/src/main/AndroidManifest.xml
  2. 24 22
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/MainActivity.java
  3. 18 23
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/OAActivity.java
  4. 7 11
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/me/MeFragment.java
  5. 3 3
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/message/MessageFragment.java
  6. 76 117
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/platform/task/TaskActivity.java
  7. 62 75
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/platform/task/TaskB2BActivity.java
  8. BIN
      WeiChat/src/main/res/drawable-hdpi/daibangongzuo.png
  9. BIN
      WeiChat/src/main/res/drawable-hdpi/home_image_01_u.png
  10. BIN
      WeiChat/src/main/res/drawable-hdpi/icon_yuyue3.png
  11. BIN
      WeiChat/src/main/res/drawable-hdpi/tingyue.png
  12. BIN
      WeiChat/src/main/res/drawable-hdpi/uuu.png
  13. BIN
      WeiChat/src/main/res/drawable-xhdpi/daibangongzuo.png
  14. BIN
      WeiChat/src/main/res/drawable-xhdpi/home_image_01_u.png
  15. BIN
      WeiChat/src/main/res/drawable-xhdpi/icon_me_nor.png
  16. BIN
      WeiChat/src/main/res/drawable-xhdpi/icon_yuyue3.png
  17. BIN
      WeiChat/src/main/res/drawable-xhdpi/tingyue.png
  18. BIN
      WeiChat/src/main/res/drawable-xhdpi/uuu.png
  19. BIN
      WeiChat/src/main/res/drawable-xxhdpi/daibangongzuo.png
  20. BIN
      WeiChat/src/main/res/drawable-xxhdpi/home_image_01_u.png
  21. BIN
      WeiChat/src/main/res/drawable-xxhdpi/icon_yuyue3.png
  22. BIN
      WeiChat/src/main/res/drawable-xxhdpi/tingyue.png
  23. BIN
      WeiChat/src/main/res/drawable-xxhdpi/uuu.png
  24. 4 22
      WeiChat/src/main/res/layout/fragment_new_message.xml
  25. 6 6
      WeiChat/src/main/res/layout/item_message.xml
  26. 40 16
      WeiChat/src/main/res/layout/listitem_businessless_edit.xml
  27. 1 1
      WeiChat/src/main/res/values/colors.xml
  28. 15 7
      app_core/common/src/main/java/com/core/base/SupportToolBarActivity.java
  29. 23 0
      app_core/common/src/main/res/drawable/bg_transparent_bule.xml
  30. 6 0
      app_core/common/src/main/res/drawable/text_bule_white_bg.xml
  31. 10 9
      app_core/common/src/main/res/layout/activity_approval.xml
  32. 1 1
      app_core/common/src/main/res/layout/item_message.xml
  33. 42 18
      app_core/common/src/main/res/layout/listitem_businessless_edit.xml
  34. 2 1
      app_core/common/src/main/res/layout/plat_oamain.xml
  35. 1 1
      app_modular/appcontact/src/main/java/com/uas/appcontact/ui/fragment/ContactsFragment.java
  36. 5 5
      app_modular/appmessages/src/main/AndroidManifest.xml
  37. 5 1
      app_modular/appmessages/src/main/java/com/modular/appmessages/activity/ApprovalActivity.java
  38. 2 1
      app_modular/appmessages/src/main/java/com/modular/appmessages/activity/ApprovalNewListActivity.java
  39. 15 14
      app_modular/appmessages/src/main/java/com/modular/appmessages/activity/TaskNewActivity.java
  40. 51 55
      app_modular/appmessages/src/main/java/com/modular/appmessages/adapter/NewSchedultAdapter.java
  41. 31 13
      app_modular/appmessages/src/main/java/com/modular/appmessages/fragment/ApprovalListFragment.java
  42. 349 0
      app_modular/appmessages/src/main/java/com/modular/appmessages/fragment/TaskListFragment.java
  43. 4 0
      app_modular/appmessages/src/main/java/com/modular/appmessages/fragment/ViewPagerLazyFragment.java
  44. 0 11
      app_modular/appmessages/src/main/java/com/modular/appmessages/presenter/MessagePresenter.java
  45. 18 4
      app_modular/appmessages/src/main/java/com/modular/appmessages/widget/SignRefreshLayout.java
  46. BIN
      app_modular/appmessages/src/main/res/drawable-hdpi/ic_sign_voice.png
  47. BIN
      app_modular/appmessages/src/main/res/drawable-hdpi/ic_sign_voice_no.png
  48. BIN
      app_modular/appmessages/src/main/res/drawable-xhdpi/ic_sign_voice.png
  49. BIN
      app_modular/appmessages/src/main/res/drawable-xhdpi/ic_sign_voice_no.png
  50. BIN
      app_modular/appmessages/src/main/res/drawable-xxhdpi/ic_sign_voice.png
  51. BIN
      app_modular/appmessages/src/main/res/drawable-xxhdpi/ic_sign_voice_no.png
  52. 2 3
      app_modular/appmessages/src/main/res/layout/activity_approval_list.xml
  53. 0 1
      app_modular/appmessages/src/main/res/layout/item_message_header.xml
  54. 0 45
      app_modular/appmessages/src/main/res/layout/toolbar_voice_search.xml
  55. 1 3
      app_modular/apptasks/src/main/java/com/modular/apptasks/presenter/AutoPresenter.java
  56. 16 7
      app_modular/apputils/src/main/java/com/modular/apputils/adapter/ApprovalListAdapter.java
  57. 1 3
      app_modular/apputils/src/main/java/com/modular/apputils/utils/SignUtils.java
  58. 14 15
      app_modular/apputils/src/main/java/com/modular/apputils/utils/VoiceUtils.java
  59. 5 0
      app_modular/apputils/src/main/res/drawable/text_bule_hint_bg.xml
  60. 113 0
      app_modular/apputils/src/main/res/layout/acativity_task_list.xml
  61. 0 0
      app_modular/apputils/src/main/res/layout/action_device_cycle_count.xml
  62. 10 8
      app_modular/apputils/src/main/res/layout/item_approval_list.xml
  63. 1 0
      app_modular/apputils/src/main/res/layout/simply_refresh_recyclerview.xml
  64. BIN
      app_modular/apputils/src/main/res/raw/rec.mp3
  65. BIN
      app_modular/apputils/src/main/res/raw/voice_off.mp3
  66. BIN
      app_modular/apputils/src/main/res/raw/voice_sign.mp3
  67. BIN
      app_modular/apputils/src/main/res/raw/voice_sign.wav
  68. BIN
      app_modular/apputils/src/main/res/raw/voice_work.mp3
  69. 314 801
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceDataFormAddActivity.java
  70. 2 2
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceManageActivity.java
  71. 33 18
      app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/form/DataFormDetailActivity.java
  72. 114 111
      app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/form/TravelDataFormDetailActivity.java
  73. 14 3
      app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/utils/AutoErpSigninUitl.java
  74. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/icon_application_use.png
  75. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/icon_cycle_count.png
  76. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/icon_device_match.png
  77. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/icon_device_query.png
  78. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/icon_fault_inspection.png
  79. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/icon_maintenance.png
  80. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/icon_scan_device.png
  81. BIN
      app_modular/appworks/src/main/res/drawable-hdpi/icon_scrap_application.png
  82. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/icon_application_use.png
  83. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/icon_cycle_count.png
  84. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/icon_device_match.png
  85. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/icon_device_query.png
  86. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/icon_fault_inspection.png
  87. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/icon_maintenance.png
  88. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/icon_scan_device.png
  89. BIN
      app_modular/appworks/src/main/res/drawable-xhdpi/icon_scrap_application.png
  90. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/icon_application_use.png
  91. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/icon_cycle_count.png
  92. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/icon_device_match.png
  93. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/icon_device_query.png
  94. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/icon_fault_inspection.png
  95. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/icon_maintenance.png
  96. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/icon_scan_device.png
  97. BIN
      app_modular/appworks/src/main/res/drawable-xxhdpi/icon_scrap_application.png
  98. 2 1
      app_modular/appworks/src/main/res/layout/activity_device_manage.xml

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

@@ -257,7 +257,8 @@
         <activity android:name=".ui.erp.activity.NewsTwoActivity" />
         <activity android:name=".ui.erp.activity.NoticesActivity" />
         <activity android:name=".ui.erp.activity.InformActivity" />
-        <activity android:name=".ui.platform.task.TaskActivity">
+        <activity android:name=".ui.platform.task.TaskActivity"
+            android:theme="@style/MainBaseTheme">
             <intent-filter>
                 <action android:name="com.modular.task.TaskActivity" />
                 <category android:name="android.intent.category.DEFAULT" />
@@ -653,7 +654,8 @@
         <activity android:name="com.uas.appme.other.activity.UpdateSingleTextActivity" />
         <activity android:name="com.uas.appme.other.activity.UpdateSexActivity" />
 
-        <activity android:name=".ui.erp.activity.oa.OAActivity">
+        <activity android:name=".ui.erp.activity.oa.OAActivity"
+            android:theme="@style/MainBaseTheme">
             <intent-filter>
                 <action android:name="com.modular.work.OAActivity" />
                 <category android:name="android.intent.category.DEFAULT" />
@@ -916,7 +918,8 @@
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
         </activity>
-        <activity android:name=".ui.platform.task.TaskB2BActivity">
+        <activity android:name=".ui.platform.task.TaskB2BActivity"
+            android:theme="@style/MainBaseTheme">
             <intent-filter>
                 <action android:name="com.modular.task.TaskB2BActivity" />
                 <category android:name="android.intent.category.DEFAULT" />

+ 24 - 22
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/MainActivity.java

@@ -194,7 +194,7 @@ public class MainActivity extends BaseActivity implements ImStatusListener, NetW
     private List<SignAutoLogEntity> signAutoLogEntity;
     private List<SignAutoLogEntity> isendEntity;
     private Boolean platform;
-    private RadioButton main_tab_one,main_tab_two,main_tab_five,main_tab_three;
+    private RadioButton main_tab_one, main_tab_two, main_tab_five, main_tab_three;
 
     public int getmImStatus() {
         return mImStatus;
@@ -263,25 +263,28 @@ public class MainActivity extends BaseActivity implements ImStatusListener, NetW
         }
     }
 
-    private ScaleAnimation rotate;
-
-    private Animation getImgAnimation() {
-        if (rotate == null) {
-            rotate = new ScaleAnimation(
-                    0.5f, 1.0f, 0f, 1.0f,
-                    Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
-            LinearInterpolator lin = new LinearInterpolator();
-            rotate.setInterpolator(lin);
-            rotate.setDuration(200);//设置动画持续时间
-//            rotate.setRepeatCount(-1);//设置重复次数
-            rotate.setFillAfter(true);//动画执行完后是否停留在执行完的状态
-            rotate.setStartOffset(0);//执行前的等待时间
+
+    private Animation getImgAnimation(View view) {
+        Object tag = view.getTag(R.id.tag_key);
+        if (tag != null && tag instanceof ScaleAnimation) {
+            ScaleAnimation animation = (ScaleAnimation) tag;
+            return animation;
         }
-        return rotate;
+        ScaleAnimation animation = new ScaleAnimation(
+                0.5f, 1.0f, 0.5f, 1.0f,
+                Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
+        LinearInterpolator lin = new LinearInterpolator();
+        animation.setInterpolator(lin);
+        animation.setDuration(300);//设置动画持续时间
+//      animation.setRepeatCount(-1);//设置重复次数
+        animation.setFillAfter(true);//动画执行完后是否停留在执行完的状态
+        animation.setStartOffset(0);//执行前的等待时间
+        view.setTag(R.id.tag_key,animation);
+        return animation;
     }
 
     private void startAnimator(View view) {
-        view.startAnimation(getImgAnimation());
+        view.startAnimation(getImgAnimation(view));
     }
 
     /**
@@ -295,22 +298,21 @@ public class MainActivity extends BaseActivity implements ImStatusListener, NetW
                 if (mMessageFragment == null) {
                     mMessageFragment = new MessageFragment();
                 }
-                startAnimator(main_tab_one);
                 changeFragment(mMessageFragment, TAG_MESSAGE);//消息
                 updateMessageTitle();
+                startAnimator(main_tab_one);
             } else if (checkedId == R.id.main_tab_two) {
                 if (mBusinessCircleFragment == null) {
                     mBusinessCircleFragment = new ContactsFragment();
                 }
-                startAnimator(main_tab_two);
+
                 changeFragment(mBusinessCircleFragment, TAG_BusinessCircle);//发现
                 setTitle(getString(R.string.contact_title));
-
+                startAnimator(main_tab_two);
             } else if (checkedId == R.id.main_tab_three) {  //点击工作选项
                 if (mWorksFragment == null) {
                     mWorksFragment = new WorkPlatFragment();
                 }
-                startAnimator(main_tab_three);
                 changeFragment(mWorksFragment, TAG_NEARBY);
                 String role = com.core.utils.CommonUtil.getUserRole();
                 if (role.equals("2")) {
@@ -319,17 +321,17 @@ public class MainActivity extends BaseActivity implements ImStatusListener, NetW
                 } else {
                     setTitle(getString(R.string.work_title));
                 }
-                //TODO 当前隐藏新功能提醒红点
                 main_tab_three_tv.setVisibility(View.INVISIBLE);
                 PreferenceUtils.putInt(MainActivity.NEW_FUNCTION_NOTICE, 1);
+                startAnimator(main_tab_three);
             } else if (checkedId == R.id.main_tab_five) {
                 if (mMeFragment == null) {
                     mMeFragment = new MeFragment();
                 }
-                startAnimator(main_tab_five);
                 CommonUtil.setSharedPreferences(ct, com.core.app.Constants.NEW_ME_TAG, true);
                 changeFragment(mMeFragment, TAG_ME);//我
                 setTitle(R.string.me);
+                startAnimator(main_tab_five);
             }
         }
     };

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

@@ -44,7 +44,7 @@ import com.core.api.wxapi.ApiUtils;
 import com.core.app.AppConfig;
 import com.core.app.Constants;
 import com.core.app.MyApplication;
-import com.core.base.BaseActivity;
+import com.core.base.SupportToolBarActivity;
 import com.core.model.Employees;
 import com.core.net.http.ViewUtil;
 import com.core.net.http.http.OAHttpHelper;
@@ -83,7 +83,6 @@ import com.xzjmyk.pm.activity.ui.platform.task.TaskAddB2BActivity;
 import com.xzjmyk.pm.activity.ui.platform.task.TaskDetailB2BActivity;
 import com.xzjmyk.pm.activity.util.oa.CommonUtil;
 import com.xzjmyk.pm.activity.util.oa.OAHttpUtil;
-import com.xzjmyk.pm.activity.view.crouton.Crouton;
 import com.xzjmyk.pm.activity.view.crouton.Style;
 
 import java.util.ArrayList;
@@ -96,13 +95,11 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import static com.core.net.http.ViewUtil.handler;
-import static com.xzjmyk.pm.activity.view.crouton.Crouton.makeText;
 
 /**
  * Created by pengminggong on 2016/9/27.
  */
-public class OAActivity extends BaseActivity implements View.OnClickListener, WorkDailyAddActivity.OnFinishOa, OnHttpResultListener {
+public class OAActivity extends SupportToolBarActivity implements View.OnClickListener, WorkDailyAddActivity.OnFinishOa, OnHttpResultListener {
     private final int LOAD_ORDERSCALL = 0x768;//获取动态caller
     private final int LOAD_SUBORDINATE = 0x767;//获取下属数据
     private final int LOAD_MENU_DATA = 0x766;//获取菜单数据
@@ -371,7 +368,7 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
                         intent.putExtra("data", object.toString());
                         startActivityForResult(intent, isMe ? 0x20 : 0x21);
                     } else {
-                        makeText(ct, getString(R.string.outplan_undone));
+                        showToast(  getString(R.string.outplan_undone));
                     }
                 }
             }
@@ -451,11 +448,9 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
             subord_log.setText(getString(R.string.Subordinates_visit));
             my_log.setText(getString(R.string.my_visit));
         } else {
-//            title = getString(R.string.work_oa);
-            title = getString(R.string.work_calender);
+            title = getString(R.string.oamain_title);
         }
-        getSupportActionBar().setTitle(title);
-
+        setTitle(title);
         setDateTag(new Date());
         if (!isB2b) {
             loadSubordinate();
@@ -473,7 +468,7 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
         CommonInterface.getInstance().judgeManager(null);
         CommonInterface.getInstance().getOutSetInfo(null);
 
-        doShowSpecialView();//TODO 红点啥的和版本新功能有关的都写在这里吧
+        doShowSpecialView();
         //获取动态表单caller
 //        loadOrdersCall();
 
@@ -547,7 +542,7 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
         loginNum++;
         if (loginNum > 1) return;
         ViewUtil.ct = ct;
-        ViewUtil.LoginERPTask(ct, handler, 0x16);
+        ViewUtil.LoginERPTask(ct, ViewUtil.handler, 0x16);
     }
 
     /*获取索凌菜单接口*/
@@ -729,7 +724,7 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
             lastTime = System.currentTimeMillis();
             if (!StringUtil.isEmpty(workDailyAdd) && "WorkDailyAdd".equals(workDailyAdd)) {
             } else {
-                Crouton.showToast(ct, error, R.color.load_warning);
+             showToast(error);
             }
         }
 
@@ -751,9 +746,9 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
             adapter.setModels(showModel);
             adapter.notifyDataSetChanged();
             emptyLayout.showEmpty();
-            CommonUtil.textSpanForStyle(all_task_num, getString(R.string.work_calender) + 0, 0 + "", getResources().getColor(R.color.orange_text));
-            CommonUtil.textSpanForStyle(ok_task_num, getString(R.string.done) + 0, 0 + "", getResources().getColor(R.color.orange_text));
-            CommonUtil.textSpanForStyle(uok_task_num, getString(R.string.undone) + 0, 0 + "", getResources().getColor(R.color.orange_text));
+            CommonUtil.textSpanForStyle(all_task_num, getString(R.string.work_calender) + 0, 0 + "", getResources().getColor(R.color.approval_select_tab));
+            CommonUtil.textSpanForStyle(ok_task_num, getString(R.string.done) + 0, 0 + "", getResources().getColor(R.color.approval_select_tab));
+            CommonUtil.textSpanForStyle(uok_task_num, getString(R.string.undone) + 0, 0 + "", getResources().getColor(R.color.approval_select_tab));
             return;
         }
         int ok = 0, size = 0;
@@ -883,16 +878,16 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
             }
             setDateToListener(meInt);
             ok_scale.setVisibility(View.INVISIBLE);
-            my_log.setTextColor(getResources().getColor(R.color.darkorange));
-            subord_log.setTextColor(getResources().getColor(R.color.dimgrey));
+            my_log.setTextColor(getResources().getColor(R.color.approval_select_tab));
+            subord_log.setTextColor(getResources().getColor(R.color.text_main));
             subord_log_tag.setBackgroundResource(R.color.item_line);
-            my_log_tag.setBackgroundResource(R.color.darkorange);
+            my_log_tag.setBackgroundResource(R.color.approval_select_tab);
         } else {
             setDateToListener(otherInt);
             ok_scale.setVisibility(View.VISIBLE);
-            my_log.setTextColor(getResources().getColor(R.color.dimgrey));
-            subord_log.setTextColor(getResources().getColor(R.color.darkorange));
-            subord_log_tag.setBackgroundResource(R.color.darkorange);
+            my_log.setTextColor(getResources().getColor(R.color.text_main));
+            subord_log.setTextColor(getResources().getColor(R.color.approval_select_tab));
+            subord_log_tag.setBackgroundResource(R.color.approval_select_tab);
             my_log_tag.setBackgroundResource(R.color.item_line);
         }
         setAdapterBeans();
@@ -961,7 +956,7 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
                     if (hasOther) {
                         chaneTAG(false);
                     } else {
-                        makeText(ct, getString(R.string.account_notice1));
+                        showToast( getString(R.string.account_notice1));
                     }
                 break;
             case R.id.my_log://我的工作日志

+ 7 - 11
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/me/MeFragment.java

@@ -38,7 +38,6 @@ import com.core.base.fragment.SupportToolBarFragment;
 import com.core.broadcast.MsgBroadcast;
 import com.core.net.http.ViewUtil;
 import com.core.utils.FlexJsonUtil;
-import com.core.utils.ToastUtil;
 import com.core.utils.helper.AvatarHelper;
 import com.me.network.app.http.HttpClient;
 import com.me.network.app.http.Method;
@@ -58,7 +57,6 @@ import com.xzjmyk.pm.activity.ui.MainActivity;
 import com.xzjmyk.pm.activity.ui.circle.BusinessCircleActivity;
 import com.xzjmyk.pm.activity.util.im.UserRoleUtils;
 import com.xzjmyk.pm.activity.util.oa.CommonUtil;
-import com.xzjmyk.pm.activity.view.crouton.Style;
 import com.xzjmyk.pm.im.audio.FaceRecognition.FaceView.OnlineFaceDemo;
 
 import java.util.HashMap;
@@ -98,10 +96,9 @@ public class MeFragment extends SupportToolBarFragment implements View.OnClickLi
             switch (msg.what) {
                 case Constants.APP_SOCKETIMEOUTEXCEPTION:
                     if (JSONUtil.validate(msg.getData().getString("result"))) {
-                        ToastUtil.showToast(getActivity(), "系统内部错误!");
+                        showToact("系统内部错误!");
                     } else {
-                        ToastUtil.showToast(getActivity(),
-                                msg.getData().getString("result"));
+                        showToact(msg.getData().getString("result"));
                     }
 
                     break;
@@ -117,7 +114,7 @@ public class MeFragment extends SupportToolBarFragment implements View.OnClickLi
                                 Master.class);
                         getChMaster(mList);
                     } else {
-                        ToastUtil.showToast(ct, "获取账套信息失败!");
+                        showToact( "获取账套信息失败!");
                     }
                     break;
                 case 2://切换账套
@@ -149,8 +146,7 @@ public class MeFragment extends SupportToolBarFragment implements View.OnClickLi
                     Map<String, Object> results = FlexJsonUtil.fromJson(msg
                             .getData().getString("result"));
                     if ((Boolean) results.get("success")) {
-
-                        ViewUtil.ToastMessage(ct, "账套切换成功!", Style.holoGreenLight, 3000);
+                        showToact("账套切换成功!");
                         String sessionId = results.get("sessionId").toString();
                         String master = msg.getData().getString("master");
                         String master_ch = msg.getData().getString("master_ch");
@@ -164,7 +160,7 @@ public class MeFragment extends SupportToolBarFragment implements View.OnClickLi
                         intent.putExtra("falg", "home");
                         LocalBroadcastManager.getInstance(ct).sendBroadcast(intent);
                     } else {
-                        ToastUtil.showToast(ct, R.string.user_master_fai);
+                        showToact(  R.string.user_master_fai);
                     }
                     break;
             }
@@ -623,11 +619,11 @@ public class MeFragment extends SupportToolBarFragment implements View.OnClickLi
 
     @Override
     public void onSuccess(String resultStatus, String resultInfo) {
-        ToastUtil.showToast(ct, "支付成功");
+        showToact(  "支付成功");
     }
 
     @Override
     public void onFailure(String resultStatus, String resultInfo) {
-        ToastUtil.showToast(ct, "支付失败");
+        showToact(  "支付失败");
     }
 }

+ 3 - 3
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/message/MessageFragment.java

@@ -140,7 +140,7 @@ public class MessageFragment extends SupportToolBarFragment implements IMessageV
         super.onResume();
         presenter.loadData();
         if (PreferenceUtils.getBoolean("hasAutoSign", false)) {
-            mSignRefreshLayout.setSignShow(true);
+            setSignViewData(true);
             PreferenceUtils.putBoolean("hasAutoSign", false);
         }
     }
@@ -218,7 +218,7 @@ public class MessageFragment extends SupportToolBarFragment implements IMessageV
         }
     }
 
-    private void setSignViewData(boolean show) {
+    private void setSignViewData(boolean muchShow) {
         if (mContext != null && mContext.progressDialog != null) {
             mContext.progressDialog.dismiss();
         }
@@ -243,7 +243,7 @@ public class MessageFragment extends SupportToolBarFragment implements IMessageV
                 }
             }
             mSignRefreshLayout.setTag(work);
-            mSignRefreshLayout.setSignShow(show);
+            mSignRefreshLayout.setSignShow(muchShow);
         } else {
             ToastUtil.showToast(ct, "未找到班次!!", getContentView());
         }

+ 76 - 117
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/platform/task/TaskActivity.java

@@ -9,20 +9,16 @@ import android.os.Bundle;
 import android.os.Handler;
 import android.os.Looper;
 import android.os.Message;
-import android.support.v7.app.ActionBar;
 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.View.OnClickListener;
 import android.view.WindowManager;
 import android.widget.AdapterView;
 import android.widget.AdapterView.OnItemClickListener;
 import android.widget.Button;
-import android.widget.ImageView;
 import android.widget.ListView;
 import android.widget.PopupWindow;
 import android.widget.TextView;
@@ -36,7 +32,7 @@ import com.common.data.ListUtils;
 import com.common.data.StringUtil;
 import com.core.app.Constants;
 import com.core.app.MyApplication;
-import com.core.base.BaseActivity;
+import com.core.base.SupportToolBarActivity;
 import com.core.net.http.HttpClient;
 import com.core.net.http.ViewUtil;
 import com.core.utils.CommonUtil;
@@ -44,16 +40,16 @@ import com.core.utils.FlexJsonUtil;
 import com.core.utils.IntentUtils;
 import com.core.utils.ToastUtil;
 import com.core.widget.EmptyLayout;
-import com.core.widget.VoiceSearchView;
 import com.handmark.pulltorefresh.library.PullToRefreshBase;
 import com.handmark.pulltorefresh.library.PullToRefreshListView;
 import com.lidroid.xutils.ViewUtils;
-import com.lidroid.xutils.view.annotation.ViewInject;
 import com.modular.appmessages.R;
 import com.modular.appmessages.adapter.NewSchedultAdapter;
 import com.modular.appmessages.model.AllProcess;
+import com.modular.apputils.widget.MenuVoiceSearchView;
 import com.uas.appworks.CRM.erp.activity.TaskAddErpActivity;
 import com.uas.appworks.OA.erp.activity.DetailTaskActivity;
+import com.xzjmyk.pm.activity.view.DivideRadioGroup;
 
 import java.util.ArrayList;
 import java.util.Date;
@@ -71,12 +67,11 @@ import java.util.regex.PatternSyntaxException;
  */
 
 @SuppressWarnings({"unused", "deprecation"})
-public class TaskActivity extends BaseActivity implements OnClickListener {
+public class TaskActivity extends SupportToolBarActivity implements OnClickListener {
     private final int PAGE_SIZE = 2000;
     private EmptyLayout mEmptyLayout;
     private Context context;
     private PullToRefreshListView listview_main;
-    //    private SchedultAdapter adapter;
     private NewSchedultAdapter adapter;
     private List<AllProcess> allList = new ArrayList<AllProcess>();
     private List<AllProcess> waitList = new ArrayList<>();
@@ -86,20 +81,15 @@ public class TaskActivity extends BaseActivity implements OnClickListener {
     private String login_Name = CommonUtil.getSharedPreferences(MyApplication.getInstance(), "erp_emname");
     private HttpClient hClient;
     private String task_url = "jsps/mobile/task.jsp?caller=ResourceAssignment!Bill%26id=";
-    @ViewInject(R.id.isend_tv)
-    private TextView isend_tv;
-    @ViewInject(R.id.wait_tv)
-    private TextView wait_tv;
-    @ViewInject(R.id.done_tv)
-    private TextView done_tv;
-    @ViewInject(R.id.back)
-    private ImageView iv_back;
+
     private int tab_type = 1;
-    @ViewInject(R.id.voiceSearchView)
-    private VoiceSearchView voiceSearchView;
+    private MenuVoiceSearchView voiceSearchView;
+    private DivideRadioGroup tabGroup;
 
     private int mCurrentPage = 1;
     private int mPosition = -1;
+
+
     private Handler handler = new Handler() {
         @SuppressWarnings({"unchecked", "rawtypes"})
         public void handleMessage(Message msg) {
@@ -111,7 +101,6 @@ public class TaskActivity extends BaseActivity implements OnClickListener {
                     } else {
                         adapter = new NewSchedultAdapter(TaskActivity.this, allList);
                         listview_main.setAdapter(adapter);
-//                        ToastMessage("想要查看具体任务情况,请点击进入");
                     }
                     listview_main.onRefreshComplete();
                 } else if (msg.what == 0) {
@@ -149,15 +138,7 @@ public class TaskActivity extends BaseActivity implements OnClickListener {
                             allList.add(process);
                         }
 
-                        doClassifyAllList(allList); // TODO 分类
-//                        adapter = new NewSchedultAdapter(TaskActivity.this, allList);
-//                        listview_main.setAdapter(adapter);
-//                        if (adapter.getCount() != 0) {
-//                            sendHomeBroadcast(adapter.getCount());
-//                        } else {
-//                            mEmptyLayout.showEmpty();
-//                        }
-//                        listview_main.onRefreshComplete();
+                        doClassifyAllList(allList);
                     } else {
                         mEmptyLayout.showEmpty();
                         listview_main.onRefreshComplete();
@@ -197,9 +178,9 @@ public class TaskActivity extends BaseActivity implements OnClickListener {
             if (!ListUtils.isEmpty(waitList)) waitList.clear();
             if (!ListUtils.isEmpty(doneList)) doneList.clear();
             if (!ListUtils.isEmpty(isendList)) isendList.clear();
-            ToastMessage(getString(R.string.common_refresh_finish));
+            ToastUtil.showToast(this, R.string.common_refresh_finish, tabGroup);
         } else {
-            ToastMessage(getString(R.string.common_up_finish));
+            ToastUtil.showToast(this, R.string.common_up_finish, tabGroup);
         }
         listview_main.onRefreshComplete();
         if (ListUtils.isEmpty(allList)) return;
@@ -259,10 +240,20 @@ public class TaskActivity extends BaseActivity implements OnClickListener {
 
     }
 
+
+    @Override
+    public int getToolBarId() {
+        return R.id.cycleCountToolBar;
+    }
+
+    @Override
+    public int getLayoutRes() {
+        return R.layout.acativity_task_list;
+    }
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.task_listview);
         context = TaskActivity.this;
         ViewUtils.inject(this);
         // 表示已读
@@ -281,7 +272,7 @@ public class TaskActivity extends BaseActivity implements OnClickListener {
         if (CommonUtil.isNetWorkConnected(ct)) {
             sendResquestForServerAll(2, mCurrentPage);  // update TODO :出息进来请求所有任务数据
         } else {
-            ToastUtil.showToast(ct, R.string.networks_out);
+            ToastUtil.showToast(this, R.string.networks_out, tabGroup);
         }
         initSearchEvent();
         /**注释:监听 */
@@ -291,32 +282,23 @@ public class TaskActivity extends BaseActivity implements OnClickListener {
                                     final int position, long id) {
                 mPosition = (int) parent.getItemIdAtPosition(position);
                 NewSchedultAdapter.Store store = (NewSchedultAdapter.Store) view.getTag();
-                store.iv_website.setOnClickListener(new OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-                        handler.postDelayed(new Runnable() {
-                            @Override
-                            public void run() {
-                                loadWebView(position);
-                            }
-                        }, 500);
-                    }
-                });
                 Intent intent = new Intent(context, DetailTaskActivity.class);
                 intent.putExtra("description", store.tv_task_description);
                 intent.putExtra("duration", store.tv_task_duration);
-                intent.putExtra("status", store.tv_task_status.getText().toString());
-                intent.putExtra("taskid", store.pTextView3.getText().toString());//编号
-                intent.putExtra("taskname", store.pTextView4.getText().toString());//名称
-                intent.putExtra("taskemcode", store.pTextView1.getText().toString());//发起人
-                intent.putExtra("tasktime", store.pTextView2.getText().toString());//发起时间
+                intent.putExtra("status", store.tv_task_status);
+
+                intent.putExtra("taskid", store.pTextView3);//编号
+                intent.putExtra("taskname", store.pTextView4);//名称
+                intent.putExtra("taskemcode", store.pTextView1);//发起人
+                intent.putExtra("tasktime", store.pTextView2);//发起时间
+
                 intent.putExtra("performer", store.tv_task_performer);//处理人
                 intent.putExtra("emcode", store.tv_ra_resourcecode);//处理人编号
                 intent.putExtra("taskcode", store.taskCode);//处理人编号
                 intent.putExtra("ra_taskid", store.task_id);//取回复内容id
                 intent.putExtra("attachs", store.attachs);
                 intent.putExtra("endtime", store.tv_task_duration);
-                Log.i("tasktime1,endtime", store.pTextView2.getText().toString() + "," + store.tv_task_duration);
+                Log.i("tasktime1,endtime", store.pTextView2+ "," + store.tv_task_duration);
                 startActivityForResult(intent, 0x20);
             }
 
@@ -448,19 +430,46 @@ public class TaskActivity extends BaseActivity implements OnClickListener {
     }
 
     private void initHeaderView() {
-        View view = LayoutInflater.from(ct).inflate(R.layout.task_header, null);
-        ActionBar bar = this.getSupportActionBar();
-        bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
-        wait_tv = (TextView) view.findViewById(R.id.wait_tv);
-        done_tv = (TextView) view.findViewById(R.id.done_tv);
-        isend_tv = (TextView) view.findViewById(R.id.isend_tv);
-        iv_back = (ImageView) view.findViewById(R.id.back);
-        bar.setCustomView(view);
-        isend_tv.setOnClickListener(this);
-        done_tv.setOnClickListener(this);
-        wait_tv.setOnClickListener(this);
-        wait_tv.setSelected(true);
-        iv_back.setOnClickListener(this);
+        voiceSearchView = findViewById(R.id.mVoiceSearchView);
+        findViewById(R.id.backImg).setOnClickListener(this);
+        findViewById(R.id.addImg).setOnClickListener(this);
+        tabGroup = findViewById(R.id.tabGroup);
+        final View todoLine = findViewById(R.id.todoLine);
+        final View doneDealLine = findViewById(R.id.doneDealLine);
+        final View byMeLine = findViewById(R.id.byMeLine);
+        tabGroup.setOnCheckedChangeListener(new DivideRadioGroup.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(DivideRadioGroup group, int checkedId) {
+                todoLine.setVisibility(View.GONE);
+                doneDealLine.setVisibility(View.GONE);
+                byMeLine.setVisibility(View.GONE);
+                if (checkedId == R.id.todoRb) {
+                    todoLine.setVisibility(View.VISIBLE);
+                    tab_type = 1;
+                    adapter = new NewSchedultAdapter(TaskActivity.this, waitList);
+                    real_List = waitList;
+                } else if (checkedId == R.id.doneDealRb) {
+                    doneDealLine.setVisibility(View.VISIBLE);
+                    tab_type = 2;
+                    adapter = new NewSchedultAdapter(TaskActivity.this, doneList);
+                    real_List = doneList;
+                } else if (checkedId == R.id.byMeRb) {
+                    byMeLine.setVisibility(View.VISIBLE);
+                    tab_type = 3;
+                    adapter = new NewSchedultAdapter(TaskActivity.this, isendList);
+                    adapter.setiSend("iSend");
+                    real_List = isendList;
+                }
+                if (adapter == null) return;
+                listview_main.setAdapter(adapter);
+                if (adapter.getCount() != 0) {
+                    sendHomeBroadcast(adapter.getCount());
+                } else {
+                    mEmptyLayout.showEmpty();
+                }
+                listview_main.onRefreshComplete();
+            }
+        });
         voiceSearchView.setOnClickListener(this);
         tab_type = 1;
     }
@@ -468,45 +477,13 @@ public class TaskActivity extends BaseActivity implements OnClickListener {
     @Override
     public void onClick(View v) {
         switch (v.getId()) {
-            case R.id.wait_tv:
-                tab_type = 1;
-                wait_tv.setSelected(true);
-                done_tv.setSelected(false);
-                isend_tv.setSelected(false);
-                adapter = new NewSchedultAdapter(TaskActivity.this, waitList);
-                real_List = waitList;
-                break;
-            case R.id.done_tv:
-                tab_type = 2;
-                wait_tv.setSelected(false);
-                done_tv.setSelected(true);
-                isend_tv.setSelected(false);
-                adapter = new NewSchedultAdapter(TaskActivity.this, doneList);
-                real_List = doneList;
+            case R.id.addImg:
+                startActivityForResult(new Intent(context, TaskAddErpActivity.class), 0x17);
                 break;
-            case R.id.isend_tv:
-                tab_type = 3;
-                wait_tv.setSelected(false);
-                done_tv.setSelected(false);
-                isend_tv.setSelected(true);
-                adapter = new NewSchedultAdapter(TaskActivity.this, isendList);
-                adapter.setiSend("iSend");
-                real_List = isendList;
-                break;
-
-            case R.id.back:
+            case R.id.backImg:
                 onBackPressed();
                 break;
         }
-
-        if (adapter == null) return;
-        listview_main.setAdapter(adapter);
-        if (adapter.getCount() != 0) {
-            sendHomeBroadcast(adapter.getCount());
-        } else {
-            mEmptyLayout.showEmpty();
-        }
-        listview_main.onRefreshComplete();
     }
 
     @Override
@@ -615,7 +592,7 @@ public class TaskActivity extends BaseActivity implements OnClickListener {
 
     /**
      * @author LiuJie
-     *         线程
+     * 线程
      */
     public class getallprocess_run implements Runnable {
         @Override
@@ -873,24 +850,6 @@ public class TaskActivity extends BaseActivity implements OnClickListener {
         sendDataToServer(url, param, LOAD_EM_NAME);
     }
 
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-//        getMenuInflater().inflate(R.menu.menu_state, menu);
-        getMenuInflater().inflate(R.menu.menu_add_icon, menu);
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-//        if (item.getItemId() == R.id.reset) {
-//            View view = getWindow().findViewById(item.getItemId());
-//            showWindow(view);
-//        }
-        if (item.getItemId() == R.id.add_item) {
-            startActivityForResult(new Intent(context, TaskAddErpActivity.class), 0x17);
-        }
-        return super.onOptionsItemSelected(item);
-    }
 
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {

+ 62 - 75
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/platform/task/TaskB2BActivity.java

@@ -7,7 +7,6 @@ import android.graphics.drawable.BitmapDrawable;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
-import android.support.v7.app.ActionBar;
 import android.text.Editable;
 import android.text.TextWatcher;
 import android.util.Log;
@@ -18,7 +17,6 @@ import android.view.View;
 import android.view.WindowManager;
 import android.widget.AdapterView;
 import android.widget.Button;
-import android.widget.ImageView;
 import android.widget.ListView;
 import android.widget.PopupWindow;
 import android.widget.TextView;
@@ -35,7 +33,7 @@ import com.core.api.wxapi.ApiConfig;
 import com.core.api.wxapi.ApiUtils;
 import com.core.app.Constants;
 import com.core.app.MyApplication;
-import com.core.base.BaseActivity;
+import com.core.base.SupportToolBarActivity;
 import com.core.model.Friend;
 import com.core.net.http.ViewUtil;
 import com.core.widget.EmptyLayout;
@@ -44,12 +42,13 @@ import com.core.xmpp.dao.FriendDao;
 import com.handmark.pulltorefresh.library.PullToRefreshBase;
 import com.handmark.pulltorefresh.library.PullToRefreshListView;
 import com.lidroid.xutils.ViewUtils;
-import com.lidroid.xutils.view.annotation.ViewInject;
 import com.modular.appmessages.adapter.NewSchedultAdapter;
+import com.modular.appmessages.model.AllProcess;
+import com.uas.appworks.CRM.erp.activity.TaskAddErpActivity;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.erp.activity.WebViewLoadActivity;
-import com.modular.appmessages.model.AllProcess;
 import com.xzjmyk.pm.activity.util.oa.CommonUtil;
+import com.xzjmyk.pm.activity.view.DivideRadioGroup;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -64,7 +63,7 @@ import java.util.regex.Pattern;
 
 import static com.xzjmyk.pm.activity.util.oa.CommonUtil.getEmcode;
 
-public class TaskB2BActivity extends BaseActivity implements View.OnClickListener {
+public class TaskB2BActivity extends SupportToolBarActivity implements View.OnClickListener {
 
 
     private EmptyLayout mEmptyLayout;
@@ -79,15 +78,7 @@ public class TaskB2BActivity extends BaseActivity implements View.OnClickListene
     private List<AllProcess> real_List = new ArrayList<>();
     private String login_Name = CommonUtil.getSharedPreferences(MyApplication.getInstance(), "erp_emname");
     private int tab_type = 1;
-    @ViewInject(R.id.isend_tv)
-    private TextView isend_tv;
-    @ViewInject(R.id.wait_tv)
-    private TextView wait_tv;
-    @ViewInject(R.id.done_tv)
-    private TextView done_tv;
-    @ViewInject(R.id.back)
-    private ImageView iv_back;
-    @ViewInject(R.id.voiceSearchView)
+    private DivideRadioGroup tabGroup;
     private VoiceSearchView voiceSearchView;
     private int mCurrentPage = 1;
     private int mPosition = -1;
@@ -301,11 +292,18 @@ public class TaskB2BActivity extends BaseActivity implements View.OnClickListene
         if (!ListUtils.isEmpty(doneList))
             Collections.sort(doneList, comparator);
     }
+    @Override
+    public int getToolBarId() {
+        return com.modular.appmessages.R.id.cycleCountToolBar;
+    }
 
+    @Override
+    public int getLayoutRes() {
+        return com.modular.appmessages.R.layout.acativity_task_list;
+    }
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.task_listview);
         context = TaskB2BActivity.this;
         ViewUtils.inject(this);
         getSupportActionBar().setTitle("待办工作");
@@ -331,25 +329,14 @@ public class TaskB2BActivity extends BaseActivity implements View.OnClickListene
                                     final int position, long id) {
                 mPosition = (int) parent.getItemIdAtPosition(position);
                 NewSchedultAdapter.Store store = (NewSchedultAdapter.Store) view.getTag();
-                store.iv_website.setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-                        handler.postDelayed(new Runnable() {
-                            @Override
-                            public void run() {
-                                loadWebView(position);
-                            }
-                        }, 500);
-                    }
-                });
                 Intent intent = new Intent(context, TaskDetailB2BActivity.class);
                 intent.putExtra("description", store.tv_task_description);
                 intent.putExtra("duration", store.tv_task_duration);
-                intent.putExtra("status", store.tv_task_status.getText().toString());
-                intent.putExtra("taskid", store.pTextView3.getText().toString());//编号
-                intent.putExtra("taskname", store.pTextView4.getText().toString());//名称
-                intent.putExtra("taskemcode", store.pTextView1.getText().toString());//发起人
-                intent.putExtra("tasktime", store.pTextView2.getText().toString());//发起时间
+                intent.putExtra("status", store.tv_task_status);
+                intent.putExtra("taskid", store.pTextView3);//编号
+                intent.putExtra("taskname", store.pTextView4);//名称
+                intent.putExtra("taskemcode", store.pTextView1);//发起人
+                intent.putExtra("tasktime", store.pTextView2);//发起时间
                 intent.putExtra("performer", store.tv_task_performer);//处理人
                 intent.putExtra("emcode", store.tv_ra_resourcecode);//处理人编号
                 intent.putExtra("taskcode", store.taskCode);//处理人编号
@@ -489,19 +476,46 @@ public class TaskB2BActivity extends BaseActivity implements View.OnClickListene
     }
 
     private void initHeaderView() {
-        View view = LayoutInflater.from(ct).inflate(R.layout.task_header, null);
-        ActionBar bar = this.getSupportActionBar();
-        bar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM);
-        wait_tv = (TextView) view.findViewById(R.id.wait_tv);
-        done_tv = (TextView) view.findViewById(R.id.done_tv);
-        isend_tv = (TextView) view.findViewById(R.id.isend_tv);
-        iv_back = (ImageView) view.findViewById(R.id.back);
-        bar.setCustomView(view);
-        isend_tv.setOnClickListener(this);
-        done_tv.setOnClickListener(this);
-        wait_tv.setOnClickListener(this);
-        wait_tv.setSelected(true);
-        iv_back.setOnClickListener(this);
+        voiceSearchView = findViewById(com.modular.appmessages.R.id.mVoiceSearchView);
+        findViewById(com.modular.appmessages.R.id.backImg).setOnClickListener(this);
+        findViewById(com.modular.appmessages.R.id.addImg).setOnClickListener(this);
+        tabGroup = findViewById(com.modular.appmessages.R.id.tabGroup);
+        final View todoLine = findViewById(com.modular.appmessages.R.id.todoLine);
+        final View doneDealLine = findViewById(com.modular.appmessages.R.id.doneDealLine);
+        final View byMeLine = findViewById(com.modular.appmessages.R.id.byMeLine);
+        tabGroup.setOnCheckedChangeListener(new DivideRadioGroup.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(DivideRadioGroup group, int checkedId) {
+                todoLine.setVisibility(View.GONE);
+                doneDealLine.setVisibility(View.GONE);
+                byMeLine.setVisibility(View.GONE);
+                if (checkedId == com.modular.appmessages.R.id.todoRb) {
+                    todoLine.setVisibility(View.VISIBLE);
+                    tab_type = 1;
+                    adapter = new NewSchedultAdapter(ct, waitList);
+                    real_List = waitList;
+                } else if (checkedId == com.modular.appmessages.R.id.doneDealRb) {
+                    doneDealLine.setVisibility(View.VISIBLE);
+                    tab_type = 2;
+                    adapter = new NewSchedultAdapter(ct, doneList);
+                    real_List = doneList;
+                } else if (checkedId == com.modular.appmessages.R.id.byMeRb) {
+                    byMeLine.setVisibility(View.VISIBLE);
+                    tab_type = 3;
+                    adapter = new NewSchedultAdapter(ct, isendList);
+                    adapter.setiSend("iSend");
+                    real_List = isendList;
+                }
+                if (adapter == null) return;
+                listview_main.setAdapter(adapter);
+                if (adapter.getCount() != 0) {
+                    sendHomeBroadcast(adapter.getCount());
+                } else {
+                    mEmptyLayout.showEmpty();
+                }
+                listview_main.onRefreshComplete();
+            }
+        });
         voiceSearchView.setOnClickListener(this);
         tab_type = 1;
     }
@@ -740,40 +754,13 @@ public class TaskB2BActivity extends BaseActivity implements View.OnClickListene
     @Override
     public void onClick(View v) {
         switch (v.getId()) {
-            case R.id.wait_tv:
-                tab_type = 1;
-                wait_tv.setSelected(true);
-                done_tv.setSelected(false);
-                isend_tv.setSelected(false);
-                doShowListData();
-                break;
-            case R.id.done_tv:
-                tab_type = 2;
-                wait_tv.setSelected(false);
-                done_tv.setSelected(true);
-                isend_tv.setSelected(false);
-                doShowListData();
+            case R.id.addImg:
+                startActivityForResult(new Intent(context, TaskAddErpActivity.class), 0x17);
                 break;
-            case R.id.isend_tv:
-                tab_type = 3;
-                wait_tv.setSelected(false);
-                done_tv.setSelected(false);
-                isend_tv.setSelected(true);
-                doShowListData();
-                break;
-
-            case R.id.back:
+            case  R.id.backImg:
                 onBackPressed();
                 break;
         }
-        if (adapter == null) return;
-        listview_main.setAdapter(adapter);
-        if (adapter.getCount() != 0) {
-            sendHomeBroadcast(adapter.getCount());
-        } else {
-            mEmptyLayout.showEmpty();
-        }
-        listview_main.onRefreshComplete();
     }
 
     private void sendServiceForISend(int mCurrentPage) {

BIN
WeiChat/src/main/res/drawable-hdpi/daibangongzuo.png


BIN
WeiChat/src/main/res/drawable-hdpi/home_image_01_u.png


BIN
WeiChat/src/main/res/drawable-hdpi/icon_yuyue3.png


BIN
WeiChat/src/main/res/drawable-hdpi/tingyue.png


BIN
WeiChat/src/main/res/drawable-hdpi/uuu.png


BIN
WeiChat/src/main/res/drawable-xhdpi/daibangongzuo.png


BIN
WeiChat/src/main/res/drawable-xhdpi/home_image_01_u.png


BIN
WeiChat/src/main/res/drawable-xhdpi/icon_me_nor.png


BIN
WeiChat/src/main/res/drawable-xhdpi/icon_yuyue3.png


BIN
WeiChat/src/main/res/drawable-xhdpi/tingyue.png


BIN
WeiChat/src/main/res/drawable-xhdpi/uuu.png


BIN
WeiChat/src/main/res/drawable-xxhdpi/daibangongzuo.png


BIN
WeiChat/src/main/res/drawable-xxhdpi/home_image_01_u.png


BIN
WeiChat/src/main/res/drawable-xxhdpi/icon_yuyue3.png


BIN
WeiChat/src/main/res/drawable-xxhdpi/tingyue.png


BIN
WeiChat/src/main/res/drawable-xxhdpi/uuu.png


+ 4 - 22
WeiChat/src/main/res/layout/fragment_new_message.xml

@@ -1,5 +1,4 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:slide="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="#ebe9e9"
@@ -11,24 +10,7 @@
         android:layout_height="48dp"
         android:visibility="gone" />
 
-    <!--<com.handmark.pulltorefresh.library.PullToRefreshScrollView-->
-    <!--android:id="@+id/pullScrollView"-->
-    <!--slide:slideAnimationTime="200"-->
-    <!--slide:slideLeftAction="scroll"-->
-    <!--slide:slideMode="right"-->
-    <!--slide:slideRightAction="scroll"-->
-    <!--android:layout_width="match_parent"-->
-    <!--android:layout_height="match_parent"-->
-    <!--android:background="@color/transparent"-->
-    <!--android:divider="@color/item_line"-->
-    <!--android:dividerHeight="@dimen/line"-->
-    <!--slide:ptrAnimationStyle="flip"-->
-    <!--slide:ptrDrawableEnd="@drawable/default_ptr_rotate"-->
-    <!--slide:ptrDrawableStart="@drawable/default_ptr_flip"-->
-    <!--slide:ptrHeaderTextColor="@color/black"-->
-    <!--slide:ptrOverScroll="false"-->
-    <!--slide:ptrScrollingWhileRefreshingEnabled="true"-->
-    <!--slide:ptrShowIndicator="false">-->
+
 
     <com.modular.appmessages.widget.SignRefreshLayout
         android:id="@+id/mSignRefreshLayout"
@@ -61,18 +43,18 @@
                     android:id="@+id/headerLV"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:dividerHeight="5dp" />
+                    android:dividerHeight="@dimen/line" />
 
                 <View
                     android:layout_width="match_parent"
-                    android:layout_height="5dp"
+                    android:layout_height="@dimen/line"
                     android:id="@+id/handerAndContentLine" />
 
                 <com.core.widget.MyListView
                     android:id="@+id/contentLV"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:dividerHeight="5dp" />
+                    android:dividerHeight="@dimen/line" />
 
 
             </LinearLayout>

+ 6 - 6
WeiChat/src/main/res/layout/item_message.xml

@@ -52,8 +52,8 @@
             android:ellipsize="end"
             android:lines="1"
             android:text="我的审批"
-            android:textColor="@color/text_main"
-            android:textSize="16sp" />
+            android:textColor="#333333"
+            android:textSize="15sp" />
 
         <TextView
             android:id="@+id/time_tv"
@@ -61,8 +61,8 @@
             android:layout_height="wrap_content"
             android:layout_alignParentRight="true"
             android:ellipsize="end"
-            android:textColor="@color/text_hine"
-            android:textSize="14sp" />
+            android:textColor="#999999"
+            android:textSize="10sp"/>
 
         <TextView
             android:id="@+id/content_tv"
@@ -72,8 +72,8 @@
             android:layout_marginTop="8dp"
             android:ellipsize="end"
             android:lines="1"
-            android:textColor="@color/text_hine"
-            android:textSize="14sp" />
+            android:textColor="#999999"
+            android:textSize="12sp" />
     </RelativeLayout>
 
 </RelativeLayout>

+ 40 - 16
WeiChat/src/main/res/layout/listitem_businessless_edit.xml

@@ -1,39 +1,63 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
     <LinearLayout
         android:id="@+id/ll_moment"
-        android:background="@color/white"
+        style="@style/LinearLayout_horizontal"
         android:layout_height="wrap_content"
+        android:background="@color/white"
         android:maxHeight="180dp"
-        android:minHeight="50dp"
-        style="@style/LinearLayout_horizontal">
+        android:minHeight="50dp">
+
         <TextView
             android:id="@+id/tv_less_key"
             style="@style/TextView_Basic"
-            android:layout_margin="10dp"
             android:layout_width="60dp"
-            android:textSize="14sp"
-            android:textColor="@color/text_main"
             android:layout_gravity="center_vertical"
-            android:text="商机阶段商机阶段阶段:" />
-<!--android:background="@drawable/shape_from_edit"-->
+            android:layout_marginBottom="10dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="3dp"
+            android:layout_marginTop="10dp"
+            android:text="商机阶段商机阶段阶段:"
+            android:textColor="@color/text_main"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/muchInputTv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="8dp"
+            android:text="*"
+            android:textColor="@color/red"
+            android:visibility="gone" />
+
         <EditText
             android:id="@+id/tv_less_value"
             style="@style/TextView_Basic"
-            android:maxWidth="260dp"
-            android:minWidth="240dp"
-            android:maxHeight="150dp"
-            android:textSize="14sp"
+            android:layout_width="0dp"
             android:layout_height="match_parent"
             android:layout_gravity="center_vertical"
-            android:layout_width="match_parent"
+            android:layout_marginLeft="@dimen/padding"
+            android:layout_weight="1"
             android:background="@drawable/shape_from_edit"
             android:gravity="right|center"
+            android:hint="@string/common_input"
+            android:maxHeight="150dp"
+            android:maxWidth="260dp"
+            android:minWidth="240dp"
             android:padding="5dp"
+            android:textSize="14sp" />
+
+        <ImageView
+            android:id="@+id/selectIv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
             android:layout_marginRight="10dp"
-            android:hint="@string/common_input" />
+            android:src="@drawable/oa_next"
+            android:visibility="gone" />
     </LinearLayout>
 </LinearLayout>

+ 1 - 1
WeiChat/src/main/res/values/colors.xml

@@ -38,7 +38,7 @@
     <color name="pop_bg">#aeaeae</color>
     <color name="item_color2">@color/white</color>
     <color name="item_text">#cca0a0a0</color>
-    <color name="item_line">#f2f2f2</color>
+    <color name="item_line">#ebe9e9</color>
     <color name="antionbarcolor">#646464</color>
     <color name="base_bg">#FFEBE9E9</color>
     <color name="antionbaritemcolor">#a3b2cf</color>

+ 15 - 7
app_core/common/src/main/java/com/core/base/SupportToolBarActivity.java

@@ -35,8 +35,8 @@ public class SupportToolBarActivity extends BaseActivity {
         super.onCreate(savedInstanceState);
         super.setContentView(R.layout.base_bar_layout);
         contentFl = findViewById(R.id.contentFl);
-        int rceId= getLayoutRes();
-        if (rceId>0){
+        int rceId = getLayoutRes();
+        if (rceId > 0) {
             setContentView(rceId);
         }
         if (needCommonToolBar()) {
@@ -48,10 +48,15 @@ public class SupportToolBarActivity extends BaseActivity {
         return R.id.toolbarVs;
     }
 
+    public void setCommonToolBar(Toolbar commonToolBar) {
+        this.commonToolBar = commonToolBar;
+    }
 
     public void initCommonToolbar(int toolBarId) {
-        if (toolBarId != R.id.toolbarVs) {
-            commonToolBar = findViewById(toolBarId);
+        if (commonToolBar != null || toolBarId != R.id.toolbarVs) {
+            if (commonToolBar == null) {
+                commonToolBar = findViewById(toolBarId);
+            }
             initCommonToolbar();
         } else {
             ViewStub stub = findViewById(R.id.toolbarVs);
@@ -68,10 +73,10 @@ public class SupportToolBarActivity extends BaseActivity {
         }
     }
 
-    private void initCommonToolbar() {
-        LogUtil.i("gong","initCommonToolbar");
+    public void initCommonToolbar() {
+        LogUtil.i("gong", "initCommonToolbar");
         if (commonToolBar != null) {
-            LogUtil.i("gong","commonToolBar != null");
+            LogUtil.i("gong", "commonToolBar != null");
             StatusBarUtil.immersive(this, 0x00000000, 0.0f);
             setSupportActionBar(commonToolBar);
             getSupportActionBar().setDisplayShowTitleEnabled(false);
@@ -85,6 +90,7 @@ public class SupportToolBarActivity extends BaseActivity {
             });
         }
     }
+
     /**
      * 初始化导航键
      *
@@ -231,6 +237,8 @@ public class SupportToolBarActivity extends BaseActivity {
 
 
     public void showToast(CharSequence message) {
+        LogUtil.i("gong", "showToast=" + message);
+        LogUtil.i("gong", "contentFl=" + (contentFl != null));
         if (contentFl != null && !TextUtils.isEmpty(message)) {
             ToastUtil.showToast(this, message, contentFl);
         } else {

+ 23 - 0
app_core/common/src/main/res/drawable/bg_transparent_bule.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:state_pressed="true">
+        <shape android:shape="rectangle">
+            <corners
+                android:topLeftRadius="4dp"
+                android:topRightRadius="4dp"
+                android:bottomRightRadius="4dp"
+                android:bottomLeftRadius="4dp">
+            </corners>
+            <stroke
+                android:width="1dp"
+                android:color="#999999">
+            </stroke>
+            <solid
+                android:color="@color/titleBlue">
+            </solid>
+        </shape>
+    </item>
+    <item android:drawable="@color/transparent"/>
+
+</selector>

+ 6 - 0
app_core/common/src/main/res/drawable/text_bule_white_bg.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="@color/white" android:state_selected="true"></item>
+    <item android:color="@color/white" android:state_pressed="true"></item>
+    <item android:color="@color/titleBlue" ></item>
+</selector>

+ 10 - 9
app_core/common/src/main/res/layout/activity_approval.xml

@@ -4,7 +4,6 @@
     xmlns:whatever="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="#F2F2F2"
     android:focusableInTouchMode="true">
 
     <LinearLayout
@@ -27,9 +26,9 @@
             android:id="@+id/agreeTV"
             style="@style/bottomTextStyle"
             android:layout_weight="2"
-            android:background="@drawable/bg_bule_btn"
             android:text="@string/agree"
-            android:textColor="@color/white"/>
+            android:background="@drawable/bg_transparent_bule"
+            android:textColor="@drawable/text_bule_white_bg"/>
 
         <View
             android:layout_width="@dimen/line"
@@ -41,9 +40,9 @@
             android:id="@+id/disagreeTV"
             style="@style/bottomTextStyle"
             android:layout_weight="3"
-            android:background="@color/white"
             android:text="@string/common_disagree"
-            android:textColor="@drawable/bg_bule_yellow_text"/>
+            android:background="@drawable/bg_transparent_bule"
+            android:textColor="@drawable/text_bule_white_bg"/>
 
         <View
             android:layout_width="@dimen/line"
@@ -56,7 +55,9 @@
             style="@style/bottomTextStyle"
             android:layout_weight="5"
             android:text="@string/common_changedealman"
-            android:visibility="gone"/>
+            android:background="@drawable/bg_transparent_bule"
+            android:textColor="@drawable/text_bule_white_bg"/>
+
 
         <View
 
@@ -69,9 +70,9 @@
             android:id="@+id/nextTV"
             style="@style/bottomTextStyle"
             android:layout_weight="3"
-            android:background="@color/white"
             android:text="@string/next_article"
-            android:textColor="@drawable/bg_bule_yellow_text"/>
+            android:background="@drawable/bg_transparent_bule"
+            android:textColor="@drawable/text_bule_white_bg"/>
     </LinearLayout>
 
     <RelativeLayout
@@ -134,7 +135,7 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:layout_above="@id/opinionRL"
-        android:background="@color/base_bg"
+        android:background="#F2F2F2"
         android:focusableInTouchMode="true">
 
         <android.support.v7.widget.RecyclerView

+ 1 - 1
app_core/common/src/main/res/layout/item_message.xml

@@ -62,7 +62,7 @@
             android:layout_alignParentRight="true"
             android:ellipsize="end"
             android:textColor="#999999"
-            android:textSize="10sp" />
+            android:textSize="10sp"/>
 
         <TextView
             android:id="@+id/content_tv"

+ 42 - 18
app_core/common/src/main/res/layout/listitem_businessless_edit.xml

@@ -1,39 +1,63 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical"
     android:layout_width="match_parent"
-    android:layout_height="match_parent">
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
     <LinearLayout
         android:id="@+id/ll_moment"
-        android:background="@color/white"
+        style="@style/LinearLayout_horizontal"
         android:layout_height="wrap_content"
+        android:paddingRight="@dimen/padding"
+        android:background="@color/white"
         android:maxHeight="180dp"
-        android:minHeight="50dp"
-        style="@style/LinearLayout_horizontal">
+        android:minHeight="50dp">
+
         <TextView
             android:id="@+id/tv_less_key"
             style="@style/TextView_Basic"
-            android:layout_margin="10dp"
             android:layout_width="60dp"
-            android:textSize="14sp"
-            android:textColor="@color/text_main"
             android:layout_gravity="center_vertical"
-            android:text="商机阶段商机阶段阶段:" />
-<!--android:background="@drawable/shape_from_edit"-->
+            android:layout_marginBottom="10dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="3dp"
+            android:layout_marginTop="10dp"
+            android:text="商机阶段商机阶段阶段:"
+            android:textColor="@color/text_main"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/muchInputTv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="8dp"
+            android:text="*"
+            android:textColor="@color/red"
+            android:visibility="gone" />
+
         <EditText
             android:id="@+id/tv_less_value"
             style="@style/TextView_Basic"
-            android:maxWidth="260dp"
-            android:minWidth="240dp"
-            android:maxHeight="150dp"
-            android:textSize="14sp"
+            android:layout_width="0dp"
             android:layout_height="match_parent"
             android:layout_gravity="center_vertical"
-            android:layout_width="match_parent"
+            android:layout_marginLeft="@dimen/padding"
+            android:layout_weight="1"
             android:background="@drawable/shape_from_edit"
             android:gravity="right|center"
-            android:padding="5dp"
-            android:layout_marginRight="10dp"
-            android:hint="@string/common_input" />
+            android:hint="@string/common_input"
+            android:maxHeight="150dp"
+            android:maxWidth="260dp"
+            android:minWidth="240dp"
+            android:textSize="14sp" />
+
+        <ImageView
+            android:id="@+id/selectIv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:layout_marginLeft="@dimen/paddingMin"
+            android:src="@drawable/oa_next"
+            android:visibility="gone" />
     </LinearLayout>
 </LinearLayout>

+ 2 - 1
app_core/common/src/main/res/layout/plat_oamain.xml

@@ -358,7 +358,8 @@
                 <!--end 年月日布局-->
                 <LinearLayout
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
+                    android:layout_height="28dp"
+                    android:gravity="center"
                     android:orientation="horizontal">
 
                     <TextView

+ 1 - 1
app_modular/appcontact/src/main/java/com/uas/appcontact/ui/fragment/ContactsFragment.java

@@ -124,7 +124,7 @@ public class ContactsFragment extends SupportToolBarFragment
     @Override
     public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
         super.onCreateOptionsMenu(menu, inflater);
-        inflater.inflate(R.menu.menu_nearby, menu);
+//        inflater.inflate(R.menu.menu_nearby, menu);
     }
 
     @Override

+ 5 - 5
app_modular/appmessages/src/main/AndroidManifest.xml

@@ -43,13 +43,13 @@
             </intent-filter>
         </activity>
         <activity
-            android:name=".activity.TastNewActivity"
+            android:name=".activity.TaskNewActivity"
             android:theme="@style/MainBaseTheme"
             android:windowSoftInputMode="adjustPan|stateHidden">
-            <intent-filter>
-                <action android:name="com.modular.task.TaskActivity" />
-                <category android:name="android.intent.category.DEFAULT" />
-            </intent-filter>
+            <!--<intent-filter>-->
+                <!--<action android:name="com.modular.task.TaskActivity" />-->
+                <!--<category android:name="android.intent.category.DEFAULT" />-->
+            <!--</intent-filter>-->
         </activity>
 
         <activity

+ 5 - 1
app_modular/appmessages/src/main/java/com/modular/appmessages/activity/ApprovalActivity.java

@@ -12,6 +12,7 @@ import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.WindowManager;
 import android.widget.AdapterView;
 import android.widget.BaseAdapter;
 import android.widget.ImageView;
@@ -186,6 +187,9 @@ public class ApprovalActivity extends SupportToolBarActivity implements IApprova
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
+        getWindow().setSoftInputMode
+                (WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN |
+                        WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_approval);
         ViewUtils.inject(this);
@@ -323,7 +327,7 @@ public class ApprovalActivity extends SupportToolBarActivity implements IApprova
 
     @Override
     public void nodeDealMan(String nodeDealMan) {
-        LogUtil.i("gong","nodeDealMan="+nodeDealMan);
+        LogUtil.i("gong", "nodeDealMan=" + nodeDealMan);
         if (StringUtil.isEmpty(nodeDealMan)) {
             findViewById(R.id.changedealmanTV).setVisibility(View.GONE);
             findViewById(R.id.disagreeTV).setVisibility(View.GONE);

+ 2 - 1
app_modular/appmessages/src/main/java/com/modular/appmessages/activity/ApprovalNewListActivity.java

@@ -38,7 +38,7 @@ public class ApprovalNewListActivity extends SupportToolBarActivity {
 
     @Override
     public int getToolBarId() {
-        return R.id.voiceSearchToolBar;
+        return R.id.cycleCountToolBar;
     }
 
     @Override
@@ -49,6 +49,7 @@ public class ApprovalNewListActivity extends SupportToolBarActivity {
     private void initView() {
         mTabLayout = findViewById(R.id.mTabLayout);
         mViewPager = findViewById(R.id.mViewPager);
+        findViewById(R.id.addImg).setVisibility(View.GONE);
         mVoiceSearchView = findViewById(R.id.mVoiceSearchView);
         tabUnReadNum = findViewById(R.id.tabUnReadNum);
         mVoiceSearchView.addTextChangedListener(mEditChangeListener);

+ 15 - 14
app_modular/appmessages/src/main/java/com/modular/appmessages/activity/TastNewActivity.java → app_modular/appmessages/src/main/java/com/modular/appmessages/activity/TaskNewActivity.java

@@ -1,5 +1,6 @@
 package com.modular.appmessages.activity;
 
+import android.content.Intent;
 import android.os.Bundle;
 import android.support.annotation.Nullable;
 import android.support.design.widget.TabLayout;
@@ -16,12 +17,14 @@ import com.core.base.SupportToolBarActivity;
 import com.core.widget.listener.EditChangeListener;
 import com.modular.appmessages.R;
 import com.modular.appmessages.fragment.ApprovalListFragment;
+import com.modular.appmessages.fragment.TaskListFragment;
 import com.modular.apputils.widget.MenuVoiceSearchView;
+import com.uas.appworks.CRM.erp.activity.TaskAddErpActivity;
 
-public class TastNewActivity extends SupportToolBarActivity {
+public class TaskNewActivity extends SupportToolBarActivity {
     private String[] tabTitle;
-    private ApprovalListFragment mCurrentFragment;
-    private ApprovalListFragment daibanFragment, passFragment, pushFragment;
+    private TaskListFragment mCurrentFragment;
+    private TaskListFragment daibanFragment, passFragment, pushFragment;
     private ViewPager mViewPager;
     private MenuVoiceSearchView mVoiceSearchView;
 
@@ -29,15 +32,13 @@ public class TastNewActivity extends SupportToolBarActivity {
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        tabTitle = new String[]{getString(R.string.status_pending), getString(R.string.task_confimed), getString(R.string.task_request_me)};
+        tabTitle = new String[]{getString(R.string.task_wait_todo), getString(R.string.task_done_deal), getString(R.string.task_request_me)};
         initView();
-
     }
 
-
     @Override
     public int getToolBarId() {
-        return R.id.voiceSearchToolBar;
+        return R.id.cycleCountToolBar;
     }
 
     @Override
@@ -86,7 +87,7 @@ public class TastNewActivity extends SupportToolBarActivity {
             if (view.getId() == R.id.backImg) {
                 onBackPressed();
             }else if (view.getId()==R.id.addImg){
-                //TODO
+                startActivityForResult(new Intent(ct, TaskAddErpActivity.class), 0x17);
             }
         }
     };
@@ -100,34 +101,34 @@ public class TastNewActivity extends SupportToolBarActivity {
 
         @Override
         public void setPrimaryItem(ViewGroup container, int position, Object object) {
-            if (object != null && object instanceof ApprovalListFragment) {
-                mCurrentFragment = (ApprovalListFragment) object;
+            if (object != null && object instanceof TaskListFragment) {
+                mCurrentFragment = (TaskListFragment) object;
             }
             super.setPrimaryItem(container, position, object);
         }
 
         @Override
         public Fragment getItem(int position) {
-            ApprovalListFragment fragment = null;
+            TaskListFragment fragment = null;
             int tabItem = position + 1;
             switch (position) {
                 case 0:
                     if (daibanFragment == null) {
-                        daibanFragment = ApprovalListFragment.newInstance(tabItem);
+                        daibanFragment = TaskListFragment.newInstance(tabItem);
                         daibanFragment.setLoadedListener(mLoadedListener);
                     }
                     fragment = daibanFragment;
                     break;
                 case 1:
                     if (passFragment == null) {
-                        passFragment = ApprovalListFragment.newInstance(tabItem);
+                        passFragment = TaskListFragment.newInstance(tabItem);
                         passFragment.setLoadedListener(mLoadedListener);
                     }
                     fragment = passFragment;
                     break;
                 case 2:
                     if (pushFragment == null) {
-                        pushFragment = ApprovalListFragment.newInstance(tabItem);
+                        pushFragment = TaskListFragment.newInstance(tabItem);
                         pushFragment.setLoadedListener(mLoadedListener);
                     }
                     fragment = pushFragment;

+ 51 - 55
app_modular/appmessages/src/main/java/com/modular/appmessages/adapter/NewSchedultAdapter.java

@@ -8,8 +8,6 @@ import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.BaseAdapter;
-import android.widget.CheckBox;
-import android.widget.ImageView;
 import android.widget.TextView;
 
 import com.common.data.ObjectUtils;
@@ -47,24 +45,31 @@ public class NewSchedultAdapter extends BaseAdapter {
     public void setSearch_content(String search_content) {
         this.search_content = search_content;
     }
+
     public List<AllProcess> getReal_List() {
         return real_List;
     }
+
     public void setReal_List(List<AllProcess> real_List) {
         this.real_List = real_List;
     }
+
     private Context context;
+
     public NewSchedultAdapter() {
     }
+
     public NewSchedultAdapter(Context context, List<AllProcess> fArrayList) {
         this.context = context;
         this.fList = fArrayList;
     }
+
     public NewSchedultAdapter(Context context, List<AllProcess> fArrayList, List<AllProcess> flistNew) {
         this.context = context;
         this.fList = fArrayList;
         this.flistNew = flistNew;
     }
+
     @Override
     public int getCount() {
         if (fList == null || fList.isEmpty()) {
@@ -72,14 +77,17 @@ public class NewSchedultAdapter extends BaseAdapter {
         }
         return fList.size();
     }
+
     @Override
     public Object getItem(int position) {
         return fList.get(position);
     }
+
     @Override
     public long getItemId(int position) {
         return position;
     }
+
     @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
     @Override
     public View getView(int position, View view, ViewGroup parent) {
@@ -88,67 +96,60 @@ public class NewSchedultAdapter extends BaseAdapter {
         if (view == null) {
             store = new Store();
             view = LayoutInflater.from(context).inflate(
-                    R.layout.item_erptask, parent, false);
-            store.pTextView1 = (TextView) view.findViewById(R.id.TextView03);
-            store.pTextView2 = (TextView) view.findViewById(R.id.TextView04);
-            store.pTextView3 = (TextView) view.findViewById(R.id.TextView01);
-            store.iv_website = (ImageView) view.findViewById(R.id.iv_website);
-            store.pTextView4 = (TextView) view.findViewById(R.id.TextView02);
-            store.tv_task_status = (TextView) view.findViewById(R.id.tv_task_status);
-            store.tv_title = (TextView) view.findViewById(R.id.tv_title);
-            store.tv_date = (TextView) view.findViewById(R.id.tv_date);
-            store.tv_status = (TextView) view.findViewById(R.id.tv_status);
+                    R.layout.item_approval_list, parent, false);
+            store.tv_title = view.findViewById(R.id.titleTv);
+            view.findViewById(R.id.headImage).setVisibility(View.GONE);
+            store.tv_date = view.findViewById(R.id.statusTv);
+            store.tv_status = view.findViewById(R.id.subTitle);
             view.setTag(store);
         } else {
             store = (Store) view.getTag();
         }
+        try {
+            bindView(store, fields_object);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return view;
+    }
 
-        view.setBackground(context.getResources().getDrawable(R.drawable.selector_me_menu_item_bg));
+    private void bindView(Store store, AllProcess fields_object) throws Exception {
         if (fields_object.getTypecode().equals("pagingrelease")) {// 知会
             String pTextView3Str = "发起人:<font color='#990000'>"
                     + fields_object.getRecorder() + "</font>";
             CharSequence pTextView3HTML = Html.fromHtml(pTextView3Str);
-            store.pTextView3.setText(pTextView3HTML);
-            store.pTextView4.setText("" + fields_object.getId());
+            store.pTextView3 = pTextView3HTML;
+            store.pTextView4 = "" + fields_object.getId();
             String pTextView1Str = "<font color='#6666CC'>"
                     + fields_object.getTaskname().replaceAll("</br>", "")
                     + "</font>";
             CharSequence pTextView1HTML = Html.fromHtml(pTextView1Str);
-            store.pTextView1.setText(pTextView1HTML);
-            store.pTextView2.setVisibility(View.GONE);
-            store.iv_website.setVisibility(View.GONE);
-            // store.arrow.setVisibility(View.GONE);
+            store.pTextView1 = pTextView1HTML;
         } else if (fields_object.getTypecode().contains("task")) {// 待办任务
-//            if (StringUtil.isEmpty(fields_object.getLink())){
-            store.iv_website.setVisibility(View.GONE);
-//            }else{
-//                store.iv_website.setVisibility(View.VISIBLE);
-//            }
 
-            store.pTextView1.setText(fields_object.getRecorder());
+
+            store.pTextView1 = fields_object.getRecorder();
             if (!ObjectUtils.isEquals(null, fields_object.getDatetime())) {
-                store.pTextView2.setText(new SimpleDateFormat("yyyy-MM-dd HH:mm")
-                        .format(fields_object.getDatetime()));
+                store.pTextView2 = new SimpleDateFormat("yyyy-MM-dd HH:mm")
+                        .format(fields_object.getDatetime());
             }
             store.tv_task_duration = fields_object.getEndTime();
             store.tv_ra_resourcecode = fields_object.getRa_resourcecode();
             store.taskCode = fields_object.getTaskcode();
-            store.pTextView4.setText(fields_object.getTaskname());
-            store.pTextView3.setText(fields_object.getTaskid());
-            store.tv_task_status.setText(fields_object.getMainname());
+            store.pTextView4 = fields_object.getTaskname();
+            store.pTextView3 = fields_object.getTaskid();
+            store.tv_task_status = fields_object.getMainname();
             store.tv_task_description = fields_object.getDescribe() == null ? "未填写" : fields_object.getDescribe();
             store.tv_task_performer = fields_object.getDealpersoncode() == null ? "未填写" : fields_object.getDealpersoncode();
             store.attachs = fields_object.getAttachs();
             store.task_id = fields_object.getRa_taskid();
-
-            //TODO update FANGlg 列表做的和审批流一样
             String recoder_name = "";
-            if (!StringUtil.isEmpty(iSend) && "iSend".equals(iSend)){
+            if (!StringUtil.isEmpty(iSend) && "iSend".equals(iSend)) {
                 recoder_name = "";
-            }else {
-                recoder_name = fields_object.getRecorder()+ MyApplication.getInstance().getString(R.string.task_sended);
+            } else {
+                recoder_name = fields_object.getRecorder() + MyApplication.getInstance().getString(R.string.task_sended);
             }
-            store.tv_title.setText( recoder_name  + fields_object.getTaskname());
+            store.tv_title.setText(recoder_name + fields_object.getTaskname());
             store.tv_status.setText(fields_object.getMainname());
 
             if (!ObjectUtils.isEquals(null, fields_object.getDatetime())) {
@@ -156,42 +157,37 @@ public class NewSchedultAdapter extends BaseAdapter {
                         .format(fields_object.getDatetime()));
             }
         } else {// 待办审批流
-            store.pTextView3.setText("" + fields_object.getCodevalue());//编号
-            store.pTextView4.setText("" + fields_object.getMainname());//名称
-            store.pTextView1.setText(fields_object.getRecorder());//发起人
-            store.tv_task_status.setText(fields_object.getStatus());//状态
+            store.pTextView3 = "" + fields_object.getCodevalue();//编号
+            store.pTextView4 = "" + fields_object.getMainname();//名称
+            store.pTextView1 = fields_object.getRecorder();//发起人
+            store.tv_task_status = fields_object.getStatus();//状态
             if (fields_object.getDatetime() != null) {
-                store.pTextView2.setText(""
+                store.pTextView2 = ""
                         + new SimpleDateFormat("yyyy-MM-dd HH:mm")
-                        .format(fields_object.getDatetime()));
+                        .format(fields_object.getDatetime());
             }
-            store.iv_website.setVisibility(View.GONE);
         }
-        return view;
     }
 
     public class Store {
         public String task_id;//取回复内容id
         public String attachs;//
         public String tv_ra_resourcecode;//
-        public ImageView iv_website;//网址
-        public TextView tv_task_status;//状态
         public String taskCode;
-        public TextView nTextView;
-        public TextView pTextView;
-        public TextView pTextView1;// 发起人
-        public TextView pTextView2;// 发起时间
-        public TextView pTextView3;//编号
-        public TextView pTextView4;//名称
         public String tv_task_performer;//执行人
         public String tv_task_description;//描述
         public String tv_task_duration;//持续时间
-        public TextView urlTextView;
-        public CheckBox bCheckBox;
-        public ImageView arrow;
+
         public TextView tv_title;
         public TextView tv_date;
         public TextView tv_status;
+
+        public CharSequence pTextView1;// 发起人
+        public CharSequence pTextView2;// 发起时间
+        public CharSequence pTextView3;//编号
+        public CharSequence pTextView4;//名称
+        public CharSequence tv_task_status;//状态
+
     }
 
 }

+ 31 - 13
app_modular/appmessages/src/main/java/com/modular/appmessages/fragment/ApprovalListFragment.java

@@ -5,6 +5,7 @@ import android.os.Bundle;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.text.TextUtils;
+import android.view.ViewGroup;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
@@ -12,6 +13,7 @@ import com.common.LogUtil;
 import com.common.data.JSONUtil;
 import com.common.data.ListUtils;
 import com.common.data.StringUtil;
+import com.core.net.utils.NetUtils;
 import com.core.utils.CommonUtil;
 import com.core.utils.ToastUtil;
 import com.me.network.app.http.Method;
@@ -32,6 +34,7 @@ import java.util.Comparator;
 import java.util.List;
 
 public class ApprovalListFragment extends ViewPagerLazyFragment implements OnSmartHttpListener {
+    private final String TAB_TIEM_TAG = "tabItem";
     private final int LOAD_TO_DO = 1;
     private final int LOAD_TO_ALREADY = 2;
     private final int LOAD_TO_ME = 3;
@@ -40,17 +43,24 @@ public class ApprovalListFragment extends ViewPagerLazyFragment implements OnSma
     private SimpleRefreshLayout mSimpleRefreshLayout;
     private RecyclerView mRecyclerView;
     private ApprovalListAdapter mApprovalListAdapter;
-    private int page=1;
+    private int page = 1;
 
     public static ApprovalListFragment newInstance(int tabItem) {
-        LogUtil.i("gong", "tabItem=" + tabItem);
         Bundle args = new Bundle();
-        ApprovalListFragment fragment = new ApprovalListFragment();
         args.putInt("tabItem", tabItem);
+        ApprovalListFragment fragment = new ApprovalListFragment();
         fragment.setArguments(args);
         return fragment;
     }
 
+    @Override
+    public void onResume() {
+        super.onResume();
+        if (tabItem == 1) {
+            loadData();
+        }
+    }
+
     @Override
     protected void LazyData() {
         initView();
@@ -68,11 +78,14 @@ public class ApprovalListFragment extends ViewPagerLazyFragment implements OnSma
 
 
     public void searchByKey(String text) {
-        if (TextUtils.isEmpty(text)) {
-            mApprovalListAdapter.getFilter().filter("");
-        } else {
-            mApprovalListAdapter.getFilter().filter(text);
+        if (mApprovalListAdapter != null) {
+            if (TextUtils.isEmpty(text)) {
+                mApprovalListAdapter.getFilter().filter("");
+            } else {
+                mApprovalListAdapter.getFilter().filter(text);
+            }
         }
+
     }
 
 
@@ -102,10 +115,17 @@ public class ApprovalListFragment extends ViewPagerLazyFragment implements OnSma
     }
 
     public void loadData() {
+        if (!NetUtils.isNetWorkConnected(ct)) {
+            if (getRootView() != null && getRootView() instanceof ViewGroup)
+                ToastUtil.showToast(ct, R.string.networks_out, (ViewGroup) getRootView());
+            return;
+        }
+
+
         if (!mSimpleRefreshLayout.isRefreshing()) {
             progressDialog.show();
         }
-        LogUtil.i("gong","loadData tabItem="+tabItem);
+        LogUtil.i("gong", "loadData tabItem=" + tabItem);
         switch (tabItem) {
             case 1:
                 loadProcessToDo();
@@ -157,8 +177,6 @@ public class ApprovalListFragment extends ViewPagerLazyFragment implements OnSma
     }
 
 
-
-
     @Override
     public void onFailure(int what, String message, Tags tag) throws Exception {
         progressDialog.dismiss();
@@ -170,7 +188,7 @@ public class ApprovalListFragment extends ViewPagerLazyFragment implements OnSma
 
     @Override
     public void onSuccess(int what, String message, Tags tag) throws Exception {
-        LogUtil.i("gong","onSuccess="+message);
+        LogUtil.i("gong", "onSuccess=" + message);
         switch (what) {
             case LOAD_TO_DO:
                 handlerToDo(JSONUtil.getJSONArray(message, "data"));
@@ -259,7 +277,7 @@ public class ApprovalListFragment extends ViewPagerLazyFragment implements OnSma
 
 
     private void showAdapter(List<ApprovalList> approvalLists) {
-        LogUtil.i("gong","showAdapter="+ListUtils.getSize(approvalLists));
+        LogUtil.i("gong", "showAdapter=" + ListUtils.getSize(approvalLists));
         if (mLoadedListener != null) {
             mLoadedListener.loaded();
         }
@@ -273,7 +291,7 @@ public class ApprovalListFragment extends ViewPagerLazyFragment implements OnSma
             Collections.sort(approvalLists, mComparator);
         }
         if (mApprovalListAdapter == null) {
-            mApprovalListAdapter = new ApprovalListAdapter(getContext(), approvalLists, mOnItemClickListener);
+            mApprovalListAdapter = new ApprovalListAdapter(getContext(), tabItem, approvalLists, mOnItemClickListener);
             mRecyclerView.setAdapter(mApprovalListAdapter);
         } else {
             if (page == 1) {

+ 349 - 0
app_modular/appmessages/src/main/java/com/modular/appmessages/fragment/TaskListFragment.java

@@ -0,0 +1,349 @@
+package com.modular.appmessages.fragment;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.text.TextUtils;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.common.LogUtil;
+import com.common.data.JSONUtil;
+import com.common.data.ListUtils;
+import com.common.data.StringUtil;
+import com.core.utils.CommonUtil;
+import com.core.utils.ToastUtil;
+import com.me.network.app.http.Method;
+import com.modular.appmessages.R;
+import com.modular.appmessages.activity.ApprovalActivity;
+import com.modular.apputils.adapter.ApprovalListAdapter;
+import com.modular.apputils.listener.OnSmartHttpListener;
+import com.modular.apputils.model.ApprovalList;
+import com.modular.apputils.network.Parameter;
+import com.modular.apputils.network.Tags;
+import com.module.recyclerlibrary.ui.refresh.BaseRefreshLayout;
+import com.module.recyclerlibrary.ui.refresh.EmptyRecyclerView;
+import com.module.recyclerlibrary.ui.refresh.simlpe.SimpleRefreshLayout;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+public class TaskListFragment extends ViewPagerLazyFragment implements OnSmartHttpListener {
+    private final int LOAD_TO_DO = 1;
+    private final int LOAD_TO_ALREADY = 2;
+    private final int LOAD_TO_ME = 3;
+
+    private int tabItem;
+    private SimpleRefreshLayout mSimpleRefreshLayout;
+    private RecyclerView mRecyclerView;
+    private ApprovalListAdapter mApprovalListAdapter;
+    private int page=1;
+
+    public static TaskListFragment newInstance(int tabItem) {
+        LogUtil.i("gong", "tabItem=" + tabItem);
+        Bundle args = new Bundle();
+        TaskListFragment fragment = new TaskListFragment();
+        args.putInt("tabItem", tabItem);
+        fragment.setArguments(args);
+        return fragment;
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        if (tabItem==1){
+            loadData();
+        }
+    }
+
+    @Override
+    protected void LazyData() {
+        initView();
+    }
+
+    @Override
+    protected String getBaseUrl() {
+        return CommonUtil.getAppBaseUrl(getContext());
+    }
+
+    @Override
+    protected int inflater() {
+        return R.layout.simply_refresh_recyclerview;
+    }
+
+
+    public void searchByKey(String text) {
+        if (TextUtils.isEmpty(text)) {
+            mApprovalListAdapter.getFilter().filter("");
+        } else {
+            mApprovalListAdapter.getFilter().filter(text);
+        }
+    }
+
+
+    private void initView() {
+        tabItem = getArguments().getInt("tabItem", 0);
+        mSimpleRefreshLayout = findViewById(R.id.mSimpleRefreshLayout);
+        EmptyRecyclerView mEmptyRecyclerView = findViewById(R.id.mEmptyRecyclerView);
+        mRecyclerView = mEmptyRecyclerView.getRecyclerView();
+        mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
+        mSimpleRefreshLayout.setOnRefreshListener(new BaseRefreshLayout.onRefreshListener() {
+            @Override
+            public void onRefresh() {
+                page = 1;
+                loadData();
+            }
+
+            @Override
+            public void onLoadMore() {
+                page++;
+                loadData();
+            }
+        });
+        if (tabItem == 1) {
+            mSimpleRefreshLayout.setEnabledPullUp(false);
+        }
+        loadData();
+    }
+
+    public void loadData() {
+        if (!mSimpleRefreshLayout.isRefreshing()) {
+            progressDialog.show();
+        }
+        switch (tabItem) {
+            case 1:
+                loadProcessToDo();
+                break;
+            case 2:
+                loadProcessAlready();
+                break;
+            case 3:
+                loadProcessMe();
+                break;
+        }
+    }
+
+
+    private void loadProcessToDo() {
+        Parameter.Builder builder = new Parameter.Builder();
+        builder.url("common/desktop/process/toDo.action")
+                .record(LOAD_TO_DO)
+                .addParams("count", "1000")
+                .addParams("page", "1")
+                .showLog(true)
+                .saveLog(false)
+                .mode(Method.GET);
+        requestCompanyHttp(builder, this);
+    }
+
+    private void loadProcessAlready() {
+        Parameter.Builder builder = new Parameter.Builder();
+        builder.url("common/desktop/process/alreadyDo.action")
+                .record(LOAD_TO_ALREADY)
+                .addParams("count", String.valueOf(page * 30))
+                .addParams("page", page)
+                .addParams("isMobile", "1")
+                .addParams("_do", "1").showLog(true)
+                .mode(Method.GET);
+        requestCompanyHttp(builder, this);
+    }
+
+    private void loadProcessMe() {
+        Parameter.Builder builder = new Parameter.Builder();
+        builder.url("common/desktop/process/alreadyLaunch.action")
+                .record(LOAD_TO_ME)
+                .addParams("count", String.valueOf(page * 30))
+                .addParams("page", page)
+                .addParams("isMobile", "1")
+                .addParams("_do", "1").showLog(true)
+                .mode(Method.GET);
+        requestCompanyHttp(builder, this);
+    }
+
+
+
+
+    @Override
+    public void onFailure(int what, String message, Tags tag) throws Exception {
+        progressDialog.dismiss();
+        mSimpleRefreshLayout.stopRefresh();
+        if (!StringUtil.isEmpty(message)) {
+            ToastUtil.showToast(ct, message);
+        }
+    }
+
+    @Override
+    public void onSuccess(int what, String message, Tags tag) throws Exception {
+        LogUtil.i("gong","onSuccess="+message);
+        switch (what) {
+            case LOAD_TO_DO:
+                handlerToDo(JSONUtil.getJSONArray(message, "data"));
+                break;
+            case LOAD_TO_ALREADY:
+                handlerToDo(JSONUtil.getJSONArray(message, "data"));
+                break;
+            case LOAD_TO_ME:
+                handlerToDo(JSONUtil.getJSONArray(message, "data"));
+                break;
+        }
+        mSimpleRefreshLayout.stopRefresh();
+        progressDialog.dismiss();
+    }
+
+    private void handlerToDo(JSONArray array) throws Exception {
+        if (ListUtils.isEmpty(array)) {
+            showAdapter(null);
+        } else {
+            List<ApprovalList> approvalLists = new ArrayList<>();
+            ApprovalList e = null;
+            JSONObject object = null;
+            for (int i = 0; i < array.size(); i++) {
+                object = array.getJSONObject(i);
+                e = new ApprovalList();
+                e.setStatus(JSONUtil.getText(object, "JP_STATUS"));
+                if (tabItem != 1 || e.getStatus().equals("待审批")) {
+                    e.setCaller(JSONUtil.getText(object, "JP_CALLER"));
+                    e.setLauncherName(JSONUtil.getText(object, "JP_LAUNCHERNAME"));
+                    e.setName(JSONUtil.getText(object, "JP_NAME"));
+                    e.setNodeId(JSONUtil.getText(object, "JP_NODEID"));
+                    e.setDealTime(JSONUtil.getTime(object, "JP_LAUNCHTIME", "JN_DEALTIME"));
+                    e.setMaster(JSONUtil.getText(object, "CURRENTMASTER"));
+                    e.setImid(JSONUtil.getText(object, "EM_IMID"));
+                    e.setDealResult(JSONUtil.getText(object, "JN_DEALRESULT"));
+                    e.setNodeDealMan(JSONUtil.getText(object, "JP_NODEDEALMANNAME"));
+                    e.setOperatedDescription(JSONUtil.getText(object, "JN_OPERATEDDESCRIPTION"));
+                    approvalLists.add(setSubTitle(e));
+                }
+            }
+            showAdapter(approvalLists);
+        }
+    }
+
+    private ApprovalList setSubTitle(ApprovalList e) {
+        String jpStatus = "等待我审批";
+        int statusColor = R.color.approvaling;
+        switch (tabItem) {
+            case 2:
+                jpStatus = e.getDealResult();
+                if (!StringUtil.isEmpty(jpStatus)) {
+                    if (jpStatus.startsWith("不同意") || jpStatus.startsWith("结束流程") || jpStatus.startsWith("未通过")) {
+                        jpStatus = "未通过";
+                        statusColor = R.color.red;
+                    } else if (jpStatus.startsWith("变更处理人")) {
+                        statusColor = R.color.done_approval;
+                        if (!StringUtil.isEmpty(e.getOperatedDescription())) {
+                            jpStatus = "变更处理人(" + e.getOperatedDescription() + ")";
+                        } else {
+                            jpStatus = "变更处理人";
+                        }
+                    } else {
+                        jpStatus = "已审批";
+                        statusColor = R.color.done_approval;
+                    }
+                }
+                break;
+            case 3:
+                jpStatus = e.getStatus();
+                if (!StringUtil.isEmpty(jpStatus)) {
+                    if (jpStatus.equals("待审批")) {
+                        statusColor = R.color.approvaling;
+                        jpStatus = "等待" + e.getNodeDealMan() + getString(R.string.approvel);
+                    } else if (jpStatus.equals("未通过")) {
+                        statusColor = R.color.red;
+                    } else if (jpStatus.equals("已审批")) {
+                        statusColor = R.color.titleBlue;
+                    }
+                }
+                break;
+        }
+        e.setSubTitleColor(statusColor);
+        e.setSubTitle(jpStatus);
+        return e;
+    }
+
+
+    private void showAdapter(List<ApprovalList> approvalLists) {
+        LogUtil.i("gong","showAdapter="+ListUtils.getSize(approvalLists));
+        if (mLoadedListener != null) {
+            mLoadedListener.loaded();
+        }
+        if (ListUtils.isEmpty(approvalLists) && page > 1) {
+            page--;
+        }
+        if (tabItem == 1) {
+            if (mUpdateNumListener != null) {
+                mUpdateNumListener.update(ListUtils.getSize(approvalLists));
+            }
+            Collections.sort(approvalLists, mComparator);
+        }
+        if (mApprovalListAdapter == null) {
+            mApprovalListAdapter = new ApprovalListAdapter(getContext(),tabItem, approvalLists, mOnItemClickListener);
+            mRecyclerView.setAdapter(mApprovalListAdapter);
+        } else {
+            if (page == 1) {
+                mApprovalListAdapter.setApprovalLists(approvalLists);
+            } else {
+                mApprovalListAdapter.addApprovalLists(approvalLists);
+            }
+        }
+    }
+
+    private ApprovalListAdapter.OnItemClickListener mOnItemClickListener = new ApprovalListAdapter.OnItemClickListener() {
+        @Override
+        public void itemClick(ApprovalList model) {
+            if (model != null) {
+                String title = "";
+                switch (tabItem) {
+                    case 1:
+                        title = getString(R.string.title_approval);
+                        break;
+                    case 2:
+                        title = getString(R.string.task_confimed);
+                        break;
+                    case 3:
+                        title = getString(R.string.task_request_me);
+                        break;
+                }
+                Intent intent = new Intent(ct, ApprovalActivity.class);
+                intent.putExtra("imid", model.getImid());
+                intent.putExtra("title", title);
+                intent.putExtra("type", tabItem);
+                intent.putExtra("master", model.getMaster());
+                intent.putExtra("nodeid", Integer.valueOf(model.getNodeId()));
+                startActivity(intent);
+            }
+        }
+    };
+
+    private Comparator mComparator = new Comparator<ApprovalList>() {
+        @Override
+        public int compare(ApprovalList o1, ApprovalList o2) {
+            return String.valueOf(o2.getDealTime()).compareTo(String.valueOf(o1.getDealTime()));
+        }
+    };
+
+
+    private ApprovalListFragment.UpdateNumListener mUpdateNumListener;
+
+    public void setUpdateNumListener(ApprovalListFragment.UpdateNumListener mUpdateNumListener) {
+        this.mUpdateNumListener = mUpdateNumListener;
+    }
+
+    private ApprovalListFragment.LoadedListener mLoadedListener;
+
+    public void setLoadedListener(ApprovalListFragment.LoadedListener mLoadedListener) {
+        this.mLoadedListener = mLoadedListener;
+    }
+
+    public interface UpdateNumListener {
+        void update(int num);
+    }
+
+    public interface LoadedListener {
+        void loaded();
+    }
+
+}

+ 4 - 0
app_modular/appmessages/src/main/java/com/modular/appmessages/fragment/ViewPagerLazyFragment.java

@@ -52,6 +52,10 @@ public abstract class ViewPagerLazyFragment extends Fragment {
         ct = (AppCompatActivity) context;
     }
 
+    public View getRootView() {
+        return rootView;
+    }
+
     @Nullable
     public final <T extends View> T findViewById(int id) {
         if (rootView == null) {

+ 0 - 11
app_modular/appmessages/src/main/java/com/modular/appmessages/presenter/MessagePresenter.java

@@ -40,7 +40,6 @@ import com.core.net.http.http.OnHttpResultListener;
 import com.core.net.http.http.Request;
 import com.core.utils.CommonUtil;
 import com.core.utils.TimeUtils;
-import com.core.utils.ToastUtil;
 import com.core.utils.sortlist.BaseSortModel;
 import com.core.utils.sortlist.PingYinUtil;
 import com.core.xmpp.dao.ChatMessageDao;
@@ -1101,16 +1100,6 @@ public class MessagePresenter implements OnHttpResultListener {
             models.add(model);
         }
 
-        if (SwitchUtil.showYiyuanjuan()) {
-            model = new MessageHeader("差旅");
-            model.setIcon(R.drawable.uu_run);
-            model.setSubDoc("");
-            model.setRedKey(Constants.MESSAGE_RUN);
-            model.setType(9);
-            model.setTag("");
-            models.add(model);
-        }
-
         if (SwitchUtil.showShebeiguanli()) {
             model = new MessageHeader("设备管理");
             model.setIcon(R.drawable.uu_run);

+ 18 - 4
app_modular/appmessages/src/main/java/com/modular/appmessages/widget/SignRefreshLayout.java

@@ -173,8 +173,13 @@ public class SignRefreshLayout extends ViewGroup {
                         RecyclerView recycler = ((EmptyRecyclerView) child);
                         intercept = rvPullDownIntercept(recycler);
                     }
-                } else if (y < mLastYIntercept && status != NORMAL) {
-                    intercept = true;
+                } else if (y < mLastYIntercept) {//上划
+                    View child = getChildAt(0);
+                    if (status == SIGN_REFRESH) {
+                        intercept = true;
+                    } else if (child instanceof ScrollView) {
+                        intercept = svPullUpIntercept(child);
+                    }
                 } else {
                     intercept = false;
                 }
@@ -187,8 +192,17 @@ public class SignRefreshLayout extends ViewGroup {
             }
         }
         mLastYIntercept = y;
-        Log.i("gong", "intercept=" + intercept);
-        Log.i("gong", "status=" + status);
+        return intercept;
+    }
+
+    private boolean svPullUpIntercept(View child) {
+        boolean intercept = false;
+        ScrollView scrollView = (ScrollView) child;
+        View scrollChild = scrollView.getChildAt(0);
+
+        if (scrollView.getScrollY() >= (scrollChild.getHeight() - scrollView.getHeight())) {
+            intercept = true;
+        }
         return intercept;
     }
 

BIN
app_modular/appmessages/src/main/res/drawable-hdpi/ic_sign_voice.png


BIN
app_modular/appmessages/src/main/res/drawable-hdpi/ic_sign_voice_no.png


BIN
app_modular/appmessages/src/main/res/drawable-xhdpi/ic_sign_voice.png


BIN
app_modular/appmessages/src/main/res/drawable-xhdpi/ic_sign_voice_no.png


BIN
app_modular/appmessages/src/main/res/drawable-xxhdpi/ic_sign_voice.png


BIN
app_modular/appmessages/src/main/res/drawable-xxhdpi/ic_sign_voice_no.png


+ 2 - 3
app_modular/appmessages/src/main/res/layout/activity_approval_list.xml

@@ -6,10 +6,9 @@
     android:orientation="vertical">
 
     <include
-        android:id="@+id/toolbarLayout"
-        layout="@layout/toolbar_voice_search"
         android:layout_width="match_parent"
-        android:layout_height="?attr/actionBarSize" />
+        android:layout_height="?attr/actionBarSize"
+        layout="@layout/action_device_cycle_count"/>
 
     <FrameLayout
         android:layout_width="match_parent"

+ 0 - 1
app_modular/appmessages/src/main/res/layout/item_message_header.xml

@@ -62,7 +62,6 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_alignParentRight="true"
-            android:layout_marginRight="8dp"
             android:textColor="#999999"
             android:textSize="10sp"
             android:visibility="gone"

+ 0 - 45
app_modular/appmessages/src/main/res/layout/toolbar_voice_search.xml

@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
-    android:id="@+id/voiceSearchToolBar"
-    android:layout_width="match_parent"
-    android:layout_height="?attr/actionBarSize"
-    android:background="@drawable/common_toolbar_bg"
-    android:orientation="horizontal"
-    android:paddingBottom="10dp"
-    android:paddingTop="10dp">
-
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent">
-
-        <ImageView
-            android:id="@+id/backImg"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:padding="4dp"
-            android:src="@drawable/back" />
-
-        <com.modular.apputils.widget.MenuVoiceSearchView
-            android:id="@+id/mVoiceSearchView"
-            android:layout_width="300dp"
-            android:layout_height="match_parent"
-            android:layout_centerInParent="true"
-            android:layout_marginBottom="3dp"
-            android:layout_marginTop="3dp"
-            android:background="@drawable/shape_process_linear"
-            android:orientation="horizontal" />
-
-        <ImageView
-            android:id="@+id/addImg"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_alignParentRight="true"
-            android:layout_marginRight="5dp"
-            android:gravity="center"
-            android:padding="@dimen/padding"
-            android:src="@drawable/more"
-            android:visibility="gone" />
-    </RelativeLayout>
-
-
-</android.support.v7.widget.Toolbar>

+ 1 - 3
app_modular/apptasks/src/main/java/com/modular/apptasks/presenter/AutoPresenter.java

@@ -4,8 +4,6 @@ import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
 import android.support.v4.content.LocalBroadcastManager;
 
 import com.alibaba.fastjson.JSON;
@@ -197,7 +195,7 @@ public class AutoPresenter {
 			public void receive(LatLng latLng, String location, String address) {
 				//判断是否符合打卡
 				if (BaiduMapUtil.getInstence().isInWorkPlce()) {
-					signinUitl.signinWork(model);
+					signinUitl.signinWork(isWork,model);
 				} else {
 					//不符合打卡情况下,去判断下一次打卡时间
 					ThreadUtil.getInstance().addTask(new Runnable() {

+ 16 - 7
app_modular/apputils/src/main/java/com/modular/apputils/adapter/ApprovalListAdapter.java

@@ -27,9 +27,11 @@ public class ApprovalListAdapter extends RecyclerView.Adapter<ApprovalListAdapte
     private Context ct;
     private List<ApprovalList> showModels;
     private List<ApprovalList> allModels;
+    private int tabItem;
 
-    public ApprovalListAdapter(Context ct, List<ApprovalList> approvalLists,OnItemClickListener mOnItemClickListener) {
+    public ApprovalListAdapter(Context ct, int tabItem,List<ApprovalList> approvalLists,OnItemClickListener mOnItemClickListener) {
         this.ct = ct;
+        this.tabItem = tabItem;
         this.mOnItemClickListener = mOnItemClickListener;
         this.allModels = approvalLists;
         this.showModels = this.allModels;
@@ -59,12 +61,6 @@ public class ApprovalListAdapter extends RecyclerView.Adapter<ApprovalListAdapte
     @Override
     public void onBindViewHolder(ViewHolder viewHolder, int position) {
         ApprovalList model = showModels.get(position);
-        if (!StringUtil.isEmpty(model.getImid())) {
-            AvatarHelper.getInstance().displayCircular(model.getImid(), viewHolder.headImage, true, false);//显示圆角图片
-        } else {
-            String imageUri = "drawable://" + R.drawable.common_header_boy;
-            AvatarHelper.getInstance().displayCircular(imageUri, viewHolder.headImage, true);
-        }
         String jpName = model.getName() == null ? "" : (model.getName().replace("流程", ""));
         String name = model.getLauncherName() + "的" + jpName;
         viewHolder.titleTv.setText(name);
@@ -73,6 +69,14 @@ public class ApprovalListAdapter extends RecyclerView.Adapter<ApprovalListAdapte
         viewHolder.subTitle.setText(model.getSubTitle());
         viewHolder.itemView.setTag(model);
         viewHolder.itemView.setOnClickListener(mOnClickListener);
+        if (viewHolder.headImage.getVisibility()==View.VISIBLE){
+            if (!StringUtil.isEmpty(model.getImid())) {
+                AvatarHelper.getInstance().displayCircular(model.getImid(), viewHolder.headImage, true, false);//显示圆角图片
+            } else {
+                String imageUri = "drawable://" + R.drawable.common_header_boy;
+                AvatarHelper.getInstance().displayCircular(imageUri, viewHolder.headImage, true);
+            }
+        }
     }
 
     @Override
@@ -134,6 +138,11 @@ public class ApprovalListAdapter extends RecyclerView.Adapter<ApprovalListAdapte
             statusTv = itemView.findViewById(R.id.statusTv);
             titleTv = itemView.findViewById(R.id.titleTv);
             subTitle = itemView.findViewById(R.id.subTitle);
+            if (tabItem==3){
+                headImage.setVisibility(View.GONE);
+            }else{
+                headImage.setVisibility(View.VISIBLE);
+            }
         }
     }
 }

+ 1 - 3
app_modular/apputils/src/main/java/com/modular/apputils/utils/SignUtils.java

@@ -6,7 +6,6 @@ import android.os.Bundle;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import com.common.LogUtil;
 import com.common.data.DateFormatUtil;
 import com.common.data.JSONUtil;
 import com.common.data.ListUtils;
@@ -232,7 +231,6 @@ public class SignUtils implements OnHttpResultListener {
             model = bundle.getParcelable("data");
         }
         if (model == null) {
-            LogUtil.i("model == null");
             List<WorkModel> models = WorkModelDao.getInstance().query(false);
             if (ListUtils.isEmpty(models)) return;
             String time = DateFormatUtil.long2Str(System.currentTimeMillis(), "HH:mm");
@@ -259,7 +257,7 @@ public class SignUtils implements OnHttpResultListener {
             WorkModelDao.getInstance().update(model);
         }
 
-        VoiceUtils.signVoice();
+        VoiceUtils.signVoice(R.raw.voice_work);
         if (this.mSignListener != null) {
             this.mSignListener.sign(true, "打卡成功");
         }

+ 14 - 15
app_modular/apputils/src/main/java/com/modular/apputils/utils/VoiceUtils.java

@@ -8,36 +8,35 @@ import android.net.Uri;
 
 import com.common.preferences.PreferenceUtils;
 import com.core.app.MyApplication;
-import com.modular.apputils.R;
 
 public class VoiceUtils {
 
-    public static void signVoice() {
+    public static void signVoice(int rawId) {
         if (PreferenceUtils.getBoolean("signVoiceAble", true)) {
-//            setMediaVolume(getMediaMaxVolume());
-            Uri notification = Uri.parse("android.resource://"+ MyApplication.getInstance().getPackageName()+"/"+ R.raw.voice_sign);
-            Ringtone r = RingtoneManager.getRingtone( MyApplication.getInstance().getApplicationContext(), notification);
+//            Uri notification = Uri.parse("android.resource://"+ MyApplication.getInstance().getPackageName()+"/"+ R.raw.voice_sign);
+            Uri notification = Uri.parse("android.resource://" + MyApplication.getInstance().getPackageName() + "/" + rawId);
+            Ringtone r = RingtoneManager.getRingtone(MyApplication.getInstance().getApplicationContext(), notification);
             r.play();
         }
     }
 
 
-
-
     //获取多媒体最大音量
-    public static int getMediaMaxVolume(){
-        return getAudioManager().getStreamMaxVolume( AudioManager.STREAM_MUSIC );
+    public static int getMediaMaxVolume() {
+        return getAudioManager().getStreamMaxVolume(AudioManager.STREAM_MUSIC);
     }
+
     //获取多媒体音量
-    public static int getMediaVolume(){
-        return  getAudioManager().getStreamVolume( AudioManager.STREAM_MUSIC );
+    public static int getMediaVolume() {
+        return getAudioManager().getStreamVolume(AudioManager.STREAM_MUSIC);
     }
 
     //获取通话最大音量
-    public static int getCallMaxVolume(){
-        return  getAudioManager().getStreamMaxVolume( AudioManager.STREAM_VOICE_CALL );
+    public static int getCallMaxVolume() {
+        return getAudioManager().getStreamMaxVolume(AudioManager.STREAM_VOICE_CALL);
     }
-    public static void setMediaVolume(int volume){
+
+    public static void setMediaVolume(int volume) {
         getAudioManager().setStreamVolume(AudioManager.STREAM_MUSIC, //音量类型
                 volume,
                 AudioManager.FLAG_PLAY_SOUND
@@ -60,7 +59,7 @@ public class VoiceUtils {
 //    }
 
 
-    private static AudioManager getAudioManager(){
+    private static AudioManager getAudioManager() {
         return (AudioManager) MyApplication.getInstance().getSystemService(Context.AUDIO_SERVICE);
     }
 }

+ 5 - 0
app_modular/apputils/src/main/res/drawable/text_bule_hint_bg.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@color/approval_select_tab" android:state_checked="true" />
+    <item android:drawable="@color/approval_tab" />
+</selector>

+ 113 - 0
app_modular/apputils/src/main/res/layout/acativity_task_list.xml

@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@drawable/bg_main"
+    android:orientation="vertical">
+
+    <include
+        layout="@layout/action_device_cycle_count"
+        android:layout_width="match_parent"
+        android:layout_height="?attr/actionBarSize" />
+
+    <com.xzjmyk.pm.activity.view.DivideRadioGroup
+        android:id="@+id/tabGroup"
+        android:layout_width="match_parent"
+        android:layout_height="40dp"
+        android:background="@color/white"
+        android:orientation="horizontal">
+
+        <FrameLayout
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1">
+
+            <View
+                android:id="@+id/todoLine"
+                android:layout_width="match_parent"
+                android:layout_height="4dp"
+                android:layout_gravity="bottom"
+                android:layout_marginLeft="@dimen/padding"
+                android:layout_marginRight="@dimen/padding"
+                android:background="#1084D1" />
+
+            <RadioButton
+                android:id="@+id/todoRb"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:button="@null"
+                android:checked="true"
+                android:gravity="center"
+                android:text="@string/task_wait_todo"
+                style="@style/IMTabButton"
+                />
+
+        </FrameLayout>
+
+        <FrameLayout
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1">
+
+            <View
+                android:id="@+id/doneDealLine"
+                android:layout_width="match_parent"
+                android:layout_height="4dp"
+                android:layout_gravity="bottom"
+                android:layout_marginLeft="@dimen/padding"
+                android:layout_marginRight="@dimen/padding"
+                android:background="#1084D1"
+                android:visibility="gone" />
+
+            <RadioButton
+                android:id="@+id/doneDealRb"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:button="@null"
+                style="@style/IMTabButton"
+                android:gravity="center"
+                android:text="@string/task_done_deal" />
+        </FrameLayout>
+
+
+        <FrameLayout
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1">
+
+            <View
+                android:id="@+id/byMeLine"
+                android:layout_width="match_parent"
+                android:layout_height="4dp"
+                android:layout_gravity="bottom"
+                android:layout_marginLeft="@dimen/padding"
+                android:layout_marginRight="@dimen/padding"
+                android:background="#1084D1"
+                android:visibility="gone" />
+
+            <RadioButton
+                android:id="@+id/byMeRb"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1"
+                android:button="@null"
+                android:gravity="center"
+                android:text="@string/task_request_me"
+                style="@style/IMTabButton" />
+        </FrameLayout>
+
+    </com.xzjmyk.pm.activity.view.DivideRadioGroup>
+
+    <com.handmark.pulltorefresh.library.PullToRefreshListView
+        android:id="@+id/listview_schedult"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_below="@+id/tv_dispaly_top"
+        android:background="#f2f2f2"
+        android:dividerPadding="0px"
+        android:fadingEdge="none"
+        android:listSelector="#00000000"
+        android:scrollbars="none"
+        android:scrollingCache="false" />
+</LinearLayout>

+ 0 - 0
app_modular/appworks/src/main/res/layout/action_device_cycle_count.xml → app_modular/apputils/src/main/res/layout/action_device_cycle_count.xml


+ 10 - 8
app_modular/apputils/src/main/res/layout/item_approval_list.xml

@@ -1,13 +1,16 @@
 <?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="wrap_content"
-    android:background="#f2f2f2">
+    android:layout_height="wrap_content">
 
     <RelativeLayout
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_margin="@dimen/padding"
+        android:layout_height="60dp"
+        android:layout_marginTop="@dimen/paddingMin"
+        android:layout_marginBottom="@dimen/paddingMin"
+        android:layout_marginLeft="@dimen/padding"
+        android:layout_marginRight="@dimen/padding"
+        android:padding="@dimen/padding"
         android:background="@drawable/radian_white_utils_bg">
 
         <de.hdodenhof.circleimageview.CircleImageView
@@ -23,19 +26,19 @@
             android:layout_height="wrap_content"
             android:layout_alignParentRight="true"
             android:layout_alignTop="@id/headImage"
-            android:text="请假申请-AL3630467"
             android:textColor="#FF333333"
             android:textSize="10sp" />
 
         <TextView
             android:id="@+id/titleTv"
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_alignTop="@id/headImage"
+            android:layout_toLeftOf="@id/statusTv"
+            android:layout_marginRight="@dimen/paddingMin"
             android:layout_toRightOf="@id/headImage"
             android:ellipsize="end"
             android:lines="1"
-            android:text="请假申请-AL3630467"
             android:textColor="#FF333333"
             android:textSize="15sp" />
 
@@ -46,7 +49,6 @@
             android:layout_below="@id/titleTv"
             android:layout_toRightOf="@id/headImage"
             android:layout_marginTop="4dp"
-            android:text="请假申请-AL3630467"
             android:textColor="#FF333333"
             android:textSize="12sp" />
     </RelativeLayout>

+ 1 - 0
app_modular/apputils/src/main/res/layout/simply_refresh_recyclerview.xml

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
+    android:background="#F2F2F2"
     android:layout_height="match_parent">
 
     <com.module.recyclerlibrary.ui.refresh.simlpe.SimpleRefreshLayout

BIN
app_modular/apputils/src/main/res/raw/rec.mp3


BIN
app_modular/apputils/src/main/res/raw/voice_off.mp3


BIN
app_modular/apputils/src/main/res/raw/voice_sign.mp3


BIN
app_modular/apputils/src/main/res/raw/voice_sign.wav


BIN
app_modular/apputils/src/main/res/raw/voice_work.mp3


File diff suppressed because it is too large
+ 314 - 801
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceDataFormAddActivity.java


+ 2 - 2
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceManageActivity.java

@@ -36,7 +36,7 @@ public class DeviceManageActivity extends SupportToolBarActivity {
     }
 
     private void initView() {
-        contantRv = (RecyclerView) findViewById(R.id.contantRv);
+        contantRv =findViewById(R.id.contantRv);
         contantRv.setLayoutManager(new GridLayoutManager(ct, 4));
         List<DeviceManage> models = new ArrayList<>();
         //扫一扫
@@ -51,7 +51,7 @@ public class DeviceManageActivity extends SupportToolBarActivity {
         models.add(new DeviceManage(6, R.drawable.icon_fault_inspection, StringUtil.getMessage(R.string.text_fault_inspection)).setCazz(DeviceDataFormAddActivity.class).addString("caller", "DeviceChange!Inspect"));
         //周期盘点
         models.add(new DeviceManage(7, R.drawable.icon_cycle_count, StringUtil.getMessage(R.string.text_cycle_count)).setCazz(DeviceCycleCountActivity.class));
-        models.add(new DeviceManage(8, R.drawable.icon_device_query, StringUtil.getMessage(R.string.text_device_query_match)).setCazz(DeviceMatchActivity.class));
+        models.add(new DeviceManage(8, R.drawable.icon_device_match, StringUtil.getMessage(R.string.text_device_query_match)).setCazz(DeviceMatchActivity.class));
         DeviceManageAdapter adapter = new DeviceManageAdapter(this, models);
         contantRv.setAdapter(adapter);
         adapter.setItemClickListener(new DeviceManageAdapter.ItemClickListener() {

+ 33 - 18
app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/form/DataFormDetailActivity.java

@@ -21,10 +21,10 @@ import android.view.ViewGroup;
 import android.widget.BaseAdapter;
 import android.widget.Button;
 import android.widget.EditText;
+import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
-import android.widget.Toast;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
@@ -42,7 +42,9 @@ import com.core.app.MyApplication;
 import com.core.base.BaseActivity;
 import com.core.model.SelectBean;
 import com.core.net.http.ViewUtil;
+import com.core.net.utils.NetUtils;
 import com.core.utils.CommonUtil;
+import com.core.utils.ToastUtil;
 import com.core.utils.time.wheel.DateTimePicker;
 import com.core.widget.view.Activity.SelectActivity;
 import com.core.widget.view.ListViewInScroller;
@@ -1041,13 +1043,15 @@ public class DataFormDetailActivity extends BaseActivity implements View.OnClick
                     });
                     break;
                 case TYPE_ITEM:
-                    ViewModel model;
+                    DataAdapter.ViewModel model;
                     if (true) {
                         convertView = inflater.inflate(R.layout.listitem_businessless_edit, parent, false);
-                        model = new ViewModel();
+                        model = new DataAdapter.ViewModel();
                         model.text = (TextView) convertView.findViewById(R.id.tv_less_key);
                         model.editText = (EditText) convertView.findViewById(R.id.tv_less_value);
                         model.ll_moment = (LinearLayout) convertView.findViewById(R.id.ll_moment);
+                        model.selectIv = convertView.findViewById(R.id.selectIv);
+                        model.muchInputTv = convertView.findViewById(R.id.muchInputTv);
                         model.editText.setBackgroundResource(R.color.transparent);
                         convertView.setTag(model);
                     } else {
@@ -1058,13 +1062,15 @@ public class DataFormDetailActivity extends BaseActivity implements View.OnClick
                     final Data data = (Data) getItem(position);
                     HashMap<String, Object> results = isLastItem(position);
                     final Integer categoryIndex = (Integer) results.get("categoryIndex");
-
                     model.text.setText(data.getName());
                     if ("F".equals(data.getReadonly()) || "necessaryField".equals(data.getReadonly())) {
-                        model.editText.setHint("请输入(必填)");
+                        model.editText.setHint("请输入");
+                        model.muchInputTv.setVisibility(View.VISIBLE);
                     } else {
                         model.editText.setHint("请输入");
+                        model.muchInputTv.setVisibility(View.GONE);
                     }
+                    model.selectIv.setVisibility(View.GONE);
                     if (data.getType().equals("D") ||
                             data.getType().equals("C") ||
                             data.getType().equals("MF") ||
@@ -1072,7 +1078,8 @@ public class DataFormDetailActivity extends BaseActivity implements View.OnClick
                             data.getType().equals("DF")) {
                         model.editText.setKeyListener(null);
                         model.editText.setFocusable(false);
-                        model.editText.setHint("请选择(必选)");
+                        model.editText.setHint("请选择");
+                        model.selectIv.setVisibility(View.VISIBLE);
                     }
                     if (data.isEditing()) {
                         model.editText.setEnabled(true);
@@ -1089,6 +1096,10 @@ public class DataFormDetailActivity extends BaseActivity implements View.OnClick
                     editText.setOnClickListener(new View.OnClickListener() {
                         @Override
                         public void onClick(View v) {
+                            if (!NetUtils.isNetWorkConnected(ct)) {
+                                ToastUtil.showToast(ct, R.string.networks_out);
+                                return;
+                            }
                             if (data.getType().equals("D")) {
                                 boolean hasMenu = false;
                                 if ("Ask4Leave".equals(caller)) hasMenu = true;
@@ -1124,6 +1135,7 @@ public class DataFormDetailActivity extends BaseActivity implements View.OnClick
                                 intent.putExtras(bundle);
                                 intent.putExtra("key", "combdatas");
                                 intent.putExtra("showKey", "DISPLAY");
+//                                intent.putExtra("method", "get");
                                 //mobile/common/getCombo.action
                                 intent.putExtra("action", "mobile/common/getComboValue.action");//
                                 intent.putExtra("title", data.getName());
@@ -1132,8 +1144,17 @@ public class DataFormDetailActivity extends BaseActivity implements View.OnClick
                                 startActivityForResult(intent, categoryIndex);
                                 isLeave = true;
                             }
+                            if (data.getType().equals("SF")) {
+                                startActivityForResult(new Intent(ct, SelectNetAcitivty.class)
+                                                .putExtra("fieldKey", data.getField())
+                                                .putExtra("caller", caller)
+                                                .putExtra("isDevice", true)
+                                                .putExtra("device", data.getName().equals("设备编号"))
+                                                .putExtra("isForm", true)
+                                        , 90);
+                                isLeave = true;
+                            } else if (data.getType().equals("MF")) {
 
-                            if (data.getType().equals("MF") || data.getType().equals("SF")) {
                                 HashMap param = new HashMap<>();
                                 String[] fields = new String[]{"sa_custname"};
                                 if (caller.equals("StandbyApplication")) {
@@ -1143,7 +1164,6 @@ public class DataFormDetailActivity extends BaseActivity implements View.OnClick
                                     fields = new String[]{"ama_customer"};
                                 }
                                 param.put("caller", caller);
-                                LogUtil.d("DataFormDetailActivity", "SelectNetAcitivty:" + caller);
                                 if (caller.equals("MainTain")) {
                                     if ("mt_custcode".equals(data.getField())) {
                                         fields = new String[]{"mt_custname"};
@@ -1158,15 +1178,7 @@ public class DataFormDetailActivity extends BaseActivity implements View.OnClick
                                         fields = new String[]{"mtd_proname", "mtd_remark", "mtd_unit"};
                                         param.put("caller", "sProduct");
                                     }
-                                } else {
-                                    //SF类型需求更改,支持联动
-                                    LogUtil.d("DataFormDetailActivity", "SelectNetAcitivty:" + caller);
-                                    startActivityForResult(new Intent(ct, SelectNetAcitivty.class)
-                                                    .putExtra("fieldKey", data.getField())
-                                                    .putExtra("caller", caller)
-                                                    .putExtra("isForm", true)//是否是主表
-                                            , 90);
-                                    return;//不处理下面旧的处理逻辑
+
                                 }
                                 param.put("page", "1");
                                 param.put("which", "form");
@@ -1193,6 +1205,7 @@ public class DataFormDetailActivity extends BaseActivity implements View.OnClick
                                 intent.putExtra("id", categoryIndex);
                                 intent.putExtra("object", data);
                                 startActivityForResult(intent, categoryIndex);
+
                                 isLeave = true;
                             }
                             //连带操作
@@ -1221,7 +1234,7 @@ public class DataFormDetailActivity extends BaseActivity implements View.OnClick
                                     }
                                     param.put("page", "1");
                                     param.put("condition", "1=1");
-                                    param.put("pageSize", "3000");
+                                    param.put("pageSize", "30");
                                     param.put("field", data.getField());
                                     Bundle bundle = new Bundle();
                                     bundle.putSerializable("param", param);
@@ -1301,7 +1314,9 @@ public class DataFormDetailActivity extends BaseActivity implements View.OnClick
 
         class ViewModel {
             TextView text;
+            TextView muchInputTv;
             EditText editText;
+            ImageView selectIv;
             LinearLayout ll_moment;
         }
     }

+ 114 - 111
app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/form/TravelDataFormDetailActivity.java

@@ -21,6 +21,7 @@ import android.view.ViewGroup;
 import android.widget.BaseAdapter;
 import android.widget.Button;
 import android.widget.EditText;
+import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
@@ -42,7 +43,9 @@ import com.core.app.MyApplication;
 import com.core.base.BaseActivity;
 import com.core.model.SelectBean;
 import com.core.net.http.ViewUtil;
+import com.core.net.utils.NetUtils;
 import com.core.utils.CommonUtil;
+import com.core.utils.ToastUtil;
 import com.core.utils.time.wheel.DateTimePicker;
 import com.core.widget.view.Activity.SelectActivity;
 import com.core.widget.view.ListViewInScroller;
@@ -52,7 +55,6 @@ import com.core.widget.view.selectcalendar.bean.Data;
 import com.lidroid.xutils.ViewUtils;
 import com.modular.apputils.activity.SelectNetAcitivty;
 import com.modular.apputils.utils.PopupWindowHelper;
-import com.modular.apputils.utils.SwitchUtil;
 import com.uas.appworks.OA.erp.activity.CommonDocDetailsActivity;
 import com.uas.appworks.OA.erp.model.form.GroupData;
 import com.uas.appworks.R;
@@ -1078,13 +1080,15 @@ public class TravelDataFormDetailActivity extends BaseActivity implements View.O
                     });
                     break;
                 case TYPE_ITEM:
-                    ViewModel model;
+                    DataAdapter.ViewModel model;
                     if (true) {
                         convertView = inflater.inflate(R.layout.listitem_businessless_edit, parent, false);
-                        model = new ViewModel();
+                        model = new DataAdapter.ViewModel();
                         model.text = (TextView) convertView.findViewById(R.id.tv_less_key);
                         model.editText = (EditText) convertView.findViewById(R.id.tv_less_value);
                         model.ll_moment = (LinearLayout) convertView.findViewById(R.id.ll_moment);
+                        model.selectIv = convertView.findViewById(R.id.selectIv);
+                        model.muchInputTv = convertView.findViewById(R.id.muchInputTv);
                         model.editText.setBackgroundResource(R.color.transparent);
                         convertView.setTag(model);
                     } else {
@@ -1095,14 +1099,15 @@ public class TravelDataFormDetailActivity extends BaseActivity implements View.O
                     final Data data = (Data) getItem(position);
                     HashMap<String, Object> results = isLastItem(position);
                     final Integer categoryIndex = (Integer) results.get("categoryIndex");
-                    final Integer groupIndex = (Integer) results.get("groupIndex");
-
                     model.text.setText(data.getName());
                     if ("F".equals(data.getReadonly()) || "necessaryField".equals(data.getReadonly())) {
-                        model.editText.setHint("请输入(必填)");
+                        model.editText.setHint("请输入");
+                        model.muchInputTv.setVisibility(View.VISIBLE);
                     } else {
                         model.editText.setHint("请输入");
+                        model.muchInputTv.setVisibility(View.GONE);
                     }
+                    model.selectIv.setVisibility(View.GONE);
                     if (data.getType().equals("D") ||
                             data.getType().equals("C") ||
                             data.getType().equals("MF") ||
@@ -1110,7 +1115,8 @@ public class TravelDataFormDetailActivity extends BaseActivity implements View.O
                             data.getType().equals("DF")) {
                         model.editText.setKeyListener(null);
                         model.editText.setFocusable(false);
-                        model.editText.setHint("F".equals(data.getReadonly())?"请选择(必选)":"请选择");
+                        model.editText.setHint("请选择");
+                        model.selectIv.setVisibility(View.VISIBLE);
                     }
                     if (data.isEditing()) {
                         model.editText.setEnabled(true);
@@ -1127,6 +1133,10 @@ public class TravelDataFormDetailActivity extends BaseActivity implements View.O
                     editText.setOnClickListener(new View.OnClickListener() {
                         @Override
                         public void onClick(View v) {
+                            if (!NetUtils.isNetWorkConnected(ct)) {
+                                ToastUtil.showToast(ct, R.string.networks_out);
+                                return;
+                            }
                             if (data.getType().equals("D")) {
                                 boolean hasMenu = false;
                                 if ("Ask4Leave".equals(caller)) hasMenu = true;
@@ -1162,6 +1172,7 @@ public class TravelDataFormDetailActivity extends BaseActivity implements View.O
                                 intent.putExtras(bundle);
                                 intent.putExtra("key", "combdatas");
                                 intent.putExtra("showKey", "DISPLAY");
+//                                intent.putExtra("method", "get");
                                 //mobile/common/getCombo.action
                                 intent.putExtra("action", "mobile/common/getComboValue.action");//
                                 intent.putExtra("title", data.getName());
@@ -1170,75 +1181,68 @@ public class TravelDataFormDetailActivity extends BaseActivity implements View.O
                                 startActivityForResult(intent, categoryIndex);
                                 isLeave = true;
                             }
-
-                            if (data.getType().equals("MF") || data.getType().equals("SF")) {
-//                                HashMap param = new HashMap<>();
-//                                String[] fields = new String[]{"sa_custname"};
-//                                if (caller.equals("StandbyApplication")) {
-//                                    fields = new String[]{"sa_custname"};
-//                                }
-//                                if (caller.equals("MaterielApply")) {
-//                                    fields = new String[]{"ama_customer"};
-//                                }
-//                                param.put("caller", caller);
-//                                LogUtil.d("DataFormDetailActivity", "SelectNetAcitivty:" + caller);
-//                                if (caller.equals("MainTain")) {
-//                                    if ("mt_custcode".equals(data.getField())) {
-//                                        fields = new String[]{"mt_custname"};
-//                                    }
-//                                    if ("mt_text1".equals(data.getField())) {
-//                                        fields = new String[]{"mt_text2"};
-//                                    }
-//                                    if ("mt_ckcode".equals(data.getField())) {
-//                                        fields = new String[]{"mt_row", "so_custname", "sod_jx", "sod_remark", "sod_unback"};
-//                                    }
-//                                    if ("mtd_procode".equals(data.getField())) {
-//                                        fields = new String[]{"mtd_proname", "mtd_remark", "mtd_unit"};
-//                                        param.put("caller", "sProduct");
-//                                    }
-//                                } else {
-//                                    //SF类型需求更改,支持联动
-//                                    LogUtil.d("DataFormDetailActivity", "SelectNetAcitivty:" + caller);
-//                                    startActivityForResult(new Intent(ct, SelectNetAcitivty.class)
-//                                                    .putExtra("fieldKey", data.getField())
-//                                                    .putExtra("caller", caller)
-//                                                    .putExtra("isForm", true)//是否是主表
-//                                            , 90);
-//                                    return;//不处理下面旧的处理逻辑
-//                                }
-//                                param.put("page", "1");
-//                                param.put("which", "form");
-//                                param.put("condition", "1=1");
-//                                param.put("pageSize", "30");
-//                                param.put("field", data.getField());
-//                                Bundle bundle = new Bundle();
-//                                bundle.putSerializable("param", param);
-//                                Intent intent = new Intent(ct, SelectActivity.class);
-//                                intent.putExtra("type", 1);
-//                                if (data.getType().equals("SF")) {
-//                                    intent.putExtra("isSingle", true);
-//                                } else {
-//                                    intent.putExtra("isSingle", false);
-//                                }
-//
-//                                intent.putExtra("reid", R.style.OAThemeMeet);
-//                                intent.putExtras(bundle);
-//                                intent.putExtra("key", "combdatas");
-//                                intent.putExtra("showKey", data.getField());
-//                                intent.putExtra("fields", fields);
-//                                intent.putExtra("action", "common/dbfind.action");
-//                                intent.putExtra("title", data.getName());
-//                                intent.putExtra("id", categoryIndex);
-//                                intent.putExtra("object", data);
-//                                startActivityForResult(intent, categoryIndex);
-                                clickGroupId = groupIndex;
+                            if (data.getType().equals("SF")) {
                                 startActivityForResult(new Intent(ct, SelectNetAcitivty.class)
                                                 .putExtra("fieldKey", data.getField())
                                                 .putExtra("caller", caller)
-                                                .putExtra("dataForm", true)
-                                                .putExtra("isForm", true)//是否是主表
+                                                .putExtra("isDevice", true)
+                                                .putExtra("device", data.getName().equals("设备编号"))
+                                                .putExtra("isForm", true)
                                         , 90);
                                 isLeave = true;
+                            } else if (data.getType().equals("MF")) {
+
+                                HashMap param = new HashMap<>();
+                                String[] fields = new String[]{"sa_custname"};
+                                if (caller.equals("StandbyApplication")) {
+                                    fields = new String[]{"sa_custname"};
+                                }
+                                if (caller.equals("MaterielApply")) {
+                                    fields = new String[]{"ama_customer"};
+                                }
+                                param.put("caller", caller);
+                                if (caller.equals("MainTain")) {
+                                    if ("mt_custcode".equals(data.getField())) {
+                                        fields = new String[]{"mt_custname"};
+                                    }
+                                    if ("mt_text1".equals(data.getField())) {
+                                        fields = new String[]{"mt_text2"};
+                                    }
+                                    if ("mt_ckcode".equals(data.getField())) {
+                                        fields = new String[]{"mt_row", "so_custname", "sod_jx", "sod_remark", "sod_unback"};
+                                    }
+                                    if ("mtd_procode".equals(data.getField())) {
+                                        fields = new String[]{"mtd_proname", "mtd_remark", "mtd_unit"};
+                                        param.put("caller", "sProduct");
+                                    }
+
+                                }
+                                param.put("page", "1");
+                                param.put("which", "form");
+                                param.put("condition", "1=1");
+                                param.put("pageSize", "30");
+                                param.put("field", data.getField());
+                                Bundle bundle = new Bundle();
+                                bundle.putSerializable("param", param);
+                                Intent intent = new Intent(ct, SelectActivity.class);
+                                intent.putExtra("type", 1);
+                                if (data.getType().equals("SF")) {
+                                    intent.putExtra("isSingle", true);
+                                } else {
+                                    intent.putExtra("isSingle", false);
+                                }
+
+                                intent.putExtra("reid", R.style.OAThemeMeet);
+                                intent.putExtras(bundle);
+                                intent.putExtra("key", "combdatas");
+                                intent.putExtra("showKey", data.getField());
+                                intent.putExtra("fields", fields);
+                                intent.putExtra("action", "common/dbfind.action");
+                                intent.putExtra("title", data.getName());
+                                intent.putExtra("id", categoryIndex);
+                                intent.putExtra("object", data);
+                                startActivityForResult(intent, categoryIndex);
+
                                 isLeave = true;
                             }
                             //连带操作
@@ -1250,52 +1254,49 @@ public class TravelDataFormDetailActivity extends BaseActivity implements View.O
                                     currentGroupId = data.getGroupId();
                                     startActivityForResult(intent, 0x23);
                                 } else {
-//                                    HashMap param = new HashMap<>();
-//                                    String[] fields = new String[]{"sa_custname"};
-//                                    if (caller.equals("StandbyApplication")) {
-//
-//                                    }
-//                                    if (caller.equals("MaterielApply")) {
-//                                        fields = new String[]{"amad_spec", "amad_sysname", "amad_unit"};
-//                                    }
-//                                    param.put("which", "form");
-//                                    param.put("caller", caller);
-//                                    if (caller.equals("MainTain")) {
-//                                        fields = new String[]{"mtd_proname", "mtd_remark", "mtd_unit"};
-//                                        param.put("caller", "sProduct");
-//                                        param.put("which", "grid");
-//                                    }
-//                                    param.put("page", "1");
-//                                    param.put("condition", "1=1");
-//                                    param.put("pageSize", "3000");
-//                                    param.put("field", data.getField());
-//                                    Bundle bundle = new Bundle();
-//                                    bundle.putSerializable("param", param);
-//                                    Intent intent = new Intent(ct, SelectActivity.class);
-//                                    intent.putExtra("type", 1);
-//                                    intent.putExtra("reid", R.style.OAThemeMeet);
-//                                    intent.putExtras(bundle);
-//                                    intent.putExtra("key", "combdatas");
-//                                    intent.putExtra("showKey", data.getField());
-//                                    intent.putExtra("fields", fields);
-//                                    intent.putExtra("action", "common/dbfind.action");
-//                                    intent.putExtra("title", data.getName());
-//                                    intent.putExtra("id", categoryIndex);
-//                                    intent.putExtra("object", data);
-//                                    startActivityForResult(intent, categoryIndex);
-                                    clickGroupId = groupIndex;
-                                    startActivityForResult(new Intent(ct, SelectNetAcitivty.class)
-                                                    .putExtra("fieldKey", data.getField())
-                                                    .putExtra("caller", caller)
-                                                    .putExtra("dataForm", true)
-                                                    .putExtra("isForm", true)//是否是主表
-                                            , 90);
+                                    HashMap param = new HashMap<>();
+                                    String[] fields = new String[]{"sa_custname"};
+                                    if (caller.equals("StandbyApplication")) {
+
+                                    }
+                                    if (caller.equals("MaterielApply")) {
+                                        fields = new String[]{"amad_spec", "amad_sysname", "amad_unit"};
+                                    }
+                                    param.put("which", "form");
+                                    param.put("caller", caller);
+                                    if (caller.equals("MainTain")) {
+                                        fields = new String[]{"mtd_proname", "mtd_remark", "mtd_unit"};
+                                        param.put("caller", "sProduct");
+                                        param.put("which", "grid");
+                                    }
+                                    param.put("page", "1");
+                                    param.put("condition", "1=1");
+                                    param.put("pageSize", "30");
+                                    param.put("field", data.getField());
+                                    Bundle bundle = new Bundle();
+                                    bundle.putSerializable("param", param);
+                                    Intent intent = new Intent(ct, SelectActivity.class);
+                                    intent.putExtra("type", 1);
+                                    intent.putExtra("reid", R.style.OAThemeMeet);
+                                    intent.putExtras(bundle);
+                                    intent.putExtra("key", "combdatas");
+                                    intent.putExtra("showKey", data.getField());
+                                    intent.putExtra("fields", fields);
+                                    intent.putExtra("action", "common/dbfind.action");
+                                    intent.putExtra("title", data.getName());
+                                    intent.putExtra("id", categoryIndex);
+                                    intent.putExtra("object", data);
+                                    startActivityForResult(intent, categoryIndex);
                                     isLeave = true;
                                 }
+
                             }
+
+
                         }
                     });
 
+
                     editText.addTextChangedListener(new TextWatcher() {
                         private String text = "";
 
@@ -1350,7 +1351,9 @@ public class TravelDataFormDetailActivity extends BaseActivity implements View.O
 
         class ViewModel {
             TextView text;
+            TextView muchInputTv;
             EditText editText;
+            ImageView selectIv;
             LinearLayout ll_moment;
         }
     }

+ 14 - 3
app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/utils/AutoErpSigninUitl.java

@@ -89,7 +89,7 @@ public class AutoErpSigninUitl implements OnHttpResultListener {
      *
      * @param model 签到班次对象
      */
-    public void signinWork(WorkModel model) {
+    public void signinWork(boolean isWork, WorkModel model) {
         if (signWorking) {
             return;
         }
@@ -101,6 +101,7 @@ public class AutoErpSigninUitl implements OnHttpResultListener {
         }
         final Bundle bundle = new Bundle();
         bundle.putParcelable("data", model);
+        bundle.putInt("isWork", isWork ? 1 : 0);
         if (isB2b) {
             signinWork(bundle, "");
         } else {
@@ -429,8 +430,18 @@ public class AutoErpSigninUitl implements OnHttpResultListener {
                         if (saveOk) {
                             Intent intent = new Intent(OAConfig.AUTO_SIGIN_ALART);
                             LocalBroadcastManager.getInstance(MyApplication.getInstance()).sendBroadcast(intent);
-                            PreferenceUtils.putBoolean("hasAutoSign",true);
-                            VoiceUtils.signVoice();
+                            PreferenceUtils.putBoolean("hasAutoSign", true);
+                            int isWork = bundle == null ? -1 : bundle.getInt("isWork", -1);
+                            int rawId=R.raw.voice_sign;
+                            switch (isWork) {
+                                case 0:
+                                    rawId=R.raw.voice_off;
+                                    break;
+                                case 1:
+                                    rawId=R.raw.voice_work;
+                                    break;
+                            }
+                            VoiceUtils.signVoice(rawId);
                         }
                     }
                     loadLog(bundle);

BIN
app_modular/appworks/src/main/res/drawable-hdpi/icon_application_use.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/icon_cycle_count.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/icon_device_match.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/icon_device_query.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/icon_fault_inspection.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/icon_maintenance.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/icon_scan_device.png


BIN
app_modular/appworks/src/main/res/drawable-hdpi/icon_scrap_application.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/icon_application_use.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/icon_cycle_count.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/icon_device_match.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/icon_device_query.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/icon_fault_inspection.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/icon_maintenance.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/icon_scan_device.png


BIN
app_modular/appworks/src/main/res/drawable-xhdpi/icon_scrap_application.png


BIN
app_modular/appworks/src/main/res/drawable-xxhdpi/icon_application_use.png


BIN
app_modular/appworks/src/main/res/drawable-xxhdpi/icon_cycle_count.png


BIN
app_modular/appworks/src/main/res/drawable-xxhdpi/icon_device_match.png


BIN
app_modular/appworks/src/main/res/drawable-xxhdpi/icon_device_query.png


BIN
app_modular/appworks/src/main/res/drawable-xxhdpi/icon_fault_inspection.png


BIN
app_modular/appworks/src/main/res/drawable-xxhdpi/icon_maintenance.png


BIN
app_modular/appworks/src/main/res/drawable-xxhdpi/icon_scan_device.png


BIN
app_modular/appworks/src/main/res/drawable-xxhdpi/icon_scrap_application.png


+ 2 - 1
app_modular/appworks/src/main/res/layout/activity_device_manage.xml

@@ -3,7 +3,8 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@color/base_bg"
+    android:background="#f2f2f2"
+    android:paddingTop="@dimen/padding"
     tools:context="com.uas.appworks.CRM.erp.activity.DeviceManageActivity">
 
     <android.support.v7.widget.RecyclerView

Some files were not shown because too many files changed in this diff