Browse Source

完工品入库调整初步完成

RaoMeng 6 years ago
parent
commit
cfeaf08608
36 changed files with 3378 additions and 81 deletions
  1. 4 4
      app/build.gradle
  2. 64 0
      app/src/main/java/com/uas/pda_smart_sa/adapter/SingleSelectionAdapter.java
  3. 98 0
      app/src/main/java/com/uas/pda_smart_sa/adapter/StorageInAddAdapter.java
  4. 88 0
      app/src/main/java/com/uas/pda_smart_sa/adapter/StorageInAddBarcodeAdapter.java
  5. 83 0
      app/src/main/java/com/uas/pda_smart_sa/adapter/StorageInAddQuantityAdapter.java
  6. 65 0
      app/src/main/java/com/uas/pda_smart_sa/adapter/StorageSearchModeAdapter.java
  7. 186 0
      app/src/main/java/com/uas/pda_smart_sa/bean/StorageInBarcodeBean.java
  8. 142 0
      app/src/main/java/com/uas/pda_smart_sa/bean/StorageInBillBean.java
  9. 53 0
      app/src/main/java/com/uas/pda_smart_sa/bean/VendorBean.java
  10. 43 0
      app/src/main/java/com/uas/pda_smart_sa/bean/WhcodeBean.java
  11. 480 0
      app/src/main/java/com/uas/pda_smart_sa/fragment/SingleSelectionFragment.java
  12. 481 0
      app/src/main/java/com/uas/pda_smart_sa/fragment/StorageInAddBarcodeListFragment.java
  13. 34 45
      app/src/main/java/com/uas/pda_smart_sa/fragment/StorageInAddDetailFragment.java
  14. 38 27
      app/src/main/java/com/uas/pda_smart_sa/fragment/StorageInAddFragment.java
  15. 5 2
      app/src/main/java/com/uas/pda_smart_sa/fragment/StorageInAddListFragment.java
  16. 125 2
      app/src/main/java/com/uas/pda_smart_sa/fragment/StorageInFragment.java
  17. 83 0
      app/src/main/java/com/uas/pda_smart_sa/global/GloableParams.java
  18. 12 0
      app/src/main/java/com/uas/pda_smart_sa/util/CommonUtil.java
  19. 7 1
      app/src/main/java/com/uas/pda_smart_sa/util/Constants.java
  20. 280 0
      app/src/main/java/com/uas/pda_smart_sa/util/DateFormatUtils.java
  21. BIN
      app/src/main/res/drawable-hdpi/ic_advanced_filter.png
  22. BIN
      app/src/main/res/drawable-xhdpi/ic_advanced_filter.png
  23. BIN
      app/src/main/res/drawable-xxhdpi/ic_advanced_filter.png
  24. 46 0
      app/src/main/res/layout/fragment_single_selection.xml
  25. 158 0
      app/src/main/res/layout/fragment_storage_in_add.xml
  26. 56 0
      app/src/main/res/layout/fragment_storage_in_add_barcode_list.xml
  27. 209 0
      app/src/main/res/layout/fragment_storage_in_add_detail.xml
  28. 45 0
      app/src/main/res/layout/fragment_storage_in_add_list.xml
  29. 17 0
      app/src/main/res/layout/item_list_single_selection.xml
  30. 140 0
      app/src/main/res/layout/item_list_storage_in_add.xml
  31. 139 0
      app/src/main/res/layout/item_list_storage_in_add_barcode.xml
  32. 91 0
      app/src/main/res/layout/item_list_storage_in_add_quantity.xml
  33. 44 0
      app/src/main/res/layout/pop_storage_in_add_menu.xml
  34. 30 0
      app/src/main/res/layout/pop_storage_list_mode.xml
  35. 23 0
      app/src/main/res/layout/pop_storage_mode.xml
  36. 9 0
      app/src/main/res/values/styles.xml

+ 4 - 4
app/build.gradle

