Browse Source

增加库存条码绑定

ChengJH 1 year ago
parent
commit
ad4d37328d
35 changed files with 3939 additions and 6 deletions
  1. 22 0
      app/src/main/java/com/uas/pda_smart_com/adapter/CommonSelectAdapter.java
  2. 36 0
      app/src/main/java/com/uas/pda_smart_com/adapter/JLTSearchWhcodeAdapter.java
  3. 145 0
      app/src/main/java/com/uas/pda_smart_com/adapter/NewJLTStorageInTodoAdapter.java
  4. 299 0
      app/src/main/java/com/uas/pda_smart_com/adapter/SecondaryListAdapter.java
  5. 5 0
      app/src/main/java/com/uas/pda_smart_com/bean/BaseSelectEntity.java
  6. 148 0
      app/src/main/java/com/uas/pda_smart_com/bean/JLTBarcodeParseBean.java
  7. 117 0
      app/src/main/java/com/uas/pda_smart_com/bean/JLTBrandEntity.java
  8. 21 0
      app/src/main/java/com/uas/pda_smart_com/bean/JLTMpqEntity.java
  9. 67 0
      app/src/main/java/com/uas/pda_smart_com/bean/JLTPkgEntity.java
  10. 111 0
      app/src/main/java/com/uas/pda_smart_com/bean/JLTStorageModelBean.java
  11. 43 0
      app/src/main/java/com/uas/pda_smart_com/bean/WhcodeBean.java
  12. 5 0
      app/src/main/java/com/uas/pda_smart_com/fragment/IndexWareHouseContentFragment.java
  13. 1653 0
      app/src/main/java/com/uas/pda_smart_com/fragment/InventoryBindingFragment.java
  14. 40 2
      app/src/main/java/com/uas/pda_smart_com/global/GloableParams.java
  15. 11 0
      app/src/main/java/com/uas/pda_smart_com/util/CommonUtil.java
  16. 8 0
      app/src/main/java/com/uas/pda_smart_com/util/Constants.java
  17. 1 0
      app/src/main/java/com/uas/pda_smart_com/util/PrintUtils.java
  18. 144 0
      app/src/main/java/com/uas/pda_smart_com/util/VollyRequest.java
  19. 90 0
      app/src/main/java/com/uas/pda_smart_com/view/business/CommonSelectPop.java
  20. 7 0
      app/src/main/res/color/selector_radio_text_color.xml
  21. 7 0
      app/src/main/res/drawable/selector_radio_bg.xml
  22. 5 0
      app/src/main/res/drawable/shape_deep_blue_bg.xml
  23. 5 0
      app/src/main/res/drawable/shape_gray_bg.xml
  24. 11 0
      app/src/main/res/layout/dialog_jlt_search_whcode.xml
  25. 632 0
      app/src/main/res/layout/fragment_inventory_binging.xml
  26. 2 1
      app/src/main/res/layout/fragment_iocout_make_material.xml
  27. 18 0
      app/src/main/res/layout/item_common_select.xml
  28. 33 0
      app/src/main/res/layout/item_jlt_storage_in_todo_group.xml
  29. 90 0
      app/src/main/res/layout/item_jlt_storage_in_todo_subnew.xml
  30. 30 0
      app/src/main/res/layout/pop_common_select.xml
  31. 101 0
      app/src/main/res/layout/pop_jlt_storage_in_box_menu.xml
  32. 7 0
      app/src/main/res/layout/selector_radio_bg.xml
  33. 1 1
      app/src/main/res/values/color.xml
  34. 22 0
      app/src/main/res/values/styles.xml
  35. 2 2
      build.gradle

+ 22 - 0
app/src/main/java/com/uas/pda_smart_com/adapter/CommonSelectAdapter.java

@@ -0,0 +1,22 @@
+package com.uas.pda_smart_com.adapter;
+
+import android.support.annotation.Nullable;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.uas.pda_smart_com.R;
+import com.uas.pda_smart_com.bean.BaseSelectEntity;
+
+import java.util.List;
+
+public class CommonSelectAdapter<T extends BaseSelectEntity> extends BaseQuickAdapter<T, BaseViewHolder> {
+
+    public CommonSelectAdapter(@Nullable List<T> data) {
+        super(R.layout.item_common_select, data);
+    }
+
+    @Override
+    protected void convert(BaseViewHolder helper, T item) {
+        helper.setText(R.id.item_common_select_tv, item.getItemText());
+    }
+}

+ 36 - 0
app/src/main/java/com/uas/pda_smart_com/adapter/JLTSearchWhcodeAdapter.java

@@ -0,0 +1,36 @@
+package com.uas.pda_smart_com.adapter;
+
+import android.graphics.Color;
+import android.support.annotation.Nullable;
+import android.text.SpannableStringBuilder;
+import android.text.TextUtils;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.uas.pda_smart_com.R;
+import com.uas.pda_smart_com.bean.WhcodeBean;
+import com.uas.pda_smart_com.util.SpanUtils;
+
+import java.util.List;
+
+public class JLTSearchWhcodeAdapter extends BaseQuickAdapter<WhcodeBean, BaseViewHolder> {
+    private SpanUtils mSpanUtils;
+
+    public JLTSearchWhcodeAdapter(@Nullable List<WhcodeBean> data) {
+        super(R.layout.item_list_cache_warehouse, data);
+    }
+
+    @Override
+    protected void convert(BaseViewHolder helper, WhcodeBean item) {
+        String whcode = item.getWH_CODE();
+        String description = item.getWH_DESCRIPTION();
+
+        mSpanUtils = new SpanUtils();
+        mSpanUtils = mSpanUtils.append(whcode).setForegroundColor(Color.BLACK);
+        if (!TextUtils.isEmpty(description)) {
+            mSpanUtils = mSpanUtils.append("(" + description + ")").setForegroundColor(Color.GRAY);
+        }
+        SpannableStringBuilder result = mSpanUtils.create();
+        helper.setText(R.id.list_warehouse_tv, result);
+    }
+}

+ 145 - 0
app/src/main/java/com/uas/pda_smart_com/adapter/NewJLTStorageInTodoAdapter.java

@@ -0,0 +1,145 @@
+package com.uas.pda_smart_com.adapter;
+
+import android.content.Context;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.uas.pda_smart_com.R;
+import com.uas.pda_smart_com.bean.JLTStorageModelBean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by RaoMeng on 2019/3/4
+ * Desc: 吉利通 入库待采集列表
+ */
+public class NewJLTStorageInTodoAdapter extends SecondaryListAdapter<NewJLTStorageInTodoAdapter.GroupItemViewHolder, NewJLTStorageInTodoAdapter.SubItemViewHolder> {
+    private Context mContext;
+    private List<Integer> mFlags;
+    private List<SecondaryListBean<String, JLTStorageModelBean>> mDatas;
+    private OnSubItemClickListener mOnSubItemClickListener;
+
+    public NewJLTStorageInTodoAdapter(Context context) {
+        mContext = context;
+        mFlags = new ArrayList<>();
+    }
+
+    public List<SecondaryListBean<String, JLTStorageModelBean>> getDatas() {
+        return mDatas;
+    }
+
+    public void setDatas(List<SecondaryListBean<String, JLTStorageModelBean>> datas) {
+        mDatas = datas;
+        initSecondaryList(mDatas);
+        setGroupItemStatu(0, true);
+        for (int i = 0; i < mDatas.size(); i++) {
+            if (i == 0) {
+                mFlags.add(1);
+            } else {
+                mFlags.add(0);
+            }
+        }
+    }
+
+    public void setOnSubItemClickListener(OnSubItemClickListener onSubItemClickListener) {
+        mOnSubItemClickListener = onSubItemClickListener;
+    }
+
+
+    @Override
+    public RecyclerView.ViewHolder onCreateGroupViewHolder(ViewGroup parent) {
+        View groupView = LayoutInflater.from(mContext).inflate(R.layout.item_jlt_storage_in_todo_group, parent, false);
+        return new GroupItemViewHolder(groupView);
+    }
+
+    @Override
+    public RecyclerView.ViewHolder onCreateSubViewHolder(ViewGroup parent) {
+        View subView = LayoutInflater.from(mContext).inflate(R.layout.item_jlt_storage_in_todo_subnew, parent, false);
+        return new SubItemViewHolder(subView);
+    }
+
+    @Override
+    public void onBindGroupViewHolder(RecyclerView.ViewHolder holder, int groupItemIndex) {
+        ((GroupItemViewHolder) holder).numTextView.setText(mDatas.get(groupItemIndex).getGroupItem());
+        Integer flag = mFlags.get(groupItemIndex);
+        if (flag % 2 == 0) {
+            ((GroupItemViewHolder) holder).arrowImageView.setImageResource(R.drawable.ic_menu_retract);
+        } else {
+            ((GroupItemViewHolder) holder).arrowImageView.setImageResource(R.drawable.ic_menu_spread);
+        }
+    }
+
+    @Override
+    public void onBindSubViewHolder(RecyclerView.ViewHolder holder, int groupItemIndex, int subItemIndex) {
+        try {
+            JLTStorageModelBean jltStorageModelBean = mDatas.get(groupItemIndex).getSubItems().get(subItemIndex);
+            ((SubItemViewHolder) holder).modelTextView.setText(jltStorageModelBean.getPrcode());
+            ((SubItemViewHolder) holder).quantityTextView.setText(jltStorageModelBean.getQuantity());
+            ((SubItemViewHolder) holder).doneQtyTextView.setText(jltStorageModelBean.getDoneQty());
+            ((SubItemViewHolder) holder).donebrandTextView.setText(jltStorageModelBean.getPr_brand());
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+    }
+
+    @Override
+    public boolean onGroupItemClick(boolean isExpand, GroupItemViewHolder holder, int groupItemIndex) {
+//        ((GroupItemViewHolder) holder).numTextView.setText(mDatas.get(groupItemIndex).getGroupItem());
+
+        Integer flag = mFlags.get(groupItemIndex);
+        if (flag % 2 == 0) {
+            ((GroupItemViewHolder) holder).arrowImageView.setImageResource(R.drawable.ic_menu_spread);
+        } else {
+            ((GroupItemViewHolder) holder).arrowImageView.setImageResource(R.drawable.ic_menu_retract);
+        }
+        flag++;
+        mFlags.remove(groupItemIndex);
+        mFlags.add(groupItemIndex, flag);
+        return false;
+    }
+
+    @Override
+    public void onSubItemClick(SubItemViewHolder holder, int groupItemIndex, int subItemIndex) {
+        if (mOnSubItemClickListener != null) {
+            JLTStorageModelBean jltStorageModelBean = mDatas.get(groupItemIndex).getSubItems().get(subItemIndex);
+            mOnSubItemClickListener.onSubItemClick(jltStorageModelBean);
+        }
+    }
+
+    public class GroupItemViewHolder extends RecyclerView.ViewHolder {
+        TextView numTextView;
+        ImageView arrowImageView;
+
+        public GroupItemViewHolder(View itemView) {
+            super(itemView);
+
+            numTextView = (TextView) itemView.findViewById(R.id.item_jlt_storage_in_todo_group_num_tv);
+            arrowImageView = (ImageView) itemView.findViewById(R.id.item_jlt_storage_in_todo_group_iv);
+        }
+    }
+
+    public class SubItemViewHolder extends RecyclerView.ViewHolder {
+        TextView modelTextView;
+        TextView quantityTextView;
+        TextView doneQtyTextView;
+        TextView donebrandTextView;
+        public SubItemViewHolder(View itemView) {
+            super(itemView);
+
+            modelTextView = (TextView) itemView.findViewById(R.id.item_jlt_storage_in_todo_sub_model_tv);
+            quantityTextView = (TextView) itemView.findViewById(R.id.item_jlt_storage_in_todo_sub_quantity_tv);
+            doneQtyTextView = (TextView) itemView.findViewById(R.id.item_jlt_storage_in_todo_sub_done_tv);
+            donebrandTextView = (TextView) itemView.findViewById(R.id.item_jlt_storage_in_todo_sub_brand_tv);
+        }
+    }
+
+    public interface OnSubItemClickListener {
+        void onSubItemClick(JLTStorageModelBean jltStorageModelBean);
+    }
+}

+ 299 - 0
app/src/main/java/com/uas/pda_smart_com/adapter/SecondaryListAdapter.java

@@ -0,0 +1,299 @@
+package com.uas.pda_smart_com.adapter;
+
+import android.support.v7.widget.RecyclerView;
+import android.view.View;
+import android.view.ViewGroup;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by RaoMeng on 2017/9/21.
+ * recyclerview二级列表适配器基类
+ */
+
+public abstract class SecondaryListAdapter<GVH, SVH extends RecyclerView.ViewHolder> extends RecyclerView.Adapter {
+    private List<Boolean> mGroupItemStatus;
+    private List<SecondaryListBean> mSecondaryListBeen;
+
+    /**
+     * 创建分组布局ViewHolder
+     *
+     * @param parent
+     * @return
+     */
+    public abstract RecyclerView.ViewHolder onCreateGroupViewHolder(ViewGroup parent);
+
+    /**
+     * 创建子项布局ViewHolder
+     *
+     * @param parent
+     * @return
+     */
+    public abstract RecyclerView.ViewHolder onCreateSubViewHolder(ViewGroup parent);
+
+    /**
+     * 绑定分组布局ViewHolder
+     *
+     * @param holder
+     * @param groupItemIndex
+     */
+    public abstract void onBindGroupViewHolder(RecyclerView.ViewHolder holder, int groupItemIndex);
+
+    /**
+     * 绑定子项布局ViewHolder
+     *
+     * @param holder
+     * @param groupItemIndex
+     * @param subItemIndex
+     */
+    public abstract void onBindSubViewHolder(RecyclerView.ViewHolder holder, int groupItemIndex, int subItemIndex);
+
+    /**
+     * 一级列表点击事件
+     *
+     * @param isExpand
+     * @param holder
+     * @param groupItemIndex
+     */
+    public abstract boolean onGroupItemClick(boolean isExpand, GVH holder, int groupItemIndex);
+
+    /**
+     * 二级子项点击事件
+     *
+     * @param holder
+     * @param groupItemIndex
+     * @param subItemIndex
+     */
+    public abstract void onSubItemClick(SVH holder, int groupItemIndex, int subItemIndex);
+
+    /**
+     * 初始化数据源
+     *
+     * @param secondaryListBeen
+     */
+    public void initSecondaryList(List secondaryListBeen) {
+        initSecondaryList(secondaryListBeen, false);
+    }
+
+    public void initSecondaryList(List secondaryListBeen, boolean isExpand) {
+        mGroupItemStatus = new ArrayList<>();
+        mSecondaryListBeen = new ArrayList<>();
+
+        setSecondaryListBeen(secondaryListBeen, isExpand);
+    }
+
+    public void setSecondaryListBeen(List secondaryListBeen) {
+        setSecondaryListBeen(secondaryListBeen, false);
+    }
+
+    public void setSecondaryListBeen(List secondaryListBeen, boolean isExpand) {
+        mSecondaryListBeen = secondaryListBeen;
+        initGroupItemStatus(isExpand);
+        notifyDataSetChanged();
+    }
+
+    /**
+     * 初始化一级列表展开状态,默认全部收起
+     */
+    public void initGroupItemStatus(boolean isExpand) {
+        for (int i = 0; i < mSecondaryListBeen.size(); i++) {
+            mGroupItemStatus.add(isExpand);
+        }
+    }
+
+    /**
+     * 设置某项一级列表的展开装状态
+     *
+     * @param groupIndex
+     * @param isExpand
+     */
+    public void setGroupItemStatu(int groupIndex, boolean isExpand) {
+        if (mGroupItemStatus != null && mGroupItemStatus.size() > groupIndex) {
+            mGroupItemStatus.set(groupIndex, isExpand);
+            notifyDataSetChanged();
+        }
+    }
+
+    @Override
+    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
+        RecyclerView.ViewHolder viewHolder = null;
+        if (viewType == ItemStatus.TYPE_GROUPITEM) {
+            viewHolder = onCreateGroupViewHolder(parent);
+        } else if (viewType == ItemStatus.TYPE_SUBITEM) {
+            viewHolder = onCreateSubViewHolder(parent);
+        }
+
+        return viewHolder;
+    }
+
+    @Override
+    public void onBindViewHolder(final RecyclerView.ViewHolder holder, final int position) {
+        final ItemStatus itemStatus = getItemStatusByPosition(position);
+
+        if (itemStatus.getItemType() == ItemStatus.TYPE_GROUPITEM) {
+            onBindGroupViewHolder(holder, itemStatus.getGroupIndex());
+            holder.itemView.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View view) {
+                    int groupIndex = itemStatus.getGroupIndex();
+                    boolean groupStatus = mGroupItemStatus.get(groupIndex);
+                    boolean unable = onGroupItemClick(groupStatus, (GVH) holder, groupIndex);
+
+                    if (!unable) {
+                        mGroupItemStatus.set(groupIndex, !groupStatus);
+                        //这里必须要用holder.getAdapterPosition()来确认点击的位置
+                        if (groupStatus) {
+                            notifyItemRangeRemoved(holder.getAdapterPosition() + 1, mSecondaryListBeen.get(groupIndex).getSubItems().size());
+                        } else {
+                            notifyItemRangeInserted(holder.getAdapterPosition() + 1, mSecondaryListBeen.get(groupIndex).getSubItems().size());
+                        }
+                    }
+                }
+            });
+        } else if (itemStatus.getItemType() == ItemStatus.TYPE_SUBITEM) {
+            onBindSubViewHolder(holder, itemStatus.getGroupIndex(), itemStatus.getSubIndex());
+            holder.itemView.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View view) {
+                    onSubItemClick((SVH) holder, itemStatus.getGroupIndex(), itemStatus.getSubIndex());
+                }
+            });
+        }
+    }
+
+    @Override
+    public int getItemCount() {
+        int itemCount = 0;
+
+        if (mGroupItemStatus.size() == 0) {
+            return 0;
+        }
+
+        for (int i = 0; i < mGroupItemStatus.size(); i++) {
+            if (mGroupItemStatus.get(i)) {
+                itemCount += mSecondaryListBeen.get(i).getSubItems().size() + 1;
+            } else {
+                itemCount++;
+            }
+        }
+        return itemCount;
+    }
+
+    @Override
+    public int getItemViewType(int position) {
+        return getItemStatusByPosition(position).getItemType();
+    }
+
+    /**
+     * 获取条目状态信息
+     *
+     * @param position
+     * @return
+     */
+    private ItemStatus getItemStatusByPosition(int position) {
+        ItemStatus itemStatus = new ItemStatus();
+
+        int i = 0;
+        int groupItemPosition = 0;
+        for (i = 0; i < mGroupItemStatus.size(); i++) {
+            if (position == groupItemPosition) {
+                itemStatus.setItemType(ItemStatus.TYPE_GROUPITEM);
+                itemStatus.setGroupIndex(i);
+                break;
+            }
+
+            if (position < groupItemPosition) {
+                itemStatus.setItemType(ItemStatus.TYPE_SUBITEM);
+                itemStatus.setGroupIndex(i - 1);
+                itemStatus.setSubIndex(position - (groupItemPosition
+                        - mSecondaryListBeen.get(i - 1).getSubItems().size()));
+                break;
+            }
+
+            groupItemPosition++;
+
+            if (mGroupItemStatus.get(i)) {
+                groupItemPosition += mSecondaryListBeen.get(i).getSubItems().size();
+            }
+
+        }
+
+        if (i >= mGroupItemStatus.size()) {
+            itemStatus.setItemType(ItemStatus.TYPE_SUBITEM);
+            itemStatus.setGroupIndex(i - 1);
+            itemStatus.setSubIndex(position - (groupItemPosition
+                    - mSecondaryListBeen.get(i - 1).getSubItems().size()));
+        }
+
+        return itemStatus;
+    }
+
+    /**
+     * 条目状态类
+     */
+    private static class ItemStatus {
+        public static final int TYPE_GROUPITEM = 0;
+        public static final int TYPE_SUBITEM = 1;
+
+        private int itemType;
+        private int groupIndex = 0;
+        private int subIndex = -1;
+
+        public int getItemType() {
+            return itemType;
+        }
+
+        public void setItemType(int itemType) {
+            this.itemType = itemType;
+        }
+
+        public int getGroupIndex() {
+            return groupIndex;
+        }
+
+        public void setGroupIndex(int groupIndex) {
+            this.groupIndex = groupIndex;
+        }
+
+        public int getSubIndex() {
+            return subIndex;
+        }
+
+        public void setSubIndex(int subIndex) {
+            this.subIndex = subIndex;
+        }
+    }
+
+    /**
+     * 二级列表泛型实体类
+     *
+     * @param <G> 一级实体类
+     * @param <S> 二级实体类
+     */
+    public final static class SecondaryListBean<G, S> {
+        private G groupItem;
+        private List<S> subItems;
+
+        public SecondaryListBean(G groupItem, List<S> subItems) {
+            this.groupItem = groupItem;
+            this.subItems = subItems;
+        }
+
+        public G getGroupItem() {
+            return groupItem;
+        }
+
+        public void setGroupItem(G groupItem) {
+            this.groupItem = groupItem;
+        }
+
+        public List<S> getSubItems() {
+            return subItems;
+        }
+
+        public void setSubItems(List<S> subItems) {
+            this.subItems = subItems;
+        }
+    }
+}

