songw 9 ماه پیش
والد
کامیت
768f1ccbe6
63فایلهای تغییر یافته به همراه2993 افزوده شده و 1275 حذف شده
  1. 9 4
      app/build.gradle
  2. 14 1
      app/proguard-rules.pro
  3. 10 2
      app/src/main/AndroidManifest.xml
  4. 18 12
      app/src/main/java/com/uas/pda_smart_com/activity/IndexActivity.java
  5. 77 10
      app/src/main/java/com/uas/pda_smart_com/adapter/StorageRechargeAdapter.java
  6. 3 0
      app/src/main/java/com/uas/pda_smart_com/adapter/StorageRechargeInspectionAdapter.java
  7. 3 1
      app/src/main/java/com/uas/pda_smart_com/adapter/WHCheckMakeMaterialListAdapter.java
  8. 47 3
      app/src/main/java/com/uas/pda_smart_com/application/PdaApplication.java
  9. 19 0
      app/src/main/java/com/uas/pda_smart_com/bean/MaterialInformationBean.java
  10. 9 0
      app/src/main/java/com/uas/pda_smart_com/bean/StockAlreadyItemBean.java
  11. 18 1
      app/src/main/java/com/uas/pda_smart_com/bean/StockTaskMultipleBean.java
  12. 10 0
      app/src/main/java/com/uas/pda_smart_com/bean/StorageRechargeInspectionBean.java
  13. 9 0
      app/src/main/java/com/uas/pda_smart_com/bean/StorageRechargeListBean.java
  14. 3 3
      app/src/main/java/com/uas/pda_smart_com/bean/WHBreakingBatchBreakingBtnClickEvent.java
  15. 47 0
      app/src/main/java/com/uas/pda_smart_com/bean/WHMakeMaterialProduct.java
  16. 133 93
      app/src/main/java/com/uas/pda_smart_com/fragment/BarcodeInCollectFragment.java
  17. 4 1
      app/src/main/java/com/uas/pda_smart_com/fragment/BlueToothPrintFragment.java
  18. 174 61
      app/src/main/java/com/uas/pda_smart_com/fragment/IOCOutMakeMaterial.java
  19. 503 145
      app/src/main/java/com/uas/pda_smart_com/fragment/IOCOutMakeMaterialOper.java
  20. 2 0
      app/src/main/java/com/uas/pda_smart_com/fragment/IndexSettingFragment.java
  21. 10 0
      app/src/main/java/com/uas/pda_smart_com/fragment/IndexWareHouseContentFragment.java
  22. 370 91
      app/src/main/java/com/uas/pda_smart_com/fragment/InventoryCollectFragment.java
  23. 2 0
      app/src/main/java/com/uas/pda_smart_com/fragment/LoginFragment.java
  24. 215 0
      app/src/main/java/com/uas/pda_smart_com/fragment/ModifyBarcodeQuantityFragment.java
  25. 0 1
      app/src/main/java/com/uas/pda_smart_com/fragment/ModifyQuantityOutFragment.java
  26. 2 2
      app/src/main/java/com/uas/pda_smart_com/fragment/SpecialMaterialOutFragment.java
  27. 41 1
      app/src/main/java/com/uas/pda_smart_com/fragment/StockDataSummaryFragment.java
  28. 11 1
      app/src/main/java/com/uas/pda_smart_com/fragment/StorageInFragment.java
  29. 15 2
      app/src/main/java/com/uas/pda_smart_com/fragment/StorageRechargeFragment.java
  30. 1 0
      app/src/main/java/com/uas/pda_smart_com/fragment/StorageRechargeListFragment.java
  31. 2 2
      app/src/main/java/com/uas/pda_smart_com/fragment/VersionUpgradeFragment.java
  32. 2 2
      app/src/main/java/com/uas/pda_smart_com/fragment/WHBreakingBatchFragment.java
  33. 6 2
      app/src/main/java/com/uas/pda_smart_com/fragment/WHCheckBarcodeFragment.java
  34. 2 1
      app/src/main/java/com/uas/pda_smart_com/fragment/WHCheckContentFragment.java
  35. 0 391
      app/src/main/java/com/uas/pda_smart_com/fragment/WHCheckMakeMaterialFragment.java
  36. 182 1
      app/src/main/java/com/uas/pda_smart_com/fragment/WHCombineBatchFragment.java
  37. 1 0
      app/src/main/java/com/uas/pda_smart_com/fragment/WHTransferLocationFragment.java
  38. 155 5
      app/src/main/java/com/uas/pda_smart_com/global/GloableParams.java
  39. 1 1
      app/src/main/java/com/uas/pda_smart_com/tools/DataSourceManager.java
  40. 23 0
      app/src/main/java/com/uas/pda_smart_com/tools/VolleyUtil.java
  41. 67 1
      app/src/main/java/com/uas/pda_smart_com/util/CommonUtil.java
  42. 10 0
      app/src/main/java/com/uas/pda_smart_com/util/Constants.java
  43. 19 7
      app/src/main/java/com/uas/pda_smart_com/util/PrintUtils.java
  44. 12 1
      app/src/main/java/com/uas/pda_smart_com/util/VolleyRequest.java
  45. 37 7
      app/src/main/res/layout/dialog_recharge_modify.xml
  46. 39 31
      app/src/main/res/layout/fragment_barcode_in_collect.xml
  47. 82 0
      app/src/main/res/layout/fragment_inventory_collect.xml
  48. 2 1
      app/src/main/res/layout/fragment_iocout_make_material.xml
  49. 424 293
      app/src/main/res/layout/fragment_iocout_make_material_oper.xml
  50. 21 2
      app/src/main/res/layout/fragment_whcheck_barcode.xml
  51. 0 73
      app/src/main/res/layout/fragment_whcheck_makematerial.xml
  52. 17 5
      app/src/main/res/layout/item_list_storage_recharge.xml
  53. 13 0
      app/src/main/res/layout/item_list_table.xml
  54. 25 0
      app/src/main/res/layout/list_storage_recharge_inspection.xml
  55. 4 2
      app/src/main/res/layout/popwin_whbatch_breakpackage.xml
  56. 1 1
      app/src/main/res/values/color.xml
  57. 8 2
      app/src/main/res/values/strings.xml
  58. 34 0
      app/src/main/res/values/styles.xml
  59. 3 1
      app/src/main/res/xml/file_paths.xml
  60. 16 5
      build.gradle
  61. 1 1
      gradle/wrapper/gradle-wrapper.properties
  62. 4 1
      pda_libs/bluetooth/src/main/java/com/uas/bluetooth/PrintHelper.java
  63. 1 1
      pda_libs/pulltoreflashlibrary/src/main/AndroidManifest.xml

+ 9 - 4
app/build.gradle

@@ -23,6 +23,10 @@ android {
                 includeCompileClasspath = true
             }
         }