@@ -4,9 +4,9 @@ apply plugin: 'com.android.application'
 android {
     signingConfigs {
         udapda {
-            keyAlias 'pdakeystone'
+            keyAlias 'pda_smart_sa_alias'
             keyPassword 'pdakeystone'
-            storeFile file('C:\\sigin\\pda_keystone.jks')
+            storeFile file('C:\\sigin\\pda_smart_sa_keystore.jks')
             storePassword 'pdakeystone'
         }
     }
@@ -41,11 +41,11 @@ android {
             if (outputFile != null && outputFile.name.endsWith('.apk')) {
                 if (variant.buildType.name.equals('release')) {
                     def releaseInfo = getVersionName()
-                    fileName = "UAS_PDA_RELEASE_${releaseInfo}.apk"
+                    fileName = "UAS_PDA_SMART_SA_RELEASE_${releaseInfo}.apk"
 
                 } else if (variant.buildType.name.equals('debug')) {
                     def debugInfo = getVersionName()
-                    fileName = "UAS_PDA_DEBUG_${debugInfo}.apk"
+                    fileName = "UAS_PDA_SMART_SA_DEBUG_${debugInfo}.apk"
                 }
                 outputFileName = fileName
             }

+ 64 - 0
app/src/main/java/com/uas/pda_smart_sa/adapter/SingleSelectionAdapter.java

@@ -0,0 +1,64 @@
+package com.uas.pda_smart_sa.adapter;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.TextView;
+
+import com.uas.pda_smart_sa.R;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SingleSelectionAdapter extends BaseAdapter {
+
+    private List<String> objects = new ArrayList<String>();
+
+    private Context context;
+    private LayoutInflater layoutInflater;
+
+    public SingleSelectionAdapter(Context context, List<String> objects) {
+        this.context = context;
+        this.layoutInflater = LayoutInflater.from(context);
+        this.objects = objects;
+    }
+
+    @Override
+    public int getCount() {
+        return objects.size();
+    }
+
+    @Override
+    public String getItem(int position) {
+        return objects.get(position);
+    }
+
+    @Override
+    public long getItemId(int position) {
+        return position;
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        if (convertView == null) {
+            convertView = layoutInflater.inflate(R.layout.item_list_single_selection, null);
+            convertView.setTag(new ViewHolder(convertView));
+        }
+        initializeViews((String) getItem(position), (ViewHolder) convertView.getTag());
+        return convertView;
+    }
+
+    private void initializeViews(String object, ViewHolder holder) {
+        holder.listSingleSelectionValueTv.setText(object);
+    }
+
+    protected class ViewHolder {
+        private TextView listSingleSelectionValueTv;
+
+        public ViewHolder(View view) {
+            listSingleSelectionValueTv = (TextView) view.findViewById(R.id.list_single_selection_value_tv);
+        }
+    }
+}

+ 98 - 0
app/src/main/java/com/uas/pda_smart_sa/adapter/StorageInAddAdapter.java

@@ -0,0 +1,98 @@
+package com.uas.pda_smart_sa.adapter;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.TextView;
+
+import com.uas.pda_smart_sa.R;
+import com.uas.pda_smart_sa.bean.StorageInBillBean;
+import com.uas.pda_smart_sa.util.DateFormatUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class StorageInAddAdapter extends BaseAdapter {
+
+    private List<StorageInBillBean> objects = new ArrayList<StorageInBillBean>();
+
+    private Context context;
+    private LayoutInflater layoutInflater;
+
+    public StorageInAddAdapter(Context context, List<StorageInBillBean> objects) {
+        this.context = context;
+        this.layoutInflater = LayoutInflater.from(context);
+        this.objects = objects;
+    }
+
+    @Override
+    public int getCount() {
+        return objects.size();
+    }
+
+    @Override
+    public StorageInBillBean getItem(int position) {
+        return objects.get(position);
+    }
+
+    @Override
+    public long getItemId(int position) {
+        return position;
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        if (convertView == null) {
+            convertView = layoutInflater.inflate(R.layout.item_list_storage_in_add, null);
+            convertView.setTag(new ViewHolder(convertView));
+        }
+        initializeViews((StorageInBillBean) getItem(position), (ViewHolder) convertView.getTag());
+        return convertView;
+    }
+
+    private void initializeViews(StorageInBillBean object, ViewHolder holder) {
+        holder.InoutnoTv.setText(object.getPI_INOUTNO());
+        holder.ClassTv.setText(object.getPI_CLASS());
+        holder.WhcodeTv.setText(object.getPI_WHCODE());
+        holder.WhnameTv.setText(object.getPI_WHNAME());
+        holder.CardcodeTv.setText(object.getPI_CARDCODE());
+        holder.TitleTv.setText(object.getPI_TITLE());
+        holder.StatusTv.setText(object.getPI_PDASTATUS());
+        holder.InvostatusTv.setText(object.getPI_INVOSTATUS());
+        holder.RecordmanTv.setText(object.getPI_RECORDMAN());
+        try {
+            holder.RecorddateTv.setText(DateFormatUtils.long2Str(object.getPI_RECORDDATE(), DateFormatUtils.YMD));
+        } catch (Exception e) {
+            holder.RecorddateTv.setText("");
+        }
+    }
+
+    protected class ViewHolder {
+        private TextView InoutnoTv;
+        private TextView ClassTv;
+        private TextView WhcodeTv;
+        private TextView WhnameTv;
+        private TextView CardcodeTv;
+        private TextView TitleTv;
+        private TextView StatusTv;
+        private TextView InvostatusTv;
+        private TextView RecordmanTv;
+        private TextView RecorddateTv;
+
+        public ViewHolder(View view) {
+            InoutnoTv = (TextView) view.findViewById(R.id.list_storage_in_add_inoutno_tv);
+            ClassTv = (TextView) view.findViewById(R.id.list_storage_in_add_class_tv);
+            WhcodeTv = (TextView) view.findViewById(R.id.list_storage_in_add_whcode_tv);
+            WhnameTv = (TextView) view.findViewById(R.id.list_storage_in_add_whname_tv);
+            CardcodeTv = (TextView) view.findViewById(R.id.list_storage_in_add_cardcode_tv);
+            TitleTv = (TextView) view.findViewById(R.id.list_storage_in_add_title_tv);
+            StatusTv = (TextView) view.findViewById(R.id.list_storage_in_add_status_tv);
+            InvostatusTv = (TextView) view.findViewById(R.id.list_storage_in_add_invostatus_tv);
+            RecordmanTv = (TextView) view.findViewById(R.id.list_storage_in_add_recordman_tv);
+            RecorddateTv = (TextView) view.findViewById(R.id.list_storage_in_add_recorddate_tv);
+        }
+    }
+}
+

+ 88 - 0
app/src/main/java/com/uas/pda_smart_sa/adapter/StorageInAddBarcodeAdapter.java

@@ -0,0 +1,88 @@
+package com.uas.pda_smart_sa.adapter;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.TextView;
+
+
+import com.uas.pda_smart_sa.R;
+import com.uas.pda_smart_sa.bean.StorageInBarcodeBean;
+import com.uas.pda_smart_sa.fragment.StorageInAddBarcodeListFragment;
+import com.uas.pda_smart_sa.util.CommonUtil;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 箱号明细
+ */
+public class StorageInAddBarcodeAdapter extends BaseAdapter {
+
+    private List<StorageInBarcodeBean> objects = new ArrayList<StorageInBarcodeBean>();
+
+    private Context context;
+    private LayoutInflater layoutInflater;
+    private int mWhichPage;
+
+    public StorageInAddBarcodeAdapter(Context context, List<StorageInBarcodeBean> objects) {
+        this.context = context;
+        this.layoutInflater = LayoutInflater.from(context);
+        this.objects = objects;
+    }
+
+    public void setWhichPage(int whichPage) {
+        mWhichPage = whichPage;
+    }
+
+    @Override
+    public int getCount() {
+        return objects.size();
+    }
+
+    @Override
+    public StorageInBarcodeBean getItem(int position) {
+        return objects.get(position);
+    }
+
+    @Override
+    public long getItemId(int position) {
+        return position;
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        if (convertView == null) {
+            convertView = layoutInflater.inflate(R.layout.item_list_storage_in_add_barcode, null);
+            convertView.setTag(new ViewHolder(convertView));
+        }
+        initializeViews((StorageInBarcodeBean) getItem(position), (ViewHolder) convertView.getTag());
+        return convertView;
+    }
+
+    private void initializeViews(StorageInBarcodeBean object, ViewHolder holder) {
+        holder.mNumTv.setText(object.getBI_MACODE());
+        holder.mModelTv.setText(object.getPR_ORISPECCODE());
+        holder.mBoxTv.setText(object.getBI_OUTBOXCODE());
+        holder.nQtyTv.setText(CommonUtil.doubleFormat(object.getBI_INQTY()));
+        holder.mBinTv.setText(object.getBI_BINCODE());
+    }
+
+    protected class ViewHolder {
+        private TextView mNumTv;
+        private TextView mModelTv;
+        private TextView mBoxTv;
+        private TextView nQtyTv;
+        private TextView mBinTv;
+
+        public ViewHolder(View view) {
+            mNumTv = (TextView) view.findViewById(R.id.list_storage_in_add_barcode_num_tv);
+            mModelTv = (TextView) view.findViewById(R.id.list_storage_in_add_barcode_model_tv);
+            mBoxTv = (TextView) view.findViewById(R.id.list_storage_in_add_barcode_box_tv);
+            nQtyTv = (TextView) view.findViewById(R.id.list_storage_in_add_barcode_qty_tv);
+            mBinTv = (TextView) view.findViewById(R.id.list_storage_in_add_barcode_bin_tv);
+        }
+    }
+}

+ 83 - 0
app/src/main/java/com/uas/pda_smart_sa/adapter/StorageInAddQuantityAdapter.java

@@ -0,0 +1,83 @@
+package com.uas.pda_smart_sa.adapter;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.uas.pda_smart_sa.R;
+import com.uas.pda_smart_sa.fragment.StorageInAddBarcodeListFragment;
+import com.uas.pda_smart_sa.util.FastjsonUtil;
+
+/**
+ * 数量汇总
+ */
+public class StorageInAddQuantityAdapter extends BaseAdapter {
+
+    private JSONArray objects = new JSONArray();
+    private Context context;
+    private LayoutInflater layoutInflater;
+
+    public StorageInAddQuantityAdapter(Context context, JSONArray objects) {
+        this.context = context;
+        this.layoutInflater = LayoutInflater.from(context);
+        this.objects = objects;
+    }
+
+    @Override
+    public int getCount() {
+        return objects.size();
+    }
+
+    @Override
+    public JSONObject getItem(int position) {
+        return objects.getJSONObject(position);
+    }
+
+    @Override
+    public long getItemId(int position) {
+        return position;
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        if (convertView == null) {
+            convertView = layoutInflater.inflate(R.layout.item_list_storage_in_add_quantity, null);
+            convertView.setTag(new ViewHolder(convertView));
+        }
+        initializeViews((JSONObject) getItem(position), (ViewHolder) convertView.getTag());
+        return convertView;
+    }
+
+    private void initializeViews(JSONObject object, ViewHolder holder) {
+        try {
+            if (object != null) {
+                holder.mNumTv.setText(FastjsonUtil.getText(object, "BI_MACODE"));
+                holder.mBinTv.setText(FastjsonUtil.getText(object, "BI_BINCODE"));
+                holder.mModelTv.setText(FastjsonUtil.getText(object, "PR_ORISPECCODE"));
+                holder.mQtyTv.setText(FastjsonUtil.getText(object, "BI_INQTY"));
+            }
+        } catch (Exception e) {
+
+        }
+    }
+
+    protected class ViewHolder {
+        private TextView mNumTv;
+        private TextView mBinTv;
+        private TextView mModelTv;
+        private TextView mQtyTv;
+
+        public ViewHolder(View view) {
+            mNumTv = (TextView) view.findViewById(R.id.list_storage_in_add_quantity_num_tv);
+            mBinTv = (TextView) view.findViewById(R.id.list_storage_in_add_quantity_bin_tv);
+            mModelTv = (TextView) view.findViewById(R.id.list_storage_in_add_quantity_model_tv);
+            mQtyTv = (TextView) view.findViewById(R.id.list_storage_in_add_quantity_qty_tv);
+        }
+    }
+}

+ 65 - 0
app/src/main/java/com/uas/pda_smart_sa/adapter/StorageSearchModeAdapter.java

@@ -0,0 +1,65 @@
+package com.uas.pda_smart_sa.adapter;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.TextView;
+
+
+import com.uas.pda_smart_sa.R;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class StorageSearchModeAdapter extends BaseAdapter {
+
+    private List<String> objects = new ArrayList<String>();
+
+    private Context context;
+    private LayoutInflater layoutInflater;
+
+    public StorageSearchModeAdapter(Context context, List<String> objects) {
+        this.context = context;
+        this.layoutInflater = LayoutInflater.from(context);
+        this.objects = objects;
+    }
+
+    @Override
+    public int getCount() {
+        return objects.size();
+    }
+
+    @Override
+    public String getItem(int position) {
+        return objects.get(position);
+    }
+
+    @Override
+    public long getItemId(int position) {
+        return position;
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        if (convertView == null) {
+            convertView = layoutInflater.inflate(R.layout.item_list_cache_warehouse, null);
+            convertView.setTag(new ViewHolder(convertView));
+        }
+        initializeViews((String) getItem(position), (ViewHolder) convertView.getTag());
+        return convertView;
+    }
+
+    private void initializeViews(String object, ViewHolder holder) {
+        holder.listWarehouseTv.setText(object);
+    }
+
+    protected class ViewHolder {
+        private TextView listWarehouseTv;
+
+        public ViewHolder(View view) {
+            listWarehouseTv = (TextView) view.findViewById(R.id.list_warehouse_tv);
+        }
+    }
+}

+ 186 - 0
app/src/main/java/com/uas/pda_smart_sa/bean/StorageInBarcodeBean.java

@@ -0,0 +1,186 @@
+package com.uas.pda_smart_sa.bean;
+
+/**
+ * @author RaoMeng
+ * @describe
+ * @date 2018/6/24 16:32
+ */
+public class StorageInBarcodeBean {
+
+    /**
+     * BI_BARCODE : 20180522004*10*2018062101*A*1806001*TSMP180500034
+     * BI_PRODCODE : 20180522004
+     * BI_INQTY : 10
+     * BI_INOUTNO : YS180600044
+     * BI_WHCODE : A
+     * BI_ORDERCODE : TSMP180500034
+     * EM_NAME : 饶猛
+     * BI_DATECODE : 2018062101
+     * BI_LOTNO : 1806001
+     * BI_STATUS : 未入库
+     * RN : 1
+     */
+
+    private String BI_BARCODE;
+    private String BI_PRODCODE;
+    private double BI_INQTY;
+    private double BI_OUTQTY;
+    private String BI_INOUTNO;
+    private String BI_WHCODE;
+    private String BI_BRAND;
+    private String BI_ORDERCODE;
+    private String EM_NAME;
+    private String BI_DATECODE;
+    private String BI_LOTNO;
+    private String BI_STATUS;
+    private String BI_OUTBOXCODE;
+    private String BI_MACODE;
+    private String BI_BINCODE;
+    private String PR_ORISPECCODE;
+    private long BI_ID;
+    private int RN;
+
+    public String getBI_BARCODE() {
+        return BI_BARCODE;
+    }
+
+    public void setBI_BARCODE(String BI_BARCODE) {
+        this.BI_BARCODE = BI_BARCODE;
+    }
+
+    public String getBI_PRODCODE() {
+        return BI_PRODCODE;
+    }
+
+    public void setBI_PRODCODE(String BI_PRODCODE) {
+        this.BI_PRODCODE = BI_PRODCODE;
+    }
+
+    public double getBI_INQTY() {
+        return BI_INQTY;
+    }
+
+    public void setBI_INQTY(double BI_INQTY) {
+        this.BI_INQTY = BI_INQTY;
+    }
+
+    public double getBI_OUTQTY() {
+        return BI_OUTQTY;
+    }
+
+    public void setBI_OUTQTY(double BI_OUTQTY) {
+        this.BI_OUTQTY = BI_OUTQTY;
+    }
+
+    public String getBI_INOUTNO() {
+        return BI_INOUTNO;
+    }
+
+    public void setBI_INOUTNO(String BI_INOUTNO) {
+        this.BI_INOUTNO = BI_INOUTNO;
+    }
+
+    public String getBI_WHCODE() {
+        return BI_WHCODE;
+    }
+
+    public void setBI_WHCODE(String BI_WHCODE) {
+        this.BI_WHCODE = BI_WHCODE;
+    }
+
+    public String getBI_BRAND() {
+        return BI_BRAND;
+    }
+
+    public void setBI_BRAND(String BI_BRAND) {
+        this.BI_BRAND = BI_BRAND;
+    }
+
+    public String getBI_ORDERCODE() {
+        return BI_ORDERCODE;
+    }
+
+    public void setBI_ORDERCODE(String BI_ORDERCODE) {
+        this.BI_ORDERCODE = BI_ORDERCODE;
+    }
+
+    public String getEM_NAME() {
+        return EM_NAME;
+    }
+
+    public void setEM_NAME(String EM_NAME) {
+        this.EM_NAME = EM_NAME;
+    }
+
+    public String getBI_DATECODE() {
+        return BI_DATECODE;
+    }
+
+    public void setBI_DATECODE(String BI_DATECODE) {
+        this.BI_DATECODE = BI_DATECODE;
+    }
+
+    public String getBI_LOTNO() {
+        return BI_LOTNO;
+    }
+
+    public void setBI_LOTNO(String BI_LOTNO) {
+        this.BI_LOTNO = BI_LOTNO;
+    }
+
+    public String getBI_STATUS() {
+        return BI_STATUS;
+    }
+
+    public void setBI_STATUS(String BI_STATUS) {
+        this.BI_STATUS = BI_STATUS;
+    }
+
+    public long getBI_ID() {
+        return BI_ID;
+    }
+
+    public void setBI_ID(long BI_ID) {
+        this.BI_ID = BI_ID;
+    }
+
+    public int getRN() {
+        return RN;
+    }
+
+    public void setRN(int RN) {
+        this.RN = RN;
+    }
+
+    public String getBI_OUTBOXCODE() {
+        return BI_OUTBOXCODE;
+    }
+
+    public void setBI_OUTBOXCODE(String BI_OUTBOXCODE) {
+        this.BI_OUTBOXCODE = BI_OUTBOXCODE;
+    }
+
+    public String getBI_MACODE() {
+        return BI_MACODE;
+    }
+
+    public void setBI_MACODE(String BI_MACODE) {
+        this.BI_MACODE = BI_MACODE;
+    }
+
+    public String getBI_BINCODE() {
+        return BI_BINCODE;
+    }
+
+    public void setBI_BINCODE(String BI_BINCODE) {
+        this.BI_BINCODE = BI_BINCODE;
+    }
+
+    public String getPR_ORISPECCODE() {
+        return PR_ORISPECCODE;
+    }
+
+    public void setPR_ORISPECCODE(String PR_ORISPECCODE) {
+        this.PR_ORISPECCODE = PR_ORISPECCODE;
+    }
+}

+ 142 - 0
app/src/main/java/com/uas/pda_smart_sa/bean/StorageInBillBean.java

@@ -0,0 +1,142 @@
+package com.uas.pda_smart_sa.bean;
+
+/**
+ * @author RaoMeng
+ * @describe
+ * @date 2018/6/22 15:31
+ */
+public class StorageInBillBean {
+
+    /**
+     * PI_INOUTNO : YS180600044
+     * PI_WHCODE : A
+     * PI_WHNAME : A仓
+     * PI_CARDCODE : GN0028
+     * PI_TITLE : 深圳市优软科技有限公司
+     * PI_STATUS : 未过账
+     * PI_CLASS : 采购验收单
+     * PI_ID : 50721894
+     * PI_INVOSTATUS : 在录入
+     * PI_RECORDMAN : 饶猛
+     * PI_RECORDDATE : 1529651193000
+     * RN : 1
+     */
+
+    private String PI_INOUTNO;
+    private String PI_WHCODE;
+    private String PI_WHNAME;
+    private String PI_CARDCODE;
+    private String PI_TITLE;
+    private String PI_STATUS;
+    private String PI_PDASTATUS;
+    private String PI_CLASS;
+    private long PI_ID;
+    private String PI_INVOSTATUS;
+    private String PI_RECORDMAN;
+    private long PI_RECORDDATE;
+    private int RN;
+
+    public String getPI_INOUTNO() {
+        return PI_INOUTNO;
+    }
+
+    public void setPI_INOUTNO(String PI_INOUTNO) {
+        this.PI_INOUTNO = PI_INOUTNO;
+    }
+
+    public String getPI_WHCODE() {
+        return PI_WHCODE;
+    }
+
+    public void setPI_WHCODE(String PI_WHCODE) {
+        this.PI_WHCODE = PI_WHCODE;
+    }
+
+    public String getPI_WHNAME() {
+        return PI_WHNAME;
+    }
+
+    public void setPI_WHNAME(String PI_WHNAME) {
+        this.PI_WHNAME = PI_WHNAME;
+    }
+
+    public String getPI_CARDCODE() {
+        return PI_CARDCODE;
+    }
+
+    public void setPI_CARDCODE(String PI_CARDCODE) {
+        this.PI_CARDCODE = PI_CARDCODE;
+    }
+
+    public String getPI_TITLE() {
+        return PI_TITLE;
+    }
+
+    public void setPI_TITLE(String PI_TITLE) {
+        this.PI_TITLE = PI_TITLE;
+    }
+
+    public String getPI_STATUS() {
+        return PI_STATUS;
+    }
+
+    public void setPI_STATUS(String PI_STATUS) {
+        this.PI_STATUS = PI_STATUS;
+    }
+
+    public String getPI_PDASTATUS() {
+        return PI_PDASTATUS;
+    }
+
+    public void setPI_PDASTATUS(String PI_PDASTATUS) {
+        this.PI_PDASTATUS = PI_PDASTATUS;
+    }
+
+    public String getPI_CLASS() {
+        return PI_CLASS;
+    }
+
+    public void setPI_CLASS(String PI_CLASS) {
+        this.PI_CLASS = PI_CLASS;
+    }
+
+    public long getPI_ID() {
+        return PI_ID;
+    }
+
+    public void setPI_ID(long PI_ID) {
+        this.PI_ID = PI_ID;
+    }
+
+    public String getPI_INVOSTATUS() {
+        return PI_INVOSTATUS;
+    }
+
+    public void setPI_INVOSTATUS(String PI_INVOSTATUS) {
+        this.PI_INVOSTATUS = PI_INVOSTATUS;
+    }
+
+    public String getPI_RECORDMAN() {
+        return PI_RECORDMAN;
+    }
+
+    public void setPI_RECORDMAN(String PI_RECORDMAN) {
+        this.PI_RECORDMAN = PI_RECORDMAN;
+    }
+
+    public long getPI_RECORDDATE() {
+        return PI_RECORDDATE;
+    }
+
+    public void setPI_RECORDDATE(long PI_RECORDDATE) {
+        this.PI_RECORDDATE = PI_RECORDDATE;
+    }
+
+    public int getRN() {
+        return RN;
+    }
+
+    public void setRN(int RN) {
+        this.RN = RN;
+    }
+}

+ 53 - 0
app/src/main/java/com/uas/pda_smart_sa/bean/VendorBean.java

@@ -0,0 +1,53 @@
+package com.uas.pda_smart_sa.bean;
+
+/**
+ * @author RaoMeng
+ * @describe 供应商
+ * @date 2018/6/21 11:33
+ */
+public class VendorBean {
+
+    /**
+     * VE_CODE : 2018060601SULY
+     * VE_NAME : 供应商suly
+     * VE_SHORTNAME : 供应商suly
+     * RN : 1
+     */
+
+    private String VE_CODE;
+    private String VE_NAME;
+    private String VE_SHORTNAME;
+    private int RN;
+
+    public String getVE_CODE() {
+        return VE_CODE;
+    }
+
+    public void setVE_CODE(String VE_CODE) {
+        this.VE_CODE = VE_CODE;
+    }
+
+    public String getVE_NAME() {
+        return VE_NAME;
+    }
+
+    public void setVE_NAME(String VE_NAME) {
+        this.VE_NAME = VE_NAME;
+    }
+
+    public String getVE_SHORTNAME() {
+        return VE_SHORTNAME;
+    }
+
+    public void setVE_SHORTNAME(String VE_SHORTNAME) {
+        this.VE_SHORTNAME = VE_SHORTNAME;
+    }
+
+    public int getRN() {
+        return RN;
+    }
+
+    public void setRN(int RN) {
+        this.RN = RN;
+    }
+}

+ 43 - 0
app/src/main/java/com/uas/pda_smart_sa/bean/WhcodeBean.java

@@ -0,0 +1,43 @@
+package com.uas.pda_smart_sa.bean;
+
+/**
+ * @author RaoMeng
+ * @describe
+ * @date 2018/6/21 11:09
+ */
+public class WhcodeBean {
+
+    /**
+     * WH_CODE : 0711
+     * WH_DESCRIPTION : 起飞测试(条码不管控)
+     * WH_TYPE : 良品仓
+     */
+
+    private String WH_CODE;
+    private String WH_DESCRIPTION;
+    private String WH_TYPE;
+
+    public String getWH_CODE() {
+        return WH_CODE;
+    }
+
+    public void setWH_CODE(String WH_CODE) {
+        this.WH_CODE = WH_CODE;
+    }
+
+    public String getWH_DESCRIPTION() {
+        return WH_DESCRIPTION;
+    }
+
+    public void setWH_DESCRIPTION(String WH_DESCRIPTION) {
+        this.WH_DESCRIPTION = WH_DESCRIPTION;
+    }
+
+    public String getWH_TYPE() {
+        return WH_TYPE;
+    }
+
+    public void setWH_TYPE(String WH_TYPE) {
+        this.WH_TYPE = WH_TYPE;
+    }
+}

+ 480 - 0
app/src/main/java/com/uas/pda_smart_sa/fragment/SingleSelectionFragment.java

@@ -0,0 +1,480 @@
+package com.uas.pda_smart_sa.fragment;
+
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.support.v7.app.AlertDialog;
+import android.view.KeyEvent;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.LinearLayout;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.android.volley.Request;
+import com.android.volley.toolbox.StringRequest;
+import com.handmark.pulltorefresh.library.PullToRefreshBase;
+import com.handmark.pulltorefresh.library.PullToRefreshListView;
+import com.uas.pda_smart_sa.R;
+import com.uas.pda_smart_sa.activity.FunctionActivity;
+import com.uas.pda_smart_sa.adapter.SingleSelectionAdapter;
+import com.uas.pda_smart_sa.bean.VendorBean;
+import com.uas.pda_smart_sa.bean.WhcodeBean;
+import com.uas.pda_smart_sa.global.GloableParams;
+import com.uas.pda_smart_sa.listener.MyEditorActionListener;
+import com.uas.pda_smart_sa.util.CommonUtil;
+import com.uas.pda_smart_sa.util.FastjsonUtil;
+import com.uas.pda_smart_sa.util.HttpCallback;
+import com.uas.pda_smart_sa.util.HttpParams;
+import com.uas.pda_smart_sa.util.VolleyRequest;
+import com.uas.pda_smart_sa.view.ClearableEditText;
+import com.uas.pda_smart_sa.view.EmptyLayout;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author RaoMeng
+ * @describe 公共单选页面
+ * @date 2018/6/20 17:16
+ */
+public class SingleSelectionFragment extends BaseFragment implements HttpCallback {
+    public static final String FLAG_WHICH_PAGE = "flag_which_page";
+
+    public static final int STORAGE_IN_ADD_TYPE = 1;
+    public static final int STORAGE_IN_ADD_WAREHOUSE = 2;
+    public static final int STORAGE_IN_ADD_SUPPLIER = 3;
+    public static final int STORAGE_IN_ADD_DETAIL_SUPPLIER = 4;
+
+    private final int FLAG_PDAIO_IN_GETWHCODE = 101;
+    private final int FLAG_PDAIO_IN_GETVENDOR = 102;
+
+    private PullToRefreshListView mListView;
+    private SingleSelectionAdapter mSingleSelectionAdapter;
+    private List<String> mSelectionList;
+    private LinearLayout mSearchLinearLayout;
+    private ClearableEditText mSearchEditText;
+    private TextView mSearchTextView;
+    private int mWhichPage;
+    private StringRequest mStringRequest;
+    private EmptyLayout mEmptyLayout;
+    private List<WhcodeBean> mWhcodeBeans;
+    private List<VendorBean> mVendorBeans;
+    private int mPageIndex = 1, mPageSize = 20;
+    private String mKeyword = "";
+    private long mPiId;
+
+    private OnSelectionListener mOnSelectionListener;
+
+    public void setOnSelectionListener(OnSelectionListener onSelectionListener) {
+        mOnSelectionListener = onSelectionListener;
+    }
+
+    @Override
+    protected int getLayout() {
+        return R.layout.fragment_single_selection;
+    }
+
+    @Override
+    protected void initViews() {
+        mListView = root.findViewById(R.id.single_selection_lv);
+        mSearchLinearLayout = root.findViewById(R.id.single_selection_search_ll);
+        mSearchEditText = root.findViewById(R.id.single_selection_search_cet);
+        mSearchTextView = root.findViewById(R.id.single_selection_search_tv);
+
+        mEmptyLayout = new EmptyLayout(mActivity, mListView.getRefreshableView());
+        mEmptyLayout.setShowLoadingButton(false);
+        mEmptyLayout.setShowEmptyButton(false);
+        mEmptyLayout.setShowErrorButton(false);
+        mEmptyLayout.setEmptyMessage("数据为空");
+
+        Bundle arguments = getArguments();
+        if (arguments != null) {
+            mWhichPage = arguments.getInt(FLAG_WHICH_PAGE);
+            mPiId = arguments.getLong("pi_id");
+        }
+
+        mSelectionList = new ArrayList<>();
+        mSingleSelectionAdapter = new SingleSelectionAdapter(mActivity, mSelectionList);
+        mListView.setAdapter(mSingleSelectionAdapter);
+
+        mWhcodeBeans = new ArrayList<>();
+        mVendorBeans = new ArrayList<>();
+    }
+
+    @Override
+    protected void initEvents() {
+        CommonUtil.setEditorActionListener(mSearchEditText, new MyEditorActionListener() {
+            @Override
+            public void MyEditorAction(String text, int actionId, KeyEvent event) {
+                mKeyword = text;
+                mPageIndex = 1;
+                switch (mWhichPage) {
+                    case STORAGE_IN_ADD_WAREHOUSE:
+                        progressDialog.show();
+                        getWhcodeList();
+                        break;
+                    case STORAGE_IN_ADD_SUPPLIER:
+                    case STORAGE_IN_ADD_DETAIL_SUPPLIER:
+                        progressDialog.show();
+                        getVendorList();
+                        break;
+                    default:
+                        break;
+                }
+            }
+        });
+
+        mSearchTextView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                mKeyword = mSearchEditText.getText().toString();
+                mPageIndex = 1;
+                switch (mWhichPage) {
+                    case STORAGE_IN_ADD_WAREHOUSE:
+                        progressDialog.show();
+                        getWhcodeList();
+                        break;
+                    case STORAGE_IN_ADD_SUPPLIER:
+                    case STORAGE_IN_ADD_DETAIL_SUPPLIER:
+                        progressDialog.show();
+                        getVendorList();
+                        break;
+                    default:
+                        break;
+                }
+            }
+        });
+
+        mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+            @Override
+            public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
+                int realPosition = (int) adapterView.getItemIdAtPosition(i);
+                Object selection = null;
+                switch (mWhichPage) {
+                    case STORAGE_IN_ADD_TYPE:
+                        selection = mSelectionList.get(realPosition);
+                        break;
+                    case STORAGE_IN_ADD_WAREHOUSE:
+                        selection = mWhcodeBeans.get(realPosition);
+                        break;
+                    case STORAGE_IN_ADD_SUPPLIER:
+                    case STORAGE_IN_ADD_DETAIL_SUPPLIER:
+                        selection = mVendorBeans.get(realPosition);
+                        break;
+                    default:
+                        break;
+                }
+                if (mWhichPage == STORAGE_IN_ADD_DETAIL_SUPPLIER) {
+                    Object finalSelection = selection;
+                    new AlertDialog.Builder(mActivity)
+                            .setMessage("确认更改供应商号?")
+                            .setNegativeButton(R.string.cancel, null)
+                            .setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() {
+                                @Override
+                                public void onClick(DialogInterface dialogInterface, int i) {
+                                    dialogInterface.dismiss();
+                                    progressDialog.show();
+                                    updateCardcode((VendorBean) finalSelection);
+                                }
+                            }).create().show();
+                } else {
+                    if (mOnSelectionListener != null) {
+                        mOnSelectionListener.onSelection(mWhichPage, selection);
+                    }
+                    getActivity().getSupportFragmentManager().popBackStack();
+                }
+
+            }
+        });
+
+        mListView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2<ListView>() {
+            @Override
+            public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {
+                switch (mWhichPage) {
+                    case STORAGE_IN_ADD_WAREHOUSE:
+                        getWhcodeList();
+                        break;
+                    case STORAGE_IN_ADD_SUPPLIER:
+                    case STORAGE_IN_ADD_DETAIL_SUPPLIER:
+                        mPageIndex = 1;
+                        getVendorList();
+                        break;
+                    default:
+                        break;
+                }
+            }
+
+            @Override
+            public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {
+                switch (mWhichPage) {
+                    case STORAGE_IN_ADD_WAREHOUSE:
+                        break;
+                    case STORAGE_IN_ADD_SUPPLIER:
+                    case STORAGE_IN_ADD_DETAIL_SUPPLIER:
+                        mPageIndex++;
+                        getVendorList();
+                        break;
+                    default:
+                        break;
+                }
+            }
+        });
+    }
+
+    private void updateCardcode(VendorBean vendorBean) {
+        VolleyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_PDAIO_IN_UPDATEPICARDCDE)
+                        .method(Request.Method.POST)
+                        .flag(0)
+                        .tag(TAG + "updatepicardcde")
+                        .addParam("piid", mPiId + "")
+                        .addParam("newVendor", vendorBean.getVE_CODE())
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        try {
+                            progressDialog.dismiss();
+                            String result = o.toString();
+                            JSONObject resultObject = JSON.parseObject(result);
+                            JSONObject dataObject = resultObject.getJSONObject("data");
+                            if (dataObject != null) {
+                                VendorBean newVendorBean = new VendorBean();
+                                newVendorBean.setVE_NAME(FastjsonUtil.getText(dataObject, "VE_NAME"));
+                                newVendorBean.setVE_CODE(FastjsonUtil.getText(dataObject, "VE_CODE"));
+                                newVendorBean.setVE_SHORTNAME(FastjsonUtil.getText(dataObject, "VE_SHORTNAME"));
+                                newVendorBean.setRN(1);
+
+                                if (mOnSelectionListener != null) {
+                                    mOnSelectionListener.onSelection(mWhichPage, newVendorBean);
+                                }
+                                getActivity().getSupportFragmentManager().popBackStack();
+                            } else {
+                                CommonUtil.toastNoRepeat(mActivity, "供应商号切换异常,请稍后重试");
+                            }
+                        } catch (Exception e) {
+                            CommonUtil.toastNoRepeat(mActivity, "供应商号切换异常,请稍后重试");
+                        }
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+                    }
+                });
+    }
+
+    @Override
+    protected void initDatas() {
+        switch (mWhichPage) {
+            case STORAGE_IN_ADD_TYPE:
+                FunctionActivity.setTitle("单据类型");
+                mListView.setMode(PullToRefreshBase.Mode.DISABLED);
+                mSearchLinearLayout.setVisibility(View.GONE);
+                mSelectionList.add("采购验收单");
+                mSelectionList.add("其它入库单");
+                mSelectionList.add("拨入单");
+                mSelectionList.add("其它采购入库单");
+                mSelectionList.add("生产退料单");
+                mSelectionList.add("委外退料单");
+                mSingleSelectionAdapter.notifyDataSetChanged();
+                break;
+            case STORAGE_IN_ADD_WAREHOUSE:
+                FunctionActivity.setTitle("仓库编号");
+                mListView.setMode(PullToRefreshBase.Mode.PULL_FROM_START);
+                mSearchLinearLayout.setVisibility(View.VISIBLE);
+
+                progressDialog.show();
+                getWhcodeList();
+                break;
+            case STORAGE_IN_ADD_SUPPLIER:
+            case STORAGE_IN_ADD_DETAIL_SUPPLIER:
+                FunctionActivity.setTitle("供应商号");
+                mListView.setMode(PullToRefreshBase.Mode.BOTH);
+                mSearchLinearLayout.setVisibility(View.VISIBLE);
+
+                progressDialog.show();
+                getVendorList();
+                break;
+            default:
+                break;
+        }
+    }
+
+    private void getWhcodeList() {
+        VolleyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_PDAIO_IN_GETWHCODE + "?condition=" + mKeyword)
+                        .method(Request.Method.GET)
+                        .flag(FLAG_PDAIO_IN_GETWHCODE)
+                        .tag(TAG + "getwhcode")
+                        .build(), SingleSelectionFragment.this);
+    }
+
+    private void getVendorList() {
+        VolleyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_PDAIO_IN_GETVENDOR + "?condition=" + mKeyword
+                                + "&page=" + mPageIndex + "&pageSize=" + mPageSize)
+                        .method(Request.Method.GET)
+                        .flag(FLAG_PDAIO_IN_GETVENDOR)
+                        .tag(TAG + "getvendor")
+                        .build(), SingleSelectionFragment.this);
+    }
+
+    @Override
+    public void onSuccess(int flag, Object o) throws Exception {
+        progressDialog.dismiss();
+        if (mListView.isRefreshing()) {
+            CommonUtil.toastNoRepeat(mActivity, "数据获取成功");
+            mListView.onRefreshComplete();
+        }
+        switch (flag) {
+            case FLAG_PDAIO_IN_GETWHCODE:
+                try {
+                    analysisWhcode(o);
+                } catch (Exception e) {
+                    CommonUtil.toastNoRepeat(mActivity, "数据获取异常");
+                }
+                break;
+            case FLAG_PDAIO_IN_GETVENDOR:
+                try {
+                    analysisVendor(o);
+                } catch (Exception e) {
+
+                }
+
+                break;
+            default:
+                break;
+        }
+    }
+
+    @Override
+    public void onFail(int flag, String failStr) throws Exception {
+        progressDialog.dismiss();
+        if (mListView.isRefreshing()) {
+            mListView.onRefreshComplete();
+        }
+        switch (flag) {
+            case FLAG_PDAIO_IN_GETWHCODE:
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+                mEmptyLayout.setErrorMessage(failStr);
+                mEmptyLayout.showError();
+                break;
+            case FLAG_PDAIO_IN_GETVENDOR:
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+                mEmptyLayout.setErrorMessage(failStr);
+                mEmptyLayout.showError();
+                if (mPageIndex > 1) {
+                    mPageIndex--;
+                }
+                break;
+            default:
+                break;
+        }
+    }
+
+
+    private void analysisWhcode(Object o) {
+        mWhcodeBeans.clear();
+        mSelectionList.clear();
+        String result = o.toString();
+        JSONObject resultObject = JSON.parseObject(result);
+        JSONObject dataObject = resultObject.getJSONObject("data");
+        if (dataObject != null) {
+            JSONArray whcodeArray = dataObject.getJSONArray("whcode");
+            if (whcodeArray != null) {
+                for (int i = 0; i < whcodeArray.size(); i++) {
+                    JSONObject whcodeObject = whcodeArray.getJSONObject(i);
+                    if (whcodeObject != null) {
+                        WhcodeBean whcodeBean = new WhcodeBean();
+                        String wh_code = FastjsonUtil.getText(whcodeObject, "WH_CODE");
+                        String wh_description = FastjsonUtil.getText(whcodeObject, "WH_DESCRIPTION");
+                        String wh_type = FastjsonUtil.getText(whcodeObject, "WH_TYPE");
+                        whcodeBean.setWH_CODE(wh_code);
+                        whcodeBean.setWH_DESCRIPTION(wh_description);
+                        whcodeBean.setWH_TYPE(wh_type);
+
+                        mWhcodeBeans.add(whcodeBean);
+                        mSelectionList.add(wh_code + "(" + wh_description + ")");
+                    }
+                }
+
+                mSingleSelectionAdapter.notifyDataSetChanged();
+                if (mSelectionList.size() == 0) {
+                    mEmptyLayout.showEmpty();
+                }
+            } else {
+                mSingleSelectionAdapter.notifyDataSetChanged();
+                mEmptyLayout.showEmpty();
+            }
+        } else {
+            mSingleSelectionAdapter.notifyDataSetChanged();
+            mEmptyLayout.showEmpty();
+        }
+    }
+
+
+    private void analysisVendor(Object o) {
+        if (mPageIndex == 1) {
+            mVendorBeans.clear();
+            mSelectionList.clear();
+        }
+        String result = o.toString();
+        JSONObject resultObject = JSON.parseObject(result);
+        JSONObject dataObject = resultObject.getJSONObject("data");
+        if (dataObject != null) {
+            JSONArray vendorArray = dataObject.getJSONArray("vendor");
+            if (vendorArray != null) {
+                for (int i = 0; i < vendorArray.size(); i++) {
+                    JSONObject vendorObject = vendorArray.getJSONObject(i);
+                    if (vendorObject != null) {
+                        VendorBean vendorBean = new VendorBean();
+                        String ve_code = FastjsonUtil.getText(vendorObject, "VE_CODE");
+                        String ve_name = FastjsonUtil.getText(vendorObject, "VE_NAME");
+                        String ve_shortname = FastjsonUtil.getText(vendorObject, "VE_SHORTNAME");
+                        int rn = FastjsonUtil.getInt(vendorObject, "RN");
+
+                        vendorBean.setVE_CODE(ve_code);
+                        vendorBean.setVE_NAME(ve_name);
+                        vendorBean.setVE_SHORTNAME(ve_shortname);
+                        vendorBean.setRN(rn);
+
+                        mVendorBeans.add(vendorBean);
+                        mSelectionList.add(ve_code + "(" + ve_shortname + ")");
+                    }
+                }
+
+                mSingleSelectionAdapter.notifyDataSetChanged();
+                if (mSelectionList.size() == 0) {
+                    mEmptyLayout.showEmpty();
+                }
+            } else {
+                mSingleSelectionAdapter.notifyDataSetChanged();
+                mEmptyLayout.showEmpty();
+            }
+        } else {
+            mSingleSelectionAdapter.notifyDataSetChanged();
+            mEmptyLayout.showEmpty();
+        }
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        return false;
+    }
+
+    @Override
+    public boolean onFragmentBackPressed() {
+        return false;
+    }
+
+    public interface OnSelectionListener {
+        void onSelection(int flag, Object selection);
+    }
+}

