Bläddra i källkod

条码信息核查,添加字段

RaoMeng 5 år sedan
förälder
incheckning
fe0b7f0802

+ 8 - 1
app/src/main/java/com/uas/pda_smart_com/fragment/WHCheckBarcodeFragment.java

@@ -34,7 +34,7 @@ public class WHCheckBarcodeFragment extends BaseFragment implements View.OnClick
     private static final int SCAN_BARCODE_CODE = 402;
     ClearableEditText etCollect;
     TableLayout tlMsg;
-    TextView tvBarcode, tvBarProcode, tvPrDetail, tvPrSpec, tvVeShortname, tvBarWhcode, tvBarRemain, tvBarLocation;
+    TextView tvBarcode, tvBarProcode, tvPrDetail, tvPrSpec, tvVeShortname, tvBarWhcode, tvBarRemain, tvBarLocation, tvStatus;
     private TextView btnSearch;
     private ImageView mScanImageView;
     private int mFocusId;
@@ -57,6 +57,7 @@ public class WHCheckBarcodeFragment extends BaseFragment implements View.OnClick
         tvBarWhcode = (TextView) root.findViewById(R.id.tv_bar_whcode);
         tvBarRemain = (TextView) root.findViewById(R.id.tv_bar_remain);
         tvBarLocation = (TextView) root.findViewById(R.id.tv_bar_location);
+        tvStatus = root.findViewById(R.id.tv_bar_status);
         btnSearch = (TextView) root.findViewById(R.id.btn_collect);
         ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(R.string.title_barcode_whmm);
         mScanImageView = (ImageView) mActivity.findViewById(R.id.btn_actionbar_scan_iv);
@@ -187,6 +188,7 @@ public class WHCheckBarcodeFragment extends BaseFragment implements View.OnClick
             String strWhcode = changeNulltoBlank(dataJson, "BAR_WHCODE");
             String strRemain = changeNulltoBlank(dataJson, "BAR_REMAIN");
             String strLocation = changeNulltoBlank(dataJson, "BAR_LOCATION");
+            String strStatus = changeNulltoBlank(dataJson, "BAR_STATUS");
 
             //显示数据
             tvBarcode.setText(strBarcode);
@@ -197,6 +199,10 @@ public class WHCheckBarcodeFragment extends BaseFragment implements View.OnClick
             tvBarWhcode.setText(strWhcode);
             tvBarRemain.setText(strRemain);
             tvBarLocation.setText(strLocation);
+            tvStatus.setText("1".equals(strStatus) ? "在库"
+                    : "2".equals(strStatus) ? "出库"
+                    : "-2".equals(strStatus) ? "失效"
+                    : "");
         } catch (JSONException e) {
             e.printStackTrace();
         }
@@ -213,6 +219,7 @@ public class WHCheckBarcodeFragment extends BaseFragment implements View.OnClick
         tvBarWhcode.setText("");
         tvBarRemain.setText("");
         tvBarLocation.setText("");
+        tvStatus.setText("");
     }
 
     //Volley请求响应失败

+ 11 - 0
app/src/main/res/layout/fragment_whcheck_barcode.xml

@@ -102,5 +102,16 @@
                 style="@style/Table_li_right"
                 android:textColor="@color/text_search"/>
         </TableRow>
+        <!--条码状态-->
+        <TableRow>
+            <TextView
+                style="@style/Table_li_left"
+                android:text="条码状态"/>
+            <TextView
+                android:layout_width="wrap_content"
+                android:id="@+id/tv_bar_status"
+                style="@style/Table_li_right"
+                android:textColor="@color/text_search"/>
+        </TableRow>
     </TableLayout>
 </LinearLayout>

+ 2 - 2
build.gradle

@@ -45,8 +45,8 @@ ext {
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 1,
-            versionName      : "v1.1"
+            versionCode      : 2,
+            versionName      : "v1.2"
     ]
 
     depsVersion = [