Explorar o código

将首页修改为双MyListView模式

Bitliker %!s(int64=8) %!d(string=hai) anos
pai
achega
c458082e40
Modificáronse 20 ficheiros con 333 adicións e 394 borrados
  1. 1 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/AddContactsActivity.java
  2. 1 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/AddVisitReportActivity.java
  3. 1 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/SelectRemarkActivity.java
  4. 0 154
      app_core/common/src/main/java/com/core/utils/helper/PopupWindowHelper.java
  5. 0 95
      app_core/common/src/main/res/layout/item_select_aim_pop.xml
  6. 0 70
      app_core/common/src/main/res/layout/item_select_alert_pop.xml
  7. 182 0
      app_modular/apputils/src/main/java/com/modular/apputils/utils/PopupWindowHelper.java
  8. BIN=BIN
      app_modular/apputils/src/main/res/drawable-hdpi/icon_mission_select.png
  9. BIN=BIN
      app_modular/apputils/src/main/res/drawable-xhdpi/icon_mission_select.png
  10. BIN=BIN
      app_modular/apputils/src/main/res/drawable-xxhdpi/icon_mission_select.png
  11. 36 22
      app_modular/apputils/src/main/res/layout/item_select_aim_pop.xml
  12. 0 0
      app_modular/apputils/src/main/res/layout/item_select_alert_pop.xml
  13. 1 2
      app_modular/appworks/build.gradle
  14. 1 1
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/AddBusinessActivity.java
  15. 1 1
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/BusinessDetailInfoActivity.java
  16. 55 35
      app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/MissionActivity.java
  17. 1 1
      app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/form/DataFormDetailActivity.java
  18. 5 2
      app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/model/IMission.java
  19. 10 8
      app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/presenter/IMissionPresenter.java
  20. 38 0
      app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/presenter/MissionPresenter.java

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

@@ -30,7 +30,7 @@ import com.core.widget.view.model.SelectAimModel;
 import com.core.utils.ToastUtil;
 import com.core.utils.CommonInterface;
 import com.xzjmyk.pm.activity.util.oa.CommonUtil;
-import com.core.utils.helper.PopupWindowHelper;
+import com.modular.apputils.utils.PopupWindowHelper;
 import com.core.net.http.http.OnHttpResultListener;
 
 import java.io.File;

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

@@ -26,7 +26,7 @@ import com.core.base.OABaseActivity;
 import com.core.utils.RecognizerDialogUtil;
 import com.core.utils.TimeUtils;
 import com.core.utils.ToastUtil;
-import com.core.utils.helper.PopupWindowHelper;
+import com.modular.apputils.utils.PopupWindowHelper;
 import com.core.utils.time.wheel.OASigninPicker;
 import com.core.widget.MyListView;
 import com.core.widget.view.model.SelectAimModel;

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

@@ -27,7 +27,7 @@ import com.xzjmyk.pm.activity.R;
 import com.core.base.BaseActivity;
 import com.core.widget.listener.EditChangeListener;
 import com.core.utils.ToastUtil;
-import com.core.utils.helper.PopupWindowHelper;
+import com.modular.apputils.utils.PopupWindowHelper;
 import com.core.net.http.http.OAHttpHelper;
 import com.core.net.http.http.OnHttpResultListener;
 import com.core.net.http.http.Request;

+ 0 - 154
app_core/common/src/main/java/com/core/utils/helper/PopupWindowHelper.java

