Browse Source

外观维修、性能维修UI优化,更改保存后显示数据

ChengJH 2 years ago
parent
commit
8dea2d0a41

+ 11 - 6
app/src/main/java/com/uas/collection/fragment/BreakdownRepairFragment.java

@@ -487,7 +487,7 @@ public class BreakdownRepairFragment extends BaseFragment{
                                     tv_macode.setText("工单号  "+ma_code);
                                     at_station.clearFocus();
                                     ce_work_code.clearFocus();
-                                    tv_dc_emcode.clearFocus();
+                                    tv_dc_emcode.requestFocus();
                                 }
                             }
                         }
@@ -813,15 +813,19 @@ public class BreakdownRepairFragment extends BaseFragment{
             public void onSuccess(int flag, Object o) throws Exception {
                 progressDialog.dismiss();
                 CommonUtil.toastYESRepeat(mActivity, "保存成功");
+                if (!StringUtil.isEmpty(ce_product_bar_code.getText().toString().trim())){
+                    stringList.add("("+ce_product_bar_code.getText().toString().trim()+")-");
+                }
                 if (!StringUtil.isEmpty(finalInput_Aloneda)){
-                    stringList.add(finalInput_Aloneda+"\n");
+                    stringList.add(finalInput_Aloneda+"-");
                 }
                 if (!StringUtil.isEmpty(finalInput_AlonedaTwo)){
-                    stringList.add(finalInput_AlonedaTwo+"\n");
+                    stringList.add(finalInput_AlonedaTwo+"-");
                 }
                 if (!StringUtil.isEmpty(finalInput_alonedatathree)){
                     stringList.add(finalInput_alonedatathree+"\n");
                 }
+
 //                if (!finalInput_AlonedaTwo.isEmpty()){
 //                    stringList.add(finalInput_Aloneda+"\n");
 //                }
@@ -834,8 +838,9 @@ public class BreakdownRepairFragment extends BaseFragment{
 
                 tv_hintshow.setText(number);
                 number="";
-                tv_hintshow.requestFocus();
-                tv_hintshow.setSelection(tv_hintshow.getText().toString().length());
+                ce_product_bar_code.setText("");
+                ce_length.clearFocus();
+                ce_product_bar_code.clearFocus();
                 setAdapterone(mFeededListone);
                 setAdaptertwo(mFeededListtwo);
                 setAdapterthree(mFeededListthree);
@@ -1103,7 +1108,7 @@ public class BreakdownRepairFragment extends BaseFragment{
                 tv_macode.setText("工单号  "+ma_code);
                 at_station.clearFocus();
                 ce_work_code.clearFocus();
-                tv_dc_emcode.clearFocus();
+                tv_dc_emcode.requestFocus();
 
                 closeListPopupWindow();
             }

+ 2 - 2
app/src/main/java/com/uas/collection/fragment/DataCollectionFragment.java

@@ -851,7 +851,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
                                     tv_macode.setText(""+ma_code);
                                     et_linecode_smts.setText(ma_id);
                                     et_linecode_smts.clearFocus();
-                                    tv_dc_emcode.clearFocus();
+                                    tv_dc_emcode.requestFocus();
                                     ce_resources.clearFocus();
                                 }
                             }
@@ -1232,7 +1232,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
                 tv_pr_detail.setText("产品名称  "+pr_detail);
                 tv_macode.setText(""+ma_code);
                 et_linecode_smts.clearFocus();
-                tv_dc_emcode.clearFocus();
+                tv_dc_emcode.requestFocus();
                 ce_resources.clearFocus();
                 closeListPopupWindow();
             }

+ 9 - 5
app/src/main/java/com/uas/collection/fragment/StorageRechargeListFragment.java

@@ -526,7 +526,7 @@ public class StorageRechargeListFragment extends BaseFragment{
                                     tv_macode.setText("工单号  "+ma_code);
                                     at_station.clearFocus();
                                     ce_work_code.clearFocus();
-                                    tv_dc_emcode.clearFocus();
+                                    tv_dc_emcode.requestFocus();
 
                                 }
                             }
@@ -808,8 +808,11 @@ public class StorageRechargeListFragment extends BaseFragment{
 //                tv_hintshow.setText("不良现象:"+ finalInput_Aloneda +"     不良原因:"+ finalInput_AlonedaTwo);
 
                 CommonUtil.toastYESRepeat(mActivity, "保存成功");
+                if (!StringUtil.isEmpty(ce_product_bar_code.getText().toString().trim())){
+                    stringList.add("("+ce_product_bar_code.getText().toString().trim()+")-");
+                }
                 if (!StringUtil.isEmpty(finalInput_Aloneda)){
-                    stringList.add(finalInput_Aloneda+"\n");
+                    stringList.add(finalInput_Aloneda+"-");
                 }
                 if (!StringUtil.isEmpty(finalInput_AlonedaTwo)){
                     stringList.add(finalInput_AlonedaTwo+"\n");
@@ -826,8 +829,9 @@ public class StorageRechargeListFragment extends BaseFragment{
 
                 tv_hintshow.setText(number);
                 number="";
-                tv_hintshow.requestFocus();
-                tv_hintshow.setSelection(tv_hintshow.getText().toString().length());
+                ce_product_bar_code.setText("");
+                ce_length.clearFocus();
+                ce_product_bar_code.clearFocus();
                 setAdapter(mFeededList);
                 setAdaptertwo(mFeededListtwo);
             }
@@ -913,7 +917,7 @@ public class StorageRechargeListFragment extends BaseFragment{
                 tv_macode.setText("工单号  "+ma_code);
                 at_station.clearFocus();
                 ce_work_code.clearFocus();
-                tv_dc_emcode.clearFocus();
+                tv_dc_emcode.requestFocus();
                 closeListPopupWindow();
             }
         });

+ 3 - 2
app/src/main/res/layout-large/fragment_breakdownrepair.xml

@@ -251,8 +251,9 @@
         android:layout_width="match_parent"
         android:layout_height="80dp"
         android:layout_marginLeft="5dp"
-        android:layout_marginTop="10dp"
+        android:layout_marginTop="5dp"
         android:text=""
+        android:gravity="top"
         android:textSize="15sp"
         android:layout_marginRight="@dimen/dp_10"
         android:focusable="false"
@@ -260,7 +261,7 @@
     </com.uas.collection.view.ClearableEditText>
     <LinearLayout
         android:layout_marginLeft="5dp"
-        android:layout_marginTop="30dp"
+        android:layout_marginTop="5dp"
         android:orientation="horizontal"
         android:layout_width="match_parent"
         android:layout_height="wrap_content">

+ 2 - 1
app/src/main/res/layout-large/fragment_storage_recharge_list.xml

@@ -227,10 +227,11 @@
     <com.uas.collection.view.ClearableEditText
         android:id="@+id/tv_hintshow"
         android:layout_width="match_parent"
-        android:layout_height="80dp"
+        android:layout_height="150dp"
         android:layout_marginLeft="5dp"
         android:layout_marginTop="10dp"
         android:text=""
+        android:gravity="top"
         android:textSize="15sp"
         android:layout_marginRight="@dimen/dp_10"
         android:focusable="false"