songw 2 weeks ago
parent
commit
b15cb9cba6

+ 19 - 9
app/src/main/java/com/uas/chishun_wms/fragment/IOCOutMakeMaterialOper.java

@@ -373,6 +373,9 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
     private TextView text_finishno;
     private Button bt_save;
     private ClearableEditText cet_xianghao;
+    private CheckBox cb_auto_save;
+    private LinearLayout ll_number_content;
+    private ClearableEditText cet_number;
 
     @Override
     protected int getLayout() {
@@ -410,6 +413,10 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         bt_save = root.findViewById(R.id.bt_save);
         cet_xianghao = root.findViewById(R.id.cet_xianghao);
 
+        cb_auto_save = root.findViewById(R.id.cb_auto_save);
+        ll_number_content = root.findViewById(R.id.ll_number_content);
+        cet_number = root.findViewById(R.id.cet_number);
+
         ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(getString(R.string.out_material_collect));
 //        ((FunctionActivity) getActivity()).fragment = new IOCOutMakeMaterialOper();
         ((FunctionActivity) getActivity()).setMoreBtnVisible(true);
@@ -480,8 +487,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         mOldAddress = SharedPreUtil.getString(mActivity, "printAddress", "");
         mPrintDpi = SharedPreUtil.getInt(mActivity, "printDpi", 203);
 
-
-
         special_check.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
             @Override
             public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
@@ -489,8 +494,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                 Log.e("checked",checked+"");
             }
         });
-
-
     }
 
     @Override
@@ -540,7 +543,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
 
             @Override
             public void onNothingSelected(AdapterView<?> parent) {
-
             }
         });
 
@@ -577,6 +579,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                         .flag(0)
                         .addParam("ids", pi_id)
                         .addParam("barcode", currentBarcode)
+                        .addParam("QTY", cet_number.getText().toString().trim())
                         .build(), new HttpCallback() {
                     @Override
                     public void onSuccess(int flag, Object o) throws Exception {
@@ -841,7 +844,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                                 +"&ifspecial="+checkeds
                                 +"&isover="+more_is;
                     }
-
                 }
             }
         } catch (UnsupportedEncodingException e) {
@@ -863,12 +865,21 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
                         CommonUtil.toastNoRepeat(mActivity, "采集结果获取失败!");
                         return;
                     }
+                    if (dataObject.has("QTY")){
+                        ll_number_content.setVisibility(View.VISIBLE);
+                        cet_number.setText(dataObject.getString("QTY"));
+                    }else {
+                        ll_number_content.setVisibility(View.GONE);
+                        cet_number.setText("");
+                    }
                     if (dataObject.has("tip")) {
                         mCollectResultTextView.setVisibility(View.VISIBLE);
                         mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
                         mCollectResultTextView.setText(null);
                         mCollectResultTextView.setText(dataObject.getString("tip"));
-                        barcodeSaveEnter();
+                        if (cb_auto_save.isChecked()) {
+                            barcodeSaveEnter();
+                        }
                         return;
                     }
                     JSONObject messageObject = dataObject.getJSONObject("barcode");
@@ -1068,9 +1079,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
             CommonUtil.setBackgroundAlpha(mActivity, 0.5f);
 
         } catch (Exception e) {
-
+            e.printStackTrace();
         }
-
     }
 
     @Override

+ 5 - 0
app/src/main/java/com/uas/chishun_wms/fragment/IndexWareHouseContentFragment.java

@@ -164,6 +164,11 @@ public class IndexWareHouseContentFragment extends BaseFragment implements Adapt
                     getFragmentManager().beginTransaction().addToBackStack(null)
                             .replace(R.id.container_function_fragment, fragment).commit();
                     break;
