Browse Source

v2.0版本,新增盘点汇总

shuij 3 years ago
parent
commit
63523e945d

+ 1 - 1
app/src/main/java/com/uas/pda_smart_com/adapter/InventorySummaryAdapter.java

@@ -57,7 +57,7 @@ public class InventorySummaryAdapter extends BaseAdapter {
                 holder.mProdcodeTv.setText(object.getBI_PRODCODE());
                 holder.mQuantityTv.setText(CommonUtil.doubleFormat(object.getBI_INQTY()));
                 holder.mBrandTv.setText(object.getBI_BRAND());
-                holder.mSpecTv.setText(object.getPR_SPEC());
+                holder.mSpecTv.setText(object.getBi_whcode());
                 holder.mDetailTv.setText(object.getPR_DETAIL());
             }
         } catch (Exception e) {

+ 9 - 0
app/src/main/java/com/uas/pda_smart_com/bean/InventorySummaryBean.java

@@ -21,6 +21,15 @@ public class InventorySummaryBean {
     private String BI_BRAND;
     private long BI_PIID;
     private int RN;
+    private String  bi_whcode;
+
+    public String getBi_whcode() {
+        return bi_whcode;
+    }
+
+    public void setBi_whcode(String bi_whcode) {
+        this.bi_whcode = bi_whcode;
+    }
 
     public double getBI_INQTY() {
         return BI_INQTY;

+ 14 - 4
app/src/main/java/com/uas/pda_smart_com/fragment/InventoryCollectFragment.java

@@ -9,6 +9,8 @@ import android.text.TextUtils;
 import android.view.KeyEvent;
 import android.view.View;
 import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.PopupWindow;
@@ -21,10 +23,8 @@ import com.uas.pda_smart_com.R;
 import com.uas.pda_smart_com.activity.FunctionActivity;
 import com.uas.pda_smart_com.global.GloableParams;
 import com.uas.pda_smart_com.listener.MyEditorActionListener;
-import com.uas.pda_smart_com.tools.SharedPreUtil;
 import com.uas.pda_smart_com.util.CameraUtil;
 import com.uas.pda_smart_com.util.CommonUtil;
-import com.uas.pda_smart_com.util.Constants;
 import com.uas.pda_smart_com.util.FastjsonUtil;
 import com.uas.pda_smart_com.util.FragmentUtils;
 import com.uas.pda_smart_com.util.HttpCallback;
@@ -46,6 +46,8 @@ public class InventoryCollectFragment extends BaseFragment implements View.OnCli
     private Button mMoreButton;
     private PopupWindow mMenuPopupWindow;
     private String pi_inoutno, pi_id, pi_class;
+    private CheckBox cb_caiji;
+    private boolean isChecked=false;
 
     @Override
     protected int getLayout() {
@@ -64,6 +66,7 @@ public class InventoryCollectFragment extends BaseFragment implements View.OnCli
         mResultTextView = root.findViewById(R.id.inventory_collect_result_tv);
         mNumTextView = root.findViewById(R.id.inventory_collect_num_tv);
         mClassTextView = root.findViewById(R.id.inventory_collect_class_tv);
+        cb_caiji=root.findViewById(R.id.cb_caiji);
 
         mBarcodeEditText.requestFocus();
     }
@@ -72,8 +75,13 @@ public class InventoryCollectFragment extends BaseFragment implements View.OnCli
     protected void initEvents() {
         mMoreButton.setOnClickListener(this);
         mScanImageView.setOnClickListener(this);
-
-//        mTagEditText.setOnFocusChangeListener(new View.OnFocusChangeListener() {
+        cb_caiji.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+                InventoryCollectFragment.this.isChecked=isChecked;
+            }
+        });
+//        mTagEditText.setOnFocusChangeListener(new View.OnFocusChangeListen) {
 //            @Override
 //            public void onFocusChange(View v, boolean hasFocus) {
 //                if (!hasFocus) {
@@ -116,6 +124,7 @@ public class InventoryCollectFragment extends BaseFragment implements View.OnCli
                         .addParam("inoutno", pi_inoutno)
 //                        .addParam("deadline", deadLine)
                         .addParam("barcode", barcode)
+                        .addParam("iscancel",isChecked+"")
                         .build(), new HttpCallback() {
                     @Override
                     public void onSuccess(int flag, Object o) throws Exception {
@@ -236,6 +245,7 @@ public class InventoryCollectFragment extends BaseFragment implements View.OnCli
 
         detailBtn.setOnClickListener(this);
         summaryBtn.setOnClickListener(this);
+        detailBtn.setVisibility(View.GONE);
 
         mMenuPopupWindow = new PopupWindow(view, LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
         mMenuPopupWindow.setBackgroundDrawable(new BitmapDrawable());

+ 2 - 1
app/src/main/java/com/uas/pda_smart_com/fragment/InventorySummaryListFragment.java

@@ -46,7 +46,7 @@ public class InventorySummaryListFragment extends BaseFragment implements View.O
 
     @Override
     protected int getLayout() {
-        return R.layout.fragment_inventory_detail_list;
+        return R.layout.fragment_inventory_huizong;
     }
 
     @Override
@@ -180,6 +180,7 @@ public class InventorySummaryListFragment extends BaseFragment implements View.O
                     summaryBean.setBI_INOUTNO(FastjsonUtil.getText(dataObject, "BI_INOUTNO"));
                     summaryBean.setPR_DETAIL(FastjsonUtil.getText(dataObject, "PR_DETAIL"));
                     summaryBean.setPR_SPEC(FastjsonUtil.getText(dataObject, "PR_SPEC"));
+                    summaryBean.setBi_whcode(FastjsonUtil.getText(dataObject, "BI_WHCODE"));
                     summaryBean.setBI_BRAND(FastjsonUtil.getText(dataObject, "BI_BRAND"));
                     summaryBean.setBI_PIID(FastjsonUtil.getLong(dataObject, "BI_PIID"));
                     summaryBean.setRN(FastjsonUtil.getInt(dataObject, "RN"));

+ 17 - 0
app/src/main/res/layout/fragment_inventory_collect.xml

@@ -48,6 +48,22 @@
             android:paddingRight="10dp"
             android:text="DC的物料不记录" />
     </LinearLayout>
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingLeft="15dp">
+        <CheckBox
+            android:id="@+id/cb_caiji"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"/>
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textColor="#333333"
+            android:textSize="14sp"
+            android:text="取消采集"/>
+
+    </LinearLayout>
 
     <LinearLayout
         android:layout_width="match_parent"
@@ -75,6 +91,7 @@
             android:src="@drawable/ic_edittext_scan" />
     </LinearLayout>
 
+
     <TextView
         android:id="@+id/inventory_collect_result_tv"
         android:layout_width="match_parent"

+ 54 - 0
app/src/main/res/layout/fragment_inventory_huizong.xml

@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="52dp"
+        android:orientation="horizontal"
+        android:padding="8dp"
+        android:visibility="visible">
+
+        <TextView
+            android:id="@+id/inventory_detail_list_search_mode_tv"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:layout_marginRight="6dp"
+            android:drawableRight="@drawable/ic_menu_retract"
+            android:drawablePadding="4dp"
+            android:gravity="center"
+            android:text="条码号" />
+
+        <com.uas.pda_smart_com.view.ClearableEditText
+            android:id="@+id/inventory_detail_list_search_cet"
+            style="@style/EditTextStyle"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:background="@drawable/shape_msg_block"
+            android:drawableLeft="@drawable/icon_search"
+            android:hint="请输入型号"
+            android:imeOptions="actionSearch"
+            android:paddingLeft="5dp" />
+
+        <TextView
+            android:id="@+id/inventory_detail_list_search_tv"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:gravity="center"
+            android:paddingLeft="10dp"
+            android:paddingRight="10dp"
+            android:text="@string/btn_search"
+            android:textColor="@color/text_blue" />
+
+    </LinearLayout>
+
+    <com.handmark.pulltorefresh.library.PullToRefreshListView
+        android:id="@+id/inventory_detail_list_lv"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:divider="#D8D8D8"
+        android:dividerHeight="1px" />
+</LinearLayout>

+ 1 - 1
app/src/main/res/layout/pop_inventory_collect_menu.xml

@@ -15,6 +15,6 @@
         android:id="@+id/pop_inventory_collect_menu_2"
         style="@style/action_more_menu"
         android:text="盘点汇总"
-        android:visibility="gone" />
+        android:visibility="visible" />
 
 </LinearLayout>

+ 2 - 2
build.gradle

@@ -43,8 +43,8 @@ ext {
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 19,
-            versionName      : "v1.9"
+            versionCode      : 20,
+            versionName      : "v2.0"
     ]
 
     depsVersion = [