+        ndk {
+            //设置支持的SO库架构(开发者可以根据需要,选择一个或多个平台的so)
+            abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
+        }
     }
     buildTypes {
         release {
@@ -41,7 +45,7 @@ android {
             if (outputFile != null && outputFile.name.endsWith('.apk')) {
                 if (variant.buildType.name.equals('release')) {
                     def releaseInfo = getVersionName()
-                    fileName = "UAS_PDA_SMART_COM_RELEASE_${releaseInfo}.apk"
+                    fileName = "仓库通用版${releaseInfo}.apk"
 
                 } else if (variant.buildType.name.equals('debug')) {
                     def debugInfo = getVersionName()
@@ -80,9 +84,10 @@ 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包依赖(必选)
 }
 
 def getVersionName() {

+ 14 - 1
app/proguard-rules.pro

@@ -166,4 +166,17 @@
 ################################
 ##实体类
 #-keep class com.uas.pda_smart_com.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);
+}
+

+ 10 - 2
app/src/main/AndroidManifest.xml

@@ -16,6 +16,12 @@
     <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
     <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.pda_smart_com.application.PdaApplication"
         android:allowBackup="true"
@@ -62,9 +68,11 @@
 
         <provider
             android:name="android.support.v4.content.FileProvider"
-            android:authorities="com.uas.pda_smart_com"
+            android:authorities="com.uas.pda_smart_com.fileprovider"
             android:exported="false"
-            android:grantUriPermissions="true">
+            android:grantUriPermissions="true"
+            tools:replace="android:authorities"
+            >
             <meta-data
                 android:name="android.support.FILE_PROVIDER_PATHS"
                 android:resource="@xml/file_paths" />

+ 18 - 12
app/src/main/java/com/uas/pda_smart_com/activity/IndexActivity.java

@@ -50,6 +50,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
     private PopupWindow mExitPopupWindow;
     private TextView mCancelTextView, mMinimizeTextView, mExitTextView;
     private StringRequest mStringRequest;
+    private PdaApplication pdaApplication;
 
     @Override
     protected void onDestroy() {
@@ -57,20 +58,26 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
         Log.e("Indexactivity", "onDestroy remove cache");
 //        SharedPreUtil.removeAll(getApplicationContext());
         VolleyUtil.distoryVolley();
+        pdaApplication.cancelCountdown();
         super.onDestroy();
     }
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-
-        //请求储位  no use
-        VolleyUtil.requestGetUseLocationOrNot(getApplicationContext(), GloableParams.ADDRESS_GET_FIELD_DATA,
-                VolleyUtil.METHOD_POST, pageType);
-        //原材料出库采集方式  CollectAlreadyFragment...
-        VolleyUtil.requestProdOutType(getApplicationContext(), GloableParams.ADDRESS_GET_FIELD_DATA);
-        //获取条码打印模板
-        getPrintTemplate();
+        try {
+            //请求储位  no use
+            VolleyUtil.requestGetUseLocationOrNot(getApplicationContext(), GloableParams.ADDRESS_GET_FIELD_DATA,
+                    VolleyUtil.METHOD_POST, pageType);
+            //原材料出库采集方式  CollectAlreadyFragment...
+            VolleyUtil.requestProdOutType(getApplicationContext(), GloableParams.ADDRESS_GET_FIELD_DATA);
+            //获取条码打印模板
+            getPrintTemplate();
+            pdaApplication = new PdaApplication();
+            pdaApplication.startCountdown();
+        }catch (Exception e){
+            e.printStackTrace();
+        }
     }
 
     private void getPrintTemplate() {
@@ -97,7 +104,6 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
                         } catch (Exception e) {
                             e.printStackTrace();
                         }
-
                     }
 
                     @Override
@@ -183,9 +189,9 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
     @Override
     protected void onResume() {
         super.onResume();
-        SharedPreUtil.saveString(this, "printAddress", "");
-        SharedPreUtil.saveInt(this, "printConnect", 0);
-        SharedPreUtil.saveInt(this, "printDpi", 203);
+//        SharedPreUtil.saveString(this, "printAddress", "");
+//        SharedPreUtil.saveInt(this, "printConnect", 0);
+//        SharedPreUtil.saveInt(this, "printDpi", 203);
     }
 
     @Override

+ 77 - 10
app/src/main/java/com/uas/pda_smart_com/adapter/StorageRechargeAdapter.java

@@ -1,8 +1,8 @@
 package com.uas.pda_smart_com.adapter;
 
 import android.content.Context;
-import android.content.DialogInterface;
 import android.support.v7.app.AlertDialog;
+import android.text.TextUtils;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -10,8 +10,17 @@ import android.widget.BaseAdapter;
 import android.widget.EditText;
 import android.widget.TextView;
 
+import com.android.volley.Request;
+import com.android.volley.toolbox.StringRequest;
 import com.uas.pda_smart_com.R;
 import com.uas.pda_smart_com.bean.StorageRechargeListBean;
+import com.uas.pda_smart_com.global.GloableParams;
+import com.uas.pda_smart_com.interfaces.OnQuantityModifyListener;
+import com.uas.pda_smart_com.util.CommonUtil;
+import com.uas.pda_smart_com.util.HttpCallback;
+import com.uas.pda_smart_com.util.HttpParams;
+import com.uas.pda_smart_com.util.StringUtil;
+import com.uas.pda_smart_com.util.VolleyRequest;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -19,7 +28,7 @@ import java.util.List;
 public class StorageRechargeAdapter extends BaseAdapter {
 
     private List<StorageRechargeListBean> objects = new ArrayList<StorageRechargeListBean>();
-
+    private StringRequest mStringRequest;
     private Context context;
     private LayoutInflater layoutInflater;
     private OnQuantityModifyListener mOnQuantityModifyListener;
@@ -63,27 +72,83 @@ public class StorageRechargeAdapter extends BaseAdapter {
         holder.listStorageRechargeOrdercodeTv.setText(object.getOrdercode());
         holder.listStorageRechargeOrdernoTv.setText(object.getOrderNo() + "");
         holder.listStorageRechargeProdcodeTv.setText(object.getProdcode());
-        holder.listStorageRechargeQuantityTv.setText(object.getQuantity() + "");
+        holder.listStorageRechargeQuantityTv.setText("送货数量:"+object.getQuantity() + "");
         holder.listStorageRechargeSpecTv.setText(object.getDetail() + "    " + object.getSpec());
+        holder.ban_qtyModifyTv.setText("已核对数:"+object.getBAN_QTY());
+        if (!TextUtils.isEmpty(object.getBAN_QTY())) {
+            holder.ban_qtyModifyTv.setTextColor(context.getResources().getColor(R.color.red));
+        }
 
         holder.quantityModifyTv.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
                 View dialogView = View.inflate(context, R.layout.dialog_recharge_modify, null);
                 final EditText modifyEditText = dialogView.findViewById(R.id.recharge_modify_et);
+                final EditText et_remarkqty = dialogView.findViewById(R.id.et_remarkqty);
                 final AlertDialog alertDialog = new AlertDialog.Builder(context).setTitle("修改数量")
                         .setView(dialogView)
                         .setNegativeButton(R.string.cancel, null)
                         .setPositiveButton(R.string.confirm, null).create();
-
                 alertDialog.show();
+                modifyEditText.setText(objects.get(position).getQuantity()+"");
+                modifyEditText.setSelection(modifyEditText.getText().length());
                 alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener(new View.OnClickListener() {
                     @Override
                     public void onClick(View view) {
-                        String s = modifyEditText.getText().toString();
-                        if (mOnQuantityModifyListener != null) {
-                            mOnQuantityModifyListener.onQuantityModify(alertDialog, s, position);
+//                        if (mOnQuantityModifyListener != null) {
+//                            mOnQuantityModifyListener.onQuantityModify(alertDialog, s, position,remarkqty);
+//                        }
+                        if (StringUtil.isEmpty(modifyEditText.getText().toString().trim())){
+                            CommonUtil.toastNoRepeat(context, "请输入送货数量");
+                            return;
+                        }
+                        if (StringUtil.isEmpty(et_remarkqty.getText().toString().trim())){
+                            CommonUtil.toastNoRepeat(context, "请输入备品数量");
+                        }
+                        double quantity = -1;
+                        double remarkqty = -1;
+                        try {
+                            quantity = Double.parseDouble(modifyEditText.getText().toString().trim());
+                            remarkqty = Double.parseDouble(et_remarkqty.getText().toString().trim());
+                        } catch (Exception e) {
+                            CommonUtil.toastNoRepeat(context, "请输入正确的数字");
+//                    dialogInterface.dismiss();
+                            return;
                         }
+
+                        if (quantity <= 0) {
+                            CommonUtil.toastNoRepeat(context, "数量必须大于0");
+//                    dialogInterface.dismiss();
+                            return;
+                        }
+
+                        final double finalQuantity = quantity;
+                        VolleyRequest.getInstance().stringRequest(mStringRequest,
+                                new HttpParams.Builder()
+                                        .url(GloableParams.ADDRESS_RECHARGE_UPDATEANDINQTY)
+                                        .method(Request.Method.POST)
+                                        .tag("TAG" + "updateandinqty")
+                                        .flag(0x05)
+                                        .addParam("and_id", objects.get(position).getAndId() + "")
+                                        .addParam("qty", quantity + "")
+                                        .addParam("remarkQTY", remarkqty + "")
+                                        .build(), new HttpCallback() {
+                                    @Override
+                                    public void onSuccess(int flag, Object o) throws Exception {
+//                                        progressDialog.dismiss();
+                                        alertDialog.dismiss();
+
+                                        objects.get(position).setQuantity(finalQuantity);
+
+                                        notifyDataSetChanged();
+                                    }
+
+                                    @Override
+                                    public void onFail(int flag, String failStr) throws Exception {
+                                        alertDialog.dismiss();
+                                        CommonUtil.toastNoRepeat(context, failStr);
+                                    }
+                                });
                     }
                 });
             }
@@ -97,6 +162,7 @@ public class StorageRechargeAdapter extends BaseAdapter {
         private TextView listStorageRechargeQuantityTv;
         private TextView listStorageRechargeSpecTv;
         private TextView quantityModifyTv;
+        private TextView ban_qtyModifyTv;
 
         public ViewHolder(View view) {
             listStorageRechargeOrdercodeTv = (TextView) view.findViewById(R.id.list_storage_recharge_ordercode_tv);
@@ -105,10 +171,11 @@ public class StorageRechargeAdapter extends BaseAdapter {
             listStorageRechargeQuantityTv = (TextView) view.findViewById(R.id.list_storage_recharge_quantity_tv);
             listStorageRechargeSpecTv = (TextView) view.findViewById(R.id.list_storage_recharge_spec_tv);
             quantityModifyTv = (TextView) view.findViewById(R.id.list_storage_recharge_quantity_modify_tv);
+            ban_qtyModifyTv = (TextView) view.findViewById(R.id.list_storage_recharge_ban_qty_tv);
         }
     }
 
-    public interface OnQuantityModifyListener {
-        void onQuantityModify(DialogInterface dialogInterface, String text, int position);
-    }
+//    public interface OnQuantityModifyListener {
+//        void onQuantityModify(DialogInterface dialogInterface, String text, int position,String remarkQTY);
+//    }
 }

+ 3 - 0
app/src/main/java/com/uas/pda_smart_com/adapter/StorageRechargeInspectionAdapter.java

@@ -68,6 +68,7 @@ public class StorageRechargeInspectionAdapter extends BaseAdapter {
         holder.listStorageInspectionVendnameTv.setText(object.getVendname());
         holder.listStorageInspectionRecorderTv.setText(object.getRecorder());
         holder.listStorageInspectionStateTv.setText(object.getStates());
+        holder.tv_receiving_aterials_time.setText(object.getAN_INDATE());
     }
 
     protected class ViewHolder {
@@ -76,6 +77,7 @@ public class StorageRechargeInspectionAdapter extends BaseAdapter {
         private TextView listStorageInspectionRecorderTv;
         private TextView listStorageInspectionStateTv;
         private TextView codeCaptionTv;
+        private TextView tv_receiving_aterials_time;
 
         public ViewHolder(View view) {
             listStorageInspectionCodeTv = (TextView) view.findViewById(R.id.list_storage_recharge_inspection_code_tv);
@@ -83,6 +85,7 @@ public class StorageRechargeInspectionAdapter extends BaseAdapter {
             listStorageInspectionRecorderTv = (TextView) view.findViewById(R.id.list_storage_recharge_inspection_recorder_tv);
             listStorageInspectionStateTv = (TextView) view.findViewById(R.id.list_storage_recharge_inspection_state_tv);
             codeCaptionTv = (TextView) view.findViewById(R.id.list_storage_recharge_inspection_code_caption);
+            tv_receiving_aterials_time = (TextView) view.findViewById(R.id.tv_receiving_aterials_time);
         }
     }
 }

+ 3 - 1
app/src/main/java/com/uas/pda_smart_com/adapter/WHCheckMakeMaterialListAdapter.java

@@ -45,10 +45,12 @@ public class WHCheckMakeMaterialListAdapter extends BaseAdapter {
         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);
         WHMakeMaterialProduct tmpProduct = (WHMakeMaterialProduct) getItem(position);
         tvColumn1.setText("" + tmpProduct.getBAR_WHCODE());
         tvColumn2.setText("" + tmpProduct.getBAR_LOCATION());
-        tvColumn3.setText("" + tmpProduct.getBAR_REMAIN());
+        tvColumn3.setText("" + tmpProduct.getREMAIN());
+        tvColumn4.setText("" + tmpProduct.getMADEDATE());
         int[] colors = {Color.WHITE, Color.rgb(219, 238, 244)};
         view.setBackgroundColor(colors[position % 2]);
         return view;

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

@@ -1,16 +1,23 @@
 package com.uas.pda_smart_com.application;
 
+import android.app.Activity;
 import android.app.Application;
 import android.content.Context;
 import android.media.AudioAttributes;
 import android.media.SoundPool;
 import android.os.Build;
+import android.os.CountDownTimer;
+import android.util.Log;
 
 import com.android.volley.RequestQueue;
 import com.android.volley.toolbox.Volley;
 import com.facebook.stetho.Stetho;
 import com.uas.pda_smart_com.R;
+import com.uas.pda_smart_com.global.GloableParams;
+import com.uas.pda_smart_com.tools.SharedPreUtil;
+import com.uas.pda_smart_com.tools.VolleyUtil;
 import com.uas.pda_smart_com.util.AndroidUtil;
+import com.uas.pda_smart_com.util.Constants;
 import com.uas.pda_smart_com.util.FakeX509TrustManager;
 import com.uas.pda_smart_com.util.SoundUtil;
 import com.umeng.analytics.MobclickAgent;
@@ -44,7 +51,8 @@ public class PdaApplication extends Application {
     public static SoundPool mSoundPool;
     public static HashMap<Integer, Integer> mSoundMap;
     public static int mVersionCode = 1;
-
+    private static final long COUNTDOWN_INTERVAL = 1000; // 1 second
+    private static final long COUNTDOWN_TIME = 10 * 60 * 1000; //
     @Override
     public void onCreate() {
         super.onCreate();
@@ -86,17 +94,53 @@ public class PdaApplication extends Application {
         mSoundMap.put(SoundUtil.SOUND_TITAN, mSoundPool.load(this, R.raw.titan, 1));
         //友盟统计SDK
         initUmeng();
+
+
     }
+    private CountDownTimer countDownTimer = new CountDownTimer(COUNTDOWN_TIME, COUNTDOWN_INTERVAL) {
+
+        @Override
+        public void onTick(long millisUntilFinished) {
+            // 这里每秒会被调用一次
+            int secondsRemaining = (int) (millisUntilFinished / 1000);
+            int minutesRemaining = secondsRemaining / 60;
+            int seconds = secondsRemaining % 60;
+            Log.d("Countdown", "Time remaining: " + minutesRemaining + " minutes, " + seconds + " seconds.");
+            // 更新UI
+        }
+
+        @Override
+        public void onFinish() {
+            // 倒计时完成时的操作
 
+            // 更新UI
+            Activity activity=new Activity();
+            String maName = SharedPreUtil.getString(activity, Constants.FLAG.ACCOUNT_NAME_CACHE, null);
+            String userName = SharedPreUtil.getString(activity, "userNames", null);
+            String password = SharedPreUtil.getString(activity, "passwords", null);
+            VolleyUtil.requestUserLogin(activity, GloableParams.ADDRESS_LOGIN_APPLY, VolleyUtil.METHOD_POST, 
+            VolleyUtil.FRAGMENT_LOGIN, maName, userName, password);
+            Log.d("Countdown结束", "Countdown finished.");
+            startCountdown();
+        }
+    };
+
+    public void startCountdown() {
+        countDownTimer.start();
+    }
+
+    public void cancelCountdown() {
+        countDownTimer.cancel();
+    }
 
     private void initUmeng() {
         //2.在Application.oncreate()中调用预初始化函数
-        UMConfigure.preInit(this, "6170b8b61c91e0671bb0da5a","umeng");
+        UMConfigure.preInit(this, "67bc46458f232a05f11cc56f","umeng");
         UMConfigure.setLogEnabled(true);
         //3.客户端用户同意隐私政策后,正式初始化友盟+SDK
         UMConfigure.init(
                 this,
-                "6170b8b61c91e0671bb0da5a",
+                "67bc46458f232a05f11cc56f",
                 "umeng",
                 UMConfigure.DEVICE_TYPE_PHONE, ""
         );

+ 19 - 0
app/src/main/java/com/uas/pda_smart_com/bean/MaterialInformationBean.java

@@ -55,6 +55,25 @@ public class MaterialInformationBean {
         private double BAR_REMAIN;
         private String DC;
 
+        private String PD_OUQTY;
+        private String PD_WHCODE;
+
+        public String getPD_OUQTY() {
+            return PD_OUQTY;
+        }
+
+        public void setPD_OUQTY(String PD_OUQTY) {
+            this.PD_OUQTY = PD_OUQTY;
+        }
+
+        public String getPD_WHCODE() {
+            return PD_WHCODE;
+        }
+
+        public void setPD_WHCODE(String PD_WHCODE) {
+            this.PD_WHCODE = PD_WHCODE;
+        }
+
         public String getPR_ORISPECCODE() {
             return PR_ORISPECCODE;
         }

+ 9 - 0
app/src/main/java/com/uas/pda_smart_com/bean/StockAlreadyItemBean.java

@@ -35,6 +35,15 @@ public class StockAlreadyItemBean {
     private String BI_LOCATION;
     private String BI_BATCHCODE;
     private int BI_PDAGET;
+    public String BI_ID;
+
+    public String getBI_ID() {
+        return BI_ID;
+    }
+
+    public void setBI_ID(String BI_ID) {
+        this.BI_ID = BI_ID;
+    }
 
     private String PR_ORISPECCODE;
 

+ 18 - 1
app/src/main/java/com/uas/pda_smart_com/bean/StockTaskMultipleBean.java

@@ -33,7 +33,24 @@ public class StockTaskMultipleBean {
     private int BA_HASBARCODE;
     private double BAR_REMAIN;
     private String DC;
-    private List<NOSBean> NOS;
+    private List<NOSBean> NOS;    private double INQTY;
+    private double PBQTY;
+
+    public double getINQTY() {
+        return INQTY;
+    }
+
+    public void setINQTY(double INQTY) {
+        this.INQTY = INQTY;
+    }
+
+    public double getPBQTY() {
+        return PBQTY;
+    }
+
+    public void setPBQTY(double PBQTY) {
+        this.PBQTY = PBQTY;
+    }
 
     public String getPR_ORISPECCODE() {
         return PR_ORISPECCODE;

+ 10 - 0
app/src/main/java/com/uas/pda_smart_com/bean/StorageRechargeInspectionBean.java

@@ -19,6 +19,8 @@ public class StorageRechargeInspectionBean implements Serializable {
     private String mDetailJson;
     private boolean isSlipable;
 
+    private String AN_INDATE;      //收料日期
+
     public long getId() {
         return mId;
     }
@@ -98,4 +100,12 @@ public class StorageRechargeInspectionBean implements Serializable {
     public void setSlipable(boolean slipable) {
         isSlipable = slipable;
     }
+
+    public String getAN_INDATE() {
+        return AN_INDATE;
+    }
+
+    public void setAN_INDATE(String AN_INDATE) {
+        this.AN_INDATE = AN_INDATE;
+    }
 }

+ 9 - 0
app/src/main/java/com/uas/pda_smart_com/bean/StorageRechargeListBean.java

@@ -14,6 +14,15 @@ public class StorageRechargeListBean {
     private double mQuantity;
     private String mSpec;
     private String mDetail;
+    private String BAN_QTY;
+
+    public String getBAN_QTY() {
+        return BAN_QTY;
+    }
+
+    public void setBAN_QTY(String BAN_QTY) {
+        this.BAN_QTY = BAN_QTY;
+    }
 
     public long getAndId() {
         return mAndId;

+ 3 - 3
app/src/main/java/com/uas/pda_smart_com/bean/WHBreakingBatchBreakingBtnClickEvent.java

@@ -38,15 +38,15 @@ public class WHBreakingBatchBreakingBtnClickEvent {
          * BAR_ID : 12
          */
 
-        private double BAR_REMAIN;
+        private String BAR_REMAIN;
         private String BAR_CODE;
         private int BAR_ID;
 
-        public double getBAR_REMAIN() {
+        public String getBAR_REMAIN() {
             return BAR_REMAIN;
         }
 
-        public void setBAR_REMAIN(double BAR_REMAIN) {
+        public void setBAR_REMAIN(String BAR_REMAIN) {
             this.BAR_REMAIN = BAR_REMAIN;
         }
 

+ 47 - 0
app/src/main/java/com/uas/pda_smart_com/bean/WHMakeMaterialProduct.java

@@ -9,7 +9,54 @@ public class WHMakeMaterialProduct {
     private String PR_DETAIL;
     private String PR_SPEC;
     private String BAR_LOCATION;
+    private String V_BA_REMAIN;
     private String BAR_WHCODE;
+    private String REMAIN;
+    private String MADEDATE;
+
+    private String PR_CODE;
+
+    private String QTY;
+
+    public String getQTY() {
+        return QTY;
+    }
+
+    public void setQTY(String QTY) {
+        this.QTY = QTY;
+    }
+
+    public String getV_BA_REMAIN() {
+        return V_BA_REMAIN;
+    }
+
+    public void setV_BA_REMAIN(String v_BA_REMAIN) {
+        V_BA_REMAIN = v_BA_REMAIN;
+    }
+
+    public String getPR_CODE() {
+        return PR_CODE;
+    }
+
+    public void setPR_CODE(String PR_CODE) {
+        this.PR_CODE = PR_CODE;
+    }
+
+    public String getREMAIN() {
+        return REMAIN;
+    }
+
+    public void setREMAIN(String REMAIN) {
+        this.REMAIN = REMAIN;
+    }
+
+    public String getMADEDATE() {
+        return MADEDATE;
+    }
+
+    public void setMADEDATE(String MADEDATE) {
+        this.MADEDATE = MADEDATE;
+    }
 
     public int getBAR_REMAIN() {
         return BAR_REMAIN;

+ 133 - 93
app/src/main/java/com/uas/pda_smart_com/fragment/BarcodeInCollectFragment.java

@@ -4,7 +4,9 @@ import android.content.Intent;
 import android.text.TextUtils;
 import android.view.KeyEvent;
 import android.view.View;
+import android.view.inputmethod.EditorInfo;
 import android.widget.Button;
+import android.widget.CheckBox;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
@@ -41,6 +43,7 @@ public class BarcodeInCollectFragment extends BaseFragment {
     private ImageView mScanImageView;
     private int mFocusId;
     private static final int SCAN_BARCODE_CODE = 101;
+    private CheckBox ck_isclear;
 
     @Override
     protected int getLayout() {
@@ -64,12 +67,39 @@ 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);
+        ck_isclear = root.findViewById(R.id.ck_isclear);
 
-        CommonUtil.editTextGetFocus(mBarcodeEditText);
+        CommonUtil.editTextGetFocus(mLocationEditText);
     }
 
     @Override
     protected void initEvents() {
+        mBarcodeEditText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                if (actionId == EditorInfo.IME_ACTION_DONE
+                        || actionId == EditorInfo.IME_ACTION_SEND
+                        || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
+                    getConfirmbarlocation();
+                    return true;
+                }
+                return false;
+            }
+        });
+
+        mLocationEditText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                if (actionId == EditorInfo.IME_ACTION_DONE
+                        || actionId == EditorInfo.IME_ACTION_SEND
+                        || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
+                    mBarcodeEditText.requestFocus();
+                    return true;
+                }
+                return false;
+            }
+        });
+
         mScanImageView.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
@@ -89,103 +119,113 @@ public class BarcodeInCollectFragment extends BaseFragment {
         mConfirmButton.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                String barcode = mBarcodeEditText.getText().toString();
-                String location = mLocationEditText.getText().toString();
-                if (TextUtils.isEmpty(barcode)) {
-                    CommonUtil.toastNoRepeat(mActivity, "请采集条码号");
-                    return;
-                }
-                if (TextUtils.isEmpty(location)) {
-                    CommonUtil.toastNoRepeat(mActivity, "请输入仓位");
-                    return;
-                }
-                progressDialog.show();
-                VolleyRequest.getInstance().stringRequest(mStringRequest,
-                        new HttpParams.Builder()
-                                .url(GloableParams.ADDRESS_INBARCODE_CONFIRMBARLOCATION)
-                                .method(Request.Method.POST)
-                                .addParam("barcode", barcode)
-                                .addParam("location", location)
-                                .tag(TAG + "CONFIRMBARLOCATION")
-                                .flag(1)
-                                .build(), new HttpCallback() {
-                            @Override
-                            public void onSuccess(int flag, Object o) throws Exception {
-                                mResultLayout.setVisibility(View.GONE);
-                                mBarcodeTextView.setText("");
-                                mInqtyTextView.setText("");
-                                mPrcodeTextView.setText("");
-                                mOrispeccodeTextView.setText("");
-                                mBatchcodeTextView.setText("");
-                                mLocationTextView.setText("");
-                                mPrdetailTextView.setText("");
-
-                                progressDialog.dismiss();
-                                try {
-                                    mBarcodeEditText.setText("");
-                                    mLocationEditText.setText("");
-                                    mBarcodeEditText.requestFocus();
-                                    String result = o.toString();
-                                    if (FastjsonUtil.validate(result)) {
-                                        JSONObject resultObject = JSON.parseObject(result);
-                                        JSONObject dataObject = resultObject.getJSONObject("data");
-                                        if (dataObject != null) {
-                                            boolean isOk = FastjsonUtil.getBoolean(dataObject, "isOk");
-                                            if (isOk) {
-                                                String barcode = FastjsonUtil.getText(dataObject, "barcode");
-                                                String location = FastjsonUtil.getText(dataObject, "location");
-                                                String pResult = FastjsonUtil.getText(dataObject, "pResult");
-                                                String bi_inqty = FastjsonUtil.getText(dataObject, "bi_inqty");
-                                                String pr_code = FastjsonUtil.getText(dataObject, "pr_code");
-                                                String pr_orispeccode = FastjsonUtil.getText(dataObject, "pr_orispeccode");
-                                                String bi_batchcode = FastjsonUtil.getText(dataObject, "bi_batchcode");
-                                                String pr_detail = FastjsonUtil.getText(dataObject, "pr_detail");
-
-                                                if (TextUtils.isEmpty(pResult)) {
-                                                    String resultMsg = "条码号:" +
-                                                            barcode + "绑定仓位:" + location + "成功";
-                                                    CommonUtil.toastNoRepeat(mActivity, resultMsg);
-
-                                                    mResultLayout.setVisibility(View.VISIBLE);
-                                                    mBarcodeTextView.setText(barcode);
-                                                    mInqtyTextView.setText(bi_inqty);
-                                                    mPrcodeTextView.setText(pr_code);
-                                                    mOrispeccodeTextView.setText(pr_orispeccode);
-                                                    mBatchcodeTextView.setText(bi_batchcode);
-                                                    mLocationTextView.setText(location);
-                                                    mPrdetailTextView.setText(pr_detail);
-                                                } else {
-                                                    String resultMsg = "条码号:" +
-                                                            barcode + "绑定仓位:" + location + "成功\n" + pResult;
-                                                    CommonUtil.toastNoRepeat(mActivity, resultMsg);
-
-                                                    mResultLayout.setVisibility(View.VISIBLE);
-                                                    mBarcodeTextView.setText(barcode);
-                                                    mInqtyTextView.setText(bi_inqty);
-                                                    mPrcodeTextView.setText(pr_code);
-                                                    mOrispeccodeTextView.setText(pr_orispeccode);
-                                                    mBatchcodeTextView.setText(bi_batchcode);
-                                                    mLocationTextView.setText(location);
-                                                    mPrdetailTextView.setText(pr_detail);
-                                                }
-                                            } else {
-                                                CommonUtil.toastNoRepeat(mActivity, "条码绑定失败");
-                                            }
+                getConfirmbarlocation();
+            }
+        });
+    }
+    private void getConfirmbarlocation(){
+        String barcode = mBarcodeEditText.getText().toString();
+        String location = mLocationEditText.getText().toString();
+        if (TextUtils.isEmpty(barcode)) {
+            CommonUtil.toastNoRepeat(mActivity, "请采集条码号");
+            return;
+        }
+        if (TextUtils.isEmpty(location)) {
+            CommonUtil.toastNoRepeat(mActivity, "请输入仓位");
+            return;
+        }
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_INBARCODE_CONFIRMBARLOCATION)
+                        .method(Request.Method.POST)
+                        .addParam("barcode", barcode)
+                        .addParam("location", location)
+                        .tag(TAG + "CONFIRMBARLOCATION")
+                        .flag(1)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        mResultLayout.setVisibility(View.GONE);
+                        mBarcodeTextView.setText("");
+                        mInqtyTextView.setText("");
+                        mPrcodeTextView.setText("");
+                        mOrispeccodeTextView.setText("");
+                        mBatchcodeTextView.setText("");
+                        mLocationTextView.setText("");
+                        mPrdetailTextView.setText("");
+
+                        progressDialog.dismiss();
+                        try {
+                            mBarcodeEditText.setText("");
+                            if (!ck_isclear.isChecked()){
+                                mLocationEditText.setText("");
+                                mLocationEditText.requestFocus();
+                            }else {
+                                mBarcodeEditText.requestFocus();
+                            }
+
+
+                            String result = o.toString();
+                            if (FastjsonUtil.validate(result)) {
+                                JSONObject resultObject = JSON.parseObject(result);
+                                JSONObject dataObject = resultObject.getJSONObject("data");
+                                if (dataObject != null) {
+                                    boolean isOk = FastjsonUtil.getBoolean(dataObject, "isOk");
+                                    if (isOk) {
+                                        String barcode = FastjsonUtil.getText(dataObject, "barcode");
+                                        String location = FastjsonUtil.getText(dataObject, "location");
+                                        String pResult = FastjsonUtil.getText(dataObject, "pResult");
+                                        String bi_inqty = FastjsonUtil.getText(dataObject, "bi_inqty");
+                                        String pr_code = FastjsonUtil.getText(dataObject, "pr_code");
+                                        String pr_orispeccode = FastjsonUtil.getText(dataObject, "pr_orispeccode");
+                                        String bi_batchcode = FastjsonUtil.getText(dataObject, "bi_batchcode");
+                                        String pr_detail = FastjsonUtil.getText(dataObject, "pr_detail");
+
+                                        if (TextUtils.isEmpty(pResult)) {
+                                            String resultMsg = "条码号:" +
+                                                    barcode + "绑定仓位:" + location + "成功";
+                                            CommonUtil.toastNoRepeat(mActivity, resultMsg);
+
+                                            mResultLayout.setVisibility(View.VISIBLE);
+                                            mBarcodeTextView.setText(barcode);
+                                            mInqtyTextView.setText(bi_inqty);
+                                            mPrcodeTextView.setText(pr_code);
+                                            mOrispeccodeTextView.setText(pr_orispeccode);
+                                            mBatchcodeTextView.setText(bi_batchcode);
+                                            mLocationTextView.setText(location);
+                                            mPrdetailTextView.setText(pr_detail);
+                                        } else {
+                                            String resultMsg = "条码号:" +
+                                                    barcode + "绑定仓位:" + location + "成功\n" + pResult;
+                                            CommonUtil.toastNoRepeat(mActivity, resultMsg);
+
+                                            mResultLayout.setVisibility(View.VISIBLE);
+                                            mBarcodeTextView.setText(barcode);
+                                            mInqtyTextView.setText(bi_inqty);
+                                            mPrcodeTextView.setText(pr_code);
+                                            mOrispeccodeTextView.setText(pr_orispeccode);
+                                            mBatchcodeTextView.setText(bi_batchcode);
+                                            mLocationTextView.setText(location);
+                                            mPrdetailTextView.setText(pr_detail);
                                         }
+                                    } else {
+                                        CommonUtil.toastNoRepeat(mActivity, "条码绑定失败");
                                     }
-                                } catch (Exception e) {
-
                                 }
                             }
+                            getConfirmbarlocation();
+                        } catch (Exception e) {
 
-                            @Override
-                            public void onFail(int flag, String failStr) throws Exception {
-                                progressDialog.dismiss();
-                                CommonUtil.toastNoRepeat(mActivity, failStr);
-                            }
-                        });
-            }
-        });
+                        }
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+                    }
+                });
     }
 
     @Override

+ 4 - 1
app/src/main/java/com/uas/pda_smart_com/fragment/BlueToothPrintFragment.java

@@ -52,6 +52,7 @@ public class BlueToothPrintFragment extends BaseFragment {
     private ImageView mRefreshImageView;
     private SwitchView mSwitchView;
     private TextView mDpiTextView;
+
     private RecyclerView mRecyclerView;
     private ConnectHelper connectHelper;
     private RotateAnimation mRotateAnimation;//动画
@@ -340,7 +341,9 @@ public class BlueToothPrintFragment extends BaseFragment {
         if (!ListUtils.isEmpty(models)) {
             for (int i = 0; i < models.size(); i++) {
                 BluetoothDevice bluetoothDevice = models.get(i);
-                if (bluetoothDevice != null && bluetoothDevice.getBluetoothClass().getDeviceClass() == ConnectHelper.PRINT_TYPE) {
+                if (bluetoothDevice != null
+//                        && bluetoothDevice.getBluetoothClass().getDeviceClass() == ConnectHelper.PRINT_TYPE
+                ) {
                     printDevices.add(bluetoothDevice);
                 }
             }

+ 174 - 61
app/src/main/java/com/uas/pda_smart_com/fragment/IOCOutMakeMaterial.java

@@ -42,6 +42,7 @@ import com.uas.pda_smart_com.R;
 import com.uas.pda_smart_com.application.PdaApplication;
 import com.uas.pda_smart_com.bean.IOCOutMakeMaterialFuzzySearch;
 import com.uas.pda_smart_com.bean.MaterialOutMessageBean;
+import com.uas.pda_smart_com.bean.OutboundOrderBean;
 import com.uas.pda_smart_com.bean.SubmitNotParam;
 import com.uas.pda_smart_com.database.DBManager;
 import com.uas.pda_smart_com.global.GloableParams;
@@ -51,10 +52,14 @@ import com.uas.pda_smart_com.tools.SharedPreUtil;
 import com.uas.pda_smart_com.tools.VolleyUtil;
 import com.uas.pda_smart_com.util.CommonUtil;
 import com.uas.pda_smart_com.util.Constants;
+import com.uas.pda_smart_com.util.FastjsonUtil;
+import com.uas.pda_smart_com.util.HttpCallback;
+import com.uas.pda_smart_com.util.HttpParams;
 import com.uas.pda_smart_com.util.JsonTools;
 import com.uas.pda_smart_com.util.JsonUtils;
 import com.uas.pda_smart_com.util.LogUtil;
 import com.uas.pda_smart_com.util.MyArrayAdapter;
+import com.uas.pda_smart_com.util.VollyRequest;
 import com.uas.pda_smart_com.view.ClearableEditText;
 
 import org.json.JSONArray;
@@ -69,7 +74,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
-import butterknife.Bind;
 import butterknife.ButterKnife;
 import butterknife.OnClick;
 
@@ -80,19 +84,6 @@ public class IOCOutMakeMaterial extends BaseFragment {
 
     private static String TAG = "IOCOutMakeMaterial";
 
-    @Bind(R.id.in_out_no)
-    AutoCompleteTextView inOutNo;
-    @Bind(R.id.clean_iv)
-    ImageView cleanIv;
-    @Bind(R.id.wh_code)
-    ClearableEditText whCode;
-    @Bind(R.id.submit_btn)
-    Button submitBtn;
-    @Bind(R.id.list_in_out)
-    ListView listInOut;
-    @Bind(R.id.iocout_material_multiple_tv)
-    TextView mMultipleTextView;
-
     private IOCOutMakeMaterialFuzzySearch fuzzySearchData;
     private MyArrayAdapter<String> autoStringAdapter;
     private StringRequest stringRequest, stringRequestPost;
@@ -108,6 +99,12 @@ public class IOCOutMakeMaterial extends BaseFragment {
 
     private int mClickPosition = -1;
     private InputMethodManager mInputMethodManager;
+    private AutoCompleteTextView inOutNo;
+    private ImageView cleanIv;
+    private ClearableEditText whCode;
+    private Button submitBtn;
+    private ListView listInOut;
+    private TextView mMultipleTextView;
 
     @Override
     protected int getLayout() {
@@ -119,6 +116,13 @@ public class IOCOutMakeMaterial extends BaseFragment {
         ButterKnife.bind(this, root);
         mDbManager = new DBManager(getActivity());
         ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText("出库单");
+        inOutNo = root.findViewById(R.id.in_out_no);
+
+        cleanIv = root.findViewById(R.id.clean_iv);
+        whCode = root.findViewById(R.id.wh_code);
+        submitBtn = root.findViewById(R.id.submit_btn);
+        listInOut = root.findViewById(R.id.list_in_out);
+        mMultipleTextView = root.findViewById(R.id.iocout_material_multiple_tv);
 
         //弹出软键盘
         mInputMethodManager = (InputMethodManager) root.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
@@ -132,23 +136,24 @@ public class IOCOutMakeMaterial extends BaseFragment {
         mProdOutType = SharedPreUtil.getString(getActivity().getApplicationContext(), Constants.FLAG.PRODOUT_TYPE_CACHE, "byBatch");
 
         dataList = (List<MaterialOutMessageBean.DataBean>) PdaApplication.getDataCacheFromMap(Constants.FLAG.MATERIAL_OUT_CACHE);
-        if (dataList == null || dataList.size() == 0) {
+        if (dataList == null) {
             dataList = new ArrayList<>();
-            adapterListView = new AdapterListView(getActivity(), R.layout.item_list_ioc_out_make_material, dataList);
-            listInOut.setAdapter(adapterListView);
-        } else {
-            adapterListView = new AdapterListView(getActivity(), R.layout.item_list_ioc_out_make_material, dataList);
-            listInOut.setAdapter(adapterListView);
-            if (CommonUtil.isNetWorkConnected(mActivity))
-                refreshMaterialStatus();
         }
-
+//        if (dataList == null || dataList.size() == 0) {
+//            dataList = new ArrayList<>();
+//            adapterListView = new AdapterListView(getActivity(), R.layout.item_list_ioc_out_make_material, dataList);
+//            listInOut.setAdapter(adapterListView);
+//        } else {
+//            adapterListView = new AdapterListView(getActivity(), R.layout.item_list_ioc_out_make_material, dataList);
+//            listInOut.setAdapter(adapterListView);
+//            if (CommonUtil.isNetWorkConnected(mActivity))
+//                refreshMaterialStatus();
+//        }
 
     }
 
     @Override
     protected void initEvents() {
-
         listInOut.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
             public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
@@ -169,38 +174,7 @@ public class IOCOutMakeMaterial extends BaseFragment {
         inOutNo.setOnItemClickListener(new AdapterView.OnItemClickListener() {
             @Override
             public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-                if (TextUtils.isEmpty(inOutNo.getText().toString().trim())) {
-                    CommonUtil.toastNoRepeat(getActivity(), "请输入出库单号");
-                } else if (CommonUtil.isStringContainsSpecialChar(inOutNo.getText().toString().trim())) {
-                    CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.barcode_cannot_contain_special));
-                } else if (CommonUtil.isStringContainsSpecialChar(whCode.getText().toString().trim())) {
-                    CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.whcode_cannot_contain_special));
-                } else {
-                    //判断单号和仓库组合是否已经存在于变量orders中
-                    boolean isExist = false;
-                    for (int i = 0; i < dataList.size(); i++) {
-                        if ((dataList.get(i).getPI_INOUTNO()).equals(inOutNo.getText().toString().trim()) && (dataList.get(i).getPD_WHCODE()).equals(whCode.getText().toString().trim())) {
-                            isExist = true;
-                            break;
-                        }
-                    }
-                    if (isExist) {
-                        Toast.makeText(getActivity(), "单号重复", Toast.LENGTH_SHORT).show();
-                        reset();
-                    } else {
-                        submitBtnClick();
-                    }
-                }
-            }
-        });
-
-        inOutNo.setOnEditorActionListener(new TextView.OnEditorActionListener() {
-            @Override
-            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
-                if (actionId == EditorInfo.IME_ACTION_SEND
-                        || actionId == EditorInfo.IME_ACTION_SEARCH
-                        || actionId == EditorInfo.IME_ACTION_DONE
-                        || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
+                try {
                     if (TextUtils.isEmpty(inOutNo.getText().toString().trim())) {
                         CommonUtil.toastNoRepeat(getActivity(), "请输入出库单号");
                     } else if (CommonUtil.isStringContainsSpecialChar(inOutNo.getText().toString().trim())) {
@@ -223,8 +197,53 @@ public class IOCOutMakeMaterial extends BaseFragment {
                             submitBtnClick();
                         }
                     }
+                }catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        });
 
-                    return true;
+        inOutNo.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                try {
+                    if (actionId == EditorInfo.IME_ACTION_SEND
+                            || actionId == EditorInfo.IME_ACTION_SEARCH
+                            || actionId == EditorInfo.IME_ACTION_DONE
+                            || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
+                        if (TextUtils.isEmpty(inOutNo.getText().toString().trim())) {
+                            CommonUtil.toastNoRepeat(getActivity(), "请输入出库单号");
+                        } else if (CommonUtil.isStringContainsSpecialChar(inOutNo.getText().toString().trim())) {
+                            CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.barcode_cannot_contain_special));
+                        } else if (CommonUtil.isStringContainsSpecialChar(whCode.getText().toString().trim())) {
+                            CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.whcode_cannot_contain_special));
+                        } else {
+                            //判断单号和仓库组合是否已经存在于变量orders中
+                            boolean isExist = false;
+
+                            for (int i = 0; i < dataList.size(); i++) {
+                                try {
+                                    if ((dataList.get(i).getPI_INOUTNO()).equals(inOutNo.getText().toString().trim())
+                                            && (dataList.get(i).getPD_WHCODE()).equals(whCode.getText().toString().trim())) {
+                                        isExist = true;
+                                        break;
+                                    }
+                                }catch (Exception e) {
+                                    isExist = false;
+                                }
+                            }
+                            if (isExist) {
+                                Toast.makeText(getActivity(), "单号重复", Toast.LENGTH_SHORT).show();
+                                reset();
+                            } else {
+                                submitBtnClick();
+                            }
+                        }
+
+                        return true;
+                    }
+                }catch (Exception e) {
+                    e.printStackTrace();
                 }
                 return false;
             }
@@ -265,7 +284,97 @@ public class IOCOutMakeMaterial extends BaseFragment {
 
     @Override
     protected void initDatas() {
+        getlistData();
+    }
 
+    private void getlistData() {
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_GET_OUT_PRODIO_LIST)
+                        .method(Request.Method.GET)
+                        .tag(TAG + "getlistData")
+                        .flag(0)
+//                        .addParam("sc_code", sc_code)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        progressDialog.dismiss();
+                        try {
+                            Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
+                            if (isSuccess){
+                                com.alibaba.fastjson.JSONArray dataArray = FastjsonUtil.getJSONArray(o.toString(),"data");
+//                                if (dataArray == null || dataArray.size() == 0 && dataList.size() <= 0){
+//                                    CommonUtil.toastNoRepeat(mActivity,"未搜索到匹配数据");
+//                                    return;
+//                                }
+                                List<OutboundOrderBean> outboundOrderBeans = new ArrayList<>();
+                                for (int i = 0; i < dataArray.size(); i++) {
+                                    com.alibaba.fastjson.JSONObject jsonObject = dataArray.getJSONObject(i);
+                                    OutboundOrderBean workOrderListBean = new OutboundOrderBean();
+                                    workOrderListBean.setPI_ID(jsonObject.getLongValue("PI_ID")==-1?-1:jsonObject.getLongValue("PI_ID"));
+                                    workOrderListBean.setPI_CLASS(jsonObject.getString("PI_CLASS")==null?"":jsonObject.getString("PI_CLASS"));
+                                    workOrderListBean.setPD_WHCODE(jsonObject.getString("PD_WHCODE")==null?"":jsonObject.getString("PD_WHCODE"));
+                                    workOrderListBean.setPI_INOUTNO(jsonObject.getString("PI_INOUTNO")==null?"":jsonObject.getString("PI_INOUTNO"));
+                                    workOrderListBean.setPI_PDASTATUS(jsonObject.getString("PI_PDASTATUS")==null?"":jsonObject.getString("PI_PDASTATUS"));
+                                    outboundOrderBeans.add(workOrderListBean);
+                                }
+
+                                dataList = (List<MaterialOutMessageBean.DataBean>) PdaApplication.getDataCacheFromMap(Constants.FLAG.MATERIAL_OUT_CACHE);
+                                if (dataList == null) {
+                                    dataList = new ArrayList<>();
+                                }
+                                for (int i = 0; i < outboundOrderBeans.size(); i++) {
+                                    OutboundOrderBean outboundOrderBean = outboundOrderBeans.get(i);
+                                    MaterialOutMessageBean.DataBean dataBean = new MaterialOutMessageBean.DataBean();
+                                    dataBean.setPI_ID(outboundOrderBean.getPI_ID());
+                                    dataBean.setPI_CLASS(outboundOrderBean.getPI_CLASS());
+                                    dataBean.setPD_WHCODE(outboundOrderBean.getPD_WHCODE());
+                                    dataBean.setPI_INOUTNO(outboundOrderBean.getPI_INOUTNO());
+                                    dataBean.setPI_PDASTATUS(outboundOrderBean.getPI_PDASTATUS());
+                                    dataList.add(dataBean);
+                                }
+                                if (dataList.size() <= 0) {
+                                    dataList = new ArrayList<>();
+                                    adapterListView = new AdapterListView(getActivity(), R.layout.item_list_ioc_out_make_material, dataList);
+                                    listInOut.setAdapter(adapterListView);
+                                } else {
+                                    //清除pi_id的项
+                                    dataList = removeDuplicate1(dataList);
+
+                                    adapterListView = new AdapterListView(getActivity(), R.layout.item_list_ioc_out_make_material, dataList);
+                                    listInOut.setAdapter(adapterListView);
+                                    if (CommonUtil.isNetWorkConnected(mActivity)) {
+                                        refreshMaterialStatus();
+                                    }
+                                }
+                            }
+                        }catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+                    }
+
+                });
+    }
+
+    /**
+     * 使用for循环删除list中的PI_ID重复的元素
+     */
+    public List<MaterialOutMessageBean.DataBean> removeDuplicate1(List<MaterialOutMessageBean.DataBean>  list) {
+        for (int i = 0; i < list.size() - 1; i++) {
+            for (int j = list.size() - 1; j > i; j--) {
+                if (list.get(j).getPI_ID() == list.get(i).getPI_ID()) {
+                    list.remove(j);
+                }
+            }
+        }
+        return list;
     }
 
     @Override
@@ -319,13 +428,17 @@ public class IOCOutMakeMaterial extends BaseFragment {
                     }
                     adapterListView.notifyDataSetChanged();
                 } catch (Exception e) {
-
+                    e.printStackTrace();
                 }
             }
         }, new Response.ErrorListener() {
             @Override
             public void onErrorResponse(VolleyError error) {
-
+                try {
+                    CommonUtil.toastNoRepeat(mActivity, error.getMessage());
+                }catch (Exception e) {
+                    e.printStackTrace();
+                }
             }
         }) {
             @Override
@@ -462,7 +575,7 @@ public class IOCOutMakeMaterial extends BaseFragment {
     public void onClick(View view) {
         switch (view.getId()) {
             case R.id.clean_iv:
-                inOutNo.getText().clear();
+                inOutNo.setText("");
                 break;
             case R.id.submit_btn:
                 if (TextUtils.isEmpty(inOutNo.getText().toString().trim())) {
@@ -575,7 +688,7 @@ public class IOCOutMakeMaterial extends BaseFragment {
                         }
                     }
                 } catch (Exception e) {
-
+                    e.printStackTrace();
                 }
 
             }

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 503 - 145
app/src/main/java/com/uas/pda_smart_com/fragment/IOCOutMakeMaterialOper.java


+ 2 - 0
app/src/main/java/com/uas/pda_smart_com/fragment/IndexSettingFragment.java

@@ -616,6 +616,8 @@ public class IndexSettingFragment extends BaseFragment implements View.OnClickLi
         progressDialog.show();
         //传递Handler
         VolleyUtil.setVolleyHandler(loginHandler);
+        SharedPreUtil.saveString(getActivity(),"userNames",mUserName);
+        SharedPreUtil.saveString(getActivity(),"passwords",mPassword);
         //Volley请求服务器
         VolleyUtil.requestUserLogin(getActivity(),
                 loginDataBean.getHttp() + "://" + loginDataBean.getIp() + ":"

+ 10 - 0
app/src/main/java/com/uas/pda_smart_com/fragment/IndexWareHouseContentFragment.java

@@ -139,6 +139,16 @@ public class IndexWareHouseContentFragment extends BaseFragment implements Adapt
                     getFragmentManager().beginTransaction().addToBackStack(null)
                             .replace(R.id.container_function_fragment, fragment).commit();
                     break;
+                case GloableParams.MENU_STORAGE_STOCK_INFO_COLLECT:
+                    fragment = new InventoryBindingFragment();
+                    getFragmentManager().beginTransaction().addToBackStack(null)
+                            .replace(R.id.container_function_fragment, fragment).commit();
+                    break;
+                case GloableParams.MENU_STORAGE_BARCODE_FREEZE:
+                    fragment = new InventoryBarcodeFreeze();
+                    getFragmentManager().beginTransaction().addToBackStack(null)
+                            .replace(R.id.container_function_fragment, fragment).commit();
+                    break;
             }
         }
     }

+ 370 - 91
app/src/main/java/com/uas/pda_smart_com/fragment/InventoryCollectFragment.java

@@ -1,16 +1,19 @@
 package com.uas.pda_smart_com.fragment;
 
 import android.app.Activity;
+import android.content.DialogInterface;
 import android.content.Intent;
 import android.graphics.drawable.BitmapDrawable;
 import android.os.Bundle;
 import android.support.v4.app.Fragment;
+import android.support.v7.app.AlertDialog;
 import android.text.TextUtils;
 import android.view.KeyEvent;
 import android.view.View;
 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.PopupWindow;
@@ -19,8 +22,13 @@ import android.widget.TextView;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.android.volley.Request;
+import com.bin.david.form.core.SmartTable;
+import com.bin.david.form.data.column.Column;
+import com.bin.david.form.data.format.IFormat;
+import com.bin.david.form.data.table.TableData;
 import com.uas.pda_smart_com.R;
 import com.uas.pda_smart_com.activity.FunctionActivity;
+import com.uas.pda_smart_com.bean.InventoryCollctBean;
 import com.uas.pda_smart_com.global.GloableParams;
 import com.uas.pda_smart_com.listener.MyEditorActionListener;
 import com.uas.pda_smart_com.util.CameraUtil;
@@ -29,25 +37,40 @@ import com.uas.pda_smart_com.util.FastjsonUtil;
 import com.uas.pda_smart_com.util.FragmentUtils;
 import com.uas.pda_smart_com.util.HttpCallback;
 import com.uas.pda_smart_com.util.HttpParams;
+import com.uas.pda_smart_com.util.StringUtil;
 import com.uas.pda_smart_com.util.VolleyRequest;
 import com.uas.pda_smart_com.view.ClearableEditText;
 import com.uuzuche.lib_zxing.activity.CaptureActivity;
 import com.uuzuche.lib_zxing.activity.CodeUtils;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * Created by RaoMeng on 2019/3/23
  * Desc: 盘点采集页面
  */
 public class InventoryCollectFragment extends BaseFragment implements View.OnClickListener {
     private static final int SCAN_BARCODE_CODE = 101;
-    private ClearableEditText mTagEditText, mBarcodeEditText;
+    private ClearableEditText mTagEditText, mBarcodeEditText,cet_liaohao,cet_chuweibianhao;
     private ImageView mScanImageView;
-    private TextView mResultTextView, mNumTextView, mClassTextView;
+    private TextView mResultTextView, mNumTextView, mClassTextView, tvPiInoutno;
     private Button mMoreButton;
     private PopupWindow mMenuPopupWindow;
     private String pi_inoutno, pi_id, pi_class;
     private CheckBox cb_caiji;
-    private boolean isChecked=false;
+    private boolean isChecked = false;
+
+    private SmartTable mSmartTable;
+    private Column<String> ST_WHCODE, STD_PRODCODE, PR_DETAIL, BAR_LOCATION, PR_SPEC;
+    private Column<Double> STD_BATCHQTY, STD_ACTQTY;
+    private Column<Long> mPosColumn;
+    private TableData<InventoryCollctBean> mTableData;
+    private List<InventoryCollctBean> mStockTaskMultipleBeans;
+    private CheckBox mCheckBox;
+    private String bar_remain;
+    private AlertDialog alertDialog;
+    private TextView tv_chaxun;
 
     @Override
     protected int getLayout() {
@@ -66,9 +89,37 @@ public class InventoryCollectFragment extends BaseFragment implements View.OnCli
         mResultTextView = root.findViewById(R.id.inventory_collect_result_tv);
         mNumTextView = root.findViewById(R.id.inventory_collect_num_tv);
         mClassTextView = root.findViewById(R.id.inventory_collect_class_tv);
-        cb_caiji=root.findViewById(R.id.cb_caiji);
+        cb_caiji = root.findViewById(R.id.cb_caiji);
+        tvPiInoutno = mActivity.findViewById(R.id.tv_pi_inoutno);
+        cet_liaohao = mActivity.findViewById(R.id.cet_liaohao);
+        cet_chuweibianhao = mActivity.findViewById(R.id.cet_chuweibianhao);
+        tv_chaxun = mActivity.findViewById(R.id.tv_chaxun);
 
         mBarcodeEditText.requestFocus();
+
+        mCheckBox = root.findViewById(R.id.stock_data_summary_cb);
+        mSmartTable = root.findViewById(R.id.st_data);
+        CommonUtil.getDefaultTable(mActivity, mSmartTable);
+        mPosColumn = new Column<Long>("序号", "POS");
+        mPosColumn.setFixed(true);
+        ST_WHCODE = new Column<String>("仓库", "ST_WHCODE");
+        STD_PRODCODE = new Column<String>("料号", "STD_PRODCODE");
+        PR_DETAIL = new Column<String>("名称", "PR_DETAIL");
+        BAR_LOCATION = new Column<String>("储位", "BAR_LOCATION");
+        STD_BATCHQTY = new Column<Double>("账面库存", "STD_BATCHQTY", new IFormat<Double>() {
+            @Override
+            public String format(Double aDouble) {
+                return CommonUtil.doubleFormat(aDouble);
+            }
+        });
+        STD_ACTQTY = new Column<Double>("实盘库存", "STD_ACTQTY", new IFormat<Double>() {
+            @Override
+            public String format(Double aDouble) {
+                return CommonUtil.doubleFormat(aDouble);
+            }
+        });
+        PR_SPEC = new Column<String>("规格", "PR_SPEC");
+
     }
 
     @Override
@@ -78,101 +129,252 @@ public class InventoryCollectFragment extends BaseFragment implements View.OnCli
         cb_caiji.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
             @Override
             public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
-                InventoryCollectFragment.this.isChecked=isChecked;
+                InventoryCollectFragment.this.isChecked = isChecked;
             }
         });
-//        mTagEditText.setOnFocusChangeListener(new View.OnFocusChangeListen) {
-//            @Override
-//            public void onFocusChange(View v, boolean hasFocus) {
-//                if (!hasFocus) {
-//                    String tag = mTagEditText.getText().toString().trim();
-//                    SharedPreUtil.saveString(mActivity, Constants.FLAG.INVENTORY_DC_TIME_CACHE, tag);
-//                }
-//            }
-//        });
-//
-//        CommonUtil.setEditorActionListener(mTagEditText, new MyEditorActionListener() {
-//            @Override
-//            public void MyEditorAction(String text, int actionId, KeyEvent event) {
-//                SharedPreUtil.saveString(mActivity, Constants.FLAG.INVENTORY_DC_TIME_CACHE, text);
-//            }
-//        });
+        //        mTagEditText.setOnFocusChangeListener(new View.OnFocusChangeListen) {
+        //            @Override
+        //            public void onFocusChange(View v, boolean hasFocus) {
+        //                if (!hasFocus) {
+        //                    String tag = mTagEditText.getText().toString().trim();
+        //                    SharedPreUtil.saveString(mActivity, Constants.FLAG.INVENTORY_DC_TIME_CACHE, tag);
+        //                }
+        //            }
+        //        });
+        //
+        //        CommonUtil.setEditorActionListener(mTagEditText, new MyEditorActionListener() {
+        //            @Override
+        //            public void MyEditorAction(String text, int actionId, KeyEvent event) {
+        //                SharedPreUtil.saveString(mActivity, Constants.FLAG.INVENTORY_DC_TIME_CACHE, text);
+        //            }
+        //        });
 
         CommonUtil.setEditorActionListener(mBarcodeEditText, new MyEditorActionListener() {
             @Override
             public void MyEditorAction(String text, int actionId, KeyEvent event) {
-//                String deadLine = mTagEditText.getText().toString().trim();
-                String barcode = mBarcodeEditText.getText().toString().trim();
+                getBarcodedata();
+            }
+        });
 
-//                if (TextUtils.isEmpty(deadLine)) {
-//                    CommonUtil.toastNoRepeat(mActivity, "请输入临界校验日期");
-//                    return;
-//                }
+        mCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+                getDataList();
+            }
+        });
 
