Просмотр исходного кода

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

FANGLH 8 лет назад
Родитель
Сommit
23d51bf949
27 измененных файлов с 415 добавлено и 407 удалено
  1. 1 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/MainActivity.java
  2. 1 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/AddContactsActivity.java
  3. 1 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/AddVisitReportActivity.java
  4. 1 1
      WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/oa/SelectRemarkActivity.java
  5. 0 154
      app_core/common/src/main/java/com/core/utils/helper/PopupWindowHelper.java
  6. 4 0
      app_core/common/src/main/java/com/core/widget/view/selectcalendar/SelectCalendarActivity.java
  7. 0 95
      app_core/common/src/main/res/layout/item_select_aim_pop.xml
  8. 0 70
      app_core/common/src/main/res/layout/item_select_alert_pop.xml
  9. 38 6
      app_modular/appbooking/src/main/java/com/modular/booking/activity/services/BServiceAddActivity.java
  10. 13 1
      app_modular/appbooking/src/main/java/com/modular/booking/activity/services/BServiceDetailActivity.java
  11. 22 3
      app_modular/appbooking/src/main/java/com/modular/booking/adapter/ItemBserviceStoremanListAdapter.java
  12. 2 0
      app_modular/appbooking/src/main/res/layout/activity_book_service_detail.xml
  13. 2 2
      app_modular/appbooking/src/main/res/layout/item_bservice_storeman_list.xml
  14. 182 0
      app_modular/apputils/src/main/java/com/modular/apputils/utils/PopupWindowHelper.java
  15. BIN
      app_modular/apputils/src/main/res/drawable-hdpi/icon_mission_select.png
  16. BIN
      app_modular/apputils/src/main/res/drawable-xhdpi/icon_mission_select.png
  17. BIN
      app_modular/apputils/src/main/res/drawable-xxhdpi/icon_mission_select.png
  18. 36 22
      app_modular/apputils/src/main/res/layout/item_select_aim_pop.xml
  19. 0 0
      app_modular/apputils/src/main/res/layout/item_select_alert_pop.xml
  20. 1 2
      app_modular/appworks/build.gradle
  21. 1 1
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/AddBusinessActivity.java
  22. 1 1
      app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/BusinessDetailInfoActivity.java
  23. 55 35
      app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/MissionActivity.java
  24. 1 1
      app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/form/DataFormDetailActivity.java
  25. 5 2
      app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/model/IMission.java
  26. 10 8
      app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/presenter/IMissionPresenter.java
  27. 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/MainActivity.java

@@ -927,6 +927,7 @@ public class MainActivity extends BaseActivity implements ImStatusListener, NetW
 		Log.i("new_function_notice", new_function_notice + "");
 
 		platform = ApiUtils.getApiModel() instanceof ApiPlatform;
