Browse Source

物料库存核查和出库采集增加修改显示数据

ChengJH 1 year ago
parent
commit
533e450681

+ 9 - 0
app/src/main/java/com/uas/hy_electronic/bean/MaterialInformationBean.java

@@ -55,6 +55,15 @@ public class MaterialInformationBean {
         private double BAR_REMAIN;
         private String DC;
         private String PD_OUQTY;
+        private String PD_WHCODE;
+
+        public String getPD_WHCODE() {
+            return PD_WHCODE;
+        }
+
+        public void setPD_WHCODE(String PD_WHCODE) {
+            this.PD_WHCODE = PD_WHCODE;
+        }
 
         public String getPD_OUQTY() {
             return PD_OUQTY;

+ 9 - 0
app/src/main/java/com/uas/hy_electronic/bean/MaterialOutMessageBean.java

@@ -52,6 +52,15 @@ public class MaterialOutMessageBean {
         private long PI_ID;
         private String PI_STATUSCODE;
         private String PI_PDASTATUS;
+        private String PI_WHCODE;
+
+        public String getPI_WHCODE() {
+            return PI_WHCODE;
+        }
+
+        public void setPI_WHCODE(String PI_WHCODE) {
+            this.PI_WHCODE = PI_WHCODE;
+        }
 
         public String getPD_WHCODE() {
             return PD_WHCODE;

+ 9 - 0
app/src/main/java/com/uas/hy_electronic/bean/WHMakeMaterialProduct.java

@@ -11,6 +11,15 @@ public class WHMakeMaterialProduct {
     private String BAR_LOCATION;
     private String BAR_WHCODE;
     private String MADEDATE;
+    private String QTY;
+
+    public String getQTY() {
+        return QTY;
+    }
+
+    public void setQTY(String QTY) {
+        this.QTY = QTY;
+    }
 
     public String getMADEDATE() {
         return MADEDATE;

+ 3 - 0
app/src/main/java/com/uas/hy_electronic/fragment/IOCOutMakeMaterial.java

@@ -346,6 +346,7 @@ public class IOCOutMakeMaterial extends BaseFragment {
         String pi_inoutno = dataList.get(i).getPI_INOUTNO();
         String pd_whcode = dataList.get(i).getPD_WHCODE();
         String pi_id = dataList.get(i).getPI_ID() + "";
+        String pi_whcode = dataList.get(i).getPI_WHCODE();
         IOCOutMakeMaterialOper iocOutMakeMaterialOper = new IOCOutMakeMaterialOper();
 
         Bundle bundle = new Bundle();
@@ -353,6 +354,7 @@ public class IOCOutMakeMaterial extends BaseFragment {
         bundle.putString("pd_whcode", pd_whcode);
         bundle.putString("pi_id", pi_id);
         bundle.putBoolean("isMultiple", false);
+        bundle.putString("pi_whcode", pi_whcode);
         iocOutMakeMaterialOper.setArguments(bundle);
 
         getFragmentManager().beginTransaction().replace(R.id.container_function_fragment, iocOutMakeMaterialOper).addToBackStack(null).commit();
@@ -542,6 +544,7 @@ public class IOCOutMakeMaterial extends BaseFragment {
                                 dataBean.setPI_ID(JsonUtils.optLongNotNull(materialObject, "PI_ID"));
                                 dataBean.setPI_STATUSCODE(JsonUtils.optStringNotNull(materialObject, "PI_STATUSCODE"));
                                 dataBean.setPI_PDASTATUS(JsonUtils.optStringNotNull(materialObject, "PI_PDASTATUS"));
+                                dataBean.setPI_WHCODE(JsonUtils.optStringNotNull(materialObject, "PI_WHCODE"));
 
                                 dataBeans.add(dataBean);
                             }

+ 19 - 11
app/src/main/java/com/uas/hy_electronic/fragment/IOCOutMakeMaterialOper.java

@@ -356,7 +356,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                                     line_tab.setVisibility(View.VISIBLE);
                                     tv_pd_prodcode.setText(materialInformationBean.getPD_PRODCODE());
                                     VolleyUtil.getVolleyUtil().requestMakeMaterialCheck(mActivity, GloableParams.ADDRESS_WH_PRODUCT, VolleyUtil.METHOD_GET,
-                                            requestType, materialInformationBean.getPD_PRODCODE(), "");
+                                            requestType, materialInformationBean.getPD_PRODCODE(), pd_datawhcode);
                                 }
                             } else {
                                 mMaterialInforTextView.setText("该出库单已经完成备料");
@@ -442,6 +442,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
     private TextView tv_pd_restqty;
     private TextView tv_bar_location;
     private TextView tv_pd_ouqty;
+    private String pd_datawhcode;
 
     @Override
     protected int getLayout() {
@@ -750,16 +751,20 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                                 materialInfo = materialInfo + "; 批号:" + materialInformationBean.getData().getPD_BATCHCODE();
                             }
                             if (mMaterialInforTextView != null)
-//                                mMaterialInforTextView.setText(materialInfo);
+//                                mMaterialInforTextView.setText(materialInfo);1
+                                pd_datawhcode = materialInformationBean.getData().getPD_WHCODE();
                                 tv_pd_restqty.setText(materialInformationBean.getData().getPD_RESTQTY());
-                                tv_bar_location.setText(materialInformationBean.getData().getBAR_LOCATION());
+                                tv_bar_location.setText(materialInformationBean.getData().getPD_WHCODE());
                                 tv_pd_ouqty.setText(materialInformationBean.getData().getPD_OUTQTY());
 
-
                             line_tab.setVisibility(View.VISIBLE);
                             tv_pd_prodcode.setText(materialInformationBean.getData().getPD_PRODCODE());
+                            tv_pr_detail.setText("" + materialInformationBean.getData().getPR_DETAIL());
+                            tv_pr_spec.setText("" + materialInformationBean.getData().getPR_SPEC());
+
+
                             VolleyUtil.getVolleyUtil().requestMakeMaterialCheck(mActivity, GloableParams.ADDRESS_WH_PRODUCT, VolleyUtil.METHOD_GET,
-                                    requestType, materialInformationBean.getData().getPD_PRODCODE(), "");
+                                    requestType, materialInformationBean.getData().getPD_PRODCODE(), pd_datawhcode);
 
                         } else {
                             if (mMaterialInforTextView != null)
@@ -1029,13 +1034,18 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
 //                                mMaterialInforTextView.setText(materialInfo);
 
                                 tv_pd_restqty.setText(materialInformationBean.getPD_RESTQTY());
-                                tv_bar_location.setText(materialInformationBean.getBAR_LOCATION());
+                                pd_datawhcode = materialInformationBean.getPD_WHCODE();
+                                tv_bar_location.setText(materialInformationBean.getPD_WHCODE());
                                 tv_pd_ouqty.setText(materialInformationBean.getPD_OUTQTY());
 
                                 line_tab.setVisibility(View.VISIBLE);
                                 tv_pd_prodcode.setText(materialInformationBean.getPD_PRODCODE());
+                                tv_pr_detail.setText(materialInformationBean.getPR_DETAIL());
+                                tv_pr_spec.setText(materialInformationBean.getPR_SPEC());
+
+
                                 VolleyUtil.getVolleyUtil().requestMakeMaterialCheck(mActivity, GloableParams.ADDRESS_WH_PRODUCT, VolleyUtil.METHOD_GET,
-                                        requestType, materialInformationBean.getPD_PRODCODE(), "");
+                                        requestType, materialInformationBean.getPD_PRODCODE(), pd_datawhcode);
                             }
                         } else {
                             mMaterialInforTextView.setText("该出库单已经完成备料");
@@ -1211,9 +1221,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         String strDetail = detailItemList.get(0).getPR_DETAIL();
         String strSpec = detailItemList.get(0).getPR_SPEC();
 
-        //信息区域显示
-        tv_pr_detail.setText("" + strDetail);
-        tv_pr_spec.setText("" + strSpec);
+
         //table数据源修改
         adapter.notifyDataSetChanged();
     }
@@ -1861,7 +1869,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                                 line_tab.setVisibility(View.VISIBLE);
                                 tv_pd_prodcode.setText(materialInformationBean.getPD_PRODCODE());
                                 VolleyUtil.getVolleyUtil().requestMakeMaterialCheck(mActivity, GloableParams.ADDRESS_WH_PRODUCT, VolleyUtil.METHOD_GET,
-                                        requestType, materialInformationBean.getPD_PRODCODE(), "");
+                                        requestType, materialInformationBean.getPD_PRODCODE(), pd_datawhcode);
                             }
                         } else {
                             mMaterialInforTextView.setText("该出库单已经完成备料");

+ 428 - 0
app/src/main/java/com/uas/hy_electronic/fragment/WHCheckMakeMaterialFragment.java

@@ -6,18 +6,30 @@ import android.content.Context;
 import android.content.Intent;
 import android.graphics.drawable.BitmapDrawable;
 import android.os.AsyncTask;
+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.util.Log;
 import android.view.Gravity;
 import android.view.KeyEvent;
+import android.view.LayoutInflater;
 import android.view.View;
 import android.view.Window;
+import android.view.inputmethod.EditorInfo;
 import android.view.inputmethod.InputMethodManager;
 import android.widget.EditText;
 import android.widget.ImageView;
+import android.widget.LinearLayout;
 import android.widget.ListView;
 import android.widget.PopupWindow;
 import android.widget.TextView;
 
+import com.alibaba.fastjson.JSON;
+import com.android.volley.Request;
+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.uas.hy_electronic.R;
 import com.uas.hy_electronic.activity.FunctionActivity;
@@ -31,6 +43,12 @@ import com.uas.hy_electronic.tools.GsonUtil;
 import com.uas.hy_electronic.tools.VolleyUtil;
 import com.uas.hy_electronic.util.CameraUtil;
 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.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.uuzuche.lib_zxing.activity.CaptureActivity;
@@ -40,8 +58,11 @@ import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 
+import java.util.ArrayList;
 import java.util.List;
 
+import razerdp.basepopup.BasePopupWindow;
+
 /**
  * @note:物料库存核查Fragment
  */
@@ -58,6 +79,18 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
     private ListView lvDetail;
     private ImageView mScanImageView;
     private int mFocusId;
+    private TextView tv_barprodcode;
+    private String pi_type;
+    private ArrayList<ComDataBean> ComDataBeanList;
+    private ClearableEditText edit_et;
+    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 TextView tv_pr_qty;
 
     @Override
     protected int getLayout() {
@@ -85,8 +118,11 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
         //->信息显示
         tvPrDetail = (TextView) root.findViewById(R.id.tv_pr_detail);
         tvPrSpec = (TextView) root.findViewById(R.id.tv_pr_spec);
+        tv_pr_qty = (TextView) root.findViewById(R.id.tv_pr_qty);
+        tv_barprodcode = (TextView) root.findViewById(R.id.tv_barprodcode);
 
         mScanImageView = (ImageView) mActivity.findViewById(R.id.btn_actionbar_scan_iv);
+        iv_search = (ImageView) mActivity.findViewById(R.id.iv_search);
     }
 
     @Override
@@ -131,6 +167,12 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
                 }
             }
         });