-                if (TextUtils.isEmpty(barcode)) {
-                    CommonUtil.toastNoRepeat(mActivity, "请采集条码");
-                    return;
-                }
+        tv_chaxun.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                getDataList();
+            }
+        });
+    }
 
-                progressDialog.show();
-
-                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+"")
-                        .build(), new HttpCallback() {
-                    @Override
-                    public void onSuccess(int flag, Object o) throws Exception {
-                        progressDialog.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")
-                                );
+    private void getBarcodedata() {
+        String barcode = mBarcodeEditText.getText().toString().trim();
+        if (TextUtils.isEmpty(barcode)) {
+            CommonUtil.toastNoRepeat(mActivity, "请采集条码");
+            return;
+        }
+        progressDialog.show();
+        if (isChecked) {
+            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("prodcode", cet_liaohao.getText().toString().trim())
+                    .addParam("location", cet_chuweibianhao.getText().toString().trim())
+                    .build(), new HttpCallback() {
+                @Override
+                public void onSuccess(int flag, Object o) throws Exception {
+                    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 = "采集成功!已超期";
                             }
-                        } catch (Exception e) {
-                            e.printStackTrace();
+                            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 {
+                @Override
+                public void onFail(int flag, String failStr) throws Exception {
+                    mBarcodeEditText.setText("");
+                    progressDialog.dismiss();
+                    CommonUtil.toastNoRepeat(mActivity, failStr);
+                    mResultTextView.setVisibility(View.VISIBLE);
+                    mResultTextView.setText(failStr);
+                }
+            });
+        } else {
+            VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                    .url(GloableParams.ADDRESS_GET_BARCODE_DATA)
+                    .method(Request.Method.GET)
+                    .tag(TAG + "getbarcodeinfo")
+                    .flag(0)
+                    .addParam("barcode", barcode)
+                    .addParam("code", pi_inoutno)
+                    .build(), new HttpCallback() {
+                @Override
+                public void onSuccess(int flag, Object o) throws Exception {
+                    progressDialog.dismiss();
+                    bar_remain = "";
+                    try {
                         mBarcodeEditText.setText("");
-                        progressDialog.dismiss();
-                        CommonUtil.toastNoRepeat(mActivity, failStr);
-                        mResultTextView.setVisibility(View.VISIBLE);
-                        mResultTextView.setText(failStr);
+                        String result = o.toString();
+                        JSONObject resultObject = JSON.parseObject(result);
+                        JSONObject dataObject = resultObject.getJSONObject("data");
+                        if (dataObject != null) {
+                            bar_remain = FastjsonUtil.getText(dataObject, "BAR_REMAIN");
+                        }
+
+                        View dialogView = View.inflate(getActivity(), R.layout.dialog_confirm_quantity, null);
+                        final EditText modifyEditText = dialogView.findViewById(R.id.recharge_modify_et);
+
+                        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);
+
+                        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"));
+                        modifyEditText.setText(bar_remain);
+                        modifyEditText.setSelection(modifyEditText.getText().length());
+
+                        alertDialog = new AlertDialog.Builder(getActivity())
+                                .setTitle("确认数量")
+                                .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())
+                                                .addParam("prodcode", cet_liaohao.getText().toString().trim())
+                                                .addParam("location", cet_chuweibianhao.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);
+                                            }
+                                        });
+                                    }
+                                })
+                                .setView(dialogView)
+                                .create();
+
+
+                        // 禁用屏幕外点击
+                        alertDialog.setCancelable(false);
+                        alertDialog.setCanceledOnTouchOutside(false);
+                        alertDialog.show();
+                    } catch (Exception e) {
+                        e.printStackTrace();
                     }
