Kaynağa Gözat

增加按条码拆分功能及接口

songw 3 ay önce
ebeveyn
işleme
53283b0c0a

+ 164 - 0
app/src/main/java/com/uas/jc_wms/bean/CodePrinBean.java

@@ -0,0 +1,164 @@
+package com.uas.jc_wms.bean;
+
+public class CodePrinBean {
+
+    /**
+     * success : true
+     * data : {"BAR_LASTPRINTMAN":"打印人:优软-杨鹏","BAR_WHCODE":"仓库:03","BAR_REMAIN":8,"MADEDATE":"生产周期:2024-06-29","VE_NAME":"供应商:null","PR_CODE":"料号:5.01.03.02.010","BAR_CODE":null,"BAR_LASTPRINTDATE":"打印日期:2024-09-26 13:48:53","BAR_BATCHCODE":null,"BAR_VENDBARCODE":"批次号:null","BAR_QR":null,"PR_SPEC":"规格:LB01-AC-1.2M(T5)","BAR_LOCATION":"仓位:null"}
+     */
+
+    private boolean success;
+    private DataBean data;
+
+    public boolean isSuccess() {
+        return success;
+    }
+
+    public void setSuccess(boolean success) {
+        this.success = success;
+    }
+
+    public DataBean getData() {
+        return data;
+    }
+
+    public void setData(DataBean data) {
+        this.data = data;
+    }
+
+    public static class DataBean {
+        /**
+         * BAR_LASTPRINTMAN : 打印人:优软-杨鹏
+         * BAR_WHCODE : 仓库:03
+         * BAR_REMAIN : 8.0
+         * MADEDATE : 生产周期:2024-06-29
+         * VE_NAME : 供应商:null
+         * PR_CODE : 料号:5.01.03.02.010
+         * BAR_CODE : null
+         * BAR_LASTPRINTDATE : 打印日期:2024-09-26 13:48:53
+         * BAR_BATCHCODE : null
+         * BAR_VENDBARCODE : 批次号:null
+         * BAR_QR : null
+         * PR_SPEC : 规格:LB01-AC-1.2M(T5)
+         * BAR_LOCATION : 仓位:null
+         */
+
+        private String BAR_LASTPRINTMAN;
+        private String BAR_WHCODE;
+        private double BAR_REMAIN;
+        private String MADEDATE;
+        private String VE_NAME;
+        private String PR_CODE;
+        private Object BAR_CODE;
+        private String BAR_LASTPRINTDATE;
+        private Object BAR_BATCHCODE;
+        private String BAR_VENDBARCODE;
+        private Object BAR_QR;
+        private String PR_SPEC;
+        private String BAR_LOCATION;
+
+        public String getBAR_LASTPRINTMAN() {
+            return BAR_LASTPRINTMAN;
+        }
+
+        public void setBAR_LASTPRINTMAN(String BAR_LASTPRINTMAN) {
+            this.BAR_LASTPRINTMAN = BAR_LASTPRINTMAN;
+        }
+
+        public String getBAR_WHCODE() {
+            return BAR_WHCODE;
+        }
+
+        public void setBAR_WHCODE(String BAR_WHCODE) {
+            this.BAR_WHCODE = BAR_WHCODE;
+        }
+
+        public double getBAR_REMAIN() {
+            return BAR_REMAIN;
+        }
+
+        public void setBAR_REMAIN(double BAR_REMAIN) {
+            this.BAR_REMAIN = BAR_REMAIN;
+        }
+
+        public String getMADEDATE() {
+            return MADEDATE;
+        }
+
+        public void setMADEDATE(String MADEDATE) {
+            this.MADEDATE = MADEDATE;
+        }
+
+        public String getVE_NAME() {
+            return VE_NAME;
+        }
+
+        public void setVE_NAME(String VE_NAME) {
+            this.VE_NAME = VE_NAME;
+        }
+
+        public String getPR_CODE() {
+            return PR_CODE;
+        }
+
+        public void setPR_CODE(String PR_CODE) {
+            this.PR_CODE = PR_CODE;
+        }
+
+        public Object getBAR_CODE() {
+            return BAR_CODE;
+        }
+
+        public void setBAR_CODE(Object BAR_CODE) {
+            this.BAR_CODE = BAR_CODE;
+        }
+
+        public String getBAR_LASTPRINTDATE() {
+            return BAR_LASTPRINTDATE;
+        }
+
+        public void setBAR_LASTPRINTDATE(String BAR_LASTPRINTDATE) {
+            this.BAR_LASTPRINTDATE = BAR_LASTPRINTDATE;
+        }
+
+        public Object getBAR_BATCHCODE() {
+            return BAR_BATCHCODE;
+        }
+
+        public void setBAR_BATCHCODE(Object BAR_BATCHCODE) {
+            this.BAR_BATCHCODE = BAR_BATCHCODE;
+        }
+
+        public String getBAR_VENDBARCODE() {
+            return BAR_VENDBARCODE;
+        }
+
+        public void setBAR_VENDBARCODE(String BAR_VENDBARCODE) {
+            this.BAR_VENDBARCODE = BAR_VENDBARCODE;
+        }
+
+        public Object getBAR_QR() {
+            return BAR_QR;
+        }
+
+        public void setBAR_QR(Object BAR_QR) {
+            this.BAR_QR = BAR_QR;
+        }
+
+        public String getPR_SPEC() {
+            return PR_SPEC;
+        }
+
+        public void setPR_SPEC(String PR_SPEC) {
+            this.PR_SPEC = PR_SPEC;
+        }
+
+        public String getBAR_LOCATION() {
+            return BAR_LOCATION;
+        }
+
+        public void setBAR_LOCATION(String BAR_LOCATION) {
+            this.BAR_LOCATION = BAR_LOCATION;
+        }
+    }
+}

+ 24 - 0
app/src/main/java/com/uas/jc_wms/bean/PrintDataBean.java

@@ -0,0 +1,24 @@
+package com.uas.jc_wms.bean;
+
+public class PrintDataBean {
+
+    private String BAR_CODE;
+    private String BAR_REMAIN;
+
+
+    public String getBAR_CODE() {
+        return BAR_CODE;
+    }
+
+    public void setBAR_CODE(String BAR_CODE) {
+        this.BAR_CODE = BAR_CODE;
+    }
+
+    public String getBAR_REMAIN() {
+        return BAR_REMAIN;
+    }
+
+    public void setBAR_REMAIN(String BAR_REMAIN) {
+        this.BAR_REMAIN = BAR_REMAIN;
+    }
+}

+ 278 - 406
app/src/main/java/com/uas/jc_wms/fragment/IOCOutMakeMaterialOper.java

@@ -87,6 +87,7 @@ import org.json.JSONException;
 import org.json.JSONObject;
 
 import java.io.File;
+import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import java.util.ArrayList;
@@ -94,9 +95,14 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
+import okhttp3.Call;
+import okhttp3.Callback;
+import okhttp3.FormBody;
 import okhttp3.OkHttpClient;
+import okhttp3.RequestBody;
 
 /**
  * Created by RaoMeng on 2016/7/27.
@@ -107,6 +113,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
     private static final int SPLIT_BARCODE_SUCCESS = 104;
     private static final int SPLIT_BARCODE_FAIL = 105;
     private static final int FLAG_CONFIRM_POST = 0x05;
+    private static final int BarcodeSplitting = 0x06;      //按条码拆分
 
     private TextView tvPiInoutno;
     private  TextView tvPdWhcode;
@@ -1117,6 +1124,19 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         if (flag == FLAG_CONFIRM_POST) {
             progressDialog.dismiss();
             CommonUtil.toastNoRepeat(mActivity, "过账成功");
+        }else if (flag == BarcodeSplitting) {
+            progressDialog.dismiss();
+            try {
+                String result = o.toString();
+                if (FastjsonUtil.validate(result)) {
+                    com.alibaba.fastjson.JSONObject resultObject = JSON.parseObject(result);
+                    if (resultObject != null) {
+                        CommonUtil.toastNoRepeat(mActivity,FastjsonUtil.getText(resultObject, "data"));
+                    }
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
         }
     }
 
@@ -1125,6 +1145,9 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         if (flag == FLAG_CONFIRM_POST) {
             progressDialog.dismiss();
             CommonUtil.toastNoRepeat(mActivity, failStr);
+        }else if (flag == BarcodeSplitting) {
+            progressDialog.dismiss();
+            CommonUtil.toastNoRepeat(mActivity, failStr);
         }
     }
 
@@ -1201,6 +1224,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                 Button stockSpecialBtn = (Button) materialOutMoreView.findViewById(R.id.pop_material_out_menu_5);
                 Button passBillBtn = (Button) materialOutMoreView.findViewById(R.id.pop_material_out_menu_6);
                 Button stockDataSummary = (Button) materialOutMoreView.findViewById(R.id.pop_material_out_menu_7);
+                Button barcodeSplitting = (Button) materialOutMoreView.findViewById(R.id.pop_material_out_menu_8);
 
                 stockTaskBtn.setOnClickListener(new View.OnClickListener() {
                     @Override
@@ -1292,6 +1316,21 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                     }
                 });
 
+                barcodeSplitting.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View v) {
+                        progressDialog.show();
+                        VolleyRequest.getInstance().stringRequest(mStringRequest,
+                                new HttpParams.Builder()
+                                        .url(GloableParams.ADDRESS_BARCODE_SPLITTING)
+                                        .method(Request.Method.GET)
+                                        .addParam("id", pi_id)
+                                        .tag(TAG + "_barcodeSplitting")
+                                        .flag(BarcodeSplitting).build(),
+                                30 * 1000, IOCOutMakeMaterialOper.this);
+                    }
+                });
+
                 listPopupWindow = new PopupWindow(materialOutMoreView, LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
                 listPopupWindow.setBackgroundDrawable(new BitmapDrawable());
                 listPopupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
@@ -1537,7 +1576,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         PdaApplication.mRequestQueue.add(stringRequest);
     }
 
-    private void spliteBarcode(final String currentBarcode, String barRemain, String restqty) {
+//    private void spliteBarcode(final String currentBarcode, String barRemain, String restqty) {
 //        new AlertDialog.Builder(getActivity()).setTitle("提示")
 //                .setMessage("条码数量(" + barRemain + ")大于剩余需要采集数量(" + restqty + "),确认拆分?")
 //                .setPositiveButton("拆分", new DialogInterface.OnClickListener() {
@@ -1560,223 +1599,46 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
 //                    }
 //                })
 //                .show();
-        breakingBtnClickEvent(currentBarcode,"-1");
+////        breakingBtnClickEvent(currentBarcode,"-1");
+//    }
+
+    private void spliteBarcode(final String bar_code, String bar_remain, String restqty) {
+        new AlertDialog.Builder(getActivity()).setTitle("提示")
+                .setMessage("条码数量大于剩余需要采集数量,确认拆分?")
+                .setPositiveButton("确认", new DialogInterface.OnClickListener() {
+                    @Override
+                    public void onClick(DialogInterface dialog, int which) {
+                        breakingBtnClickEvent(bar_code, bar_remain, restqty);
+                    }
+                })
+                .setNegativeButton("取消", new DialogInterface.OnClickListener() {
+                    @Override
+                    public void onClick(DialogInterface dialog, int which) {
+                        dialog.dismiss();
+                    }
+                })
+                .show();
     }
 
     /**
-     * 分拆批次
+     * 特殊出库条码数据获取
      *
-     * @param currentBarcode
+     * @param bar_code   条码号
+     * @param bar_remain 剩余条码
+     * @param restqty    所需条码
      */
