Selaa lähdekoodia

华研WMS仓库项目取消一键取消备货按钮, 增加一键取消采集功能,增加物料放大镜分页功能

songw 1 vuosi sitten
vanhempi
commit
ac7f9e1600

+ 56 - 0
app/src/main/java/com/uas/hy_electronic/bean/ItemNumberBean.java

@@ -0,0 +1,56 @@
+package com.uas.hy_electronic.bean;
+
+public class ItemNumberBean {
+    /**
+     * PR_CODE : 01.EP0.T95302B001A     物料编号,
+     * PR_DETAIL : 测试5      名称
+     * PR_SPEC : 测试5    规格
+     * RN : 1
+     */
+
+    private String PR_CODE;
+    private String PR_DETAIL;
+    private String PR_SPEC;
+    private int RN;
+    private boolean isSelect;   //是否选中
+
+    public String getPR_CODE() {
+        return PR_CODE;
+    }
+
+    public void setPR_CODE(String PR_CODE) {
+        this.PR_CODE = PR_CODE;
+    }
+
+    public String getPR_DETAIL() {
+        return PR_DETAIL;
+    }
+
+    public void setPR_DETAIL(String PR_DETAIL) {
+        this.PR_DETAIL = PR_DETAIL;
+    }
+
+    public String getPR_SPEC() {
+        return PR_SPEC;
+    }
+
+    public void setPR_SPEC(String PR_SPEC) {
+        this.PR_SPEC = PR_SPEC;
+    }
+
+    public int getRN() {
+        return RN;
+    }
+
+    public void setRN(int RN) {
+        this.RN = RN;
+    }
+
+    public boolean isSelect() {
+        return isSelect;
+    }
+
+    public void setSelect(boolean select) {
+        isSelect = select;
+    }
+}

+ 0 - 2
app/src/main/java/com/uas/hy_electronic/fragment/IOCOutMakeMaterialOper.java

@@ -113,8 +113,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
     private static final int SPLIT_BARCODE_FAIL = 105;
     private static final int FLAG_CONFIRM_POST = 0x05;
 
-
-
     private ImageView mScanImageView;
 
     private JsonObjectRequest jsonRequest;

+ 1 - 1
app/src/main/java/com/uas/hy_electronic/fragment/MaterialOutRevocationStockFragment.java

@@ -82,7 +82,7 @@ public class MaterialOutRevocationStockFragment extends BaseFragment {
 
     @Override
     protected void initViews() {
-        ((FunctionActivity) getActivity()).setListIconIvVisible(true);
+        ((FunctionActivity) getActivity()).setListIconIvVisible(false);
         mInoutnoTextView = (TextView) root.findViewById(R.id.material_out_revocation_stock_inoutno);
         mWhcodeTextView = (TextView) root.findViewById(R.id.material_out_revocation_stock_whcode);
         mTypeTextView = (TextView) root.findViewById(R.id.material_out_revocation_stock_type);

+ 116 - 24
app/src/main/java/com/uas/hy_electronic/fragment/StorageInBarDetailsCollectListFragment.java

@@ -1,6 +1,7 @@
 package com.uas.hy_electronic.fragment;
 
 import android.content.DialogInterface;
+import android.graphics.drawable.BitmapDrawable;
 import android.os.Bundle;
 import android.support.v7.app.AlertDialog;
 import android.support.v7.widget.LinearLayoutManager;
@@ -8,7 +9,9 @@ import android.support.v7.widget.RecyclerView;
 import android.text.TextUtils;
 import android.view.KeyEvent;
 import android.view.View;
+import android.widget.Button;
 import android.widget.LinearLayout;
+import android.widget.PopupWindow;
 import android.widget.TextView;
 
 import com.alibaba.fastjson.JSON;
@@ -20,6 +23,7 @@ import com.scwang.smartrefresh.layout.api.RefreshLayout;
 import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener;
 import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
 import com.uas.hy_electronic.R;
+import com.uas.hy_electronic.activity.FunctionActivity;
 import com.uas.hy_electronic.adapter.StorageInCollectAdapter;
 import com.uas.hy_electronic.bean.StockAlreadyItemBean;
 import com.uas.hy_electronic.global.GloableParams;
@@ -28,9 +32,11 @@ import com.uas.hy_electronic.tools.SharedPreUtil;
 import com.uas.hy_electronic.util.CommonUtil;
 import com.uas.hy_electronic.util.Constants;
 import com.uas.hy_electronic.util.FastjsonUtil;
+import com.uas.hy_electronic.util.FragmentUtils;
 import com.uas.hy_electronic.util.HttpCallback;
 import com.uas.hy_electronic.util.HttpParams;
 import com.uas.hy_electronic.util.VolleyRequest;
+import com.uas.hy_electronic.util.VollyRequest;
 import com.uas.hy_electronic.view.ClearableEditText;
 import com.uas.hy_electronic.view.RecyclerItemDecoration;
 
@@ -52,13 +58,16 @@ public class StorageInBarDetailsCollectListFragment extends BaseFragment {
     private int mPageSize = 20, mPageIndex = 1;
     private String mPiid, mWhcode, mPiClass;
     private String mRevokeType;
+    private Button btn_actionbar_more;
+    private View mMenuView;
+    private PopupWindow mMenuPopupWindow;
 
-    public static StorageInBarDetailsCollectListFragment newInstance(String piid, String whcode,String mPiClass) {
+    public static StorageInBarDetailsCollectListFragment newInstance(String piid, String whcode, String mPiClass) {
 
         Bundle args = new Bundle();
         args.putString("id", piid);
         args.putString("whcode", whcode);
-        args.putString("mPiClass",mPiClass);
+        args.putString("mPiClass", mPiClass);
         StorageInBarDetailsCollectListFragment fragment = new StorageInBarDetailsCollectListFragment();
         fragment.setArguments(args);
         return fragment;
@@ -73,10 +82,15 @@ public class StorageInBarDetailsCollectListFragment extends BaseFragment {
     protected void initViews() {
         setTitle("已采集列表");
 
+        ((FunctionActivity) getActivity()).setMoreBtnVisible(true);
+
+        btn_actionbar_more = getActivity().findViewById(R.id.btn_actionbar_more);
+
         mDeleteEditText = root.findViewById(R.id.storage_in_colect_delete_et);
         mDeleteTextView = root.findViewById(R.id.storage_in_colect_delete_btn);
         mRefreshLayout = root.findViewById(R.id.storage_in_colect_list_srl);
         mRefreshLayout.setEnableAutoLoadMore(false);
+
         mDeleteLayout = root.findViewById(R.id.storage_in_colect_delete_ll);
         if (CommonUtil.isGoldenMaster(mActivity)) {
             mDeleteLayout.setVisibility(View.VISIBLE);
@@ -103,10 +117,19 @@ public class StorageInBarDetailsCollectListFragment extends BaseFragment {
                 mTypeTextView.setText("箱号");
             }
         }
+
+        //     getLongDelete(itemBean.getBI_ID());
     }
 
     @Override
     protected void initEvents() {
+        btn_actionbar_more.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                showMoreMenu();
+            }
+        });
+
         mRefreshLayout.setOnRefreshListener(new OnRefreshListener() {
             @Override
             public void onRefresh(RefreshLayout refreshLayout) {
@@ -135,24 +158,23 @@ public class StorageInBarDetailsCollectListFragment extends BaseFragment {
             }
         });
 
-
-            mCollectAdapter.setOnItemLongClickListener(new BaseQuickAdapter.OnItemLongClickListener() {
-                @Override
-                public boolean onItemLongClick(BaseQuickAdapter adapter, View view, int position) {
-                    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) {
-                                    StockAlreadyItemBean itemBean = mCollectList.get(position);
-                                    getLongDelete(itemBean.getBI_ID());
-                                }
-                            }).show();
-                    return true;
-                }
-            });
+        mCollectAdapter.setOnItemLongClickListener(new BaseQuickAdapter.OnItemLongClickListener() {
+            @Override
+            public boolean onItemLongClick(BaseQuickAdapter adapter, View view, int position) {
+                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) {
+                                StockAlreadyItemBean itemBean = mCollectList.get(position);
+                                getLongDelete(itemBean.getBI_ID());
+                            }
+                        }).show();
+                return true;
+            }
+        });
 
         CommonUtil.setEditorActionListener(mDeleteEditText, new MyEditorActionListener() {
             @Override
@@ -170,6 +192,64 @@ public class StorageInBarDetailsCollectListFragment extends BaseFragment {
         });
     }
 