@@ -1,154 +0,0 @@
-package com.core.utils.helper;
-
-import android.app.Activity;
-import android.text.Editable;
-import android.text.Selection;
-import android.util.DisplayMetrics;
-import android.view.Gravity;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.widget.EditText;
-import android.widget.PopupWindow;
-import android.widget.TextView;
-
-import com.common.data.StringUtil;
-import com.common.system.DisplayUtil;
-import com.core.app.MyApplication;
-import com.core.app.R;
-import com.core.widget.view.model.SelectAimModel;
-
-/**
- * Created by Bitliker on 2017/5/3.
- */
-
-public class PopupWindowHelper {
-
-
-    public static void showAlart(final Activity ct, String title, String message, final OnSelectListener listener) {
-        final PopupWindow window = new PopupWindow(ct);
-        View view = LayoutInflater.from(ct).inflate(R.layout.item_select_alert_pop, null);
-        window.setContentView(view);
-        window.setBackgroundDrawable(ct.getResources().getDrawable(R.drawable.pop_round_bg));
-        DisplayUtil.backgroundAlpha(ct, 0.4f);
-        window.setTouchable(true);
-        setPopupWindowHW(ct, window);
-        window.setOutsideTouchable(false);
-        window.setFocusable(true);
-        TextView title_tv = (TextView) view.findViewById(R.id.title_tv);
-        TextView message_tv = (TextView) view.findViewById(R.id.message_tv);
-        title_tv.setText(StringUtil.isEmpty(title) ? ct.getString(R.string.common_dialog_title) : title);
-        message_tv.setText(StringUtil.isEmpty(message) ? "" : message);
-        window.setOnDismissListener(new PopupWindow.OnDismissListener() {
-            @Override
-            public void onDismiss() {
-                DisplayUtil.backgroundAlpha(ct, 1f);
-            }
-        });
-        view.findViewById(R.id.goto_tv).setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                if (listener != null)
-                    listener.select(false);
-                window.dismiss();
-            }
-        });
-        view.findViewById(R.id.sure_tv).setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                if (listener != null)
-                    listener.select(true);
-                window.dismiss();
-            }
-        });
-        window.showAtLocation(view, Gravity.CENTER, 0, 0);
-    }
-
-    /*选择地址后回调修改窗口*/
-    public static void create(Activity ct, String title, SelectAimModel model, OnClickListener onClickListener) {
-        PopupWindow window = new PopupWindow(ct);
-        View view = LayoutInflater.from(ct).inflate(R.layout.item_select_aim_pop, null);
-        window.setContentView(view);
-        setPopupWindowHW(ct, window);
-        window.setBackgroundDrawable(ct.getResources().getDrawable(R.drawable.pop_round_bg));
-        DisplayUtil.backgroundAlpha(ct, 0.4f);
-        viewEvent(ct, window, view, title, model, onClickListener);
-        window.setTouchable(true);
-        window.setOutsideTouchable(false);
-        window.setFocusable(true);
-        window.showAtLocation(view, Gravity.CENTER, 0, 0);
-    }
-
-    private static void viewEvent(final Activity ct, final PopupWindow window, View view, String title, final SelectAimModel model, final OnClickListener onClickListener) {
-        TextView title_tv = (TextView) view.findViewById(R.id.title_tv);
-        final EditText company_et = (EditText) view.findViewById(R.id.company_et);
-        TextView address_tv = (TextView) view.findViewById(R.id.address_tv);
-        title = StringUtil.isEmpty(title) ? ct.getString(R.string.perfect_company_name) : title;
-        String company = (model == null || StringUtil.isEmpty(model.getName())) ? "" : model.getName();
-        String address = (model == null || StringUtil.isEmpty(model.getAddress())) ? "" : model.getAddress();
-        title_tv.setText(title);
-        company_et.setText(company);
-        Editable etext = company_et.getText();
-        Selection.setSelection(etext, etext.length());
-        address_tv.setText(MyApplication.getInstance().getString(R.string.detailed_address) + "  " + address);
-        window.setOnDismissListener(new PopupWindow.OnDismissListener() {
-            @Override
-            public void onDismiss() {
-                DisplayUtil.backgroundAlpha(ct, 1f);
-            }
-        });
-        view.findViewById(R.id.goto_tv).setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                setBack(null, model, onClickListener);
-                window.dismiss();
-            }
-        });
-        view.findViewById(R.id.sure_tv).setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                String company = company_et.getText().toString();
-                setBack(company, model, onClickListener);
-                window.dismiss();
-            }
-        });
-
-    }
-
-    private static void setBack(String company, SelectAimModel model, OnClickListener onClickListener) {
-        if (model == null) {
-            model = new SelectAimModel();
-            model.setAddress("");
-        }
-        if (!StringUtil.isEmpty(company))
-            model.setName(company);
-        if (onClickListener != null)
-            onClickListener.result(model);
-    }
-
-    private static int getWidth(Activity ct) {
-        DisplayMetrics dm = new DisplayMetrics();
-        ct.getWindowManager().getDefaultDisplay().getMetrics(dm);
-        return (int) (dm.widthPixels * (0.8));
-    }
-
-    public static void setPopupWindowHW(PopupWindow window) {
-        window.getContentView().measure(0, 0);
-        window.setHeight(window.getContentView().getMeasuredHeight() + 30);
-        window.setWidth(window.getContentView().getMeasuredWidth()+ DisplayUtil.dip2px(MyApplication.getInstance(),10f));
-    }
-
-    public static void setPopupWindowHW(Activity ct, PopupWindow window) {
-        window.getContentView().measure(0, 0);
-        window.setHeight(window.getContentView().getMeasuredHeight() + 30);
-        window.setWidth(getWidth(ct));
-    }
-
-
-    public interface OnClickListener {
-        void result(SelectAimModel model);
-    }
-
-    public interface OnSelectListener {
-        void select(boolean selectOk);
-    }
-}

+ 0 - 95
app_core/common/src/main/res/layout/item_select_aim_pop.xml

