Browse Source

处理测试反馈bug

Bitliker 8 years ago
parent
commit
86102f6c77
20 changed files with 374 additions and 795 deletions
  1. 3 6
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/crm/ClientActivity.java
  2. 2 2
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/OAActivity.java
  3. 8 6
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/message/MucChatActivity.java
  4. 0 324
      WeiChat/src/main/res/layout/act_taskb2b_add.xml
  5. 0 320
      WeiChat/src/main/res/layout/act_taskerp_add.xml
  6. 11 0
      app_core/common/src/main/java/com/common/config/VersionUtil.java
  7. 0 7
      app_core/common/src/main/java/com/core/model/OAConfig.java
  8. 6 0
      app_core/common/src/main/res/drawable/bg_white_hint.xml
  9. 1 2
      app_core/common/src/main/res/layout/activity_business_add.xml
  10. 18 18
      app_modular/appme/src/main/java/com/uas/appme/settings/activity/BaseInfoActivity.java
  11. 1 1
      app_modular/appmessages/build.gradle
  12. 42 13
      app_modular/appmessages/src/main/java/com/modular/appmessages/presenter/ApprovaPresenter.java
  13. 8 8
      app_modular/appmessages/src/main/res/layout/activity_uuhelper.xml
  14. 1 1
      app_modular/appmessages/src/main/res/layout/item_uuhelper_single.xml
  15. 1 0
      app_modular/appworks/build.gradle
  16. 2 2
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/BusinessActivity.java
  17. 264 81
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/BusinessAddActivity.java
  18. 2 2
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/BusinessDetailInfoActivity.java
  19. 1 1
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/TaskAddErpActivity.java
  20. 3 1
      version.gradle

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

@@ -27,12 +27,12 @@ import android.widget.TextView;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.common.config.VersionUtil;
 import com.common.data.DateFormatUtil;
 import com.common.data.StringUtil;
 import com.common.system.DisplayUtil;
 import com.core.app.Constants;
 import com.core.base.BaseActivity;
-import com.core.model.OAConfig;
 import com.core.net.http.ViewUtil;
 import com.core.utils.time.wheel.DatePicker;
 import com.github.mikephil.charting.charts.BarChart;