+    private void showMoreMenu() {
+        if (mMenuView == null) {
+            mMenuView = View.inflate(mActivity, R.layout.pop_one_click_cancellation, null);
+        }
+        Button bt_one_cance_collection = (Button) mMenuView.findViewById(R.id.bt_one_cance_collection);
+        bt_one_cance_collection.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closeMenuPopupWindow();
+                getOneCanceCollection();
+            }
+        });
+
+        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(btn_actionbar_more);
+    }
+
+    private void getOneCanceCollection() {
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_PDAIO_GET_lOGINDELETE)
+                .method(Request.Method.POST)
+                .tag(TAG + "submitlist")
+                .flag(0)
+                .addParam("pi_id", mPiid)
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                getCollectList(mPageIndex, mPageSize);
+            }
+
+            @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);
+        }
+    }
+
     private void deleteBarcode(String text, boolean isBarcode) {
         if (!TextUtils.isEmpty(text)) {
             progressDialog.show();
@@ -285,8 +365,8 @@ public class StorageInBarDetailsCollectListFragment extends BaseFragment {
                                 collectEntity.setBI_LOCATION(FastjsonUtil.getText(dataObject, "BI_LOCATION"));
                                 collectEntity.setBI_BATCHCODE(FastjsonUtil.getText(dataObject, "BI_BATCHCODE"));
                                 collectEntity.setBI_PDAGET(FastjsonUtil.getInt(dataObject, "BI_PDAGET"));
-                                collectEntity.setPR_ORISPECCODE(FastjsonUtil.getText(dataObject,"PR_ORISPECCODE"));
-                                collectEntity.setBI_ID(FastjsonUtil.getText(dataObject,"BI_ID"));
+                                collectEntity.setPR_ORISPECCODE(FastjsonUtil.getText(dataObject, "PR_ORISPECCODE"));
+                                collectEntity.setBI_ID(FastjsonUtil.getText(dataObject, "BI_ID"));
                                 mCollectList.add(collectEntity);
                             }
                         }
@@ -314,6 +394,7 @@ public class StorageInBarDetailsCollectListFragment extends BaseFragment {
             }
         });
     }
