Browse Source

订阅号jsp页面异常处理

gongpm 9 years ago
parent
commit
ca0613f339

+ 0 - 4
WeiChat/src/main/AndroidManifest.xml

@@ -421,11 +421,7 @@
             android:name=".ui.erp.activity.StatisticsActivity"
             android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
         <activity android:name=".ui.erp.activity.TextErpActivity" >
-            <!--<intent-filter>-->
-                <!--<action android:name="android.intent.action.MAIN" />-->
 
-                <!--<category android:name="android.intent.category.LAUNCHER" />-->
-            <!--</intent-filter>-->
         </activity>
     </application>
 

+ 0 - 1
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/circle/BasicInfoActivity.java

@@ -73,7 +73,6 @@ import java.util.regex.Pattern;
  * @author Dean Tao
  */
 public class BasicInfoActivity extends BaseActivity implements NewFriendListener {
-
     private ImageView mAvatarImg;
     private RelativeLayout tel_rl;
     private TextView mNameTv;

+ 0 - 4
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/TextErpActivity.java

@@ -23,13 +23,9 @@ public class TextErpActivity extends BaseActivity implements View.OnClickListene
         switch (view.getId()) {
             case R.id.btn1:
                 String url = Constants.getAppBaseUrl(ct);
-                  url ="http://192.168.253.233:8080/ERP//";
-//                http://218.17.158.219:8090/ERP//+"mobile/login.action";
-//                UAS
                 ViewUtil.ct = ct;
                 ViewUtil.LoginERPTask(ct, url, "UAS", "15972129063", 1 + "");
                 break;
-
         }
     }
 }

+ 47 - 6
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/activity/WebViewCommActivity.java

@@ -4,7 +4,8 @@ import android.annotation.SuppressLint;
 import android.content.Context;
 import android.content.Intent;
 import android.os.Bundle;
-import android.util.Log;
+import android.os.Handler;
+import android.os.Message;
 import android.view.View;
 import android.webkit.CookieManager;
 import android.webkit.CookieSyncManager;
@@ -15,14 +16,19 @@ import android.widget.ImageView;
 import android.widget.ProgressBar;
 import android.widget.TextView;
 
+import com.alibaba.fastjson.JSON;
 import com.handmark.pulltorefresh.library.PullToRefreshWebView;
 import com.xzjmyk.pm.activity.MyApplication;
 import com.xzjmyk.pm.activity.R;
 import com.xzjmyk.pm.activity.ui.MainActivity;
 import com.xzjmyk.pm.activity.ui.base.BaseActivity;
+import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
+import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.StringUtils;
 
 import org.apache.http.cookie.Cookie;
+import org.json.JSONException;
+import org.json.JSONObject;
 
 /**
  * Created by Administrator on 2016/4/5.
@@ -37,6 +43,39 @@ public class WebViewCommActivity extends BaseActivity {
     private TextView tck_icon;
     private boolean isStartApp = false;
     private boolean isCookie;
+    private int reCode = 201;
+    Handler hander = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            if (msg.what == reCode) {
+                //登录成功
+                String result = msg.getData().getString("result");
+                try {
+                    JSONObject jsonObject = new JSONObject(result);
+                    boolean success = JSON.parseObject(result).getBoolean("success");
+                    if (success) {
+                        if (!jsonObject.isNull("sessionId")) {
+                            CommonUtil.setSharedPreferences(WebViewCommActivity.this, "sessionId", jsonObject.getString("sessionId"));
+
+                        }
+//                        doNextLoadURL();  //不敢加   当第一次加载出现错误登录erp然后进行第二次登录操作后再次加载操作
+                    }
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+
+            }
+        }
+    };
+
+    private void doNextLoadURL() {
+        if (isCookie) {
+            synCookies(this, url);
+        } else {
+            clearCookie();
+        }
+        webView.getRefreshableView().loadUrl(url);
+    }
 
     @SuppressLint("SetJavaScriptEnabled")
     @Override
@@ -64,7 +103,7 @@ public class WebViewCommActivity extends BaseActivity {
         if (p != null) {
             getSupportActionBar().setTitle(p);
         }
-        if (StringUtils.isEmpty(url)) {
+        if (StringUtils.isEmpty(url)) {//为空时默认为b2b平台的
             url = "http://www.baidu.com";
         }
         webView.getRefreshableView().getSettings().setJavaScriptEnabled(true);
@@ -80,7 +119,6 @@ public class WebViewCommActivity extends BaseActivity {
         webView.getRefreshableView().loadUrl(url);
         webView.getRefreshableView().setWebViewClient(new WebViewClient() {
             public boolean shouldOverrideUrlLoading(WebView view, String url) {
-                System.out.println("link url=" + url);
                 if (!url.equals("http://www.ubtob.com/signin#")) {
                     if (isCookie) {
                         synCookies(WebViewCommActivity.this, url);
@@ -115,7 +153,6 @@ public class WebViewCommActivity extends BaseActivity {
     public class WebChromeClient extends android.webkit.WebChromeClient {
         @Override
         public void onProgressChanged(WebView view, int newProgress) {
-
             pb.setProgress(newProgress);
             if (newProgress == 100) {
                 pb.setProgress(newProgress);
@@ -130,8 +167,11 @@ public class WebViewCommActivity extends BaseActivity {
      * 同步一下cookie
      */
     public void synCookies(Context context, String url) {
-        if (MyApplication.cookieERP == null) return;
-        Log.i("gongpengming", "没有retuen");
+        if (MyApplication.cookieERP == null) {
+            ViewUtil.ct = this;
+            ViewUtil.LoginERPTask(this, hander, reCode);
+            return;
+        }
         CookieSyncManager.createInstance(context);
         CookieManager cookieManager = CookieManager.getInstance();
         cookieManager.setAcceptCookie(true);
@@ -163,4 +203,5 @@ public class WebViewCommActivity extends BaseActivity {
         }
     }
 
