Parcourir la source

包装采集增加撤销封箱,增加撤销入箱

ChengJH il y a 1 an
Parent
commit
14eca61473
66 fichiers modifiés avec 5274 ajouts et 118 suppressions
  1. 43 0
      .idea/misc.xml
  2. 17 8
      app/src/main/AndroidManifest.xml
  3. 918 0
      app/src/main/java/com/uas/hystorage/activity/AppendBindingActivity.java
  4. 15 1
      app/src/main/java/com/uas/hystorage/activity/FunctionActivity.java
  5. 96 7
      app/src/main/java/com/uas/hystorage/activity/IndexActivity.java
  6. 642 0
      app/src/main/java/com/uas/hystorage/activity/JumpCameraActivity.java
  7. 37 0
      app/src/main/java/com/uas/hystorage/adapter/CangKuAdapter.java
  8. 6 2
      app/src/main/java/com/uas/hystorage/adapter/MyaddAdapter.java
  9. 30 0
      app/src/main/java/com/uas/hystorage/bean/AddRuKubean.java
  10. 27 0
      app/src/main/java/com/uas/hystorage/bean/AddworkorderBean.java
  11. 20 0
      app/src/main/java/com/uas/hystorage/bean/BeansJsonData.java
  12. 9 0
      app/src/main/java/com/uas/hystorage/bean/DlMacodesBean.java
  13. 93 1
      app/src/main/java/com/uas/hystorage/bean/MaintainitemBean.java
  14. 23 0
      app/src/main/java/com/uas/hystorage/bean/PopWinBean.java
  15. 10 0
      app/src/main/java/com/uas/hystorage/bean/ShuaXinListbean.java
  16. 3 3
      app/src/main/java/com/uas/hystorage/fragment/BadExchangeFragment.java
  17. 65 1
      app/src/main/java/com/uas/hystorage/fragment/ChargingSummaryFragment.java
  18. 185 1
      app/src/main/java/com/uas/hystorage/fragment/DecisionByLotFragment.java
  19. 5 1
      app/src/main/java/com/uas/hystorage/fragment/GdMaterialInFragment.java
  20. 275 5
      app/src/main/java/com/uas/hystorage/fragment/GdWorkSwitchFragment.java
  21. 1 1
      app/src/main/java/com/uas/hystorage/fragment/GoodOrBadAddDetailFragment.java
  22. 121 1
      app/src/main/java/com/uas/hystorage/fragment/GoodOrBadFragment.java
  23. 346 0
      app/src/main/java/com/uas/hystorage/fragment/PCHListFragment.java
  24. 171 18
      app/src/main/java/com/uas/hystorage/fragment/PackageAcquisitionFragment.java
  25. 371 0
      app/src/main/java/com/uas/hystorage/fragment/PreProcessingReportFragment.java
  26. 33 3
      app/src/main/java/com/uas/hystorage/fragment/PutintoAdd_Fragment.java
  27. 2 0
      app/src/main/java/com/uas/hystorage/fragment/QualityManageFragment.java
  28. 1 1
      app/src/main/java/com/uas/hystorage/fragment/ReworkDecisionFragment.java
  29. 284 0
      app/src/main/java/com/uas/hystorage/fragment/RolloutFragment.java
  30. 11 9
      app/src/main/java/com/uas/hystorage/fragment/StartsAndStopsFragment.java
  31. 22 11
      app/src/main/java/com/uas/hystorage/fragment/WorkOrderSearchFragment.java
  32. 34 3
      app/src/main/java/com/uas/hystorage/global/GloableParams.java
  33. 123 0
      app/src/main/java/com/uas/hystorage/view/TakePhotoPopWin.java
  34. 1 1
      app/src/main/java/com/uas/hystorage/view/left/ItemRemoveRecyclerView.java
  35. 12 0
      app/src/main/res/anim/pop_enter_anim.xml
  36. 11 0
      app/src/main/res/anim/pop_exit_anim.xml
  37. 398 0
      app/src/main/res/layout/activity_append_binding.xml
  38. 38 0
      app/src/main/res/layout/activity_index.xml
  39. 243 0
      app/src/main/res/layout/activity_jump_camera.xml
  40. 25 0
      app/src/main/res/layout/fragment_decisionbylot.xml
  41. 6 0
      app/src/main/res/layout/fragment_gd_material_in.xml
  42. 8 0
      app/src/main/res/layout/fragment_gd_work_switch.xml
  43. 16 0
      app/src/main/res/layout/fragment_goodorbadl.xml
  44. 40 7
      app/src/main/res/layout/fragment_packageacquisition.xml
  45. 57 0
      app/src/main/res/layout/fragment_pre_processing_report.xml
  46. 26 0
      app/src/main/res/layout/fragment_putintoadd.xml
  47. 2 0
      app/src/main/res/layout/fragment_reworkdecision.xml
  48. 108 2
      app/src/main/res/layout/fragment_rollout.xml
  49. 25 16
      app/src/main/res/layout/fragment_starts_stops.xml
  50. 3 2
      app/src/main/res/layout/fuzzy_search_item.xml
  51. 27 0
      app/src/main/res/layout/item_ruku_detail.xml
  52. 11 0
      app/src/main/res/layout/myarry_item.xml
  53. 56 0
      app/src/main/res/layout/recyclerview_item2.xml
  54. 77 0
      app/src/main/res/layout/start_detail_one.xml
  55. 26 0
      app/src/main/res/layout/take_photo_pop.xml
  56. 4 1
      app/src/main/res/values/styles.xml
  57. 6 3
      build.gradle
  58. 2 2
      pda_libs/pulltoreflashlibrary/build/generated/source/buildConfig/debug/com/handmark/pulltorefresh/library/BuildConfig.java
  59. BIN
      pda_libs/pulltoreflashlibrary/build/intermediates/classes/debug/com/handmark/pulltorefresh/library/BuildConfig.class
  60. 1 1
      pda_libs/pulltoreflashlibrary/build/intermediates/incremental/packageDebugResources/compile-file-map.properties
  61. BIN
      pda_libs/pulltoreflashlibrary/build/intermediates/intermediate-jars/debug/classes.jar
  62. BIN
      pda_libs/pulltoreflashlibrary/build/intermediates/intermediate-jars/debug/full.jar
  63. 2 2
      pda_libs/pulltoreflashlibrary/build/intermediates/manifests/aapt/debug/AndroidManifest.xml
  64. 1 1
      pda_libs/pulltoreflashlibrary/build/intermediates/manifests/aapt/debug/output.json
  65. 2 2
      pda_libs/pulltoreflashlibrary/build/intermediates/manifests/full/debug/AndroidManifest.xml
  66. 1 1
      pda_libs/pulltoreflashlibrary/build/intermediates/manifests/full/debug/output.json

+ 43 - 0
.idea/misc.xml

@@ -5,6 +5,49 @@
       <configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
     </configurations>
   </component>
+  <component name="NullableNotNullManager">
+    <option name="myDefaultNullable" value="org.jetbrains.annotations.Nullable" />
+    <option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
+    <option name="myNullables">
+      <value>
+        <list size="14">
+          <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
+          <item index="1" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
+          <item index="2" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
+          <item index="3" class="java.lang.String" itemvalue="androidx.annotation.Nullable" />
+          <item index="4" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNullable" />
+          <item index="5" class="java.lang.String" itemvalue="com.android.annotations.Nullable" />
+          <item index="6" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
+          <item index="7" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
+          <item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.Nullable" />
+          <item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableDecl" />
+          <item index="10" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NullableType" />
+          <item index="11" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.Nullable" />
+          <item index="12" class="java.lang.String" itemvalue="io.reactivex.annotations.Nullable" />
+          <item index="13" class="java.lang.String" itemvalue="io.reactivex.rxjava3.annotations.Nullable" />
+        </list>
+      </value>
+    </option>
+    <option name="myNotNulls">
+      <value>
+        <list size="13">
+          <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
+          <item index="1" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
+          <item index="2" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
+          <item index="3" class="java.lang.String" itemvalue="androidx.annotation.NonNull" />
+          <item index="4" class="java.lang.String" itemvalue="androidx.annotation.RecentlyNonNull" />
+          <item index="5" class="java.lang.String" itemvalue="com.android.annotations.NonNull" />
+          <item index="6" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
+          <item index="7" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.qual.NonNull" />
+          <item index="8" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullDecl" />
+          <item index="9" class="java.lang.String" itemvalue="org.checkerframework.checker.nullness.compatqual.NonNullType" />
+          <item index="10" class="java.lang.String" itemvalue="org.eclipse.jdt.annotation.NonNull" />
+          <item index="11" class="java.lang.String" itemvalue="io.reactivex.annotations.NonNull" />
+          <item index="12" class="java.lang.String" itemvalue="io.reactivex.rxjava3.annotations.NonNull" />
+        </list>
+      </value>
+    </option>
+  </component>
   <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/out" />
   </component>

+ 17 - 8
app/src/main/AndroidManifest.xml

@@ -14,12 +14,20 @@
         android:usesCleartextTraffic="true"
         tools:replace="allowBackup,label,theme"
         tools:targetApi="m">
-        <activity android:name=".activity.JumpActivity"
-            android:screenOrientation="portrait">
-        </activity>
+        <activity android:name=".activity.AppendBindingActivity"></activity>
+        <activity android:name=".activity.JumpCameraActivity"></activity>
+        <activity
+            android:name=".activity.JumpActivity"
+            android:launchMode="singleTask"
+            android:screenOrientation="portrait"
+            android:windowSoftInputMode="adjustUnspecified|stateHidden">
+            <intent-filter>
+                <action android:name="android.media.action.IMAGE_CAPTURE" />
 
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+        </activity>
         <activity android:name=".activity.BaseSelectActivity" />
-
         <activity android:name=".activity.HomeActivity" />
         <activity
             android:name=".activity.SplashActivity"
@@ -48,7 +56,7 @@
             android:label="@string/title_activity_function"
             android:launchMode="singleTask"
             android:screenOrientation="portrait"
-            android:windowSoftInputMode="adjustUnspecified|stateHidden" />
+            android:windowSoftInputMode="adjustUnspecified|stateHidden"></activity>
         <activity
             android:name=".activity.SearchMaterialActivity"
             android:label="@string/material_number_search"
@@ -56,8 +64,9 @@
         <activity
             android:name=".activity.CommonSeclecActivity"
             android:screenOrientation="portrait" />
-        <activity android:name=".activity.LineSelectActivity"></activity>
-        <activity android:name=".activity.SelectNetAcitivty"></activity>
+        <activity android:name=".activity.LineSelectActivity" />
+        <activity android:name=".activity.SelectNetAcitivty" />
+
         <provider xmlns:tools="http://schemas.android.com/tools"
             android:name="android.support.v4.content.FileProvider"
             android:authorities="com.uas.hystorage.fileprovider"
@@ -83,8 +92,8 @@
     <uses-permission android:name="android.permission.BLUETOOTH" />
     <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
     <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" />
 
 </manifest>

+ 918 - 0
app/src/main/java/com/uas/hystorage/activity/AppendBindingActivity.java

@@ -0,0 +1,918 @@
+package com.uas.hystorage.activity;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.drawable.BitmapDrawable;
+import android.support.annotation.Nullable;
+import android.support.v7.widget.DividerItemDecoration;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.text.Editable;
+import android.text.TextWatcher;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.Window;
+import android.view.inputmethod.EditorInfo;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.AutoCompleteTextView;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.EditText;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.PopupWindow;
+import android.widget.Spinner;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.android.volley.Request;
+import com.android.volley.toolbox.StringRequest;
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.uas.hystorage.R;
+import com.uas.hystorage.adapter.DlMacodeAdapter;
+import com.uas.hystorage.bean.DlMacodesBean;
+import com.uas.hystorage.global.GloableParams;
+import com.uas.hystorage.tools.SharedPreUtil;
+import com.uas.hystorage.util.CameraUtil;
+import com.uas.hystorage.util.CommonUtil;
+import com.uas.hystorage.util.Constants;
+import com.uas.hystorage.util.FastjsonUtil;
+import com.uas.hystorage.util.HttpCallback;
+import com.uas.hystorage.util.HttpParams;
+import com.uas.hystorage.util.LogUtil;
+import com.uas.hystorage.util.MyArrayAdapter;
+import com.uas.hystorage.util.StringUtil;
+import com.uas.hystorage.util.VollyRequest;
+import com.uas.hystorage.view.ClearableEditText;
+import com.uuzuche.lib_zxing.activity.CaptureActivity;
+import com.uuzuche.lib_zxing.activity.CodeUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import razerdp.basepopup.BasePopupWindow;
+
+public class AppendBindingActivity extends BaseActivity implements View.OnClickListener {
+    protected String TAG = "AppendBindingActivity";
+    private Button mBackButton;
+    private TextView tv_gangwei;
+    private TextView mOlIdTv;
+    private TextView mOlNUmbersTv;
+    private TextView mOlNameTv;
+    private ClearableEditText mOlNumbersEt;
+    private ClearableEditText mOlUnuseEt;
+    private ClearableEditText mOlRemarkEt;
+    private ClearableEditText mOlNextEt;
+    private Button mOlExChangeBtn;
+    private StringRequest mStringRequest;
+    private String ma_code;
+    private String sc_code;
+    private Spinner mUnitspinner;
+    private List<String> unitList;
+    private ArrayAdapter<String> unitAdapter;
+    private String unitSelctStr = "PCS";
+    private String lastUnit = "PCS";
+    private double unitNumber = 1000;
+    private double lastunitNumber = 1000;
+    private double lastunreportqty = 0.00;
+    //
+    private AutoCompleteTextView mSearch;
+    private RecyclerView fuzzyRv;
+    private List<FuzzyBean> fuzzyBeans;
+    private FuzzySearchAdapter fuzzyAdapter;
+    private LinearLayout startLlS;
+    private TextView gongdanhaoTv;
+    private TextView gongdanshuTv;
+    private TextView yibaogongTv;
+    private TextView changpingTv;
+    private TextView mingchenTv;
+    private TextView guigeTv;
+    private TextView kind_tv;
+    private JSONObject detailOne;
+    private Button startBtn;
+    private int mFocusId;
+    private static final int SCAN_BARCODE_CODE = 201;
+    private TextView tv_mju;
+    private boolean chentrueorflase;
+    private String mojucode;
+    private MyArrayAdapter autoStringAdapter;
+
+    private String rb_changetext;
+    private String dlstr_macodes;
+    private TextView tv_muju;
+    private String listsize;
+    private String de_location;
+    private TextView tv_jitaihao;
+    private List<DlMacodesBean> ComaddBeanList;
+    private ClearableEditText editadd_et;
+    private RecyclerView rv_line_add_port_data;
+    private DlMacodeAdapter dlMacodeAdapter;
+    private String dl_macodEdata;
+    private String pr_sdetail;
+    private ImageView iv_add_data;
+    private TextView tv_outqty;
+    private TextView tv_unoutqty;
+    private CheckBox check_unbind;
+
+
+    @Override
+    protected void initViews() {
+        setContentView(R.layout.activity_append_binding);
+        mBackButton = findViewById(R.id.btn_actionbar_withback);
+        startBtn = findViewById(R.id.start_btn);
+        startLlS = findViewById(R.id.start_ll);
+        gongdanhaoTv = findViewById(R.id.gongdanhao_tv);
+        gongdanshuTv = findViewById(R.id.gongdanshu_tv);
+        yibaogongTv = findViewById(R.id.yibaogong_tv);
+        tv_outqty = findViewById(R.id.tv_outqty);
+        tv_unoutqty = findViewById(R.id.tv_unoutqty);
+        check_unbind = findViewById(R.id.check_unbind);
+
+
+
+        changpingTv = findViewById(R.id.changping_tv);
+        mingchenTv = findViewById(R.id.mingchen_tv);
+        guigeTv = findViewById(R.id.guige_tv);
+        kind_tv = findViewById(R.id.kind_tv);
+        mOlIdTv = findViewById(R.id.ol_id_tv);
+        tv_jitaihao = findViewById(R.id.tv_jitaihao);
+        mOlNUmbersTv = findViewById(R.id.olun_numbers_tv);
+        mOlNameTv = findViewById(R.id.ol_name_tv);
+        mOlNumbersEt = findViewById(R.id.ol_numbers_et);
+        mOlUnuseEt = findViewById(R.id.ol_unuse_et);
+        mOlRemarkEt = findViewById(R.id.ol_remark_et);
+        mOlExChangeBtn = findViewById(R.id.ol_exchange_btn);
+        mOlNextEt = findViewById(R.id.ol_next_et);
+        iv_add_data = findViewById(R.id.iv_add_data);
+        tv_mju = findViewById(R.id.tv_mju);
+        findViewById(R.id.scan_code_im).setOnClickListener(this);
+        findViewById(R.id.ol_next_im).setOnClickListener(this);
+        tv_gangwei=findViewById(R.id.tv_gangwei);
+        tv_muju = findViewById(R.id.tv_muju);
+
+
+
+
+        String name = SharedPreUtil.getString(AppendBindingActivity.this, Constants.FLAG.CACHE_USER_EMNAME, null);
+        mOlNameTv.setText(name);
+        mSearch = findViewById(R.id.fl_search_actext);
+        startLlS = findViewById(R.id.start_ll);
+        //模糊查询展示的工单号列表
+        fuzzyRv = findViewById(R.id.fuzzy_rv);
+        fuzzyRv.addItemDecoration(new DividerItemDecoration(AppendBindingActivity.this, LinearLayout.VERTICAL));
+        fuzzyRv.setLayoutManager(new LinearLayoutManager(AppendBindingActivity.this));
+        fuzzyBeans = new ArrayList<>();
+        fuzzyAdapter = new FuzzySearchAdapter(fuzzyBeans);
+        fuzzyAdapter.setmList(fuzzyBeans);
+        fuzzyRv.setAdapter(fuzzyAdapter);
+        mSearch.requestFocus();
+        InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
+        imm.showSoftInput(mSearch, InputMethodManager.RESULT_SHOWN);
+        imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY);
+//        mSearch.setThreshold(1);
+
+//        mojucode = SharedPreUtil.getString(AppendBindingActivity.this, "mojucode", null);
+        mBackButton.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                finish();
+            }
+        });
+    }
+
+    @Override
+    protected void initEvents() {
+
+
+
+
+
+
+
+        initUnitView();
+        mSearch.addTextChangedListener(new TextWatcher() {
+            @Override
+            public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
+            @Override
+            public void onTextChanged(CharSequence s, int start, int before, int count) { }
+            @Override
+            public void afterTextChanged(Editable s) {
+                if (s.length() >= 3) {
+                    String mSearchStr = s.toString().trim();
+                    LogUtil.i("mSearchStr",mSearchStr);
+                    fuzzySearchMa(mSearchStr);
+//                    mSearch.requestFocus();
+                } else {
+                    fuzzyBeans.clear();
+                    setfuzzyAdapter(fuzzyBeans);
+                    return;
+                }
+            }
+        });
+
+
+        //------------------------------模具模糊搜索------------------------
+//        if (!StringUtil.isEmpty(mojucode)){
+//            ce_moju.setText(mojucode);
+//        }
+        fuzzyAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+            @Override
+            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                FuzzyBean bean = fuzzyAdapter.getBeanByPositon(position);
+                String macode = bean.getMA_CODE();
+                if (macode.length() > 0){
+                    getLastBean(macode);
+                    mSearch.setText("");
+                    mSearch.requestFocus();
+                    mSearch.setSelection(mSearch.getText().length());
+                }
+
+            }
+        });
+
+
+
+
+
+        mOlExChangeBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                doExChangeClick();
+            }
+        });
+
+        mUnitspinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+            @Override
+            public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
+                unitSelctStr = unitList.get(pos);  //取出选中的值
+                LogUtil.i("unitSelctStr", unitSelctStr);
+                upDateUnitNumber();
+            }
+            @Override
+            public void onNothingSelected(AdapterView<?> parent) {
+            }
+        });
+
+        //报废数输入监听
+        mOlUnuseEt.addTextChangedListener(new TextWatcher() {
+            @Override
+            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+            }
+
+            @Override
+            public void onTextChanged(CharSequence s, int start, int before, int count) {
+                mOlUnuseEt.requestFocus();
+            }
+
+            @Override
+            public void afterTextChanged(Editable s) {
+                if (!StringUtil.isEmpty(s.toString())) {
+                    Double curUnseNumber = Double.valueOf(s.toString()) * unitNumber; //当前输入报废数
+                    Double lastCanUseNumber = lastunreportqty * lastunitNumber; //当前返回可报工数
+                    if (curUnseNumber > lastCanUseNumber) {
+                        CommonUtil.toastNoRepeat(AppendBindingActivity.this, "报工数与报废数之和不可以大于上一工序报工数");
+                        return;
+                    } else {
+                        Double curCanUseing = lastCanUseNumber - curUnseNumber; //当前可报工数
+                        mOlNumbersEt.setText(Double.valueOf(curCanUseing / unitNumber) + "");
+                    }
+                }
+            }
+        });
+        //启动按钮启动事件
+        startBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+//                doExChangeClick();
+                getAddMa();
+            }
+        });
+    }
+
+
+    //工单细查询
+    private void getLastBean(String clickCode) {
+//        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_PDA_GETMACODE)
+                        .method(Request.Method.GET)
+                        .tag(TAG + "getMaCode")
+                        .flag(0)
+                        .addParam("code", clickCode)
+                        .addParam("sc_code",sc_code)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
+//                        progressDialog.dismiss();
+                        if (isSuccess){
+                            JSONObject dataObject = FastjsonUtil.getJSONObject(o.toString(),"data");
+                            if (dataObject == null){
+                                CommonUtil.toastNoRepeat(AppendBindingActivity.this,"暂无工单详细信息");
+                                startLlS.setVisibility(View.GONE);
+                                fuzzyRv.setVisibility(View.VISIBLE);
+                                return;
+                            }else {
+                                startLlS.setVisibility(View.VISIBLE);
+                                fuzzyRv.setVisibility(View.GONE);
+                                fuzzyBeans.clear();
+                                detailOne = dataObject;
+                                gongdanhaoTv.setText(dataObject.getString("MA_CODE") == null ? "-" :dataObject.getString("MA_CODE"));
+                                gongdanshuTv.setText(dataObject.getInteger("MA_QTY") == null ? "-":dataObject.getInteger("MA_QTY")+"");
+//                                yibaogongTv.setText(dataObject.getInteger("MA_REPORTYQTY") == null ? "-": dataObject.getInteger("MA_REPORTYQTY")+"");
+                                yibaogongTv.setText(dataObject.getInteger("MA_MADEQTY") == null ? "-": dataObject.getInteger("MA_MADEQTY")+"");
+                                changpingTv.setText(dataObject.getString("MA_PRODCODE") == null ? "-" :dataObject.getString("MA_PRODCODE"));
+                                mingchenTv.setText(dataObject.getString("PR_DETAIL") == null ? "-" : dataObject.getString("PR_DETAIL"));
+                                guigeTv.setText(dataObject.getString("PR_SPEC") == null ? "-" :dataObject.getString("PR_SPEC")+"");
+                                kind_tv.setText(dataObject.getString("MA_KIND") == null ? "-" :dataObject.getString("MA_KIND")+"");
+
+                                tv_outqty.setText(dataObject.getString("OUTQTY") == null ? "-" : dataObject.getString("OUTQTY"));
+                                tv_unoutqty.setText(dataObject.getString("UNOUTQTY") == null ? "-" : dataObject.getString("UNOUTQTY"));
+//                                tv_outqty.setText("");
+//                                tv_unoutqty.setText("");
+                            }
+                        }
+                    }
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+//                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(AppendBindingActivity.this, failStr);
+                    }
+                });
+    }
+
+    private void setfuzzyAdapter(List<FuzzyBean> mList) {
+        fuzzyRv.setVisibility(View.VISIBLE);
+        LogUtil.i("mList2", JSON.toJSONString(mList));
+        if (fuzzyAdapter == null){
+            fuzzyAdapter = new FuzzySearchAdapter(mList);
+            fuzzyRv.setAdapter(fuzzyAdapter);
+        }else {
+            fuzzyAdapter.setmList(mList);
+            fuzzyAdapter.notifyDataSetChanged();
+        }
+    }
+
+    //模糊查询
+    private void fuzzySearchMa(String code){
+//        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_PDA_FUZZYSEARCHMA)
+                        .method(Request.Method.GET)
+                        .tag(TAG + "fuzzySearchMa")
+                        .flag(0)
+                        .addParam("ma_code", code)
+                        .addParam("sc_code", sc_code)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+//                        progressDialog.dismiss();
+                        Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
+                        if (isSuccess){
+                            JSONArray dataArray = FastjsonUtil.getJSONArray(o.toString(),"data");
+                            if (dataArray == null || dataArray.size() == 0){
+                                CommonUtil.toastNoRepeat(AppendBindingActivity.this,"未搜索到匹配数据");
+                                fuzzyBeans.clear();
+                                setfuzzyAdapter(fuzzyBeans);
+//                                reset();
+                                return;
+                            }
+                            FuzzyBean bean = null;
+                            if (fuzzyBeans.size() > 0) fuzzyBeans.clear();
+                            for (Object index : dataArray){
+                                JSONObject data = (JSONObject) index;
+                                bean = new FuzzyBean(data.getString("MA_CODE"),data.getString("PR_DETAIL"),data.getString("MA_KIND"));
+                                fuzzyBeans.add(bean);
+                            }
+                            setfuzzyAdapter(fuzzyBeans);
+                            startLlS.setVisibility(View.GONE);
+                            fuzzyRv.setVisibility(View.VISIBLE);
+//                            reset();
+                        }else {
+
+                        }
+
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+//                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(AppendBindingActivity.this, failStr);
+//                        reset();
+                    }
+
+                });
+
+    }
+
+
+
+
+    private void upDateUnitNumber() {
+        if (StringUtil.isEmpty(unitSelctStr)) {
+            unitSelctStr = "PCS";
+        }
+        CommonUtil.setSpinnerItemSelectedByValue(mUnitspinner, unitSelctStr);
+        switch (unitSelctStr) {
+            case "":
+                lastunitNumber = 1;
+                break;
+            case "KPCS":
+                unitNumber = 1000;
+                break;
+            case "PCS":
+                unitNumber = 1;
+                break;
+            default:
+                break;
+        }
+    }
+
+    private void doExChangeClick() {
+        if (tv_muju.getText().toString().trim().isEmpty()){
+            CommonUtil.toastNoRepeat(AppendBindingActivity.this, "请输入模具编号");
+            return;
+        }
+
+//        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_PDA_CHANGEMA)
+                        .method(Request.Method.POST)
+                        .tag(TAG + "changeMa")
+                        .flag(0)
+                        .addParam("ma_code", rb_changetext)
+                        .addParam("sc_code", sc_code)
+                        .addParam("next_macode", gongdanhaoTv.getText().toString())
+                        .addParam("mouldcode",tv_muju.getText().toString().trim())
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(), "success");
+                        if (isSuccess) {
+                            CommonUtil.toastNoRepeat(AppendBindingActivity.this, "工单切换成功!");
+                            Intent intent = new Intent(AppendBindingActivity.this, IndexActivity.class);
+                            intent.putExtra(Constants.FLAG.SC_CODE, sc_code);
+                            startActivity(intent);
+                            finish();
+                        }
+//                        progressDialog.dismiss();
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+//                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(AppendBindingActivity.this, failStr);
+                    }
+                });
+
+    }
+    private String boleifcancel = "0";
+    private void getAddMa() {
+        if (check_unbind.isChecked()){
+            boleifcancel = "-1";
+        }else {
+            boleifcancel = "0";
+        }
+
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_ADDMA)
+                        .method(Request.Method.GET)
+                        .tag(TAG + "changeMa")
+                        .flag(0)
+                        .addParam("ma_code", rb_changetext)
+                        .addParam("sc_code", sc_code)
+                        .addParam("addma_code", gongdanhaoTv.getText().toString())
+                        .addParam("ifcancel",boleifcancel)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        progressDialog.dismiss();
+                        Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(), "success");
+                        if (isSuccess) {
+                            CommonUtil.toastNoRepeat(AppendBindingActivity.this, "追加成功!");
+                            Intent intent = new Intent(AppendBindingActivity.this, IndexActivity.class);
+                            intent.putExtra(Constants.FLAG.SC_CODE, sc_code);
+                            intent.putExtra(Constants.FLAG.MA_CODE, gongdanhaoTv.getText().toString());
+                            startActivity(intent);
+                            finish();
+                        }
+
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(AppendBindingActivity.this, failStr);
+                    }
+                });
+
+    }
+    @Override
+    protected void initDatas() {
+        Intent bundle = getIntent();//从activity传过来的Bundle
+        if (bundle != null) {
+            sc_code = bundle.getStringExtra(Constants.FLAG.SC_CODE);
+            ma_code = bundle.getStringExtra(Constants.FLAG.MA_CODE);
+            dlstr_macodes = bundle.getStringExtra(Constants.FLAG.MOULDCODE);
+            de_location = bundle.getStringExtra("de_location");
+            listsize = bundle.getStringExtra(Constants.FLAG.MLIST);
+            //getSerializable  ComaddBeanList (List<DlMacodesBean>)
+            ComaddBeanList = (List<DlMacodesBean>)bundle.getSerializableExtra("mListdata");
+            mOlIdTv.setText(ma_code + "");
+            rb_changetext=ma_code+"";
+            Log.e("rb_changetext",rb_changetext+"----"+listsize);
+            tv_gangwei.setText(sc_code);
+            tv_muju.setText(dlstr_macodes);
+            tv_jitaihao.setText("机台号:"+de_location);
+            // getUnreportqty();
+        }
+
+
+        iv_add_data.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                initaddPopupWindow();
+            }
+        });
+
+        if (ComaddBeanList.size()==0||ComaddBeanList.size()==1){
+            iv_add_data.setVisibility(View.GONE);
+        }else {
+            iv_add_data.setVisibility(View.VISIBLE);
+        }
+
+    }
+    private PopupWindow editPW;
+    private void initaddPopupWindow() {
+        View contView = LayoutInflater.from(AppendBindingActivity.this).inflate(R.layout.index_recycle_item, null);
+        editadd_et = (ClearableEditText) contView.findViewById(R.id.edit_et);
+        TextView sure_tv = (TextView) contView.findViewById(R.id.sure_tv);
+        TextView cancle_tv = (TextView) contView.findViewById(R.id.cancle_tv);
+        ImageView search_im = contView.findViewById(R.id.search_im);
+        LinearLayout line_top = contView.findViewById(R.id.line_top);
+        rv_line_add_port_data = contView.findViewById(R.id.rv_ip_port_data);
+        rv_line_add_port_data.addItemDecoration(new DividerItemDecoration(AppendBindingActivity.this, LinearLayout.VERTICAL));
+        rv_line_add_port_data.setLayoutManager(new LinearLayoutManager(AppendBindingActivity.this));
+        dlMacodeAdapter = new DlMacodeAdapter(ComaddBeanList);
+        dlMacodeAdapter.setmList(ComaddBeanList);
+        rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+        setaddAdapter(ComaddBeanList);
+        editadd_et.requestFocus();
+
+        editPW = new PopupWindow(contView, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
+        editPW.setTouchable(true);
+        editPW.setBackgroundDrawable(new BitmapDrawable());
+        editPW.setOnDismissListener(new BasePopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                closeListPopupWindow();
+            }
+        });
+        View parentView = AppendBindingActivity.this.getWindow().findViewById(Window.ID_ANDROID_CONTENT);
+        editPW.showAtLocation(parentView, Gravity.CENTER, 0, 0);
+        CommonUtil.setBackgroundAlpha(AppendBindingActivity.this, 0.5f);
+        editadd_et.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)) {
+                    String mSearchStr = editadd_et.getText().toString().trim();
+                    if (!mSearchStr.isEmpty()) {
+                        List<DlMacodesBean> thisList = new ArrayList<>();
+                        for(int i=0;i<ComaddBeanList.size();i++){
+                            if(ComaddBeanList.get(i).getDL_MACODE().contains(mSearchStr)){
+                                thisList.add(ComaddBeanList.get(i));
+                            }
+                            if(i == ComaddBeanList.size() -1){
+                                dlMacodeAdapter = new DlMacodeAdapter(thisList);
+                                rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+                                LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
+
+                            }
+                            List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+                            for (int j = 0; j < lineCodeEntities.size(); j++) {
+                                lineCodeEntities.get(j).setChecked(false);
+                            }
+                            dlMacodeAdapter.notifyDataSetChanged();
+                        }
+
+
+                    } else {
+                        dlMacodeAdapter = new DlMacodeAdapter(ComaddBeanList);
+                        rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+                        List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+                        for (int i = 0; i < lineCodeEntities.size(); i++) {
+                            lineCodeEntities.get(i).setChecked(false);
+                        }
+                        dlMacodeAdapter.notifyDataSetChanged();
+
+                    }
+                    dlMacodeAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+
+                        @Override
+                        public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                            List<DlMacodesBean> ipAndPortBeans = dlMacodeAdapter.getmList();
+                            dl_macodEdata = ipAndPortBeans.get(position).getDL_MACODE();
+                            dlstr_macodes = ipAndPortBeans.get(position).getDL_MOULDCODE();
+                            pr_sdetail = ipAndPortBeans.get(position).getPR_DETAIL();
+                            for (int i = 0; i < ipAndPortBeans.size(); i++) {
+                                ipAndPortBeans.get(i).setChecked(false);
+                            }
+                            ipAndPortBeans.get(position).setChecked(true);
+                            dlMacodeAdapter.notifyDataSetChanged();
+                        }
+                    });
+                    return true;
+                }
+                return false;
+            }
+        });
+
+
+
+        search_im.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                String mSearchStr = editadd_et.getText().toString().trim();
+                if (!mSearchStr.isEmpty()) {
+                    List<DlMacodesBean> thisList = new ArrayList<>();
+                    for(int i=0;i<ComaddBeanList.size();i++){
+                        if(ComaddBeanList.get(i).getDL_MACODE().contains(mSearchStr)){
+                            thisList.add(ComaddBeanList.get(i));
+                        }
+                        if(i == ComaddBeanList.size() -1){
+                            dlMacodeAdapter = new DlMacodeAdapter(thisList);
+                            rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+                            LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
+
+                        }
+                        List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+                        for (int j = 0; j < lineCodeEntities.size(); j++) {
+                            lineCodeEntities.get(j).setChecked(false);
+                        }
+                        dlMacodeAdapter.notifyDataSetChanged();
+                    }
+
+
+                } else {
+                    dlMacodeAdapter = new DlMacodeAdapter(ComaddBeanList);
+                    rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+                    List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+                    for (int i = 0; i < lineCodeEntities.size(); i++) {
+                        lineCodeEntities.get(i).setChecked(false);
+                    }
+                    dlMacodeAdapter.notifyDataSetChanged();
+
+                }
+                dlMacodeAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+
+                    @Override
+                    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                        List<DlMacodesBean> ipAndPortBeans = dlMacodeAdapter.getmList();
+                        dl_macodEdata = ipAndPortBeans.get(position).getDL_MACODE();
+                        dlstr_macodes = ipAndPortBeans.get(position).getDL_MOULDCODE();
+                        pr_sdetail = ipAndPortBeans.get(position).getPR_DETAIL();
+                        for (int i = 0; i < ipAndPortBeans.size(); i++) {
+                            ipAndPortBeans.get(i).setChecked(false);
+                        }
+                        ipAndPortBeans.get(position).setChecked(true);
+                        dlMacodeAdapter.notifyDataSetChanged();
+                    }
+                });
+            }
+
+        });
+
+
+
+        //确定
+        sure_tv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (StringUtil.isEmpty(dl_macodEdata)){
+                    CommonUtil.toastNoRepeat(AppendBindingActivity.this,"请选择工单");
+                    return;
+                }
+//                SharedPreUtil.saveString(AppendBindingActivity.this, "MA_CODE", dl_macodEdata);
+                rb_changetext=dl_macodEdata;
+                mOlIdTv.setText(dl_macodEdata);
+//                tv_maprodname.setText(pr_sdetail);
+                Log.e("itemremark",rb_changetext);
+                ma_code=dl_macodEdata;
+                closeListPopupWindow();
+            }
+        });
+
+        //取消
+        cancle_tv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+
+                closeListPopupWindow();
+            }
+        });
+
+        String mSearchStr = editadd_et.getText().toString().trim();
+        if (mSearchStr.isEmpty()) {
+            dlMacodeAdapter = new DlMacodeAdapter(ComaddBeanList);
+            rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+            List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+            for (int i = 0; i < lineCodeEntities.size(); i++) {
+                lineCodeEntities.get(i).setChecked(false);
+            }
+            dlMacodeAdapter.notifyDataSetChanged();
+
+            dlMacodeAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+
+                @Override
+                public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                    List<DlMacodesBean> ipAndPortBeans = dlMacodeAdapter.getmList();
+                    dl_macodEdata = ipAndPortBeans.get(position).getDL_MACODE();
+                    pr_sdetail = ipAndPortBeans.get(position).getPR_DETAIL();
+                    for (int i = 0; i < ipAndPortBeans.size(); i++) {
+                        ipAndPortBeans.get(i).setChecked(false);
+                    }
+                    ipAndPortBeans.get(position).setChecked(true);
+                    dlMacodeAdapter.notifyDataSetChanged();
+                }
+            });
+        }
+
+
+
+    }
+
+    private void setaddAdapter(List<DlMacodesBean> mList) {
+        LogUtil.i("mList", JSON.toJSONString(mList));
+        dlMacodeAdapter = new DlMacodeAdapter(mList);
+        dlMacodeAdapter.setmList(mList);
+        rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+        dlMacodeAdapter.notifyDataSetChanged();
+    }
+
+    private void closeListPopupWindow() {
+        if (editPW != null) {
+            editPW.dismiss();
+            editPW = null;
+            CommonUtil.setBackgroundAlpha(AppendBindingActivity.this, 1f);
+        }
+
+    }
+    private void initUnitView() {
+        mUnitspinner = findViewById(R.id.unit_spinner);
+        unitList = new ArrayList<>();
+        unitList.add("KPCS");
+        unitList.add("PCS");
+        unitAdapter = new ArrayAdapter<String>(AppendBindingActivity.this, android.R.layout.simple_spinner_item, unitList);
+        unitAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+        mUnitspinner.setAdapter(unitAdapter);
+
+    }
+
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+        switch (id) {
+            case R.id.scan_code_im:
+                goOpenScan();
+                break;
+            case R.id.ol_next_im:
+                Intent intent = new Intent(AppendBindingActivity.this, CommonSeclecActivity.class);
+                intent.putExtra("sc_code", sc_code);
+                intent.putExtra("title", "工单选择");
+                intent.putExtra("type", 2);
+                startActivityForResult(intent, Constants.FLAG.GET_COMMON_ITEM);
+                break;
+            default:
+                break;
+        }
+    }
+
+    private void goOpenScan() {
+        if (CameraUtil.hasCamera()) {
+//                    if (findFocus() != null) {
+//                        mFocusId = findFocus().getId();
+            Intent intent = new Intent();
+            intent.setClass(AppendBindingActivity.this, CaptureActivity.class);
+            startActivityForResult(intent, Constants.FLAG.SCAN_BARCODE_CODE);
+//                    }
+        } else {
+            CommonUtil.toastNoRepeat(AppendBindingActivity.this, getString(R.string.no_camera_detected));
+        }
+    }
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        if (resultCode == Activity.RESULT_OK) {
+            if (requestCode == Constants.FLAG.SCAN_BARCODE_CODE && data != null && data.getExtras() != null) {
+                String result = data.getExtras().getString(CodeUtils.RESULT_STRING) + "";
+                if (mFocusId == R.id.fl_search_actext) {
+                    mSearch.setText(result);
+                    mSearch.setSelection(result.length());
+                }
+            }
+        }
+
+        if (requestCode == Constants.FLAG.GET_COMMON_ITEM && resultCode == 1847) {
+            String result = data.getStringExtra("ITEM_DATA");
+            mOlNextEt.setText(result);
+        }
+
+
+
+
+        if (requestCode == SCAN_BARCODE_CODE && data != null) {
+            if (data.getExtras() != null) {
+                String result = data.getExtras().getString(CodeUtils.RESULT_STRING);
+                if (mFocusId == R.id.fl_search_actext) {
+                    mSearch.setText(result);
+                    mSearch.setSelection(result.length());
+                }
+            }
+        }
+
+    }
+    private class FuzzySearchAdapter extends BaseQuickAdapter<FuzzyBean, BaseViewHolder> {
+        private List<FuzzyBean> mList;
+
+        public List<FuzzyBean> getmList() {
+            return mList;
+        }
+
+        public void setmList(List<FuzzyBean> mList) {
+            this.mList = mList;
+        }
+        public FuzzyBean getBeanByPositon(int position){
+            return mList.get(position);
+        }
+        private FuzzySearchAdapter(@Nullable List<FuzzyBean> data) {
+            super(R.layout.fuzzy_search_item, data);
+        }
+        @Override
+        protected void convert(BaseViewHolder helper, FuzzyBean item) {
+            if (StringUtil.isEmpty(item.getDE_NAME())){
+                helper.setText(R.id.macode_Tv,item.getMA_CODE());
+            }else {
+                helper.setText(R.id.macode_Tv,item.getMA_CODE()+"-"+item.getDE_NAME()+"\n"+item.getMA_KIND());
+            }
+        }
+    }
+
+
+
+
+    private class FuzzyBean{
+        String MA_CODE = null;
+        String DE_NAME = null;
+        String MA_KIND = null;
+        public FuzzyBean(String MA_CODE) {
+            this.MA_CODE = MA_CODE;
+        }
+        public FuzzyBean(String MA_CODE, String DE_NAME,String MA_KIND) {
+            this.MA_CODE = MA_CODE;
+            this.DE_NAME = DE_NAME;
+            this.MA_KIND = MA_KIND;
+        }
+
+        public String getMA_KIND() {
+            return MA_KIND;
+        }
+
+        public String getDE_NAME() {
+            return DE_NAME;
+        }
+        public String getMA_CODE() {
+            return MA_CODE;
+        }
+    }
+
+    public void reset() {
+//            mSearch.getText().clear();
+        CommonUtil.editTextGetFocus(mSearch);
+        CommonUtil.openKeybord(((EditText) mSearch), AppendBindingActivity.this);
+        if (progressDialog.isShowing())
+            progressDialog.dismiss();
+
+    }
+    
+    
+    
+    
+    
+}