-                });
-            }
-        });
+                }
+
+                @Override
+                public void onFail(int flag, String failStr) throws Exception {
+                    mBarcodeEditText.setText("");
+                    progressDialog.dismiss();
+                    CommonUtil.toastNoRepeat(mActivity, failStr);
+                    mResultTextView.setVisibility(View.VISIBLE);
+                    mResultTextView.setText(failStr);
+                }
+            });
+
+        }
     }
 
     @Override
@@ -187,13 +389,87 @@ public class InventoryCollectFragment extends BaseFragment implements View.OnCli
             mClassTextView.setText(pi_class);
         }
 
-//        String deadLine = SharedPreUtil.getString(mActivity, Constants.FLAG.INVENTORY_DC_TIME_CACHE, "");
-//        if (!TextUtils.isEmpty(deadLine)) {
-//            mTagEditText.setText(deadLine);
-//            mBarcodeEditText.requestFocus();
-//        } else {
-//            mTagEditText.requestFocus();
-//        }
+        //        String deadLine = SharedPreUtil.getString(mActivity, Constants.FLAG.INVENTORY_DC_TIME_CACHE, "");
+        //        if (!TextUtils.isEmpty(deadLine)) {
+        //            mTagEditText.setText(deadLine);
+        //            mBarcodeEditText.requestFocus();
+        //        } else {
+        //            mTagEditText.requestFocus();
+        //        }
+
+        if (pi_inoutno != null) {
+            tvPiInoutno.setText(pi_inoutno);
+        }
+
+        mStockTaskMultipleBeans = new ArrayList<>();
+        setTableData(mStockTaskMultipleBeans);
+        getDataList();
+    }
+
+    private void getDataList() {
+        progressDialog.show();
+        mStockTaskMultipleBeans.clear();
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_GET_PRE_MATERIAL_LIST)
+                .method(Request.Method.POST)
+                .addParam("code", pi_id)
+                .addParam("showall", mCheckBox.isChecked() ? "-1" : "0")
+                .addParam("prodcode", cet_liaohao.getText().toString().trim())
+                .addParam("location", cet_chuweibianhao.getText().toString().trim())
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                try {
+                    String result = o.toString();
+                    com.alibaba.fastjson.JSONObject resultObject = JSON.parseObject(result);
+                    com.alibaba.fastjson.JSONArray dataArray = resultObject.getJSONArray("data");
+                    if (dataArray != null && dataArray.size() > 0) {
+                        for (int i = 0; i < dataArray.size(); i++) {
+                            com.alibaba.fastjson.JSONObject dataObject = dataArray.getJSONObject(i);
+                            if (dataObject != null) {
+                                //物料编号pr_code,物料名称pr_detail,出库数量pd_outqty,已采集数量pd_pdaqty,'
+                                //	仓库pd_whcode,仓位V_PW_WHCODE,实物库存V_PW_ONHAND,
+                                //	条码库存V_BA_REMAIN,型号PR_ORISPECCODE
+                                InventoryCollctBean inventoryCollctBean = new InventoryCollctBean();
+                                inventoryCollctBean.setST_WHCODE(FastjsonUtil.getText(dataObject, "ST_WHCODE"));
+                                inventoryCollctBean.setSTD_PRODCODE(FastjsonUtil.getText(dataObject, "STD_PRODCODE"));
+                                inventoryCollctBean.setPR_DETAIL(FastjsonUtil.getText(dataObject, "PR_DETAIL"));
+                                inventoryCollctBean.setBAR_LOCATION(FastjsonUtil.getText(dataObject, "BAR_LOCATION"));
+                                inventoryCollctBean.setSTD_BATCHQTY(FastjsonUtil.getDouble(dataObject, "STD_BATCHQTY"));
+                                inventoryCollctBean.setSTD_ACTQTY(FastjsonUtil.getDouble(dataObject, "STD_ACTQTY"));
+                                inventoryCollctBean.setPR_SPEC(FastjsonUtil.getText(dataObject, "PR_SPEC"));
+                                inventoryCollctBean.setPOS(i + 1);
+                                mStockTaskMultipleBeans.add(inventoryCollctBean);
+                            }
+                        }
+                    }
+                    setTableData(mStockTaskMultipleBeans);
+                } catch (Exception e) {
+                    setTableData(mStockTaskMultipleBeans);
+                    e.printStackTrace();
+                }
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                setTableData(mStockTaskMultipleBeans);
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+            }
+        });
+    }
+
+    private void setTableData(List<InventoryCollctBean> filterTableData) {
+        mTableData = new TableData<InventoryCollctBean>("出库单列表", filterTableData,mPosColumn,
+                ST_WHCODE, STD_PRODCODE, PR_DETAIL, BAR_LOCATION, STD_BATCHQTY, STD_ACTQTY, PR_SPEC);
+        mSmartTable.setTableData(mTableData);
+        mSmartTable.postDelayed(new Runnable() {
+            @Override
+            public void run() {
+                mSmartTable.postInvalidate();
+            }
+        }, 100);
     }
 
     @Override
@@ -289,6 +565,9 @@ public class InventoryCollectFragment extends BaseFragment implements View.OnCli
                 String result = data.getExtras().getString(CodeUtils.RESULT_STRING);
                 mBarcodeEditText.setText(result);
                 mBarcodeEditText.setSelection(result.length());
+                if (result.length() > 13){
+                    getBarcodedata();
+                }
             }
         }
     }

+ 2 - 0
app/src/main/java/com/uas/pda_smart_com/fragment/LoginFragment.java

@@ -324,6 +324,8 @@ public class LoginFragment extends BaseFragment implements AdapterView.OnItemSel
     private void connect() {
         //传递Handler
         VolleyUtil.setVolleyHandler(loginHandler);
+        SharedPreUtil.saveString(getActivity(),"userNames",userName);
+        SharedPreUtil.saveString(getActivity(),"passwords",password);
         //Volley请求服务器
         VolleyUtil.requestUserLogin(getActivity(), GloableParams.ADDRESS_LOGIN_APPLY, VolleyUtil.METHOD_POST,
                 pageType, maName, userName, password);

+ 215 - 0
app/src/main/java/com/uas/pda_smart_com/fragment/ModifyBarcodeQuantityFragment.java

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

+ 0 - 1
app/src/main/java/com/uas/pda_smart_com/fragment/ModifyQuantityOutFragment.java

@@ -132,7 +132,6 @@ public class ModifyQuantityOutFragment extends BaseFragment {
         mConfirmButton.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-
                 modifyQuantity();
             }
         });

+ 2 - 2
app/src/main/java/com/uas/pda_smart_com/fragment/SpecialMaterialOutFragment.java

@@ -659,7 +659,7 @@ public class SpecialMaterialOutFragment extends BaseFragment {
                     WHBreakingBatchBreakingBtnClickEvent.DataBean dataBean = new WHBreakingBatchBreakingBtnClickEvent.DataBean();
 
                     dataBean.setBAR_CODE(JsonUtils.optStringNotNull(barcodeObject, "BAR_CODE"));
-                    dataBean.setBAR_REMAIN(JsonUtils.optDoubleNotNull(barcodeObject, "BAR_REMAIN"));
+                    dataBean.setBAR_REMAIN(JsonUtils.optStringNotNull(barcodeObject, "BAR_REMAIN"));
 
                     messages.add(dataBean);
                 }
@@ -903,7 +903,7 @@ public class SpecialMaterialOutFragment extends BaseFragment {
             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(person.getBAR_CODE());
-            tv_bar_remain.setText(CommonUtil.doubleFormat(person.getBAR_REMAIN()));
+            tv_bar_remain.setText(person.getBAR_REMAIN());
             return convertView;
         }
     }

+ 41 - 1
app/src/main/java/com/uas/pda_smart_com/fragment/StockDataSummaryFragment.java

@@ -1,7 +1,11 @@
 package com.uas.pda_smart_com.fragment;
 
+import android.os.Build;
 import android.os.Bundle;
+import android.support.annotation.RequiresApi;
+import android.view.Gravity;
 import android.view.KeyEvent;
+import android.view.View;
 import android.widget.CheckBox;
 import android.widget.CompoundButton;
 import android.widget.TextView;
@@ -14,14 +18,18 @@ import com.bin.david.form.core.SmartTable;
 import com.bin.david.form.data.column.Column;
 import com.bin.david.form.data.format.IFormat;
 import com.bin.david.form.data.table.TableData;
+import com.bin.david.form.listener.OnColumnItemClickListener;
 import com.uas.pda_smart_com.R;
 import com.uas.pda_smart_com.bean.StockTaskMultipleBean;
 import com.uas.pda_smart_com.global.GloableParams;
+import com.uas.pda_smart_com.tools.SharedPreUtil;
 import com.uas.pda_smart_com.util.CommonUtil;
 import com.uas.pda_smart_com.util.FastjsonUtil;
 import com.uas.pda_smart_com.util.HttpCallback;
 import com.uas.pda_smart_com.util.HttpParams;
+import com.uas.pda_smart_com.util.StringUtil;
 import com.uas.pda_smart_com.util.VolleyRequest;
+import com.uas.pda_smart_com.view.TakePhotoPopWin;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -30,7 +38,7 @@ import java.util.List;
  * Created by RaoMeng on 2021/4/22
  * Desc: 备料数据汇总
  */
-public class StockDataSummaryFragment extends BaseFragment {
+public class StockDataSummaryFragment extends BaseFragment implements OnColumnItemClickListener<String> {
     private SmartTable mSmartTable;
     private Column<String> mProdcodeColumn, mOutqtyColumn,mTypeColumn;
     private Column<Double> mPdaqtyColumn, mDetailColumn;
@@ -79,6 +87,7 @@ public class StockDataSummaryFragment extends BaseFragment {
 
     @Override
     protected void initEvents() {
+        mProdcodeColumn.setOnColumnItemClickListener(this::onClick);
         mCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
             @Override
             public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
@@ -166,4 +175,35 @@ public class StockDataSummaryFragment extends BaseFragment {
     public boolean onFragmentBackPressed() {
         return false;
     }
+
+    @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
+    @Override
+    public void onClick(Column<String> column, String s, String s2, int position) {
+        String pd_prodcode = mStockTaskMultipleBeans.get(position).getPD_PRODCODE();
+//        CommonUtil.toastNoRepeat(getContext(),pd_prodcode+"");
+        if (StringUtil.isEmpty(pd_prodcode)){
+            CommonUtil.toastNoRepeat(getContext(),"物料编号为空");
+            SharedPreUtil.saveString(getContext(),"pd_prodcode_pop","null");
+            return;
+        }
+
+        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);
+
+    }
+    private View.OnClickListener onClickListener = new View.OnClickListener() {
+        @Override
+        public void onClick(View v) {
+            switch (v.getId()) {
+//                case R.id.btn_take_photo:
+//                    System.out.println("btn_take_photo");
+//                    break;
+//                case R.id.btn_pick_photo:
+//                    System.out.println("btn_pick_photo");
+//                    break;
+            }
+        }
+    };
 }

+ 11 - 1
app/src/main/java/com/uas/pda_smart_com/fragment/StorageInFragment.java

@@ -72,7 +72,9 @@ public class StorageInFragment extends BaseFragment implements View.OnClickListe
                         break;
                     case GloableParams.MENU_STORAGE_IQC_STORAGE_IN:
                         //IQC入库
-                        mFragment = new StorageIQCInFragment();
+//                        mFragment = new StorageIQCInFragment();
+                        mFragment = new StorageTwoIQCInFragment();
+
                         break;
                     case GloableParams.MENU_STORAGE_MATERIAL_STORAGE_IN:
                         //单据入库
@@ -98,6 +100,14 @@ public class StorageInFragment extends BaseFragment implements View.OnClickListe
                         //条码信息采集
                         mFragment = new BarcodeInfoCollectFragment();
                         break;
+                    case GloableParams.MENU_STORAGE_BARCODECJI_IN:
+                        //入库采集
+                        mFragment = new JltStorageInFilterListFragment();
+                        break;
+                    case GloableParams.MENU_STORAGE_INVENTORY_DETAILS_QUERY:
+                        //入库明细查询
+                        mFragment = new InventoryDetailsQueryFragment();
+                        break;
                     default:
                         break;
                 }

+ 15 - 2
app/src/main/java/com/uas/pda_smart_com/fragment/StorageRechargeFragment.java

@@ -30,6 +30,7 @@ import com.uas.pda_smart_com.activity.FunctionActivity;
 import com.uas.pda_smart_com.adapter.StorageRechargeAdapter;
 import com.uas.pda_smart_com.bean.StorageRechargeListBean;
 import com.uas.pda_smart_com.global.GloableParams;
+import com.uas.pda_smart_com.interfaces.OnQuantityModifyListener;
 import com.uas.pda_smart_com.util.CameraUtil;
 import com.uas.pda_smart_com.util.CommonUtil;
 import com.uas.pda_smart_com.util.Constants;
@@ -37,6 +38,7 @@ import com.uas.pda_smart_com.util.FastjsonUtil;
 import com.uas.pda_smart_com.util.FragmentUtils;
 import com.uas.pda_smart_com.util.HttpCallback;
 import com.uas.pda_smart_com.util.HttpParams;
+import com.uas.pda_smart_com.util.StringUtil;
 import com.uas.pda_smart_com.util.VolleyRequest;
 import com.uas.pda_smart_com.view.ClearableEditText;
 import com.uuzuche.lib_zxing.activity.CaptureActivity;
@@ -182,12 +184,21 @@ public class StorageRechargeFragment extends BaseFragment implements View.OnClic
             }
         });
 
-        mStorageRechargeAdapter.setOnQuantityModifyListener(new StorageRechargeAdapter.OnQuantityModifyListener() {
+        mStorageRechargeAdapter.setOnQuantityModifyListener(new OnQuantityModifyListener() {
             @Override
-            public void onQuantityModify(final DialogInterface dialogInterface, String text, final int position) {
+            public void onQuantityModify(final DialogInterface dialogInterface, String text, final int position,String remarkQTY) {
+                if (StringUtil.isEmpty(text)){
+                    CommonUtil.toastNoRepeat(mActivity, "请输入送货数量");
+                    return;
+                }
+                if (StringUtil.isEmpty(remarkQTY)){
+                    CommonUtil.toastNoRepeat(mActivity, "请输入备品数量");
+                }
                 double quantity = -1;
+                double remarkqty = -1;
                 try {
                     quantity = Double.parseDouble(text);
+                    remarkqty = Double.parseDouble(remarkQTY);
                 } catch (Exception e) {
                     CommonUtil.toastNoRepeat(mActivity, "请输入正确的数字");
 //                    dialogInterface.dismiss();
@@ -210,6 +221,7 @@ public class StorageRechargeFragment extends BaseFragment implements View.OnClic
                                 .flag(FLAG_UPDATEANDINQTY)
                                 .addParam("and_id", mStorageRechargeListBeans.get(position).getAndId() + "")
                                 .addParam("qty", quantity + "")
+                                .addParam("remarkQTY", remarkqty + "")
                                 .build(), new HttpCallback() {
                             @Override
                             public void onSuccess(int flag, Object o) throws Exception {
@@ -511,6 +523,7 @@ public class StorageRechargeFragment extends BaseFragment implements View.OnClic
                         storageRechargeListBean.setQuantity(FastjsonUtil.getDouble(detailObject, "AND_INQTY"));
                         storageRechargeListBean.setDetail(FastjsonUtil.getText(detailObject, "PR_DETAIL"));
                         storageRechargeListBean.setSpec(FastjsonUtil.getText(detailObject, "PR_SPEC"));
+                        storageRechargeListBean.setBAN_QTY(FastjsonUtil.getText(detailObject, "BAN_QTY"));
                         mStorageRechargeListBeans.add(storageRechargeListBean);
                     }
                 }

+ 1 - 0
app/src/main/java/com/uas/pda_smart_com/fragment/StorageRechargeListFragment.java

@@ -212,6 +212,7 @@ public class StorageRechargeListFragment extends BaseFragment implements HttpCal
                                 storageRechargeInspectionBean.setVendname(FastjsonUtil.getText(mainObject, "AN_VENDNAME"));
                                 storageRechargeInspectionBean.setDetailJson(FastjsonUtil.getText(dataObject, "detail"));
                                 storageRechargeInspectionBean.setSlipable(FastjsonUtil.getBoolean(dataObject, "ifShowButton"));
+                                storageRechargeInspectionBean.setAN_INDATE(FastjsonUtil.getText(mainObject, "AN_INDATE"));
 
                                 mStorageRechargeInspectionBeans.add(storageRechargeInspectionBean);
                             }

+ 2 - 2
app/src/main/java/com/uas/pda_smart_com/fragment/VersionUpgradeFragment.java

@@ -97,7 +97,6 @@ public class VersionUpgradeFragment extends BaseFragment implements ProgressResp
     @Override
     protected void initDatas() {
         mOldVersionTv.setText(AndroidUtil.getVersionName(mActivity));
-
         getNewVersionMsg();
     }
 
@@ -125,6 +124,7 @@ public class VersionUpgradeFragment extends BaseFragment implements ProgressResp
                         mUpgradeButton.setVisibility(View.GONE);
                     }
                 }
+
             }
 
             @Override
@@ -185,7 +185,7 @@ public class VersionUpgradeFragment extends BaseFragment implements ProgressResp
                         Intent intent = new Intent(Intent.ACTION_VIEW);
                         if (Build.VERSION.SDK_INT >= 24) {
                             Uri apkUri = FileProvider.getUriForFile(mActivity,
-                                    "com.uas.pda_smart_sa.fileprovider", apk);
+                                    "com.uas.pda_smart_com.fileprovider", apk);
                             intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                             intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
                             intent.setDataAndType(apkUri, "application/vnd.android.package-archive");

+ 2 - 2
app/src/main/java/com/uas/pda_smart_com/fragment/WHBreakingBatchFragment.java

@@ -506,7 +506,7 @@ public class WHBreakingBatchFragment extends BaseFragment implements View.OnClic
             case R.id.btn_back:
                 closePopupWindow();
                 if (messages != null && messages.size() > 0) {
-                    tvOrRemain.setText(CommonUtil.doubleFormat(messages.get(0).getBAR_REMAIN()));
+                    tvOrRemain.setText(messages.get(0).getBAR_REMAIN());
                     CommonUtil.editTextGetFocus(etBarRemain);
                 }
                 break;
@@ -792,7 +792,7 @@ public class WHBreakingBatchFragment extends BaseFragment implements View.OnClic
             // 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(CommonUtil.doubleFormat(person.getBAR_REMAIN()));
+            tv_bar_remain.setText(person.getBAR_REMAIN());
             return convertView;
         }
     }

+ 6 - 2
app/src/main/java/com/uas/pda_smart_com/fragment/WHCheckBarcodeFragment.java

@@ -34,7 +34,8 @@ public class WHCheckBarcodeFragment extends BaseFragment implements View.OnClick
     private static final int SCAN_BARCODE_CODE = 402;
     ClearableEditText etCollect;
     TableLayout tlMsg;
-    TextView tvBarcode, tvBarProcode,tv_type_value,tvPrDetail, tvPrSpec, tvVeShortname, tvBarWhcode, tvBarRemain, tvBarLocation, tvStatus;
+    TextView tvBarcode, tvBarProcode,tv_type_value,tvPrDetail, tvPrSpec, tvVeShortname, tvBarWhcode,
+            tvBarRemain, tvBarLocation, tvStatus,tv_batch_number;
     private TextView btnSearch;
     private ImageView mScanImageView;
     private int mFocusId;
@@ -62,6 +63,7 @@ public class WHCheckBarcodeFragment extends BaseFragment implements View.OnClick
         btnSearch = (TextView) root.findViewById(R.id.btn_collect);
         ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(R.string.title_barcode_whmm);
         mScanImageView = (ImageView) mActivity.findViewById(R.id.btn_actionbar_scan_iv);
+        tv_batch_number = (TextView) mActivity.findViewById(R.id.tv_batch_number);
 
     }
 
