Browse Source

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

# Conflicts:
#	WeiChat/version.properties
Arison 8 years ago
parent
commit
efb2ec2718

+ 3 - 3
WeiChat/version.properties

@@ -1,5 +1,5 @@
-#Thu May 24 14:45:49 CST 2018
-debugName=374
+#Thu May 24 15:59:08 CST 2018
+debugName=382
 versionName=630
-debugCode=374
+debugCode=382
 versionCode=170

+ 10 - 41
app_core/common/src/main/java/com/core/net/http/ViewUtil.java

@@ -47,6 +47,7 @@ import com.core.utils.CommonUtil;
 import com.core.utils.DialogUtils;
 import com.core.utils.FlexJsonUtil;
 import com.core.utils.ToastUtil;
+import com.core.widget.CustomProgressDialog;
 import com.core.widget.crouton.Crouton;
 import com.core.widget.crouton.Style;
 import com.me.network.app.base.HttpCallback;
@@ -81,16 +82,9 @@ public class ViewUtil {
     private static MaterialDialog loginERPDialog;
     private static List<LoginEntity> erpEntities;
     private static boolean hasErp = true;//是否有erp
-
-
-    private static String oldMsg;
-    private static long time;
-    private static String oldMsg2;
-    private static long time2;
-
-
     public static Crouton crouton;
 
+    public static CustomProgressDialog progressDialog;
 
     public static void ToastMessage(Context cont, String msg) {
         ToastUtil.showToast(cont,msg);
@@ -99,21 +93,6 @@ public class ViewUtil {
 
     public static void ToastMessage(Context cont, String msg, int toastColor, int toastTime) {
         ToastUtil.showToast(cont,msg);
-//        if (cont instanceof Activity) {
-//            if (crouton != null) {
-//                crouton.cancel();
-//                crouton = Crouton.makeText((Activity) cont, msg, toastColor, toastTime);
-//                crouton.show();
-//            } else {
-//                crouton = Crouton.makeText((Activity) cont, msg, toastColor, toastTime);
-//                crouton.show();
-//            }
-//        } else {
-//            if (cont != null) {
-//                Toast.makeText(cont, msg, Toast.LENGTH_SHORT).show();
-//            }
-//        }
-
     }
 
     public static void ShowMessageTitle(Context ct, String msg) {
@@ -275,6 +254,7 @@ public class ViewUtil {
      */
     public static void LoginTask(final String user_phone, final String user_password, final Context ct) {
         ViewUtil.ct = ct;
+        progressDialog= CustomProgressDialog.createDialog(ct);
         LogUtil.d("AppInfo","password:"+user_password+" phone:"+user_phone);
         mdProcessDialog = new MaterialDialog.Builder(ct).title(
                 MyApplication.getInstance().getString(R.string.app_dialog_title))
@@ -285,24 +265,6 @@ public class ViewUtil {
         if (!((BaseActivity) ViewUtil.ct).isFinishing()) {
             mdProcessDialog.show();
         }
-//        if (!(ct instanceof LoginActivity)) {
-        //取缓存
-//            if (!StringUtil.isEmpty(CommonUtil.getSharedPreferences(ct, "loginJson"))) {
-//                showDialogCompany(CommonUtil.getSharedPreferences(ct, "loginJson"), user_phone, user_password);
-//            }
-//        } else {
-        //登录界面过来,不走缓存
-        /*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");*/
-//        }
         HttpRequest.getInstance().sendRequest(Constants.ACCOUNT_CENTER_HOST,
                 new HttpParams.Builder()
                         .url("sso/login/mobile")
@@ -772,6 +734,9 @@ public class ViewUtil {
         if (DialogUtils.isDialogShowing(mdProcessDialog)){
             mdProcessDialog.dismiss();
         }
+        if (DialogUtils.isDialogShowing(popupWindow)){
+            popupWindow.dismiss();
+        }
         WindowManager windowManager = (WindowManager)ct. getSystemService(Context.WINDOW_SERVICE);
         if (popupWindow == null) {
             LayoutInflater layoutInflater = (LayoutInflater) ct.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
@@ -793,6 +758,7 @@ public class ViewUtil {
                     adapter.notifyDataSetChanged();
                     ItemPopListAdapter.ViewHolder viewHolder= (ItemPopListAdapter.ViewHolder) view.getTag();
                     String text= viewHolder.tvItemName.getText().toString();
+                   
                     selectCompanyItems(selectId, text, phone, password);
                 }});
             popupWindow = new PopupWindow(view, windowManager.getDefaultDisplay().getWidth()- DensityUtil.dp2px(50), LinearLayout.LayoutParams.WRAP_CONTENT);
@@ -1192,6 +1158,7 @@ public class ViewUtil {
     // 登录ERP
     public static void LoginERPTask(String url, String enuu, String master, String username, String password) {
         mdProcessDialog.setContent(MyApplication.getInstance().getString(R.string.login_progress_erp));
+        progressDialog.show();
         String loginToken = CommonUtil.getSharedPreferences(ct, Constants.CACHE.ACCOUNT_CENTER_TOKEN);
         HttpRequest.getInstance().sendRequest(url,
                 new HttpParams.Builder()
@@ -1203,6 +1170,7 @@ public class ViewUtil {
                     @Override
                     public void onSuccess(int flag, Object o) throws Exception {
                         Log.d("erp登录成功", o.toString());
+                        progressDialog.dismiss();
                         if (o != null) {
                             loginErpSuccess(o.toString());
                         }
@@ -1211,6 +1179,7 @@ public class ViewUtil {
                     @Override
                     public void onFail(int flag, String failStr) throws Exception {
                         Log.e("erp登录失败", "登录失败:"+failStr);
+                        progressDialog.dismiss();
                         ToastMessage(MyApplication.getInstance(),"登录失败:"+failStr);
                         mdProcessDialog.setContent("登录失败");
                         new Handler().postDelayed(new Runnable() {

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

@@ -6,8 +6,8 @@
 
     <ImageView
         android:id="@+id/loadingImageView"
-        android:layout_width="40dp"
-        android:layout_height="40dp"
+        android:layout_width="50dp"
+        android:layout_height="50dp"
         android:layout_gravity="center"
         android:background="@anim/progress_round">
     </ImageView>

+ 5 - 4
app_modular/appmusic/src/main/res/layout/activity_main_music.xml

@@ -51,14 +51,15 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginLeft="10dp"
+            android:layout_alignParentLeft="true"
             android:layout_centerVertical="true"
             android:text="00:00" />
         <include
             android:id="@+id/include_player_seekbar"
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="20dp"
             android:layout_centerVertical="true"
-            android:layout_toEndOf="@+id/tv_timeStart"
+            android:layout_toLeftOf="@+id/tv_timeTotal"
             android:layout_toRightOf="@+id/tv_timeStart"
             layout="@layout/seekbar" />
 
@@ -67,8 +68,8 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_centerVertical="true"
-            android:layout_marginRight="5dp"
-            android:layout_toRightOf="@+id/include_player_seekbar"
+            android:layout_alignParentRight="true"
+            android:layout_marginRight="10dp"
             android:text="00:00" />
         </RelativeLayout>
     </RelativeLayout>

+ 5 - 3
app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/form/FormListSelectActivity.java

@@ -359,10 +359,12 @@ public class FormListSelectActivity extends BaseActivity implements View.OnClick
                 }
                 if (itemMap.get(statusKey) == null) {
                     ToastMessage("单据状态为空!");
-                    return;
+                    status="已提交";//修复报销单bug
+                   // return;
+                }else {
+                    LogUtil.d("状态:" + itemMap.get(statusKey).toString());
+                    status = itemMap.get(statusKey).toString();
                 }
-                LogUtil.d("状态:" + itemMap.get(statusKey).toString());
-                status = itemMap.get(statusKey).toString();
                 Intent it_detail = null;
                 if ("SignMain".equals(from)) {
                     if ("Ask4Leave".equals(caller)) {