+ 15 - 1
app/src/main/java/com/uas/hystorage/activity/FunctionActivity.java

@@ -13,6 +13,7 @@ import android.widget.TextView;
 
 import com.android.volley.toolbox.StringRequest;
 import com.uas.hystorage.R;
+import com.uas.hystorage.bean.DlMacodesBean;
 import com.uas.hystorage.fragment.AstationTheQureFragment;
 import com.uas.hystorage.fragment.BadExchangeFragment;
 import com.uas.hystorage.fragment.BaseFragment;
@@ -46,7 +47,9 @@ import com.uas.hystorage.tools.DataSourceManager;
 import com.uas.hystorage.util.CameraUtil;
 import com.uas.hystorage.util.Constants;
 
+import java.io.Serializable;
 import java.util.ArrayList;
+import java.util.List;
 
 public class FunctionActivity extends BaseActivity implements View.OnClickListener, BackHandlerInterface {
     private Button btnBack, mSearchBtn, mMoreBtn;
@@ -68,6 +71,8 @@ public class FunctionActivity extends BaseActivity implements View.OnClickListen
     private String dlstr_macodes;
     private String listsize;
     private String de_location;
+    private List<DlMacodesBean> mList;
+    private String index_detail_doc;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -96,10 +101,17 @@ public class FunctionActivity extends BaseActivity implements View.OnClickListen
         String funName = intent.getStringExtra(DataSourceManager.KEY_GRID_ITEMNAME);
         sc_code = intent.getStringExtra(Constants.FLAG.SC_CODE);
         ma_code = intent.getStringExtra(Constants.FLAG.MA_CODE);
+        index_detail_doc = intent.getStringExtra("index_detail_doc");
         dlstr_macodes = intent.getStringExtra(Constants.FLAG.MOULDCODE);
         de_location = intent.getStringExtra("de_location");
         listsize = intent.getStringExtra(Constants.FLAG.MLIST);
         ma_sl_name = intent.getStringArrayListExtra("MA_SL_NAME");
+        try {
+            mList = (List<DlMacodesBean>) intent.getSerializableExtra("mListdata");
+        }catch (Exception e){
+
+        }
+
         //加载对应的Fragment
         //防止系统内存不足将activity回收时产生Fragment重叠的问题
         if (savedInstanceState == null) {
@@ -169,7 +181,7 @@ public class FunctionActivity extends BaseActivity implements View.OnClickListen
                 case GloableParams.GRIDNAME_PACKAGE://包装采集
                     mFragment = new PackageAcquisitionFragment();
                     break;
-                case GloableParams.GRIDNAME_BAD_EXCHANGE://不良换票
+                case GloableParams.GRIDNAME_BAD_EXCHANGE://换票
                     mFragment = new BadExchangeFragment();
                     break;
                 case GloableParams.HOME_QUALITY_MANAGE://品质管理
@@ -204,8 +216,10 @@ public class FunctionActivity extends BaseActivity implements View.OnClickListen
             mbundle.putString(Constants.FLAG.SC_CODE, sc_code);
             mbundle.putString(Constants.FLAG.MA_CODE, ma_code);
             mbundle.putString(Constants.FLAG.MOULDCODE, dlstr_macodes);
+            mbundle.putString("index_detail_doc", index_detail_doc);
             mbundle.putString("de_location", de_location);
             mbundle.putString(Constants.FLAG.MLIST, listsize);
+            mbundle.putSerializable("mListdata",(Serializable)mList);
             if (mFragment != null) {
                 mFragment.setArguments(mbundle);
                 getSupportFragmentManager().beginTransaction()

+ 96 - 7
app/src/main/java/com/uas/hystorage/activity/IndexActivity.java

@@ -2,7 +2,9 @@ package com.uas.hystorage.activity;
 
 import android.annotation.SuppressLint;
 import android.app.Activity;
+import android.app.AlertDialog;
 import android.app.Dialog;
+import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.pm.PackageManager;
 import android.graphics.drawable.BitmapDrawable;
@@ -74,6 +76,7 @@ import com.uuzuche.lib_zxing.activity.CodeUtils;
 import org.greenrobot.eventbus.EventBus;
 import org.greenrobot.eventbus.Subscribe;
 
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -127,6 +130,11 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
     private String pr_sdetail;
     private TextView index_detail_doc;
     private String dlstr_macodes;
+    private TextView index_prce_doc;
+    private String ma_kind;
+    private String ma_prodcode;
+    private TextView index_pc_doc;
+    private String frommA_code;
 
 
     @Override
@@ -159,6 +167,8 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
         mScrapTextView = findViewById(R.id.index_scrap_number);
         tv_pihao=findViewById(R.id.tv_pihao);
         iv_add_data = findViewById(R.id.iv_add_data);
+        index_prce_doc = findViewById(R.id.index_prce_doc);
+        index_pc_doc = findViewById(R.id.index_pc_doc);
 
         findViewById(R.id.index_edit).setOnClickListener(this);
         mRefreshLayout = findViewById(R.id.SmartRefreshLayout_id);
@@ -493,6 +503,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
             de_location = "(" + de_location + ")";
             mScName.setText(de_location);
             SharedPreUtil.saveString(this,Constants.FLAG.GANG_WEI_SOURCE_NAME,sc_name);
+
             sl_namelist = new ArrayList<>();
             JSONArray dataArrayone = FastjsonUtil.getJSONArray(dataObject,"TAG");
             for(Object index:dataArrayone){
@@ -529,22 +540,40 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
                 String PR_DETAIL = data.getString("PR_DETAIL") == null ? "-" : data.getString("PR_DETAIL");
                 String PR_SPEC = data.getString("PR_SPEC") == null ? "-" : data.getString("PR_SPEC");
                 String DL_MOULDCODE = data.getString("DL_MOULDCODE") == null ? "" : data.getString("DL_MOULDCODE");
+                String ma_kind = data.getString("MA_KIND")== null ? "" : data.getString("MA_KIND");
                 bean.setDL_MACODE(DL_MACODE);
                 bean.setMA_PRODCODE(MA_PRODCODE);
                 bean.setMA_QTY(MA_QTY);
                 bean.setPR_DETAIL(PR_DETAIL);
                 bean.setPR_SPEC(PR_SPEC);
                 bean.setDL_MOULDCODE(DL_MOULDCODE);
+                bean.setMA_KIND(ma_kind);
                 mList.add(bean);
             }
-            MACODE = mList.get(0).getDL_MACODE();
-            pr_detail = mList.get(0).getPR_DETAIL();
-            dlstr_macodes = mList.get(0).getDL_MOULDCODE();
+            if (!StringUtil.isEmpty(frommA_code)){
+                for (int i=0;i<mList.size();i++){
+                    if(mList.get(i).getDL_MACODE().contains(frommA_code)){
+                        MACODE = mList.get(i).getDL_MACODE();
+                        pr_detail = mList.get(i).getPR_DETAIL();
+                        dlstr_macodes = mList.get(i).getDL_MOULDCODE();
+                        ma_kind = mList.get(i).getMA_KIND();
+                        ma_prodcode = mList.get(i).getMA_PRODCODE();
+                    }
+                }
+            }else {
+                MACODE = mList.get(0).getDL_MACODE();
+                pr_detail = mList.get(0).getPR_DETAIL();
+                dlstr_macodes = mList.get(0).getDL_MOULDCODE();
+                ma_kind = mList.get(0).getMA_KIND();
+                ma_prodcode = mList.get(0).getMA_PRODCODE();
+            }
+
 //            StringBuilder stringtext = new StringBuilder();
 //            for (int i=0;i<mList.size();i++){
 //                stringtext.append(mList.get(i).getLOTNO()).append(",");
 //            }
-
+            index_pc_doc.setText(ma_prodcode);
+            index_prce_doc.setText(ma_kind);
             SharedPreUtil.saveString(this, "MA_CODE", MACODE);
             mCurDoc.setText(MACODE);
             index_detail_doc.setText(pr_detail);
@@ -556,8 +585,10 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
 
         } else {
             iv_add_data.setVisibility(View.GONE);
+            SharedPreUtil.saveString(this, "MA_CODE", "");
             mCurDoc.setText("");
             index_detail_doc.setText("");
+            index_prce_doc.setText("");
         }
         if (!StringUtil.isEmpty(dataObject.getString("MA_QTY"))) {//UNFINISHQQTY
             mUnfinish.setText(dataObject.getString("MA_QTY"));
@@ -855,6 +886,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
             bean= new ComDataBean();
             bean.setItemName(data.getString("SC_NAME"));
             bean.setItemremark(data.getString("SC_CODE"));
+            bean.setDe_location(data.getString("DE_LOCATION") == null ? "-" : data.getString("DE_LOCATION"));
             ComDataBeanList.add(bean);
         }
         initresourcesPopupWindow();
@@ -1145,6 +1177,8 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
         super.onNewIntent(intent);
         boolean needClear = intent.getBooleanExtra(Constants.FLAG.NEED_CLEAR_SCCODE, false);
         String fromSc_Code = intent.getStringExtra(Constants.FLAG.SC_CODE);
+        frommA_code = intent.getStringExtra(Constants.FLAG.MA_CODE);
+
         LogUtil.i("getDevicelineneedClear", needClear + "");
         LogUtil.i("getDevicelinefromSc_Code", fromSc_Code + "");
         if (!StringUtil.isEmpty(fromSc_Code) && !needClear) {
@@ -1155,7 +1189,9 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
             mScName.setText("");
             mFeeding.setText("");
             mCurDoc.setText("");
+            SharedPreUtil.saveString(this, "MA_CODE", "");
             index_detail_doc.setText("");
+            index_prce_doc.setText("");
             mUnfinish.setText("");
         } else {
             return;
@@ -1193,7 +1229,28 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
 //                 ||GloableParams.GRIDNAME_ROLLOUT.equals(itemName)
                 ) {
                     goFragment(position);
-                } else if(GloableParams.GRIDNAME_WORK_PAUSE.equals(itemName)){//解除绑定
+                } else if (GloableParams.GRIDNAME__PUTINTO.equals(itemName)){
+                    if (!ifbindmake.equals("0")){
+                        if (StringUtil.isEmpty(workOrder)){
+                            CommonUtil.toastNoRepeat(this, "暂无在线工单,可点击工单绑定进行操作");
+                        }else {
+                            goFragment(position);
+                        }
+                    }else {
+                        goFragment(position);
+                    }
+                }else if (GloableParams.GRIDNAME_ROLLOUT.equals(itemName)){
+                    if (!ifbindmake.equals("0")){
+                        if (StringUtil.isEmpty(workOrder)){
+                            CommonUtil.toastNoRepeat(this, "暂无在线工单,可点击工单绑定进行操作");
+                        }else {
+                            goFragment(position);
+                        }
+                    }else {
+                        goFragment(position);
+                    }
+
+                }else if(GloableParams.GRIDNAME_WORK_PAUSE.equals(itemName)){//解除绑定
                     if(TextUtils.isEmpty(workOrder)){
                         CommonUtil.toastNoRepeat(this, "暂无在线工单,无法进行解除绑定操作");
                         return;
@@ -1277,7 +1334,28 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
                         CommonUtil.toastNoRepeat(this, "岗位资源对应的工序不需要上料");
                     } else {
                         if (GloableParams.GRIDNAME_WORK_START.equals(itemName)) {//工单启动
-                            CommonUtil.toastNoRepeat(this, "已有在线工单不需要进行工单绑定");
+//                            CommonUtil.toastNoRepeat(this, "已有在线工单不需要进行工单绑定");
+                            new AlertDialog.Builder(this)
+                                    .setTitle("提示")
+                                    .setMessage("是否追加绑定工单?")
+                                    .setNegativeButton(R.string.cancel, null)
+                                    .setPositiveButton(R.string.confirm, new DialogInterface.OnClickListener() {
+                                        @Override
+                                        public void onClick(DialogInterface dialog, int which) {
+                                            Intent intent=new Intent(IndexActivity.this, AppendBindingActivity.class);
+                                            intent.putExtra(DataSourceManager.KEY_GRID_ITEMNAME, itemName);
+                                            intent.putExtra(Constants.FLAG.SC_CODE, sc_code);
+                                            intent.putExtra(Constants.FLAG.MOULDCODE, dlstr_macodes);
+                                            intent.putExtra("index_detail_doc", index_detail_doc.getText().toString().trim());
+                                            intent.putExtra("de_location", de_location);
+                                            intent.putExtra("mListdata", (Serializable)mList);
+                                            intent.putExtra(Constants.FLAG.MLIST, mList.size()+"");
+                                            intent.putExtra(Constants.FLAG.MA_CODE, mCurDoc.getText().toString());
+                                            intent.putStringArrayListExtra("MA_SL_NAME",sl_namelist);
+                                            startActivity(intent);
+                                        }
+                                    }).show();
+
                         }else if (ifpack.equals("0")&& GloableParams.GRIDNAME_PACKAGE.equals(itemName)){
                             CommonUtil.toastNoRepeat(this, "非包装工序不允许点击");
                         } else {
@@ -1408,7 +1486,9 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
         intent.putExtra(DataSourceManager.KEY_GRID_ITEMNAME, itemName);
         intent.putExtra(Constants.FLAG.SC_CODE, sc_code);
         intent.putExtra(Constants.FLAG.MOULDCODE, dlstr_macodes);
+        intent.putExtra("index_detail_doc", index_detail_doc.getText().toString().trim());
         intent.putExtra("de_location", de_location);
+        intent.putExtra("mListdata", (Serializable)mList);
         intent.putExtra(Constants.FLAG.MLIST, mList.size()+"");
         intent.putExtra(Constants.FLAG.MA_CODE, mCurDoc.getText().toString());
         intent.putStringArrayListExtra("MA_SL_NAME",sl_namelist);
@@ -1545,7 +1625,7 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
         }
         @Override
         protected void convert(BaseViewHolder helper, ComDataBean item) {
-            helper.setText(R.id.macode_ip__Tv,item.getItemremark()+"-("+item.getItemName()+")");
+            helper.setText(R.id.macode_ip__Tv,item.getItemremark()+"-("+item.getItemName()+")-("+item.getDe_location()+")");
             LinearLayout line_true = helper.itemView.findViewById(R.id.line_true);
             if (item.getChecked()) {
                 line_true.setSelected(true);
@@ -1559,8 +1639,17 @@ public class IndexActivity extends BaseActivity implements AdapterView.OnItemCli
     private class ComDataBean{
         String itemName = null;
         String itemremark = null;
+        String de_location = null;
         boolean Checked;
 
+        public String getDe_location() {
+            return de_location;
+        }
+
+        public void setDe_location(String de_location) {
+            this.de_location = de_location;
+        }
+
         public boolean getChecked() {
             return Checked;
         }

+ 642 - 0
app/src/main/java/com/uas/hystorage/activity/JumpCameraActivity.java

@@ -0,0 +1,642 @@
+package com.uas.hystorage.activity;
+
+import android.annotation.SuppressLint;
+import android.app.Activity;
+import android.content.Intent;
+import android.database.Cursor;
+import android.graphics.Color;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.MediaStore;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.inputmethod.EditorInfo;
+import android.widget.Button;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
+import android.widget.Spinner;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.android.volley.Request;
+import com.android.volley.toolbox.StringRequest;
+import com.uas.hystorage.R;
+import com.uas.hystorage.adapter.MySpinnerAdaper;
+import com.uas.hystorage.adapter.MychouAdapter;
+import com.uas.hystorage.bean.BadCodeListspringBean;
+import com.uas.hystorage.bean.BeanDecisino;
+import com.uas.hystorage.bean.Choubean;
+import com.uas.hystorage.bean.DecisinoBean;
+import com.uas.hystorage.bean.DefectCodeitemBean;
+import com.uas.hystorage.global.GloableParams;
+import com.uas.hystorage.interfaces.ProgressListener;
+import com.uas.hystorage.util.CameraUtil;
+import com.uas.hystorage.util.CommonUtil;
+import com.uas.hystorage.util.FastjsonUtil;
+import com.uas.hystorage.util.HttpCallback;
+import com.uas.hystorage.util.HttpParams;
+import com.uas.hystorage.util.StringUtil;
+import com.uas.hystorage.util.UploadUtils;
+import com.uas.hystorage.util.VollyRequest;
+import com.uas.hystorage.view.ClearableEditText;
+import com.uas.hystorage.view.business.ProgressPopup;
+import com.uuzuche.lib_zxing.activity.CaptureActivity;
+import com.uuzuche.lib_zxing.activity.CodeUtils;
+import com.vincent.filepicker.ToastUtil;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import okhttp3.Call;
+import okhttp3.Callback;
+import okhttp3.MediaType;
+import okhttp3.MultipartBody;
+import okhttp3.RequestBody;
+import okhttp3.Response;
+
+public class JumpCameraActivity extends BaseActivity implements View.OnClickListener{
+    private ClearableEditText storage_recharge_collect_ets;
+    private ImageView storage_recharge_scan_ivs;
+    private int mFocusId;
+    private static final int SCAN_BARCODE_CODE = 111;
+    private Spinner spinner;
+    private String maintenanceType;
+    private StringRequest mStringRequest;
+    private Button jlt_storage_in_barcode_save_btn;
+    private String ma_code = "";
+    private String sc_code = "";
+    private MySpinnerAdaper mySpinnerAdaper;
+    private TextView tv_qty;
+    private String lotnotext;
+    private ClearableEditText ce_yuanyin;
+    private RadioGroup rg_hui;
+    private RadioButton rb_ok;
+    private RadioButton rb_no;
+    private RadioButton rb_tec;
+    private String rb_changetext;
+    private String qtytext;
+    private LinearLayout line_des,lineceyuan,lin_no;
+    private TextView tv_bccode;
+    private RecyclerView mRecyclerView;
+    private ArrayList<DefectCodeitemBean> arrmFeededList;
+    private TextView ck_all;
+    private ArrayList<BadCodeListspringBean> mfddlist = new ArrayList<>();
+    private MychouAdapter mutextadapter;
+    private ArrayList<String> ma_sl_name;
+    private TextView paicamera;
+    private TextView tv_prompt;
+    private int REQUEST_IMAGE_CAPTURE=666;
+    private ProgressPopup mProgressPopup;
+    private String mEnclusureId = "";
+    private List<String> selectedImagePaths = new ArrayList<>();
+    private List<String> stringArrayList=new ArrayList<>();
+    protected String TAG = getClass().getName();
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_jump_camera);
+        storage_recharge_collect_ets = findViewById(R.id.storage_recharge_collect_ets);
+        storage_recharge_scan_ivs = findViewById(R.id.storage_recharge_scan_ivs);
+        spinner = findViewById(R.id.spinner02);
+        jlt_storage_in_barcode_save_btn = findViewById(R.id.jlt_storage_in_barcode_save_btn);
+        tv_qty = findViewById(R.id.tv_qty);
+        ce_yuanyin = findViewById(R.id.ce_yuanyin);
+        rg_hui = findViewById(R.id.rg_hui);
+        rb_ok = findViewById(R.id.rb_ok);
+        rb_no = findViewById(R.id.rb_no);
+        rb_tec = findViewById(R.id.rb_tec);
+        line_des = findViewById(R.id.line_des);
+        lineceyuan = findViewById(R.id.lineceyuan);
+        lin_no = findViewById(R.id.lin_no);
+        tv_bccode = findViewById(R.id.tv_bccode);
+        ck_all = findViewById(R.id.ck_all);
+        mRecyclerView = findViewById(R.id.feeded_rv);
+        paicamera = findViewById(R.id.paicamera);
+        tv_prompt = findViewById(R.id.tv_prompt);
+        rb_ok.setChecked(true);
+        rb_changetext="OK";
+        setTitle("抽检判定");
+
+        storage_recharge_scan_ivs.setOnClickListener(this);
+        jlt_storage_in_barcode_save_btn.setOnClickListener(this);
+
+        storage_recharge_collect_ets.requestFocus();
+        storage_recharge_collect_ets.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)) {
+                    String data = storage_recharge_collect_ets.getText().toString().trim();
+                    getDatalistCodes(data);
+                    return true;
+                }
+                return false;
+            }
+        });
+        rg_hui.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
+            @SuppressLint("NonConstantResourceId")
+            @Override
+            public void onCheckedChanged(RadioGroup radioGroup, int checkid) {
+                switch (checkid){
+                    case R.id.rb_ok:
+                        rb_changetext = "OK";
+                        lineceyuan.setVisibility(View.GONE);
+                        break;
+                    case R.id.rb_no:
+                        rb_changetext = "NG";
+                        lineceyuan.setVisibility(View.VISIBLE);
+                        break;
+                    case R.id.rb_tec:
+                        rb_changetext = "SPECIAL";
+                        lineceyuan.setVisibility(View.GONE);
+                        break;
+                }
+            }
+        });
+
+        ck_all.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (arrmFeededList.size()==0){
+                    getonLineData();
+                }else {
+                    DefectCodeitemBean bean= new DefectCodeitemBean();
+                    bean.setBC_CODE("1");
+                    bean.setBC_NAME("2");
+                    mutextadapter.addData(bean);
+//                    List<DefectCodeitemBean> resultList = mutextadapter.getResultList();
+//                    resultList.add(bean);
+////                    arrmFeededList.add(bean);
+//                    mutextadapter.setmList(resultList,mActivity,ma_sl_name);
+//                    mutextadapter.notifyItemInserted(resultList.size()-1);
+                }
+
+            }
+        });
+        paicamera.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                try {
+                    startCameraIntent();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        });
+
+    }
+
+    @Override
+    protected void initViews() {
+
+
+    }
+
+    @Override
+    protected void initEvents() {
+
+    }
+
+    @Override
+    protected void initDatas() {
+
+    }
+
+    @Override
+    public void onPointerCaptureChanged(boolean hasCapture) {
+
+    }
+
+
+    private void getDatalistCodes(String intno) {
+        if (StringUtil.isEmpty(intno)){
+            CommonUtil.toastNoRepeat(this, "生产批次号不可为空");
+            return;
+        }
+
+        JSONArray jsonArray = new JSONArray();
+        BeanDecisino bean=new BeanDecisino(intno,sc_code);
+        jsonArray.add(bean);
+        String jsonString = jsonArray.toString();
+        jsonString = jsonString.substring(1,jsonString.length());
+        jsonString = jsonString.substring(0,jsonString.length()-1);
+        Log.e("alone===2",jsonString);
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_OUTMATERIAL_GETLOTNODETAIL)
+                        .method(Request.Method.GET)
+                        .tag(TAG + "getMaCode")
+                        .flag(0)
+                        .addParam("data",jsonString)//生产批次号,必填
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        progressDialog.dismiss();
+
+                        Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
+                        if (isSuccess){
+                            line_des.setVisibility(View.VISIBLE);
+                            JSONObject dataObject = FastjsonUtil.getJSONObject(o.toString(),"data");
+
+                            if (dataObject == null){
+
+                            }else {
+                                lotnotext = dataObject.getString("LOTNO") == null ? "-" : dataObject.getString("LOTNO");
+                                qtytext = dataObject.getString("QTY") == null ? "-" : dataObject.getString("QTY");
+                                String prodcode = dataObject.getString("PRODCODE") == null ? "-" : dataObject.getString("PRODCODE");
+                                String pr_detail = dataObject.getString("PR_DETAIL") == null ? "-" : dataObject.getString("PR_DETAIL");
+                                String pr_spec = dataObject.getString("PR_SPEC") == null ? "-" : dataObject.getString("PR_SPEC");
+                                String fqccode = dataObject.getString("FQCCODE") == null ? "" : dataObject.getString("FQCCODE");
+                                String ifok = dataObject.getString("IFOK") == null ? "" : dataObject.getString("IFOK");
+                                String ved_remark = dataObject.getString("VED_REMARK") == null ? "" : dataObject.getString("VED_REMARK");
+                                if (ifok.isEmpty()){
+                                    tv_qty.setText("数量:"+ qtytext+
+                                            "\n"+"物料编号:"+prodcode+
+                                            "\n物料名称:"+pr_detail+"  规格:"+pr_spec+
+                                            "\n"+"FQC单号:"+ fqccode);
+                                }else {
+                                    if (ifok.equals("1")){
+                                        if (ved_remark.isEmpty()){
+                                            tv_qty.setText("数量:"+ qtytext+
+                                                    "\n"+"物料编号:"+prodcode+
+                                                    "\n物料名称:"+pr_detail+"  规格:"+pr_spec+
+                                                    "\n"+"FQC单号:"+ fqccode+",当前状态:"+"良品");
+                                        }else {
+                                            tv_qty.setText("数量:"+ qtytext+
+                                                    "\n"+"物料编号:"+prodcode+
+                                                    "\n物料名称:"+pr_detail+"  规格:"+pr_spec+
+                                                    "\n"+"FQC单号:"+ fqccode+",当前状态:"+"良品"+"("+ved_remark+")");
+                                        }
+
+                                    }else if (ifok.equals("0")){
+                                        tv_qty.setText("数量:"+ qtytext+
+                                                "\n"+"物料编号:"+prodcode+
+                                                "\n物料名称:"+pr_detail+"  规格:"+pr_spec+
+                                                "\n"+"FQC单号:"+ fqccode+",当前状态:"+"不良品");
+                                    }else {
+                                        tv_qty.setText("数量:"+ qtytext+
+                                                "\n"+"物料编号:"+prodcode+
+                                                "\n物料名称:"+pr_detail+"  规格:"+pr_spec+
+                                                "\n"+"FQC单号:"+ fqccode);
+                                    }
+                                }
+
+                            }
+                        }
+                    }
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(JumpCameraActivity.this, failStr);
+                    }
+                });
+
+
+    }
+    private void getokData(String jsons) {
+        JSONArray jsonArray = new JSONArray();
+        DecisinoBean bean=new DecisinoBean(lotnotext,rb_changetext,qtytext,maintenanceType,ce_yuanyin.getText().toString().trim(),sc_code,jsons);
+        jsonArray.add(bean);
+        String jsonString = jsonArray.toString();
+        jsonString = jsonString.substring(1,jsonString.length());
+        jsonString = jsonString.substring(0,jsonString.length()-1);
+        Log.e("jsonArray===",jsonArray.toString());
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_OUTMATERIAL_SPOTCHECK)
+                        .method(Request.Method.POST)
+                        .tag(TAG + "getMaCode")
+                        .flag(0)
+                        .addParam("data",jsonString)//生产批次号,必填
+                        .addParam("ngBadcodes",jsons)//生产批次号,必填
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        progressDialog.dismiss();
+                        String data = FastjsonUtil.getText(o.toString(), "data");
+                        tv_qty.setText(data);
+                        storage_recharge_collect_ets.setText("");
+                        storage_recharge_collect_ets.requestFocus();
+                        ce_yuanyin.setText("");
+                        arrmFeededList.clear();
+                        mutextadapter = new MychouAdapter();
+                        mRecyclerView.setAnimation(null);
+                        mutextadapter.setmList(arrmFeededList,JumpCameraActivity.this, ma_sl_name);
+                        mRecyclerView.setAdapter(mutextadapter);
+//                        CommonUtil.toastNoRepeat(mActivity,data);
+                    }
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(JumpCameraActivity.this, failStr);
+                    }
+                });
+
+    }
+    private void getonLineData() {
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_OUTMATERIAL_GETBADCODELIST)
+                        .method(Request.Method.GET)
+                        .tag(TAG + "getMaCode")
+                        .flag(0)
+                        .addParam("sc_code", sc_code)//岗位资源
+                        .build(), new HttpCallback() {
+
+                    private BadCodeListspringBean badCodeListspringBean;
+
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        progressDialog.dismiss();
+                        JSONArray dataArray = FastjsonUtil.getJSONArray(o.toString(), "data");
+                        ma_sl_name = new ArrayList<>();
+                        for (Object index : dataArray) {
+                            JSONObject data = (JSONObject) index;
+                            ma_sl_name.add(data.getString("BC_CODE"));
+                        }
+                        DefectCodeitemBean bean= new DefectCodeitemBean();
+                        bean.setBC_CODE("1");
+                        bean.setBC_NAME("2");
+                        arrmFeededList.add(bean);
+//                        myAdapter = new SelectAdapter();
+                        LinearLayoutManager manager = new LinearLayoutManager(JumpCameraActivity.this);
+                        mRecyclerView.setLayoutManager(manager);
+                        mutextadapter = new MychouAdapter();
+                        mRecyclerView.setAnimation(null);
+                        mutextadapter.setmList(arrmFeededList,JumpCameraActivity.this, ma_sl_name);
+                        mRecyclerView.setAdapter(mutextadapter);
+
+                    }
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(JumpCameraActivity.this, failStr);
+                    }
+                });
+
+
+    }
+
+
+
+    @SuppressLint("NonConstantResourceId")
+    @Override
+    public void onClick(View v) {
+        switch (v.getId()) {
+            case R.id.storage_recharge_scan_ivs:
+                if (CameraUtil.hasCamera()) {
+                    if (v.findFocus() != null) {
+                        mFocusId = v.findFocus().getId();
+                        Intent intent = new Intent();
+                        intent.setClass(this, CaptureActivity.class);
+                        startActivityForResult(intent, SCAN_BARCODE_CODE);
+                    } else {
+                        CommonUtil.toastNoRepeat(this, "请选择您要操作的输入框");
+                    }
+                } else {
+                    CommonUtil.toastNoRepeat(this, getString(R.string.no_camera_detected));
+                }
+                break;
+            case R.id.jlt_storage_in_barcode_save_btn:
+
+
+//                Map<String, String> collectResult = new HashMap<>();
+//                if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
+//                    collectResult = resultList.stream()
+//                            .collect(Collectors.toMap(
+//                                    item -> ma_sl_name.get(item.getSpinnerIndex()),
+//                                    DefectCodeitemBean::getUserInput
+//                            ));
+//                }else{
+//                    // 使用for循环遍历列表并将数据添加到Map中
+//                    for (DefectCodeitemBean item : resultList) {
+//                        String key = ma_sl_name.get(item.getSpinnerIndex());
+//                        String value = item.getUserInput();
+//                        collectResult.put(key, value);
+//                    }
+//                }
+                // 将Map转换为List<Map.Entry<String, String>>(如果需要)
+//                List<Map.Entry<String, String>> list = new ArrayList<>(collectResult.entrySet());
+//                Log.e(TAG, "onClick:jlt_storage_in_barcode_save_btn==> "+list.toString() );
+
+                if (rb_changetext.equals("NG")){
+                    List<DefectCodeitemBean> resultList = mutextadapter.getResultList();
+                    if (resultList==null||resultList.size()==0){
+                        ToastUtil.getInstance(this).showToast("请选择不良原因");
+                        return;
+                    }
+                    JSONArray jsonArray = new JSONArray();
+                    for (int i=0;i<resultList.size();i++){
+                        if (StringUtil.isEmpty(ma_sl_name.get(resultList.get(i).getSpinnerIndex()))
+                                ||StringUtil.isEmpty(resultList.get(i).getUserInput())){
+                            ToastUtil.getInstance(this).showToast("内容不许为空");
+                            return;
+                        }
+//                    if (ma_sl_name.get(resultList.get(i).getSpinnerIndex()).equals(ma_sl_name.get(resultList.get(i).getSpinnerIndex()))){
+//                        ToastUtil.getInstance(mActivity).showToast("内容重复");
+//                        return;
+//                    }
+                        Choubean choubean=new Choubean(ma_sl_name.get(resultList.get(i).getSpinnerIndex()),resultList.get(i).getUserInput());
+                        jsonArray.add(choubean);
+                        Log.e("spring"+i+"=====>", ""+ma_sl_name.get(resultList.get(i).getSpinnerIndex()));
+                        Log.e("spring"+i+"=====>", ""+resultList.get(i).getUserInput());
+                    }
+                    Log.e("jsonArray===",jsonArray.toString());
+                    getokData(jsonArray.toString());
+                }else {
+                    getokData("");
+                }
+
+
+
+
+
+                break;
+
+        }
+    }
+
+    // 启动拍照
+    public void startCameraIntent() throws IOException {
+        Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
+        startActivityForResult(intent, REQUEST_IMAGE_CAPTURE);
+    }
+
+    private void uploadImages(List<String> imagePaths) {
+        for (String imagePath : imagePaths) {
+            try {
+                File mFile = new File(imagePath);
+                // 获得文件名
+                String fileName = mFile.getName();
+
+                MultipartBody.Builder builder = new MultipartBody.Builder();
+                builder.setType(MultipartBody.FORM);
+                //第一个参数要与Servlet中的一致
+                builder.addFormDataPart("file", fileName,
+                        RequestBody.create(MediaType.parse("application/octet-stream"), mFile))
+                        .addFormDataPart("type", "common")
+                        .addFormDataPart("master", CommonUtil.getMaster(JumpCameraActivity.this));
+                RequestBody multipartBody = builder.build();
+
+                if (mProgressPopup == null) {
+                    mProgressPopup = new ProgressPopup(JumpCameraActivity.this);
+                    mProgressPopup.setTitle("附件上传中...");
+                }
+                mProgressPopup.setProgress(0);
+                mProgressPopup.showPopupWindow();
+
+
+                UploadUtils.getInstance().postFile(GloableParams.ADDRESS_MOBILE_UPLOADATTACHS, multipartBody, new ProgressListener() {
+                    @Override
+                    public void onProgress(long currentBytes, long contentLength, boolean isDone) {
+                        int progress = (int) ((double) currentBytes * 100 / (double) contentLength);
+                        mProgressPopup.setProgress(progress);
+                        if (isDone || progress == 100) {
+                            mProgressPopup.dismiss();
+                        }
+                    }
+                }, new Callback() {
+                    @Override
+                    public void onFailure(Call call, IOException e) {
+                        mProgressPopup.dismiss();
+                        Log.d("raomeng_uploadf", e.getMessage());
+                        JumpCameraActivity.this.runOnUiThread(new Runnable() {
+                            @Override
+                            public void run() {
+//                                CommonUtil.toastNoRepeat(mActivity, "附件上传失败");
+                                tv_prompt.setTextColor(Color.RED);
+                                tv_prompt.setText("附件上传失败"+" ("+stringArrayList.size()+")");
+                            }
+                        });
+                    }
+
+                    @Override
+                    public void onResponse(Call call, Response response) throws IOException {
+                        mProgressPopup.dismiss();
+                        if (response.code() == 200) {
+
+                            try {
+                                String result = response.body().string();
+                                JSONObject resultObject = JSON.parseObject(result);
+                                mEnclusureId = FastjsonUtil.getText(resultObject, "id");
+                                String s = removeSpace(mEnclusureId);
+                                String s1 = removeSpace2(s);
+                                stringArrayList.add(s1+";");
+                                Log.d("mEnclusureId", s1+"");
+                            } catch (IOException e) {
+                                e.printStackTrace();
+                            }
+                            JumpCameraActivity.this.runOnUiThread(new Runnable() {
+                                @Override
+                                public void run() {
+//                                    CommonUtil.toastYESRepeat(mActivity, "附件上传成功");
+                                    tv_prompt.setTextColor(Color.GREEN);
+                                    tv_prompt.setText("附件上传成功"+" ("+stringArrayList.size()+")");
+                                }
+                            });
+                        }
+                    }
+                }, new File[]{mFile});
+            } catch (Exception e) {
+                if (mProgressPopup != null) {
+                    mProgressPopup.dismiss();
+                }
+//                CommonUtil.toastNoRepeat(mActivity, "附件上传失败");
+                tv_prompt.setTextColor(Color.RED);
+                tv_prompt.setText("附件上传失败"+" ("+stringArrayList.size()+")");
+            }
+        }
+    }
+
+
+    public String removeSpace(String s) {
+        String regex = "\\[";
+        Pattern pattern = Pattern.compile(regex);
+        Matcher matcher = pattern.matcher(s);
+        return matcher.replaceAll("");
+    }
+    public String removeSpace2(String s) {
+        String regex = "]";
+        Pattern pattern = Pattern.compile(regex);
+        Matcher matcher = pattern.matcher(s);
+        return matcher.replaceAll("");
+    }
+    private String getRealPathFromUri(Uri uri) {
+        // 获取真实的文件路径
+        String filePath;
+        String[] projection = {MediaStore.Images.Media.DATA};
+        Cursor cursor = getContentResolver().query(uri, projection, null, null, null);
+        if (cursor == null) {
+            filePath = uri.getPath();
+        } else {
+            cursor.moveToFirst();
+            int columnIndex = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
+            filePath = cursor.getString(columnIndex);
+            cursor.close();
+        }
+        return filePath;
+    }
+    @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.storage_recharge_collect_ets) {
+                    storage_recharge_collect_ets.setText(result);
+                    storage_recharge_collect_ets.setSelection(result.length());
+                }
+            }
+        }
+        if (requestCode == REQUEST_IMAGE_CAPTURE&& data!=null) {
+//            Bundle extras = data.getExtras();
+//            Bitmap imageBitmap = (Bitmap) extras.get("data");
+            selectedImagePaths.clear();
+            if (data.getClipData() != null) {
+                // 用户选择了多个图片
+                int count = data.getClipData().getItemCount();
+                for (int i = 0; i < count; i++) {
+                    Uri imageUri = data.getClipData().getItemAt(i).getUri();
+                    selectedImagePaths.add(getRealPathFromUri(imageUri));
+                    Log.e("imageUri1",getRealPathFromUri(imageUri));
+                }
+            } else if (data.getData() != null) {
+                // 用户选择了单个图片
+                Uri imageUri = data.getData();
+                selectedImagePaths.add(getRealPathFromUri(imageUri));
+                Log.e("imageUri2",getRealPathFromUri(imageUri));
+            }
+
+            // 批量上传图片
+            uploadImages(selectedImagePaths);
+        }
+
+
+
+
+
+    }
+
+
+
+
+}