+
 }

+ 3 - 3
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/fragment/WorksFragment.java

@@ -17,7 +17,7 @@ import com.xzjmyk.pm.activity.ui.MainActivity;
 import com.xzjmyk.pm.activity.ui.base.XutilsFragment;
 import com.xzjmyk.pm.activity.ui.circle.BusinessCircleActivity;
 import com.xzjmyk.pm.activity.ui.erp.activity.ClientActivity;
-import com.xzjmyk.pm.activity.ui.erp.activity.ErpMenActivity;
+import com.xzjmyk.pm.activity.ui.erp.activity.OAActivity;
 import com.xzjmyk.pm.activity.ui.erp.net.ViewUtil;
 import com.xzjmyk.pm.activity.ui.erp.util.CommonUtil;
 import com.xzjmyk.pm.activity.util.PreferenceUtils;
@@ -94,8 +94,8 @@ public class WorksFragment extends XutilsFragment implements View.OnClickListene
                 ViewUtil.WebLinks(ct, url, "我的商务");
                 break;
             case R.id.rl_uas_sys:
-                ct.startActivity(new Intent(ct, ErpMenActivity.class));
-//                ct.startActivity(new Intent(ct, OAActivity.class));
+//                ct.startActivity(new Intent(ct, ErpMenActivity.class));
+                ct.startActivity(new Intent(ct, OAActivity.class));
                 break;
             case R.id.my_client_rl:
                 ct.startActivity(new Intent(ct, ClientActivity.class));

+ 1 - 2
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/net/HttpClient.java