@@ -71,8 +71,6 @@ import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
-import static com.core.model.OAConfig.canShowCrm2_0;
-
 /**
  * @功能:CRM 功能模块
  * @author:Arisono
@@ -1079,11 +1077,10 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
                     switch (position) {
 
                         case 0:
-                            if (canShowCrm2_0() && !CommonUtil.isBiteman())
+                            if (VersionUtil.canShowCrm2_0() && !CommonUtil.isBiteman())
                                 startActivity(new Intent(ClientActivity.this, AddBusinessActivity.class));
                             else
                                 startActivity(new Intent(ClientActivity.this, BusinessAddActivity.class));
-
                             break;
                         case 1:
                             startActivity(new Intent(ClientActivity.this, CustomerAddActivity.class));
@@ -1215,7 +1212,7 @@ public class ClientActivity extends BaseActivity implements View.OnClickListener
     }
 
     public  Intent getVisitClass(Context ct) {
-        return new Intent(ct, OAConfig.canShowCrm2_0() ? AddVisitReportActivity.class : VisitReportAddActivity.class);
+        return new Intent(ct, VersionUtil.canShowCrm2_0() ? AddVisitReportActivity.class : VisitReportAddActivity.class);
     }
 }
 

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

@@ -28,6 +28,7 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.common.LogUtil;
+import com.common.config.VersionUtil;
 import com.common.data.CalendarUtil;
 import com.common.data.DateFormatUtil;
 import com.common.data.JSONUtil;
@@ -45,7 +46,6 @@ import com.core.app.Constants;
 import com.core.app.MyApplication;
 import com.core.base.BaseActivity;
 import com.core.model.Employees;
-import com.core.model.OAConfig;
 import com.core.net.http.ViewUtil;
 import com.core.net.http.http.OAHttpHelper;
 import com.core.net.http.http.OnHttpResultListener;
@@ -1098,6 +1098,6 @@ public class OAActivity extends BaseActivity implements View.OnClickListener, Wo
     }
 
     public  Intent getVisitClass(Context ct) {
-        return new Intent(ct, OAConfig.canShowCrm2_0() ? AddVisitReportActivity.class : VisitReportAddActivity.class);
+        return new Intent(ct, VersionUtil.canShowCrm2_0() ? AddVisitReportActivity.class : VisitReportAddActivity.class);
     }
 }

+ 8 - 6
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/message/MucChatActivity.java

@@ -223,7 +223,9 @@ public class MucChatActivity extends ActionBackActivity
             mService = ((CoreService.CoreServiceBinder) service).getService();
             if (mService != null && isGroupChat) {
                 Friend friend = FriendDao.getInstance().getFriend(mLoginUserId, mUseId);
-                mService.joinMucChat(mUseId, mLoginNickName, friend.getTimeSend());
+                if (friend != null) {
+                    mService.joinMucChat(mUseId, mLoginNickName, friend.getTimeSend());
+                }
             }
         }
     };
@@ -247,7 +249,7 @@ public class MucChatActivity extends ActionBackActivity
         mChatBottomView = (ChatBottomView) findViewById(R.id.chat_bottom_view);
         mChatBottomView.setChatBottomListener(this);
         mChatBottomView.isMuc(true);
-        if (mFriend!=null){
+        if (mFriend != null) {
             mChatBottomView.roomId(mFriend.getRoomId());
         }
         tv_none.setOnClickListener(new View.OnClickListener() {
@@ -329,7 +331,7 @@ public class MucChatActivity extends ActionBackActivity
             intent.putExtra(AppConstant.EXTRA_USER_ID, mUseId);
             if (mNickName != null && mNickName.length() > 0)
                 intent.putExtra(RoomInfoActivity.ROOM_NAME, mNickName);
-            startActivityForResult(intent,0x11);
+            startActivityForResult(intent, 0x11);
             return true;
         }
         return super.onOptionsItemSelected(item);
@@ -791,7 +793,7 @@ public class MucChatActivity extends ActionBackActivity
 
     @Override
     public void clickCamera() {
-        mNewPhotoUri = CameraUtil.getOutputMediaFileUri(this, MyApplication.getInstance().mLoginUser.getUserId(),CameraUtil.MEDIA_TYPE_IMAGE);
+        mNewPhotoUri = CameraUtil.getOutputMediaFileUri(this, MyApplication.getInstance().mLoginUser.getUserId(), CameraUtil.MEDIA_TYPE_IMAGE);
         CameraUtil.captureImage(this, mNewPhotoUri, REQUEST_CODE_CAPTURE_PHOTO);
         mChatBottomView.reset();
     }
@@ -919,11 +921,11 @@ public class MucChatActivity extends ActionBackActivity
 
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-        if (resultCode==0x9088) {
+        if (resultCode == 0x9088) {
             Intent intent = new Intent();
             setResult(0x11, intent);
             finish();
-        }else if (requestCode == REQUEST_CODE_CAPTURE_PHOTO) {// 拍照返回
+        } else if (requestCode == REQUEST_CODE_CAPTURE_PHOTO) {// 拍照返回
             if (resultCode == RESULT_OK) {
                 if (mNewPhotoUri != null) {
                     sendImage(new File(mNewPhotoUri.getPath()));

+ 0 - 324
WeiChat/src/main/res/layout/act_taskb2b_add.xml

@@ -1,324 +0,0 @@
-<?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="match_parent"
-    android:background="#EBE9E9">
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:background="#EBE9E9"
-        android:orientation="vertical">
-        <RelativeLayout
-            style="@style/form_relative_customer"
-            android:background="@color/white"
-            android:layout_marginBottom="10dp"
-            android:layout_height="50dp">
-
-            <TextView
-                android:id="@+id/tv_title"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
-                android:layout_marginLeft="10dp"
-                android:text="@string/task_title" />
-
-            <EditText
-                android:id="@+id/et_title"
-                style="@style/form_relative_right_text"
-                android:layout_marginLeft="10dp"
-                android:layout_toRightOf="@+id/tv_title"
-                android:background="@null"
-                android:gravity="right|center_vertical"
-                android:hint="@string/common_input" />
-        </RelativeLayout>
-        <RelativeLayout
-            style="@style/form_relative_customer"
-            android:background="@color/white"
-            android:layout_height="30dp">
-            <TextView
-                android:id="@+id/detail"
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent" 
-               android:gravity="bottom"
-                android:layout_marginLeft="10dp"
-                android:text="@string/task_detail"/>
-            <ImageView
-                android:id="@+id/voice_search_iv"
-                android:background="@drawable/btn_yuyin_nor"
-                android:visibility="visible"
-                android:layout_marginRight="20dp"
-                android:layout_alignParentRight="true"
-                android:layout_width="20dp"
-                android:layout_height="20dp"
-                android:layout_marginTop="8dp"
-                />
-            </RelativeLayout>
-        <EditText
-            android:id="@+id/et_task_remark"
-            android:background="@color/white"
-            android:textSize="15sp"
-            android:layout_width="match_parent"
-            android:layout_height="100dp"
-            android:paddingLeft="10dp"
-            android:layout_marginBottom="10dp"
-            android:hint="@string/common_input" />
-        
-        <RelativeLayout
-            style="@style/form_relative_customer"
-            android:background="@color/white"
-            android:layout_height="90dp">
-
-            <TextView
-                android:id="@+id/tv_task_peoples"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
-                android:layout_marginLeft="10dp"
-                android:text="@string/task_executor" />
-
-            <ImageView
-                android:id="@+id/iv_find"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_alignParentRight="true"
-                android:layout_centerVertical="true"
-                android:layout_marginRight="20dp"
-                android:src="@drawable/icon_find_voice" />
-
-        </RelativeLayout>
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="0.5dp"
-            android:layout_marginLeft="5dp"
-            android:layout_marginRight="5dp"
-            android:background="@color/light_grey" />
-        <RelativeLayout
-            style="@style/form_relative_customer"
-            android:background="@color/white"
-            android:layout_height="50dp">
-
-            <TextView
-                android:id="@+id/tv_startime"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
-                android:layout_marginLeft="10dp"
-                android:text="@string/task_starttime" />
-
-            <TextView
-                android:id="@+id/et_startime"
-                style="@style/form_relative_right_text"
-                android:layout_marginLeft="10dp"
-                android:layout_toRightOf="@+id/tv_startime"
-                android:background="@null"
-                android:gravity="right"
-                android:hint="@string/common_select" />
-
-            <include
-                android:id="@+id/ic_voice_center"
-                layout="@layout/include_voice_center_size"
-                android:layout_width="200dp"
-                android:layout_height="200dp"
-                android:layout_centerHorizontal="true"
-                android:layout_centerVertical="true"
-                android:visibility="invisible" />
-
-            <ScrollView
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:layout_alignParentBottom="true"
-                android:layout_centerHorizontal="true"
-                android:scrollbars="none">
-
-                <com.core.widget.view.TagGroup
-                    android:id="@+id/et_task_people"
-                    style="@style/TagGroup"
-                    android:layout_width="wrap_content"
-                    android:layout_height="fill_parent"
-                    android:background="@null" />
-            </ScrollView>
-        </RelativeLayout>
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="0.5dp"
-            android:layout_marginLeft="5dp"
-            android:layout_marginRight="5dp"
-            android:background="@color/light_grey" />
-        <RelativeLayout
-            android:id="@+id/task_startime_rl"
-            style="@style/form_relative_customer"
-            android:background="@color/white"
-            android:layout_height="50dp">
-
-            <TextView
-                android:id="@+id/tv_task_startime"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
-                android:layout_marginLeft="10dp"
-                android:text="@string/task_endtime" />
-
-            <TextView
-                android:id="@+id/et_task_startime"
-                style="@style/form_relative_right_text"
-                android:layout_marginLeft="10dp"
-                android:layout_toRightOf="@+id/tv_task_startime"
-                android:background="@null"
-                android:gravity="right"
-                android:hint="@string/common_select" />
-
-        </RelativeLayout>
-
-       <!-- <View
-            android:layout_width="match_parent"
-            android:layout_height="0.5dp"
-            android:layout_marginLeft="5dp"
-            android:layout_marginRight="5dp"
-            android:background="@color/light_grey" />-->
-        <!-- 语音 -->
-        <LinearLayout
-            android:id="@+id/lay_voice_layout"
-            style="@style/form_relative_customer"
-            android:orientation="horizontal"
-            android:visibility="gone">
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:padding="15dp"
-                android:text="语音" />
-
-            <LinearLayout
-                android:id="@+id/voice_display_voice_layout"
-                android:layout_width="150dip"
-                android:layout_height="wrap_content"
-                android:layout_marginBottom="5dp"
-                android:layout_marginLeft="15dp"
-                android:layout_marginTop="5dp"
-                android:background="@drawable/globle_player_bg"
-                android:gravity="center_vertical"
-                android:orientation="horizontal"
-                android:visibility="visible">
-
-                <ImageView
-                    android:id="@+id/voice_display_voice_play"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:src="@drawable/globle_player_btn_play" />
-
-                <ProgressBar
-                    android:id="@+id/voice_display_voice_progressbar"
-                    style="?android:attr/progressBarStyleHorizontal"
-                    android:layout_width="0dp"
-                    android:layout_height="6dip"
-                    android:layout_margin="8dip"
-                    android:layout_weight="1"
-                    android:max="100"
-                    android:progress="0"
-                    android:progressDrawable="@drawable/globle_player_progress_bar_bg" />
-
-                <TextView
-                    android:id="@+id/voice_display_voice_time"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text=""
-                    android:textColor="#999999"
-                    android:textSize="12sp" />
-
-            </LinearLayout>
-
-            <ImageView
-                android:id="@+id/iv_delete_voice"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center_vertical"
-                android:layout_marginLeft="10dp"
-                android:background="@drawable/iconfont_shanchu" />
-        </LinearLayout>
-        <View
-            android:id="@+id/view_line"
-            android:layout_width="match_parent"
-            android:layout_height="0.5dp"
-            android:layout_marginLeft="5dp"
-            android:layout_marginRight="5dp"
-            android:background="@color/light_grey"
-            android:visibility="gone" />
-        <RelativeLayout
-            android:id="@+id/chaosonren_rl"
-            style="@style/form_relative_customer"
-            android:background="@color/white"
-            android:layout_height="90dp">
-
-            <TextView
-                android:id="@+id/tv_task_chaosong"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
-                android:layout_marginLeft="10dp"
-                android:text="   抄送人" />
-
-            <ScrollView
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:layout_marginBottom="5dp"
-                android:layout_marginLeft="10dp"
-                android:layout_marginTop="5dp"
-                android:layout_toLeftOf="@+id/iv_find_chaosong"
-                android:layout_toRightOf="@+id/tv_task_chaosong"
-                android:scrollbars="none">
-
-                <com.core.widget.view.TagGroup
-                    android:id="@+id/et_task_chaosong"
-                    style="@style/TagGroup"
-                    android:layout_width="wrap_content"
-                    android:layout_height="fill_parent"
-                    android:background="@null" />
-            </ScrollView>
-
-            <ImageView
-                android:id="@+id/iv_find_chaosong"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_alignParentRight="true"
-                android:layout_centerVertical="true"
-                android:layout_marginRight="20dp"
-                android:src="@drawable/icon_find_voice" />
-
-        </RelativeLayout>
-
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="0.5dp"
-            android:layout_marginLeft="5dp"
-            android:layout_marginRight="5dp"
-            android:background="@color/light_grey" />
-
-        <LinearLayout style="@style/form_linear_customer">
-
-            <Button
-                android:id="@+id/bt_task_add"
-                android:layout_width="match_parent"
-                android:layout_height="40dp"
-                android:layout_marginBottom="10dp"
-                android:layout_marginLeft="10dp"
-                android:layout_marginRight="10dp"
-                android:layout_marginTop="10dp"
-                android:background="@drawable/btn_index_selector"
-                android:text="保存"
-                android:textColor="@color/white"
-                android:visibility="gone" />
-        </LinearLayout>
-    </LinearLayout>
-
-    <ImageView
-        android:id="@+id/iv_recode"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentBottom="true"
-        android:layout_centerInParent="true"
-        android:contentDescription="@string/app_name"
-        android:padding="20dp"
-        android:src="@drawable/icon_voice_black"
-        android:visibility="gone" />
-</RelativeLayout>

+ 0 - 320
WeiChat/src/main/res/layout/act_taskerp_add.xml

@@ -1,320 +0,0 @@
-<?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="match_parent"
-    android:background="#EBE9E9">
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:background="#EBE9E9"
-        android:orientation="vertical">
-        <RelativeLayout
-            style="@style/form_relative_customer"
-            android:background="@color/white"
-            android:layout_marginBottom="10dp"
-            android:layout_height="50dp">
-
-            <TextView
-                android:id="@+id/tv_title"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
-                android:layout_marginLeft="10dp"
-                android:text="@string/task_title" />
-
-            <EditText
-                android:id="@+id/et_title"
-                style="@style/form_relative_right_text"
-                android:layout_marginLeft="10dp"
-                android:layout_toRightOf="@+id/tv_title"
-                android:background="@null"
-                android:gravity="right|center_vertical"
-                android:hint="@string/common_input" />
-        </RelativeLayout>
-        <RelativeLayout
-            style="@style/form_relative_customer"
-            android:background="@color/white"
-            android:layout_height="30dp">
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:gravity="bottom"
-                android:layout_marginLeft="10dp"
-                android:text="@string/task_detail"/>
-
-
-            <ImageView
-                android:id="@+id/voice_search_iv"
-                android:background="@drawable/btn_yuyin_nor"
-                android:visibility="visible"
-                android:layout_marginRight="20dp"
-                android:layout_alignParentRight="true"
-                android:layout_width="20dp"
-                android:layout_height="20dp"
-                android:layout_marginTop="8dp"
-                />
-        </RelativeLayout>
-        <EditText
-            android:id="@+id/et_task_detail"
-            android:background="@color/white"
-            android:textSize="15sp"
-            android:layout_width="match_parent"
-            android:layout_height="100dp"
-            android:paddingLeft="10dp"
-            android:layout_marginBottom="10dp"
-            android:hint="@string/common_input" />
-
-        <RelativeLayout
-            style="@style/form_relative_customer"
-            android:background="@color/white"
-            android:layout_height="90dp">
-
-            <TextView
-                android:id="@+id/tv_task_peoples"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
-                android:layout_marginLeft="10dp"
-                android:text="@string/task_executor" />
-
-            <ScrollView
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:layout_marginBottom="5dp"
-                android:layout_marginLeft="10dp"
-                android:layout_marginTop="5dp"
-                android:layout_toLeftOf="@+id/iv_find"
-                android:layout_toRightOf="@+id/tv_task_peoples"
-                android:scrollbars="none">
-
-                <com.core.widget.view.TagGroup
-                    android:id="@+id/et_task_people"
-                    style="@style/TagGroup"
-                    android:layout_width="wrap_content"
-                    android:layout_height="fill_parent"
-                    android:background="@null" />
-            </ScrollView>
-
-            <ImageView
-                android:id="@+id/iv_find"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_alignParentRight="true"
-                android:layout_centerVertical="true"
-                android:layout_marginRight="20dp"
-                android:src="@drawable/icon_find_voice" />
-
-        </RelativeLayout>
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="0.5dp"
-            android:layout_marginLeft="5dp"
-            android:layout_marginRight="5dp"
-            android:background="@color/light_grey" />
-        <RelativeLayout
-            style="@style/form_relative_customer"
-            android:background="@color/white"
-            android:layout_height="50dp">
-
-            <TextView
-                android:id="@+id/tv_startime"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
-                android:layout_marginLeft="10dp"
-                android:text="@string/task_starttime" />
-
-            <TextView
-                android:id="@+id/et_startime"
-                style="@style/form_relative_right_text"
-                android:layout_marginLeft="10dp"
-                android:layout_toRightOf="@+id/tv_startime"
-                android:background="@null"
-                android:gravity="right"
-                android:hint="@string/common_select" />
-        </RelativeLayout>
-        <View
-            android:layout_width="match_parent"
-            android:layout_height="0.5dp"
-            android:layout_marginLeft="5dp"
-            android:layout_marginRight="5dp"
-            android:background="@color/light_grey" />
-        <RelativeLayout
-            android:id="@+id/task_startime_rl"
-            style="@style/form_relative_customer"
-            android:background="@color/white"
-            android:layout_height="50dp">
-
-            <TextView
-                android:id="@+id/tv_task_startime"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
-                android:layout_marginLeft="10dp"
-                android:text="@string/task_endtime" />
-
-            <TextView
-                android:id="@+id/et_endtime"
-                style="@style/form_relative_right_text"
-                android:layout_marginLeft="10dp"
-                android:layout_toRightOf="@+id/tv_task_startime"
-                android:background="@null"
-                android:gravity="right"
-                android:hint="@string/common_select" />
-
-        </RelativeLayout>
-        <!--
-                <View
-                    android:layout_width="match_parent"
-                    android:layout_height="0.5dp"
-                    android:layout_marginLeft="5dp"
-                    android:layout_marginRight="5dp"
-                    android:background="@color/light_grey" />-->
-        <!-- 语音 -->
-        <LinearLayout
-            android:id="@+id/lay_voice_layout"
-            style="@style/form_relative_customer"
-            android:orientation="horizontal"
-            android:visibility="gone">
-
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:padding="15dp"
-                android:text="语音" />
-
-            <LinearLayout
-                android:id="@+id/voice_display_voice_layout"
-                android:layout_width="150dip"
-                android:layout_height="wrap_content"
-                android:layout_marginBottom="5dp"
-                android:layout_marginLeft="15dp"
-                android:layout_marginTop="5dp"
-                android:background="@drawable/globle_player_bg"
-                android:gravity="center_vertical"
-                android:orientation="horizontal"
-                android:visibility="visible">
-
-                <ImageView
-                    android:id="@+id/voice_display_voice_play"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:src="@drawable/globle_player_btn_play" />
-
-                <ProgressBar
-                    android:id="@+id/voice_display_voice_progressbar"
-                    style="?android:attr/progressBarStyleHorizontal"
-                    android:layout_width="0dp"
-                    android:layout_height="6dip"
-                    android:layout_margin="8dip"
-                    android:layout_weight="1"
-                    android:max="100"
-                    android:progress="0"
-                    android:progressDrawable="@drawable/globle_player_progress_bar_bg" />
-
-                <TextView
-                    android:id="@+id/voice_display_voice_time"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:text=""
-                    android:textColor="#999999"
-                    android:textSize="12sp" />
-
-            </LinearLayout>
-
-            <ImageView
-                android:id="@+id/iv_delete_voice"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center_vertical"
-                android:layout_marginLeft="10dp"
-                android:background="@drawable/iconfont_shanchu" />
-        </LinearLayout>
-        <View
-            android:id="@+id/view_line"
-            android:layout_width="match_parent"
-            android:layout_height="0.5dp"
-            android:layout_marginLeft="5dp"
-            android:layout_marginRight="5dp"
-            android:background="@color/light_grey"
-            android:visibility="gone" />
-        <RelativeLayout
-            style="@style/form_relative_customer"
-            android:background="@color/white"
-            android:layout_height="90dp"
-            android:visibility="gone">
-
-            <TextView
-                android:id="@+id/tv_task_chaosong"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_centerVertical="true"
-                android:layout_marginLeft="10dp"
-                android:text="   抄送人" />
-
-            <ScrollView
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
-                android:layout_marginBottom="5dp"
-                android:layout_marginLeft="10dp"
-                android:layout_marginTop="5dp"
-                android:layout_toLeftOf="@+id/iv_find_chaosong"
-                android:layout_toRightOf="@+id/tv_task_chaosong"
-                android:scrollbars="none">
-
-                <com.core.widget.view.TagGroup
-                    android:id="@+id/et_task_chaosong"
-                    style="@style/TagGroup"
-                    android:layout_width="wrap_content"
-                    android:layout_height="fill_parent"
-                    android:background="@null" />
-            </ScrollView>
-
-            <ImageView
-                android:id="@+id/iv_find_chaosong"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_alignParentRight="true"
-                android:layout_centerVertical="true"
-                android:layout_marginRight="20dp"
-                android:src="@drawable/icon_find_voice" />
-
-        </RelativeLayout>
-
-        <!-- <View
-             android:layout_width="match_parent"
-             android:layout_height="0.5dp"
-             android:layout_marginLeft="5dp"
-             android:layout_marginRight="5dp"
-             android:background="@color/light_grey" />-->
-
-        <LinearLayout style="@style/form_linear_customer">
-
-            <Button
-                android:id="@+id/bt_task_add"
-                android:layout_width="match_parent"
-                android:layout_height="40dp"
-                android:layout_marginBottom="10dp"
-                android:layout_marginLeft="10dp"
-                android:layout_marginRight="10dp"
-                android:layout_marginTop="10dp"
-                android:background="@drawable/btn_index_selector"
-                android:text="保存"
-                android:textColor="@color/white"
-                android:visibility="gone" />
-        </LinearLayout>
-    </LinearLayout>
-
-
-    <ImageView
-        android:id="@+id/iv_recode"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentBottom="true"
-        android:layout_centerInParent="true"
-        android:contentDescription="@string/app_name"
-        android:padding="20dp"
-        android:src="@drawable/icon_voice_black"
-        android:visibility="gone" />
-</RelativeLayout>

+ 11 - 0
app_core/common/src/main/java/com/common/config/VersionUtil.java

@@ -1,5 +1,8 @@
 package com.common.config;
 
+import com.core.app.MyApplication;
+import com.core.utils.CommonUtil;
+
 /**
  * Created by Bitliker on 2017/9/14.
  */