+ 37 - 0
app/src/main/java/com/uas/hystorage/adapter/CangKuAdapter.java

@@ -0,0 +1,37 @@
+package com.uas.hystorage.adapter;
+
+import android.support.annotation.Nullable;
+import android.widget.TextView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.uas.hystorage.R;
+import com.uas.hystorage.bean.AddRuKubean;
+
+import java.util.List;
+
+public class CangKuAdapter extends BaseQuickAdapter<AddRuKubean, BaseViewHolder> {
+    private List<AddRuKubean> mmmmList;
+
+    public List<AddRuKubean> getmList() {
+        return mmmmList;
+    }
+
+    public void setmList(List<AddRuKubean> mList) {
+        this.mmmmList = mList;
+    }
+    public AddRuKubean getBeanByPositon(int position){
+        return mmmmList.get(position);
+    }
+
+    public CangKuAdapter(@Nullable List<AddRuKubean> data) {
+        super(R.layout.item_ruku_detail, data);
+        this.mmmmList = data;
+    }
+    
+    @Override
+    protected void convert(BaseViewHolder helper, AddRuKubean item) {
+        TextView tv_pichi=helper.getView(R.id.tv_pichi);
+        tv_pichi.setText(item.getCode()+"("+item.getName()+")");
+    }
+}

+ 6 - 2
app/src/main/java/com/uas/hystorage/adapter/MyaddAdapter.java