@@ -190,7 +192,8 @@ public class WHCheckBarcodeFragment extends BaseFragment implements View.OnClick
             String strRemain = changeNulltoBlank(dataJson, "BAR_REMAIN");
             String strLocation = changeNulltoBlank(dataJson, "BAR_LOCATION");
             String strStatus = changeNulltoBlank(dataJson, "BAR_STATUS");
-            String strType=changeNulltoBlank(dataJson,"PR_ORISPECCODE");
+            String strType = changeNulltoBlank(dataJson,"PR_ORISPECCODE");
+            String BAR_BATCHCODE = changeNulltoBlank(dataJson,"BAR_BATCHCODE");  //批次号
 
             //显示数据
             tvBarcode.setText(strBarcode);
@@ -202,6 +205,7 @@ public class WHCheckBarcodeFragment extends BaseFragment implements View.OnClick
             tvBarWhcode.setText(strWhcode);
             tvBarRemain.setText(strRemain);
             tvBarLocation.setText(strLocation);
+            tv_batch_number.setText(BAR_BATCHCODE);     //批次号
             if(strStatus.equals("1")){
                 tvStatus.setText("在库");
             }else if(strStatus.equals("2")){

+ 2 - 1
app/src/main/java/com/uas/pda_smart_com/fragment/WHCheckContentFragment.java

@@ -60,7 +60,8 @@ public class WHCheckContentFragment extends BaseFragment implements AdapterView.
         switch (selected){
             //物料库存核查
             case GloableParams.LISTNAME_WH_CHECKCONTENT_MAKEMATERIAL:
-                fragment = new WHCheckMakeMaterialFragment();
+//                fragment = new WHCheckMakeMaterialFragment();
+                fragment = new NewWHCheckMakeMaterialFragment();
                 getFragmentManager().beginTransaction().addToBackStack(null)
                         .replace(R.id.container_function_fragment,fragment).commit();
                 break;

+ 0 - 391
app/src/main/java/com/uas/pda_smart_com/fragment/WHCheckMakeMaterialFragment.java

@@ -1,391 +0,0 @@
-package com.uas.pda_smart_com.fragment;
-
-import android.app.ActionBar;
-import android.app.Activity;
-import android.content.Context;
-import android.content.Intent;
-import android.graphics.drawable.BitmapDrawable;
-import android.os.AsyncTask;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.KeyEvent;
-import android.view.View;
-import android.view.Window;
-import android.view.inputmethod.InputMethodManager;
-import android.widget.AdapterView;
-import android.widget.EditText;
-import android.widget.ImageView;
-import android.widget.ListView;
-import android.widget.PopupWindow;
-import android.widget.TextView;
-
-import com.google.gson.reflect.TypeToken;
-import com.uas.pda_smart_com.R;
-import com.uas.pda_smart_com.activity.FunctionActivity;
-import com.uas.pda_smart_com.adapter.WHCheckMakeDetailListAdapter;
-import com.uas.pda_smart_com.adapter.WHCheckMakeMaterialListAdapter;
-import com.uas.pda_smart_com.bean.WHMakeMaterialDetail;
-import com.uas.pda_smart_com.bean.WHMakeMaterialProduct;
-import com.uas.pda_smart_com.global.GloableParams;
-import com.uas.pda_smart_com.tools.DataSourceManager;
-import com.uas.pda_smart_com.tools.GsonUtil;
-import com.uas.pda_smart_com.tools.VolleyUtil;
-import com.uas.pda_smart_com.util.CameraUtil;
-import com.uas.pda_smart_com.util.CommonUtil;
-import com.uas.pda_smart_com.view.ClearableEditText;
-import com.uas.pda_smart_com.view.ConfirmDialog;
-import com.uuzuche.lib_zxing.activity.CaptureActivity;
-import com.uuzuche.lib_zxing.activity.CodeUtils;
-
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.util.List;
-
-/**
- * @note:物料库存核查Fragment
- */
-public class WHCheckMakeMaterialFragment extends BaseFragment implements View.OnClickListener, DataSourceManager.NotifyData, AdapterView.OnItemClickListener, VolleyUtil.VolleyFinishListener {
-    private static final int SCAN_BARCODE_CODE = 301;
-    ClearableEditText etProdcode, etWhcode;
-    TextView tvPrDetail, tvPrSpec;
-    TextView btnSearch;
-    WHCheckMakeMaterialListAdapter adapter;
-    List<WHMakeMaterialProduct> detailItemList;
-    int requestType = -1;
-    private ListView lvDetail;
-    private ImageView mScanImageView;
-    private int mFocusId;
-
-    @Override
-    protected int getLayout() {
-        return R.layout.fragment_whcheck_makematerial;
-    }
-
-    @Override
-    protected void initViews() {
-        ((FunctionActivity) mActivity).setScanIvVisible(true);
-        detailItemList = DataSourceManager.getDataSourceManager().getMakeMaterialCheckItemList();
-        //接口回调
-        //VolleyUtil.setVolleyHandler(volleyHandler);
-        VolleyUtil.getVolleyUtil().setOnVolleyFinishListener(this);
-        DataSourceManager.getDataSourceManager().setNotifyData(this);
-        //获取组件
-        //->List
-        lvDetail = (ListView) root.findViewById(R.id.lv_detail_whmm);
-        Log.e("tableList", detailItemList.toString());
-        adapter = new WHCheckMakeMaterialListAdapter(detailItemList, getActivity());
-        lvDetail.setAdapter(adapter);
-        //->采集
-        etProdcode = (ClearableEditText) root.findViewById(R.id.et_prodcode_whmm);
-        etWhcode = (ClearableEditText) root.findViewById(R.id.et_whcode_whmm);
-        btnSearch = (TextView) root.findViewById(R.id.btn_search_whmm);
-        //->信息显示
-        tvPrDetail = (TextView) root.findViewById(R.id.tv_pr_detail);
-        tvPrSpec = (TextView) root.findViewById(R.id.tv_pr_spec);
-
-        mScanImageView = (ImageView) mActivity.findViewById(R.id.btn_actionbar_scan_iv);
-    }
-
-    @Override
-    protected void initEvents() {
-        btnSearch.setOnClickListener(this);
-        lvDetail.setOnItemClickListener(this);
-        etProdcode.setOnKeyListener(new View.OnKeyListener() {
-            @Override
-            public boolean onKey(View v, int keyCode, KeyEvent event) {
-                if (keyCode == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_UP) {
-                    disposeOnClickEnter();
-                    return true;
-                }
-                return false;
-            }
-        });
-
-        mScanImageView.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                if (CameraUtil.hasCamera()) {
-                    if (root.findFocus() != null) {
-                        mFocusId = root.findFocus().getId();
-                        Intent intent = new Intent();
-                        intent.setClass(mActivity, CaptureActivity.class);
-                        startActivityForResult(intent, SCAN_BARCODE_CODE);
-                    }
-                } else {
-                    CommonUtil.toastNoRepeat(mActivity, getString(R.string.no_camera_detected));
-                }
-            }
-        });
-    }
-
-    @Override
-    protected void initDatas() {
-        editTextGetFocus(etProdcode);
-        //->Actionbar
-        ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(R.string.title_makematerial_whmm);
-
-    }
-
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent data) {
-        super.onActivityResult(requestCode, resultCode, data);
-
-        if (resultCode != Activity.RESULT_OK) {
-            return;
-        }
-
-        if (requestCode == SCAN_BARCODE_CODE && data != null) {
-            if (data.getExtras() != null) {
-                String result = data.getExtras().getString(CodeUtils.RESULT_STRING);
-                if (mFocusId == R.id.et_prodcode_whmm) {
-                    etProdcode.setText(result);
-                    etProdcode.setSelection(result.length());
-                } else if (mFocusId == R.id.et_whcode_whmm) {
-                    etWhcode.setText(result);
-                    etWhcode.setSelection(result.length());
-                }
-            }
-        }
-    }
-
-    //按钮点击事件
-    private void disposeOnClickEnter() {
-        String strProdcode = etProdcode.getText().toString().trim();
-        String strWhcode = etWhcode.getText().toString().trim();
-        if (strProdcode.equals("") || strProdcode == null) {
-            etProdcode.setWarnIconVisible();
-            return;
-        }
-        //请求详细数据
-        showLoadingView();
-        requestType = VolleyUtil.FRAGMETN_WHCHECK_PRODUCT_CHECK;
-        VolleyUtil.getVolleyUtil().requestMakeMaterialCheck(getActivity(), GloableParams.ADDRESS_WH_PRODUCT, VolleyUtil.METHOD_GET,
-                requestType, strProdcode, strWhcode);
-    }
-
-    @Override
-    public void onDestroy() {
-        //清理数据
-        detailItemList.removeAll(detailItemList);
-        hideKeyboard(etProdcode);
-        VolleyUtil.distoryVolley();
-
-        ((FunctionActivity) mActivity).setScanIvVisible(false);
-        super.onDestroy();
-    }
-
-
-    /*=============================明细PopWin页面============================*/
-
-    /**
-     * @注释:明细popwin页面
-     */
-    PopupWindow detailPopwin;
-
-    private void showDetailPopwin(List dataList) {
-        if (dataList == null || dataList.size() == 0) {
-            showNotice("无明细数据");
-            return;
-        }
-        View contentView = View.inflate(getActivity(), R.layout.popwin_whcheck_detail, null);
-        //获取组件
-        //->List
-        ListView lvDetail = (ListView) contentView.findViewById(R.id.lv_detail);
-        WHCheckMakeDetailListAdapter adapter = new WHCheckMakeDetailListAdapter(getActivity(), dataList);
-        lvDetail.setAdapter(adapter);
-        TextView tv = (TextView) contentView.findViewById(R.id.tv_table_3);
-        //PopupWindow
-        detailPopwin = new PopupWindow(contentView, ActionBar.LayoutParams.MATCH_PARENT, ActionBar.LayoutParams.WRAP_CONTENT);
-        detailPopwin.setBackgroundDrawable(new BitmapDrawable());
-        detailPopwin.setFocusable(true);
-        detailPopwin.setOutsideTouchable(true);
-        View parentView = ((Activity) getActivity()).getWindow().findViewById(Window.ID_ANDROID_CONTENT);
-        //当pop菜单超出屏幕时,平移位置
-        detailPopwin.showAtLocation(parentView, Gravity.CENTER, 0, 0);
-    }
-
-    /*=============================公用方法===================================*/
-    /**
-     * @注释:显示错误提示
-     */
-    ConfirmDialog noticeDialog;
-
-    private void showNotice(String noticeMsg) {
-        noticeDialog = new ConfirmDialog(getActivity());
-        noticeDialog.show(noticeMsg, ConfirmDialog.NOTICE);
-
-        new AsyncTask<String, Void, Float>() {
-            @Override
-            protected Float doInBackground(String... params) {
-                try {
-                    //notice显示1.5s
-                    Thread.sleep(1000);
-                } catch (InterruptedException e) {
-                    e.printStackTrace();
-                }
-                return null;
-            }
-
-            @Override
-            protected void onPostExecute(Float aFloat) {
-                noticeDialog.dismiss();
-            }
-        }.execute();
-    }
-
-    /**
-     * 获取输入框焦点
-     */
-    private void editTextGetFocus(EditText editText) {
-        editText.setFocusable(true);
-        editText.setFocusableInTouchMode(true);
-        editText.setEnabled(true);
-        editText.setClickable(true);
-        editText.requestFocus();
-    }
-
-    /**
-     * 显示loadingView
-     */
-    private void showLoadingView() {
-        if (!progressDialog.isShowing()) {
-            progressDialog.show();
-        }
-    }
-
-    //隐藏键盘
-    InputMethodManager inputManager;
-
-    private void hideKeyboard(final EditText view) {
-        inputManager = (InputMethodManager) view.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
-        //获取键盘管理对象
-        inputManager.hideSoftInputFromWindow(view.getWindowToken(), 0);
-    }
-
-    String TAG = "WHCheck:";
-
-    /*=============================数据源发生变化===================================*/
-    @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 onItemClick(AdapterView<?> parent, View view, int position, long id) {
-        //获取点击行所对应的detail对象
-        WHMakeMaterialProduct tmpProd = detailItemList.get(position);
-        String strPrcode = tmpProd.getBAR_PRODCODE().trim();
-        String strWhcode = tmpProd.getBAR_WHCODE().trim();
-        String strLocation = tmpProd.getBAR_LOCATION();
-        if (strLocation == null || strLocation.equals("null") || strLocation.equals("")) {
-            strLocation = "null";
-        }
-        //请求服务器获取明细
-        JSONObject paramJson = new JSONObject();
-        try {
-            paramJson.put("pr_code", strPrcode);
-            paramJson.put("wh_code", strWhcode);
-            paramJson.put("bar_location", strLocation);
-        } catch (JSONException e) {
-            e.printStackTrace();
-        }
-        Log.e("WHCheck", "!!!" + paramJson.toString());
-        requestType = VolleyUtil.FRAGMETN_WHCHECK_PRODUCT_DETAIL;
-        VolleyUtil.getVolleyUtil().requestMakeMaterialDetail(getActivity(), GloableParams.ADDRESS_WH_DETAIL, VolleyUtil.METHOD_GET,
-                requestType, strPrcode, strWhcode, strLocation);
-    }
-
-    @Override
-    public void onClick(View v) {
-        disposeOnClickEnter();
-    }
-
-    @Override
-    public void onVolleyFinish(int isSuccess, Object result) {
-        switch (isSuccess) {
-            case VolleyUtil.SUCCESS_SUCCESS:
-                disposeVolleySuccess(result);
-                break;
-            case VolleyUtil.FAILED_FAILED:
-                disposeVolleyFailed(result);
-                break;
-        }
-        progressDialog.dismiss();
-    }
-
-    //Volley失败
-    private void disposeVolleyFailed(Object result) {
-        showNotice(result.toString());
-    }
-
-    //Volley成功
-    private void disposeVolleySuccess(Object result) {
-        String str = (String) result;
-        switch (requestType) {
-            //物料库存核查:Check数据
-            case VolleyUtil.FRAGMETN_WHCHECK_PRODUCT_CHECK:
-                break;
-            //物料库存核查:明细数据
-            case VolleyUtil.FRAGMETN_WHCHECK_PRODUCT_DETAIL:
-                Log.e("WHCHECK:make", "" + result.toString());
-                //显示明细数据弹框
-                //disposeVolleyDetail(result);
-                showDetailPopwin(disposeVolleyDetail(result));
-                break;
-        }
-    }
-
-    //Volley明细数据->list
-    private List disposeVolleyDetail(Object result) {
-        List<WHMakeMaterialDetail> list = null;
-        String strResult = (String) result;
-        try {
-            JSONObject resultJson = new JSONObject(strResult);
-            JSONArray targetJsonArray = resultJson.getJSONArray("target");
-            list = GsonUtil.changeGsonToList(targetJsonArray.toString(),
-                    new TypeToken<List<WHMakeMaterialDetail>>() {
-                    }.getType());
-            Log.e(TAG, "detaillist:" + list.toString());
-        } catch (JSONException e) {
-            e.printStackTrace();
-        }
-        return list;
-    }
-
-    @Override
-    public boolean onKeyDown(int keyCode, KeyEvent event) {
-        if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
-            if (progressDialog != null && progressDialog.isShowing()) {
-//                loadingView.dismiss();
-//                VolleyUtil.distoryVolley();
-                return true;
-            }
-            if (detailPopwin != null && detailPopwin.isShowing()) {
-                detailPopwin.dismiss();
-                return true;
-            }
-            if (noticeDialog != null && noticeDialog.isShowing()) {
-                noticeDialog.dismiss();
-                return true;
-            }
-        }
-        return false;
-    }
-
-    @Override
-    public boolean onFragmentBackPressed() {
-        return false;
-    }
-}

+ 182 - 1
app/src/main/java/com/uas/pda_smart_com/fragment/WHCombineBatchFragment.java

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

+ 1 - 0
app/src/main/java/com/uas/pda_smart_com/fragment/WHTransferLocationFragment.java

@@ -109,6 +109,7 @@ public class WHTransferLocationFragment extends BaseFragment implements Compound
                         || actionId == EditorInfo.IME_ACTION_GO
                         || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
                     disposeConfirmClickEnter();
+                    etCode.setText("");
                     return true;
                 }
                 return false;

+ 155 - 5
app/src/main/java/com/uas/pda_smart_com/global/GloableParams.java