+        iv_search.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                getRepairStep("");
+            }
+        });
     }
 
     @Override
@@ -138,6 +180,7 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
         editTextGetFocus(etProdcode);
         //->Actionbar
         ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(R.string.title_makematerial_whmm);
+        ComDataBeanList = new ArrayList<>();
 
     }
 
@@ -285,10 +328,14 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
         //修改信息显示区域的信息
         String strDetail = detailItemList.get(0).getPR_DETAIL();
         String strSpec = detailItemList.get(0).getPR_SPEC();
+        String bar_prodcode = detailItemList.get(0).getBAR_PRODCODE();
+        String qty = detailItemList.get(0).getQTY();
 
         //信息区域显示
+        tv_barprodcode.setText("" + bar_prodcode);
         tvPrDetail.setText("" + strDetail);
         tvPrSpec.setText("" + strSpec);
+        tv_pr_qty.setText("" + qty);
 
         //table数据源修改
         adapter.notifyDataSetChanged();
@@ -324,6 +371,325 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
 //                requestType, strPrcode, strWhcode, strLocation);
 //    }
 
+    private void getRepairStep(String trim) {
+//        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","")
+                        .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 {
+                                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) {
+        ComDataBean bean;
+        ComDataBeanList.clear();
+        for (Object index : dataArray) {
+            com.alibaba.fastjson.JSONObject data = (com.alibaba.fastjson.JSONObject) index;
+            bean= new ComDataBean();
+            bean.setItemName(data.getString("WH_DESCRIPTION"));
+            bean.setItemremark(data.getString("WH_CODE"));
+            ComDataBeanList.add(bean);
+        }
+
+        if (trim.isEmpty()){
+            initresourcesPopupWindow();
+        }else {
+            ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(ComDataBeanList);
+            ipAndResourcesPortAdapter.setmList(ComDataBeanList);
+            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);
+        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);
+        rv_line_ip_port_data = contView.findViewById(R.id.rv_ip_port_data);
+        rv_line_ip_port_data.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
+        rv_line_ip_port_data.setLayoutManager(new LinearLayoutManager(mActivity));
+        ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(ComDataBeanList);
+        ipAndResourcesPortAdapter.setmList(ComDataBeanList);
+        rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+        setlineAdapter(ComDataBeanList);
+//        edit_et.setText(ct_qty.getText().toString().trim());
+
+        edit_et.requestFocus();
+        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();
+                    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)){
+                                thisList.add(ComDataBeanList.get(i));
+                            }
+                            if(i == ComDataBeanList.size() -1){
+                                ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(thisList);
+                                rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+                                LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
+
+                            }
+                            List<ComDataBean> lineCodeEntities = ipAndResourcesPortAdapter.getmList();
+                            for (int j = 0; j < lineCodeEntities.size(); j++) {
+                                lineCodeEntities.get(j).setChecked(false);
+                            }
+                            ipAndResourcesPortAdapter.notifyDataSetChanged();
+                        }
+
+
+                    } else {
+                        ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(ComDataBeanList);
+                        rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+                        List<ComDataBean> lineCodeEntities = ipAndResourcesPortAdapter.getmList();
+                        for (int i = 0; i < lineCodeEntities.size(); i++) {
+                            lineCodeEntities.get(i).setChecked(false);
+                        }
+                        ipAndResourcesPortAdapter.notifyDataSetChanged();
+
+                    }
+                    ipAndResourcesPortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+
+                        @Override
+                        public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                            List<ComDataBean> ipAndPortBeans = ipAndResourcesPortAdapter.getmList();
+                            sc_name = ipAndPortBeans.get(position).getItemName();
+                            sc_code = ipAndPortBeans.get(position).getItemremark();
+                            for (int i = 0; i < ipAndPortBeans.size(); i++) {
+                                ipAndPortBeans.get(i).setChecked(false);
+                            }
+                            ipAndPortBeans.get(position).setChecked(true);
+                            ipAndResourcesPortAdapter.notifyDataSetChanged();
+                        }
+                    });
+                    return true;
+                }
+                return false;
+            }
+        });
+
+
+        search_im.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                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)){
+                            thisList.add(ComDataBeanList.get(i));
+                        }
+                        if(i == ComDataBeanList.size() -1){
+                            ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(thisList);
+                            rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+                            LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
+
+                        }
+                        List<ComDataBean> lineCodeEntities = ipAndResourcesPortAdapter.getmList();
+                        for (int j = 0; j < lineCodeEntities.size(); j++) {
+                            lineCodeEntities.get(j).setChecked(false);
+                        }
+                        ipAndResourcesPortAdapter.notifyDataSetChanged();
+                    }
+
+
+                } else {
+                    ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(ComDataBeanList);
+                    rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+                    List<ComDataBean> lineCodeEntities = ipAndResourcesPortAdapter.getmList();
+                    for (int i = 0; i < lineCodeEntities.size(); i++) {
+                        lineCodeEntities.get(i).setChecked(false);
+                    }
+                    ipAndResourcesPortAdapter.notifyDataSetChanged();
+
+                }
+//                getRepairStep(mSearchStr);
+                ipAndResourcesPortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+                    @Override
+                    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                        List<ComDataBean> ipAndPortBeans = ipAndResourcesPortAdapter.getmList();
+                        sc_name = ipAndPortBeans.get(position).getItemName();
+                        sc_code = ipAndPortBeans.get(position).getItemremark();
+                        for (int i = 0; i < ipAndPortBeans.size(); i++) {
+                            ipAndPortBeans.get(i).setChecked(false);
+                        }
+                        ipAndPortBeans.get(position).setChecked(true);
+                        ipAndResourcesPortAdapter.notifyDataSetChanged();
+                    }
+                });
+            }
+
+        });
+
+
+
+        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,"请选择工序");
+                    return;
+                }
+                etWhcode.setText(sc_code);
+                etWhcode.requestFocus();
+                etWhcode.setSelection(etWhcode.getText().length());
+                closeListPopupWindow();
+            }
+        });
+
+        //取消
+        cancle_tv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+
+                closeListPopupWindow();
+            }
+        });
+
+        String mSearchStr = edit_et.getText().toString().trim();
+        if (mSearchStr.isEmpty()) {
+            ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(ComDataBeanList);
+            rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+            List<ComDataBean> lineCodeEntities = ipAndResourcesPortAdapter.getmList();
+            for (int i = 0; i < lineCodeEntities.size(); i++) {
+                lineCodeEntities.get(i).setChecked(false);
+            }
+            ipAndResourcesPortAdapter.notifyDataSetChanged();
+
+            ipAndResourcesPortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+                @Override
+                public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                    List<ComDataBean> ipAndPortBeans = ipAndResourcesPortAdapter.getmList();
+                    sc_name = ipAndPortBeans.get(position).getItemName();
+                    sc_code = ipAndPortBeans.get(position).getItemremark();
+                    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();
+//                    }
+//                });
+//            }
+//
+//        });
+
+
+    }
+
+    private void setlineAdapter(ArrayList<ComDataBean> mList) {
+        LogUtil.i("mList", JSON.toJSONString(mList));
+        ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(mList);
+        ipAndResourcesPortAdapter.setmList(ComDataBeanList);
+        ipAndResourcesPortAdapter.notifyDataSetChanged();
+        rv_line_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+    }
+
+    private void closeListPopupWindow() {
+        if (editPW != null) {
+            editPW.dismiss();
+            editPW = null;
+            CommonUtil.setBackgroundAlpha(mActivity, 1f);
+        }
+
+    }
+
+
     @Override
     public void onClick(View v) {
         disposeOnClickEnter();
@@ -405,4 +771,66 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
     public boolean onFragmentBackPressed() {
         return false;
     }
+    private class IpAndResourcesPortAdapter extends BaseQuickAdapter<ComDataBean, BaseViewHolder> {
+        private List<ComDataBean> mmmmList;
+
+        public List<ComDataBean> getmList() {
+            return mmmmList;
+        }
+
+        public void setmList(List<ComDataBean> mList) {
+            this.mmmmList = mList;
+        }
+        public ComDataBean getBeanByPositon(int position){
+            return mmmmList.get(position);
+        }
+
+        private IpAndResourcesPortAdapter(@Nullable List<ComDataBean> data) {
+            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()+")");
+            LinearLayout line_true = helper.itemView.findViewById(R.id.line_true);
+            if (item.getChecked()) {
+                line_true.setSelected(true);
+            } else {
+                line_true.setSelected(false);
+            }
+        }
+    }
+
+
+    private class ComDataBean{
+        String itemName = null;
+        String itemremark = null;
+        boolean Checked;
+
+        public boolean getChecked() {
+            return Checked;
+        }
+
+        public void setChecked(boolean checked) {
+            Checked = checked;
+        }
+
+        public String getItemName() {
+            return itemName;
+        }
+
+        public void setItemName(String itemName) {
+            this.itemName = itemName;
+        }
+
+        public String getItemremark() {
+            return itemremark;
+        }
+
+        public void setItemremark(String itemremark) {
+            this.itemremark = itemremark;
+        }
+    }
+
+
 }

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

