Переглянути джерело

内容过长,不宜展示

songw 9 місяців тому
батько
коміт
2804413c1a
27 змінених файлів з 1629 додано та 123 видалено
  1. 9 3
      app/build.gradle
  2. 13 1
      app/proguard-rules.pro
  3. 4 0
      app/src/main/AndroidManifest.xml
  4. 59 0
      app/src/main/java/com/uas/keg_wms_new/adapter/PopMaterialPreparationSummaryAdapter.java
  5. 3 3
      app/src/main/java/com/uas/keg_wms_new/application/PdaApplication.java
  6. 62 0
      app/src/main/java/com/uas/keg_wms_new/bean/MaterialPreparationSummaryBean.java
  7. 6 1
      app/src/main/java/com/uas/keg_wms_new/fragment/BarcodeInCollectFragment.java
  8. 222 0
      app/src/main/java/com/uas/keg_wms_new/fragment/IOCOutMakeMaterialOper.java
  9. 242 0
      app/src/main/java/com/uas/keg_wms_new/fragment/IlluminateByCustomerFra.java
  10. 5 0
      app/src/main/java/com/uas/keg_wms_new/fragment/IndexWareHouseContentFragment.java
  11. 1 1
      app/src/main/java/com/uas/keg_wms_new/fragment/InventoryBillFragment.java
  12. 142 104
      app/src/main/java/com/uas/keg_wms_new/fragment/InventoryCollectFragment2.java
  13. 0 1
      app/src/main/java/com/uas/keg_wms_new/fragment/LightEmptyStorageSpaceFragment.java
  14. 6 4
      app/src/main/java/com/uas/keg_wms_new/fragment/StockDataSummaryFragment.java
  15. 271 0
      app/src/main/java/com/uas/keg_wms_new/fragment/WHTransferLocationFragment.java
  16. 29 2
      app/src/main/java/com/uas/keg_wms_new/global/GloableParams.java
  17. 28 1
      app/src/main/java/com/uas/keg_wms_new/tools/DataSourceManager.java
  18. 11 0
      app/src/main/java/com/uas/keg_wms_new/tools/VolleyUtil.java
  19. 128 0
      app/src/main/java/com/uas/keg_wms_new/view/MaterialPreparationSummaryPop.java
  20. BIN
      app/src/main/res/drawable-xhdpi/kehudianliang.png
  21. 109 0
      app/src/main/res/layout/fra_illuminate_by_customer.xml
  22. 10 0
      app/src/main/res/layout/fragment_barcode_in_collect.xml
  23. 17 0
      app/src/main/res/layout/fragment_iocout_make_material_oper.xml
  24. 12 0
      app/src/main/res/layout/fragment_whtransfer_location.xml
  25. 152 0
      app/src/main/res/layout/pop_material_preparation_summary.xml
  26. 86 0
      app/src/main/res/layout/popwin_item_material.xml
  27. 2 2
      build.gradle

+ 9 - 3
app/build.gradle

@@ -23,6 +23,10 @@ android {
                 includeCompileClasspath = true
             }
         }