+                case GloableParams.GRIDNAME_WAREHOUSE_LOCATION_ON_SHELF://箱号查询
+                    fragment = new WarehouseLocationOnShelfFragment();
+                    getFragmentManager().beginTransaction().addToBackStack(null)
+                            .replace(R.id.container_function_fragment, fragment).commit();
+                    break;
             }
             if (mFragment != null) {
                 FragmentUtils.switchFragment(IndexWareHouseContentFragment.this, mFragment);

+ 43 - 11
app/src/main/java/com/uas/chishun_wms/fragment/JLTStorageInBarcodeFragment.java

@@ -87,7 +87,8 @@ import java.util.Map;
 public class JLTStorageInBarcodeFragment extends BaseFragment implements View.OnClickListener {
     private String DIALOG_DATE = "DialogDate";
     private static final int REQUEST_DATE = 11;
-    private static final int SCAN_BARCODE_CODE = 101;
+    private static final int SCAN_BARCODE_CODE = 101;   //条码框
+    private static final int SCAN_STORAGE_CODE = 103;   //仓位框
     private static final int SCAN_MODEL_CODE = 102;
     private Button mMoreButton, mSaveButton, mNextButton;
     private PopupWindow mMenuPopupWindow;
@@ -137,6 +138,8 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
     private Spinner sp_origin;  //产地
     private List<String> originList;
     private String cco;
+    private CheckBox cb_auto_save;
+    private ImageView iv_storage_scanning_code;
 
     public void setOnFinishListener(OnFinishListener onFinishListener) {
         mOnFinishListener = onFinishListener;
@@ -171,8 +174,7 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
         mNextButton = root.findViewById(R.id.jlt_storage_in_barcode_next_btn);
         mPoCheckBox = root.findViewById(R.id.jlt_storage_in_barcode_po_cb);
         mResultTextView = root.findViewById(R.id.material_in_collect_result_tv);
-        //        mModelEditText.requestFocus();
-        mBarcodeEditText.requestFocus();
+
         mEnclosureEditText = root.findViewById(R.id.jlt_storage_in_barcode_enclosure_et);
         mEnclosureFitlerIv = root.findViewById(R.id.jlt_storage_in_barcode_enclosure_filter_iv);
 
@@ -185,6 +187,7 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
         mInfoRadioButton = root.findViewById(R.id.jlt_pick_material_out_scan_info_rb);
         mSignRadioButton = root.findViewById(R.id.jlt_pick_material_out_scan_sign_rb);
         jlt_line_edit = root.findViewById(R.id.jlt_line_edit);
+        cb_auto_save = root.findViewById(R.id.cb_auto_save);
 
         //输入框
         //LotNo
@@ -233,11 +236,15 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
 
         mTypeTextView = root.findViewById(R.id.jlt_storage_in_todo_list_tv);
         mRecyclerView = root.findViewById(R.id.jlt_storage_in_todo_list_rv);
+        iv_storage_scanning_code = root.findViewById(R.id.iv_storage_scanning_code);
+
         mRecyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
         mRecyclerView.addItemDecoration(new RecyclerItemDecoration(2));
         mStorageInTodoAdapter = new NewJLTStorageInTodoAdapter(mActivity);
-        mFocusId = root.findFocus().getId();
+
         CheckBoxData();
+
+        mLotEditText.requestFocus();
     }
 
     @Override
@@ -250,6 +257,7 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
         mNextButton.setOnClickListener(this);
         mEnclosureEditText.setOnClickListener(this);
         mEnclosureFitlerIv.setOnClickListener(this);
+        iv_storage_scanning_code.setOnClickListener(this);
 
         mModelEditText.addTextChangedListener(new MyTextWatcher(mModelEditText));
         mQuantityEditText.addTextChangedListener(new MyTextWatcher(mQuantityEditText));
@@ -495,7 +503,6 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
         mBarcodeParseBean.setOUTBOX(mBoxNum);
 
         mTypeTextView.setText(mPiClass);
-
     }
 
 
@@ -804,6 +811,9 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
             case R.id.jlt_storage_in_barcode_scan_iv:
                 CommonUtil.scanBarcode(mActivity, JLTStorageInBarcodeFragment.this, SCAN_BARCODE_CODE);
                 break;
+            case R.id.iv_storage_scanning_code:
+                CommonUtil.scanBarcode(mActivity, JLTStorageInBarcodeFragment.this, SCAN_STORAGE_CODE);
+                break;
             case R.id.jlt_storage_in_barcode_model_scan_iv:
                 CommonUtil.scanBarcode(mActivity, JLTStorageInBarcodeFragment.this, SCAN_MODEL_CODE);
                 break;
@@ -878,7 +888,9 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
             jlt_edit_dc.requestFocus();
             return;
         }