+ 5 - 0
app/src/main/java/com/uas/pda_smart_com/bean/BaseSelectEntity.java

@@ -0,0 +1,5 @@
+package com.uas.pda_smart_com.bean;
+
+public abstract class BaseSelectEntity {
+    public abstract String getItemText();
+}

+ 148 - 0
app/src/main/java/com/uas/pda_smart_com/bean/JLTBarcodeParseBean.java

@@ -0,0 +1,148 @@
+package com.uas.pda_smart_com.bean;
+
+import com.alibaba.fastjson.annotation.JSONField;
+
+public class JLTBarcodeParseBean {
+
+    /**
+     * DATECODE : 2019
+     * LOTNO : lotnoB001
+     * QTY : 20
+     * PRCODE :
+     * ORDERCODE : null
+     * PN : C0603X7R102K100V
+     * MPQ :
+     * BRAND : null
+     */
+
+    @JSONField(name = "DATECODE")
+    private String DATECODE;
+    @JSONField(name = "LOTNO")
+    private String LOTNO;
+    @JSONField(name = "QTY")
+    private double QTY = -1;
+    @JSONField(name = "PRCODE")
+    private String PRCODE;
+    @JSONField(name = "ORDERCODE")
+    private String ORDERCODE;
+    @JSONField(name = "PN")
+    private String PN;
+    @JSONField(name = "MPQ")
+    private String MPQ;
+    @JSONField(name = "BRAND")
+    private String BRAND;
+    @JSONField(name = "OUTBOX")
+    private String OUTBOX;
+    @JSONField(name = "CHECKPO")
+    private String CHECKPO;
+    @JSONField(name = "DATA")
+    private String DATA;
+    @JSONField(name = "PAN")
+    private int PAN;
+    @JSONField(name = "PR_PKG")
+    private String PR_PKG;
+
+    public String getDATECODE() {
+        return DATECODE;
+    }
+
+    public void setDATECODE(String DATECODE) {
+        this.DATECODE = DATECODE;
+    }
+
+    public String getLOTNO() {
+        return LOTNO;
+    }
+
+    public void setLOTNO(String LOTNO) {
+        this.LOTNO = LOTNO;
+    }
+
+    public double getQTY() {
+        return QTY;
+    }
+
+    public void setQTY(double QTY) {
+        this.QTY = QTY;
+    }
+
+    public String getPRCODE() {
+        return PRCODE;
+    }
+
+    public void setPRCODE(String PRCODE) {
+        this.PRCODE = PRCODE;
+    }
+
+    public String getORDERCODE() {
+        return ORDERCODE;
+    }
+
+    public void setORDERCODE(String ORDERCODE) {
+        this.ORDERCODE = ORDERCODE;
+    }
+
+    public String getPN() {
+        return PN;
+    }
+
+    public void setPN(String PN) {
+        this.PN = PN;
+    }
+
+    public String getMPQ() {
+        return MPQ;
+    }
+
+    public void setMPQ(String MPQ) {
+        this.MPQ = MPQ;
+    }
+
+    public String getBRAND() {
+        return BRAND;
+    }
+
+    public void setBRAND(String BRAND) {
+        this.BRAND = BRAND;
+    }
+
+    public String getOUTBOX() {
+        return OUTBOX;
+    }
+
+    public void setOUTBOX(String OUTBOX) {
+        this.OUTBOX = OUTBOX;
+    }
+
+    public String getCHECKPO() {
+        return CHECKPO;
+    }
+
+    public void setCHECKPO(String CHECKPO) {
+        this.CHECKPO = CHECKPO;
+    }
+
+    public String getDATA() {
+        return DATA;
+    }
+
+    public void setDATA(String DATA) {
+        this.DATA = DATA;
+    }
+
+    public int getPAN() {
+        return PAN;
+    }
+
+    public void setPAN(int PAN) {
+        this.PAN = PAN;
+    }
+
+    public String getPR_PKG() {
+        return PR_PKG;
+    }
+
+    public void setPR_PKG(String PR_PKG) {
+        this.PR_PKG = PR_PKG;
+    }
+}

+ 117 - 0
app/src/main/java/com/uas/pda_smart_com/bean/JLTBrandEntity.java

@@ -0,0 +1,117 @@
+package com.uas.pda_smart_com.bean;
+
+import java.util.List;
+
+public class JLTBrandEntity extends BaseSelectEntity {
+
+
+    /**
+     * BRAND : BRAND01
+     * ORDERCODE : ORDERCODE
+     * QTY : 10000
+     * DATECODE : 2019-01-01
+     * LOTNO : LOTNO
+     * OUTBOX : OUTBOX
+     * DATECODEBYPARSE : 2019-01-01
+     * isCheck : false
+     * PN : PN
+     * PKGLIST : [{"PR_CODE":"PR001","MPQ":[1000,1500,3000],"PR_PKG":"PKG01","PR_FBBZL_USER":0},{"PR_CODE":"PR002","MPQ":[1000,1500,3000],"PR_PKG":"PKG02","PR_FBBZL_USER":-1}]
+     */
+
+    private String BRAND;
+    private String ORDERCODE;
+    private double QTY = -1;
+    private String DATECODE;
+    private String LOTNO;
+    private String OUTBOX;
+    private String DATECODEBYPARSE;
+    private boolean isCheck;
+    private String PN;
+    private List<JLTPkgEntity> PKGLIST;
+
+    @Override
+    public String getItemText() {
+        return BRAND;
+    }
+
+    public String getBRAND() {
+        return BRAND;
+    }
+
+    public void setBRAND(String BRAND) {
+        this.BRAND = BRAND;
+    }
+
+    public String getORDERCODE() {
+        return ORDERCODE;
+    }
+
+    public void setORDERCODE(String ORDERCODE) {
+        this.ORDERCODE = ORDERCODE;
+    }
+
+    public double getQTY() {
+        return QTY;
+    }
+
+    public void setQTY(double QTY) {
+        this.QTY = QTY;
+    }
+
+    public String getDATECODE() {
+        return DATECODE;
+    }
+
+    public void setDATECODE(String DATECODE) {
+        this.DATECODE = DATECODE;
+    }
+
+    public String getLOTNO() {
+        return LOTNO;
+    }
+
+    public void setLOTNO(String LOTNO) {
+        this.LOTNO = LOTNO;
+    }
+
+    public String getOUTBOX() {
+        return OUTBOX;
+    }
+
+    public void setOUTBOX(String OUTBOX) {
+        this.OUTBOX = OUTBOX;
+    }
+
+    public String getDATECODEBYPARSE() {
+        return DATECODEBYPARSE;
+    }
+
+    public void setDATECODEBYPARSE(String DATECODEBYPARSE) {
+        this.DATECODEBYPARSE = DATECODEBYPARSE;
+    }
+
+    public boolean isIsCheck() {
+        return isCheck;
+    }
+
+    public void setIsCheck(boolean isCheck) {
+        this.isCheck = isCheck;
+    }
+
+    public String getPN() {
+        return PN;
+    }
+
+    public void setPN(String PN) {
+        this.PN = PN;
+    }
+
+    public List<JLTPkgEntity> getPKGLIST() {
+        return PKGLIST;
+    }
+
+    public void setPKGLIST(List<JLTPkgEntity> PKGLIST) {
+        this.PKGLIST = PKGLIST;
+    }
+
+}

+ 21 - 0
app/src/main/java/com/uas/pda_smart_com/bean/JLTMpqEntity.java

@@ -0,0 +1,21 @@
+package com.uas.pda_smart_com.bean;
+
+
+import com.uas.pda_smart_com.util.CommonUtil;
+
+public class JLTMpqEntity extends BaseSelectEntity {
+    private double MPQ;
+
+    @Override
+    public String getItemText() {
+        return CommonUtil.doubleFormat(MPQ);
+    }
+
+    public double getMPQ() {
+        return MPQ;
+    }
+
+    public void setMPQ(double MPQ) {
+        this.MPQ = MPQ;
+    }
+}

+ 67 - 0
app/src/main/java/com/uas/pda_smart_com/bean/JLTPkgEntity.java

@@ -0,0 +1,67 @@
+package com.uas.pda_smart_com.bean;
+
+import android.graphics.Color;
+import android.text.SpannableStringBuilder;
+import android.text.TextUtils;
+
+import com.uas.pda_smart_com.util.SpanUtils;
+
+import java.util.List;
+
+public class JLTPkgEntity extends BaseSelectEntity {
+    /**
+     * PR_CODE : PR001
+     * MPQLIST : [1000,1500,3000]
+     * PR_PKG : PKG01
+     * PR_FBBZL_USER : 0
+     */
+
+    private String PR_CODE;
+    private String PR_PKG;
+    private int PR_FBBZL_USER;
+    private List<JLTMpqEntity> MPQLIST;
+    private SpanUtils mSpanUtils;
+
+    @Override
+    public String getItemText() {
+        mSpanUtils = new SpanUtils();
+        mSpanUtils = mSpanUtils.append(PR_PKG).setForegroundColor(Color.BLACK);
+        if (!TextUtils.isEmpty(PR_CODE)) {
+            mSpanUtils = mSpanUtils.append("(" + PR_CODE + ")").setForegroundColor(Color.GRAY);
+        }
+        SpannableStringBuilder result = mSpanUtils.create();
+        return result.toString();
+    }
+
+    public String getPR_CODE() {
+        return PR_CODE;
+    }
+
+    public void setPR_CODE(String PR_CODE) {
+        this.PR_CODE = PR_CODE;
+    }
+
+    public String getPR_PKG() {
+        return PR_PKG;
+    }
+
+    public void setPR_PKG(String PR_PKG) {
+        this.PR_PKG = PR_PKG;
+    }
+
+    public int getPR_FBBZL_USER() {
+        return PR_FBBZL_USER;
+    }
+
+    public void setPR_FBBZL_USER(int PR_FBBZL_USER) {
+        this.PR_FBBZL_USER = PR_FBBZL_USER;
+    }
+
+    public List<JLTMpqEntity> getMPQLIST() {
+        return MPQLIST;
+    }
+
+    public void setMPQLIST(List<JLTMpqEntity> MPQLIST) {
+        this.MPQLIST = MPQLIST;
+    }
+}

+ 111 - 0
app/src/main/java/com/uas/pda_smart_com/bean/JLTStorageModelBean.java

@@ -0,0 +1,111 @@
+package com.uas.pda_smart_com.bean;
+
+public class JLTStorageModelBean {
+    private long RN;
+    private String id;
+    private String mModel;
+    private String mQuantity;
+    private String mBox;
+    private String mProdcode;
+    private String mLocation;
+    private String mWhcodeDes;
+    private String mDoneQty;
+    private String location;
+    private String pr_brand;
+    private String prcode;
+
+    public String getPrcode() {
+        return prcode;
+    }
+
+    public void setPrcode(String prcode) {
+        this.prcode = prcode;
+    }
+
+    public String getPr_brand() {
+        return pr_brand;
+    }
+
+    public void setPr_brand(String pr_brand) {
+        this.pr_brand = pr_brand;
+    }
+
+    public String getmLocation() {
+        return mLocation;
+    }
+
+    public void setmLocation(String mLocation) {
+        this.mLocation = mLocation;
+    }
+    public long getRN() {
+        return RN;
+    }
+
+    public void setRN(long RN) {
+        this.RN = RN;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getModel() {
+        return mModel;
+    }
+
+    public void setModel(String model) {
+        mModel = model;
+    }
+
+    public String getQuantity() {
+        return mQuantity;
+    }
+
+    public void setQuantity(String quantity) {
+        mQuantity = quantity;
+    }
+
+    public String getBox() {
+        return mBox;
+    }
+
+    public void setBox(String box) {
+        mBox = box;
+    }
+
+    public String getProdcode() {
+        return mProdcode;
+    }
+
+    public void setProdcode(String prodcode) {
+        mProdcode = prodcode;
+    }
+
+    public String getLocation() {
+        return mLocation;
+    }
+
+    public void setLocation(String location) {
+        mLocation = location;
+    }
+
+    public String getWhcodeDes() {
+        return mWhcodeDes;
+    }
+
+    public void setWhcodeDes(String whcodeDes) {
+        mWhcodeDes = whcodeDes;
+    }
+
+    public String getDoneQty() {
+        return mDoneQty;
+    }
+
+    public void setDoneQty(String doneQty) {
+        mDoneQty = doneQty;
+    }
+}

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

@@ -0,0 +1,43 @@
+package com.uas.pda_smart_com.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;
+    }
+}

+ 5 - 0
app/src/main/java/com/uas/pda_smart_com/fragment/IndexWareHouseContentFragment.java

@@ -139,6 +139,11 @@ public class IndexWareHouseContentFragment extends BaseFragment implements Adapt
                     getFragmentManager().beginTransaction().addToBackStack(null)
                             .replace(R.id.container_function_fragment, fragment).commit();
                     break;
+                case GloableParams.MENU_STORAGE_STOCK_INFO_COLLECT:
+                    fragment = new InventoryBindingFragment();
+                    getFragmentManager().beginTransaction().addToBackStack(null)
+                            .replace(R.id.container_function_fragment, fragment).commit();
+                    break;
             }
         }
     }

+ 1653 - 0
app/src/main/java/com/uas/pda_smart_com/fragment/InventoryBindingFragment.java