+        ndk {
+            //设置支持的SO库架构(开发者可以根据需要,选择一个或多个平台的so)
+            abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
+        }
     }
     buildTypes {
         release {
@@ -80,9 +84,11 @@ dependencies {
     implementation deps.permisson
     implementation deps.basePopup
     implementation deps.smartTable
-    implementation  'com.umeng.umsdk:common:9.4.0'// 必选
-    implementation  'com.umeng.umsdk:asms:1.2.3'// 必选
-    implementation 'com.umeng.umsdk:apm:1.4.0' // 错误分析升级为独立SDK,看crash数据请一定集成,可选
+    // 友盟基础组件库(所有友盟业务SDK都依赖基础组件库)
+    implementation 'com.umeng.umsdk:common:9.4.4' //(必选)
+    implementation 'com.umeng.umsdk:asms:1.4.1' // asms包依赖(必选)
+    implementation 'com.umeng.umsdk:apm:1.5.2' // U-APM包依赖(必选) 错误分析升级为独立SDK,看crash数据请一定集成
+
     implementation 'org.greenrobot:eventbus:3.1.1'
 
 

+ 13 - 1
app/proguard-rules.pro

@@ -166,4 +166,16 @@
 ################################
 ##实体类
 #-keep class com.uas.bgdq.bean.** {*;}
-##-keep .** {*;}
+##-keep .** {*;}
+
+#友盟混淆
+-keep class com.umeng.** {*;}
+-keep class org.repackage.** {*;}
+-keep class com.uyumao.** { *; }
+-keepclassmembers class * {
+   public <init> (org.json.JSONObject);
+}
+-keepclassmembers enum * {
+    public static **[] values();
+    public static ** valueOf(java.lang.String);
+}

+ 4 - 0
app/src/main/AndroidManifest.xml

@@ -19,6 +19,10 @@
     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
     <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
 
+    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
+    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
+    <uses-permission android:name="android.permission.INTERNET"/>
+
 
     <application
         android:name="com.uas.keg_wms_new.application.PdaApplication"

+ 59 - 0
app/src/main/java/com/uas/keg_wms_new/adapter/PopMaterialPreparationSummaryAdapter.java

@@ -0,0 +1,59 @@
+package com.uas.keg_wms_new.adapter;
+
+import android.content.Context;
+import android.graphics.Color;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.TextView;
+
+import com.uas.keg_wms_new.R;
+import com.uas.keg_wms_new.bean.MaterialPreparationSummaryBean;
+
+import java.util.List;
+
+/**
+ * @note:仓库管理:物料存储详细数据表格ListAdapter
+ */
+public class PopMaterialPreparationSummaryAdapter extends BaseAdapter {
+    List itemList;
+    Context context;
+
+    public PopMaterialPreparationSummaryAdapter(List itemList, Context context) {
+        this.itemList = itemList;
+        this.context = context;
+    }
+
+    @Override
+    public int getCount() {
+        return itemList.size();
+    }
+
+    @Override
+    public Object getItem(int position) {
+        return itemList.get(position);
+    }
+
+    @Override
+    public long getItemId(int position) {
+        return 0;
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        View view = View.inflate(context, R.layout.popwin_item_material, null);
+        TextView tvColumn1 = (TextView) view.findViewById(R.id.tv_table_1);
+        TextView tvColumn2 = (TextView) view.findViewById(R.id.tv_table_2);
+        TextView tvColumn3 = (TextView) view.findViewById(R.id.tv_table_3);
+//        TextView tvColumn4 = (TextView) view.findViewById(R.id.tv_table_4);
+//        tvColumn4.setVisibility(View.VISIBLE);
+        MaterialPreparationSummaryBean materialPreparationSummaryBean = (MaterialPreparationSummaryBean) getItem(position);
+        tvColumn1.setText("" + materialPreparationSummaryBean.getBAR_CODE());
+        tvColumn2.setText("" + materialPreparationSummaryBean.getBAR_LOCATION());
+        tvColumn3.setText("" + materialPreparationSummaryBean.getBAR_REMAIN());
+//        tvColumn4.setText("" + materialPreparationSummaryBean.getMADEDATE());
+        int[] colors = {Color.WHITE, Color.rgb(219, 238, 244)};
+        view.setBackgroundColor(colors[position % 2]);
+        return view;
+    }
+}

+ 3 - 3
app/src/main/java/com/uas/keg_wms_new/application/PdaApplication.java

@@ -84,7 +84,7 @@ public class PdaApplication extends Application {
         mSoundMap.put(SoundUtil.SOUND_TETHYS, mSoundPool.load(this, R.raw.tethys, 1));
         mSoundMap.put(SoundUtil.SOUND_TITAN, mSoundPool.load(this, R.raw.titan, 1));
         //友盟统计SDK
-        //initUmeng();
+        initUmeng();
         //抓包
         Stetho.initializeWithDefaults(this);
     }
@@ -92,12 +92,12 @@ public class PdaApplication extends Application {
 
     private void initUmeng() {
         //2.在Application.oncreate()中调用预初始化函数
-        UMConfigure.preInit(this, "6170b8b61c91e0671bb0da5a","umeng");
+        UMConfigure.preInit(this, "67b43df88f232a05f117222e","umeng");
         UMConfigure.setLogEnabled(true);
         //3.客户端用户同意隐私政策后,正式初始化友盟+SDK
         UMConfigure.init(
                 this,
-                "6170b8b61c91e0671bb0da5a",
+                "67b43df88f232a05f117222e",
                 "umeng",
                 UMConfigure.DEVICE_TYPE_PHONE, ""
         );

+ 62 - 0
app/src/main/java/com/uas/keg_wms_new/bean/MaterialPreparationSummaryBean.java

@@ -0,0 +1,62 @@
+package com.uas.keg_wms_new.bean;
+
+public
+        /**
+         * Created by sw on 2025-02-18
+         */
+class MaterialPreparationSummaryBean {
+    private String BAR_CODE;
+    private String BAR_LOCATION;
+    private int BAR_REMAIN;
+    private String PR_SPEC;
+    private String PR_DETAIL;
+    private String BAR_PRODCODE;
+
+    public String getBAR_CODE() {
+        return BAR_CODE;
+    }
+
+    public void setBAR_CODE(String BAR_CODE) {
+        this.BAR_CODE = BAR_CODE;
+    }
+
+    public String getBAR_LOCATION() {
+        return BAR_LOCATION;
+    }
+
+    public void setBAR_LOCATION(String BAR_LOCATION) {
+        this.BAR_LOCATION = BAR_LOCATION;
+    }
+
+    public int getBAR_REMAIN() {
+        return BAR_REMAIN;
+    }
+
+    public void setBAR_REMAIN(int BAR_REMAIN) {
+        this.BAR_REMAIN = BAR_REMAIN;
+    }
+
+    public String getPR_SPEC() {
+        return PR_SPEC;
+    }
+
+    public void setPR_SPEC(String PR_SPEC) {
+        this.PR_SPEC = PR_SPEC;
+    }
+
+    public String getPR_DETAIL() {
+        return PR_DETAIL;
+    }
+
+    public void setPR_DETAIL(String PR_DETAIL) {
+        this.PR_DETAIL = PR_DETAIL;
+    }
+
+    public String getBAR_PRODCODE() {
+        return BAR_PRODCODE;
+    }
+
+    public void setBAR_PRODCODE(String BAR_PRODCODE) {
+        this.BAR_PRODCODE = BAR_PRODCODE;
+    }
+}

+ 6 - 1
app/src/main/java/com/uas/keg_wms_new/fragment/BarcodeInCollectFragment.java

@@ -5,6 +5,7 @@ import android.text.TextUtils;
 import android.view.KeyEvent;
 import android.view.View;
 import android.widget.Button;
+import android.widget.CheckBox;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
@@ -42,6 +43,7 @@ public class BarcodeInCollectFragment extends BaseFragment {
     private ImageView mScanImageView;
     private int mFocusId;
     private static final int SCAN_BARCODE_CODE = 101;
+    private CheckBox cb_reserve_space;
 
     @Override
     protected int getLayout() {
@@ -65,6 +67,7 @@ public class BarcodeInCollectFragment extends BaseFragment {
         mBatchcodeTextView = root.findViewById(R.id.barcode_in_collect_result_batchcode_tv);
         mLocationTextView = root.findViewById(R.id.barcode_in_collect_result_location_tv);
         mPrdetailTextView = root.findViewById(R.id.barcode_in_collect_result_prdetail_tv);
+        cb_reserve_space = root.findViewById(R.id.cb_reserve_space);
 
         CommonUtil.editTextGetFocus(mBarcodeEditText);
     }
@@ -142,7 +145,9 @@ public class BarcodeInCollectFragment extends BaseFragment {
                                 progressDialog.dismiss();
                                 try {
                                     mBarcodeEditText.setText("");
-                                    mLocationEditText.setText("");
+                                    if (!cb_reserve_space.isChecked()) {
+                                        mLocationEditText.setText("");
+                                    }
                                     mBarcodeEditText.requestFocus();
                                     String result = o.toString();
                                     if (FastjsonUtil.validate(result)) {

+ 222 - 0
app/src/main/java/com/uas/keg_wms_new/fragment/IOCOutMakeMaterialOper.java

@@ -80,6 +80,7 @@ import com.uas.keg_wms_new.util.JsonUtils;
 import com.uas.keg_wms_new.util.LogUtil;
 import com.uas.keg_wms_new.util.PrintUtils;
 import com.uas.keg_wms_new.util.VolleyRequest;
+import com.uas.keg_wms_new.util.VollyRequest;
 import com.uas.keg_wms_new.view.ClearableEditText;
 import com.uuzuche.lib_zxing.activity.CaptureActivity;
 import com.uuzuche.lib_zxing.activity.CodeUtils;
@@ -132,6 +133,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
     private String mBarRemain, mRestqty;
     private String mResult1, mResult2, mResult3, mResult4;
     private List<String> mResults;
+    private Button bt_inventory_barcode_printing;
 
     private TextWatcher watcher = new TextWatcher() {
         @Override
@@ -466,6 +468,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         ((FunctionActivity) getActivity()).setScanIvVisible(true);
 
         mScanImageView = (ImageView) mActivity.findViewById(R.id.btn_actionbar_scan_iv);
+        bt_inventory_barcode_printing = root.findViewById(R.id.bt_inventory_barcode_printing);
 
         mDbManager = new DBManager(getActivity().getApplicationContext());
         mOkHttpClient = new OkHttpClient.Builder()
@@ -618,6 +621,94 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
 
             }
         });
+
+        bt_inventory_barcode_printing.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                getWhcode();
+            }
+        });
+    }
+
+    private void getWhcode() {
+        View mPopView = View.inflate(mActivity, R.layout.pop_inventory_barcode_dialog, null);
+        ClearableEditText cet_barcode = (ClearableEditText) mPopView.findViewById(R.id.cet_barcode);
+        Button bt_ok = (Button) mPopView.findViewById(R.id.bt_ok);
+        AlertDialog mWarehouseDialog = new AlertDialog.Builder(mActivity)
+                .setView(mPopView)
+                .create();
+        mWarehouseDialog.show();
+
+        cet_barcode.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                if (actionId == EditorInfo.IME_ACTION_SEND
+                        || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
+                    if (!TextUtils.isEmpty(cet_barcode.getText().toString().trim())) {
+                        mWarehouseDialog.cancel();
+                        getInvertoryBarcode(cet_barcode.getText().toString().trim());
+                    }
+                    return true;
+                }
+                return false;
+            }
+        });
+
+        bt_ok.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                mWarehouseDialog.cancel();
+                getInvertoryBarcode(cet_barcode.getText().toString().trim());
+            }
+        });
+    }
+
+
+    private void getInvertoryBarcode(String barcode) {
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_GET_INVENTORY_BARCODE_DATA)
+                        .method(Request.Method.GET)
+                        .tag(TAG + "getInvertoryBarcode")
+                        .addParam("code", barcode)
+                        .flag(0)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        progressDialog.dismiss();
+                        Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(), "success");
+                        com.alibaba.fastjson.JSONObject data = FastjsonUtil.getJSONObject(o.toString(), "data");
+                        //                        com.alibaba.fastjson.JSONArray dataArray = FastjsonUtil.getJSONArray(data.toString(), "data");
+                        if (isSuccess) {
+                            try {
+                                //                                com.alibaba.fastjson.JSONArray listArray = new com.alibaba.fastjson.JSONArray();
+                                //                                Gson gson = new Gson();
+                                //                                PrintStye printStye = gson.fromJson(o.toString(), PrintStye.class);
+                                //                                if (printStye.getData() == null || printStye.getData().getData() == null){
+                                //                                    return;
+                                //                                }
+                                //                                PrintStye.DataBeanX.DataBean data = printStye.getData().getData();
+                                //                                String json = gson.toJson(data);
+                                //                                com.alibaba.fastjson.JSONObject resultObject = JSON.parseObject(json);
+                                //                                listArray.add(new com.alibaba.fastjson.JSONObject(resultObject));
+
+                                com.alibaba.fastjson.JSONArray listArray = new com.alibaba.fastjson.JSONArray();
+                                String data1 = data.getString("data");
+                                listArray.add(JSON.parseObject(data1));
+                                initBreakPopupWindow(listArray);
+                            }catch (Exception e) {
+                                e.printStackTrace();
+                            }
+                        }
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+                    }
+                });
     }
 
     /**
@@ -2289,6 +2380,96 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         CommonUtil.setBackgroundAlpha(mActivity, 0.5f);
     }
 
+    protected void initBreakPopupWindow(com.alibaba.fastjson.JSONArray listArray) {
+        messages.clear();
+        for (int i = 0; i < listArray.size(); i++) {
+            try {
+                com.alibaba.fastjson.JSONObject barcodeObject = listArray.getJSONObject(i);
+
+                if (barcodeObject != null) {
+                    WHBreakingBatchBreakingBtnClickEvent.DataBean dataBean = new WHBreakingBatchBreakingBtnClickEvent.DataBean();
+
+                    //                    dataBean.setBAR_CODE(JsonUtils.optStringNotNull(barcodeObject, "BAR_CODE"));
+                    //                    dataBean.setBAR_REMAIN(JsonUtils.optStringNotNull(barcodeObject, "BAR_REMAIN"));//RESTQTY
+                    dataBean.setBAR_CODE(barcodeObject.getString("BAR_CODE"));
+                    dataBean.setBAR_REMAIN(barcodeObject.getString("BAR_REMAIN"));//RESTQTY
+
+                    messages.add(dataBean);
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+
+        View popView = LayoutInflater.from(getActivity()).inflate(R.layout.popupwindow_whbreaking_batch, null);
+        ListView listView = (ListView) popView.findViewById(R.id.list_view);
+        Button btnPrintf = (Button) popView.findViewById(R.id.btn_print);
+        Button btnPrintfSet = (Button) popView.findViewById(R.id.btn_print_setting);
+        Button btnClose = (Button) popView.findViewById(R.id.btn_close);
+        Button btnBack = (Button) popView.findViewById(R.id.btn_back);
+
+        btnBack.setVisibility(View.GONE);
+        btnClose.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closeSplitPopupWindow();
+            }
+        });
+        btnPrintf.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (isConnected) {
+                    progressDialog.show();
+                    printEvent(listArray);
+                } else {
+                    closeSplitPopupWindow();
+                    BlueToothPrintFragment blueToothPrintFragment = new BlueToothPrintFragment();
+
+                    Bundle bundle = new Bundle();
+                    bundle.putString(Constants.KEY.BARCODE_PRINT_ARRAY, listArray.toString());
+                    blueToothPrintFragment.setArguments(bundle);
+                    FragmentUtils.switchFragment(IOCOutMakeMaterialOper.this, blueToothPrintFragment);
+                }
+            }
+        });
+
+        btnPrintfSet.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closeSplitPopupWindow();
+                BlueToothPrintFragment blueToothPrintFragment = new BlueToothPrintFragment();
+
+                Bundle bundle = new Bundle();
+                bundle.putString(Constants.KEY.BARCODE_PRINT_ARRAY, listArray.toString());
+                blueToothPrintFragment.setArguments(bundle);
+                FragmentUtils.switchFragment(IOCOutMakeMaterialOper.this, blueToothPrintFragment);
+            }
+        });
+
+        MyAdapter adapter = new MyAdapter(getActivity(), R.layout.item_list_whbreakingbatchfragment, messages);
+        listView.setAdapter(adapter);
+        //当只有一条数据的时候可以加上
+        /*
+        if (messages.size()>1){
+            btnBack.setVisibility(View.GONE);
+        }*/
+        // PopupWindow实例化,参数的意思是 view,长(不包括状态栏),高(不包括状态栏),是否聚焦
+        splitPop = new PopupWindow(popView, LinearLayout.LayoutParams.WRAP_CONTENT,
+                LinearLayout.LayoutParams.WRAP_CONTENT, true);
+        splitPop.setAnimationStyle(R.style.MenuAnimationFade);
+        splitPop.setBackgroundDrawable(new BitmapDrawable());
+        // 弹出窗口显示内容视图,默认以锚定视图的左下角为起点,这里为点击按钮
+        splitPop.showAtLocation(getActivity().getWindow().getDecorView(), Gravity.CENTER, 0, 0);
+        splitPop.setOnDismissListener(new PopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                closeSplitPopupWindow();
+                //                confirmEvent();
+            }
+        });
+        CommonUtil.setBackgroundAlpha(mActivity, 0.5f);
+    }
+
     private void printEvent(JSONArray printArray) {
         if (isPrinting) {
             CommonUtil.toastNoRepeat(mActivity, "正在打印中,请勿重复操作");
@@ -2330,6 +2511,47 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         isPrinting = false;
     }
 
+    private void printEvent(com.alibaba.fastjson.JSONArray printArray) {
+        if (isPrinting) {
+            CommonUtil.toastNoRepeat(mActivity, "正在打印中,请勿重复操作");
+            return;
+        }
+        isPrinting = true;
+        if (printArray != null && printArray.size() > 0) {
+            boolean isFail = false;
+            for (int i = 0; i < printArray.size(); i++) {
+                try {
+                    com.alibaba.fastjson.JSONObject printObject = printArray.getJSONObject(i);
+                    int printResult = PrintUtils.printBar(mActivity, printObject.toString(), mPrintDpi, null);
+                    if (printResult <= 0) {
+                        isFail = true;
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+            closeSplitPopupWindow();
+            progressDialog.dismiss();
+            if (isFail) {
+                isConnected = false;
+                SharedPreUtil.saveInt(mActivity, "printConnect", 0);
+                CommonUtil.toastNoRepeat(mActivity, "打印失败,请重新连接打印机");
+
+                BlueToothPrintFragment blueToothPrintFragment = new BlueToothPrintFragment();
+
+                Bundle bundle = new Bundle();
+                bundle.putString(Constants.KEY.BARCODE_PRINT_ARRAY, printArray.toString());
+                blueToothPrintFragment.setArguments(bundle);
+                FragmentUtils.switchFragment(IOCOutMakeMaterialOper.this, blueToothPrintFragment);
+            } else {
+                CommonUtil.toastNoRepeat(mActivity, "打印成功");
+            }
+        } else {
+            CommonUtil.toastNoRepeat(mActivity, "打印失败,条码数据为空");
+        }
+        isPrinting = false;
+    }
+
     public static final String GETPRINTDATA = "getPrintData";
 
     /**

+ 242 - 0
app/src/main/java/com/uas/keg_wms_new/fragment/IlluminateByCustomerFra.java

@@ -0,0 +1,242 @@
+package com.uas.keg_wms_new.fragment;
+
+import android.text.TextUtils;
+import android.view.KeyEvent;
+import android.view.View;
+import android.widget.Button;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.android.volley.Request;
+import com.uas.keg_wms_new.R;
+import com.uas.keg_wms_new.activity.FunctionActivity;
+import com.uas.keg_wms_new.global.GloableParams;
+import com.uas.keg_wms_new.listener.MyEditorActionListener;
+import com.uas.keg_wms_new.util.CommonUtil;
+import com.uas.keg_wms_new.util.HttpCallback;
+import com.uas.keg_wms_new.util.HttpParams;
+import com.uas.keg_wms_new.util.VolleyRequest;
+import com.uas.keg_wms_new.view.ClearableEditText;
+
+import org.json.JSONObject;
+
+public
+        /**
+         * Created by sw on 2024-12-19
+         */
+class IlluminateByCustomerFra extends BaseFragment{
+
+    private ClearableEditText cet_material_rack;
+    private Button bt_light_up,bt_turn_off_the_light;
+    private TextView tv_result;
+    private LinearLayout ll_result;
+
+    @Override
+    protected int getLayout() {
+        return R.layout.fra_illuminate_by_customer;
+    }
+
+    @Override
+    protected void initViews() {
+        FunctionActivity.setTitle("按客户点亮");
+
+        cet_material_rack = root.findViewById(R.id.cet_material_rack);
+        bt_light_up = root.findViewById(R.id.bt_light_up);
+        bt_turn_off_the_light = root.findViewById(R.id.bt_turn_off_the_light);
+        tv_result = root.findViewById(R.id.tv_result);
+        ll_result = root.findViewById(R.id.ll_result);
+    }
+
+    @Override
+    protected void initEvents() {
+        //料架回车
+        CommonUtil.setEditorActionListener(cet_material_rack, new MyEditorActionListener() {
+            @Override
+            public void MyEditorAction(String text, int actionId, KeyEvent event) {
+                if (!text.isEmpty()&&!cet_material_rack.getText().toString().isEmpty()){
+                    materialRackCode();
+                }
+            }
+        });
+
+        bt_light_up.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                getlightEmptyStorage(cet_material_rack.getText().toString().trim());
+            }
+        });
+
+        bt_turn_off_the_light.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                getExtinguishEmptyStorageSpace(cet_material_rack.getText().toString().trim());
+            }
+        });
+
+    }
+
+    private void getExtinguishEmptyStorageSpace(String shcode) {
+        String prodprefix = cet_material_rack.getText().toString().trim();
+        if (TextUtils.isEmpty(prodprefix)) {
+            CommonUtil.toastNoRepeat(mActivity, "请输入料号前缀");
+            cet_material_rack.requestFocus();
+            return;
+        }
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest60(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_BAR_LIGHT_OFF_BY_CUST)
+                .method(Request.Method.POST)
+                .addParam("prodprefix",prodprefix)
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                org.json.JSONObject resultObject = new org.json.JSONObject(o.toString());
+                ll_result.setVisibility(View.VISIBLE);
+                if (resultObject.optBoolean("success")) {
+                    tv_result.setTextColor(getResources().getColor(R.color.blue));
+                    tv_result.setText(resultObject.getString("data"));
+                    cet_material_rack.setText("");
+                }else {
+                    tv_result.setTextColor(getResources().getColor(R.color.red));
+                    tv_result.setText(resultObject.getString("message"));
+                }
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+                cet_material_rack.setText(null);
+                cet_material_rack.requestFocus();
+                ll_result.setVisibility(View.VISIBLE);
+                tv_result.setTextColor(getResources().getColor(R.color.red));
+                tv_result.setText(failStr);
+            }
+        });
+    }
+
+    private void getlightEmptyStorage(String shcode) {
+        String prodprefix = cet_material_rack.getText().toString().trim();
+        if (TextUtils.isEmpty(prodprefix)) {
+            CommonUtil.toastNoRepeat(mActivity, "请输入料号前缀");
+            cet_material_rack.requestFocus();
+            return;
+        }
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest60(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_BAR_LIGHT_ON_BY_CUST)
+                .method(Request.Method.POST)
+                .addParam("prodprefix",prodprefix)
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                org.json.JSONObject resultObject = new org.json.JSONObject(o.toString());
+                ll_result.setVisibility(View.VISIBLE);
+                if (resultObject.optBoolean("success")) {
+                    tv_result.setTextColor(getResources().getColor(R.color.blue));
+                    tv_result.setText(resultObject.getString("data"));
+//                    cet_material_rack.setText("");
+                }else {
+                    tv_result.setTextColor(getResources().getColor(R.color.red));
+                    tv_result.setText(resultObject.getString("message"));
+                }
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+                cet_material_rack.setText(null);
+                cet_material_rack.requestFocus();
+                ll_result.setVisibility(View.VISIBLE);
+                tv_result.setTextColor(getResources().getColor(R.color.red));
+                tv_result.setText(failStr);
+            }
+        });
+    }
+
+    private void materialRackCode() {
+        String prodprefix = cet_material_rack.getText().toString().trim();
+        if (TextUtils.isEmpty(prodprefix)) {
+            CommonUtil.toastNoRepeat(mActivity, "请输入料号前缀");
+            cet_material_rack.requestFocus();
+            return;
+        }
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_GET_BAR_BY_CUST)
+                .method(Request.Method.GET)
+                .addParam("prodprefix",prodprefix)
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                try {
+                    org.json.JSONObject resultObject = new org.json.JSONObject(o.toString());
+                    ll_result.setVisibility(View.VISIBLE);
+                    if (resultObject.optBoolean("success")) {
+                        JSONObject data = resultObject.getJSONObject("data");
+                        String V_COUNT = data.getString("V_COUNT")==null?"":data.getString("V_COUNT");
+                        String V_ZLCOUNT = data.getString("V_ZLCOUNT")==null?"":data.getString("V_ZLCOUNT");
+                        tv_result.setTextColor(getResources().getColor(R.color.blue));
+                        tv_result.setText("料号前缀: " + prodprefix + "\r\n" +
+                                "在感应料架库位的条码个数: " + V_COUNT + "\r\n" +
+                                "正在执行找料条码个数: " + V_ZLCOUNT
+                        );
+                    }else {
+                        tv_result.setTextColor(getResources().getColor(R.color.red));
+                        tv_result.setText(resultObject.getString("message"));
+                    }
+                }catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+                cet_material_rack.setText(null);
+                cet_material_rack.requestFocus();
+                ll_result.setVisibility(View.VISIBLE);
+                tv_result.setTextColor(getResources().getColor(R.color.red));
+                tv_result.setText(failStr);
+            }
+        });
+    }
+
+    @Override
+    protected void initDatas() {
+
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        return false;
+    }
+
+    @Override
+    public boolean onFragmentBackPressed() {
+        return false;
+    }
+
+    @Override
+    public void onHiddenChanged(boolean hidden) {
+        super.onHiddenChanged(hidden);
+//        if (!hidden) {
+//            FunctionActivity.setTitle(getResources().getString(R.string.free_listing));
+//            ((FunctionActivity) getActivity()).setMoreBtnVisible(true);
+//        }else {
+//            ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
+//        }
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+//        ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
+    }
+
+}

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