@@ -37,10 +37,14 @@ public class MyaddAdapter extends RecyclerView.Adapter<MyaddAdapter.viewHolder>
     public void onBindViewHolder(@NonNull @NotNull MyaddAdapter.viewHolder viewHolder, @SuppressLint("RecyclerView") int position) {
 
         viewHolder.item_makecode.setText("工单:"+mList.get(position).getLOTNO());
-        viewHolder.item_mouldtype.setText("数量:"+mList.get(position).getQTY());
+        viewHolder.item_mouldtype.setText("数量:"+mList.get(position).getQTY()
+                                    +"\n转出良品数:"+mList.get(position).getOUTQTY()
+                                    +"\n允许转出数:"+mList.get(position).getUNOUTQTY());
         viewHolder.item_data.setText("产品:"+mList.get(position).getMA_PRODCODE()
                                     +"\n名称:"+mList.get(position).getPR_DETAIL()
-                                    +"\n规格:"+mList.get(position).getPR_SPEC());
+                                    +"\n规格:"+mList.get(position).getPR_SPEC()
+                                    +"\n类型:"+mList.get(position).getMA_KIND()
+        );
         viewHolder.tv_delete.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {

+ 30 - 0
app/src/main/java/com/uas/hystorage/bean/AddRuKubean.java

@@ -0,0 +1,30 @@
+package com.uas.hystorage.bean;
+
+/**
+ * Created by cjh-sail on 202024-05-15
+ */
+public class AddRuKubean {
+    public String code;
+    public String name;
+
+    public AddRuKubean(String code, String name) {
+        this.code = code;
+        this.name = name;
+    }
+    public AddRuKubean(){}
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

+ 27 - 0
app/src/main/java/com/uas/hystorage/bean/AddworkorderBean.java

@@ -9,6 +9,9 @@ public class AddworkorderBean {
     private String MA_PRODCODE;
     private String PR_DETAIL;
     private String PR_SPEC;
+    private String MA_KIND;
+    private String OUTQTY;
+    private String UNOUTQTY;
 
     public AddworkorderBean(){}
 
@@ -17,6 +20,30 @@ public class AddworkorderBean {
         this.QTY = QTY;
     }
 
+    public String getOUTQTY() {
+        return OUTQTY;
+    }
+
+    public void setOUTQTY(String OUTQTY) {
+        this.OUTQTY = OUTQTY;
+    }
+
+    public String getUNOUTQTY() {
+        return UNOUTQTY;
+    }
+
+    public void setUNOUTQTY(String UNOUTQTY) {
+        this.UNOUTQTY = UNOUTQTY;
+    }
+
+    public String getMA_KIND() {
+        return MA_KIND;
+    }
+
+    public void setMA_KIND(String MA_KIND) {
+        this.MA_KIND = MA_KIND;
+    }
+
     public String getMA_PRODCODE() {
         return MA_PRODCODE;
     }

+ 20 - 0
app/src/main/java/com/uas/hystorage/bean/BeansJsonData.java

@@ -0,0 +1,20 @@
+package com.uas.hystorage.bean;
+
+/**
+ * Created by cjh-sail on 2024-06-04
+ */
+public class BeansJsonData {
+    private String macode;
+
+    public BeansJsonData(String macode) {
+        this.macode = macode;
+    }
+
+    public String getMacode() {
+        return macode;
+    }
+
+    public void setMacode(String macode) {
+        this.macode = macode;
+    }
+}

+ 9 - 0
app/src/main/java/com/uas/hystorage/bean/DlMacodesBean.java

@@ -10,6 +10,7 @@ public class DlMacodesBean implements Serializable {
     private String PR_DETAIL;
     private String PR_SPEC;
     private String DL_MOULDCODE;
+    private String MA_KIND;
     private boolean Checked;
 
     public DlMacodesBean(){}
@@ -21,6 +22,14 @@ public class DlMacodesBean implements Serializable {
         this.PR_SPEC = PR_SPEC;
     }
 
+    public String getMA_KIND() {
+        return MA_KIND;
+    }
+
+    public void setMA_KIND(String MA_KIND) {
+        this.MA_KIND = MA_KIND;
+    }
+
     public String getDL_MOULDCODE() {
         return DL_MOULDCODE;
     }

+ 93 - 1
app/src/main/java/com/uas/hystorage/bean/MaintainitemBean.java

@@ -6,11 +6,103 @@ package com.uas.hystorage.bean;
 public class MaintainitemBean {
 
     private String mi_item;
+    private String MM_PRODCODE;
+    private String PR_DETAIL;
+    private String PR_SPEC;
+    private String PR_UNIT;
+    private String MM_ONEUSEQTY;
+    private String MM_QTY;
+    private String MA_CODE;
+    private String MA_PRODCODE;
+    private String QTY;
+    private String macode;
     private boolean isChecked;
+    public MaintainitemBean(String MA_CODE, String MA_PRODCODE, String QTY) {
+        this.MA_CODE = MA_CODE;
+        this.MA_PRODCODE = MA_PRODCODE;
+        this.QTY = QTY;
+    }
+    public String getMA_CODE() {
+        return MA_CODE;
+    }
+
+    public void setMA_CODE(String MA_CODE) {
+        this.MA_CODE = MA_CODE;
+    }
+
+    public String getMA_PRODCODE() {
+        return MA_PRODCODE;
+    }
+
+    public void setMA_PRODCODE(String MA_PRODCODE) {
+        this.MA_PRODCODE = MA_PRODCODE;
+    }
+
+    public String getQTY() {
+        return QTY;
+    }
+
+    public void setQTY(String QTY) {
+        this.QTY = QTY;
+    }
+
+    public String getMi_item() {
+        return mi_item;
+    }
+
+    public void setMi_item(String mi_item) {
+        this.mi_item = mi_item;
+    }
+
+    public String getMM_PRODCODE() {
+        return MM_PRODCODE;
+    }
+
+    public void setMM_PRODCODE(String MM_PRODCODE) {
+        this.MM_PRODCODE = MM_PRODCODE;
+    }
+
+    public String getPR_DETAIL() {
+        return PR_DETAIL;
+    }
+
+    public void setPR_DETAIL(String PR_DETAIL) {
+        this.PR_DETAIL = PR_DETAIL;
+    }
 
+    public String getPR_SPEC() {
+        return PR_SPEC;
+    }
+
+    public void setPR_SPEC(String PR_SPEC) {
+        this.PR_SPEC = PR_SPEC;
+    }
+
+    public String getPR_UNIT() {
+        return PR_UNIT;
+    }
 
+    public void setPR_UNIT(String PR_UNIT) {
+        this.PR_UNIT = PR_UNIT;
+    }
+
+    public String getMM_ONEUSEQTY() {
+        return MM_ONEUSEQTY;
+    }
+
+    public void setMM_ONEUSEQTY(String MM_ONEUSEQTY) {
+        this.MM_ONEUSEQTY = MM_ONEUSEQTY;
+    }
+
+    public String getMM_QTY() {
+        return MM_QTY;
+    }
+
+    public void setMM_QTY(String MM_QTY) {
+        this.MM_QTY = MM_QTY;
+    }
 
-    public boolean isChecked() {
+    public boolean getChecked() {
         return isChecked;
     }
 

+ 23 - 0
app/src/main/java/com/uas/hystorage/bean/PopWinBean.java

@@ -0,0 +1,23 @@
+package com.uas.hystorage.bean;
+
+/**
+ * Created by cjh-sail on 2024-01-24
+ */
+public class PopWinBean {
+    String MA_CODE = null;
+    String DE_NAME = null;
+    public PopWinBean(String MA_CODE) {
+        this.MA_CODE = MA_CODE;
+    }
+    public PopWinBean(String MA_CODE, String DE_NAME) {
+        this.MA_CODE = MA_CODE;
+        this.DE_NAME = DE_NAME;
+    }
+
+    public String getDE_NAME() {
+        return DE_NAME;
+    }
+    public String getMA_CODE() {
+        return MA_CODE;
+    }
+}

+ 10 - 0
app/src/main/java/com/uas/hystorage/bean/ShuaXinListbean.java

@@ -0,0 +1,10 @@
+package com.uas.hystorage.bean;
+
+/**
+ * Created by cjh-sail on 2024-01-24
+ */
+public class ShuaXinListbean {
+    public ShuaXinListbean(String s) {
+
+    }
+}

+ 3 - 3
app/src/main/java/com/uas/hystorage/fragment/BadExchangeFragment.java

@@ -43,7 +43,7 @@ import java.util.List;
 
 /**
  * Created by RaoMeng on 2024/03/18
- * Desc: 不良换票
+ * Desc: 换票
  */
 public class BadExchangeFragment extends BaseFragment implements View.OnClickListener,MybadexchangeAdapter.OnUpdateDataListener{
 
@@ -71,7 +71,7 @@ public class BadExchangeFragment extends BaseFragment implements View.OnClickLis
 
     @Override
     protected void initViews() {
-        setTitle("不良换票");
+        setTitle("换票");
         ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
         storage_recharge_collect_ets = mActivity.findViewById(R.id.storage_recharge_collect_ets);
         storage_recharge_scan_ivs = mActivity.findViewById(R.id.storage_recharge_scan_ivs);
@@ -311,7 +311,7 @@ public class BadExchangeFragment extends BaseFragment implements View.OnClickLis
     public void onHiddenChanged(boolean hidden) {
         super.onHiddenChanged(hidden);
         if (!hidden) {
-            setTitle("不良换票");
+            setTitle("换票");
             ((FunctionActivity) getActivity()).setMoreBtnVisible(true);
         } else {
             ((FunctionActivity) getActivity()).setMoreBtnVisible(false);

+ 65 - 1
app/src/main/java/com/uas/hystorage/fragment/ChargingSummaryFragment.java

@@ -1,7 +1,12 @@
 package com.uas.hystorage.fragment;
 
+import android.graphics.drawable.BitmapDrawable;
 import android.os.Bundle;
 import android.view.KeyEvent;
+import android.view.View;
+import android.widget.Button;
+import android.widget.LinearLayout;
+import android.widget.PopupWindow;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
@@ -14,17 +19,20 @@ import com.bin.david.form.data.table.TableData;
 import com.scwang.smartrefresh.layout.api.RefreshLayout;
 import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
 import com.uas.hystorage.R;
+import com.uas.hystorage.activity.FunctionActivity;
 import com.uas.hystorage.bean.ChargingSummaryBean;
 import com.uas.hystorage.global.GloableParams;
 import com.uas.hystorage.util.CommonUtil;
 import com.uas.hystorage.util.Constants;
 import com.uas.hystorage.util.FastjsonUtil;
+import com.uas.hystorage.util.FragmentUtils;
 import com.uas.hystorage.util.HttpCallback;
 import com.uas.hystorage.util.HttpParams;
 import com.uas.hystorage.util.VollyRequest;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Objects;
 
 public class ChargingSummaryFragment extends BaseFragment {
     private SmartTable mSmartTable;
@@ -38,6 +46,7 @@ public class ChargingSummaryFragment extends BaseFragment {
     private Column<String> mTypeColumn, mdetailColumn;
     private Column<Double> mProdcodeColumn,mOutqtyColumn;
     private String ma_code;
+    private Button mMoreBtn;
 
     @Override
     protected int getLayout() {
@@ -47,7 +56,8 @@ public class ChargingSummaryFragment extends BaseFragment {
     @Override
     protected void initViews() {
         setTitle("上料汇总");
-
+        ((FunctionActivity) getActivity()).setMoreBtnVisible(true);
+        mMoreBtn = (Button)mActivity.findViewById(R.id.btn_actionbar_more);
         Bundle arguments = getArguments();
         if (arguments != null) {
             mSccode = arguments.getString(Constants.FLAG.SC_CODE, "");
@@ -90,6 +100,12 @@ public class ChargingSummaryFragment extends BaseFragment {
                 getChargingSummart();
             }
         });
+        mMoreBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                showMoreMenu();
+            }
+        });
     }
 
     @Override
@@ -97,7 +113,43 @@ public class ChargingSummaryFragment extends BaseFragment {
         progressDialog.show();
         getChargingSummart();
     }
+    private PopupWindow mMenuPopupWindow;
+    /**
+     * 展示扩展菜单
+     */
+    private void showMoreMenu() {
+        View view = View.inflate(getActivity(), R.layout.pop_postpunch_add_menu, null);
+        Button addBtn = (Button) view.findViewById(R.id.pop_storage_in_add_menu_1);
+        addBtn.setText("在制转移");
 
+        mMenuPopupWindow = new PopupWindow(view, LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
+        mMenuPopupWindow.setBackgroundDrawable(new BitmapDrawable());
+        mMenuPopupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                closeMenuPopupWindow();
+            }
+        });
+        CommonUtil.setBackgroundAlpha(Objects.requireNonNull(getActivity()), 0.5f);
+        mMenuPopupWindow.showAsDropDown(mMoreBtn);
+
+        addBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closeMenuPopupWindow();
+                PreProcessingReportFragment preProcessingReportFragment = new PreProcessingReportFragment();
+                FragmentUtils.switchFragment(ChargingSummaryFragment.this, preProcessingReportFragment);
+            }
+        });
+
+    }
+
+    private void closeMenuPopupWindow() {
+        if (mMenuPopupWindow != null) {
+            mMenuPopupWindow.dismiss();
+            CommonUtil.setBackgroundAlpha(mActivity, 1f);
+        }
+    }
     private void getChargingSummart() {
         mChargingSummaryBeans.clear();
         VollyRequest.getInstance().stringRequest(new HttpParams.Builder()
@@ -156,6 +208,18 @@ public class ChargingSummaryFragment extends BaseFragment {
             }
         }, 100);
     }
+    @Override
+    public void onHiddenChanged(boolean hidden) {
+        super.onHiddenChanged(hidden);
+        if (!hidden) {
+            setTitle(title);
+            getChargingSummart();
+            ((FunctionActivity) getActivity()).setMoreBtnVisible(true);
+        } else {
+            ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
+        }
+    }
+
     @Override
     public boolean onKeyDown(int keyCode, KeyEvent event) {
         return false;

+ 185 - 1
app/src/main/java/com/uas/hystorage/fragment/DecisionByLotFragment.java

@@ -3,6 +3,10 @@ package com.uas.hystorage.fragment;
 import android.annotation.SuppressLint;
 import android.app.Activity;
 import android.content.Intent;
+import android.database.Cursor;
+import android.graphics.Color;
+import android.net.Uri;
+import android.provider.MediaStore;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.util.Log;
@@ -17,6 +21,7 @@ import android.widget.RadioGroup;
 import android.widget.Spinner;
 import android.widget.TextView;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.android.volley.Request;
@@ -31,6 +36,7 @@ import com.uas.hystorage.bean.Choubean;
 import com.uas.hystorage.bean.DecisinoBean;
 import com.uas.hystorage.bean.DefectCodeitemBean;
 import com.uas.hystorage.global.GloableParams;
+import com.uas.hystorage.interfaces.ProgressListener;
 import com.uas.hystorage.tools.SharedPreUtil;
 import com.uas.hystorage.util.CameraUtil;
 import com.uas.hystorage.util.CommonUtil;
@@ -38,14 +44,27 @@ import com.uas.hystorage.util.FastjsonUtil;
 import com.uas.hystorage.util.HttpCallback;
 import com.uas.hystorage.util.HttpParams;
 import com.uas.hystorage.util.StringUtil;
+import com.uas.hystorage.util.UploadUtils;
 import com.uas.hystorage.util.VollyRequest;
 import com.uas.hystorage.view.ClearableEditText;
+import com.uas.hystorage.view.business.ProgressPopup;
 import com.uuzuche.lib_zxing.activity.CaptureActivity;
 import com.uuzuche.lib_zxing.activity.CodeUtils;
 import com.vincent.filepicker.ToastUtil;
 
+import java.io.File;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import okhttp3.Call;
+import okhttp3.Callback;
+import okhttp3.MediaType;
+import okhttp3.MultipartBody;
+import okhttp3.RequestBody;
+import okhttp3.Response;
 
 /**
  * Created by RaoMeng on 2023/12/26
@@ -82,6 +101,13 @@ public class DecisionByLotFragment extends BaseFragment implements View.OnClickL
     private ArrayList<BadCodeListspringBean> mfddlist = new ArrayList<>();
     private MychouAdapter mutextadapter;
     private ArrayList<String> ma_sl_name;
+    private TextView paicamera;
+    private TextView tv_prompt;
+    private int REQUEST_IMAGE_CAPTURE=666;
+    private ProgressPopup mProgressPopup;
+    private String mEnclusureId = "";
+    private List<String> selectedImagePaths = new ArrayList<>();
+    private List<String> stringArrayList=new ArrayList<>();
 
     @Override
     protected int getLayout() {
@@ -108,6 +134,8 @@ public class DecisionByLotFragment extends BaseFragment implements View.OnClickL
         tv_bccode = mActivity.findViewById(R.id.tv_bccode);
         ck_all = mActivity.findViewById(R.id.ck_all);
         mRecyclerView = mActivity.findViewById(R.id.feeded_rv);
+        paicamera = mActivity.findViewById(R.id.paicamera);
+        tv_prompt = mActivity.findViewById(R.id.tv_prompt);
         rb_ok.setChecked(true);
         rb_changetext="OK";
 
@@ -173,7 +201,16 @@ public class DecisionByLotFragment extends BaseFragment implements View.OnClickL
 
             }
         });
-
+        paicamera.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                try {
+                    startCameraIntent();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        });
 
 
     }
@@ -467,6 +504,126 @@ public class DecisionByLotFragment extends BaseFragment implements View.OnClickL
 
         }
     }
+    // 启动拍照
+    public void startCameraIntent() throws IOException {
+        Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
+        startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);
+    }
+
+    private void uploadImages(List<String> imagePaths) {
+        for (String imagePath : imagePaths) {
+            try {
+                File mFile = new File(imagePath);
+                // 获得文件名
+                String fileName = mFile.getName();
+
+                MultipartBody.Builder builder = new MultipartBody.Builder();
+                builder.setType(MultipartBody.FORM);
+                //第一个参数要与Servlet中的一致
+                builder.addFormDataPart("file", fileName,
+                        RequestBody.create(MediaType.parse("application/octet-stream"), mFile))
+                        .addFormDataPart("type", "common")
+                        .addFormDataPart("master", CommonUtil.getMaster(mActivity));
+                RequestBody multipartBody = builder.build();
+
+                if (mProgressPopup == null) {
+                    mProgressPopup = new ProgressPopup(mActivity);
+                    mProgressPopup.setTitle("附件上传中...");
+                }
+                mProgressPopup.setProgress(0);
+                mProgressPopup.showPopupWindow();
+
+
+                UploadUtils.getInstance().postFile(GloableParams.ADDRESS_MOBILE_UPLOADATTACHS, multipartBody, new ProgressListener() {
+                    @Override
+                    public void onProgress(long currentBytes, long contentLength, boolean isDone) {
+                        int progress = (int) ((double) currentBytes * 100 / (double) contentLength);
+                        mProgressPopup.setProgress(progress);
+                        if (isDone || progress == 100) {
+                            mProgressPopup.dismiss();
+                        }
+                    }
+                }, new Callback() {
+                    @Override
+                    public void onFailure(Call call, IOException e) {
+                        mProgressPopup.dismiss();
+                        Log.d("raomeng_uploadf", e.getMessage());
+                        mActivity.runOnUiThread(new Runnable() {
+                            @Override
+                            public void run() {
+//                                CommonUtil.toastNoRepeat(mActivity, "附件上传失败");
+                                tv_prompt.setTextColor(Color.RED);
+                                tv_prompt.setText("附件上传失败"+" ("+stringArrayList.size()+")");
+                            }
+                        });
+                    }
+
+                    @Override
+                    public void onResponse(Call call, Response response) throws IOException {
+                        mProgressPopup.dismiss();
+                        if (response.code() == 200) {
+
+                            try {
+                                String result = response.body().string();
+                                JSONObject resultObject = JSON.parseObject(result);
+                                mEnclusureId = FastjsonUtil.getText(resultObject, "id");
+                                String s = removeSpace(mEnclusureId);
+                                String s1 = removeSpace2(s);
+                                stringArrayList.add(s1+";");
+                                Log.d("mEnclusureId", s1+"");
+                            } catch (IOException e) {
+                                e.printStackTrace();
+                            }
+                            mActivity.runOnUiThread(new Runnable() {
+                                @Override
+                                public void run() {
+//                                    CommonUtil.toastYESRepeat(mActivity, "附件上传成功");
+                                    tv_prompt.setTextColor(Color.GREEN);
+                                    tv_prompt.setText("附件上传成功"+" ("+stringArrayList.size()+")");
+                                }
+                            });
+                        }
+                    }
+                }, new File[]{mFile});
+            } catch (Exception e) {
+                if (mProgressPopup != null) {
+                    mProgressPopup.dismiss();
+                }
+//                CommonUtil.toastNoRepeat(mActivity, "附件上传失败");
+                tv_prompt.setTextColor(Color.RED);
+                tv_prompt.setText("附件上传失败"+" ("+stringArrayList.size()+")");
+            }
+        }
+    }
+
+
+    public String removeSpace(String s) {
+        String regex = "\\[";
+        Pattern pattern = Pattern.compile(regex);
+        Matcher matcher = pattern.matcher(s);
+        return matcher.replaceAll("");
+    }
+    public String removeSpace2(String s) {
+        String regex = "]";
+        Pattern pattern = Pattern.compile(regex);
+        Matcher matcher = pattern.matcher(s);
+        return matcher.replaceAll("");
+    }
+    private String getRealPathFromUri(Uri uri) {
+        // 获取真实的文件路径
+        String filePath;
+        String[] projection = {MediaStore.Images.Media.DATA};
+        Cursor cursor = mActivity.getContentResolver().query(uri, projection, null, null, null);
+        if (cursor == null) {
+            filePath = uri.getPath();
+        } else {
+            cursor.moveToFirst();
+            int columnIndex = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
+            filePath = cursor.getString(columnIndex);
+            cursor.close();
+        }
+        return filePath;
+    }
     @Override
     public void onActivityResult(int requestCode, int resultCode, Intent data) {
         super.onActivityResult(requestCode, resultCode, data);
@@ -483,6 +640,33 @@ public class DecisionByLotFragment extends BaseFragment implements View.OnClickL
                 }
             }
         }
+        if (requestCode == REQUEST_IMAGE_CAPTURE&& data!=null) {
+//            Bundle extras = data.getExtras();
+//            Bitmap imageBitmap = (Bitmap) extras.get("data");
+            selectedImagePaths.clear();
+            if (data.getClipData() != null) {
+                // 用户选择了多个图片
+                int count = data.getClipData().getItemCount();
+                for (int i = 0; i < count; i++) {
+                    Uri imageUri = data.getClipData().getItemAt(i).getUri();
+                    selectedImagePaths.add(getRealPathFromUri(imageUri));
+                    Log.e("imageUri1",getRealPathFromUri(imageUri));
+                }
+            } else if (data.getData() != null) {
+                // 用户选择了单个图片
+                Uri imageUri = data.getData();
+                selectedImagePaths.add(getRealPathFromUri(imageUri));
+                Log.e("imageUri2",getRealPathFromUri(imageUri));
+            }
+
+            // 批量上传图片
+            uploadImages(selectedImagePaths);
+        }
+
+
+
+
+
     }
 
 

+ 5 - 1
app/src/main/java/com/uas/hystorage/fragment/GdMaterialInFragment.java

@@ -72,6 +72,8 @@ public class GdMaterialInFragment extends BaseFragment implements View.OnClickLi
     private JSONObject barCodeDataObject; //条码code详情
     private int scanType;
     private PopupWindow mMenuPopupWindow;
+    private TextView tv_jitaihao;
+    private String de_location;
 
     @Override
     public void onAttach(Activity activity) {
@@ -110,6 +112,7 @@ public class GdMaterialInFragment extends BaseFragment implements View.OnClickLi
         mRefreshLayout = (RefreshLayout) root.findViewById(R.id.SmartRefreshLayout_id);
         mUnfeedLl = root.findViewById(R.id.unfeed_ll);
         mNnfeedNumberTv = root.findViewById(R.id.unfeed_number_tv);
+        tv_jitaihao = root.findViewById(R.id.tv_jitaihao);
         mRefreshLayout.setEnableLoadMore(false);
         mUnfeedingrv.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
         mUnfeedingrv.setLayoutManager(new LinearLayoutManager(mActivity));
@@ -127,8 +130,9 @@ public class GdMaterialInFragment extends BaseFragment implements View.OnClickLi
         if (bundle != null) {
             sc_code = bundle.getString(Constants.FLAG.SC_CODE);
             ma_code = bundle.getString(Constants.FLAG.MA_CODE);
+            de_location = bundle.getString("de_location");
         }
-
+        tv_jitaihao.setText(de_location);
         if (!StringUtil.isEmpty(ma_code) && !StringUtil.isEmpty(sc_code)) {
             getMaUnLoadingPrCode(ma_code);
         }

+ 275 - 5
app/src/main/java/com/uas/hystorage/fragment/GdWorkSwitchFragment.java

@@ -4,6 +4,7 @@ import android.annotation.SuppressLint;
 import android.app.Activity;
 import android.content.Context;
 import android.content.Intent;
+import android.graphics.drawable.BitmapDrawable;
 import android.os.Bundle;
 import android.support.annotation.Nullable;
 import android.support.v7.widget.DividerItemDecoration;
@@ -12,8 +13,12 @@ import android.support.v7.widget.RecyclerView;
 import android.text.Editable;
 import android.text.TextWatcher;
 import android.util.Log;
+import android.view.Gravity;
 import android.view.KeyEvent;
+import android.view.LayoutInflater;
 import android.view.View;
+import android.view.Window;
+import android.view.inputmethod.EditorInfo;
 import android.view.inputmethod.InputMethodManager;
 import android.widget.AdapterView;
 import android.widget.ArrayAdapter;
@@ -22,6 +27,7 @@ import android.widget.Button;
 import android.widget.EditText;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
+import android.widget.PopupWindow;
 import android.widget.RadioButton;
 import android.widget.RadioGroup;
 import android.widget.Spinner;
@@ -38,6 +44,8 @@ import com.uas.hystorage.R;
 import com.uas.hystorage.activity.CommonSeclecActivity;
 import com.uas.hystorage.activity.FunctionActivity;
 import com.uas.hystorage.activity.IndexActivity;
+import com.uas.hystorage.adapter.DlMacodeAdapter;
+import com.uas.hystorage.bean.DlMacodesBean;
 import com.uas.hystorage.global.GloableParams;
 import com.uas.hystorage.tools.SharedPreUtil;
 import com.uas.hystorage.util.CameraUtil;
@@ -57,6 +65,8 @@ import com.uuzuche.lib_zxing.activity.CodeUtils;
 import java.util.ArrayList;
 import java.util.List;
 
+import razerdp.basepopup.BasePopupWindow;
+
 public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickListener {
     private TextView tv_gangwei;
     private TextView mOlIdTv;
@@ -90,6 +100,7 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
     private TextView changpingTv;
     private TextView mingchenTv;
     private TextView guigeTv;
+    private TextView kind_tv;
     private JSONObject detailOne;
     private Button startBtn;
     private ImageView mScanImageView;
@@ -112,6 +123,15 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
     private String listsize;
     private String de_location;
     private TextView tv_jitaihao;
+    private List<DlMacodesBean> ComaddBeanList;
+    private ClearableEditText editadd_et;
+    private RecyclerView rv_line_add_port_data;
+    private DlMacodeAdapter dlMacodeAdapter;
+    private String dl_macodEdata;
+    private String pr_sdetail;
+    private ImageView iv_add_data;
+    private TextView tv_outqty;
+    private TextView tv_unoutqty;
 
     @Override
     protected int getLayout() {
@@ -129,9 +149,15 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
         gongdanhaoTv = root.findViewById(R.id.gongdanhao_tv);
         gongdanshuTv = root.findViewById(R.id.gongdanshu_tv);
         yibaogongTv = root.findViewById(R.id.yibaogong_tv);
+        tv_outqty = root.findViewById(R.id.tv_outqty);
+        tv_unoutqty = root.findViewById(R.id.tv_unoutqty);
+
+
+
         changpingTv = root.findViewById(R.id.changping_tv);
         mingchenTv = root.findViewById(R.id.mingchen_tv);
         guigeTv = root.findViewById(R.id.guige_tv);
+        kind_tv = root.findViewById(R.id.kind_tv);
         line_mju = root.findViewById(R.id.line_mju);
         mOlIdTv = root.findViewById(R.id.ol_id_tv);
         tv_jitaihao = root.findViewById(R.id.tv_jitaihao);
@@ -144,8 +170,9 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
         mOlNextEt = root.findViewById(R.id.ol_next_et);
         ce_moju = root.findViewById(R.id.ce_moju);
         clean_iv = root.findViewById(R.id.clean_iv);
+        iv_add_data = root.findViewById(R.id.iv_add_data);
         ce_moju.requestFocus();
-        ce_moju.setThreshold(1);
+        ce_moju.setThreshold(0);
         tv_mju = root.findViewById(R.id.tv_mju);
         root.findViewById(R.id.scan_code_im).setOnClickListener(this);
         root.findViewById(R.id.ol_next_im).setOnClickListener(this);
@@ -363,7 +390,7 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
         @Override
         public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
             //当字数超过3个,自动弹出输入提示框
-            if (charSequence.length() >= 3) {
+            if (charSequence.length() >= 1) {
                 LogUtil.i("mSearchStr",ce_moju.getText().toString().trim());
                 fuzzySearchMould(ce_moju.getText().toString().trim());
 
@@ -416,6 +443,12 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
                                 changpingTv.setText(dataObject.getString("MA_PRODCODE") == null ? "-" :dataObject.getString("MA_PRODCODE"));
                                 mingchenTv.setText(dataObject.getString("PR_DETAIL") == null ? "-" : dataObject.getString("PR_DETAIL"));
                                 guigeTv.setText(dataObject.getString("PR_SPEC") == null ? "-" :dataObject.getString("PR_SPEC")+"");
+                                kind_tv.setText(dataObject.getString("MA_KIND") == null ? "-" :dataObject.getString("MA_KIND")+"");
+
+                                tv_outqty.setText(dataObject.getString("OUTQTY") == null ? "-" : dataObject.getString("OUTQTY"));
+                                tv_unoutqty.setText(dataObject.getString("UNOUTQTY") == null ? "-" : dataObject.getString("UNOUTQTY"));
+//                                tv_outqty.setText("");
+//                                tv_unoutqty.setText("");
                             }
                         }
                     }
@@ -469,7 +502,7 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
                             if (fuzzyBeans.size() > 0) fuzzyBeans.clear();
                             for (Object index : dataArray){
                                 JSONObject data = (JSONObject) index;
-                                bean = new FuzzyBean(data.getString("MA_CODE"));
+                                bean = new FuzzyBean(data.getString("MA_CODE"),data.getString("PR_DETAIL"),data.getString("MA_KIND"));
                                 fuzzyBeans.add(bean);
                             }
                             setfuzzyAdapter(fuzzyBeans);
@@ -623,6 +656,8 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
             dlstr_macodes = bundle.getString(Constants.FLAG.MOULDCODE);
             de_location = bundle.getString("de_location");
             listsize = bundle.getString(Constants.FLAG.MLIST);
+
+            ComaddBeanList = (List<DlMacodesBean>) bundle.getSerializable("mListdata");
             mOlIdTv.setText(ma_code + "");
             rb_changetext=ma_code+"";
             Log.e("rb_changetext",rb_changetext+"----"+listsize);
@@ -660,10 +695,239 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
             }
 
         }
+        iv_add_data.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                initaddPopupWindow();
+            }
+        });
+
+        if (ComaddBeanList.size()==0||ComaddBeanList.size()==1){
+            iv_add_data.setVisibility(View.GONE);
+        }else {
+            iv_add_data.setVisibility(View.VISIBLE);
+        }
+
+    }
+
+    private PopupWindow editPW;
+    private void initaddPopupWindow() {
+        View contView = LayoutInflater.from(mActivity).inflate(R.layout.index_recycle_item, null);
+        editadd_et = (ClearableEditText) contView.findViewById(R.id.edit_et);
+        TextView sure_tv = (TextView) contView.findViewById(R.id.sure_tv);
+        TextView cancle_tv = (TextView) contView.findViewById(R.id.cancle_tv);
+        ImageView search_im = contView.findViewById(R.id.search_im);
+        LinearLayout line_top = contView.findViewById(R.id.line_top);
+        rv_line_add_port_data = contView.findViewById(R.id.rv_ip_port_data);
+        rv_line_add_port_data.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
+        rv_line_add_port_data.setLayoutManager(new LinearLayoutManager(mActivity));
+        dlMacodeAdapter = new DlMacodeAdapter(ComaddBeanList);
+        dlMacodeAdapter.setmList(ComaddBeanList);
+        rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+        setaddAdapter(ComaddBeanList);
+        editadd_et.requestFocus();
+
+        editPW = new PopupWindow(contView, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
+        editPW.setTouchable(true);
+        editPW.setBackgroundDrawable(new BitmapDrawable());
+        editPW.setOnDismissListener(new BasePopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                closeListPopupWindow();
+            }
+        });
+        View parentView = mActivity.getWindow().findViewById(Window.ID_ANDROID_CONTENT);
+        editPW.showAtLocation(parentView, Gravity.CENTER, 0, 0);
+        CommonUtil.setBackgroundAlpha(mActivity, 0.5f);
+        editadd_et.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)) {
+                    String mSearchStr = editadd_et.getText().toString().trim();
+                    if (!mSearchStr.isEmpty()) {
+                        List<DlMacodesBean> thisList = new ArrayList<>();
+                        for(int i=0;i<ComaddBeanList.size();i++){
+                            if(ComaddBeanList.get(i).getDL_MACODE().contains(mSearchStr)){
+                                thisList.add(ComaddBeanList.get(i));
+                            }
+                            if(i == ComaddBeanList.size() -1){
+                                dlMacodeAdapter = new DlMacodeAdapter(thisList);
+                                rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+                                LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
+
+                            }
+                            List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+                            for (int j = 0; j < lineCodeEntities.size(); j++) {
+                                lineCodeEntities.get(j).setChecked(false);
+                            }
+                            dlMacodeAdapter.notifyDataSetChanged();
+                        }
+
+
+                    } else {
+                        dlMacodeAdapter = new DlMacodeAdapter(ComaddBeanList);
+                        rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+                        List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+                        for (int i = 0; i < lineCodeEntities.size(); i++) {
+                            lineCodeEntities.get(i).setChecked(false);
+                        }
+                        dlMacodeAdapter.notifyDataSetChanged();
+
+                    }
+                    dlMacodeAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+
+                        @Override
+                        public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                            List<DlMacodesBean> ipAndPortBeans = dlMacodeAdapter.getmList();
+                            dl_macodEdata = ipAndPortBeans.get(position).getDL_MACODE();
+                            dlstr_macodes = ipAndPortBeans.get(position).getDL_MOULDCODE();
+                            pr_sdetail = ipAndPortBeans.get(position).getPR_DETAIL();
+                            for (int i = 0; i < ipAndPortBeans.size(); i++) {
+                                ipAndPortBeans.get(i).setChecked(false);
+                            }
+                            ipAndPortBeans.get(position).setChecked(true);
+                            dlMacodeAdapter.notifyDataSetChanged();
+                        }
+                    });
+                    return true;
+                }
+                return false;
+            }
+        });
+
+
+
+        search_im.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                String mSearchStr = editadd_et.getText().toString().trim();
+                if (!mSearchStr.isEmpty()) {
+                    List<DlMacodesBean> thisList = new ArrayList<>();
+                    for(int i=0;i<ComaddBeanList.size();i++){
+                        if(ComaddBeanList.get(i).getDL_MACODE().contains(mSearchStr)){
+                            thisList.add(ComaddBeanList.get(i));
+                        }
+                        if(i == ComaddBeanList.size() -1){
+                            dlMacodeAdapter = new DlMacodeAdapter(thisList);
+                            rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+                            LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
+
+                        }
+                        List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+                        for (int j = 0; j < lineCodeEntities.size(); j++) {
+                            lineCodeEntities.get(j).setChecked(false);
+                        }
+                        dlMacodeAdapter.notifyDataSetChanged();
+                    }
+
+
+                } else {
+                    dlMacodeAdapter = new DlMacodeAdapter(ComaddBeanList);
+                    rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+                    List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+                    for (int i = 0; i < lineCodeEntities.size(); i++) {
+                        lineCodeEntities.get(i).setChecked(false);
+                    }
+                    dlMacodeAdapter.notifyDataSetChanged();
+
+                }
+                dlMacodeAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+
+                    @Override
+                    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                        List<DlMacodesBean> ipAndPortBeans = dlMacodeAdapter.getmList();
+                        dl_macodEdata = ipAndPortBeans.get(position).getDL_MACODE();
+                        dlstr_macodes = ipAndPortBeans.get(position).getDL_MOULDCODE();
+                        pr_sdetail = ipAndPortBeans.get(position).getPR_DETAIL();
+                        for (int i = 0; i < ipAndPortBeans.size(); i++) {
+                            ipAndPortBeans.get(i).setChecked(false);
+                        }
+                        ipAndPortBeans.get(position).setChecked(true);
+                        dlMacodeAdapter.notifyDataSetChanged();
+                    }
+                });
+            }
+
+        });
+
+
+
+        //确定
+        sure_tv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (StringUtil.isEmpty(dl_macodEdata)){
+                    CommonUtil.toastNoRepeat(mActivity,"请选择工单");
+                    return;
+                }
+//                SharedPreUtil.saveString(mActivity, "MA_CODE", dl_macodEdata);
+                rb_changetext=dl_macodEdata;
+                mOlIdTv.setText(dl_macodEdata);
+                ce_moju.setText(dlstr_macodes);
+//                tv_maprodname.setText(pr_sdetail);
+                Log.e("itemremark",rb_changetext);
+                ma_code=dl_macodEdata;
+                closeListPopupWindow();
+            }
+        });
+
+        //取消
+        cancle_tv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+
+                closeListPopupWindow();
+            }
+        });
+
+        String mSearchStr = editadd_et.getText().toString().trim();
+        if (mSearchStr.isEmpty()) {
+            dlMacodeAdapter = new DlMacodeAdapter(ComaddBeanList);
+            rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+            List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+            for (int i = 0; i < lineCodeEntities.size(); i++) {
+                lineCodeEntities.get(i).setChecked(false);
+            }
+            dlMacodeAdapter.notifyDataSetChanged();
+
+            dlMacodeAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+
+                @Override
+                public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                    List<DlMacodesBean> ipAndPortBeans = dlMacodeAdapter.getmList();
+                    dl_macodEdata = ipAndPortBeans.get(position).getDL_MACODE();
+                    pr_sdetail = ipAndPortBeans.get(position).getPR_DETAIL();
+                    for (int i = 0; i < ipAndPortBeans.size(); i++) {
+                        ipAndPortBeans.get(i).setChecked(false);
+                    }
+                    ipAndPortBeans.get(position).setChecked(true);
+                    dlMacodeAdapter.notifyDataSetChanged();
+                }
+            });
+        }
 
 
+
+    }
+
+    private void setaddAdapter(List<DlMacodesBean> mList) {
+        LogUtil.i("mList", JSON.toJSONString(mList));
+        dlMacodeAdapter = new DlMacodeAdapter(mList);
+        dlMacodeAdapter.setmList(mList);
+        rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+        dlMacodeAdapter.notifyDataSetChanged();
     }
 
+    private void closeListPopupWindow() {
+        if (editPW != null) {
+            editPW.dismiss();
+            editPW = null;
+            CommonUtil.setBackgroundAlpha(mActivity, 1f);
+        }
+
+    }
     private void initUnitView() {
         mUnitspinner = root.findViewById(R.id.unit_spinner);
         unitList = new ArrayList<>();
@@ -828,7 +1092,7 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
             if (StringUtil.isEmpty(item.getDE_NAME())){
                 helper.setText(R.id.macode_Tv,item.getMA_CODE());
             }else {
-                helper.setText(R.id.macode_Tv,item.getMA_CODE()+"-"+item.getDE_NAME());
+                helper.setText(R.id.macode_Tv,item.getMA_CODE()+"-"+item.getDE_NAME()+"\n"+item.getMA_KIND());
             }
         }
     }
@@ -839,12 +1103,18 @@ public class GdWorkSwitchFragment extends BaseFragment implements View.OnClickLi
     private class FuzzyBean{
         String MA_CODE = null;
         String DE_NAME = null;
+        String MA_KIND = null;
         public FuzzyBean(String MA_CODE) {
             this.MA_CODE = MA_CODE;
         }
-        public FuzzyBean(String MA_CODE, String DE_NAME) {
+        public FuzzyBean(String MA_CODE, String DE_NAME,String MA_KIND) {
             this.MA_CODE = MA_CODE;
             this.DE_NAME = DE_NAME;
+            this.MA_KIND = MA_KIND;
+        }
+
+        public String getMA_KIND() {
+            return MA_KIND;
         }
 
         public String getDE_NAME() {

+ 1 - 1
app/src/main/java/com/uas/hystorage/fragment/GoodOrBadAddDetailFragment.java

@@ -307,7 +307,7 @@ public class GoodOrBadAddDetailFragment extends BaseFragment implements View.OnC
                                             @Override
                                             public void onFail(int flag, String failStr) throws Exception {
                                                 progressDialog.dismiss();
-                                                CommonUtil.toastNoRepeat(mActivity, "生产批次号异常"+failStr);
+                                                CommonUtil.toastNoRepeat(mActivity, ""+failStr);
                                                 tv_batchnumber.setText("");
                                                 tv_objectid.setText("");
                                                 tv_workorder.setText("");

+ 121 - 1
app/src/main/java/com/uas/hystorage/fragment/GoodOrBadFragment.java

@@ -31,12 +31,15 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.BaseViewHolder;
 import com.uas.hystorage.R;
 import com.uas.hystorage.activity.FunctionActivity;
+import com.uas.hystorage.adapter.CangKuAdapter;
+import com.uas.hystorage.bean.AddRuKubean;
 import com.uas.hystorage.bean.Addbean;
 import com.uas.hystorage.bean.WhcodeBean;
 import com.uas.hystorage.global.GloableParams;
 import com.uas.hystorage.listener.MyEditorActionListener;
 import com.uas.hystorage.tools.SharedPreUtil;
 import com.uas.hystorage.util.CommonUtil;
+import com.uas.hystorage.util.Constants;
 import com.uas.hystorage.util.FastjsonUtil;
 import com.uas.hystorage.util.FragmentUtils;
 import com.uas.hystorage.util.HttpCallback;
@@ -82,6 +85,13 @@ public class GoodOrBadFragment extends BaseFragment implements View.OnClickListe
     private String sc_name;
     private String sc_code;
     private String pi_type;
+    private String default_warehouse;
+    private List<AddRuKubean> stringList;
+    private ArrayList<AddRuKubean> Liststring;
+    private RecyclerView rv_content;
+    private CangKuAdapter reportDetailAdapter;
+    private String defaultRejectsWarehouse;
+    private TextView tv_moren;
 
     public void setOnFinishListener(OnFinishListener onFinishListener) {
         mOnFinishListener = onFinishListener;
@@ -120,11 +130,14 @@ public class GoodOrBadFragment extends BaseFragment implements View.OnClickListe
         storage_in_add_detail_commit_btn = root.findViewById(R.id.storage_in_add_detail_commit_btn);
         iv_search = root.findViewById(R.id.iv_search);
         mListImageView = (ImageView) getActivity().findViewById(R.id.btn_actionbar_list_icon_iv);
+        rv_content = root.findViewById(R.id.rv_data);
+        tv_moren = root.findViewById(R.id.tv_moren);
         EventBus.getDefault().register(this);
     }
 
     @Override
     protected void initEvents() {
+
         pi_class = SharedPreUtil.getString(mActivity, "pi_class", null);
         pi_type = SharedPreUtil.getString(mActivity, "pi_type", null);
         FunctionActivity.setTitle("新增入库("+pi_type+")");
@@ -133,6 +146,44 @@ public class GoodOrBadFragment extends BaseFragment implements View.OnClickListe
         storage_in_add_detail_commit_btn.setOnClickListener(this);
         iv_search.setOnClickListener(this);
 
+        stringList = new ArrayList<>();
+        Liststring = new ArrayList<>();
+        default_warehouse = SharedPreUtil.getString(mActivity
+                , Constants.FLAG.DEFAULT_WAREHOUSE_CACHE + CommonUtil.getUserName(mActivity), null);
+        defaultRejectsWarehouse = SharedPreUtil.getString(mActivity
+                , Constants.FLAG.CACHE_DEFAULT_REJECTS_WAREHOUSE + CommonUtil.getUserName(mActivity), null);
+
+        rv_content.setLayoutManager(new LinearLayoutManager(mActivity));
+        reportDetailAdapter = new CangKuAdapter(Liststring);
+        reportDetailAdapter.setmList(Liststring);
+        rv_content.setAdapter(reportDetailAdapter);
+        reportDetailAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+            @Override
+            public void onItemClick(BaseQuickAdapter baseQuickAdapter, View view, int i) {
+                List<AddRuKubean> addRuKubeans = reportDetailAdapter.getmList();
+                sc_code=addRuKubeans.get(i).getCode();
+                ed_jump.setText(addRuKubeans.get(i).getCode()+addRuKubeans.get(i).getName());
+                ed_jump.setSelection(ed_jump.getText().length());
+            }
+        });
+        if (pi_type.equals("良品")){
+            if (!StringUtil.isEmpty(default_warehouse)){
+                tv_moren.setVisibility(View.VISIBLE);
+                getReparukuirStep(default_warehouse);
+            }
+
+        }else {
+            if (!StringUtil.isEmpty(defaultRejectsWarehouse)){
+                tv_moren.setVisibility(View.VISIBLE);
+                getReparukuirStep(defaultRejectsWarehouse);
+            }
+
+        }
+
+
+
+
+
         CommonUtil.setEditorActionListener(ed_jump, new MyEditorActionListener() {
             @Override
             public void MyEditorAction(String text, int actionId, KeyEvent event) {
@@ -184,8 +235,78 @@ public class GoodOrBadFragment extends BaseFragment implements View.OnClickListe
                 break;
         }
     }
+    private void getReparukuirStep(String data) {
+        if (pi_type.equals("良品")){
+            pi_type="";
+        }
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_PDAIO_IN_GETWHCODE)
+                        .method(Request.Method.GET)
+                        .tag(TAG + "getMaCode")
+                        .addParam("condition","")
+                        .addParam("piclass",pi_class)
+                        .addParam("pi_type",pi_type)
+                        .flag(0)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        progressDialog.dismiss();
+                        Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
+                        JSONArray dataArray = FastjsonUtil.getJSONArray(o.toString(), "data");
+                        if (isSuccess){
+                            if (dataArray == null){
+                                CommonUtil.toastNoRepeat(mActivity,"未搜索到匹配数据");
+                            }else {
+                                for (Object index : dataArray) {
+                                    AddRuKubean addRuKubean = new AddRuKubean();
+                                    JSONObject data = (JSONObject) index;
+                                    addRuKubean.setCode(data.getString("WH_CODE"));
+                                    addRuKubean.setName(data.getString("WH_DESCRIPTION"));
+                                    stringList.add(addRuKubean);
+                                }
+
+                                String[] split = data.split(",");
+                                for (String s : split) {
+                                    for (int i=0;i<stringList.size();i++){
+                                        AddRuKubean addRuKubean = new AddRuKubean();
+                                        if(stringList.get(i).getName().contains(s)||stringList.get(i).getCode().contains(s)){
+                                            addRuKubean.setCode(stringList.get(i).getCode());
+                                            addRuKubean.setName(stringList.get(i).getName());
+                                            Liststring.add(addRuKubean);
+                                        }
+
+                                    }
+                                }
+                                reportDetailAdapter = new CangKuAdapter(Liststring);
+                                reportDetailAdapter.setmList(Liststring);
+                                rv_content.setAdapter(reportDetailAdapter);
+                                reportDetailAdapter.notifyDataSetChanged();
+                                reportDetailAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+                                    @Override
+                                    public void onItemClick(BaseQuickAdapter baseQuickAdapter, View view, int i) {
+                                        List<AddRuKubean> addRuKubeans = reportDetailAdapter.getmList();
+                                        sc_code=addRuKubeans.get(i).getCode();
+                                        ed_jump.setText(addRuKubeans.get(i).getCode()+addRuKubeans.get(i).getName());
+                                        ed_jump.setSelection(ed_jump.getText().length());
+                                    }
+                                });
+
+                            }
+                        }
+                    }
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+                    }
+                });
+
 
 
+    }
+
     private void getRepairStep(String trim) {
         if (pi_type.equals("良品")){
             pi_type="";
@@ -211,7 +332,6 @@ public class GoodOrBadFragment extends BaseFragment implements View.OnClickListe
                                 CommonUtil.toastNoRepeat(mActivity,"未搜索到匹配数据");
                             }else {
                                 handleFeededlineData(dataArray,trim);
-
                             }
                         }
                     }

+ 346 - 0
app/src/main/java/com/uas/hystorage/fragment/PCHListFragment.java

@@ -0,0 +1,346 @@
+package com.uas.hystorage.fragment;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+import android.support.v7.widget.DefaultItemAnimator;
+import android.support.v7.widget.DividerItemDecoration;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.text.Editable;
+import android.text.TextWatcher;
+import android.view.KeyEvent;
+import android.view.View;
+import android.widget.AutoCompleteTextView;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.android.volley.Request;
+import com.android.volley.toolbox.StringRequest;
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.scwang.smartrefresh.layout.api.RefreshLayout;
+import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
+import com.uas.hystorage.R;
+import com.uas.hystorage.activity.FunctionActivity;
+import com.uas.hystorage.bean.BoxDetailBean;
+import com.uas.hystorage.global.GloableParams;
+import com.uas.hystorage.util.CommonUtil;
+import com.uas.hystorage.util.Constants;
+import com.uas.hystorage.util.FastjsonUtil;
+import com.uas.hystorage.util.HttpCallback;
+import com.uas.hystorage.util.HttpParams;
+import com.uas.hystorage.util.LogUtil;
+import com.uas.hystorage.util.VollyRequest;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by cjh on 2024/06/05
+ * function:已装箱列表
+ */
+
+public class PCHListFragment extends BaseFragment {
+    private String sc_code,ma_code;
+    private StringRequest mStringRequest;
+    private RefreshLayout mRefreshLayout;
+    List<BoxDetailBean> mFeededList;
+    private RecyclerView mRecyclerView;
+    private FeededListAdapter myAdapter = null;
+    private AutoCompleteTextView mSearch;
+    private ImageView deleteImg;
+    private String boxcode;
+
+    @Override
+    protected int getLayout() {
+        return R.layout.feeded_list;
+    }
+
+    @Override
+    protected void initViews() {
+        FunctionActivity.setTitle("已装箱列表");
+        ((FunctionActivity) mActivity).setDeleteImageView(false);
+        deleteImg = mActivity.findViewById(R.id.btn_actionbar_delete_icon_iv);
+        mRefreshLayout = (RefreshLayout) root.findViewById(R.id.SmartRefreshLayout_id);
+        mSearch = root.findViewById(R.id.fl_search_actext);
+        mFeededList = new ArrayList<>();
+        myAdapter = new FeededListAdapter(mFeededList);
+
+        mRecyclerView = root.findViewById(R.id.feeded_rv);
+        mRecyclerView.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
+        mRecyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
+        //设置Item增加、移除动画
+        mRecyclerView.setItemAnimator(new DefaultItemAnimator());
+        setAdapter(mFeededList);
+        mRecyclerView.setAdapter(myAdapter);
+    }
+
+    @Override
+    protected void initDatas() {
+        Bundle bundle = getArguments();//从activity传过来的Bundle
+        if (bundle != null) {
+            boxcode = bundle.getString("boxcode");
+            sc_code = bundle.getString(Constants.FLAG.SC_CODE);
+            ma_code = bundle.getString(Constants.FLAG.MA_CODE);
+
+            getLoadingData();
+        }
+    }
+
+
+    @Override
+    protected void initEvents() {
+
+
+        mRefreshLayout.setOnRefreshListener(new OnRefreshListener() {
+            @Override
+            public void onRefresh(RefreshLayout refreshLayout) {
+                getLoadingData();
+            }
+        });
+
+        myAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+            @Override
+            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                BoxDetailBean bean = myAdapter.getBeanByPositon(position);
+                LogUtil.i("addOnItemTouchListener", JSON.toJSONString(bean));
+            }
+        });
+        myAdapter.setOnItemLongClickListener(new BaseQuickAdapter.OnItemLongClickListener() {
+            @Override
+            public boolean onItemLongClick(BaseQuickAdapter adapter, View view, int position) {
+                new AlertDialog.Builder(mActivity).setTitle("提示").setMessage("是否确认删除此行?")
+                        .setPositiveButton(getString(R.string.confirm), new DialogInterface.OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialog, int which) {
+                                dodeleteMSSSingle(position);
+                            }
+                        }).setNegativeButton(getString(R.string.cancel), null).create().show();
+                return false;
+            }
+        });
+        mSearch.addTextChangedListener(new TextWatcher() {
+            @Override
+            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+            }
+
+            @Override
+            public void onTextChanged(CharSequence s, int start, int before, int count) {
+            }
+
+            @Override
+            public void afterTextChanged(Editable s) {
+                if (s.length() == 0) {
+                    myAdapter.setmFeededList(mFeededList);
+                    myAdapter.notifyDataSetChanged();
+                } else {
+                    String mSearchStr = s.toString().trim();
+                    LogUtil.i("mSearchStrg", mSearchStr);
+                    doSearchSelect(mSearchStr);
+                }
+            }
+        });
+
+
+    }
+
+
+    private void dodeleteMSSSingle(int position) {
+        if (mFeededList.size() - 1 < position || mFeededList.get(position) == null) return;
+        String barcode = myAdapter.getBeanByPositon(position).getPD_BARCODE();
+
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_OUTMATERIAL_DETAILDETAIL)
+                        .method(Request.Method.POST)
+                        .tag(TAG + "loading")
+                        .flag(0)
+                        .addParam("sc_code", sc_code)//岗位资源
+                        .addParam("ma_code",ma_code)//工单编号
+                        .addParam("boxcode",boxcode)//箱号
+                        .addParam("lotno",barcode)//生产批次号
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        try {
+                            Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(), "success");
+                            if (isSuccess) {
+//                                JSONObject dataObject = FastjsonUtil.getJSONObject(o.toString(),"data");
+                                CommonUtil.toastNoRepeat(mActivity, "删除成功");
+                                mFeededList.remove(position);
+                                myAdapter.notifyDataSetChanged();
+                            } else {
+
+                            }
+                            progressDialog.dismiss();
+
+                        } catch (Exception e) {
+
+                        }
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+
+                    }
+
+                });
+
+    }
+
+
+    //搜索查询刷选
+    private void doSearchSelect(String mSearchStr) {
+        if (mSearchStr.length() == 0) return;
+        List<BoxDetailBean> selectList = new ArrayList<>();
+        for (int i = 0; i < mFeededList.size(); i++) {
+            if (mFeededList.get(i).getPD_BARCODE().contains(mSearchStr)
+                    || (mFeededList.get(i).getPD_INNERQTY() + "").contains(mSearchStr)
+                    || (mFeededList.get(i).getPD_PRODCODE() + "").contains(mSearchStr)
+                    || (mFeededList.get(i).getPR_DETAIL() + "").contains(mSearchStr)
+                    || (mFeededList.get(i).getPR_SPEC() + "").contains(mSearchStr)) {
+                selectList.add(mFeededList.get(i));
+            }
+
+            if (i == mFeededList.size() - 1) {
+                setAdapter(selectList);
+                LogUtil.i("selectList", JSON.toJSONString(selectList));
+            }
+        }
+
+    }
+
+
+    private void getLoadingData() {
+        if (boxcode == null) {
+            CommonUtil.toastNoRepeat(mActivity, "箱号为空");
+            return;
+        }
+        mFeededList.clear();
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_GETBOXDETAIL)
+                        .method(Request.Method.GET)
+                        .tag(TAG + "getLoadingData ")
+                        .flag(0)
+                        .addParam("sc_code", sc_code)
+                        .addParam("ma_code", ma_code)
+                        .addParam("boxcode", boxcode)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        try {
+                            Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(), "success");
+                            if (isSuccess) {
+                                JSONArray dataArray = FastjsonUtil.getJSONArray(o.toString(), "data");
+                                handleFeededData(dataArray);
+
+                            } else {
+
+                            }
+                            progressDialog.dismiss();
+                            mRefreshLayout.finishRefresh(0);
+                        } catch (Exception e) {
+
+                        }
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        mRefreshLayout.finishRefresh(0);
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+                    }
+
+                });
+
+    }
+
+    private void handleFeededData(JSONArray dataArray) {
+        BoxDetailBean bean = null;
+        for (Object index : dataArray) {
+            JSONObject data = (JSONObject) index;
+            bean = new BoxDetailBean(data.getString("PD_BARCODE"),
+                    data.getString("PD_INNERQTY"),
+                    data.getString("PD_PRODCODE"),
+                    data.getString("PR_DETAIL"),
+                    data.getString("PR_SPEC"));
+            mFeededList.add(bean);
+        }
+
+        setAdapter(mFeededList);
+    }
+
+    @Override
+    public void onAttach(Activity activity) {
+        super.onAttach(activity);
+        this.mActivity = activity;
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        return false;
+    }
+
+    @Override
+    public boolean onFragmentBackPressed() {
+        return false;
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        ((FunctionActivity) mActivity).setDeleteImageView(false);
+    }
+
+    private void setAdapter(List<BoxDetailBean> mList) {
+        LogUtil.i("mList", JSON.toJSONString(mList));
+        if (myAdapter == null) {
+            myAdapter = new FeededListAdapter(mList);
+            mRecyclerView.setAdapter(myAdapter);
+        } else {
+            myAdapter.setmFeededList(mList);
+            myAdapter.notifyDataSetChanged();
+        }
+    }
+
+
+    class FeededListAdapter extends BaseQuickAdapter<BoxDetailBean, BaseViewHolder> {
+        private List<BoxDetailBean> mmmdList;
+
+        public void setmFeededList(List<BoxDetailBean> mmmdList) {
+            this.mmmdList = mmmdList;
+        }
+
+        public BoxDetailBean getBeanByPositon(int position) {
+            return mmmdList.get(position);
+        }
+
+        public FeededListAdapter(@Nullable List<BoxDetailBean> data) {
+            super(R.layout.mypcakage_item_layout, data);
+            this.mmmdList = data;
+        }
+
+        @Override
+        protected void convert(BaseViewHolder helper, BoxDetailBean item) {
+            helper.setText(R.id.item_content, item.getPD_BARCODE());
+            helper.setText(R.id.item_qty, item.getPD_INNERQTY());
+            helper.setText(R.id.item_mouldtype, item.getPD_PRODCODE()+
+                                                        item.getPR_DETAIL()+
+                                                        item.getPR_SPEC());
+        }
+    }
+
+    
+
+}