+		initPermission();
 	}
 
 	private void changeFragment(Fragment addFragment, String tag) {
@@ -997,7 +998,6 @@ public class MainActivity extends BaseActivity implements ImStatusListener, NetW
 	@Override
 	protected void onResume() {
 		super.onResume();
-		initPermission();
 		LogUtil.d("onResume start:" + DateFormatUtil.long2Str(DateFormatUtil.YMD_HMS));
 		if (!AppConfig.COMPANY) return;
 		isPause = false;

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

+ 4 - 0
app_core/common/src/main/java/com/core/widget/view/selectcalendar/SelectCalendarActivity.java

@@ -748,6 +748,10 @@ public class SelectCalendarActivity extends BaseActivity implements View.OnClick
      */
     public List<DataState> timeAddMuilt(String start, String end, int minute) {
         LogUtil.d("Test", "timeAddMuilt start:");
+        if (StringUtil.isEmpty(start)||StringUtil.isEmpty(end)){
+            start="08:30";
+            end="21:30";
+        }
         List<DataState> result = new ArrayList<>();
         DataState dataState = new DataState();
         dataState.setValue(start);

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

+ 38 - 6
app_modular/appbooking/src/main/java/com/modular/booking/activity/services/BServiceAddActivity.java

@@ -131,30 +131,62 @@ public class BServiceAddActivity extends OABaseActivity implements View.OnClickL
             isEdited = intent.getBooleanExtra("isEdited", true);
             isHasPerson = intent.getBooleanExtra("isHasPerson", false);
             dataService = intent.getStringExtra("dataService");
+            //两个字段是从选择人员界面选过来的
             sb_userid = intent.getStringExtra("sb_userid");
             sb_username = intent.getStringExtra("sb_username");
+            LogUtil.d(TAG,"sb_userid:"+sb_userid+"  sb_username:"+sb_username+" dataService:"+dataService);
             if (model != null) {
                 LogUtil.i(model.toString());
                 initType(model.getType());
                 if (isEdited) {
                     submit_btn.setText("提交");
-                    AvatarHelper.getInstance().display(model.getUrl(), iv_header, true);
-                    AvatarHelper.getInstance().display(model.getUrl(), max_img, true);
+                    if(!StringUtil.isEmpty(sb_userid)){
+                        AvatarHelper.getInstance().displayAvatar(sb_userid, iv_header, true);
+                        AvatarHelper.getInstance().displayAvatar(sb_userid, max_img, true);
+                        tv_title.setText(sb_username);
+                        if("10005".equals(model.getIndustrycode())){
+                            tv_sub.setText("特聘导师");
+                        }else{
+                            tv_sub.setText("特聘技师");
+                        }
+                    }else{ 
+                        AvatarHelper.getInstance().display(model.getUrl(), iv_header, true);
+                        AvatarHelper.getInstance().display(model.getUrl(), max_img, true);
+                        tv_title.setText(model.getName());
+                        tv_sub.setText(model.getAddress());
+                    }
+                 
                 } else {
+        
                     JSONObject object = JSON.parseObject(dataService);
                     String sb_status = object.getString("sb_status");
                     String sb_imageurl = object.getString("sc_imageurl");
+                    sb_userid =object.getString("sb_userid");
+                    sb_username =object.getString("sb_username");
                     if ("已取消".equals(sb_status)) {
                         submit_btn.setVisibility(View.GONE);
                     } else {
                         submit_btn.setVisibility(View.VISIBLE);
                     }
-                    AvatarHelper.getInstance().display(sb_imageurl, iv_header, true);
-                    AvatarHelper.getInstance().display(sb_imageurl, max_img, true);
+                    if (!StringUtil.isEmpty(sb_userid)){
+                        AvatarHelper.getInstance().displayAvatar(sb_userid, iv_header, true);
+                        AvatarHelper.getInstance().displayAvatar(sb_userid, max_img, true);
+                        tv_title.setText(sb_username);
+                        if("10005".equals(model.getIndustrycode())){
+                            tv_sub.setText("特聘导师");
+                        }else{
+                            tv_sub.setText("特聘技师");
+                        }
+                    }else{
+                        tv_title.setText(model.getName());
+                        tv_sub.setText(model.getAddress());
+                        AvatarHelper.getInstance().display(sb_imageurl, iv_header, true);
+                        AvatarHelper.getInstance().display(sb_imageurl, max_img, true); 
+                    }
+                   
                     submit_btn.setText("取消");
                 }
-                tv_title.setText(model.getName());
-                tv_sub.setText(model.getAddress());
+               
                 getSupportActionBar().setTitle(model.getName());
               
 

+ 13 - 1
app_modular/appbooking/src/main/java/com/modular/booking/activity/services/BServiceDetailActivity.java

@@ -44,6 +44,7 @@ public class BServiceDetailActivity extends OABaseActivity implements View.OnCli
 	private EmptyLayout mEmptyLayout;
 	private String mCompanyId, mServiceId;
 	private SBListModel model;
+	private TextView guide_title;
 
 	@Override
 	protected void onCreate(Bundle savedInstanceState) {
@@ -107,7 +108,6 @@ public class BServiceDetailActivity extends OABaseActivity implements View.OnCli
 		mBookDetailPtlv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
 			@Override
 			public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-				LogUtil.d(TAG,"onItemCliem:点击");
 				SBStoremanModel bean = mStoremanListAdapter.getItem((int) id);
 				Intent intent = new Intent(ct, BServiceAddActivity.class);
 				intent.putExtra("model", model);
@@ -120,6 +120,7 @@ public class BServiceDetailActivity extends OABaseActivity implements View.OnCli
 
 	private void initViews() {
 		mBookStoreTv = (TextView) findViewById(R.id.book_service_detail_store_tv);
+		guide_title=(TextView) findViewById(R.id.guide_title);
 		mBookDetailPtlv = (PullToRefreshListView) findViewById(R.id.book_service_detail_ptlv);
 		mBookDetailPtlv.setMode(PullToRefreshBase.Mode.DISABLED);
 
@@ -132,12 +133,23 @@ public class BServiceDetailActivity extends OABaseActivity implements View.OnCli
 			model = getIntent().getParcelableExtra("model");
 			getSupportActionBar().setTitle(model.getName());
 			LogUtil.d("myTest", "model:" + JSON.toJSONString(model));
+			if ("10005".equals(model.getIndustrycode())){
+				//会所
+				mBookStoreTv.setText("不指定技师,预约门店");
+				guide_title.setText("指定技师");
+			}else if("10004".equals(model.getIndustrycode())){
+				//美容美化
+				mBookStoreTv.setText("不指定发型师,预约门店");
+				guide_title.setText("指定发型师");
+			}
 		}
 
 		mHttpClient = new HttpClient.Builder(Constants.IM_BASE_URL).isDebug(true).build();
 		mStoremanModels = new ArrayList<>();
 		mStoremanListAdapter = new ItemBserviceStoremanListAdapter(this, mStoremanModels);
+		mStoremanListAdapter.setModel(model);
 		mBookDetailPtlv.setAdapter(mStoremanListAdapter);
+		
 	}
 
 	@Override

+ 22 - 3
app_modular/appbooking/src/main/java/com/modular/booking/adapter/ItemBserviceStoremanListAdapter.java

@@ -1,6 +1,7 @@
 package com.modular.booking.adapter;
 
 import android.content.Context;
+import android.content.Intent;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -12,6 +13,8 @@ import android.widget.TextView;
 
 import com.core.utils.helper.AvatarHelper;
 import com.modular.booking.R;
+import com.modular.booking.activity.services.BServiceAddActivity;
+import com.modular.booking.model.SBListModel;
 import com.modular.booking.model.SBStoremanModel;
 
 import java.util.ArrayList;
@@ -23,13 +26,14 @@ public class ItemBserviceStoremanListAdapter extends BaseAdapter {
 
     private Context context;
     private LayoutInflater layoutInflater;
+    private SBListModel model;
 
     public ItemBserviceStoremanListAdapter(Context context, List<SBStoremanModel> objects) {
         this.context = context;
         this.layoutInflater = LayoutInflater.from(context);
         this.objects = objects;
     }
-
+   
     @Override
     public int getCount() {
         return objects.size();
@@ -45,6 +49,14 @@ public class ItemBserviceStoremanListAdapter extends BaseAdapter {
         return position;
     }
 
+    public SBListModel getModel() {
+        return model;
+    }
+
+    public void setModel(SBListModel model) {
+        this.model = model;
+    }
+
     @Override
     public View getView(int position, View convertView, ViewGroup parent) {
         if (convertView == null) {
@@ -55,14 +67,21 @@ public class ItemBserviceStoremanListAdapter extends BaseAdapter {
         return convertView;
     }
 
-    private void initializeViews(SBStoremanModel object, ViewHolder holder) {
+    private void initializeViews(final SBStoremanModel object, ViewHolder holder) {
         holder.bserviceStoremanTitleTv.setText(object.getSm_username());
         AvatarHelper.getInstance().display(object.getSm_userid(),  holder.bserviceStoremanIv, true);
         holder.model=object;
         holder.bserviceStoremanOrderBtn.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                
+              if (context!=null) {
+                  SBStoremanModel bean =object;
+                  Intent intent = new Intent(context, BServiceAddActivity.class);
+                  intent.putExtra("model", model);
+                  intent.putExtra("sb_userid", bean.getSm_userid());
+                  intent.putExtra("sb_username", bean.getSm_username());
+                  context.startActivity(intent);
+              }
             }
         });
     }

+ 2 - 0
app_modular/appbooking/src/main/res/layout/activity_book_service_detail.xml

@@ -40,5 +40,7 @@
         android:id="@+id/book_service_detail_ptlv"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
+        android:divider="@color/item_line"
+        android:dividerHeight="@dimen/line"
       />
 </LinearLayout>

+ 2 - 2
app_modular/appbooking/src/main/res/layout/item_bservice_storeman_list.xml

@@ -7,8 +7,8 @@
 
     <ImageView
         android:id="@+id/bservice_storeman_iv"
-        android:layout_width="60dp"
-        android:layout_height="60dp"
+        android:layout_width="50dp"
+        android:layout_height="50dp"
         android:layout_margin="10dp"
         android:src="@drawable/defaultpic" />
 

+ 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
app_modular/apputils/src/main/res/drawable-hdpi/icon_mission_select.png


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


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