Sfoglia il codice sorgente

提交分类: 打包版本;
提交内容: 1、详情页已审批单据更新需求前期准备
当前版本: 正式版本6.6.2
是否冲突: 否

RaoMeng 7 anni fa
parent
commit
ee6e8d8c32

+ 3 - 0
WeiChat/build.gradle

@@ -93,6 +93,9 @@ android {
         ndk {
             abiFilters "armeabi", "armeabi-v7a", "x86", "mips", "x86_64", "mips64"
         }
+
+        renderscriptTargetApi rootProject.ext.android.compileSdkVersion
+        renderscriptSupportModeEnabled true
     }
 
     useLibrary 'org.apache.http.legacy'

+ 39 - 36
WeiChat/src/main/AndroidManifest.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest package="com.xzjmyk.pm.activity"
           xmlns:android="http://schemas.android.com/apk/res/android"
+          xmlns:tools="http://schemas.android.com/tools"
           android:versionCode="158"
-    xmlns:tools="http://schemas.android.com/tools"
           android:versionName="6.1.9">
 
     <uses-sdk
@@ -95,7 +95,7 @@
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
     <uses-permission android:name="android.permission.VIBRATE" />
     <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
-    
+
     <!-- 设置索尼的Badge需添加权限 -->
     <uses-permission android:name="com.sonyericsson.home.permission.BROADCAST_BADGE" />
 
@@ -115,10 +115,10 @@
         android:hardwareAccelerated="true"
         android:icon="@drawable/uuu"
         android:label="@string/app_name"
-        tools:replace="android:icon,android:theme"
         android:largeHeap="true"
         android:persistent="true"
-        android:theme="@style/MainBaseTheme">
+        android:theme="@style/MainBaseTheme"
+        tools:replace="icon,label,theme">
         <meta-data
             android:name="UMENG_CHANNEL"
             android:value="${UMENG_CHANNEL_VALUE}" />
@@ -260,7 +260,8 @@
         <activity android:name=".ui.erp.activity.NewsTwoActivity" />
         <activity android:name=".ui.erp.activity.NoticesActivity" />
         <activity android:name=".ui.erp.activity.InformActivity" />
-        <activity android:name=".ui.platform.task.TaskActivity"
+        <activity
+            android:name=".ui.platform.task.TaskActivity"
             android:theme="@style/MainBaseTheme">
             <intent-filter>
                 <action android:name="com.modular.task.TaskActivity" />
@@ -301,7 +302,8 @@
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
         </activity>
-        <activity android:name=".ui.message.MucChatActivity"
+        <activity
+            android:name=".ui.message.MucChatActivity"
             android:theme="@style/MainBaseTheme">
             <intent-filter>
                 <action android:name="com.modular.message.MucChatActivity" />
@@ -374,7 +376,7 @@
 
         <activity android:name=".video.VideoRecordActivity" />
         <activity
-            android:name="com.uas.appme.other.activity.CardcastActivity"/>
+            android:name="com.uas.appme.other.activity.CardcastActivity" />
         <activity
             android:name="com.uas.appme.other.activity.BasicInfoEditActivity"
             android:windowSoftInputMode="stateHidden|stateAlwaysHidden" />
@@ -536,22 +538,22 @@
             android:enabled="true"
             android:process=":remote" />
 
-       <!-- <activity
-            android:name="com.baidu.autoupdatesdk.ConfirmDialoigActivity"
-            android:configChanges="keyboardHidden|orientation"
-            android:exported="false"
-            android:screenOrientation="portrait"
-            android:theme="@style/bdp_update_dialog_style_fullscreen" />-->
+        <!-- <activity
+             android:name="com.baidu.autoupdatesdk.ConfirmDialoigActivity"
+             android:configChanges="keyboardHidden|orientation"
+             android:exported="false"
+             android:screenOrientation="portrait"
+             android:theme="@style/bdp_update_dialog_style_fullscreen" />-->
 
         <!--<receiver-->