-    private void breakingBtnClickEvent(final String currentBarcode,String number) {
+    private void breakingBtnClickEvent(final String bar_code, String bar_remain, String restqty) {
         progressDialog.show();
-        String url = isMultiple ? GloableParams.ADDRESS_OUT_BYBATCH_BREAK_DEAL : GloableParams.ADDRESS_OUT_BYBATCH_BREAK_DEAL;
+//        String url = GloableParams.ADDRESS_OUT_BYBATCH_BREAK_DEAL;    //老接口
+        String url = GloableParams.ADDRESS_OUT_MATERIAL_SPECIAL_OUT_BREAK;
         Log.d("breakDeal", url);
 
-        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
-                .url(url)
-                .method(Request.Method.POST)
-                .addParam("ids", pi_id)
-                .addParam("barcode", currentBarcode)
-                .addParam("or_remain", mBarRemain)
-                .addParam("bar_remain", mRestqty)
-                .addParam("confirmout", number)
-                .build(), new HttpCallback() {
-            @Override
-            public void onSuccess(int flag, Object o) throws Exception {
-                progressDialog.dismiss();
-
-                String s = o.toString();
-                if (popupWindow != null && popupWindow.isShowing())
-                    closePopupWindow();
-                mResults = new ArrayList<>();
-                mCollectTypeRadioGroup.setEnabled(true);
-                LogUtil.e("breaking", s);
-                try {
-                    JSONObject jsonObject = new JSONObject(s);
-                    JSONObject dataObject = jsonObject.optJSONObject("data");
-                    if (dataObject == null) {
-                        return;
-                    }
-                    JSONObject messageObject = dataObject.optJSONObject("barcode");
-//                    JSONObject messagenextObject = dataObject.getJSONObject("next");
-                    com.alibaba.fastjson.JSONObject messagenextObject = FastjsonUtil.getJSONObject(dataObject.toString(), "next");
-                    if (messageObject == null) {
-                        return;
-                    }
-                    if (messageObject.has("ISMSD")) {
-                        if (messageObject.optBoolean("ISMSD")) {
-                            //成功,有返回值,判断返回值message中isMsd是否存在,存在判断if(isMsd)true,弹出显示框
-                            iocOutMakeMaterialOperMsd = JsonTools.parseJsonToBean(jsonObject.toString(), IOCOutMakeMaterialOperMsd.class);
-//                            Log.i("msdresult", iocOutMakeMaterialOperMsd.toString());
-                            mBarRemain = CommonUtil.doubleFormat(iocOutMakeMaterialOperMsd.getData().getBarcode().getBAR_REMAIN());
-                            mRestqty = CommonUtil.doubleFormat(iocOutMakeMaterialOperMsd.getData().getBarcode().getRESTQTY());
-                            showDewPopupWindow();
-                        } else {
-                            mIocoutMaterialSplitBean = JsonTools.parseJsonToBean(messageObject.toString(), IOCOutmakeMaterialSplitBean.class);
-                            mBarRemain = CommonUtil.doubleFormat(mIocoutMaterialSplitBean.getBAR_REMAIN());
-                            mRestqty = CommonUtil.doubleFormat(mIocoutMaterialSplitBean.getRESTQTY());
-                            if (CommonUtil.doubleCompare(mIocoutMaterialSplitBean.getBAR_REMAIN(), mIocoutMaterialSplitBean.getRESTQTY()) == 1) {
-                                spliteBarcode(currentBarcode, mBarRemain, mRestqty);
-                            }
-                        }
-                    } else {
-                        mCollectResultTextView.setVisibility(View.VISIBLE);
-                        mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
-                        mCollectResultTextView.setText(null);
-                        JSONArray listArray = dataObject.optJSONArray("nolist");
-                        if (mCollectType.equals("byBarcode") || mCollectType.equals("byBatchcode")) {
-                            String barcodeResult = "采集成功;" + JsonUtils.optStringNotNull(dataObject, "finishno")
-                                    + "\n条码:" + JsonUtils.optStringNotNull(messageObject, "BAR_CODE")
-                                    + ";数量:" + CommonUtil.doubleFormat(messageObject.optDouble("BAR_REMAIN"))
-                                    + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
-                                    + ";料号:" + JsonUtils.optStringNotNull(messageObject, "BAR_PRODCODE")
-                                    + ";名称规格:" + messageObject.optString("PR_DETAIL")
-                                    + "  " + JsonUtils.optStringNotNull(messageObject, "PR_SPEC")
-                                    + ";仓位:" + JsonUtils.optStringNotNull(messageObject, "BAR_LOCATION")
-                                    + ";\n出货数量:" + messagenextObject.getString("PD_OUTQTY")
-                                    + ";待采集数:" + messagenextObject.getString("PD_RESTQTY");
-
-                            if (listArray != null && listArray.length() > 0) {
-                                for (int i = 0; i < listArray.length(); i++) {
-                                    JSONObject listObject = listArray.optJSONObject(i);
-                                    barcodeResult = barcodeResult
-                                            + "\n单号:" + JsonUtils.optStringNotNull(listObject, "PI_INOUTNO")
-                                            + ";条码号:" + JsonUtils.optStringNotNull(listObject, "BAR_CODE")
-                                            + ";数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(listObject, "BAR_REMAIN"));
-                                }
-                                if (number.equals("0")){
-                                    //弹出拆分结果弹框
-                                    initBreakPopupWindow(listArray);
-                                }
-
-
-                            }
-
-                            mCollectResultTextView.setText(barcodeResult);
-                            mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
-
-
-                            mBarcodeTableLayout.setVisibility(View.GONE);
-                            mBoxTableLayout.setVisibility(View.GONE);
-
-                            tvBarcodeCollectionSuccess.setVisibility(View.VISIBLE);
-                            tvBarcodeCollectionSuccess.setText("采集成功");
-
-                            mResult1 = messageObject.optString("BAR_CODE");
-                            mResult2 = messageObject.optDouble("BAR_REMAIN") + "";
-                            mResult3 = messageObject.optString("BAR_PRODCODE");
-
-                            mResults.add(mResult1);
-                            mResults.add(mResult2);
-                            mResults.add(mResult3);
-
-                            mCollectBarcodeTv.setText(mResult1);
-                            mCollectBarRemainTv.setText(mResult2);
-                            mCollectBarProdcodeTv.setText(mResult3);
-
-                            PdaApplication.putDataCache2Map(Constants.FLAG.MATERIAL_COLLECT_BARCODE_RESULT + pi_inoutno, mResults);
-                        } else if (false) {
-                            String boxResult = "采集成功;" + JsonUtils.optStringNotNull(dataObject, "finishno")
-                                    + "\n箱号:" + JsonUtils.optStringNotNull(messageObject, "BAR_OUTBOXCODE1")
-                                    + ";数量:" + CommonUtil.doubleFormat(messageObject.optDouble("BAR_REMAIN"))
-                                    + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
-                                    + ";料号:" + JsonUtils.optStringNotNull(messageObject, "BAR_PRODCODE")
-                                    + ";名称规格:" + JsonUtils.optStringNotNull(messageObject, "PR_DETAIL")
-                                    + "  " + JsonUtils.optStringNotNull(messageObject, "PR_SPEC")
-                                    + ";\n出货数量:" + JsonUtils.optStringNotNull(messageObject, "PD_OUTQTY")
-                                    + ";待采集数:" + JsonUtils.optStringNotNull(messageObject, "PD_RESTQTY");
-
-
-                            if (listArray != null && listArray.length() > 0) {
-                                for (int i = 0; i < listArray.length(); i++) {
-                                    JSONObject listObject = listArray.optJSONObject(i);
-                                    boxResult = boxResult
-                                            + "\n单号:" + JsonUtils.optStringNotNull(listObject, "PI_INOUTNO")
-                                            + ";条码号:" + JsonUtils.optStringNotNull(listObject, "BAR_CODE")
-                                            + ";数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(listObject, "BAR_REMAIN"));
-                                }
-                            }
-
-                            mCollectResultTextView.setText(boxResult);
-                            mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
-
-
-                            mBarcodeTableLayout.setVisibility(View.GONE);
-                            mBoxTableLayout.setVisibility(View.GONE);
-
-                            tvBoxCollectionSuccess.setVisibility(View.VISIBLE);
-                            tvBoxCollectionSuccess.setText("采集成功");
-
-                            mResult1 = messageObject.optString("PA_OUTBOXCODE");
-                            mResult2 = messageObject.optInt("PA_TOTALQTY") + "";
-                            mResult3 = messageObject.optString("PA_PRODCODE");
-                            mResult4 = messageObject.optString("PA_WHCODE");
-
-                            mResults.add(mResult1);
-                            mResults.add(mResult2);
-                            mResults.add(mResult3);
-                            mResults.add(mResult4);
-
-                            mCollectBoxTv.setText(mResult1);
-                            mCollectBoxNumTv.setText(mResult2);
-                            mCollectBoxrProdcodeTv.setText(mResult3);
-                            mCollectBoxWhcodeTv.setText(mResult4);
-
-                            PdaApplication.putDataCache2Map(Constants.FLAG.MATERIAL_COLLECT_BOX_RESULT + pi_inoutno, mResults);
-                        }
-                        CommonUtil.toastNoRepeat(getActivity(), "采集成功");
-
-                        Object next = jsonObject.getJSONObject("data").get("next");
-                        if (next != null && !"null".equals(next.toString())) {
-                            JSONObject nextObject = jsonObject.getJSONObject("data").getJSONObject("next");
-                            MaterialInformationBean.DataBean materialInformationBean = JsonTools.parseJsonToBean(nextObject.toString(), MaterialInformationBean.DataBean.class);
-                            if (materialInformationBean != null) {
-                                String materialInfo =
-                                        "型号:" + (materialInformationBean.getPR_ORISPECCODE() == null ? "" : materialInformationBean.getPR_ORISPECCODE())
-                                                + "物料:" + (materialInformationBean.getPD_PRODCODE() == null ? "" : materialInformationBean.getPD_PRODCODE())
-                                                + "; 名称规格:" + (materialInformationBean.getPR_DETAIL() == null ? "" : materialInformationBean.getPR_DETAIL())
-                                                + "  " + (materialInformationBean.getPR_SPEC() == null ? "" : materialInformationBean.getPR_SPEC())
-                                                + "; 未备料数:" + (materialInformationBean.getPD_RESTQTY() == null ? "" : materialInformationBean.getPD_RESTQTY())
-                                                + "; 批数量:" + (CommonUtil.doubleFormat(materialInformationBean.getBAR_REMAIN()))
-                                                + "; 仓位:" + (materialInformationBean.getBAR_LOCATION() == null ? "" : materialInformationBean.getBAR_LOCATION());
-                                if (materialInformationBean.getPD_BATCHCODE() != null) {
-                                    materialInfo = materialInfo + "; 批号:" + materialInformationBean.getPD_BATCHCODE();
-                                }
-                                mMaterialInforTextView.setText(materialInfo);
-                            }
-                        } else {
-                            mMaterialInforTextView.setText("该出库单已经完成备料");
-                        }
-                    }
-
-                } catch (JSONException e) {
-                    e.printStackTrace();
-                }
-            }
-
-            @Override
-            public void onFail(int flag, String failStr) throws Exception {
-                progressDialog.dismiss();
-                if (getActivity() != null) {
-                    try {
-                        etBarCode.setText(null);
-                        CommonUtil.editTextGetFocus(etBarCode);
-                        CommonUtil.makeNotice();
-                        CommonUtil.toastNoRepeat(getActivity(), failStr);
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    }
-
-                }
-            }
-        });
-
-        /*RequestBody requestBody = new FormBody.Builder()
+        RequestBody requestBody = new FormBody.Builder()
                 .add("ids", pi_id)
-                .add("barcode", currentBarcode)
-                .add("or_remain", mBarRemain)
-                .add("bar_remain", mRestqty)
+                .add("barcode", bar_code)
+                .add("or_remain", bar_remain)
+                .add("bar_remain", restqty)
+                .add("reason", "")
                 .build();
 
         okhttp3.Request.Builder builder = new okhttp3.Request.Builder().url(url).post(requestBody);
@@ -1820,205 +1682,215 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                 }
             }
         });
-*/
-        /*stringRequest = new StringRequest(Request.Method.POST, url,
-                new Response.Listener<String>() {
-                    @Override
-                    public void onResponse(String s) {
-                        progressDialog.dismiss();
-
-                        if (popupWindow != null && popupWindow.isShowing())
-                            closePopupWindow();
-                        mResults = new ArrayList<>();
-                        mCollectTypeRadioGroup.setEnabled(true);
-                        LogUtil.e("breaking", s);
-                        try {
-                            JSONObject jsonObject = new JSONObject(s);
-                            JSONObject dataObject = jsonObject.optJSONObject("data");
-                            if (dataObject == null) {
-                                return;
-                            }
-                            JSONObject messageObject = dataObject.optJSONObject("barcode");
-                            if (messageObject == null) {
-                                return;
-                            }
-                            if (messageObject.has("ISMSD")) {
-                                if (messageObject.optBoolean("ISMSD")) {
-                                    //成功,有返回值,判断返回值message中isMsd是否存在,存在判断if(isMsd)true,弹出显示框
-                                    iocOutMakeMaterialOperMsd = JsonTools.parseJsonToBean(jsonObject.toString(), IOCOutMakeMaterialOperMsd.class);
-//                            Log.i("msdresult", iocOutMakeMaterialOperMsd.toString());
-                                    mBarRemain = CommonUtil.doubleFormat(iocOutMakeMaterialOperMsd.getData().getBarcode().getBAR_REMAIN());
-                                    mRestqty = CommonUtil.doubleFormat(iocOutMakeMaterialOperMsd.getData().getBarcode().getRESTQTY());
-                                    showDewPopupWindow();
-                                } else {
-                                    mIocoutMaterialSplitBean = JsonTools.parseJsonToBean(messageObject.toString(), IOCOutmakeMaterialSplitBean.class);
-                                    mBarRemain = CommonUtil.doubleFormat(mIocoutMaterialSplitBean.getBAR_REMAIN());
-                                    mRestqty = CommonUtil.doubleFormat(mIocoutMaterialSplitBean.getRESTQTY());
-                                    if (CommonUtil.doubleCompare(mIocoutMaterialSplitBean.getBAR_REMAIN(), mIocoutMaterialSplitBean.getRESTQTY()) == 1) {
-                                        spliteBarcode(currentBarcode);
-                                    }
-                                }
-                            } else {
-                                mCollectResultTextView.setVisibility(View.VISIBLE);
-                                mCollectResultTextView.setText(null);
-                                JSONArray listArray = dataObject.optJSONArray("nolist");
-                                if (mCollectType.equals("byBarcode")) {
-                                    String barcodeResult = "采集成功;" + JsonUtils.optStringNotNull(dataObject, "finishno")
-                                            + "\n条码:" + JsonUtils.optStringNotNull(messageObject, "BAR_CODE")
-                                            + ";数量:" + CommonUtil.doubleFormat(messageObject.optDouble("BAR_REMAIN"))
-                                            + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
-                                            + ";料号:" + JsonUtils.optStringNotNull(messageObject, "BAR_PRODCODE")
-                                            + ";名称规格:" + messageObject.optString("PR_DETAIL")
-                                            + "  " + JsonUtils.optStringNotNull(messageObject, "PR_SPEC")
-                                            + ";仓位:" + JsonUtils.optStringNotNull(messageObject, "BAR_LOCATION");
-
-                                    if (listArray != null && listArray.length() > 0) {
-                                        for (int i = 0; i < listArray.length(); i++) {
-                                            JSONObject listObject = listArray.optJSONObject(i);
-                                            barcodeResult = barcodeResult
-                                                    + "\n单号:" + JsonUtils.optStringNotNull(listObject, "PI_INOUTNO")
-                                                    + ";条码号:" + JsonUtils.optStringNotNull(listObject, "BAR_CODE")
-                                                    + ";数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(listObject, "BAR_REMAIN"));
-                                        }
-                                    }
-
-                                    mCollectResultTextView.setText(barcodeResult);
-
-
-                                    mBarcodeTableLayout.setVisibility(View.GONE);
-                                    mBoxTableLayout.setVisibility(View.GONE);
-
-                                    tvBarcodeCollectionSuccess.setVisibility(View.VISIBLE);
-                                    tvBarcodeCollectionSuccess.setText("采集成功");
-
-                                    mResult1 = messageObject.optString("BAR_CODE");
-                                    mResult2 = messageObject.optDouble("BAR_REMAIN") + "";
-                                    mResult3 = messageObject.optString("BAR_PRODCODE");
-
-                                    mResults.add(mResult1);
-                                    mResults.add(mResult2);
-                                    mResults.add(mResult3);
-
-                                    mCollectBarcodeTv.setText(mResult1);
-                                    mCollectBarRemainTv.setText(mResult2);
-                                    mCollectBarProdcodeTv.setText(mResult3);
-
-                                    PdaApplication.putDataCache2Map(Constants.FLAG.MATERIAL_COLLECT_BARCODE_RESULT + pi_inoutno, mResults);
-                                } else if (mCollectType.equals("byBatchcode")) {
-                                    String boxResult = "采集成功;" + JsonUtils.optStringNotNull(dataObject, "finishno")
-                                            + "\n箱号:" + JsonUtils.optStringNotNull(messageObject, "BAR_OUTBOXCODE1")
-                                            + ";数量:" + CommonUtil.doubleFormat(messageObject.optDouble("BAR_REMAIN"))
-                                            + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
-                                            + ";料号:" + JsonUtils.optStringNotNull(messageObject, "BAR_PRODCODE")
-                                            + ";名称规格:" + JsonUtils.optStringNotNull(messageObject, "PR_DETAIL")
-                                            + "  " + JsonUtils.optStringNotNull(messageObject, "PR_SPEC");
-
-
-                                    if (listArray != null && listArray.length() > 0) {
-                                        for (int i = 0; i < listArray.length(); i++) {
-                                            JSONObject listObject = listArray.optJSONObject(i);
-                                            boxResult = boxResult
-                                                    + "\n单号:" + JsonUtils.optStringNotNull(listObject, "PI_INOUTNO")
-                                                    + ";条码号:" + JsonUtils.optStringNotNull(listObject, "BAR_CODE")
-                                                    + ";数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(listObject, "BAR_REMAIN"));
-                                        }
-                                    }
-
-                                    mCollectResultTextView.setText(boxResult);
-
-
-                                    mBarcodeTableLayout.setVisibility(View.GONE);
-                                    mBoxTableLayout.setVisibility(View.GONE);
-
-                                    tvBoxCollectionSuccess.setVisibility(View.VISIBLE);
-                                    tvBoxCollectionSuccess.setText("采集成功");
-
-                                    mResult1 = messageObject.optString("PA_OUTBOXCODE");
-                                    mResult2 = messageObject.optInt("PA_TOTALQTY") + "";
-                                    mResult3 = messageObject.optString("PA_PRODCODE");
-                                    mResult4 = messageObject.optString("PA_WHCODE");
-
-                                    mResults.add(mResult1);
-                                    mResults.add(mResult2);
-                                    mResults.add(mResult3);
-                                    mResults.add(mResult4);
-
-                                    mCollectBoxTv.setText(mResult1);
-                                    mCollectBoxNumTv.setText(mResult2);
-                                    mCollectBoxrProdcodeTv.setText(mResult3);
-                                    mCollectBoxWhcodeTv.setText(mResult4);
-
-                                    PdaApplication.putDataCache2Map(Constants.FLAG.MATERIAL_COLLECT_BOX_RESULT + pi_inoutno, mResults);
-                                }
-                                CommonUtil.toastNoRepeat(getActivity(), "采集成功");
-
-                                Object next = jsonObject.getJSONObject("data").get("next");
-                                if (next != null && !"null".equals(next.toString())) {
-                                    JSONObject nextObject = jsonObject.getJSONObject("data").getJSONObject("next");
-                                    MaterialInformationBean.DataBean materialInformationBean = JsonTools.parseJsonToBean(nextObject.toString(), MaterialInformationBean.DataBean.class);
-                                    if (materialInformationBean != null) {
-                                        String materialInfo =
-                                                "物料:" + (materialInformationBean.getPD_PRODCODE() == null ? "" : materialInformationBean.getPD_PRODCODE())
-                                                        + "; 名称规格:" + (materialInformationBean.getPR_DETAIL() == null ? "" : materialInformationBean.getPR_DETAIL())
-                                                        + "  " + (materialInformationBean.getPR_SPEC() == null ? "" : materialInformationBean.getPR_SPEC())
-                                                        + "; 未备料数:" + (materialInformationBean.getPD_RESTQTY() == null ? "" : materialInformationBean.getPD_RESTQTY())
-                                                        + "; 批数量:" + (CommonUtil.doubleFormat(materialInformationBean.getBAR_REMAIN()))
-                                                        + "; 仓位:" + (materialInformationBean.getBAR_LOCATION() == null ? "" : materialInformationBean.getBAR_LOCATION());
-                                        if (materialInformationBean.getPD_BATCHCODE() != null) {
-                                            materialInfo = materialInfo + "; 批号:" + materialInformationBean.getPD_BATCHCODE();
-                                        }
-                                        mMaterialInforTextView.setText(materialInfo);
-                                    }
-                                } else {
-                                    mMaterialInforTextView.setText("该出库单已经完成备料");
-                                }
-                            }
-
-                        } catch (JSONException e) {
-                            e.printStackTrace();
-                        }
-                    }
-                },
-                new Response.ErrorListener() {
-
-                    @Override
-                    public void onErrorResponse(VolleyError volleyError) {
-                        progressDialog.dismiss();
-//                        Toast.makeText(getActivity().getApplicationContext(), "拆分失败", Toast.LENGTH_LONG).show();
-                        if (getActivity() != null) {
-                            etBarCode.setText(null);
-                            CommonUtil.editTextGetFocus(etBarCode);
-                            CommonUtil.showErrorToast(volleyError);
-                        }
-                    }
-                }) {
-            @Override
-            public Map<String, String> getHeaders() throws AuthFailureError {
-                return VolleyUtil.getVolleyUtil().setCookies();
-            }
+    }
 
-            @Override
-            protected Map<String, String> getParams() throws AuthFailureError {
-                Map<String, String> params = new HashMap<>();
-//                if (isMultiple) {
-                params.put("ids", pi_id);
-//                } else {
-//                    params.put("id", pi_id);
-//                    params.put("whcode", pd_whcode);
+    /**
+     * 分拆批次
+     */
+//    private void breakingBtnClickEvent(final String currentBarcode,String number) {
+//        progressDialog.show();
+//        String url = isMultiple ? GloableParams.ADDRESS_OUT_BYBATCH_BREAK_DEAL : GloableParams.ADDRESS_OUT_BYBATCH_BREAK_DEAL;
+//        Log.d("breakDeal", url);
+//
+//        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+//                .url(url)
+//                .method(Request.Method.POST)
+//                .addParam("ids", pi_id)
+//                .addParam("barcode", currentBarcode)
+//                .addParam("or_remain", mBarRemain)
+//                .addParam("bar_remain", mRestqty)
+//                .addParam("confirmout", number)
+//                .build(), new HttpCallback() {
+//            @Override
+//            public void onSuccess(int flag, Object o) throws Exception {
+//                progressDialog.dismiss();
+//
+//                String s = o.toString();
+//                if (popupWindow != null && popupWindow.isShowing())
+//                    closePopupWindow();
+//                mResults = new ArrayList<>();
+//                mCollectTypeRadioGroup.setEnabled(true);
+//                LogUtil.e("breaking", s);
+//                try {
+//                    JSONObject jsonObject = new JSONObject(s);
+//                    JSONObject dataObject = jsonObject.optJSONObject("data");
+//                    if (dataObject == null) {
+//                        return;
+//                    }
+//                    JSONObject messageObject = dataObject.optJSONObject("barcode");
+////                    JSONObject messagenextObject = dataObject.getJSONObject("next");
+//                    com.alibaba.fastjson.JSONObject messagenextObject = FastjsonUtil.getJSONObject(dataObject.toString(), "next");
+//                    if (messageObject == null) {
+//                        return;
+//                    }
+//                    if (messageObject.has("ISMSD")) {
+//                        if (messageObject.optBoolean("ISMSD")) {
+//                            //成功,有返回值,判断返回值message中isMsd是否存在,存在判断if(isMsd)true,弹出显示框
+//                            iocOutMakeMaterialOperMsd = JsonTools.parseJsonToBean(jsonObject.toString(), IOCOutMakeMaterialOperMsd.class);
+////                            Log.i("msdresult", iocOutMakeMaterialOperMsd.toString());
+//                            mBarRemain = CommonUtil.doubleFormat(iocOutMakeMaterialOperMsd.getData().getBarcode().getBAR_REMAIN());
+//                            mRestqty = CommonUtil.doubleFormat(iocOutMakeMaterialOperMsd.getData().getBarcode().getRESTQTY());
+//                            showDewPopupWindow();
+//                        } else {
+//                            mIocoutMaterialSplitBean = JsonTools.parseJsonToBean(messageObject.toString(), IOCOutmakeMaterialSplitBean.class);
+//                            mBarRemain = CommonUtil.doubleFormat(mIocoutMaterialSplitBean.getBAR_REMAIN());
+//                            mRestqty = CommonUtil.doubleFormat(mIocoutMaterialSplitBean.getRESTQTY());
+//                            if (CommonUtil.doubleCompare(mIocoutMaterialSplitBean.getBAR_REMAIN(), mIocoutMaterialSplitBean.getRESTQTY()) == 1) {
+//                                spliteBarcode(currentBarcode, mBarRemain, mRestqty);
+//                            }
+//                        }
+//                    } else {
+//                        mCollectResultTextView.setVisibility(View.VISIBLE);
+//                        mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
+//                        mCollectResultTextView.setText(null);
+//                        JSONArray listArray = dataObject.optJSONArray("nolist");
+//                        if (mCollectType.equals("byBarcode") || mCollectType.equals("byBatchcode")) {
+//                            String barcodeResult = "采集成功;" + JsonUtils.optStringNotNull(dataObject, "finishno")
+//                                    + "\n条码:" + JsonUtils.optStringNotNull(messageObject, "BAR_CODE")
+//                                    + ";数量:" + CommonUtil.doubleFormat(messageObject.optDouble("BAR_REMAIN"))
+//                                    + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
+//                                    + ";料号:" + JsonUtils.optStringNotNull(messageObject, "BAR_PRODCODE")
+//                                    + ";名称规格:" + messageObject.optString("PR_DETAIL")
+//                                    + "  " + JsonUtils.optStringNotNull(messageObject, "PR_SPEC")
+//                                    + ";仓位:" + JsonUtils.optStringNotNull(messageObject, "BAR_LOCATION")
+//                                    + ";\n出货数量:" + messagenextObject.getString("PD_OUTQTY")
+//                                    + ";待采集数:" + messagenextObject.getString("PD_RESTQTY");
+//
+//                            if (listArray != null && listArray.length() > 0) {
+//                                for (int i = 0; i < listArray.length(); i++) {
+//                                    JSONObject listObject = listArray.optJSONObject(i);
+//                                    barcodeResult = barcodeResult
+//                                            + "\n单号:" + JsonUtils.optStringNotNull(listObject, "PI_INOUTNO")
+//                                            + ";条码号:" + JsonUtils.optStringNotNull(listObject, "BAR_CODE")
+//                                            + ";数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(listObject, "BAR_REMAIN"));
+//                                }
+//                                if (number.equals("0")){
+//                                    //弹出拆分结果弹框
+//                                    initBreakPopupWindow(listArray);
+//                                }
+//
+//
+//                            }
+//
+//                            mCollectResultTextView.setText(barcodeResult);
+//                            mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
+//
+//
+//                            mBarcodeTableLayout.setVisibility(View.GONE);
+//                            mBoxTableLayout.setVisibility(View.GONE);
+//
+//                            tvBarcodeCollectionSuccess.setVisibility(View.VISIBLE);
+//                            tvBarcodeCollectionSuccess.setText("采集成功");
+//
+//                            mResult1 = messageObject.optString("BAR_CODE");
+//                            mResult2 = messageObject.optDouble("BAR_REMAIN") + "";
+//                            mResult3 = messageObject.optString("BAR_PRODCODE");
+//
+//                            mResults.add(mResult1);
+//                            mResults.add(mResult2);
+//                            mResults.add(mResult3);
+//
+//                            mCollectBarcodeTv.setText(mResult1);
+//                            mCollectBarRemainTv.setText(mResult2);
+//                            mCollectBarProdcodeTv.setText(mResult3);
+//
+//                            PdaApplication.putDataCache2Map(Constants.FLAG.MATERIAL_COLLECT_BARCODE_RESULT + pi_inoutno, mResults);
+//                        } else if (false) {
+//                            String boxResult = "采集成功;" + JsonUtils.optStringNotNull(dataObject, "finishno")
+//                                    + "\n箱号:" + JsonUtils.optStringNotNull(messageObject, "BAR_OUTBOXCODE1")
+//                                    + ";数量:" + CommonUtil.doubleFormat(messageObject.optDouble("BAR_REMAIN"))
+//                                    + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
+//                                    + ";料号:" + JsonUtils.optStringNotNull(messageObject, "BAR_PRODCODE")
+//                                    + ";名称规格:" + JsonUtils.optStringNotNull(messageObject, "PR_DETAIL")
+//                                    + "  " + JsonUtils.optStringNotNull(messageObject, "PR_SPEC")
+//                                    + ";\n出货数量:" + JsonUtils.optStringNotNull(messageObject, "PD_OUTQTY")
+//                                    + ";待采集数:" + JsonUtils.optStringNotNull(messageObject, "PD_RESTQTY");
+//
+//
+//                            if (listArray != null && listArray.length() > 0) {
+//                                for (int i = 0; i < listArray.length(); i++) {
+//                                    JSONObject listObject = listArray.optJSONObject(i);
+//                                    boxResult = boxResult
+//                                            + "\n单号:" + JsonUtils.optStringNotNull(listObject, "PI_INOUTNO")
+//                                            + ";条码号:" + JsonUtils.optStringNotNull(listObject, "BAR_CODE")
+//                                            + ";数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(listObject, "BAR_REMAIN"));
+//                                }
+//                            }
+//
+//                            mCollectResultTextView.setText(boxResult);
+//                            mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
+//
+//
+//                            mBarcodeTableLayout.setVisibility(View.GONE);
+//                            mBoxTableLayout.setVisibility(View.GONE);
+//
+//                            tvBoxCollectionSuccess.setVisibility(View.VISIBLE);
+//                            tvBoxCollectionSuccess.setText("采集成功");
+//
+//                            mResult1 = messageObject.optString("PA_OUTBOXCODE");
+//                            mResult2 = messageObject.optInt("PA_TOTALQTY") + "";
+//                            mResult3 = messageObject.optString("PA_PRODCODE");
+//                            mResult4 = messageObject.optString("PA_WHCODE");
+//
+//                            mResults.add(mResult1);
+//                            mResults.add(mResult2);
+//                            mResults.add(mResult3);
+//                            mResults.add(mResult4);
+//
+//                            mCollectBoxTv.setText(mResult1);
+//                            mCollectBoxNumTv.setText(mResult2);
+//                            mCollectBoxrProdcodeTv.setText(mResult3);
+//                            mCollectBoxWhcodeTv.setText(mResult4);
+//
+//                            PdaApplication.putDataCache2Map(Constants.FLAG.MATERIAL_COLLECT_BOX_RESULT + pi_inoutno, mResults);
+//                        }
+//                        CommonUtil.toastNoRepeat(getActivity(), "采集成功");
+//
+//                        Object next = jsonObject.getJSONObject("data").get("next");
+//                        if (next != null && !"null".equals(next.toString())) {
+//                            JSONObject nextObject = jsonObject.getJSONObject("data").getJSONObject("next");
+//                            MaterialInformationBean.DataBean materialInformationBean = JsonTools.parseJsonToBean(nextObject.toString(), MaterialInformationBean.DataBean.class);
+//                            if (materialInformationBean != null) {
+//                                String materialInfo =
+//                                        "型号:" + (materialInformationBean.getPR_ORISPECCODE() == null ? "" : materialInformationBean.getPR_ORISPECCODE())
+//                                                + "物料:" + (materialInformationBean.getPD_PRODCODE() == null ? "" : materialInformationBean.getPD_PRODCODE())
+//                                                + "; 名称规格:" + (materialInformationBean.getPR_DETAIL() == null ? "" : materialInformationBean.getPR_DETAIL())
+//                                                + "  " + (materialInformationBean.getPR_SPEC() == null ? "" : materialInformationBean.getPR_SPEC())
+//                                                + "; 未备料数:" + (materialInformationBean.getPD_RESTQTY() == null ? "" : materialInformationBean.getPD_RESTQTY())
+//                                                + "; 批数量:" + (CommonUtil.doubleFormat(materialInformationBean.getBAR_REMAIN()))
+//                                                + "; 仓位:" + (materialInformationBean.getBAR_LOCATION() == null ? "" : materialInformationBean.getBAR_LOCATION());
+//                                if (materialInformationBean.getPD_BATCHCODE() != null) {
+//                                    materialInfo = materialInfo + "; 批号:" + materialInformationBean.getPD_BATCHCODE();
+//                                }
+//                                mMaterialInforTextView.setText(materialInfo);
+//                            }
+//                        } else {
+//                            mMaterialInforTextView.setText("该出库单已经完成备料");
+//                        }
+//                    }
+//
+//                } catch (JSONException e) {
+//                    e.printStackTrace();
 //                }
-                params.put("barcode", currentBarcode);
-                params.put("or_remain", mBarRemain);
-                params.put("bar_remain", mRestqty);
-                Log.e(TAG, params.toString());
-                return params;
-            }
-
-        };
-        stringRequest.setRetryPolicy(new DefaultRetryPolicy(20 * 1000, 0, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
-        int timeoutMs = stringRequest.getTimeoutMs();
-        stringRequest.setTag(TAG);
-        PdaApplication.mRequestQueue.add(stringRequest);*/
-    }
+//            }
+//
+//            @Override
+//            public void onFail(int flag, String failStr) throws Exception {
+//                progressDialog.dismiss();
+//                if (getActivity() != null) {
+//                    try {
+//                        etBarCode.setText(null);
+//                        CommonUtil.editTextGetFocus(etBarCode);
+//                        CommonUtil.makeNotice();
+//                        CommonUtil.toastNoRepeat(getActivity(), failStr);
+//                    } catch (Exception e) {
+//                        e.printStackTrace();
+//                    }
+//
+//                }
+//            }
+//        });
+//    }
 
     protected void initBreakPopupWindow(JSONArray listArray) {
         messages.clear();

+ 11 - 11
app/src/main/java/com/uas/jc_wms/fragment/IndexWareHouseContentFragment.java

@@ -139,12 +139,12 @@ public class IndexWareHouseContentFragment extends BaseFragment implements Adapt
                     getFragmentManager().beginTransaction().addToBackStack(null)
                             .replace(R.id.container_function_fragment, fragment).commit();
                     break;
-                    //BOM校验
-                case GloableParams.GRIDNAME_BOM_CHECK:
-                    fragment = new BomCheckFragment();
-                    getFragmentManager().beginTransaction().addToBackStack(null)
-                            .replace(R.id.container_function_fragment, fragment).commit();
-                    break;
+//                    //BOM校验
+//                case GloableParams.GRIDNAME_BOM_CHECK:
+//                    fragment = new BomCheckFragment();
+//                    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)
@@ -160,11 +160,11 @@ public class IndexWareHouseContentFragment extends BaseFragment implements Adapt
                     getFragmentManager().beginTransaction().addToBackStack(null)
                             .replace(R.id.container_function_fragment, fragment).commit();
                     break;
-                case GloableParams.GRIDNAME_EQUIPMENT_CYCLECOUNT_OUTBOUND://设备周期盘点
-                    fragment = new EquipmentCycleCountFragment();
-                    getFragmentManager().beginTransaction().addToBackStack(null)
-                            .replace(R.id.container_function_fragment, fragment).commit();
-                    break;
+//                case GloableParams.GRIDNAME_EQUIPMENT_CYCLECOUNT_OUTBOUND://设备周期盘点
+//                    fragment = new EquipmentCycleCountFragment();
+//                    getFragmentManager().beginTransaction().addToBackStack(null)
+//                            .replace(R.id.container_function_fragment, fragment).commit();
+//                    break;
             }
         }
     }