+
     //长按删除
     private void getLongDelete(String biids) {
         progressDialog.show();
@@ -328,8 +409,8 @@ public class StorageInBarDetailsCollectListFragment extends BaseFragment {
                 .build(), new HttpCallback() {
             @Override
             public void onSuccess(int flag, Object o) throws Exception {
-                    progressDialog.dismiss();
-                    getCollectList(mPageIndex, mPageSize);
+                progressDialog.dismiss();
+                getCollectList(mPageIndex, mPageSize);
             }
 
             @Override
@@ -349,4 +430,15 @@ public class StorageInBarDetailsCollectListFragment extends BaseFragment {
     public boolean onFragmentBackPressed() {
         return false;
     }
+
+    @Override
+    public void onHiddenChanged(boolean hidden) {
+        super.onHiddenChanged(hidden);
+        if (hidden) {
+            ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
+        } else {
+            ((FunctionActivity) getActivity()).setMoreBtnVisible(true);
+        }
+    }
+
 }

+ 418 - 123
app/src/main/java/com/uas/hy_electronic/fragment/WHCheckMakeMaterialFragment.java

@@ -2,7 +2,9 @@ package com.uas.hy_electronic.fragment;
 
 import android.app.ActionBar;
 import android.app.Activity;
+import android.app.AlertDialog;
 import android.content.Context;
+import android.content.DialogInterface;
 import android.content.Intent;
 import android.graphics.drawable.BitmapDrawable;
 import android.os.AsyncTask;
@@ -10,14 +12,18 @@ import android.support.annotation.Nullable;
 import android.support.v7.widget.DividerItemDecoration;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
+import android.text.TextUtils;
 import android.util.Log;
 import android.view.Gravity;
 import android.view.KeyEvent;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.view.ViewGroup;
 import android.view.Window;
 import android.view.inputmethod.EditorInfo;
 import android.view.inputmethod.InputMethodManager;
+import android.widget.AdapterView;
+import android.widget.BaseAdapter;
 import android.widget.EditText;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
@@ -31,10 +37,13 @@ import com.android.volley.toolbox.StringRequest;
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.BaseViewHolder;
 import com.google.gson.reflect.TypeToken;
+import com.handmark.pulltorefresh.library.PullToRefreshBase;
+import com.handmark.pulltorefresh.library.PullToRefreshListView;
 import com.uas.hy_electronic.R;
 import com.uas.hy_electronic.activity.FunctionActivity;
 import com.uas.hy_electronic.adapter.WHCheckMakeDetailListAdapter;
 import com.uas.hy_electronic.adapter.WHCheckMakeMaterialListAdapter;
+import com.uas.hy_electronic.bean.ItemNumberBean;
 import com.uas.hy_electronic.bean.WHMakeMaterialDetail;
 import com.uas.hy_electronic.bean.WHMakeMaterialProduct;
 import com.uas.hy_electronic.global.GloableParams;
@@ -46,11 +55,13 @@ import com.uas.hy_electronic.util.CommonUtil;
 import com.uas.hy_electronic.util.FastjsonUtil;
 import com.uas.hy_electronic.util.HttpCallback;
 import com.uas.hy_electronic.util.HttpParams;
+import com.uas.hy_electronic.util.ListUtils;
 import com.uas.hy_electronic.util.LogUtil;
 import com.uas.hy_electronic.util.StringUtil;
 import com.uas.hy_electronic.util.VollyRequest;
 import com.uas.hy_electronic.view.ClearableEditText;
 import com.uas.hy_electronic.view.ConfirmDialog;
+import com.uas.hy_electronic.view.EmptyLayout;
 import com.uuzuche.lib_zxing.activity.CaptureActivity;
 import com.uuzuche.lib_zxing.activity.CodeUtils;
 
@@ -67,10 +78,10 @@ import razerdp.basepopup.BasePopupWindow;
  * @note:物料库存核查Fragment
  */
 public class WHCheckMakeMaterialFragment extends BaseFragment implements View.OnClickListener, DataSourceManager.NotifyData,
-//        AdapterView.OnItemClickListener,
+        //        AdapterView.OnItemClickListener,
         VolleyUtil.VolleyFinishListener {
     private static final int SCAN_BARCODE_CODE = 301;
-    ClearableEditText etProdcode, etWhcode;
+    ClearableEditText etProdcode, etWhcode, cet_item_number;
     TextView tvPrDetail, tvPrSpec;
     TextView btnSearch;
     WHCheckMakeMaterialListAdapter adapter;
@@ -83,15 +94,23 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
     private String pi_type;
     private ArrayList<ComDataBean> ComDataBeanList;
     private ClearableEditText edit_et;
+    private View contView;
     private IpAndResourcesPortAdapter ipAndResourcesPortAdapter;
     private RecyclerView rv_line_ip_port_data;
     private String sc_name;
     private String sc_code;
     private PopupWindow editPW;
     private StringRequest mStringRequest;
-    private ImageView iv_search;
+    private ImageView iv_search, iv_item_number_search;
     private TextView tv_pr_qty;
 
+    private PullToRefreshListView ptrlv_item_number;
+    private EmptyLayout mEmptyLayout;
+    private int page = 1;
+    private int pageSize = 20;
+    private ItmeNumberListAdapter itmeNumberListAdapter;
+    private ArrayList<ItemNumberBean> itemNumberBeanList;
+
     @Override
     protected int getLayout() {
         return R.layout.fragment_whcheck_makematerial;
@@ -114,6 +133,7 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
         //->采集
         etProdcode = (ClearableEditText) root.findViewById(R.id.et_prodcode_whmm);
         etWhcode = (ClearableEditText) root.findViewById(R.id.et_whcode_whmm);
+        cet_item_number = (ClearableEditText) root.findViewById(R.id.cet_item_number);
         btnSearch = (TextView) root.findViewById(R.id.btn_search_whmm);
         //->信息显示
         tvPrDetail = (TextView) root.findViewById(R.id.tv_pr_detail);
@@ -123,12 +143,20 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
 
         mScanImageView = (ImageView) mActivity.findViewById(R.id.btn_actionbar_scan_iv);
         iv_search = (ImageView) mActivity.findViewById(R.id.iv_search);
+        iv_item_number_search = (ImageView) mActivity.findViewById(R.id.iv_item_number_search);
     }
 
     @Override
     protected void initEvents() {
+        iv_item_number_search.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                getItemNuber("", page, pageSize);
+            }
+        });
+
         btnSearch.setOnClickListener(this);
-//        lvDetail.setOnItemClickListener(this);
+        //        lvDetail.setOnItemClickListener(this);
         etProdcode.setOnKeyListener(new View.OnKeyListener() {
             @Override
             public boolean onKey(View v, int keyCode, KeyEvent event) {
@@ -170,18 +198,209 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
         iv_search.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                getRepairStep("");
+                getRepairStep(etProdcode.getText().toString().trim());
             }
         });
     }
 
+    private void getItemNuber(String condition, int page, int pageSize) {
+        progressDialog.show();
+        HttpParams.Builder tag = new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_GETPRODLIST)
+                .method(Request.Method.GET)
+                .tag(TAG + "getMaCode");
+        if (TextUtils.isEmpty(condition)) {
+            tag.addParam("page", page + "")
+                    .addParam("pageSize", pageSize + "");
+        } else {
+            tag.addParam("condition", condition)
+                    .addParam("page", page + "")
+                    .addParam("pageSize", pageSize + "");
+        }
+        VollyRequest.getInstance().stringRequest(mStringRequest, tag.flag(0)
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                boolean isSuccess = FastjsonUtil.getBoolean(o.toString(), "success");
+                com.alibaba.fastjson.JSONArray dataArray = FastjsonUtil.getJSONArray(o.toString(), "data");
+                if (isSuccess) {
+                    if (dataArray == null) {
+                        CommonUtil.toastNoRepeat(mActivity, "未搜索到匹配数据");
+                    } else {
+                        handleItemNumberData(dataArray);
+                    }
+                    ptrlv_item_number.onRefreshComplete();
+                }
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+                ptrlv_item_number.onRefreshComplete();
+            }
+        });
+    }
+
+    private void handleItemNumberData(com.alibaba.fastjson.JSONArray dataArray) {
+        ItemNumberBean bean;
+        itemNumberBeanList.clear();
+        for (Object index : dataArray) {
+            com.alibaba.fastjson.JSONObject data = (com.alibaba.fastjson.JSONObject) index;
+            bean = new ItemNumberBean();
+            bean.setPR_CODE(data.getString("PR_CODE"));
+            bean.setPR_DETAIL(data.getString("PR_DETAIL"));
+            bean.setPR_SPEC(data.getString("PR_SPEC"));
+            bean.setRN(data.getInteger("RN"));
+            bean.setSelect(false);
+            itemNumberBeanList.add(bean);
+        }
+
+        initItemNumberDataPopupWindow();
+    }
+
+    private void initItemNumberDataPopupWindow() {
+        if (contView == null){
+            contView = LayoutInflater.from(mActivity).inflate(R.layout.pop_item_number, null);
+            edit_et = (ClearableEditText) contView.findViewById(R.id.edit_et);
+            TextView sure_tv = (TextView) contView.findViewById(R.id.sure_tv);
+            TextView cancle_tv = (TextView) contView.findViewById(R.id.cancle_tv);
+            ImageView search_im = contView.findViewById(R.id.search_im);
+            LinearLayout line_top = contView.findViewById(R.id.line_top);
+
+            ptrlv_item_number = contView.findViewById(R.id.ptrlv_item_number);
+            ptrlv_item_number.setMode(PullToRefreshBase.Mode.BOTH);
+            itmeNumberListAdapter = new ItmeNumberListAdapter(itemNumberBeanList);
+            ptrlv_item_number.setAdapter(itmeNumberListAdapter);
+            if (page == 1) {
+                itmeNumberListAdapter.setModels(itemNumberBeanList);
+            } else {
+                itmeNumberListAdapter.addModls(itemNumberBeanList);
+            }
+
+            mEmptyLayout = new EmptyLayout(getActivity(), ptrlv_item_number.getRefreshableView());
+            mEmptyLayout.setShowLoadingButton(false);
+            mEmptyLayout.setShowEmptyButton(false);
+            mEmptyLayout.setShowErrorButton(false);
+            mEmptyLayout.setEmptyMessage("暂无数据");
+
+            if (ListUtils.isEmpty(itemNumberBeanList)) {
+                mEmptyLayout.showEmpty();
+            }
+
+            ptrlv_item_number.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2<ListView>() {
+                @Override
+                public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {
+                    getItemNuber(cet_item_number.getText().toString().trim(), page = 1, pageSize);
+                }
+
+                @Override
+                public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {
+                    getItemNuber(cet_item_number.getText().toString().trim(), page++, pageSize);
+                }
+            });
+
+            ptrlv_item_number.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+                @Override
+                public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
+                    try {
+                        String numberId = itemNumberBeanList.get((int) l).getPR_CODE();
+                        if (!TextUtils.isEmpty(numberId)) {
+                            edit_et.setText(numberId);
+                        }
+                        for (int i1 = 0; i1 < itemNumberBeanList.size(); i1++) {
+                            if (i1 == (int) l) {
+                                itemNumberBeanList.get(i1).setSelect(true);
+                            } else {
+                                itemNumberBeanList.get(i1).setSelect(false);
+                            }
+                        }
+                        itmeNumberListAdapter.notifyDataSetChanged();
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                }
+            });
+
+            edit_et.requestFocus();
+            if (editPW == null) {
+                editPW = new PopupWindow(contView, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
+            }
+            editPW.setTouchable(true);
+            editPW.setBackgroundDrawable(new BitmapDrawable());
+            editPW.setOnDismissListener(new BasePopupWindow.OnDismissListener() {
+                @Override
+                public void onDismiss() {
+                    closeListPopupWindow();
+                }
+            });
+            View parentView = mActivity.getWindow().findViewById(Window.ID_ANDROID_CONTENT);
+            editPW.showAtLocation(parentView, Gravity.CENTER, 0, 0);
+            CommonUtil.setBackgroundAlpha(mActivity, 0.5f);
+            edit_et.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+                @Override
+                public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                    if (actionId == EditorInfo.IME_ACTION_DONE
+                            || actionId == EditorInfo.IME_ACTION_SEND
+                            || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
+                        String mSearchStr = edit_et.getText().toString().trim();
+                        getItemNuber(mSearchStr, 1, 20);
+                        return true;
+                    }
+                    return false;
+                }
+            });
+
+            search_im.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    String mSearchStr = edit_et.getText().toString().trim();
+                    getItemNuber(mSearchStr, 1, 20);
+                }
+
+            });
+
+            //确定
+            sure_tv.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    String mSearchStr = edit_et.getText().toString().trim();
+                    if (TextUtils.isEmpty(mSearchStr)) {
+                        CommonUtil.toastNoRepeat(mActivity, "请输入料号");
+                        return;
+                    }
+                    cet_item_number.setText(mSearchStr);
+                    cet_item_number.requestFocus();
+                    cet_item_number.setSelection(cet_item_number.getText().length());
+                    closeListPopupWindow();
+                }
+            });
+
+            //取消
+            cancle_tv.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    closeListPopupWindow();
+                }
+            });
+
+        }else {
+            if (page == 1) {
+                itmeNumberListAdapter.setModels(itemNumberBeanList);
+            } else {
+                itmeNumberListAdapter.addModls(itemNumberBeanList);
+            }
+        }
+    }
+
     @Override
     protected void initDatas() {
         editTextGetFocus(etProdcode);
         //->Actionbar
         ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(R.string.title_makematerial_whmm);
         ComDataBeanList = new ArrayList<>();
-
+        itemNumberBeanList = new ArrayList<>();
     }
 
     @Override