@@ -9,4 +12,12 @@ public class VersionUtil {
         return true;
     }
 
+    public static boolean canShowCrm2_0 = false;
+
+    public static boolean canShowCrm2_0() {
+        if (!CommonUtil.getSharedPreferencesBoolean(MyApplication.getInstance(), "erp_login"))
+            return false;
+        if (!BaseConfig.isDebug()) return false;
+        return canShowCrm2_0;
+    }
 }

+ 0 - 7
app_core/common/src/main/java/com/core/model/OAConfig.java

@@ -30,15 +30,8 @@ public class OAConfig {
     public static int nonclass = 90;   //矿工时间
 
     /*是否显示Crm2.0功能*/
-    public static boolean canShowCrm2_0 = true;
     public static boolean canShowRed = false;
 
-    public static boolean canShowCrm2_0() {
-        if (!CommonUtil.getSharedPreferencesBoolean(MyApplication.getInstance(), "erp_login"))
-            return false;
-        if (!BaseConfig.isDebug()) return false;
-        return canShowCrm2_0;
-    }
 
 
 }

+ 6 - 0
app_core/common/src/main/res/drawable/bg_white_hint.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/hintColor" android:state_selected="true"/>
+    <item android:color="@color/hintColor" android:state_pressed="true"/>
+    <item android:color="@color/white" android:state_selected="false"/>
+</selector>

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