+ 481 - 0
app/src/main/java/com/uas/pda_smart_sa/fragment/StorageInAddBarcodeListFragment.java

@@ -0,0 +1,481 @@
+package com.uas.pda_smart_sa.fragment;
+
+import android.app.Dialog;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.support.v7.app.AlertDialog;
+import android.view.KeyEvent;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.LinearLayout;
+import android.widget.ListView;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.android.volley.Request;
+import com.android.volley.toolbox.StringRequest;
+import com.handmark.pulltorefresh.library.PullToRefreshBase;
+import com.handmark.pulltorefresh.library.PullToRefreshListView;
+import com.uas.pda_smart_sa.R;
+import com.uas.pda_smart_sa.activity.FunctionActivity;
+import com.uas.pda_smart_sa.adapter.StorageInAddBarcodeAdapter;
+import com.uas.pda_smart_sa.adapter.StorageInAddQuantityAdapter;
+import com.uas.pda_smart_sa.adapter.StorageSearchModeAdapter;
+import com.uas.pda_smart_sa.bean.StorageInBarcodeBean;
+import com.uas.pda_smart_sa.global.GloableParams;
+import com.uas.pda_smart_sa.listener.MyEditorActionListener;
+import com.uas.pda_smart_sa.util.CommonUtil;
+import com.uas.pda_smart_sa.util.FastjsonUtil;
+import com.uas.pda_smart_sa.util.HttpCallback;
+import com.uas.pda_smart_sa.util.HttpParams;
+import com.uas.pda_smart_sa.util.VolleyRequest;
+import com.uas.pda_smart_sa.view.ClearableEditText;
+import com.uas.pda_smart_sa.view.EmptyLayout;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author RaoMeng
+ * @describe
+ * @date 2018/6/22 10:51
+ */
+public class StorageInAddBarcodeListFragment extends BaseFragment implements HttpCallback {
+    public static final int PAGE_OUT_BARCODE_DETAIL = 111;
+    public static final int PAGE_OUT_QUANTITY_SUM = 112;
+    public static final int PAGE_IN_BARCODE_DETAIL = 113;
+    public static final int PAGE_IN_QUANTITY_SUM = 114;
+
+    private final int FLAG_GET_BARCODE_DETAIL = 201;
+    private final int FLAG_DELETE_BARCODE = 202;
+
+    private PullToRefreshListView mRefreshListView;
+    private ClearableEditText mSearchEt;
+    private TextView mSearchBtn, mClearTextView, mSearchModeView;
+    private LinearLayout mSearchLl;
+    private EmptyLayout mEmptyLayout;
+    private int mWhichPage;
+    private long mPiId;
+    private StringRequest mStringRequest;
+    private int mPageIndex = 1, mPageSize = 20;
+    private String mKeyword = "";
+    private Dialog mModeDialog;
+    private ListView mModeListView;
+    private List<String> mModeList;
+    private StorageSearchModeAdapter mModeAdapter;
+
+    private StorageInAddBarcodeAdapter mStorageInAddBarcodeAdapter;
+    private StorageInAddQuantityAdapter mStorageInAddQuantityAdapter;
+
+    private List<StorageInBarcodeBean> mStorageInBarcodeBeans;
+    private JSONArray mQuantityArray;
+    private int mSelectionPosition = -1;
+
+    private OnDeleteSuccessListener mOnDeleteSuccessListener;
+
+    public void setOnDeleteSuccessListener(OnDeleteSuccessListener onDeleteSuccessListener) {
+        mOnDeleteSuccessListener = onDeleteSuccessListener;
+    }
+
+    @Override
+    protected int getLayout() {
+        return R.layout.fragment_storage_in_add_barcode_list;
+    }
+
+    @Override
+    protected void initViews() {
+        Bundle arguments = getArguments();
+        if (arguments != null) {
+            mWhichPage = arguments.getInt("whichPage");
+            mPiId = arguments.getLong("piid");
+        }
+
+        mRefreshListView = root.findViewById(R.id.storage_in_add_barcode_list_lv);
+        mRefreshListView.setMode(PullToRefreshBase.Mode.BOTH);
+        mEmptyLayout = new EmptyLayout(mActivity, mRefreshListView.getRefreshableView());
+        mEmptyLayout.setShowLoadingButton(false);
+        mEmptyLayout.setShowEmptyButton(false);
+        mEmptyLayout.setShowErrorButton(false);
+        mEmptyLayout.setEmptyMessage("数据为空");
+
+        mSearchLl = root.findViewById(R.id.storage_in_add_barcode_list_search_ll);
+        mSearchEt = root.findViewById(R.id.storage_in_add_barcode_list_search_cet);
+        mSearchBtn = root.findViewById(R.id.storage_in_add_barcode_list_search_tv);
+        mSearchModeView = root.findViewById(R.id.storage_in_add_barcode_list_search_mode_tv);
+        mClearTextView = getActivity().findViewById(R.id.btn_actionbar_submit);
+        mClearTextView.setText("清空");
+
+        View historyView = View.inflate(mActivity, R.layout.pop_storage_mode, null);
+        mModeListView = (ListView) historyView.findViewById(R.id.pop_ip_history_lv);
+        mModeList = new ArrayList<>();
+        mModeList.add("箱号");
+        mModeList.add("型号");
+        mModeAdapter = new StorageSearchModeAdapter(mActivity, mModeList);
+        mModeListView.setAdapter(mModeAdapter);
+
+        mModeDialog = new AlertDialog.Builder(mActivity).setView(historyView).create();
+
+        if (mWhichPage == PAGE_IN_BARCODE_DETAIL || mWhichPage == PAGE_OUT_BARCODE_DETAIL) {
+            FunctionActivity.setTitle("箱号明细");
+            mSearchLl.setVisibility(View.VISIBLE);
+            ((FunctionActivity) getActivity()).setSubmitBtnVisible(true);
+
+            mStorageInBarcodeBeans = new ArrayList<>();
+            mStorageInAddBarcodeAdapter = new StorageInAddBarcodeAdapter(mActivity, mStorageInBarcodeBeans);
+            mStorageInAddBarcodeAdapter.setWhichPage(mWhichPage);
+            mRefreshListView.setAdapter(mStorageInAddBarcodeAdapter);
+        } else if (mWhichPage == PAGE_IN_QUANTITY_SUM || mWhichPage == PAGE_OUT_QUANTITY_SUM) {
+            FunctionActivity.setTitle("数量汇总");
+            mSearchLl.setVisibility(View.GONE);
+            ((FunctionActivity) getActivity()).setSubmitBtnVisible(false);
+
+            mQuantityArray = new JSONArray();
+            mStorageInAddQuantityAdapter = new StorageInAddQuantityAdapter(mActivity, mQuantityArray);
+            mRefreshListView.setAdapter(mStorageInAddQuantityAdapter);
+        }
+    }
+
+    @Override
+    protected void initEvents() {
+        mRefreshListView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2<ListView>() {
+            @Override
+            public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {
+                mPageIndex = 1;
+                getDataList();
+            }
+
+            @Override
+            public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {
+                mPageIndex++;
+                getDataList();
+            }
+        });
+
+        mRefreshListView.getRefreshableView().setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
+            @Override
+            public boolean onItemLongClick(AdapterView<?> adapterView, View view, int i, long l) {
+                if (mWhichPage == PAGE_IN_BARCODE_DETAIL || mWhichPage == PAGE_OUT_BARCODE_DETAIL) {
+                    mSelectionPosition = (int) adapterView.getItemIdAtPosition(i);
+                    new AlertDialog.Builder(mActivity)
+                            .setMessage("确定删除该条明细?")
+                            .setNegativeButton(R.string.cancel, null)
+                            .setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() {
+                                @Override
+                                public void onClick(DialogInterface dialogInterface, int i) {
+                                    dialogInterface.dismiss();
+                                    progressDialog.show();
+                                    deleteBarcode("", mStorageInBarcodeBeans.get(mSelectionPosition).getBI_ID() + "");
+                                }
+                            }).create().show();
+                    return true;
+                } else {
+                    return false;
+                }
+            }
+        });
+
+        mClearTextView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                new AlertDialog.Builder(mActivity)
+                        .setMessage("确定清空所有明细?")
+                        .setNegativeButton(R.string.cancel, null)
+                        .setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialogInterface, int i) {
+                                progressDialog.show();
+                                mSelectionPosition = -100;
+                                deleteBarcode("All", "");
+                            }
+                        }).create().show();
+            }
+        });
+
+        CommonUtil.setEditorActionListener(mSearchEt, new MyEditorActionListener() {
+            @Override
+            public void MyEditorAction(String text, int actionId, KeyEvent event) {
+                mKeyword = text;
+                progressDialog.show();
+                mPageIndex = 1;
+                getDataList();
+            }
+        });
+
+        mSearchBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                mKeyword = mSearchEt.getText().toString().trim();
+                progressDialog.show();
+                mPageIndex = 1;
+                getDataList();
+            }
+        });
+
+        mSearchModeView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                if (mModeDialog != null) {
+                    mModeDialog.show();
+                }
+            }
+        });
+
+        mModeListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+            @Override
+            public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
+                mSearchModeView.setText(mModeList.get(i));
+                mModeDialog.dismiss();
+
+                mKeyword = mSearchEt.getText().toString().trim();
+                progressDialog.show();
+                mPageIndex = 1;
+                getDataList();
+            }
+        });
+    }
+
+    @Override
+    protected void initDatas() {
+        progressDialog.show();
+        getDataList();
+    }
+
+    private void getDataList() {
+        String url = "";
+        switch (mWhichPage) {
+            case PAGE_IN_BARCODE_DETAIL:
+                String mode = mSearchModeView.getText().toString();
+                if ("箱号".equals(mode)) {
+                    mode = "barcode";
+                } else if ("型号".equals(mode)) {
+                    mode = "prod";
+                }
+                url = GloableParams.ADDRESS_PDAIO_IN_GETBARCODEDETAIL + "?piid=" + mPiId + "&page=" + mPageIndex
+                        + "&pageSize=" + mPageSize + "&condition=" + mKeyword + "&kind=" + mode;
+                break;
+            case PAGE_IN_QUANTITY_SUM:
+                url = GloableParams.ADDRESS_PDAIO_IN_GETPRODINOUTQTYSUM + "?piid=" + mPiId + "&page=" + mPageIndex
+                        + "&pageSize=" + mPageSize + "&condition=" + mKeyword;
+                break;
+            case PAGE_OUT_BARCODE_DETAIL:
+                mode = mSearchModeView.getText().toString();
+                if ("箱号".equals(mode)) {
+                    mode = "barcode";
+                } else if ("型号".equals(mode)) {
+                    mode = "prod";
+                }
+                url = GloableParams.ADDRESS_PDAIO_OUT_GETBARCODEDETAIL + "?piid=" + mPiId + "&page=" + mPageIndex
+                        + "&pageSize=" + mPageSize + "&condition=" + mKeyword + "&kind=" + mode;
+                break;
+            case PAGE_OUT_QUANTITY_SUM:
+                url = GloableParams.ADDRESS_PDAIO_OUT_GETPRODINOUTQTYSUM + "?piid=" + mPiId + "&page=" + mPageIndex
+                        + "&pageSize=" + mPageSize + "&condition=" + mKeyword;
+                break;
+            default:
+                break;
+        }
+
+
+        VolleyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(url)
+                        .method(Request.Method.GET)
+                        .flag(FLAG_GET_BARCODE_DETAIL)
+                        .tag(TAG + "getbarcodedetail")
+                        .build(), this);
+    }
+
+    @Override
+    public void onSuccess(int flag, Object o) throws Exception {
+        try {
+            progressDialog.dismiss();
+            if (mRefreshListView.isRefreshing()) {
+                mRefreshListView.onRefreshComplete();
+            }
+            switch (flag) {
+                case FLAG_GET_BARCODE_DETAIL:
+                    analysisBarcodeDetail(o);
+                    break;
+                case FLAG_DELETE_BARCODE:
+                    if (mOnDeleteSuccessListener != null) {
+                        mOnDeleteSuccessListener.onDelteSuccess();
+                    }
+                    if (mSelectionPosition == -100) {
+                        mStorageInBarcodeBeans.clear();
+                        mStorageInAddBarcodeAdapter.notifyDataSetChanged();
+                    } else {
+                        try {
+                            if (mStorageInBarcodeBeans.size() > mSelectionPosition) {
+                                mStorageInBarcodeBeans.remove(mSelectionPosition);
+                                mStorageInAddBarcodeAdapter.notifyDataSetChanged();
+                            }
+                        } catch (Exception e) {
+
+                        }
+                    }
+                    if (mStorageInBarcodeBeans.size() == 0) {
+                        mEmptyLayout.showEmpty();
+                    }
+                    CommonUtil.toastNoRepeat(mActivity, "删除条码明细成功!");
+                    break;
+                default:
+                    break;
+            }
+        } catch (Exception e) {
+
+        }
+    }
+
+    @Override
+    public void onFail(int flag, String failStr) throws Exception {
+        try {
+            progressDialog.dismiss();
+            if (mRefreshListView.isRefreshing()) {
+                mRefreshListView.onRefreshComplete();
+            }
+            switch (flag) {
+                case FLAG_GET_BARCODE_DETAIL:
+                    if (mPageIndex == 1) {
+                        mEmptyLayout.setErrorMessage(failStr);
+                        mEmptyLayout.showError();
+                    } else {
+                        mPageIndex--;
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+                    }
+                    break;
+                case FLAG_DELETE_BARCODE:
+                    CommonUtil.toastNoRepeat(mActivity, failStr);
+                    break;
+                default:
+                    break;
+            }
+        } catch (Exception e) {
+
+        }
+    }
+
+    private void analysisBarcodeDetail(Object o) {
+        if (mPageIndex == 1) {
+            switch (mWhichPage) {
+                case PAGE_IN_BARCODE_DETAIL:
+                case PAGE_OUT_BARCODE_DETAIL:
+                    mStorageInBarcodeBeans.clear();
+                    break;
+                case PAGE_IN_QUANTITY_SUM:
+                case PAGE_OUT_QUANTITY_SUM:
+                    mQuantityArray.clear();
+                    break;
+                default:
+                    break;
+            }
+        }
+        String result = o.toString();
+        JSONObject resultObject = JSON.parseObject(result);
+        JSONArray dataArray = resultObject.getJSONArray("data");
+        if (dataArray != null) {
+            switch (mWhichPage) {
+                case PAGE_IN_BARCODE_DETAIL:
+                case PAGE_OUT_BARCODE_DETAIL:
+                    for (int i = 0; i < dataArray.size(); i++) {
+                        JSONObject dataObject = dataArray.getJSONObject(i);
+                        if (dataObject != null) {
+                            StorageInBarcodeBean storageInBarcodeBean = new StorageInBarcodeBean();
+
+                            storageInBarcodeBean.setBI_ID(FastjsonUtil.getLong(dataObject, "BI_ID"));
+                            storageInBarcodeBean.setBI_MACODE(FastjsonUtil.getText(dataObject, "BI_MACODE"));
+                            storageInBarcodeBean.setPR_ORISPECCODE(FastjsonUtil.getText(dataObject, "PR_ORISPECCODE"));
+                            storageInBarcodeBean.setBI_OUTBOXCODE(FastjsonUtil.getText(dataObject, "BI_OUTBOXCODE"));
+                            storageInBarcodeBean.setBI_INQTY(FastjsonUtil.getDouble(dataObject, "BI_INQTY"));
+                            storageInBarcodeBean.setBI_BINCODE(FastjsonUtil.getText(dataObject, "BI_BINCODE"));
+
+                            mStorageInBarcodeBeans.add(storageInBarcodeBean);
+                        }
+                    }
+
+                    mStorageInAddBarcodeAdapter.notifyDataSetChanged();
+                    if (mStorageInBarcodeBeans.size() == 0) {
+                        mEmptyLayout.showEmpty();
+                    }
+                    break;
+                case PAGE_IN_QUANTITY_SUM:
+                case PAGE_OUT_QUANTITY_SUM:
+                    mQuantityArray.addAll(dataArray);
+                    mStorageInAddQuantityAdapter.notifyDataSetChanged();
+                    if (mQuantityArray.size() == 0) {
+                        mEmptyLayout.showEmpty();
+                    }
+                    break;
+                default:
+                    break;
+            }
+        } else {
+            if (mPageIndex == 1) {
+                switch (mWhichPage) {
+                    case PAGE_IN_BARCODE_DETAIL:
+                    case PAGE_OUT_BARCODE_DETAIL:
+                        mStorageInAddBarcodeAdapter.notifyDataSetChanged();
+                        break;
+                    case PAGE_IN_QUANTITY_SUM:
+                    case PAGE_OUT_QUANTITY_SUM:
+                        mStorageInAddQuantityAdapter.notifyDataSetChanged();
+                        break;
+                    default:
+                        break;
+                }
+                mEmptyLayout.showEmpty();
+            } else {
+                mPageIndex--;
+            }
+        }
+    }
+
+    private void deleteBarcode(String type, String biid) {
+        String condition = mSearchEt.getText().toString().trim();
+        String mode = mSearchModeView.getText().toString();
+        if ("箱号".equals(mode)) {
+            mode = "barcode";
+        } else if ("型号".equals(mode)) {
+            mode = "prod";
+        }
+        String url = GloableParams.ADDRESS_PDAIO_IN_DELETEBARCODE;
+        if (mWhichPage == PAGE_IN_BARCODE_DETAIL) {
+            url = GloableParams.ADDRESS_PDAIO_IN_DELETEBARCODE;
+        } else if (mWhichPage == PAGE_OUT_BARCODE_DETAIL) {
+            url = GloableParams.ADDRESS_PDAIO_OUT_DELETEBARCODE;
+        }
+        VolleyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(url)
+                        .method(Request.Method.POST)
+                        .flag(FLAG_DELETE_BARCODE)
+                        .tag(TAG + "deletebarcode")
+                        .addParam("piid", mPiId + "")
+                        .addParam("type", type)
+                        .addParam("biid", biid)
+                        .addParam("condition", condition)
+                        .addParam("kind", mode)
+                        .build(), StorageInAddBarcodeListFragment.this);
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        ((FunctionActivity) getActivity()).setSubmitBtnVisible(false);
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        return false;
+    }
+
+    @Override
+    public boolean onFragmentBackPressed() {
+        return false;
+    }
+
+    public interface OnDeleteSuccessListener {
+        void onDelteSuccess();
+    }
+}

