Преглед на файлове

切换账套成功之后,保留powerList的值

shuij преди 4 години
родител
ревизия
770a69cd7a

+ 2 - 4
app/src/main/java/com/uas/pda_smart_sa/activity/FunctionActivity.java

@@ -11,9 +11,9 @@ import android.widget.ImageView;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
 
+import com.uas.pda_smart_sa.R;
 import com.uas.pda_smart_sa.fragment.BaseFragment;
 import com.uas.pda_smart_sa.fragment.DeliveryInspectionFragment;
-import com.uas.pda_smart_sa.fragment.IOCOutManagement;
 import com.uas.pda_smart_sa.fragment.IndexInOutContentFragment;
 import com.uas.pda_smart_sa.fragment.IndexSettingFragment;
 import com.uas.pda_smart_sa.fragment.IndexShopContentFragment;
@@ -23,9 +23,8 @@ import com.uas.pda_smart_sa.fragment.SCSMTFragment;
 import com.uas.pda_smart_sa.fragment.SolderPasteManageFragment;
 import com.uas.pda_smart_sa.fragment.StorageInFragment;
 import com.uas.pda_smart_sa.fragment.StorageOutFilterListFragment;
-import com.uas.pda_smart_sa.interfaces.BackHandlerInterface;
-import com.uas.pda_smart_sa.R;
 import com.uas.pda_smart_sa.global.GloableParams;
+import com.uas.pda_smart_sa.interfaces.BackHandlerInterface;
 import com.uas.pda_smart_sa.tools.DataSourceManager;
 import com.uas.pda_smart_sa.util.CameraUtil;
 
@@ -109,7 +108,6 @@ public class FunctionActivity extends BaseActivity implements View.OnClickListen
                 //设置
                 case GloableParams.GRIDNAME_SETTING:
                     fragment = new IndexSettingFragment();
-//                    fragment = new BlueToothPrintFragment();
                     break;
             }
             //添加Fragment

+ 11 - 2
app/src/main/java/com/uas/pda_smart_sa/fragment/IndexSettingFragment.java

@@ -655,11 +655,11 @@ public class IndexSettingFragment extends BaseFragment implements View.OnClickLi
                                     String emname = dataObject.optString("em_name");
 
                                     if (!TextUtils.isEmpty(funname) && !TextUtils.isEmpty(mastername)) {
-                                        PdaApplication.removeAllDataCache();
+                                       // PdaApplication.removeAllDataCache();
+                                        removeAllCache();
                                         SharedPreUtil.saveString(getActivity(), Constants.FLAG.ACCOUNT_FUNNAME_CACHE, funname);
                                         SharedPreUtil.saveString(getActivity(), Constants.FLAG.ACCOUNT_NAME_CACHE, mastername);
                                         Toast.makeText(getActivity(), "账套切换成功", Toast.LENGTH_SHORT).show();
-
                                         closeAccountBookPop();
                                         mAccountBookTv.setText(funname);
                                     } else {
@@ -696,6 +696,14 @@ public class IndexSettingFragment extends BaseFragment implements View.OnClickLi
 
     }
 
+    private void removeAllCache() {
+        //原来的权限先予以保留
+        Object powerList =  PdaApplication.getDataCacheFromMap(Constants.FLAG.POWER_CALLER_CACHE);
+        PdaApplication.removeAllDataCache();
+        PdaApplication.putDataCache2Map(Constants.FLAG.POWER_CALLER_CACHE,powerList);
+    }
+
+
     private void closeAccountBookPop() {
         if (mAccountBookPop != null) {
             mAccountBookPop.dismiss();
@@ -729,4 +737,5 @@ public class IndexSettingFragment extends BaseFragment implements View.OnClickLi
     public boolean onFragmentBackPressed() {
         return false;
     }
+
 }

+ 14 - 12
app/src/main/java/com/uas/pda_smart_sa/fragment/IndexWareHouseContentFragment.java

@@ -94,7 +94,7 @@ public class IndexWareHouseContentFragment extends BaseFragment implements Adapt
                     getFragmentManager().beginTransaction().addToBackStack(null)
                             .replace(R.id.container_function_fragment, fragment).commit();
                     break;
-                //拆批合批
+                //拆
                 case GloableParams.GRIDNAME_BATCH_OPRATION:
                     fragment = new SplitBoxFragment();
                     getFragmentManager().beginTransaction().addToBackStack(null)
@@ -106,6 +106,18 @@ public class IndexWareHouseContentFragment extends BaseFragment implements Adapt
                     getFragmentManager().beginTransaction().addToBackStack(null)
                             .replace(R.id.container_function_fragment, fragment).commit();
                     break;
+                //条码数量修改
+                case GloableParams.GRIDNAME_MODIFY_QUANTITY:
+                    fragment = new ModifyBarcodeQuantityFragment();
+                    getFragmentManager().beginTransaction().addToBackStack(null)
+                            .replace(R.id.container_function_fragment, fragment).commit();
+                    break;
+                //库存盘点
+                case GloableParams.GRIDNAME_WORK_INVENTORY:
+                    fragment = new StorageInventoryFragment();
+                    getFragmentManager().beginTransaction().addToBackStack(null)
+                            .replace(R.id.container_function_fragment, fragment).commit();
+                    break;
                 //MSD管理
                 case GloableParams.GRIDNAME_MSD_MANAGER:
 //                    fragment = new MSDContentFragment();
@@ -119,17 +131,7 @@ public class IndexWareHouseContentFragment extends BaseFragment implements Adapt
                     getFragmentManager().beginTransaction().addToBackStack(null)
                             .replace(R.id.container_function_fragment, fragment).commit();
                     break;
-                //库存盘点
-                case GloableParams.GRIDNAME_WORK_INVENTORY:
-                    fragment = new StorageInventoryFragment();
-                    getFragmentManager().beginTransaction().addToBackStack(null)
-                            .replace(R.id.container_function_fragment, fragment).commit();
-                    break;
-                case GloableParams.GRIDNAME_MODIFY_QUANTITY:
-                    fragment = new ModifyBarcodeQuantityFragment();
-                    getFragmentManager().beginTransaction().addToBackStack(null)
-                            .replace(R.id.container_function_fragment, fragment).commit();
-                    break;
+
             }
         }
     }

