فهرست منبع

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

Arison 7 سال پیش
والد
کامیت
9fe5b42d79

+ 7 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/ui/me/MeFragment.java

@@ -40,6 +40,7 @@ import com.common.data.JSONUtil;
 import com.common.data.ListUtils;
 import com.common.data.StringUtil;
 import com.common.preferences.PreferenceUtils;
+import com.common.preferences.RedSpUtil;
 import com.common.system.DisplayUtil;
 import com.common.system.PermissionUtil;
 import com.core.adapter.ItemPopListAdapter;
@@ -215,6 +216,7 @@ public class MeFragment extends EasyFragment implements View.OnClickListener, On
     };
     private Boolean platform;
     private FrameLayout vg;
+    private View workCardRedTv;
 
     public MeFragment() {
     }
@@ -317,6 +319,9 @@ public class MeFragment extends EasyFragment implements View.OnClickListener, On
         View workCardRl = findViewById(R.id.workCardRl);
         workCardRl.setVisibility(View.VISIBLE);
         workCardRl.setOnClickListener(this);
+        workCardRedTv = findViewById(R.id.workCardRedTv);
+        workCardRedTv.setVisibility(RedSpUtil.api().getBoolean("workCardClicked",false)?View.GONE:View.VISIBLE);
+
         findViewById(R.id.my_friend_rl).setOnClickListener(this);
         findViewById(R.id.my_space_rl).setOnClickListener(this);
         findViewById(R.id.local_video_rl).setOnClickListener(this);
@@ -501,6 +506,8 @@ public class MeFragment extends EasyFragment implements View.OnClickListener, On
         int id = v.getId();
         switch (id) {
             case R.id.workCardRl:
+                workCardRedTv.setVisibility(View.GONE);
+                RedSpUtil.api().put("workCardClicked",true);
                 startActivity(new Intent(ct, WorkCardActivity.class));
                 break;
             case R.id.rl_company_change://公司切换

+ 1 - 2
app_core/common/src/main/assets/work_menu.json

@@ -258,13 +258,12 @@
         "isLocalMenu": true,
         "menuName": "str_work_business_manage",
         "menuIcon": "ic_work_business_manage",
-        "menuActivity": "com.modular.crm.BusinessActivity",
+        "menuActivity": "com.modular.work.BusinessManageHomeActivity",
         "menuTag": "local_business_manage",
         "menuUrl": "",
         "caller": "",
         "isHide": false
       },