@@ -1,95 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:gravity="center_horizontal"
-    android:orientation="vertical"
-    android:paddingLeft="10dp"
-    android:paddingRight="10dp"
-    android:paddingTop="10dp"
-    android:background="@drawable/pop_round_bg">
-
-    <TextView
-        android:id="@+id/title_tv"
-        android:layout_width="match_parent"
-        android:layout_height="20dp"
-        android:gravity="center"
-        android:text="@string/perfect_company_name"
-        android:textColor="@color/text_main"
-        android:textSize="@dimen/text_main" />
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="40dp"
-        android:layout_marginTop="10dp"
-        android:gravity="center"
-        android:orientation="horizontal">
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text=""
-            android:textColor="@color/text_main"
-            android:textSize="@dimen/text_main" />
-
-        <EditText
-            android:id="@+id/company_et"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:background="@null"
-            android:ellipsize="end"
-            android:maxLines="1"
-            android:text="@string/company_name"
-            android:textColor="@color/text_main"
-            android:textSize="@dimen/text_main" />
-    </LinearLayout>
-
-    <TextView
-        android:id="@+id/address_tv"
-        android:layout_width="match_parent"
-        android:layout_height="40dp"
-        android:layout_marginTop="5dp"
-        android:ellipsize="end"
-        android:maxLines="2"
-        android:textColor="@color/text_hine"
-        android:textSize="@dimen/text_hine" />
-
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="2px"
-        android:layout_marginTop="10dp"
-        android:background="@color/item_line" />
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="40dp"
-        android:orientation="horizontal"
-        android:textColor="@color/text_main"
-        android:textSize="@dimen/text_main">
-
-        <TextView
-            android:id="@+id/goto_tv"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:gravity="center"
-            android:text="@string/skip_operation"
-            android:textColor="@color/text_main"
-            android:textSize="@dimen/text_main" />
-
-        <View
-            android:layout_width="2px"
-            android:layout_height="match_parent"
-            android:background="@color/item_line" />
-
-        <TextView
-            android:id="@+id/sure_tv"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:gravity="center"
-            android:text="@string/common_sure"
-            android:textColor="@color/text_main"
-            android:textSize="@dimen/text_main" />
-    </LinearLayout>
-</LinearLayout>

+ 0 - 70
app_core/common/src/main/res/layout/item_select_alert_pop.xml

@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:gravity="center_horizontal"
-    android:orientation="vertical"
-    android:paddingLeft="10dp"
-    android:paddingRight="10dp"
-    android:paddingTop="10dp">
-
-    <TextView
-        android:id="@+id/title_tv"
-        android:layout_width="match_parent"
-        android:layout_height="20dp"
-        android:gravity="center"
-        android:text="@string/common_dialog_title"
-        android:textColor="@color/text_main"
-        android:textSize="@dimen/text_main" />
-
-
-    <TextView
-        android:id="@+id/message_tv"
-        android:layout_width="match_parent"
-        android:layout_height="50dp"
-        android:layout_marginTop="5dp"
-        android:ellipsize="end"
-        android:gravity="center"
-        android:maxLines="2"
-        android:textColor="@color/text_hine"
-        android:textSize="@dimen/text_main" />
-
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="2px"
-        android:layout_marginTop="10dp"
-        android:background="@color/item_line" />
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="40dp"
-        android:orientation="horizontal"
-        android:textColor="@color/text_main"
-        android:textSize="@dimen/text_main">
-
-        <TextView
-            android:id="@+id/goto_tv"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:gravity="center"
-            android:text="@string/common_cancel"
-            android:textColor="@color/text_main"
-            android:textSize="@dimen/text_main" />
-
-        <View
-            android:layout_width="2px"
-            android:layout_height="match_parent"
-            android:background="@color/item_line" />
-
-        <TextView
-            android:id="@+id/sure_tv"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="1"
-            android:gravity="center"
-            android:text="@string/common_sure"
-            android:textColor="@color/text_main"
-            android:textSize="@dimen/text_main" />
-    </LinearLayout>
-</LinearLayout>

+ 182 - 0
app_modular/apputils/src/main/java/com/modular/apputils/utils/PopupWindowHelper.java

