Browse Source

增加界面功能入口

ChengJH 1 năm trước cách đây
mục cha
commit
97ee57c9d4

+ 3 - 3
app/src/main/java/com/uas/hy_electronic/activity/IndexActivity.java

@@ -183,9 +183,9 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
     @Override
     protected void onResume() {
         super.onResume();
-        SharedPreUtil.saveString(this, "printAddress", "");
-        SharedPreUtil.saveInt(this, "printConnect", 0);
-        SharedPreUtil.saveInt(this, "printDpi", 203);
+//        SharedPreUtil.saveString(this, "printAddress", "");
+//        SharedPreUtil.saveInt(this, "printConnect", 0);
+//        SharedPreUtil.saveInt(this, "printDpi", 203);
     }
 
     @Override

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

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

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

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

+ 210 - 5
app/src/main/java/com/uas/hy_electronic/fragment/StorageIQCInFragment.java

@@ -21,6 +21,8 @@ import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.ListView;
 import android.widget.PopupWindow;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
 import android.widget.ScrollView;
 import android.widget.TextView;
 
@@ -55,7 +57,7 @@ import java.util.List;
 
 /**
  * @author RaoMeng
- * @describe 入库管理-IQC入库页面
+ * @describe 入库管理-IQC检验页面
  * @date 2018/4/22 17:14
  */
 
@@ -80,12 +82,34 @@ public class StorageIQCInFragment extends BaseFragment implements View.OnClickLi
     private WarehouseCacheAdapter mWarehouseCacheAdapter;
     private View mPopView;
     private int mVeId = 0;
+    private String text_rb= "合格";
 
     private StringRequest mStringRequest;
     private PopupWindow mMenuPopupWindow;
     private Fragment mFragment;
     private SpanUtils mSpanUtils;
     private double mOkQty;
+    private TextView tv_barcode;
+    private TextView tv_veCode;
+    private TextView tv_vadCode;
+    private TextView tv_prodcode;
+    private TextView tv_prDetail;
+    private TextView tv_prSpec;
+    private TextView tv_veOrderCode;
+    private TextView tv_veOrderNo;
+    private TextView tv_veVendName;
+    private TextView tv_testMethod;
+    private TextView tv_testResult;
+    private TextView tv_vadQty;
+    private TextView tv_checkQty;
+    private TextView tv_mOkQty;
+    private TextView tv_ngQty;
+    private TextView tv_status;
+    private RadioGroup rg_yesorno;
+    private RadioButton rb_yse;
+    private RadioButton rb_no;
+    private Button btn_shen;
+    private String datastring;
 
     @Override
     public void onDestroyView() {
@@ -120,6 +144,30 @@ public class StorageIQCInFragment extends BaseFragment implements View.OnClickLi
         mErrorTextView = (TextView) root.findViewById(R.id.storage_iqc_in_error_tv);
         mErrorScrollView = (ScrollView) root.findViewById(R.id.storage_iqc_in_error_sv);
 
+        tv_barcode = root.findViewById(R.id.tv_barcode);
+        tv_veCode = root.findViewById(R.id.tv_veCode);
+        tv_vadCode = root.findViewById(R.id.tv_vadCode);
+        tv_prodcode = root.findViewById(R.id.tv_prodcode);
+        tv_prDetail = root.findViewById(R.id.tv_prDetail);
+        tv_prSpec = root.findViewById(R.id.tv_prSpec);
+        tv_veOrderCode = root.findViewById(R.id.tv_veOrderCode);
+        tv_veOrderNo = root.findViewById(R.id.tv_veOrderNo);
+        tv_veVendName = root.findViewById(R.id.tv_veVendName);
+        tv_testMethod = root.findViewById(R.id.tv_testMethod);
+        tv_testResult = root.findViewById(R.id.tv_testResult);
+        tv_vadQty = root.findViewById(R.id.tv_vadQty);
+        tv_checkQty = root.findViewById(R.id.tv_checkQty);
+        tv_mOkQty = root.findViewById(R.id.tv_mOkQty);
+        tv_ngQty = root.findViewById(R.id.tv_ngQty);
+        tv_status = root.findViewById(R.id.tv_status);
+        rg_yesorno = root.findViewById(R.id.rg_yesorno);
+        rb_yse = root.findViewById(R.id.rb_yse);
+        rb_no = root.findViewById(R.id.rb_no);
+        btn_shen = root.findViewById(R.id.btn_shen);
+
+
+
+
         mCaptionValueBeans = new ArrayList<>();
         mCaptionValueItemAdapter = new CaptionValueItemAdapter(mActivity, mCaptionValueBeans);
         mDataListView.setAdapter(mCaptionValueItemAdapter);
@@ -157,8 +205,122 @@ public class StorageIQCInFragment extends BaseFragment implements View.OnClickLi
                 return false;
             }
         });
