Browse Source

老版通用表单,去掉字段默认显示值

RaoMeng 6 years ago
parent
commit
56c8425a16

+ 7 - 7
app_core/common/src/main/res/layout/item_comdoc_am.xml

@@ -1,26 +1,26 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout 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">
 
     <TextView
         android:id="@+id/item_comdoc_am_list_tv"
-        android:layout_marginTop="5dp"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
-        android:layout_weight="1"
-        android:text="开始时间:"
+        android:layout_marginTop="5dp"
         android:layout_marginRight="10dp"
+        android:layout_weight="1"
         android:textColor="#6E6E6E"
-        />
+        tools:text="开始时间:" />
 
     <TextView
         android:id="@+id/item_comdoc_am_value_tv"
-        android:layout_marginTop="5dp"
         android:layout_width="0dp"
         android:layout_height="wrap_content"
+        android:layout_marginTop="5dp"
         android:layout_weight="2"
-        android:text="2016-11-25-21:22"
-        android:textColor="@color/done_approval"/>
+        android:textColor="@color/done_approval"
+        tools:text="2016-11-25-21:22" />
 
 </LinearLayout>

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

@@ -233,7 +233,7 @@ public class FormListSelectActivity extends BaseActivity implements View.OnClick
                 } else if ("FeePlease!FYBX".equals(caller)) {
 
                     condition = "fp_pleasemancode='" + CommonUtil.getSharedPreferences(ct, "erp_username") + "'";
-                } else if("ProdInOut!Sale".equals(caller)){
+                } else if ("ProdInOut!Sale".equals(caller)) {
                     condition = "pi_invostatuscode='AUDITED' and pi_transport='自提' and pi_signstatus='未签名'";
                 }
                 if (condition != null) {
@@ -273,7 +273,7 @@ public class FormListSelectActivity extends BaseActivity implements View.OnClick
                 } else if ("FeePlease!FYBX".equals(caller)) {
 
                     condition = "fp_pleasemancode='" + CommonUtil.getSharedPreferences(ct, "erp_username") + "'";
-                } else if("ProdInOut!Sale".equals(caller)){
+                } else if ("ProdInOut!Sale".equals(caller)) {
                     condition = "pi_invostatuscode='AUDITED' and pi_transport='自提' and pi_signstatus='未签名'";
                 }
                 if (condition != null) {
@@ -361,12 +361,12 @@ public class FormListSelectActivity extends BaseActivity implements View.OnClick
                 if (itemMap.get(keyField) != null) {
                     keyId = Integer.valueOf(itemMap.get(keyField).toString());
                 }
-                if (itemMap.get(statusKey) == null ) {
+                if (itemMap.get(statusKey) == null) {
                     ToastMessage("单据状态为空!");
-                    status="已提交";//修复报销单bug
-                   // return;
-                }else {
-                    LogUtil.d("状态:" + itemMap.get(statusKey).toString()+"");
+                    status = "已提交";//修复报销单bug
+                    // return;
+                } else {
+                    LogUtil.d("状态:" + itemMap.get(statusKey).toString() + "");
                     status = itemMap.get(statusKey).toString();
                 }
                 Intent it_detail = null;
@@ -406,14 +406,14 @@ public class FormListSelectActivity extends BaseActivity implements View.OnClick
                                 .putExtra("id", keyId));
                     }
                 } else {
-                    if("ProdInOut!Sale".equals(caller)){
+                    if ("ProdInOut!Sale".equals(caller)) {
                         startActivity(new Intent(mContext,
                                 ZeTianDocDetailsActivity.class)
                                 .putExtra("caller", caller)
                                 .putExtra("title", getToolBarTitle().toString())
                                 .putExtra("keyValue", keyId)
                                 .putExtra("status", status));
-                    }else {
+                    } else {
                         startActivity(new Intent(mContext,
                                 CommonDocDetailsActivity.class)
                                 .putExtra("caller", caller)
@@ -450,7 +450,7 @@ public class FormListSelectActivity extends BaseActivity implements View.OnClick
                 condition = "FP_PEOPLE2='" + CommonUtil.getSharedPreferences(ct, "erp_username") + "'";
             } else if ("FeePlease!FYBX".equals(caller)) {
                 condition = "fp_pleasemancode='" + CommonUtil.getSharedPreferences(ct, "erp_username") + "'";
-            } else if("ProdInOut!Sale".equals(caller)){
+            } else if ("ProdInOut!Sale".equals(caller)) {
                 condition = "pi_invostatuscode='AUDITED' and pi_transport='自提' and pi_signstatus='未签名'";
             }
             if (condition != null) {
@@ -750,7 +750,9 @@ public class FormListSelectActivity extends BaseActivity implements View.OnClick
                 // if ((Integer)map.get("width")==0)continue;
                 if ((Integer) map.get("width") == 0)
                     continue;
-                tViews[1][j].setText(dmap.get(map.get("dataIndex")).toString());
+                if (tViews[1][j] != null && map.get("dataIndex") != null && dmap.get(map.get("dataIndex")) != null) {
+                    tViews[1][j].setText(dmap.get(map.get("dataIndex")).toString());
+                }
             }
             if (tViews[0][0] != null) {
                 // tViews[0][0].setText((position + 1) + "");