+ 34 - 45
app/src/main/java/com/uas/pda_smart_sa/fragment/StorageInAddDetailFragment.java

@@ -13,15 +13,20 @@ import android.view.View;
 import android.widget.Button;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
+import android.widget.ListView;
 import android.widget.PopupWindow;
 import android.widget.TextView;
 
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.android.volley.Request;
 import com.android.volley.toolbox.StringRequest;
 import com.uas.pda_smart_sa.R;
 import com.uas.pda_smart_sa.activity.FunctionActivity;
+import com.uas.pda_smart_sa.adapter.StorageInAddQuantityAdapter;
+import com.uas.pda_smart_sa.bean.StorageInBillBean;
+import com.uas.pda_smart_sa.bean.VendorBean;
 import com.uas.pda_smart_sa.global.GloableParams;
 import com.uas.pda_smart_sa.listener.MyEditorActionListener;
 import com.uas.pda_smart_sa.util.CameraUtil;
@@ -31,6 +36,7 @@ import com.uas.pda_smart_sa.util.FastjsonUtil;
 import com.uas.pda_smart_sa.util.FragmentUtils;
 import com.uas.pda_smart_sa.util.HttpCallback;
 import com.uas.pda_smart_sa.util.HttpParams;
+import com.uas.pda_smart_sa.util.VolleyRequest;
 import com.uas.pda_smart_sa.view.ClearableEditText;
 import com.uuzuche.lib_zxing.activity.CaptureActivity;
 import com.uuzuche.lib_zxing.activity.CodeUtils;