@@ -0,0 +1,182 @@
+package com.modular.apputils.utils;
+
+import android.app.Activity;
+import android.text.Editable;
+import android.text.Selection;
+import android.util.DisplayMetrics;
+import android.view.Gravity;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.EditText;
+import android.widget.PopupWindow;
+import android.widget.TextView;
+
+import com.common.data.StringUtil;
+import com.common.system.DisplayUtil;
+import com.core.app.MyApplication;
+import com.core.widget.view.model.SelectAimModel;
+import com.modular.apputils.R;
+
+/**
+ * Created by Bitliker on 2017/5/3.
+ */
+
+public class PopupWindowHelper {
+
+	public static void showAlart(final Activity ct, String title, String message, final OnSelectListener listener) {
+		final PopupWindow window = new PopupWindow(ct);
+		View view = LayoutInflater.from(ct).inflate(R.layout.item_select_alert_pop, null);
+		window.setContentView(view);
+		window.setBackgroundDrawable(ct.getResources().getDrawable(R.drawable.pop_round_bg));
+		DisplayUtil.backgroundAlpha(ct, 0.4f);
+		window.setTouchable(true);
+		setPopupWindowHW(ct, window);
+		window.setOutsideTouchable(false);
+		window.setFocusable(true);
+		TextView title_tv = (TextView) view.findViewById(R.id.title_tv);
+		TextView message_tv = (TextView) view.findViewById(R.id.message_tv);
+		title_tv.setText(StringUtil.isEmpty(title) ? ct.getString(R.string.common_dialog_title) : title);
+		message_tv.setText(StringUtil.isEmpty(message) ? "" : message);
+		window.setOnDismissListener(new PopupWindow.OnDismissListener() {
+			@Override
+			public void onDismiss() {
+				DisplayUtil.backgroundAlpha(ct, 1f);
+			}
+		});
+		view.findViewById(R.id.goto_tv).setOnClickListener(new View.OnClickListener() {
+			@Override
+			public void onClick(View v) {
+				if (listener != null)
+					listener.select(false);
+				window.dismiss();
+			}
+		});
+		view.findViewById(R.id.sure_tv).setOnClickListener(new View.OnClickListener() {
+			@Override
+			public void onClick(View v) {
+				if (listener != null)
+					listener.select(true);
+				window.dismiss();
+			}
+		});
+		window.showAtLocation(view, Gravity.CENTER, 0, 0);
+	}
+
+	/*选择地址后回调修改窗口*/
+	public static void create(Activity ct, String title, SelectAimModel model, OnClickListener onClickListener) {
+		create(ct, title, model, onClickListener, null);
+	}
+
+	public static PopupWindow create(Activity ct, String title, SelectAimModel model, OnClickListener onClickListener, OnFindLikerListener onFindLikerListener) {
+		PopupWindow window = new PopupWindow(ct);
+		View view = LayoutInflater.from(ct).inflate(R.layout.item_select_aim_pop, null);
+		window.setContentView(view);
+		setPopupWindowHW(ct, window);
+		window.setBackgroundDrawable(ct.getResources().getDrawable(R.drawable.pop_round_bg));
+		DisplayUtil.backgroundAlpha(ct, 0.4f);
+		viewEvent(ct, window, view, title, model, onClickListener, onFindLikerListener);
+		window.setTouchable(true);
+		window.setOutsideTouchable(false);
+		window.setFocusable(true);
+		window.showAtLocation(view, Gravity.CENTER, 0, 0);
+		return window;
+	}
+
+	private static void viewEvent(final Activity ct,
+	                              final PopupWindow window,
+	                              View view,
+	                              String title,
+	                              final SelectAimModel model,
+	                              final OnClickListener onClickListener,
+	                              final OnFindLikerListener onFindLikerListener
+	) {
+		TextView title_tv = (TextView) view.findViewById(R.id.title_tv);
+		final EditText company_et = (EditText) view.findViewById(R.id.company_et);
+		TextView address_tv = (TextView) view.findViewById(R.id.address_tv);
+		title = StringUtil.isEmpty(title) ? ct.getString(R.string.perfect_company_name) : title;
+		String company = (model == null || StringUtil.isEmpty(model.getName())) ? "" : model.getName();
+		String address = (model == null || StringUtil.isEmpty(model.getAddress())) ? "" : model.getAddress();
+		title_tv.setText(title);
+		company_et.setText(company);
+		Editable etext = company_et.getText();
+		Selection.setSelection(etext, etext.length());
+		address_tv.setText(MyApplication.getInstance().getString(R.string.detailed_address) + "  " + address);
+		window.setOnDismissListener(new PopupWindow.OnDismissListener() {
+			@Override
+			public void onDismiss() {
+				DisplayUtil.backgroundAlpha(ct, 1f);
+			}
+		});
+		if (onFindLikerListener != null) {
+			view.findViewById(R.id.select_erp).setVisibility(View.VISIBLE);
+			view.findViewById(R.id.select_erp).setOnClickListener(new View.OnClickListener() {
+				@Override
+				public void onClick(View v) {
+					if (onFindLikerListener != null) {
+						onFindLikerListener.click(StringUtil.getTextRexHttp(company_et));
+					}
+				}
+			});
+		} else {
+			view.findViewById(R.id.select_erp).setVisibility(View.GONE);
+		}
+		view.findViewById(R.id.goto_tv).setOnClickListener(new View.OnClickListener() {
+			@Override
+			public void onClick(View v) {
+				setBack(null, model, onClickListener);
+				window.dismiss();
+			}
+		});
+		view.findViewById(R.id.sure_tv).setOnClickListener(new View.OnClickListener() {
+			@Override
+			public void onClick(View v) {
+				String company = company_et.getText().toString();
+				setBack(company, model, onClickListener);
+				window.dismiss();
+			}
+		});
+
+	}
+
+	private static void setBack(String company, SelectAimModel model, OnClickListener onClickListener) {
+		if (model == null) {
+			model = new SelectAimModel();
+			model.setAddress("");
+		}
+		if (!StringUtil.isEmpty(company))
+			model.setName(company);
+		if (onClickListener != null)
+			onClickListener.result(model);
+	}
+
+	private static int getWidth(Activity ct) {
+		DisplayMetrics dm = new DisplayMetrics();
+		ct.getWindowManager().getDefaultDisplay().getMetrics(dm);
+		return (int) (dm.widthPixels * (0.8));
+	}
+
+	public static void setPopupWindowHW(PopupWindow window) {
+		window.getContentView().measure(0, 0);
+		window.setHeight(window.getContentView().getMeasuredHeight() + 30);
+		window.setWidth(window.getContentView().getMeasuredWidth() + DisplayUtil.dip2px(MyApplication.getInstance(), 10f));
+	}
+
+	public static void setPopupWindowHW(Activity ct, PopupWindow window) {
+		window.getContentView().measure(0, 0);
+		window.setHeight(window.getContentView().getMeasuredHeight() + 30);
+		window.setWidth(getWidth(ct));
+	}
+
+
+	public interface OnClickListener {
+		void result(SelectAimModel model);
+	}
+
+	public interface OnSelectListener {
+		void select(boolean selectOk);
+	}
+
+	public interface OnFindLikerListener {
+		void click(String licker);
+	}
+}