-     
       {
         "isLocalMenu": true,
         "menuName": "str_work_customer_manage",

BIN
app_core/common/src/main/res/drawable-hdpi/icon_my_scheduler.png


BIN
app_core/common/src/main/res/drawable-xhdpi/icon_my_scheduler.png


BIN
app_core/common/src/main/res/drawable-xxhdpi/icon_my_scheduler.png


+ 12 - 1
app_core/common/src/main/res/layout/fragment_me.xml

@@ -485,7 +485,18 @@
                 android:layout_alignParentBottom="true"
                 android:background="@color/item_line" />
 
-
+            <TextView
+                android:id="@+id/workCardRedTv"
+                android:layout_width="10dp"
+                android:layout_height="10dp"
+                android:layout_alignParentRight="true"
+                android:layout_centerInParent="true"
+                android:layout_marginRight="23dp"
+                android:layout_marginTop="12dp"
+                android:visibility="gone"
+                android:background="@drawable/hongdian"
+                android:textColor="@android:color/white"
+                android:textSize="10.0dip" />
             <TextView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"

+ 21 - 15
app_core/common/src/main/res/layout/item_approval_node.xml

@@ -1,8 +1,9 @@
 <?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="wrap_content"
-    android:orientation="vertical">
+              xmlns:tools="http://schemas.android.com/tools"
+              android:layout_width="match_parent"
+              android:layout_height="wrap_content"
+              android:orientation="vertical">
 
     <View
         android:id="@+id/padding"
@@ -16,26 +17,28 @@
 
 
         <LinearLayout
-            android:paddingTop="@dimen/padding"
             android:id="@+id/timeLl"
             android:layout_width="47sp"
             android:layout_height="match_parent"
             android:layout_centerVertical="true"
-            android:gravity="center|right"
             android:layout_marginLeft="@dimen/padding"
-            android:orientation="vertical">
+            android:gravity="center|right"
+            android:orientation="vertical"
+            android:paddingTop="@dimen/padding">
 
             <TextView
                 android:id="@+id/dateTv"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:textSize="14sp" />
+                android:textSize="14sp"
+                tools:text="10-17" />
 
             <TextView
                 android:id="@+id/timeTv"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:textSize="14sp" />
+                android:textSize="14sp"
+                tools:text="10:57" />
         </LinearLayout>
 
         <ImageView
@@ -76,7 +79,8 @@
             android:layout_alignParentRight="true"
             android:layout_alignTop="@id/handIv"
             android:paddingRight="@dimen/padding"
-            android:textSize="12sp" />
+            android:textSize="12sp"
+            tools:text="等待审批" />
 
         <TextView
             android:id="@+id/keyTv"
@@ -84,11 +88,12 @@
             android:layout_width="wrap_content"
             android:layout_alignTop="@id/handIv"
             android:layout_toRightOf="@id/handIv"
-            android:maxWidth="180dp"
-            android:maxLines="3"
             android:ellipsize="end"
+            android:maxLines="3"
+            android:maxWidth="180dp"
             android:textColor="#999999"
-            android:textSize="14sp" />
+            android:textSize="14sp"
+            tools:text="饶猛" />
 
         <ImageView
             android:id="@+id/changeUser"
@@ -98,8 +103,8 @@
             android:layout_marginLeft="@dimen/padding"
             android:layout_toRightOf="@id/keyTv"
             android:padding="2dp"
-            android:visibility="gone"
-            android:src="@drawable/change_user" />
+            android:src="@drawable/change_user"
+            android:visibility="gone" />
 
         <TextView
             android:id="@+id/valuesTv"
@@ -108,6 +113,7 @@
             android:layout_toLeftOf="@id/statusTv"
             android:layout_toRightOf="@id/handIv"
             android:textColor="@color/done_approval"
-            android:textSize="@dimen/text_min" />
+            android:textSize="@dimen/text_min"
+            tools:text="审批意见" />
     </RelativeLayout>
 </LinearLayout>

+ 54 - 56
app_modular/appmessages/src/main/java/com/modular/appmessages/activity/RealTimeFormActivity.java

@@ -5,7 +5,6 @@ import android.os.Bundle;
 import android.support.v7.widget.GridLayoutManager;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
-import android.text.TextUtils;
 import android.view.View;
 import android.widget.LinearLayout;
 import android.widget.TextView;
@@ -16,7 +15,6 @@ import com.alibaba.fastjson.JSONObject;
 import com.common.data.JSONUtil;
 import com.core.api.wxapi.ApiPlatform;
 import com.core.api.wxapi.ApiUtils;
-import com.core.app.Constants;
 import com.core.base.BaseActivity;
 import com.core.utils.CommonUtil;
 import com.core.utils.ToastUtil;
@@ -72,65 +70,65 @@ public class RealTimeFormActivity extends BaseActivity {
     }
 
     private void initData() {
-        final String realTimeCache = CommonUtil.getSharedPreferences(this, Constants.REAL_TIME_CACHE);
-        if (!TextUtils.isEmpty(realTimeCache) && JSONUtil.validate(realTimeCache)) {
-            JSONArray realTimeArray = JSON.parseArray(realTimeCache);
-            if (realTimeArray != null && realTimeArray.size() > 0) {
-                for (int i = 0; i < realTimeArray.size(); i++) {
-                    RealTimeFormMenuBean realTimeFormMenuBean = new RealTimeFormMenuBean();
-                    JSONObject realTimeObject = realTimeArray.getJSONObject(i);
-                    realTimeFormMenuBean.setId(JSONUtil.getInt(realTimeObject, "ID"));
-                    realTimeFormMenuBean.setTitle(JSONUtil.getText(realTimeObject, "TITLE"));
-                    realTimeFormMenuBean.setColor(mGridColors[(i) % mGridColors.length]);
-
-                    mRealTimeFormMenuBeen.add(realTimeFormMenuBean);
-                }
-            }
-
-            mRealTimeFormMenuAdapter.notifyDataSetChanged();
-        } else {
-            progressDialog.show();
-            HttpClient mHttpClient = new HttpClient.Builder(CommonUtil.getAppBaseUrl(RealTimeFormActivity.this)).build();
-            mHttpClient.Api().send(new HttpClient.Builder()
-                    .url("mobile/getRealTimeSubs.action")
-                    .add("sessionId", CommonUtil.getSharedPreferences(ct, "sessionId"))
-                    .header("Cookie", CommonUtil.getErpCookie(ct))
-                    .method(Method.GET)
-                    .build(), new ResultSubscriber<Object>(new Result2Listener<Object>() {
-                @Override
-                public void onResponse(Object o) {
-                    progressDialog.dismiss();
-                    String result = o.toString();
-                    JSONObject object = JSON.parseObject(result);
+//        final String realTimeCache = CommonUtil.getSharedPreferences(this, Constants.REAL_TIME_CACHE);
+//        if (!TextUtils.isEmpty(realTimeCache) && JSONUtil.validate(realTimeCache)) {
+//            JSONArray realTimeArray = JSON.parseArray(realTimeCache);
+//            if (realTimeArray != null && realTimeArray.size() > 0) {
+//                for (int i = 0; i < realTimeArray.size(); i++) {
+//                    RealTimeFormMenuBean realTimeFormMenuBean = new RealTimeFormMenuBean();
+//                    JSONObject realTimeObject = realTimeArray.getJSONObject(i);
+//                    realTimeFormMenuBean.setId(JSONUtil.getInt(realTimeObject, "ID"));
+//                    realTimeFormMenuBean.setTitle(JSONUtil.getText(realTimeObject, "TITLE"));
+//                    realTimeFormMenuBean.setColor(mGridColors[(i) % mGridColors.length]);
+//
+//                    mRealTimeFormMenuBeen.add(realTimeFormMenuBean);
+//                }
+//            }
+//
+//            mRealTimeFormMenuAdapter.notifyDataSetChanged();
+//        } else {
+        progressDialog.show();
+        HttpClient mHttpClient = new HttpClient.Builder(CommonUtil.getAppBaseUrl(RealTimeFormActivity.this)).build();
+        mHttpClient.Api().send(new HttpClient.Builder()
+                .url("mobile/getRealTimeSubs.action")
+                .add("sessionId", CommonUtil.getSharedPreferences(ct, "sessionId"))
+                .header("Cookie", CommonUtil.getErpCookie(ct))
+                .method(Method.GET)
+                .build(), new ResultSubscriber<Object>(new Result2Listener<Object>() {
+            @Override
+            public void onResponse(Object o) {
+                progressDialog.dismiss();
+                String result = o.toString();
+                JSONObject object = JSON.parseObject(result);
 
-                    JSONArray subsArray = object.getJSONArray("subs");
-                    if (subsArray != null && subsArray.size() > 0) {
-                        for (int i = 0; i < subsArray.size(); i++) {
-                            RealTimeFormMenuBean realTimeFormMenuBean = new RealTimeFormMenuBean();
-                            JSONObject realTimeObject = subsArray.getJSONObject(i);
-                            realTimeFormMenuBean.setId(JSONUtil.getInt(realTimeObject, "ID"));
-                            realTimeFormMenuBean.setTitle(JSONUtil.getText(realTimeObject, "TITLE"));
-                            realTimeFormMenuBean.setColor(mGridColors[(i) % mGridColors.length]);
+                JSONArray subsArray = object.getJSONArray("subs");
+                if (subsArray != null && subsArray.size() > 0) {
+                    for (int i = 0; i < subsArray.size(); i++) {
+                        RealTimeFormMenuBean realTimeFormMenuBean = new RealTimeFormMenuBean();
+                        JSONObject realTimeObject = subsArray.getJSONObject(i);
+                        realTimeFormMenuBean.setId(JSONUtil.getInt(realTimeObject, "ID"));
+                        realTimeFormMenuBean.setTitle(JSONUtil.getText(realTimeObject, "TITLE"));
+                        realTimeFormMenuBean.setColor(mGridColors[(i) % mGridColors.length]);
 
-                            mRealTimeFormMenuBeen.add(realTimeFormMenuBean);
-                        }
-                        mRealTimeFormMenuAdapter.notifyDataSetChanged();
-                    } else {
-                        ToastUtil.showToast(RealTimeFormActivity.this, "看板数据为空");
-                        mEmptyLayout.setVisibility(View.VISIBLE);
-                        mEmptyTextView.setText("看板数据为空");
+                        mRealTimeFormMenuBeen.add(realTimeFormMenuBean);
                     }
-                }
-
-                @Override
-                public void onFailure(Object t) {
-                    progressDialog.dismiss();
-                    ToastUtil.showToast(RealTimeFormActivity.this, "看板数据获取失败");
+                    mRealTimeFormMenuAdapter.notifyDataSetChanged();
+                } else {
+                    ToastUtil.showToast(RealTimeFormActivity.this, "看板数据为空");
                     mEmptyLayout.setVisibility(View.VISIBLE);
-                    mEmptyTextView.setText("看板数据获取失败");
+                    mEmptyTextView.setText("看板数据为空");
                 }
-            }));
-        }
+            }
+
+            @Override
+            public void onFailure(Object t) {
+                progressDialog.dismiss();
+                ToastUtil.showToast(RealTimeFormActivity.this, "看板数据获取失败");
+                mEmptyLayout.setVisibility(View.VISIBLE);
+                mEmptyTextView.setText("看板数据获取失败");
+            }
+        }));
+//        }
     }
 
     private void initView() {

+ 16 - 12
app_modular/appmessages/src/main/java/com/modular/appmessages/presenter/ApprovaPresenter.java

@@ -876,19 +876,21 @@ public class ApprovaPresenter implements OnHttpResultListener {
                     approval.setgCaller(gCaller);
                     approval.setCoreKey(coreKey);
                 }
-                if (!StringUtil.isEmpty(renderer) && renderer.contains("formula:")) try {
-                    renderer = renderer.substring("formula:".length(), renderer.length());
-                    renderer = getOperator(renderer, data);
-                    if (renderer.contains("字段需要设置为app显示")) {
-                        newValues = renderer;
-                    } else {
-                        double val = MathUtil.eval(renderer);
-                        if (val != Double.NEGATIVE_INFINITY && val != Double.POSITIVE_INFINITY) {
-                            newValues = getDecimalFormat(val);
+                if (!StringUtil.isEmpty(renderer) && renderer.contains("formula:")) {
+                    try {
+                        renderer = renderer.substring("formula:".length(), renderer.length());
+                        renderer = getOperator(renderer, data);
+                        if (renderer.contains("字段需要设置为app显示")) {
+                            newValues = renderer;
+                        } else {
+                            double val = MathUtil.eval(renderer);
+                            if (val != Double.NEGATIVE_INFINITY && val != Double.POSITIVE_INFINITY) {
+                                newValues = getDecimalFormat(val);
+                            }
                         }
-                    }
 
-                } catch (Exception e) {
+                    } catch (Exception e) {
+                    }
                 }
             }
 
@@ -993,7 +995,9 @@ public class ApprovaPresenter implements OnHttpResultListener {
                 approval.setNeerInput(false);
             }
             approval.data2Values();
-            if ((!approval.isNeerInput() && StringUtil.isEmpty(approval.getValues())) || !showAble || approval.getValues().equals("null") || !showAble || approval.getValues().equals("(null)")) {
+            if ((!approval.isNeerInput() && StringUtil.isEmpty(approval.getValues())) || !showAble
+                    || approval.getValues().equals("null") || !showAble
+                    || approval.getValues().equals("(null)")) {
                 continue;//如果不是要输入的对象,同时显示值为空,需要隐藏去
             }
             //合并字段

+ 9 - 1
app_modular/appworks/src/main/java/com/uas/appworks/adapter/BusinessRecordsAdapter.java

@@ -1,6 +1,7 @@
 package com.uas.appworks.adapter;
 
 import android.support.annotation.Nullable;
+import android.text.TextUtils;
 
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.BaseViewHolder;
@@ -26,6 +27,13 @@ public class BusinessRecordsAdapter extends BaseQuickAdapter<BusinessFollowBean,
         helper.setText(R.id.business_records_dotime_tv, item.getDotime());
         helper.setText(R.id.business_records_stage_tv, item.getGeneration()
                 + "->" + item.getNextgeneration() + "(" + item.getType() + ")");
-        helper.setText(R.id.business_records_remark_tv, item.getRemark());
+        String remarkbf = item.getRemarkbf();
+        String remarkdt = item.getRemarkdt();
+        String remark = "";
+        if (!TextUtils.isEmpty(remarkbf)) {
+            remark = remarkbf + ";";
+        }
+        remark += remarkdt;
+        helper.setText(R.id.business_records_remark_tv, remark);
     }
 }

+ 2 - 0
app_modular/appworks/src/main/java/com/uas/appworks/fragment/BusinessRecordsFragment.java

@@ -129,6 +129,8 @@ public class BusinessRecordsFragment extends BaseMVPFragment<SimplePresenter> im
                     businessFollowBean.setNextgeneration(JSONUtil.getText(listData, "nextgeneration"));
                     businessFollowBean.setType(JSONUtil.getText(listData, "type"));
                     businessFollowBean.setDotime(JSONUtil.getText(listData, "dotime"));
+                    businessFollowBean.setRemarkbf(JSONUtil.getText(listData, "remarkbf"));
+                    businessFollowBean.setRemarkdt(JSONUtil.getText(listData, "remarkdt"));
 
                     mBusinessFollowBeans.add(businessFollowBean);
                 }

+ 18 - 0
app_modular/appworks/src/main/java/com/uas/appworks/model/bean/BusinessFollowBean.java

@@ -22,6 +22,8 @@ public class BusinessFollowBean {
     private String remark;
     private String type;
     private String dotime;
+    private String remarkbf;
+    private String remarkdt;
 
     public String getGeneration() {
         return generation;
@@ -70,4 +72,20 @@ public class BusinessFollowBean {
     public void setDotime(String dotime) {
         this.dotime = dotime;
     }
+
+    public String getRemarkbf() {
+        return remarkbf;
+    }
+
+    public void setRemarkbf(String remarkbf) {
+        this.remarkbf = remarkbf;
+    }
+
+    public String getRemarkdt() {
+        return remarkdt;
+    }
+
+    public void setRemarkdt(String remarkdt) {
+        this.remarkdt = remarkdt;
+    }
 }