@@ -3,8 +3,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     xmlns:whatever="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    tools:context="com.xzjmyk.pm.activity.ui.erp.activity.crm.BusinessAddActivity">
+    android:layout_height="match_parent">
 
     <RelativeLayout
         android:layout_width="match_parent"

+ 18 - 18
app_modular/appme/src/main/java/com/uas/appme/settings/activity/BaseInfoActivity.java

@@ -165,7 +165,7 @@ public class BaseInfoActivity extends BaseActivity implements View.OnClickListen
             mSex = getString(R.string.user_girl);
             //  rbGrid.setChecked(true);
         }
-        tv_birthday.setText(DateFormatUtil.long2Str(mTempData.getBirthday()*1000,DateFormatUtil.YMD));
+        tv_birthday.setText(DateFormatUtil.long2Str(mTempData.getBirthday() * 1000, DateFormatUtil.YMD));
         //查询数据库
         DBManager dbManager = new DBManager();
         String userId = mUser.getUserId();
@@ -234,15 +234,15 @@ public class BaseInfoActivity extends BaseActivity implements View.OnClickListen
     public void onClick(View v) {
         int id = v.getId();
         Intent intent = null;
-        if (id == R.id.my_data_rl){
+        if (id == R.id.my_data_rl) {
             startActivityForResult(new Intent(this, BasicInfoEditActivity.class), 1);
-        }else if (id == R.id.my_friend_rl){
+        } else if (id == R.id.my_friend_rl) {
             startActivity(new Intent(this, CardcastActivity.class));
-        }else if (id == R.id.my_space_rl){
-        }else if (id == R.id.local_video_rl){
+        } else if (id == R.id.my_space_rl) {
+        } else if (id == R.id.local_video_rl) {
             startActivity(new Intent("com.modular.im.LocalVideoActivity"));
 
-        }else if (id == R.id.me_heard){
+        } else if (id == R.id.me_heard) {
             WindowManager windowManager = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
             View headSelectView = View.inflate(BaseInfoActivity.this, R.layout.layout_select_head, null);
 
@@ -286,17 +286,17 @@ public class BaseInfoActivity extends BaseActivity implements View.OnClickListen
                     closePopupWindow();
                 }
             });