BIN=BIN
app_modular/apputils/src/main/res/drawable-hdpi/icon_mission_select.png


BIN=BIN
app_modular/apputils/src/main/res/drawable-xhdpi/icon_mission_select.png


BIN=BIN
app_modular/apputils/src/main/res/drawable-xxhdpi/icon_mission_select.png


+ 36 - 22
WeiChat/src/main/res/layout/item_select_aim_pop.xml → app_modular/apputils/src/main/res/layout/item_select_aim_pop.xml

@@ -1,26 +1,36 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:gravity="center_horizontal"
-    android:orientation="vertical"
-    android:paddingLeft="10dp"
-    android:paddingRight="10dp"
-    android:paddingTop="10dp"
-    android:background="@drawable/pop_round_bg">
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:background="@drawable/pop_round_bg"
+                android:gravity="center_horizontal"
+                android:paddingLeft="10dp"
+                android:paddingRight="10dp"
+                android:paddingTop="10dp">
+
+    <ImageView
+        android:id="@+id/select_erp"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginRight="@dimen/padding"
+        android:padding="@dimen/padding"
+        android:layout_alignParentRight="true"
+        android:src="@drawable/icon_mission_select"/>
 
     <TextView
         android:id="@+id/title_tv"
-        android:layout_width="match_parent"
+        android:layout_width="wrap_content"
         android:layout_height="20dp"
-        android:gravity="center"
+        android:layout_centerHorizontal="true"
         android:text="@string/perfect_company_name"
         android:textColor="@color/text_main"
-        android:textSize="@dimen/text_main" />
+        android:textSize="@dimen/text_main"/>
 
     <LinearLayout
+        android:id="@+id/name_ll"
         android:layout_width="match_parent"
         android:layout_height="40dp"
+        android:layout_below="@id/title_tv"
         android:layout_marginTop="10dp"
         android:gravity="center"
         android:orientation="horizontal">
@@ -28,9 +38,9 @@
         <TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:text=""
+            android:text="@string/company_name"
             android:textColor="@color/text_main"
-            android:textSize="@dimen/text_main" />
+            android:textSize="@dimen/text_main"/>
 
         <EditText
             android:id="@+id/company_et"
@@ -38,31 +48,35 @@
             android:layout_height="wrap_content"
             android:background="@null"
             android:ellipsize="end"
+            android:layout_marginLeft="@dimen/padding"
             android:maxLines="1"
-            android:text="@string/company_name"
             android:textColor="@color/text_main"
-            android:textSize="@dimen/text_main" />
+            android:textSize="@dimen/text_main"/>
     </LinearLayout>
 
     <TextView
         android:id="@+id/address_tv"
         android:layout_width="match_parent"
         android:layout_height="40dp"
+        android:layout_below="@id/name_ll"
         android:layout_marginTop="5dp"
         android:ellipsize="end"
         android:maxLines="2"
         android:textColor="@color/text_hine"
-        android:textSize="@dimen/text_hine" />
+        android:textSize="@dimen/text_hine"/>
 
     <View
+        android:id="@+id/address_line"
         android:layout_width="match_parent"
         android:layout_height="2px"
+        android:layout_below="@id/address_tv"
         android:layout_marginTop="10dp"
-        android:background="@color/item_line" />
+        android:background="@color/item_line"/>
 
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="40dp"
+        android:layout_below="@id/address_line"
         android:orientation="horizontal"
         android:textColor="@color/text_main"
         android:textSize="@dimen/text_main">
@@ -75,12 +89,12 @@
             android:gravity="center"
             android:text="@string/skip_operation"
             android:textColor="@color/text_main"