@@ -171,6 +171,11 @@ public class IndexWareHouseContentFragment extends BaseFragment implements Adapt
                     getFragmentManager().beginTransaction().addToBackStack(null)
                             .replace(R.id.container_function_fragment, fragment).commit();
                     break;
+                case GloableParams.ILLUMINATE_BY_CUSTOMER:     //按客户点亮
+                    fragment = new IlluminateByCustomerFra();
+                    getFragmentManager().beginTransaction().addToBackStack(null)
+                            .replace(R.id.container_function_fragment, fragment).commit();
+                    break;
 
             }
             if (mFragment != null) {

+ 1 - 1
app/src/main/java/com/uas/keg_wms_new/fragment/InventoryBillFragment.java

@@ -318,7 +318,7 @@ public class InventoryBillFragment extends BaseFragment {
                     }
 
                 } catch (Exception e) {
-
+                    e.printStackTrace();
                 }
             }
 

+ 142 - 104
app/src/main/java/com/uas/keg_wms_new/fragment/InventoryCollectFragment2.java

@@ -2,7 +2,6 @@ package com.uas.keg_wms_new.fragment;
 
 import android.app.Activity;
 import android.content.Context;
-import android.content.DialogInterface;
 import android.content.Intent;
 import android.graphics.drawable.BitmapDrawable;
 import android.os.Bundle;
@@ -19,7 +18,6 @@ import android.widget.ArrayAdapter;
 import android.widget.Button;
 import android.widget.CheckBox;
 import android.widget.CompoundButton;
-import android.widget.EditText;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.ListView;
@@ -49,7 +47,6 @@ import com.uas.keg_wms_new.util.FragmentUtils;
 import com.uas.keg_wms_new.util.HttpCallback;
 import com.uas.keg_wms_new.util.HttpParams;
 import com.uas.keg_wms_new.util.PrintUtils;
-import com.uas.keg_wms_new.util.StringUtil;
 import com.uas.keg_wms_new.util.VolleyRequest;
 import com.uas.keg_wms_new.util.VollyRequest;
 import com.uas.keg_wms_new.view.ClearableEditText;
@@ -256,112 +253,153 @@ public class InventoryCollectFragment2 extends BaseFragment implements View.OnCl
                                 if (dataObject != null) {
                                     bar_remain = FastjsonUtil.getText(dataObject, "BAR_REMAIN");
                                 }