+ 204 - 0
app/src/main/java/com/uas/jc_wms/fragment/ModifyBarcodeQuantityFragment.java

@@ -1,33 +1,51 @@
 package com.uas.jc_wms.fragment;
 
 import android.app.Activity;
+import android.content.Context;
 import android.content.Intent;
+import android.graphics.drawable.BitmapDrawable;
 import android.os.Bundle;
 import android.text.Editable;
 import android.text.TextUtils;
 import android.text.TextWatcher;
+import android.view.Gravity;
 import android.view.KeyEvent;
+import android.view.LayoutInflater;
 import android.view.View;
+import android.view.ViewGroup;
 import android.view.inputmethod.EditorInfo;
+import android.widget.ArrayAdapter;
 import android.widget.Button;
 import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.ListView;
+import android.widget.PopupWindow;
 import android.widget.TextView;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
 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.google.gson.Gson;
 import com.uas.jc_wms.R;
 import com.uas.jc_wms.activity.FunctionActivity;
 import com.uas.jc_wms.application.PdaApplication;
+import com.uas.jc_wms.bean.CodePrinBean;
+import com.uas.jc_wms.bean.PrintDataBean;
+import com.uas.jc_wms.bean.WHBreakingBatchBreakingBtnClickEvent;
 import com.uas.jc_wms.global.GloableParams;
