Selaa lähdekoodia

新增库存查询界面

ChengJH 2 vuotta sitten
vanhempi
commit
5585a117ac

+ 82 - 0
app/src/main/java/com/uas/uas_mes_zb_p/bean/StockinquiryistBean.java

@@ -0,0 +1,82 @@
+package com.uas.uas_mes_zb_p.bean;
+
+/**
+ * Created by cjh on 2022-10-14
+ */
+public class StockinquiryistBean {
+    private String PR_CODE;
+    private String PR_DETAIL;
+    private String PR_SPEC;
+    private String PWONHAND;
+    private String CANUSE;
+    private String WH_CODE;
+    private String WH_DESCRIPTION;
+    public StockinquiryistBean(){
+    }
+
+    public StockinquiryistBean(String PR_CODE, String PR_DETAIL, String PR_SPEC, String PWONHAND, String CANUSE, String WH_CODE, String WH_DESCRIPTION) {
+        this.PR_CODE = PR_CODE;
+        this.PR_DETAIL = PR_DETAIL;
+        this.PR_SPEC = PR_SPEC;
+        this.PWONHAND = PWONHAND;
+        this.CANUSE = CANUSE;
+        this.WH_CODE = WH_CODE;
+        this.WH_DESCRIPTION = WH_DESCRIPTION;
+    }
+
+    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 String getPWONHAND() {
+        return PWONHAND;
+    }
+
+    public void setPWONHAND(String PWONHAND) {
+        this.PWONHAND = PWONHAND;
+    }
+
+    public String getCANUSE() {
+        return CANUSE;
+    }
+
+    public void setCANUSE(String CANUSE) {
+        this.CANUSE = CANUSE;
+    }
+
+    public String getWH_CODE() {
+        return WH_CODE;
+    }
+
+    public void setWH_CODE(String WH_CODE) {
+        this.WH_CODE = WH_CODE;
+    }
+
+    public String getWH_DESCRIPTION() {
+        return WH_DESCRIPTION;
+    }
+
+    public void setWH_DESCRIPTION(String WH_DESCRIPTION) {
+        this.WH_DESCRIPTION = WH_DESCRIPTION;
+    }
+}

+ 488 - 0
app/src/main/java/com/uas/uas_mes_zb_p/fragment/StockInquiryFragment.java