+                                mBarcodeEditText.setText("");
+                                VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                                        .url(GloableParams.ADDRESS_BARSTOCK_GETBARCODEINFO)
+                                        .method(Request.Method.GET)
+                                        .tag(TAG + "getbarcodeinfo")
+                                        .flag(0)
+                                        .addParam("inoutno", pi_inoutno)
+                                        //.addParam("deadline", deadLine)
+                                        .addParam("barcode", barcode)
+                                        .addParam("iscancel", isChecked + "")
+                                        .addParam("bar_remain", bar_remain)
+                                        .build(), new HttpCallback() {
+                                    @Override
+                                    public void onSuccess(int flag, Object o) throws Exception {
+                                        alertDialog.dismiss();
+                                        try {
+                                            mBarcodeEditText.setText("");
+                                            String result = o.toString();
+                                            JSONObject resultObject = JSON.parseObject(result);
+                                            JSONObject dataObject = resultObject.getJSONObject("data");
+                                            if (dataObject != null) {
+                                                String type = FastjsonUtil.getText(dataObject, "BI_TYPE");
+                                                String prompt = "采集成功!";
+                                                if (!"超期".equals(type)) {
+                                                    mResultTextView.setTextColor(mActivity.getResources().getColor(R.color.black));
+                                                    prompt = "采集成功!";
+                                                } else {
+                                                    mResultTextView.setTextColor(mActivity.getResources().getColor(R.color.red));
+                                                    prompt = "采集成功!已超期";
+                                                }
 
-                                View dialogView = View.inflate(getActivity(), R.layout.dialog_confirm_quantity, null);
-                                final EditText modifyEditText = dialogView.findViewById(R.id.recharge_modify_et);
+                                                mResultTextView.setVisibility(View.VISIBLE);
+                                                mResultTextView.setText(prompt
+                                                        + "\n物料:" + FastjsonUtil.getText(dataObject, "BI_PRODCODE")
+                                                        //                                        + "\n品牌:" + FastjsonUtil.getText(dataObject, "BI_BRAND")
+                                                        //                                        + "\nLOTNO:" + FastjsonUtil.getText(dataObject, "BI_LOTNO")
+                                                        //                                        + "\nDC:" + FastjsonUtil.getText(dataObject, "BI_DATECODE")
+                                                        + "\n型号:" + FastjsonUtil.getText(dataObject, "PR_ORISPECCODE")
+                                                        + "\n条码号:" + FastjsonUtil.getText(dataObject, "BI_BARCODE")
+                                                        + "\n数量:" + FastjsonUtil.getText(dataObject, "BI_INQTY")
+                                                );
+                                            }
+                                        } catch (Exception e) {
+                                            e.printStackTrace();
+                                        }
+                                    }
 
-//                                TextView tv_uninventoried_quantity = dialogView.findViewById(R.id.tv_uninventoried_quantity);
-//                                TextView tv_material_no = dialogView.findViewById(R.id.tv_material_no);
-//                                TextView tv_material_name = dialogView.findViewById(R.id.tv_material_name);
-//                                TextView tv_material_specification = dialogView.findViewById(R.id.tv_material_specification);
+                                    @Override
+                                    public void onFail(int flag, String failStr) throws Exception {
+                                        alertDialog.dismiss();
+                                        mBarcodeEditText.setText("");
+                                        progressDialog.dismiss();
+                                        CommonUtil.toastNoRepeat(mActivity, failStr);
+                                        mResultTextView.setVisibility(View.VISIBLE);
+                                        mResultTextView.setText(failStr);
+                                    }
+                                });
+
+
+//                                View dialogView = View.inflate(getActivity(), R.layout.dialog_confirm_quantity, null);
+//                                final EditText modifyEditText = dialogView.findViewById(R.id.recharge_modify_et);
+//                                alertDialog = new AlertDialog.Builder(getActivity()).setTitle("确认数量")
+//                                        .setView(dialogView)
+//                                        .setNegativeButton(R.string.cancel, null)
+//                                        .setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() {
+//                                            @Override
+//                                            public void onClick(DialogInterface dialog, int which) {
+//                                                if (StringUtil.isEmpty(modifyEditText.getText().toString().trim())) {
+//                                                    CommonUtil.toastNoRepeat(getActivity(), "请输入条码数量");
+//                                                    return;
+//                                                }
+//                                                double quantity = -1;
+//                                                try {
+//                                                    quantity = Double.parseDouble(modifyEditText.getText().toString().trim());
+//                                                } catch (Exception e) {
+//                                                    CommonUtil.toastNoRepeat(getActivity(), "请输入正确的数字");
+//                                                    return;
+//                                                }
+//                                                if (quantity < 0) {
+//                                                    CommonUtil.toastNoRepeat(getActivity(), "数量不能小于0");
+//                                                    return;
+//                                                }
+//                                                VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+//                                                        .url(GloableParams.ADDRESS_BARSTOCK_GETBARCODEINFO)
+//                                                        .method(Request.Method.GET)
+//                                                        .tag(TAG + "getbarcodeinfo")
+//                                                        .flag(0)
+//                                                        .addParam("inoutno", pi_inoutno)
+//                                                        //.addParam("deadline", deadLine)
+//                                                        .addParam("barcode", barcode)
+//                                                        .addParam("iscancel", isChecked + "")
+//                                                        .addParam("bar_remain", modifyEditText.getText().toString().trim())
+//                                                        .build(), new HttpCallback() {
+//                                                    @Override
+//                                                    public void onSuccess(int flag, Object o) throws Exception {
+//                                                        alertDialog.dismiss();
+//                                                        try {
+//                                                            mBarcodeEditText.setText("");
+//                                                            String result = o.toString();
+//                                                            JSONObject resultObject = JSON.parseObject(result);
+//                                                            JSONObject dataObject = resultObject.getJSONObject("data");
+//                                                            if (dataObject != null) {
+//                                                                String type = FastjsonUtil.getText(dataObject, "BI_TYPE");
+//                                                                String prompt = "采集成功!";
+//                                                                if (!"超期".equals(type)) {
+//                                                                    mResultTextView.setTextColor(mActivity.getResources().getColor(R.color.black));
+//                                                                    prompt = "采集成功!";
+//                                                                } else {
+//                                                                    mResultTextView.setTextColor(mActivity.getResources().getColor(R.color.red));
+//                                                                    prompt = "采集成功!已超期";
+//                                                                }
 //
-//                                tv_uninventoried_quantity.setText(FastjsonUtil.getText(dataObject, "UNQTY"));
-//                                tv_material_no.setText(FastjsonUtil.getText(dataObject, "BAR_PRODCODE"));
-//                                tv_material_name.setText(FastjsonUtil.getText(dataObject, "PR_DETAIL"));
-//                                tv_material_specification.setText(FastjsonUtil.getText(dataObject, "PR_SPEC"));
-
-                                alertDialog = new AlertDialog.Builder(getActivity()).setTitle("确认数量")
-                                        .setView(dialogView)
-                                        .setNegativeButton(R.string.cancel, null)
-                                        .setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() {
-                                            @Override
-                                            public void onClick(DialogInterface dialog, int which) {
-                                                if (StringUtil.isEmpty(modifyEditText.getText().toString().trim())) {
-                                                    CommonUtil.toastNoRepeat(getActivity(), "请输入条码数量");
-                                                    return;
-                                                }
-                                                double quantity = -1;
-                                                try {
-                                                    quantity = Double.parseDouble(modifyEditText.getText().toString().trim());
-                                                } catch (Exception e) {
-                                                    CommonUtil.toastNoRepeat(getActivity(), "请输入正确的数字");
-                                                    return;
-                                                }
-                                                if (quantity < 0) {
-                                                    CommonUtil.toastNoRepeat(getActivity(), "数量不能小于0");
-                                                    return;
-                                                }
-                                                VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
-                                                        .url(GloableParams.ADDRESS_BARSTOCK_GETBARCODEINFO)
-                                                        .method(Request.Method.GET)
-                                                        .tag(TAG + "getbarcodeinfo")
-                                                        .flag(0)
-                                                        .addParam("inoutno", pi_inoutno)
-                                                        //.addParam("deadline", deadLine)
-                                                        .addParam("barcode", barcode)
-                                                        .addParam("iscancel", isChecked + "")
-                                                        .addParam("bar_remain", modifyEditText.getText().toString().trim())
-                                                        .build(), new HttpCallback() {
-                                                    @Override
-                                                    public void onSuccess(int flag, Object o) throws Exception {
-                                                        alertDialog.dismiss();
-                                                        try {
-                                                            mBarcodeEditText.setText("");
-                                                            String result = o.toString();
-                                                            JSONObject resultObject = JSON.parseObject(result);
-                                                            JSONObject dataObject = resultObject.getJSONObject("data");
-                                                            if (dataObject != null) {
-                                                                String type = FastjsonUtil.getText(dataObject, "BI_TYPE");
-                                                                String prompt = "采集成功!";
-                                                                if (!"超期".equals(type)) {
-                                                                    mResultTextView.setTextColor(mActivity.getResources().getColor(R.color.black));
-                                                                    prompt = "采集成功!";
-                                                                } else {
-                                                                    mResultTextView.setTextColor(mActivity.getResources().getColor(R.color.red));
-                                                                    prompt = "采集成功!已超期";
-                                                                }
-
-                                                                mResultTextView.setVisibility(View.VISIBLE);
-                                                                mResultTextView.setText(prompt
-                                                                        + "\n物料:" + FastjsonUtil.getText(dataObject, "BI_PRODCODE")
-                                                                        //                                        + "\n品牌:" + FastjsonUtil.getText(dataObject, "BI_BRAND")
-                                                                        //                                        + "\nLOTNO:" + FastjsonUtil.getText(dataObject, "BI_LOTNO")
-                                                                        //                                        + "\nDC:" + FastjsonUtil.getText(dataObject, "BI_DATECODE")
-                                                                        + "\n型号:" + FastjsonUtil.getText(dataObject, "PR_ORISPECCODE")
-                                                                        + "\n条码号:" + FastjsonUtil.getText(dataObject, "BI_BARCODE")
-                                                                        + "\n数量:" + FastjsonUtil.getText(dataObject, "BI_INQTY")
-                                                                );
-                                                            }
-                                                        } catch (Exception e) {
-                                                            e.printStackTrace();
-                                                        }
-                                                    }
-
-                                                    @Override
-                                                    public void onFail(int flag, String failStr) throws Exception {
-                                                        alertDialog.dismiss();
-                                                        mBarcodeEditText.setText("");
-                                                        progressDialog.dismiss();
-                                                        CommonUtil.toastNoRepeat(mActivity, failStr);
-                                                        mResultTextView.setVisibility(View.VISIBLE);
-                                                        mResultTextView.setText(failStr);
-                                                    }
-                                                });
-                                            }
-                                        }).create();
-                                modifyEditText.setText(bar_remain);
-                                modifyEditText.setSelection(modifyEditText.getText().length());
-//                                alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(new View.OnClickListener() {
-//                                    @Override
-//                                    public void onClick(View view) {
+//                                                                mResultTextView.setVisibility(View.VISIBLE);
+//                                                                mResultTextView.setText(prompt
+//                                                                        + "\n物料:" + FastjsonUtil.getText(dataObject, "BI_PRODCODE")
+//                                                                        //                                        + "\n品牌:" + FastjsonUtil.getText(dataObject, "BI_BRAND")
+//                                                                        //                                        + "\nLOTNO:" + FastjsonUtil.getText(dataObject, "BI_LOTNO")
+//                                                                        //                                        + "\nDC:" + FastjsonUtil.getText(dataObject, "BI_DATECODE")
+//                                                                        + "\n型号:" + FastjsonUtil.getText(dataObject, "PR_ORISPECCODE")
+//                                                                        + "\n条码号:" + FastjsonUtil.getText(dataObject, "BI_BARCODE")
+//                                                                        + "\n数量:" + FastjsonUtil.getText(dataObject, "BI_INQTY")
+//                                                                );
+//                                                            }
+//                                                        } catch (Exception e) {
+//                                                            e.printStackTrace();
+//                                                        }
+//                                                    }
 //
