瀏覽代碼

提交类型 新功能修改
提交内容 修改待办工作界面

Bitliker 7 年之前
父節點
當前提交
3b8f7c7646
共有 51 個文件被更改,包括 632 次插入1076 次删除
  1. 19 16
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/MainActivity.java
  2. 13 16
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/OAActivity.java
  3. 7 11
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/me/MeFragment.java
  4. 二進制
      WeiChat/src/main/res/drawable-hdpi/daibangongzuo.png
  5. 二進制
      WeiChat/src/main/res/drawable-hdpi/home_image_01_u.png
  6. 二進制
      WeiChat/src/main/res/drawable-hdpi/icon_yuyue3.png
  7. 二進制
      WeiChat/src/main/res/drawable-hdpi/tingyue.png
  8. 二進制
      WeiChat/src/main/res/drawable-hdpi/uuu.png
  9. 二進制
      WeiChat/src/main/res/drawable-xhdpi/daibangongzuo.png
  10. 二進制
      WeiChat/src/main/res/drawable-xhdpi/home_image_01_u.png
  11. 二進制
      WeiChat/src/main/res/drawable-xhdpi/icon_me_nor.png
  12. 二進制
      WeiChat/src/main/res/drawable-xhdpi/icon_yuyue3.png
  13. 二進制
      WeiChat/src/main/res/drawable-xhdpi/tingyue.png
  14. 二進制
      WeiChat/src/main/res/drawable-xhdpi/uuu.png
  15. 二進制
      WeiChat/src/main/res/drawable-xxhdpi/daibangongzuo.png
  16. 二進制
      WeiChat/src/main/res/drawable-xxhdpi/home_image_01_u.png
  17. 二進制
      WeiChat/src/main/res/drawable-xxhdpi/icon_yuyue3.png
  18. 二進制
      WeiChat/src/main/res/drawable-xxhdpi/tingyue.png
  19. 二進制
      WeiChat/src/main/res/drawable-xxhdpi/uuu.png
  20. 4 22
      WeiChat/src/main/res/layout/fragment_new_message.xml
  21. 6 6
      WeiChat/src/main/res/layout/item_message.xml
  22. 1 1
      WeiChat/src/main/res/values/colors.xml
  23. 3 3
      WeiChat/version.properties
  24. 23 0
      app_core/common/src/main/res/drawable/bg_transparent_bule.xml
  25. 6 0
      app_core/common/src/main/res/drawable/text_bule_white_bg.xml
  26. 10 9
      app_core/common/src/main/res/layout/activity_approval.xml
  27. 1 1
      app_core/common/src/main/res/layout/item_message.xml
  28. 2 2
      app_core/common/src/main/res/layout/listitem_businessless_edit.xml
  29. 1 1
      app_modular/appcontact/src/main/java/com/uas/appcontact/ui/fragment/ContactsFragment.java
  30. 24 14
      app_modular/appmessages/src/main/java/com/modular/appmessages/fragment/ApprovalListFragment.java
  31. 4 0
      app_modular/appmessages/src/main/java/com/modular/appmessages/fragment/ViewPagerLazyFragment.java
  32. 0 11
      app_modular/appmessages/src/main/java/com/modular/appmessages/presenter/MessagePresenter.java
  33. 18 4
      app_modular/appmessages/src/main/java/com/modular/appmessages/widget/SignRefreshLayout.java
  34. 二進制
      app_modular/appmessages/src/main/res/drawable-hdpi/ic_sign_voice.png
  35. 二進制
      app_modular/appmessages/src/main/res/drawable-hdpi/ic_sign_voice_no.png
  36. 二進制
      app_modular/appmessages/src/main/res/drawable-xhdpi/ic_sign_voice.png
  37. 二進制
      app_modular/appmessages/src/main/res/drawable-xhdpi/ic_sign_voice_no.png
  38. 二進制
      app_modular/appmessages/src/main/res/drawable-xxhdpi/ic_sign_voice.png
  39. 二進制
      app_modular/appmessages/src/main/res/drawable-xxhdpi/ic_sign_voice_no.png
  40. 0 1
      app_modular/appmessages/src/main/res/layout/item_message_header.xml
  41. 1 3
      app_modular/apptasks/src/main/java/com/modular/apptasks/presenter/AutoPresenter.java
  42. 1 3
      app_modular/apputils/src/main/java/com/modular/apputils/utils/SignUtils.java
  43. 14 15
      app_modular/apputils/src/main/java/com/modular/apputils/utils/VoiceUtils.java
  44. 二進制
      app_modular/apputils/src/main/res/raw/rec.mp3
  45. 二進制
      app_modular/apputils/src/main/res/raw/voice_off.mp3
  46. 二進制
      app_modular/apputils/src/main/res/raw/voice_sign.mp3
  47. 二進制
      app_modular/apputils/src/main/res/raw/voice_work.mp3
  48. 313 805
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceDataFormAddActivity.java
  49. 33 18
      app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/form/DataFormDetailActivity.java
  50. 114 111
      app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/form/TravelDataFormDetailActivity.java
  51. 14 3
      app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/utils/AutoErpSigninUitl.java