+        rg_yesorno.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(RadioGroup group, int checkedId) {
+                if (checkedId == R.id.rb_yse) {
+                    text_rb="合格";
+                } else if (checkedId == R.id.rb_no) {
+                    text_rb="不合格";
+                }
+            }
+        });
+        btn_shen.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                new AlertDialog.Builder(mActivity)
+                        .setMessage("确定是否是要审核")
+                        .setPositiveButton("是", new DialogInterface.OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialog, int which) {
+                                Yessehn();
+                            }
+                        })
+                        .setNegativeButton("否", new DialogInterface.OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialog, int which) {
+                                dialog.dismiss();
+                            }
+                        }).create().show();
+
+            }
+        });
     }
+    private static final int FLAG_UPDATEANDINQTY = 0x05;
+    public void Yessehn(){
+        if (mVeId == 0) {
+            CommonUtil.toastNoRepeat(mActivity, "单据id获取失败,请重新获取条码信息");
+            return;
+        }
+
+        if (TextUtils.isEmpty(mGoodWarehouse) && mOkQty > 0) {
+            CommonUtil.toastNoRepeat(mActivity, "该检验单存在合格数,良品仓必填\n");
+            return;
+        }
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_DOCUMENTLIBRARY_AUTIQC)
+                        .method(Request.Method.POST)
+                        .tag(TAG + "updateandinqty")
+                        .flag(FLAG_UPDATEANDINQTY)
+                        .addParam("ve_id", mVeId+"")
+                        .addParam("ve_result", text_rb)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        progressDialog.dismiss();
+                        String result = o.toString();
+                        JSONObject resultObject = JSON.parseObject(result);
+                        datastring = FastjsonUtil.getText(resultObject, "data");
+                        CommonUtil.toastNoRepeat(mActivity, datastring);
+//                        mDataLinearLayout.setVisibility(View.GONE);
+//                        mErrorScrollView.setVisibility(View.VISIBLE);
+                        if (!CommonUtil.isNetWorkConnected(mActivity)) {
+                            CommonUtil.toastNoRepeat(mActivity, mActivity.getString(R.string.net_not_connect));
+                        } else {
+
+                            if (!CommonUtil.isRepeatClick()) {
 
+                                hideAllViews();
+                                YessehnSTORAGE();
+                            }
+                        }
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+                    }
+                });
+    }
+    public void YessehnSTORAGE(){
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_TURNPURCBARCODE)
+                        .method(Request.Method.POST)
+                        .flag(FLAG_IQC_IN)
+                        .tag(TAG + "turnQc")
+                        .addParam("ve_id", mVeId + "")
+                        .addParam("okwh", mGoodWarehouse)
+                        .addParam("ngwh", mBadWarehouse)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        try {
+                            progressDialog.dismiss();
+                            String result = o.toString();
+                            JSONObject resultObject = JSON.parseObject(result);
+                            JSONObject dataObject = resultObject.getJSONObject("data");
+                            Log.e("dataObject===",dataObject.toString());
+                            if (dataObject != null) {
+                                CommonUtil.toastNoRepeat(mActivity, "入库单"+FastjsonUtil.getText(dataObject, "okNO")+"生成成功");
+
+                            }
+                        } catch (Exception e) {
+
+                        }
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+                    }
+                });
+    }
     @Override
     protected void initDatas() {
         //        mBadWarehouse = SharedPreUtil.getString(mActivity
@@ -365,13 +527,54 @@ public class StorageIQCInFragment extends BaseFragment implements View.OnClickLi
 
     @Override
     public void onSuccess(final int flag, Object o) throws Exception {
+        progressDialog.dismiss();
         switch (flag) {
             case FLAG_GET_BARCODE:
                 mBarcodeEditText.setText("");
-                progressDialog.dismiss();
                 try {
+                    progressDialog.dismiss();
                     String result = o.toString();
-                    analysisGetBarcode(result);
+                    JSONObject resultObject = JSON.parseObject(result);
+                    JSONObject dataObject = resultObject.getJSONObject("data");
+                    if (dataObject != null) {
+                        mVeId = FastjsonUtil.getInt(dataObject, "VE_ID");
+                        String barcode = FastjsonUtil.getText(dataObject, "barcode");
+                        String veCode = FastjsonUtil.getText(dataObject, "VE_CODE");
+                        String vadCode = FastjsonUtil.getText(dataObject, "VAD_CODE");
+                        String prodcode = FastjsonUtil.getText(dataObject, "VAD_PRODCODE");
+                        String prDetail = FastjsonUtil.getText(dataObject, "PR_DETAIL");
+                        String prSpec = FastjsonUtil.getText(dataObject, "PR_SPEC");
+                        String veOrderCode = FastjsonUtil.getText(dataObject, "VE_ORDERCODE");
+                        String veOrderNo = FastjsonUtil.getText(dataObject, "VE_ORDERDETNO");
+                        String veVendName = FastjsonUtil.getText(dataObject, "VAD_VENDNAME");
+                        String testMethod = FastjsonUtil.getText(dataObject, "VE_METHOD");
+                        String testResult = FastjsonUtil.getText(dataObject, "VE_RESULT");
+                        String vadQty = FastjsonUtil.getText(dataObject, "VAD_QTY");
+                        String checkQty = FastjsonUtil.getText(dataObject, "CHECKQTY");
+                        mOkQty = FastjsonUtil.getDouble(dataObject, "OKQTY");
+                        String ngQty = FastjsonUtil.getText(dataObject, "NGQTY");
+                        String status = FastjsonUtil.getText(dataObject, "VE_STATUS");
+                        String goodWhcode = FastjsonUtil.getText(dataObject, "DEFAULTWHCODE");
+                        String goodWhname = FastjsonUtil.getText(dataObject, "DEFAULTWHNAME");
+                        tv_barcode.setText(barcode);
+                        tv_veCode.setText(veCode);
+                        tv_vadCode.setText(vadCode);
+                        tv_prodcode.setText(prodcode);
+                        tv_prDetail.setText(prDetail);
+                        tv_prSpec.setText(prSpec);
+                        tv_veOrderCode.setText(veOrderCode);
+                        tv_veOrderNo.setText(veOrderNo);
+                        tv_veVendName.setText(veVendName);
+                        tv_testMethod.setText(testMethod);
+                        tv_vadQty.setText(vadQty);
+                        tv_checkQty.setText(checkQty);
+                        tv_mOkQty.setText(mOkQty+"");
+                        tv_ngQty.setText(ngQty);
+                        tv_status.setText(status);
+                    }
+                    mErrorScrollView.setVisibility(View.GONE);
+                    mDataLinearLayout.setVisibility(View.VISIBLE);
+//                    analysisGetBarcode(result);
                 } catch (Exception e) {
                     mDataLinearLayout.setVisibility(View.GONE);
                     mErrorTextView.setText("条码数据获取异常,请重新获取");
@@ -379,11 +582,12 @@ public class StorageIQCInFragment extends BaseFragment implements View.OnClickLi
                 }
                 break;
             case FLAG_IQC_IN:
-                progressDialog.dismiss();
                 try {
+                    progressDialog.dismiss();
                     String result = o.toString();
                     JSONObject resultObject = JSON.parseObject(result);
                     JSONObject dataObject = resultObject.getJSONObject("data");
+                    Log.e("dataObject===",dataObject.toString());
                     if (dataObject != null) {
                         final JSONObject okNoObject = dataObject.getJSONObject("okNO");
                         if (okNoObject == null) {
@@ -434,6 +638,7 @@ public class StorageIQCInFragment extends BaseFragment implements View.OnClickLi
 
     @Override
     public void onFail(int flag, String failStr) throws Exception {
+
         switch (flag) {
             case FLAG_GET_BARCODE:
                 mBarcodeEditText.setText("");
@@ -555,7 +760,7 @@ public class StorageIQCInFragment extends BaseFragment implements View.OnClickLi
         mErrorTextView.setText("");
         mErrorScrollView.setVisibility(View.GONE);
         mCaptionValueBeans.clear();
-        mCaptionValueItemAdapter.notifyDataSetChanged();
+//        mCaptionValueItemAdapter.notifyDataSetChanged();
     }
 
     @Override

+ 38 - 16
app/src/main/java/com/uas/hy_electronic/global/GloableParams.java

@@ -262,6 +262,13 @@ public class GloableParams {
     public static String ADDRESS_DOCUMENTLIBRARY_MAKEPACKAGELIST;
     public static String ADDRESS_DOCUMENTLIBRARY_MAKESNLIST;
     public static String ADDRESS_DOCUMENTLIBRARY_MAKESNPACKAGE;
+    public static String ADDRESS_DOCUMENTLIBRARY_AUTIQC;
+    public static String ADDRESS_INVENTORYBINDING;
+    public static String ADDRESS_INVENTORYBINDING2;
+    public static String ADDRESS_TURNPURCBARCODE;
+
+
+
 
 
     //连接服务器请求地址
@@ -677,6 +684,11 @@ public class GloableParams {
     //完工品出库已采集数据删除
     private static String ADDRESSTAIL_OUT_FINISH_DELETE_DETAIL = "/api/pda/outFinish/deleteDetail.action";
 
+    //库存条码绑定
+    private static final String ADDRESSTAIL_INVENTORYBINDING="/api/pda/receiving/stocksaveBarcode2Confirm.action";
+    private static final String ADDRESSTAIL_RECEIVING_INVENTORYBINDING2 = "/api/pda/receiving/stocksaveBarcode2.action";
+
+
     /**
      * 收料
      */
@@ -685,6 +697,7 @@ public class GloableParams {
     private static String ADDRESSTAIL_RECHARGE_GETLIST_NEEDGET = "/api/pda/acceptNToVerify/getNeedGetList.action";
     private static String ADDRESSTAIL_RECHARGE_TURNPURCHASECHANGE = "/api/pda/acceptNToVerify/turnPurchaseChange.action";
     private static String ADDRESSTAIL_RECHARGE_UPDATEANDINQTY = "/api/pda/acceptNToVerify/updateAndInqty.action";
+    private static String ADDRESSTAIL_RECHARGE_AUTIQC = "/api/pda/QCToPurcCheckin/autiQc.action";
 
     /**
      * 送检
@@ -698,6 +711,7 @@ public class GloableParams {
     private static String ADDRESSTAIL_IQC_GETDATA_BARCODE = "/api/pda/QCToPurcCheckin/getDataByBar.action";
     private static String ADDRESSTAIL_IQC_TURN_PURC_STORAGE = "/api/pda/QCToPurcCheckin/turnPurcStorage.action";
     private static String ADDRESSTAIL_IQC_GETLIST_NEEDGET = "/api/pda/QCToPurcCheckin/getNeedGetList.action";
+    private static String ADDRESSTAIL_IQC_GETLIST_TURNPURCBARCODE = "/api/pda/QCToPurcCheckin/turnPurcBarCode.action";
 
     /**
      * MSD管理
@@ -806,6 +820,7 @@ public class GloableParams {
     public static final String GRIDNAME_FINISHED_MOVE_THE_CONTAINER = "移箱";
     public static final String GRIDNAME_FINISHED_DISMOUNTING = "拆装箱";
     public static final String GRIDNAME_FINISHED_INQUIRE = "箱号查询";
+    public static final String MENU_STORAGE_STOCK_INFO_COLLECT = "库存条码绑定";
     public static final String[] storageGridNames = {
             GRIDNAME_GOOD_SEARCH,
             GRIDNAME_BATCH_OPRATION,
@@ -813,24 +828,28 @@ public class GloableParams {
             GRIDNAME_MODIFY_QUANTITY,
 //            GRIDNAME_WORK_INVENTORY,
             MENU_STORAGE_BARCODE_INFO_COLLECT,
-            GRIDNAME_BOM_CHECK,
-            GRIDNAME_FINISHED_PRODUCT_STORAGE,
-            GRIDNAME_FINISHED_PRODUCT_OUTBOUND,
+            MENU_STORAGE_STOCK_INFO_COLLECT
+//            GRIDNAME_BOM_CHECK,
+//            GRIDNAME_FINISHED_PRODUCT_STORAGE,
+//            GRIDNAME_FINISHED_PRODUCT_OUTBOUND,
 //            GRIDNAME_FINISHED_MOVE_THE_CONTAINER,
-            GRIDNAME_FINISHED_DISMOUNTING,
-            GRIDNAME_FINISHED_INQUIRE};
+//            GRIDNAME_FINISHED_DISMOUNTING,
+//            GRIDNAME_FINISHED_INQUIRE
+    };
     public static final int[] storageGridImgs = {
             R.drawable.storage_good_search,
             R.drawable.storage_bach_operation,
 //            R.drawable.storage_transfer,
             R.drawable.storage_work_inventory,
             R.drawable.ic_modify_quantity,
-            R.drawable.storage_msd_manager,
-            R.drawable.ic_finished_product_storage,
-            R.drawable.ic_finished_product_outbound,
+            R.drawable.storage_transfer
+//            R.drawable.storage_msd_manager,
+//            R.drawable.ic_finished_product_storage,
+//            R.drawable.ic_finished_product_outbound,
 //            R.drawable.move_the_container,
-            R.drawable.ic_dismounting,
-            R.drawable.ic_inquire};
+//            R.drawable.ic_dismounting,
+//            R.drawable.ic_inquire
+    };
     //DETAIL:搜索备料单号,下拉列表
     public static final String SPINNER_PREPARE_SEARCH = "搜索备料单号";
     public static final String SPINNER_MAKECODE_SEARCH = "搜索制造单号";
@@ -868,7 +887,7 @@ public class GloableParams {
     //-->入库管理
     public static final String MENU_STORAGE_RECHARGE = "收料";
     public static final String MENU_STORAGE_INSPECTION = "送检";
-    public static final String MENU_STORAGE_IQC_STORAGE_IN = "IQC入库";
+    public static final String MENU_STORAGE_IQC_STORAGE_IN = "IQC检验";
     public static final String MENU_STORAGE_MATERIAL_STORAGE_IN = "入库绑定";
     //    public static final String MENU_STORAGE_PRODUCT_CHECK = "成品检验";
     public static final String MENU_STORAGE_PRODUCT_STORAGE_IN = "完工品入库";
@@ -877,22 +896,22 @@ public class GloableParams {
 
     public static final String[] storageInMenuNames = {
             MENU_STORAGE_RECHARGE,
-            MENU_STORAGE_INSPECTION,
+//            MENU_STORAGE_INSPECTION,
             MENU_STORAGE_IQC_STORAGE_IN,
             MENU_STORAGE_MATERIAL_STORAGE_IN,
 //            MENU_STORAGE_PRODUCT_STORAGE_IN,
-            MENU_STORAGE_RANDOM_CHECK,
+//            MENU_STORAGE_RANDOM_CHECK,
             MENU_STORAGE_BARCODE_IN,
 //            MENU_STORAGE_BARCODE_INFO_COLLECT,
 //            LIBRARY_COLLECTION
     };
     public static final int[] storageInMenuImgs = {
             R.drawable.ic_storage_recharge,
-            R.drawable.ic_storage_inspection,
+//            R.drawable.ic_storage_inspection,
             R.drawable.ic_storage_iqc,
             R.drawable.ic_storage_material_in,
 //            R.drawable.ic_storage_finish_in,
-            R.drawable.ic_storage_random_check,
+//            R.drawable.ic_storage_random_check,
             R.drawable.ic_storage_barcode_in,
 //            R.drawable.ic_barcode_info_collect,
 //            R.drawable.ic_storage_iqc
@@ -1202,7 +1221,10 @@ public class GloableParams {
         GloableParams.ADDRESS_DOCUMENTLIBRARY_MAKESNLIST= uriHead + GloableParams.ADDRESSTAIL_MAKESNLIST;
 
         GloableParams.ADDRESS_DOCUMENTLIBRARY_MAKESNPACKAGE= uriHead + GloableParams.ADDRESSTAIL_MAKESNPACKAGE;
-
+        GloableParams.ADDRESS_DOCUMENTLIBRARY_AUTIQC= uriHead + GloableParams.ADDRESSTAIL_RECHARGE_AUTIQC;
+        GloableParams.ADDRESS_INVENTORYBINDING= uriHead + GloableParams.ADDRESSTAIL_INVENTORYBINDING;
+        GloableParams.ADDRESS_INVENTORYBINDING2= uriHead + GloableParams.ADDRESSTAIL_RECEIVING_INVENTORYBINDING2;
+        GloableParams.ADDRESS_TURNPURCBARCODE= uriHead + GloableParams.ADDRESSTAIL_IQC_GETLIST_TURNPURCBARCODE;
 
     }
 }

+ 1 - 1
app/src/main/java/com/uas/hy_electronic/tools/RegexUtil.java

@@ -10,7 +10,7 @@ public class RegexUtil {
     //正则表达式
 //    public static String IP_FORMAT = "((2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.){3}(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)";
     public static String IP_FORMAT = "^((25[0-5])|(2[0-4]\\d)|(1\\d\\d)|([1-9]\\d)|\\d)(\\.((25[0-5])|(2[0-4]\\d)|(1\\d\\d)|([1-9]\\d)|\\d)){3}$|^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}$";
-    public static String PORT_FORMAT = "^[1-9]$|(^[1-9][0-9]$)|(^[1-9][0-9][0-9]$)|(^[1-9][0-9][0-9][0-9]$)|(^[1-6][0-5][0-5][0-3][0-9]$)";
+    public static String PORT_FORMAT = "^[0-9]$|(^[0-9][0-9]$)|(^[0-9][0-9][0-9]$)|(^[0-9][0-9][0-9][0-9]$)|(^[0-9][0-9][0-9][0-9][0-9]$)";
     // public static String PORT_FORMAT = "(\\d)+";
 
     public static boolean checkString(String str, String regx) {

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

@@ -25,7 +25,7 @@ public class PrintUtils {
             int offset = 6,
                     h = 400,
                     v = 800,
-                    height = 220,//400
+                    height = 400,//400
                     qty = 1;
 
             JSONArray templateArray = JSON.parseArray(printTemplate);

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

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

+ 523 - 117
app/src/main/res/layout/fragment_storage_iqc_in.xml

@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical"
@@ -32,144 +31,551 @@
             android:clickable="false"
             android:src="@drawable/ic_edittext_scan" />
     </LinearLayout>
-
-    <FrameLayout
+    <ScrollView
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_marginTop="12dp">
-
-        <LinearLayout
-            android:id="@+id/storage_iqc_in_data_ll"
+        android:layout_height="wrap_content">
+        <FrameLayout
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:orientation="vertical"
-            android:visibility="gone"
-            tools:visibility="visible"
-           >
-
-            <ListView
-                android:id="@+id/storage_iqc_in_data_lv"
-                android:layout_width="match_parent"
-                android:layout_height="0dp"
-                android:layout_weight="1"
-                android:divider="@null" />
+            android:layout_marginTop="12dp">
 
             <LinearLayout
+                android:id="@+id/storage_iqc_in_data_ll"
                 android:layout_width="match_parent"
-                android:layout_height="36dp"
-                android:gravity="center_vertical"
-                android:orientation="horizontal"
-                android:paddingBottom="3dp"
-                android:paddingLeft="12dp"
-                android:paddingRight="15dp"
-                android:paddingTop="3dp">
+                android:layout_height="match_parent"
+                android:orientation="vertical"
+                android:visibility="gone">
+                <LinearLayout
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="1"
+                        android:textSize="14sp"
+                        android:text="条码号:" />
 
-                <TextView
-                    android:layout_width="0dp"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="2"
-                    android:text="良品仓:"
-                    android:textColor="@color/black"
-                    android:textSize="14sp" />
-
-                <RelativeLayout
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    android:layout_weight="5">
+                    <TextView
+                        android:id="@+id/tv_barcode"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="3"
+                        android:textColor="@color/black"
+                        android:textSize="14sp"
+                        android:text=" " />
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="1"
+                        android:textSize="14sp"
+                        android:text="检验单号:" />
 
                     <TextView
-                        android:id="@+id/storage_iqc_good_warehouse_et"
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:background="@drawable/bg_line_edittext"
-                        android:gravity="center_vertical"
-                        android:hint="请选择"
-                        android:paddingLeft="10dp"
-                        android:paddingRight="10dp"
+                        android:id="@+id/tv_veCode"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="3"
+                        android:textColor="@color/black"
+                        android:textSize="14sp"
+                        android:text=" " />
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="1"
+                        android:textSize="14sp"
+                        android:text="收料单号:" />
+
+                    <TextView
+                        android:id="@+id/tv_vadCode"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="3"
+                        android:textColor="@color/black"
+                        android:textSize="14sp"
+                        android:text=" " />
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="1"
+                        android:textSize="14sp"
+                        android:text="物料编号:" />
+
+                    <TextView
+                        android:id="@+id/tv_prodcode"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="3"
+                        android:textColor="@color/black"
+                        android:textSize="14sp"
+                        android:text=" " />
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="1"
+                        android:textSize="14sp"
+                        android:text="物料名称:" />
+
+                    <TextView
+                        android:id="@+id/tv_prDetail"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="3"
+                        android:textColor="@color/black"
+                        android:textSize="14sp"
+                        android:text=" " />
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="1"
+                        android:textSize="14sp"
+                        android:text="物料规格:" />
+
+                    <TextView
+                        android:id="@+id/tv_prSpec"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="3"
+                        android:textColor="@color/black"
+                        android:textSize="14sp"
+                        android:text=" " />
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="1"
+                        android:textSize="14sp"
+                        android:text="采购单:" />
+
+                    <TextView
+                        android:id="@+id/tv_veOrderCode"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="3"
+                        android:textColor="@color/black"
+                        android:textSize="14sp"
+                        android:text=" " />
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="1"
+                        android:textSize="14sp"
+                        android:text="序号:" />
+
+                    <TextView
+                        android:id="@+id/tv_veOrderNo"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="3"
+                        android:textColor="@color/black"
+                        android:textSize="14sp"
+                        android:text=" " />
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="1"
+                        android:textSize="14sp"
+                        android:text="供应商:" />
+
+                    <TextView
+                        android:id="@+id/tv_veVendName"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="3"
+                        android:textColor="@color/black"
+                        android:textSize="14sp"
+                        android:text=" " />
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="1"
+                        android:textSize="14sp"
+                        android:text="检验方式:" />
+
+                    <TextView
+                        android:id="@+id/tv_testMethod"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="3"
+                        android:textColor="@color/black"
+                        android:textSize="14sp"
+                        android:text=" " />
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        android:layout_gravity="center"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="1"
+                        android:textSize="14sp"
+                        android:text="检验结果:" />
+                    <RadioGroup
+                        android:id="@+id/rg_yesorno"
+                        android:orientation="horizontal"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="3">
+                        <RadioButton
+                            android:id="@+id/rb_yse"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:textSize="14sp"
+                            android:checked="true"
+                            android:text="合格">
+                        </RadioButton>
+                        <RadioButton
+                            android:id="@+id/rb_no"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:textSize="14sp"
+                            android:text="不合格">
+                        </RadioButton>
+                    </RadioGroup>
+                    <TextView
+                        android:id="@+id/tv_testResult"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="3"
+                        android:textColor="@color/black"
+                        android:textSize="14sp"
+                        android:text=" "
+                        android:visibility="gone"/>
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="1"
+                        android:textSize="14sp"
+                        android:text="收料数:" />
+
+                    <TextView
+                        android:id="@+id/tv_vadQty"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="3"
+                        android:textColor="@color/black"
+                        android:textSize="14sp"
+                        android:text=" " />
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        android:layout_gravity="center"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="1"
+                        android:textSize="14sp"
+                        android:text="送检数:" />
+
+
+                    <TextView
+                        android:id="@+id/tv_checkQty"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="3"
+                        android:textColor="@color/black"
+                        android:textSize="14sp"
+                        android:text=" " />
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="1"
+                        android:textSize="14sp"
+                        android:text="合格数:" />
+
+                    <TextView
+                        android:id="@+id/tv_mOkQty"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="3"
+                        android:textColor="@color/black"
+                        android:textSize="14sp"
+                        android:text=" " />
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="1"
+                        android:textSize="14sp"
+                        android:text="不合格数:" />
+
+                    <TextView
+                        android:id="@+id/tv_ngQty"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="3"
+                        android:textColor="@color/black"
+                        android:textSize="14sp"
+                        android:text=" " />
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="1"
+                        android:textSize="14sp"
+                        android:text="状态:" />
+
+                    <TextView
+                        android:id="@+id/tv_status"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="4dp"
+                        android:layout_weight="3"
+                        android:textColor="@color/black"
+                        android:textSize="14sp"
+                        android:text=" " />
+                </LinearLayout>
+
+                <ListView
+                    android:visibility="gone"
+                    android:id="@+id/storage_iqc_in_data_lv"
+                    android:layout_width="match_parent"
+                    android:layout_height="0dp"
+                    android:layout_weight="1"
+                    android:divider="@null" />
+                <LinearLayout
+
+                    android:layout_width="match_parent"
+                    android:layout_height="36dp"
+                    android:gravity="center_vertical"
+                    android:orientation="horizontal"
+                    android:paddingBottom="3dp"
+                    android:paddingLeft="12dp"
+                    android:paddingRight="15dp"
+                    android:paddingTop="3dp">
+
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="2"
+                        android:text="良品仓:"
+                        android:textColor="@color/black"
                         android:textSize="14sp" />
 
-                    <ImageView
-                        android:id="@+id/storage_iqc_good_warehouse_iv"
-                        android:layout_width="36dp"
+                    <RelativeLayout
+                        android:layout_width="0dp"
                         android:layout_height="match_parent"
-                        android:layout_alignParentEnd="true"
-                        android:layout_alignParentRight="true"
-                        android:layout_centerVertical="true"
-                        android:paddingRight="4dp"
-                        android:scaleType="center"
-                        android:src="@drawable/ic_menu_retract" />
-                </RelativeLayout>
-            </LinearLayout>
+                        android:layout_weight="5">
 
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="36dp"
-                android:gravity="center_vertical"
-                android:orientation="horizontal"
-                android:paddingBottom="3dp"
-                android:paddingLeft="12dp"
-                android:paddingRight="15dp"
-                android:paddingTop="3dp">
+                        <TextView
+                            android:id="@+id/storage_iqc_good_warehouse_et"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:background="@drawable/bg_line_edittext"
+                            android:gravity="center_vertical"
+                            android:hint="请选择"
+                            android:paddingLeft="10dp"
+                            android:paddingRight="10dp"
+                            android:textSize="14sp" />
 
-                <TextView
-                    android:layout_width="0dp"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="2"
-                    android:text="不良品仓:"
-                    android:textColor="@color/black"
-                    android:textSize="14sp" />
-
-                <RelativeLayout
-                    android:layout_width="0dp"
-                    android:layout_height="match_parent"
-                    android:layout_weight="5">
+                        <ImageView
+                            android:id="@+id/storage_iqc_good_warehouse_iv"
+                            android:layout_width="36dp"
+                            android:layout_height="match_parent"
+                            android:layout_alignParentEnd="true"
+                            android:layout_alignParentRight="true"
+                            android:layout_centerVertical="true"
+                            android:paddingRight="4dp"
+                            android:scaleType="center"
+                            android:src="@drawable/ic_menu_retract" />
+                    </RelativeLayout>
+                </LinearLayout>
+
+                <LinearLayout
+
+                    android:layout_width="match_parent"
+                    android:layout_height="36dp"
+                    android:gravity="center_vertical"
+                    android:orientation="horizontal"
+                    android:paddingBottom="3dp"
+                    android:paddingLeft="12dp"
+                    android:paddingRight="15dp"
+                    android:paddingTop="3dp">
 
                     <TextView
-                        android:id="@+id/storage_iqc_bad_warehouse_et"
-                        android:layout_width="match_parent"
-                        android:layout_height="match_parent"
-                        android:background="@drawable/bg_line_edittext"
-                        android:gravity="center_vertical"
-                        android:hint="请选择"
-                        android:paddingLeft="10dp"
-                        android:paddingRight="10dp"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="2"
+                        android:text="不良品仓:"
+                        android:textColor="@color/black"
                         android:textSize="14sp" />
 
-                    <ImageView
-                        android:id="@+id/storage_iqc_bad_warehouse_iv"
-                        android:layout_width="36dp"
+                    <RelativeLayout
+                        android:layout_width="0dp"
                         android:layout_height="match_parent"
-                        android:layout_alignParentEnd="true"
-                        android:layout_alignParentRight="true"
-                        android:layout_centerVertical="true"
-                        android:paddingRight="4dp"
-                        android:scaleType="center"
-                        android:src="@drawable/ic_menu_retract"
-                        android:visibility="gone" />
-                </RelativeLayout>
-            </LinearLayout>
+                        android:layout_weight="5">
 
-            <Button
-                android:id="@+id/storage_iqc_in_commit_btn"
-                style="@style/ButtonStyle"
-                android:layout_marginTop="10dp"
-                android:text="入库" />
-        </LinearLayout>
+                        <TextView
+                            android:id="@+id/storage_iqc_bad_warehouse_et"
+                            android:layout_width="match_parent"
+                            android:layout_height="match_parent"
+                            android:background="@drawable/bg_line_edittext"
+                            android:gravity="center_vertical"
+                            android:hint="请选择"
+                            android:paddingLeft="10dp"
+                            android:paddingRight="10dp"
+                            android:textSize="14sp" />
+
+                        <ImageView
+                            android:id="@+id/storage_iqc_bad_warehouse_iv"
+                            android:layout_width="36dp"
+                            android:layout_height="match_parent"
+                            android:layout_alignParentEnd="true"
+                            android:layout_alignParentRight="true"
+                            android:layout_centerVertical="true"
+                            android:paddingRight="4dp"
+                            android:scaleType="center"
+                            android:src="@drawable/ic_menu_retract"
+                            android:visibility="gone" />
+                    </RelativeLayout>
+                </LinearLayout>
+                <Button
+                    android:layout_marginBottom="@dimen/dp_10"
+                    android:id="@+id/btn_shen"
+                    style="@style/ButtonStyle"
+                    android:layout_marginTop="10dp"
+                    android:text="审核" />
 
-        <ScrollView
-            android:id="@+id/storage_iqc_in_error_sv"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:background="@color/white"
-            android:visibility="gone">
 
-            <TextView
-                android:id="@+id/storage_iqc_in_error_tv"
+                <Button
+                    android:id="@+id/storage_iqc_in_commit_btn"
+                    style="@style/ButtonStyle"
+                    android:layout_marginTop="10dp"
+                    android:text="入库"
+                    android:visibility="gone"/>
+            </LinearLayout>
+
+            <ScrollView
+                android:id="@+id/storage_iqc_in_error_sv"
                 android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:padding="10dp"
-                android:textSize="16sp"
-                tools:text="错误信息" />
-        </ScrollView>
-    </FrameLayout>
+                android:background="@color/white"
+                android:visibility="gone">
+
+                <TextView
+                    android:id="@+id/storage_iqc_in_error_tv"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:padding="10dp"
+                    android:textSize="16sp"
+                    android:text="错误信息" />
+            </ScrollView>
+        </FrameLayout>
+    </ScrollView>
+
+
 </LinearLayout>

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

@@ -423,7 +423,7 @@
     <string name="str_default_rejects_warehouse">默认不良品仓库编号</string>
     <string name="rejects_default_warehouse">不良品仓库编号</string>
     <string name="title_storage_inspection">送检</string>
-    <string name="title_storage_iqc">IQC入库</string>
+    <string name="title_storage_iqc">IQC检验</string>
     <string name="title_storage_recharge">收料</string>
     <string name="outboundlist">成品出库单列表</string>
 

+ 4 - 0
pda_libs/bluetooth/src/main/java/com/uas/bluetooth/PrintHelper.java

@@ -86,6 +86,10 @@ public class PrintHelper {
             this.textSize = textSize;
             return this;
         }
+        public TextBuilder setTextAutLine(String x,String y,int width,int size,boolean isbole,boolean isdouble,String str) throws Exception {
+            HPRTPrinterHelper .AutLine(x,y,width,size,isbole,isdouble,str);
+            return this;
+        }
 
         public TextBuilder setBold(int bold) {
             if (bold < 0) {