-            <!--android:name="com.baidu.autoupdatesdk.receiver.BDBroadcastReceiver"-->
-            <!--android:exported="false">-->
-            <!--<intent-filter>-->
-                <!--<action android:name="com.baidu.autoupdatesdk.ACTION_NEW_UPDATE" />-->
-                <!--<action android:name="com.baidu.autoupdatesdk.ACTION_DOWNLOAD_COMPLETE" />-->
-                <!--<action android:name="com.baidu.autoupdatesdk.ACTION_NEW_AS" />-->
-                <!--<action android:name="com.baidu.autoupdatesdk.ACTION_AS_DOWNLOAD_COMPLETE" />-->
-            <!--</intent-filter>-->
+        <!--android:name="com.baidu.autoupdatesdk.receiver.BDBroadcastReceiver"-->
+        <!--android:exported="false">-->
+        <!--<intent-filter>-->
+        <!--<action android:name="com.baidu.autoupdatesdk.ACTION_NEW_UPDATE" />-->
+        <!--<action android:name="com.baidu.autoupdatesdk.ACTION_DOWNLOAD_COMPLETE" />-->
+        <!--<action android:name="com.baidu.autoupdatesdk.ACTION_NEW_AS" />-->
+        <!--<action android:name="com.baidu.autoupdatesdk.ACTION_AS_DOWNLOAD_COMPLETE" />-->
+        <!--</intent-filter>-->
         <!--</receiver>-->
 
         <activity
@@ -630,7 +632,7 @@
             android:label="申请订阅" />
         <activity
             android:name=".ui.erp.activity.oa.OutofficeSetActivity"
-            android:label="@string/signin_setting"/>
+            android:label="@string/signin_setting" />
         <activity android:name=".ui.erp.activity.oa.TestActivity" />
         <activity
             android:name=".ui.erp.activity.oa.OutSigninOKActivity"
@@ -645,14 +647,15 @@
             android:label="@string/my_mission" />
         <activity android:name=".ui.erp.activity.crm.SubsActivity" />
         <activity android:name="com.uas.appme.other.activity.UpdateSingleTextActivity" />
-        <activity android:name="com.uas.appme.other.activity.UpdateSexActivity" >
+        <activity android:name="com.uas.appme.other.activity.UpdateSexActivity">
             <intent-filter>
                 <action android:name="com.modular.me.UpdateSexActivity" />
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
         </activity>
 
-        <activity android:name=".ui.erp.activity.oa.OAActivity"
+        <activity
+            android:name=".ui.erp.activity.oa.OAActivity"
             android:theme="@style/MainBaseTheme">
             <intent-filter>
                 <action android:name="com.modular.work.OAActivity" />
@@ -666,11 +669,11 @@
             android:value="57ea27bb67e58e088c003bbf" />
         <!-- weixin -->
         <!--<activity-->
-            <!--android:name="com.core.api.wxapi.WXEntryActivity"-->
-            <!--android:configChanges="keyboardHidden|orientation|screenSize"-->
-            <!--android:exported="true"-->
-            <!--android:screenOrientation="portrait"-->
-            <!--android:theme="@android:style/Theme.Translucent.NoTitleBar" />-->
+        <!--android:name="com.core.api.wxapi.WXEntryActivity"-->
+        <!--android:configChanges="keyboardHidden|orientation|screenSize"-->
+        <!--android:exported="true"-->
+        <!--android:screenOrientation="portrait"-->
+        <!--android:theme="@android:style/Theme.Translucent.NoTitleBar" />-->
         <!-- qq -->
         <activity
             android:name="com.tencent.tauth.AuthActivity"
@@ -828,8 +831,6 @@
         <!-- 动态表单 -->
 
 
-
-
         <activity android:name=".ui.me.SpeechrecognitionActivity" />
         <activity android:name=".ui.erp.activity.oa.ErpActivity" />
         <activity
@@ -913,7 +914,8 @@
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
         </activity>
-        <activity android:name=".ui.platform.task.TaskB2BActivity"
+        <activity
+            android:name=".ui.platform.task.TaskB2BActivity"
             android:theme="@style/MainBaseTheme">
             <intent-filter>
                 <action android:name="com.modular.task.TaskB2BActivity" />