-//                                    }
-//                                });
+//                                                    @Override
+//                                                    public void onFail(int flag, String failStr) throws Exception {
+//                                                        alertDialog.dismiss();
+//                                                        mBarcodeEditText.setText("");
+//                                                        progressDialog.dismiss();
+//                                                        CommonUtil.toastNoRepeat(mActivity, failStr);
+//                                                        mResultTextView.setVisibility(View.VISIBLE);
+//                                                        mResultTextView.setText(failStr);
+//                                                    }
+//                                                });
+//                                            }
+//                                        }).create();
+//                                modifyEditText.setText(bar_remain);
+//                                modifyEditText.setSelection(modifyEditText.getText().length());
+//                                // 禁用屏幕外点击
+//                                alertDialog.setCancelable(false);
+//                                alertDialog.setCanceledOnTouchOutside(false);
+//                                alertDialog.show();
 
-                                // 禁用屏幕外点击
-                                alertDialog.setCancelable(false);
-                                alertDialog.setCanceledOnTouchOutside(false);
-                                alertDialog.show();
                             } catch (Exception e) {
                                 e.printStackTrace();
                             }

+ 0 - 1
app/src/main/java/com/uas/keg_wms_new/fragment/LightEmptyStorageSpaceFragment.java

@@ -177,7 +177,6 @@ class LightEmptyStorageSpaceFragment extends BaseFragment{
                 if (resultObject.optBoolean("success")) {
                     tv_result.setTextColor(getResources().getColor(R.color.blue));
                     tv_result.setText(getResources().getText(R.string.Shelf_validation_successful));
-                    cet_material_rack.setText("");
                 }else {
                     tv_result.setTextColor(getResources().getColor(R.color.red));
                     tv_result.setText(resultObject.getString("message"));

+ 6 - 4
app/src/main/java/com/uas/keg_wms_new/fragment/StockDataSummaryFragment.java

@@ -29,7 +29,7 @@ import com.uas.keg_wms_new.util.HttpCallback;
 import com.uas.keg_wms_new.util.HttpParams;
 import com.uas.keg_wms_new.util.StringUtil;
 import com.uas.keg_wms_new.util.VolleyRequest;
-import com.uas.keg_wms_new.view.TakePhotoPopWin;
+import com.uas.keg_wms_new.view.MaterialPreparationSummaryPop;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -199,10 +199,12 @@ public class StockDataSummaryFragment extends BaseFragment implements OnColumnIt
         }
 
         SharedPreUtil.saveString(getContext(),"pd_prodcode_pop",pd_prodcode);
-        TakePhotoPopWin takePhotoPopWin = new TakePhotoPopWin(getContext(), onClickListener);
-        //showAtLocation(View parent, int gravity, int x, int y)
-        takePhotoPopWin.showAtLocation(root.findViewById(R.id.stock_data_summary_num_tv), Gravity.CENTER, 0, 0);
+//        TakePhotoPopWin takePhotoPopWin = new TakePhotoPopWin(getContext(), onClickListener);
+//        //showAtLocation(View parent, int gravity, int x, int y)
+//        takePhotoPopWin.showAtLocation(root.findViewById(R.id.stock_data_summary_num_tv), Gravity.CENTER, 0, 0);
 
+        MaterialPreparationSummaryPop materialPreparationSummaryPop = new MaterialPreparationSummaryPop(getContext(), onClickListener);
+        materialPreparationSummaryPop.showAtLocation(root.findViewById(R.id.stock_data_summary_num_tv), Gravity.CENTER, 0, 0);
 
     }
     private View.OnClickListener onClickListener = new View.OnClickListener() {

+ 271 - 0
app/src/main/java/com/uas/keg_wms_new/fragment/WHTransferLocationFragment.java

@@ -1,30 +1,52 @@
 package com.uas.keg_wms_new.fragment;
 
 import android.app.Activity;
+import android.content.Context;
 import android.content.Intent;
+import android.graphics.drawable.BitmapDrawable;
+import android.os.Bundle;
+import android.support.v7.app.AlertDialog;
 import android.text.Editable;
 import android.text.TextUtils;
 import android.text.TextWatcher;
+import android.view.Gravity;
 import android.view.KeyEvent;
+import android.view.LayoutInflater;
 import android.view.View;
+import android.view.ViewGroup;
 import android.view.inputmethod.EditorInfo;
+import android.widget.ArrayAdapter;
+import android.widget.Button;
 import android.widget.CompoundButton;
 import android.widget.ImageView;
+import android.widget.LinearLayout;
 import android.widget.ListView;
+import android.widget.PopupWindow;
 import android.widget.RadioButton;
 import android.widget.TextView;
 
 import com.alibaba.fastjson.JSON;
+import com.android.volley.Request;
+import com.android.volley.toolbox.StringRequest;
 import com.uas.keg_wms_new.R;
 import com.uas.keg_wms_new.activity.FunctionActivity;
 import com.uas.keg_wms_new.adapter.TransferLocationAdapter;
+import com.uas.keg_wms_new.bean.WHBreakingBatchBreakingBtnClickEventNew;
 import com.uas.keg_wms_new.bean.WHTransfer;
 import com.uas.keg_wms_new.global.GloableParams;
 import com.uas.keg_wms_new.tools.GsonUtil;
+import com.uas.keg_wms_new.tools.SharedPreUtil;
 import com.uas.keg_wms_new.tools.VolleyUtil;
 import com.uas.keg_wms_new.util.CameraUtil;
 import com.uas.keg_wms_new.util.CommonUtil;
+import com.uas.keg_wms_new.util.Constants;
+import com.uas.keg_wms_new.util.FastjsonUtil;
+import com.uas.keg_wms_new.util.FragmentUtils;
+import com.uas.keg_wms_new.util.HttpCallback;
+import com.uas.keg_wms_new.util.HttpParams;
 import com.uas.keg_wms_new.util.LogUtil;
+import com.uas.keg_wms_new.util.PrintUtils;
+import com.uas.keg_wms_new.util.VollyRequest;
 import com.uas.keg_wms_new.view.ClearableEditText;
 import com.uuzuche.lib_zxing.activity.CaptureActivity;
 import com.uuzuche.lib_zxing.activity.CodeUtils;
@@ -62,6 +84,14 @@ public class WHTransferLocationFragment extends BaseFragment implements Compound
     private ImageView mScanImageView;
     private int mFocusId;
 
+    private Button bt_inventory_barcode_printing;
+    private PopupWindow splitPop;
+    private List<WHBreakingBatchBreakingBtnClickEventNew.DataBean> messages = new ArrayList<>();
+    private boolean isConnected = false;
+    private String mOldAddress = "";
+    private int mPrintDpi = 203;
+    private boolean isPrinting = false;
+
     @Override
     protected int getLayout() {
         return R.layout.fragment_whtransfer_location;
@@ -81,6 +111,8 @@ public class WHTransferLocationFragment extends BaseFragment implements Compound
 
         mScanImageView = (ImageView) mActivity.findViewById(R.id.btn_actionbar_scan_iv);
 
+        bt_inventory_barcode_printing = root.findViewById(R.id.bt_inventory_barcode_printing);
+
         //回调接口
         VolleyUtil.getVolleyUtil().setOnVolleyFinishListener(this);
 
@@ -90,6 +122,10 @@ public class WHTransferLocationFragment extends BaseFragment implements Compound
         //List
         adapter = new TransferLocationAdapter(gridData, getActivity());
         lvData.setAdapter(adapter);
+
+        isConnected = (SharedPreUtil.getInt(mActivity, "printConnect", 0) == 1);
+        mOldAddress = SharedPreUtil.getString(mActivity, "printAddress", "");
+        mPrintDpi = SharedPreUtil.getInt(mActivity, "printDpi", 203);
     }
 
     @Override
@@ -144,6 +180,175 @@ public class WHTransferLocationFragment extends BaseFragment implements Compound
                 }
             }
         });
+
+        bt_inventory_barcode_printing.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                getWhcode();
+            }
+        });
+    }
+
+    private void getWhcode() {
+        View mPopView = View.inflate(mActivity, R.layout.pop_inventory_barcode_dialog, null);
+        ClearableEditText cet_barcode = (ClearableEditText) mPopView.findViewById(R.id.cet_barcode);
+        Button bt_ok = (Button) mPopView.findViewById(R.id.bt_ok);
+        AlertDialog mWarehouseDialog = new AlertDialog.Builder(mActivity)
+                .setView(mPopView)
+                .create();
+        mWarehouseDialog.show();
+
+        cet_barcode.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                if (actionId == EditorInfo.IME_ACTION_SEND
+                        || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
+                    if (!TextUtils.isEmpty(cet_barcode.getText().toString().trim())) {
+                        getInvertoryBarcode(cet_barcode.getText().toString().trim());
+                    }
+                    return true;
+                }
+                return false;
+            }
+        });
+
+        bt_ok.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                mWarehouseDialog.cancel();
+                getInvertoryBarcode(cet_barcode.getText().toString().trim());
+            }
+        });
+    }
+
+    private StringRequest mStringRequest;
+    private void getInvertoryBarcode(String barcode) {
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_GET_INVENTORY_BARCODE_DATA)
+                        .method(Request.Method.GET)
+                        .tag(TAG + "getInvertoryBarcode")
+                        .addParam("code", barcode)
+                        .flag(0)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        progressDialog.dismiss();
+                        Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(), "success");
+                        com.alibaba.fastjson.JSONObject data = FastjsonUtil.getJSONObject(o.toString(), "data");
+                        //                        com.alibaba.fastjson.JSONArray dataArray = FastjsonUtil.getJSONArray(data.toString(), "data");
+                        if (isSuccess) {
+                            try {
+                                com.alibaba.fastjson.JSONArray listArray = new com.alibaba.fastjson.JSONArray();
+                                String data1 = data.getString("data");
+                                listArray.add(JSON.parseObject(data1));
+                                initBreakPopupWindow(listArray);
+                            }catch (Exception e) {
+                                e.printStackTrace();
+                            }
+                        }
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+                    }
+                });
+    }
+
+    protected void initBreakPopupWindow(com.alibaba.fastjson.JSONArray listArray) {
+        messages.clear();
+        for (int i = 0; i < listArray.size(); i++) {
+            try {
+                com.alibaba.fastjson.JSONObject barcodeObject = listArray.getJSONObject(i);
+                if (barcodeObject != null) {
+                    WHBreakingBatchBreakingBtnClickEventNew.DataBean dataBean = new WHBreakingBatchBreakingBtnClickEventNew.DataBean();
+                    dataBean.setBAR_CODE(barcodeObject.getString("BAR_CODE"));
+                    dataBean.setBAR_REMAIN(barcodeObject.getString("BAR_REMAIN"));//RESTQTY
+                    messages.add(dataBean);
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+
+        View popView = LayoutInflater.from(getActivity()).inflate(R.layout.popupwindow_whbreaking_batch, null);
+        ListView listView = (ListView) popView.findViewById(R.id.list_view);
+        Button btnPrintf = (Button) popView.findViewById(R.id.btn_print);
+        Button btnPrintfSet = (Button) popView.findViewById(R.id.btn_print_setting);
+        Button btnClose = (Button) popView.findViewById(R.id.btn_close);
+        Button btnBack = (Button) popView.findViewById(R.id.btn_back);
+
+        btnBack.setVisibility(View.GONE);
+        btnClose.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closeSplitPopupWindow();
+            }
+        });
+        btnPrintf.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (isConnected) {
+                    progressDialog.show();
+                    printEvent(listArray);
+                } else {
+                    closeSplitPopupWindow();
+                    BlueToothPrintFragment blueToothPrintFragment = new BlueToothPrintFragment();
+
+                    Bundle bundle = new Bundle();
+                    bundle.putString(Constants.KEY.BARCODE_PRINT_ARRAY, listArray.toString());
+                    blueToothPrintFragment.setArguments(bundle);
+                    FragmentUtils.switchFragment(WHTransferLocationFragment.this, blueToothPrintFragment);
+                }
+            }
+        });
+
+        btnPrintfSet.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closeSplitPopupWindow();
+                BlueToothPrintFragment blueToothPrintFragment = new BlueToothPrintFragment();
+
+                Bundle bundle = new Bundle();
+                bundle.putString(Constants.KEY.BARCODE_PRINT_ARRAY, listArray.toString());
+                blueToothPrintFragment.setArguments(bundle);
+                FragmentUtils.switchFragment(WHTransferLocationFragment.this, blueToothPrintFragment);
+            }
+        });
+
+        MyAdapter adapter = new MyAdapter(getActivity(), R.layout.item_list_whbreakingbatchfragment, messages);
+        listView.setAdapter(adapter);
+        //当只有一条数据的时候可以加上
+        /*
+        if (messages.size()>1){
+            btnBack.setVisibility(View.GONE);
+        }*/
+        // PopupWindow实例化,参数的意思是 view,长(不包括状态栏),高(不包括状态栏),是否聚焦
+        splitPop = new PopupWindow(popView, LinearLayout.LayoutParams.WRAP_CONTENT,
+                LinearLayout.LayoutParams.WRAP_CONTENT, true);
+        splitPop.setAnimationStyle(R.style.MenuAnimationFade);
+        splitPop.setBackgroundDrawable(new BitmapDrawable());
+        // 弹出窗口显示内容视图,默认以锚定视图的左下角为起点,这里为点击按钮
+        splitPop.showAtLocation(getActivity().getWindow().getDecorView(), Gravity.CENTER, 0, 0);
+        splitPop.setOnDismissListener(new PopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                closeSplitPopupWindow();
+                //                confirmEvent();
+            }
+        });
+        CommonUtil.setBackgroundAlpha(mActivity, 0.5f);
+    }
+
+    private void closeSplitPopupWindow() {
+        if (splitPop != null) {
+            splitPop.dismiss();
+            splitPop = null;
+            CommonUtil.setBackgroundAlpha(mActivity, 1f);
+        }
     }
 
     @Override