+ 171 - 18
app/src/main/java/com/uas/hystorage/fragment/PackageAcquisitionFragment.java

@@ -7,6 +7,7 @@ import android.app.Application;
 import android.content.DialogInterface;
 import android.content.Intent;
 import android.graphics.drawable.BitmapDrawable;
+import android.os.Bundle;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.util.Log;
@@ -21,6 +22,8 @@ import android.widget.CheckBox;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.PopupWindow;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
 import android.widget.TextView;
 
 import com.alibaba.fastjson.JSONArray;
@@ -44,6 +47,7 @@ import com.uas.hystorage.util.CameraUtil;
 import com.uas.hystorage.util.CommonUtil;
 import com.uas.hystorage.util.Constants;
 import com.uas.hystorage.util.FastjsonUtil;
+import com.uas.hystorage.util.FragmentUtils;
 import com.uas.hystorage.util.HttpCallback;
 import com.uas.hystorage.util.HttpParams;
 import com.uas.hystorage.util.JsonTools;
@@ -58,6 +62,7 @@ import org.greenrobot.eventbus.Subscribe;
 import org.json.JSONException;
 
 import java.util.ArrayList;
+import java.util.Objects;
 
 import okhttp3.OkHttpClient;
 import razerdp.basepopup.BasePopupWindow;
@@ -90,6 +95,13 @@ public class PackageAcquisitionFragment extends BaseFragment implements View.OnC
     private HttpHeaders httpHeaders;
     private LinearLayout linerecycle;
     private String pdeven_barcode;
+    private RadioGroup rg_change;
+    private RadioButton rb_fengxiang;
+    private RadioButton rb_chexiao;
+    private LinearLayout line_pch;
+    private String ifreturn = "0";
+    private String qtytrim;
+    private Button mMoreBtn;
 
     @Override
     protected int getLayout() {
@@ -99,7 +111,7 @@ public class PackageAcquisitionFragment extends BaseFragment implements View.OnC
     @Override
     protected void initViews() {
         setTitle("包装采集");
-        ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
+        ((FunctionActivity) getActivity()).setMoreBtnVisible(true);
         storage_recharge_collect_ets = mActivity.findViewById(R.id.storage_recharge_collect_ets);
         capacity_collect_ets = mActivity.findViewById(R.id.capacity_collect_ets);
         inventory_collect_barcode_et = mActivity.findViewById(R.id.inventory_collect_barcode_et);
@@ -113,7 +125,12 @@ public class PackageAcquisitionFragment extends BaseFragment implements View.OnC
         tv_item_data = mActivity.findViewById(R.id.tv_item_data);
         rv_data = mActivity.findViewById(R.id.rv_data);
         linerecycle = mActivity.findViewById(R.id.linerecycle);
-
+        rg_change = mActivity.findViewById(R.id.rg_change);
+        rb_fengxiang = mActivity.findViewById(R.id.rb_fengxiang);
+        rb_chexiao = mActivity.findViewById(R.id.rb_chexiao);
+        line_pch = mActivity.findViewById(R.id.line_pch);
+        inventory_collect_barcode_et.requestFocus();
+        mMoreBtn = (Button)mActivity.findViewById(R.id.btn_actionbar_more);
     }
 
 
@@ -171,6 +188,37 @@ public class PackageAcquisitionFragment extends BaseFragment implements View.OnC
             }
         });
 
+        rg_change.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
+            @SuppressLint("NonConstantResourceId")
+            @Override
+            public void onCheckedChanged(RadioGroup radioGroup, int checkid) {
+                switch (checkid){
+                    case R.id.rb_fengxiang:
+                        ifreturn="0";
+                        line_pch.setVisibility(View.VISIBLE);
+                        capacity_collect_ets.setEnabled(true);
+                        cb_lock.setVisibility(View.VISIBLE);
+                        jlt_storage_in_barcode_save_btn.setText("确认封箱");
+
+                        break;
+                    case R.id.rb_chexiao:
+                        ifreturn="1";
+                        line_pch.setVisibility(View.GONE);
+                        capacity_collect_ets.setEnabled(false);
+                        cb_lock.setVisibility(View.GONE);
+                        jlt_storage_in_barcode_save_btn.setText("取消封箱");
+                        break;
+                }
+            }
+        });
+
+        mMoreBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                showMoreMenu();
+            }
+        });
+
     }
     private ArrayList<BoxDetailBean> mFeededList;
     @Subscribe
@@ -230,7 +278,51 @@ public class PackageAcquisitionFragment extends BaseFragment implements View.OnC
         initOkg();
 
     }
+    private PopupWindow mMenuPopupWindow;
+    /**
+     * 展示扩展菜单
+     */
+    private void showMoreMenu() {
+        View view = View.inflate(getActivity(), R.layout.pop_postpunch_add_menu, null);
+        Button addBtn = (Button) view.findViewById(R.id.pop_storage_in_add_menu_1);
+        addBtn.setText("已装箱列表");
+
+        mMenuPopupWindow = new PopupWindow(view, LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
+        mMenuPopupWindow.setBackgroundDrawable(new BitmapDrawable());
+        mMenuPopupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                closeMenuPopupWindow();
+            }
+        });
+        CommonUtil.setBackgroundAlpha(Objects.requireNonNull(getActivity()), 0.5f);
+        mMenuPopupWindow.showAsDropDown(mMoreBtn);
 