@@ -0,0 +1,1653 @@
+package com.uas.pda_smart_com.fragment;
+
+import android.app.Activity;
+import android.app.Dialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.graphics.drawable.BitmapDrawable;
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentManager;
+import android.support.v7.app.AlertDialog;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.text.Editable;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.text.format.DateFormat;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.PopupWindow;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.android.volley.AuthFailureError;
+import com.android.volley.DefaultRetryPolicy;
+import com.android.volley.Request;
+import com.android.volley.Response;
+import com.android.volley.VolleyError;
+import com.android.volley.toolbox.StringRequest;
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.uas.pda_smart_com.R;
+import com.uas.pda_smart_com.activity.FunctionActivity;
+import com.uas.pda_smart_com.adapter.JLTSearchWhcodeAdapter;
+import com.uas.pda_smart_com.adapter.NewJLTStorageInTodoAdapter;
+import com.uas.pda_smart_com.adapter.SecondaryListAdapter;
+import com.uas.pda_smart_com.application.PdaApplication;
+import com.uas.pda_smart_com.bean.JLTBarcodeParseBean;
+import com.uas.pda_smart_com.bean.JLTBrandEntity;
+import com.uas.pda_smart_com.bean.JLTMpqEntity;
+import com.uas.pda_smart_com.bean.JLTPkgEntity;
+import com.uas.pda_smart_com.bean.JLTStorageModelBean;
+import com.uas.pda_smart_com.bean.WhcodeBean;
+import com.uas.pda_smart_com.global.GloableParams;
+import com.uas.pda_smart_com.listener.MyEditorActionListener;
+import com.uas.pda_smart_com.tools.SharedPreUtil;
+import com.uas.pda_smart_com.tools.VolleyUtil;
+import com.uas.pda_smart_com.util.CommonUtil;
+import com.uas.pda_smart_com.util.Constants;
+import com.uas.pda_smart_com.util.DateFormatUtil;
+import com.uas.pda_smart_com.util.FastjsonUtil;
+import com.uas.pda_smart_com.util.FragmentUtils;
+import com.uas.pda_smart_com.util.HttpCallback;
+import com.uas.pda_smart_com.util.HttpParams;
+import com.uas.pda_smart_com.util.StringUtil;
+import com.uas.pda_smart_com.util.VolleyRequest;
+import com.uas.pda_smart_com.util.VollyRequest;
+import com.uas.pda_smart_com.view.ClearableEditText;
+import com.uas.pda_smart_com.view.RecyclerItemDecoration;
+import com.uas.pda_smart_com.view.business.CommonSelectPop;
+import com.uuzuche.lib_zxing.activity.CodeUtils;
+
+import org.json.JSONException;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by RaoMeng on 2019/2/25
+ * Desc: 库存条码绑定
+ */
+public class InventoryBindingFragment extends BaseFragment implements View.OnClickListener {
+    private String DIALOG_DATE = "DialogDate";
+    private static final int REQUEST_DATE = 11;
+    private static final int SCAN_BARCODE_CODE = 101;
+    private static final int SCAN_MODEL_CODE = 102;
+    private Button mMoreButton, mSaveButton, mNextButton;
+    private PopupWindow mMenuPopupWindow;
+    private View mMenuView;
+    private TextView mBoxTextView, mPanEditText;
+    private ImageView mCalendarImageView, mEnclosureFitlerIv, mModelScanIv, mBarcodeScanIv;
+    private ClearableEditText mDateEditText, mModelEditText, mQuantityEditText,
+            mLotEditText, mPoEditText, mEnclosureEditText, mMpqEditText, mBrandEditText, mBarcodeEditText;
+    private CheckBox mPoCheckBox;
+    private String mBoxNum, mPiInoutno, mPiid, mPiClass, mRealBoxNum, mDatecodebyparse,pd_whcode;
+    private JLTBarcodeParseBean mBarcodeParseBean;
+    private RecyclerView mEnclosureRecyclerView;
+    private Dialog mEnclosureDialog;
+    private OnFinishListener mOnFinishListener;
+    private List<WhcodeBean> mEnclosureList;
+    private JLTSearchWhcodeAdapter mSearchEnclosureAdapter;
+    private CommonSelectPop mBrandSelectPop, mEnclosureSelectPop, mMpqSelectPop;
+    private boolean isMpqDiv = false;
+    private List<JLTBrandEntity> mBrandEntities;
+    private List<JLTPkgEntity> mPkgEntities;
+    private List<JLTMpqEntity> mMpqEntities;
+    private TextView mTypeTextView;
+    private NewJLTStorageInTodoAdapter mStorageInTodoAdapter;
+    private RecyclerView mRecyclerView;
+    private CheckBox jlt_check_ok;
+    private LinearLayout jlt_storage_in_barcode_line;
+    private ClearableEditText jlt_storage_in_barcode_et;
+    private int mFocusId;
+    private RadioGroup mMenuRadioGroup;
+    private RadioButton mInfoRadioButton;
+    private RadioButton mSignRadioButton;
+    private LinearLayout jlt_line_edit;
+    private ClearableEditText jlt_edit_lotno;
+    private ClearableEditText jlt_edit_dataecode;
+    private ClearableEditText jlt_edit_dc;
+    private ClearableEditText jlt_edit_qty;
+    private String prodcode;
+    private Fragment mFragment;
+    private StringRequest mStringRequest;
+    private TextView mResultTextView;
+    private String jlt_storage_in_barcode_etstrim;
+    private CheckBox check_box_positions;
+    private CheckBox check_box_lono;
+    private CheckBox check_box_date;
+    private CheckBox check_box_dc;
+    private ClearableEditText jlt_edit_warehouse;
+    private InputMethodManager imm;
+
+    public void setOnFinishListener(OnFinishListener onFinishListener) {
+        mOnFinishListener = onFinishListener;
+    }
+
+    @Override
+    protected int getLayout() {
+        return R.layout.fragment_inventory_binging;
+    }
+
+    @Override
+    protected void initViews() {
+        ((FunctionActivity) getActivity()).setTitle("库存条码绑定");
+
+//        ((FunctionActivity) getActivity()).setMoreBtnVisible(true);
+
+        mMoreButton = (Button) getActivity().findViewById(R.id.btn_actionbar_more);
+        mCalendarImageView = root.findViewById(R.id.jlt_storage_in_barcode_date_iv);
+        mModelScanIv = root.findViewById(R.id.jlt_storage_in_barcode_model_scan_iv);
+        mDateEditText = root.findViewById(R.id.jlt_storage_in_barcode_date_et);
+        mBoxTextView = root.findViewById(R.id.jlt_storage_in_barcode_box_tv);
+        mBarcodeScanIv = root.findViewById(R.id.jlt_storage_in_barcode_scan_iv);
+        mBarcodeEditText = root.findViewById(R.id.jlt_storage_in_barcode_barcode_et);
+        mModelEditText = root.findViewById(R.id.jlt_storage_in_barcode_model_et);
+        mQuantityEditText = root.findViewById(R.id.jlt_storage_in_barcode_quantity_et);
+        mMpqEditText = root.findViewById(R.id.jlt_storage_in_barcode_mpq_et);
+        mLotEditText = root.findViewById(R.id.jlt_storage_in_barcode_lot_et);
+        mPanEditText = root.findViewById(R.id.jlt_storage_in_barcode_reel_et);
+        mPoEditText = root.findViewById(R.id.jlt_storage_in_barcode_po_et);
+        mBrandEditText = root.findViewById(R.id.jlt_storage_in_barcode_brand_et);
+        mSaveButton = root.findViewById(R.id.jlt_storage_in_barcode_save_btn);
+        mNextButton = root.findViewById(R.id.jlt_storage_in_barcode_next_btn);
+        mPoCheckBox = root.findViewById(R.id.jlt_storage_in_barcode_po_cb);
+        mResultTextView = root.findViewById(R.id.material_in_collect_result_tv);
+//        mModelEditText.requestFocus();
+        mBarcodeEditText.requestFocus();
+        mEnclosureEditText = root.findViewById(R.id.jlt_storage_in_barcode_enclosure_et);
+        mEnclosureFitlerIv = root.findViewById(R.id.jlt_storage_in_barcode_enclosure_filter_iv);
+
+        jlt_check_ok = root.findViewById(R.id.jlt_check_ok);
+        //条码框
+        jlt_storage_in_barcode_line = root.findViewById(R.id.jlt_storage_in_barcode_line);
+        jlt_storage_in_barcode_et = root.findViewById(R.id.jlt_storage_in_barcode_et);
+        //RadioGroup
+        mMenuRadioGroup = root.findViewById(R.id.jlt_pick_material_out_scan_menu_rg);
+        mInfoRadioButton = root.findViewById(R.id.jlt_pick_material_out_scan_info_rb);
+        mSignRadioButton = root.findViewById(R.id.jlt_pick_material_out_scan_sign_rb);
+        jlt_line_edit = root.findViewById(R.id.jlt_line_edit);
+
+        //输入框
+        //LotNo
+        jlt_edit_lotno = root.findViewById(R.id.jlt_edit_lotno);
+        jlt_edit_dataecode = root.findViewById(R.id.jlt_edit_dataecode);
+        jlt_edit_dc = root.findViewById(R.id.jlt_edit_DC);
+        jlt_edit_qty = root.findViewById(R.id.jlt_edit_QTY);
+        jlt_edit_warehouse = root.findViewById(R.id.jlt_edit_warehouse);
+        /**
+         * 勾选框
+         */
+        //仓位
+        check_box_positions = root.findViewById(R.id.check_box_positions);
+        //LoNo
+        check_box_lono = root.findViewById(R.id.check_box_lono);
+        //日期
+        check_box_date = root.findViewById(R.id.check_box_date);
+        //字符
+        check_box_dc = root.findViewById(R.id.check_box_dc);
+        LinearLayout linecheck_tv = root.findViewById(R.id.linecheck_tv);
+        linecheck_tv.setVisibility(View.GONE);
+        mBarcodeParseBean = new JLTBarcodeParseBean();
+        mBarcodeParseBean.setCHECKPO("N");
+
+        View enclosureView = View.inflate(mActivity, R.layout.dialog_jlt_search_whcode, null);
+        mEnclosureRecyclerView = enclosureView.findViewById(R.id.item_jlt_search_whcode_rv);
+        mEnclosureRecyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
+        mEnclosureRecyclerView.addItemDecoration(new RecyclerItemDecoration(1));
+        mEnclosureList = new ArrayList<>();
+        mSearchEnclosureAdapter = new JLTSearchWhcodeAdapter(mEnclosureList);
+        mEnclosureRecyclerView.setAdapter(mSearchEnclosureAdapter);
+        mEnclosureDialog = new AlertDialog.Builder(mActivity).setView(enclosureView).create();
+
+        mBrandSelectPop = new CommonSelectPop(mActivity, "请选择品牌");
+        mEnclosureSelectPop = new CommonSelectPop(mActivity, "请选择封装方式");
+        mMpqSelectPop = new CommonSelectPop(mActivity, "请选择MPQ");
+
+
+        mTypeTextView = root.findViewById(R.id.jlt_storage_in_todo_list_tv);
+        mRecyclerView = root.findViewById(R.id.jlt_storage_in_todo_list_rv);
+        mRecyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
+        mRecyclerView.addItemDecoration(new RecyclerItemDecoration(2));
+        mStorageInTodoAdapter = new NewJLTStorageInTodoAdapter(mActivity);
+        mFocusId = root.findFocus().getId();
+        CheckBoxData();
+        imm = (InputMethodManager) mActivity.getSystemService(Context.INPUT_METHOD_SERVICE);
+    }
+
+    @Override
+    protected void initEvents() {
+
+        mMoreButton.setOnClickListener(this);
+        mCalendarImageView.setOnClickListener(this);
+        mBarcodeScanIv.setOnClickListener(this);
+        mModelScanIv.setOnClickListener(this);
+        mSaveButton.setOnClickListener(this);
+        mNextButton.setOnClickListener(this);
+        mEnclosureEditText.setOnClickListener(this);
+        mEnclosureFitlerIv.setOnClickListener(this);
+
+        mModelEditText.addTextChangedListener(new MyTextWatcher(mModelEditText));
+        mQuantityEditText.addTextChangedListener(new MyTextWatcher(mQuantityEditText));
+        mMpqEditText.addTextChangedListener(new MyTextWatcher(mMpqEditText));
+        mDateEditText.addTextChangedListener(new MyTextWatcher(mDateEditText));
+        mLotEditText.addTextChangedListener(new MyTextWatcher(mLotEditText));
+        mPanEditText.addTextChangedListener(new MyTextWatcher(mPanEditText));
+        mPoEditText.addTextChangedListener(new MyTextWatcher(mPoEditText));
+        mBrandEditText.addTextChangedListener(new MyTextWatcher(mBrandEditText));
+        mEnclosureEditText.addTextChangedListener(new MyTextWatcher(mEnclosureEditText));
+
+        //扫描条码号回车
+        CommonUtil.setEditorActionListener(mBarcodeEditText, new MyEditorActionListener() {
+            @Override
+            public void MyEditorAction(String text, int actionId, KeyEvent event) {
+//                barcodeParse(text);
+                if (!text.isEmpty()){
+                    SharedPreUtil.saveString(mActivity,"house_text",text);
+                }
+
+                confirmRequest(false);
+            }
+        });
+
+        //QTY回车
+        CommonUtil.setEditorActionListener(jlt_edit_qty, new MyEditorActionListener() {
+            @Override
+            public void MyEditorAction(String text, int actionId, KeyEvent event) {
+                newlineqtyEnter();
+
+            }
+        });
+
+
+        //输入条码号回车
+        CommonUtil.setEditorActionListener(jlt_storage_in_barcode_et, new MyEditorActionListener() {
+            @Override
+            public void MyEditorAction(String text, int actionId, KeyEvent event) {
+                newlinebarcodeEnter();
+
+            }
+        });
+
+        //仓位回车
+        CommonUtil.setEditorActionListener(mLotEditText, new MyEditorActionListener() {
+            @Override
+            public void MyEditorAction(String text, int actionId, KeyEvent event) {
+                newlinemLotEnter();
+
+            }
+        });
+        //LONO回车
+        CommonUtil.setEditorActionListener(jlt_edit_lotno, new MyEditorActionListener() {
+            @Override
+            public void MyEditorAction(String text, int actionId, KeyEvent event) {
+                newlinemLotonEnter();
+
+            }
+        });
+        //日期回车
+        CommonUtil.setEditorActionListener(jlt_edit_dataecode, new MyEditorActionListener() {
+            @Override
+            public void MyEditorAction(String text, int actionId, KeyEvent event) {
+                newlinemdateEnter();
+
+            }
+        });
+        //字符回车
+        CommonUtil.setEditorActionListener(jlt_edit_dc, new MyEditorActionListener() {
+            @Override
+            public void MyEditorAction(String text, int actionId, KeyEvent event) {
+                clearableedittextjudge();
+            }
+        });
+
+
+
+//        CommonUtil.setEditorActionListener(mModelEditText, new MyEditorActionListener() {
+//            @Override
+//            public void MyEditorAction(String text, int actionId, KeyEvent event) {
+//                modelParse();
+//            }
+//        });
+
+        CommonUtil.setEditorActionListener(mMpqEditText, new MyEditorActionListener() {
+            @Override
+            public void MyEditorAction(String text, int actionId, KeyEvent event) {
+                mBrandEditText.postDelayed(new Runnable() {
+                    @Override
+                    public void run() {
+                        mBrandEditText.requestFocus();
+                    }
+                }, 100);
+            }
+        });
+
+        mPoCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+                mBarcodeParseBean.setCHECKPO(isChecked ? "Y" : "N");
+            }
+        });
+
+        mSearchEnclosureAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+            @Override
+            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                mBarcodeParseBean.setPRCODE(mEnclosureList.get(position).getWH_TYPE());
+
+                mEnclosureEditText.setText(mEnclosureList.get(position).getWH_CODE());
+                mEnclosureDialog.dismiss();
+            }
+        });
+
+        mBrandSelectPop.setOnDataSelectListener(new CommonSelectPop.OnDataSelectListener() {
+            @Override
+            public void onDataSelect(int position) {
+                mBrandSelectPop.dismiss();
+                JLTBrandEntity brandEntity = mBrandEntities.get(position);
+                selectPkg(brandEntity);
+            }
+        });
+
+        mEnclosureSelectPop.setOnDataSelectListener(new CommonSelectPop.OnDataSelectListener() {
+            @Override
+            public void onDataSelect(int position) {
+                JLTPkgEntity pkgEntity = mPkgEntities.get(position);
+                String qtyStr = mQuantityEditText.getText().toString().trim();
+                if (TextUtils.isEmpty(qtyStr)) {
+                    CommonUtil.toastNoRepeat(mActivity, "数量为空,请先采集数量信息");
+                    return;
+                }
+                try {
+                    mEnclosureSelectPop.dismiss();
+                    double qty = Double.parseDouble(qtyStr);
+                    selectMpq(qty, pkgEntity);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        });
+
+        mMpqSelectPop.setOnDataSelectListener(new CommonSelectPop.OnDataSelectListener() {
+            @Override
+            public void onDataSelect(int position) {
+                mMpqSelectPop.dismiss();
+                double qty = mBarcodeParseBean.getQTY();
+                if (qty != -1) {
+                    double mpq = mMpqEntities.get(position).getMPQ();
+                    verifyPan(qty, mpq);
+                }
+            }
+        });
+
+        CommonUtil.setEditorActionListener(mQuantityEditText, new MyEditorActionListener() {
+            @Override
+            public void MyEditorAction(String text, int actionId, KeyEvent event) {
+                String mpq = mMpqEditText.getText().toString().trim();
+                String qty = mQuantityEditText.getText().toString().trim();
+
+                if (TextUtils.isEmpty(mpq)) {
+                    mMpqEditText.setText(qty);
+                }
+                mMpqEditText.requestFocus();
+                mMpqEditText.setSelection(mMpqEditText.getText().toString().trim().length());
+            }
+        });
+
+        mStorageInTodoAdapter.setOnSubItemClickListener(new NewJLTStorageInTodoAdapter.OnSubItemClickListener() {
+            @Override
+            public void onSubItemClick(JLTStorageModelBean jltStorageModelBean) {
+                List<SecondaryListAdapter.SecondaryListBean<String, JLTStorageModelBean>> datas = mStorageInTodoAdapter.getDatas();
+                if (datas.size()!=0){
+                    mModelEditText.setText(jltStorageModelBean.getPr_brand());
+                    mModelEditText.requestFocus();
+                    mModelEditText.setSelection(mModelEditText.getText().length());
+//                    mLotEditText.requestFocus();
+                }
+
+            }
+        });
+//        mMenuRadioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
+//            @Override
+//            public void onCheckedChanged(RadioGroup group, int checkedId) {
+//                if (checkedId == R.id.jlt_pick_material_out_scan_info_rb) {
+//                    mRecyclerView.setVisibility(View.GONE);
+//                    jlt_line_edit.setVisibility(View.VISIBLE);
+//                } else if (checkedId == R.id.jlt_pick_material_out_scan_sign_rb) {
+//                    mRecyclerView.setVisibility(View.VISIBLE);
+//                    jlt_line_edit.setVisibility(View.GONE);
+//                }
+//            }
+//        });
+
+    }
+    public void CheckBoxData(){
+        String ischecheds = SharedPreUtil.getString(mActivity, Constants.JLTSTORAGEINISCHCKED, null);
+        if (StringUtil.isEmpty(ischecheds)){
+            jlt_check_ok.setChecked(true);
+            SharedPreUtil.saveString(mActivity, Constants.JLTSTORAGEINISCHCKED, "true");
+        }else {
+            if ("true".equals(ischecheds)){
+                jlt_check_ok.setChecked(true);
+                jlt_storage_in_barcode_line.setVisibility(View.VISIBLE);
+            }else {
+                jlt_check_ok.setChecked(false);
+                jlt_storage_in_barcode_line.setVisibility(View.GONE);
+            }
+        }
+
+        jlt_check_ok.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+                if (isChecked==true){
+                    jlt_storage_in_barcode_line.setVisibility(View.VISIBLE);
+                    SharedPreUtil.saveString(mActivity, Constants.JLTSTORAGEINISCHCKED, "true");
+                }else {
+                    jlt_storage_in_barcode_line.setVisibility(View.GONE);
+                    SharedPreUtil.saveString(mActivity, Constants.JLTSTORAGEINISCHCKED, "false");
+                }
+            }
+        });
+    }
+
+    @Override
+    protected void initDatas() {
+        Bundle bundle = getArguments();
+        if (bundle != null) {
+            mBoxNum = bundle.getString("boxNum");
+            mPiid = bundle.getString("pi_id");
+            mPiClass = bundle.getString("pi_class");
+            mPiInoutno = bundle.getString("pi_inoutno");
+            pd_whcode = bundle.getString("pd_whcode");
+        }
+
+        mBoxTextView.setText(mPiInoutno);
+        mBarcodeParseBean.setOUTBOX(mBoxNum);
+
+        mTypeTextView.setText(mPiClass);
+
+    }
+
+
+    private void barcodeParse(String barcode) {
+        if (TextUtils.isEmpty(barcode)) {
+            return;
+        }
+        String mModelEditTexttrim = this.mModelEditText.getText().toString().trim();
+        String mLotEditTexttrim = mLotEditText.getText().toString().trim();
+        String mBarcodeEditTexttrim = mBarcodeEditText.getText().toString().trim();
+        if (TextUtils.isEmpty(mBarcodeEditTexttrim)){
+            CommonUtil.toastNoRepeat(getContext(),"请输入条码号");
+            return;
+        }
+//        if (TextUtils.isEmpty(mModelEditTexttrim)){
+//            CommonUtil.toastNoRepeat(getContext(),"请输入品牌");
+//            return;
+//        }
+//        if (TextUtils.isEmpty(mLotEditTexttrim)){
+//            CommonUtil.toastNoRepeat(getContext(),"请输入仓位");
+//            return;
+//        }
+
+
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_RECEIVING_BARCODEPARSE2)
+                .method(Request.Method.POST)
+                .addParam("data", barcode)
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                mModelEditText.requestFocus();
+                confirmRequest(false);
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                mBarcodeEditText.setText("");
+                mBarcodeEditText.requestFocus();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+            }
+        });
+    }
+
+    private void modelParse() {
+        mEnclosureList.clear();
+        mEnclosureEditText.setText("");
+        String model = mModelEditText.getText().toString().trim();
+        if (TextUtils.isEmpty(model)) {
+            return;
+        }
+        mBarcodeParseBean.setDATA(model);
+
+        progressDialog.show();
+
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_JLT_RECEIVING_BARCODEPARSE)
+                .method(Request.Method.POST)
+                .tag(TAG + "barcodeparse")
+                .addParam("data", model)
+                .addParam("pi_ids", mPiid)
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                try {
+                    mQuantityEditText.requestFocus();
+                    String result = o.toString();
+                    JSONObject resultObject = JSON.parseObject(result);
+                    JSONObject dataObject = resultObject.getJSONObject("data");
+                    if (dataObject != null) {
+                        JSONArray brandArray = dataObject.getJSONArray("BRANDLIST");
+                        if (brandArray != null && brandArray.size() > 0) {
+                            JSONObject testBrand = brandArray.getJSONObject(0);
+                            if (TextUtils.isEmpty(mQuantityEditText.getText().toString().trim())
+                                    && TextUtils.isEmpty(FastjsonUtil.getText(testBrand, "QTY"))) {
+                                if (!TextUtils.isEmpty(FastjsonUtil.getText(testBrand, "PN"))
+                                        || !TextUtils.isEmpty(FastjsonUtil.getText(testBrand, "PKGLIST"))) {
+                                    CommonUtil.toastNoRepeat(mActivity, "请先采集数量");
+                                    return;
+                                }
+                            }
+
+                            if (mBrandEntities == null) {
+                                mBrandEntities = new ArrayList<>();
+                            } else {
+                                mBrandEntities.clear();
+                            }
+                            for (int i = 0; i < brandArray.size(); i++) {
+                                JSONObject brandObject = brandArray.getJSONObject(i);
+                                if (brandObject != null) {
+                                    JLTBrandEntity brandEntity = new JLTBrandEntity();
+                                    brandEntity.setBRAND(FastjsonUtil.getText(brandObject, "BRAND"));
+                                    brandEntity.setORDERCODE(FastjsonUtil.getText(brandObject, "ORDERCODE"));
+                                    if (!TextUtils.isEmpty(FastjsonUtil.getText(brandObject, "QTY"))) {
+                                        brandEntity.setQTY(FastjsonUtil.getDouble(brandObject, "QTY"));
+                                    } else {
+                                        brandEntity.setQTY(mBarcodeParseBean.getQTY());
+                                    }
+                                    brandEntity.setDATECODE(FastjsonUtil.getText(brandObject, "DATECODE"));
+                                    brandEntity.setLOTNO(FastjsonUtil.getText(brandObject, "LOTNO"));
+                                    brandEntity.setOUTBOX(FastjsonUtil.getText(brandObject, "OUTBOX"));
+                                    brandEntity.setDATECODEBYPARSE(FastjsonUtil.getText(brandObject, "DATECODEBYPARSE"));
+                                    brandEntity.setIsCheck(FastjsonUtil.getBoolean(brandObject, "isCheck"));
+                                    brandEntity.setPN(FastjsonUtil.getText(brandObject, "PN"));
+
+                                    JSONArray pkgArray = brandObject.getJSONArray("PKGLIST");
+                                    List<JLTPkgEntity> pkgEntities = null;
+                                    if (pkgArray != null && pkgArray.size() > 0) {
+                                        pkgEntities = new ArrayList<>();
+                                        for (int j = 0; j < pkgArray.size(); j++) {
+                                            JSONObject pkgObject = pkgArray.getJSONObject(j);
+                                            if (pkgObject != null) {
+                                                JLTPkgEntity pkgEntity = new JLTPkgEntity();
+
+                                                pkgEntity.setPR_CODE(FastjsonUtil.getText(pkgObject, "PR_CODE"));
+                                                pkgEntity.setPR_PKG(FastjsonUtil.getText(pkgObject, "PR_PKG"));
+                                                pkgEntity.setPR_FBBZL_USER(FastjsonUtil.getInt(pkgObject, "PR_FBBZL_USER"));
+
+                                                JSONArray mpqArray = pkgObject.getJSONArray("MPQ");
+                                                List<JLTMpqEntity> mpqEntities = null;
+                                                if (mpqArray != null && mpqArray.size() > 0) {
+                                                    mpqEntities = new ArrayList<>();
+                                                    for (int k = 0; k < mpqArray.size(); k++) {
+                                                        JLTMpqEntity mpqEntity = new JLTMpqEntity();
+                                                        Double mpq = mpqArray.getDouble(k);
+                                                        mpqEntity.setMPQ(mpq);
+
+                                                        mpqEntities.add(mpqEntity);
+                                                    }
+                                                }
+                                                pkgEntity.setMPQLIST(mpqEntities);
+
+                                                pkgEntities.add(pkgEntity);
+                                            }
+                                        }
+                                    }
+                                    brandEntity.setPKGLIST(pkgEntities);
+
+                                    mBrandEntities.add(brandEntity);
+                                }
+                            }
+                        }
+                        if (mBrandEntities.size() == 1) {
+                            JLTBrandEntity brandEntity = (JLTBrandEntity) mBrandEntities.get(0);
+                            selectPkg(brandEntity);
+                        } else if (mBrandEntities.size() > 1) {
+                            mBrandSelectPop.setData(mBrandEntities);
+                            mBrandSelectPop.showPopupWindow();
+                        }
+
+/*
+                        JSONArray pkgArray = dataObject.getJSONArray("PKGLIST");
+                        if (pkgArray != null && pkgArray.size() > 0) {
+                            for (int i = 0; i < pkgArray.size(); i++) {
+                                JSONObject pkgObject = pkgArray.getJSONObject(i);
+                                if (pkgObject != null) {
+                                    WhcodeBean enclosureBean = new WhcodeBean();
+                                    enclosureBean.setWhCode(FastjsonUtil.getText(pkgObject, "PR_PKG"));
+                                    enclosureBean.setPrcode(FastjsonUtil.getText(pkgObject, "PR_CODE"));
+
+                                    mEnclosureList.add(enclosureBean);
+                                }
+                            }
+                        }
+                        mSearchEnclosureAdapter.notifyDataSetChanged();*/
+
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+
+                mModelEditText.setText("");
+                mModelEditText.requestFocus();
+                mSearchEnclosureAdapter.notifyDataSetChanged();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+            }
+        });
+    }
+
+    public void setValuableText(TextView view, String text) {
+        if (!TextUtils.isEmpty(text)) {
+            view.setText(text);
+        }
+    }
+
+    private void selectPkg(JLTBrandEntity brandEntity) {
+        setValuableText(mBrandEditText, brandEntity.getBRAND());
+        setValuableText(mPoEditText, brandEntity.getORDERCODE());
+        String po = mPoEditText.getText().toString().trim();
+        mPoCheckBox.setChecked(!TextUtils.isEmpty(po));
+        double qty = brandEntity.getQTY();
+        if (qty > 0) {
+            mQuantityEditText.setText(CommonUtil.doubleFormat(qty));
+        }
+        setValuableText(mDateEditText,
+                TextUtils.isEmpty(brandEntity.getDATECODEBYPARSE()) ? brandEntity.getDATECODE() : brandEntity.getDATECODEBYPARSE());
+        setValuableText(mLotEditText, brandEntity.getLOTNO());
+        setValuableText(mModelEditText, brandEntity.getPN());
+
+        if (!TextUtils.isEmpty(brandEntity.getOUTBOX())) {
+            mRealBoxNum = brandEntity.getOUTBOX();
+        }
+        if (!TextUtils.isEmpty(brandEntity.getDATECODEBYPARSE())) {
+            mDatecodebyparse = brandEntity.getDATECODEBYPARSE();
+        }
+
+        List<JLTPkgEntity> pkglist = brandEntity.getPKGLIST();
+        mPkgEntities = pkglist;
+        if (mPkgEntities.size() == 1) {
+            JLTPkgEntity pkgEntity = mPkgEntities.get(0);
+
+            selectMpq(qty, pkgEntity);
+        } else if (mPkgEntities.size() > 1) {
+            mEnclosureSelectPop.setData(mPkgEntities);
+            mEnclosureSelectPop.showPopupWindow();
+        }
+    }
+
+    private void selectMpq(double qty, JLTPkgEntity pkgEntity) {
+        mBarcodeParseBean.setPRCODE(pkgEntity.getPR_CODE());
+        mEnclosureEditText.setText(pkgEntity.getPR_PKG());
+        isMpqDiv = pkgEntity.getPR_FBBZL_USER() == 0;
+
+        List<JLTMpqEntity> mpqlist = pkgEntity.getMPQLIST();
+        if (mpqlist == null) {
+            return;
+        }
+        List<JLTMpqEntity> requireMpqs = new ArrayList<>();
+        for (int i = 0; i < mpqlist.size(); i++) {
+            JLTMpqEntity mpqEntity = mpqlist.get(i);
+            try {
+                double mpqNum = mpqEntity.getMPQ();
+                double v = qty / mpqNum;
+                if (CommonUtil.isIntegerForDouble(v)) {
+                    requireMpqs.add(mpqEntity);
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+                continue;
+            }
+        }
+        if (requireMpqs.size() == 1) {
+            verifyPan(qty, requireMpqs.get(0).getMPQ());
+        } else if (isMpqDiv) {
+            if (requireMpqs.size() == 0) {
+                CommonUtil.toastNoRepeat(mActivity, "采集数不满足最小包,请重新采集!");
+            } else {
+                showMpqPop(requireMpqs);
+            }
+        } else if (mpqlist.size() > 0) {
+            if (mpqlist.size() == 1) {
+                verifyPan(qty, mpqlist.get(0).getMPQ());
+            } else {
+                showMpqPop(mpqlist);
+            }
+        }
+    }
+
+    private void showMpqPop(List<JLTMpqEntity> mpqlist) {
+        mMpqEntities = mpqlist;
+        mMpqSelectPop.setData(mMpqEntities);
+        mMpqSelectPop.showPopupWindow();
+    }
+
+    private void verifyPan(double qty, double mpq) {
+        try {
+            double pan = qty / mpq;
+            if (isMpqDiv) {
+                if (!CommonUtil.isIntegerForDouble(pan)) {
+                    CommonUtil.toastNoRepeat(mActivity, "采集数不满足最小包,请重新采集!");
+                } else {
+                    mPanEditText.setText(CommonUtil.doubleFormat(Math.ceil(pan)));
+                    mMpqEditText.setText(CommonUtil.doubleFormat(mpq));
+                }
+            } else {
+                mPanEditText.setText(CommonUtil.doubleFormat(Math.ceil(pan)));
+                mMpqEditText.setText(CommonUtil.doubleFormat(mpq));
+            }
+        } catch (Exception e) {
+            mPanEditText.setText(0);
+            e.printStackTrace();
+        }
+    }
+
+    @Override
+    public void onClick(View v) {
+        switch (v.getId()) {
+            case R.id.btn_actionbar_more:
+                showMoreMenu();
+                break;
+            case R.id.jlt_storage_in_barcode_date_iv:
+                FragmentManager fragmentManager = getFragmentManager();
+                DatePickerFragment dialog = new DatePickerFragment();
+                dialog.setTargetFragment(InventoryBindingFragment.this, REQUEST_DATE);
+                dialog.show(fragmentManager, DIALOG_DATE);
+                break;
+            case R.id.jlt_storage_in_barcode_scan_iv:
+                CommonUtil.scanBarcode(mActivity, InventoryBindingFragment.this, SCAN_BARCODE_CODE);
+                break;
+            case R.id.jlt_storage_in_barcode_model_scan_iv:
+                CommonUtil.scanBarcode(mActivity, InventoryBindingFragment.this, SCAN_MODEL_CODE);
+                break;
+            case R.id.jlt_storage_in_barcode_save_btn:
+//                saveBarcode(false, true);
+
+                clearableedittextjudge();
+                break;
+            case R.id.jlt_storage_in_barcode_next_btn:
+                saveBarcode(true, true);
+                break;
+            case R.id.jlt_storage_in_barcode_enclosure_et:
+            case R.id.jlt_storage_in_barcode_enclosure_filter_iv:
+                if (mPkgEntities.size() <= 1) {
+//                    CommonUtil.toastNoRepeat(mActivity, "封装形式为空");
+                } else {
+                    mEnclosureSelectPop.showPopupWindow();
+                }
+                break;
+            default:
+                break;
+        }
+    }
+    //输入框回车换行
+    public void newlineqtyEnter (){
+        String jlt_storage_in_barcode_ets = jlt_storage_in_barcode_et.getText().toString().trim();
+        String mLotEditTexts = mLotEditText.getText().toString().trim();//仓位
+        String jlt_edit_lotnos = jlt_edit_lotno.getText().toString().trim();//LoNo
+        String jlt_edit_dataecodes = jlt_edit_dataecode.getText().toString().trim();//日期
+        String jlt_edit_dcs = jlt_edit_dc.getText().toString().trim();//字符
+        if (jlt_check_ok.isChecked()==true&&jlt_storage_in_barcode_ets.isEmpty()){
+            jlt_storage_in_barcode_et.requestFocus();
+            return;
+        }
+        if (check_box_positions.isChecked()==true&&mLotEditTexts.isEmpty()){
+            mLotEditText.requestFocus();
+            return;
+        }
+        if (check_box_lono.isChecked()==true&&jlt_edit_lotnos.isEmpty()){
+            jlt_edit_lotno.requestFocus();
+            return;
+        }
+        if (check_box_date.isChecked()==true&&jlt_edit_dataecodes.isEmpty()){
+            jlt_edit_dataecode.requestFocus();
+            return;
+        }
+        if (check_box_dc.isChecked()==true&&jlt_edit_dcs.isEmpty()){
+            jlt_edit_dc.requestFocus();
+            return;
+        }
+        clearableedittextjudge();
+    }
+    public void newlinebarcodeEnter(){
+        String mLotEditTexts = mLotEditText.getText().toString().trim();//仓位
+        String jlt_edit_lotnos = jlt_edit_lotno.getText().toString().trim();//LoNo
+        String jlt_edit_dataecodes = jlt_edit_dataecode.getText().toString().trim();//日期
+        String jlt_edit_dcs = jlt_edit_dc.getText().toString().trim();//字符
+        if (check_box_positions.isChecked()==true&&mLotEditTexts.isEmpty()){
+            mLotEditText.requestFocus();
+            return;
+        }
+        if (check_box_lono.isChecked()==true&&jlt_edit_lotnos.isEmpty()){
+            jlt_edit_lotno.requestFocus();
+            return;
+        }
+        if (check_box_date.isChecked()==true&&jlt_edit_dataecodes.isEmpty()){
+            jlt_edit_dataecode.requestFocus();
+            return;
+        }
+        if (check_box_dc.isChecked()==true&&jlt_edit_dcs.isEmpty()){
+            jlt_edit_dc.requestFocus();
+            return;
+        }
+        clearableedittextjudge();
+    }
+    public void newlinemLotEnter(){
+        String jlt_edit_lotnos = jlt_edit_lotno.getText().toString().trim();//LoNo
+        String jlt_edit_dataecodes = jlt_edit_dataecode.getText().toString().trim();//日期
+        String jlt_edit_dcs = jlt_edit_dc.getText().toString().trim();//字符
+        if (check_box_lono.isChecked()==true&&jlt_edit_lotnos.isEmpty()){
+            jlt_edit_lotno.requestFocus();
+            return;
+        }
+        if (check_box_date.isChecked()==true&&jlt_edit_dataecodes.isEmpty()){
+            jlt_edit_dataecode.requestFocus();
+            return;
+        }
+        if (check_box_dc.isChecked()==true&&jlt_edit_dcs.isEmpty()){
+            jlt_edit_dc.requestFocus();
+            return;
+        }
+        clearableedittextjudge();
+    }
+    public void newlinemLotonEnter(){
+        String jlt_edit_dataecodes = jlt_edit_dataecode.getText().toString().trim();//日期
+        String jlt_edit_dcs = jlt_edit_dc.getText().toString().trim();//字符
+        if (check_box_date.isChecked()==true&&jlt_edit_dataecodes.isEmpty()){
+            jlt_edit_dataecode.requestFocus();
+            return;
+        }
+        if (check_box_dc.isChecked()==true&&jlt_edit_dcs.isEmpty()){
+            jlt_edit_dc.requestFocus();
+            return;
+        }
+        clearableedittextjudge();
+    }
+    public void newlinemdateEnter(){
+        String jlt_edit_dcs = jlt_edit_dc.getText().toString().trim();//字符
+        if (check_box_dc.isChecked()==true&&jlt_edit_dcs.isEmpty()){
+            jlt_edit_dc.requestFocus();
+            return;
+        }
+        clearableedittextjudge();
+    }
+    public void clearableedittextjudge(){
+        String mBarcodeEditTexts = mBarcodeEditText.getText().toString().trim();//采集条码号
+        String jlt_storage_in_barcode_ets = jlt_storage_in_barcode_et.getText().toString().trim();//条码号
+        String mLotEditTexts = mLotEditText.getText().toString().trim();//仓位
+        String jlt_edit_lotnos = jlt_edit_lotno.getText().toString().trim();//LoNo
+        String jlt_edit_dataecodes = jlt_edit_dataecode.getText().toString().trim();//日期
+        String jlt_edit_dcs = jlt_edit_dc.getText().toString().trim();//字符
+        String jlt_edit_qtys = jlt_edit_qty.getText().toString().trim();//QTY
+        if (check_box_positions.isChecked()==true&&mLotEditTexts.isEmpty()){
+            CommonUtil.toastNoRepeat(mActivity, "仓位不可为空");
+            return;
+        }
+        if (check_box_lono.isChecked()==true&&jlt_edit_lotnos.isEmpty()){
+            CommonUtil.toastNoRepeat(mActivity, "LoNo不可为空");
+            return;
+        }
+        if (check_box_date.isChecked()==true&&jlt_edit_dataecodes.isEmpty()){
+            CommonUtil.toastNoRepeat(mActivity, "日期不可为空");
+            return;
+        }
+        if (check_box_dc.isChecked()==true&&jlt_edit_dcs.isEmpty()){
+            CommonUtil.toastNoRepeat(mActivity, "字符不可为空");
+            return;
+        }
+
+        Savebtn_barcode(mBarcodeEditTexts,jlt_storage_in_barcode_ets,mLotEditTexts,jlt_edit_lotnos,jlt_edit_dataecodes,jlt_edit_dcs,jlt_edit_qtys);
+    }
+    public void Savebtn_barcode(String mBarcodeEditTexts,String jlt_storage_in_barcode_ets,String mLotEditTexts,String jlt_edit_lotnos,
+                                String jlt_edit_dataecodes,String jlt_edit_dcs,String jlt_edit_qtys){
+        if (jlt_edit_qtys.isEmpty()){
+            CommonUtil.toastNoRepeat(mActivity, "数量不可为空");
+            return;
+        }
+
+        if (mBarcodeEditTexts.isEmpty()){
+            CommonUtil.toastNoRepeat(mActivity, "条码号不可为空");
+            return;
+        }
+        String house_text = SharedPreUtil.getString(mActivity, "house_text", null);
+        String jlt_edit_warehousetrim = jlt_edit_warehouse.getText().toString().trim();
+        JSONObject obj = new JSONObject();
+        obj.put("LOCATION", mLotEditTexts);
+        obj.put("PRODCODE", prodcode);
+        obj.put("PI_IDS", mPiid);
+        if (jlt_check_ok.isChecked()==true){
+            if (jlt_storage_in_barcode_ets.isEmpty()){
+                CommonUtil.toastNoRepeat(mActivity, "条码号不可为空");
+                return;
+            }
+        }else if(jlt_check_ok.isChecked()==false){
+                jlt_storage_in_barcode_et.setText(mBarcodeEditTexts);
+                jlt_storage_in_barcode_ets = jlt_storage_in_barcode_et.getText().toString().trim();
+        }
+
+        obj.put("BARCODE", jlt_storage_in_barcode_ets);
+        obj.put("LOTNO", jlt_edit_lotnos);
+        obj.put("DC", jlt_edit_dcs);
+        obj.put("RE_MADEDATE",jlt_edit_dataecodes);
+        obj.put("CONTENT", mBarcodeEditTexts);
+        obj.put("QTY", jlt_edit_qtys);
+        obj.put("whcode", jlt_edit_warehousetrim);
+        String stores = obj.toString();
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_INVENTORYBINDING)
+                .method(Request.Method.POST)
+                .tag(TAG + "savebarcode")
+                .addParam("store", stores)
+                .addParam("sourcebarcode",house_text)
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                try {
+//                    String result = o.toString();
+//                    JSONObject resultObject = JSON.parseObject(result);
+//                    JSONObject dataObject = resultObject.getJSONObject("data");
+//                        CommonUtil.toastNoRepeat(mActivity, "归属入库单:"
+//                                + FastjsonUtil.getText(dataObject, "INOUTNO")
+//                                + "成功");
+                    CommonUtil.toastNoRepeat(mActivity, "归属成功");
+
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+                mBarcodeEditText.setText("");
+                mBarcodeEditText.requestFocus();
+                jlt_storage_in_barcode_et.setText("");
+                jlt_edit_lotno.setText("");
+                jlt_edit_dataecode.setText("");
+                jlt_edit_dc.setText("");
+                jlt_edit_qty.setText("");
+//                resetState();
+                mBarcodeEditText.requestFocus();
+            }
+
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+            }
+        });
+    }
+    private void saveBarcode(boolean exist, boolean checkDate) {
+        if (TextUtils.isEmpty(mBarcodeParseBean.getPN()) ||
+                TextUtils.isEmpty(mBarcodeParseBean.getBRAND()) ||
+                TextUtils.isEmpty(mBarcodeParseBean.getMPQ())) {
+            CommonUtil.toastNoRepeat(mActivity, "请采集条码获取必填数据");
+            return;
+        }
+        if (mPoCheckBox.isChecked() && TextUtils.isEmpty(mBarcodeParseBean.getORDERCODE())) {
+            CommonUtil.toastNoRepeat(mActivity, "已勾选PO校验,PO号不允许为空");
+            return;
+        }
+        /*if (mBoxNum == null || !mBoxNum.equals(mRealBoxNum)) {
+            CommonUtil.toastNoRepeat(mActivity, "当前采集的条码不属于当前箱号");
+            return;
+        }*/
+        if (mEnclosureList.size() > 0 && TextUtils.isEmpty(mBarcodeParseBean.getPR_PKG())) {
+            CommonUtil.toastNoRepeat(mActivity, "请选择封装形式");
+            return;
+        }
+//        String qtyStr = mQuantityEditText.getText().toString().trim();
+//        if (TextUtils.isEmpty(qtyStr)) {
+//            CommonUtil.toastNoRepeat(mActivity, "数量为空,请先采集数量信息");
+//            return;
+//        }
+//        String mpqStr = mMpqEditText.getText().toString().trim();
+//        if (TextUtils.isEmpty(mpqStr)) {
+//            CommonUtil.toastNoRepeat(mActivity, "最小包为空,请采集最小包");
+//            return;
+//        }
+//        if (isMpqDiv) {
+//            try {
+//                double qty = Double.parseDouble(qtyStr);
+//                double mpq = Double.parseDouble(mpqStr);
+//                double pan = qty / mpq;
+//                if (!CommonUtil.isIntegerForDouble(pan)) {
+//                    CommonUtil.toastNoRepeat(mActivity, "采集数不满足最小包,请重新采集!");
+//                    return;
+//                }
+//            } catch (Exception e) {
+//                e.printStackTrace();
+//            }
+//        }
+
+        if (checkDate && !TextUtils.isEmpty(mDatecodebyparse)) {
+            long limitDays = SharedPreUtil.getInt(mActivity, Constants.FLAG.JLT_VALID_DAYS_CACHE, 0);
+            int daysInterval = DateFormatUtil.getDaysInterval(mDatecodebyparse, DateFormatUtil.long2Str("yyyyMMdd")
+                    , DateFormatUtil.getFormat("yyyyMMdd"));
+
+            if (limitDays != 0 && daysInterval > limitDays) {
+                new AlertDialog.Builder(mActivity)
+                        .setTitle("提示")
+                        .setMessage("入库校验 生产日期(" + mDatecodebyparse
+                                + ")+ 有效天数(" + limitDays
+                                + ")<当天,是否确认入库?")
+                        .setPositiveButton("确认", new DialogInterface.OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialog, int which) {
+                                confirmRequest(exist);
+                            }
+                        })
+                        .setNegativeButton("取消", new DialogInterface.OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialog, int which) {
+                                mBarcodeEditText.setText("");
+                                resetState();
+                            }
+                        }).create().show();
+            } else {
+                confirmRequest(exist);
+            }
+        } else {
+            confirmRequest(exist);
+        }
+    }
+    //扫描 条码号
+    private void confirmRequest(boolean exist) {
+        String mModelEditTexttrim = this.mModelEditText.getText().toString().trim();
+        String mLotEditTexttrim = mLotEditText.getText().toString().trim();
+        String mBarcodeEditTexttrim = mBarcodeEditText.getText().toString().trim();
+        if (TextUtils.isEmpty(mBarcodeEditTexttrim)){
+            CommonUtil.toastNoRepeat(getContext(),"请输入条码号");
+            return;
+        }
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_INVENTORYBINDING2)
+                .method(Request.Method.POST)
+                .tag(TAG + "savebarcode")
+                .addParam("pi_ids", mPiid)
+                .addParam("brand", mModelEditTexttrim)
+                .addParam("location", mLotEditTexttrim)
+                .addParam("barcode", mBarcodeEditText.getText().toString().trim())
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                    String result = o.toString();
+                    Log.e("result",result);
+                    JSONObject resultObject = JSON.parseObject(result);
+                    JSONObject dataObject = resultObject.getJSONObject("data");
+                    if (dataObject != null) {
+                        String lotno = FastjsonUtil.getText(dataObject, "LOTNO");
+                        String datecode = FastjsonUtil.getText(dataObject, "DATECODE");
+                        String dc = FastjsonUtil.getText(dataObject, "DC");
+                        String qty = FastjsonUtil.getText(dataObject, "QTY");
+                        prodcode = FastjsonUtil.getText(dataObject, "PRODCODE");
+                        String lc = FastjsonUtil.getText(dataObject, "LC");
+                        mLotEditText.setText(lc);
+
+                        jlt_edit_lotno.setText(lotno);
+                        jlt_edit_dataecode.setText(datecode);
+                        jlt_edit_dc.setText(dc);
+                        jlt_edit_qty.setText(qty);
+                    }
+                    if (jlt_check_ok.isChecked()==true&&jlt_storage_in_barcode_et.getText().toString().trim().isEmpty()){
+                        jlt_storage_in_barcode_et.requestFocus();
+                        jlt_storage_in_barcode_et.setSelection(jlt_edit_qty.getText().toString().trim().length());
+                    }else {
+                        newlinebarcodeEnter();
+                    }
+
+
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+//                check_box_positions.setChecked(true);
+//                check_box_lono.setChecked(true);
+//                check_box_date.setChecked(true);
+//                check_box_dc.setChecked(true);
+            }
+        });
+
+        mBarcodeEditText.selectAll();
+        mBarcodeEditText.requestFocus();
+        imm.showSoftInput(mBarcodeEditText, InputMethodManager.RESULT_HIDDEN);
+
+    }
+    //清空所有输入框
+    private void resetState() {
+        mModelEditText.setText("");
+        mQuantityEditText.setText("");
+        mMpqEditText.setText("");
+        mDateEditText.setText("");
+        mLotEditText.setText("");
+        mPanEditText.setText("");
+        mPoEditText.setText("");
+        mBrandEditText.setText("");
+        mEnclosureEditText.setText("");
+
+        mBarcodeEditText.requestFocus();
+    }
+
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
+        if (resultCode != Activity.RESULT_OK) {
+            return;
+        }
+
+        if (requestCode == REQUEST_DATE) {
+            try {
+                Date date = (Date) data.getSerializableExtra("extra_date");
+                String formatDate = DateFormat.format("yyyy-MM-dd", date).toString();
+                jlt_edit_dataecode.setText(formatDate);
+                jlt_edit_dataecode.setSelection(jlt_edit_dataecode.getText().toString().trim().length());
+                mDatecodebyparse = formatDate;
+            } catch (Exception e) {
+                jlt_edit_dataecode.setText("");
+            }
+        }
+        if (requestCode == SCAN_BARCODE_CODE && data != null) {
+            if (data.getExtras() != null) {
+                String result = data.getExtras().getString(CodeUtils.RESULT_STRING);
+                mBarcodeEditText.setText(result);
+                mBarcodeEditText.setSelection(result.length());
+//                barcodeParse(result);
+                confirmRequest(false);
+            }
+        }
+        if (requestCode == SCAN_MODEL_CODE && data != null) {
+            if (data.getExtras() != null) {
+                String result = data.getExtras().getString(CodeUtils.RESULT_STRING);
+                mModelEditText.setText(result);
+                mModelEditText.setSelection(result.length());
+                modelParse();
+            }
+        }
+        if (mFocusId==R.id.jlt_storage_in_barcode_et){
+            String result = data.getExtras().getString(CodeUtils.RESULT_STRING);
+            jlt_storage_in_barcode_et.setText(result);
+            jlt_storage_in_barcode_et.setSelection(result.length());
+        }
+    }
+
+    /**
+     * 展示扩展菜单
+     */
+    private void showMoreMenu() {
+        if (mMenuView == null) {
+            mMenuView = View.inflate(mActivity, R.layout.pop_jlt_storage_in_box_menu, null);
+        }
+        Button todoListBtn = (Button) mMenuView.findViewById(R.id.pop_jlt_storage_in_box_menu_1);
+        Button doneListInBtn = (Button) mMenuView.findViewById(R.id.pop_jlt_storage_in_box_menu_2);
+        Button revokeCollectBtn = (Button) mMenuView.findViewById(R.id.pop_jlt_storage_in_box_menu_3);
+        Button postBtn = (Button) mMenuView.findViewById(R.id.pop_jlt_storage_in_box_menu_4);
+
+        Button pop_material_in_menu_1 = (Button) mMenuView.findViewById(R.id.pop_material_in_menu_1);
+        Button pop_material_in_menu_5 = (Button) mMenuView.findViewById(R.id.pop_material_in_menu_5);
+        Button pop_material_in_menu_2 = (Button) mMenuView.findViewById(R.id.pop_material_in_menu_2);
+        Button pop_toadoptprompt = (Button) mMenuView.findViewById(R.id.pop_toadoptprompt);
+
+        postBtn.setVisibility(View.GONE);
+        todoListBtn.setVisibility(View.GONE);
+        revokeCollectBtn.setText("确认入库");
+        revokeCollectBtn.setVisibility(View.GONE);
+        pop_toadoptprompt.setOnClickListener(new View.OnClickListener() {//待采提示
+            @Override
+            public void onClick(View v) {
+                closeMenuPopupWindow();
+//                FragmentUtils.switchFragment(InventoryBindingFragment.this, ToadoptpromptFragment.newInstance(mPiid,mPiInoutno));
+            }
+        });
+
+        todoListBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closeMenuPopupWindow();
+//                JLTStorageInTodoListFragment jltStorageInTodoListFragment = new JLTStorageInTodoListFragment();
+//                Bundle bundle = new Bundle();
+//                bundle.putString("pi_id", mPiid);
+//                bundle.putString("pi_class", mPiClass);
+//                jltStorageInTodoListFragment.setArguments(bundle);
+//                FragmentUtils.switchFragment(InventoryBindingFragment.this, jltStorageInTodoListFragment);
+            }
+        });
+
+        doneListInBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closeMenuPopupWindow();
+//                JLTStorageInDoneListFragment jltStorageInDoneListFragment = new JLTStorageInDoneListFragment();
+//                Bundle bundle = new Bundle();
+//                bundle.putString("pi_id", mPiid);
+//                bundle.putString("pi_class", mPiClass);
+//                jltStorageInDoneListFragment.setArguments(bundle);
+//                FragmentUtils.switchFragment(InventoryBindingFragment.this, jltStorageInDoneListFragment);
+            }
+        });
+
+        revokeCollectBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closeMenuPopupWindow();
+                confirmStorageIn(false);
+            }
+        });
+
+        postBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closeMenuPopupWindow();
+                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();
+                                VollyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                                        .url(GloableParams.ADDRESS_PDAIO_CONFIRMPOST)
+                                        .method(Request.Method.POST)
+                                        .addParam("piid", mPiid)
+                                        .tag(TAG + "confirmpost")
+                                        .build(), 30 * 1000, new HttpCallback() {
+                                    @Override
+                                    public void onSuccess(int flag, Object o) throws Exception {
+                                        progressDialog.dismiss();
+                                        CommonUtil.toastNoRepeat(mActivity, "过账成功");
+                                        getActivity().getSupportFragmentManager().popBackStackImmediate();
+                                    }
+
+                                    @Override
+                                    public void onFail(int flag, String failStr) throws Exception {
+                                        progressDialog.dismiss();
+                                        CommonUtil.toastNoRepeat(mActivity, failStr);
+                                    }
+                                });
+                            }
+                        }).create().show();
+            }
+        });
+        //确认入库
+        pop_material_in_menu_1.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closeMenuPopupWindow();
+                confirmIn();
+            }
+        });
+        //已采集列表
+        pop_material_in_menu_5.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closeMenuPopupWindow();
+//                FragmentUtils.switchFragment(InventoryBindingFragment.this, StorageInBarDetailsCollectListFragment.newInstance(mPiid, pd_whcode,mPiClass));
+            }
+        });
+        //撤销入库
+        pop_material_in_menu_2.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closeMenuPopupWindow();
+                mBarcodeEditText.setOnFocusChangeListener(null);
+                jlt_storage_in_barcode_et.setOnFocusChangeListener(null);
+                ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
+//                ((FunctionActivity) getActivity()).setScanIvVisible(false);
+                Bundle bundle = new Bundle();
+                bundle.putString("pi_id", mPiid);
+                bundle.putString("pi_inoutno", mPiInoutno);
+                bundle.putString("pd_whcode", pd_whcode);
+                bundle.putString("whichpage", "materialin");
+                mFragment = new MaterialOutRevocationStockFragment();
+                mFragment.setArguments(bundle);
+                FragmentUtils.switchFragment(InventoryBindingFragment.this, mFragment);
+            }
+        });
+
+
+        if (mMenuPopupWindow == null) {
+            mMenuPopupWindow = new PopupWindow(mMenuView, LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
+        }
+        mMenuPopupWindow.setBackgroundDrawable(new BitmapDrawable());
+        mMenuPopupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                closeMenuPopupWindow();
+            }
+        });
+        CommonUtil.setBackgroundAlpha(mActivity, 0.5f);
+        mMenuPopupWindow.showAsDropDown(mMoreButton);
+    }
+    private void confirmIn() {
+        progressDialog.show();
+        String url = GloableParams.ADDRESS_INMATERIAL_CONFIRM_IN + "?pi_id=" + mPiid + "&whcode=" + pd_whcode;
+
+        PdaApplication.mRequestQueue.cancelAll(TAG + "confirmin");
+
+        mStringRequest = new StringRequest(Request.Method.GET, url,
+                new Response.Listener<String>() {
+                    @Override
+                    public void onResponse(String s) {
+                        progressDialog.dismiss();
+//                        mResultTextView.setVisibility(View.VISIBLE);
+                        try {
+                            org.json.JSONObject resultObject = new org.json.JSONObject(s);
+//                            mResultTextView.setText(resultObject.optString("data"));
+                        } catch (JSONException e) {
+                            e.printStackTrace();
+                        }
+                    }
+                },
+                new Response.ErrorListener() {
+                    @Override
+                    public void onErrorResponse(VolleyError volleyError) {
+                        progressDialog.dismiss();
+                        mResultTextView.setVisibility(View.VISIBLE);
+                        String errorToast = CommonUtil.showErrorToast(volleyError, true);
+                        mResultTextView.setText(errorToast);
+                    }
+                }) {
+            @Override
+            public Map<String, String> getHeaders() throws AuthFailureError {
+                return VolleyUtil.getVolleyUtil().setCookies();
+            }
+        };
+        mStringRequest.setRetryPolicy(new DefaultRetryPolicy(10 * 1000, 0, 1f));
+        mStringRequest.setTag(TAG + "confirmin");
+        PdaApplication.mRequestQueue.add(mStringRequest);
+    }
+    /**
+     * 确认入库
+     *
+     * @param forceNewBio
+     */
+    private void confirmStorageIn(boolean forceNewBio) {
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_RECEIVING_NEWBAOCODEIO)
+                .method(Request.Method.POST)
+                .tag(TAG + "newbarcodeio")
+                .flag(0)
+                .addParam("pi_id", mPiid)
+                .addParam("forceNewBio", Boolean.toString(forceNewBio))
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                try {
+                    String result = o.toString();
+                    JSONObject resultObject = JSON.parseObject(result);
+                    JSONObject dataObject = resultObject.getJSONObject("data");
+                    if (dataObject != null && FastjsonUtil.getBoolean(dataObject, "qtyCheck")) {
+                        new AlertDialog.Builder(mActivity)
+                                .setTitle("提示")
+                                .setMessage("存在采集数量与单据明细数量不一致,是否继续确认入库?")
+                                .setNegativeButton(R.string.cancel, null)
+                                .setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() {
+                                    @Override
+                                    public void onClick(DialogInterface dialog, int which) {
+                                        if (dialog != null) {
+                                            dialog.dismiss();
+                                        }
+                                        confirmStorageIn(true);
+                                    }
+                                }).show();
+                    } else {
+                        CommonUtil.toastNoRepeat(mActivity, "入库成功");
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+            }
+        });
+    }
+
+    private void closeMenuPopupWindow() {
+        if (mMenuPopupWindow != null) {
+            mMenuPopupWindow.dismiss();
+            mMenuPopupWindow = null;
+            CommonUtil.setBackgroundAlpha(mActivity, 1f);
+        }
+    }
+
+    @Override
+    public void onHiddenChanged(boolean hidden) {
+        super.onHiddenChanged(hidden);
+        if (hidden) {
+            ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
+        } else {
+            ((FunctionActivity) getActivity()).setTitle("库存条码绑定");
+//            ((FunctionActivity) getActivity()).setMoreBtnVisible(true);
+            mMoreButton.setOnClickListener(this);
+        }
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        return false;
+    }
+
+    @Override
+    public boolean onFragmentBackPressed() {
+        return false;
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
+    }
+
+    private class MyTextWatcher implements TextWatcher {
+        private TextView view;
+
+        public MyTextWatcher(TextView view) {
+            this.view = view;
+        }
+
+        @Override
+        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+
+        }
+
+        @Override
+        public void onTextChanged(CharSequence s, int start, int before, int count) {
+
+        }
+
+        @Override
+        public void afterTextChanged(Editable s) {
+            String text = s.toString().trim();
+            switch (view.getId()) {
+                case R.id.jlt_storage_in_barcode_model_et:
+                    mBarcodeParseBean.setPN(text);
+                    break;
+                case R.id.jlt_storage_in_barcode_quantity_et:
+                    try {
+                        double qty = Double.parseDouble(text);
+                        mBarcodeParseBean.setQTY(qty);
+                        String mpq = mMpqEditText.getText().toString().trim();
+                        try {
+                            if (!TextUtils.isEmpty(mpq)) {
+                                double mpqNum = Double.parseDouble(mpq);
+                                if (mpqNum <= 0) {
+                                    mPanEditText.setText("0");
+                                } else {
+                                    double pan = qty / mpqNum;
+                                    mPanEditText.setText(CommonUtil.doubleFormat(Math.ceil(pan)));
+                                }
+                            } else {
+                                mPanEditText.setText("0");
+                            }
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                            mPanEditText.setText("0");
+                        }
+                    } catch (Exception e) {
+                        mBarcodeParseBean.setQTY(0);
+                        mBarcodeParseBean.setPAN(0);
+                    }
+                    break;
+                case R.id.jlt_storage_in_barcode_mpq_et:
+                    mBarcodeParseBean.setMPQ(text);
+                    String qty = mQuantityEditText.getText().toString().trim();
+                    try {
+                        if (!TextUtils.isEmpty(qty)) {
+                            double qtyNum = Double.parseDouble(qty);
+                            double mpqNum = Double.parseDouble(text);
+                            if (mpqNum <= 0) {
+                                mPanEditText.setText("0");
+                            } else {
+                                double pan = qtyNum / mpqNum;
+                                mPanEditText.setText(CommonUtil.doubleFormat(Math.ceil(pan)));
+                            }
+                        } else {
+                            mPanEditText.setText("0");
+                        }
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                        mPanEditText.setText("0");
+                        mBarcodeParseBean.setPAN(0);
+                    }
+                    break;
+                case R.id.jlt_storage_in_barcode_date_et:
+                    mBarcodeParseBean.setDATECODE(text);
+                    break;
+                case R.id.jlt_storage_in_barcode_lot_et:
+                    mBarcodeParseBean.setLOTNO(text);
+                    break;
+                case R.id.jlt_storage_in_barcode_reel_et:
+                    try {
+                        int pan = Integer.parseInt(text);
+                        mBarcodeParseBean.setPAN(pan);
+                    } catch (Exception e) {
+                        mBarcodeParseBean.setPAN(0);
+                        e.printStackTrace();
+                    }
+                    break;
+                case R.id.jlt_storage_in_barcode_po_et:
+                    mBarcodeParseBean.setORDERCODE(text);
+                    break;
+                case R.id.jlt_storage_in_barcode_brand_et:
+                    mBarcodeParseBean.setBRAND(text);
+                    break;
+                case R.id.jlt_storage_in_barcode_enclosure_et:
+                    mBarcodeParseBean.setPR_PKG(text);
+                    break;
+            }
+        }
+    }
+//    private void getNeedList() {
+//        progressDialog.show();
+//
+//        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+//                .url(GloableParams.ADDRESS_JLT_RECEIVING_GETNEEDLIST)
+//                .method(Request.Method.GET)
+//                .tag(TAG + "getneedlist")
+//                .addParam("pi_ids", mPiid)
+//                .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);
+//                    JSONArray dataArray = resultObject.getJSONArray("data");
+//                    if (dataArray == null || dataArray.size() == 0) {
+//                        CommonUtil.toastNoRepeat(mActivity, "数据为空");
+//                        return;
+//                    }
+//
+//                    List<SecondaryListAdapter.SecondaryListBean<String, JLTStorageModelBean>> mSecondaryListBeen = new ArrayList<>();
+//                    for (int i = 0; i < dataArray.size(); i++) {
+//                        JSONObject dataObject = dataArray.getJSONObject(i);
+//                        if (dataObject != null) {
+//                            String inoutno = FastjsonUtil.getText(dataObject, "PB_INOUTNO");
+//
+//                            JSONArray modelArray = dataObject.getJSONArray("list");
+//                            List<JLTStorageModelBean> jltStorageModelBeans = new ArrayList<>();
+//                            if (modelArray != null && modelArray.size() > 0) {
+//                                for (int j = 0; j < modelArray.size(); j++) {
+//                                    JSONObject modelObject = modelArray.getJSONObject(j);
+//                                    if (modelObject != null) {
+//                                        JLTStorageModelBean jltStorageModelBean = new JLTStorageModelBean();
+//                                        jltStorageModelBean.setModel(FastjsonUtil.getText(modelObject, "ORISPECCODE"));
+//                                        jltStorageModelBean.setProdcode(FastjsonUtil.getText(modelObject,"PD_PRODCODE"));
+//                                        jltStorageModelBean.setQuantity(FastjsonUtil.getText(modelObject, "RESTQTY"));
+//                                        jltStorageModelBean.setDoneQty(FastjsonUtil.getText(modelObject, "PBQTY"));
+//                                        jltStorageModelBean.setPr_brand(FastjsonUtil.getText(modelObject, "PR_BRAND"));
+//                                        jltStorageModelBean.setPrcode(FastjsonUtil.getText(modelObject, "PRCODE"));
+//                                        jltStorageModelBeans.add(jltStorageModelBean);
+//                                    }
+//                                }
+//                            }
+//                            SecondaryListAdapter.SecondaryListBean<String, JLTStorageModelBean> secondaryListBean
+//                                    = new SecondaryListAdapter.SecondaryListBean<>(inoutno, jltStorageModelBeans);
+//
+//                            mSecondaryListBeen.add(secondaryListBean);
+//                        }
+//                    }
+//                    mStorageInTodoAdapter.setDatas(mSecondaryListBeen);
+//                    mRecyclerView.setAdapter(mStorageInTodoAdapter);
+//                } catch (Exception e) {
+//                    e.printStackTrace();
+//                }
+//            }
+//
+//            @Override
+//            public void onFail(int flag, String failStr) throws Exception {
+//                progressDialog.dismiss();
+//
+//                CommonUtil.toastNoRepeat(mActivity, failStr);
+//            }
+//        });
+//    }
+    public interface OnFinishListener {
+        void onFinish();
+    }
+
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+
+    }
+}