@@ -209,16 +428,17 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
     //按钮点击事件
     private void disposeOnClickEnter() {
         String strProdcode = etProdcode.getText().toString().trim();
+        String strNumbssser = cet_item_number.getText().toString().trim();
         String strWhcode = etWhcode.getText().toString().trim();
-        if (strProdcode.equals("") || strProdcode == null) {
-            etProdcode.setWarnIconVisible();
-            return;
-        }
+        //        if (strProdcode.equals("") || strProdcode == null) {
+        //            etProdcode.setWarnIconVisible();
+        //            return;
+        //        }
         //请求详细数据
         showLoadingView();
         requestType = VolleyUtil.FRAGMETN_WHCHECK_PRODUCT_CHECK;
-        VolleyUtil.getVolleyUtil().requestMakeMaterialCheck(getActivity(), GloableParams.ADDRESS_WH_PRODUCT, VolleyUtil.METHOD_GET,
-                requestType, strProdcode, strWhcode);
+        VolleyUtil.getVolleyUtil().requestMakeMaterialCheck2(getActivity(), GloableParams.ADDRESS_WH_PRODUCT, VolleyUtil.METHOD_GET,
+                requestType, strProdcode, strNumbssser, strWhcode);
     }
 
     @Override
@@ -342,71 +562,70 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
     }
 
     /*=========================监听事件===================================*/