-            android:textSize="@dimen/text_main" />
+            android:textSize="@dimen/text_main"/>
 
         <View
             android:layout_width="2px"
             android:layout_height="match_parent"
-            android:background="@color/item_line" />
+            android:background="@color/item_line"/>
 
         <TextView
             android:id="@+id/sure_tv"
@@ -90,6 +104,6 @@
             android:gravity="center"
             android:text="@string/common_sure"
             android:textColor="@color/text_main"
-            android:textSize="@dimen/text_main" />
+            android:textSize="@dimen/text_main"/>
     </LinearLayout>
-</LinearLayout>
+</RelativeLayout>

+ 0 - 0
WeiChat/src/main/res/layout/item_select_alert_pop.xml → app_modular/apputils/src/main/res/layout/item_select_alert_pop.xml


+ 1 - 2
app_modular/appworks/build.gradle

@@ -20,6 +20,5 @@ android {
 }
 dependencies {
     //project
-    compile project(':common')
-    compile project(':network')
+    compile project(':apputils')
 }

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

@@ -26,7 +26,6 @@ import com.core.net.http.http.Request;
 import com.core.utils.CommonInterface;
 import com.core.utils.CommonUtil;
 import com.core.utils.ToastUtil;
-import com.core.utils.helper.PopupWindowHelper;
 import com.core.widget.MyListView;
 import com.core.widget.view.Activity.SelectActivity;
 import com.core.widget.view.model.SelectAimModel;
@@ -34,6 +33,7 @@ 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.modular.apputils.utils.PopupWindowHelper;
 import com.uas.appworks.CRM.erp.adapter.AddBusinessAdapter;
 import com.uas.appworks.OA.erp.model.EmployeesModel;
 import com.uas.appworks.R;

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

@@ -50,7 +50,7 @@ import com.core.utils.CommonUtil;
 import com.core.utils.OnGetDrivingRouteResult;
 import com.core.utils.TimeUtils;
 import com.core.utils.ToastUtil;
-import com.core.utils.helper.PopupWindowHelper;
+import com.modular.apputils.utils.PopupWindowHelper;
 import com.core.widget.MyListView;
 import com.core.widget.crouton.Crouton;
 import com.core.widget.crouton.Style;

+ 55 - 35
app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/MissionActivity.java

@@ -6,12 +6,14 @@ import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.os.Bundle;
+import android.os.Parcelable;
 import android.support.v4.content.LocalBroadcastManager;
 import android.support.v7.app.AlertDialog;
 import android.support.v7.widget.RecyclerView;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
+import android.widget.PopupWindow;
 
 import com.afollestad.materialdialogs.MaterialDialog;
 import com.baidu.mapapi.model.LatLng;
@@ -29,13 +31,15 @@ import com.core.app.Constants;
 import com.core.app.MyApplication;
 import com.core.base.OABaseActivity;
 import com.core.model.MissionModel;
+import com.core.model.SelectBean;
 import com.core.utils.BaiduMapUtil;
 import com.core.utils.OnGetDrivingRouteResult;
 import com.core.utils.TimeUtils;
-import com.core.utils.helper.PopupWindowHelper;
 import com.core.utils.time.wheel.DateTimePicker;
+import com.core.widget.view.Activity.SelectActivity;
 import com.core.widget.view.model.SelectAimModel;
 import com.lidroid.xutils.ViewUtils;
+import com.modular.apputils.utils.PopupWindowHelper;
 import com.uas.appworks.OA.erp.adapter.MissionAdapter;
 import com.uas.appworks.OA.erp.model.IMission;
 import com.uas.appworks.OA.erp.presenter.IMissionPresenter;
@@ -43,6 +47,7 @@ import com.uas.appworks.OA.erp.presenter.MissionPresenter;
 import com.uas.appworks.OA.erp.utils.MostLinearLayoutManager;
 import com.uas.appworks.R;
 
+import java.util.ArrayList;
 import java.util.List;
 
 
@@ -50,6 +55,7 @@ import java.util.List;
  * 外勤打卡
  */
 public class MissionActivity extends OABaseActivity implements View.OnClickListener, IMission, MissionAdapter.OnitemClickListener {
+	private final int NUMBER_SELECT = 112;
 	private RecyclerView recycler;
 	public int position;//调转指针
 	private IMissionPresenter presenter;
@@ -116,7 +122,7 @@ public class MissionActivity extends OABaseActivity implements View.OnClickListe
 			intent.putExtra(AppConfig.IS_ADMIN, adminStatus);
 			startActivityForResult(intent, 0x22);
 		} else if (item.getItemId() == R.id.sign) {
-			if (adapter!=null){
+			if (adapter != null) {
 				presenter.sign(adapter.getModels());
 			}
 		}
@@ -188,6 +194,15 @@ public class MissionActivity extends OABaseActivity implements View.OnClickListe
 		}
 	}
 