+import com.uas.jc_wms.tools.SharedPreUtil;
 import com.uas.jc_wms.tools.VolleyUtil;
 import com.uas.jc_wms.util.CameraUtil;
 import com.uas.jc_wms.util.CommonUtil;
 import com.uas.jc_wms.util.Constants;
+import com.uas.jc_wms.util.FragmentUtils;
 import com.uas.jc_wms.util.JsonUtils;
+import com.uas.jc_wms.util.PrintUtils;
 import com.uas.jc_wms.view.ClearableEditText;
 import com.uuzuche.lib_zxing.activity.CaptureActivity;
 import com.uuzuche.lib_zxing.activity.CodeUtils;
@@ -37,7 +55,9 @@ import org.json.JSONObject;
 
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -58,6 +78,16 @@ public class ModifyBarcodeQuantityFragment extends BaseFragment {
     private boolean mIgnoreFocusChange = false;
     private boolean isShop = false;
 
+    private View popView;
+    private PopupWindow pop;
+    private Button btnBack, btnPrintf, btnClose, btnPrintfSet;
+    private List<PrintDataBean> messages = new ArrayList<>();
+    private ListView listView;
+    private MyAdapter adapter;
+    private boolean isConnected = false;
+    private String mOldAddress = "";
+    private int mPrintDpi = 203;
+
     @Override
     protected int getLayout() {
         return R.layout.fragment_modify_barcode_quantity;
@@ -157,6 +187,8 @@ public class ModifyBarcodeQuantityFragment extends BaseFragment {
                                             mResultTextView.setVisibility(View.VISIBLE);
                                             mResultTextView.setText("修改数量成功,条码:" + barcode + " 修改后数量为:" + quantity);
                                             mBarcodeEditText.requestFocus();
+
+                                            initPopupWindow(s);
                                         }
                                     } catch (JSONException e) {
                                         e.printStackTrace();
@@ -212,6 +244,178 @@ public class ModifyBarcodeQuantityFragment extends BaseFragment {
         });
     }
 
