Browse Source

基于旭顺仓库修改,根据修改文档调整APP相关功能,增加产地下拉框功能,去除条码号和 DC(日期),去除多余的提示. 取消条码号不为空的提示, 入库采集取消条码号的调用保存功能, 出库采集调整二维码接口, 增加保存功能, 调整二维码清除逻辑, 出库列表调整新页面功能, 出库采集页面修改二维码和箱号逻辑, 修改出库采集触发保存后的显示逻辑

songw 5 months ago
parent
commit
cb0501d8ba
22 changed files with 820 additions and 282 deletions
  1. 1 1
      app/build.gradle
  2. 3 0
      app/src/main/java/com/uas/xuslectronic/adapter/StockTaskAdapter.java
  3. 1 1
      app/src/main/java/com/uas/xuslectronic/bean/JLTStorageInBean.java
  4. 114 0
      app/src/main/java/com/uas/xuslectronic/bean/OutboundOrder.java
  5. 9 0
      app/src/main/java/com/uas/xuslectronic/bean/StockTaskItemBean.java
  6. 1 1
      app/src/main/java/com/uas/xuslectronic/fragment/BarcodeInfoCollectFragment.java
  7. 259 35
      app/src/main/java/com/uas/xuslectronic/fragment/IOCOutMakeMaterial.java
  8. 132 120
      app/src/main/java/com/uas/xuslectronic/fragment/IOCOutMakeMaterialOper.java
  9. 51 28
      app/src/main/java/com/uas/xuslectronic/fragment/JLTStorageInBarcodeFragment.java
  10. 0 2
      app/src/main/java/com/uas/xuslectronic/fragment/JltStorageInFilterListFragment.java
  11. 11 10
      app/src/main/java/com/uas/xuslectronic/fragment/MaterialOutRevocationStockFragment.java
  12. 1 0
      app/src/main/java/com/uas/xuslectronic/fragment/MaterialOutStockTaskFragment.java
  13. 0 2
      app/src/main/java/com/uas/xuslectronic/fragment/OutboundLis_Two_fragment.java
  14. 22 1
      app/src/main/java/com/uas/xuslectronic/global/GloableParams.java
  15. 30 2
      app/src/main/res/layout/fragment_iocout_make_material.xml
  16. 39 1
      app/src/main/res/layout/fragment_iocout_make_material_oper.xml
  17. 113 73
      app/src/main/res/layout/fragment_jlt_storage_in_barcode.xml
  18. 10 1
      app/src/main/res/layout/fragment_material_out_revocation_stock.xml
  19. 18 0
      app/src/main/res/layout/item_list_stock_task.xml
  20. 1 0
      app/src/main/res/layout/item_spinner.xml
  21. 2 2
      app/src/main/res/values/strings.xml
  22. 2 2
      build.gradle

+ 1 - 1
app/build.gradle