-//    @Override
-//    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-//        //获取点击行所对应的detail对象
-//        WHMakeMaterialProduct tmpProd = detailItemList.get(position);
-//        String strPrcode = tmpProd.getBAR_PRODCODE().trim();
-//        String strWhcode = tmpProd.getBAR_WHCODE().trim();
-//        String strLocation = tmpProd.getBAR_LOCATION();
-//        String bar_madedate = tmpProd.getBAR_MADEDATE();
-//
-//        if (strLocation == null || strLocation.equals("null") || strLocation.equals("")) {
-//            strLocation = "null";
-//        }
-//        //请求服务器获取明细
-//        JSONObject paramJson = new JSONObject();
-//        try {
-//            paramJson.put("pr_code", strPrcode);
-//            paramJson.put("wh_code", strWhcode);
-//            paramJson.put("bar_location", strLocation);
-//            paramJson.put("bar_madedate", bar_madedate);
-//
-//        } catch (JSONException e) {
-//            e.printStackTrace();
-//        }
-//        Log.e("WHCheck", "!!!" + paramJson.toString());
-//        requestType = VolleyUtil.FRAGMETN_WHCHECK_PRODUCT_DETAIL;
-//        VolleyUtil.getVolleyUtil().requestMakeMaterialDetail(getActivity(), GloableParams.ADDRESS_WH_DETAIL, VolleyUtil.METHOD_GET,
-//                requestType, strPrcode, strWhcode, strLocation);
-//    }
+    //    @Override
+    //    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
+    //        //获取点击行所对应的detail对象
+    //        WHMakeMaterialProduct tmpProd = detailItemList.get(position);
+    //        String strPrcode = tmpProd.getBAR_PRODCODE().trim();
+    //        String strWhcode = tmpProd.getBAR_WHCODE().trim();
+    //        String strLocation = tmpProd.getBAR_LOCATION();
+    //        String bar_madedate = tmpProd.getBAR_MADEDATE();
+    //
+    //        if (strLocation == null || strLocation.equals("null") || strLocation.equals("")) {
+    //            strLocation = "null";
+    //        }
+    //        //请求服务器获取明细
+    //        JSONObject paramJson = new JSONObject();
+    //        try {
+    //            paramJson.put("pr_code", strPrcode);
+    //            paramJson.put("wh_code", strWhcode);
+    //            paramJson.put("bar_location", strLocation);
+    //            paramJson.put("bar_madedate", bar_madedate);
+    //
+    //        } catch (JSONException e) {
+    //            e.printStackTrace();
+    //        }
+    //        Log.e("WHCheck", "!!!" + paramJson.toString());
+    //        requestType = VolleyUtil.FRAGMETN_WHCHECK_PRODUCT_DETAIL;
+    //        VolleyUtil.getVolleyUtil().requestMakeMaterialDetail(getActivity(), GloableParams.ADDRESS_WH_DETAIL, VolleyUtil.METHOD_GET,
+    //                requestType, strPrcode, strWhcode, strLocation);
+    //    }
 
     private void getRepairStep(String trim) {
-//        if (pi_type.equals("良品")){
-//            pi_type = "";
-//        }
+        //        if (pi_type.equals("良品")){
+        //            pi_type = "";
+        //        }
         progressDialog.show();
         VollyRequest.getInstance().stringRequest(mStringRequest,
                 new HttpParams.Builder()
                         .url(GloableParams.ADDRESS_PDAIO_IN_GETWHCODE)
                         .method(Request.Method.GET)
                         .tag(TAG + "getMaCode")
-                        .addParam("condition",trim)
-                        .addParam("piclass","")
-                        .addParam("pi_type","")
+                        .addParam("condition", trim)
+                        .addParam("piclass", "")
+                        .addParam("pi_type", "")
                         .flag(0)
                         .build(), new HttpCallback() {
                     @Override
                     public void onSuccess(int flag, Object o) throws Exception {
                         progressDialog.dismiss();
-                        Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
+                        Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(), "success");
                         com.alibaba.fastjson.JSONArray dataArray = FastjsonUtil.getJSONArray(o.toString(), "data");
-                        if (isSuccess){
-                            if (dataArray == null){
-                                CommonUtil.toastNoRepeat(mActivity,"未搜索到匹配数据");
-                            }else {
-                                handleFeededlineData(dataArray,trim);
+                        if (isSuccess) {
+                            if (dataArray == null) {
+                                CommonUtil.toastNoRepeat(mActivity, "未搜索到匹配数据");
+                            } else {
+                                handleFeededlineData(dataArray, trim);
                             }
                         }
                     }
+
                     @Override
                     public void onFail(int flag, String failStr) throws Exception {
                         progressDialog.dismiss();
                         CommonUtil.toastNoRepeat(mActivity, failStr);
                     }
                 });
-
-
     }
 
     private void handleFeededlineData(com.alibaba.fastjson.JSONArray dataArray, String trim) {
@@ -414,22 +633,22 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
         ComDataBeanList.clear();
         for (Object index : dataArray) {
             com.alibaba.fastjson.JSONObject data = (com.alibaba.fastjson.JSONObject) index;
-            bean= new ComDataBean();
+            bean = new ComDataBean();
             bean.setItemName(data.getString("WH_DESCRIPTION"));
             bean.setItemremark(data.getString("WH_CODE"));
             ComDataBeanList.add(bean);
         }
 
-        if (trim.isEmpty()){
+        if (trim.isEmpty()) {
             initresourcesPopupWindow();
-        }else {
+        } else {
             ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(ComDataBeanList);
             ipAndResourcesPortAdapter.setmList(ComDataBeanList);
-            rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);;
+            rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+            ;
         }
-
-
     }
+
     private void initresourcesPopupWindow() {
         View contView = LayoutInflater.from(mActivity).inflate(R.layout.index_recycle_item, null);
         edit_et = (ClearableEditText) contView.findViewById(R.id.edit_et);
@@ -444,7 +663,7 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
         ipAndResourcesPortAdapter.setmList(ComDataBeanList);
         rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
         setlineAdapter(ComDataBeanList);
-//        edit_et.setText(ct_qty.getText().toString().trim());
+        //        edit_et.setText(ct_qty.getText().toString().trim());
 
         edit_et.requestFocus();
         editPW = new PopupWindow(contView, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
@@ -468,11 +687,11 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
                     String mSearchStr = edit_et.getText().toString().trim();
                     if (!mSearchStr.isEmpty()) {
                         List<ComDataBean> thisList = new ArrayList<>();
-                        for(int i=0;i<ComDataBeanList.size();i++){
-                            if(ComDataBeanList.get(i).getItemremark().contains(mSearchStr)||ComDataBeanList.get(i).getItemName().contains(mSearchStr)){
+                        for (int i = 0; i < ComDataBeanList.size(); i++) {
+                            if (ComDataBeanList.get(i).getItemremark().contains(mSearchStr) || ComDataBeanList.get(i).getItemName().contains(mSearchStr)) {
                                 thisList.add(ComDataBeanList.get(i));
                             }
-                            if(i == ComDataBeanList.size() -1){
+                            if (i == ComDataBeanList.size() - 1) {
                                 ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(thisList);
                                 rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
                                 LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
@@ -523,11 +742,11 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
                 String mSearchStr = edit_et.getText().toString().trim();
                 if (!mSearchStr.isEmpty()) {
                     List<ComDataBean> thisList = new ArrayList<>();
-                    for(int i=0;i<ComDataBeanList.size();i++){
-                        if(ComDataBeanList.get(i).getItemremark().contains(mSearchStr)||ComDataBeanList.get(i).getItemName().contains(mSearchStr)){
+                    for (int i = 0; i < ComDataBeanList.size(); i++) {
+                        if (ComDataBeanList.get(i).getItemremark().contains(mSearchStr) || ComDataBeanList.get(i).getItemName().contains(mSearchStr)) {
                             thisList.add(ComDataBeanList.get(i));
                         }
-                        if(i == ComDataBeanList.size() -1){
+                        if (i == ComDataBeanList.size() - 1) {
                             ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(thisList);
                             rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
                             LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
@@ -551,7 +770,7 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
                     ipAndResourcesPortAdapter.notifyDataSetChanged();
 
                 }
-//                getRepairStep(mSearchStr);
+                //                getRepairStep(mSearchStr);
                 ipAndResourcesPortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
                     @Override
                     public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
@@ -570,16 +789,15 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
         });
 
 
-
-        List<String> list=new ArrayList<>();
+        List<String> list = new ArrayList<>();
         //确定
         sure_tv.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
                 list.clear();
 
-                if (StringUtil.isEmpty(sc_code)){
-                    CommonUtil.toastNoRepeat(mActivity,"请选择工序");
+                if (StringUtil.isEmpty(sc_code)) {
+                    CommonUtil.toastNoRepeat(mActivity, "请选择工序");
                     return;
                 }
                 etWhcode.setText(sc_code);
@@ -622,52 +840,52 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
                 }
             });
         }
-//        edit_et.addTextChangedListener(new TextWatcher() {
-//            @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) {
-//                if (ComDataBeanList.isEmpty()){
-//                    getfuzzySearchSourceData(edit_et.getText().toString().trim(),"不良");
-//                }
-//                if (s.length() >= 0) {
-//                    String mSearchStr = s.toString().trim();
-//                    LogUtil.i("mSearchStr",mSearchStr);
-//                    List<ComDataBean> thisList = new ArrayList<>();
-//                    for(int i=0;i<ComDataBeanList.size();i++){
-//                        if(ComDataBeanList.get(i).getSC_CODE().contains(mSearchStr)){
-//                            thisList.add(ComDataBeanList.get(i));
-//                        }
-//                        if(i == ComDataBeanList.size() -1){
-//                            ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(thisList);
-//                            rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
-//                            LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
-//                        }
-//                    }
-//                    ipAndResourcesPortAdapter.notifyDataSetChanged();
-//
-//                } else {
-//
-//                    ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(ComDataBeanList);
-//                    rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
-//
-//                }
-//                ipAndResourcesPortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
-//                    @Override
-//                    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
-//                        List<ComDataBean> ipAndPortBeans = ipAndResourcesPortAdapter.getmList();
-//                        for (int i = 0; i < ipAndPortBeans.size(); i++) {
-//                            ipAndPortBeans.get(i).setChecked(false);
-//                        }
-//                        ipAndPortBeans.get(position).setChecked(true);
-//                        ipAndResourcesPortAdapter.notifyDataSetChanged();
-//                    }
-//                });
-//            }
-//
-//        });
+        //        edit_et.addTextChangedListener(new TextWatcher() {
+        //            @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) {
+        //                if (ComDataBeanList.isEmpty()){
+        //                    getfuzzySearchSourceData(edit_et.getText().toString().trim(),"不良");
+        //                }
+        //                if (s.length() >= 0) {
+        //                    String mSearchStr = s.toString().trim();
+        //                    LogUtil.i("mSearchStr",mSearchStr);
+        //                    List<ComDataBean> thisList = new ArrayList<>();
+        //                    for(int i=0;i<ComDataBeanList.size();i++){
+        //                        if(ComDataBeanList.get(i).getSC_CODE().contains(mSearchStr)){
+        //                            thisList.add(ComDataBeanList.get(i));
+        //                        }
+        //                        if(i == ComDataBeanList.size() -1){
+        //                            ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(thisList);
+        //                            rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+        //                            LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
+        //                        }
+        //                    }
+        //                    ipAndResourcesPortAdapter.notifyDataSetChanged();
+        //
+        //                } else {
+        //
+        //                    ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(ComDataBeanList);
+        //                    rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+        //
+        //                }
+        //                ipAndResourcesPortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+        //                    @Override
+        //                    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+        //                        List<ComDataBean> ipAndPortBeans = ipAndResourcesPortAdapter.getmList();
+        //                        for (int i = 0; i < ipAndPortBeans.size(); i++) {
+        //                            ipAndPortBeans.get(i).setChecked(false);
+        //                        }
+        //                        ipAndPortBeans.get(position).setChecked(true);
+        //                        ipAndResourcesPortAdapter.notifyDataSetChanged();
+        //                    }
+        //                });
+        //            }
+        //
+        //        });
 
 
     }
@@ -686,6 +904,9 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
             editPW = null;
             CommonUtil.setBackgroundAlpha(mActivity, 1f);
         }
+        if (contView != null) {
+            contView = null;
+        }
 
     }
 
@@ -751,8 +972,8 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
     public boolean onKeyDown(int keyCode, KeyEvent event) {
         if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
             if (progressDialog != null && progressDialog.isShowing()) {
-//                loadingView.dismiss();
-//                VolleyUtil.distoryVolley();
+                //                loadingView.dismiss();
+                //                VolleyUtil.distoryVolley();
                 return true;
             }
             if (detailPopwin != null && detailPopwin.isShowing()) {
@@ -771,6 +992,7 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
     public boolean onFragmentBackPressed() {
         return false;
     }
+
     private class IpAndResourcesPortAdapter extends BaseQuickAdapter<ComDataBean, BaseViewHolder> {
         private List<ComDataBean> mmmmList;
 
@@ -781,7 +1003,8 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
         public void setmList(List<ComDataBean> mList) {
             this.mmmmList = mList;
         }
-        public ComDataBean getBeanByPositon(int position){
+
+        public ComDataBean getBeanByPositon(int position) {
             return mmmmList.get(position);
         }
 
@@ -789,9 +1012,10 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
             super(R.layout.fuzzy_ipandport_item, data);
             this.mmmmList = data;
         }
+
         @Override
         protected void convert(BaseViewHolder helper, ComDataBean item) {
-            helper.setText(R.id.macode_ip__Tv,item.getItemremark()+"-("+item.getItemName()+")");
+            helper.setText(R.id.macode_ip__Tv, item.getItemremark() + "-(" + item.getItemName() + ")");
             LinearLayout line_true = helper.itemView.findViewById(R.id.line_true);
             if (item.getChecked()) {
                 line_true.setSelected(true);
@@ -802,7 +1026,7 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
     }
 
 
-    private class ComDataBean{
+    private class ComDataBean {
         String itemName = null;
         String itemremark = null;
         boolean Checked;
@@ -832,5 +1056,76 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
         }
     }
 
+    class ItmeNumberListAdapter extends BaseAdapter {
+        private List<ItemNumberBean> models;
+
+        public ItemNumberBean getModels(int item) {
+            if (ListUtils.getSize(models) > item) {
+                return models.get(item);
+            }
+            return null;
+        }
+
+        public ItmeNumberListAdapter(List<ItemNumberBean> models) {
+            this.models = models;
+        }
+
+        public void setModels(List<ItemNumberBean> models) {
+            this.models = models;
+            notifyDataSetChanged();
+        }
+
+        private void addModls(List<ItemNumberBean> models) {
+            if (this.models == null) {
+                this.models = new ArrayList<>();
+            }
+            this.models.addAll(models);
+            notifyDataSetChanged();
+        }
+
+        @Override
+        public int getCount() {
+            return ListUtils.getSize(this.models);
+        }
+
+        @Override
+        public Object getItem(int i) {
+            return models.get(i);
+        }
+
+        @Override
+        public long getItemId(int i) {
+            return i;
+        }
+
+        @Override
+        public View getView(int i, View view, ViewGroup viewGroup) {
+            ItmeNumberListAdapter.ViewHoler holer = null;
+            if (view == null) {
+                holer = new ItmeNumberListAdapter.ViewHoler();
+                view = LayoutInflater.from(getActivity()).inflate(R.layout.fuzzy_ipandport_item, null);
+                holer.line_true = view.findViewById(R.id.line_true);
+                holer.macode_ip__Tv = view.findViewById(R.id.macode_ip__Tv);
+                view.setTag(holer);
+            } else {
+                holer = (ItmeNumberListAdapter.ViewHoler) view.getTag();
+            }
+            ItemNumberBean bean = models.get(i);
+            if (bean.isSelect()) {
+                holer.line_true.setSelected(true);
+            }else {
+                holer.line_true.setSelected(false);
+            }
+            holer.macode_ip__Tv.setText("料号: " + bean.getPR_CODE() + "\n" +
+                    "名称: " + bean.getPR_DETAIL() + "\n" +
+                    "规格: " + bean.getPR_SPEC());     //料号编号 + 名称 + 规格
+            return view;
+        }
+
+        class ViewHoler {
+            TextView macode_ip__Tv;
+            LinearLayout line_true;
+        }
+    }
 
 }

+ 5 - 0
app/src/main/java/com/uas/hy_electronic/global/GloableParams.java

@@ -272,6 +272,7 @@ public class GloableParams {
     public static String ADDRESS_GETNOTIFYBARLIST;
     public static String ADDRESS_DELETEALLDETAIL;
     public static String ADDRESS_PDAIO_IN_GETWHCODE;
+    public static String ADDRESS_GETPRODLIST;
 
 
 
@@ -587,6 +588,9 @@ public class GloableParams {
     private static String ADDRESSTAIL_OUTMATERIAL_DELETEALLDETAIL = "/api/pda/outMaterial/deleteAllDetail.action";
     private static final String ADDRESSTAIL_PDAIO_IN_GETWHCODE = "/api/pdaio/pdaioIn/getWhcode.action";
 
+    //搜索
+    private static final String ADDRESSTAIL_GETPRODLIST = "/api/pda/common/getProdList.action";
+
 
 
     //材料出库获取下一采集货品信息
@@ -1251,6 +1255,7 @@ public class GloableParams {
         GloableParams.ADDRESS_GETNOTIFYBARLIST= uriHead + GloableParams.ADDRESSTAIL_OUTMATERIAL_GETNOTIFYBARLIST;
         GloableParams.ADDRESS_DELETEALLDETAIL= uriHead + GloableParams.ADDRESSTAIL_OUTMATERIAL_DELETEALLDETAIL;
         GloableParams.ADDRESS_PDAIO_IN_GETWHCODE = uriHead + GloableParams.ADDRESSTAIL_PDAIO_IN_GETWHCODE;
+        GloableParams.ADDRESS_GETPRODLIST = uriHead + GloableParams.ADDRESSTAIL_GETPRODLIST;
 
     }
 }

+ 22 - 0
app/src/main/java/com/uas/hy_electronic/tools/VolleyUtil.java

@@ -349,6 +349,28 @@ public class VolleyUtil {
         PdaApplication.mRequestQueue.add(stringRequest);
     }
 
+    /**
+     * @注释:物料库存核查:获取详细物料数据,增加(料号/条码号)参数
+     */
+    public void requestMakeMaterialCheck2(Context pContext, String pUrl, int method, int pRequestType, final String bar_code,String pProcode, final String pWhcode) {
+        //String  pr_code  //料号   测试数据:2CX-X028M-0002R01
+        //String  bar_code  // 条码号 测试数据:240903B0377
+        //String  wh_code  //仓库编号  测试数据:B0101
+        getVolleyUtil();
+        context = pContext;
+        requestType = pRequestType;
+        pUrl = pUrl + "?pr_code=" + pProcode + "&bar_code=" + bar_code + "&wh_code=" + pWhcode;
+        Log.e("VOLLEYURL", pUrl);
+        stringRequest = new StringRequest(Request.Method.GET, pUrl, stringListener, errorListener) {
+            @Override
+            public Map<String, String> getHeaders() throws AuthFailureError {
+                return setCookies();
+            }
+        };
+        stringRequest.setRetryPolicy(new DefaultRetryPolicy(10 * 1000, 0, 1f));
+        PdaApplication.mRequestQueue.add(stringRequest);
+    }
+
     /**
      * @注释:尾料还仓
      */

+ 65 - 25
app/src/main/res/layout/fragment_whcheck_makematerial.xml

@@ -1,90 +1,128 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--仓库管理:物料库存核查-->
+<?xml version="1.0" encoding="utf-8"?><!--仓库管理:物料库存核查-->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical" android:layout_width="match_parent"
-    android:layout_height="match_parent">
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
     <!--搜索-->
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginTop="@dimen/space_top_8"
         android:layout_marginLeft="@dimen/space_left_8"
+        android:layout_marginTop="@dimen/space_top_8"
         android:layout_marginRight="@dimen/space_right_8">
+
         <com.uas.hy_electronic.view.ClearableEditText
             android:id="@+id/et_prodcode_whmm"
-            android:hint="条码号"
             style="@style/PopWinEditTextStyle"
-            android:layout_weight="2"/>
+            android:layout_weight="2"
+            android:hint="条码号" />
 
         <TextView
             android:id="@+id/btn_search_whmm"
             style="@style/PopWinButtonStyle"
             android:layout_weight="4"
-            android:background="@drawable/search_16"/>
+            android:background="@drawable/search_16" />
     </LinearLayout>
+
     <LinearLayout
-        android:orientation="horizontal"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content">
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        >
+
+        <com.uas.hy_electronic.view.ClearableEditText
+            android:id="@+id/cet_item_number"
+            style="@style/PopWinEditTextStyle"
+            android:layout_marginLeft="@dimen/space_left_8"
+            android:layout_marginTop="8dp"
+            android:layout_marginRight="@dimen/space_right_8"
+            android:layout_weight="1"
+            android:hint="料号" />
+
+
+        <ImageView
+            android:id="@+id/iv_item_number_search"
+            android:layout_width="@dimen/height_32"
+            android:layout_height="@dimen/height_32"
+            android:layout_gravity="bottom"
+            android:layout_marginLeft="@dimen/space_left_5"
+            android:layout_marginRight="@dimen/dp_10"
+            android:background="@drawable/bg_button"
+            android:src="@drawable/search_48" />
 
     </LinearLayout>
+
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content">
+
         <com.uas.hy_electronic.view.ClearableEditText
-            android:layout_marginTop="8dp"
             android:id="@+id/et_whcode_whmm"
+            style="@style/PopWinEditTextStyle"
             android:layout_marginLeft="@dimen/space_left_8"
+            android:layout_marginTop="8dp"
             android:layout_marginRight="@dimen/space_right_8"
-            style="@style/PopWinEditTextStyle"
             android:layout_weight="1"
             android:hint="仓库" />
+
         <ImageView
             android:id="@+id/iv_search"
             android:layout_width="@dimen/height_32"
             android:layout_height="@dimen/height_32"
-            android:layout_gravity="center_vertical"
-            android:background="@drawable/bg_button"
+            android:layout_gravity="bottom"
             android:layout_marginLeft="@dimen/space_left_5"
             android:layout_marginRight="@dimen/dp_10"
-            android:src="@drawable/search_48"/>
+            android:background="@drawable/bg_button"
+            android:src="@drawable/search_48" />
     </LinearLayout>
 
     <!--中部-->
     <TableLayout
-        android:layout_marginTop="@dimen/space_top_8"
-        style="@style/CardWhiteStyle_wrapheight">
+        style="@style/CardWhiteStyle_wrapheight"
+        android:layout_marginTop="@dimen/space_top_8">
+
         <TableRow>
+
             <TextView
                 style="@style/CardContentTextStyle"
-                android:text="编号"/>
+                android:text="编号" />
+
             <TextView
                 android:id="@+id/tv_barprodcode"
                 style="@style/CardContentTextStyle"
-                android:textColor="@color/text_search"/>
+                android:textColor="@color/text_search" />
         </TableRow>
+
         <TableRow>
+
             <TextView
                 style="@style/CardContentTextStyle"
-                android:text="@string/text_fragment_whcheck_pr_detail"/>
+                android:text="@string/text_fragment_whcheck_pr_detail" />
+
             <TextView
                 android:id="@+id/tv_pr_detail"
                 style="@style/CardContentTextStyle"
-                android:textColor="@color/text_search"/>
+                android:textColor="@color/text_search" />
         </TableRow>
+
         <TableRow>
+
             <TextView
                 style="@style/CardContentTextStyle"
                 android:text="@string/text_fragment_whcheck_pr_spec" />
+
             <TextView
                 android:id="@+id/tv_pr_spec"
                 style="@style/CardContentTextStyle"
                 android:textColor="@color/text_search" />
         </TableRow>
+
         <TableRow>
+
             <TextView
                 style="@style/CardContentTextStyle"
                 android:text="总数" />
+
             <TextView
                 android:id="@+id/tv_pr_qty"
                 style="@style/CardContentTextStyle"
@@ -95,18 +133,20 @@
     <LinearLayout
         style="@style/CardWhiteSytle_fillheight"
         android:background="@color/white">
-        <include layout="@layout/item_list_table"/>
+
+        <include layout="@layout/item_list_table" />
         <!--信息列表-->
         <ScrollView
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:fillViewport="true"
-            android:background="@color/transparent">
+            android:background="@color/transparent"
+            android:fillViewport="true">
+
             <ListView
                 android:id="@+id/lv_detail_whmm"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:background="@color/transparent"/>
+                android:background="@color/transparent" />
         </ScrollView>
     </LinearLayout>
 </LinearLayout>

+ 105 - 0
app/src/main/res/layout/pop_item_number.xml

@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_margin="12dp"
+    android:background="@color/background"
+    android:orientation="vertical">
+    <TextView
+        android:visibility="gone"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center"
+        android:padding="14dp"
+        android:text="请采集岗位资源" />
+
+    <LinearLayout
+        android:layout_marginTop="@dimen/dp_10"
+        android:id="@+id/line_top"
+        android:layout_width="match_parent"
+        android:layout_height="36dp"
+        android:background="@color/white"
+        android:orientation="horizontal">
+
+        <com.uas.hy_electronic.view.ClearableEditText
+            android:id="@+id/edit_et"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="16dp"
+            android:layout_marginRight="16dp"
+            android:layout_weight="1"
+            android:background="@drawable/bg_line_edittext"
+            android:gravity="center_vertical"
+            android:hint="请输入要搜索的内容"
+            android:padding="5dp"
+            android:textSize="14sp"/>
+
+        <ImageView
+            android:id="@+id/search_im"
+            android:layout_width="46dp"
+            android:layout_height="match_parent"
+            android:layout_marginRight="10dp"
+            android:background="@drawable/bg_button"
+            android:src="@drawable/search_48" />
+    </LinearLayout>
+<!--    <android.support.v7.widget.RecyclerView
+        android:visibility="gone"
+        android:id="@+id/rv_ip_port_data"
+        android:layout_centerHorizontal="true"
+        android:layout_width="match_parent"
+        android:layout_marginLeft="@dimen/dp_10"
+        android:layout_marginRight="@dimen/dp_10"
+        android:layout_below="@+id/line_top"
+        android:layout_height="200dp"
+        android:layout_marginTop="30dp">
+    </android.support.v7.widget.RecyclerView>-->
+
+    <com.handmark.pulltorefresh.library.PullToRefreshListView
+        android:id="@+id/ptrlv_item_number"
+        android:layout_centerHorizontal="true"
+        android:layout_width="match_parent"
+        android:layout_marginLeft="@dimen/dp_10"
+        android:layout_marginRight="@dimen/dp_10"
+        android:layout_below="@+id/line_top"
+        android:layout_height="200dp"
+        android:layout_marginTop="30dp"
+        android:scrollbars="none"
+        android:scrollingCache="false" />
+
+    <LinearLayout
+        android:layout_below="@+id/ptrlv_item_number"
+        android:layout_centerHorizontal="true"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="10dp"
+        android:layout_marginBottom="10dp">
+
+
+        <Button
+            android:id="@+id/cancle_tv"
+            android:layout_width="0dp"
+            android:layout_height="36dp"
+            android:layout_margin="12dp"
+            android:layout_weight="1"
+            android:background="@drawable/selector_cancel_bg"
+            android:gravity="center"
+            android:text="取消"
+            android:textColor="@color/selector_cancel_text_color" />
+        <Button
+            android:id="@+id/sure_tv"
+            android:layout_width="0dp"
+            android:layout_height="36dp"
+            android:layout_margin="12dp"
+            android:layout_weight="1"
+            android:background="@drawable/selector_confirm_bg"
+            android:gravity="center"
+            android:text="确定"
+            android:textColor="@color/white" />
+    </LinearLayout>
+
+
+
+
+
+
+</RelativeLayout>

+ 20 - 0
app/src/main/res/layout/pop_one_click_cancellation.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/white"
+    android:gravity="center"
+    >
+
+    <Button
+        android:id="@+id/bt_one_cance_collection"
+        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>

+ 2 - 2
build.gradle

@@ -50,8 +50,8 @@ ext {
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 25,
-            versionName      : "v1.1.5"
+            versionCode      : 27,
+            versionName      : "v1.1.7"
     ]
 
     depsVersion = [