Browse Source

添加明细

RaoMeng 6 years ago
parent
commit
8335d066df

+ 3 - 3
WeiChat/version.properties

@@ -1,5 +1,5 @@
-#Fri Jul 12 09:02:41 CST 2019
+#Mon Jul 15 09:48:21 CST 2019
 debugName=972
-versionName=697
+versionName=699
 debugCode=972
-versionCode=252
+versionCode=254

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

@@ -680,7 +680,7 @@ public class BillAdapter extends RecyclerView.Adapter<BillAdapter.BaseViewHolder
             newBillGroupModel.addShow(new BillGroupModel.BillModel(e));
         }
         for (BillGroupModel.BillModel e : oldBillGroupModel.getHideBillFields()) {
-            newBillGroupModel.addHide(e);
+            newBillGroupModel.addHide(new BillGroupModel.BillModel(e));
         }
         return newBillGroupModel;
     }

+ 16 - 2
app_modular/apputils/src/main/java/com/modular/apputils/model/BillGroupModel.java

@@ -1,5 +1,7 @@
 package com.modular.apputils.model;
 
+import android.text.TextUtils;
+
 import com.common.data.StringUtil;
 
 import java.io.Serializable;
@@ -256,8 +258,6 @@ public class BillGroupModel implements Serializable {
             this.logicType = e.logicType;
             this.readOnly = e.readOnly;//
             this.field = e.field;//字段
-            this.value = "";//值
-            this.display = "";
             this.defValue = e.defValue;//
             this.renderer = e.renderer;
             this.enclusureId = e.enclusureId;
@@ -268,6 +268,14 @@ public class BillGroupModel implements Serializable {
             this.mTabList = e.mTabList;
             this.updatable = e.updatable;
             this.editable = "";//复制字段时要重置
+            if (!isShow(e) && !TextUtils.isEmpty(e.renderer) && e.renderer.contains("defaultValue")) {
+                //隐藏字段,renderer里包含defaultValue,则复制value
+                this.value = e.value;
+                this.display = e.display;
+            } else {
+                this.value = "";//值
+                this.display = "";
+            }
         }
 
         public float getDetno() {
@@ -461,6 +469,11 @@ public class BillGroupModel implements Serializable {
         public void setEditable(String editable) {
             this.editable = editable;
         }
+
+
+        private boolean isShow(BillGroupModel.BillModel mBillModel) {
+            return mBillModel.getIsdefault() == -1 && !mBillModel.getType().equals("H");
+        }
     }
 
     public static class GridTab implements Serializable {
@@ -533,4 +546,5 @@ public class BillGroupModel implements Serializable {
                 ", mGridTabs=" + mGridTabs +
                 '}';
     }
+
 }