@@ -41,7 +41,7 @@ android {
             if (outputFile != null && outputFile.name.endsWith('.apk')) {
                 if (variant.buildType.name.equals('release')) {
                     def releaseInfo = getVersionName()
-                    fileName = "仓库-雅燊_RELEASE_${releaseInfo}.apk"
+                    fileName = "雅燊-仓库_RELEASE_${releaseInfo}.apk"
 
                 } else if (variant.buildType.name.equals('debug')) {
                     def debugInfo = getVersionName()

+ 3 - 0
app/src/main/java/com/uas/xuslectronic/adapter/StockTaskAdapter.java

@@ -61,6 +61,7 @@ public class StockTaskAdapter extends BaseAdapter {
         holder.stockTaskLocation.setText(object.getBAR_LOCATION() == null || "null".equals(object.getBAR_LOCATION()) ? "" : object.getBAR_LOCATION());
         holder.stockTaskDetailSpec.setText(((object.getPR_DETAIL() == null || "null".equals(object.getPR_DETAIL())) ? "" : object.getPR_DETAIL()) + "  " + ((object.getPR_SPEC() == null || "null".equals(object.getPR_SPEC())) ? "" : object.getPR_SPEC()));
         holder.stockTaskHave.setText((object.getHASBARCODE() == 0 ? "无" : "有"));
+        holder.tv_model.setText(object.getPR_ORISPECCODE());
     }
 
     protected class ViewHolder {
@@ -72,6 +73,7 @@ public class StockTaskAdapter extends BaseAdapter {
         private TextView stockTaskLocation;
         private TextView stockTaskHave;
         private TextView stockTaskDetailSpec;
+        private TextView tv_model;
 
         public ViewHolder(View view) {
             stockTaskProdcode = (TextView) view.findViewById(R.id.stock_task_prodcode);
@@ -82,6 +84,7 @@ public class StockTaskAdapter extends BaseAdapter {
             stockTaskLocation = (TextView) view.findViewById(R.id.stock_task_location);
             stockTaskHave = (TextView) view.findViewById(R.id.stock_task_have);
             stockTaskDetailSpec = (TextView) view.findViewById(R.id.stock_task_detail_spec);
+            tv_model = (TextView) view.findViewById(R.id.tv_model);
         }
     }
 }

+ 1 - 1
app/src/main/java/com/uas/xuslectronic/bean/JLTStorageInBean.java

@@ -19,7 +19,7 @@ public class JLTStorageInBean {
     private String PI_INOUTNO;
     private long PI_ID;
     private String PI_CLASS;
-    private String PI_TITLE;
+    private String PI_TITLE;        //客户or供应商
     private String PI_WHCODE;
     private String PI_WHNAME;
     private String PI_STATUS;

+ 114 - 0
app/src/main/java/com/uas/xuslectronic/bean/OutboundOrder.java

@@ -0,0 +1,114 @@
+package com.uas.xuslectronic.bean;
+
+public
+        /**
+         * Created by sw on 2025-06-23
+         */
+class OutboundOrder {
+
+    //PI_INOUTNO
+    //string
+    //单号
+    //必需
+    //PI_ID
+    //integer
+    //单据ID
+    //必需
+    //PI_CLASS
+    //string
+    //单据类型
+    //必需
+    //PI_PDASTATUS
+    //string
+    //状态
+    //必需
+    //PI_TITLE
+    //string
+    //客户
+    //必需
+    //PI_WHCODE
+    //string
+    //仓库编号
+    //必需
+    //PI_WHNAME
+    //string
+    //仓库名称
+    //必需
+    //RN
+    //integer
+    //序号
+    //必需
+
+    private String PI_INOUTNO;
+    private long PI_ID;
+    private String PI_CLASS;
+    private String PI_PDASTATUS;
+    private String PI_TITLE;
+    private String PI_WHCODE;
+    private String PI_WHNAME;
+    private long RN;
+
+    public String getPI_INOUTNO() {
+        return PI_INOUTNO;
+    }
+
+    public void setPI_INOUTNO(String PI_INOUTNO) {
+        this.PI_INOUTNO = PI_INOUTNO;
+    }
+
+    public String getPI_CLASS() {
+        return PI_CLASS;
+    }
+
+    public void setPI_CLASS(String PI_CLASS) {
+        this.PI_CLASS = PI_CLASS;
+    }
+
+    public String getPI_PDASTATUS() {
+        return PI_PDASTATUS;
+    }
+
+    public void setPI_PDASTATUS(String PI_PDASTATUS) {
+        this.PI_PDASTATUS = PI_PDASTATUS;
+    }
+
+    public String getPI_TITLE() {
+        return PI_TITLE;
+    }
+
+    public void setPI_TITLE(String PI_TITLE) {
+        this.PI_TITLE = PI_TITLE;
+    }
+
+    public String getPI_WHCODE() {
+        return PI_WHCODE;
+    }
+
+    public void setPI_WHCODE(String PI_WHCODE) {
+        this.PI_WHCODE = PI_WHCODE;
+    }
+
+    public String getPI_WHNAME() {
+        return PI_WHNAME;
+    }
+
+    public void setPI_WHNAME(String PI_WHNAME) {
+        this.PI_WHNAME = PI_WHNAME;
+    }
+
+    public long getPI_ID() {
+        return PI_ID;
+    }
+
+    public void setPI_ID(long PI_ID) {
+        this.PI_ID = PI_ID;
+    }
+
+    public long getRN() {
+        return RN;
+    }
+
+    public void setRN(long RN) {
+        this.RN = RN;
+    }
+}

+ 9 - 0
app/src/main/java/com/uas/xuslectronic/bean/StockTaskItemBean.java

@@ -28,6 +28,15 @@ public class StockTaskItemBean {
     private String PD_BATCHCODE;
     private int HASBARCODE;
     private double BA_REMAIN;
+    private String PR_ORISPECCODE;   //型号
+
+    public String getPR_ORISPECCODE() {
+        return PR_ORISPECCODE;
+    }
+
+    public void setPR_ORISPECCODE(String PR_ORISPECCODE) {
+        this.PR_ORISPECCODE = PR_ORISPECCODE;
+    }
 
     public double getBA_REMAIN() {
         return BA_REMAIN;

+ 1 - 1
app/src/main/java/com/uas/xuslectronic/fragment/BarcodeInfoCollectFragment.java

@@ -101,7 +101,7 @@ public class BarcodeInfoCollectFragment extends BaseFragment {
             @Override
             public void MyEditorAction(String text, int actionId, KeyEvent event) {
                 if (checkbox_barcode.isChecked()==true){
-                    String  mBarcodeEditTexttrim= mBarcodeEditText.getText().toString().trim();
+                    String mBarcodeEditTexttrim= mBarcodeEditText.getText().toString().trim();
                     if (mBarcodeEditTexttrim.isEmpty()){
                         CommonUtil.toastNoRepeat(mActivity,"条码号不可为空");
                         return;

+ 259 - 35
app/src/main/java/com/uas/xuslectronic/fragment/IOCOutMakeMaterial.java

@@ -2,8 +2,11 @@ package com.uas.xuslectronic.fragment;
 
 import android.content.Context;
 import android.content.DialogInterface;
+import android.graphics.Color;
 import android.graphics.drawable.BitmapDrawable;
 import android.os.Bundle;
+import android.os.Handler;
+import android.support.v4.content.ContextCompat;
 import android.support.v7.app.AlertDialog;
 import android.text.Editable;
 import android.text.TextUtils;
@@ -14,6 +17,7 @@ import android.view.KeyEvent;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.view.WindowManager;
 import android.view.inputmethod.EditorInfo;
 import android.view.inputmethod.InputMethodManager;
 import android.widget.AdapterView;
@@ -38,10 +42,22 @@ import com.android.volley.VolleyError;
 import com.android.volley.toolbox.HttpHeaderParser;
 import com.android.volley.toolbox.JsonObjectRequest;
 import com.android.volley.toolbox.StringRequest;
+import com.bin.david.form.core.SmartTable;
+import com.bin.david.form.core.TableConfig;
+import com.bin.david.form.data.CellInfo;
+import com.bin.david.form.data.column.Column;
+import com.bin.david.form.data.format.bg.BaseCellBackgroundFormat;
+import com.bin.david.form.data.style.FontStyle;
+import com.bin.david.form.data.table.TableData;
+import com.bin.david.form.listener.OnColumnItemClickListener;
+import com.scwang.smartrefresh.layout.api.RefreshLayout;
+import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener;
+import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
 import com.uas.xuslectronic.R;
 import com.uas.xuslectronic.application.PdaApplication;
 import com.uas.xuslectronic.bean.IOCOutMakeMaterialFuzzySearch;
 import com.uas.xuslectronic.bean.MaterialOutMessageBean;
+import com.uas.xuslectronic.bean.OutboundOrder;
 import com.uas.xuslectronic.bean.SubmitNotParam;
 import com.uas.xuslectronic.database.DBManager;
 import com.uas.xuslectronic.global.GloableParams;
@@ -51,10 +67,14 @@ import com.uas.xuslectronic.tools.SharedPreUtil;
 import com.uas.xuslectronic.tools.VolleyUtil;
 import com.uas.xuslectronic.util.CommonUtil;
 import com.uas.xuslectronic.util.Constants;
+import com.uas.xuslectronic.util.FastjsonUtil;
+import com.uas.xuslectronic.util.HttpCallback;
+import com.uas.xuslectronic.util.HttpParams;
 import com.uas.xuslectronic.util.JsonTools;
 import com.uas.xuslectronic.util.JsonUtils;
 import com.uas.xuslectronic.util.LogUtil;
 import com.uas.xuslectronic.util.MyArrayAdapter;
+import com.uas.xuslectronic.util.VollyRequest;
 import com.uas.xuslectronic.view.ClearableEditText;
 
 import org.json.JSONArray;
@@ -75,12 +95,9 @@ import butterknife.OnClick;
 /**
  * 材料出库页面
  */
-public class IOCOutMakeMaterial extends BaseFragment {
+public class IOCOutMakeMaterial extends BaseFragment implements OnColumnItemClickListener<String> {
 
     private static String TAG = "IOCOutMakeMaterial";
-
-
-
     private IOCOutMakeMaterialFuzzySearch fuzzySearchData;
     private MyArrayAdapter<String> autoStringAdapter;
     private StringRequest stringRequest, stringRequestPost;
@@ -103,6 +120,14 @@ public class IOCOutMakeMaterial extends BaseFragment {
     private ListView listInOut;
     private TextView mMultipleTextView;
 
+    private SmartTable st_data;
+    private Column<String> mNumColumn, mClassColumn, mStateColumn, mWhcodeColumn, mWhcodeDesColumn, mSupplierColumn;
+    private TableData<OutboundOrder> mTableData;
+    private List<OutboundOrder> outboundOrderList;
+    private int mPageIndex = 1;
+    private int mPageSize = 20;
+    private RefreshLayout mRefreshLayout;
+
     @Override
     protected int getLayout() {
         return R.layout.fragment_iocout_make_material;
@@ -117,8 +142,25 @@ public class IOCOutMakeMaterial extends BaseFragment {
         submitBtn = root.findViewById(R.id.submit_btn);
         listInOut = root.findViewById(R.id.list_in_out);
         mMultipleTextView = root.findViewById(R.id.iocout_material_multiple_tv);
+        st_data = root.findViewById(R.id.st_data);
+        mRefreshLayout = root.findViewById(R.id.pda_wms_in_filter_list_srl);
+        mRefreshLayout.setEnableAutoLoadMore(false);
 
+        mRefreshLayout.setOnRefreshListener(new OnRefreshListener() {
+            @Override
+            public void onRefresh(RefreshLayout refreshLayout) {
+                mPageIndex = 1;
+                getTableData("");
+            }
+        });
 
+        mRefreshLayout.setOnLoadMoreListener(new OnLoadMoreListener() {
+            @Override
+            public void onLoadMore(RefreshLayout refreshLayout) {
+                mPageIndex++;
+                getTableData("");
+            }
+        });
 
         mDbManager = new DBManager(getActivity());
         ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText("出库单");
@@ -142,16 +184,14 @@ public class IOCOutMakeMaterial extends BaseFragment {
         } else {
             adapterListView = new AdapterListView(getActivity(), R.layout.item_list_ioc_out_make_material, dataList);
             listInOut.setAdapter(adapterListView);
-            if (CommonUtil.isNetWorkConnected(mActivity))
+            if (CommonUtil.isNetWorkConnected(mActivity)) {
                 refreshMaterialStatus();
+            }
         }
-
-
     }
 
     @Override
     protected void initEvents() {
-
         listInOut.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
             public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
@@ -159,14 +199,14 @@ public class IOCOutMakeMaterial extends BaseFragment {
                 rowClickEvent(i);
             }
         });
-        listInOut.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
-            @Override
-            public boolean onItemLongClick(AdapterView<?> adapterView, View view, int i, long l) {
-                //把listView 的item传过去
-                showListPopupWindow(i);
-                return true;
-            }
-        });
+//        listInOut.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
+//            @Override
+//            public boolean onItemLongClick(AdapterView<?> adapterView, View view, int i, long l) {
+//                //把listView 的item传过去
+//                showListPopupWindow(i);
+//                return true;
+//            }
+//        });
         inOutNo.addTextChangedListener(inOutNoTextWatcher);
 
         inOutNo.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@@ -268,7 +308,142 @@ public class IOCOutMakeMaterial extends BaseFragment {
 
     @Override
     protected void initDatas() {
+        WindowManager wm = mActivity.getWindowManager();
+        int screenWith = wm.getDefaultDisplay().getWidth();
+        st_data.getConfig().setMinTableWidth(screenWith)
+                .setShowXSequence(false)
+                .setShowYSequence(false)
+                .setShowTableTitle(false)
+                .setFixedTitle(true)
+                .setVerticalPadding(CommonUtil.dip2px(mActivity, 12))
+                .setColumnTitleVerticalPadding(CommonUtil.dip2px(mActivity, 12))
+                .setHorizontalPadding(CommonUtil.dip2px(mActivity, 10))
+                .setSequenceHorizontalPadding(CommonUtil.dip2px(mActivity, 10))
+                .setColumnTitleHorizontalPadding(CommonUtil.dip2px(mActivity, 10))
+                .setColumnTitleStyle(new FontStyle(CommonUtil.sp2px(mActivity, 15), Color.parseColor("#000000")))
+                .setContentCellBackgroundFormat(new BaseCellBackgroundFormat<CellInfo>() {
+                    @Override
+                    public int getBackGroundColor(CellInfo cellInfo) {
+                        if (cellInfo.row % 2 == 0) {
+                            return ContextCompat.getColor(mActivity, R.color.blue_50);
+                        }
+                        return TableConfig.INVALID_COLOR;
+                    }
+                });
+
+        //    outboundOrder.setPI_INOUTNO(FastjsonUtil.getText(dataObject, "PI_INOUTNO"));
+        //                                        outboundOrder.setPI_ID(FastjsonUtil.getInt(dataObject, "PI_ID"));
+        //                                        outboundOrder.setPI_CLASS(FastjsonUtil.getText(dataObject, "PI_CLASS"));
+        //                                        outboundOrder.setPI_PDASTATUS(FastjsonUtil.getText(dataObject, "PI_PDASTATUS"));
+        //                                        outboundOrder.setPI_TITLE(FastjsonUtil.getText(dataObject, "PI_TITLE"));
+        //                                        outboundOrder.setPI_WHCODE(FastjsonUtil.getText(dataObject, "PI_WHCODE"));
+        //                                        outboundOrder.setPI_WHCODE(FastjsonUtil.getText(dataObject, "PI_WHNAME"));
+        //                                        outboundOrder.setRN(FastjsonUtil.getInt(dataObject, "RN"));
+
+        //单号|类型|状态|客户|仓库编号|仓库名称
+        mNumColumn = new Column<String>("单号", "PI_INOUTNO");
+        mNumColumn.setFixed(true);
+        mClassColumn = new Column<String>("类型", "PI_CLASS");
+        mStateColumn = new Column<String>("状态", "PI_PDASTATUS");
+        mSupplierColumn = new Column<String>("客户", "PI_TITLE");
+        mWhcodeColumn = new Column<String>("仓库编号", "PI_WHCODE");
+        mWhcodeDesColumn = new Column<String>("仓库名称", "PI_WHNAME");
+
+        mNumColumn.setOnColumnItemClickListener(this);
+        mClassColumn.setOnColumnItemClickListener(this);
+        mStateColumn.setOnColumnItemClickListener(this);
+        mSupplierColumn.setOnColumnItemClickListener(this);
+        mWhcodeColumn.setOnColumnItemClickListener(this);
+        mWhcodeDesColumn.setOnColumnItemClickListener(this);
+
+        outboundOrderList = new ArrayList<>();
+        setFilterTableData(outboundOrderList);
+        getTableData("");
+    }
 
+    private void getTableData(String pi_inoutno) {
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_OUTBOUND_GET_OUT_DATA_LIST)
+                        .method(Request.Method.GET)
+                        .tag(TAG + "getShopPlan")
+                        .flag(0)
+                        .addParam("pi_inoutno",pi_inoutno)
+                        .addParam("page",mPageIndex + "")
+                        .addParam("pageSize",mPageSize + "")
+                        .build(), new HttpCallback() {
+
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        try {
+                            if (mPageIndex == 1) {
+                                outboundOrderList.clear();
+                            }
+                            String result = o.toString();
+                            com.alibaba.fastjson.JSONObject resultObject = JSON.parseObject(result);
+                            com.alibaba.fastjson.JSONArray dataArray = resultObject.getJSONArray("data");
+                            List<OutboundOrder> list = new ArrayList<>();
+                            if (dataArray != null && dataArray.size() > 0) {
+                                for (int i = 0; i < dataArray.size(); i++) {
+                                    com.alibaba.fastjson.JSONObject dataObject = dataArray.getJSONObject(i);
+                                    if (dataObject != null) {
+                                        OutboundOrder outboundOrder = new OutboundOrder();
+                                        outboundOrder.setPI_INOUTNO(FastjsonUtil.getText(dataObject, "PI_INOUTNO"));
+                                        outboundOrder.setPI_ID(FastjsonUtil.getInt(dataObject, "PI_ID"));
+                                        outboundOrder.setPI_CLASS(FastjsonUtil.getText(dataObject, "PI_CLASS"));
+                                        outboundOrder.setPI_PDASTATUS(FastjsonUtil.getText(dataObject, "PI_PDASTATUS"));
+                                        outboundOrder.setPI_TITLE(FastjsonUtil.getText(dataObject, "PI_TITLE"));
+                                        outboundOrder.setPI_WHCODE(FastjsonUtil.getText(dataObject, "PI_WHCODE"));
+                                        outboundOrder.setPI_WHNAME(FastjsonUtil.getText(dataObject, "PI_WHNAME"));
+                                        outboundOrder.setRN(FastjsonUtil.getInt(dataObject, "RN"));
+                                        list.add(outboundOrder);
+                                    }
+                                }
+                            }
+                            if (mPageIndex == 1) {
+                                outboundOrderList = list;//PI_INOUTNO
+                                setFilterTableData(outboundOrderList);
+                            }else if (list.size() > 0) {
+                                outboundOrderList.addAll(list);
+                                st_data.addData(list, true);
+                                new Handler().postDelayed(new Runnable() {
+                                    @Override
+                                    public void run() {
+                                        st_data.postInvalidate();
+                                    }
+                                }, 100);
+                            } else {
+                                mPageIndex--;
+                            }
+                            progressDialog.dismiss();
+                            mRefreshLayout.finishRefresh(0);
+                            mRefreshLayout.finishLoadMore(0);
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                            progressDialog.dismiss();
+                            mRefreshLayout.finishRefresh(0);
+                            mRefreshLayout.finishLoadMore(0);
+                        }
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        mRefreshLayout.finishRefresh(0);
+                        mRefreshLayout.finishLoadMore(0);
+                        if (mPageIndex > 1) {
+                            mPageIndex--;
+                        } else {
+                            setFilterTableData(new ArrayList<>());
+                        }
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+
+                        setFilterTableData(outboundOrderList);
+                        progressDialog.dismiss();
+                    }
+
+                });
     }
 
     @Override
@@ -281,7 +456,6 @@ public class IOCOutMakeMaterial extends BaseFragment {
         return false;
     }
 
-
     /**
      * 刷新多工单采集状态
      */
@@ -341,6 +515,18 @@ public class IOCOutMakeMaterial extends BaseFragment {
         PdaApplication.mRequestQueue.add(stringRequest);
     }
 
+    private void setFilterTableData(List<OutboundOrder> filterTableData) {
+        mTableData = new TableData<OutboundOrder>("出库单列表", filterTableData,
+                mNumColumn, mClassColumn, mStateColumn, mSupplierColumn, mWhcodeColumn, mWhcodeDesColumn);
+        st_data.setTableData(mTableData);
+        //        st_data.requestLayout();
+        st_data.postDelayed(new Runnable() {
+            @Override
+            public void run() {
+                st_data.postInvalidate();
+            }
+        }, 100);
+    }
 
     private void rowClickEvent(final int i) {
         String pi_inoutno = dataList.get(i).getPI_INOUTNO();
@@ -369,7 +555,6 @@ public class IOCOutMakeMaterial extends BaseFragment {
         mDbManager.closeDB();
     }
 
-
     private TextWatcher inOutNoTextWatcher = new TextWatcher() {
         @Override
         public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
@@ -380,26 +565,44 @@ public class IOCOutMakeMaterial extends BaseFragment {
         public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
             //当字数超过3个,自动弹出输入提示框
             if (charSequence.length() >= 3) {
-                if (!charSequence.toString().matches(Constants.REGEX.NO_SYMBOL)) {
-                    CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.note_number_cannot_contain_special));
-                    inOutNo.setText(null);
-                    inOutNo.requestFocus();
-                } else {
-                    fuzzySearch();
-                }
-
+//                if (!charSequence.toString().matches(Constants.REGEX.NO_SYMBOL)) {
+//                    CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.note_number_cannot_contain_special));
+//                    inOutNo.setText(null);
+//                    inOutNo.requestFocus();
+//                } else {
+//                    fuzzySearch();
+//                }
             }
         }
 
         @Override
         public void afterTextChanged(Editable editable) {
-            if (submitBtn != null) {
-                if (editable.length() == 0) {
-                    submitBtn.setEnabled(false);
-                    cleanIv.setVisibility(View.GONE);
-                } else {
-                    submitBtn.setEnabled(true);
-                    cleanIv.setVisibility(View.VISIBLE);
+//            if (submitBtn != null) {
+//                if (editable.length() == 0) {
+//                    submitBtn.setEnabled(false);
+//                    cleanIv.setVisibility(View.GONE);
+//                } else {
+//                    submitBtn.setEnabled(true);
+//                    cleanIv.setVisibility(View.VISIBLE);
+//                }
+//            }
+
+            if (TextUtils.isEmpty(editable.toString().trim())) {
+                setFilterTableData(outboundOrderList);
+            }else {
+                if (editable.toString().trim().length() > 2) {
+                    List<OutboundOrder> oolist = new ArrayList<>();
+                    for (int i = 0; i < outboundOrderList.size(); i++) {
+                        OutboundOrder outboundOrder = outboundOrderList.get(i);
+                        if (outboundOrder != null) {
+                            if (outboundOrder.getPI_INOUTNO().contains(editable.toString().trim())) {
+                                oolist.add(outboundOrder);
+                            }
+                        }
+                    }
+                    if (oolist.size() > 0) {
+                        setFilterTableData(oolist);
+                    }
                 }
             }
         }
@@ -488,6 +691,7 @@ public class IOCOutMakeMaterial extends BaseFragment {
                         reset();
                     } else {
                         submitBtnClick();
+//                        getTableData(inOutNo.getText().toString().trim());
                     }
                 }
 
@@ -1060,8 +1264,6 @@ public class IOCOutMakeMaterial extends BaseFragment {
             progressDialog.dismiss();
             e.printStackTrace();
         }
-
-
     }
 
 
@@ -1074,6 +1276,28 @@ public class IOCOutMakeMaterial extends BaseFragment {
         }
     }
 
+    @Override
+    public void onClick(Column<String> column, String value, String s, int position) {
+        onClickEvent(position);
+    }
+
+    private void onClickEvent(int position) {
+        String pi_inoutno = outboundOrderList.get(position).getPI_INOUTNO();
+        //String pd_whcode = outboundOrderList.get(position).getPD_WHCODE();
+        String pi_id = outboundOrderList.get(position).getPI_ID() + "";
+        IOCOutMakeMaterialOper iocOutMakeMaterialOper = new IOCOutMakeMaterialOper();
+
+        Bundle bundle = new Bundle();
+        bundle.putString("pi_inoutno", pi_inoutno);
+        //bundle.putString("pd_whcode", pd_whcode);
+        bundle.putString("pd_whcode", "");
+        bundle.putString("pi_id", pi_id);
+        bundle.putBoolean("isMultiple", false);
+        iocOutMakeMaterialOper.setArguments(bundle);
+
+        getFragmentManager().beginTransaction().replace(R.id.container_function_fragment, iocOutMakeMaterialOper).addToBackStack(null).commit();
+    }
+
     /**
      * popupWindow 设置适配器
      */

+ 132 - 120
app/src/main/java/com/uas/xuslectronic/fragment/IOCOutMakeMaterialOper.java

@@ -69,6 +69,7 @@ import com.uas.xuslectronic.tools.VolleyUtil;
 import com.uas.xuslectronic.util.CameraUtil;
 import com.uas.xuslectronic.util.CommonUtil;
 import com.uas.xuslectronic.util.Constants;
+import com.uas.xuslectronic.util.FastjsonUtil;
 import com.uas.xuslectronic.util.FileUtils;
 import com.uas.xuslectronic.util.FragmentUtils;
 import com.uas.xuslectronic.util.HttpCallback;
@@ -78,6 +79,7 @@ import com.uas.xuslectronic.util.JsonUtils;
 import com.uas.xuslectronic.util.LogUtil;
 import com.uas.xuslectronic.util.PrintUtils;
 import com.uas.xuslectronic.util.VolleyRequest;
+import com.uas.xuslectronic.util.VollyRequest;
 import com.uas.xuslectronic.view.ClearableEditText;
 import com.uuzuche.lib_zxing.activity.CaptureActivity;
 import com.uuzuche.lib_zxing.activity.CodeUtils;
@@ -109,8 +111,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
     private static final int SPLIT_BARCODE_FAIL = 105;
     private static final int FLAG_CONFIRM_POST = 0x05;
 
-
-
     private ImageView mScanImageView;
 
     private JsonObjectRequest jsonRequest;
@@ -280,51 +280,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                                 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");
-
-
-                                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(), "采集成功");
 
@@ -344,10 +299,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                                     if (materialInformationBean.getPD_BATCHCODE() != null) {
                                         materialInfo = materialInfo + "; 批号:" + materialInformationBean.getPD_BATCHCODE();
                                     }
-                                    mMaterialInforTextView.setText(materialInfo);
+                                    text_finishno.setText(materialInfo);
                                 }
-                            } else {
-                                mMaterialInforTextView.setText("该出库单已经完成备料");
                             }
                         }
 
@@ -416,12 +369,13 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
     private Button mCollectModelBtn;
     private TextView mtypeNameTv;
     private Spinner mTypeSpinner;
-    private TextView mMaterialInforTextView;
     private TextView mCollectResultTextView;
     private TextView mCollectBarProdcodeTv;
     private CheckBox special_check;
     private CheckBox more_check;
     private TextView text_finishno;
+    private Button bt_save;
+    private ClearableEditText cet_xianghao;
 
     @Override
     protected int getLayout() {
@@ -451,12 +405,13 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         mCollectModelBtn = root.findViewById(R.id.iocout_collect_model_btn);
         mtypeNameTv = root.findViewById(R.id.iocout_material_type_tv);
         mTypeSpinner = root.findViewById(R.id.iocout_material_type_sp);
-        mMaterialInforTextView = root.findViewById(R.id.iocout_next_material_information);
         mCollectResultTextView = root.findViewById(R.id.iocout_collect_result);
         special_check = root.findViewById(R.id.special_check);
         more_check = root.findViewById(R.id.more_check);
 
         text_finishno = root.findViewById(R.id.text_finishno);
+        bt_save = root.findViewById(R.id.bt_save);
+        cet_xianghao = root.findViewById(R.id.cet_xianghao);
 
         ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(getString(R.string.out_material_collect));
 //        ((FunctionActivity) getActivity()).fragment = new IOCOutMakeMaterialOper();
@@ -591,6 +546,100 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
 
             }
         });
+
+        bt_save.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                currentBarcode = etBarCode.getText().toString().trim();
+                currentBarcode = currentBarcode.replace("#", "%23");
+                if (TextUtils.isEmpty(currentBarcode)) {
+                    CommonUtil.toastNoRepeat(getActivity(), "请输入二维码");
+                } else {
+                    if (mCollectModel == 1) {
+                        if (CommonUtil.isNetWorkConnected(getActivity())) {
+                            String boxcode = cet_xianghao.getText().toString().trim();
+                            if (TextUtils.isEmpty(boxcode)) {
+                                CommonUtil.toastNoRepeat(getActivity(), "请填入箱号");
+                                return;
+                            }
+                            barcodeSaveEnter(boxcode);
+                        } else {
+                            CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.str_net_not_connect));
+                        }
+                    } else if (mCollectModel == 0) {
+                        //离线模式
+                        saveToDatabase(currentBarcode);
+                    }
+                }
+            }
+        });
+    }
+
+    private void barcodeSaveEnter(String boxcode) {
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_OUTBOUND_COLLECTION_SAVE_BARCODE)
+                        .method(Request.Method.POST)
+                        .tag(TAG + "startMa")
+                        .flag(0)
+                        .addParam("ids", pi_id)
+                        .addParam("barcode", currentBarcode)
+                        .addParam("boxcode", boxcode)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        try {
+                            progressDialog.dismiss();
+                            String s = o.toString();
+                            Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(), "success");
+                            if (isSuccess) {
+                                JSONObject jsonObject = new JSONObject(s);
+                                JSONObject dataObject = jsonObject.optJSONObject("data");
+                                if (dataObject == null) {
+                                    CommonUtil.toastNoRepeat(mActivity, "保存结果获取失败!");
+                                    return;
+                                }
+                                mCollectResultTextView.setVisibility(View.VISIBLE);
+                                mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
+                                mCollectResultTextView.setText(null);
+                                String barcodeResult = "采集成功" + "!\n"
+                                        + "\n型号:" + JsonUtils.optStringNotNull(dataObject, "PN")
+                                        + ";数量:" + CommonUtil.doubleFormat(dataObject.optDouble("QTY"))
+                                        + ";\nDC:" + JsonUtils.optStringNotNull(dataObject, "DC")
+                                        + ";\nLOT:" + JsonUtils.optStringNotNull(dataObject,"LOT");
+
+                                if (dataObject.getString("finishFlag").equals("true")) {
+                                    barcodeResult += "; \n出库单号:" + JsonUtils.optStringNotNull(dataObject,"inoutno") + "已完成备料!";
+                                }
+
+                                String finishno = JsonUtils.optStringNotNull(dataObject, "finishno");
+                                if (!finishno.isEmpty()){
+                                    text_finishno.setVisibility(View.VISIBLE);
+                                    text_finishno.setText(finishno);
+                                }else {
+                                    text_finishno.setVisibility(View.GONE);
+                                }
+                                mCollectResultTextView.setText(barcodeResult);
+                                mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
+                                mBarcodeTableLayout.setVisibility(View.GONE);
+                                mBoxTableLayout.setVisibility(View.GONE);
+
+                                etBarCode.setText("");
+                                currentBarcode = "";
+                            }
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+                    }
+
+                });
     }
 
     /**
@@ -660,7 +709,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
             getNextMaterialInfo();
         } else {
             CommonUtil.toastNoRepeat(mActivity, getString(R.string.net_not_connect));
-            mMaterialInforTextView.setText(getString(R.string.net_not_connect));
+            text_finishno.setText(getString(R.string.net_not_connect));
         }
     }
 
@@ -707,11 +756,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                             if (materialInformationBean.getData().getPD_BATCHCODE() != null) {
                                 materialInfo = materialInfo + "; 批号:" + materialInformationBean.getData().getPD_BATCHCODE();
                             }
-                            if (mMaterialInforTextView != null)
-                                mMaterialInforTextView.setText(materialInfo);
-                        } else {
-                            if (mMaterialInforTextView != null)
-                                mMaterialInforTextView.setText("该出库单当前的仓库已经完成备料");
+                            if (text_finishno != null)
+                                text_finishno.setText(materialInfo);
                         }
                     }
                 },
@@ -720,8 +766,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                     public void onErrorResponse(VolleyError volleyError) {
                         progressDialog.dismiss();
                         String errorMsg = CommonUtil.showErrorToast(volleyError);
-                        if (mMaterialInforTextView != null)
-                            mMaterialInforTextView.setText(errorMsg);
+                        if (text_finishno != null)
+                            text_finishno.setText(errorMsg);
                     }
                 }) {
             @Override
@@ -752,7 +798,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         boolean checkeds = special_check.isChecked();
         boolean more_is = more_check.isChecked();
 //        currentBarcode = etBarCode.getText().toString().trim();
-        String url = (isMultiple ? GloableParams.ADDRESS_OUT_BYBATCH_DEAL : GloableParams.ADDRESS_OUT_BYBATCH_DEAL)
+        String url = (isMultiple ? GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE : GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE)
                 + "?barcode=" + currentBarcode
                 + (isMultiple ? "&ids=" : "&ids=")
                 + pi_id + "&whcode=" + pd_whcode
@@ -764,7 +810,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
             if (mProdOutType != null && mCollectType != null) {
                 if (mProdOutType.equals("byProdcode")) {
                     if (mCollectType.equals("byBarcode")) {
-                        url = (isMultiple ? GloableParams.ADDRESS_OUT_BYBATCH_DEAL : GloableParams.ADDRESS_OUT_BYBATCH_DEAL)
+                        url = (isMultiple ? GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE : GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE)
                                 + "?barcode=" + URLEncoder.encode(currentBarcode, "utf-8")
                                 + (isMultiple ? "&ids=" : "&ids=")
                                 + pi_id + "&whcode=" + pd_whcode
@@ -774,7 +820,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                                 +"&isover="+more_is;
 
                     } else if (mCollectType.equals("byBatchcode")) {
-                        url = (isMultiple ? GloableParams.ADDRESS_OUT_BYBATCH_DEAL : GloableParams.ADDRESS_OUT_BYBATCH_DEAL)
+                        url = (isMultiple ? GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE : GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE)
                                 + "?barcode=" + URLEncoder.encode(currentBarcode, "utf-8")
                                 + (isMultiple ? "&ids=" : "&ids=")
                                 + pi_id + "&whcode=" + pd_whcode
@@ -785,7 +831,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                     }
                 } else if (mProdOutType.equals("byBatch")) {
                     if (mCollectType.equals("byBarcode")) {
-                        url = (isMultiple ? GloableParams.ADDRESS_OUT_BYBATCH_DEAL : GloableParams.ADDRESS_OUT_BYBATCH_DEAL)
+                        url = (isMultiple ? GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE : GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE)
                                 + "?barcode=" + URLEncoder.encode(currentBarcode, "utf-8")
                                 + (isMultiple ? "&ids=" : "&ids=")
                                 + pi_id + "&whcode=" + pd_whcode
@@ -794,7 +840,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                                 +"&ifspecial="+checkeds
                                 +"&isover="+more_is;
                     } else if (mCollectType.equals("byBatchcode")) {
-                        url = (isMultiple ? GloableParams.ADDRESS_OUT_BYBATCH_DEAL : GloableParams.ADDRESS_OUT_BYBATCH_DEAL)
+                        url = (isMultiple ? GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE : GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE)
                                 + "?barcode=" + URLEncoder.encode(currentBarcode, "utf-8")
                                 + (isMultiple ? "&ids=" : "&ids=")
                                 + pi_id + "&whcode=" + pd_whcode
@@ -810,7 +856,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
             e.printStackTrace();
         }
         LogUtil.i("iocouturl", url);
-        etBarCode.setText(null);
         PdaApplication.mRequestQueue.cancelAll(TAG);
         mCollectTypeRadioGroup.setEnabled(false);
         jsonRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {
@@ -826,8 +871,22 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                         CommonUtil.toastNoRepeat(mActivity, "采集结果获取失败!");
                         return;
                     }
-                    JSONObject messageObject = dataObject.getJSONObject("barcode");
+                    if (dataObject.has("tip")) {
+                        mCollectResultTextView.setVisibility(View.VISIBLE);
+                        mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
+                        mCollectResultTextView.setText(null);
+                        mCollectResultTextView.setText(dataObject.getString("tip"));
 
+                        String boxcode = cet_xianghao.getText().toString().trim();
+                        if (TextUtils.isEmpty(boxcode)) {
+                            cet_xianghao.requestFocus();
+                            return;
+                        }else {
+                            barcodeSaveEnter(boxcode);
+                        }
+                        return;
+                    }
+                    JSONObject messageObject = dataObject.getJSONObject("barcode");
                     if (messageObject.has("IFOVER") && messageObject.optBoolean("IFOVER")) {
                         new AlertDialog.Builder(mActivity)
                                 .setMessage("采集条码[" + messageObject.optString("BAR_CODE") + "]有效期已过,是否继续采集?")
@@ -869,10 +928,13 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                                     + ";数量:" + CommonUtil.doubleFormat(messageObject.optDouble("BAR_REMAIN"))
 //                                    + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
                                     + ";\n料号:" + JsonUtils.optStringNotNull(messageObject, "BAR_PRODCODE")
-                                    + ";\n名称规格:" + messageObject.optString("PR_DETAIL")+";";
+                                    + ";\n名称规格:" + JsonUtils.optStringNotNull(messageObject,"PR_DETAIL")
+                                    + "; \n型号:" + JsonUtils.optStringNotNull(messageObject,"PR_ORISPECCODE")
+                                    + ";";
 //                                    + "  " + 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);
@@ -913,52 +975,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                             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");
-
-
-//                            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(), "采集成功");
 
@@ -978,10 +994,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                                 if (materialInformationBean.getPD_BATCHCODE() != null) {
                                     materialInfo = materialInfo + "; 批号:" + materialInformationBean.getPD_BATCHCODE();
                                 }
-                                mMaterialInforTextView.setText(materialInfo);
+                                text_finishno.setText(materialInfo);
                             }
-                        } else {
-                            mMaterialInforTextView.setText("该出库单已经完成备料");
                         }
                     }
 
@@ -1755,10 +1769,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                                 if (materialInformationBean.getPD_BATCHCODE() != null) {
                                     materialInfo = materialInfo + "; 批号:" + materialInformationBean.getPD_BATCHCODE();
                                 }
-                                mMaterialInforTextView.setText(materialInfo);
+                                text_finishno.setText(materialInfo);
                             }
-                        } else {
-                            mMaterialInforTextView.setText("该出库单已经完成备料");
                         }
                     }
 

+ 51 - 28
app/src/main/java/com/uas/xuslectronic/fragment/JLTStorageInBarcodeFragment.java

@@ -18,6 +18,8 @@ import android.text.format.DateFormat;
 import android.util.Log;
 import android.view.KeyEvent;
 import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
 import android.widget.Button;
 import android.widget.CheckBox;
 import android.widget.CompoundButton;
@@ -26,6 +28,7 @@ import android.widget.LinearLayout;
 import android.widget.PopupWindow;
 import android.widget.RadioButton;
 import android.widget.RadioGroup;
+import android.widget.Spinner;
 import android.widget.TextView;
 
 import com.alibaba.fastjson.JSON;
@@ -130,6 +133,10 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
     private CheckBox check_box_date;
     private CheckBox check_box_dc;
 
+    private Spinner sp_origin;  //产地
+    private List<String> originList;
+    private String cco;
+
     public void setOnFinishListener(OnFinishListener onFinishListener) {
         mOnFinishListener = onFinishListener;
     }
@@ -195,6 +202,17 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
         check_box_date = root.findViewById(R.id.check_box_date);
         //字符
         check_box_dc = root.findViewById(R.id.check_box_dc);
+        //产地
+        sp_origin = root.findViewById(R.id.sp_origin);
+
+        originList = new ArrayList<>();
+        originList.add("TAIWAN");
+        originList.add("CHINA");
+        originList.add("KOREA");
+        ArrayAdapter adapter = new ArrayAdapter(getActivity(), R.layout.item_spinner, R.id.text_spinner, originList);
+        sp_origin.setAdapter(adapter);
+        cco = "CHINA";
+        sp_origin.setSelection(1, true);
 
         mBarcodeParseBean = new JLTBarcodeParseBean();
         mBarcodeParseBean.setCHECKPO("N");
@@ -212,7 +230,6 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
         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));
@@ -224,7 +241,6 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
 
     @Override
     protected void initEvents() {
-
         mMoreButton.setOnClickListener(this);
         mCalendarImageView.setOnClickListener(this);
         mBarcodeScanIv.setOnClickListener(this);
@@ -262,7 +278,6 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
             }
         });
 
-
         //输入条码号回车
         CommonUtil.setEditorActionListener(jlt_storage_in_barcode_et, new MyEditorActionListener() {
             @Override
@@ -304,8 +319,6 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
             }
         });
 
-
-
 //        CommonUtil.setEditorActionListener(mModelEditText, new MyEditorActionListener() {
 //            @Override
 //            public void MyEditorAction(String text, int actionId, KeyEvent event) {
@@ -422,6 +435,19 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
 //            }
 //        });
 
+        sp_origin.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+            @Override
+            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+                cco = originList.get(position);
+                Log.e("aaa", "选中的是:" + cco);
+            }
+
+            @Override
+            public void onNothingSelected(AdapterView<?> parent) {
+
+            }
+        });
+
     }
     public void CheckBoxData(){
         String ischecheds = SharedPreUtil.getString(mActivity, Constants.JLTSTORAGEINISCHCKED, null);
@@ -429,23 +455,23 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
             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);
-            }
+//            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);
+//                    jlt_storage_in_barcode_line.setVisibility(View.VISIBLE);
                     SharedPreUtil.saveString(mActivity, Constants.JLTSTORAGEINISCHCKED, "true");
                 }else {
-                    jlt_storage_in_barcode_line.setVisibility(View.GONE);
+//                    jlt_storage_in_barcode_line.setVisibility(View.GONE);
                     SharedPreUtil.saveString(mActivity, Constants.JLTSTORAGEINISCHCKED, "false");
                 }
             }
@@ -781,7 +807,6 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
                 break;
             case R.id.jlt_storage_in_barcode_save_btn:
 //                saveBarcode(false, true);
-
                 clearableedittextjudge();
                 break;
             case R.id.jlt_storage_in_barcode_next_btn:
@@ -826,7 +851,7 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
             jlt_edit_dc.requestFocus();
             return;
         }
-        clearableedittextjudge();
+//        clearableedittextjudge();
     }
     public void newlinebarcodeEnter(){
         String mLotEditTexts = mLotEditText.getText().toString().trim();//仓位
@@ -924,20 +949,20 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
             return;
         }
 
-        if (mBarcodeEditTexts.isEmpty()){
-            CommonUtil.toastNoRepeat(mActivity, "条码号不可为空");
-            return;
-        }
+//        if (mBarcodeEditTexts.isEmpty()){
+//            CommonUtil.toastNoRepeat(mActivity, "条码号不可为空");
+//            return;
+//        }
 
         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;
-            }
+//            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();
@@ -949,6 +974,7 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
         obj.put("RE_MADEDATE",jlt_edit_dataecodes);
         obj.put("CONTENT", mBarcodeEditTexts);
         obj.put("QTY", jlt_edit_qtys);
+        obj.put("CCO", cco);
         String stores = obj.toString();
         progressDialog.show();
         VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
@@ -980,11 +1006,8 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
                 jlt_edit_qty.setText("");
 //                resetState();
                 mBarcodeEditText.requestFocus();
-
-
             }
 
-
             @Override
             public void onFail(int flag, String failStr) throws Exception {
                 progressDialog.dismiss();
@@ -1110,7 +1133,7 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
                         jlt_storage_in_barcode_et.requestFocus();
                         jlt_storage_in_barcode_et.setSelection(jlt_edit_qty.getText().toString().trim().length());
                     }else {
-                        newlinebarcodeEnter();
+                        //newlinebarcodeEnter();
                     }
 
 

+ 0 - 2
app/src/main/java/com/uas/xuslectronic/fragment/JltStorageInFilterListFragment.java

@@ -239,8 +239,6 @@ public class JltStorageInFilterListFragment extends BaseFragment implements OnCo
             }
         });
 
-
-
         mNumColumn.setOnColumnItemClickListener(this);
         mClassColumn.setOnColumnItemClickListener(this);
         mSupplierColumn.setOnColumnItemClickListener(this);

+ 11 - 10
app/src/main/java/com/uas/xuslectronic/fragment/MaterialOutRevocationStockFragment.java

@@ -75,7 +75,8 @@ public class MaterialOutRevocationStockFragment extends BaseFragment {
         mTypeTextView = (TextView) root.findViewById(R.id.material_out_revocation_stock_type);
         mResultTextView = (TextView) root.findViewById(R.id.material_out_revocation_stock_result);
         mBarcodeEditText = (ClearableEditText) root.findViewById(R.id.material_out_revocation_stock_barcode);
-        mScanImageView = (ImageView) mActivity.findViewById(R.id.btn_actionbar_scan_iv);
+        //mScanImageView = (ImageView) mActivity.findViewById(R.id.btn_actionbar_scan_iv);
+        mScanImageView = (ImageView) root.findViewById(R.id.storage_recharge_scan_iv);
 
         mBarcodeEditText.requestFocus();
         Bundle bundle = getArguments();
@@ -101,7 +102,7 @@ public class MaterialOutRevocationStockFragment extends BaseFragment {
                 if (mRevokeType.equals("byBarcode")) {
                     mRevokeType = "byBarcode";
                     mBarcodeEditText.setHint(R.string.please_collect_barcode);
-                    mTypeTextView.setText("码");
+                    mTypeTextView.setText("二维码");
                 } else if (mRevokeType.equals("byBox")) {
                     mBarcodeEditText.setHint(R.string.please_collect_box);
                     mTypeTextView.setText("箱号");
@@ -109,7 +110,7 @@ public class MaterialOutRevocationStockFragment extends BaseFragment {
             } else if (mWhichPage.equals("materialout")) {
                 mRevokeType = "byBarcode";
                 mBarcodeEditText.setHint(R.string.please_collect_barcode);
-                mTypeTextView.setText("码");
+                mTypeTextView.setText("二维码");
             }
 
         }
@@ -122,12 +123,12 @@ public class MaterialOutRevocationStockFragment extends BaseFragment {
         mTypeTextView.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                String typeName = mTypeTextView.getText().toString().trim();
-                if ("条码".equals(typeName)) {
-                    changeToTypeBox();
-                } else if ("箱号".equals(typeName)) {
-                    changeToTypeBarcode();
-                }
+//                String typeName = mTypeTextView.getText().toString().trim();
+//                if ("二维码".equals(typeName)) {
+//                    changeToTypeBox();
+//                } else if ("箱号".equals(typeName)) {
+//                    changeToTypeBarcode();
+//                }
             }
         });
 //        }
@@ -396,7 +397,7 @@ public class MaterialOutRevocationStockFragment extends BaseFragment {
 
     private void changeToTypeBarcode() {
         mBarcodeEditText.setHint(R.string.please_collect_barcode);
-        mTypeTextView.setText("码");
+        mTypeTextView.setText("二维码");
         SharedPreUtil.saveString(getActivity().getApplicationContext(), mWhichPage + Constants.FLAG.MATERIAL_OUT_REVOKE_TYPE, "byBarcode");
         mRevokeType = "byBarcode";
     }

+ 1 - 0
app/src/main/java/com/uas/xuslectronic/fragment/MaterialOutStockTaskFragment.java

@@ -180,6 +180,7 @@ public class MaterialOutStockTaskFragment extends BaseFragment {
                                         stockTaskItemBean.setHASBARCODE((int) JsonUtils.optLongNotNull(dataObject, "HASBARCODE"));
                                         stockTaskItemBean.setPD_BATCHCODE(JsonUtils.optStringNotNull(dataObject, "PD_BATCHCODE"));
                                         stockTaskItemBean.setBA_REMAIN(JsonUtils.optDoubleNotNull(dataObject, "BA_REMAIN"));
+                                        stockTaskItemBean.setPR_ORISPECCODE(JsonUtils.optStringNotNull(dataObject, "PR_ORISPECCODE"));
 
                                         mAllStockTaskItemBeans.add(stockTaskItemBean);
                                     }

+ 0 - 2
app/src/main/java/com/uas/xuslectronic/fragment/OutboundLis_Two_fragment.java

@@ -89,8 +89,6 @@ public class OutboundLis_Two_fragment extends BaseFragment implements OnColumnIt
         mSmartTable = mActivity.findViewById(R.id.jlt_storage_in_filter_list_st);
         mScanImageView = (ImageView) mActivity.findViewById(R.id.storage_recharge_scan_iv);
         mMenuButton = (Button) mActivity.findViewById(R.id.btn_actionbar_more);
-
-
     }
 
     @Override

+ 22 - 1
app/src/main/java/com/uas/xuslectronic/global/GloableParams.java

@@ -142,7 +142,7 @@ public class GloableParams {
     public static String ADDRESS_SMT_FUZZY_SEARCH;
     public static String ADDRESS_OUT_BYBATCH_BREAK;
     public static String ADDRESS_OUT_GET_NEXT_BATCH_DEAL;
-    public static String ADDRESS_OUT_BYBATCH_DEAL;
+    public static String ADDRESS_OUT_BYBATCH_DEAL;      //合并备料
     public static String ADDRESS_OUT_BYBATCH_BREAK_DEAL;
     public static String ADDRESS_OUT_NEED_GET_LIST_DEAL;
     public static String ADDRESS_HAVE_SUBMIT_LIST_DEAL;
@@ -263,6 +263,14 @@ public class GloableParams {
     public static String ADDRESS_DOCUMENTLIBRARY_MAKESNLIST;
     public static String ADDRESS_DOCUMENTLIBRARY_MAKESNPACKAGE;
 
+    //出库采集--二维码enter
+    public static String ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE;
+    //出库采集--保存
+    public static String ADDRESS_OUTBOUND_COLLECTION_SAVE_BARCODE;
+
+    //出库单查询
+    public static String ADDRESS_OUTBOUND_GET_OUT_DATA_LIST;
+
 
     //连接服务器请求地址
     private static final String ADDRESSTAIL_CONNECT_SERVER = "/api/pda/getAllMasters.action";
@@ -749,6 +757,13 @@ public class GloableParams {
     //拆箱序列号查询
     private static final String ADDRESSTAIL_MAKESNPACKAGE = "/api/pda/receiving/makeSnPackage.action";
 
+    //出库采集--二维码enter
+    private static final String ADDRESSTAIL_OUTBOUND_COLLECTION_PARSE_BARCODE = "/api/pda/outMaterial/parseBarcode.action";
+    //出库采集--保存
+    private static final String ADDRESSTAIL_OUTBOUND_COLLECTION_SAVE_BARCODE = "/api/pda/outMaterial/saveBarcode.action";
+
+    //出库单查询
+    private static final String ADDRESSTAIL_OUTBOUND_GET_OUT_DATA_LIST = "/api/pda/outMaterial/getOutDataList.action";
 
 
 
@@ -864,6 +879,7 @@ public class GloableParams {
             LISTNAME_FEEDER_DOWNALL, LISTNAME_FEEDER_QUERY, LISTNAME_FEEDER_SWITCH,
             LISTNAME_FEEDER_CHECK, LISTNAME_FEEDER_MACHINE, LISTNAME_REQUEST_MACHINE,
             LISTNAME_LOCATION_QUERY, LISTNAME_PREMATERIAL_QUERY, LISTNAME_FEEDER_BIND};
+
     public static final int[] feederListImgs = {R.drawable.index_smt_up, R.drawable.index_smt_joint,
             R.drawable.index_smt_change, R.drawable.index_smt_down,
             R.drawable.index_smt_downall, R.drawable.index_smt_query,
@@ -1210,6 +1226,11 @@ public class GloableParams {
 
         GloableParams.ADDRESS_DOCUMENTLIBRARY_MAKESNPACKAGE= uriHead + GloableParams.ADDRESSTAIL_MAKESNPACKAGE;
 
+        GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE= uriHead + GloableParams.ADDRESSTAIL_OUTBOUND_COLLECTION_PARSE_BARCODE;
+        GloableParams.ADDRESS_OUTBOUND_COLLECTION_SAVE_BARCODE= uriHead + GloableParams.ADDRESSTAIL_OUTBOUND_COLLECTION_SAVE_BARCODE;
+
+        GloableParams.ADDRESS_OUTBOUND_GET_OUT_DATA_LIST= uriHead + GloableParams.ADDRESSTAIL_OUTBOUND_GET_OUT_DATA_LIST;
+
 
     }
 }

+ 30 - 2
app/src/main/res/layout/fragment_iocout_make_material.xml

@@ -3,7 +3,9 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical"
-    tools:context="com.uas.xuslectronic.fragment.IOCOutMakeMaterial">
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    tools:context="com.uas.xuslectronic.fragment.IOCOutMakeMaterial"
+    >
 
     <!--    &lt;!&ndash;SearchButton&ndash;&gt;
         <LinearLayout
@@ -42,7 +44,7 @@
                 <AutoCompleteTextView
                     android:id="@+id/in_out_no"
                     style="@style/Search"
-                    android:layout_height="35dp"
+                    android:layout_height="wrap_content"
                     android:background="@drawable/shape_from_edit"
                     android:hint="@string/out_barcode"
                     android:imeOptions="actionSend"
@@ -71,6 +73,7 @@
                 tools:visibility="visible"/>
 
             <Button
+                android:visibility="gone"
                 android:id="@+id/submit_btn"
                 style="@style/ButtonStyle"
                 android:layout_width="0dp"
@@ -82,7 +85,31 @@
                 android:text="@string/confirm" />
         </LinearLayout>
 
+        <com.scwang.smartrefresh.layout.SmartRefreshLayout
+            android:layout_marginTop="10dp"
+            android:id="@+id/pda_wms_in_filter_list_srl"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            >
+
+            <com.scwang.smartrefresh.layout.header.ClassicsHeader
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content" />
+
+            <com.bin.david.form.core.SmartTable
+                android:id="@+id/st_data"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_weight="1" />
+
+            <com.scwang.smartrefresh.layout.footer.ClassicsFooter
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                app:srlAccentColor="@android:color/darker_gray" />
+        </com.scwang.smartrefresh.layout.SmartRefreshLayout>
+
         <ListView
+            android:visibility="gone"
             android:id="@+id/list_in_out"
             android:layout_width="match_parent"
             android:layout_height="match_parent" />
@@ -90,6 +117,7 @@
     </LinearLayout>
 
     <RelativeLayout
+        android:visibility="gone"
         android:layout_width="match_parent"
         android:layout_height="50dp"
         android:layout_marginBottom="10dp">

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

@@ -190,6 +190,37 @@
                     </TableRow>
 
                 </TableLayout>
+
+                <LinearLayout
+                    android:layout_marginTop="10dp"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal"
+                    >
+
+                    <TextView
+                        android:id="@+id/tv_xianghao"
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:background="@color/gray_light"
+                        android:drawablePadding="5dp"
+                        android:gravity="center_vertical"
+                        android:padding="10dp"
+                        android:text="箱号"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+
+                    <com.uas.xuslectronic.view.ClearableEditText
+                        android:id="@+id/cet_xianghao"
+                        style="@style/EditTextStyle"
+                        android:layout_width="match_parent"
+                        android:focusable="true"
+                        android:focusableInTouchMode="true"
+                        android:hint="请输入箱号"
+                        android:textColor="@color/black" />
+
+                </LinearLayout>
+
                  <!--no use-->
                 <Button
                     android:id="@+id/btn_confirm"
@@ -350,6 +381,7 @@
                     tools:visibility="visible"/>
 
                 <TextView
+                    android:visibility="gone"
                     android:id="@+id/iocout_next_material_information"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
@@ -358,7 +390,6 @@
                     android:padding="10dp"
                     tools:text="物料:PD_PRODCODE, 名称规格:PR_DETAIL || PR_SPEC未备料数: PD_RESTQTY,最小包装数:PR_ZXBZS,仓位:BAR_LOCATION,有PD_BATCHCODE 则显示批号:PD_BATCHCODE" />
                 <TextView
-                    android:visibility="gone"
                     android:id="@+id/text_finishno"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
@@ -367,6 +398,13 @@
                     android:padding="10dp"
                     tools:text="" />
 
+                <Button
+                    android:layout_marginTop="10dp"
+                    android:id="@+id/bt_save"
+                    style="@style/ButtonStyle"
+                    android:text="保存"
+                    />
+
             </LinearLayout>
 
         </ScrollView>

+ 113 - 73
app/src/main/res/layout/fragment_jlt_storage_in_barcode.xml

@@ -8,43 +8,46 @@
     android:padding="@dimen/root_layout_padding">
 
     <LinearLayout
-        android:orientation="horizontal"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content">
+        android:layout_height="wrap_content"
+        android:orientation="horizontal">
 
         <TextView
-            android:gravity="center"
-            android:layout_gravity="center"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:gravity="center"
             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_gravity="center"
             android:layout_weight="1"
+            android:gravity="center"
             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:layout_gravity="center"
+            android:gravity="center"
             android:textColor="#333333"
             tools:text="采购验收单" />
+
         <CheckBox
-            android:gravity="center"
-            android:layout_gravity="center"
+            android:visibility="gone"
             android:id="@+id/jlt_check_ok"
-            android:text="采集唯一码"
             android:layout_width="wrap_content"
-            android:layout_height="wrap_content">
-        </CheckBox>
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:gravity="center"
+            android:text="采集唯一码"
+            />
 
     </LinearLayout>
 
@@ -61,9 +64,9 @@
             android:layout_weight="1"
             android:background="@null"
             android:focusable="true"
-            android:selectAllOnFocus="true"
             android:hint="请采集条码号/二维码"
             android:imeOptions="actionSend"
+            android:selectAllOnFocus="true"
             android:textColor="@color/black" />
 
         <ImageView
@@ -88,10 +91,10 @@
             android:orientation="vertical">
 
             <LinearLayout
-                android:visibility="gone"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="4dp">
+                android:layout_marginTop="4dp"
+                android:visibility="gone">
 
                 <TextView
                     style="@style/tl_tv_style"
@@ -110,7 +113,6 @@
                     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"
@@ -118,18 +120,16 @@
                     android:background="@color/white"
                     android:clickable="false"
                     android:paddingRight="10dp"
-                    android:src="@drawable/ic_edittext_scan" />
+                    android:src="@drawable/ic_edittext_scan"
+                    android:visibility="gone" />
             </LinearLayout>
 
 
-
-
-
             <LinearLayout
-                android:visibility="gone"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="4dp">
+                android:layout_marginTop="4dp"
+                android:visibility="gone">
 
                 <LinearLayout
                     android:layout_width="0dp"
@@ -177,11 +177,11 @@
             </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">
+                android:layout_marginTop="4dp"
+                android:visibility="gone">
 
                 <TextView
                     android:id="@+id/material_in_collect_datecode_tv"
@@ -216,10 +216,10 @@
             </LinearLayout>
 
             <LinearLayout
-                android:visibility="gone"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="4dp">
+                android:layout_marginTop="4dp"
+                android:visibility="gone">
 
                 <LinearLayout
                     android:layout_width="0dp"
@@ -267,10 +267,10 @@
 
 
             <LinearLayout
-                android:visibility="gone"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:layout_marginTop="4dp">
+                android:layout_marginTop="4dp"
+                android:visibility="gone">
 
                 <CheckBox
                     android:id="@+id/jlt_storage_in_barcode_po_cb"
@@ -293,7 +293,6 @@
             </LinearLayout>
 
 
-
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
@@ -325,13 +324,13 @@
             </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">
+                android:paddingBottom="6dp"
+                android:visibility="gone">
 
                 <RadioButton
                     android:id="@+id/jlt_pick_material_out_scan_info_rb"
@@ -356,18 +355,21 @@
                     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" />
+                android:layout_height="wrap_content"
+                android:visibility="gone" />
+
             <LinearLayout
                 android:id="@+id/jlt_line_edit"
-                android:orientation="vertical"
                 android:layout_width="match_parent"
-                android:layout_height="match_parent">
+                android:layout_height="match_parent"
+                android:orientation="vertical">
 
                 <LinearLayout
+                    android:visibility="gone"
                     android:id="@+id/jlt_storage_in_barcode_line"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
@@ -387,11 +389,10 @@
                         style="@style/EditTextStyle"
                         android:layout_width="0dp"
                         android:layout_weight="1"
-                        android:lines="1"
-                        android:hint="请采集条码号" />
+                        android:hint="请采集条码号"
+                        android:lines="1" />
 
                     <ImageView
-                        android:visibility="gone"
                         android:id="@+id/jlt_storage_in_barcode_iv"
                         android:layout_width="wrap_content"
                         android:layout_height="match_parent"
@@ -399,12 +400,15 @@
                         android:background="@color/white"
                         android:clickable="false"
                         android:paddingRight="10dp"
-                        android:src="@drawable/ic_edittext_scan" />
+                        android:src="@drawable/ic_edittext_scan"
+                        android:visibility="gone" />
                 </LinearLayout>
+
                 <LinearLayout
-                    android:orientation="horizontal"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal">
+
                     <TextView
                         style="@style/tl_tv_style"
                         android:layout_height="match_parent"
@@ -419,10 +423,11 @@
                         style="@style/jltEditTextStyle"
                         android:layout_width="0dp"
                         android:layout_weight="1"
-                        android:lines="1"
-                        android:hint="请输入数量" />
+                        android:hint="请输入数量"
+                        android:lines="1" />
 
                 </LinearLayout>
+
                 <LinearLayout
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
@@ -442,19 +447,23 @@
                         style="@style/jltEditTextStyle"
                         android:layout_width="0dp"
                         android:layout_weight="1"
-                        android:lines="1"
-                        android:hint="请采集仓位" />
+                        android:hint="请采集仓位"
+                        android:lines="1" />
+
                     <CheckBox
                         android:id="@+id/check_box_positions"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
                         android:layout_gravity="center"
                         android:gravity="center"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"/>
+                        android:visibility="gone" />
                 </LinearLayout>
+
                 <LinearLayout
-                    android:orientation="horizontal"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal">
+
                     <TextView
                         style="@style/tl_tv_style"
                         android:layout_height="match_parent"
@@ -469,19 +478,24 @@
                         style="@style/jltEditTextStyle"
                         android:layout_width="0dp"
                         android:layout_weight="1"
-                        android:lines="1"
-                        android:hint="请输入LotNo" />
+                        android:hint="请输入LotNo"
+                        android:lines="1" />
+
                     <CheckBox
                         android:id="@+id/check_box_lono"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
                         android:layout_gravity="center"
                         android:gravity="center"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"/>
+                        android:visibility="gone" />
                 </LinearLayout>
+
                 <LinearLayout
-                    android:orientation="horizontal"
+                    android:visibility="gone"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal">
+
                     <TextView
                         style="@style/tl_tv_style"
                         android:layout_height="match_parent"
@@ -496,8 +510,9 @@
                         style="@style/jltEditTextStyle"
                         android:layout_width="0dp"
                         android:layout_weight="1"
-                        android:lines="1"
-                        android:hint="请输入日期" />
+                        android:hint="请输入日期"
+                        android:lines="1" />
+
                     <ImageView
                         android:id="@+id/jlt_storage_in_barcode_date_iv"
                         android:layout_width="wrap_content"
@@ -507,18 +522,22 @@
                         android:background="@drawable/bg_edittext"
                         android:clickable="false"
                         android:src="@drawable/ic_calendar" />
+
                     <CheckBox
                         android:id="@+id/check_box_date"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
                         android:layout_gravity="center"
                         android:gravity="center"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"/>
+                        android:visibility="gone" />
 
                 </LinearLayout>
+
                 <LinearLayout
-                    android:orientation="horizontal"
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal">
+
                     <TextView
                         style="@style/tl_tv_style"
                         android:layout_height="match_parent"
@@ -533,24 +552,45 @@
                         style="@style/jltEditTextStyle"
                         android:layout_width="0dp"
                         android:layout_weight="1"
-                        android:lines="1"
-                        android:hint="请输入字符" />
+                        android:hint="请输入字符"
+                        android:lines="1" />
+
                     <CheckBox
                         android:id="@+id/check_box_dc"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
                         android:layout_gravity="center"
                         android:gravity="center"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"/>
+                        android:visibility="gone" />
 
                 </LinearLayout>
 
-            </LinearLayout>
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal">
+
+                    <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" />
 
+                    <Spinner
+                        android:id="@+id/sp_origin"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:background="@drawable/bg_spinner" />
 
+                </LinearLayout>
 
-        </LinearLayout>
+            </LinearLayout>
 
 
+        </LinearLayout>
 
 
     </ScrollView>
@@ -558,6 +598,7 @@
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content">
+
         <Button
             android:id="@+id/jlt_storage_in_barcode_next_btn"
             style="@style/ButtonStyle"
@@ -567,17 +608,16 @@
             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="保存"
-            />
+            android:text="保存" />
 
     </LinearLayout>
+
     <TextView
         android:id="@+id/material_in_collect_result_tv"
         android:layout_width="match_parent"
@@ -586,6 +626,6 @@
         android:background="@drawable/shape_msg_block"
         android:padding="10dp"
         android:visibility="gone"
-        tools:visibility="visible"
-        tools:text="采集成功,条码:786528238;数量:2;料号:209837;名称规格:瓶子" />
+        tools:text="采集成功,条码:786528238;数量:2;料号:209837;名称规格:瓶子"
+        tools:visibility="visible" />
 </LinearLayout>

+ 10 - 1
app/src/main/res/layout/fragment_material_out_revocation_stock.xml

@@ -64,7 +64,7 @@
                 android:drawablePadding="5dp"
                 android:gravity="center_vertical"
                 android:padding="10dp"
-                android:text="码"
+                android:text="二维码"
                 android:textColor="@color/body_text_1"
                 android:textSize="16sp" />
 
@@ -75,6 +75,15 @@
                 android:focusableInTouchMode="true"
                 android:hint="@string/please_collect_barcode"
                 android:textColor="@color/black" />
+
+            <ImageView
+                android:id="@+id/storage_recharge_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" />
         </TableRow>
 
     </TableLayout>

+ 18 - 0
app/src/main/res/layout/item_list_stock_task.xml

@@ -129,4 +129,22 @@
             tools:text="detail  spec" />
     </LinearLayout>
 
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="5dp">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="型号:" />
+
+        <TextView
+            android:id="@+id/tv_model"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            tools:text="" />
+    </LinearLayout>
+
 </LinearLayout>

+ 1 - 0
app/src/main/res/layout/item_spinner.xml

@@ -7,4 +7,5 @@
     <TextView
         android:id="@+id/text_spinner"
         style="@style/SpinnerItemStyle" />
+
 </LinearLayout>

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

@@ -1,6 +1,6 @@
 <resources>
     <string name="my_app_name">雅燊UAS智能终端系统</string>
-    <string name="my_app_name_test">仓库-雅燊</string>
+    <string name="my_app_name_test">雅燊-仓库</string>
     <string name="hello_world">Hello world!</string>
     <string name="action_settings">Settings</string>
     <string name="title_activity_connect_server_fragment">ConnectServerFragment</string>
@@ -365,7 +365,7 @@
     <string name="string_default_linecode">默认线别</string>
     <string name="default_warehouse">仓库编号</string>
     <string name="default_linecode">线别编号</string>
-    <string name="please_collect_barcode">请采集条码号</string>
+    <string name="please_collect_barcode">请扫描二维码</string>
     <string name="please_collect_box">请采集外箱号</string>
     <string name="barcode_num">条码号</string>
     <string name="box_num">外箱号</string>

+ 2 - 2
build.gradle

@@ -50,8 +50,8 @@ ext {
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 1,
-            versionName      : "v1.0.1"
+            versionCode      : 8,
+            versionName      : "v1.0.8"
     ]
 
     depsVersion = [