@@ -226,6 +226,41 @@ public class GloableParams {
     public static String ADDRESS_OUTMATERIAL_CHECKBOMBARCODE;
     public static String ADDRESS_OUTMATERIAL_GETPREMATERIALLIST;
 
+    public static String ADDRESS_INVENTORYBINDING;
+    public static String ADDRESS_INVENTORYBINDING2;
+    public static String ADDRESS_ADDRESSTAIL_PRINTSUMLABEL;
+    public static String ADDRESS_RECEIVING_NEWBAOCODEIO;
+    public static String ADDRESS_PDAIO_CONFIRMPOST;
+    public static String ADDRESS_RECEIVING_BARCODEPARSE2;
+    public static String ADDRESS_JLT_RECEIVING_BARCODEPARSE;
+    public static String ADDRESS_JLT_RECEIVING_GETINDATALIST;
+    public static String ADDRESS_PDAIO_PUT_SAVEBARCODE2CONFIRM;
+    public static String ADDRESS_RECEIVING_SAVEBARCODE2;
+    public static String ADDRESS_JLT_RECEIVING_CHECKOUTBOX;
+    public static String ADDRESS_JLT_RECEIVING_DELETEOUTBOX;
+    public static String ADDRESS_JLT_RECEIVING_GETOUTBOXDATA;
+    public static String ADDRESS_JLT_RECEIVING_GETNEEDLIST;
+    public static String ADDRESS_JLT_RECEIVING_GETCOLLECTLISTBYBOX;
+    public static String ADDRESS_PDAIOOUT_DELETEALLPREBIO;
+    public static String ADDRESS_PDAIOOUT_DELELTEPREBIOBYID;
+    public static String ADDRESS_PDAIO_GET_lOGINDELETE;
+    public static String ADDRESS_PUTMATERIAL_TOADOPTPROMPT;
+    public static String ADDRESS_DOCUMENTLIBRARY_AUTIQC;
+    public static String ADDRESS_TURNPURCBARCODE;
+    public static String ADDRESS_INVENTORY_DETAILS_QUERY;
+
+    public static String ADDRESS_GET_BARCODE_DATA;
+    public static String ADDRESS_GET_PRE_MATERIAL_LIST;
+
+    public static String ADDRESS_GET_INVENTORY_BARCODE_DATA;     //库存条码打印
+    public static String ADDRESS_GET_INVENTORY_BARCODE_FREEZE;     //库存条码冻结
+
+    public static String ADDRESS_GET_OUT_PRODIO_LIST;     //出库单--列表
+    public static String ASTATIONTHE_MAINTAIN_DATA;
+    public static String ASTATIONTHE_NAME_DATA;
+    public static String ASTATIONTHE_COMMIT_MAINITEM;
+    public static String ASTATIONTHE_COMMIT_DELIVERYFORREPAIR;
+    public static String ASTATIONTHE_SWEEP_DATA;
 
     //连接服务器请求地址
     private static final String ADDRESSTAIL_CONNECT_SERVER = "/api/pda/getAllMasters.action";
@@ -544,6 +579,38 @@ public class GloableParams {
     private static String ADDRESSTAIL_OUT_MATERIAL_SPECIAL_OUT_DEAL = "/api/pda/outMaterial/specialOutDeal.action";
     private static String ADDRESSTAIL_OUT_MATERIAL_SPECIAL_OUT_BREAK = "/api/pda/outMaterial/specialOutBreaking.action";
 
+
+    //库存条码绑定
+    private static final String ADDRESSTAIL_INVENTORYBINDING="/api/pda/receiving/stocksaveBarcode2Confirm.action";
+    private static final String ADDRESSTAIL_RECEIVING_INVENTORYBINDING2 = "/api/pda/receiving/stocksaveBarcode2.action";
+    private static final String ADDRESSTAIL_GET_PRINTSUMLABEL="/api/pda/outMaterial/printSumLabel.action";
+    //确认入库
+    private static final String ADDRESSTAIL_RECEIVING_NEWBAOCODEIO = "/api/pda/receiving/newBaocodeio.action";
+    //单据过账
+    private static final String ADDRESSTAIL_PDAIO_CONFIRMPOST = "/api/pdaio/pdaioIn/confirmPost.action";
+    //入库条码校验
+    private static final String ADDRESSTAIL_RECEIVING_BARCODEPARSE2 = "/api/pda/receiving/barcodeParse2.action";
+    //入库条码解析
+    private static final String ADDRESSTAIL_JLT_RECEIVING_BARCODEPARSE = "/api/pda/receiving/barcodeParse.action";
+    //入库采集
+    private static final String ADDRESSTAIL_JLT_RECEIVING_GETINDATALIST = "/api/pda/receiving/getInDataList.action";
+    private static final String ADDRESSTAIL_PDAIO_PUT_SAVEBARCODE2CONFIRM="/api/pda/receiving/saveBarcode2Confirm.action";
+    private static final String ADDRESSTAIL_RECEIVING_SAVEBARCODE2 = "/api/pda/receiving/saveBarcode2.action";
+    private static final String ADDRESSTAIL_JLT_RECEIVING_CHECKOUTBOX = "/api/pda/receiving/checkOutBox.action";
+    private static final String ADDRESSTAIL_JLT_RECEIVING_DELETEOUTBOX = "/api/pda/receiving/deleteOutBox.action";
+    private static final String ADDRESSTAIL_JLT_RECEIVING_GETOUTBOXDATA = "/api/pda/receiving/getOutBoxData.action";
+    private static final String ADDRESSTAIL_JLT_RECEIVING_GETNEEDLIST = "/api/pda/receiving/getNeedList.action";
+    private static final String ADDRESSTAIL_JLT_RECEIVING_GETCOLLECTLISTBYBOX = "/api/pda/receiving/getCollectListByBox.action";
+    private static final String ADDRESSTAIL_PDAIOOUT_DELETEALLPREBIO = "/api/pdaio/pdaioOut/deleteAllPrebio.action";
+    private static final String ADDRESSTAIL_PDAIOOUT_DELELTEPREBIOBYID = "/api/pdaio/pdaioOut/deleltePreBioById.action";
+    private static final String ADDRESSTAIL_PDAIO_GET_lOGINDELETE="/api/pda/receiving/deleteAllBarDetails.action";
+    private static final String ADDRESSTAIL_PDAIO_GET_TOADOPTPROMPT="/api/pda/receiving/getNeedList2.action";
+    private static String ADDRESSTAIL_RECHARGE_AUTIQC = "/api/pda/QCToPurcCheckin/autiQc.action";
+    private static String ADDRESSTAIL_IQC_GETLIST_TURNPURCBARCODE = "/api/pda/QCToPurcCheckin/turnPurcBarCode.action";
+
+
+
+
     /**
      * 完工品入库
      */
@@ -631,6 +698,35 @@ public class GloableParams {
     //切换账套
     private static final String ADDRESSTAIL_CHANGE_MASTER = "/api/pda/changeMaster.action";
 
+    //入库明细查询
+    private static final String ADDRESSTAIL_INVENTORY_DETAILS_QUERY = "/api/pda/acceptNToVerify/getProdiodetail.action";
+
+    //修改数量弹窗
+    private static final String ADDRESSTAIL_GET_BARCODE_DATA = "/api/pda/outMaterial/getBarcodeData.action";
+
+    private static final String ADDRESSTAIL_GET_PRE_MATERIAL_LIST = "/api/pda/outMaterial/getStockMaterialList.action";
+
+    //条码库存打印
+    private static final String ADDRESSTAIL_GET_INVENTORY_BARCODE_DATA = "/api/pda/batch/getBarcodeData.action";
+
+    //库存条码冻结
+    private static final String ADDRESSTAIL_GET_INVENTORY_BARCODE_FREEZE = "/scm/reserve/freezeBarcodeByPDA.action";
+
+    //出库单--获取列表
+    private static final String ADDRESSTAIL_GET_OUT_PRODIO_LIST = "/api/pda/outMaterial/getOutProdioList.action";
+
+    //保养类型
+    public static String ADDRESSTAIL_GET_MAINTAIN_DATA="/oa/device/getMaintaincode.action";
+    //项目名称
+    public static String ADDRESSTAIL_GET_NAME_DATA="/oa/device/getMaintainitem.action";
+    //保养页面提交
+    public static String ADDRESSTAIL_GET_COMMTI_MAINITEM="/oa/device/saveDevicechange.action";
+    //获取维修进度信息
+    public static String ADDRESSTAIL_GET_DELIVERYFORREPAIR="/oa/device/getDevicechange.action";
+    public static String ADDRESSTAIL_GET_SWEEP_DATA="/oa/device/getDevice.action";
+
+
+
     /***********************************************************************************************/
     /*界面文字和图片资源,控制后续数据一致*/
     //主界面
@@ -679,12 +775,19 @@ public class GloableParams {
     public static final String GRIDNAME_WORK_INVENTORY = "盘点作业";
     public static final String GRIDNAME_MODIFY_QUANTITY = "条码数量修改";
     public static final String GRIDNAME_BOM_CHECK = "BOM校验";
+    public static final String MENU_STORAGE_STOCK_INFO_COLLECT = "库存条码绑定";
+    public static final String MENU_STORAGE_BARCODE_FREEZE = "库存条码冻结";
     public static final String[] storageGridNames = {GRIDNAME_GOOD_SEARCH, GRIDNAME_BATCH_OPRATION,
-            GRIDNAME_STORAGE_TRANSFER, GRIDNAME_MODIFY_QUANTITY, GRIDNAME_WORK_INVENTORY, GRIDNAME_BOM_CHECK};
+            GRIDNAME_STORAGE_TRANSFER, GRIDNAME_MODIFY_QUANTITY, GRIDNAME_WORK_INVENTORY,
+            GRIDNAME_BOM_CHECK,MENU_STORAGE_STOCK_INFO_COLLECT,MENU_STORAGE_BARCODE_FREEZE};
     public static final int[] storageGridImgs = {R.drawable.storage_good_search,
             R.drawable.storage_bach_operation, R.drawable.storage_transfer,
             R.drawable.storage_work_inventory,
-            R.drawable.ic_modify_quantity, R.drawable.storage_msd_manager};
+            R.drawable.ic_modify_quantity,
+            R.drawable.storage_msd_manager,
+            R.drawable.storage_transfer,
+            R.drawable.kucuntiaomadongjie
+    };
     //DETAIL:搜索备料单号,下拉列表
     public static final String SPINNER_PREPARE_SEARCH = "搜索备料单号";
     public static final String SPINNER_MAKECODE_SEARCH = "搜索制造单号";
@@ -722,23 +825,29 @@ public class GloableParams {
     //-->入库管理
     public static final String MENU_STORAGE_RECHARGE = "收料";
     public static final String MENU_STORAGE_INSPECTION = "送检";
-    public static final String MENU_STORAGE_IQC_STORAGE_IN = "IQC入库";
+    public static final String MENU_STORAGE_IQC_STORAGE_IN = "IQC检验";
     public static final String MENU_STORAGE_MATERIAL_STORAGE_IN = "单据入库";
     //    public static final String MENU_STORAGE_PRODUCT_CHECK = "成品检验";
     public static final String MENU_STORAGE_PRODUCT_STORAGE_IN = "完工品入库";
     public static final String MENU_STORAGE_RANDOM_CHECK = "抽查校验";
     public static final String MENU_STORAGE_BARCODE_IN = "条码入库";
     public static final String MENU_STORAGE_BARCODE_INFO_COLLECT = "条码信息采集";
+    public static final String MENU_STORAGE_BARCODECJI_IN = "入库采集";
+    public static final String MENU_STORAGE_INVENTORY_DETAILS_QUERY = "入库明细查询";
 
     public static final String[] storageInMenuNames = {
             MENU_STORAGE_RECHARGE, MENU_STORAGE_INSPECTION, MENU_STORAGE_IQC_STORAGE_IN,
             MENU_STORAGE_MATERIAL_STORAGE_IN, MENU_STORAGE_PRODUCT_STORAGE_IN,
-            MENU_STORAGE_RANDOM_CHECK, MENU_STORAGE_BARCODE_IN, MENU_STORAGE_BARCODE_INFO_COLLECT};
+            MENU_STORAGE_RANDOM_CHECK, MENU_STORAGE_BARCODE_IN, MENU_STORAGE_BARCODE_INFO_COLLECT,
+            MENU_STORAGE_BARCODECJI_IN, MENU_STORAGE_INVENTORY_DETAILS_QUERY};
     public static final int[] storageInMenuImgs = {
             R.drawable.ic_storage_recharge, R.drawable.ic_storage_inspection, R.drawable.ic_storage_iqc,
             R.drawable.ic_storage_material_in, R.drawable.ic_storage_finish_in,
             R.drawable.ic_storage_random_check, R.drawable.ic_storage_barcode_in,
-            R.drawable.ic_barcode_info_collect};
+            R.drawable.ic_barcode_info_collect,
+            R.drawable.ic_storage_barcode_in,
+            R.drawable.rukumingxichaxun
+    };
 
     //-->SMT校验
     public static final String LISTNAME_SCMAKE_SMTCHECK_FELOA = "飞达+站位";
@@ -996,5 +1105,46 @@ public class GloableParams {
         GloableParams.ADDRESS_BARSTOCK_GETPRODINOUTQTYSUM = uriHead + GloableParams.ADDRESSTAIL_BARSTOCK_GETPRODINOUTQTYSUM;
         GloableParams.ADDRESS_OUTMATERIAL_CHECKBOMBARCODE = uriHead + GloableParams.ADDRESSTAIL_OUTMATERIAL_CHECKBOMBARCODE;
         GloableParams.ADDRESS_OUTMATERIAL_GETPREMATERIALLIST = uriHead + GloableParams.ADDRESSTAIL_OUTMATERIAL_GETPREMATERIALLIST;
+
+
+        GloableParams.ADDRESS_INVENTORYBINDING= uriHead + GloableParams.ADDRESSTAIL_INVENTORYBINDING;
+        GloableParams.ADDRESS_INVENTORYBINDING2= uriHead + GloableParams.ADDRESSTAIL_RECEIVING_INVENTORYBINDING2;
+        GloableParams.ADDRESS_ADDRESSTAIL_PRINTSUMLABEL= uriHead + GloableParams.ADDRESSTAIL_GET_PRINTSUMLABEL;
+        GloableParams.ADDRESS_RECEIVING_NEWBAOCODEIO = uriHead + GloableParams.ADDRESSTAIL_RECEIVING_NEWBAOCODEIO;
+        GloableParams.ADDRESS_PDAIO_CONFIRMPOST = uriHead + GloableParams.ADDRESSTAIL_PDAIO_CONFIRMPOST;
+        GloableParams.ADDRESS_RECEIVING_BARCODEPARSE2 = uriHead + GloableParams.ADDRESSTAIL_RECEIVING_BARCODEPARSE2;
+        GloableParams.ADDRESS_JLT_RECEIVING_BARCODEPARSE = uriHead + GloableParams.ADDRESSTAIL_JLT_RECEIVING_BARCODEPARSE;
+        GloableParams.ADDRESS_JLT_RECEIVING_GETINDATALIST = uriHead + GloableParams.ADDRESSTAIL_JLT_RECEIVING_GETINDATALIST;
+        GloableParams.ADDRESS_PDAIO_PUT_SAVEBARCODE2CONFIRM = uriHead + GloableParams.ADDRESSTAIL_PDAIO_PUT_SAVEBARCODE2CONFIRM;
+        GloableParams.ADDRESS_RECEIVING_SAVEBARCODE2 = uriHead + GloableParams.ADDRESSTAIL_RECEIVING_SAVEBARCODE2;
+        GloableParams.ADDRESS_JLT_RECEIVING_CHECKOUTBOX = uriHead + GloableParams.ADDRESSTAIL_JLT_RECEIVING_CHECKOUTBOX;
+        GloableParams.ADDRESS_JLT_RECEIVING_DELETEOUTBOX = uriHead + GloableParams.ADDRESSTAIL_JLT_RECEIVING_DELETEOUTBOX;
+        GloableParams.ADDRESS_JLT_RECEIVING_GETOUTBOXDATA = uriHead + GloableParams.ADDRESSTAIL_JLT_RECEIVING_GETOUTBOXDATA;
+        GloableParams.ADDRESS_JLT_RECEIVING_GETNEEDLIST = uriHead + GloableParams.ADDRESSTAIL_JLT_RECEIVING_GETNEEDLIST;
+        GloableParams.ADDRESS_JLT_RECEIVING_GETCOLLECTLISTBYBOX = uriHead + GloableParams.ADDRESSTAIL_JLT_RECEIVING_GETCOLLECTLISTBYBOX;
+        GloableParams.ADDRESS_PDAIOOUT_DELETEALLPREBIO = uriHead + GloableParams.ADDRESSTAIL_PDAIOOUT_DELETEALLPREBIO;
+        GloableParams.ADDRESS_PDAIOOUT_DELELTEPREBIOBYID = uriHead + GloableParams.ADDRESSTAIL_PDAIOOUT_DELELTEPREBIOBYID;
+        GloableParams.ADDRESS_PDAIO_GET_lOGINDELETE = uriHead + GloableParams.ADDRESSTAIL_PDAIO_GET_lOGINDELETE;
+        GloableParams.ADDRESS_PUTMATERIAL_TOADOPTPROMPT = uriHead + GloableParams.ADDRESSTAIL_PDAIO_GET_TOADOPTPROMPT;
+        GloableParams.ADDRESS_DOCUMENTLIBRARY_AUTIQC= uriHead + GloableParams.ADDRESSTAIL_RECHARGE_AUTIQC;
+        GloableParams.ADDRESS_TURNPURCBARCODE= uriHead + GloableParams.ADDRESSTAIL_IQC_GETLIST_TURNPURCBARCODE;
+        GloableParams.ADDRESS_INVENTORY_DETAILS_QUERY= uriHead + GloableParams.ADDRESSTAIL_INVENTORY_DETAILS_QUERY;
+
+        GloableParams.ADDRESS_GET_BARCODE_DATA = uriHead + GloableParams.ADDRESSTAIL_GET_BARCODE_DATA;
+        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_INVENTORY_BARCODE_FREEZE = uriHead + GloableParams.ADDRESSTAIL_GET_INVENTORY_BARCODE_FREEZE;
+
+        GloableParams.ADDRESS_GET_OUT_PRODIO_LIST = uriHead + GloableParams.ADDRESSTAIL_GET_OUT_PRODIO_LIST;
+
+        GloableParams.ASTATIONTHE_MAINTAIN_DATA = uriHead + GloableParams.ADDRESSTAIL_GET_MAINTAIN_DATA;
+        GloableParams.ASTATIONTHE_NAME_DATA = uriHead + GloableParams.ADDRESSTAIL_GET_NAME_DATA;
+        GloableParams.ASTATIONTHE_COMMIT_MAINITEM = uriHead + GloableParams.ADDRESSTAIL_GET_COMMTI_MAINITEM;
+        GloableParams.ASTATIONTHE_COMMIT_DELIVERYFORREPAIR = uriHead + GloableParams.ADDRESSTAIL_GET_DELIVERYFORREPAIR;
+        GloableParams.ASTATIONTHE_SWEEP_DATA = uriHead + GloableParams.ADDRESSTAIL_GET_SWEEP_DATA;
+
+
+
     }
 }

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

@@ -60,8 +60,8 @@ public class DataSourceManager {
     }
 
     public void setMakeMaterialCheckItemList(String result) {
-        makeMaterialItemList.removeAll(makeMaterialItemList);
         try {
+            makeMaterialItemList.removeAll(makeMaterialItemList);
             JSONObject tmpJson = new JSONObject(result);
 //            String strTarget = tmpJson.getJSONArray("target").toString();
             String strTarget = tmpJson.getJSONArray("data").toString();

+ 23 - 0
app/src/main/java/com/uas/pda_smart_com/tools/VolleyUtil.java

@@ -346,6 +346,29 @@ public class VolleyUtil {
         PdaApplication.mRequestQueue.add(stringRequest);
     }
 
+    /**
+     * @注释:物料库存核查:获取详细物料数据,增加(料号/条码号)参数
+     */
+    public void requestMakeMaterialCheck2(Context pContext, String pUrl, int method, int pRequestType, final String pProcode,String bar_code, final String pWhcode) {
+        //String  pr_code  //料号   测试数据:2CX-X028M-0002R01
+        //String  bar_code  // 条码号 测试数据:240903B0377
+        //String  wh_code  //仓库编号  测试数据:B0101
+        getVolleyUtil();
+        context = pContext;
+        requestType = pRequestType;
+//        pUrl = pUrl + "?pr_code=" + pProcode + "&bar_code=" + bar_code + "&wh_code=" + pWhcode;
+        pUrl = pUrl + "?pr_code=" + pProcode + "&wh_code=" + pWhcode;
+        Log.e("VOLLEYURL", pUrl);
+        stringRequest = new StringRequest(Request.Method.GET, pUrl, stringListener, errorListener) {
+            @Override
+            public Map<String, String> getHeaders() throws AuthFailureError {
+                return setCookies();
+            }
+        };
+        stringRequest.setRetryPolicy(new DefaultRetryPolicy(10 * 1000, 0, 1f));
+        PdaApplication.mRequestQueue.add(stringRequest);
+    }
+
     /**
      * @注释:尾料还仓
      */

+ 67 - 1
app/src/main/java/com/uas/pda_smart_com/util/CommonUtil.java

@@ -6,6 +6,7 @@ import android.content.Intent;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
 import android.graphics.Color;
+import android.graphics.Paint;
 import android.net.ConnectivityManager;
 import android.net.NetworkInfo;
 import android.os.AsyncTask;
@@ -40,8 +41,8 @@ import android.widget.Toast;
 import com.alibaba.fastjson.JSON;
 import com.android.volley.VolleyError;
 import com.bin.david.form.core.SmartTable;
-import com.bin.david.form.data.CellInfo;
 import com.bin.david.form.core.TableConfig;
+import com.bin.david.form.data.CellInfo;
 import com.bin.david.form.data.format.bg.BaseCellBackgroundFormat;
 import com.bin.david.form.data.style.FontStyle;
 import com.uas.pda_smart_com.R;
@@ -133,6 +134,17 @@ public class CommonUtil {
         }
 
     }
+    /**
+     * 判断double是否是整数
+     *
+     * @param obj
+     * @return
+     */
+    public static boolean isIntegerForDouble(double obj) {
+        double eps = 1e-10;  // 精度范围
+        return obj - Math.floor(obj) < eps;
+    }
+
 
     /**
      * 获取输入框焦点
@@ -450,6 +462,31 @@ public class CommonUtil {
         }
     }
 
+    /**
+     * 判断字符串是否是浮点数
+     */
+    public static boolean isDouble(String value) {
+        try {
+            Double.parseDouble(value);
+            if (value.contains("."))
+                return true;
+            return false;
+        } catch (NumberFormatException e) {
+            return false;
+        }
+    }
+
+    /**
+     * 帕努单字符串是否是整数
+     * @param str
+     * @return
+     */
+    public static boolean isNumeric(String str){
+        Pattern pattern = Pattern.compile("[0-9]*");
+
+        return pattern.matcher(str).matches();
+
+    }
 
     private static String oldMsg;
     private static long time;
@@ -1007,4 +1044,33 @@ public class CommonUtil {
                     }
                 });
     }
+
+    //表格内容左对齐
+    public static void getLeftDefaultTable(Activity mActivity, SmartTable mSmartTable) {
+        WindowManager wm = mActivity.getWindowManager();
+        int screenWith = wm.getDefaultDisplay().getWidth();
+        FontStyle.setDefaultTextAlign(Paint.Align.LEFT);
+        mSmartTable.getConfig().setMinTableWidth(screenWith)
+                .setShowXSequence(false)
+                .setShowYSequence(false)
+                .setShowTableTitle(false)
+                .setFixedTitle(true)
+                .setVerticalPadding(CommonUtil.dip2px(mActivity, 10))
+                .setColumnTitleVerticalPadding(CommonUtil.dip2px(mActivity, 10))
+                .setHorizontalPadding(CommonUtil.dip2px(mActivity, 10))
+                .setSequenceHorizontalPadding(CommonUtil.dip2px(mActivity, 10))
+                .setColumnTitleHorizontalPadding(CommonUtil.dip2px(mActivity, 10))
+                .setContentStyle(new FontStyle(CommonUtil.sp2px(mActivity, 12), Color.parseColor("#333333")))
+                .setColumnTitleStyle(new FontStyle(CommonUtil.sp2px(mActivity, 14), Color.parseColor("#000000")))
+                .setContentCellBackgroundFormat(new BaseCellBackgroundFormat<CellInfo>() {
+                    @Override
+                    public int getBackGroundColor(CellInfo cellInfo) {
+                        if (cellInfo.row % 2 == 0) {
+                            return ContextCompat.getColor(mActivity, R.color.blue_50);
+                        }
+                        return TableConfig.INVALID_COLOR;
+                    }
+                });
+    }
+
 }

+ 10 - 0
app/src/main/java/com/uas/pda_smart_com/util/Constants.java