@@ -55,11 +61,9 @@ public class StorageInAddDetailFragment extends BaseFragment implements View.OnC
     private static final int SCAN_BARCODE_CODE = 121;
     private static final int FLAG_CONFIRM_POST = 0x09;
 
-    private TextView mTypeTv, mWhcodeTv, mSupplierTv, mInoutnoTv, mResultTv, mMaterialTv,
-            mQuantityTv, mTotalTv, mPoTv, mDatecodeTv, mLotnoTv, mBrandTv;
+    private TextView mTypeTv, mWhcodeTv, mSupplierTv, mInoutnoTv, mResultTv;
     private ClearableEditText mBarcodeEt;
     private ImageView mScanIv, mSupplierIv;
-    private LinearLayout mMessageLl;
     private Button mCommitButton, mMenuButton, mSplitePlateButton;
     private StringRequest mStringRequest;
     private PopupWindow mMenuPopupWindow;
@@ -67,6 +71,9 @@ public class StorageInAddDetailFragment extends BaseFragment implements View.OnC
     private String mPiClass, mPiWhcode, mPiCardcode, mPiInoutno, mPiStatus, mPiInvostatus;
     private long mPiId;
     private int mWhichPage;
+    private ListView mResultListView;
+    private JSONArray mResultArray;
+    private StorageInAddQuantityAdapter mResultAdapter;
     private OnStorageInAddListener mOnStorageInAddListener;
     private OnStorageInToListListener mOnStorageInToListListener;
 
@@ -116,16 +123,12 @@ public class StorageInAddDetailFragment extends BaseFragment implements View.OnC
         mScanIv = (ImageView) root.findViewById(R.id.storage_in_add_detail_scan_iv);
         mSupplierIv = root.findViewById(R.id.storage_in_add_detail_supplier_icon);
         mResultTv = (TextView) root.findViewById(R.id.storage_in_add_detail_result_tv);
-        mMaterialTv = (TextView) root.findViewById(R.id.storage_in_add_detail_material_tv);
-        mBrandTv = (TextView) root.findViewById(R.id.storage_in_add_detail_brand_tv);
-        mQuantityTv = (TextView) root.findViewById(R.id.storage_in_add_detail_quantity_tv);
-        mTotalTv = (TextView) root.findViewById(R.id.storage_in_add_detail_total_tv);
-        mPoTv = (TextView) root.findViewById(R.id.storage_in_add_detail_po_tv);
-        mDatecodeTv = (TextView) root.findViewById(R.id.storage_in_add_detail_datecode_tv);
-        mLotnoTv = (TextView) root.findViewById(R.id.storage_in_add_detail_lotno_tv);
-        mMessageLl = root.findViewById(R.id.storage_in_add_detail_message_ll);
         mCommitButton = root.findViewById(R.id.storage_in_add_detail_commit_btn);
         mSplitePlateButton = root.findViewById(R.id.storage_in_add_detail_split_plate_btn);
+        mResultListView = root.findViewById(R.id.storage_in_add_detail_result_lv);
+        mResultArray = new JSONArray();
+        mResultAdapter = new StorageInAddQuantityAdapter(mActivity, mResultArray);
+        mResultListView.setAdapter(mResultAdapter);
 
         mBarcodeEt.requestFocus();
     }