-        }else if (id == R.id.me_nickname){
+        } else if (id == R.id.me_nickname) {
             intent = new Intent(BaseInfoActivity.this, UpdateSingleTextActivity.class);
             intent.putExtra("nickname", tv_nickname.getText().toString().trim());
             startActivityForResult(intent, UPDATE_NICKNAME);
-        }else if (id == R.id.me_sex){
+        } else if (id == R.id.me_sex) {
             intent = new Intent(BaseInfoActivity.this, UpdateSexActivity.class);
             intent.putExtra("sex", tv_sex.getText().toString().trim());
             startActivityForResult(intent, UPDATE_SEX);
-        }else if (id == R.id.me_birthday){
+        } else if (id == R.id.me_birthday) {
             showSelectBirthdayDialog();
-        }else if (id == R.id.me_address){
+        } else if (id == R.id.me_address) {
             intent = new Intent(BaseInfoActivity.this, SelectAreaActivity.class);
             intent.putExtra(SelectAreaActivity.EXTRA_AREA_TYPE, Area.AREA_TYPE_PROVINCE);
             intent.putExtra(SelectAreaActivity.EXTRA_AREA_PARENT_ID, Area.AREA_DATA_CHINA_ID);// 直接选择中国,
@@ -350,7 +350,7 @@ public class BaseInfoActivity extends BaseActivity implements View.OnClickListen
     private Uri mNewPhotoUri;
 
     private void takePhoto() {
-        mNewPhotoUri = CameraUtil.getOutputMediaFileUri(this, MyApplication.getInstance().mLoginUser.getUserId(),CameraUtil.MEDIA_TYPE_IMAGE);
+        mNewPhotoUri = CameraUtil.getOutputMediaFileUri(this, MyApplication.getInstance().mLoginUser.getUserId(), CameraUtil.MEDIA_TYPE_IMAGE);
         CameraUtil.captureImage(this, mNewPhotoUri, REQUEST_CODE_CAPTURE_CROP_PHOTO);
     }
 
@@ -366,7 +366,7 @@ public class BaseInfoActivity extends BaseActivity implements View.OnClickListen
             if (resultCode == Activity.RESULT_OK) {
                 if (mNewPhotoUri != null) {
                     Uri o = mNewPhotoUri;
-                    mNewPhotoUri = CameraUtil.getOutputMediaFileUri(this, MyApplication.getInstance().mLoginUser.getUserId(),CameraUtil.MEDIA_TYPE_IMAGE);
+                    mNewPhotoUri = CameraUtil.getOutputMediaFileUri(this, MyApplication.getInstance().mLoginUser.getUserId(), CameraUtil.MEDIA_TYPE_IMAGE);
                     mCurrentFile = new File(mNewPhotoUri.getPath());
                     CameraUtil.cropImage(this, o, mNewPhotoUri, REQUEST_CODE_CROP_PHOTO, 1, 1, 300, 300);
                 } else {
@@ -378,7 +378,7 @@ public class BaseInfoActivity extends BaseActivity implements View.OnClickListen
                 if (data != null && data.getData() != null) {
                     String path = CameraUtil.getImagePathFromUri(this, data.getData());
                     Uri o = Uri.fromFile(new File(path));
-                    mNewPhotoUri = CameraUtil.getOutputMediaFileUri(this,MyApplication.getInstance().mLoginUser.getUserId(), CameraUtil.MEDIA_TYPE_IMAGE);
+                    mNewPhotoUri = CameraUtil.getOutputMediaFileUri(this, MyApplication.getInstance().mLoginUser.getUserId(), CameraUtil.MEDIA_TYPE_IMAGE);
                     mCurrentFile = new File(mNewPhotoUri.getPath());
                     CameraUtil.cropImage(this, o, mNewPhotoUri, REQUEST_CODE_CROP_PHOTO, 1, 1, 300, 300);
                 } else {
@@ -429,9 +429,9 @@ public class BaseInfoActivity extends BaseActivity implements View.OnClickListen
         } else if (requestCode == UPDATE_NICKNAME && data != null) {
             mNickname = data.getStringExtra("newnickname");
             if (!StringUtil.isEmpty(mNickname)) {
-                String name=StringUtil.toHttpString(mNickname);
-                if (StringUtil.isEmpty(name)){
-                    ToastUtil.showToast(ct,R.string.limit_unno_zijie);
+                String name = StringUtil.toHttpString(mNickname);
+                if (StringUtil.isEmpty(name)) {
+                    ToastUtil.showToast(ct, R.string.limit_unno_zijie);
                     return;
                 }
                 tv_nickname.setText(name);
@@ -564,7 +564,8 @@ public class BaseInfoActivity extends BaseActivity implements View.OnClickListen
         }
 
         AsyncHttpClient client = new AsyncHttpClient();
-
+        LogUtil.i("url=" + mConfig.AVATAR_UPLOAD_URL);
+        LogUtil.i("params=" + params.toString());
         client.post(mConfig.AVATAR_UPLOAD_URL, params, new AsyncHttpResponseHandler() {
             @Override
             public void onSuccess(int arg0, Header[] arg1, byte[] arg2) {
@@ -580,7 +581,6 @@ public class BaseInfoActivity extends BaseActivity implements View.OnClickListen
                         success = true;
                     }
                 }
-
                 ProgressDialogUtil.dismiss(mProgressDialog);
                 if (success) {
                     Intent intent = new Intent(UPHEAD);

+ 1 - 1
app_modular/appmessages/build.gradle

@@ -27,5 +27,5 @@ dependencies {
     compile project(':common')
     compile project(':network')
     compile project(':appworks')
-    compile 'com.android.support.constraint:constraint-layout:1.0.2'
+
 }

+ 42 - 13
app_modular/appmessages/src/main/java/com/modular/appmessages/presenter/ApprovaPresenter.java

@@ -557,11 +557,13 @@ public class ApprovaPresenter implements OnHttpResultListener {
             case LOAD_AGREE:
                 if (message.contains("程序错误")) {
                     loadEndProcess();
-                } break;
+                }
+                break;
             case LOAD_TAKE_OVER:  /*提交部分*/
             case LOAD_PROCESS_UPDATE:
             case LOAD_NEXT_STEPOFP_INSTANCE:
-            case LOAD_TAKE_OVER_OTHER: submit = false;
+            case LOAD_TAKE_OVER_OTHER:
+                submit = false;
                 break;
         }
         String errorKey = "exceptionInfo";
@@ -849,14 +851,35 @@ public class ApprovaPresenter implements OnHttpResultListener {
             } else {
                 newValues = values;
             }
-            if (isMain && approval.isDftypeEQ("MF")) {
-                final String fb_attach = newValues;
-                OAHttpHelper.getInstance().post(new Runnable() {
-                    @Override
-                    public void run() {
-                        loadFilePaths(fb_attach);
+            if (approval.isDftypeEQ("MF") || (record.title.contains("公章用印申请流程") && "附件".equals(caption))) {
+                if (isMain) {
+                    final String fb_attach = newValues;
+                    OAHttpHelper.getInstance().post(new Runnable() {
+                        @Override
+                        public void run() {
+                            loadFilePaths(fb_attach);
+                        }
+                    });
+                } else {
+                    LogUtil.i("newValues=" + newValues);
+                    String[] attchs = newValues.split(";");
+                    if (attchs != null && attchs.length > 1) {
+                        String attchName = attchs[0];
+                        String attch = attchs[1];
+                        try {
+                            Approval enclosure = new Approval(Approval.ENCLOSURE);
+                            enclosure.setId(Integer.valueOf(attch));
+                            enclosure.setIdKey(getImageUrl(enclosure.getId()));
+                            enclosure.setCaption(attchName);
+                            List<Approval> enclosureList=new ArrayList<>();
+                            enclosureList.add(enclosure);
+                            addEnclosure(enclosureList);
+                            setData2ListThread();
+                        } catch (ClassCastException e) {
+                            LogUtil.i("e=" + e.getMessage());
+                        }
                     }
-                });
+                }
                 continue;
             }
             //获取Id
@@ -935,6 +958,15 @@ public class ApprovaPresenter implements OnHttpResultListener {
         return approvals;
     }
 
+    private synchronized void addEnclosure(List<Approval> enclosureList) {
+        if (enclosureList != null) {
+            Approval tag = new Approval(Approval.TAG);
+            tag.setCaption("附件");
+            enclosureList.add(0, tag);
+            this.enclosureList.addAll(enclosureList);
+        }
+    }
+
     private List<Approval> handlerHistorySetuptask(JSONObject object) {
         JSONArray nodes = JSONUtil.getJSONArray(object, "nodes");
         List<Approval> nodeApprovals = new ArrayList<>();
@@ -1141,10 +1173,7 @@ public class ApprovaPresenter implements OnHttpResultListener {
                     }
                 }
                 if (!ListUtils.isEmpty(enclosureList)) {
-                    Approval tag = new Approval(Approval.TAG);
-                    tag.setCaption("附件");
-                    enclosureList.add(0, tag);
-                    ApprovaPresenter.this.enclosureList = enclosureList;
+                    addEnclosure(enclosureList);
                     setData2ListThread();
                 }
             }

+ 8 - 8
app_modular/appmessages/src/main/res/layout/activity_uuhelper.xml

@@ -27,9 +27,9 @@
             android:id="@+id/successfulTV"
             style="@style/bottomTextStyle"
             android:layout_weight="4"
-            android:background="@color/white"
+            android:background="@drawable/bg_white_hint"
             android:text="关于优软"
-            android:textColor="@drawable/bg_bule_yellow_text" />
+            android:textColor="@color/text_main" />
 
         <View
             android:layout_width="@dimen/line"
@@ -41,9 +41,9 @@
             android:id="@+id/experienceTV"
             style="@style/bottomTextStyle"
             android:layout_weight="5"
-            android:background="@color/white"
+            android:background="@drawable/bg_white_hint"
             android:text="功能介绍"
-            android:textColor="@drawable/bg_bule_yellow_text" />
+            android:textColor="@color/text_main" />
 
         <View
             android:layout_width="@dimen/line"
@@ -55,17 +55,17 @@
             android:id="@+id/serviceTV"
             style="@style/bottomTextStyle"
             android:layout_weight="4"
-            android:background="@color/white"
+            android:background="@drawable/bg_white_hint"
             android:text="用户反馈"
-            android:textColor="@drawable/bg_bule_yellow_text" />
+            android:textColor="@color/text_main" />
     </LinearLayout>
 
     <android.support.v7.widget.RecyclerView
         android:id="@+id/contentRV"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_above="@id/operationLL"
         android:layout_alignParentTop="true"
-        android:layout_marginBottom="15dp" />
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentStart="true" />
 
 </RelativeLayout>

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

@@ -30,7 +30,7 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:ellipsize="end"
-            android:lines="1"
+            android:maxLines="2"
             android:paddingBottom="5dp"
             android:paddingTop="5dp"
             android:text="titleTV"

+ 1 - 0
app_modular/appworks/build.gradle

@@ -21,4 +21,5 @@ android {
 dependencies {
     //project
     compile project(':common')
+    compile project(':network')
 }

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

@@ -25,12 +25,12 @@ import android.widget.TextView;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.common.config.VersionUtil;
 import com.common.data.CalendarUtil;
 import com.common.data.StringUtil;
 import com.common.system.DisplayUtil;
 import com.core.app.Constants;
 import com.core.base.BaseActivity;
-import com.core.model.OAConfig;
 import com.core.net.http.ViewUtil;
 import com.core.utils.CommonUtil;
 import com.core.widget.view.ListViewInScroller;
@@ -136,7 +136,7 @@ public class BusinessActivity extends BaseActivity implements View.OnClickListen
     @Override
     public void onClick(View v) {
         if (v.getId() ==  R.id.bt_create){
-            if (OAConfig.canShowCrm2_0() && !CommonUtil.isBiteman())
+            if (VersionUtil.canShowCrm2_0() && !CommonUtil.isBiteman())
                 startActivity(new Intent(this, AddBusinessActivity.class));
             else startActivity(new Intent(this, BusinessAddActivity.class));
         }else if (v.getId() == R.id.bt_qiang){

+ 264 - 81
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/BusinessAddActivity.java

@@ -9,12 +9,15 @@ import android.util.Log;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
+import android.widget.Toast;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.andreabaccega.widget.FormEditText;
 import com.common.LogUtil;
 import com.common.data.DateFormatUtil;
+import com.common.data.JSONUtil;
+import com.common.data.ListUtils;
 import com.common.data.StringUtil;
 import com.core.app.Constants;
 import com.core.app.MyApplication;
@@ -22,10 +25,14 @@ import com.core.base.BaseActivity;
 import com.core.model.SelectBean;
 import com.core.net.http.ViewUtil;
 import com.core.utils.CommonUtil;
+import com.core.utils.ToastUtil;
 import com.core.utils.time.wheel.DatePicker;
 import com.core.widget.SingleDialog;
 import com.core.widget.view.Activity.SelectActivity;
-import com.lidroid.xutils.ViewUtils;
+import com.me.network.app.http.HttpClient;
+import com.me.network.app.http.Method;
+import com.me.network.app.http.rx.Result2Listener;
+import com.me.network.app.http.rx.ResultSubscriber;
 import com.uas.appworks.R;
 
 import org.json.JSONException;
@@ -38,6 +45,8 @@ import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 /**
  * @功能:商机添加
@@ -64,8 +73,9 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
     private FormEditText et_company_planmoney;
     private FormEditText et_company_plantime;
     private FormEditText et_company_depart;
-    private FormEditText  et_bc_factory;
-    private FormEditText  et_bc_tel;
+    private FormEditText et_bc_factory;
+    private FormEditText et_bc_tel;
+    private MenuItem saveMenu;
 
     private List<String> lists = new ArrayList<String>();
     private int et_business_enterCode;
@@ -80,6 +90,7 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
     private static final int GET_BC_ID = 6;
     private JSONArray jsons;
     private JSONArray enterArray;
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
@@ -89,6 +100,7 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
         initData();
         initListener();
     }
+
     private Handler mHandler = new Handler() {
         @Override
         public void handleMessage(Message msg) {
@@ -101,12 +113,19 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
                 case Constants.HTTP_SUCCESS_INIT:
                     progressDialog.dismiss();
                     ViewUtil.ToastMessage(activity, getString(R.string.business_add_success));
-                    mHandler.postDelayed(new Runnable() {
-                        @Override
-                        public void run() {
-                            finish();
-                        }
-                    }, 3000);
+                    //保存商机成功
+                    //TODO 2017-09-22 需求修改
+//                    mHandler.postDelayed(new Runnable() {
+//                        @Override
+//                        public void run() {
+//                            finish();
+//                        }
+//                    }, 3000);
+                    //TODO 2017-09-22 需求修改
+//                    if (saveMenu != null) {
+//                        saveMenu.setTitle(R.string.common_submit_button);
+//                    }
+                    submit();
                     break;
                 case LOAD_BUSINESS://商机库
                     progressDialog.dismiss();
@@ -189,9 +208,45 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
                         e.printStackTrace();
                     }
                     break;
+                case 0x14:
+                    String message = msg.getData().getString("result");
+                    if (!StringUtil.isEmpty(message) && JSONUtil.validate(message)) {
+                        com.alibaba.fastjson.JSONObject o = JSON.parseObject(message);
+                        JSONArray assigns = JSONUtil.getJSONArray(o, "assigns");
+                        if (!ListUtils.isEmpty(assigns)) {
+                            o = assigns.getJSONObject(0);
+                            String noid = "";
+                            if (o != null && o.containsKey("JP_NODEID")) {
+                                noid = o.getString("JP_NODEID");
+                            }
+                            JSONArray data = null;
+                            if (o != null && o.containsKey("JP_CANDIDATES")) {
+                                data = o.getJSONArray("JP_CANDIDATES");
+                            }
+                            if (!StringUtil.isEmpty(noid) && data != null && data.size() > 0) {
+                                sendToSelect(noid, data);
+                            } else {
+                                progressDialog.dismiss();
+                                finish();
+                            }
+                        } else {
+                            progressDialog.dismiss();
+                            finish();
+                        }
+                    } else {
+                        progressDialog.dismiss();
+                        finish();
+                    }
+                    break;
+                case 0x15:
+                    progressDialog.dismiss();
+                    finish();
+                    Toast.makeText(MyApplication.getInstance(), R.string.submit_success, Toast.LENGTH_SHORT).show();
+                    break;
             }
         }
     };
+
     private void initIDS() {
         et_business_no = (FormEditText) findViewById(R.id.et_business_no);
         et_business_name = (FormEditText) findViewById(R.id.et_business_name);
@@ -199,18 +254,18 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
         et_business = (FormEditText) findViewById(R.id.et_business);
         et_business_jieDuan = (FormEditText) findViewById(R.id.et_business_jieDuan);
         et_business_enterMan = (FormEditText) findViewById(R.id.et_business_enterMan);
-        et_business_remark  = (FormEditText) findViewById(R.id.et_business_remark);
+        et_business_remark = (FormEditText) findViewById(R.id.et_business_remark);
         et_business_type = (FormEditText) findViewById(R.id.et_business_type);
         et_company_name = (FormEditText) findViewById(R.id.et_company_name);
         et_company_address = (FormEditText) findViewById(R.id.et_company_address);
         et_company_man = (FormEditText) findViewById(R.id.et_company_man);
         et_company_position = (FormEditText) findViewById(R.id.et_company_position);
-        et_company_tele= (FormEditText) findViewById(R.id.et_company_tel);
-        et_company_businesslicense= (FormEditText) findViewById(R.id.et_company_businesslicense);
-        et_company_planmoney= (FormEditText) findViewById(R.id.et_company_planmoney);
+        et_company_tele = (FormEditText) findViewById(R.id.et_company_tel);
+        et_company_businesslicense = (FormEditText) findViewById(R.id.et_company_businesslicense);
+        et_company_planmoney = (FormEditText) findViewById(R.id.et_company_planmoney);
         et_company_plantime = (FormEditText) findViewById(R.id.et_company_plantime);
         et_company_depart = (FormEditText) findViewById(R.id.et_company_depart);
-        et_bc_factory= (FormEditText) findViewById(R.id.et_bc_factory);
+        et_bc_factory = (FormEditText) findViewById(R.id.et_bc_factory);
         et_bc_tel = (FormEditText) findViewById(R.id.et_bt_tel);
     }
 
@@ -259,48 +314,55 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
 
     @Override
     public void onClick(View v) {
-        if (v.getId() == R.id.et_business){
+        if (v.getId() == R.id.et_business) {
             loadBusiness();
-        }else if (v.getId() == R.id.et_business_source){
+        } else if (v.getId() == R.id.et_business_source) {
             loadSource();
-        }else if (v.getId() == R.id.et_business_enterMan){
+        } else if (v.getId() == R.id.et_business_enterMan) {
             loadManGenJin();
-        }else if (v.getId() == R.id.et_business_jieDuan){
+        } else if (v.getId() == R.id.et_business_jieDuan) {
             loadJieDuan();
-        }else if (v.getId() == R.id.et_business_type){
+        } else if (v.getId() == R.id.et_business_type) {
             onPopupButtonClick(v);
-        }else if (v.getId() == R.id.et_company_plantime){
+        } else if (v.getId() == R.id.et_company_plantime) {
             showDateDialog((FormEditText) v.findViewById(R.id.et_company_plantime));
         }
     }
 
+
     @Override
     public boolean onCreateOptionsMenu(Menu menu) {
         getMenuInflater().inflate(R.menu.main_btn_submit, menu);
-        menu.findItem(R.id.btn_save).setTitle(getString(R.string.common_save_button));
+        saveMenu = menu.findItem(R.id.btn_save);
+        saveMenu.setTitle(getString(R.string.common_save_button));
         return true;
     }
 
+
     @Override
     public boolean onOptionsItemSelected(MenuItem item) {
         if (item.getItemId() == R.id.btn_save) {
-            if (et_business_name.testValidity() &&
-                    et_business_source.testValidity() &&
-                    et_business.testValidity() &&
-                    et_business_jieDuan.testValidity() &&
-                    et_company_tele.testValidity() &&
-                    et_company_businesslicense.testValidity() &&
-                    et_company_address.testValidity() &&
-                    et_company_name.testValidity() &&
-                    et_bc_tel.testValidity() &&
-                    et_bc_factory.testValidity()) {
-                sendHttpResquest();
+            if (getString(R.string.common_submit_button).equals(item.getTitle())) {
+                submit();
+            } else {
+                if (et_business_name.testValidity() &&
+                        et_business_source.testValidity() &&
+                        et_business.testValidity() &&
+                        et_business_jieDuan.testValidity() &&
+                        et_company_tele.testValidity() &&
+                        et_company_businesslicense.testValidity() &&
+                        et_company_address.testValidity() &&
+                        et_company_name.testValidity() &&
+                        et_bc_tel.testValidity() &&
+                        et_bc_factory.testValidity()) {
+                    sendHttpResquest();
+                }
             }
-        }else if (item.getItemId() == android.R.id.home) {
+        } else if (item.getItemId() == android.R.id.home) {
             onBackPressed();
         }
-            return true;
-        }
+        return true;
+    }
 
     private String getEditText(FormEditText et) {
         String temp = "";
@@ -309,6 +371,7 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
         return temp;
     }
 
+
     /**
      * @desc:保存商机
      * @author:Arison on 2016/7/20
@@ -336,8 +399,8 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
         String bc_planmoney = getEditText(et_company_planmoney);//预计成交时间
         String bc_depart = getEditText(et_company_depart);//部门
         String bc_linecse = getEditText(et_company_businesslicense);//营业执照
-        String bc_factory=getEditText(et_bc_factory);//工厂地址
-        String bc_tel=getEditText(et_bc_tel);//公司总机
+        String bc_factory = getEditText(et_bc_factory);//工厂地址
+        String bc_tel = getEditText(et_bc_tel);//公司总机
         String enterCode = null;
         if (et_business_enterCode == 0) {//不可编辑  为空
             enterCode = "";
@@ -350,19 +413,25 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
 
         }
         LogUtil.e("commonbcid", mBcId + "");
+        String status = "在录入";
+        String statusCode = "ENTERING";
+//        if ("(贝腾)贝腾科技".equals("公司名称")) {
+//            status = "已提交";
+//            statusCode = "COMMITED";
+//        }
         String formStore =
                 "{\n" +
                         "\"bc_id\":" + mBcId + "," +
-                        "\"bc_position\":\"" + bc_factory+ "\"," +//工厂地址
+                        "\"bc_position\":\"" + bc_factory + "\"," +//工厂地址
                         "\"bc_desc1\":\"" + bc_tel + "\"," +//公司总机
                         "\"bc_date7\":\"" + bc_plantime + "\"," +
                         "\"bc_desc8\":\"" + bc_planmoney + "\"," +
                         "\"bc_desc4\":\"" + bc_depart + "\"," +
                         "\"bc_desc6\":\"" + bc_linecse + "\"," +
                         "\"bc_code\":\"" + et_business_no.getText().toString() + "\"," +   //商机名称
-                        "\"bc_status\":\"" + "已审核" + "\"," +
+                        "\"bc_status\":\"" + status + "\"," +
                         "\"bc_domancode\":\"" + enterCode + "\"," +
-                        "\"bc_statuscode\":\"" + "AUDITED" + "\"," +
+                        "\"bc_statuscode\":\"" + statusCode + "\"," +
                         "\"bc_description\":\"" + name + "\"," +   //商机名称
                         "\"bc_from\":\"" + from + "\"," +          //商机来源
                         "\"bc_nichehouse\":\"" + bc_nichehouse + "\"," +      //商机库
@@ -387,6 +456,104 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
         ViewUtil.httpSendRequest(ct, url, params, mHandler, headers, Constants.HTTP_SUCCESS_INIT, null, null, "post");
     }
 
+    private void submit() {
+        if (mBcId <= 0) return;
+        HttpClient httpClient = new HttpClient.Builder(CommonUtil.getAppBaseUrl(ct)).isDebug(true)
+                .connectTimeout(5000)
+                .readTimeout(5000)
+                .build();
+        httpClient.Api().send(new HttpClient.Builder()
+                .url("crm/chance/submitBusinessChance.action")
+                .add("caller", "BusinessChance")
+                .header("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(MyApplication.getInstance(), "sessionId"))
+                .add("master", CommonUtil.getSharedPreferences(ct, "erp_master"))
+                .add("sessionUser", CommonUtil.getSharedPreferences(ct, "erp_username"))
+                .add("sessionId", CommonUtil.getSharedPreferences(ct, "sessionId"))
+                .add("id", mBcId)
+                .method(Method.POST)
+                .build(), new ResultSubscriber<>(new Result2Listener<Object>() {
+            @Override
+            public void onResponse(Object t) {
+                String message = t.toString();
+                LogUtil.i("message=" + message);
+                judgeApprovers();
+            }
+
+            @Override
+            public void onFailure(Object t) {
+                String message = t.toString();
+                ToastUtil.showToast(ct, message);
+            }
+        }));
+
+    }
+
+    private void judgeApprovers() {
+        progressDialog.show();
+        String url = CommonUtil.getSharedPreferences(ct, "erp_baseurl") + "common/getMultiNodeAssigns.action";
+        Map<String, Object> param = new HashMap<>();
+        param.put("caller", "BusinessChance");
+        param.put("id", mBcId);
+        LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
+        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
+        ViewUtil.httpSendRequest(ct, url, param, mHandler, headers, 0x14, null, null, "post");
+    }
+
+    private String noid;
+
+    private void sendToSelect(String noid, JSONArray data) {
+        this.noid = noid;
+        ArrayList<SelectBean> beans = new ArrayList<>();
+        SelectBean bean = null;
+        for (int i = 0; i < data.size(); i++) {
+            bean = new SelectBean();
+            bean.setName(data.getString(i));
+            bean.setClick(false);
+            beans.add(bean);
+        }
+        Intent intent = new Intent(ct, SelectActivity.class);
+        intent.putExtra("type", 2);
+        intent.putParcelableArrayListExtra("data", beans);
+        intent.putExtra("title", getString(R.string.select_approvel_people));
+        startActivityForResult(intent, 0x25);
+    }
+
+    private void getEmnameByReturn(String text) {
+        if (StringUtil.isEmpty(text)) {
+            finish();
+            return;
+        }
+        Pattern pattern = Pattern.compile("(?<=\\()(.+?)(?=\\))");
+        Matcher matcher = pattern.matcher(text);
+        if (matcher.find()) {
+            String name = matcher.group();
+            if (!StringUtil.isEmpty(name)) {
+                selectApprovers(name);
+            } else {
+                progressDialog.dismiss();
+                finish();
+            }
+        } else {
+            progressDialog.dismiss();
+            finish();
+        }
+    }
+
+    private void selectApprovers(String emName) {
+        progressDialog.show();
+        String url = CommonUtil.getSharedPreferences(ct, "erp_baseurl") + "common/takeOverTask.action";
+        Map<String, Object> param = new HashMap<>();
+        Map<String, Object> params = new HashMap<>();
+        params.put("em_code", emName);
+        params.put("nodeId", noid);
+        param.put("_noc", 1);
+        param.put("params", JSONUtil.map2JSON(params));
+        LinkedHashMap<String, Object> headers = new LinkedHashMap<>();
+        headers.put("Cookie", "JSESSIONID=" + CommonUtil.getSharedPreferences(ct, "sessionId"));
+        ViewUtil.httpSendRequest(ct, url, param, mHandler, headers, 0x15, null, null, "post");
+    }
+
+
     private void getCodeByNet() {
         String url = CommonUtil.getAppBaseUrl(ct) + "common/getCodeString.action";
         final Map<String, Object> param = new HashMap<>();
@@ -543,7 +710,7 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
                     @Override
                     public void onListItemClick(int position, String value) {
                         if (StringUtil.isEmpty(value)) return;
-                        if (et.getId() == R.id.et_business_enterMan){
+                        if (et.getId() == R.id.et_business_enterMan) {
                             et.setText(value);
                             for (int i = 0; i < enterArray.size(); i++) {
                                 if (value.equals(enterArray.getJSONObject(i).getString("BC_DOMAN"))) {
@@ -551,9 +718,9 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
                                     enterManCode = enterArray.getJSONObject(i).getString("EM_CODE");
                                 }
                             }
-                        }else if (et.getId() == R.id.et_business_source){
+                        } else if (et.getId() == R.id.et_business_source) {
                             et.setText(value);
-                        }else if (et.getId() == R.id.et_business){
+                        } else if (et.getId() == R.id.et_business) {
                             et.setText(value);
                             for (int i = 0; i < jsons.size(); i++) {
                                 if (jsons.getJSONObject(i).getString("BD_NAME").equals(value)) {
@@ -575,7 +742,7 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
                                     }
                                 }
                             }
-                        }else {
+                        } else {
                             et.setText(value);
                         }
                     }
@@ -609,7 +776,7 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
 
     public void onPopupButtonClick(View button) {
         popup = new PopupMenu(this, button);
-        if (button.getId() == R.id.et_business_type){
+        if (button.getId() == R.id.et_business_type) {
             getMenuInflater().inflate(R.menu.menu_business_type, popup.getMenu());
         }
         popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@@ -633,47 +800,63 @@ public class BusinessAddActivity extends BaseActivity implements View.OnClickLis
 
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        LogUtil.i("requestCode=" + requestCode);
+
+
         switch (resultCode) {
             case 0x20://单选
-                if (data == null) return;
-                SelectBean b = data.getParcelableExtra("data");
-                LogUtil.d(JSON.toJSONString(b));
-                if (b == null || StringUtil.isEmpty(b.getJson())) return;
-                switch (requestCode) {
-                    case 0x21://来源
-                        et_business_source.setText(b.getName());
-                        break;
-                    case 0x24://商机库
-                        et_business.setText(b.getName());
-
-                        String bd_prop = JSON.parseObject(b.getJson()).getString("BD_PROP");
-                        if (bd_prop.equals(getString(R.string.business_common)) || bd_prop.equals(getString(R.string.business_get_split))) {
-                            //跟进人不可编辑,不可点击
-                            et_business_enterMan.setClickable(false);
-                            et_business_enterMan.setEnabled(false);
-                            et_business_enterMan.setText("");
-                            et_business_enterCode = 0;
-                        } else {
-                            //跟进人可编辑
-                            et_business_enterCode = 1;
-                            et_business_enterMan.setEnabled(true);
-                            et_business_enterMan.setClickable(true);
-                            // jsons.getJSONObject(i).getString("BD_PROP");
-                            // et_business_enterMan.setText(MyApplication.getInstance().mLoginUser.getNickName());
-                        }
-                        break;
-                    case 0x23://跟进入
-                        // enterManCode
-                        enterManCode = JSON.parseObject(b.getJson()).getString("em_code");
-                        et_business_enterMan.setText(b.getName());
-                        break;
-                    case 0x22://当前阶段
-                        et_business_jieDuan.setText(b.getName());
-                        break;
+                SelectBean b = null;
+                if (data != null) {
+                    b = data.getParcelableExtra("data");
+                }
+                if (b == null) {
+                    if (requestCode == 0x25) {
+                        finish();
+                    }
+                } else {
+                    if (StringUtil.isEmpty(b.getJson())) {
+                        b.setJson("{}");
+                    }
+                    LogUtil.d(JSON.toJSONString(b));
+                    switch (requestCode) {
+                        case 0x21://来源
+                            et_business_source.setText(b.getName());
+                            break;
+                        case 0x24://商机库
+                            et_business.setText(b.getName());
+                            String bd_prop = JSON.parseObject(b.getJson()).getString("BD_PROP");
+                            if (bd_prop.equals(getString(R.string.business_common)) || bd_prop.equals(getString(R.string.business_get_split))) {
+                                //跟进人不可编辑,不可点击
+                                et_business_enterMan.setClickable(false);
+                                et_business_enterMan.setEnabled(false);
+                                et_business_enterMan.setText("");
+                                et_business_enterCode = 0;
+                            } else {
+                                //跟进人可编辑
+                                et_business_enterCode = 1;
+                                et_business_enterMan.setEnabled(true);
+                                et_business_enterMan.setClickable(true);
+                            }
+                            break;
+                        case 0x23://跟进入
+                            enterManCode = JSON.parseObject(b.getJson()).getString("em_code");
+                            et_business_enterMan.setText(b.getName());
+                            break;
+                        case 0x22://当前阶段
+                            et_business_jieDuan.setText(b.getName());
+                            break;
+                        case 0x25:
+                            String name = StringUtil.isEmpty(b.getName()) ? "" : b.getName();
+                            getEmnameByReturn(name);
+                            break;
+                    }
                 }
                 break;
+            default:
+                if (requestCode == 0x25) {
+                    finish();
+                }
 
         }
-
     }
 }

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

@@ -33,6 +33,7 @@ import com.baidu.mapapi.model.LatLng;
 import com.baidu.mapapi.search.route.DrivingRouteLine;
 import com.baidu.mapapi.search.route.DrivingRouteResult;
 import com.common.LogUtil;
+import com.common.config.VersionUtil;
 import com.common.data.JSONUtil;
 import com.common.data.ListUtils;
 import com.common.data.StringUtil;
@@ -41,7 +42,6 @@ import com.core.app.Constants;
 import com.core.app.MyApplication;
 import com.core.base.BaseActivity;
 import com.core.model.MissionModel;
-import com.core.model.OAConfig;
 import com.core.model.SelectBean;
 import com.core.net.http.ViewUtil;
 import com.core.net.location.BdLocationHelper;
@@ -179,7 +179,7 @@ public class BusinessDetailInfoActivity extends BaseActivity implements View.OnC
 
     @Override
     public boolean onCreateOptionsMenu(Menu menu) {
-        if (type == 0 && OAConfig.canShowCrm2_0() && !CommonUtil.isBiteman())
+        if (type == 0 && VersionUtil.canShowCrm2_0() && !CommonUtil.isBiteman())
             getMenuInflater().inflate(R.menu.menu_delete_edit, menu);
         return super.onCreateOptionsMenu(menu);
     }

+ 1 - 1
app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/TaskAddErpActivity.java

@@ -102,7 +102,7 @@ public class TaskAddErpActivity extends BaseActivity implements View.OnClickList
                 case 1:
                     title = R.string.oacreat_calender;
                     tv_title.setText("日程标题");
-                    detailsTV.setText("任务详情");
+                    detailsTV.setText("日程详情");
                     break;
                 case 2:
                     title = R.string.create_meet_task;

+ 3 - 1
version.gradle

@@ -42,6 +42,7 @@ ext {
             tagGroupVersion         : '1.4@aar',
             jodatimeVersion         : '2.9.4',
             gifVersion              : '1.2.8',
+            recyclerLib             : 'v1.0',
     ]
 
     deps = [
@@ -86,7 +87,8 @@ ext {
             leakcanary         : 'com.squareup.leakcanary:leakcanary-android:' + depsVersion.leakcanaryVersion,
             leakcanaryNp       : 'com.squareup.leakcanary:leakcanary-android-no-op:' + depsVersion.leakcanaryVersion,
             jodatime           : 'joda-time:joda-time:' + depsVersion.jodatimeVersion,
-            gif                : 'pl.droidsonroids.gif:android-gif-drawable:' + depsVersion.gifVersion
+            gif                : 'pl.droidsonroids.gif:android-gif-drawable:' + depsVersion.gifVersion,
+            recyclerLib        : 'com.gxut.ui:recyclerlibrary:' + depsVersion.recyclerLib,
 
 
     ]