@@ -43,7 +43,14 @@ public interface Constants {
         //下载进度
         int DOWNLOAD_PROGRESS = 13;
     }
+    /**
+     *入库扫描Checked状态
+     */
+    String JLTSTORAGEINISCHCKED ="is_chcked";
+
+    String STORAGEERECHADD ="add_codes";
 
+    /**
     /**
      * 正则表达式
      */
@@ -63,6 +70,9 @@ public interface Constants {
      * 应用缓存
      */
     interface FLAG {
+
+        //供应商有效天数
+        String JLT_VALID_DAYS_CACHE = "jlt_valid_days_cache";
         //ip地址列表缓存
         String CACHE_IP_HISTORY = "cache_ip_history";
 

+ 19 - 7
app/src/main/java/com/uas/pda_smart_com/util/PrintUtils.java

@@ -2,6 +2,7 @@ package com.uas.pda_smart_com.util;
 
 import android.content.Context;
 import android.text.TextUtils;
+import android.util.Log;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
@@ -12,6 +13,7 @@ import com.uas.pda_smart_com.tools.SharedPreUtil;
 public class PrintUtils {
 
     public static int printBar(Context context, String dataJson, int dpi, String printTemplate) {
+        Log.e("listArraythree1",dataJson);
         try {
             if (dpi <= 0) {
                 dpi = 203;
@@ -20,12 +22,16 @@ public class PrintUtils {
             if (TextUtils.isEmpty(printTemplate)) {
                 printTemplate = SharedPreUtil.getString(context, Constants.FLAG.PRINT_TEMPLATE_CACHE, "");
             }
-
+            Log.e("listArraythree2",printTemplate);
             int offset = 6,
                     h = 400,
                     v = 800,
-                    height = 400,
+                    height = 300,
                     qty = 1;
+//                    h = 200,
+//                    v = 200,
+//                    height = 200,
+//                    qty = 1;
 
             JSONArray templateArray = JSON.parseArray(printTemplate);
             if (templateArray != null && templateArray.size() > 0) {
@@ -41,6 +47,7 @@ public class PrintUtils {
                         int printY = (int) (toprate * dpi / 25.4);
                         double barHeight = FastjsonUtil.getDouble(templateObject, "LP_HEIGHT");
                         int barHeightInt = (int) (barHeight * dpi / 25.4);
+                        int  lp_width = FastjsonUtil.getInt(templateObject, "LP_WIDTH");
                         int fontSize = FastjsonUtil.getInt(templateObject, "LP_SIZE");
                         String printKey = FastjsonUtil.getText(templateObject, "LP_NAME");
 
@@ -62,11 +69,16 @@ public class PrintUtils {
                                     if ("BAR_BATCHCODE".equals(printKey)) {
                                         textFont = 7;
                                     }
-                                    printHelper = printHelper.printText(printText)
-                                            .setX(printX)
-                                            .setY(printY + (int) ((0.6 * dpi) / 25.4))
-                                            .setBold(2)
-                                            .setTextFont(textFont)
+                                    if (StringUtil.isEmpty(String.valueOf(fontSize))){
+                                        fontSize=1;
+                                    }
+                                    printHelper = printHelper.printText("")
+                                            .setTextAutLine(printX+"",printY + (int) ((0.6 * dpi) / 25.4)+"",lp_width,fontSize,false,false,printText)
+//                                            .setX(printX)
+//                                            .setY(printY + (int) ((0.6 * dpi) / 25.4))
+//                                            .setBold(2)
+//                                            .setTextFont(textFont)
+//                                            .setTextFont(fontSize)
                                             .build();
                                     break;
                                 case "qrcode"://打印二维码

+ 12 - 1
app/src/main/java/com/uas/pda_smart_com/util/VolleyRequest.java

@@ -1,5 +1,6 @@
 package com.uas.pda_smart_com.util;
 
+import android.app.Activity;
 import android.text.TextUtils;
 
 import com.android.volley.AuthFailureError;
@@ -10,6 +11,8 @@ import com.android.volley.VolleyError;
 import com.android.volley.toolbox.StringRequest;
 import com.uas.pda_smart_com.R;
 import com.uas.pda_smart_com.application.PdaApplication;
+import com.uas.pda_smart_com.global.GloableParams;
+import com.uas.pda_smart_com.tools.SharedPreUtil;
 import com.uas.pda_smart_com.tools.VolleyUtil;
 
 import java.io.UnsupportedEncodingException;
@@ -118,10 +121,18 @@ public class VolleyRequest {
                         try {
                             LogUtil.e("responErr", errorToast);
                             if (errorToast.length() >= 500) {
-                                httpCallback.onFail(httpParams.getFlag(), "请求异常");
+                                Activity activity=new Activity();
+                                String maName = SharedPreUtil.getString(activity, Constants.FLAG.ACCOUNT_NAME_CACHE, null);
+                                String userName = SharedPreUtil.getString(activity, "userNames", null);
+                                String password = SharedPreUtil.getString(activity, "passwords", null);
+                                VolleyUtil.requestUserLogin(activity, GloableParams.ADDRESS_LOGIN_APPLY, VolleyUtil.METHOD_POST,
+                                        VolleyUtil.FRAGMENT_LOGIN, maName, userName, password);
+                                httpCallback.onFail(httpParams.getFlag(), "已重新登录,请再次操作");
                             } else {
                                 httpCallback.onFail(httpParams.getFlag(), errorToast);
                             }
+
+
                         } catch (Exception e) {
                             e.printStackTrace();
                         }

+ 37 - 7
app/src/main/res/layout/dialog_recharge_modify.xml

@@ -9,12 +9,42 @@
     android:paddingRight="24dp"
     android:paddingTop="14dp">
 
-    <EditText
-        android:id="@+id/recharge_modify_et"
+
+    <LinearLayout
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="送货数量">
+        </TextView>
+        <EditText
+            android:id="@+id/recharge_modify_et"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@drawable/bg_line_edittext"
+            android:inputType="numberDecimal"
+            android:padding="10dp"
+            />
+    </LinearLayout>
+    <LinearLayout
+        android:layout_marginTop="@dimen/space_left_5"
+        android:orientation="horizontal"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:background="@drawable/bg_line_edittext"
-        android:inputType="numberDecimal"
-        android:padding="10dp"
-        />
+        android:layout_height="wrap_content">
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="备品数量">
+        </TextView>
+        <EditText
+            android:id="@+id/et_remarkqty"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:background="@drawable/bg_line_edittext"
+            android:inputType="numberDecimal"
+            android:padding="10dp"
+            />
+    </LinearLayout>
 </LinearLayout>

+ 39 - 31
app/src/main/res/layout/fragment_barcode_in_collect.xml

@@ -13,38 +13,7 @@
         android:layout_marginTop="@dimen/spacing_big"
         android:stretchColumns="1">
 
-        <TableRow
-            android:background="@color/white">
-
-            <TextView
-                style="@style/tl_tv_style"
-                android:layout_height="match_parent"
-                android:background="@color/white"
-                android:gravity="center"
-                android:padding="10dp"
-                android:text="条码"
-                android:textColor="@color/body_text_1"
-                android:textSize="16sp" />
-
-            <LinearLayout
-                android:layout_width="0dp"
-                android:layout_weight="1"
-                android:gravity="center_vertical">
-
-                <com.uas.pda_smart_com.view.ClearableEditText
-                    android:id="@+id/barcode_in_collect_barcode_et"
-                    style="@style/EditTextStyle"
-                    android:layout_width="0dp"
-                    android:layout_weight="1"
-                    android:focusable="true"
-                    android:focusableInTouchMode="true"
-                    android:hint="@string/please_collect_barcode"
-                    android:imeOptions="actionSend"
-                    android:textColor="@color/black" />
 
-            </LinearLayout>
-
-        </TableRow>
 
         <TableRow
             android:id="@+id/material_in_collect_old_tr"
@@ -97,8 +66,47 @@
                 android:focusableInTouchMode="true"
                 android:hint="请输入仓位"
                 android:textColor="@color/black" />
+            <CheckBox
+                android:id="@+id/ck_isclear"
+                android:layout_gravity="center"
+                android:gravity="center"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="保留仓位"
+                android:checked="true"/>
         </TableRow>
+        <TableRow
+            android:background="@color/white">
+
+            <TextView
+                style="@style/tl_tv_style"
+                android:layout_height="match_parent"
+                android:background="@color/white"
+                android:gravity="center"
+                android:padding="10dp"
+                android:text="条码"
+                android:textColor="@color/body_text_1"
+                android:textSize="16sp" />
+
+            <LinearLayout
+                android:layout_width="0dp"
+                android:layout_weight="1"
+                android:gravity="center_vertical">
+
+                <com.uas.pda_smart_com.view.ClearableEditText
+                    android:id="@+id/barcode_in_collect_barcode_et"
+                    style="@style/EditTextStyle"
+                    android:layout_width="0dp"
+                    android:layout_weight="1"
+                    android:focusable="true"
+                    android:focusableInTouchMode="true"
+                    android:hint="@string/please_collect_barcode"
+                    android:imeOptions="actionSend"
+                    android:textColor="@color/black" />
+
+            </LinearLayout>
 
+        </TableRow>
     </TableLayout>
 
     <Button

+ 82 - 0
app/src/main/res/layout/fragment_inventory_collect.xml

@@ -92,6 +92,42 @@
     </LinearLayout>
 
 
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="6dp"
+        android:orientation="horizontal">
+
+        <TextView
+            style="@style/inputItemCaption"
+            android:text="料号" />
+
+        <com.uas.pda_smart_com.view.ClearableEditText
+            android:id="@+id/cet_liaohao"
+            style="@style/inputItemValue"
+            android:hint="请输入料号" />
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="6dp"
+        android:orientation="horizontal">
+
+        <TextView
+            style="@style/inputItemCaption"
+            android:text="储位编号" />
+
+        <com.uas.pda_smart_com.view.ClearableEditText
+            android:id="@+id/cet_chuweibianhao"
+            style="@style/inputItemValue"
+            android:hint="请输入储位编号" />
+
+    </LinearLayout>
+
+
+
     <TextView
         android:id="@+id/inventory_collect_result_tv"
         android:layout_width="match_parent"
@@ -103,4 +139,50 @@
         android:visibility="gone"
         tools:text="采集成功,条码:786528238;数量:2;料号:209837;名称规格:瓶子" />
 
+    <LinearLayout
+        android:layout_marginTop="10dp"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="单号:"
+            android:textColor="@color/body_text_1"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/tv_pi_inoutno"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:textColor="@color/body_text_1"
+            android:textSize="14sp"
+            tools:text="YS1506002" />
+
+        <TextView
+            android:id="@+id/tv_chaxun"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="查询"
+            android:textSize="14sp"
+            android:textColor="@color/blue"
+            android:layout_marginEnd="10dp"
+            />
+
+        <CheckBox
+            android:id="@+id/stock_data_summary_cb"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:checked="true"
+            android:text="未完成" />
+
+    </LinearLayout>
+
+    <com.bin.david.form.core.SmartTable
+        android:id="@+id/st_data"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent" />
+
 </LinearLayout>

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

@@ -106,6 +106,7 @@
             android:padding="8dp"
             android:text="合并备料 >>"
             android:textColor="@color/white"
-            android:textSize="16sp" />
+            android:textSize="16sp"
+            android:visibility="gone"/>
     </RelativeLayout>
 </LinearLayout>

+ 424 - 293
app/src/main/res/layout/fragment_iocout_make_material_oper.xml

@@ -7,340 +7,471 @@
             android:id="@+id/include_menuactionbar"
             layout="@layout/actionbar_withback" />-->
 
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:orientation="vertical">
-        <!--no use-->
+
+
         <LinearLayout
             android:layout_width="match_parent"
-            android:layout_height="60dp"
-            android:orientation="horizontal"
-            android:padding="10dp"
-            android:visibility="gone">
-
-            <RadioGroup
-                android:id="@+id/iocout_collect_rg"
-                android:layout_width="0dp"
-                android:layout_height="40dp"
-                android:layout_weight="2"
+            android:layout_height="match_parent"
+            android:orientation="vertical">
+
+            <RelativeLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                >
+
+                <Button
+                    android:id="@+id/btn_oneprint"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/text_btn_print"
+                    />
+
+                <Button
+                    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"
+                    />
+            </RelativeLayout>
+
+            <!--no use-->
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="60dp"
                 android:orientation="horizontal"
+                android:padding="10dp"
                 android:visibility="gone">
 
-                <RadioButton
-                    android:id="@+id/iocout_collect_barcode_rb"
+                <RadioGroup
+                    android:id="@+id/iocout_collect_rg"
+                    android:layout_width="0dp"
+                    android:layout_height="40dp"
+                    android:layout_weight="2"
+                    android:orientation="horizontal"
+                    android:visibility="gone">
+
+                    <RadioButton
+                        android:id="@+id/iocout_collect_barcode_rb"
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1"
+                        android:background="@drawable/selector_collect_type_bg"
+                        android:button="@null"
+                        android:checked="true"
+                        android:clickable="true"
+                        android:gravity="center"
+                        android:text="条码号"
+                        android:textColor="@color/selector_collect_type_text"
+                        android:textSize="18sp" />
+
+                    <RadioButton
+                        android:id="@+id/iocout_collect_box_rb"
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1"
+                        android:background="@drawable/selector_collect_type_bg"
+                        android:button="@null"
+                        android:clickable="true"
+                        android:gravity="center"
+                        android:text="外箱号"
+                        android:textColor="@color/selector_collect_type_text"
+                        android:textSize="18sp" />
+                </RadioGroup>
+
+                <Spinner
+                    android:id="@+id/iocout_material_type_sp"
                     android:layout_width="0dp"
                     android:layout_height="match_parent"
-                    android:layout_weight="1"
-                    android:background="@drawable/selector_collect_type_bg"
-                    android:button="@null"
-                    android:checked="true"
-                    android:clickable="true"
-                    android:gravity="center"
-                    android:text="条码号"
-                    android:textColor="@color/selector_collect_type_text"
-                    android:textSize="18sp" />
-
-                <RadioButton
-                    android:id="@+id/iocout_collect_box_rb"
+                    android:layout_marginRight="10dp"
+                    android:layout_weight="2"
+                    android:background="@drawable/bg_blue_spinner"
+                    android:gravity="center">
+
+                </Spinner>
+
+                <Button
+                    android:id="@+id/iocout_collect_model_btn"
+                    style="@style/ButtonStyle"
                     android:layout_width="0dp"
                     android:layout_height="match_parent"
+                    android:layout_margin="0dp"
                     android:layout_weight="1"
-                    android:background="@drawable/selector_collect_type_bg"
-                    android:button="@null"
-                    android:clickable="true"
-                    android:gravity="center"
-                    android:text="外箱号"
-                    android:textColor="@color/selector_collect_type_text"
-                    android:textSize="18sp" />
-            </RadioGroup>
-
-            <Spinner
-                android:id="@+id/iocout_material_type_sp"
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_marginRight="10dp"
-                android:layout_weight="2"
-                android:background="@drawable/bg_blue_spinner"
-                android:gravity="center">
+                    android:text="在线"
+                    android:visibility="gone" />
+            </LinearLayout>
 
-            </Spinner>
 
-            <Button
-                android:id="@+id/iocout_collect_model_btn"
-                style="@style/ButtonStyle"
-                android:layout_width="0dp"
+            <android.support.v4.widget.NestedScrollView
+                android:layout_width="match_parent"
                 android:layout_height="match_parent"
-                android:layout_margin="0dp"
-                android:layout_weight="1"
-                android:text="在线"
-                android:visibility="gone" />
-        </LinearLayout>
-
-
-        <ScrollView
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content">
+                >
 
             <LinearLayout
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content"
+                android:layout_height="match_parent"
                 android:orientation="vertical"
-                android:padding="@dimen/padding_normal">
+                >
 
-                <LinearLayout
+                <ScrollView
                     android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:orientation="horizontal">
-
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="单号:"
-                        android:textColor="@color/body_text_1"
-                        android:textSize="14sp" />
-
-                    <TextView
-                        android:id="@+id/tv_pi_inoutno"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_weight="1"
-                        android:textColor="@color/body_text_1"
-                        android:textSize="14sp"
-                        tools:text="YS1506002" />
-
+                    android:layout_height="wrap_content">
 
-                    <TextView
-                        android:layout_width="wrap_content"
+                    <LinearLayout
+                        android:layout_width="match_parent"
                         android:layout_height="wrap_content"
-                        android:text="仓库:"
-                        android:textColor="@color/body_text_1"
-                        android:textSize="14sp"
-                        android:visibility="gone" />
-
-                    <TextView
-                        android:id="@+id/tv_pd_whcode"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_weight="1"
-                        android:textColor="@color/body_text_1"
-                        android:textSize="14sp"
-                        android:visibility="gone"
-                        tools:text="01" />
-
-                </LinearLayout>
-
-                <TableLayout
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginTop="@dimen/spacing_big"
-                    android:stretchColumns="1">
-
-                    <TableRow>
+                        android:orientation="vertical"
+                        android:padding="@dimen/padding_normal">
+
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:orientation="horizontal">
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="单号:"
+                                android:textColor="@color/body_text_1"
+                                android:textSize="14sp" />
+
+                            <TextView
+                                android:id="@+id/tv_pi_inoutno"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_weight="1"
+                                android:textColor="@color/body_text_1"
+                                android:textSize="14sp"
+                                tools:text="YS1506002" />
+
+
+                            <TextView
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="仓库:"
+                                android:textColor="@color/body_text_1"
+                                android:textSize="14sp"
+                                android:visibility="gone" />
+
+                            <TextView
+                                android:id="@+id/tv_pd_whcode"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_weight="1"
+                                android:textColor="@color/body_text_1"
+                                android:textSize="14sp"
+                                android:visibility="gone"
+                                tools:text="01" />
+
+                            <CheckBox
+                                android:id="@+id/stock_data_summary_cb"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:checked="true"
+                                android:text="未完成" />
+
+                        </LinearLayout>
+
+                        <TableLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="@dimen/spacing_big"
+                            android:stretchColumns="1">
+
+                            <TableRow>
+
+                                <TextView
+                                    android:id="@+id/iocout_material_type_tv"
+                                    style="@style/tl_tv_style"
+                                    android:layout_height="match_parent"
+                                    android:background="@color/gray_light"
+                                    android:drawableLeft="@drawable/switch_model"
+                                    android:drawablePadding="5dp"
+                                    android:gravity="center_vertical"
+                                    android:padding="10dp"
+                                    android:text="条码"
+                                    android:textColor="@color/body_text_1"
+                                    android:textSize="16sp" />
+                                <!--<TextView-->
+                                <!--android:id="@+id/iocout_material_type_tv"-->
+                                <!--style="@style/tl_tv_style"-->
+                                <!--android:layout_height="match_parent"-->
+                                <!--android:background="@color/gray_light"-->
+                                <!--android:gravity="center_vertical"-->
+                                <!--android:padding="10dp"-->
+                                <!--android:text="条码"-->
+                                <!--android:textColor="@color/body_text_1"-->
+                                <!--android:textSize="16sp" />-->
+
+                                <com.uas.pda_smart_com.view.ClearableEditText
+                                    android:id="@+id/et_bar_code"
+                                    style="@style/EditTextStyle"
+                                    android:focusable="true"
+                                    android:focusableInTouchMode="true"
+                                    android:hint="@string/please_collect_barcode"
+                                    android:textColor="@color/black" />
+                            </TableRow>
+
+                        </TableLayout>
+                        <!--no use-->
+                        <Button
+                            android:id="@+id/btn_confirm"
+                            style="@style/ButtonStyle"
+                            android:enabled="false"
+                            android:text="@string/confirm"
+                            android:visibility="gone" />
 
-                        <TextView
-                            android:id="@+id/iocout_material_type_tv"
-                            style="@style/tl_tv_style"
-                            android:layout_height="match_parent"
-                            android:background="@color/gray_light"
-                            android:drawableLeft="@drawable/switch_model"
-                            android:drawablePadding="5dp"
-                            android:gravity="center_vertical"
+                        <TableLayout
+                            android:id="@+id/iocout_collect_barcode_tl"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_marginBottom="5dp"
+                            android:layout_marginTop="@dimen/spacing_big"
+                            android:background="@drawable/bg_button_enabled"
                             android:padding="10dp"
-                            android:text="条码"
-                            android:textColor="@color/body_text_1"
-                            android:textSize="16sp" />
-                        <!--<TextView-->
-                        <!--android:id="@+id/iocout_material_type_tv"-->
-                        <!--style="@style/tl_tv_style"-->
-                        <!--android:layout_height="match_parent"-->
-                        <!--android:background="@color/gray_light"-->
-                        <!--android:gravity="center_vertical"-->
-                        <!--android:padding="10dp"-->
-                        <!--android:text="条码"-->
-                        <!--android:textColor="@color/body_text_1"-->
-                        <!--android:textSize="16sp" />-->
-
-                        <com.uas.pda_smart_com.view.ClearableEditText
-                            android:id="@+id/et_bar_code"
-                            style="@style/EditTextStyle"
-                            android:focusable="true"
-                            android:focusableInTouchMode="true"
-                            android:hint="@string/please_collect_barcode"
-                            android:textColor="@color/black" />
-                    </TableRow>
-
-                </TableLayout>
-                 <!--no use-->
-                <Button
-                    android:id="@+id/btn_confirm"
-                    style="@style/ButtonStyle"
-                    android:enabled="false"
-                    android:text="@string/confirm"
-                    android:visibility="gone" />
-
-                <TableLayout
-                    android:id="@+id/iocout_collect_barcode_tl"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginBottom="5dp"
-                    android:layout_marginTop="@dimen/spacing_big"
-                    android:background="@drawable/bg_button_enabled"
-                    android:padding="10dp"
-                    android:stretchColumns="1"
-                    android:visibility="gone"
-                    tools:visibility="visible">
-
-                    <TableRow>
+                            android:stretchColumns="1"
+                            android:visibility="gone"
+                            tools:visibility="visible">
+
+                            <TableRow>
+
+                                <TextView
+                                    android:id="@+id/tv_barcode_collection_success"
+                                    style="@style/tl_tv_style"
+                                    android:layout_gravity="center_vertical"
+                                    android:layout_marginLeft="10dp"
+                                    android:textColor="@color/white"
+                                    android:visibility="gone"
+                                    tools:visibility="visible"/>
+                            </TableRow>
+
+                            <TableRow>
+
+                                <TextView
+                                    style="@style/tl_tv_style"
+                                    android:layout_gravity="center_vertical"
+                                    android:text="@string/text_barcode_tailback" />
+
+                                <TextView
+                                    android:id="@+id/iocout_bar_code_tv"
+                                    style="@style/tv"
+                                    android:layout_marginLeft="3dp" />
+                            </TableRow>
+
+                            <TableRow>
+
+                                <TextView
+                                    style="@style/tl_tv_style"
+                                    android:layout_gravity="center_vertical"
+                                    android:text="@string/bar_remain" />
+
+                                <TextView
+                                    android:id="@+id/iocout_bar_remain_tv"
+                                    style="@style/tv"
+                                    android:layout_marginLeft="3dp" />
+                            </TableRow>
+
+                            <TableRow>
+
+                                <TextView
+                                    style="@style/tl_tv_style"
+                                    android:layout_gravity="center_vertical"
+                                    android:text="@string/text_procode_tailback" />
+
+                                <TextView
+                                    android:id="@+id/iocout_bar_prodcode_tv"
+                                    style="@style/tv"
+                                    android:layout_marginLeft="3dp" />
+                            </TableRow>
+                        </TableLayout>
+
+                        <TableLayout
+                            android:id="@+id/iocout_collect_box_tl"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_marginBottom="5dp"
+                            android:layout_marginTop="@dimen/spacing_big"
+                            android:background="@drawable/bg_button_enabled"
+                            android:padding="10dp"
+                            android:stretchColumns="1"
+                            android:visibility="gone"
+                            tools:visibility="visible"
+                            >
+
+                            <TableRow>
+
+                                <TextView
+                                    android:id="@+id/tv_box_collection_success"
+                                    style="@style/tl_tv_style"
+                                    android:layout_gravity="center_vertical"
+                                    android:layout_marginLeft="10dp"
+                                    android:textColor="@color/white"
+                                    android:visibility="gone" />
+                            </TableRow>
+
+                            <TableRow>
+
+                                <TextView
+                                    style="@style/tl_tv_style"
+                                    android:layout_gravity="center_vertical"
+                                    android:text="箱号:" />
+
+                                <TextView
+                                    android:id="@+id/iocout_box_tv"
+                                    style="@style/tv"
+                                    android:layout_marginLeft="3dp" />
+                            </TableRow>
+
+                            <TableRow>
+
+                                <TextView
+                                    style="@style/tl_tv_style"
+                                    android:layout_gravity="center_vertical"
+                                    android:text="箱内总数:" />
+
+                                <TextView
+                                    android:id="@+id/iocout_box_num_tv"
+                                    style="@style/tv"
+                                    android:layout_marginLeft="3dp" />
+                            </TableRow>
+
+                            <TableRow>
+
+                                <TextView
+                                    style="@style/tl_tv_style"
+                                    android:layout_gravity="center_vertical"
+                                    android:text="@string/text_procode_tailback" />
+
+                                <TextView
+                                    android:id="@+id/iocout_box_prodcode_tv"
+                                    style="@style/tv"
+                                    android:layout_marginLeft="3dp" />
+                            </TableRow>
+
+                            <TableRow>
+
+                                <TextView
+                                    style="@style/tl_tv_style"
+                                    android:layout_gravity="center_vertical"
+                                    android:text="仓库:" />
+
+                                <TextView
+                                    android:id="@+id/iocout_box_whcode_tv"
+                                    style="@style/tv"
+                                    android:layout_marginLeft="3dp" />
+                            </TableRow>
+                        </TableLayout>
 
                         <TextView
-                            android:id="@+id/tv_barcode_collection_success"
-                            style="@style/tl_tv_style"
-                            android:layout_gravity="center_vertical"
-                            android:layout_marginLeft="10dp"
-                            android:textColor="@color/white"
+                            android:id="@+id/iocout_collect_result"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="@dimen/spacing_big"
+                            android:background="@drawable/shape_msg_block"
+                            android:padding="10dp"
                             android:visibility="gone"
+                            tools:text="boxResultboxResultboxResultboxResult"
                             tools:visibility="visible"/>
-                    </TableRow>
-
-                    <TableRow>
-
-                        <TextView
-                            style="@style/tl_tv_style"
-                            android:layout_gravity="center_vertical"
-                            android:text="@string/text_barcode_tailback" />
-
-                        <TextView
-                            android:id="@+id/iocout_bar_code_tv"
-                            style="@style/tv"
-                            android:layout_marginLeft="3dp" />
-                    </TableRow>
-
-                    <TableRow>
-
-                        <TextView
-                            style="@style/tl_tv_style"
-                            android:layout_gravity="center_vertical"
-                            android:text="@string/bar_remain" />
 
                         <TextView
-                            android:id="@+id/iocout_bar_remain_tv"
-                            style="@style/tv"
-                            android:layout_marginLeft="3dp" />
-                    </TableRow>
+                            android:visibility="gone"
+                            android:id="@+id/iocout_next_material_information"
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_marginTop="@dimen/spacing_big"
+                            android:background="@drawable/shape_msg_block"
+                            android:padding="10dp"
+                            tools:text="物料:PD_PRODCODE, 名称规格:PR_DETAIL || PR_SPEC未备料数: PD_RESTQTY,最小包装数:PR_ZXBZS,仓位:BAR_LOCATION,有PD_BATCHCODE 则显示批号:PD_BATCHCODE" />
+                    </LinearLayout>
 
-                    <TableRow>
+                </ScrollView>
 
-                        <TextView
-                            style="@style/tl_tv_style"
-                            android:layout_gravity="center_vertical"
-                            android:text="@string/text_procode_tailback" />
-
-                        <TextView
-                            android:id="@+id/iocout_bar_prodcode_tv"
-                            style="@style/tv"
-                            android:layout_marginLeft="3dp" />
-                    </TableRow>
-                </TableLayout>
-
-                <TableLayout
-                    android:id="@+id/iocout_collect_box_tl"
+                <LinearLayout
+                    android:visibility="gone"
+                    android:id="@+id/line_tab"
+                    android:orientation="vertical"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_marginBottom="5dp"
-                    android:layout_marginTop="@dimen/spacing_big"
-                    android:background="@drawable/bg_button_enabled"
-                    android:padding="10dp"
-                    android:stretchColumns="1"
-                    android:visibility="gone"
-                    tools:visibility="visible">
-
-                    <TableRow>
+                    android:layout_weight="1">
+
+                    <TableLayout
+                        android:layout_marginTop="@dimen/space_top_8"
+                        style="@style/CardWhiteStyle_wrapheight">
+
+                        <TableRow>
+                            <TextView
+                                style="@style/CardContentTextStylepopu"
+                                android:textSize="@dimen/textsize_12"
+                                android:text="未备料数"/>
+                            <TextView
+                                android:id="@+id/tv_pd_restqty"
+                                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="需求数"/>
+                            <TextView
+                                android:id="@+id/tv_pd_ouqty"
+                                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_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>
 
-                        <TextView
-                            android:id="@+id/tv_box_collection_success"
-                            style="@style/tl_tv_style"
-                            android:layout_gravity="center_vertical"
-                            android:layout_marginLeft="10dp"
-                            android:textColor="@color/white"
-                            android:visibility="gone" />
-                    </TableRow>
-
-                    <TableRow>
-
-                        <TextView
-                            style="@style/tl_tv_style"
-                            android:layout_gravity="center_vertical"
-                            android:text="箱号:" />
-
-                        <TextView
-                            android:id="@+id/iocout_box_tv"
-                            style="@style/tv"
-                            android:layout_marginLeft="3dp" />
-                    </TableRow>
-
-                    <TableRow>
-
-                        <TextView
-                            style="@style/tl_tv_style"
-                            android:layout_gravity="center_vertical"
-                            android:text="箱内总数:" />
-
-                        <TextView
-                            android:id="@+id/iocout_box_num_tv"
-                            style="@style/tv"
-                            android:layout_marginLeft="3dp" />
-                    </TableRow>
+                </LinearLayout>
 
-                    <TableRow>
+                <com.bin.david.form.core.SmartTable
+                    android:id="@+id/st_data"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent" />
 
-                        <TextView
-                            style="@style/tl_tv_style"
-                            android:layout_gravity="center_vertical"
-                            android:text="@string/text_procode_tailback" />
+            </LinearLayout>
 
-                        <TextView
-                            android:id="@+id/iocout_box_prodcode_tv"
-                            style="@style/tv"
-                            android:layout_marginLeft="3dp" />
-                    </TableRow>
+            </android.support.v4.widget.NestedScrollView>
 
-                    <TableRow>
 
-                        <TextView
-                            style="@style/tl_tv_style"
-                            android:layout_gravity="center_vertical"
-                            android:text="仓库:" />
+        </LinearLayout>
 
-                        <TextView
-                            android:id="@+id/iocout_box_whcode_tv"
-                            style="@style/tv"
-                            android:layout_marginLeft="3dp" />
-                    </TableRow>
-                </TableLayout>
-
-                <TextView
-                    android:id="@+id/iocout_collect_result"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginTop="@dimen/spacing_big"
-                    android:background="@drawable/shape_msg_block"
-                    android:padding="10dp"
-                    android:visibility="gone"
-                    tools:text="boxResultboxResultboxResultboxResult"
-                    tools:visibility="visible"/>
 
-                <TextView
-                    android:id="@+id/iocout_next_material_information"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content"
-                    android:layout_marginTop="@dimen/spacing_big"
-                    android:background="@drawable/shape_msg_block"
-                    android:padding="10dp"
-                    tools:text="物料:PD_PRODCODE, 名称规格:PR_DETAIL || PR_SPEC未备料数: PD_RESTQTY,最小包装数:PR_ZXBZS,仓位:BAR_LOCATION,有PD_BATCHCODE 则显示批号:PD_BATCHCODE" />
-            </LinearLayout>
 
-        </ScrollView>
-    </LinearLayout>
 
 </RelativeLayout>

+ 21 - 2
app/src/main/res/layout/fragment_whcheck_barcode.xml

@@ -63,11 +63,19 @@
             <TextView
                 style="@style/Table_li_left"
                 android:text="@string/text_whcheck_pr_spec"/>
+
             <TextView
                 android:layout_width="wrap_content"
                 android:id="@+id/tv_pr_spec"
-                style="@style/Table_li_right"
-                android:textColor="@color/text_search"/>
+                android:gravity="left|center"
+                android:paddingStart="@dimen/space_left_8"
+                android:paddingEnd="@dimen/space_left_8"
+                android:layout_height="wrap_content"
+                android:textSize="17dp"
+                android:textColor="@color/text_search"
+                android:imeOptions="flagNoExtractUi"
+                />
+
         </TableRow>
         <!--供应商-->
         <TableRow>
@@ -113,6 +121,17 @@
                 style="@style/Table_li_right"
                 android:textColor="@color/text_search"/>
         </TableRow>
+        <!--批次号-->
+        <TableRow>
+            <TextView
+                style="@style/Table_li_left"
+                android:text="@string/batch_number"/>
+            <TextView
+                android:layout_width="wrap_content"
+                android:id="@+id/tv_batch_number"
+                style="@style/Table_li_right"
+                android:textColor="@color/text_search"/>
+        </TableRow>
         <!--条码状态-->
         <TableRow>
             <TextView

+ 0 - 73
app/src/main/res/layout/fragment_whcheck_makematerial.xml

@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--仓库管理:物料库存核查-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical" android:layout_width="match_parent"
-    android:layout_height="match_parent">
-    <!--搜索-->
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="@dimen/space_top_8"
-        android:layout_marginLeft="@dimen/space_left_8"
-        android:layout_marginRight="@dimen/space_right_8">
-        <com.uas.pda_smart_com.view.ClearableEditText
-            android:id="@+id/et_prodcode_whmm"
-            android:hint="物料编号"
-            style="@style/PopWinEditTextStyle"
-            android:layout_weight="2"/>
-        <com.uas.pda_smart_com.view.ClearableEditText
-            android:id="@+id/et_whcode_whmm"
-            android:layout_marginLeft="@dimen/space_left_8"
-            android:layout_marginRight="@dimen/space_right_8"
-            style="@style/PopWinEditTextStyle"
-            android:hint="仓位"
-            android:layout_weight="3"/>
-        <TextView
-            android:id="@+id/btn_search_whmm"
-            style="@style/PopWinButtonStyle"
-            android:layout_weight="4"
-            android:background="@drawable/search_16"/>
-    </LinearLayout>
-    <!--中部-->
-    <TableLayout
-        android:layout_marginTop="@dimen/space_top_8"
-        style="@style/CardWhiteStyle_wrapheight">
-
-        <TableRow>
-            <TextView
-                style="@style/CardContentTextStyle"
-                android:text="@string/text_fragment_whcheck_pr_detail"/>
-            <TextView
-                android:id="@+id/tv_pr_detail"
-                style="@style/CardContentTextStyle"
-                android:textColor="@color/text_search"/>
-        </TableRow>
-        <TableRow>
-            <TextView
-                style="@style/CardContentTextStyle"
-                android:text="@string/text_fragment_whcheck_pr_spec" />
-            <TextView
-                android:id="@+id/tv_pr_spec"
-                style="@style/CardContentTextStyle"
-                android:textColor="@color/text_search" />
-        </TableRow>
-    </TableLayout>
-
-    <LinearLayout
-        style="@style/CardWhiteSytle_fillheight"
-        android:background="@color/white">
-        <include layout="@layout/item_list_table"/>
-        <!--信息列表-->
-        <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>

+ 17 - 5
app/src/main/res/layout/item_list_storage_recharge.xml

@@ -54,19 +54,31 @@
         android:padding="4dp">
 
         <TextView
+            android:textStyle="bold"
             android:id="@+id/list_storage_recharge_prodcode_tv"
-            android:layout_width="0dp"
+            android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginLeft="8dp"
-            android:layout_weight="2"
+            android:layout_weight="1"
             android:textSize="14sp"
+            android:gravity="center"
+            tools:text="ZWLDK23723447479" />
+
+        <TextView
+            android:textStyle="bold"
+            android:id="@+id/list_storage_recharge_ban_qty_tv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="8dp"
+            android:layout_weight="1"
+            android:textSize="14sp"
+            android:gravity="center"
             tools:text="ZWLDK23723447479" />
 
         <LinearLayout
-            android:layout_width="0dp"
+            android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginLeft="4dp"
-            android:layout_weight="1">
+            android:layout_marginLeft="4dp">
 
             <TextView
                 android:id="@+id/list_storage_recharge_quantity_tv"

+ 13 - 0
app/src/main/res/layout/item_list_table.xml

@@ -42,4 +42,17 @@
         android:layout_width="0.5px"
         android:layout_height="fill_parent"
         android:background="#B8B8B8" />
+    <TextView
+        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>

+ 25 - 0
app/src/main/res/layout/list_storage_recharge_inspection.xml

@@ -32,6 +32,31 @@
             tools:text="2018-01-21" />
     </LinearLayout>
 
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/white"
+        android:orientation="horizontal"
+        android:padding="4dp">
+
+        <TextView
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="8dp"
+            android:layout_weight="1"
+            android:text="收料日期:"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/tv_receiving_aterials_time"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="3"
+            android:textColor="@color/black"
+            android:textSize="14sp"
+            tools:text="" />
+    </LinearLayout>
+
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"

+ 4 - 2
app/src/main/res/layout/popwin_whbatch_breakpackage.xml

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-   android:layout_width="match_parent"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
     android:layout_height="match_parent">
 
     <RelativeLayout
@@ -60,7 +61,8 @@
                 android:id="@+id/btn_print"
                 android:layout_toLeftOf="@id/btn_dialog_confirm_ok"
                 style="@style/PopwinCancleButtonStyle"
-                android:text="@string/text_btn_print"/>
+                android:text="@string/text_btn_print"
+                tools:ignore="NotSibling" />
         </RelativeLayout>
     </RelativeLayout>
 </RelativeLayout>

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

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-
+    <color name="caption_text_color">#666666</color>
     <color name="search_gray">#dedbdb</color>
     <color name="bg_loading">#66000000</color>
     <color name="bg_content">#F9F9FB</color>

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

@@ -1,12 +1,12 @@
 <resources>
-    <string name="my_app_name">UAS智能终端系统</string>
+    <string name="my_app_name">通用仓库-UAS智能终端系统</string>
     <string name="my_app_name_test">PDA-仓库通用</string>
     <string name="hello_world">Hello world!</string>
     <string name="action_settings">Settings</string>
     <string name="title_activity_connect_server_fragment">ConnectServerFragment</string>
 
     <string name="btn_search">搜索</string>
-
+    <string name="text_fragment_whcheck_pd_prodcode">物料编号</string>
     <!--View empty-->
     <string name="empty_message">暂无记录</string>
     <string name="loading_message">请等待!</string>
@@ -429,4 +429,10 @@
         <item>重新采集</item>
         <item>未提交列表</item>
     </string-array>
+
+    <string name="batch_number">批次号</string>
+    <string name="Inventory_barcode_printing">库存条码打印</string>
+    <string name="Please_enter_barcode">请输入条码</string>
+
+
 </resources>

+ 34 - 0
app/src/main/res/values/styles.xml

@@ -761,4 +761,38 @@
         <item name="android:background">@color/transparent</item>
         <item name="android:textSize">@dimen/app_text_size_body_2</item>
     </style>
+    <style name="EditTextUnableStyle" parent="EditTextStyle">
+        <item name="android:enabled">false</item>
+        <item name="android:background">#ececec</item>
+        <item name="android:textColor">@color/black</item>
+    </style>
+
+    <style name="jltEditTextStyle">
+        <item name="android:background">@drawable/bg_edittext</item>
+        <item name="android:gravity">left|center</item>
+        <item name="android:paddingRight">12dp</item>
+        <item name="android:paddingLeft">12dp</item>
+        <item name="android:textColorHint">@color/gray_light</item>
+        <item name="android:minHeight">40dp</item>
+        <item name="android:layout_height">wrap_content</item>
+        <item name="android:layout_width">match_parent</item>
+        <item name="android:textSize">14sp</item>
+        <item name="android:textColor">@color/text_normal</item>
+        <item name="android:maxLines">4</item>
+        <!--        <item name="android:singleLine">true</item>-->
+        <item name="android:imeOptions">flagNoExtractUi</item>
+    </style>
+    <style name="take_photo_anim" parent="android:Animation">
+        <item name="android:windowEnterAnimation">@anim/pop_enter_anim</item>
+        <item name="android:windowExitAnimation">@anim/pop_exit_anim</item>
+    </style>
+
+
+
+    <style name="CardContentTextStylepopu" parent="PopWinContentTextStyle"><!--gravity:right-->
+        <item name="android:layout_marginTop">3dp</item>
+        <item name="android:layout_marginBottom">3dp</item>
+        <item name="android:layout_marginLeft">@dimen/space_left_inner</item>
+        <item name="android:layout_marginRight">@dimen/space_right_inner</item>
+    </style>
 </resources>

+ 3 - 1
app/src/main/res/xml/file_paths.xml

@@ -1,5 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <paths xmlns:android="http://schemas.android.com/apk/res/android">
-    <external-path path="Android/data/com.uas.pda_smart_com/"        name="files_root" />
+    <external-path
+        path="Android/data/com.uas.pda_smart_com/"
+        name="files_root" />
     <external-path path="." name="external_storage_root" />
 </paths>

+ 16 - 5
build.gradle

@@ -3,6 +3,12 @@
 
 buildscript {
     repositories {
+        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
+        maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
+        maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
+        maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
+        maven { url "https://jitpack.io" }
+        mavenCentral()
         google()
         jcenter()
         maven {
@@ -11,7 +17,7 @@ buildscript {
         }
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.1.3'
+        classpath 'com.android.tools.build:gradle:4.2.1'
         classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
         classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
 //        classpath 'com.tencent.mm:AndResGuard-gradle-plugin:1.2.13'
@@ -23,13 +29,18 @@ buildscript {
 
 allprojects {
     repositories {
+        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
+        maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
+        maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
+        maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
+        maven { url "https://jitpack.io" }
+        mavenCentral()
         google()
         jcenter()
         maven {
             url 'https://maven.google.com/'
             name 'Google'
         }
-        maven { url "https://jitpack.io" }
     }
 }
 
@@ -39,12 +50,12 @@ task clean(type: Delete) {
 
 ext {
     android = [
-            minSdkVersion    : 16,
+            minSdkVersion    : 17,
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 21,
-            versionName      : "v2.1"
+            versionCode      : 55,
+            versionName      : "v2.5.3"
     ]
 
     depsVersion = [

+ 1 - 1
gradle/wrapper/gradle-wrapper.properties

@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip

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

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

+ 1 - 1
pda_libs/pulltoreflashlibrary/src/main/AndroidManifest.xml

@@ -4,7 +4,7 @@
     android:versionCode="2110"
     android:versionName="2.1.1" >
 
-    <uses-sdk android:minSdkVersion="12" />
+<!--    <uses-sdk android:minSdkVersion="12" />-->
 
     <application />
 

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است