@@ -271,6 +271,7 @@ public class GloableParams {
     public static String ADDRESS_GETBATCHLOCATION;
     public static String ADDRESS_GETNOTIFYBARLIST;
     public static String ADDRESS_DELETEALLDETAIL;
+    public static String ADDRESS_PDAIO_IN_GETWHCODE;
 
 
 
@@ -584,6 +585,7 @@ public class GloableParams {
     private static String ADDRESSTAIL_OUTMATERIAL_GETNOTIFYBARLIST = "/api/pda/acceptNToVerify/getNotifyBarList.action";
 
     private static String ADDRESSTAIL_OUTMATERIAL_DELETEALLDETAIL = "/api/pda/outMaterial/deleteAllDetail.action";
+    private static final String ADDRESSTAIL_PDAIO_IN_GETWHCODE = "/api/pdaio/pdaioIn/getWhcode.action";
 
 
 
@@ -1248,6 +1250,7 @@ public class GloableParams {
         GloableParams.ADDRESS_GETBATCHLOCATION= uriHead + GloableParams.ADDRESSTAIL_OUTMATERIAL_GETBATCHLOCATION;
         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;
 
     }
 }

+ 1 - 1
app/src/main/java/com/uas/hy_electronic/util/VolleyRequest.java

@@ -136,7 +136,7 @@ public class VolleyRequest {
                                 String password = SharedPreUtil.getString(activity, "passwords", null);
                                 VolleyUtil.requestUserLogin(activity, GloableParams.ADDRESS_LOGIN_APPLY, VolleyUtil.METHOD_POST,
                                         VolleyUtil.FRAGMENT_LOGIN, maName, userName, password);
-                                httpCallback.onFail(httpParams.getFlag(), "已重新登录,请再次操作");
+                                httpCallback.onFail(httpParams.getFlag(), errorToast);
                             } else {
                                 httpCallback.onFail(httpParams.getFlag(), errorToast);
                             }

+ 10 - 0
app/src/main/res/drawable/login_technological_bg.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+       android:shape="rectangle">
+    <solid android:color="@color/bg_recycle"/>
+
+    <stroke
+        android:width="1dp"
+        android:color="@color/bg_recycle"/>
+
+</shape>

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

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

+ 13 - 0
app/src/main/res/drawable/un_login_technological_bg.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+       android:shape="rectangle">
+
+    <corners android:radius="4dp"/>
+
+    <solid android:color="@color/white"/>
+
+    <stroke
+        android:width="1dp"
+        android:color="@color/white"/>
+
+</shape>

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

@@ -386,7 +386,7 @@
                     <TextView
                         style="@style/CardContentTextStylepopu"
                         android:textSize="@dimen/textsize_12"
-                        android:text="仓"/>
+                        android:text="仓"/>
                     <TextView
                         android:id="@+id/tv_bar_location"
                         style="@style/CardContentTextStylepopu"

+ 48 - 9
app/src/main/res/layout/fragment_whcheck_makematerial.xml

@@ -12,27 +12,57 @@
         android:layout_marginRight="@dimen/space_right_8">
         <com.uas.hy_electronic.view.ClearableEditText
             android:id="@+id/et_prodcode_whmm"
-            android:hint="物料编号"
+            android:hint="条码号"
             style="@style/PopWinEditTextStyle"
             android:layout_weight="2"/>
-        <com.uas.hy_electronic.view.ClearableEditText
-            android:id="@+id/et_whcode_whmm"
-            android:layout_marginLeft="@dimen/space_left_8"
-            android:layout_marginRight="@dimen/space_right_8"
-            style="@style/PopWinEditTextStyle"
-            android:hint="仓位"
-            android:layout_weight="3"/>
+
         <TextView
             android:id="@+id/btn_search_whmm"
             style="@style/PopWinButtonStyle"
             android:layout_weight="4"
             android:background="@drawable/search_16"/>
     </LinearLayout>
+    <LinearLayout
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+    </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"
+            android:layout_marginLeft="@dimen/space_left_8"
+            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_marginLeft="@dimen/space_left_5"
+            android:layout_marginRight="@dimen/dp_10"
+            android:src="@drawable/search_48"/>
+    </LinearLayout>
+
     <!--中部-->
     <TableLayout
         android:layout_marginTop="@dimen/space_top_8"
         style="@style/CardWhiteStyle_wrapheight">
-
+        <TableRow>
+            <TextView
+                style="@style/CardContentTextStyle"
+                android:text="编号"/>
+            <TextView
+                android:id="@+id/tv_barprodcode"
+                style="@style/CardContentTextStyle"
+                android:textColor="@color/text_search"/>
+        </TableRow>
         <TableRow>
             <TextView
                 style="@style/CardContentTextStyle"
@@ -51,6 +81,15 @@
                 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"
+                android:textColor="@color/text_search" />
+        </TableRow>
     </TableLayout>
 
     <LinearLayout

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

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout 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"
+    tools:ignore="MissingDefaultResource">
+
+    <LinearLayout
+        android:background="@drawable/login_technological_process"
+        android:id="@+id/line_true"
+        android:layout_marginTop="5dp"
+        android:layout_marginLeft="30dp"
+        android:layout_marginRight="30dp"
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginBottom="5dp">
+
+        <TextView
+            android:id="@+id/macode_ip__Tv"
+            android:gravity="center"
+            android:text=""
+            android:layout_gravity="center"
+            android:layout_width="0dp"
+            android:layout_weight="5"
+            android:layout_height="wrap_content"
+            />
+
+    </LinearLayout>
+</RelativeLayout>

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

@@ -0,0 +1,91 @@
+<?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: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>
+    <LinearLayout
+        android:layout_below="@+id/rv_ip_port_data"
+        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>

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

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

+ 2 - 2
build.gradle

@@ -50,8 +50,8 @@ ext {
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 21,
-            versionName      : "v1.1.1"
+            versionCode      : 24,
+            versionName      : "v1.1.4"
     ]
 
     depsVersion = [