+        addBtn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                closeMenuPopupWindow();
+                if (StringUtil.isEmpty(inventory_collect_barcode_et.getText().toString().trim())){
+                    CommonUtil.toastNoRepeat(mActivity, "请输入箱号");
+                    return;
+                }
+                PCHListFragment pchListFragment = new PCHListFragment();
+                Bundle bundle=new Bundle();
+                bundle.putString("boxcode",inventory_collect_barcode_et.getText().toString().trim());
+                bundle.putString(Constants.FLAG.SC_CODE,sc_code);
+                bundle.putString(Constants.FLAG.MA_CODE,ma_code);
+                FragmentUtils.switchFragment(PackageAcquisitionFragment.this, pchListFragment,bundle);
+            }
+        });
+
+    }
+
+    private void closeMenuPopupWindow() {
+        if (mMenuPopupWindow != null) {
+            mMenuPopupWindow.dismiss();
+            CommonUtil.setBackgroundAlpha(mActivity, 1f);
+        }
+    }
     /**
      * 箱号回车
      * @param data
@@ -259,7 +351,9 @@ public class PackageAcquisitionFragment extends BaseFragment implements View.OnC
                         .addParam("ma_code",ma_code)//工单编号
                         .addParam("boxcode",data)//箱号
                         .addParam("innerqty",v+"")//箱内容量
+                        .addParam("ifreturn",ifreturn)
                         .build(), new HttpCallback() {
+                    @SuppressLint("SetTextI18n")
                     @Override
                     public void onSuccess(int flag, Object o) throws Exception {
                         progressDialog.dismiss();
@@ -282,7 +376,9 @@ public class PackageAcquisitionFragment extends BaseFragment implements View.OnC
                                 String pr_spec = dataObject.getString("PR_SPEC") == null ? "-" : dataObject.getString("PR_SPEC");
 
                                 tv_item_data.setText("产品"+pa_outboxcode+" "+pa_prodcode+" "+pr_detail+" "+pr_spec);
-                                capacity_collect_ets.setText(pa_standardqty+"");
+                                if (!cb_lock.isChecked()){
+                                    capacity_collect_ets.setText(pa_standardqty+"");
+                                }
 
 
                                 tv_loaded.setText(pa_currentqty);
@@ -462,6 +558,7 @@ public class PackageAcquisitionFragment extends BaseFragment implements View.OnC
                                 if (dataObject == null){
 
                                 }else {
+                                    storage_recharge_collect_ets.setText("");
                                     String pa_standardqty = dataObject.getString("PA_STANDARDQTY") == null ? "" : dataObject.getString("PA_STANDARDQTY");
                                     String pa_currentqty = dataObject.getString("PA_CURRENTQTY") == null ? "" : dataObject.getString("PA_CURRENTQTY");
                                     String pa_restqty = dataObject.getString("PA_RESTQTY") == null ? "" : dataObject.getString("PA_RESTQTY");
@@ -482,11 +579,12 @@ public class PackageAcquisitionFragment extends BaseFragment implements View.OnC
                                     tv_item_data.setVisibility(View.VISIBLE);
                                     tv_item_data.setText("产品"+pa_outboxcode+" "+pa_prodcode+" "+pa_prdetail+" "+pa_prspec+"\n"
                                             +lotno+" "+lotprod+" "+lotprdetail+" "+lotprspec);
-                                    capacity_collect_ets.setText(pa_standardqty);
+                                    if (!cb_lock.isChecked()){
+                                        capacity_collect_ets.setText(pa_standardqty);
+                                    }
 
                                     tv_loaded.setText(pa_currentqty);
                                     tv_residue.setText(pa_restqty);
-                                    storage_recharge_collect_ets.setText("");
                                     getBoxData(inventory_collect_barcode_et.getText().toString().trim());
 
                                     if (pa_restqty.equals("0")){
@@ -503,6 +601,7 @@ public class PackageAcquisitionFragment extends BaseFragment implements View.OnC
 
                                     JSONArray dataArray = dataObject.getJSONArray("detail");
                                     if (dataArray == null){
+                                        storage_recharge_collect_ets.setText("");
                                         storage_recharge_collect_ets.requestFocus();
                                         mFeededList.clear();
                                         adapter = new MyPackageAcquisitionAdapter(mActivity, mFeededList);
@@ -629,12 +728,12 @@ public class PackageAcquisitionFragment extends BaseFragment implements View.OnC
 
     private void getconfirmPakingData() {
         String boxtrim = inventory_collect_barcode_et.getText().toString().trim();
-        String qtytrim = tv_residue.getText().toString().trim();
+        qtytrim = tv_residue.getText().toString().trim();
         if (boxtrim.isEmpty()){
             CommonUtil.toastNoRepeat(mActivity, "请输入箱号");
             return;
         }
-        if (qtytrim.isEmpty()){
+        if (StringUtil.isEmpty(qtytrim)){
             CommonUtil.toastNoRepeat(mActivity, "数量不可等于空");
             return;
         }
@@ -656,6 +755,7 @@ public class PackageAcquisitionFragment extends BaseFragment implements View.OnC
                         if (!cb_lock.isChecked()){
                             capacity_collect_ets.setText("");
                         }
+                        inventory_collect_barcode_et.requestFocus();
                         tv_loaded.setText("");
                         tv_residue.setText("");
                         inventory_collect_barcode_et.setText("");
@@ -704,7 +804,9 @@ public class PackageAcquisitionFragment extends BaseFragment implements View.OnC
                         String pa_currentqty = dataObject.getString("PA_CURRENTQTY") == null ? "" : dataObject.getString("PA_CURRENTQTY");
                         String pa_restqty = dataObject.getString("PA_RESTQTY") == null ? "" : dataObject.getString("PA_RESTQTY");
                         inventory_collect_barcode_et.setText(pa_outboxcode);
-                        capacity_collect_ets.setText(pa_standardqty);
+                        if (!cb_lock.isChecked()){
+                            capacity_collect_ets.setText(pa_standardqty);
+                        }
                         tv_loaded.setText(pa_currentqty);
                         tv_residue.setText(pa_restqty);
                     }
@@ -834,6 +936,51 @@ public class PackageAcquisitionFragment extends BaseFragment implements View.OnC
     }
 
 
+    private void getquxiaoPakingData() {
+        String boxtrim = inventory_collect_barcode_et.getText().toString().trim();
+        qtytrim = tv_residue.getText().toString().trim();
+        if (boxtrim.isEmpty()){
+            CommonUtil.toastNoRepeat(mActivity, "请输入箱号");
+            return;
+        }
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_CANCELCONFIRMPAKING)
+                        .method(Request.Method.POST)
+                        .tag(TAG + "getMaCode")
+                        .flag(0)
+                        .addParam("sc_code", sc_code)//岗位资源
+                        .addParam("ma_code",ma_code)//工单编号
+                        .addParam("boxcode",boxtrim)//箱号
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, "取消封箱成功");
+                        capacity_collect_ets.setText("");
+                        inventory_collect_barcode_et.requestFocus();
+                        tv_loaded.setText("");
+                        tv_residue.setText("");
+                        inventory_collect_barcode_et.setText("");
+                        storage_recharge_collect_ets.setText("");
+                        tv_item_data.setText("");
+                        mFeededList.clear();
+                        adapter = new MyPackageAcquisitionAdapter(mActivity, mFeededList);
+                        rv_data.setLayoutManager(new LinearLayoutManager(mActivity));
+                        rv_data.setAdapter(adapter);
+                    }
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        inventory_collect_barcode_et.setText("");
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+                    }
+                });
+
+
+    }
+
     @Override
     public void onHiddenChanged(boolean hidden) {
         super.onHiddenChanged(hidden);
@@ -900,17 +1047,23 @@ public class PackageAcquisitionFragment extends BaseFragment implements View.OnC
                 }
                 break;
             case R.id.jlt_storage_in_barcode_save_btn:
-                String qtytrim = tv_residue.getText().toString().trim();
-                if (qtytrim.isEmpty()){
-                    CommonUtil.toastNoRepeat(mActivity, "数量不可等于空");
-                    return;
-                }
-                Double parseInt = Double.parseDouble(qtytrim);
-                if (parseInt>0||parseInt>0.0){
-                    initlinecodePopupWindow("箱未装满,确认封箱?","ok");
-                }else if (parseInt==0){
-                    initlinecodePopupWindow("确认封箱?","ok");
+                if (ifreturn.equals("0")){
+                    qtytrim = tv_residue.getText().toString().trim();
+                    if (StringUtil.isEmpty(qtytrim)){
+                        CommonUtil.toastNoRepeat(mActivity, "数量不可等于空");
+                        return;
+                    }
+                    Double parseInt = Double.parseDouble(qtytrim);
+                    if (parseInt>0||parseInt>0.0){
+                        initlinecodePopupWindow("箱未装满,确认封箱?","ok");
+                    }else if (parseInt==0){
+                        initlinecodePopupWindow("确认封箱?","ok");
+                    }
+                }else {
+                    getquxiaoPakingData();
                 }
+
+
 //                getconfirmPakingData();
                 break;
         }

+ 371 - 0
app/src/main/java/com/uas/hystorage/fragment/PreProcessingReportFragment.java

@@ -0,0 +1,371 @@
+package com.uas.hystorage.fragment;
+
+import android.annotation.SuppressLint;
+import android.app.Activity;
+import android.content.Intent;
+import android.support.v7.widget.DefaultItemAnimator;
+import android.support.v7.widget.DividerItemDecoration;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.util.SparseBooleanArray;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.Button;
+import android.widget.CheckBox;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.android.volley.Request;
+import com.android.volley.toolbox.StringRequest;
+import com.uas.hystorage.R;
+import com.uas.hystorage.activity.FunctionActivity;
+import com.uas.hystorage.bean.BeansJsonData;
+import com.uas.hystorage.bean.MaintainitemBean;
+import com.uas.hystorage.global.GloableParams;
+import com.uas.hystorage.tools.SharedPreUtil;
+import com.uas.hystorage.util.CommonUtil;
+import com.uas.hystorage.util.FastjsonUtil;
+import com.uas.hystorage.util.HttpCallback;
+import com.uas.hystorage.util.HttpParams;
+import com.uas.hystorage.util.LogUtil;
+import com.uas.hystorage.util.VollyRequest;
+
+import org.jetbrains.annotations.NotNull;
+
+import java.util.ArrayList;
+
+/**
+ * Created by RaoMeng on 2024/06/04
+ * Desc:在制转移
+ */
+public class PreProcessingReportFragment extends BaseFragment implements View.OnClickListener{
+
+    private RecyclerView mRecyclerView;
+    private ArrayList<MaintainitemBean> mFeededList;
+    private SelectAdapter myAdapter;
+    private Button jlt_storage_in_barcode_save_btn;
+    private StringRequest mStringRequest;
+    private String ma_code;
+    private String sc_code;
+    private TextView tv_ma_code;
+
+    @Override
+    protected int getLayout() {
+        return R.layout.fragment_pre_processing_report;
+    }
+
+    @Override
+    protected void initViews() {
+        setTitle("在制转移");
+        ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
+        mRecyclerView = root.findViewById(R.id.feeded_rv);
+        tv_ma_code = root.findViewById(R.id.tv_ma_code);
+        jlt_storage_in_barcode_save_btn = root.findViewById(R.id.jlt_storage_in_barcode_save_btn);
+    }
+
+
+
+    @Override
+    protected void initEvents() {
+        jlt_storage_in_barcode_save_btn.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                JSONArray jsonArray = new JSONArray();
+                ArrayList<MaintainitemBean> selectedItem = myAdapter.getSelectedItem();
+                if (selectedItem==null||selectedItem.size()==0){
+                    CommonUtil.toastNoRepeat(mActivity, "请选择工单");
+                    return;
+                }
+                for (int i=0;i<selectedItem.size();i++){
+                    MaintainitemBean maintainitemBean = selectedItem.get(i);
+                    BeansJsonData mainbeanjsonData =new BeansJsonData(maintainitemBean.getMA_CODE());
+                    jsonArray.add(mainbeanjsonData);
+                }
+
+                getNewsave(jsonArray.toString());
+            }
+        });
+        ma_code = SharedPreUtil.getString(mActivity, "MA_CODE", null);
+        sc_code = SharedPreUtil.getString(mActivity, "SC_CODE", null);
+        tv_ma_code.setText(ma_code);
+    }
+
+    @Override
+    protected void initDatas() {
+        mFeededList = new ArrayList<>();
+        myAdapter = new SelectAdapter(mFeededList);
+        mRecyclerView = root.findViewById(R.id.feeded_rv);
+        mRecyclerView.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
+        mRecyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
+        //设置Item增加、移除动画
+        mRecyclerView.setItemAnimator(new DefaultItemAnimator());
+        setAdapter(mFeededList);
+        mRecyclerView.setAdapter(myAdapter);
+        getNewVersionMsg();
+    }
+
+    private void getNewVersionMsg() {
+
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_GETCANTRANSFERWIP)
+                        .method(Request.Method.GET)
+                        .addParam("ma_code",ma_code)
+                        .addParam("sc_code",sc_code)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        progressDialog.dismiss();
+                        String result = o.toString();
+                        JSONArray dataArray = FastjsonUtil.getJSONArray(result, "data");
+                        handleFeededData(dataArray);
+
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+
+                    }
+
+                });
+
+
+
+
+
+    }
+    private void handleFeededData(JSONArray dataArray) {
+        MaintainitemBean bean;
+        mFeededList.clear();
+        for (Object index : dataArray) {
+            JSONObject data = (JSONObject) index;
+            bean= new MaintainitemBean(
+                    data.getString("MA_CODE"),
+                    data.getString("MA_PRODCODE"),
+                    data.getString("QTY"));
+            mFeededList.add(bean);
+        }
+        setAdapter(mFeededList);
+    }
+    private void setAdapter(ArrayList<MaintainitemBean> mList) {
+        LogUtil.i("mList", JSON.toJSONString(mList));
+        myAdapter = new SelectAdapter(mList);
+        mRecyclerView.setAdapter(myAdapter);
+    }
+
+    /**
+     * 保存
+     */
+    private void getNewsave(String data) {
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_TRANSFERWIP)
+                        .method(Request.Method.POST)
+                        .addParam("ma_code",ma_code)
+                        .addParam("sc_code",sc_code)
+                        .addParam("data",data)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, "转移成功");
+                        getNewVersionMsg();
+
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+
+                    }
+
+                });
+
+
+
+
+
+    }
+    @Override
+    public void onHiddenChanged(boolean hidden) {
+        super.onHiddenChanged(hidden);
+        if (!hidden) {
+            setTitle("在制转移");
+            ((FunctionActivity) getActivity()).setMoreBtnVisible(true);
+        } else {
+            ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
+        }
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        return false;
+    }
+
+    @Override
+    public boolean onFragmentBackPressed() {
+        return false;
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
+    }
+
+    @SuppressLint("NonConstantResourceId")
+    @Override
+    public void onClick(View v) {
+
+    }
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        if (resultCode != Activity.RESULT_OK) {
+            return;
+        }
+
+    }
+    public class SelectAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
+
+        private ArrayList<MaintainitemBean> mList = new ArrayList<>();
+        private SparseBooleanArray mSelectedPositions = new SparseBooleanArray();
+        private boolean mIsSelectable = false;
+
+
+        public SelectAdapter(ArrayList<MaintainitemBean> list) {
+            if (list == null) {
+                throw new IllegalArgumentException("model Data must not be null");
+            }
+            mList = list;
+        }
+
+        //更新adpter的数据和选择状态
+        public void updateDataSet(ArrayList<MaintainitemBean> list) {
+            this.mList = list;
+            mSelectedPositions = new SparseBooleanArray();
+//            ab.setTitle("已选择" + 0 + "项");
+        }
+
+
+        //获得选中条目的结果
+        public ArrayList<MaintainitemBean> getSelectedItem() {
+            ArrayList<MaintainitemBean> selectList = new ArrayList<>();
+            for (int i = 0; i < mList.size(); i++) {
+                if (isItemChecked(i)) {
+                    selectList.add(mList.get(i));
+                }
+            }
+            return selectList;
+        }
+
+
+        @Override
+        public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
+            View itemView = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.recyclerview_item2, viewGroup, false);
+            return new ListItemViewHolder(itemView);
+        }
+
+        //设置给定位置条目的选择状态
+        private void setItemChecked(int position, boolean isChecked) {
+            mSelectedPositions.put(position, isChecked);
+        }
+
+        //根据位置判断条目是否选中
+        private boolean isItemChecked(int position) {
+            return mSelectedPositions.get(position);
+        }
+
+        //根据位置判断条目是否可选
+        private boolean isSelectable() {
+            return mIsSelectable;
+        }
+        //设置给定位置条目的可选与否的状态
+        private void setSelectable(boolean selectable) {
+            mIsSelectable = selectable;
+        }
+
+        //绑定界面,设置监听
+        @Override
+        public void onBindViewHolder(final RecyclerView.@NotNull ViewHolder holder, @SuppressLint("RecyclerView") int i) {
+            //设置条目状态
+            ((ListItemViewHolder) holder).tv_liaocode.setText("工单号:"+mList.get(i).getMA_CODE());
+            ((ListItemViewHolder) holder).tv_liaotetall.setText("产品编号:"+mList.get(i).getMA_PRODCODE());
+            ((ListItemViewHolder) holder).tv_liaospec.setText("数量:"+mList.get(i).getQTY());
+
+
+            ((ListItemViewHolder) holder).checkBox.setChecked(isItemChecked(i));
+//            if (i%2==0){
+//                ((ListItemViewHolder) holder).line_color.setBackgroundColor(getResources().getColor(R.color.button_normal));
+//            }else {
+//                ((ListItemViewHolder) holder).line_color.setBackgroundColor(Color.WHITE);
+//            }
+            //checkBox的监听
+            ((ListItemViewHolder) holder).checkBox.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    if (isItemChecked(i)) {
+                        setItemChecked(i, false);
+                    } else {
+                        setItemChecked(i, true);
+                    }
+//                    for (int i2=0;i2<mList.size();i2++){
+//                        setItemChecked(i2, true);
+//                    }
+
+//                    ab.setTitle("已选择" + getSelectedItem().size() + "项");
+                }
+            });
+
+            //条目view的监听
+            ((ListItemViewHolder) holder).itemView.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    if (isItemChecked(i)) {
+                        setItemChecked(i, false);
+                    } else {
+                        setItemChecked(i, true);
+                    }
+//                    notifyItemChanged(i);
+//                    if (!StringUtil.isEmpty(mList.get(i).getDI_REMARK())){
+//                        ((ListItemViewHolder) holder).tv_remark.setText("点检值:"+mList.get(i).getDI_REMARK());
+//                    }
+
+//                    ab.setTitle("已选择" + getSelectedItem().size() + "项");
+                }
+            });
+
+        }
+
+        @Override
+        public int getItemCount() {
+            return mList == null ? 0 : mList.size();
+        }
+
+        public class ListItemViewHolder extends RecyclerView.ViewHolder{
+            //ViewHolder
+            CheckBox checkBox;
+            TextView tv_liaocode;
+            TextView tv_liaotetall;
+            TextView tv_liaospec;
+            ListItemViewHolder(View view) {
+                super(view);
+                this.tv_liaocode = (TextView) view.findViewById(R.id.tv_liaocode);
+                this.tv_liaotetall = (TextView) view.findViewById(R.id.tv_liaotetall);
+                this.tv_liaospec = (TextView) view.findViewById(R.id.tv_liaospec);
+                this.checkBox = (CheckBox) view.findViewById(R.id.select_checkbox);
+
+            }
+        }
+    }
+}

+ 33 - 3
app/src/main/java/com/uas/hystorage/fragment/PutintoAdd_Fragment.java

@@ -20,6 +20,8 @@ import android.widget.Button;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.PopupWindow;
+import android.widget.RadioButton;
+import android.widget.RadioGroup;
 import android.widget.TextView;
 
 import com.alibaba.fastjson.JSONArray;
@@ -79,7 +81,10 @@ public class PutintoAdd_Fragment extends BaseFragment implements  View.OnClickLi
     private MyTextAdapter mutextadapter;
     private String ifmultiin = "";
     private StoragerechargeAddCommitBean jltStorageInBean;
-
+    private RadioGroup rg_hui;
+    private RadioButton rb_ok;
+    private RadioButton rb_no;
+    private String rb_changetext;
     @Override
     protected int getLayout() {
         return R.layout.fragment_putintoadd;
@@ -93,7 +98,9 @@ public class PutintoAdd_Fragment extends BaseFragment implements  View.OnClickLi
         jlt_storage_in_barcode_save_btn = mActivity.findViewById(R.id.jlt_storage_in_barcode_save_btn);
         recyclerView = mActivity.findViewById(R.id.id_item_remove_recyclerview);
         tv_duopr = mActivity.findViewById(R.id.tv_duopr);
-
+        rg_hui = mActivity.findViewById(R.id.rg_hui);
+        rb_ok = mActivity.findViewById(R.id.rb_ok);
+        rb_no = mActivity.findViewById(R.id.rb_no);
         imm = (InputMethodManager) mActivity.getSystemService(Context.INPUT_METHOD_SERVICE);
 
     }
@@ -118,6 +125,28 @@ public class PutintoAdd_Fragment extends BaseFragment implements  View.OnClickLi
             }
         });
         mFilterStorageInBeans = new ArrayList<>();
+
+        rb_ok.setChecked(true);
+        rb_changetext="0";
+        rg_hui.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
+            @SuppressLint("NonConstantResourceId")
+            @Override
+            public void onCheckedChanged(RadioGroup radioGroup, int checkid) {
+                switch (checkid){
+                    case R.id.rb_ok:
+                        rb_changetext = "0";
+                        break;
+                    case R.id.rb_no:
+                        rb_changetext = "1";
+                        break;
+                }
+            }
+        });
+
+
+
+
+
     }
 
     @Override
@@ -178,7 +207,6 @@ public class PutintoAdd_Fragment extends BaseFragment implements  View.OnClickLi
     }
 
     public void setok(){
-
         if (mFilterStorageInBeans.size() == 0){
             CommonUtil.toastNoRepeat(mActivity, "请采集生产批次");
             return;
@@ -387,6 +415,7 @@ public class PutintoAdd_Fragment extends BaseFragment implements  View.OnClickLi
 
     }
     private void getokData(String data) {
+
         progressDialog.show();
         VollyRequest.getInstance().stringRequest(mStringRequest,
                 new HttpParams.Builder()
@@ -397,6 +426,7 @@ public class PutintoAdd_Fragment extends BaseFragment implements  View.OnClickLi
 //                        .addHeader("data",data)
                         .addParam("sc_code", sc_code)//岗位资源
                         .addParam("ma_code",ma_code)//工单编号
+                        .addParam("ifreturn",rb_changetext)//工单编号
                         .addParam("data",data)//生产批次号,必填
                         .build(), new HttpCallback() {
                     @Override

+ 2 - 0
app/src/main/java/com/uas/hystorage/fragment/QualityManageFragment.java

@@ -69,6 +69,8 @@ public class QualityManageFragment extends BaseFragment {
                     Fragment fragment = null;
                     if (position == 0) {
                         fragment = new DecisionByLotFragment();
+//                        Intent intent=new Intent(mActivity, JumpCameraActivity.class);
+//                        startActivity(intent);
                     } else if (position == 1) {
                         fragment = new ReworkDecisionFragment();
                     }else if (position == 3) {

+ 1 - 1
app/src/main/java/com/uas/hystorage/fragment/ReworkDecisionFragment.java

@@ -401,7 +401,7 @@ public class ReworkDecisionFragment extends BaseFragment implements View.OnClick
                                 String stepname = dataObject.getString("STEPNAME") == null ? "" : dataObject.getString("STEPNAME");
                                 String ifrework = dataObject.getString("IFREWORK") == null ? "" : dataObject.getString("IFREWORK");
 
-                                tv_prodcode.setText("物料编号:"+prodcode+""+" "+pr_detail+" "+pr_spec
+                                tv_prodcode.setText("物料编号:"+prodcode+""+"\n"+pr_detail+"\n"+pr_spec
                                                     +"\n数量:"+qty
                                                     +"\n工单:"+makecode
                                                     +"\n当前工序:"+stepcode+","+stepname);

+ 284 - 0
app/src/main/java/com/uas/hystorage/fragment/RolloutFragment.java

@@ -4,10 +4,12 @@ import android.annotation.SuppressLint;
 import android.app.Activity;
 import android.content.Intent;
 import android.graphics.drawable.BitmapDrawable;
+import android.os.Bundle;
 import android.support.v7.widget.DefaultItemAnimator;
 import android.support.v7.widget.DividerItemDecoration;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
+import android.util.Log;
 import android.util.SparseBooleanArray;
 import android.view.Gravity;
 import android.view.KeyEvent;
@@ -31,9 +33,12 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.android.volley.Request;
 import com.android.volley.toolbox.StringRequest;
+import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.google.gson.Gson;
 import com.uas.hystorage.R;
 import com.uas.hystorage.activity.FunctionActivity;
+import com.uas.hystorage.adapter.DlMacodeAdapter;
+import com.uas.hystorage.bean.DlMacodesBean;
 import com.uas.hystorage.bean.GrouponlineBean;
 import com.uas.hystorage.global.GloableParams;
 import com.uas.hystorage.tools.SharedPreUtil;
@@ -99,6 +104,23 @@ public class RolloutFragment extends BaseFragment implements View.OnClickListene
     private TextView tv_maqty;
     private TextView tv_outqty;
     private TextView tv_unoutqty;
+    private TextView tv_jitaihao;
+    private String de_location;
+    private List<DlMacodesBean> ComaddBeanList;
+    private ClearableEditText editadd_et;
+    private RecyclerView rv_line_add_port_data;
+    private DlMacodeAdapter dlMacodeAdapter;
+    private String dl_macodEdata;
+    private String dlstr_macodes;
+    private String pr_sdetail;
+    private TextView tv_maprodname;
+    private ImageView iv_add_data;
+    private String index_detail_doc;
+    private CheckBox clear_cha;
+    private String clear_tv;
+    private TextView tv_ma_madeqty;
+    private TextView tv_ma_unmadeqty;
+    private TextView tv_sccode;
 
     @Override
     protected int getLayout() {
@@ -128,6 +150,13 @@ public class RolloutFragment extends BaseFragment implements View.OnClickListene
         tv_maqty = mActivity.findViewById(R.id.tv_maqty);
         tv_outqty = mActivity.findViewById(R.id.tv_outqty);
         tv_unoutqty = mActivity.findViewById(R.id.tv_unoutqty);
+        tv_jitaihao = mActivity.findViewById(R.id.tv_jitaihao);
+        tv_maprodname = mActivity.findViewById(R.id.tv_maprodname);
+        iv_add_data = mActivity.findViewById(R.id.iv_add_data);
+        clear_cha = mActivity.findViewById(R.id.clear_cha);
+        tv_ma_madeqty = mActivity.findViewById(R.id.tv_ma_madeqty);
+        tv_ma_unmadeqty = mActivity.findViewById(R.id.tv_ma_unmadeqty);
+        tv_sccode = mActivity.findViewById(R.id.tv_sccode);
 
 
         rb_ok.setChecked(true);
@@ -137,6 +166,7 @@ public class RolloutFragment extends BaseFragment implements View.OnClickListene
         rb_changeinter="0";
         storage_recharge_collect_ets.requestFocus();
 
+
     }
 
 
@@ -195,6 +225,17 @@ public class RolloutFragment extends BaseFragment implements View.OnClickListene
             }
         });
 
+//        clear_cha.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+//            @Override
+//            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+//                if (clear_cha.isChecked()){
+//                    clear_tv="1";
+//                }else {
+//                    clear_tv="0";
+//                }
+//                Log.e("clear_tv",clear_tv);
+//            }
+//        });
 
         ma_code = SharedPreUtil.getString(mActivity, "MA_CODE", null);
         sc_code = SharedPreUtil.getString(mActivity, "SC_CODE", null);
@@ -209,11 +250,244 @@ public class RolloutFragment extends BaseFragment implements View.OnClickListene
         mFeededList = new ArrayList<>();
         adaptermFeededList = new ArrayList<>();
 
+        Bundle bundle = getArguments();
+        if(bundle!=null){
+            de_location = bundle.getString("de_location");
+            index_detail_doc = bundle.getString("index_detail_doc");
+            ComaddBeanList = (List<DlMacodesBean>) bundle.getSerializable("mListdata");
+        }
+        tv_jitaihao.setText(de_location);
+        tv_maprodname.setText(index_detail_doc);
+        iv_add_data.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                initaddPopupWindow();
+            }
+        });
+
 
+        if (ComaddBeanList.size()==0||ComaddBeanList.size()==1){
+            iv_add_data.setVisibility(View.GONE);
+        }else {
+            iv_add_data.setVisibility(View.VISIBLE);
+        }
         getUnreportqty();
+        tv_sccode.setText(sc_code);
 
     }
 
+    private void initaddPopupWindow() {
+        View contView = LayoutInflater.from(mActivity).inflate(R.layout.index_recycle_item, null);
+        editadd_et = (ClearableEditText) contView.findViewById(R.id.edit_et);
+        TextView sure_tv = (TextView) contView.findViewById(R.id.sure_tv);
+        TextView cancle_tv = (TextView) contView.findViewById(R.id.cancle_tv);
+        ImageView search_im = contView.findViewById(R.id.search_im);
+        LinearLayout line_top = contView.findViewById(R.id.line_top);
+        rv_line_add_port_data = contView.findViewById(R.id.rv_ip_port_data);
+        rv_line_add_port_data.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
+        rv_line_add_port_data.setLayoutManager(new LinearLayoutManager(mActivity));
+        dlMacodeAdapter = new DlMacodeAdapter(ComaddBeanList);
+        dlMacodeAdapter.setmList(ComaddBeanList);
+        rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+        setaddAdapter(ComaddBeanList);
+        editadd_et.requestFocus();
+
+        editPW = new PopupWindow(contView, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
+        editPW.setTouchable(true);
+        editPW.setBackgroundDrawable(new BitmapDrawable());
+        editPW.setOnDismissListener(new BasePopupWindow.OnDismissListener() {
+            @Override
+            public void onDismiss() {
+                closeListPopupWindow();
+            }
+        });
+        View parentView = mActivity.getWindow().findViewById(Window.ID_ANDROID_CONTENT);
+        editPW.showAtLocation(parentView, Gravity.CENTER, 0, 0);
+        CommonUtil.setBackgroundAlpha(mActivity, 0.5f);
+        editadd_et.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)) {
+                    String mSearchStr = editadd_et.getText().toString().trim();
+                    if (!mSearchStr.isEmpty()) {
+                        List<DlMacodesBean> thisList = new ArrayList<>();
+                        for(int i=0;i<ComaddBeanList.size();i++){
+                            if(ComaddBeanList.get(i).getDL_MACODE().contains(mSearchStr)){
+                                thisList.add(ComaddBeanList.get(i));
+                            }
+                            if(i == ComaddBeanList.size() -1){
+                                dlMacodeAdapter = new DlMacodeAdapter(thisList);
+                                rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+                                LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
+
+                            }
+                            List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+                            for (int j = 0; j < lineCodeEntities.size(); j++) {
+                                lineCodeEntities.get(j).setChecked(false);
+                            }
+                            dlMacodeAdapter.notifyDataSetChanged();
+                        }
+
+
+                    } else {
+                        dlMacodeAdapter = new DlMacodeAdapter(ComaddBeanList);
+                        rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+                        List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+                        for (int i = 0; i < lineCodeEntities.size(); i++) {
+                            lineCodeEntities.get(i).setChecked(false);
+                        }
+                        dlMacodeAdapter.notifyDataSetChanged();
+
+                    }
+                    dlMacodeAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+
+                        @Override
+                        public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                            List<DlMacodesBean> ipAndPortBeans = dlMacodeAdapter.getmList();
+                            dl_macodEdata = ipAndPortBeans.get(position).getDL_MACODE();
+                            dlstr_macodes = ipAndPortBeans.get(position).getDL_MOULDCODE();
+                            pr_sdetail = ipAndPortBeans.get(position).getPR_DETAIL();
+                            for (int i = 0; i < ipAndPortBeans.size(); i++) {
+                                ipAndPortBeans.get(i).setChecked(false);
+                            }
+                            ipAndPortBeans.get(position).setChecked(true);
+                            dlMacodeAdapter.notifyDataSetChanged();
+                        }
+                    });
+                    return true;
+                }
+                return false;
+            }
+        });
+
+
+
+        search_im.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                String mSearchStr = editadd_et.getText().toString().trim();
+                if (!mSearchStr.isEmpty()) {
+                    List<DlMacodesBean> thisList = new ArrayList<>();
+                    for(int i=0;i<ComaddBeanList.size();i++){
+                        if(ComaddBeanList.get(i).getDL_MACODE().contains(mSearchStr)){
+                            thisList.add(ComaddBeanList.get(i));
+                        }
+                        if(i == ComaddBeanList.size() -1){
+                            dlMacodeAdapter = new DlMacodeAdapter(thisList);
+                            rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+                            LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
+
+                        }
+                        List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+                        for (int j = 0; j < lineCodeEntities.size(); j++) {
+                            lineCodeEntities.get(j).setChecked(false);
+                        }
+                        dlMacodeAdapter.notifyDataSetChanged();
+                    }
+
+
+                } else {
+                    dlMacodeAdapter = new DlMacodeAdapter(ComaddBeanList);
+                    rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+                    List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+                    for (int i = 0; i < lineCodeEntities.size(); i++) {
+                        lineCodeEntities.get(i).setChecked(false);
+                    }
+                    dlMacodeAdapter.notifyDataSetChanged();
+
+                }
+                dlMacodeAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+
+                    @Override
+                    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                        List<DlMacodesBean> ipAndPortBeans = dlMacodeAdapter.getmList();
+                        dl_macodEdata = ipAndPortBeans.get(position).getDL_MACODE();
+                        dlstr_macodes = ipAndPortBeans.get(position).getDL_MOULDCODE();
+                        pr_sdetail = ipAndPortBeans.get(position).getPR_DETAIL();
+                        for (int i = 0; i < ipAndPortBeans.size(); i++) {
+                            ipAndPortBeans.get(i).setChecked(false);
+                        }
+                        ipAndPortBeans.get(position).setChecked(true);
+                        dlMacodeAdapter.notifyDataSetChanged();
+                    }
+                });
+            }
+
+        });
+
+
+
+        //确定
+        sure_tv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if (StringUtil.isEmpty(dl_macodEdata)){
+                    CommonUtil.toastNoRepeat(mActivity,"请选择工单");
+                    return;
+                }
+//                SharedPreUtil.saveString(mActivity, "MA_CODE", dl_macodEdata);
+//                mCurDoc.setText(dl_macodEdata);
+                tv_maprodname.setText(pr_sdetail);
+                Log.e("itemremark",dl_macodEdata);
+                ma_code=dl_macodEdata;
+                getUnreportqty();
+                closeListPopupWindow();
+            }
+        });
+
+        //取消
+        cancle_tv.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+
+                closeListPopupWindow();
+            }
+        });
+
+        String mSearchStr = editadd_et.getText().toString().trim();
+        if (mSearchStr.isEmpty()) {
+            dlMacodeAdapter = new DlMacodeAdapter(ComaddBeanList);
+            rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+            List<DlMacodesBean> lineCodeEntities = dlMacodeAdapter.getmList();
+            for (int i = 0; i < lineCodeEntities.size(); i++) {
+                lineCodeEntities.get(i).setChecked(false);
+            }
+            dlMacodeAdapter.notifyDataSetChanged();
+
+            dlMacodeAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+
+                @Override
+                public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                    List<DlMacodesBean> ipAndPortBeans = dlMacodeAdapter.getmList();
+                    dl_macodEdata = ipAndPortBeans.get(position).getDL_MACODE();
+                    pr_sdetail = ipAndPortBeans.get(position).getPR_DETAIL();
+                    for (int i = 0; i < ipAndPortBeans.size(); i++) {
+                        ipAndPortBeans.get(i).setChecked(false);
+                    }
+                    ipAndPortBeans.get(position).setChecked(true);
+                    dlMacodeAdapter.notifyDataSetChanged();
+                }
+            });
+        }
+
+
+
+    }
+
+    private void setaddAdapter(List<DlMacodesBean> mList) {
+        LogUtil.i("mList", JSON.toJSONString(mList));
+        dlMacodeAdapter = new DlMacodeAdapter(mList);
+        dlMacodeAdapter.setmList(mList);
+        rv_line_add_port_data.setAdapter(dlMacodeAdapter);
+        dlMacodeAdapter.notifyDataSetChanged();
+    }
+
+
+
+
+
 
 
     //获取当前线别在线工单、当前登录人员名称、工单未报工数