@@ -154,13 +157,13 @@ public class StorageInAddDetailFragment extends BaseFragment implements View.OnC
             repeat = -1;
         }
         if (TextUtils.isEmpty(text)) {
-            CommonUtil.toastNoRepeat(getActivity(), "请采集条码");
+            CommonUtil.toastNoRepeat(getActivity(), "请采集箱号");
         } else if (!text.matches(Constants.REGEX.NO_SYMBOL)) {
             CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.barcode_cannot_contain_special));
         } else {
             if (CommonUtil.isNetWorkConnected(getActivity())) {
                 progressDialog.show();
-                VollyRequest.getInstance().stringRequest(mStringRequest,
+                VolleyRequest.getInstance().stringRequest(mStringRequest,
                         new HttpParams.Builder()
                                 .url(GloableParams.ADDRESS_PDAIO_IN_GETBARCODEINFO
                                         + "?inoutno=" + mPiInoutno
@@ -290,7 +293,7 @@ public class StorageInAddDetailFragment extends BaseFragment implements View.OnC
                             public void onClick(DialogInterface dialogInterface, int i) {
                                 dialogInterface.dismiss();
                                 progressDialog.show();
-                                VollyRequest.getInstance().stringRequest(mStringRequest,
+                                VolleyRequest.getInstance().stringRequest(mStringRequest,
                                         new HttpParams.Builder()
                                                 .url(GloableParams.ADDRESS_PDAIO_CONFIRMPOST)
                                                 .method(Request.Method.POST)
@@ -315,7 +318,7 @@ public class StorageInAddDetailFragment extends BaseFragment implements View.OnC
                 //确认分板
                 if (!CommonUtil.isRepeatClick()) {
                     progressDialog.show();
-                    VollyRequest.getInstance().stringRequest(mStringRequest,
+                    VolleyRequest.getInstance().stringRequest(mStringRequest,
                             new HttpParams.Builder()
                                     .url(GloableParams.ADDRESS_PDAIO_IN_CONFIRMSPLITPLATE)
                                     .method(Request.Method.POST)
@@ -345,7 +348,7 @@ public class StorageInAddDetailFragment extends BaseFragment implements View.OnC
     }
 
     private void revokeStorage() {
-        VollyRequest.getInstance().stringRequest(mStringRequest,
+        VolleyRequest.getInstance().stringRequest(mStringRequest,
                 new HttpParams.Builder()
                         .url(GloableParams.ADDRESS_PDAIO_IN_REVOKEBARCODE)
                         .method(Request.Method.POST)
@@ -356,7 +359,7 @@ public class StorageInAddDetailFragment extends BaseFragment implements View.OnC
     }
 
     private void deleteBill() {
-        VollyRequest.getInstance().stringRequest(mStringRequest,
+        VolleyRequest.getInstance().stringRequest(mStringRequest,
                 new HttpParams.Builder()
                         .url(GloableParams.ADDRESS_PDAIO_IN_DELETEINOUTANDDETAIL)
                         .flag(FLAG_PRODIO_DELETE)
@@ -368,7 +371,7 @@ public class StorageInAddDetailFragment extends BaseFragment implements View.OnC
 
     private void commitEvent() {
         progressDialog.show();
-        VollyRequest.getInstance().stringRequest(mStringRequest,
+        VolleyRequest.getInstance().stringRequest(mStringRequest,
                 new HttpParams.Builder()
                         .url(GloableParams.ADDRESS_PDAIO_IN_NEWPRODIODETAIL)
                         .method(Request.Method.POST)
@@ -456,8 +459,8 @@ public class StorageInAddDetailFragment extends BaseFragment implements View.OnC
         progressDialog.dismiss();
         switch (flag) {
             case FLAG_BARCODE_INFO:
-                mMessageLl.setVisibility(View.INVISIBLE);
-                initMessageTv();
+                mResultArray.clear();
+                mResultAdapter.notifyDataSetChanged();
                 CommonUtil.toastNoRepeat(mActivity, failStr);
                 mResultTv.setText(failStr);
                 break;
@@ -479,25 +482,21 @@ public class StorageInAddDetailFragment extends BaseFragment implements View.OnC
         String result = o.toString();
         final JSONObject resultObject = JSON.parseObject(result);
         boolean success = FastjsonUtil.getBoolean(resultObject, "success");
+        mResultArray.clear();
         if (success) {
-            JSONObject dataObject = resultObject.getJSONObject("data");
+            JSONArray dataArray = resultObject.getJSONArray("data");
             mResultTv.setText("采集成功!");
-            mMessageLl.setVisibility(View.VISIBLE);
-
-            mMaterialTv.setText(FastjsonUtil.getText(dataObject, "BI_PRODCODE"));
-            mBrandTv.setText(FastjsonUtil.getText(dataObject, "BI_BRAND"));
-            mQuantityTv.setText(FastjsonUtil.getText(dataObject, "BI_INQTY"));
-            mTotalTv.setText(CommonUtil.doubleFormat(FastjsonUtil.getDouble(dataObject, "sumQty")));
-            mPoTv.setText(FastjsonUtil.getText(dataObject, "BI_ORDERCODE"));
-            mDatecodeTv.setText(FastjsonUtil.getText(dataObject, "BI_DATECODE"));
-            mLotnoTv.setText(FastjsonUtil.getText(dataObject, "BI_LOTNO"));
+
+            if (dataArray != null) {
+                mResultArray.addAll(dataArray);
+            }
+            mResultAdapter.notifyDataSetChanged();
         } else {
-            mMessageLl.setVisibility(View.INVISIBLE);
-            initMessageTv();
+            mResultAdapter.notifyDataSetChanged();
             int repeat = FastjsonUtil.getInt(resultObject, "repeat");
             if (repeat == -1) {
                 new AlertDialog.Builder(mActivity)
-                        .setMessage("已存在重复条码,是否继续采集?")
+                        .setMessage("已存在重复箱号,是否继续采集?")
                         .setNegativeButton(R.string.cancel, null)
                         .setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() {
                             @Override
@@ -513,16 +512,6 @@ public class StorageInAddDetailFragment extends BaseFragment implements View.OnC
         }
     }
 
-    private void initMessageTv() {
-        mMaterialTv.setText("");
-        mBrandTv.setText("");
-        mQuantityTv.setText("");
-        mTotalTv.setText("");
-        mPoTv.setText("");
-        mDatecodeTv.setText("");
-        mLotnoTv.setText("");
-    }
-
     /**
      * 展示扩展菜单
      */
@@ -577,10 +566,10 @@ public class StorageInAddDetailFragment extends BaseFragment implements View.OnC
         }
 
         initDatas();
-
         mResultTv.setText("");
-        mMessageLl.setVisibility(View.INVISIBLE);
         mBarcodeEt.setText("");
+        mResultArray.clear();
+        mResultAdapter.notifyDataSetChanged();
     }
 
     @Override

+ 38 - 27
app/src/main/java/com/uas/pda_smart_sa/fragment/StorageInAddFragment.java

@@ -16,6 +16,9 @@ import com.android.volley.Request;
 import com.android.volley.toolbox.StringRequest;
 import com.uas.pda_smart_sa.R;
 import com.uas.pda_smart_sa.activity.FunctionActivity;
+import com.uas.pda_smart_sa.bean.StorageInBillBean;
+import com.uas.pda_smart_sa.bean.VendorBean;
+import com.uas.pda_smart_sa.bean.WhcodeBean;
 import com.uas.pda_smart_sa.global.GloableParams;
 import com.uas.pda_smart_sa.tools.SharedPreUtil;
 import com.uas.pda_smart_sa.util.CommonUtil;
@@ -24,6 +27,7 @@ import com.uas.pda_smart_sa.util.FastjsonUtil;
 import com.uas.pda_smart_sa.util.FragmentUtils;
 import com.uas.pda_smart_sa.util.HttpCallback;
 import com.uas.pda_smart_sa.util.HttpParams;
+import com.uas.pda_smart_sa.util.VolleyRequest;
 
 /**
  * @author RaoMeng
@@ -70,22 +74,23 @@ public class StorageInAddFragment extends BaseFragment implements View.OnClickLi
         mConfirmButton = root.findViewById(R.id.storage_in_add_commit_btn);
         mRedTextView = root.findViewById(R.id.storage_in_add_supplier_red_iv);
 
-        String cacheType = SharedPreUtil.getString(mActivity, Constants.FLAG.CACHE_STORAGE_IN_TYPE, "");
-
-        if (TextUtils.isEmpty(cacheType)) {
-            mTypeTextView.setText("采购验收单");
-            mConfirmButton.setEnabled(false);
-            mRedTextView.setVisibility(View.VISIBLE);
-        } else {
-            mTypeTextView.setText(cacheType);
-            if ("采购验收单".equals(cacheType)) {
-                mConfirmButton.setEnabled(false);
-                mRedTextView.setVisibility(View.VISIBLE);
-            } else {
-                mConfirmButton.setEnabled(true);
-                mRedTextView.setVisibility(View.INVISIBLE);
-            }
-        }
+        mTypeTextView.setText("完工入库单");
+//        String cacheType = SharedPreUtil.getString(mActivity, Constants.FLAG.CACHE_STORAGE_IN_TYPE, "");
+//
+//        if (TextUtils.isEmpty(cacheType)) {
+//            mTypeTextView.setText("采购验收单");
+//            mConfirmButton.setEnabled(false);
+//            mRedTextView.setVisibility(View.VISIBLE);
+//        } else {
+//            mTypeTextView.setText(cacheType);
+//            if ("采购验收单".equals(cacheType)) {
+//                mConfirmButton.setEnabled(false);
+//                mRedTextView.setVisibility(View.VISIBLE);
+//            } else {
+//                mConfirmButton.setEnabled(true);
+//                mRedTextView.setVisibility(View.INVISIBLE);
+//            }
+//        }
     }
 
     @Override
@@ -160,7 +165,7 @@ public class StorageInAddFragment extends BaseFragment implements View.OnClickLi
         progressDialog.show();
         final String type = mTypeTextView.getText().toString();
         final String supplier = mVendorBean == null ? "" : mVendorBean.getVE_CODE();
-        VollyRequest.getInstance().stringRequest(mStringRequest,
+        VolleyRequest.getInstance().stringRequest(mStringRequest,
                 new HttpParams.Builder()
                         .url(GloableParams.ADDRESS_PDAIO_IN_NEWPRODINOUT)
                         .method(Request.Method.POST)
@@ -245,18 +250,24 @@ public class StorageInAddFragment extends BaseFragment implements View.OnClickLi
     }
 
     private void isConfirmEnable() {
-        String type = mTypeTextView.getText().toString();
-        String supplier = mSupplierTextView.getText().toString();
-        if ("采购验收单".equals(type)) {
-            mRedTextView.setVisibility(View.VISIBLE);
-            if (TextUtils.isEmpty(type) || TextUtils.isEmpty(supplier)) {
-                mConfirmButton.setEnabled(false);
-            } else {
-                mConfirmButton.setEnabled(true);
-            }
+//        String type = mTypeTextView.getText().toString();
+//        String supplier = mSupplierTextView.getText().toString();
+//        if ("采购验收单".equals(type)) {
+//            mRedTextView.setVisibility(View.VISIBLE);
+//            if (TextUtils.isEmpty(type) || TextUtils.isEmpty(supplier)) {
+//                mConfirmButton.setEnabled(false);
+//            } else {
+//                mConfirmButton.setEnabled(true);
+//            }
+//        } else {
+//            mConfirmButton.setEnabled(true);
+//            mRedTextView.setVisibility(View.INVISIBLE);
+//        }
+        String whcode = mWarehouseTextView.getText().toString().trim();
+        if (TextUtils.isEmpty(whcode)) {
+            mConfirmButton.setEnabled(false);
         } else {
             mConfirmButton.setEnabled(true);
-            mRedTextView.setVisibility(View.INVISIBLE);
         }
     }
 

+ 5 - 2
app/src/main/java/com/uas/pda_smart_sa/fragment/StorageInAddListFragment.java

@@ -23,7 +23,9 @@ import com.handmark.pulltorefresh.library.PullToRefreshBase;
 import com.handmark.pulltorefresh.library.PullToRefreshListView;
 import com.uas.pda_smart_sa.R;
 import com.uas.pda_smart_sa.activity.FunctionActivity;
+import com.uas.pda_smart_sa.adapter.StorageInAddAdapter;
 import com.uas.pda_smart_sa.application.PdaApplication;
+import com.uas.pda_smart_sa.bean.StorageInBillBean;
 import com.uas.pda_smart_sa.global.GloableParams;
 import com.uas.pda_smart_sa.listener.MyEditorActionListener;
 import com.uas.pda_smart_sa.tools.SharedPreUtil;
@@ -32,6 +34,7 @@ import com.uas.pda_smart_sa.util.Constants;
 import com.uas.pda_smart_sa.util.FastjsonUtil;
 import com.uas.pda_smart_sa.util.HttpCallback;
 import com.uas.pda_smart_sa.util.HttpParams;
+import com.uas.pda_smart_sa.util.VolleyRequest;
 import com.uas.pda_smart_sa.view.ClearableEditText;
 import com.uas.pda_smart_sa.view.EmptyLayout;
 
@@ -322,7 +325,7 @@ public class StorageInAddListFragment extends BaseFragment implements HttpCallba
     }
 
     private void deleteBill() {
-        VollyRequest.getInstance().stringRequest(mStringRequest,
+        VolleyRequest.getInstance().stringRequest(mStringRequest,
                 new HttpParams.Builder()
                         .url(GloableParams.ADDRESS_PDAIO_IN_DELETEINOUTANDDETAIL)
                         .flag(FLAG_PRODIO_DELETE)
@@ -385,7 +388,7 @@ public class StorageInAddListFragment extends BaseFragment implements HttpCallba
             } else if (mWhichPage == PAGE_OUT_HISTORY) {
                 url = GloableParams.ADDRESS_PDAIO_OUT_GETPOSTEDPRODINOUTLIST;
             }
-            VollyRequest.getInstance().stringRequest(mStringRequest,
+            VolleyRequest.getInstance().stringRequest(mStringRequest,
                     new HttpParams.Builder()
                             .url(url + "?condition=" + mKeyword
                                     + "&page=" + mPageIndex

+ 125 - 2
app/src/main/java/com/uas/pda_smart_sa/fragment/StorageInFragment.java

@@ -1,5 +1,6 @@
 package com.uas.pda_smart_sa.fragment;
 
+import android.os.Bundle;
 import android.support.v4.app.Fragment;
 import android.view.KeyEvent;
 import android.view.View;
@@ -7,11 +8,19 @@ import android.widget.AdapterView;
 import android.widget.GridView;
 import android.widget.SimpleAdapter;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.android.volley.Request;
 import com.uas.pda_smart_sa.R;
 import com.uas.pda_smart_sa.activity.FunctionActivity;
+import com.uas.pda_smart_sa.bean.StorageInBillBean;
 import com.uas.pda_smart_sa.global.GloableParams;
 import com.uas.pda_smart_sa.tools.DataSourceManager;
+import com.uas.pda_smart_sa.util.FastjsonUtil;
 import com.uas.pda_smart_sa.util.FragmentUtils;
+import com.uas.pda_smart_sa.util.HttpCallback;
+import com.uas.pda_smart_sa.util.HttpParams;
+import com.uas.pda_smart_sa.util.VolleyRequest;
 
 import java.util.List;
 import java.util.Map;
@@ -84,8 +93,8 @@ public class StorageInFragment extends BaseFragment implements View.OnClickListe
                         break;
                     case GloableParams.MENU_STORAGE_PRODUCT_STORAGE_IN:
                         //完工品入库
-                        mFragment = new FinishedGoodsStorageFragment();
-                        break;
+                        getLastProd();
+                        return;
                     case GloableParams.MENU_STORAGE_RANDOM_CHECK:
                         //抽查校验
                         mFragment = new RandomCheckFragment();
@@ -104,11 +113,125 @@ public class StorageInFragment extends BaseFragment implements View.OnClickListe
         });
     }
 
+    /**
+     * 获取下一入库物料
+     */
+    private void getLastProd() {
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_PDAIO_IN_GETLATESTPRODINOUT)
+                        .method(Request.Method.GET)
+                        .tag("getlastestprodinout")
+                        .flag(0)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        try {
+                            progressDialog.dismiss();
+                            String result = o.toString();
+                            JSONObject resultObject = JSON.parseObject(result);
+                            boolean success = FastjsonUtil.getBoolean(resultObject, "success");
+                            JSONObject dataObject = resultObject.getJSONObject("data");
+                            if (success && dataObject != null) {
+                                String pi_class = FastjsonUtil.getText(dataObject, "PI_CLASS");
+                                String pi_whcode = FastjsonUtil.getText(dataObject, "PI_WHCODE");
+                                String pi_cardcode = FastjsonUtil.getText(dataObject, "PI_CARDCODE");
+                                long pi_id = FastjsonUtil.getLong(dataObject, "PI_ID");
+                                String pi_inoutno = FastjsonUtil.getText(dataObject, "PI_INOUTNO");
+                                String pi_status = FastjsonUtil.getText(dataObject, "PI_STATUS");
+                                String pi_invostatus = FastjsonUtil.getText(dataObject, "PI_INVOSTATUS");
+
+                                jumpToStorageInAddDetail(pi_class, pi_whcode, pi_cardcode, pi_id, pi_inoutno, pi_status, pi_invostatus, StorageInAddDetailFragment.PAGE_FUNCTION_ACTIVITY);
+                            } else {
+                                storageInAddFinish();
+                            }
+                        } catch (Exception e) {
+                            storageInAddFinish();
+                        }
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        storageInAddFinish();
+                    }
+                });
+    }
+
     @Override
     protected void initDatas() {
 
     }
 
+    private void jumpToStorageInAddDetail(String pi_class, String pi_whcode, String pi_cardcode, long pi_id, String pi_inoutno, String pi_status, String pi_invostatus, int whichPage) {
+        mFragment = new StorageInAddDetailFragment();
+        Bundle bundle = new Bundle();
+        bundle.putString("pi_class", pi_class);
+        bundle.putString("pi_whcode", pi_whcode);
+        bundle.putString("pi_cardcode", pi_cardcode);
+        bundle.putLong("pi_id", pi_id);
+        bundle.putString("pi_inoutno", pi_inoutno);
+        bundle.putString("pi_status", pi_status);
+        bundle.putString("pi_invostatus", pi_invostatus);
+        bundle.putInt("whichPage", whichPage);
+        mFragment.setArguments(bundle);
+
+        FragmentUtils.switchFragment(StorageInFragment.this, mFragment);
+
+        ((StorageInAddDetailFragment) mFragment).setOnStorageInAddListener(new StorageInAddDetailFragment.OnStorageInAddListener() {
+            @Override
+            public void onStorageInAdd() {
+                storageInAddFinish();
+            }
+        });
+
+        if (whichPage == StorageInAddDetailFragment.PAGE_STORAGE_IN_ADD
+                || whichPage == StorageInAddDetailFragment.PAGE_STORAGE_IN_ADD_FINISH) {
+            ((StorageInAddDetailFragment) mFragment).setOnStorageInToListListener(new StorageInAddDetailFragment.OnStorageInToListListener() {
+                @Override
+                public void onStorageInToList() {
+                    StorageInAddListFragment storageInAddListFragment = new StorageInAddListFragment();
+                    Bundle bundle = new Bundle();
+                    bundle.putInt("whichPage", StorageInAddListFragment.PAGE_STORAGE_ADD);
+                    storageInAddListFragment.setArguments(bundle);
+                    FragmentUtils.switchFragment(StorageInFragment.this, storageInAddListFragment);
+
+                    storageInAddListFragment.setOnListSelectListener(new StorageInAddListFragment.OnListSelectListener() {
+                        @Override
+                        public void onListSelect(StorageInBillBean storageInBillBean) {
+                            Fragment fragment = new StorageInAddDetailFragment();
+                            Bundle bundle = new Bundle();
+                            bundle.putString("pi_class", storageInBillBean.getPI_CLASS());
+                            bundle.putString("pi_whcode", storageInBillBean.getPI_WHCODE());
+                            bundle.putString("pi_cardcode", storageInBillBean.getPI_CARDCODE());
+                            bundle.putLong("pi_id", storageInBillBean.getPI_ID());
+                            bundle.putString("pi_inoutno", storageInBillBean.getPI_INOUTNO());
+                            bundle.putString("pi_status", storageInBillBean.getPI_STATUS());
+                            bundle.putString("pi_invostatus", storageInBillBean.getPI_INVOSTATUS());
+                            bundle.putInt("whichPage", StorageInAddDetailFragment.PAGE_STORAGE_IN_LIST);
+                            fragment.setArguments(bundle);
+
+                            FragmentUtils.switchFragment(StorageInFragment.this, fragment);
+                        }
+                    });
+                }
+            });
+        }
+    }
+
+    private void storageInAddFinish() {
+        mFragment = new StorageInAddFragment();
+        FragmentUtils.switchFragment(this, mFragment);
+
+        ((StorageInAddFragment) mFragment).setOnFinishListener(new StorageInAddFragment.OnFinishListener() {
+            @Override
+            public void onFinish(String pi_class, String pi_whcode, String pi_cardcode, long pi_id, String pi_inoutno, String pi_status, String pi_invostatus) {
+                jumpToStorageInAddDetail(pi_class, pi_whcode, pi_cardcode, pi_id, pi_inoutno, pi_status, pi_invostatus, StorageInAddDetailFragment.PAGE_STORAGE_IN_ADD_FINISH);
+            }
+        });
+    }
+
     @Override
     public void onHiddenChanged(boolean hidden) {
         if (!hidden) {

+ 83 - 0
app/src/main/java/com/uas/pda_smart_sa/global/GloableParams.java

@@ -209,6 +209,26 @@ public class GloableParams {
     public static String ADDRESS_INMATERIAL_DELETEGETDETAIL;
     public static String ADDRESS_OUTFINISH_GETCHECKBOXCODE;
     public static String ADDRESS_OUTFINISH_CHECKBOXCODENG;
+    public static String ADDRESS_PDAIO_IN_GETPRODINOUTLIST;
+    public static String ADDRESS_PDAIO_OUT_GETPRODINOUTLIST;
+    public static String ADDRESS_PDAIO_OUT_GETPOSTEDPRODINOUTLIST;
+    public static String ADDRESS_PDAIO_IN_GETWHCODE;
+    public static String ADDRESS_PDAIO_IN_GETVENDOR;
+    public static String ADDRESS_PDAIO_IN_NEWPRODINOUT;
+    public static String ADDRESS_PDAIO_IN_GETBARCODEINFO;
+    public static String ADDRESS_PDAIO_IN_NEWPRODIODETAIL;
+    public static String ADDRESS_PDAIO_IN_DELETEINOUTANDDETAIL;
+    public static String ADDRESS_PDAIO_IN_GETBARCODEDETAIL;
+    public static String ADDRESS_PDAIO_IN_GETPRODINOUTQTYSUM;
+    public static String ADDRESS_PDAIO_IN_DELETEBARCODE;
+    public static String ADDRESS_PDAIO_IN_REVOKEBARCODE;
+    public static String ADDRESS_PDAIO_IN_UPDATEPICARDCDE;
+    public static String ADDRESS_PDAIO_IN_CONFIRMSPLITPLATE;
+    public static String ADDRESS_PDAIO_CONFIRMPOST;
+    public static String ADDRESS_PDAIO_OUT_GETBARCODEDETAIL;
+    public static String ADDRESS_PDAIO_OUT_GETPRODINOUTQTYSUM;
+    public static String ADDRESS_PDAIO_OUT_DELETEBARCODE;
+    public static String ADDRESS_PDAIO_IN_GETLATESTPRODINOUT;
 
     //连接服务器请求地址
     private static final String ADDRESSTAIL_CONNECT_SERVER = "/api/pda/getAllMasters.action";
@@ -221,6 +241,50 @@ public class GloableParams {
     //请求条码打印模板
     private static final String ADDRESSTAIL_BARINFO_PRINTMODEL = "/api/pda/outMaterial/getPrintModel.action";
 
+    /**
+     * 完工品入库
+     */
+    //入库获取仓库列表
+    private static final String ADDRESSTAIL_PDAIO_IN_GETWHCODE = "/api/pdaio/pdaioIn/getWhcode.action";
+    //获取供应商列表
+    private static final String ADDRESSTAIL_PDAIO_IN_GETVENDOR = "/api/pdaio/pdaioIn/getVendor.action";
+    //新增入库单据
+    private static final String ADDRESSTAIL_PDAIO_IN_NEWPRODINOUT = "/api/pdaio/pdaioIn/newProdinout.action";
+    //获取条码信息
+    private static final String ADDRESSTAIL_PDAIO_IN_GETBARCODEINFO = "/api/pdaio/pdaioIn/getBarcodeInfo.action";
+    //入库单确认入库
+    private static final String ADDRESSTAIL_PDAIO_IN_NEWPRODIODETAIL = "/api/pdaio/pdaioIn/newProdiodetail.action";
+    //删除入库单据
+    private static final String ADDRESSTAIL_PDAIO_IN_DELETEINOUTANDDETAIL = "/api/pdaio/pdaioIn/deleteInoutAndDetail.action";
+    //入库单条码明细
+    private static final String ADDRESSTAIL_PDAIO_IN_GETBARCODEDETAIL = "/api/pdaio/pdaioIn/getBarcodeDetail.action";
+    //入库单据数量汇总
+    private static final String ADDRESSTAIL_PDAIO_IN_GETPRODINOUTQTYSUM = "/api/pdaio/pdaioIn/getProdInoutQtySum.action";
+    //删除入库单条码明细
+    private static final String ADDRESSTAIL_PDAIO_IN_DELETEBARCODE = "/api/pdaio/pdaioIn/deleteBarcode.action";
+    //入库单据列表
+    private static final String ADDRESSTAIL_PDAIO_IN_GETPRODINOUTLIST = "/api/pdaio/pdaioIn/getProdinoutList.action";
+    //撤销入库
+    private static final String ADDRESSTAIL_PDAIO_IN_REVOKEBARCODE = "/api/pdaio/pdaioIn/revokeBarcode.action";
+    //获取最新一条未入库的单据
+    private static final String ADDRESSTAIL_PDAIO_IN_GETLATESTPRODINOUT = "/api/pdaio/pdaioIn/getLatestProdinout.action";
+    //更改供应商号
+    private static final String ADDRESSTAIL_PDAIO_IN_UPDATEPICARDCDE = "/api/pdaio/pdaioIn/updatePiCardcde.action";
+    //确认分板
+    private static final String ADDRESSTAIL_PDAIO_IN_CONFIRMSPLITPLATE = "/api/pdaio/pdaioIn/confirmSplitPlate.action";
+    //获取出库单列表
+    private static final String ADDRESSTAIL_PDAIO_OUT_GETPRODINOUTLIST = "/api/pdaio/pdaioOut/getProdinoutList.action";
+    //获取出库单列表
+    private static final String ADDRESSTAIL_PDAIO_OUT_GETPOSTEDPRODINOUTLIST = "/api/pdaio/pdaioOut/getPostedProdinoutList.action";
+    //单据过账
+    private static final String ADDRESSTAIL_PDAIO_CONFIRMPOST = "/api/pdaio/pdaioIn/confirmPost.action";
+    //获取出库条码明细
+    private static final String ADDRESSTAIL_PDAIO_OUT_GETBARCODEDETAIL = "/api/pdaio/pdaioOut/getBarcodeDetail.action";
+    //获取出库单数量汇总
+    private static final String ADDRESSTAIL_PDAIO_OUT_GETPRODINOUTQTYSUM = "/api/pdaio/pdaioOut/getProdInoutQtySum.action";
+    //删除条码明细
+    private static final String ADDRESSTAIL_PDAIO_OUT_DELETEBARCODE = "/api/pdaio/pdaioOut/deleteBarcode.action";
+
     /**
      * 成品检验
      */
@@ -917,5 +981,24 @@ public class GloableParams {
         GloableParams.ADDRESS_INMATERIAL_DELETEGETDETAIL = uriHead + GloableParams.ADDRESSTAIL_INMATERIAL_DELETEGETDETAIL;
         GloableParams.ADDRESS_OUTFINISH_GETCHECKBOXCODE = uriHead + GloableParams.ADDRESSTAIL_OUTFINISH_GETCHECKBOXCODE;
         GloableParams.ADDRESS_OUTFINISH_CHECKBOXCODENG = uriHead + GloableParams.ADDRESSTAIL_OUTFINISH_CHECKBOXCODENG;
+        GloableParams.ADDRESS_PDAIO_IN_GETPRODINOUTLIST = uriHead + GloableParams.ADDRESSTAIL_PDAIO_IN_GETPRODINOUTLIST;
+        GloableParams.ADDRESS_PDAIO_OUT_GETPRODINOUTLIST = uriHead + GloableParams.ADDRESSTAIL_PDAIO_OUT_GETPRODINOUTLIST;
+        GloableParams.ADDRESS_PDAIO_OUT_GETPOSTEDPRODINOUTLIST = uriHead + GloableParams.ADDRESSTAIL_PDAIO_OUT_GETPOSTEDPRODINOUTLIST;
+        GloableParams.ADDRESS_PDAIO_IN_GETWHCODE = uriHead + GloableParams.ADDRESSTAIL_PDAIO_IN_GETWHCODE;
+        GloableParams.ADDRESS_PDAIO_IN_GETVENDOR = uriHead + GloableParams.ADDRESSTAIL_PDAIO_IN_GETVENDOR;
+        GloableParams.ADDRESS_PDAIO_IN_NEWPRODINOUT = uriHead + GloableParams.ADDRESSTAIL_PDAIO_IN_NEWPRODINOUT;
+        GloableParams.ADDRESS_PDAIO_IN_GETBARCODEINFO = uriHead + GloableParams.ADDRESSTAIL_PDAIO_IN_GETBARCODEINFO;
+        GloableParams.ADDRESS_PDAIO_IN_NEWPRODIODETAIL = uriHead + GloableParams.ADDRESSTAIL_PDAIO_IN_NEWPRODIODETAIL;
+        GloableParams.ADDRESS_PDAIO_IN_DELETEINOUTANDDETAIL = uriHead + GloableParams.ADDRESSTAIL_PDAIO_IN_DELETEINOUTANDDETAIL;
+        GloableParams.ADDRESS_PDAIO_IN_GETBARCODEDETAIL = uriHead + GloableParams.ADDRESSTAIL_PDAIO_IN_GETBARCODEDETAIL;
+        GloableParams.ADDRESS_PDAIO_IN_GETPRODINOUTQTYSUM = uriHead + GloableParams.ADDRESSTAIL_PDAIO_IN_GETPRODINOUTQTYSUM;
+        GloableParams.ADDRESS_PDAIO_IN_DELETEBARCODE = uriHead + GloableParams.ADDRESSTAIL_PDAIO_IN_DELETEBARCODE;
+        GloableParams.ADDRESS_PDAIO_IN_UPDATEPICARDCDE = uriHead + GloableParams.ADDRESSTAIL_PDAIO_IN_UPDATEPICARDCDE;
+        GloableParams.ADDRESS_PDAIO_IN_CONFIRMSPLITPLATE = uriHead + GloableParams.ADDRESSTAIL_PDAIO_IN_CONFIRMSPLITPLATE;
+        GloableParams.ADDRESS_PDAIO_CONFIRMPOST = uriHead + GloableParams.ADDRESSTAIL_PDAIO_CONFIRMPOST;
+        GloableParams.ADDRESS_PDAIO_OUT_GETBARCODEDETAIL = uriHead + GloableParams.ADDRESSTAIL_PDAIO_OUT_GETBARCODEDETAIL;
+        GloableParams.ADDRESS_PDAIO_OUT_GETPRODINOUTQTYSUM = uriHead + GloableParams.ADDRESSTAIL_PDAIO_OUT_GETPRODINOUTQTYSUM;
+        GloableParams.ADDRESS_PDAIO_OUT_DELETEBARCODE = uriHead + GloableParams.ADDRESSTAIL_PDAIO_OUT_DELETEBARCODE;
+        GloableParams.ADDRESS_PDAIO_IN_GETLATESTPRODINOUT = uriHead + GloableParams.ADDRESSTAIL_PDAIO_IN_GETLATESTPRODINOUT;
     }
 }

+ 12 - 0
app/src/main/java/com/uas/pda_smart_sa/util/CommonUtil.java

@@ -52,7 +52,9 @@ import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 
+import java.io.UnsupportedEncodingException;
 import java.math.BigDecimal;
+import java.net.URLEncoder;
 import java.text.DecimalFormat;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
@@ -932,4 +934,14 @@ public class CommonUtil {
         return result;
     }
 
+    public static String stringEncode(String text) {
+        if (text == null) {
+            return "";
+        }
+        try {
+            return URLEncoder.encode(text, "utf-8");
+        } catch (UnsupportedEncodingException e) {
+            return text;
+        }
+    }
 }

+ 7 - 1
app/src/main/java/com/uas/pda_smart_sa/util/Constants.java

@@ -56,7 +56,8 @@ public interface Constants {
     interface FLAG {
         //ip地址列表缓存
         String CACHE_IP_HISTORY = "cache_ip_history";
-
+        //用户名
+        String CACHE_USER_EMNAME = "cache_user_emname";
         //版本缓存
         String APP_VERSION_CODE = "app_version_code";
 
@@ -196,6 +197,11 @@ public interface Constants {
         String FLAG_RECHARGE_DETAIL = "flag_recharge_detail";
         String FLAG_INSPECTION_DETAIL = "flag_inspection_detail";
         String FLAG_IQC_IN_DETAIL = "flag_iqc_in_detail";
+
+        /**
+         * 新入库缓存
+         */
+        String CACHE_STORAGE_IN_TYPE = "cache_storage_in_type";
     }
 
     /**

+ 280 - 0
app/src/main/java/com/uas/pda_smart_sa/util/DateFormatUtils.java

@@ -0,0 +1,280 @@
+package com.uas.pda_smart_sa.util;
+
+import android.text.TextUtils;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+
+/**
+ * @author RaoMeng
+ * @describe
+ * @date 2018/6/25 9:52
+ */
+public class DateFormatUtils {
+    public static final String YMD = "yyyy-MM-dd";
+    public static final String YMD_HMS = "yyyy-MM-dd HH:mm:ss";
+    public static final String YMD_HM = "yyyy-MM-dd HH:mm";
+    public static final String HM = "HH:mm";
+    public static final String MD = "MM-dd";
+
+
+    public static SimpleDateFormat getFormat(String format) {
+        return new SimpleDateFormat(format);
+    }
+
+    public static String long2Str(long timemillis, String format) {
+        SimpleDateFormat s = new SimpleDateFormat(format);
+        return s.format(new Date(timemillis));
+    }
+
+    public static String long2Str(String format) {
+        SimpleDateFormat s = new SimpleDateFormat(format);
+        return s.format(new Date(System.currentTimeMillis()));
+    }
+
+    public static String date2Str(Date date, String format) {
+        if (date == null) return "";
+        SimpleDateFormat s = new SimpleDateFormat(format);
+        return s.format(date);
+    }
+
+    public static Date str2date(String str, String format) {
+        return new Date(str2Long(str, format));
+    }
+
+    public static long str2Long(String time, String format) {
+        if (TextUtils.isEmpty(time)) {
+            return 0;
+        }
+        SimpleDateFormat s = new SimpleDateFormat(format);
+        try {
+            return s.parse(time).getTime();
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return 0;
+    }
+
+
+    public static String formatChange(String data, String format) {
+        if (data == null || data.length() <= 0) {
+            return "";
+        } else {
+            SimpleDateFormat df = new SimpleDateFormat(format);
+            try {
+                Date d = df.parse(data);
+                return df.format(d);
+            } catch (ParseException e) {
+                return "";
+            }
+        }
+    }
+
+
+    /**
+     * add by gongtao
+     * <p>
+     * 将Date类型的日期格式 转换为 符合要求的 String日期格式
+     * </P>
+     *
+     * @param date
+     * @param format
+     * @return
+     */
+    public static String getStrDate4Date(Date date, String format) {
+        if (date == null) {
+            return "";
+        } else {
+            SimpleDateFormat df = new SimpleDateFormat(format);
+            return df.format(date);
+        }
+    }
+
+    /**
+     * add by gongtao 计算指定日期时间之间的时间差
+     *
+     * @param beginStr 开始日期字符串
+     * @param endStr   结束日期字符串
+     * @param f        时间差的形式0-秒,1-分种,2-小时,3--天 日期时间字符串格式:yyyyMMddHHmmss
+     */
+    public static int getInterval(String beginStr, String endStr, int f) {
+        int hours = 0;
+        try {
+            Date beginDate = getFormat(YMD_HMS).parse(beginStr);
+            Date endDate = getFormat(YMD_HMS).parse(endStr);
+            long millisecond = endDate.getTime() - beginDate.getTime(); // 日期相减获取日期差X(单位:毫秒)
+            /**
+             * Math.abs((int)(millisecond/1000)); 绝对值 1秒 = 1000毫秒
+             * millisecond/1000 --> 秒 millisecond/1000*60 - > 分钟
+             * millisecond/(1000*60*60) -- > 小时 millisecond/(1000*60*60*24) -->
+             * 天
+             * */
+            switch (f) {
+                case 0: // second
+                    return (int) (millisecond / 1000);
+                case 1: // minute
+                    return (int) (millisecond / (1000 * 60));
+                case 2: // hour
+                    return (int) (millisecond / (1000 * 60 * 60));
+                case 3: // day
+                    return (int) (millisecond / (1000 * 60 * 60 * 24));
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return hours;
+    }
+
+    /**
+     * add by lipp
+     * <p>
+     * 获取起始日期前或后天数的日期
+     * </P>
+     *
+     * @param starttime 起始日期 格式:yyyy-MM-dd
+     * @param days
+     * @return
+     * @throws ParseException
+     */
+    public static Date getStartDateInterval(String starttime, int days) {
+        // 格式化起始时间 yyyyMMdd
+        Date startDate = null;
+        try {
+            startDate = getFormat(YMD).parse(starttime);
+
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        Calendar startTime = Calendar.getInstance();
+        startTime.clear();
+        startTime.setTime(startDate);
+        startTime.add(Calendar.DAY_OF_YEAR, days);
+        return startTime.getTime();
+    }
+
+    /**
+     * add by lipp
+     * <p>
+     * 获取起始日期和结束日期之间的天数
+     * </P>
+     *
+     * @param beginStr 起始日期
+     * @param endStr   结束日期
+     * @param format   根据 日期参数的格式,传对应的SimpleDateFormat格式
+     * @return 天数
+     */
+    public static int getDaysInterval(String beginStr, String endStr,
+                                      SimpleDateFormat format) {
+        try {
+            Date beginDate = format.parse(beginStr);
+            Date endDate = format.parse(endStr);
+            long millisecond = endDate.getTime() - beginDate.getTime(); // 日期相减获取日期差X(单位:毫秒)
+            return (int) (millisecond / (1000 * 60 * 60 * 24));
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return 0;
+    }
+
+
+    /**
+     * 根据指定日期,来运算加减乘
+     *
+     * @param date
+     * @param format
+     * @param value  add(new Date(),"yyyy-MM-dd HH:mm:ss",-1 * 1 * 60 * 60 * 1000);
+     */
+    public static String add(Date date, String format, long value) {
+        SimpleDateFormat df = new SimpleDateFormat(format);
+        long newValue = date.getTime() + value;
+        return df.format(new Date(newValue));
+    }
+
+    /**
+     * add by gongtao
+     * <p>
+     * 将字符串类型的日期格式 转换为 符合要求的 Date类型的日期格式
+     * </P>
+     *
+     * @param date
+     * @param format
+     * @return
+     */
+    public static Date getDate4StrDate(String date, String format) {
+        if (date == null || date.trim().equals("")) {
+            return null;
+        } else {
+            SimpleDateFormat df = new SimpleDateFormat(format);
+            try {
+                return df.parse(date);
+            } catch (ParseException e) {
+                return null;
+            }
+        }
+    }
+
+    /**
+     * @param beginDate
+     * @param endDate
+     * @param f         时间差的形式0:秒,1:分种,2:小时,3:天
+     * @return
+     */
+    public static int getDifferenceNum(Date beginDate, Date endDate, int f) {
+        int result = 0;
+        if (beginDate == null || endDate == null) {
+            return 0;
+        }
+        try {
+            // 日期相减获取日期差X(单位:毫秒)
+            long millisecond = endDate.getTime() - beginDate.getTime();
+            /**
+             * Math.abs((int)(millisecond/1000)); 绝对值 1秒 = 1000毫秒
+             * millisecond/1000 --> 秒 millisecond/1000*60 - > 分钟
+             * millisecond/(1000*60*60) -- > 小时 millisecond/(1000*60*60*24) -->
+             * 天
+             * */
+            switch (f) {
+                case 0: // second
+                    return (int) (millisecond / 1000);
+                case 1: // minute
+                    return (int) (millisecond / (1000 * 60));
+                case 2: // hour
+                    return (int) (millisecond / (1000 * 60 * 60));
+                case 3: // day
+                    return (int) (millisecond / (1000 * 60 * 60 * 24));
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return result;
+    }
+
+
+    /**
+     * 获取两个时间点所相差的时间戳
+     *
+     * @param start 开始时间 HH:mm
+     * @param end   结束时间 HH:mm
+     * @return 时间长度差(s)
+     */
+    public static int getDifferSS(String start, String end) throws Exception {
+        String startTime = long2Str(YMD) + " " + start + ":00";
+        String endTime = null;
+        if (start.compareTo(end) > 0) {
+            endTime = long2Str(System.currentTimeMillis() + (24 * 60 * 60 * 1000), YMD) + " " + end + ":00";
+        } else {
+            endTime = long2Str(YMD) + " " + end + ":00";
+        }
+        return (int) ((str2Long(endTime, YMD_HMS) - str2Long(startTime, YMD_HMS)) / 1000);
+    }
+
+
+    public static long hhmm2Long(String hhMM) {
+        if (StringUtil.isEmpty(hhMM)) return 0;
+        String che = long2Str(DateFormatUtils.YMD) + " " + hhMM + ":00";//当天下班时间
+        return DateFormatUtils.str2Long(che, DateFormatUtils.YMD_HMS);
+    }
+
+}

BIN
app/src/main/res/drawable-hdpi/ic_advanced_filter.png


BIN
app/src/main/res/drawable-xhdpi/ic_advanced_filter.png


BIN
app/src/main/res/drawable-xxhdpi/ic_advanced_filter.png


+ 46 - 0
app/src/main/res/layout/fragment_single_selection.xml

@@ -0,0 +1,46 @@
+<?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:id="@+id/single_selection_search_ll"
+        android:layout_width="match_parent"
+        android:layout_height="52dp"
+        android:orientation="horizontal"
+        android:padding="8dp"
+        android:visibility="gone">
+
+        <com.uas.pda_smart_sa.view.ClearableEditText
+            android:id="@+id/single_selection_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/single_selection_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/single_selection_lv"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:divider="#D8D8D8"
+        android:dividerHeight="1px" />
+</LinearLayout>

+ 158 - 0
app/src/main/res/layout/fragment_storage_in_add.xml

@@ -0,0 +1,158 @@
+<?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="0dp"
+        android:layout_weight="1"
+        android:orientation="vertical">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center_vertical"
+            android:padding="12dp"
+            android:visibility="gone">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="*"
+                android:textColor="@color/red" />
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="单据类型"
+                android:textColor="#333333"
+                android:textSize="14sp" />
+
+            <EditText
+                android:id="@+id/storage_in_add_type_tv"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:background="@null"
+                android:focusable="false"
+                android:gravity="right"
+                android:hint="请选择"
+                android:longClickable="false"
+                android:textColor="#333333"
+                android:textSize="14sp" />
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="10dp"
+                android:layout_marginLeft="6dp"
+                android:src="@drawable/ic_detail_page" />
+        </LinearLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            android:background="#D8D8D8" />
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center_vertical"
+            android:padding="12dp">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="*"
+                android:textColor="@color/red"
+                android:visibility="visible" />
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="仓库编号"
+                android:textColor="#333333"
+                android:textSize="14sp" />
+
+            <EditText
+                android:id="@+id/storage_in_add_warehouse_tv"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:background="@null"
+                android:focusable="false"
+                android:gravity="right"
+                android:hint="请选择"
+                android:longClickable="false"
+                android:textColor="#333333"
+                android:textSize="14sp" />
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="10dp"
+                android:layout_marginLeft="6dp"
+                android:src="@drawable/ic_detail_page" />
+        </LinearLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            android:background="#D8D8D8" />
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center_vertical"
+            android:padding="12dp"
+            android:visibility="gone">
+
+            <TextView
+                android:id="@+id/storage_in_add_supplier_red_iv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="*"
+                android:textColor="@color/red"
+                android:visibility="invisible" />
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="供应商号"
+                android:textColor="#333333"
+                android:textSize="14sp" />
+
+            <EditText
+                android:id="@+id/storage_in_add_supplier_tv"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:background="@null"
+                android:focusable="false"
+                android:gravity="right"
+                android:hint="请选择"
+                android:longClickable="false"
+                android:textColor="#333333"
+                android:textSize="14sp" />
+
+            <ImageView
+                android:layout_width="wrap_content"
+                android:layout_height="10dp"
+                android:layout_marginLeft="6dp"
+                android:src="@drawable/ic_detail_page" />
+        </LinearLayout>
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="1px"
+            android:background="#D8D8D8" />
+    </LinearLayout>
+
+    <Button
+        android:id="@+id/storage_in_add_commit_btn"
+        style="@style/ButtonStyle"
+        android:layout_margin="16dp"
+        android:enabled="false"
+        android:text="新增单据" />
+
+</LinearLayout>

+ 56 - 0
app/src/main/res/layout/fragment_storage_in_add_barcode_list.xml

@@ -0,0 +1,56 @@
+<?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:id="@+id/storage_in_add_barcode_list_search_ll"
+        android:layout_width="match_parent"
+        android:layout_height="52dp"
+        android:orientation="horizontal"
+        android:padding="8dp"
+        android:visibility="gone">
+
+        <TextView
+            android:id="@+id/storage_in_add_barcode_list_search_mode_tv"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:layout_marginRight="6dp"
+            android:drawablePadding="4dp"
+            android:drawableRight="@drawable/ic_menu_retract"
+            android:gravity="center"
+            android:text="条码号" />
+
+        <com.uas.pda_smart_sa.view.ClearableEditText
+            android:id="@+id/storage_in_add_barcode_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/storage_in_add_barcode_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/storage_in_add_barcode_list_lv"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:divider="#D8D8D8"
+        android:dividerHeight="1px" />
+</LinearLayout>

+ 209 - 0
app/src/main/res/layout/fragment_storage_in_add_detail.xml

@@ -0,0 +1,209 @@
+<?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"
+    android:background="#F2F2F2"
+    android:orientation="vertical">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/white"
+        android:gravity="center_vertical"
+        android:padding="12dp"
+        android:visibility="gone">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="单据类型"
+            android:textColor="#333333"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/storage_in_add_detail_type_tv"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:background="@null"
+            android:focusable="false"
+            android:gravity="right"
+            android:longClickable="false"
+            android:textColor="#999999"
+            android:textSize="14sp" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/white"
+        android:gravity="center_vertical"
+        android:padding="12dp">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="入库单号"
+            android:textColor="#333333"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/storage_in_add_detail_inoutno_tv"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:background="@null"
+            android:focusable="false"
+            android:gravity="right"
+            android:longClickable="false"
+            android:textColor="#999999"
+            android:textSize="14sp" />
+    </LinearLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1px"
+        android:background="#D8D8D8" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/white"
+        android:gravity="center_vertical"
+        android:padding="12dp">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="仓库编号"
+            android:textColor="#333333"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/storage_in_add_detail_whcode_tv"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:background="@null"
+            android:focusable="false"
+            android:gravity="right"
+            android:longClickable="false"
+            android:textColor="#999999"
+            android:textSize="14sp" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/white"
+        android:gravity="center_vertical"
+        android:padding="12dp"
+        android:visibility="gone">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="供应商号"
+            android:textColor="#333333"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/storage_in_add_detail_supplier_tv"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:background="@null"
+            android:focusable="false"
+            android:gravity="right"
+            android:longClickable="false"
+            android:textColor="#999999"
+            android:textSize="14sp" />
+
+        <ImageView
+            android:id="@+id/storage_in_add_detail_supplier_icon"
+            android:layout_width="wrap_content"
+            android:layout_height="10dp"
+            android:layout_marginLeft="6dp"
+            android:src="@drawable/ic_detail_page"
+            android:visibility="gone" />
+    </LinearLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="12px"
+        android:background="#D8D8D8" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:background="@color/white"
+        android:orientation="vertical"
+        android:padding="16dp">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@drawable/bg_line_edittext">
+
+            <com.uas.pda_smart_sa.view.ClearableEditText
+                android:id="@+id/storage_in_add_detail_barcode_et"
+                style="@style/EditTextStyle"
+                android:layout_weight="1"
+                android:background="@null"
+                android:focusable="true"
+                android:focusableInTouchMode="true"
+                android:hint="请采集箱号"
+                android:imeOptions="actionSend"
+                android:singleLine="false"
+                android:textColor="@color/black" />
+
+            <ImageView
+                android:id="@+id/storage_in_add_detail_scan_iv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:layout_marginRight="10dp"
+                android:clickable="false"
+                android:src="@drawable/ic_edittext_scan" />
+        </LinearLayout>
+
+        <TextView
+            android:id="@+id/storage_in_add_detail_result_tv"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="16dp"
+            android:textColor="#2475FC"
+            android:textSize="16sp"
+            tools:text="采集成功!" />
+
+        <ListView
+            android:id="@+id/storage_in_add_detail_result_lv"
+            android:layout_width="match_parent"
+            android:layout_height="00dp"
+            android:layout_weight="1" />
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@null"
+            android:orientation="horizontal"
+            android:padding="10dp">
+
+            <Button
+                android:id="@+id/storage_in_add_detail_split_plate_btn"
+                style="@style/ButtonStyle"
+                android:layout_width="0dp"
+                android:layout_weight="1"
+                android:text="确认分板"
+                android:visibility="gone" />
+
+            <Button
+                android:id="@+id/storage_in_add_detail_commit_btn"
+                style="@style/ButtonStyle"
+                android:layout_width="0dp"
+                android:layout_weight="1"
+                android:text="确认入库" />
+        </LinearLayout>
+    </LinearLayout>
+</LinearLayout>

+ 45 - 0
app/src/main/res/layout/fragment_storage_in_add_list.xml

@@ -0,0 +1,45 @@
+<?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:id="@+id/storage_in_add_list_search_ll"
+        android:layout_width="match_parent"
+        android:layout_height="52dp"
+        android:orientation="horizontal"
+        android:padding="8dp"
+        android:visibility="visible">
+
+        <com.uas.pda_smart_sa.view.ClearableEditText
+            android:id="@+id/storage_in_add_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/storage_in_add_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/storage_in_add_list_lv"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:divider="#D8D8D8"
+        android:dividerHeight="1px" />
+</LinearLayout>

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

@@ -0,0 +1,17 @@
+<?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="wrap_content"
+    android:orientation="vertical">
+
+    <TextView
+        android:id="@+id/list_single_selection_value_tv"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:padding="12dp"
+        android:textColor="#333333"
+        android:textSize="15sp"
+        tools:text="采购验收单" />
+</LinearLayout>

+ 140 - 0
app/src/main/res/layout/item_list_storage_in_add.xml

@@ -0,0 +1,140 @@
+<?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="wrap_content"
+    android:orientation="vertical"
+    android:padding="4dp">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="3dp">
+
+        <TextView
+            android:id="@+id/list_storage_in_add_inoutno_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:textColor="#333"
+            android:textSize="14sp"
+            tools:text="单号" />
+
+        <TextView
+            android:id="@+id/list_storage_in_add_class_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            android:layout_weight="1"
+            android:textColor="#333"
+            android:textSize="14sp"
+            android:visibility="gone"
+            tools:text="单据类型" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="3dp">
+
+        <TextView
+            android:id="@+id/list_storage_in_add_whcode_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:textColor="#333"
+            android:textSize="14sp"
+            tools:text="仓库编号" />
+
+        <TextView
+            android:id="@+id/list_storage_in_add_whname_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            android:layout_weight="1"
+            android:textColor="#333"
+            android:textSize="14sp"
+            tools:text="仓库名称" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="3dp"
+        android:visibility="gone">
+
+        <TextView
+            android:id="@+id/list_storage_in_add_cardcode_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:textColor="#333"
+            android:textSize="14sp"
+            tools:text="供应商编号" />
+
+        <TextView
+            android:id="@+id/list_storage_in_add_title_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            android:layout_weight="1"
+            android:textColor="#333"
+            android:textSize="14sp"
+            tools:text="供应商名称" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="3dp">
+
+        <TextView
+            android:id="@+id/list_storage_in_add_status_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:textColor="#333"
+            android:textSize="14sp"
+            tools:text="过账状态" />
+
+        <TextView
+            android:id="@+id/list_storage_in_add_invostatus_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            android:layout_weight="1"
+            android:textColor="#333"
+            android:textSize="14sp"
+            tools:text="单据状态" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="3dp">
+
+        <TextView
+            android:id="@+id/list_storage_in_add_recordman_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:textColor="#333"
+            android:textSize="14sp"
+            tools:text="录入人" />
+
+        <TextView
+            android:id="@+id/list_storage_in_add_recorddate_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            android:layout_weight="1"
+            android:textColor="#333"
+            android:textSize="14sp"
+            tools:text="录入日期" />
+    </LinearLayout>
+</LinearLayout>

+ 139 - 0
app/src/main/res/layout/item_list_storage_in_add_barcode.xml

@@ -0,0 +1,139 @@
+<?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"
+    android:orientation="vertical"
+    android:padding="4dp">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="3dp">
+
+        <LinearLayout
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:text="工单号:"
+                android:textSize="14sp" />
+
+            <TextView
+                android:id="@+id/list_storage_in_add_barcode_num_tv"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="4dp"
+                android:layout_weight="1"
+                android:textColor="#333"
+                android:textSize="14sp"
+                tools:text="工单号" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="4dp"
+            android:layout_weight="1"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:text="型号:"
+                android:textSize="14sp" />
+
+            <TextView
+                android:id="@+id/list_storage_in_add_barcode_model_tv"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="4dp"
+                android:layout_weight="1"
+                android:textColor="#333"
+                android:textSize="14sp"
+                tools:text="型号" />
+        </LinearLayout>
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="3dp">
+
+        <LinearLayout
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:text="箱号:"
+                android:textSize="14sp" />
+
+            <TextView
+                android:id="@+id/list_storage_in_add_barcode_box_tv"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="4dp"
+                android:layout_weight="1"
+                android:textColor="#333"
+                android:textSize="14sp"
+                tools:text="箱号" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="4dp"
+            android:layout_weight="1"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:text="数量:"
+                android:textSize="14sp" />
+
+            <TextView
+                android:id="@+id/list_storage_in_add_barcode_qty_tv"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="4dp"
+                android:layout_weight="1"
+                android:textColor="#333"
+                android:textSize="14sp"
+                tools:text="数量" />
+        </LinearLayout>
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="3dp">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:text="BIN别:"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/list_storage_in_add_barcode_bin_tv"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="4dp"
+            android:layout_weight="1"
+            android:textColor="#333"
+            android:textSize="14sp"
+            tools:text="BIN别" />
+    </LinearLayout>
+</LinearLayout>

+ 91 - 0
app/src/main/res/layout/item_list_storage_in_add_quantity.xml

@@ -0,0 +1,91 @@
+<?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"
+    android:orientation="vertical"
+    android:paddingLeft="8dp"
+    android:paddingTop="4dp"
+    android:paddingRight="4dp"
+    android:paddingBottom="4dp">
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="3dp">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:text="单号:"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/list_storage_in_add_quantity_num_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            android:layout_weight="5"
+            android:textColor="#333"
+            android:textSize="14sp"
+            tools:text="单号" />
+
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:text="BIN别:"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/list_storage_in_add_quantity_bin_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            android:layout_weight="2"
+            android:textColor="#333"
+            android:textSize="14sp"
+            tools:text="BIN别" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="3dp">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:text="型号:"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/list_storage_in_add_quantity_model_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            android:layout_weight="5"
+            android:textColor="#333"
+            android:textSize="14sp"
+            tools:text="单号" />
+
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:text="数 量:"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/list_storage_in_add_quantity_qty_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            android:layout_weight="2"
+            android:textColor="#333"
+            android:textSize="14sp"
+            tools:text="数量" />
+    </LinearLayout>
+</LinearLayout>

+ 44 - 0
app/src/main/res/layout/pop_storage_in_add_menu.xml

@@ -0,0 +1,44 @@
+<?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="wrap_content"
+    android:background="@color/white"
+    android:gravity="center"
+    android:orientation="vertical">
+
+    <Button
+        android:id="@+id/pop_storage_in_add_menu_1"
+        style="@style/action_more_menu"
+        android:text="新增单据" />
+
+    <Button
+        android:id="@+id/pop_storage_in_add_menu_2"
+        style="@style/action_more_menu"
+        android:text="单据列表" />
+
+    <Button
+        android:id="@+id/pop_storage_in_add_menu_3"
+        style="@style/action_more_menu"
+        android:text="删除单据" />
+
+    <Button
+        android:id="@+id/pop_storage_in_add_menu_4"
+        style="@style/action_more_menu"
+        android:text="箱号明细" />
+
+    <Button
+        android:id="@+id/pop_storage_in_add_menu_5"
+        style="@style/action_more_menu"
+        android:text="数量汇总" />
+
+    <Button
+        android:id="@+id/pop_storage_in_add_menu_6"
+        style="@style/action_more_menu"
+        android:text="撤销入库" />
+
+    <Button
+        android:id="@+id/pop_storage_in_add_menu_7"
+        style="@style/action_more_menu"
+        android:text="单据过账"
+        android:visibility="gone" />
+</LinearLayout>

+ 30 - 0
app/src/main/res/layout/pop_storage_list_mode.xml

@@ -0,0 +1,30 @@
+<?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="wrap_content"
+    android:orientation="vertical"
+    android:padding="10dp">
+
+    <CheckBox
+        android:id="@+id/storage_list_mode3"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:checked="true"
+        android:padding="6dp"
+        android:enabled="false"
+        android:text="备货员为当前登录人" />
+
+    <CheckBox
+        android:id="@+id/storage_list_mode1"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:padding="6dp"
+        android:text="当前登录人员" />
+
+    <CheckBox
+        android:id="@+id/storage_list_mode2"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:padding="6dp"
+        android:text="仓库管理员" />
+</LinearLayout>

+ 23 - 0
app/src/main/res/layout/pop_storage_mode.xml

@@ -0,0 +1,23 @@
+<?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="wrap_content"
+    android:orientation="vertical">
+
+    <!--<TextView-->
+    <!--android:layout_width="match_parent"-->
+    <!--android:layout_height="wrap_content"-->
+    <!--android:padding="16dp"-->
+    <!--android:text="历史ip地址" />-->
+
+    <!--<View-->
+    <!--android:layout_width="match_parent"-->
+    <!--android:layout_height="1dp"-->
+    <!--android:background="@color/gray_light" />-->
+
+    <ListView
+        android:id="@+id/pop_ip_history_lv"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content" />
+</LinearLayout>

+ 9 - 0
app/src/main/res/values/styles.xml

@@ -709,4 +709,13 @@
         <item name="android:orientation">vertical</item>
         <item name="android:padding">12dp</item>
     </style>
+
+    <style name="action_more_menu">
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:layout_marginLeft">10dp</item>
+        <item name="android:layout_marginRight">10dp</item>
+        <item name="android:background">@color/transparent</item>
+        <item name="android:textSize">@dimen/app_text_size_body_2</item>
+    </style>
 </resources>