@@ -1001,7 +1003,8 @@
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
         </activity>
-        <activity android:name=".ui.erp.activity.secretary.BookingListActivity"
+        <activity
+            android:name=".ui.erp.activity.secretary.BookingListActivity"
             android:label="@string/booking_menu"
             android:theme="@style/MainBaseTheme">
             <intent-filter>
@@ -1013,7 +1016,7 @@
             android:name=".ui.erp.activity.secretary.BookingAddActivity"
             android:label="@string/booking_add"
             android:theme="@style/MainBaseTheme"
-            android:windowSoftInputMode="adjustPan" >
+            android:windowSoftInputMode="adjustPan">
             <intent-filter>
                 <action android:name="com.ui.erp.activity.secretary.BookingAddActivity" />
                 <category android:name="android.intent.category.DEFAULT" />
@@ -1070,13 +1073,13 @@
 
         <!-- android:authorities="包名.fileprovider"将“包名”替换为实际包名 -->
         <provider
-            android:authorities="com.xzjmyk.pm.activity.fileprovider"
             android:name="android.support.v4.content.FileProvider"
+            android:authorities="com.xzjmyk.pm.activity.fileprovider"
             android:exported="false"
             android:grantUriPermissions="true">
             <meta-data
                 android:name="android.support.FILE_PROVIDER_PATHS"
-                android:resource="@xml/provider_paths"/>
+                android:resource="@xml/provider_paths" />
         </provider>
     </application>
 

+ 1 - 2
app_core/common/build.gradle

@@ -76,6 +76,5 @@ dependencies {
     compile files('libs/hellocharts-library-1.5.8.jar')
     compile deps.wechatSdk
     compile 'com.github.hss01248:NotifyUtil:1.0.1'
-//    compile project(':smart-refresh-layout')
-//    compile project(':smart-refresh-header')
+//    compile deps.basePopup
 }

+ 25 - 11
app_modular/apputils/src/main/java/com/modular/apputils/adapter/BillAdapter.java

@@ -40,7 +40,10 @@ public class BillAdapter extends RecyclerView.Adapter<BillAdapter.BaseViewHolder
     public Context ct;
     protected List<BillGroupModel> mBillGroupModels;
     protected List<BillGroupModel.BillModel> mShowBillModels;
+    //主表的字段列表
     protected List<BillGroupModel.BillModel> mFormBillModels;
+    //可更新的字段列表
+    protected List<BillGroupModel.BillModel> mUpdateBillModels;
     protected OnAdapterListener mOnAdapterListener;
     protected int mTabIndex = -1;
     private int mTabPosition = 0;
@@ -103,6 +106,11 @@ public class BillAdapter extends RecyclerView.Adapter<BillAdapter.BaseViewHolder
         } else {
             mFormBillModels.clear();
         }