+	@Override
+	public void showFinds(List<SelectBean> models) {
+		Intent intent = new Intent(this, SelectActivity.class)
+				.putExtra("type", 2)
+				.putExtra("title", getString(R.string.select_location))
+				.putParcelableArrayListExtra("data", (ArrayList<? extends Parcelable>) models);
+		startActivityForResult(intent, NUMBER_SELECT);
+	}
+
 	@Override
 	public void changModelStatus(int status, int postion) {
 		if (ListUtils.isEmpty(adapter.getModels()) || adapter.getModels().size() <= postion) return;
@@ -287,7 +302,7 @@ public class MissionActivity extends OABaseActivity implements View.OnClickListe
 
 	@Override
 	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-		if (resultCode != 0x20 || data == null) return;
+		if (data == null) return;
 		try {
 			onResult(requestCode, resultCode, data);
 		} catch (Exception e) {
@@ -295,45 +310,28 @@ public class MissionActivity extends OABaseActivity implements View.OnClickListe
 		}
 	}
 
+	private SelectAimModel chcheAimModel = null;
+	private PopupWindow popupWindow = null;
+
 	private void onResult(int requestCode, int resultCode, Intent data) throws Exception {
 		if (requestCode == 0x20) {//选择公司
-			SelectAimModel entity = data.getParcelableExtra("data");
-			PopupWindowHelper.create(this, getString(R.string.perfect_company_name), entity, new PopupWindowHelper.OnClickListener() {
+			chcheAimModel = data.getParcelableExtra("data");
+			if (popupWindow != null) {
+				popupWindow.dismiss();
+				popupWindow = null;
+			}
+			popupWindow = PopupWindowHelper.create(this, getString(R.string.perfect_company_name), chcheAimModel, new PopupWindowHelper.OnClickListener() {
 				@Override
 				public void result(SelectAimModel model) {
 					sureSelectAim(model);
 				}
+			}, new PopupWindowHelper.OnFindLikerListener() {
+				@Override
+				public void click(String licker) {
+					presenter.finder(licker);
+				}
 			});
-		}
-// else if (requestCode == 0x21) {//选择地址
-//            PoiInfo info = data.getParcelableExtra("resultName");
-//            if (info == null) {
-//                return;
-//            } else {
-//                String distance = getInstence().getDistance(info.location);
-//                if (StringUtil.isEmpty(distance)) return;
-//                if (ListUtils.isEmpty(adapter.getModels()) || adapter.getModels().size() <= position)
-//                    return;
-//                if (StringUtil.isEmpty(adapter.getModels().get(position).getCompanyName())) {
-//                    adapter.getModels().get(position).setCompanyName(info.name);
-//                }
-//                adapter.getModels().get(position).setCompanyName(info.name);
-//                adapter.getModels().get(position).setCompanyAddr(info.address);
-//                adapter.getModels().get(position).setLatLng(info.location);
-//                adapter.getModels().get(position).setDistance(getInstence().distance(adapter.getModels().get(position).getLatLng()
-//                        , new LatLng(MyApplication.getInstance().getBdLocationHelper().getLatitude(),
-//                                MyApplication.getInstance().getBdLocationHelper().getLongitude())));
-//                adapter.notifyItemChanged(position);
-//                if (!StringUtil.isEmpty(adapter.getModels().get(position).getCompanyName()))
-//                    try {
-//                        setEndTime(info.location, Double.valueOf(getInstence().getDistance(info.location)));
-//                    } catch (ClassCastException e) {
-//
-//                    } catch (Exception e) {
-//                    }
-//            }
-//        }
-		else if (0x22 == requestCode) {//外勤设置
+		} else if (0x22 == requestCode) {//外勤设置
 			boolean isAuto = data.getBooleanExtra("isAuto", true);
 			if (!isAuto && !(ApiUtils.getApiModel() instanceof ApiPlatform)) {
 				if (flag == 1) {
@@ -352,6 +350,27 @@ public class MissionActivity extends OABaseActivity implements View.OnClickListe
 			String remark = StringUtil.isEmpty(message) ? getResources().getString(R.string.maintain_customers) : message;
 			adapter.getModels().get(position).setRemark(remark);
 			adapter.notifyItemChanged(position);
+		} else if (NUMBER_SELECT == requestCode) {
+			SelectBean bean = data.getParcelableExtra("data");
+			if (chcheAimModel != null && bean != null) {
+				chcheAimModel.setName(bean.getName());
+				if (popupWindow != null) {
+					popupWindow.dismiss();
+					popupWindow = null;
+				}
+				popupWindow = PopupWindowHelper.create(this, getString(R.string.perfect_company_name), chcheAimModel, new PopupWindowHelper.OnClickListener() {
+					@Override
+					public void result(SelectAimModel model) {
+						sureSelectAim(model);
+					}
+				}, new PopupWindowHelper.OnFindLikerListener() {
+					@Override
+					public void click(String licker) {
+						presenter.finder(licker);
+					}
+				});
+			}
+
 		}
 	}
 
@@ -374,6 +393,7 @@ public class MissionActivity extends OABaseActivity implements View.OnClickListe
 			try {
 				float dis = Float.valueOf(BaiduMapUtil.getInstence().getDistance(entity.getLatLng()));
 				setEndTime(entity.getLatLng(), dis);
+				chcheAimModel = null;
 			} catch (ClassCastException e) {
 				if (e != null)
 					LogUtil.i("ClassCastException " + e.getMessage());

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

@@ -43,7 +43,7 @@ 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.helper.PopupWindowHelper;
+import com.modular.apputils.utils.PopupWindowHelper;
 import com.core.utils.time.wheel.DateTimePicker;
 import com.core.widget.view.Activity.SelectActivity;
 import com.core.widget.view.ListViewInScroller;

+ 5 - 2
app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/model/IMission.java

@@ -2,6 +2,7 @@ package com.uas.appworks.OA.erp.model;
 
 import com.core.base.HttpImp;
 import com.core.model.MissionModel;
+import com.core.model.SelectBean;
 
 import java.util.List;
 
@@ -11,8 +12,10 @@ import java.util.List;
 
 public interface IMission extends HttpImp {
 
-    void showModels(List<MissionModel> models);
+	void showModels(List<MissionModel> models);
 
-    void changModelStatus(int status, int postion);
+	void showFinds(List<SelectBean> models);
+
+	void changModelStatus(int status, int postion);
 
 }

+ 10 - 8
app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/presenter/IMissionPresenter.java

@@ -11,18 +11,20 @@ import java.util.List;
  */
 
 public interface IMissionPresenter {
-    /**
-     * 1.从网络下拉数据
-     * 2.将数据保存到数据库
-     * 3.从数据库取出数据
-     */
+	/**
+	 * 1.从网络下拉数据
+	 * 2.将数据保存到数据库
+	 * 3.从数据库取出数据
+	 */
 
-    void start(Intent intent);//1.从网上下拉数据   保存数据
+	void start(Intent intent);//1.从网上下拉数据   保存数据
 
 
-    void submit(List<MissionModel> models);
+	void submit(List<MissionModel> models);
 
-    void sign(List<MissionModel> models);
+	void sign(List<MissionModel> models);
+
+	void finder(String licker);
 
 
 }

+ 38 - 0
app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/presenter/MissionPresenter.java

@@ -21,6 +21,7 @@ import com.core.app.AppConstant;
 import com.core.app.MyApplication;
 import com.core.broadcast.MsgBroadcast;
 import com.core.model.MissionModel;
+import com.core.model.SelectBean;
 import com.core.net.http.http.OAHttpHelper;
 import com.core.net.http.http.OnHttpResultListener;
 import com.core.net.http.http.Request;
@@ -50,6 +51,7 @@ public class MissionPresenter implements IMissionPresenter, OnHttpResultListener
 	private final int SAVE_PLAN = 0x12;
 	private final int SAVE_ADDRESS = 0x13;
 	private final int SIGNIN_MISSION = 0x17;
+	private final int FIND_LIKER = 0x18;
 	private IMission iMission;
 	private boolean isB2b;
 	private MissionModel modelIntent;
@@ -127,6 +129,25 @@ public class MissionPresenter implements IMissionPresenter, OnHttpResultListener
 		}
 	}
 
+	@Override
+	public void finder(String licker) {
+		if (StringUtil.isEmpty(licker)) return;
+		iMission.showLoading();
+		Map<String, Object> param = new HashMap<>();
+		param.put("likestr", licker);
+		param.put("page", 1);
+		param.put("pageSize", 100);
+		Bundle bundle = new Bundle();
+		Request request = new Request.Bulider()
+				.setUrl("mobile/crm/searchCustomer.action")
+				.setWhat(FIND_LIKER)
+				.setParam(param)
+				.setBundle(bundle)
+				.setMode(Request.Mode.GET)
+				.bulid();
+		OAHttpHelper.getInstance().requestHttp(request, this);
+	}
+
 
 	/**
 	 * 保存拜访计划
@@ -512,6 +533,23 @@ public class MissionPresenter implements IMissionPresenter, OnHttpResultListener
 							iMission.showToast("手动签到成功", R.color.load_error);
 							loadMissionPlan();
 						}
+						break;
+					case FIND_LIKER:
+						if (isJSON) {
+							JSONArray datas = JSONUtil.getJSONArray(object, "datas");
+							if (!ListUtils.isEmpty(datas)) {
+								List<SelectBean> models = new ArrayList<>();
+								for (int i = 0; i < datas.size(); i++) {
+									if (!StringUtil.isEmpty(datas.getString(i))) {
+										models.add(new SelectBean(datas.getString(i)));
+									}
+								}
+								if (!ListUtils.isEmpty(models)) {
+									iMission.showFinds(models);
+								}
+							}
+						}
+
 						break;
 				}
 			}