@@ -0,0 +1,488 @@
+package com.uas.uas_mes_zb_p.fragment;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.graphics.Color;
+import android.support.annotation.Nullable;
+import android.support.v4.content.ContextCompat;
+import android.support.v7.widget.DividerItemDecoration;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.WindowManager;
+import android.view.inputmethod.EditorInfo;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.android.volley.Request;
+import com.bin.david.form.core.SmartTable;
+import com.bin.david.form.core.TableConfig;
+import com.bin.david.form.data.CellInfo;
+import com.bin.david.form.data.column.Column;
+import com.bin.david.form.data.format.bg.BaseCellBackgroundFormat;
+import com.bin.david.form.data.style.FontStyle;
+import com.bin.david.form.data.table.TableData;
+import com.bin.david.form.listener.OnColumnItemClickListener;
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.scwang.smartrefresh.layout.api.RefreshLayout;
+import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener;
+import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
+import com.uas.uas_mes_zb_p.R;
+import com.uas.uas_mes_zb_p.activity.FunctionActivity;
+import com.uas.uas_mes_zb_p.bean.StockinquiryistBean;
+import com.uas.uas_mes_zb_p.global.GloableParams;
+import com.uas.uas_mes_zb_p.util.CommonUtil;
+import com.uas.uas_mes_zb_p.util.FastjsonUtil;
+import com.uas.uas_mes_zb_p.util.HttpCallback;
+import com.uas.uas_mes_zb_p.util.HttpParams;
+import com.uas.uas_mes_zb_p.util.VolleyRequest;
+import com.uas.uas_mes_zb_p.view.ClearableEditText;
+import com.uuzuche.lib_zxing.activity.CodeUtils;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * Created by cjh on 2023-08-21
+ */
+public class StockInquiryFragment extends BaseFragment implements OnColumnItemClickListener<String>, View.OnClickListener {
+
+    private ClearableEditText storage_recharge_collect_et;
+    private RefreshLayout mRefreshLayout;
+    private SmartTable mSmartTable;
+    private Column<String> va_classColumn,va_codeColumn,va_statusColumn,va_vendnameColumn,va_vendcodeColumn,va_whcodeColumn,va_whdescriptionColumn;
+    private TableData<StockinquiryistBean> mTableData;
+    private int mPageIndex = 1, mPageSize = 20;
+    private List<StockinquiryistBean> mFilterStorageInBeans;
+    private static final int SCAN_BARCODE_CODE = 111;
+    private int mFocusId;
+    private ImageView pr_code_im;
+    private ClearableEditText edit_et;
+    private ClearableEditText edit_gg;
+    private ClearableEditText edit_mj;
+    private RecyclerView rv_ip_port_data;
+    private ArrayList<StockinquiryistBean> delists;
+    private IpAndPortAdapter andPortAdapter;
+    private ImageView search_im;
+    private ImageView search_gg;
+    private ImageView search_mj;
+
+    @Override
+    protected int getLayout() {
+        return R.layout.stockinquiry_fragment;
+    }
+
+    @Override
+    protected void initViews() {
+        FunctionActivity.setTitle(getString(R.string.stockinquiry));
+        ((FunctionActivity) getActivity()).setListIconIvVisible(false);
+        storage_recharge_collect_et = mActivity.findViewById(R.id.storage_recharge_collect_et);
+        mRefreshLayout = mActivity.findViewById(R.id.pda_wms_in_filter_list_srl);
+        mSmartTable = mActivity.findViewById(R.id.jlt_storage_in_filter_list_st);
+        pr_code_im = mActivity.findViewById(R.id.pr_code_im);
+        search_im = mActivity.findViewById(R.id.search_im);
+        search_gg = mActivity.findViewById(R.id.search_gg);
+        search_mj = mActivity.findViewById(R.id.search_mj);
+
+        edit_et = mActivity.findViewById(R.id.edit_et);
+        edit_gg = mActivity.findViewById(R.id.edit_gg);
+        edit_mj = mActivity.findViewById(R.id.edit_mj);
+        rv_ip_port_data = mActivity.findViewById(R.id.rv_ip_port_data);
+        andPortAdapter = new IpAndPortAdapter(delists);
+        rv_ip_port_data.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
+        rv_ip_port_data.setLayoutManager(new LinearLayoutManager(mActivity));
+        andPortAdapter.setmList(delists);
+        rv_ip_port_data.setAdapter(andPortAdapter);
+        delists = new ArrayList<>();
+    }
+
+    @Override
+    protected void initEvents() {
+        storage_recharge_collect_et.requestFocus();
+        storage_recharge_collect_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)) {
+                    getDatalistCodes();
+                    return true;
+                }
+                return false;
+            }
+        });
+        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)) {
+                    getDatalistCodes();
+                    return true;
+                }
+                return false;
+            }
+        });
+        edit_gg.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)) {
+                    getDatalistCodes();
+                    return true;
+                }
+                return false;
+            }
+        });
+        edit_mj.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)) {
+                    getDatalistCodes();
+                    return true;
+                }
+                return false;
+            }
+        });
+
+
+
+
+
+
+
+
+
+
+        mFilterStorageInBeans = Collections.synchronizedList(new ArrayList<>());
+//        getDatalistCodes(storage_recharge_collect_et.getText().toString().trim());
+        pr_code_im.setOnClickListener(this);
+        search_im.setOnClickListener(this);
+        search_gg.setOnClickListener(this);
+        search_mj.setOnClickListener(this);
+    }
+
+    @Override
+    protected void initDatas() {
+        WindowManager wm = mActivity.getWindowManager();
+        int screenWith = wm.getDefaultDisplay().getWidth();
+        mSmartTable.getConfig().setMinTableWidth(screenWith)
+                .setShowXSequence(false)
+                .setShowYSequence(false)
+                .setShowTableTitle(false)
+                .setFixedTitle(true)
+                .setVerticalPadding(CommonUtil.dip2px(mActivity, 12))
+                .setColumnTitleVerticalPadding(CommonUtil.dip2px(mActivity, 12))
+                .setHorizontalPadding(CommonUtil.dip2px(mActivity, 10))
+                .setSequenceHorizontalPadding(CommonUtil.dip2px(mActivity, 10))
+                .setColumnTitleHorizontalPadding(CommonUtil.dip2px(mActivity, 10))
+                .setColumnTitleStyle(new FontStyle(CommonUtil.sp2px(mActivity, 15), Color.parseColor("#000000")))
+                .setContentCellBackgroundFormat(new BaseCellBackgroundFormat<CellInfo>() {
+                    @Override
+                    public int getBackGroundColor(CellInfo cellInfo) {
+                        if (cellInfo.row % 2 == 0) {
+                            return ContextCompat.getColor(mActivity, R.color.blue_50);
+                        }
+                        return TableConfig.INVALID_COLOR;
+                    }
+                });
+
+
+
+        va_classColumn = new Column<String>("物料编号", "PR_CODE");
+        va_classColumn.setFixed(true);
+        va_codeColumn = new Column<String>("物料名称", "PR_DETAIL");
+        va_statusColumn = new Column<String>("物料规格", "PR_SPEC");
+        va_vendnameColumn = new Column<String>("总库存", "PWONHAND");
+        va_vendcodeColumn = new Column<String>("可用库存", "CANUSE");
+        va_whcodeColumn = new Column<String>("仓库编号", "WH_CODE");
+        va_whdescriptionColumn = new Column<String>("仓库名称", "WH_DESCRIPTION");
+
+
+        va_classColumn.setOnColumnItemClickListener(this);
+        va_codeColumn.setOnColumnItemClickListener(this);
+        va_statusColumn.setOnColumnItemClickListener(this);
+        va_vendnameColumn.setOnColumnItemClickListener(this);
+        va_vendcodeColumn.setOnColumnItemClickListener(this);
+
+        mRefreshLayout.setOnRefreshListener(new OnRefreshListener() {
+            @Override
+            public void onRefresh(RefreshLayout refreshLayout) {
+                mPageIndex = 1;
+                getDatalistCodes();
+            }
+        });
+
+        mRefreshLayout.setOnLoadMoreListener(new OnLoadMoreListener() {
+            @Override
+            public void onLoadMore(RefreshLayout refreshLayout) {
+                mPageIndex++;
+                getDatalistCodes();
+            }
+        });
+
+//        ceshiData();
+    }
+    private void getDatalistCodes(){
+        if (storage_recharge_collect_et.getText().toString().trim().isEmpty()
+                &&edit_et.getText().toString().trim().isEmpty()
+                &&edit_gg.getText().toString().trim().isEmpty()
+                &&edit_mj.getText().toString().trim().isEmpty()){
+            CommonUtil.toastNoRepeat(mActivity, "请输入想要搜索内容");
+            return;
+
+        }
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_ADDRESSTAIL_PRODONHANDCHECK)
+                .method(Request.Method.GET)
+                .tag(TAG + "getindatalist")
+                .flag(0)
+                .addParam("pr_code",storage_recharge_collect_et.getText().toString().trim())
+                .addParam("pr_kind",edit_et.getText().toString().trim())
+                .addParam("pr_kind2",edit_gg.getText().toString().trim())
+                .addParam("banh",edit_mj.getText().toString().trim())
+//                .addParam("page",mPageIndex+"")
+//                .addParam("pageSize",mPageSize+"")
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+
+                JSONArray dataArray = FastjsonUtil.getJSONArray(o.toString(), "data");
+                handleRecycleFeededData(dataArray);
+//                try {
+//                    if (mPageIndex == 1) {
+//                        mFilterStorageInBeans.clear();
+//                    }
+//                    String result = o.toString();
+//                    JSONObject resultObject = JSON.parseObject(result);
+//                    JSONArray dataArray = resultObject.getJSONArray("data");
+//                    List<StockinquiryistBean> list=new ArrayList<>();
+//                    if (dataArray != null && dataArray.size() > 0) {
+//                        for (int i = 0; i < dataArray.size(); i++) {
+//                            JSONObject dataObject = dataArray.getJSONObject(i);
+//                            if (dataObject != null) {
+//                                StockinquiryistBean jltStorageInBean = new StockinquiryistBean();
+//                                jltStorageInBean.setPR_CODE(FastjsonUtil.getText(dataObject, "PR_CODE"));
+//                                jltStorageInBean.setPR_DETAIL(FastjsonUtil.getText(dataObject, "PR_DETAIL"));
+//                                jltStorageInBean.setPR_SPEC(FastjsonUtil.getText(dataObject, "PR_SPEC"));
+//                                jltStorageInBean.setPWONHAND(FastjsonUtil.getText(dataObject, "PWONHAND"));
+//                                jltStorageInBean.setCANUSE(FastjsonUtil.getText(dataObject, "CANUSE"));
+//                                jltStorageInBean.setWH_CODE(FastjsonUtil.getText(dataObject, "WH_CODE"));
+//                                jltStorageInBean.setWH_DESCRIPTION(FastjsonUtil.getText(dataObject, "WH_DESCRIPTION"));
+//                                list.add(jltStorageInBean);
+//                            }
+//                        }
+//                    }
+//                    if (mPageIndex == 1) {
+//                        mFilterStorageInBeans = list;//PI_INOUTNO
+//                        setFilterTableData(mFilterStorageInBeans);
+//                    }else if (list.size() > 0) {
+//                        mFilterStorageInBeans.addAll(list);
+//                        mSmartTable.addData(list, true);
+//                        new Handler().postDelayed(new Runnable() {
+//                            @Override
+//                            public void run() {
+//                                mSmartTable.postInvalidate();
+//                            }
+//                        }, 100);
+////                        filterAllSelect();
+//                    } else {
+//                        mPageIndex--;
+//                    }
+//                    progressDialog.dismiss();
+//                    mRefreshLayout.finishRefresh(0);
+//                    mRefreshLayout.finishLoadMore(0);
+//
+//                } catch (Exception e) {
+//                    e.printStackTrace();
+//                    progressDialog.dismiss();
+//                    mRefreshLayout.finishRefresh(0);
+//                    mRefreshLayout.finishLoadMore(0);
+//                }
+
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                mRefreshLayout.finishRefresh(0);
+                mRefreshLayout.finishLoadMore(0);
+                if (mPageIndex > 1) {
+                    mPageIndex--;
+                } else {
+                    setFilterTableData(new ArrayList<>());
+                }
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+
+                setFilterTableData(mFilterStorageInBeans);
+                progressDialog.dismiss();
+            }
+        });
+    }
+
+    private void handleRecycleFeededData(JSONArray dataArray) {
+
+        StockinquiryistBean bean;
+        delists.clear();
+        for (Object index : dataArray) {
+            JSONObject data = (JSONObject) index;
+            bean= new StockinquiryistBean(
+                    data.getString("PR_CODE"),
+                    data.getString("PR_DETAIL"),
+                    data.getString("PR_SPEC"),
+                    data.getString("PWONHAND"),
+                    data.getString("CANUSE"),
+                    data.getString("WH_CODE"),
+                    data.getString("WH_DESCRIPTION"));
+            delists.add(bean);
+        }
+        setAdaptercheck(delists);
+    }
+    private void setAdaptercheck(ArrayList<StockinquiryistBean> mList) {
+        andPortAdapter = new IpAndPortAdapter(mList);
+        andPortAdapter.setmList(mList);
+        rv_ip_port_data.setAdapter(andPortAdapter);
+
+    }
+
+
+
+
+    private void setFilterTableData(List<StockinquiryistBean> filterTableData) {
+        mTableData = new TableData<StockinquiryistBean>("收料单列表", filterTableData,
+                va_classColumn,va_codeColumn,va_statusColumn,va_vendnameColumn,va_vendcodeColumn,va_whcodeColumn,va_whdescriptionColumn);
+        mSmartTable.setTableData(mTableData);
+//        mSmartTable.requestLayout();
+        mSmartTable.postDelayed(new Runnable() {
+            @Override
+            public void run() {
+                mSmartTable.postInvalidate();
+            }
+        }, 100);
+
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        return false;
+    }
+
+    @Override
+    public boolean onFragmentBackPressed() {
+        return false;
+    }
+    @Override
+    public void onHiddenChanged(boolean hidden) {
+        super.onHiddenChanged(hidden);
+        if (hidden) {
+            ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
+            ((FunctionActivity) getActivity()).setListIconIvVisible(false);
+        } else {
+            FunctionActivity.setTitle(getString(R.string.stockinquiry));
+            ((FunctionActivity) getActivity()).setListIconIvVisible(false);
+        }
+    }
+
+    @Override
+    public void onClick(Column<String> column, String value, String s, int position) {
+
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
+        ((FunctionActivity) getActivity()).setListIconIvVisible(false);
+        CommonUtil.closeKeybord(storage_recharge_collect_et, mActivity);
+        ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(getString(R.string.stockinquiry));
+    }
+
+
+    @Override
+    public void onClick(View v) {
+        switch (v.getId()) {
+            case R.id.pr_code_im:
+                getDatalistCodes();
+                break;
+            case R.id.search_im:
+                getDatalistCodes();
+                break;
+            case R.id.search_gg:
+                getDatalistCodes();
+                break;
+            case R.id.search_mj:
+                getDatalistCodes();
+                break;
+        }
+    }
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        if (resultCode != Activity.RESULT_OK) {
+            return;
+        }
+
+        if (requestCode == SCAN_BARCODE_CODE && data != null) {
+            if (data.getExtras() != null) {
+                String result = data.getExtras().getString(CodeUtils.RESULT_STRING);
+                if (mFocusId == R.id.storage_recharge_collect_et) {
+                    storage_recharge_collect_et.setText(result);
+                    storage_recharge_collect_et.setSelection(result.length());
+
+                    getDatalistCodes();
+                }
+            }
+        }
+    }
+    private class IpAndPortAdapter extends BaseQuickAdapter<StockinquiryistBean, BaseViewHolder> {
+        private List<StockinquiryistBean> mmmmList;
+
+        public List<StockinquiryistBean> getmList() {
+            return mmmmList;
+        }
+
+        public void setmList(List<StockinquiryistBean> mList) {
+            this.mmmmList = mList;
+        }
+        public StockinquiryistBean getBeanByPositon(int position){
+            return mmmmList.get(position);
+        }
+
+        private IpAndPortAdapter(@Nullable List<StockinquiryistBean> data) {
+            super(R.layout.fuzzy_stockinq_item, data);
+            this.mmmmList = data;
+        }
+        @Override
+        protected void convert(BaseViewHolder helper, StockinquiryistBean item) {
+            helper.setText(R.id.macode_ip__Tv,item.getPR_CODE());
+            helper.setText(R.id.tv_pr_detail,item.getPR_DETAIL());
+            helper.setText(R.id.tv_pr_spec,item.getPR_SPEC());
+            helper.setText(R.id.tv_pwonhand,item.getPWONHAND());
+            helper.setText(R.id.tv_canuse,item.getCANUSE());
+            helper.setText(R.id.tv_wh_code,item.getWH_CODE());
+            helper.setText(R.id.tv_wh_description,item.getWH_DESCRIPTION());
+//            LinearLayout line_true = helper.itemView.findViewById(R.id.line_true);
+//            if (item.getChecked()) {
+//                line_true.setSelected(true);
+//            } else {
+//                line_true.setSelected(false);
+//            }
+        }
+    }
+    @Override
+    public void onDestroy() {
+        super.onDestroy();
+    }
+}