-        clearableedittextjudge();
+        if (cb_auto_save.isChecked()) {     //自动保存
+            clearableedittextjudge();
+        }
     }
 
     public void newlinemLotEnter() {
@@ -897,7 +909,9 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
             jlt_edit_dc.requestFocus();
             return;
         }
-        clearableedittextjudge();
+        if (cb_auto_save.isChecked()) {     //自动保存
+            clearableedittextjudge();
+        }
     }
 
     public void newlinemLotonEnter() {
@@ -911,7 +925,9 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
             jlt_edit_dc.requestFocus();
             return;
         }
-        clearableedittextjudge();
+        if (cb_auto_save.isChecked()) {     //自动保存
+            clearableedittextjudge();
+        }
     }
 
     public void newlinemdateEnter() {
@@ -920,7 +936,9 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
             jlt_edit_dc.requestFocus();
             return;
         }
-        clearableedittextjudge();
+        if (cb_auto_save.isChecked()) {     //自动保存
+            clearableedittextjudge();
+        }
     }
 
     public void clearableedittextjudge() {
@@ -1144,7 +1162,9 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
                 } else {
                     //newlinebarcodeEnter();
                 }
-                clearableedittextjudge();
+                if (cb_auto_save.isChecked()) {     //自动保存
+                    clearableedittextjudge();
+                }
             }
 
             @Override
@@ -1182,7 +1202,11 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
         if (resultCode != Activity.RESULT_OK) {
             return;
         }
-
+        try {
+            mFocusId = root.findFocus().getId();
+        }catch (Exception e) {
+            e.printStackTrace();
+        }
         if (requestCode == REQUEST_DATE) {
             try {
                 Date date = (Date) data.getSerializableExtra("extra_date");
@@ -1202,6 +1226,14 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
                 barcodeParse(result);
             }
         }