+ 19 - 16
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, 0.5f, 1.0f,
-                    Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
-            LinearInterpolator lin = new LinearInterpolator();
-            rotate.setInterpolator(lin);
-            rotate.setDuration(300);//设置动画持续时间
-//            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));
     }
 
     /**

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

@@ -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,8 +95,6 @@ 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.
@@ -371,7 +368,7 @@ public class OAActivity extends SupportToolBarActivity implements View.OnClickLi
                         intent.putExtra("data", object.toString());
                         startActivityForResult(intent, isMe ? 0x20 : 0x21);
                     } else {
-                        makeText(ct, getString(R.string.outplan_undone));
+                        showToast(  getString(R.string.outplan_undone));
                     }
                 }
             }
@@ -545,7 +542,7 @@ public class OAActivity extends SupportToolBarActivity implements View.OnClickLi
         loginNum++;
         if (loginNum > 1) return;
         ViewUtil.ct = ct;
-        ViewUtil.LoginERPTask(ct, handler, 0x16);
+        ViewUtil.LoginERPTask(ct, ViewUtil.handler, 0x16);
     }
 
     /*获取索凌菜单接口*/
@@ -727,7 +724,7 @@ public class OAActivity extends SupportToolBarActivity implements View.OnClickLi
             lastTime = System.currentTimeMillis();
             if (!StringUtil.isEmpty(workDailyAdd) && "WorkDailyAdd".equals(workDailyAdd)) {
             } else {
-                Crouton.showToast(ct, error, R.color.load_warning);
+             showToast(error);
             }
         }
 
@@ -749,9 +746,9 @@ public class OAActivity extends SupportToolBarActivity implements View.OnClickLi
             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;
@@ -881,16 +878,16 @@ public class OAActivity extends SupportToolBarActivity implements View.OnClickLi
             }
             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();
@@ -959,7 +956,7 @@ public class OAActivity extends SupportToolBarActivity implements View.OnClickLi
                     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(  "支付失败");
     }
 }

二進制
WeiChat/src/main/res/drawable-hdpi/daibangongzuo.png


二進制
WeiChat/src/main/res/drawable-hdpi/home_image_01_u.png


二進制
WeiChat/src/main/res/drawable-hdpi/icon_yuyue3.png


二進制
WeiChat/src/main/res/drawable-hdpi/tingyue.png


二進制
WeiChat/src/main/res/drawable-hdpi/uuu.png


二進制
WeiChat/src/main/res/drawable-xhdpi/daibangongzuo.png


二進制
WeiChat/src/main/res/drawable-xhdpi/home_image_01_u.png


二進制
WeiChat/src/main/res/drawable-xhdpi/icon_me_nor.png


二進制
WeiChat/src/main/res/drawable-xhdpi/icon_yuyue3.png


二進制
WeiChat/src/main/res/drawable-xhdpi/tingyue.png


二進制
WeiChat/src/main/res/drawable-xhdpi/uuu.png


