Parcourir la source

修复所有黄油刀插件问题

songw il y a 1 mois
Parent
commit
53986d9eda

BIN
app/libs/butterknife-7.0.1.jar


+ 0 - 2
app/src/main/java/com/uas/pda_smart_com_lg/fragment/EquipmentCycleCountFragment.java

@@ -49,7 +49,6 @@ import java.net.URLEncoder;
 import java.util.ArrayList;
 import java.util.List;
 
-import butterknife.ButterKnife;
 
 /**
  * Created by RaoMeng on 2019/3/23
@@ -416,7 +415,6 @@ public class EquipmentCycleCountFragment extends BaseFragment {
         super.onDestroyView();
 
         CommonUtil.closeKeybord(((EditText) mNumEdittext), mActivity);
-        ButterKnife.unbind(this);
         PdaApplication.putDataCache2Map(Constants.FLAG.INVENTORY_BILL_LIST_CACHE, mBillList);
     }
 

+ 1 - 1
app/src/main/java/com/uas/pda_smart_com_lg/fragment/IOCOutMakeMaterial.java

@@ -314,8 +314,8 @@ public class IOCOutMakeMaterial extends BaseFragment {
 
     @Override
     protected void initDatas() {
-
     }
+
     private void initPopupWindow2() {
         View view = View.inflate(getActivity(), R.layout.pop_storage_recharge_menu, null);
 

+ 53 - 54
app/src/main/java/com/uas/pda_smart_com_lg/fragment/IOCOutMakeMaterialOper.java

@@ -96,8 +96,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
-import butterknife.Bind;
-import butterknife.ButterKnife;
 import okhttp3.OkHttpClient;
 
 /**
@@ -110,55 +108,31 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
     private static final int SPLIT_BARCODE_FAIL = 105;
     private static final int FLAG_CONFIRM_POST = 0x05;
 
-    @Bind(R.id.tv_pi_inoutno)
-    TextView tvPiInoutno;
-    @Bind(R.id.tv_pd_whcode)
-    TextView tvPdWhcode;
-    @Bind(R.id.et_bar_code)
-    ClearableEditText etBarCode;
-    @Bind(R.id.btn_confirm)
-    Button btnConfirm;
-
-    @Bind(R.id.iocout_collect_rg)
-    RadioGroup mCollectTypeRadioGroup;
-    @Bind(R.id.iocout_collect_barcode_rb)
-    RadioButton mBarcodeRadioButton;
-    @Bind(R.id.iocout_collect_box_rb)
-    RadioButton mBoxRadioButton;
-    @Bind(R.id.iocout_collect_barcode_tl)
-    TableLayout mBarcodeTableLayout;
-    @Bind(R.id.iocout_collect_box_tl)
-    TableLayout mBoxTableLayout;
-
-    @Bind(R.id.tv_barcode_collection_success)
-    TextView tvBarcodeCollectionSuccess;
-    @Bind(R.id.iocout_bar_code_tv)
-    TextView mCollectBarcodeTv;
-    @Bind(R.id.iocout_bar_remain_tv)
-    TextView mCollectBarRemainTv;
-    @Bind(R.id.iocout_bar_prodcode_tv)
-    TextView mCollectBarProdcodeTv;
-
-    @Bind(R.id.tv_box_collection_success)
-    TextView tvBoxCollectionSuccess;
-    @Bind(R.id.iocout_box_tv)
-    TextView mCollectBoxTv;
-    @Bind(R.id.iocout_box_num_tv)
-    TextView mCollectBoxNumTv;
-    @Bind(R.id.iocout_box_prodcode_tv)
-    TextView mCollectBoxrProdcodeTv;
-    @Bind(R.id.iocout_box_whcode_tv)
-    TextView mCollectBoxWhcodeTv;
-    @Bind(R.id.iocout_collect_model_btn)
-    Button mCollectModelBtn;
-    @Bind(R.id.iocout_material_type_tv)
-    TextView mtypeNameTv;
-    @Bind(R.id.iocout_material_type_sp)
-    Spinner mTypeSpinner;
-    @Bind(R.id.iocout_next_material_information)
-    TextView mMaterialInforTextView;
-    @Bind(R.id.iocout_collect_result)
-    TextView mCollectResultTextView;
+    private TextView tvPiInoutno;
+    private  TextView tvPdWhcode;
+    private ClearableEditText etBarCode;
+    private Button btnConfirm;
+    private RadioGroup mCollectTypeRadioGroup;
+    private RadioButton mBarcodeRadioButton;
+    private RadioButton mBoxRadioButton;
+    private TableLayout mBarcodeTableLayout;
+    private TableLayout mBoxTableLayout;
+
+    private  TextView tvBarcodeCollectionSuccess;
+    private TextView mCollectBarcodeTv;
+    private  TextView mCollectBarRemainTv;
+    private  TextView mCollectBarProdcodeTv;
+
+    private  TextView tvBoxCollectionSuccess;
+    private   TextView mCollectBoxTv;
+    private   TextView mCollectBoxNumTv;
+    private   TextView mCollectBoxrProdcodeTv;
+    private  TextView mCollectBoxWhcodeTv;
+    private  Button mCollectModelBtn;
+    private  TextView mtypeNameTv;
+    private  Spinner mTypeSpinner;
+    private  TextView mMaterialInforTextView;
+    private  TextView mCollectResultTextView;
     private CheckBox special_check;
     private ImageView mScanImageView;
 
@@ -466,6 +440,34 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         special_check = root.findViewById(R.id.special_check);
         mScanImageView = (ImageView) mActivity.findViewById(R.id.btn_actionbar_scan_iv);
 
+         tvPiInoutno = root.findViewById(R.id.tv_pi_inoutno);
+         tvPdWhcode = root.findViewById(R.id.tv_pd_whcode);
+         etBarCode = root.findViewById(R.id.et_bar_code);
+         btnConfirm = root.findViewById(R.id.btn_confirm);
+
+         mCollectTypeRadioGroup = root.findViewById(R.id.iocout_collect_rg);
+         mBarcodeRadioButton = root.findViewById(R.id.iocout_collect_barcode_rb);
+         mBoxRadioButton = root.findViewById(R.id.iocout_collect_box_rb);
+         mBarcodeTableLayout = root.findViewById(R.id.iocout_collect_barcode_tl);
+         mBoxTableLayout = root.findViewById(R.id.iocout_collect_box_tl);
+
+         tvBarcodeCollectionSuccess = root.findViewById(R.id.tv_barcode_collection_success);
+         mCollectBarcodeTv = root.findViewById(R.id.iocout_bar_code_tv);
+         mCollectBarRemainTv = root.findViewById(R.id.iocout_bar_remain_tv);
+         mCollectBarProdcodeTv = root.findViewById(R.id.iocout_bar_prodcode_tv);
+
+         tvBoxCollectionSuccess = root.findViewById(R.id.tv_box_collection_success);
+         mCollectBoxTv = root.findViewById(R.id.iocout_box_tv);
+         mCollectBoxNumTv = root.findViewById(R.id.iocout_box_num_tv);
+         mCollectBoxrProdcodeTv = root.findViewById(R.id.iocout_box_prodcode_tv);
+         mCollectBoxWhcodeTv = root.findViewById(R.id.iocout_box_whcode_tv);
+         mCollectModelBtn = root.findViewById(R.id.iocout_collect_model_btn);
+         mtypeNameTv = root.findViewById(R.id.iocout_material_type_tv);
+         mTypeSpinner = root.findViewById(R.id.iocout_material_type_sp);
+         mMaterialInforTextView = root.findViewById(R.id.iocout_next_material_information);
+         mCollectResultTextView = root.findViewById(R.id.iocout_collect_result);
+
+
         mDbManager = new DBManager(getActivity().getApplicationContext());
         mOkHttpClient = new OkHttpClient.Builder()
                 .sslSocketFactory(FileUtils.createSSLSocketFactory(), new FileUtils.TrustAllCerts())
@@ -483,8 +485,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
             isMultiple = bundle.getBoolean("isMultiple");
         }
 
-        ButterKnife.bind(this, root);
-
         mResults = new ArrayList<>();
         if (mCollectModel == 1) {
             mCollectModelBtn.setText("在线");
@@ -2650,7 +2650,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
         ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(getString(R.string.out_management));
         mDbManager.closeDB();
         CommonUtil.closeKeybord(((EditText) etBarCode), mActivity);
-        ButterKnife.unbind(this);
         ((FunctionActivity) getActivity()).fragment = new IOCOutMakeMaterial();
     }
 

+ 26 - 35
app/src/main/java/com/uas/pda_smart_com_lg/fragment/IOCOutManagement.java

@@ -12,9 +12,6 @@ import com.uas.pda_smart_com_lg.tools.SharedPreUtil;
 import com.uas.pda_smart_com_lg.util.CommonUtil;
 import com.uas.pda_smart_com_lg.util.Constants;
 
-import butterknife.Bind;
-import butterknife.ButterKnife;
-import butterknife.OnClick;
 
 /**
  * A simple {@link Fragment} subclass.
@@ -22,9 +19,7 @@ import butterknife.OnClick;
  */
 public class IOCOutManagement extends BaseFragment {
 
-    @Bind(R.id.out_material)
     LinearLayout outMaterial;
-    @Bind(R.id.out_finish_material)
     LinearLayout outFinishMaterial;
 
     private String mProdOutType;
@@ -40,13 +35,37 @@ public class IOCOutManagement extends BaseFragment {
         ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(getString(R.string.out_management));
         root.setBackgroundColor(getResources().getColor(R.color.background_color_second));
 
-        ButterKnife.bind(this, root);
         mProdOutType = SharedPreUtil.getString(getActivity().getApplicationContext(), Constants.FLAG.PRODOUT_TYPE_CACHE, "byBatch");
+        outMaterial = root.findViewById(R.id.out_material);
+        outFinishMaterial = root.findViewById(R.id.out_finish_material);
     }
 
     @Override
     protected void initEvents() {
-
+        outMaterial.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                //材料出库
+                if (mProdOutType != null) {
+                    if (mProdOutType.equals("byBatch") || mProdOutType.equals("byProdcode")) {
+                        mFragment = new IOCOutMakeMaterial();
+                        getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container_function_fragment, mFragment).commit();
+                    } else if (mProdOutType.equals("byBarcode")) {
+                        //                        mFragment = new IOCOutFreeCollectFragment();
+                        //                        getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container_function_fragment,mFragment).commit();
+                        CommonUtil.toastNoRepeat(mActivity, "暂时不支持自由采集功能!");
+                    }
+                }
+            }
+        });
+        outFinishMaterial.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                //完工品出库
+                mFragment = new FinishedGoodsOutFragment();
+                getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container_function_fragment, mFragment).commit();
+            }
+        });
     }
 
     @Override