+        if (mUpdateBillModels == null) {
+            mUpdateBillModels = new ArrayList<>();
+        } else {
+            mUpdateBillModels.clear();
+        }
 
         for (int i = 0; i < mBillGroupModels.size(); i++) {
             BillGroupModel e = mBillGroupModels.get(i);
@@ -114,19 +122,25 @@ public class BillAdapter extends RecyclerView.Adapter<BillAdapter.BaseViewHolder
                     mTabBillModel.setTabList(gridTabs);
                     mTabBillModel.setGroupIndex(i);
                     mShowBillModels.add(mTabBillModel);
-                } else if (e.getShowBillFields() != null && !e.getShowBillFields().isEmpty()) {
-                    if (!TextUtils.isEmpty(e.getGroup())) {
-                        BillGroupModel.BillModel mTitleBillModel = new BillGroupModel.BillModel();
-                        mTitleBillModel.setGroupIndex(i);
-                        mTitleBillModel.setType(BillGroupModel.Constants.TYPE_TITLE);
-                        mTitleBillModel.setCaption(e.getGroup());
-                        mTitleBillModel.setAllowBlank(e.isDeleteAble() ? "T" : "F");
-                        mShowBillModels.add(mTitleBillModel);
+                } else {
+                    if (e.getShowBillFields() != null && !e.getShowBillFields().isEmpty()) {
+                        if (!TextUtils.isEmpty(e.getGroup())) {
+                            BillGroupModel.BillModel mTitleBillModel = new BillGroupModel.BillModel();
+                            mTitleBillModel.setGroupIndex(i);
+                            mTitleBillModel.setType(BillGroupModel.Constants.TYPE_TITLE);
+                            mTitleBillModel.setCaption(e.getGroup());
+                            mTitleBillModel.setAllowBlank(e.isDeleteAble() ? "T" : "F");
+                            mShowBillModels.add(mTitleBillModel);
+                        }
+                        mShowBillModels.addAll(e.getShowBillFields());
+
+                        if (!e.isForm() && e.isLastInType()) {
+                            mShowBillModels.add(getAddModel(i));
+                        }
                     }
-                    mShowBillModels.addAll(e.getShowBillFields());
 
-                    if (!e.isForm() && e.isLastInType()) {
-                        mShowBillModels.add(getAddModel(i));
+                    if (e.getUpdateBillFields() != null && !e.getUpdateBillFields().isEmpty()) {
+                        mUpdateBillModels.addAll(e.getUpdateBillFields());
                     }
                 }
 

+ 19 - 0
app_modular/apputils/src/main/java/com/modular/apputils/model/BillGroupModel.java

@@ -28,6 +28,7 @@ public class BillGroupModel {
 
     private List<BillModel> hideBillFields;//当前组隐藏的字段列表
     private List<BillModel> showBillFields;//当前组显示的字段列表
+    private List<BillModel> updateBillFields;//当前组可更新的字段列表
 
     private List<GridTab> mGridTabs;
 
@@ -152,6 +153,14 @@ public class BillGroupModel {
         this.showBillFields = showBillFields;
     }
 
+    public List<BillModel> getUpdateBillFields() {
+        return updateBillFields;
+    }
+
+    public void setUpdateBillFields(List<BillModel> updateBillFields) {
+        this.updateBillFields = updateBillFields;
+    }
+
     public List<GridTab> getGridTabs() {
         return mGridTabs;
     }
@@ -218,6 +227,7 @@ public class BillGroupModel {
         private List<LocalData> localDatas;//获取到的本地选择数据
         private BillJump mBillJump;//判断是否需要要跳转字段
         private List<GridTab> mTabList;
+        private boolean updatable;//是否可更新
 
         public BillModel() {
         }
@@ -241,6 +251,7 @@ public class BillGroupModel {
             this.findFunctionName = e.findFunctionName;
             this.mBillJump = e.mBillJump;
             this.mTabList = e.mTabList;
+            this.updatable = e.updatable;
         }
 
         public float getDetno() {
@@ -403,6 +414,14 @@ public class BillGroupModel {
         public void setTabList(List<GridTab> tabList) {
             mTabList = tabList;
         }
+
+        public boolean isUpdatable() {
+            return updatable;
+        }
+
+        public void setUpdatable(boolean updatable) {
+            this.updatable = updatable;
+        }
     }
 
     public static class GridTab {

+ 9 - 0
app_modular/apputils/src/main/res/menu/menu_input_update.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto">
+
+    <item
+        android:id="@+id/update"
+        android:title="@string/updata"
+        app:showAsAction="always" />
+</menu>

+ 15 - 2
app_modular/appworks/src/main/java/com/uas/appworks/adapter/BillListDetailsAdapter.java

@@ -21,8 +21,9 @@ public class BillListDetailsAdapter extends BaseAdapter {
     private Context ct;
     private List<BillGroupModel> groupModels;
     private List<BillGroupModel.BillModel> mShowBillModels;
+    private List<BillGroupModel.BillModel> mUpdateBillModels;
 
-    public BillListDetailsAdapter(Context ct,List<BillGroupModel> groupModels) {
+    public BillListDetailsAdapter(Context ct, List<BillGroupModel> groupModels) {
         this.ct = ct;
         this.groupModels = groupModels;
         changeBillModel();
@@ -33,6 +34,10 @@ public class BillListDetailsAdapter extends BaseAdapter {
         changeBillModel();
     }
 
+    public List<BillGroupModel.BillModel> getUpdateBillModels() {
+        return mUpdateBillModels;
+    }
+
     public List<BillGroupModel> getGroupModels() {
         return groupModels;
     }
@@ -46,13 +51,21 @@ public class BillListDetailsAdapter extends BaseAdapter {
         } else {
             mShowBillModels.clear();
         }
+        if (mUpdateBillModels == null) {
+            mUpdateBillModels = new ArrayList<>();
+        } else {
+            mUpdateBillModels.clear();
+        }
         for (int i = 0; i < groupModels.size(); i++) {
             BillGroupModel e = groupModels.get(i);
             if (e != null && e.getShowBillFields() != null && !e.getShowBillFields().isEmpty()) {
                 mShowBillModels.addAll(e.getShowBillFields());
             }
+            if (e != null && e.getUpdateBillFields() != null && !e.getUpdateBillFields().isEmpty()) {
+                mUpdateBillModels.addAll(e.getUpdateBillFields());
+            }
         }
-        LogUtil.i("gong","mShowBillModels="+ JSON.toJSONString(mShowBillModels));
+        LogUtil.i("gong", "mShowBillModels=" + JSON.toJSONString(mShowBillModels));
     }
 
 

+ 21 - 27
app_modular/appworks/src/main/java/com/uas/appworks/crm3_0/activity/CustomerVisitDetailsActivity.java

@@ -7,6 +7,7 @@ import android.view.Menu;
 import android.view.MenuItem;
 import android.view.View;
 import android.widget.ListView;
+import android.widget.PopupWindow;
 import android.widget.TextView;
 
 import com.alibaba.fastjson.JSON;
@@ -44,22 +45,27 @@ public class CustomerVisitDetailsActivity extends OABaseActivity {
     private TextView statusTv;
     private String status;
     private boolean isMe;
-    private boolean optionMenuOn = false;
-    private Menu mMenu;
     private String mBillStatus;
+    private List<BillGroupModel> mBillGroupModels;
 
     @Override
     public boolean onPrepareOptionsMenu(Menu menu) {
-        mMenu = menu;
-        checkOptionMenu();
+        menu.clear();
+        if (isMe) {
+            if ("已审核".equals(mBillStatus)) {
+                if (mListAdapter != null && !ListUtils.isEmpty(mListAdapter.getUpdateBillModels())) {
+                    getMenuInflater().inflate(com.modular.apputils.R.menu.menu_input_update, menu);
+                }
+            } else {
+                getMenuInflater().inflate(com.modular.apputils.R.menu.menu_input_edit, menu);
+            }
+        }
         return super.onPrepareOptionsMenu(menu);
     }
 
     @Override
     public boolean onCreateOptionsMenu(Menu menu) {
-        if (isMe && (TextUtils.isEmpty(mBillStatus) || !mBillStatus.equals("已审核"))) {
-            getMenuInflater().inflate(com.modular.apputils.R.menu.menu_input_edit, menu);
-        }
+
         return super.onCreateOptionsMenu(menu);
     }
 
@@ -77,24 +83,15 @@ public class CustomerVisitDetailsActivity extends OABaseActivity {
                             }
                         }
                     });
-        }
-        return super.onOptionsItemSelected(item);
-    }
+        } else if (item.getItemId() == R.id.update) {
+            if (mListAdapter != null && !ListUtils.isEmpty(mListAdapter.getUpdateBillModels())) {
 
-    private void checkOptionMenu() {
-        if (null != mMenu) {
-            if (optionMenuOn) {
-                for (int i = 0; i < mMenu.size(); i++) {
-                    mMenu.getItem(i).setVisible(true);
-                    mMenu.getItem(i).setEnabled(true);
-                }
             } else {
-                for (int i = 0; i < mMenu.size(); i++) {
-                    mMenu.getItem(i).setVisible(false);
-                    mMenu.getItem(i).setEnabled(false);
-                }
+                toast(R.string.no_fields_to_update);
             }
         }
+
+        return super.onOptionsItemSelected(item);
     }
 
     private void unSubmit() {
@@ -216,17 +213,14 @@ public class CustomerVisitDetailsActivity extends OABaseActivity {
     };
 
     private void handlerFormData(JSONObject datas) throws Exception {
-        List<BillGroupModel> mBillGroupModels = new ArrayList<>();
+        mBillGroupModels = new ArrayList<>();
         //配置主表
         JSONArray formdatas = JSONUtil.getJSONArray(datas, "formdata");
         if (!ListUtils.isEmpty(formdatas)) {
             JSONObject formdata = formdatas.getJSONObject(0);//主表数据
             mBillStatus = JSONUtil.getText(formdata, "mp_status");
-//            if (isMe && (TextUtils.isEmpty(mBillStatus) || !mBillStatus.equals("已审核"))) {
-            if (false) {
-                optionMenuOn = true;
-                checkOptionMenu();
-            }
+            //刷新optionsmenu
+            supportInvalidateOptionsMenu();
 
             JSONArray formconfigs = JSONUtil.getJSONArray(datas, "formconfigs");//主表配置
             BillGroupModel mGroupModel = new BillGroupModel();

+ 1 - 0
app_modular/appworks/src/main/res/values-en/strings.xml

@@ -209,4 +209,5 @@
     <string name="company_business_empty">公司商机库为空</string>
     <string name="project_business_chance">项目商机</string>
     <string name="oem_business_chance">OEM商机</string>
+    <string name="no_fields_to_update">没有可更新的字段</string>
 </resources>

+ 1 - 0
app_modular/appworks/src/main/res/values-zh-rCN/strings.xml

@@ -208,4 +208,5 @@
     <string name="company_business_empty">公司商机库为空</string>
     <string name="project_business_chance">项目商机</string>
     <string name="oem_business_chance">OEM商机</string>
+    <string name="no_fields_to_update">没有可更新的字段</string>
 </resources>

+ 1 - 0
app_modular/appworks/src/main/res/values-zh-rTW/strings.xml

@@ -208,4 +208,5 @@
     <string name="company_business_empty">公司商机库为空</string>
     <string name="project_business_chance">项目商机</string>
     <string name="oem_business_chance">OEM商机</string>
+    <string name="no_fields_to_update">没有可更新的字段</string>
 </resources>

+ 1 - 0
app_modular/appworks/src/main/res/values/strings.xml

@@ -252,4 +252,5 @@
     <string name="company_business_empty">公司商机库为空</string>
     <string name="project_business_chance">项目商机</string>
     <string name="oem_business_chance">OEM商机</string>
+    <string name="no_fields_to_update">没有可更新的字段</string>
 </resources>

+ 4 - 2
version.gradle

@@ -51,7 +51,8 @@ ext {
             rxJava2Version                      : '2.0.7',
             rxAndroid2Version                   : '2.0.1',
             bottomsheetVersion                  : '1.5.3',
-            circleprogressbarVersion            : '1.3.0'
+            circleprogressbarVersion            : '1.3.0',
+            basePopupVersion                    : '2.1.5'
     ]
 
     deps = [
@@ -108,7 +109,8 @@ ext {
             rxjava2                      : 'io.reactivex.rxjava2:rxjava:' + depsVersion.rxJava2Version,
             rxandroid2                   : 'io.reactivex.rxjava2:rxandroid:' + depsVersion.rxAndroid2Version,
             bottomsheet                  : 'com.flipboard:bottomsheet-core:' + depsVersion.bottomsheetVersion,
-            circleprogressbar            : 'com.dinuscxj:circleprogressbar:' + depsVersion.circleprogressbarVersion
+            circleprogressbar            : 'com.dinuscxj:circleprogressbar:' + depsVersion.circleprogressbarVersion,
+            basePopup                    : 'com.github.razerdp:BasePopup:' + depsVersion.basePopupVersion
     ]
 }