+ 11 - 5
app/src/main/java/com/uas/uas_mes_zb_p/fragment/WHCheckContentFragment.java

@@ -70,6 +70,12 @@ public class WHCheckContentFragment extends BaseFragment implements AdapterView.
                 getFragmentManager().beginTransaction().addToBackStack(null)
                         .replace(R.id.container_function_fragment,fragment).commit();
                 break;
+            //库存核查
+            case GloableParams.LISTNAME_WH_STOCK_INQUIRY:
+                fragment = new StockInquiryFragment();
+                getFragmentManager().beginTransaction().addToBackStack(null)
+                        .replace(R.id.container_function_fragment,fragment).commit();
+                break;
             //包装信息核查
             case GloableParams.LISTNAME_WH_CHECKCONTENT_PACKAGE:
 //                Intent intent = new Intent(getActivity(),BluetoothActivity.class);
@@ -87,11 +93,11 @@ public class WHCheckContentFragment extends BaseFragment implements AdapterView.
                 getFragmentManager().beginTransaction().addToBackStack(null)
                         .replace(R.id.container_function_fragment,new WHCheckMakeFinFragment()).commit();
                 break;
-            //订单完工品核查
-            case GloableParams.LISTNAME_WH_CHECKCONTENT_ORDERFINISH:
-                getFragmentManager().beginTransaction().addToBackStack(null)
-                        .replace(R.id.container_function_fragment,new WHCheckOrderFinFragment()).commit();
-                break;
+//            //订单完工品核查
+//            case GloableParams.LISTNAME_WH_CHECKCONTENT_ORDERFINISH:
+//                getFragmentManager().beginTransaction().addToBackStack(null)
+//                        .replace(R.id.container_function_fragment,new WHCheckOrderFinFragment()).commit();
+//                break;
         }
 
     }