@@ -331,8 +331,7 @@ public class HttpClient {
             cookieStore = ((AbstractHttpClient) httpclient)
                     .getCookieStore();
             for (int i = 0; i < cookieStore.getCookies().size(); i++) {
-                Log.i("gongpengming", cookieStore.getCookies().get(i)
-                        .getDomain());
+
                 if ("www.ubtob.com".equals(cookieStore.getCookies().get(i)
                         .getDomain())) {
                     // 保存b2b平台的cookie

+ 46 - 15
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/erp/net/ViewUtil.java

@@ -319,9 +319,22 @@ public class ViewUtil {
                 bundle, "get");
     }
 
+    public static void LoginTaskERP(String user_phone, String user_password, Context ct) {
+        ViewUtil.ct = ct;
+        String url = Constants.BASE_URL_LOGIN;
+        Map<String, String> params = new HashMap<String, String>();
+        params.put("user", user_phone);
+        params.put("password", user_password);
+        Message message = new Message();
+        Bundle bundle = new Bundle();
+        bundle.putString("phone", user_phone);
+        bundle.putString("password", user_password);
+        startNetThread(url, params, handler, Constants.SUCCESS_LOGIN, message,
+                bundle, "get");
+    }
+
     // 登录B2B
     public static void LoginB2BTask(String phone, String password) {
-
         mdProcessDialog.setContent("正在验证B2B...");
         String url = Constants.serviceURL;
         Map<String, String> params = new HashMap<String, String>();
@@ -331,18 +344,6 @@ public class ViewUtil {
                 "post");
     }
 
-    // 登录ERP
-    public static void LoginERPTask(String url, String master, String username,
-                                    String password) {
-        mdProcessDialog.setContent("正在验证ERP...");
-        url = url + "mobile/login.action";
-        Map<String, String> params = new HashMap<String, String>();
-        params.put("username", username);
-        params.put("password", password);
-        params.put("master", master);
-        startNetThread(url, params, handler, Constants.SUCCESS_ERP, null, null,
-                "post");
-    }
 
     private static List<LoginEntity> erpEntities;
     public static Handler handler = new Handler() {
@@ -381,6 +382,10 @@ public class ViewUtil {
     };
 
     public static void ChangeStatusERP(String result) {
+        ChangeStatusERP(result, true);
+    }
+
+    public static void ChangeStatusERP(String result, boolean isBrodcast) {
         if (mdProcessDialog != null) {
             mdProcessDialog.setContent("UAS验证成功!");
         }
@@ -424,7 +429,8 @@ public class ViewUtil {
                 ct.startActivity(new Intent(ct, DataDownloadActivity.class));
             }
         }
-        sendBrodcast("ERP");
+        if (isBrodcast)
+            sendBrodcast("ERP");
     }
 
     public static void ChangeStatusB2B(String result) {
@@ -767,7 +773,6 @@ public class ViewUtil {
             ViewUtil.ct = ct;
             String url = Constants.getAppBaseUrl(ct);
             String master = CommonUtil.getSharedPreferences(ct, "erp_master");
-
             String phone = CommonUtil.getSharedPreferences(ct, "user_phone");
             String password = CommonUtil.getSharedPreferences(ct, "user_password");
             Log.i("LoginErp", "自动登录..." + url);
@@ -789,6 +794,32 @@ public class ViewUtil {
         httpSendRequest(ct, url, params, handler, null, Constants.SUCCESS_ERP, null, null, "post");
     }
 
+    // 登录ERP gongpengming
+    public static void LoginERPTask(Context ct, Handler handler, int what) {
+        String url = Constants.getAppBaseUrl(ct) + "mobile/login.action";
+        String master = CommonUtil.getSharedPreferences(ct, "erp_master");
+        String phone = CommonUtil.getSharedPreferences(ct, "user_phone");
+        String password = CommonUtil.getSharedPreferences(ct, "user_password");
+        Map<String, String> params = new HashMap<String, String>();
+        params.put("username", phone);
+        params.put("password", password);
+        params.put("master", master);
+        startNetThread(url, params, handler, what, null, null, "post");
+    }
+
+    // 登录ERP
+    public static void LoginERPTask(String url, String master, String username,
+                                    String password) {
+        mdProcessDialog.setContent("正在验证ERP...");
+        url = url + "mobile/login.action";
+        Map<String, String> params = new HashMap<String, String>();
+        params.put("username", username);
+        params.put("password", password);
+        params.put("master", master);
+        startNetThread(url, params, handler, Constants.SUCCESS_ERP, null, null,
+                "post");
+    }
+
 
     /**
      * @注释:跳转嵌入网页页面

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

@@ -10,7 +10,6 @@ import android.os.Message;
 import android.text.Editable;
 import android.text.TextUtils;
 import android.text.TextWatcher;
-import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -653,7 +652,6 @@ public class MessageFragment extends EasyFragment {
     }
 
 
-
     private final int load_success_erpMsgNum = 5;
     private Handler handler = new Handler() {
         @Override
@@ -847,6 +845,7 @@ public class MessageFragment extends EasyFragment {
 
     public void getErpMsgNums(Message msg) {
         String reString = msg.getData().getString("result");
+
         if (reString != null && !reString.equals("500")) {
             Map<String, Object> results = FlexJsonUtil.fromJson(reString);
             if (results.get("allProcess") != null) {
@@ -863,7 +862,8 @@ public class MessageFragment extends EasyFragment {
                         task_num++;
                     } else if (allProcesses.get(i).getTypecode()
                             .contains("dingyue")) {
-                        pagin_num++;
+                        if (allProcesses.get(i).getStatus() == "0")
+                            pagin_num++;
                     } else {
                         daiban_num++;
                     }

+ 21 - 9
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/message/SubscriptionActivity.java

@@ -80,7 +80,7 @@ public class SubscriptionActivity extends BaseActivity {
                     adapter = new SubscriptionAdapter();
                     listView.setAdapter(adapter);
                 } else {
-                    adapter.notifyDataSetChanged();
+                    notifyAdapter();
                 }
                 listView.onRefreshComplete();
             }
@@ -88,6 +88,7 @@ public class SubscriptionActivity extends BaseActivity {
     };
     String mLoginUserId;
     private String emCode;
+    private TextView emptyView;
 
     @Override//设置右划退出
     public void setTouch(boolean b) {
@@ -106,6 +107,8 @@ public class SubscriptionActivity extends BaseActivity {
     private void initView() {
         listView = (PullToRefreshListView) findViewById(R.id.listview);
         listView.setMode(PullToRefreshBase.Mode.BOTH);
+        emptyView = (TextView) findViewById(R.id.emptyView);
+
         listView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2<ListView>() {
             @Override
             public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {
@@ -226,14 +229,21 @@ public class SubscriptionActivity extends BaseActivity {
         });
     }
 
+    private void notifyAdapter() {
+        if (sortSubsrciprions == null || sortSubsrciprions.size() <= 0) {
+            emptyView.setVisibility(View.VISIBLE);
+        } else {
+            emptyView.setVisibility(View.GONE);
+        }
+        if (adapter != null)
+            adapter.notifyDataSetChanged();
+    }
+
     private void setData() {//网络获取数据时候
         if (SubscriptionMessages == null || SubscriptionMessages.size() <= 0) {
             ToastMessage("没有更多内容");
             listView.onRefreshComplete();
-            View emptyView = LayoutInflater.from(mContext).inflate(R.layout.subscription_empty, null);
-            listView.setEmptyView(emptyView);
-            if (adapter != null)
-                adapter.notifyDataSetChanged();
+            notifyAdapter();
             return;
         }
 
@@ -242,6 +252,8 @@ public class SubscriptionActivity extends BaseActivity {
         saveDataToDB(SubscriptionMessages);
         if (sortSubsrciprions == null) {
             sortSubsrciprions = new ArrayList<>();
+        } else {
+            sortSubsrciprions.clear();
         }
         if (isRef) refresh();
         else loadMore();
@@ -268,7 +280,7 @@ public class SubscriptionActivity extends BaseActivity {
                         if (!(sortSubsrciprions.get(position).beans.size() > 0)) {
                             sortSubsrciprions.remove(position);
                         }
-                        adapter.notifyDataSetChanged();
+                        notifyAdapter();
                     }
                 }).create().show();
     }
@@ -425,11 +437,11 @@ public class SubscriptionActivity extends BaseActivity {
                 @Override
                 public void onClick(View view) {
                     SubscriptionMessage bean = sortSubsrciprions.get(position).beans.get(i);
-//                    218.17.158.219:8090/ERP    http://192.168.253.233:8080
                     String url = baseUrl + "common/charts/mobileCharts.action?" + "numId=" + bean.getNUM_ID_() +
                             "&mainId=" + bean.getINSTANCE_ID_() + "&insId=" + bean.getID_() +
-                            "&title=" + bean.getSON_TITLE_();
-                    ViewUtil.WebLinks(activity, url, "订阅", true);
+                            "&title=" + bean.getTITLE_();
+                    String title = TimeUtils.ym_long_2_str(sortSubsrciprions.get(position).tiem) + "  " + bean.getTITLE_();
+                    ViewUtil.WebLinks(activity, url, title, true);
                 }
             });
             contextView.setOnLongClickListener(new View.OnLongClickListener() {

+ 4 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/util/TimeUtils.java

@@ -22,6 +22,7 @@ public class TimeUtils {
     public static final SimpleDateFormat s_format = new SimpleDateFormat("yyyy-MM-dd");
     public static final SimpleDateFormat f_format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
     public static final SimpleDateFormat int_format = new SimpleDateFormat("yyyyMMdd");
+    public static final SimpleDateFormat ym_format = new SimpleDateFormat("yyyyMM");
 
 
     public static String getWeek(String date) { //yyyy-MM-dd
@@ -84,6 +85,9 @@ public class TimeUtils {
     public static int int_long_2_str(long timestamp) {
         return Integer.parseInt(int_format.format(new Date(timestamp)));
     }
+public static int ym_long_2_str(long timestamp) {
+        return Integer.parseInt(ym_format.format(new Date(timestamp)));
+    }
 
     public static long f_str_2_long(String dateString) {
         try {

+ 214 - 409
WeiChat/src/main/res/layout/activity_add_meeting.xml

@@ -1,426 +1,231 @@
 <?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:whatever="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="@drawable/bg_main"
-    tools:context="com.xzjmyk.pm.activity.ui.erp.activity.AddMeetingActivity">
+    android:orientation="vertical">
 
-    <RelativeLayout
-        android:id="@+id/top"
-        android:layout_width="match_parent"
-        android:layout_height="?attr/actionBarSize"
-        android:background="@color/text_black">
-
-        <TextView
-            android:id="@+id/oa_back"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_centerVertical="true"
-            android:layout_marginLeft="10dp"
-            android:clickable="true"
-            android:drawableLeft="@drawable/back"
-            android:text="取消"
-            android:textColor="@color/white"
-            android:textSize="20sp" />
-
-        <TextView
-            android:id="@+id/oa_title_tv"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_centerInParent="true"
-            android:clickable="true"
-            android:text="新建会议"
-            android:textColor="@color/white"
-            android:textSize="20sp" />
-
-        <TextView
-            android:id="@+id/oa_rili_img"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_alignParentRight="true"
-            android:layout_centerVertical="true"
-            android:layout_marginRight="8dp"
-            android:text="保存"
-            android:textColor="@color/white"
-            android:textSize="20sp" />
-
-    </RelativeLayout>
-
-    <ScrollView
+    <com.xzjmyk.pm.activity.ui.erp.view.CustomerScrollView
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:layout_below="@id/top">
+        android:fillViewport="true">
 
         <LinearLayout
             android:layout_width="match_parent"
-            android:layout_height="match_parent"
+            android:layout_height="wrap_content"
             android:orientation="vertical">
 
-            <RelativeLayout
-                android:id="@+id/oa_meet"
-                style="@style/IMTbleLine_UP">
-
-                <TextView
-                    android:id="@+id/oa_meet_name"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:drawablePadding="10dp"
-                    android:gravity="center"
-                    android:text="会议名称"
-                    android:textColor="@color/text_main"
-                    android:textSize="@dimen/text_main" />
-
-                <TextView
-                    android:id="@+id/oa_meet_name_tv"
-                    style="@style/IMTbleLine_TextValue"
-                    android:layout_toLeftOf="@+id/next_img1"
-                    android:layout_toRightOf="@+id/oa_meet_name"
-                    android:textColor="@color/text_hine"
-                    android:textSize="@dimen/text_hine" />
-
-                <ImageView
-                    android:id="@+id/next_img1"
-                    android:layout_width="@dimen/next_width"
-                    android:layout_height="@dimen/next_height"
-                    android:layout_alignParentRight="true"
-                    android:layout_centerVertical="true"
-                    android:alpha="0.26"
-                    android:background="@drawable/set_list_next"
-                    android:contentDescription="@string/app_name" />
-            </RelativeLayout>
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/item_line" />
-
-            <RelativeLayout
-                android:id="@+id/oa_start_time"
-                style="@style/IMTbleLine_UP">
-
-                <TextView
-                    android:id="@+id/oa_start_time_name"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:drawablePadding="10dp"
-                    android:gravity="center"
-                    android:text="开始时间"
-                    android:textColor="@color/text_main"
-                    android:textSize="@dimen/text_main" />
-
-                <TextView
-                    android:id="@+id/oa_start_time_name_tv"
-                    style="@style/IMTbleLine_TextValue"
-                    android:layout_toLeftOf="@+id/next_img2"
-                    android:layout_toRightOf="@+id/oa_start_time_name"
-                    android:textColor="@color/text_hine"
-                    android:textSize="@dimen/text_hine" />
-
-                <ImageView
-                    android:id="@+id/next_img2"
-                    android:layout_width="@dimen/next_width"
-                    android:layout_height="@dimen/next_height"
-                    android:layout_alignParentRight="true"
-                    android:layout_centerVertical="true"
-                    android:alpha="0.26"
-                    android:background="@drawable/set_list_next"
-                    android:contentDescription="@string/app_name" />
-            </RelativeLayout>
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/item_line" />
-
-            <RelativeLayout
-                android:id="@+id/oa_end_time"
-                style="@style/IMTbleLine_UP">
-
-                <TextView
-                    android:id="@+id/oa_end_time_name"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:drawablePadding="10dp"
-                    android:gravity="center"
-                    android:text="结束时间"
-                    android:textColor="@color/text_main"
-                    android:textSize="@dimen/text_main" />
-
-                <TextView
-                    android:id="@+id/oa_end_time_name_tv"
-                    style="@style/IMTbleLine_TextValue"
-                    android:layout_toLeftOf="@+id/oa_next_img3"
-                    android:layout_toRightOf="@+id/oa_end_time_name"
-                    android:textColor="@color/text_hine"
-                    android:textSize="@dimen/text_hine" />
-
-                <ImageView
-                    android:id="@+id/oa_next_img3"
-                    android:layout_width="@dimen/next_width"
-                    android:layout_height="@dimen/next_height"
-                    android:layout_alignParentRight="true"
-                    android:layout_centerVertical="true"
-                    android:alpha="0.26"
-                    android:background="@drawable/set_list_next"
-                    android:contentDescription="@string/app_name" />
-            </RelativeLayout>
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/item_line" />
-
-            <RelativeLayout
-                android:id="@+id/oa_meet_addr"
-                style="@style/IMTbleLine_UP">
-
-                <TextView
-                    android:id="@+id/oa_meet_addr_name"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:drawablePadding="10dp"
-                    android:gravity="center"
-                    android:text="会议地点"
-                    android:textColor="@color/text_main"
-                    android:textSize="@dimen/text_main" />
-
-                <TextView
-                    android:id="@+id/oa_meet_addr_name_tv"
-                    style="@style/IMTbleLine_TextValue"
-                    android:layout_toLeftOf="@+id/oa_next_img4"
-                    android:layout_toRightOf="@+id/oa_meet_addr_name"
-                    android:textColor="@color/text_hine"
-                    android:textSize="@dimen/text_hine" />
-
-                <ImageView
-                    android:id="@+id/oa_next_img4"
-                    android:layout_width="@dimen/next_width"
-                    android:layout_height="@dimen/next_height"
-                    android:layout_alignParentRight="true"
-                    android:layout_centerVertical="true"
-                    android:alpha="0.26"
-                    android:background="@drawable/set_list_next"
-                    android:contentDescription="@string/app_name" />
-            </RelativeLayout>
-
-            <View
+            <LinearLayout
+                android:id="@+id/ly_head_display"
                 android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/item_line" />
+                android:layout_height="wrap_content"
+                android:orientation="vertical">
+
+                <RelativeLayout
+                    android:id="@+id/ry_leave_man"
+                    style="@style/form_relative_customer"
+                    android:background="@color/item_color1">
+
+
+                    <TextView
+                        android:id="@+id/tv_leave_man"
+                        style="@style/form_relative_left_text"
+                        android:text="会议名称:"
+                        android:textColor="@color/text_main"
+                        android:textSize="@dimen/text_main" />
+
+                    <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
+                        android:id="@+id/et_leave_man"
+                        style="@style/form_relative_right_text"
+                        editTextFormExample:testType="nocheck" />
+                </RelativeLayout>
+
+                <!--<ImageView style="@style/app_comm_list_line_gray" />-->
+
+                <RelativeLayout
+                    android:id="@+id/ry_set_startTime"
+                    style="@style/form_relative_customer"
+                    android:background="@color/item_color1">
+
+
+                    <TextView
+                        android:id="@+id/tv_set_"
+                        style="@style/form_relative_left_text"
+                        android:text="开始时间:"
+                        android:textColor="@color/text_main"
+                        android:textSize="@dimen/text_main" />
+
+                    <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
+                        android:id="@+id/tv_start_time"
+                        style="@style/form_relative_right_text"
+                        editTextFormExample:customFormat="yyyy-MM-dd HH:mm"
+                        editTextFormExample:testType="date" />
+                </RelativeLayout>
+
+
+                <RelativeLayout
+                    android:id="@+id/ry_set_endTime"
+                    style="@style/form_relative_customer"
+                    android:background="@color/item_color2">
+
+                    <TextView
+                        android:id="@+id/tv_date_gh"
+                        style="@style/form_relative_left_text"
+                        android:text="结束时间:"
+                        android:textColor="@color/text_main"
+                        android:textSize="@dimen/text_main" />
+
+                    <com.andreabaccega.widget.FormEditText
+                        xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
+                        android:id="@+id/tv_end_time"
+                        style="@style/form_relative_right_text"
+                        editTextFormExample:customFormat="yyyy-MM-dd HH:mm"
+                        editTextFormExample:testType="date" />
+                </RelativeLayout>
+
+                <RelativeLayout
+                    android:id="@+id/ry_leave_mankind"
+                    style="@style/form_relative_customer"
+                    android:background="@color/item_color2">
+                    <TextView
+                        android:id="@+id/tv_leave_mankind"
+                        style="@style/form_relative_left_text"
+                        android:text="会议地点:"
+                        android:textColor="@color/text_main"
+                        android:textSize="@dimen/text_main" />
+
+                    <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
+                        android:id="@+id/et_leave_mankind"
+                        style="@style/form_relative_right_text"
+                        editTextFormExample:testType="nocheck" />
+                </RelativeLayout>
+
+                <RelativeLayout
+                    android:id="@+id/ry_leave_type"
+                    style="@style/form_relative_customer"
+                    android:visibility="gone">
+
+
+                    <TextView
+                        android:id="@+id/tv_leave_type"
+                        style="@style/form_relative_left_text"
+                        android:text="请假类型:" />
+
+                    <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
+                        android:id="@+id/et_leave_type"
+                        style="@style/form_relative_right_text"
+                        android:focusableInTouchMode="false"
+                        editTextFormExample:testType="nocheck" />
+                </RelativeLayout>
+
+
+                <RelativeLayout
+                    android:id="@+id/ry_leave_category"
+                    style="@style/form_relative_customer"
+                    android:background="@color/item_color1">
+                    <TextView
+                        android:id="@+id/tv_leave_category"
+                        style="@style/form_relative_left_text"
+                        android:text="假期类别:"
+                        android:textColor="@color/text_main"
+                        android:textSize="@dimen/text_main" />
+                    <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
+                        android:id="@+id/et_leave_category"
+                        style="@style/form_relative_right_text"
+                        editTextFormExample:testType="nocheck" />
+                </RelativeLayout>
+
+                <!--<ImageView style="@style/app_comm_list_line_gray" />-->
+
+                <RelativeLayout
+                    android:id="@+id/ry_set_website"
+                    style="@style/form_relative_customer"
+                    android:background="@color/item_color2">
+
+
+                    <TextView
+                        android:id="@+id/tv_iv_leave_days"
+                        style="@style/form_relative_left_text"
+                        android:text="请假天数:"
+                        android:textColor="@color/text_main"
+                        android:textSize="@dimen/text_main" />
+
+                    <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
+                        android:id="@+id/et_leave_days"
+                        style="@style/form_relative_right_text"
+                        whatever:customRegexp="^(([0-9])|([0-9]+\\.?[0-9]+))$"
+                        whatever:testErrorString="@string/error_only_numeric_digits_allowed"
+                        whatever:testType="regexp" />
+                </RelativeLayout>
+
+                <!--<ImageView style="@style/app_comm_list_line_gray" />-->
+
+                <RelativeLayout
+                    android:id="@+id/ry_leave_hours"
+                    style="@style/form_relative_customer"
+                    android:background="@color/item_color1">
+
+
+                    <TextView
+                        android:id="@+id/tv_leave_hours"
+                        style="@style/form_relative_left_text"
+
+                        android:text="请假时数:"
+                        android:textColor="@color/text_main"
+                        android:textSize="@dimen/text_main" />
+
+                    <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
+                        android:id="@+id/et_leave_hours"
+                        style="@style/form_relative_right_text"
+
+                        whatever:customRegexp="^(([0-9])|([0-9]+\\.?[0-9]+))$"
+                        whatever:testErrorString="@string/error_only_numeric_digits_allowed"
+                        whatever:testType="regexp" />
+                </RelativeLayout>
+
+                <!--<ImageView style="@style/app_comm_list_line_gray" />-->
+
+                <RelativeLayout
+                    android:id="@+id/ry_leave_reason"
+                    style="@style/form_relative_customer"
+                    android:background="@color/item_color2">
+
+
+                    <TextView
+                        android:id="@+id/tv_leave_reason"
+                        style="@style/form_relative_left_text"
+                        android:text="请假原因:"
+                        android:textColor="@color/text_main"
+                        android:textSize="@dimen/text_main" />
+
+                    <com.andreabaccega.widget.FormEditText xmlns:editTextFormExample="http://schemas.android.com/apk/res-auto"
+                        android:id="@+id/et_leave_reason"
+                        style="@style/form_relative_right_text"
+                        editTextFormExample:testType="nocheck" />
+                </RelativeLayout>
 
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="10dp" />
-
-            <RelativeLayout
-                android:id="@+id/oa_meet_num"
-                style="@style/IMTbleLine_UP">
-
-                <TextView
-                    android:id="@+id/oa_meet_num_name"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:layout_marginTop="10dp"
-                    android:drawablePadding="10dp"
-                    android:gravity="center"
-                    android:text="参会人员"
-                    android:textColor="@color/text_main"
-                    android:textSize="@dimen/text_main" />
-
-                <TextView
-                    android:id="@+id/oa_meet_num_name_tv"
-                    style="@style/IMTbleLine_TextValue"
-                    android:layout_toLeftOf="@+id/oa_next_img5"
-                    android:layout_toRightOf="@+id/oa_meet_num_name"
-                    android:textColor="@color/text_hine"
-                    android:textSize="@dimen/text_hine" />
-
-                <ImageView
-                    android:id="@+id/oa_next_img5"
-                    android:layout_width="@dimen/next_width"
-                    android:layout_height="@dimen/next_height"
-                    android:layout_alignParentRight="true"
-                    android:layout_centerVertical="true"
-                    android:alpha="0.26"
-                    android:background="@drawable/set_list_next"
-                    android:contentDescription="@string/app_name" />
-            </RelativeLayout>
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/item_line" />
-
-            <RelativeLayout
-                android:id="@+id/oa_meet_meam"
-                style="@style/IMTbleLine_UP">
-
-                <TextView
-                    android:id="@+id/oa_meet_meam_name"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:layout_marginTop="10dp"
-                    android:drawablePadding="10dp"
-                    android:gravity="center"
-                    android:text="管理员"
-                    android:textColor="@color/text_main"
-                    android:textSize="@dimen/text_main" />
-
-                <TextView
-                    android:id="@+id/oa_meet_meam_name_tv"
-                    style="@style/IMTbleLine_TextValue"
-                    android:layout_toLeftOf="@+id/oa_next_img6"
-                    android:layout_toRightOf="@+id/oa_meet_meam_name"
-                    android:textColor="@color/text_hine"
-                    android:textSize="@dimen/text_hine" />
-
-                <ImageView
-                    android:id="@+id/oa_next_img6"
-                    android:layout_width="@dimen/next_width"
-                    android:layout_height="@dimen/next_height"
-                    android:layout_alignParentRight="true"
-                    android:layout_centerVertical="true"
-                    android:alpha="0.26"
-                    android:background="@drawable/set_list_next"
-                    android:contentDescription="@string/app_name" />
-            </RelativeLayout>
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/item_line" />
 
+            </LinearLayout>
+
+            <LinearLayout
+                android:id="@+id/ly_bottom_display"
+                style="@style/form_linear_customer">
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:id="@+id/ly_bottom_save"
+                style="@style/form_linear_customer">
+
+                <Button
+                    android:id="@+id/bt_save"
+                    style="@style/from_button_base_bule"
+                    android:text="保  存" />
+            </LinearLayout>
+
+            <include layout="@layout/item_work_view" />
 
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="10dp" />
-
-            <RelativeLayout
-                android:id="@+id/oa_meet_note"
-                style="@style/IMTbleLine_UP">
-
-                <TextView
-                    android:id="@+id/oa_meet_note_name"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:layout_marginTop="10dp"
-                    android:drawablePadding="10dp"
-                    android:gravity="center"
-                    android:text="会议标签"
-                    android:textColor="@color/text_main"
-                    android:textSize="@dimen/text_main" />
-
-                <TextView
-                    android:id="@+id/oa_meet_note_name_tv"
-                    style="@style/IMTbleLine_TextValue"
-                    android:layout_toLeftOf="@+id/oa_next_img7"
-                    android:layout_toRightOf="@+id/oa_meet_note_name"
-                    android:textColor="@color/text_hine"
-                    android:textSize="@dimen/text_hine" />
-
-                <ImageView
-                    android:id="@+id/oa_next_img7"
-                    android:layout_width="@dimen/next_width"
-                    android:layout_height="@dimen/next_height"
-                    android:layout_alignParentRight="true"
-                    android:layout_centerVertical="true"
-                    android:alpha="0.26"
-                    android:background="@drawable/set_list_next"
-                    android:contentDescription="@string/app_name" />
-            </RelativeLayout>
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/item_line" />
-
-            <RelativeLayout
-                android:id="@+id/oa_meet_sub"
-                style="@style/IMTbleLine_UP">
-
-                <TextView
-                    android:id="@+id/oa_meet_sub_name"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:layout_marginTop="10dp"
-                    android:drawablePadding="10dp"
-                    android:gravity="center"
-                    android:text="管理员"
-                    android:textColor="@color/text_main"
-                    android:textSize="@dimen/text_main" />
-
-                <TextView
-                    android:id="@+id/oa_meet_sub_name_tv"
-                    style="@style/IMTbleLine_TextValue"
-                    android:layout_toLeftOf="@+id/oa_next_img9"
-                    android:layout_toRightOf="@+id/oa_meet_sub_name"
-                    android:textColor="@color/text_hine"
-                    android:textSize="@dimen/text_hine" />
-
-                <ImageView
-                    android:id="@+id/oa_next_img9"
-                    android:layout_width="@dimen/next_width"
-                    android:layout_height="@dimen/next_height"
-                    android:layout_alignParentRight="true"
-                    android:layout_centerVertical="true"
-                    android:alpha="0.26"
-                    android:background="@drawable/set_list_next"
-                    android:contentDescription="@string/app_name" />
-            </RelativeLayout>
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/item_line" />
-
-            <RelativeLayout
-                android:id="@+id/oa_meet_about"
-                style="@style/IMTbleLine_UP">
-
-                <TextView
-                    android:id="@+id/oa_meet_about_name"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_centerVertical="true"
-                    android:layout_marginTop="10dp"
-                    android:drawablePadding="10dp"
-                    android:gravity="center"
-                    android:text="管理员"
-                    android:textColor="@color/text_main"
-                    android:textSize="@dimen/text_main" />
-
-                <TextView
-                    android:id="@+id/oa_meet_about_name_tv"
-                    style="@style/IMTbleLine_TextValue"
-                    android:layout_toLeftOf="@+id/oa_next_img8"
-                    android:layout_toRightOf="@+id/oa_meet_about_name"
-                    android:textColor="@color/text_hine"
-                    android:textSize="@dimen/text_hine" />
-
-                <ImageView
-                    android:id="@+id/oa_next_img8"
-                    android:layout_width="@dimen/next_width"
-                    android:layout_height="@dimen/next_height"
-                    android:layout_alignParentRight="true"
-                    android:layout_centerVertical="true"
-                    android:alpha="0.26"
-                    android:background="@drawable/set_list_next"
-                    android:contentDescription="@string/app_name" />
-            </RelativeLayout>
-
-            <View
-                android:layout_width="match_parent"
-                android:layout_height="1px"
-                android:background="@color/item_line" />
         </LinearLayout>
-    </ScrollView>
-</RelativeLayout>
+    </com.xzjmyk.pm.activity.ui.erp.view.CustomerScrollView>
+</LinearLayout>

+ 25 - 14
WeiChat/src/main/res/layout/activity_subscription.xml

@@ -1,18 +1,29 @@
 <?xml version="1.0" encoding="utf-8"?>
-<com.handmark.pulltorefresh.library.PullToRefreshListView xmlns:android="http://schemas.android.com/apk/res/android"
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:ptr="http://schemas.android.com/apk/res-auto"
-    android:id="@+id/listview"
     android:layout_width="match_parent"
-    android:padding="10dp"
-    android:layout_height="match_parent"
-    android:layout_above="@+id/bottom_view"
-    android:scrollbars="none"
-    android:divider="#00000000" />
-<!--    ptr:ptrAnimationStyle="flip"
-    ptr:ptrDrawableEnd="@drawable/default_ptr_rotate"
-    ptr:ptrDrawableStart="@drawable/default_ptr_flip"
-    ptr:ptrHeaderTextColor="@color/black"
-    ptr:ptrOverScroll="false"
+    android:layout_height="match_parent">
 
-    ptr:ptrShowIndicator="false"-->
-    <!--ptr:ptrMode="both"-->
+    <TextView
+        android:id="@+id/emptyView"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center_horizontal|top"
+        android:drawableBottom="@drawable/icon_not_found"
+        android:drawablePadding="5dp"
+        android:gravity="center"
+        android:padding="10dp"
+        android:text="今天暂时没有数据 \n向上拉取前一天数据"
+        android:textColor="@color/black"
+        android:textSize="@dimen/SmallerTextSize"
+        android:visibility="gone" />
+
+    <com.handmark.pulltorefresh.library.PullToRefreshListView
+        android:id="@+id/listview"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_above="@+id/bottom_view"
+        android:divider="#00000000"
+        android:padding="10dp"
+        android:scrollbars="none" />
+</FrameLayout>

+ 0 - 19
WeiChat/src/main/res/layout/subscription_empty.xml

@@ -1,19 +0,0 @@
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="horizontal">
-
-    <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="center_horizontal|top"
-        android:drawableBottom="@drawable/icon_not_found"
-        android:drawablePadding="5dp"
-        android:gravity="center"
-        android:padding="10dp"
-        android:text="今天暂时没有数据 \n向上拉取前一天数据"
-        android:textColor="@color/black"
-        android:textSize="@dimen/SmallerTextSize" />
-
-</FrameLayout>