+        if (requestCode == SCAN_STORAGE_CODE && data != null) {
+            if (data.getExtras() != null) {
+                String result = data.getExtras().getString(CodeUtils.RESULT_STRING);
+                mLotEditText.setText(result);
+                mLotEditText.setSelection(result.length());
+                mBarcodeEditText.requestFocus();
+            }
+        }
         if (requestCode == SCAN_MODEL_CODE && data != null) {
             if (data.getExtras() != null) {
                 String result = data.getExtras().getString(CodeUtils.RESULT_STRING);

+ 4 - 4
app/src/main/java/com/uas/chishun_wms/fragment/WHCheckMakeMaterialFragment.java

@@ -167,10 +167,10 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
     private void disposeOnClickEnter() {
         String strProdcode = etProdcode.getText().toString().trim();
         String strWhcode = etWhcode.getText().toString().trim();
-        if (strProdcode.equals("") || strProdcode == null) {
-            etProdcode.setWarnIconVisible();
-            return;
-        }
+//        if (strProdcode.equals("") || strProdcode == null) {
+//            etProdcode.setWarnIconVisible();
+//            return;
+//        }
         //请求详细数据
         showLoadingView();
         requestType = VolleyUtil.FRAGMETN_WHCHECK_PRODUCT_CHECK;

+ 229 - 0
app/src/main/java/com/uas/chishun_wms/fragment/WarehouseLocationOnShelfFragment.java

@@ -0,0 +1,229 @@
+package com.uas.chishun_wms.fragment;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.inputmethod.EditorInfo;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.android.volley.Request;
+import com.android.volley.toolbox.StringRequest;
+import com.uas.chishun_wms.R;
+import com.uas.chishun_wms.activity.FunctionActivity;
+import com.uas.chishun_wms.global.GloableParams;
+import com.uas.chishun_wms.util.CameraUtil;
+import com.uas.chishun_wms.util.CommonUtil;
+import com.uas.chishun_wms.util.FastjsonUtil;
+import com.uas.chishun_wms.util.HttpCallback;
+import com.uas.chishun_wms.util.HttpParams;
+import com.uas.chishun_wms.util.VollyRequest;
+import com.uas.chishun_wms.view.ClearableEditText;
+import com.uuzuche.lib_zxing.activity.CaptureActivity;
+import com.uuzuche.lib_zxing.activity.CodeUtils;
+
+import org.json.JSONObject;
+
+/**
+ * @note:库位上架
+ */
+public class WarehouseLocationOnShelfFragment extends BaseFragment {
+    private static final int SCAN_BARCODE_CODE = 102;
+    private ClearableEditText cet_outbox;
+    private ClearableEditText cet_newlocation;
+    private TextView tv_result;
+    private Button bt_transfer;
+    private ImageView mScanImageView;
+    private int mFocusId;
+    private StringRequest mStringRequest;
+
+    @Override
+    protected int getLayout() {
+        return R.layout.fragment_warehouse_location_on_shelf;
+    }
+
+    @Override
+    protected void initViews() {
+        ((FunctionActivity) mActivity).setScanIvVisible(true);
+        cet_outbox = root.findViewById(R.id.cet_outbox);
+        cet_newlocation = root.findViewById(R.id.cet_newlocation);
+        tv_result = root.findViewById(R.id.tv_result);
+        bt_transfer = root.findViewById(R.id.bt_transfer);
+
+        mScanImageView = (ImageView) mActivity.findViewById(R.id.btn_actionbar_scan_iv);
+
+        cet_outbox.requestFocus();
+    }
+
+    @Override
+    protected void initEvents() {
+        cet_outbox.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                if (actionId == EditorInfo.IME_ACTION_DONE
+                        || actionId == EditorInfo.IME_ACTION_SEND
+                        || actionId == EditorInfo.IME_ACTION_GO
+                        || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
+                    getBarcodeAnalysis();
+                    return true;
+                }
+                return false;
+            }
+        });
+
+        mScanImageView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (CameraUtil.hasCamera()) {
+                    if (root.findFocus() != null) {
+                        mFocusId = root.findFocus().getId();
+                        Intent intent = new Intent();
+                        intent.setClass(mActivity, CaptureActivity.class);
+                        startActivityForResult(intent, SCAN_BARCODE_CODE);
+                    }
+                } else {
+                    CommonUtil.toastNoRepeat(mActivity, getString(R.string.no_camera_detected));
+                }
+            }
+        });
+
+        bt_transfer.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                getTransferData();
+            }
+        });
+    }
+
+    private void getBarcodeAnalysis() {
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_BARCODE_ANALYSIS)
+                        .method(Request.Method.GET)
+                        .tag(TAG + "getTransferData")
+                        .flag(0)
+                        .addParam("barcode", cet_outbox.getText().toString().trim())
+                        .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) {
+                                    String tip = dataObject.getString("tip");
+                                    tv_result.setText(tip);
+                                }else {
+                                    JSONObject exceptionInfo = jsonObject.optJSONObject("exceptionInfo");
+                                    if (exceptionInfo != null) {
+                                        String exceptionInfo1 = dataObject.getString("exceptionInfo");
+                                        tv_result.setText(exceptionInfo1);
+                                    }
+                                }
+                            }
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+                    }
+
+                });
+    }
+
+    private void getTransferData() {
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_WAREHOUSE_LOCATION_ON_SHELF)
+                        .method(Request.Method.POST)
+                        .tag(TAG + "getTransferData")
+                        .flag(0)
+                        .addParam("barcode", cet_outbox.getText().toString().trim())
+                        .addParam("location", cet_newlocation.getText().toString().trim())
+                        .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) {
+                                CommonUtil.toastNoRepeat(mActivity, "转移成功");
+                                //                                JSONObject jsonObject = new JSONObject(s);
+                                //                                JSONObject dataObject = jsonObject.optJSONObject("data");
+                                //                                if (dataObject == null) {
+                                //                                    CommonUtil.toastNoRepeat(mActivity, "转移数据获取失败!");
+                                //                                    return;
+                                //                                }
+                            }
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+                    }
+
+                });
+    }
+
+    @Override
+    protected void initDatas() {
+        //->Actionbar
+        ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(R.string.warehouse_location_on_shelf);
+    }
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+
+        if (resultCode != Activity.RESULT_OK) {
+            return;
+        }
+
+        if (requestCode == SCAN_BARCODE_CODE && data != null) {
+            if (data.getExtras() != null) {
+                String result = data.getExtras().getString(CodeUtils.RESULT_STRING);
+                if (mFocusId == R.id.cet_outbox) {
+                    cet_outbox.setText(result);
+                    cet_outbox.setSelection(result.length());
+                } else if (mFocusId == R.id.cet_newlocation) {
+                    cet_newlocation.setText(result);
+                    cet_newlocation.setSelection(result.length());
+                }
+            }
+        }
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        ((FunctionActivity) mActivity).setScanIvVisible(false);
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        return false;
+    }
+
+    @Override
+    public boolean onFragmentBackPressed() {
+        return false;
+    }
+
+
+}