@@ -436,4 +641,70 @@ public class WHTransferLocationFragment extends BaseFragment implements Compound
         }
         progressDialog.dismiss();
     }
+
+    private void printEvent(com.alibaba.fastjson.JSONArray printArray) {
+        if (isPrinting) {
+            CommonUtil.toastNoRepeat(mActivity, "正在打印中,请勿重复操作");
+            return;
+        }
+        isPrinting = true;
+        if (printArray != null && printArray.size() > 0) {
+            boolean isFail = false;
+            for (int i = 0; i < printArray.size(); i++) {
+                try {
+                    com.alibaba.fastjson.JSONObject printObject = printArray.getJSONObject(i);
+                    int printResult = PrintUtils.printBar(mActivity, printObject.toString(), mPrintDpi, null);
+                    if (printResult <= 0) {
+                        isFail = true;
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+            closeSplitPopupWindow();
+            progressDialog.dismiss();
+            if (isFail) {
+                isConnected = false;
+                SharedPreUtil.saveInt(mActivity, "printConnect", 0);
+                CommonUtil.toastNoRepeat(mActivity, "打印失败,请重新连接打印机");
+
+                BlueToothPrintFragment blueToothPrintFragment = new BlueToothPrintFragment();
+
+                Bundle bundle = new Bundle();
+                bundle.putString(Constants.KEY.BARCODE_PRINT_ARRAY, printArray.toString());
+                blueToothPrintFragment.setArguments(bundle);
+                FragmentUtils.switchFragment(WHTransferLocationFragment.this, blueToothPrintFragment);
+            } else {
+                CommonUtil.toastNoRepeat(mActivity, "打印成功");
+            }
+        } else {
+            CommonUtil.toastNoRepeat(mActivity, "打印失败,条码数据为空");
+        }
+        isPrinting = false;
+    }
+
+    private class MyAdapter extends ArrayAdapter<WHBreakingBatchBreakingBtnClickEventNew.DataBean> {
+        private int resourceId;
+
+        public MyAdapter(Context context, int resource, List<WHBreakingBatchBreakingBtnClickEventNew.DataBean> objects) {
+            super(context, resource, objects);
+            resourceId = resource;
+        }
+
+        @Override
+        public View getView(int position, View convertView, ViewGroup parent) {
+            //WHBreakingBatchBreakingBtnClickEventNew.Message target = getItem(position);
+            WHBreakingBatchBreakingBtnClickEventNew.DataBean person = getItem(position);
+            convertView = LayoutInflater.from(getContext()).inflate(resourceId,
+                    null);
+            TextView tv_bar_code = (TextView) convertView.findViewById(R.id.tv_bar_code);
+            TextView tv_bar_remain = (TextView) convertView.findViewById(R.id.tv_bar_remain);
+            // tv_bar_code.setText(target.bar_code);
+            // tv_bar_remain.setText(target.bar_remain);
+            tv_bar_code.setText(person.getBAR_CODE());
+            tv_bar_remain.setText(person.getBAR_REMAIN());
+            return convertView;
+        }
+
+    }
 }

+ 29 - 2
app/src/main/java/com/uas/keg_wms_new/global/GloableParams.java

@@ -296,6 +296,12 @@ public class GloableParams {
     public static String ADDRESS_GET_PRE_MATERIAL_LIST;
     public static String ADDRESS_GET_INVENTORY_BARCODE_DATA;     //库存条码打印
 
+    public static String ADDRESS_GET_BAR_DATA_BY_PROD;     //备料数据汇总点击物料编号弹出的表格数据
+
+    public static String ADDRESS_GET_BAR_BY_CUST;     //按客户点亮--料号前缀输入框
+    public static String ADDRESS_BAR_LIGHT_ON_BY_CUST;     //按客户点亮--点亮
+    public static String ADDRESS_BAR_LIGHT_OFF_BY_CUST;     //按客户点亮--灭灯
+
 
     //连接服务器请求地址
     private static final String ADDRESSTAIL_CONNECT_SERVER = "/api/pda/getAllMasters.action";
@@ -635,6 +641,7 @@ public class GloableParams {
      */
     //入库单列表
     private static final String ADDRESSTAIL_JLT_RECEIVING_GETINDATALIST = "/api/pda/incollection/getInDataList.action";
+//    private static final String ADDRESSTAIL_JLT_RECEIVING_GETINDATALIST = "/ERP/api/pda/receiving/saveBarcode2.action";
     //入库条码校验
     private static final String ADDRESSTAIL_RECEIVING_BARCODEPARSE2 = "/api/pda/receiving/barcodeParse2.action";
     //入库条码解析
@@ -828,6 +835,16 @@ public class GloableParams {
     //库存条码打印
     private static final String ADDRESSTAIL_GET_INVENTORY_BARCODE_DATA = "/api/pda/batch/getBarcodeData.action";
 
+    //备料数据汇总点击物料编号弹出的表格
+    private static final String ADDRESSTAIL_GET_BAR_DATA_BY_PROD = "/api/pda/outMaterial/getBarDataByProd.action";
+
+    //按客户点亮--料号前缀输入框
+    private static final String ADDRESSTAIL_GET_BAR_BY_CUST = "/api/pda/transfer/getBarByCust.action";
+    //按客户点亮--点亮
+    private static final String ADDRESSTAIL_BAR_LIGHT_ON_BY_CUST = "/api/pda/transfer/barLightOnByCust.action";
+    //按客户点亮--灭灯
+    private static final String ADDRESSTAIL_BAR_LIGHT_OFF_BY_CUST = "/api/pda/transfer/barLightOffByCust.action";
+
     /**
      *智能上架(扫码)
      */
@@ -892,6 +909,7 @@ public class GloableParams {
     public static final String FIND_MATERIALS = "找料";
     public static final String LIGHT_EMPTY_STORAGE_SPACE = "点亮空库位";
     public static final String LIGHT_RELEASE_THE_ALARM = "解除报警";
+    public static final String ILLUMINATE_BY_CUSTOMER = "按客户点亮";
     public static final String[] storageGridNames = {
             GRIDNAME_GOOD_SEARCH,
             GRIDNAME_BATCH_OPRATION,
@@ -904,7 +922,8 @@ public class GloableParams {
             GRIDNAME_SMART_SHELVES,
             FIND_MATERIALS,
             LIGHT_EMPTY_STORAGE_SPACE,
-            LIGHT_RELEASE_THE_ALARM
+            LIGHT_RELEASE_THE_ALARM,
+            ILLUMINATE_BY_CUSTOMER
     };
     public static final int[] storageGridImgs = {
             R.drawable.storage_good_search,
@@ -918,7 +937,8 @@ public class GloableParams {
             R.drawable.iv_shelves,
             R.drawable.zhaoliao,
             R.drawable.dianliangkongkucun,
-            R.drawable.jiechubaojing
+            R.drawable.jiechubaojing,
+            R.drawable.kehudianliang
     };
     //DETAIL:搜索备料单号,下拉列表
     public static final String SPINNER_PREPARE_SEARCH = "搜索备料单号";
@@ -1320,6 +1340,7 @@ public class GloableParams {
         GloableParams.ADDRESS_GET_SHELF = uriHead + GloableParams.ADDRESSAIL_GET_SHELF;
         GloableParams.ADDRESS_SHELF_LIGHT_ON_EMPTY_LOCATION = uriHead + GloableParams.ADDRESSAIL_SHELF_LIGHT_ON_EMPTY_LOCATION;
         GloableParams.ADDRESS_SHELF_LIGHT_OFF_EMPTY_LOCATIN = uriHead + GloableParams.ADDRESSAIL_SHELF_LIGHT_OFF_EMPTY_LOCATIN;
+
         GloableParams.ADDRESS_RELEASE_ALARM = uriHead + GloableParams.ADDRESSAIL_RELEASE_ALARM;
         GloableParams.ADDRESS_GET_BARBY_PROD = uriHead + GloableParams.ADDRESSAIL__GET_BARBY_PROD;
         GloableParams.ADDRESS_GET_BAR_FIND = uriHead + GloableParams.ADDRESSAIL_GET_BAR_FIND;
@@ -1330,5 +1351,11 @@ public class GloableParams {
         GloableParams.ADDRESS_GET_PRE_MATERIAL_LIST = uriHead + GloableParams.ADDRESSTAIL_GET_PRE_MATERIAL_LIST;
         GloableParams.ADDRESS_GET_INVENTORY_BARCODE_DATA = uriHead + GloableParams.ADDRESSTAIL_GET_INVENTORY_BARCODE_DATA;
 
+        GloableParams.ADDRESS_GET_BAR_DATA_BY_PROD = uriHead + GloableParams.ADDRESSTAIL_GET_BAR_DATA_BY_PROD;
+
+        GloableParams.ADDRESS_GET_BAR_BY_CUST = uriHead + GloableParams.ADDRESSTAIL_GET_BAR_BY_CUST;
+        GloableParams.ADDRESS_BAR_LIGHT_ON_BY_CUST = uriHead + GloableParams.ADDRESSTAIL_BAR_LIGHT_ON_BY_CUST;
+        GloableParams.ADDRESS_BAR_LIGHT_OFF_BY_CUST = uriHead + GloableParams.ADDRESSTAIL_BAR_LIGHT_OFF_BY_CUST;
+
     }
 }

+ 28 - 1
app/src/main/java/com/uas/keg_wms_new/tools/DataSourceManager.java

@@ -7,9 +7,9 @@ import android.os.Build;
 import android.util.Log;
 
 import com.google.gson.reflect.TypeToken;
-import com.uas.keg_wms_new.global.GloableParams;
 import com.uas.keg_wms_new.bean.FeederDetail;
 import com.uas.keg_wms_new.bean.Master;
+import com.uas.keg_wms_new.bean.MaterialPreparationSummaryBean;
 import com.uas.keg_wms_new.bean.Mpcode;
 import com.uas.keg_wms_new.bean.ProductIn;
 import com.uas.keg_wms_new.bean.SMTQuery;
@@ -21,6 +21,7 @@ import com.uas.keg_wms_new.fragment.IOCInMakeMaterialFragment;
 import com.uas.keg_wms_new.fragment.LoginFragment;
 import com.uas.keg_wms_new.fragment.SCFeederGetFragment;
 import com.uas.keg_wms_new.fragment.SCMakePrepareListFragment;
+import com.uas.keg_wms_new.global.GloableParams;
 
 import org.json.JSONArray;
 import org.json.JSONException;
@@ -76,6 +77,32 @@ public class DataSourceManager {
         notifyData.NotifyDataChanged(-1);
     }
 
+    /*============================备料数据汇总======================================*/
+    List<MaterialPreparationSummaryBean> materialPreparationSummaryBeans = null;
+
+    public List<MaterialPreparationSummaryBean> getMaterialPreparationSummaryBeans() {
+        if (materialPreparationSummaryBeans == null) {
+            materialPreparationSummaryBeans = new ArrayList();
+        }
+        return materialPreparationSummaryBeans;
+    }
+
+    public void setMaterialPreparationSummaryBeans(String result) {
+        materialPreparationSummaryBeans.removeAll(materialPreparationSummaryBeans);
+        try {
+            JSONObject tmpJson = new JSONObject(result);
+            //            String strTarget = tmpJson.getJSONArray("target").toString();
+            String strTarget = tmpJson.getJSONArray("data").toString();
+            List tmpList = GsonUtil.changeGsonToList(strTarget,
+                    new TypeToken<List<MaterialPreparationSummaryBean>>() {
+                    }.getType());
+            materialPreparationSummaryBeans.addAll(tmpList);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        notifyData.NotifyDataChanged(-1);
+    }
+
     /*********
      * 仓库管理:货物核查Index
      ***************/

+ 11 - 0
app/src/main/java/com/uas/keg_wms_new/tools/VolleyUtil.java

@@ -92,6 +92,7 @@ public class VolleyUtil {
     public static final int FRAGMETN_WHTRANSFER = 321;
     public static final int FRAGMENT_LOGOUT = 333;
     public static final int FRAGMENT_LOGIN_GETMASTERS = 334;
+    public static final int FRAGMENT_MATERIAL_PREPARATION_SUMMARY = 335;    //备料数据汇总-点击料号弹窗
 
     //3被用在InmakeFragment
     private static Context context;
@@ -1306,6 +1307,11 @@ public class VolleyUtil {
                     Log.e(TAG_StrListener, "物料库存核查:请求详细数据响应成功");
                     disposeProductDetail(s);
                     break;
+                //备料数据汇总-点击物料编号弹窗
+                case VolleyUtil.FRAGMENT_MATERIAL_PREPARATION_SUMMARY:
+                    Log.e(TAG_StrListener, "备料数据汇总:请求详细数据响应成功");
+                    disposeMaterialDetail(s);
+                    break;
                 //物料库存核查:请求数据明细
                 case VolleyUtil.FRAGMETN_WHCHECK_PRODUCT_DETAIL:
                     Log.e(TAG_StrListener, "物料库存核查:请求数据明细响应成功");
@@ -1346,6 +1352,11 @@ public class VolleyUtil {
         }
     }
 
+    private void disposeMaterialDetail(String result) {
+        DataSourceManager.getDataSourceManager().setMaterialPreparationSummaryBeans(result);
+        volleyFinishListener.onVolleyFinish(SUCCESS_SUCCESS, result);
+    }
+
     /**
      * @注释:Volley响应成功Listener_JSON格式
      */

+ 128 - 0
app/src/main/java/com/uas/keg_wms_new/view/MaterialPreparationSummaryPop.java

@@ -0,0 +1,128 @@
+package com.uas.keg_wms_new.view;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.graphics.drawable.ColorDrawable;
+import android.os.Build;
+import android.support.annotation.RequiresApi;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.ListView;
+import android.widget.PopupWindow;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import com.uas.keg_wms_new.R;
+import com.uas.keg_wms_new.adapter.PopMaterialPreparationSummaryAdapter;
+import com.uas.keg_wms_new.bean.MaterialPreparationSummaryBean;
+import com.uas.keg_wms_new.global.GloableParams;
+import com.uas.keg_wms_new.tools.DataSourceManager;
+import com.uas.keg_wms_new.tools.SharedPreUtil;
+import com.uas.keg_wms_new.tools.VolleyUtil;
+
+import java.util.List;
+
+public class MaterialPreparationSummaryPop extends PopupWindow implements DataSourceManager.NotifyData,
+        VolleyUtil.VolleyFinishListener{
+
+    private View view;
+    private final ImageView btn_cancel;
+    private final TextView tv_pd_prodcode;
+    int requestType = -1;
+    PopMaterialPreparationSummaryAdapter adapter;
+    List<MaterialPreparationSummaryBean> detailItemList;
+    private ListView lvDetail;
+    private final TextView tvPrDetail;
+    private final TextView tvPrSpec;
+
+    @SuppressLint("SetJavaScriptEnabled")
+    @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
+    public MaterialPreparationSummaryPop(Context mContext, View.OnClickListener itemsOnClick) {
+        this.view = LayoutInflater.from(mContext).inflate(R.layout.pop_material_preparation_summary, null);
+        btn_cancel = (ImageView) view.findViewById(R.id.btn_cancel);
+        tv_pd_prodcode = view.findViewById(R.id.tv_pd_prodcode);
+        // 设置外部可点击
+        this.setOutsideTouchable(true);
+        // mMenuView添加OnTouchListener监听判断获取触屏位置如果在选择框外面则销毁弹出框
+        this.view.setOnTouchListener(new View.OnTouchListener() {
+
+            public boolean onTouch(View v, MotionEvent event) {
+
+                int height = view.findViewById(R.id.pop_layout).getTop();
+
+                int y = (int) event.getY();
+                if (event.getAction() == MotionEvent.ACTION_UP) {
+                    if (y < height) {
+                        dismiss();
+                    }
+                }
+                return true;
+            }
+        });
+
+
+        /* 设置弹出窗口特征 */
+        // 设置视图
+        this.setContentView(this.view);
+        // 设置弹出窗体的宽和高
+        this.setHeight(RelativeLayout.LayoutParams.MATCH_PARENT);
+        this.setWidth(RelativeLayout.LayoutParams.MATCH_PARENT);
+
+        // 设置弹出窗体可点击
+        this.setFocusable(true);
+
+        // 实例化一个ColorDrawable颜色为半透明
+        ColorDrawable dw = new ColorDrawable(0xb0000000);
+        // 设置弹出窗体的背景
+        this.setBackgroundDrawable(dw);
+
+        // 设置弹出窗体显示时的动画,从底部向上弹出
+        this.setAnimationStyle(R.style.take_photo_anim);
+        // 取消按钮
+        btn_cancel.setOnClickListener(new View.OnClickListener() {
+
+            public void onClick(View v) {
+                // 销毁弹出框
+                dismiss();
+            }
+        });
+        lvDetail = (ListView) view.findViewById(R.id.lv_detail_whmm);
+        tvPrDetail = (TextView) view.findViewById(R.id.tv_pr_detail);
+        tvPrSpec = (TextView) view.findViewById(R.id.tv_pr_spec);
+        VolleyUtil.getVolleyUtil().setOnVolleyFinishListener(this);
+        DataSourceManager.getDataSourceManager().setNotifyData(this);
+        detailItemList = DataSourceManager.getDataSourceManager().getMaterialPreparationSummaryBeans();
+        adapter = new PopMaterialPreparationSummaryAdapter(detailItemList, mContext);
+        lvDetail.setAdapter(adapter);
+
+        String pd_prodcode_pop = SharedPreUtil.getString(mContext, "pd_prodcode_pop", null);
+        tv_pd_prodcode.setText(pd_prodcode_pop);
+
+        //请求详细数据
+        requestType = VolleyUtil.FRAGMENT_MATERIAL_PREPARATION_SUMMARY;
+        VolleyUtil.getVolleyUtil().requestMakeMaterialCheck(mContext, GloableParams.ADDRESS_GET_BAR_DATA_BY_PROD, VolleyUtil.METHOD_GET,
+                requestType, pd_prodcode_pop, "");
+    }
+
+
+    @Override
+    public void NotifyDataChanged(int noticeType) {
+        //修改信息显示区域的信息
+        String strDetail = detailItemList.get(0).getPR_DETAIL();
+        String strSpec = detailItemList.get(0).getPR_SPEC();
+
+        //信息区域显示
+        tvPrDetail.setText("" + strDetail);
+        tvPrSpec.setText("" + strSpec);
+        //table数据源修改
+        adapter.notifyDataSetChanged();
+    }
+
+    @Override
+    public void onVolleyFinish(int isSuccess, Object result) {
+
+    }
+}
+

BIN
app/src/main/res/drawable-xhdpi/kehudianliang.png


+ 109 - 0
app/src/main/res/layout/fra_illuminate_by_customer.xml

@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:orientation="vertical"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    >
+
+    <LinearLayout
+        android:layout_marginTop="35dp"
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="15dp"
+        android:layout_marginEnd="15dp"
+        >
+
+        <TextView
+            android:id="@+id/material_in_collect_location_tv"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:gravity="center"
+            android:padding="10dp"
+            android:text="料号前缀"
+            android:textColor="@color/red"
+            android:textSize="16sp"  />
+
+        <com.uas.keg_wms_new.view.ClearableEditText
+            android:id="@+id/cet_material_rack"
+            style="@style/EditTextStyle"
+            android:layout_width="0dp"
+            android:layout_weight="1"
+            android:background="@drawable/shape_msg_block"
+            android:lines="1"
+            android:maxLines="1"
+            android:textColor="@color/black"
+            android:singleLine="true"/>
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_marginTop="30dp"
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="50dp"
+        android:layout_marginStart="15dp"
+        android:layout_marginEnd="15dp"
+        >
+
+        <Button
+            android:id="@+id/bt_light_up"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:textSize="16sp"
+            android:textColor="@color/white"
+            android:background="@drawable/bg_button"
+            android:text="点亮"
+            android:layout_weight="4"/>
+
+        <View
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            />
+
+        <Button
+            android:id="@+id/bt_turn_off_the_light"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:textSize="16sp"
+            android:textColor="@color/white"
+            android:background="@drawable/bg_button"
+            android:text="灭灯"
+            android:layout_weight="4"/>
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:id="@+id/ll_result"
+        android:orientation="vertical"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="15dp"
+        android:layout_marginStart="15dp"
+        android:layout_marginEnd="15dp"
+        android:background="@drawable/shape_msg_block"
+        android:visibility="gone"
+        tools:visibility="visible"
+        android:padding="10dp">
+
+        <TextView
+            android:id="@+id/tv_result"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_marginTop="5dp"
+            android:layout_marginStart="5dp"
+            android:layout_marginEnd="5dp"
+            android:layout_marginBottom="5dp"
+            tools:visibility="visible"
+            />
+
+    </LinearLayout>
+
+
+
+
+
+</LinearLayout>

+ 10 - 0
app/src/main/res/layout/fragment_barcode_in_collect.xml

@@ -73,6 +73,16 @@
                 android:textColor="@color/black" />
         </TableRow>
 
+        <CheckBox
+            android:layout_marginTop="5dp"
+            android:gravity="left|center_vertical"
+            android:layout_gravity="center"
+            android:id="@+id/cb_reserve_space"
+            android:text="保留仓位"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
+        </CheckBox>
+
 
         <TableRow
             android:id="@+id/material_in_collect_location_tr"

+ 17 - 0
app/src/main/res/layout/fragment_iocout_make_material_oper.xml

@@ -8,6 +8,23 @@
             android:id="@+id/include_menuactionbar"
             layout="@layout/actionbar_withback" />-->
 
+    <RelativeLayout
+        android:layout_marginTop="10dp"
+        android:layout_marginStart="10dp"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        >
+
+        <Button
+            android:layout_alignParentStart="true"
+            android:id="@+id/bt_inventory_barcode_printing"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/Inventory_barcode_printing"
+            />
+
+    </RelativeLayout>
+
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="0dp"

+ 12 - 0
app/src/main/res/layout/fragment_whtransfer_location.xml

@@ -4,6 +4,18 @@
               android:layout_width="match_parent"
               android:layout_height="match_parent"
               android:orientation="vertical">
+
+    <Button
+        android:layout_marginTop="10dp"
+        android:layout_alignParentEnd="true"
+        android:id="@+id/bt_inventory_barcode_printing"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/Inventory_barcode_printing"
+        android:layout_marginStart="10dp"
+        android:layout_marginBottom="10dp"
+        />
+
     <!--1:RadioButton 外箱号/条码号-->
     <RadioGroup
         android:layout_width="match_parent"

+ 152 - 0
app/src/main/res/layout/pop_material_preparation_summary.xml

@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:gravity="center_horizontal"
+    android:layout_height="wrap_content">
+    <LinearLayout
+        android:layout_marginTop="100dp"
+        android:id="@+id/pop_layout"
+        android:layout_width="fill_parent"
+        android:layout_height="match_parent"
+        android:background="@drawable/sugarbaground"
+        android:layout_alignParentBottom="true"
+        android:orientation="vertical">
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <ImageView
+                android:layout_marginLeft="@dimen/space_top_line_15"
+                android:layout_marginTop="@dimen/space_top_line_15"
+                android:id="@+id/btn_cancel"
+                android:layout_width="21dp"
+                android:layout_height="21dp"
+                android:src="@mipmap/delete_popup">
+            </ImageView>
+            <TextView
+                android:textColor="#ff333333"
+                android:id="@+id/text_title"
+                android:layout_marginTop="@dimen/space_top_line_15"
+                android:layout_centerHorizontal="true"
+                android:layout_gravity="center"
+                android:textSize="@dimen/textsize_16"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content">
+            </TextView>
+        </RelativeLayout>
+        <TableLayout
+            android:layout_marginTop="@dimen/space_top_8"
+            style="@style/CardWhiteStyle_wrapheight">
+            <TableRow>
+                <TextView
+                    style="@style/CardContentTextStylepopu"
+                    android:textSize="@dimen/textsize_12"
+                    android:text="@string/text_fragment_whcheck_pd_prodcode"/>
+                <TextView
+                    android:id="@+id/tv_pd_prodcode"
+                    style="@style/CardContentTextStylepopu"
+                    android:textSize="@dimen/textsize_12"
+                    android:textColor="@color/text_search"/>
+            </TableRow>
+            <TableRow>
+                <TextView
+                    style="@style/CardContentTextStylepopu"
+                    android:textSize="@dimen/textsize_12"
+                    android:text="@string/text_fragment_whcheck_pr_detail"/>
+                <TextView
+                    android:id="@+id/tv_pr_detail"
+                    android:textSize="@dimen/textsize_12"
+                    style="@style/CardContentTextStylepopu"
+                    android:textColor="@color/text_search"/>
+            </TableRow>
+            <TableRow>
+                <TextView
+                    style="@style/CardContentTextStylepopu"
+                    android:textSize="@dimen/textsize_12"
+                    android:text="@string/text_fragment_whcheck_pr_spec" />
+                <TextView
+                    android:id="@+id/tv_pr_spec"
+                    style="@style/CardContentTextStylepopu"
+                    android:textSize="@dimen/textsize_12"
+                    android:textColor="@color/text_search" />
+            </TableRow>
+        </TableLayout>
+        <LinearLayout
+            style="@style/CardWhiteSytle_fillheight"
+            android:background="@color/white">
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:background="@color/button_normal"
+                android:orientation="horizontal">
+                <View
+                android:layout_width="0.5px"
+                android:layout_height="fill_parent"
+                android:background="#B8B8B8" />
+                <!--第一列-->
+                <TextView
+                    android:id="@+id/tv_table_1"
+                    style="@style/CardContentTextStyle"
+                    android:layout_weight="1"
+                    android:text="条码号"
+                    android:textSize="@dimen/space_top_line_15"/>
+
+                <View
+                    android:layout_width="0.5px"
+                    android:layout_height="fill_parent"
+                    android:background="#B8B8B8" />
+                <!--第二列-->
+                <TextView
+                    android:id="@+id/tv_table_2"
+                    style="@style/CardContentTextStyle"
+                    android:layout_weight="1"
+                    android:text="储位"
+                    android:textSize="@dimen/space_top_line_15"/>
+
+                <View
+                    android:layout_width="0.5px"
+                    android:layout_height="fill_parent"
+                    android:background="#B8B8B8" />
+                <!--第三列-->
+                <TextView
+                    android:id="@+id/tv_table_3"
+                    style="@style/CardContentTextStyle"
+                    android:layout_weight="1"
+                    android:text="数量"
+                    android:textSize="@dimen/space_top_line_15"/>
+
+                <View
+                    android:layout_width="0.5px"
+                    android:layout_height="fill_parent"
+                    android:background="#B8B8B8" />
+                <TextView
+                    android:visibility="gone"
+                    android:id="@+id/tv_table_4"
+                    style="@style/CardContentTextStyle"
+                    android:layout_weight="1"
+                    android:text="DC"
+                    android:textSize="@dimen/space_top_line_15"/>
+
+            </LinearLayout>
+
+            <!--信息列表-->
+            <ScrollView
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:fillViewport="true"
+                android:background="@color/transparent">
+                <ListView
+                    android:id="@+id/lv_detail_whmm"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:background="@color/transparent"/>
+            </ScrollView>
+
+        </LinearLayout>
+
+
+    </LinearLayout>
+
+
+
+
+</RelativeLayout>

+ 86 - 0
app/src/main/res/layout/popwin_item_material.xml

@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="utf-8"?><!--表格ListItem:三列-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@color/button_normal"
+    android:orientation="horizontal">
+
+    <View
+        android:layout_width="0.5px"
+        android:layout_height="fill_parent"
+        android:background="#B8B8B8" />
+    <!--第一列-->
+    <TextView
+        android:id="@+id/tv_table_1"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="3dp"
+        android:layout_marginBottom="3dp"
+        android:layout_marginLeft="@dimen/space_left_inner"
+        android:layout_marginRight="@dimen/space_right_inner"
+        android:layout_weight="1"
+        android:textStyle="bold"
+        android:gravity="center_vertical"
+        android:textSize="@dimen/space_top_line_15"
+        android:text="仓库" />
+
+
+    <View
+        android:layout_width="0.5px"
+        android:layout_height="fill_parent"
+        android:background="#B8B8B8" />
+    <!--第二列-->
+    <TextView
+        android:id="@+id/tv_table_2"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="3dp"
+        android:layout_marginBottom="3dp"
+        android:layout_marginLeft="@dimen/space_left_inner"
+        android:layout_marginRight="@dimen/space_right_inner"
+        android:layout_weight="1"
+        android:textStyle="bold"
+        android:gravity="center_vertical"
+        android:textSize="@dimen/space_top_line_15"
+        android:text="储位" />
+
+    <View
+        android:layout_width="0.5px"
+        android:layout_height="fill_parent"
+        android:background="#B8B8B8" />
+    <!--第三列-->
+    <TextView
+        android:id="@+id/tv_table_3"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="3dp"
+        android:layout_marginBottom="3dp"
+        android:layout_marginLeft="@dimen/space_left_inner"
+        android:layout_marginRight="@dimen/space_right_inner"
+        android:layout_weight="1"
+        android:textStyle="bold"
+        android:gravity="center_vertical"
+        android:textSize="@dimen/space_top_line_15"
+        android:text="数量" />
+
+    <View
+        android:layout_width="0.5px"
+        android:layout_height="fill_parent"
+        android:background="#B8B8B8" />
+    <TextView
+        android:visibility="gone"
+        android:id="@+id/tv_table_4"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="3dp"
+        android:layout_marginBottom="3dp"
+        android:layout_marginLeft="@dimen/space_left_inner"
+        android:layout_marginRight="@dimen/space_right_inner"
+        android:layout_weight="1"
+        android:textStyle="bold"
+        android:gravity="center_vertical"
+        android:textSize="@dimen/space_top_line_15"
+        android:text="DC" />
+
+
+</LinearLayout>

+ 2 - 2
build.gradle

@@ -54,8 +54,8 @@ ext {
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 20,
-            versionName      : "v1.1.9"
+            versionCode      : 28,
+            versionName      : "v1.2.4"
     ]
 
     depsVersion = [