@@ -67,35 +86,7 @@ public class IOCOutManagement extends BaseFragment {
     @Override
     public void onDestroyView() {
         super.onDestroyView();
-        ButterKnife.unbind(this);
         ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(getString(R.string.out_in_management));
     }
 
-    @OnClick({R.id.out_material, R.id.out_finish_material})
-    public void onClick(View view) {
-
-        switch (view.getId()) {
-            case R.id.out_material:
-                //材料出库
-                if (mProdOutType != null) {
-                    if (mProdOutType.equals("byBatch") || mProdOutType.equals("byProdcode")) {
-                        mFragment = new IOCOutMakeMaterial();
-                        getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container_function_fragment, mFragment).commit();
-                    } else if (mProdOutType.equals("byBarcode")) {
-//                        mFragment = new IOCOutFreeCollectFragment();
-//                        getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container_function_fragment,mFragment).commit();
-                        CommonUtil.toastNoRepeat(mActivity, "暂时不支持自由采集功能!");
-                    }
-                }
-
-                break;
-            case R.id.out_finish_material:
-                //完工品出库
-                mFragment = new FinishedGoodsOutFragment();
-                getFragmentManager().beginTransaction().addToBackStack(null).replace(R.id.container_function_fragment, mFragment).commit();
-                break;
-            default:
-                break;
-        }
-    }
 }