+ 16 - 0
app/src/main/java/com/uas/chishun_wms/global/GloableParams.java

@@ -271,6 +271,11 @@ public class GloableParams {
     //出库单查询
     public static String ADDRESS_OUTBOUND_GET_OUT_DATA_LIST;
 
+    //库位上架-->条码号解析
+    public static String ADDRESS_BARCODE_ANALYSIS;
+    //库位上架-->转移
+    public static String ADDRESS_WAREHOUSE_LOCATION_ON_SHELF;
+
 
     //连接服务器请求地址
     private static final String ADDRESSTAIL_CONNECT_SERVER = "/api/pda/getAllMasters.action";
@@ -765,6 +770,11 @@ public class GloableParams {
     //出库单查询
     private static final String ADDRESSTAIL_OUTBOUND_GET_OUT_DATA_LIST = "/api/pda/outMaterial/getOutDataList.action";
 
+    //库位上架-->条码号
+    private static final String ADDRESSTAIL_BARCODE_ANALYSIS = "/api/pda/transfer/locaTransfer.action";
+    //库位上架-->转移
+    private static final String ADDRESSTAIL_WAREHOUSE_LOCATION_ON_SHELF = "/api/pda/transfer/locaTransfer.action";
+
 
 
     /***********************************************************************************************/
@@ -827,6 +837,7 @@ public class GloableParams {
     public static final String GRIDNAME_FINISHED_MOVE_THE_CONTAINER = "移箱";
     public static final String GRIDNAME_FINISHED_DISMOUNTING = "拆装箱";
     public static final String GRIDNAME_FINISHED_INQUIRE = "箱号查询";
+    public static final String GRIDNAME_WAREHOUSE_LOCATION_ON_SHELF = "库位上架";
     public static final String[] storageGridNames = {
             GRIDNAME_GOOD_SEARCH,
 //            GRIDNAME_BATCH_OPRATION,
@@ -840,6 +851,7 @@ public class GloableParams {
 //            GRIDNAME_FINISHED_MOVE_THE_CONTAINER,
 //            GRIDNAME_FINISHED_DISMOUNTING,
 //            GRIDNAME_FINISHED_INQUIRE
+            GRIDNAME_WAREHOUSE_LOCATION_ON_SHELF
     };
     public static final int[] storageGridImgs = {
             R.drawable.storage_good_search,
@@ -853,6 +865,7 @@ public class GloableParams {
 //            R.drawable.move_the_container,
 //            R.drawable.ic_dismounting,
 //            R.drawable.ic_inquire
+            R.drawable.storage_transfer
     };
     //DETAIL:搜索备料单号,下拉列表
     public static final String SPINNER_PREPARE_SEARCH = "搜索备料单号";
@@ -1232,6 +1245,9 @@ public class GloableParams {
 
         GloableParams.ADDRESS_OUTBOUND_GET_OUT_DATA_LIST= uriHead + GloableParams.ADDRESSTAIL_OUTBOUND_GET_OUT_DATA_LIST;
 
+        GloableParams.ADDRESS_BARCODE_ANALYSIS= uriHead + GloableParams.ADDRESSTAIL_BARCODE_ANALYSIS;
+        GloableParams.ADDRESS_WAREHOUSE_LOCATION_ON_SHELF= uriHead + GloableParams.ADDRESSTAIL_WAREHOUSE_LOCATION_ON_SHELF;
+
 
     }
 }

+ 5 - 0
app/src/main/java/com/uas/chishun_wms/util/CommonUtil.java

@@ -592,6 +592,11 @@ public class CommonUtil {
      */
     public static String showErrorToast(VolleyError volleyError, boolean showOrNot) {
         String errorStr = "请求失败";
+        try {
+            MyLog.e("aaa","错误信息:" + new String(volleyError.networkResponse.data));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
         if (volleyError != null && volleyError.networkResponse != null && volleyError.networkResponse.data != null) {
             ErrorMsg errorMsg = JsonTools.parseJsonToBean(new String(volleyError.networkResponse.data), ErrorMsg.class);
             if (errorMsg != null && errorMsg.exceptionInfo != null) {

+ 161 - 0
app/src/main/java/com/uas/chishun_wms/util/MyLog.java

@@ -0,0 +1,161 @@
+package com.uas.chishun_wms.util;
+
+import android.annotation.SuppressLint;
+import android.util.Log;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * 带日志文件输入,又可控开关的日志调试
+ */
+@SuppressLint("SimpleDateFormat")
+public class MyLog {
+	public static Boolean MYLOG_SWITCH = true; // 日志文件总开关
+	private static Boolean MYLOG_WRITE_TO_FILE = true;// 日志写入文件开关
+	private static char MYLOG_TYPE = 'v';// 输入日志类型,w代表只输出告警信息等,v代表输出所有信息
+	@SuppressLint("SdCardPath")
+	private static String MYLOG_PATH_SDCARD_DIR1 = "/sdcard/MSShow";    // 日志文件在sdcard中的路径
+	private static String MYLOG_PATH_SDCARD_DIR2 = "/Log";
+	private static String MYLOG_PATH_SDCARD_DIR = MYLOG_PATH_SDCARD_DIR1+MYLOG_PATH_SDCARD_DIR2;
+	private static String MYLOGFILEName = "Log.txt";// 本类输出的日志文件名称
+
+	@SuppressLint("SimpleDateFormat")
+	private static SimpleDateFormat myLogSdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 日志的输出格式
+
+	private static boolean isDebug = true;		//普通log的开关
+	private static String TAG = "英唐" +"-----------";
+
+	public static void e(String msg){
+		if(isDebug){
+			Log.e(TAG, msg);
+		}
+	}
+
+	public static void w(String msg){
+		if(isDebug){
+			Log.w(TAG, msg);
+		}
+	}
+
+	public static void d(String msg){
+		if(isDebug){
+			Log.d(TAG, msg);
+		}
+	}
+
+	public static void i(String msg){
+		if(isDebug){
+			Log.i(TAG, msg);
+		}
+	}
+
+	public static void w(String tag, Object msg) { // 警告信息
+		log(tag, msg.toString(), 'w');
+	}
+
+	public static void e(String tag, Object msg) { // 错误信息
+		log(tag, msg.toString(), 'e');
+	}
+
+	public static void d(String tag, Object msg) {// 调试信息
+		log(tag, msg.toString(), 'd');
+	}
+
+	public static void i(String tag, Object msg) {//
+		log(tag, msg.toString(), 'i');
+	}
+
+	public static void v(String tag, Object msg) {
+		log(tag, msg.toString(), 'v');
+	}
+
+	public static void w(String tag, String text) {
+		log(tag, text, 'w');
+	}
+
+	public static void e(String tag, String text) {
+		log(tag, text, 'e');
+	}
+
+	public static void d(String tag, String text) {
+		log(tag, text, 'd');
+	}
+
+	public static void i(String tag, String text) {
+		log(tag, text, 'i');
+	}
+
+	public static void v(String tag, String text) {
+		log(tag, text, 'v');
+	}
+
+	/**
+	 * 根据tag, msg和等级,输出日志
+	 */
+	private static void log(String tag, String msg, char level) {
+		msg = "\r\n"+msg;
+		if (MYLOG_SWITCH) {
+			if ('e' == level && ('e' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) { // 输出错误信息
+				Log.e(tag, msg);
+			} else if ('w' == level && ('w' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) {
+				Log.w(tag, msg);
+			} else if ('d' == level && ('d' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) {
+				Log.d(tag, msg);
+			} else if ('i' == level && ('d' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) {
+				Log.i(tag, msg);
+			} else {
+				Log.v(tag, msg);
+			}
+			if (MYLOG_WRITE_TO_FILE) {
+				writeLogtoFile(String.valueOf(level), tag, msg);
+			}
+		}
+	}
+
+	/**
+	 * 打开日志文件并写入日志
+	 * **/
+	private static void writeLogtoFile(String mylogtype, String tag, String text) {// 新建或打开日志文件
+		isExist(MYLOG_PATH_SDCARD_DIR1);
+		isExist(MYLOG_PATH_SDCARD_DIR);
+		Date nowtime = new Date();
+//		String needWriteFiel = logfile.format(nowtime);
+		String needWriteMessage = myLogSdf.format(nowtime) + "    " + mylogtype
+				+ "    " + tag + "    " + text;
+		File file = new File(MYLOG_PATH_SDCARD_DIR, MYLOGFILEName);
+		try {
+			FileWriter filerWriter = new FileWriter(file, true);// 后面这个参数代表是不是要接上文件中原来的数据,不进行覆盖
+			BufferedWriter bufWriter = new BufferedWriter(filerWriter);
+			bufWriter.write(needWriteMessage);
+			bufWriter.newLine();
+			bufWriter.close();
+			filerWriter.close();
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * 删除制定的日志文件
+	 * */
+	public static void delFile() {// 删除日志文件
+		File file = new File(MYLOG_PATH_SDCARD_DIR, MYLOGFILEName);
+		if (file.exists()) {
+			file.delete();
+		}
+	}
+
+	public static void isExist(String path) {
+		File file = new File(path);
+		// 判断文件夹是否存在,如果不存在则创建文件夹
+		if (!file.exists()) {
+			file.mkdir();
+		}
+
+	}
+}

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

@@ -107,6 +107,7 @@ public class VolleyRequest {
             }
         }
 
+        MyLog.e("aaa","接口地址:" + url);
         PdaApplication.mRequestQueue.cancelAll(httpParams.getUrl());
 
         stringRequest = new StringRequest(httpParams.getMethod(), url,

+ 1 - 0
app/src/main/java/com/uas/chishun_wms/util/VollyRequest.java

@@ -94,6 +94,7 @@ public class VollyRequest {
             }
         }
 
+        MyLog.e("aaa","接口地址:" + url);
         PdaApplication.mRequestQueue.cancelAll(httpParams.getTag());
 
         stringRequest = new StringRequest(httpParams.getMethod(), url,

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

@@ -149,10 +149,19 @@
 
                 </LinearLayout>
 
+                <CheckBox
+                    android:layout_marginTop="3dp"
+                    android:id="@+id/cb_auto_save"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="自动保存"
+                    android:checked="true"
+                    />
+
                 <TableLayout
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="@dimen/spacing_big"
+                    android:layout_marginTop="3dp"
                     android:stretchColumns="1">
 
                     <TableRow>
@@ -191,6 +200,35 @@
 
                 </TableLayout>
 
+                <LinearLayout
+                    android:visibility="gone"
+                    android:id="@+id/ll_number_content"
+                    android:layout_marginTop="10dp"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="horizontal"
+                    tools:visibility="visible"
+                    >
+
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:text="数量"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+
+                    <com.uas.chishun_wms.view.ClearableEditText
+                        android:id="@+id/cet_number"
+                        style="@style/jltEditTextStyle"
+                        android:layout_width="0dp"
+                        android:layout_weight="1"
+                        android:layout_marginStart="10dp"
+                        android:hint="请输入数量"
+                        android:lines="1" />
+
+                </LinearLayout>
+
                 <LinearLayout
                     android:visibility="gone"
                     android:layout_marginTop="10dp"

+ 21 - 1
app/src/main/res/layout/fragment_jlt_storage_in_barcode.xml

@@ -51,11 +51,19 @@
 
     </LinearLayout>
 
+    <CheckBox
+        android:layout_marginTop="3dp"
+        android:id="@+id/cb_auto_save"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="自动保存"
+        android:checked="true"
+        />
 
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginTop="6dp"
+        android:layout_marginTop="3dp"
         android:background="@drawable/bg_line_edittext">
 
         <com.uas.chishun_wms.view.ClearableEditText
@@ -457,6 +465,18 @@
                         android:layout_gravity="center"
                         android:gravity="center"
                         android:visibility="gone" />
+
+                    <ImageView
+                        android:id="@+id/iv_storage_scanning_code"
+                        android:layout_width="wrap_content"
+                        android:layout_height="match_parent"
+                        android:layout_gravity="center"
+                        android:background="@color/white"
+                        android:clickable="false"
+                        android:paddingRight="10dp"
+                        android:src="@drawable/ic_edittext_scan"
+                        />
+
                 </LinearLayout>
 
                 <LinearLayout

+ 59 - 0
app/src/main/res/layout/fragment_warehouse_location_on_shelf.xml

@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?><!--储位转移-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <ScrollView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <TableLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:stretchColumns="0">
+
+            <!--条码号-->
+            <TableRow style="@style/PopUpperLayoutStyle">
+
+                <com.uas.chishun_wms.view.ClearableEditText
+                    android:id="@+id/cet_outbox"
+                    style="@style/PopWinEditTextStyle"
+                    android:hint="@string/hint_barcode_whtransfer"
+                    android:imeOptions="actionNone" />
+
+            </TableRow>
+            <!--新储位-->
+            <TableRow style="@style/PopUpperLayoutStyle">
+
+                <com.uas.chishun_wms.view.ClearableEditText
+                    android:id="@+id/cet_newlocation"
+                    style="@style/PopWinEditTextStyle"
+                    android:hint="@string/hint_newwhcode_whtransfer"
+                    android:imeOptions="actionNone" />
+
+            </TableRow>
+
+            <TextView
+                android:id="@+id/tv_result"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginStart="10dp"
+                android:layout_marginTop="10dp"
+                android:layout_marginEnd="10dp"
+                android:text="" />
+
+            <Button
+                android:id="@+id/bt_transfer"
+                style="@style/ButtonStyle"
+                android:layout_width="0dp"
+                android:layout_margin="12dp"
+                android:layout_weight="1"
+                android:text="转移" />
+
+        </TableLayout>
+
+    </ScrollView>
+
+
+</LinearLayout>

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

@@ -14,7 +14,7 @@
         android:id="@+id/tv_table_1"
         style="@style/CardContentTextStyle"
         android:layout_weight="1"
-        android:text="仓"
+        android:text="仓"
         android:textSize="14sp"
         />
 

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

@@ -433,4 +433,6 @@
         <item>未提交列表</item>
     </string-array>
 
+    <string name="warehouse_location_on_shelf">库位上架</string>
+
 </resources>

+ 3 - 3
build.gradle

@@ -46,12 +46,12 @@ task clean(type: Delete) {
 
 ext {
     android = [
-            minSdkVersion    : 16,
+            minSdkVersion    : 17,
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 4,
-            versionName      : "v1.0.3"
+            versionCode      : 5,
+            versionName      : "v1.0.4"
     ]
 
     depsVersion = [