+ 40 - 2
app/src/main/java/com/uas/pda_smart_com/global/GloableParams.java

@@ -226,6 +226,14 @@ public class GloableParams {
     public static String ADDRESS_OUTMATERIAL_CHECKBOMBARCODE;
     public static String ADDRESS_OUTMATERIAL_GETPREMATERIALLIST;
 
+    public static String ADDRESS_INVENTORYBINDING;
+    public static String ADDRESS_INVENTORYBINDING2;
+    public static String ADDRESS_ADDRESSTAIL_PRINTSUMLABEL;
+    public static String ADDRESS_RECEIVING_NEWBAOCODEIO;
+    public static String ADDRESS_PDAIO_CONFIRMPOST;
+    public static String ADDRESS_RECEIVING_BARCODEPARSE2;
+    public static String ADDRESS_JLT_RECEIVING_BARCODEPARSE;
+
 
     //连接服务器请求地址
     private static final String ADDRESSTAIL_CONNECT_SERVER = "/api/pda/getAllMasters.action";
@@ -544,6 +552,21 @@ public class GloableParams {
     private static String ADDRESSTAIL_OUT_MATERIAL_SPECIAL_OUT_DEAL = "/api/pda/outMaterial/specialOutDeal.action";
     private static String ADDRESSTAIL_OUT_MATERIAL_SPECIAL_OUT_BREAK = "/api/pda/outMaterial/specialOutBreaking.action";
 
+
+    //库存条码绑定
+    private static final String ADDRESSTAIL_INVENTORYBINDING="/api/pda/receiving/stocksaveBarcode2Confirm.action";
+    private static final String ADDRESSTAIL_RECEIVING_INVENTORYBINDING2 = "/api/pda/receiving/stocksaveBarcode2.action";
+    private static final String ADDRESSTAIL_GET_PRINTSUMLABEL="/api/pda/outMaterial/printSumLabel.action";
+    //确认入库
+    private static final String ADDRESSTAIL_RECEIVING_NEWBAOCODEIO = "/api/pda/receiving/newBaocodeio.action";
+    //单据过账
+    private static final String ADDRESSTAIL_PDAIO_CONFIRMPOST = "/api/pdaio/pdaioIn/confirmPost.action";
+    //入库条码校验
+    private static final String ADDRESSTAIL_RECEIVING_BARCODEPARSE2 = "/api/pda/receiving/barcodeParse2.action";
+    //入库条码解析
+    private static final String ADDRESSTAIL_JLT_RECEIVING_BARCODEPARSE = "/api/pda/receiving/barcodeParse.action";
+
+
     /**
      * 完工品入库
      */
@@ -679,12 +702,15 @@ public class GloableParams {
     public static final String GRIDNAME_WORK_INVENTORY = "盘点作业";
     public static final String GRIDNAME_MODIFY_QUANTITY = "条码数量修改";
     public static final String GRIDNAME_BOM_CHECK = "BOM校验";
+    public static final String MENU_STORAGE_STOCK_INFO_COLLECT = "库存条码绑定";
     public static final String[] storageGridNames = {GRIDNAME_GOOD_SEARCH, GRIDNAME_BATCH_OPRATION,
-            GRIDNAME_STORAGE_TRANSFER, GRIDNAME_MODIFY_QUANTITY, GRIDNAME_WORK_INVENTORY, GRIDNAME_BOM_CHECK};
+            GRIDNAME_STORAGE_TRANSFER, GRIDNAME_MODIFY_QUANTITY, GRIDNAME_WORK_INVENTORY, GRIDNAME_BOM_CHECK,MENU_STORAGE_STOCK_INFO_COLLECT};
     public static final int[] storageGridImgs = {R.drawable.storage_good_search,
             R.drawable.storage_bach_operation, R.drawable.storage_transfer,
             R.drawable.storage_work_inventory,
-            R.drawable.ic_modify_quantity, R.drawable.storage_msd_manager};
+            R.drawable.ic_modify_quantity,
+            R.drawable.storage_msd_manager,
+            R.drawable.storage_transfer};
     //DETAIL:搜索备料单号,下拉列表
     public static final String SPINNER_PREPARE_SEARCH = "搜索备料单号";
     public static final String SPINNER_MAKECODE_SEARCH = "搜索制造单号";
@@ -996,5 +1022,17 @@ public class GloableParams {
         GloableParams.ADDRESS_BARSTOCK_GETPRODINOUTQTYSUM = uriHead + GloableParams.ADDRESSTAIL_BARSTOCK_GETPRODINOUTQTYSUM;
         GloableParams.ADDRESS_OUTMATERIAL_CHECKBOMBARCODE = uriHead + GloableParams.ADDRESSTAIL_OUTMATERIAL_CHECKBOMBARCODE;
         GloableParams.ADDRESS_OUTMATERIAL_GETPREMATERIALLIST = uriHead + GloableParams.ADDRESSTAIL_OUTMATERIAL_GETPREMATERIALLIST;
+
+
+        GloableParams.ADDRESS_INVENTORYBINDING= uriHead + GloableParams.ADDRESSTAIL_INVENTORYBINDING;
+        GloableParams.ADDRESS_INVENTORYBINDING2= uriHead + GloableParams.ADDRESSTAIL_RECEIVING_INVENTORYBINDING2;
+        GloableParams.ADDRESS_ADDRESSTAIL_PRINTSUMLABEL= uriHead + GloableParams.ADDRESSTAIL_GET_PRINTSUMLABEL;
+        GloableParams.ADDRESS_RECEIVING_NEWBAOCODEIO = uriHead + GloableParams.ADDRESSTAIL_RECEIVING_NEWBAOCODEIO;
+        GloableParams.ADDRESS_PDAIO_CONFIRMPOST = uriHead + GloableParams.ADDRESSTAIL_PDAIO_CONFIRMPOST;
+        GloableParams.ADDRESS_RECEIVING_BARCODEPARSE2 = uriHead + GloableParams.ADDRESSTAIL_RECEIVING_BARCODEPARSE2;
+        GloableParams.ADDRESS_JLT_RECEIVING_BARCODEPARSE = uriHead + GloableParams.ADDRESSTAIL_JLT_RECEIVING_BARCODEPARSE;
+
+
+
     }
 }