+ 10 - 12
app/src/main/java/com/uas/pda_smart_sa/fragment/JLTPickMaterialOutScanFragment.java

@@ -38,8 +38,6 @@ import com.uas.pda_smart_sa.adapter.FormAdapter;
 import com.uas.pda_smart_sa.adapter.StorageOutTodoListFragment;
 import com.uas.pda_smart_sa.bean.FormBean;
 import com.uas.pda_smart_sa.bean.JLTMaterialBean;
-import com.uas.pda_smart_sa.bean.JLTStorageModelBean;
-import com.uas.pda_smart_sa.bean.WhcodeBean;
 import com.uas.pda_smart_sa.global.GloableParams;
 import com.uas.pda_smart_sa.listener.MyEditorActionListener;
 import com.uas.pda_smart_sa.util.CameraUtil;
@@ -129,7 +127,7 @@ public class JLTPickMaterialOutScanFragment extends BaseFragment implements View
         mLotEditText = root.findViewById(R.id.jlt_pick_material_out_scan_lot_et);
         mQuantityEditText = root.findViewById(R.id.jlt_pick_material_out_scan_quantity_et);
         mCycleEditText = root.findViewById(R.id.jlt_pick_material_out_scan_cycle_et);
-        mMultipleEditText = root.findViewById(R.id.jlt_pick_material_out_scan_multiple_et);
+        mMultipleEditText = root.findViewById(R.id.jlt_pick_material_out_scan_multiple_et);//no use
         mInoutnoTextView = root.findViewById(R.id.jlt_pick_material_out_scan_inoutno_tv);
         mModelTextView = root.findViewById(R.id.jlt_pick_material_out_scan_model_tv);
         mDoneTextView = root.findViewById(R.id.jlt_pick_material_out_scan_done_tv);
@@ -177,7 +175,7 @@ public class JLTPickMaterialOutScanFragment extends BaseFragment implements View
 
         mLocationColumn = new ArrayColumn<String>("库位", "BAR_LOCATION");
         mBoxColumn = new ArrayColumn<String>("箱号", "BAR_OUTBOXCODE1");
-        mBarcodeColumn = new ArrayColumn<String>("条码", "BARCODE");
+        mBarcodeColumn = new ArrayColumn<String>("条码", "BARCODE");//no use
         mQuantityColumn = new ArrayColumn<Double>("数量", "quantity", false,
                 new IFormat<Double>() {
                     @Override
@@ -246,7 +244,7 @@ public class JLTPickMaterialOutScanFragment extends BaseFragment implements View
             public void MyEditorAction(String text, int actionId, KeyEvent event) {
             }
         });