+    /**
+     * 蓝牙打印pop
+     * @param s
+     */
+    protected void initPopupWindow(String s) {
+        JSONArray listArray = new JSONArray();
+        try {
+            Gson gson = new Gson();
+            CodePrinBean codePrinBean = gson.fromJson(s, CodePrinBean.class);
+            if (codePrinBean.getData() == null){
+                return;
+            }
+            CodePrinBean.DataBean data = codePrinBean.getData();
+            String json = gson.toJson(data);
+            com.alibaba.fastjson.JSONObject resultObject = JSON.parseObject(json);
+            listArray.add(new com.alibaba.fastjson.JSONObject(resultObject));
+            messages.clear();
+            for (int i = 0; i < listArray.size(); i++) {
+                com.alibaba.fastjson.JSONObject barcodeObject = listArray.getJSONObject(i);
+                PrintDataBean dataBean = new PrintDataBean();
+                dataBean.setBAR_CODE(barcodeObject.getString("BAR_CODE"));
+                dataBean.setBAR_REMAIN(barcodeObject.getString("BAR_REMAIN"));
+                messages.add(dataBean);
+            }
+        }catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        popView = LayoutInflater.from(getActivity()).inflate(R.layout.popupwindow_whbreaking_batch, null);
+        listView = (ListView) popView.findViewById(R.id.list_view);
+        btnPrintf = (Button) popView.findViewById(R.id.btn_print);
+        btnPrintfSet = (Button) popView.findViewById(R.id.btn_print_setting);
+        btnClose = (Button) popView.findViewById(R.id.btn_close);
+        btnBack = (Button) popView.findViewById(R.id.btn_back);
+
+        btnBack.setVisibility(View.GONE);
+        btnClose.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closePopupWindow();
+            }
+        });
+        btnPrintf.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (isConnected) {
+                    progressDialog.show();
+                    printEvent(listArray);
+                } else {
+                    closePopupWindow();
+
+                    BlueToothPrintFragment blueToothPrintFragment = new BlueToothPrintFragment();
+                    Bundle bundle = new Bundle();
+                    bundle.putString(Constants.KEY.BARCODE_PRINT_ARRAY, listArray.toString());
+                    blueToothPrintFragment.setArguments(bundle);
+                    FragmentUtils.switchFragment(ModifyBarcodeQuantityFragment.this, blueToothPrintFragment);
+                }
+            }
+        });
+
+        btnPrintfSet.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closePopupWindow();
+
+                BlueToothPrintFragment blueToothPrintFragment = new BlueToothPrintFragment();
+                Bundle bundle = new Bundle();
+                bundle.putString(Constants.KEY.BARCODE_PRINT_ARRAY, listArray.toString());
+                blueToothPrintFragment.setArguments(bundle);
+                FragmentUtils.switchFragment(ModifyBarcodeQuantityFragment.this, blueToothPrintFragment);
+            }
+        });
+
+        MyAdapter adapter = new MyAdapter(getActivity(), R.layout.item_list_whbreakingbatchfragment, messages);
+        listView.setAdapter(adapter);
+        //当只有一条数据的时候可以加上
+        /*
+        if (messages.size()>1){
+            btnBack.setVisibility(View.GONE);
+        }*/
+        // PopupWindow实例化,参数的意思是 view,长(不包括状态栏),高(不包括状态栏),是否聚焦
+        pop = new PopupWindow(popView, LinearLayout.LayoutParams.WRAP_CONTENT,
+                LinearLayout.LayoutParams.WRAP_CONTENT, true);
+        pop.setAnimationStyle(R.style.MenuAnimationFade);
+        pop.setBackgroundDrawable(new BitmapDrawable());
+        // 弹出窗口显示内容视图,默认以锚定视图的左下角为起点,这里为点击按钮
+        pop.showAtLocation(getActivity().getWindow().getDecorView(), Gravity.CENTER, 0, 0);
+        pop.setOnDismissListener(new PopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                closePopupWindow();
+            }
+        });
+        CommonUtil.setBackgroundAlpha(mActivity, 0.5f);
+    }
+
+    /**
+     * 关闭窗口
+     */
+    private void closePopupWindow() {
+        if (pop != null) {
+            pop.dismiss();
+            pop = null;
+            CommonUtil.setBackgroundAlpha(mActivity, 1f);
+        }
+    }
+
+    public void reset() {
+        progressDialog.dismiss();
+    }
+
+    private void printEvent(JSONArray printArray) {
+        if (printArray != null && printArray.size() > 0) {
+            boolean isFail = false;
+            for (int i = 0; i < printArray.size(); i++) {
+                try {
+                    com.alibaba.fastjson.JSONObject printObject = printArray.getJSONObject(i);
+                    int printResult = PrintUtils.printBar(mActivity, printObject.toString(), mPrintDpi, null);
+                    if (printResult <= 0) {
+                        isFail = true;
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+            closePopupWindow();
+            progressDialog.dismiss();
+            if (isFail) {
+                isConnected = false;
+                SharedPreUtil.saveInt(mActivity, "printConnect", 0);
+                CommonUtil.toastNoRepeat(mActivity, "打印失败,请重新连接打印机");
+
+                BlueToothPrintFragment blueToothPrintFragment = new BlueToothPrintFragment();
+
+                Bundle bundle = new Bundle();
+                bundle.putString(Constants.KEY.BARCODE_PRINT_ARRAY, printArray.toString());
+                blueToothPrintFragment.setArguments(bundle);
+                FragmentUtils.switchFragment(ModifyBarcodeQuantityFragment.this, blueToothPrintFragment);
+            } else {
+                CommonUtil.toastNoRepeat(mActivity, "打印成功");
+            }
+        } else {
+            CommonUtil.toastNoRepeat(mActivity, "打印失败,条码数据为空");
+        }
+    }
+
+    /**
+     * popupWindow 设置适配器
+     */
+    private class MyAdapter extends ArrayAdapter<PrintDataBean> {
+        private int resourceId;
+
+        public MyAdapter(Context context, int resource, List<PrintDataBean> objects) {
+            super(context, resource, objects);
+            resourceId = resource;
+        }
+
+        @Override
+        public View getView(int position, View convertView, ViewGroup parent) {
+            //WHBreakingBatchBreakingBtnClickEvent.Message target = getItem(position);
+            PrintDataBean person = getItem(position);
+            convertView = LayoutInflater.from(getContext()).inflate(resourceId, null);
+            TextView tv_bar_code = (TextView) convertView.findViewById(R.id.tv_bar_code);
+            TextView tv_bar_remain = (TextView) convertView.findViewById(R.id.tv_bar_remain);
+            // tv_bar_code.setText(target.bar_code);
+            // tv_bar_remain.setText(target.bar_remain);
+            tv_bar_code.setText(person.getBAR_CODE());
+            tv_bar_remain.setText(person.getBAR_REMAIN());
+            return convertView;
+        }
+    }
+
     @Override
     public void onActivityResult(int requestCode, int resultCode, Intent data) {
         super.onActivityResult(requestCode, resultCode, data);

+ 177 - 1
app/src/main/java/com/uas/jc_wms/fragment/WHCombineBatchFragment.java

@@ -8,6 +8,7 @@ import android.content.Intent;
 import android.graphics.drawable.BitmapDrawable;
 import android.net.Uri;
 import android.os.Build;
+import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
 import android.support.v4.content.FileProvider;
@@ -30,6 +31,8 @@ import android.widget.PopupWindow;
 import android.widget.TextView;
 import android.widget.Toast;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
 import com.android.volley.AuthFailureError;
 import com.android.volley.Request;
 import com.android.volley.RequestQueue;
@@ -40,16 +43,22 @@ import com.android.volley.toolbox.Volley;
 import com.google.gson.Gson;
 import com.uas.jc_wms.R;
 import com.uas.jc_wms.activity.FunctionActivity;
+import com.uas.jc_wms.bean.CodePrinBean;
+import com.uas.jc_wms.bean.PrintDataBean;
+import com.uas.jc_wms.bean.WHBreakingBatchBreakingBtnClickEvent;
 import com.uas.jc_wms.bean.WHBreakingBatchGetBarcodeData;
 import com.uas.jc_wms.bean.WHCombineBatchFragmentCombineBtnClickEvent;
 import com.uas.jc_wms.global.GloableParams;
+import com.uas.jc_wms.tools.SharedPreUtil;
 import com.uas.jc_wms.tools.VolleyUtil;
 import com.uas.jc_wms.util.CameraUtil;
 import com.uas.jc_wms.util.CommonUtil;
 import com.uas.jc_wms.util.Constants;
 import com.uas.jc_wms.util.FileUtils;
+import com.uas.jc_wms.util.FragmentUtils;
 import com.uas.jc_wms.util.JsonTools;
 import com.uas.jc_wms.util.LogUtil;
+import com.uas.jc_wms.util.PrintUtils;
 import com.uas.jc_wms.view.ClearableEditText;
 import com.uuzuche.lib_zxing.activity.CaptureActivity;
 import com.uuzuche.lib_zxing.activity.CodeUtils;
@@ -88,6 +97,13 @@ public class WHCombineBatchFragment extends BaseFragment implements View.OnClick
     private int lastPress = 0;
     private boolean delState = false;
     private String mPrintUrl = "";
+
+    private ListView listPrintView;
+    private boolean isConnected = false;
+    private String mOldAddress = "";
+    private int mPrintDpi = 203;
+    private List<PrintDataBean> messages = new ArrayList<>();
+
     private Handler mHandler = new Handler() {
         @Override
         public void handleMessage(Message msg) {
@@ -497,7 +513,10 @@ public class WHCombineBatchFragment extends BaseFragment implements View.OnClick
                 sum = 0;
                 tvToatal.setText(sum + "");
                 btnMerge.setEnabled(false);
-                initPopuptWindow(whc2.getData().getBAR_CODE(), CommonUtil.doubleFormat(whc2.getData().getBAR_REMAIN()));
+                //下载pdf文件在其它打印APP中完成打印
+                //                initPopuptWindow(whc2.getData().getBAR_CODE(), CommonUtil.doubleFormat(whc2.getData().getBAR_REMAIN()));
+                //蓝牙打印机打印
+                initPrintPopupWindow(s);
             }
         }, new Response.ErrorListener() {
             @Override
@@ -533,6 +552,102 @@ public class WHCombineBatchFragment extends BaseFragment implements View.OnClick
 
     }
 
+    /**
+     * 蓝牙打印pop
+     * @param s
+     */
+    protected void initPrintPopupWindow(String s) {
+        JSONArray listArray = new JSONArray();
+        try {
+            Gson gson = new Gson();
+            CodePrinBean codePrinBean = gson.fromJson(s, CodePrinBean.class);
+            if (codePrinBean.getData() == null){
+                return;
+            }
+            CodePrinBean.DataBean data = codePrinBean.getData();
+            String json = gson.toJson(data);
+            com.alibaba.fastjson.JSONObject resultObject = JSON.parseObject(json);
+            listArray.add(new com.alibaba.fastjson.JSONObject(resultObject));
+            messages.clear();
+            for (int i = 0; i < listArray.size(); i++) {
+                com.alibaba.fastjson.JSONObject barcodeObject = listArray.getJSONObject(i);
+                PrintDataBean dataBean = new PrintDataBean();
+                dataBean.setBAR_CODE(barcodeObject.getString("BAR_CODE"));
+                dataBean.setBAR_REMAIN(barcodeObject.getString("BAR_REMAIN"));
+                messages.add(dataBean);
+            }
+        }catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        popView = LayoutInflater.from(getActivity()).inflate(R.layout.popupwindow_whbreaking_batch, null);
+        listPrintView = (ListView) popView.findViewById(R.id.list_view);
+        Button btnPrintf = (Button) popView.findViewById(R.id.btn_print);
+        Button btnPrintfSet = (Button) popView.findViewById(R.id.btn_print_setting);
+        Button btnClose = (Button) popView.findViewById(R.id.btn_close);
+        Button btnBack = (Button) popView.findViewById(R.id.btn_back);
+
+        btnBack.setVisibility(View.GONE);
+        btnClose.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closePopupWindow();
+            }
+        });
+        btnPrintf.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (isConnected) {
+                    progressDialog.show();
+                    printEvent(listArray);
+                } else {
+                    closePopupWindow();
+
+                    BlueToothPrintFragment blueToothPrintFragment = new BlueToothPrintFragment();
+                    Bundle bundle = new Bundle();
+                    bundle.putString(Constants.KEY.BARCODE_PRINT_ARRAY, listArray.toString());
+                    blueToothPrintFragment.setArguments(bundle);
+                    FragmentUtils.switchFragment(WHCombineBatchFragment.this, blueToothPrintFragment);
+                }
+            }
+        });
+
+        btnPrintfSet.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closePopupWindow();
+
+                BlueToothPrintFragment blueToothPrintFragment = new BlueToothPrintFragment();
+                Bundle bundle = new Bundle();
+                bundle.putString(Constants.KEY.BARCODE_PRINT_ARRAY, listArray.toString());
+                blueToothPrintFragment.setArguments(bundle);
+                FragmentUtils.switchFragment(WHCombineBatchFragment.this, blueToothPrintFragment);
+            }
+        });
+
+        MyPrintAdapter adapter = new MyPrintAdapter(getActivity(), R.layout.item_list_whbreakingbatchfragment, messages);
+        listPrintView.setAdapter(adapter);
+        //当只有一条数据的时候可以加上
+        /*
+        if (messages.size()>1){
+            btnBack.setVisibility(View.GONE);
+        }*/
+        // PopupWindow实例化,参数的意思是 view,长(不包括状态栏),高(不包括状态栏),是否聚焦
+        pop = new PopupWindow(popView, LinearLayout.LayoutParams.WRAP_CONTENT,
+                LinearLayout.LayoutParams.WRAP_CONTENT, true);
+        pop.setAnimationStyle(R.style.MenuAnimationFade);
+        pop.setBackgroundDrawable(new BitmapDrawable());
+        // 弹出窗口显示内容视图,默认以锚定视图的左下角为起点,这里为点击按钮
+        pop.showAtLocation(getActivity().getWindow().getDecorView(), Gravity.CENTER, 0, 0);
+        pop.setOnDismissListener(new PopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                closePopupWindow();
+            }
+        });
+        CommonUtil.setBackgroundAlpha(mActivity, 0.5f);
+    }
+
     public static final String GETPRINTDATA = "getPrintData";
 
     private void getPrintData() {
@@ -642,4 +757,65 @@ public class WHCombineBatchFragment extends BaseFragment implements View.OnClick
             return convertView;
         }
     }