+ 11 - 0
app/src/main/java/com/uas/pda_smart_com/util/CommonUtil.java

@@ -133,6 +133,17 @@ public class CommonUtil {
         }
 
     }
+    /**
+     * 判断double是否是整数
+     *
+     * @param obj
+     * @return
+     */
+    public static boolean isIntegerForDouble(double obj) {
+        double eps = 1e-10;  // 精度范围
+        return obj - Math.floor(obj) < eps;
+    }
+
 
     /**
      * 获取输入框焦点

+ 8 - 0
app/src/main/java/com/uas/pda_smart_com/util/Constants.java

@@ -43,7 +43,12 @@ public interface Constants {
         //下载进度
         int DOWNLOAD_PROGRESS = 13;
     }
+    /**
+     *入库扫描Checked状态
+     */
+    String JLTSTORAGEINISCHCKED ="is_chcked";
 
+    /**
     /**
      * 正则表达式
      */
@@ -63,6 +68,9 @@ public interface Constants {
      * 应用缓存
      */
     interface FLAG {
+
+        //供应商有效天数
+        String JLT_VALID_DAYS_CACHE = "jlt_valid_days_cache";
         //ip地址列表缓存
         String CACHE_IP_HISTORY = "cache_ip_history";
 

+ 1 - 0
app/src/main/java/com/uas/pda_smart_com/util/PrintUtils.java

@@ -69,6 +69,7 @@ public class PrintUtils {
 //                                            .setTextAutLine("0","0",100,fontSize,false,false,printText)
                                             .setX(printX)
                                             .setY(printY + (int) ((0.6 * dpi) / 25.4))
+                                            .setBold(2)
                                             .setTextFont(textFont)
                                             .setTextSize(fontSize)
                                             .build();

+ 144 - 0
app/src/main/java/com/uas/pda_smart_com/util/VollyRequest.java

@@ -0,0 +1,144 @@
+package com.uas.pda_smart_com.util;
+
+import com.android.volley.AuthFailureError;
+import com.android.volley.DefaultRetryPolicy;
+import com.android.volley.Request;
+import com.android.volley.Response;
+import com.android.volley.VolleyError;
+import com.android.volley.toolbox.StringRequest;
+import com.uas.pda_smart_com.R;
+import com.uas.pda_smart_com.application.PdaApplication;
+import com.uas.pda_smart_com.tools.VolleyUtil;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author RaoMeng
+ * @describe
+ * @date 2018/4/27 11:26
+ */
+
+public class VollyRequest {
+    private static VollyRequest instance;
+
+    private VollyRequest() {
+
+    }
+
+    public static final VollyRequest getInstance() {
+        if (instance == null) {
+            synchronized (VollyRequest.class) {
+                if (instance == null) {
+                    return new VollyRequest();
+                }
+            }
+        }
+        return instance;
+    }
+
+    public void stringRequest(StringRequest stringRequest, final HttpParams httpParams, final HttpCallback httpCallback) {
+        stringRequest(stringRequest, httpParams, 10 * 1000, httpCallback);
+    }
+
+    public void stringRequest(final HttpParams httpParams, final HttpCallback httpCallback) {
+        stringRequest(null, httpParams, 10 * 1000, httpCallback);
+    }
+
+    public void stringRequest(final HttpParams httpParams, final int timeoutMs, final HttpCallback httpCallback) {
+        stringRequest(null, httpParams, timeoutMs, httpCallback);
+    }
+
+    public void stringRequest(StringRequest stringRequest, final HttpParams httpParams, final int timeoutMs, final HttpCallback httpCallback) {
+        if (httpParams == null) {
+            throw new IllegalArgumentException("httpParams can not be NULL");
+        }
+        if (httpCallback == null) {
+            throw new IllegalArgumentException("callback can not be NULL");
+        }
+        if (httpParams.getUrl() == null) {
+            throw new IllegalArgumentException("requestUrl can not be NULL");
+        }
+
+        if (!CommonUtil.isNetWorkConnected((PdaApplication.getmContext()))) {
+            try {
+                httpCallback.onFail(httpParams.getFlag(), PdaApplication.getmContext().getString(R.string.net_not_connect));
+                return;
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+
+        String url = httpParams.getUrl();
+        if (httpParams.getMethod() == Request.Method.GET && httpParams.getParams().size() > 0) {
+            Set<Map.Entry<String, String>> entries = httpParams.getParams().entrySet();
+
+            int index = 1;
+            for (Map.Entry<String, String> paramEntry : entries) {
+                if (index == 1) {
+                    try {
+                        url += "?" + paramEntry.getKey() + "=" + URLEncoder.encode(paramEntry.getValue(), "UTF-8");
+                    } catch (UnsupportedEncodingException e) {
+                        url += "?" + paramEntry.getKey() + "=" + paramEntry.getValue();
+                    }
+                } else {
+                    try {
+                        url += "&" + paramEntry.getKey() + "=" + URLEncoder.encode(paramEntry.getValue(), "UTF-8");
+                    } catch (UnsupportedEncodingException e) {
+                        url += "&" + paramEntry.getKey() + "=" + paramEntry.getValue();
+                    }
+                }
+                index++;
+            }
+        }
+
+        PdaApplication.mRequestQueue.cancelAll(httpParams.getTag());
+
+        stringRequest = new StringRequest(httpParams.getMethod(), url,
+                new Response.Listener<String>() {
+                    @Override
+                    public void onResponse(String s) {
+                        try {
+                            LogUtil.prinlnLongMsg("responseSucc", s);
+                            httpCallback.onSuccess(httpParams.getFlag(), s);
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }
+                },
+                new Response.ErrorListener() {
+                    @Override
+                    public void onErrorResponse(VolleyError volleyError) {
+                        String errorToast = CommonUtil.showErrorToast(volleyError, false);
+                        try {
+                            httpCallback.onFail(httpParams.getFlag(), errorToast);
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }
+                }) {
+            @Override
+            public Map<String, String> getHeaders() throws AuthFailureError {
+                if (httpParams.getHeaders().isEmpty()) {
+                    return VolleyUtil.getVolleyUtil().setCookies();
+                } else {
+                    return httpParams.getHeaders();
+                }
+            }
+
+            @Override
+            protected Map<String, String> getParams() throws AuthFailureError {
+                if (httpParams.getMethod() == Method.POST) {
+                    return httpParams.getParams();
+                }
+                return super.getParams();
+            }
+        };
+
+        stringRequest.setRetryPolicy(new DefaultRetryPolicy(timeoutMs, 0, 1f));
+        stringRequest.setTag(httpParams.getTag());
+        PdaApplication.mRequestQueue.add(stringRequest);
+    }
+}

+ 90 - 0
app/src/main/java/com/uas/pda_smart_com/view/business/CommonSelectPop.java

@@ -0,0 +1,90 @@
+package com.uas.pda_smart_com.view.business;
+
+import android.content.Context;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.View;
+import android.view.animation.Animation;
+import android.widget.TextView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.uas.pda_smart_com.R;
+import com.uas.pda_smart_com.adapter.CommonSelectAdapter;
+import com.uas.pda_smart_com.bean.BaseSelectEntity;
+import com.uas.pda_smart_com.view.RecyclerItemDecoration;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import razerdp.basepopup.BasePopupWindow;
+
+public class CommonSelectPop<T extends BaseSelectEntity> extends BasePopupWindow {
+    private Context mContext;
+    private RecyclerView mRecyclerView;
+    private TextView mTitleTextView;
+    private List<T> mDatas;
+    private CommonSelectAdapter mSelectAdapter;
+    private OnDataSelectListener mOnDataSelectListener;
+
+    public CommonSelectPop(Context context, String title) {
+        super(context);
+        this.mContext = context;
+        setAllowDismissWhenTouchOutside(false);
+
+        initViews(context, title);
+        initEvents();
+    }
+
+    public void setData(List<T> datas) {
+        if (mDatas != null && datas != null) {
+            mDatas.clear();
+            mDatas.addAll(datas);
+            mSelectAdapter.notifyDataSetChanged();
+        }
+    }
+
+    private void initEvents() {
+        mSelectAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+            @Override
+            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                if (mOnDataSelectListener != null) {
+                    mOnDataSelectListener.onDataSelect(position);
+                }
+            }
+        });
+    }
+
+    public void setOnDataSelectListener(OnDataSelectListener onDataSelectListener) {
+        mOnDataSelectListener = onDataSelectListener;
+    }
+
+    private void initViews(Context context, String title) {
+        mTitleTextView = findViewById(R.id.pop_common_select_title_tv);
+        mTitleTextView.setText(title);
+        mRecyclerView = findViewById(R.id.pop_common_select_data_rv);
+        mRecyclerView.setLayoutManager(new LinearLayoutManager(context));
+        mRecyclerView.addItemDecoration(new RecyclerItemDecoration(1));
+        mDatas = new ArrayList<>();
+        mSelectAdapter = new CommonSelectAdapter(mDatas);
+        mRecyclerView.setAdapter(mSelectAdapter);
+    }
+
+    @Override
+    public View onCreateContentView() {
+        return createPopupById(R.layout.pop_common_select);
+    }
+
+    @Override
+    protected Animation onCreateShowAnimation() {
+        return getDefaultScaleAnimation(true);
+    }
+
+    @Override
+    protected Animation onCreateDismissAnimation() {
+        return getDefaultScaleAnimation(false);
+    }
+
+    public interface OnDataSelectListener {
+        void onDataSelect(int position);
+    }
+}

+ 7 - 0
app/src/main/res/color/selector_radio_text_color.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="@color/white" android:state_selected="true"/>
+    <item android:color="@color/white" android:state_pressed="true"/>
+    <item android:color="@color/white" android:state_checked="true"/>
+    <item android:color="@color/caption_text_color"/>
+</selector>

+ 7 - 0
app/src/main/res/drawable/selector_radio_bg.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@drawable/shape_deep_blue_bg" android:state_selected="true" />
+    <item android:drawable="@drawable/shape_deep_blue_bg" android:state_pressed="true" />
+    <item android:drawable="@drawable/shape_deep_blue_bg" android:state_checked="true" />
+    <item android:drawable="@drawable/shape_gray_bg" />
+</selector>

+ 5 - 0
app/src/main/res/drawable/shape_deep_blue_bg.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+       android:shape="rectangle">
+    <solid android:color="#2D84C0"/>
+</shape>

+ 5 - 0
app/src/main/res/drawable/shape_gray_bg.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <solid android:color="#EFEFEF" />
+</shape>

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

@@ -0,0 +1,11 @@
+<?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.support.v7.widget.RecyclerView
+        android:id="@+id/item_jlt_search_whcode_rv"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content" />
+</LinearLayout>

+ 632 - 0
app/src/main/res/layout/fragment_inventory_binging.xml

@@ -0,0 +1,632 @@
+<?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"
+    android:padding="@dimen/root_layout_padding">
+
+    <LinearLayout
+
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+        <LinearLayout
+            android:id="@+id/linecheck_tv"
+            android:layout_weight="1"
+            android:orientation="horizontal"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent">
+            <TextView
+                android:gravity="center"
+                android:layout_gravity="center"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="单号:"
+                android:textColor="#333333" />
+
+            <TextView
+                android:gravity="center"
+                android:layout_gravity="center"
+                android:id="@+id/jlt_storage_in_barcode_box_tv"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:textColor="#333333"
+                tools:text="2138424923" />
+            <TextView
+                android:gravity="center"
+                android:layout_gravity="center"
+                android:id="@+id/jlt_storage_in_todo_list_tv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textColor="#333333"
+                tools:text="采购验收单" />
+        </LinearLayout>
+
+
+        <CheckBox
+            android:gravity="center"
+            android:layout_gravity="center"
+            android:id="@+id/jlt_check_ok"
+            android:text="采集唯一码"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+        </CheckBox>
+
+    </LinearLayout>
+
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="6dp"
+        android:background="@drawable/bg_line_edittext">
+
+<!--        <com.uas.uas_mes_standard.view.ClearableEditText-->
+<!--            android:id="@+id/jlt_storage_in_barcode_barcode_et"-->
+<!--            style="@style/EditTextStyle"-->
+<!--            android:layout_weight="1"-->
+<!--            android:background="@null"-->
+<!--            android:focusable="true"-->
+<!--            android:selectAllOnFocus="true"-->
+<!--            android:hint="请采集条码号/二维码"-->
+<!--            android:imeOptions="actionSend"-->
+<!--            android:textColor="@color/black" />-->
+        <com.uas.pda_smart_com.view.ClearableEditText
+            android:id="@+id/jlt_storage_in_barcode_barcode_et"
+            style="@style/EditTextStyle"
+            android:layout_weight="1"
+            android:background="@null"
+            android:focusable="true"
+            android:focusableInTouchMode="true"
+            android:hint="请采集条码"
+            android:imeOptions="actionSend"
+            android:textColor="@color/black" />
+
+        <ImageView
+            android:id="@+id/jlt_storage_in_barcode_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>
+
+    <ScrollView
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="6dp"
+            android:orientation="vertical">
+
+            <LinearLayout
+                android:visibility="gone"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="4dp">
+
+                <TextView
+                    style="@style/tl_tv_style"
+                    android:layout_height="match_parent"
+                    android:gravity="center"
+                    android:minWidth="60dp"
+                    android:text="品牌"
+                    android:textColor="@color/body_text_1"
+                    android:textSize="16sp" />
+
+                <com.uas.pda_smart_com.view.ClearableEditText
+                    android:id="@+id/jlt_storage_in_barcode_model_et"
+                    style="@style/EditTextStyle"
+                    android:layout_width="0dp"
+                    android:layout_weight="1"
+                    android:hint="请采集品牌" />
+
+                <ImageView
+                    android:visibility="gone"
+                    android:id="@+id/jlt_storage_in_barcode_model_scan_iv"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:layout_gravity="center"
+                    android:background="@color/white"
+                    android:clickable="false"
+                    android:paddingRight="10dp"
+                    android:src="@drawable/ic_edittext_scan" />
+            </LinearLayout>
+
+
+
+
+
+            <LinearLayout
+                android:visibility="gone"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="4dp">
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1">
+
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:minWidth="60dp"
+                        android:text="数量"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+
+                    <com.uas.pda_smart_com.view.ClearableEditText
+                        android:id="@+id/jlt_storage_in_barcode_quantity_et"
+                        style="@style/EditTextStyle"
+                        android:layout_width="0dp"
+                        android:layout_weight="1"
+                        android:inputType="numberDecimal" />
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1">
+
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:minWidth="60dp"
+                        android:text="MPQ"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+
+                    <com.uas.pda_smart_com.view.ClearableEditText
+                        android:id="@+id/jlt_storage_in_barcode_mpq_et"
+                        style="@style/EditTextStyle"
+                        android:layout_width="0dp"
+                        android:layout_weight="1"
+                        android:inputType="numberDecimal" />
+                </LinearLayout>
+            </LinearLayout>
+
+            <LinearLayout
+                android:visibility="gone"
+                android:id="@+id/material_in_collect_datecode_tr"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="4dp">
+
+                <TextView
+                    android:id="@+id/material_in_collect_datecode_tv"
+                    style="@style/tl_tv_style"
+                    android:layout_height="match_parent"
+                    android:gravity="center"
+                    android:minWidth="60dp"
+                    android:text="日期"
+                    android:textColor="@color/body_text_1"
+                    android:textSize="16sp" />
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:background="@color/white">
+
+                    <com.uas.pda_smart_com.view.ClearableEditText
+                        android:id="@+id/jlt_storage_in_barcode_date_et"
+                        style="@style/EditTextStyle"
+                        android:layout_width="236dp"
+                        android:layout_weight="1"
+                        android:enabled="true"
+                        android:focusable="true"
+                        android:focusableInTouchMode="true"
+                        android:hint="请选择日期"
+                        android:longClickable="true"
+                        android:textColor="@color/black" />
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:visibility="gone"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="4dp">
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1">
+
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:minWidth="60dp"
+                        android:text="品牌"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+
+                    <com.uas.pda_smart_com.view.ClearableEditText
+                        android:id="@+id/jlt_storage_in_barcode_brand_et"
+                        style="@style/EditTextUnableStyle"
+                        android:layout_width="0dp"
+                        android:layout_weight="1" />
+                </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1">
+
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:minWidth="60dp"
+                        android:text="盘"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+
+                    <TextView
+                        android:id="@+id/jlt_storage_in_barcode_reel_et"
+                        style="@style/EditTextUnableStyle"
+                        android:layout_width="0dp"
+                        android:layout_weight="1"
+                        android:inputType="numberDecimal" />
+                </LinearLayout>
+            </LinearLayout>
+
+
+            <LinearLayout
+                android:visibility="gone"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="4dp">
+
+                <CheckBox
+                    android:id="@+id/jlt_storage_in_barcode_po_cb"
+                    style="@style/tl_tv_style"
+                    android:layout_height="match_parent"
+                    android:layout_marginLeft="6dp"
+                    android:checked="false"
+                    android:gravity="center"
+                    android:paddingRight="10dp"
+                    android:text="PO"
+                    android:textColor="@color/body_text_1"
+                    android:textSize="16sp" />
+
+                <com.uas.pda_smart_com.view.ClearableEditText
+                    android:id="@+id/jlt_storage_in_barcode_po_et"
+                    style="@style/EditTextStyle"
+                    android:layout_width="0dp"
+                    android:layout_weight="1"
+                    android:hint="请采集PO号" />
+            </LinearLayout>
+
+
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="4dp"
+                android:visibility="gone">
+
+                <TextView
+                    style="@style/tl_tv_style"
+                    android:layout_height="match_parent"
+                    android:gravity="center"
+                    android:minWidth="60dp"
+                    android:text="封装"
+                    android:textColor="@color/body_text_1"
+                    android:textSize="16sp" />
+
+                <com.uas.pda_smart_com.view.ClearableEditText
+                    android:id="@+id/jlt_storage_in_barcode_enclosure_et"
+                    style="@style/EditTextUnableStyle"
+                    android:layout_width="0dp"
+                    android:layout_weight="1" />
+
+                <ImageView
+                    android:id="@+id/jlt_storage_in_barcode_enclosure_filter_iv"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:background="#ececec"
+                    android:padding="10dp"
+                    android:src="@drawable/icon_search" />
+            </LinearLayout>
+
+            <RadioGroup
+                android:visibility="gone"
+                android:id="@+id/jlt_pick_material_out_scan_menu_rg"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:paddingTop="6dp"
+                android:paddingBottom="6dp">
+
+                <RadioButton
+                    android:id="@+id/jlt_pick_material_out_scan_info_rb"
+                    android:layout_width="0dp"
+                    android:layout_height="30dp"
+                    android:layout_weight="1"
+                    android:background="@drawable/selector_radio_bg"
+                    android:button="@null"
+                    android:gravity="center"
+                    android:text="采集信息"
+                    android:textColor="@color/selector_radio_text_color" />
+
+                <RadioButton
+                    android:id="@+id/jlt_pick_material_out_scan_sign_rb"
+                    android:layout_width="0dp"
+                    android:layout_height="30dp"
+                    android:layout_weight="1"
+                    android:background="@drawable/selector_radio_bg"
+                    android:button="@null"
+                    android:checked="true"
+                    android:gravity="center"
+                    android:text="待采提示"
+                    android:textColor="@color/selector_radio_text_color" />
+            </RadioGroup>
+            <android.support.v7.widget.RecyclerView
+                android:visibility="gone"
+                android:id="@+id/jlt_storage_in_todo_list_rv"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content" />
+            <LinearLayout
+                android:id="@+id/jlt_line_edit"
+                android:orientation="vertical"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent">
+
+                <LinearLayout
+                    android:id="@+id/jlt_storage_in_barcode_line"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="4dp">
+
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:minWidth="60dp"
+                        android:text="条码号"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+
+                    <com.uas.pda_smart_com.view.ClearableEditText
+                        android:id="@+id/jlt_storage_in_barcode_et"
+                        style="@style/EditTextStyle"
+                        android:layout_width="0dp"
+                        android:layout_weight="1"
+                        android:lines="1"
+                        android:hint="请采集条码号" />
+
+                    <ImageView
+                        android:visibility="gone"
+                        android:id="@+id/jlt_storage_in_barcode_iv"
+                        android:layout_width="wrap_content"
+                        android:layout_height="match_parent"
+                        android:layout_gravity="center"
+                        android:background="@color/white"
+                        android:clickable="false"
+                        android:paddingRight="10dp"
+                        android:src="@drawable/ic_edittext_scan" />
+                </LinearLayout>
+                <LinearLayout
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:minWidth="60dp"
+                        android:text="数量"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+
+                    <com.uas.pda_smart_com.view.ClearableEditText
+                        android:id="@+id/jlt_edit_QTY"
+                        style="@style/jltEditTextStyle"
+                        android:layout_width="0dp"
+                        android:layout_weight="1"
+                        android:lines="1"
+                        android:hint="请输入数量" />
+
+                </LinearLayout>
+                <LinearLayout
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:minWidth="60dp"
+                        android:text="仓库"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+
+                    <com.uas.pda_smart_com.view.ClearableEditText
+                        android:id="@+id/jlt_edit_warehouse"
+                        style="@style/jltEditTextStyle"
+                        android:layout_width="0dp"
+                        android:layout_weight="1"
+                        android:lines="1"
+                        android:hint="请输入仓库名" />
+
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="4dp">
+
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:minWidth="60dp"
+                        android:text="仓位"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+
+                    <com.uas.pda_smart_com.view.ClearableEditText
+                        android:id="@+id/jlt_storage_in_barcode_lot_et"
+                        style="@style/jltEditTextStyle"
+                        android:layout_width="0dp"
+                        android:layout_weight="1"
+                        android:lines="1"
+                        android:hint="请采集仓位" />
+                    <CheckBox
+                        android:id="@+id/check_box_positions"
+                        android:layout_gravity="center"
+                        android:gravity="center"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"/>
+                </LinearLayout>
+                <LinearLayout
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:minWidth="60dp"
+                        android:text="LotNo"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+
+                    <com.uas.pda_smart_com.view.ClearableEditText
+                        android:id="@+id/jlt_edit_lotno"
+                        style="@style/jltEditTextStyle"
+                        android:layout_width="0dp"
+                        android:layout_weight="1"
+                        android:lines="1"
+                        android:hint="请输入LotNo" />
+                    <CheckBox
+                        android:id="@+id/check_box_lono"
+                        android:layout_gravity="center"
+                        android:gravity="center"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"/>
+                </LinearLayout>
+                <LinearLayout
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:minWidth="60dp"
+                        android:text="DC(日期)"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+
+                    <com.uas.pda_smart_com.view.ClearableEditText
+                        android:id="@+id/jlt_edit_dataecode"
+                        style="@style/jltEditTextStyle"
+                        android:layout_width="0dp"
+                        android:layout_weight="1"
+                        android:lines="1"
+                        android:hint="请输入日期" />
+                    <ImageView
+                        android:id="@+id/jlt_storage_in_barcode_date_iv"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center"
+                        android:layout_marginRight="10dp"
+                        android:background="@drawable/bg_edittext"
+                        android:clickable="false"
+                        android:src="@drawable/ic_calendar" />
+                    <CheckBox
+                        android:id="@+id/check_box_date"
+                        android:layout_gravity="center"
+                        android:gravity="center"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"/>
+
+                </LinearLayout>
+                <LinearLayout
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:minWidth="60dp"
+                        android:text="DC(字符)"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+
+                    <com.uas.pda_smart_com.view.ClearableEditText
+                        android:id="@+id/jlt_edit_DC"
+                        style="@style/jltEditTextStyle"
+                        android:layout_width="0dp"
+                        android:layout_weight="1"
+                        android:lines="1"
+                        android:hint="请输入字符" />
+                    <CheckBox
+                        android:id="@+id/check_box_dc"
+                        android:layout_gravity="center"
+                        android:gravity="center"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"/>
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+
+
+        </LinearLayout>
+
+
+
+
+    </ScrollView>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+        <Button
+            android:id="@+id/jlt_storage_in_barcode_next_btn"
+            style="@style/ButtonStyle"
+            android:layout_width="0dp"
+            android:layout_margin="12dp"
+            android:layout_weight="1"
+            android:text="保存并下一箱"
+            android:visibility="gone" />
+
+
+        <Button
+            android:id="@+id/jlt_storage_in_barcode_save_btn"
+            style="@style/ButtonStyle"
+            android:layout_width="0dp"
+            android:layout_margin="12dp"
+            android:layout_weight="1"
+            android:text="保存"
+            />
+
+    </LinearLayout>
+    <TextView
+        android:id="@+id/material_in_collect_result_tv"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="@dimen/spacing_big"
+        android:background="@drawable/shape_msg_block"
+        android:padding="10dp"
+        android:visibility="gone"
+        tools:visibility="visible"
+        tools:text="采集成功,条码:786528238;数量:2;料号:209837;名称规格:瓶子" />
+</LinearLayout>

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

@@ -106,6 +106,7 @@
             android:padding="8dp"
             android:text="合并备料 >>"
             android:textColor="@color/white"
-            android:textSize="16sp" />
+            android:textSize="16sp"
+            android:visibility="gone"/>
     </RelativeLayout>
 </LinearLayout>

+ 18 - 0
app/src/main/res/layout/item_common_select.xml

@@ -0,0 +1,18 @@
+<?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:background="@drawable/selector_pop_item_bg"
+    android:padding="6dp">
+
+    <TextView
+        android:id="@+id/item_common_select_tv"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center"
+        android:textColor="#333333"
+        android:textSize="15sp"
+        tools:text="content" />
+</LinearLayout>

+ 33 - 0
app/src/main/res/layout/item_jlt_storage_in_todo_group.xml

@@ -0,0 +1,33 @@
+<?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:gravity="center_vertical"
+    android:orientation="horizontal"
+    android:padding="6dp"
+    android:background="#dcdcdc">
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="单号:"
+        android:textColor="@color/black"
+        android:textSize="16sp" />
+
+    <TextView
+        android:id="@+id/item_jlt_storage_in_todo_group_num_tv"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:textColor="#333333"
+        android:textSize="16sp"
+        tools:text="SD21934724783" />
+    
+    <ImageView
+        android:id="@+id/item_jlt_storage_in_todo_group_iv"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="10dp"
+        android:src="@drawable/ic_menu_retract" />
+</LinearLayout>

+ 90 - 0
app/src/main/res/layout/item_jlt_storage_in_todo_subnew.xml

@@ -0,0 +1,90 @@
+<?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="6dp">
+
+    <LinearLayout
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <TextView
+            android:id="@+id/item_jlt_storage_in_todo_sub_model_tv"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:textColor="@color/black"
+            tools:text="20342409808"
+            android:paddingRight="@dimen/dp_10"/>
+        <LinearLayout
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="品牌: "
+                android:textColor="#333333" />
+
+            <TextView
+                android:id="@+id/item_jlt_storage_in_todo_sub_brand_tv"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:textColor="#666666"
+                tools:text="AB" />
+        </LinearLayout>
+
+
+    </LinearLayout>
+    <LinearLayout
+        android:layout_marginTop="5dp"
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+        <LinearLayout
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="待采数: "
+                android:textColor="#333333" />
+
+            <TextView
+                android:id="@+id/item_jlt_storage_in_todo_sub_quantity_tv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textColor="#666666"
+                tools:text="10" />
+
+        </LinearLayout>
+        <LinearLayout
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="已采数: "
+                android:textColor="#333333" />
+
+            <TextView
+                android:id="@+id/item_jlt_storage_in_todo_sub_done_tv"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:textColor="#666666"
+                tools:text="10" />
+
+        </LinearLayout>
+
+    </LinearLayout>
+
+
+
+</LinearLayout>

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

@@ -0,0 +1,30 @@
+<?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:layout_gravity="center"
+    android:background="@drawable/shape_msg_block"
+    android:orientation="vertical"
+    android:padding="10dp">
+
+    <TextView
+        android:id="@+id/pop_common_select_title_tv"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center"
+        android:paddingVertical="6dp"
+        android:text="MPQ选择"
+        android:textSize="16sp"
+        android:textStyle="bold" />
+
+    <View
+        style="@style/view_gray_line"
+        android:layout_height="2dp"
+        android:layout_marginTop="5dp" />
+
+    <android.support.v7.widget.RecyclerView
+        android:id="@+id/pop_common_select_data_rv"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content" />
+</LinearLayout>

+ 101 - 0
app/src/main/res/layout/pop_jlt_storage_in_box_menu.xml

@@ -0,0 +1,101 @@
+<?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_jlt_storage_in_box_menu_1"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:background="@color/transparent"
+        android:text="待采集"
+        android:textSize="@dimen/app_text_size_body_2" />
+
+    <Button
+        android:visibility="gone"
+        android:id="@+id/pop_jlt_storage_in_box_menu_2"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:background="@color/transparent"
+        android:text="已采集"
+        android:textSize="@dimen/app_text_size_body_2" />
+
+    <Button
+        android:id="@+id/pop_jlt_storage_in_box_menu_3"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:background="@color/transparent"
+        android:text="撤销采集箱"
+        android:textSize="@dimen/app_text_size_body_2" />
+
+    <Button
+        android:id="@+id/pop_jlt_storage_in_box_menu_4"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:background="@color/transparent"
+        android:text="单据过账"
+        android:textSize="@dimen/app_text_size_body_2"
+         />
+    <Button
+        android:id="@+id/pop_material_in_menu_1"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:background="@color/transparent"
+        android:text="确认入库"
+        android:textSize="@dimen/app_text_size_body_2" />
+
+    <Button
+        android:id="@+id/pop_material_in_menu_5"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:background="@color/transparent"
+        android:text="已采集列表"
+        android:textSize="@dimen/app_text_size_body_2" />
+
+    <Button
+        android:visibility="gone"
+        android:id="@+id/pop_material_in_menu_2"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:background="@color/transparent"
+        android:text="撤销入库"
+        android:textSize="@dimen/app_text_size_body_2" />
+    <Button
+        android:id="@+id/pop_toadoptprompt"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:background="@color/transparent"
+        android:text="采集数据汇总"
+        android:textSize="@dimen/app_text_size_body_2" />
+
+    <Button
+        android:id="@+id/pop_material_in_menu_back"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:background="@color/transparent"
+        android:text="撤销入库"
+        android:textSize="@dimen/app_text_size_body_2" />
+
+
+</LinearLayout>

+ 7 - 0
app/src/main/res/layout/selector_radio_bg.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@drawable/shape_deep_blue_bg" android:state_selected="true" />
+    <item android:drawable="@drawable/shape_deep_blue_bg" android:state_pressed="true" />
+    <item android:drawable="@drawable/shape_deep_blue_bg" android:state_checked="true" />
+    <item android:drawable="@drawable/shape_gray_bg" />
+</selector>

+ 1 - 1
app/src/main/res/values/color.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-
+    <color name="caption_text_color">#666666</color>
     <color name="search_gray">#dedbdb</color>
     <color name="bg_loading">#66000000</color>
     <color name="bg_content">#F9F9FB</color>

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

@@ -761,4 +761,26 @@
         <item name="android:background">@color/transparent</item>
         <item name="android:textSize">@dimen/app_text_size_body_2</item>
     </style>
+    <style name="EditTextUnableStyle" parent="EditTextStyle">
+        <item name="android:enabled">false</item>
+        <item name="android:background">#ececec</item>
+        <item name="android:textColor">@color/black</item>
+    </style>
+
+    <style name="jltEditTextStyle">
+        <item name="android:background">@drawable/bg_edittext</item>
+        <item name="android:gravity">left|center</item>
+        <item name="android:paddingRight">12dp</item>
+        <item name="android:paddingLeft">12dp</item>
+        <item name="android:textColorHint">@color/gray_light</item>
+        <item name="android:minHeight">40dp</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:textSize">14sp</item>
+        <item name="android:textColor">@color/text_normal</item>
+        <item name="android:maxLines">4</item>
+        <!--        <item name="android:singleLine">true</item>-->
+        <item name="android:imeOptions">flagNoExtractUi</item>
+    </style>
+
 </resources>

+ 2 - 2
build.gradle

@@ -43,8 +43,8 @@ ext {
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 21,
-            versionName      : "v2.1"
+            versionCode      : 22,
+            versionName      : "v2.2"
     ]
 
     depsVersion = [