+ 0 - 2
app/src/main/java/com/uas/pda_smart_com_lg/fragment/InventoryBillFragment.java

@@ -49,7 +49,6 @@ import java.net.URLEncoder;
 import java.util.ArrayList;
 import java.util.List;
 
-import butterknife.ButterKnife;
 
 /**
  * Created by RaoMeng on 2019/3/23
@@ -414,7 +413,6 @@ public class InventoryBillFragment extends BaseFragment {
         super.onDestroyView();
 
         CommonUtil.closeKeybord(((EditText) mNumEdittext), mActivity);
-        ButterKnife.unbind(this);
         PdaApplication.putDataCache2Map(Constants.FLAG.INVENTORY_BILL_LIST_CACHE, mBillList);
     }
 

+ 0 - 3
app/src/main/java/com/uas/pda_smart_com_lg/fragment/WorkOrderMaterialCheckFragment.java

@@ -49,8 +49,6 @@ import java.net.URLEncoder;
 import java.util.ArrayList;
 import java.util.List;
 
-import butterknife.ButterKnife;
-
 /**
  * Created by RaoMeng on 2024/7/2
  * Desc: 工单物料核对
@@ -414,7 +412,6 @@ public class WorkOrderMaterialCheckFragment extends BaseFragment {
         super.onDestroyView();
 
         CommonUtil.closeKeybord(((EditText) mNumEdittext), mActivity);
-        ButterKnife.unbind(this);
         PdaApplication.putDataCache2Map(Constants.FLAG.INVENTORY_BILL_LIST_CACHE, mBillList);
     }