+
+    private void printEvent(JSONArray printArray) {
+        if (printArray != null && printArray.size() > 0) {
+            boolean isFail = false;
+            for (int i = 0; i < printArray.size(); i++) {
+                try {
+                    com.alibaba.fastjson.JSONObject printObject = printArray.getJSONObject(i);
+                    int printResult = PrintUtils.printBar(mActivity, printObject.toString(), mPrintDpi, null);
+                    if (printResult <= 0) {
+                        isFail = true;
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+            closePopupWindow();
+            progressDialog.dismiss();
+            if (isFail) {
+                isConnected = false;
+                SharedPreUtil.saveInt(mActivity, "printConnect", 0);
+                CommonUtil.toastNoRepeat(mActivity, "打印失败,请重新连接打印机");
+
+                BlueToothPrintFragment blueToothPrintFragment = new BlueToothPrintFragment();
+
+                Bundle bundle = new Bundle();
+                bundle.putString(Constants.KEY.BARCODE_PRINT_ARRAY, printArray.toString());
+                blueToothPrintFragment.setArguments(bundle);
+                FragmentUtils.switchFragment(WHCombineBatchFragment.this, blueToothPrintFragment);
+            } else {
+                CommonUtil.toastNoRepeat(mActivity, "打印成功");
+            }
+        } else {
+            CommonUtil.toastNoRepeat(mActivity, "打印失败,条码数据为空");
+        }
+    }
+
+    /**
+     * popupWindow 设置适配器
+     */
+    private class MyPrintAdapter extends ArrayAdapter<PrintDataBean> {
+        private int resourceId;
+
+        public MyPrintAdapter(Context context, int resource, List<PrintDataBean> objects) {
+            super(context, resource, objects);
+            resourceId = resource;
+        }
+
+        @Override
+        public View getView(int position, View convertView, ViewGroup parent) {
+            //WHBreakingBatchBreakingBtnClickEvent.Message target = getItem(position);
+            PrintDataBean person = getItem(position);
+            convertView = LayoutInflater.from(getContext()).inflate(resourceId, null);
+            TextView tv_bar_code = (TextView) convertView.findViewById(R.id.tv_bar_code);
+            TextView tv_bar_remain = (TextView) convertView.findViewById(R.id.tv_bar_remain);
+            // tv_bar_code.setText(target.bar_code);
+            // tv_bar_remain.setText(target.bar_remain);
+            tv_bar_code.setText(person.getBAR_CODE());
+            tv_bar_remain.setText(person.getBAR_REMAIN());
+            return convertView;
+        }
+    }
 }

+ 14 - 6
app/src/main/java/com/uas/jc_wms/global/GloableParams.java

@@ -258,6 +258,7 @@ public class GloableParams {
     public static String ADDRESS_PDAIO_IN_GETWHCODE;
     public static String ADDRESS_OUTMATERIAL_NEWPRODINOUT;
     public static String ADDRESS_DOCUMENT_DETAILS;
+    public static String ADDRESS_BARCODE_SPLITTING;      //按条码拆分
 
     //连接服务器请求地址
     private static final String ADDRESSTAIL_CONNECT_SERVER = "/api/pda/getAllMasters.action";
@@ -276,6 +277,8 @@ public class GloableParams {
     private static final String ADDRESSTAIL_OUTMATERIAL_GETPDAVERSION = "/api/pda/outMaterial/getPdaVersion.action";
     //生成单据明细
     private static final String ADDRESSTAIL_DOCUMENT_DETAILS = "/api/pda/receiving/GenProdiodetail.action";
+    //按条码拆分
+    private static final String ADDRESSTAIL_BARCODE_SPLITTING = "/api/pda/outMaterial/splitProdAppropriationOut.action";
 
     /**
      * 条码信息采集
@@ -773,25 +776,29 @@ public class GloableParams {
     public static final String GRIDNAME_STOCK_BARCODE = "补贴库存条码";
     public static final String GRIDNAME_WORK_INVENTORY = "盘点作业";
     public static final String GRIDNAME_MODIFY_QUANTITY = "条码数量修改";
-    public static final String GRIDNAME_BOM_CHECK = "BOM校验";
+//    public static final String GRIDNAME_BOM_CHECK = "BOM校验";
     public static final String MENU_STORAGE_STOCK_INFO_COLLECT = "库存条码绑定";
     public static final String GRIDNAME_FINISHED_PRODUCT_STORAGE = "成品入库";
     public static final String GRIDNAME_FINISHED_PRODUCT_OUTBOUND = "成品出库";
-    public static final String GRIDNAME_EQUIPMENT_CYCLECOUNT_OUTBOUND = "设备周期盘点";
+//    public static final String GRIDNAME_EQUIPMENT_CYCLECOUNT_OUTBOUND = "设备周期盘点";
     public static final String WORK_ORDER_MATERIAL_CHECK= "工单物料核对";
     public static final String[] storageGridNames = {GRIDNAME_GOOD_SEARCH, GRIDNAME_BATCH_OPRATION,
-            GRIDNAME_STORAGE_TRANSFER, GRIDNAME_MODIFY_QUANTITY, GRIDNAME_WORK_INVENTORY, GRIDNAME_BOM_CHECK,MENU_STORAGE_STOCK_INFO_COLLECT,
+            GRIDNAME_STORAGE_TRANSFER, GRIDNAME_MODIFY_QUANTITY, GRIDNAME_WORK_INVENTORY,
+//            GRIDNAME_BOM_CHECK,
+            MENU_STORAGE_STOCK_INFO_COLLECT,
             GRIDNAME_FINISHED_PRODUCT_STORAGE,
             GRIDNAME_FINISHED_PRODUCT_OUTBOUND,
-            GRIDNAME_EQUIPMENT_CYCLECOUNT_OUTBOUND,WORK_ORDER_MATERIAL_CHECK};
+//            GRIDNAME_EQUIPMENT_CYCLECOUNT_OUTBOUND,
+            WORK_ORDER_MATERIAL_CHECK};
     public static final int[] storageGridImgs = {R.drawable.storage_good_search,
             R.drawable.storage_bach_operation, R.drawable.storage_transfer,
             R.drawable.storage_work_inventory,
-            R.drawable.ic_modify_quantity, R.drawable.storage_msd_manager,
+            R.drawable.ic_modify_quantity,
+//            R.drawable.storage_msd_manager,
             R.drawable.storage_transfer,
             R.drawable.ic_finished_product_storage,
             R.drawable.ic_finished_product_outbound,
-            R.drawable.equipment,
+//            R.drawable.equipment,
             R.drawable.iv_hed
     };
     //DETAIL:搜索备料单号,下拉列表
@@ -1139,6 +1146,7 @@ public class GloableParams {
         GloableParams.ADDRESS_PDAIO_IN_GETWHCODE = uriHead + GloableParams.ADDRESSTAIL_PDAIO_IN_GETWHCODE;
         GloableParams.ADDRESS_OUTMATERIAL_NEWPRODINOUT = uriHead + GloableParams.ADDRESSTAIL_COUNTING_NEWPRODINOUT;
         GloableParams.ADDRESS_DOCUMENT_DETAILS = uriHead + GloableParams.ADDRESSTAIL_DOCUMENT_DETAILS;
+        GloableParams.ADDRESS_BARCODE_SPLITTING = uriHead + GloableParams.ADDRESSTAIL_BARCODE_SPLITTING;
 
 
 

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

@@ -75,4 +75,15 @@
         android:background="@color/transparent"
         android:text="单据过账"
         android:textSize="@dimen/app_text_size_body_2" />
+
+    <Button
+        android:id="@+id/pop_material_out_menu_8"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:background="@color/transparent"
+        android:text="按条码拆分"
+        android:textSize="@dimen/app_text_size_body_2" />
+
 </LinearLayout>