+ 8 - 0
app/src/main/java/com/uas/uas_mes_zb_p/global/GloableParams.java

@@ -281,6 +281,7 @@ public class GloableParams {
     public static String ADDRESS_ADDRESSTAIL_SAVE;
     public static String ADDRESS_ADDRESSTAIL_CHECK;
     public static String ADDRESS_ADDRESSTAIL_VERIFICATION;
+    public static String ADDRESS_ADDRESSTAIL_PRODONHANDCHECK;
 
 
     //连接服务器请求地址
@@ -633,6 +634,9 @@ public class GloableParams {
     //验证条码是否可用
     private static String ADDRESSTAIL_VERIFICATION="/api/pda/outMaterial/checkProdinout.action";
 
+    //库存查询接口
+    private static String ADDRESSTAIL_PRODONHANDCHECK="/api/pda/check/prodOnHandCheck.action";
+
     /**
      * 完工品入库
      */
@@ -954,12 +958,14 @@ public class GloableParams {
     //-->仓库管理:货物核查
     public static final String LISTNAME_WH_CHECKCONTENT_MAKEMATERIAL = "物料库存核查";
     public static final String LISTNAME_WH_CHECKCONTENT_BARCODE = "条码信息核查";
+    public static final String LISTNAME_WH_STOCK_INQUIRY = "库存核查";
     public static final String LISTNAME_WH_CHECKCONTENT_PACKAGE = "包装信息核查";
     public static final String LISTNAME_WH_CHECKCONTENT_MAKEFINISH = "工单完工品核查";
     public static final String LISTNAME_WH_CHECKCONTENT_ORDERFINISH = "订单完工品核查";
     public static final String[] mmindexListName = {
             LISTNAME_WH_CHECKCONTENT_MAKEMATERIAL,
             LISTNAME_WH_CHECKCONTENT_BARCODE,
+            LISTNAME_WH_STOCK_INQUIRY
 //            LISTNAME_WH_CHECKCONTENT_PACKAGE,
 //            LISTNAME_WH_CHECKCONTENT_MAKEFINISH,
 //            LISTNAME_WH_CHECKCONTENT_ORDERFINISH
@@ -967,6 +973,7 @@ public class GloableParams {
     public static final int[] mmindexListImg = {
             R.drawable.ic_menu_head,
             R.drawable.ic_menu_head,
+            R.drawable.ic_menu_head
 //            R.drawable.ic_menu_head,
 //            R.drawable.ic_menu_head,
 //            R.drawable.ic_menu_head
@@ -1260,6 +1267,7 @@ public class GloableParams {
         GloableParams.ADDRESS_ADDRESSTAIL_SAVE= uriHead + GloableParams.ADDRESSTAIL_POST_SAVE;
         GloableParams.ADDRESS_ADDRESSTAIL_CHECK= uriHead + GloableParams.ADDRESSTAIL_POST_CHECK;
         GloableParams.ADDRESS_ADDRESSTAIL_VERIFICATION= uriHead + GloableParams.ADDRESSTAIL_VERIFICATION;
+        GloableParams.ADDRESS_ADDRESSTAIL_PRODONHANDCHECK= uriHead + GloableParams.ADDRESSTAIL_PRODONHANDCHECK;
 
 
 

+ 188 - 0
app/src/main/res/layout/fuzzy_stockinq_item.xml

@@ -0,0 +1,188 @@
+<?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="10dp"
+        android:layout_marginRight="10dp"
+        android:orientation="vertical"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginBottom="5dp">
+        <LinearLayout
+            android:orientation="horizontal"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:text="物料编号:"
+                android:textColor="@color/black"
+                android:layout_gravity="center">
+            </TextView>
+            <TextView
+                android:id="@+id/macode_ip__Tv"
+                android:gravity="center"
+                android:text=""
+                android:layout_gravity="center"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textColor="@color/blue" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:orientation="horizontal"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:text="物料名称:"
+                android:textColor="@color/black"
+                android:layout_gravity="center">
+            </TextView>
+            <TextView
+                android:id="@+id/tv_pr_detail"
+                android:gravity="center"
+                android:text=""
+                android:layout_gravity="center"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textColor="@color/blue" />
+        </LinearLayout>
+        <LinearLayout
+            android:orientation="horizontal"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:gravity="center"
+                android:text="物料规格:"
+                android:textColor="@color/black"
+                android:layout_gravity="center">
+            </TextView>
+            <TextView
+                android:id="@+id/tv_pr_spec"
+                android:gravity="center"
+                android:text=""
+                android:layout_gravity="center"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textColor="@color/blue" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:orientation="horizontal"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1">
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:gravity="center"
+                    android:text="总库存:"
+                    android:textColor="@color/black"
+                    android:layout_gravity="center">
+                </TextView>
+                <TextView
+                    android:id="@+id/tv_pwonhand"
+                    android:gravity="center"
+                    android:text=""
+                    android:layout_gravity="center"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/blue" />
+            </LinearLayout>
+
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1">
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:gravity="center"
+                    android:text="可用库存:"
+                    android:textColor="@color/black"
+                    android:layout_gravity="center">
+                </TextView>
+                <TextView
+                    android:id="@+id/tv_canuse"
+                    android:gravity="center"
+                    android:text=""
+                    android:layout_gravity="center"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/blue" />
+            </LinearLayout>
+        </LinearLayout>
+
+
+        <LinearLayout
+            android:orientation="horizontal"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1">
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:gravity="center"
+                    android:text="仓库编号:"
+                    android:textColor="@color/black"
+                    android:layout_gravity="center">
+                </TextView>
+                <TextView
+                    android:id="@+id/tv_wh_code"
+                    android:gravity="center"
+                    android:text=""
+                    android:layout_gravity="center"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/blue" />
+            </LinearLayout>
+
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1">
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:gravity="center"
+                    android:text="仓库名称:"
+                    android:textColor="@color/black"
+                    android:layout_gravity="center">
+                </TextView>
+                <TextView
+                    android:id="@+id/tv_wh_description"
+                    android:gravity="center"
+                    android:text=""
+                    android:layout_gravity="center"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textColor="@color/blue" />
+            </LinearLayout>
+        </LinearLayout>
+
+
+    </LinearLayout>
+</RelativeLayout>

+ 190 - 0
app/src/main/res/layout/stockinquiry_fragment.xml

@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:orientation="vertical">
+    <LinearLayout
+        android:layout_marginTop="@dimen/dp_10"
+        android:layout_marginLeft="10dp"
+        android:id="@+id/line_top1"
+        android:layout_width="match_parent"
+        android:layout_height="36dp"
+        android:background="@color/white"
+        android:orientation="horizontal">
+        <TextView
+            android:text="编号"
+            android:gravity="center"
+            android:layout_gravity="center"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+        </TextView>
+
+        <com.uas.uas_mes_zb_p.view.ClearableEditText
+            android:id="@+id/storage_recharge_collect_et"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            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/pr_code_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>
+
+    <LinearLayout
+        android:layout_marginTop="@dimen/dp_10"
+        android:layout_marginLeft="10dp"
+        android:id="@+id/line_top"
+        android:layout_width="match_parent"
+        android:layout_height="36dp"
+        android:background="@color/white"
+        android:orientation="horizontal">
+        <TextView
+            android:text="大类"
+            android:gravity="center"
+            android:layout_gravity="center"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+        </TextView>
+
+        <com.uas.uas_mes_zb_p.view.ClearableEditText
+            android:id="@+id/edit_et"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            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>
+    <LinearLayout
+        android:layout_marginTop="@dimen/dp_10"
+        android:layout_marginLeft="10dp"
+        android:id="@+id/line_top_two"
+        android:layout_width="match_parent"
+        android:layout_height="36dp"
+        android:background="@color/white"
+        android:orientation="horizontal">
+        <TextView
+            android:text="名称"
+            android:gravity="center"
+            android:layout_gravity="center"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+        </TextView>
+
+        <com.uas.uas_mes_zb_p.view.ClearableEditText
+            android:id="@+id/edit_gg"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            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_gg"
+            android:layout_width="46dp"
+            android:layout_height="match_parent"
+            android:layout_marginRight="10dp"
+            android:background="@drawable/bg_button"
+            android:src="@drawable/search_48" />
+    </LinearLayout>
+    <LinearLayout
+        android:layout_marginTop="@dimen/dp_10"
+        android:layout_marginLeft="10dp"
+        android:id="@+id/line_top_three"
+        android:layout_width="match_parent"
+        android:layout_height="36dp"
+        android:background="@color/white"
+        android:orientation="horizontal">
+        <TextView
+            android:text="板厚"
+            android:gravity="center"
+            android:layout_gravity="center"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+
+        </TextView>
+
+        <com.uas.uas_mes_zb_p.view.ClearableEditText
+            android:id="@+id/edit_mj"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            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_mj"
+            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_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_margin="@dimen/dp_10">
+    </android.support.v7.widget.RecyclerView>
+    <com.scwang.smartrefresh.layout.SmartRefreshLayout
+        android:id="@+id/pda_wms_in_filter_list_srl"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        android:visibility="gone">
+
+        <com.scwang.smartrefresh.layout.header.ClassicsHeader
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content" />
+
+        <com.bin.david.form.core.SmartTable
+            android:id="@+id/jlt_storage_in_filter_list_st"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_weight="1" />
+
+        <com.scwang.smartrefresh.layout.footer.ClassicsFooter
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            app:srlAccentColor="@android:color/darker_gray" />
+    </com.scwang.smartrefresh.layout.SmartRefreshLayout>
+
+</LinearLayout>

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

@@ -431,6 +431,7 @@
     <string name="title_takeapartthepallet">拆分(有库存)</string>
     <string name="title_materialchange">物料变更</string>
     <string name="outboundlist">出库单</string>
+    <string name="stockinquiry">库存核查</string>
     <string-array name="material_collect_menu">
         <item>已采集列表</item>
         <item>未采集明细</item>

+ 2 - 2
build.gradle

@@ -50,8 +50,8 @@ ext {
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 11,
-            versionName      : "v1.2"
+            versionCode      : 12,
+            versionName      : "v1.2.1"
     ]
 
     depsVersion = [