@@ -243,6 +517,9 @@ public class RolloutFragment extends BaseFragment implements View.OnClickListene
                             tv_outqty.setText(dataObject.getString("OUTQTY") == null ? "-" : dataObject.getString("OUTQTY"));
                             tv_unoutqty.setText(dataObject.getString("UNOUTQTY") == null ? "-" : dataObject.getString("UNOUTQTY"));
 
+                            tv_ma_madeqty.setText(dataObject.getString("MA_MADEQTY") == null ? "-" : dataObject.getString("MA_MADEQTY"));
+                            tv_ma_unmadeqty.setText(dataObject.getString("MA_UNMADEQTY") == null ? "-" : dataObject.getString("MA_UNMADEQTY"));
+
                         }else {
 
                         }
@@ -444,6 +721,11 @@ public class RolloutFragment extends BaseFragment implements View.OnClickListene
     }
 
     private void getOKlotnoData(List<GrouponlineBean> fededatalist) {
+        if (clear_cha.isChecked()){
+            clear_tv="1";
+        }else {
+            clear_tv="0";
+        }
         if (rb_changeinter.equals("0")){
             if (fededatalist == null || fededatalist.size()==0) {
                 GrouponlineBean grouponlineBeans= new GrouponlineBean(storage_recharge_collect_ets.getText().toString().trim(),ct_qty.getText().toString().trim());
@@ -487,6 +769,7 @@ public class RolloutFragment extends BaseFragment implements View.OnClickListene
                         .addParam("remark",ce_yuanyin.getText().toString().trim())//备注
                         .addParam("data", jsonStrington)//生产批次号
                         .addParam("ifreturn",rb_changeinter)
+                        .addParam("ifclearwip",clear_tv)
                         .build(), new HttpCallback() {
                     @Override
                     public void onSuccess(int flag, Object o) throws Exception {
@@ -506,6 +789,7 @@ public class RolloutFragment extends BaseFragment implements View.OnClickListene
                         }else {
                             CommonUtil.toastNoRepeat(mActivity, "撤销转出成功");
                         }
+                        clear_cha.setChecked(false);
                         getUnreportqty();
 
                     }

+ 11 - 9
app/src/main/java/com/uas/hystorage/fragment/StartsAndStopsFragment.java

@@ -70,6 +70,8 @@ public class StartsAndStopsFragment extends BaseFragment implements View.OnClick
         btn_starts = mActivity.findViewById(R.id.btn_starts);
         btn_stops = mActivity.findViewById(R.id.btn_stops);
         mMoreBtn = (Button)mActivity.findViewById(R.id.btn_actionbar_more);
+        btn_starts.setEnabled(false);
+        btn_stops.setEnabled(false);
     }
 
 
@@ -158,17 +160,17 @@ public class StartsAndStopsFragment extends BaseFragment implements View.OnClick
                                     line_vis.setVisibility(View.VISIBLE);
                                     if (dl_opr.equals("启动")){
                                         tv_hint2.setText("已启动");
-                                        btn_starts.setVisibility(View.GONE);
-                                        btn_stops.setVisibility(View.VISIBLE);
+                                        btn_starts.setEnabled(false);
+                                        btn_stops.setEnabled(true);
                                     }else {
                                         tv_hint2.setText("已暂停");
-                                        btn_starts.setVisibility(View.VISIBLE);
-                                        btn_stops.setVisibility(View.GONE);
+                                        btn_starts.setEnabled(true);
+                                        btn_stops.setEnabled(false);
                                     }
                                     text_pepro.setText("最近操作:"+dl_inman);
                                     text_time.setText(dl_indate);
                                 }else {
-                                    btn_starts.setVisibility(View.VISIBLE);
+                                    btn_starts.setEnabled(true);
                                 }
                             }
                         }
@@ -205,8 +207,8 @@ public class StartsAndStopsFragment extends BaseFragment implements View.OnClick
                         line_vis.setVisibility(View.VISIBLE);
                         progressDialog.dismiss();
                         tv_hint2.setText("已启动");
-                        btn_starts.setVisibility(View.GONE);
-                        btn_stops.setVisibility(View.VISIBLE);
+                        btn_starts.setEnabled(false);
+                        btn_stops.setEnabled(true);
                         String nowTime = getNowTime();
                         text_time.setText(nowTime);
                         text_pepro.setText("最近操作:"+em_name);
@@ -243,8 +245,8 @@ public class StartsAndStopsFragment extends BaseFragment implements View.OnClick
                         line_vis.setVisibility(View.VISIBLE);
                         progressDialog.dismiss( );
                         tv_hint2.setText("已暂停");
-                        btn_starts.setVisibility(View.VISIBLE);
-                        btn_stops.setVisibility(View.GONE);
+                        btn_starts.setEnabled(true);
+                        btn_stops.setEnabled(false);
                         String nowTime = getNowTime();
                         text_time.setText(nowTime);
                         text_pepro.setText("最近操作:"+em_name);

+ 22 - 11
app/src/main/java/com/uas/hystorage/fragment/WorkOrderSearchFragment.java