-
+        //no use
         mMultipleEditText.setOnFocusChangeListener(new View.OnFocusChangeListener() {
             @Override
             public void onFocusChange(View v, boolean hasFocus) {
@@ -524,7 +522,7 @@ public class JLTPickMaterialOutScanFragment extends BaseFragment implements View
         double boxqty = FastjsonUtil.getDouble(dataObject, "BOXQTY");
         if (mMaterialBean != null) {
             double restqty = mMaterialBean.getRESTQTY();
-            if (CommonUtil.doubleCompare(boxqty, restqty) > 0) {
+            if (CommonUtil.doubleCompare(boxqty, restqty) > 0) {//拆包出库
                 mQtyHintTextView.setText("箱内数:" + CommonUtil.doubleFormat(boxqty)
                         + ",待出库数:" + CommonUtil.doubleFormat(restqty));
                 mQtyHintLl.setVisibility(View.VISIBLE);
@@ -598,12 +596,12 @@ public class JLTPickMaterialOutScanFragment extends BaseFragment implements View
                     Bundle bundle = new Bundle();
                     bundle.putString("pi_id", mPiid);
                     bundle.putString("pi_inoutno", mPiInoutno);
-                    if (position == 0) {
+                    if (position == 0) {//待备任务
                         StorageOutTodoListFragment todoListFragment = new StorageOutTodoListFragment();
                         todoListFragment.setArguments(bundle);
                         todoListFragment.setOnSelectListener(JLTPickMaterialOutScanFragment.this);
                         FragmentUtils.switchFragment(JLTPickMaterialOutScanFragment.this, todoListFragment);
-                    } else if (position == 1) {
+                    } else if (position == 1) {//已备列表
                         JLTStorageInDoneListFragment doneListFragment = new JLTStorageInDoneListFragment();
                         doneListFragment.setArguments(bundle);
                         doneListFragment.setOnRefreshListener(new JLTStorageInDoneListFragment.OnRefreshListener() {
@@ -613,18 +611,18 @@ public class JLTPickMaterialOutScanFragment extends BaseFragment implements View
                             }
                         });
                         FragmentUtils.switchFragment(JLTPickMaterialOutScanFragment.this, doneListFragment);
-                    } else if (position == 2) {
+                    } else if (position == 2) {//撤销备料
                         MaterialOutRevocationStockFragment revocationStockFragment = new MaterialOutRevocationStockFragment();
                         revocationStockFragment.setArguments(bundle);
                         FragmentUtils.switchFragment(JLTPickMaterialOutScanFragment.this, revocationStockFragment);
-                    } else if (position == 3) {
+                    } else if (position == 3) {//条码数量修改
                         ModifyBarcodeQuantityFragment barcodeQuantityFragment = new ModifyBarcodeQuantityFragment();
                         FragmentUtils.switchFragment(JLTPickMaterialOutScanFragment.this, barcodeQuantityFragment);
-                    } else if (position == 4) {
+                    } else if (position == 4) {//特殊出库
                         SpecialOutNewFragment specialOutNewFragment = new SpecialOutNewFragment();
                         specialOutNewFragment.setArguments(bundle);
                         FragmentUtils.switchFragment(JLTPickMaterialOutScanFragment.this, specialOutNewFragment);
-                    } else if (position == 5) {
+                    } else if (position == 5) {//出库暂存
                         StorageOutTemporaryListFragment temporaryListFragment = new StorageOutTemporaryListFragment();
                         temporaryListFragment.setArguments(bundle);
                         FragmentUtils.switchFragment(JLTPickMaterialOutScanFragment.this, temporaryListFragment);

+ 4 - 6
app/src/main/java/com/uas/pda_smart_sa/fragment/SplitBoxFragment.java

@@ -29,9 +29,7 @@ import com.uas.pda_smart_sa.util.HttpParams;
 import com.uas.pda_smart_sa.util.VolleyRequest;
 import com.uas.pda_smart_sa.view.ClearableEditText;
 
-import java.lang.reflect.Method;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 
 
@@ -240,7 +238,7 @@ public class SplitBoxFragment extends BaseFragment implements View.OnClickListen
             case R.id.split_box_newbox_scan_iv:
                 CommonUtil.scanBarcode(mActivity, SplitBoxFragment.this, 0x22);
                 break;
-            case R.id.split_box_barcode_scan_iv:
+            case R.id.split_box_barcode_scan_iv://no use
                 CommonUtil.scanBarcode(mActivity, SplitBoxFragment.this, 0x33);
                 break;
             case R.id.split_box_confirm_btn:
@@ -256,14 +254,14 @@ public class SplitBoxFragment extends BaseFragment implements View.OnClickListen
         }
 
         String scanResult = CommonUtil.getScanResult(data);
-        if (requestCode == 0x11) {
+        if (requestCode == 0x11) {//箱号
             mBoxEditText.setText(scanResult);
             mNewboxEditText.requestFocus();
-        } else if (requestCode == 0x22) {
+        } else if (requestCode == 0x22) {//新箱号
             mNewboxEditText.setText(scanResult);
             mNewboxEditText.setSelection(scanResult.length());
             getBoxMsg();
-        } else if (requestCode == 0x33) {
+        } else if (requestCode == 0x33) {//数量
             mBarcodeEditText.setText(scanResult);
             mBarcodeEditText.setSelection(scanResult.length());
             transferBarcode();

+ 9 - 9
app/src/main/java/com/uas/pda_smart_sa/fragment/StorageOutFilterListFragment.java

@@ -32,13 +32,11 @@ import com.bin.david.form.listener.OnColumnClickListener;
 import com.bin.david.form.listener.OnColumnItemClickListener;
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.BaseViewHolder;
-import com.scwang.smartrefresh.layout.SmartRefreshLayout;
 import com.scwang.smartrefresh.layout.api.RefreshLayout;
 import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener;
 import com.scwang.smartrefresh.layout.listener.OnRefreshListener;
 import com.uas.pda_smart_sa.R;
 import com.uas.pda_smart_sa.activity.FunctionActivity;
-import com.uas.pda_smart_sa.adapter.StorageOutTodoListFragment;
 import com.uas.pda_smart_sa.bean.JLTStorageInBean;
 import com.uas.pda_smart_sa.global.GloableParams;
 import com.uas.pda_smart_sa.listener.MyEditorActionListener;
@@ -99,6 +97,7 @@ public class StorageOutFilterListFragment extends BaseFragment implements OnColu
         mSearchCet.setHint("搜索单号/客户/仓库名称");
         mMineCheckBox = root.findViewById(R.id.pda_wms_in_filter_mine_cb);
         mSearchButton = root.findViewById(R.id.common_search_btn);
+        //no use
         mMultipleTv = root.findViewById(R.id.pda_wms_in_filter_list_multiple_tv);
         mSearchCet.postDelayed(new Runnable() {
             @Override
@@ -128,15 +127,15 @@ public class StorageOutFilterListFragment extends BaseFragment implements OnColu
                         }
                     }
                 });
-        mCheckColumn.setFixed(true);
+        mCheckColumn.setFixed(true);//列固定
         mPosColumn = new Column<Long>("序号", "POS");
-        mPosColumn.setFixed(true);
+        mPosColumn.setFixed(true);//列固定
         mNumColumn = new Column<String>("单号", "PI_INOUTNO");
         mNumColumn.setFixed(true);
         mClassColumn = new Column<String>("类型", "PI_CLASS");
         mPdaStatusColumn = new Column<String>("拣货状态", "PI_PDASTATUS");
         mSupplierColumn = new Column<String>("客户", "PI_TITLE");
-        mWhcodeColumn = new Column<String>("仓库编号", "PI_WHCODE");
+        mWhcodeColumn = new Column<String>("仓库编号", "PI_WHCODE");//no use
         mWhcodeDesColumn = new Column<String>("仓库名称", "PI_WHNAME");
 
         mMenuList = new ArrayList<>();
@@ -147,7 +146,7 @@ public class StorageOutFilterListFragment extends BaseFragment implements OnColu
     @Override
     protected void initEvents() {
         mMoreButton.setOnClickListener(this);
-
+        //no use
         mMultipleTv.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
@@ -204,7 +203,7 @@ public class StorageOutFilterListFragment extends BaseFragment implements OnColu
         mClassColumn.setOnColumnItemClickListener(this);
         mPdaStatusColumn.setOnColumnItemClickListener(this);
         mSupplierColumn.setOnColumnItemClickListener(this);
-        mWhcodeColumn.setOnColumnItemClickListener(this);
+        mWhcodeColumn.setOnColumnItemClickListener(this);//no use
         mWhcodeDesColumn.setOnColumnItemClickListener(this);
 
         mRefreshLayout.setOnRefreshListener(new OnRefreshListener() {
@@ -421,7 +420,8 @@ public class StorageOutFilterListFragment extends BaseFragment implements OnColu
             }
         });
     }
-
+    //no use
+    @Deprecated
     private void multipleCollect() {
         StringBuffer pi_inoutno = new StringBuffer("");
         StringBuffer pi_id = new StringBuffer("");
@@ -453,7 +453,7 @@ public class StorageOutFilterListFragment extends BaseFragment implements OnColu
 
         FragmentUtils.switchFragment(StorageOutFilterListFragment.this, outScanFragment);
     }
-
+    //列表ItemClick事件
     @Override
     public void onClick(Column<String> column, String value, String s, int position) {
         rowClickEvent(position);

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

@@ -437,7 +437,7 @@
                         android:layout_weight="1" />
                 </LinearLayout>
             </LinearLayout>
-
+            <!--no use-->
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
@@ -506,7 +506,8 @@
                     android:gravity="center_vertical"
                     android:orientation="vertical"
                     android:paddingLeft="6dp"
-                    android:visibility="invisible">
+                    android:visibility="invisible"
+                    tools:visibility="visible">
 
                     <TextView
                         android:layout_width="wrap_content"