二進制
WeiChat/src/main/res/drawable-xxhdpi/daibangongzuo.png


二進制
WeiChat/src/main/res/drawable-xxhdpi/home_image_01_u.png


二進制
WeiChat/src/main/res/drawable-xxhdpi/icon_yuyue3.png


二進制
WeiChat/src/main/res/drawable-xxhdpi/tingyue.png


二進制
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>

+ 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>

+ 3 - 3
WeiChat/version.properties

@@ -1,5 +1,5 @@
-#Fri May 11 18:03:13 CST 2018
+#Mon May 14 08:58:28 CST 2018
 debugName=164
-versionName=639
+versionName=640
 debugCode=164
-versionCode=179
+versionCode=180

+ 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"

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

@@ -8,6 +8,7 @@
         android:id="@+id/ll_moment"
         style="@style/LinearLayout_horizontal"
         android:layout_height="wrap_content"
+        android:paddingRight="@dimen/padding"
         android:background="@color/white"
         android:maxHeight="180dp"
         android:minHeight="50dp">
@@ -48,7 +49,6 @@
             android:maxHeight="150dp"
             android:maxWidth="260dp"
             android:minWidth="240dp"
-            android:padding="5dp"
             android:textSize="14sp" />
 
         <ImageView
@@ -56,7 +56,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center"
-            android:layout_marginRight="10dp"
+            android:layout_marginLeft="@dimen/paddingMin"
             android:src="@drawable/oa_next"
             android:visibility="gone" />
     </LinearLayout>

+ 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

+ 24 - 14
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,13 +43,12 @@ 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;
     }
@@ -54,7 +56,7 @@ public class ApprovalListFragment extends ViewPagerLazyFragment implements OnSma
     @Override
     public void onResume() {
         super.onResume();
-        if (tabItem==1){
+        if (tabItem == 1) {
             loadData();
         }
     }
@@ -76,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);
+            }
         }
+
     }
 
 
@@ -110,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();
@@ -165,8 +177,6 @@ public class ApprovalListFragment extends ViewPagerLazyFragment implements OnSma
     }
 
 
-
-
     @Override
     public void onFailure(int what, String message, Tags tag) throws Exception {
         progressDialog.dismiss();
@@ -178,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"));
@@ -267,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();
         }
@@ -281,7 +291,7 @@ public class ApprovalListFragment extends ViewPagerLazyFragment implements OnSma
             Collections.sort(approvalLists, mComparator);
         }
         if (mApprovalListAdapter == null) {
-            mApprovalListAdapter = new ApprovalListAdapter(getContext(),tabItem, approvalLists, mOnItemClickListener);
+            mApprovalListAdapter = new ApprovalListAdapter(getContext(), tabItem, approvalLists, mOnItemClickListener);
             mRecyclerView.setAdapter(mApprovalListAdapter);
         } else {
             if (page == 1) {

+ 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;
     }
 

二進制
app_modular/appmessages/src/main/res/drawable-hdpi/ic_sign_voice.png


二進制
app_modular/appmessages/src/main/res/drawable-hdpi/ic_sign_voice_no.png


二進制
app_modular/appmessages/src/main/res/drawable-xhdpi/ic_sign_voice.png


二進制
app_modular/appmessages/src/main/res/drawable-xhdpi/ic_sign_voice_no.png


二進制
app_modular/appmessages/src/main/res/drawable-xxhdpi/ic_sign_voice.png


二進制
app_modular/appmessages/src/main/res/drawable-xxhdpi/ic_sign_voice_no.png


+ 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"

+ 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() {

+ 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);
     }
 }

二進制
app_modular/apputils/src/main/res/raw/rec.mp3


二進制
app_modular/apputils/src/main/res/raw/voice_off.mp3


二進制
app_modular/apputils/src/main/res/raw/voice_sign.mp3


二進制
app_modular/apputils/src/main/res/raw/voice_work.mp3


文件差異過大導致無法顯示
+ 313 - 805
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceDataFormAddActivity.java


+ 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);

部分文件因文件數量過多而無法顯示