@@ -170,7 +170,6 @@ public class WorkOrderSearchFragment extends BaseFragment {
             @Override
             public void onFocusChange(View v, boolean hasFocus) {
                 if (hasFocus) {
-                    mSearch.setThreshold(1);
                     // 输入框获取到焦点时的处理逻辑
                     fuzzySearchMa(mSearch.getText().toString().trim());
                 } else {
@@ -450,6 +449,10 @@ public class WorkOrderSearchFragment extends BaseFragment {
             jltStorageInBean.setMA_PRODCODE(dataObject.getString("MA_PRODCODE"));
             jltStorageInBean.setPR_DETAIL(dataObject.getString("PR_DETAIL"));
             jltStorageInBean.setPR_SPEC(dataObject.getString("PR_SPEC"));
+            jltStorageInBean.setMA_KIND(dataObject.getString("MA_KIND"));
+            jltStorageInBean.setOUTQTY(dataObject.getString("OUTQTY"));
+            jltStorageInBean.setUNOUTQTY(dataObject.getString("UNOUTQTY"));
+
             mFilterStorageInBeans.add(jltStorageInBean);
             MyaddAdapter addadapter = new MyaddAdapter(mActivity, mFilterStorageInBeans);
             recyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
@@ -468,13 +471,13 @@ public class WorkOrderSearchFragment extends BaseFragment {
         }
 
         ifneedmj = SharedPreUtil.getString(mActivity, Constants.FLAG.GANG_WEI_SOURCE_ifneedmj, null);
-        mSearch.setThreshold(1);
+        mSearch.setThreshold(0);
         if (!StringUtil.isEmpty(ifneedmj)){
             if (!ifneedmj.equals("0")){
                 line_mju.setVisibility(View.VISIBLE);
                 tv_mju.setTextColor(getResources().getColor(R.color.red));
                 ce_moju.requestFocus();
-                ce_moju.setThreshold(1);
+                ce_moju.setThreshold(0);
             }else {
                 line_mju.setVisibility(View.GONE);
                 tv_mju.setTextColor(getResources().getColor(R.color.blue));
@@ -494,7 +497,7 @@ public class WorkOrderSearchFragment extends BaseFragment {
         @Override
         public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
             //当字数超过3个,自动弹出输入提示框
-            if (charSequence.length() >= 3) {
+            if (charSequence.length() >= 1) {
                 LogUtil.i("mSearchStr",ce_moju.getText().toString().trim());
                 fuzzySearchMould(ce_moju.getText().toString().trim());
 
@@ -512,7 +515,9 @@ public class WorkOrderSearchFragment extends BaseFragment {
     };
 
 
-
+    public static String removeTrailingDash(String str) {
+        return str.replaceFirst("\n[^\n]*$", "");
+    }
 
     private TextWatcher searchNoTextWatcher = new TextWatcher() {
         @Override
@@ -522,10 +527,16 @@ public class WorkOrderSearchFragment extends BaseFragment {
 
         @Override
         public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
-            //当字数超过3个,自动弹出输入提示框
+//            当字数超过3个,自动弹出输入提示框
 //            if (charSequence.length() >= 3) {
-                LogUtil.i("mSearchStr",mSearch.getText().toString().trim());
-                fuzzySearchMa(mSearch.getText().toString().trim());
+            if (mSearch.getText().toString().trim().contains("\n")){
+                String s = removeTrailingDash(mSearch.getText().toString().trim());
+                mSearch.setText(s);
+            }
+
+            LogUtil.i("mSearchStr",mSearch.getText().toString().trim());
+
+            fuzzySearchMa(mSearch.getText().toString().trim());
 //            }
         }
 
@@ -563,15 +574,15 @@ public class WorkOrderSearchFragment extends BaseFragment {
                             }
                             List<String> autoStrings = new ArrayList<>();
                             autoStrings.clear();
-                            searStringAdapter = new MyArrayAdapter<String>(mActivity, android.R.layout.simple_dropdown_item_1line, autoStrings);
+                            searStringAdapter = new MyArrayAdapter<String>(mActivity, R.layout.myarry_item, autoStrings);
                             if (mSearch != null) {
                                 mSearch.setAdapter(searStringAdapter);
                             }
                             for (Object index : dataArray){
                                 JSONObject data = (JSONObject) index;
-                                searStringAdapter.add(data.getString("MA_CODE"));
+//                                String newString = data.getString("MA_CODE").replaceFirst("^-*", "");
+                                searStringAdapter.add(data.getString("MA_CODE")+"\n"+data.getString("PR_DETAIL")+"\n"+data.getString("MA_KIND"));
                             }
-
                         }else {
 
                         }

+ 34 - 3
app/src/main/java/com/uas/hystorage/global/GloableParams.java

@@ -344,6 +344,11 @@ public class GloableParams {
     public static String ADDRESS_GETPUNCHINGDATA;
     public static String ADDRESS_GETOPRLOG;
     public static String ADDRESS_STARTMAS;
+    public static String ADDRESS_ADDMA;
+    public static String ADDRESS_CANCELCONFIRMPAKING;
+    public static String ADDRESS_GETCANTRANSFERWIP;
+    public static String ADDRESS_TRANSFERWIP;
+    public static String ADDRESS_GETBOXDETAIL;
     /**
      * 高登
      */
@@ -961,6 +966,23 @@ public class GloableParams {
     private static final String ADDRESSTAIL_COUNTING_PACKDETAIL = "/api/pdashop/packing/packDetail.action";
     private static final String ADDRESSTAIL_COUNTING_CONFIRMPAKING = "/api/pdashop/packing/confirmPaking.action";
     private static final String ADDRESSTAIL_COUNTING_DETAILDETAIL = "/api/pdashop/packing/deleteDetail.action";
+    private static final String ADDRESSTAIL_COUNTING_CANCELCONFIRMPAKING = "/api/pdashop/packing/cancelConfirmPaking.action";
+    private static final String ADDRESSTAIL_COUNTING_GETBOXDETAIL = "/api/pdashop/packing/getBoxDetail.action";
+
+
+    /**
+     * 在制转移
+     */
+    private static final String ADDRESSTAIL_COUNTING_GETCANTRANSFERWIP = "/api/pdashop/loading/getCanTransferWIP.action";
+    private static final String ADDRESSTAIL_COUNTING_TRANSFERWIP = "/api/pdashop/loading/transferWIP.action";
+
+
+
+
+
+
+
+
 
     /**
      * 良品入库
@@ -1006,6 +1028,10 @@ public class GloableParams {
      * 多工单绑定
      */
     private static final String ADDRESSTAIL_STARTMAS = "/api/pdashop/start/startMas.action";
+    /**
+     * 追加工单绑定
+     */
+    private static final String ADDRESSTAIL_ADDMA = "/api/pdashop/start/addMa.action";
 
 
 
@@ -1066,7 +1092,7 @@ public class GloableParams {
     public static final String GRIDNAME__PUTINTO= "工序投入";
     public static final String GRIDNAME_ROLLOUT= "工序转出";
     public static final String GRIDNAME_PACKAGE= "包装采集";
-    public static final String GRIDNAME_BAD_EXCHANGE = "不良换票";
+    public static final String GRIDNAME_BAD_EXCHANGE = "换票";
    // public static final String GRIDNAME_STAFF_CHANGE = "人员换岗";
     //public static final String GRIDNAME_STAFF_UP = "人员上线";
   //  public static final String GRIDNAME_STAFF_DOWN = "人员下线";
@@ -1081,7 +1107,7 @@ public class GloableParams {
            GRIDNAME_TIME_REPORT_DETAIL,GRIDNAME_TIME_METRIAL_DETAIL,
 
 
-           GRIDNAME_CHAI_PI,
+//           GRIDNAME_CHAI_PI,
            GRIDNAME_TIAO_ZHAN,
            GRIDNAME_BAD_EXCHANGE
    };
@@ -1093,7 +1119,7 @@ public class GloableParams {
             R.drawable.ic_staff_up,
             R.drawable.acquisition,
             R.drawable.iv_rollout,R.drawable.report,
-            R.drawable.storage_bach_operation,
+//            R.drawable.storage_bach_operation,
             R.drawable.index_smt_up,
             R.mipmap.badchange
     };
@@ -1579,5 +1605,10 @@ public class GloableParams {
         GloableParams.ADDRESS_GETPUNCHINGDATA = uriHead + GloableParams.ADDRESSTAIL_COUNTING_GETPUNCHINGDATA;
         GloableParams.ADDRESS_GETOPRLOG = uriHead + GloableParams.ADDRESSTAIL_GETOPRLOG;
         GloableParams.ADDRESS_STARTMAS = uriHead + GloableParams.ADDRESSTAIL_STARTMAS;
+        GloableParams.ADDRESS_ADDMA = uriHead + GloableParams.ADDRESSTAIL_ADDMA;
+        GloableParams.ADDRESS_CANCELCONFIRMPAKING = uriHead + GloableParams.ADDRESSTAIL_COUNTING_CANCELCONFIRMPAKING;
+        GloableParams.ADDRESS_GETCANTRANSFERWIP = uriHead + GloableParams.ADDRESSTAIL_COUNTING_GETCANTRANSFERWIP;
+        GloableParams.ADDRESS_TRANSFERWIP = uriHead + GloableParams.ADDRESSTAIL_COUNTING_TRANSFERWIP;
+        GloableParams.ADDRESS_GETBOXDETAIL = uriHead + GloableParams.ADDRESSTAIL_COUNTING_GETBOXDETAIL;
     }
 }

+ 123 - 0
app/src/main/java/com/uas/hystorage/view/TakePhotoPopWin.java

@@ -0,0 +1,123 @@
+package com.uas.hystorage.view;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.graphics.Color;
+import android.graphics.drawable.ColorDrawable;
+import android.os.Build;
+import android.support.annotation.Nullable;
+import android.support.annotation.RequiresApi;
+import android.support.v7.widget.DividerItemDecoration;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.MotionEvent;
+import android.view.View;
+import android.widget.LinearLayout;
+import android.widget.PopupWindow;
+import android.widget.RelativeLayout;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.uas.hystorage.R;
+import com.uas.hystorage.bean.PopWinBean;
+import com.uas.hystorage.util.StringUtil;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class TakePhotoPopWin extends PopupWindow {
+
+    private View view;
+    private RecyclerView fuzzyRv;
+    private List<PopWinBean> fuzzyBeans;
+    @SuppressLint("SetJavaScriptEnabled")
+    @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
+    public TakePhotoPopWin(Context mContext, List<PopWinBean> fuzzyBeans) {
+        this.view = LayoutInflater.from(mContext).inflate(R.layout.take_photo_pop, null);
+        this.fuzzyBeans=fuzzyBeans;
+        // 设置外部可点击
+        this.setOutsideTouchable(true);
+        // mMenuView添加OnTouchListener监听判断获取触屏位置如果在选择框外面则销毁弹出框
+        this.view.setOnTouchListener(new View.OnTouchListener() {
+
+            public boolean onTouch(View v, MotionEvent event) {
+
+                int height = view.findViewById(R.id.pop_layout).getTop();
+
+                int y = (int) event.getY();
+                if (event.getAction() == MotionEvent.ACTION_UP) {
+                    if (y < height) {
+                        dismiss();
+                    }
+                }
+                return true;
+            }
+        });
+
+
+        /* 设置弹出窗口特征 */
+        // 设置视图
+        this.setContentView(this.view);
+        // 设置弹出窗体的宽和高
+        this.setHeight(RelativeLayout.LayoutParams.MATCH_PARENT);
+        this.setWidth(RelativeLayout.LayoutParams.MATCH_PARENT);
+
+        // 设置弹出窗体可点击
+        this.setFocusable(true);
+
+        // 实例化一个ColorDrawable颜色为半透明
+        ColorDrawable dw = new ColorDrawable(Color.TRANSPARENT);
+        // 设置弹出窗体的背景
+        this.setBackgroundDrawable(dw);
+
+        // 设置弹出窗体显示时的动画,从底部向上弹出
+        this.setAnimationStyle(R.style.take_photo_anim);
+        // 取消按钮
+//        btn_cancel.setOnClickListener(new View.OnClickListener() {
+//
+//            public void onClick(View v) {
+//                // 销毁弹出框
+//                dismiss();
+//            }
+//        });
+        fuzzyRv = view.findViewById(R.id.id_item_remove_recyclerview);
+        fuzzyRv.addItemDecoration(new DividerItemDecoration(mContext, LinearLayout.VERTICAL));
+        fuzzyRv.setLayoutManager(new LinearLayoutManager(mContext));
+        fuzzyBeans = new ArrayList<>();
+        FuzzySearchAdapter fuzzyAdapter = new FuzzySearchAdapter(fuzzyBeans);
+        fuzzyAdapter.setmList(fuzzyBeans);
+        fuzzyRv.setAdapter(fuzzyAdapter);
+
+    }
+
+
+    private class FuzzySearchAdapter extends BaseQuickAdapter<PopWinBean, BaseViewHolder> {
+        private List<PopWinBean> mList;
+
+        public List<PopWinBean> getmList() {
+            return mList;
+        }
+
+        public void setmList(List<PopWinBean> mList) {
+            this.mList = mList;
+        }
+        public PopWinBean getBeanByPositon(int position){
+            return mList.get(position);
+        }
+        private FuzzySearchAdapter(@Nullable List<PopWinBean> data) {
+            super(R.layout.fuzzy_search_item, data);
+        }
+        @Override
+        protected void convert(BaseViewHolder helper, PopWinBean item) {
+            if (StringUtil.isEmpty(item.getDE_NAME())){
+                helper.setText(R.id.macode_Tv,item.getMA_CODE());
+            }else {
+                helper.setText(R.id.macode_Tv,item.getMA_CODE()+"-"+item.getDE_NAME());
+            }
+        }
+    }
+
+
+}
+

+ 1 - 1
app/src/main/java/com/uas/hystorage/view/left/ItemRemoveRecyclerView.java

@@ -17,7 +17,7 @@ import com.uas.hystorage.R;
 public class ItemRemoveRecyclerView extends RecyclerView {
     private Context mContext;
 
-    //上一次的触摸点
+    //上一次的触摸点·
     private int mLastX, mLastY;
     //当前触摸的item的位置
     private int mPosition;

+ 12 - 0
app/src/main/res/anim/pop_enter_anim.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <translate
+        android:duration="200"
+        android:fromYDelta="100%p"
+        android:toYDelta="0" />
+    <alpha
+        android:duration="200"
+        android:fromAlpha="0.0"
+        android:toAlpha="1.0" />
+</set>

+ 11 - 0
app/src/main/res/anim/pop_exit_anim.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+    <translate
+        android:duration="200"
+        android:fromYDelta="0"
+        android:toYDelta="50%p" />
+    <alpha
+        android:duration="200"
+        android:fromAlpha="1.0"
+        android:toAlpha="0.0" />
+</set>

+ 398 - 0
app/src/main/res/layout/activity_append_binding.xml

@@ -0,0 +1,398 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    tools:context=".activity.AppendBindingActivity">
+    <include
+        android:id="@+id/include_menuactionbar"
+        layout="@layout/actionbar_withback" />
+    <LinearLayout
+        android:orientation="vertical"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingLeft="16dp"
+        android:paddingRight="16dp"
+        android:paddingBottom="10dp"
+        android:paddingTop="6dp">
+
+        <LinearLayout
+            android:orientation="horizontal"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="5dp"
+                android:orientation="horizontal"
+                android:layout_weight="1">
+                <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_gangwei"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:paddingLeft="6dp"
+                    android:textColor="@color/body_text_1"
+                    android:textSize="14sp"
+                    tools:text="YS1506002" />
+                <TextView
+                    android:id="@+id/tv_jitaihao"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:paddingLeft="6dp"
+                    android:textColor="@color/body_text_1"
+                    android:textSize="14sp"
+                    tools:text="YS1506002" />
+            </LinearLayout>
+
+
+
+        </LinearLayout>
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="5dp"
+            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_muju"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:paddingLeft="6dp"
+                android:textColor="@color/body_text_1"
+                android:textSize="14sp"
+                tools:text="YS1506002" />
+            <ImageView
+                android:id="@+id/iv_add_data"
+                android:layout_width="30dp"
+                android:layout_height="30dp"
+                android:src="@mipmap/android_list"
+                android:layout_marginRight="10dp"
+                android:visibility="gone"
+                />
+        </LinearLayout>
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="5dp"
+            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/ol_id_tv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:paddingLeft="6dp"
+                android:textColor="@color/body_text_1"
+                android:textSize="14sp"
+                tools:text="YS1506002"
+                android:padding="5dp"
+                android:layout_marginLeft="@dimen/dp_10">
+            </TextView>
+        </LinearLayout>
+
+        <!--GONE-->
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="6dp"
+            android:orientation="horizontal"
+            android:visibility="gone">
+
+            <TextView
+                android:layout_width="80dp"
+                android:layout_height="wrap_content"
+                android:text="未报工数:"
+                android:textColor="@color/body_text_1"
+                android:textSize="14sp" />
+
+            <TextView
+                android:id="@+id/olun_numbers_tv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:paddingLeft="6dp"
+                android:textColor="@color/body_text_1"
+                android:textSize="14sp"
+                tools:text="YS1506002" />
+        </LinearLayout>
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="6dp"
+            android:orientation="horizontal"
+            android:visibility="gone">
+
+            <TextView
+                android:layout_width="80dp"
+                android:layout_height="match_parent"
+                android:text="报工人:"
+                android:textColor="@color/body_text_1"
+                android:textSize="14sp" />
+
+            <TextView
+                android:id="@+id/ol_name_tv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:paddingLeft="6dp"
+                android:textColor="@color/body_text_1"
+                android:textSize="14sp"
+                tools:text="YS1506002" />
+        </LinearLayout>
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="14dp"
+            android:layout_marginBottom="4dp"
+            android:orientation="horizontal"
+            android:visibility="gone">
+
+            <TextView
+                style="@style/tl_tv_style"
+                android:layout_height="match_parent"
+                android:width="80dp"
+                android:gravity="center"
+                android:padding="10dp"
+                android:text="报工数"
+                android:textColor="@color/red"
+                android:textSize="14sp" />
+
+            <com.uas.hystorage.view.ClearableEditText
+                android:id="@+id/ol_numbers_et"
+                style="@style/EditTextStyle"
+                android:layout_width="0dp"
+                android:layout_weight="1"
+                android:hint="请输入"
+                android:textColor="@color/black"
+                android:textSize="14sp"
+                android:inputType="numberDecimal"/>
+
+        </LinearLayout>
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="4dp"
+            android:layout_marginBottom="4dp"
+            android:orientation="horizontal"
+            android:visibility="gone">
+
+            <TextView
+                style="@style/tl_tv_style"
+                android:layout_height="match_parent"
+                android:width="80dp"
+                android:gravity="center"
+                android:padding="10dp"
+                android:text="报废数"
+                android:textColor="@color/body_text_1"
+                android:textSize="14sp" />
+
+            <com.uas.hystorage.view.ClearableEditText
+                android:id="@+id/ol_unuse_et"
+                style="@style/EditTextStyle"
+                android:layout_width="0dp"
+                android:layout_weight="1"
+                android:hint="请输入(选填)"
+                android:textColor="@color/black"
+                android:textSize="14sp"
+                android:inputType="numberDecimal"/>
+        </LinearLayout>
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="horizontal"
+            android:visibility="gone"
+            >
+            <TextView
+                style="@style/tl_tv_style"
+                android:layout_height="wrap_content"
+                android:width="80dp"
+                android:gravity="center"
+                android:padding="10dp"
+                android:text="单位"
+                android:textColor="@color/body_text_1"
+                android:textSize="14sp" />
+            <Spinner
+                android:layout_width="wrap_content"
+                android:layout_height="40dp"
+                android:id="@+id/unit_spinner"
+                android:layout_alignParentRight="true"
+                android:textColor="@color/black"
+                android:textSize="14sp"
+                />
+        </LinearLayout>
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="1dp"
+            android:layout_marginBottom="4dp"
+            android:orientation="horizontal"
+            android:visibility="gone">
+
+            <TextView
+                style="@style/tl_tv_style"
+                android:layout_height="match_parent"
+                android:width="80dp"
+                android:gravity="center"
+                android:padding="10dp"
+                android:text="备注"
+                android:textColor="@color/body_text_1"
+                android:textSize="14sp" />
+
+            <com.uas.hystorage.view.ClearableEditText
+                android:id="@+id/ol_remark_et"
+                style="@style/EditTextStyle"
+                android:layout_width="0dp"
+                android:layout_weight="1"
+                android:hint="请输入(选填)"
+                android:textColor="@color/black"
+                android:textSize="14sp" />
+        </LinearLayout>
+        <!--GONE-->
+        <CheckBox
+            android:visibility="gone"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_margin="10dp"
+            android:text="自动送检" />
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="1dp"
+            android:layout_marginBottom="4dp"
+            android:orientation="horizontal"
+            android:visibility="gone">
+            <TextView
+                style="@style/tl_tv_style"
+                android:layout_height="match_parent"
+                android:width="80dp"
+                android:gravity="center"
+                android:padding="10dp"
+                android:text="下一工单"
+                android:textColor="@color/red"
+                android:textSize="14sp" />
+            <com.uas.hystorage.view.ClearableEditText
+                android:id="@+id/ol_next_et"
+                style="@style/EditTextStyle"
+                android:layout_width="0dp"
+                android:layout_weight="1"
+                android:hint="请输入"
+                android:textColor="@color/black"
+                android:textSize="14sp" />
+            <ImageView
+                android:id="@+id/ol_next_im"
+                style="@style/ActionBarRightButton"
+                android:layout_width="@dimen/width_36"
+                android:layout_height="@dimen/height_24"
+                android:layout_gravity="center_vertical"
+                android:layout_marginRight="15dp"
+                android:src="@drawable/search_48"
+                android:background="@drawable/bg_button" />
+
+            <ImageView
+                android:id="@+id/scan_code_im"
+                style="@style/ActionBarRightButton"
+                android:layout_width="@dimen/width_24"
+                android:layout_height="@dimen/height_24"
+                android:layout_gravity="center_vertical"
+                android:layout_marginRight="15dp"
+                android:background="@drawable/scan_code_im" />
+        </LinearLayout>
+
+
+
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="vertical"
+            >
+            <CheckBox
+                android:id="@+id/check_unbind"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="解绑当前工单">
+            </CheckBox>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal">
+                <TextView
+                    android:layout_height="match_parent"
+                    android:layout_width="wrap_content"
+                    android:gravity="center"
+                    android:text="追加工单:"
+                    android:textColor="@color/red"
+                    android:textSize="14sp" />
+
+                <AutoCompleteTextView
+                    android:id="@+id/fl_search_actext"
+                    style="@style/Search"
+                    android:layout_height="35dp"
+                    android:background="@drawable/shape_from_edit"
+                    android:hint="请采集需要启动的工单号"
+                    android:padding="6dp"
+                    android:imeOptions="actionSend"
+                    android:gravity="left"
+                    />
+            </LinearLayout>
+
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/fuzzy_rv"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content" />
+
+
+            <LinearLayout
+                android:id="@+id/start_ll"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:orientation="vertical"
+                android:visibility="gone"
+                >
+
+                <include layout="@layout/start_detail_one"/>
+
+                <Button
+                    android:id="@+id/start_btn"
+                    android:text="绑定"
+                    android:layout_width="match_parent"
+                    android:layout_height="40dp"
+                    style="@style/ButtonStyle"
+                    android:textColor="@color/white"
+                    android:textSize="@dimen/textsize_20"
+                    />
+            </LinearLayout>
+
+        </LinearLayout>
+
+        <Button
+            android:id="@+id/ol_exchange_btn"
+            style="@style/ButtonStyle"
+            android:text="确认切换"
+            android:visibility="gone"/>
+    </LinearLayout>
+
+
+</LinearLayout>

+ 38 - 0
app/src/main/res/layout/activity_index.xml

@@ -202,6 +202,25 @@
                     android:paddingRight="20dp"
                     android:orientation="horizontal">
 
+                    <TextView
+                        style="@style/captiontext"
+                        android:layout_width="wrap_content"
+                        android:text="产品编号:" />
+
+                    <TextView
+                        android:id="@+id/index_pc_doc"
+                        android:textColor="@color/blue"
+                        style="@style/valuetext"
+                        android:layout_weight="1"/>
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="4dp"
+                    android:paddingLeft="20dp"
+                    android:paddingRight="20dp"
+                    android:orientation="horizontal">
+
                     <TextView
                         style="@style/captiontext"
                         android:layout_width="wrap_content"
@@ -213,6 +232,25 @@
                         style="@style/valuetext"
                         android:layout_weight="1"/>
                 </LinearLayout>
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="4dp"
+                    android:paddingLeft="20dp"
+                    android:paddingRight="20dp"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        style="@style/captiontext"
+                        android:layout_width="wrap_content"
+                        android:text="类型:" />
+
+                    <TextView
+                        android:id="@+id/index_prce_doc"
+                        android:textColor="@color/blue"
+                        style="@style/valuetext"
+                        android:layout_weight="1"/>
+                </LinearLayout>
                 <LinearLayout
                     android:visibility="gone"
                     android:layout_width="match_parent"

+ 243 - 0
app/src/main/res/layout/activity_jump_camera.xml

@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    tools:context=".activity.JumpCameraActivity">
+    <include
+        android:id="@+id/include_menuactionbar"
+        layout="@layout/actionbar_withback" />
+    <LinearLayout
+        android:layout_weight="1"
+        android:orientation="vertical"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <LinearLayout
+            android:padding="@dimen/sp_16"
+            android:orientation="horizontal"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <TextView
+                android:layout_gravity="center"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textColor="@color/red"
+                android:text="生产批次"
+                android:layout_marginRight="@dimen/dp_10"
+                android:gravity="right">
+            </TextView>
+            <LinearLayout
+                android:layout_weight="1"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:background="@drawable/bg_line_edittext">
+                <com.uas.hystorage.view.ClearableEditText
+                    android:id="@+id/storage_recharge_collect_ets"
+                    style="@style/EditTextStyle"
+                    android:layout_weight="1"
+                    android:background="@null"
+                    android:focusable="true"
+                    android:focusableInTouchMode="true"
+                    android:hint="请采集生产批次"
+                    android:imeOptions="actionSend"
+                    android:textColor="@color/black" />
+
+                <ImageView
+                    android:id="@+id/storage_recharge_scan_ivs"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center"
+                    android:layout_marginRight="10dp"
+                    android:clickable="false"
+                    android:src="@drawable/ic_edittext_scan" />
+
+            </LinearLayout>
+
+        </LinearLayout>
+        <LinearLayout
+            android:id="@+id/line_des"
+            android:paddingLeft="@dimen/sp_16"
+            android:paddingRight="@dimen/sp_16"
+            android:orientation="vertical"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:visibility="gone">
+            <TextView
+                android:id="@+id/tv_qty"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:textColor="@color/black"
+                android:layout_gravity="center"
+                android:text="数量:">
+            </TextView>
+        </LinearLayout>
+        <RadioGroup
+            android:id="@+id/rg_hui"
+            android:layout_marginTop="@dimen/dp_10"
+            android:orientation="horizontal"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:gravity="center">
+            <RadioButton
+                android:id="@+id/rb_ok"
+                android:text="良品"
+                android:layout_gravity="center"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="@dimen/dp_10"
+                android:textSize="@dimen/sp_14">
+            </RadioButton>
+            <RadioButton
+                android:id="@+id/rb_no"
+                android:text="不良品"
+                android:layout_gravity="center"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10">
+            </RadioButton>
+            <RadioButton
+                android:id="@+id/rb_tec"
+                android:text="特采"
+                android:layout_gravity="center"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10">
+            </RadioButton>
+        </RadioGroup>
+        <LinearLayout
+            android:id="@+id/lin_no"
+            android:layout_marginLeft="15dp"
+            android:layout_marginTop="5dp"
+            android:orientation="horizontal"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:visibility="gone">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="不良代码"
+                android:layout_gravity="center"
+                android:layout_marginRight="@dimen/dp_10"
+                android:textColor="@color/red">
+            </TextView>
+            <LinearLayout
+                android:background="@drawable/bg_edittext_black"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content">
+                <Spinner
+                    android:id="@+id/spinner02"
+                    android:layout_width="wrap_content"
+                    android:layout_height="30dp"
+                    android:gravity="center"
+                    android:layout_gravity="center">
+                </Spinner>
+            </LinearLayout>
+            <TextView
+                android:id="@+id/tv_bccode"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:textColor="@color/black"
+                android:textSize="@dimen/sp_16"
+                android:layout_weight="1"
+                android:gravity="center">
+            </TextView>
+
+
+        </LinearLayout>
+        <LinearLayout
+            android:orientation="vertical"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <TextView
+                android:id="@+id/paicamera"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:padding="@dimen/dp_10"
+                android:gravity="right"
+                android:text="拍照上传">
+            </TextView>
+            <TextView
+                android:id="@+id/tv_prompt"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:padding="@dimen/dp_10"
+                android:text="拍照上传">
+            </TextView>
+
+
+        </LinearLayout>
+
+        <LinearLayout
+            android:visibility="gone"
+            android:orientation="vertical"
+            android:id="@+id/lineceyuan"
+            android:paddingLeft="@dimen/sp_16"
+            android:paddingRight="@dimen/sp_16"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <LinearLayout
+                android:layout_weight="1"
+                android:orientation="vertical"
+                android:layout_width="match_parent"
+                android:layout_height="0dp">
+                <TextView
+                    android:id="@+id/ck_all"
+                    android:text="增加+"
+                    android:padding="@dimen/dp_10"
+                    android:gravity="center"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content">
+                </TextView>
+                <android.support.v7.widget.RecyclerView
+                    android:id="@+id/feeded_rv"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    />
+            </LinearLayout>
+            <LinearLayout
+                android:layout_marginTop="5dp"
+                android:orientation="horizontal"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+                <TextView
+                    android:layout_width="60dp"
+                    android:layout_height="wrap_content"
+                    android:gravity="center"
+                    android:layout_marginRight="@dimen/dp_10"
+                    android:text="备注">
+                </TextView>
+
+                <com.uas.hystorage.view.ClearableEditText
+                    android:id="@+id/ce_yuanyin"
+                    style="@style/EditTextStyle"
+                    android:layout_weight="1"
+                    android:background="@drawable/bg_line_edittext"
+                    android:focusable="true"
+                    android:focusableInTouchMode="true"
+                    android:hint="不良原因"
+                    android:gravity="center"
+                    android:imeOptions="actionSend"
+                    android:textColor="@color/black" />
+
+            </LinearLayout>
+        </LinearLayout>
+
+
+
+
+    </LinearLayout>
+    <Button
+        android:id="@+id/jlt_storage_in_barcode_save_btn"
+        style="@style/ButtonStyle"
+        android:layout_width="match_parent"
+        android:layout_margin="12dp"
+        android:layout_alignParentBottom="true"
+        android:text="确认" />
+
+</LinearLayout>

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

@@ -147,6 +147,31 @@
 
 
         </LinearLayout>
+        <LinearLayout
+            android:orientation="vertical"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <TextView
+                android:id="@+id/paicamera"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:padding="@dimen/dp_10"
+                android:gravity="right"
+                android:text="拍照上传"
+                android:visibility="gone">
+            </TextView>
+            <TextView
+                android:id="@+id/tv_prompt"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:padding="@dimen/dp_10"
+                android:text="拍照上传"
+                android:visibility="gone">
+            </TextView>
+
+
+        </LinearLayout>
+
         <LinearLayout
             android:visibility="gone"
             android:orientation="vertical"

+ 6 - 0
app/src/main/res/layout/fragment_gd_material_in.xml

@@ -59,6 +59,12 @@
                 android:layout_marginRight="@dimen/textsize_20"
                 android:visibility="gone"
                 />
+            <TextView
+                android:id="@+id/tv_jitaihao"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="@dimen/textsize_20">
+            </TextView>
         </LinearLayout>
 
         <LinearLayout

+ 8 - 0
app/src/main/res/layout/fragment_gd_work_switch.xml

@@ -67,6 +67,14 @@
             android:textColor="@color/body_text_1"
             android:textSize="14sp"
             tools:text="YS1506002" />
+        <ImageView
+            android:id="@+id/iv_add_data"
+            android:layout_width="30dp"
+            android:layout_height="30dp"
+            android:src="@mipmap/android_list"
+            android:layout_marginRight="10dp"
+            android:visibility="gone"
+            />
     </LinearLayout>
 
     <!--GONE-->

+ 16 - 0
app/src/main/res/layout/fragment_goodorbadl.xml

@@ -55,6 +55,22 @@
                 android:src="@drawable/search_48"/>
 
         </LinearLayout>
+        <TextView
+            android:id="@+id/tv_moren"
+            android:text="默认仓库:"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textColor="@color/blueq"
+            android:layout_marginTop="@dimen/dp_10"
+            android:layout_marginBottom="5dp"
+            android:layout_marginLeft="@dimen/dp_10"
+            android:visibility="gone">
+        </TextView>
+        <android.support.v7.widget.RecyclerView
+            android:id="@+id/rv_data"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+        </android.support.v7.widget.RecyclerView>
 
 
     </LinearLayout>

+ 40 - 7
app/src/main/res/layout/fragment_packageacquisition.xml

@@ -5,11 +5,37 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical">
+
     <LinearLayout
         android:padding="@dimen/dp_10"
         android:orientation="vertical"
         android:layout_width="match_parent"
         android:layout_height="wrap_content">
+        <RadioGroup
+            android:id="@+id/rg_change"
+            android:layout_marginTop="@dimen/dp_10"
+            android:orientation="horizontal"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:gravity="center">
+            <RadioButton
+                android:id="@+id/rb_fengxiang"
+                android:text="封箱"
+                android:layout_gravity="center"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginRight="50dp">
+            </RadioButton>
+            <RadioButton
+                android:id="@+id/rb_chexiao"
+                android:text="撤销封箱"
+                android:layout_gravity="center"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="50dp">
+            </RadioButton>
+        </RadioGroup>
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
@@ -72,15 +98,21 @@
                     android:hint="" />
 
             </LinearLayout>
-            <CheckBox
-                android:layout_gravity="center"
-                android:id="@+id/cb_lock"
+            <LinearLayout
                 android:layout_width="0dp"
                 android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:checked="true"
-                android:text="锁定">
-            </CheckBox>
+                android:layout_weight="1">
+                <CheckBox
+                    android:layout_gravity="center"
+                    android:id="@+id/cb_lock"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:checked="true"
+                    android:text="锁定">
+                </CheckBox>
+            </LinearLayout>
+
 
 
         </LinearLayout>
@@ -131,6 +163,7 @@
 
 
         <LinearLayout
+            android:id="@+id/line_pch"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="6dp"

+ 57 - 0
app/src/main/res/layout/fragment_pre_processing_report.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+    <LinearLayout
+        android:layout_weight="1"
+        android:orientation="vertical"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <LinearLayout
+            android:padding="@dimen/sp_16"
+            android:orientation="horizontal"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <TextView
+                android:layout_gravity="center"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textColor="@color/red"
+                android:text="工单号"
+                android:layout_marginRight="@dimen/dp_10"
+                android:gravity="right">
+            </TextView>
+            <TextView
+                android:id="@+id/tv_ma_code"
+                android:layout_gravity="center"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textColor="@color/black"
+                android:text=""
+                android:layout_marginRight="@dimen/dp_10"
+                android:gravity="left">
+            </TextView>
+        </LinearLayout>
+
+
+        <android.support.v7.widget.RecyclerView
+            android:layout_marginLeft="@dimen/dp_10"
+            android:layout_marginRight="@dimen/dp_10"
+            android:id="@+id/feeded_rv"
+            android:layout_width="match_parent"
+            android:layout_height="300dp"
+            />
+    </LinearLayout>
+    <Button
+        android:id="@+id/jlt_storage_in_barcode_save_btn"
+        style="@style/ButtonStyle"
+        android:layout_width="match_parent"
+        android:layout_margin="12dp"
+        android:layout_alignParentBottom="true"
+        android:text="确认" />
+
+</LinearLayout>

+ 26 - 0
app/src/main/res/layout/fragment_putintoadd.xml

@@ -60,6 +60,32 @@
         </LinearLayout>
 
     </LinearLayout>
+    <RadioGroup
+        android:id="@+id/rg_hui"
+        android:layout_marginTop="@dimen/dp_10"
+        android:orientation="horizontal"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:gravity="center">
+        <RadioButton
+            android:id="@+id/rb_ok"
+            android:text="投入"
+            android:layout_gravity="center"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginRight="50dp"
+            android:textSize="@dimen/sp_14">
+        </RadioButton>
+        <RadioButton
+            android:id="@+id/rb_no"
+            android:text="撤销投入"
+            android:layout_gravity="center"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="50dp">
+        </RadioButton>
+    </RadioGroup>
 <!--    <com.uas.hystorage.view.left.ItemRemoveRecyclerView-->
 <!--        android:id="@+id/id_item_remove_recyclerview"-->
 <!--        android:layout_width="match_parent"-->

+ 2 - 0
app/src/main/res/layout/fragment_reworkdecision.xml

@@ -99,6 +99,8 @@
             android:layout_height="wrap_content"
             android:textColor="@color/black"
             android:layout_gravity="center"
+            android:layout_marginLeft="@dimen/dp_10"
+            android:layout_marginRight="@dimen/dp_10"
             android:text="">
         </TextView>
 

+ 108 - 2
app/src/main/res/layout/fragment_rollout.xml

@@ -13,6 +13,24 @@
             android:orientation="vertical"
             android:layout_width="match_parent"
             android:layout_height="wrap_content">
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+                <TextView
+                    style="@style/inputItemCaption"
+                    android:text="岗位资源">
+                </TextView>
+                <TextView
+                    android:layout_marginLeft="@dimen/dp_10"
+                    android:textColor="@color/black"
+                    android:id="@+id/tv_sccode"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:text="">
+                </TextView>
+            </LinearLayout>
             <LinearLayout
                 android:orientation="horizontal"
                 android:layout_width="match_parent"
@@ -25,10 +43,20 @@
                     android:layout_marginLeft="@dimen/dp_10"
                     android:textColor="@color/black"
                     android:id="@+id/tv_macode"
-                    android:layout_width="wrap_content"
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
+                    android:layout_weight="1"
                     android:text="">
                 </TextView>
+                <ImageView
+                    android:id="@+id/iv_add_data"
+                    android:layout_width="30dp"
+                    android:layout_height="30dp"
+                    android:src="@mipmap/android_list"
+                    android:layout_marginRight="10dp"
+                    android:visibility="gone"
+                    />
+
             </LinearLayout>
             <LinearLayout
                 android:orientation="horizontal"
@@ -42,6 +70,33 @@
                     android:layout_marginLeft="@dimen/dp_10"
                     android:textColor="@color/black"
                     android:id="@+id/tv_maprodcode"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:text="">
+                </TextView>
+                <TextView
+                    android:layout_marginLeft="@dimen/dp_10"
+                    android:textColor="@color/black"
+                    android:id="@+id/tv_jitaihao"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text=""
+                    android:layout_marginRight="@dimen/dp_10">
+                </TextView>
+            </LinearLayout>
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+                <TextView
+                    style="@style/inputItemCaption"
+                    android:text="产品名称">
+                </TextView>
+                <TextView
+                    android:layout_marginLeft="@dimen/dp_10"
+                    android:textColor="@color/black"
+                    android:id="@+id/tv_maprodname"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:text="">
@@ -65,6 +120,50 @@
                     android:text="">
                 </TextView>
             </LinearLayout>
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+                <LinearLayout
+                    android:orientation="horizontal"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1">
+                    <TextView
+                        style="@style/inputItemCaption"
+                        android:text="已完工数">
+                    </TextView>
+                    <TextView
+                        android:layout_marginLeft="@dimen/dp_10"
+                        android:textColor="@color/black"
+                        android:id="@+id/tv_ma_madeqty"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="">
+                    </TextView>
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:orientation="horizontal"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1">
+                    <TextView
+                        style="@style/inputItemCaption"
+                        android:text="未完工数">
+                    </TextView>
+                    <TextView
+                        android:layout_marginLeft="@dimen/dp_10"
+                        android:textColor="@color/black"
+                        android:id="@+id/tv_ma_unmadeqty"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="">
+                    </TextView>
+                </LinearLayout>
+            </LinearLayout>
+
             <LinearLayout
                 android:orientation="horizontal"
                 android:layout_width="match_parent"
@@ -96,7 +195,7 @@
                     android:layout_weight="1">
                     <TextView
                         style="@style/inputItemCaption"
-                        android:text="未完成数">
+                        android:text="允许转出数">
                     </TextView>
                     <TextView
                         android:layout_marginLeft="@dimen/dp_10"
@@ -226,6 +325,13 @@
                 android:layout_marginLeft="50dp">
             </RadioButton>
         </RadioGroup>
+        <CheckBox
+            android:id="@+id/clear_cha"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="@dimen/dp_10"
+            android:text="清尾差">
+        </CheckBox>
         <com.uas.hystorage.view.ClearableEditText
             android:id="@+id/ce_yuanyin"
             style="@style/EditTextStyle"

+ 25 - 16
app/src/main/res/layout/fragment_starts_stops.xml

@@ -99,23 +99,32 @@
 
 
     </LinearLayout>
-
-    <Button
-        android:visibility="gone"
-        android:id="@+id/btn_starts"
-        style="@style/ButtonStyle"
-        android:layout_width="match_parent"
-        android:layout_margin="12dp"
+    <LinearLayout
         android:layout_alignParentBottom="true"
-        android:text="启动" />
-    <Button
-        android:visibility="gone"
-        android:id="@+id/btn_stops"
-        style="@style/ButtonStyle"
-        android:background="@drawable/bgstop_button"
+        android:orientation="horizontal"
         android:layout_width="match_parent"
-        android:layout_margin="12dp"
-        android:layout_alignParentBottom="true"
-        android:text="暂停" />
+        android:layout_height="wrap_content">
+
+        <Button
+            android:id="@+id/btn_starts"
+            style="@style/ButtonStyle"
+            android:layout_width="0dp"
+            android:layout_height="100dp"
+            android:layout_margin="12dp"
+            android:layout_weight="1"
+            android:text="启动" />
+
+        <Button
+            android:id="@+id/btn_stops"
+            style="@style/ButtonStyle"
+            android:background="@drawable/bgstop_button"
+            android:layout_height="100dp"
+            android:layout_width="0dp"
+            android:layout_margin="12dp"
+            android:layout_weight="1"
+            android:text="暂停" />
+    </LinearLayout>
+
+
 
 </RelativeLayout>

+ 3 - 2
app/src/main/res/layout/fuzzy_search_item.xml

@@ -9,20 +9,21 @@
         android:orientation="horizontal"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
+        android:padding="5dp"
         >
 
         <TextView
             android:id="@+id/macode_Tv"
             android:gravity="center"
             android:layout_width="wrap_content"
-            android:layout_height="40dp"
+            android:layout_height="wrap_content"
             />
 
         <TextView
             android:id="@+id/remark_Tv"
             android:gravity="center"
             android:layout_width="wrap_content"
-            android:layout_height="40dp"
+            android:layout_height="wrap_content"
             />
     </LinearLayout>
 </RelativeLayout>

+ 27 - 0
app/src/main/res/layout/item_ruku_detail.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--主菜单griditem布局-->
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical"
+    android:paddingTop="10dp"
+    android:paddingBottom="10dp"
+    android:paddingLeft="15dp"
+    android:paddingRight="10dp"
+    >
+    <TextView
+        android:id="@+id/tv_pichi"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:paddingLeft="6dp"
+        android:textColor="@color/body_text_1"
+        android:textSize="14sp"
+        android:layout_gravity="right"
+        tools:text="" />
+
+
+</LinearLayout>
+

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

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+    <TextView
+        xmlns:android="http://schemas.android.com/apk/res/android"
+        android:id="@android:id/text1"
+        android:gravity="center"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:maxLines="3"
+        android:padding="5dp"
+        />

+ 56 - 0
app/src/main/res/layout/recyclerview_item2.xml

@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical">
+    <LinearLayout
+        android:orientation="horizontal"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+        <CheckBox
+            android:id="@+id/select_checkbox"
+            android:layout_width="@dimen/dp_40"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center">
+        </CheckBox>
+        <LinearLayout
+            android:orientation="vertical"
+            android:layout_gravity="center"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <TextView
+                android:id="@+id/tv_liaocode"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10"
+                android:text="11234123ee21234er"
+                android:gravity="center">
+            </TextView>
+            <TextView
+                android:id="@+id/tv_liaotetall"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10"
+                android:text="11234123ee21234er"
+                android:gravity="center"
+                android:visibility="gone">
+            </TextView>
+            <TextView
+                android:id="@+id/tv_liaospec"
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10"
+                android:text="11234123ee21234er"
+                android:gravity="center">
+            </TextView>
+        </LinearLayout>
+
+    </LinearLayout>
+
+
+
+</LinearLayout>

+ 77 - 0
app/src/main/res/layout/start_detail_one.xml

@@ -88,6 +88,62 @@
 
     </LinearLayout>
 
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="3dp">
+
+        <LinearLayout
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:text="转出良品数:"
+                android:textSize="14sp" />
+
+            <TextView
+                android:id="@+id/tv_outqty"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="8dp"
+                android:layout_weight="1"
+                android:textColor="#333"
+                android:textSize="14sp"
+                />
+        </LinearLayout>
+
+        <LinearLayout
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="8dp"
+            android:layout_weight="1"
+            android:orientation="horizontal">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="match_parent"
+                android:text="允许转出数"
+                android:textSize="14sp" />
+
+            <TextView
+                android:id="@+id/tv_unoutqty"
+                android:layout_width="0dp"
+                android:layout_height="match_parent"
+                android:layout_marginLeft="8dp"
+                android:layout_weight="2"
+                android:textColor="#333"
+                android:textSize="14sp"
+                />
+        </LinearLayout>
+
+    </LinearLayout>
+
+
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
@@ -156,6 +212,27 @@
             android:textSize="14sp"
             />
     </LinearLayout>
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:padding="3dp">
 
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            android:text="类型:"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/kind_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="8dp"
+            android:layout_weight="1"
+            android:textColor="#333"
+            android:textSize="14sp"
+            />
+    </LinearLayout>
 
 </LinearLayout>

+ 26 - 0
app/src/main/res/layout/take_photo_pop.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:gravity="center_horizontal"
+    android:layout_height="wrap_content">
+    <LinearLayout
+        android:layout_marginTop="100dp"
+        android:id="@+id/pop_layout"
+        android:layout_width="fill_parent"
+        android:layout_height="match_parent"
+        android:layout_alignParentBottom="true"
+        android:orientation="vertical">
+        <android.support.v7.widget.RecyclerView
+            android:id="@+id/id_item_remove_recyclerview"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="@dimen/dp_10">
+        </android.support.v7.widget.RecyclerView>
+
+
+    </LinearLayout>
+
+
+
+
+</RelativeLayout>

+ 4 - 1
app/src/main/res/values/styles.xml

@@ -842,5 +842,8 @@
         <item name="android:imeOptions">actionSend</item>
         <item name="android:textColor">@color/black</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>
 </resources>

+ 6 - 3
build.gradle

@@ -26,10 +26,13 @@ allprojects {
         google()
         jcenter()
         maven {
+
             url 'https://maven.google.com/'
             name 'Google'
         }
-        maven { url "https://jitpack.io" }
+        maven {
+
+            url "https://jitpack.io" }
     }
 }
 
@@ -44,8 +47,8 @@ ext {
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 16,
-            versionName      : "v1.0.6"
+            versionCode      : 28,
+            versionName      : "v1.1.8"
     ]
 
     depsVersion = [

+ 2 - 2
pda_libs/pulltoreflashlibrary/build/generated/source/buildConfig/debug/com/handmark/pulltorefresh/library/BuildConfig.java

@@ -8,6 +8,6 @@ public final class BuildConfig {
   public static final String APPLICATION_ID = "com.handmark.pulltorefresh.library";
   public static final String BUILD_TYPE = "debug";
   public static final String FLAVOR = "";
-  public static final int VERSION_CODE = 16;
-  public static final String VERSION_NAME = "v1.0.6";
+  public static final int VERSION_CODE = 28;
+  public static final String VERSION_NAME = "v1.1.8";
 }

BIN
pda_libs/pulltoreflashlibrary/build/intermediates/classes/debug/com/handmark/pulltorefresh/library/BuildConfig.class


+ 1 - 1
pda_libs/pulltoreflashlibrary/build/intermediates/incremental/packageDebugResources/compile-file-map.properties

@@ -1,4 +1,4 @@
-#Sun Apr 07 15:19:32 CST 2024
+#Thu Apr 18 11:28:31 CST 2024
 D\:\\AndroidData\\hyuas-mes\\pda_libs\\pulltoreflashlibrary\\src\\main\\res\\drawable-hdpi\\default_ptr_flip.png=D\:\\AndroidData\\hyuas-mes\\pda_libs\\pulltoreflashlibrary\\build\\intermediates\\packaged_res\\debug\\drawable-hdpi-v4\\default_ptr_flip.png
 D\:\\AndroidData\\hyuas-mes\\pda_libs\\pulltoreflashlibrary\\src\\main\\res\\anim\\slide_in_from_top.xml=D\:\\AndroidData\\hyuas-mes\\pda_libs\\pulltoreflashlibrary\\build\\intermediates\\packaged_res\\debug\\anim\\slide_in_from_top.xml
 D\:\\AndroidData\\hyuas-mes\\pda_libs\\pulltoreflashlibrary\\src\\main\\res\\drawable-xhdpi\\default_ptr_flip.png=D\:\\AndroidData\\hyuas-mes\\pda_libs\\pulltoreflashlibrary\\build\\intermediates\\packaged_res\\debug\\drawable-xhdpi-v4\\default_ptr_flip.png

BIN
pda_libs/pulltoreflashlibrary/build/intermediates/intermediate-jars/debug/classes.jar


BIN
pda_libs/pulltoreflashlibrary/build/intermediates/intermediate-jars/debug/full.jar


+ 2 - 2
pda_libs/pulltoreflashlibrary/build/intermediates/manifests/aapt/debug/AndroidManifest.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.handmark.pulltorefresh.library"
-    android:versionCode="16"
-    android:versionName="v1.0.6" >
+    android:versionCode="28"
+    android:versionName="v1.1.8" >
 
     <uses-sdk
         android:minSdkVersion="16"

+ 1 - 1
pda_libs/pulltoreflashlibrary/build/intermediates/manifests/aapt/debug/output.json

@@ -1 +1 @@
-[{"outputType":{"type":"AAPT_FRIENDLY_MERGED_MANIFESTS"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":16,"versionName":"v1.0.6","enabled":true,"outputFile":"pulltoreflashlibrary-debug.aar","fullName":"debug","baseName":"debug"},"path":"AndroidManifest.xml","properties":{"packageId":"com.handmark.pulltorefresh.library","split":""}}]
+[{"outputType":{"type":"AAPT_FRIENDLY_MERGED_MANIFESTS"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":28,"versionName":"v1.1.8","enabled":true,"outputFile":"pulltoreflashlibrary-debug.aar","fullName":"debug","baseName":"debug"},"path":"AndroidManifest.xml","properties":{"packageId":"com.handmark.pulltorefresh.library","split":""}}]

+ 2 - 2
pda_libs/pulltoreflashlibrary/build/intermediates/manifests/full/debug/AndroidManifest.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.handmark.pulltorefresh.library"
-    android:versionCode="16"
-    android:versionName="v1.0.6" >
+    android:versionCode="28"
+    android:versionName="v1.1.8" >
 
     <uses-sdk
         android:minSdkVersion="16"

+ 1 - 1
pda_libs/pulltoreflashlibrary/build/intermediates/manifests/full/debug/output.json

@@ -1 +1 @@
-[{"outputType":{"type":"MERGED_MANIFESTS"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":16,"versionName":"v1.0.6","enabled":true,"outputFile":"pulltoreflashlibrary-debug.aar","fullName":"debug","baseName":"debug"},"path":"AndroidManifest.xml","properties":{"packageId":"com.handmark.pulltorefresh.library","split":""}}]
+[{"outputType":{"type":"MERGED_MANIFESTS"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":28,"versionName":"v1.1.8","enabled":true,"outputFile":"pulltoreflashlibrary-debug.aar","fullName":"debug","baseName":"debug"},"path":"AndroidManifest.xml","properties":{"packageId":"com.handmark.pulltorefresh.library","split":""}}]