Browse Source

材料出库已备料列表新增型号

shuij 3 years ago
parent
commit
b076ee1075

+ 3 - 0
app/src/main/java/com/uas/pda_smart_com/adapter/StockAlreadyListAdapter.java

@@ -60,6 +60,7 @@ public class StockAlreadyListAdapter extends BaseAdapter {
         holder.stockAlreadyListDetail.setText((object.getPR_DETAIL() == null || "null".equals(object.getPR_DETAIL())) ? "" : object.getPR_DETAIL());
         holder.stockAlreadyListBatchcode.setText((object.getBI_BATCHCODE() == null || "null".equals(object.getBI_BATCHCODE())) ? "" : object.getBI_BATCHCODE());
         holder.stockAlreadyListLocation.setText((object.getBI_LOCATION() == null || "null".equals(object.getBI_LOCATION())) ? "" : object.getBI_LOCATION());
+        holder.tv_type_value.setText((object.getPR_ORISPECCODE() == null || "null".equals(object.getPR_ORISPECCODE())) ? "" : object.getPR_ORISPECCODE());
     }
 
     protected class ViewHolder {
@@ -69,6 +70,7 @@ public class StockAlreadyListAdapter extends BaseAdapter {
         private TextView stockAlreadyListDetail;
         private TextView stockAlreadyListBatchcode;
         private TextView stockAlreadyListLocation;
+        private TextView tv_type_value;
 
         public ViewHolder(View view) {
             stockAlreadyListBarcode = (TextView) view.findViewById(R.id.stock_already_list_barcode);
@@ -77,6 +79,7 @@ public class StockAlreadyListAdapter extends BaseAdapter {
             stockAlreadyListDetail = (TextView) view.findViewById(R.id.stock_already_list_detail);
             stockAlreadyListBatchcode = (TextView) view.findViewById(R.id.stock_already_list_batchcode);
             stockAlreadyListLocation = (TextView) view.findViewById(R.id.stock_already_list_location);
+            tv_type_value=view.findViewById(R.id.tv_type_value);
         }
     }
 }

+ 12 - 5
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, tvStatus;
+    TextView tvBarcode, tvBarProcode,tv_type_value,tvPrDetail, tvPrSpec, tvVeShortname, tvBarWhcode, tvBarRemain, tvBarLocation, tvStatus;
     private TextView btnSearch;
     private ImageView mScanImageView;
     private int mFocusId;
@@ -51,6 +51,7 @@ public class WHCheckBarcodeFragment extends BaseFragment implements View.OnClick
         tlMsg = (TableLayout) root.findViewById(R.id.tl_msg);
         tvBarcode = (TextView) root.findViewById(R.id.tv_bar_code);
         tvBarProcode = (TextView) root.findViewById(R.id.tv_bar_procode);
+        tv_type_value=root.findViewById(R.id.tv_type_value);
         tvPrDetail = (TextView) root.findViewById(R.id.tv_pr_detail);
         tvPrSpec = (TextView) root.findViewById(R.id.tv_pr_spec);
         tvVeShortname = (TextView) root.findViewById(R.id.tv_pr_ve_shortname);
@@ -189,20 +190,25 @@ public class WHCheckBarcodeFragment extends BaseFragment implements View.OnClick
             String strRemain = changeNulltoBlank(dataJson, "BAR_REMAIN");
             String strLocation = changeNulltoBlank(dataJson, "BAR_LOCATION");
             String strStatus = changeNulltoBlank(dataJson, "BAR_STATUS");
+            String strType=changeNulltoBlank(dataJson,"PR_ORISPECCODE");
 
             //显示数据
             tvBarcode.setText(strBarcode);
             tvBarProcode.setText(strProduct);
+            tv_type_value.setText(strType);
             tvPrDetail.setText(strDetail);
             tvPrSpec.setText(strSpec);
             tvVeShortname.setText(strShortname);
             tvBarWhcode.setText(strWhcode);
             tvBarRemain.setText(strRemain);
             tvBarLocation.setText(strLocation);
-            tvStatus.setText("1".equals(strStatus) ? "在库"
-                    : "2".equals(strStatus) ? "出库"
-                    : "-2".equals(strStatus) ? "失效"
-                    : "");
+            if(strStatus.equals("1")){
+                tvStatus.setText("在库");
+            }else if(strStatus.equals("2")){
+                tvStatus.setText("出库");
+            }else{
+               tvStatus.setText(strStatus);
+            }
         } catch (JSONException e) {
             e.printStackTrace();
         }
@@ -213,6 +219,7 @@ public class WHCheckBarcodeFragment extends BaseFragment implements View.OnClick
         etCollect.setText("");
         tvBarcode.setText("");
         tvBarProcode.setText("");
+        tv_type_value.setText("");
         tvPrDetail.setText("");
         tvPrSpec.setText("");
         tvVeShortname.setText("");

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

@@ -36,6 +36,17 @@
                 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_type_value"
+                style="@style/Table_li_right"
+                android:textColor="@color/text_search"/>
+        </TableRow>
         <!--名称-->
         <TableRow>
             <TextView