فهرست منبع

完工品入库,新增页面回退页面错误的bug

RaoMeng 6 سال پیش
والد
کامیت
f45015bdbc

+ 4 - 2
app/src/main/java/com/uas/pda_smart_sa/fragment/MaterialInCollectFragment.java

@@ -153,7 +153,9 @@ public class MaterialInCollectFragment extends BaseFragment implements View.OnCl
         mContinuousCheckBox = (CheckBox) root.findViewById(R.id.material_in_collect_continuous_cb);
 
         mBarcodeEditText.requestFocus();
-        mCollectType = SharedPreUtil.getString(mActivity, Constants.FLAG.MATERIAL_IN_COLLECT_TYPE, "barcode");
+        mCollectType = "package";
+
+        /*mCollectType = SharedPreUtil.getString(mActivity, Constants.FLAG.MATERIAL_IN_COLLECT_TYPE, "barcode");
 
         if (mCollectType != null) {
             if (mCollectType.equals("barcode")) {
@@ -163,7 +165,7 @@ public class MaterialInCollectFragment extends BaseFragment implements View.OnCl
                 mBarcodeEditText.setHint(R.string.please_collect_box);
                 mTypeTextView.setText("箱号");
             }
-        }
+        }*/
 
         //设置页面展示
         setPageDisplay();

+ 1 - 0
app/src/main/java/com/uas/pda_smart_sa/fragment/StorageInAddDetailFragment.java

@@ -220,6 +220,7 @@ public class StorageInAddDetailFragment extends BaseFragment implements View.OnC
                 closeMenuPopupWindow();
                 if (mWhichPage == PAGE_FUNCTION_ACTIVITY || mWhichPage == PAGE_STORAGE_IN_ADD_FINISH) {
                     if (mOnStorageInAddListener != null) {
+                        getActivity().getSupportFragmentManager().popBackStack();
                         mOnStorageInAddListener.onStorageInAdd();
                     }
                 } else if (mWhichPage == PAGE_STORAGE_IN_ADD || mWhichPage == PAGE_STORAGE_IN_LIST) {

+ 1 - 0
app/src/main/java/com/uas/pda_smart_sa/fragment/StorageInAddFragment.java

@@ -189,6 +189,7 @@ public class StorageInAddFragment extends BaseFragment implements View.OnClickLi
                                 String pi_invostatus = FastjsonUtil.getText(dataObject, "pi_invostatus");
 
                                 if (mOnFinishListener != null) {
+                                    getActivity().getSupportFragmentManager().popBackStack();
                                     mOnFinishListener.onFinish(type, mwhcode, supplier, pi_id, pi_inoutno, pi_status, pi_invostatus);
                                 } else {
                                     Fragment fragment = new StorageInAddDetailFragment();

+ 4 - 7
app/src/main/java/com/uas/pda_smart_sa/fragment/WHCheckMakeMaterialFragment.java

@@ -27,6 +27,7 @@ import com.uas.pda_smart_sa.adapter.WHCheckMakeMaterialListAdapter;
 import com.uas.pda_smart_sa.bean.WHMakeMaterialDetail;
 import com.uas.pda_smart_sa.bean.WHMakeMaterialProduct;
 import com.uas.pda_smart_sa.global.GloableParams;
+import com.uas.pda_smart_sa.listener.MyEditorActionListener;
 import com.uas.pda_smart_sa.tools.DataSourceManager;
 import com.uas.pda_smart_sa.tools.GsonUtil;
 import com.uas.pda_smart_sa.tools.VolleyUtil;
@@ -92,14 +93,10 @@ public class WHCheckMakeMaterialFragment extends BaseFragment implements View.On
     protected void initEvents() {
         btnSearch.setOnClickListener(this);
         lvDetail.setOnItemClickListener(this);
-        etProdcode.setOnKeyListener(new View.OnKeyListener() {
+        CommonUtil.setEditorActionListener(etProdcode, new MyEditorActionListener() {
             @Override
-            public boolean onKey(View v, int keyCode, KeyEvent event) {
-                if (keyCode == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_UP) {
-                    disposeOnClickEnter();
-                    return true;
-                }
-                return false;
+            public void MyEditorAction(String text, int actionId, KeyEvent event) {
+                disposeOnClickEnter();
             }
         });
 

+ 4 - 3
app/src/main/java/com/uas/pda_smart_sa/fragment/WHTransferLocationFragment.java

@@ -298,11 +298,12 @@ public class WHTransferLocationFragment extends BaseFragment implements Compound
                 boolean success = resultObject.optBoolean("success");
                 if (success) {
                     CommonUtil.showNotice(getString(R.string.notice_success_whtransfer), mActivity);
+                    clearAll();
 
-                    for (int i = 0; i < gridData.size(); i++) {
+                    /*for (int i = 0; i < gridData.size(); i++) {
 //                        gridData.get(i).setBAR_LOCATION();
                     }
-
+*/
                 } else {
                     CommonUtil.showNotice(getString(R.string.notice_fail_whtransfer), mActivity);
                 }
@@ -323,7 +324,7 @@ public class WHTransferLocationFragment extends BaseFragment implements Compound
     //清空所有数据
     private void clearAll() {
         //清空gridData数据
-        gridData.removeAll(gridData);
+        gridData.clear();
         notifyDataChange();
         //清空输入框数据
         etWhcode.setText("");

+ 1 - 1
app/src/main/java/com/uas/pda_smart_sa/tools/VolleyUtil.java

@@ -334,7 +334,7 @@ public class VolleyUtil {
         getVolleyUtil();
         context = pContext;
         requestType = pRequestType;
-        pUrl = pUrl + "?pr_code" + pProcode + "&wh_code=" + pWhcode;
+        pUrl = pUrl + "?pr_code=" + pProcode + "&wh_code=" + pWhcode;
         Log.e("VOLLEYURL", pUrl);
         stringRequest = new StringRequest(Request.Method.GET, pUrl, stringListener, errorListener) {
             @Override

+ 2 - 2
app/src/main/res/layout/fragment_material_in_collect.xml

@@ -75,7 +75,7 @@
                     android:drawablePadding="5dp"
                     android:gravity="center"
                     android:padding="10dp"
-                    android:text="条码"
+                    android:text="箱号"
                     android:textColor="@color/body_text_1"
                     android:textSize="16sp" />
 
@@ -91,7 +91,7 @@
                         android:layout_weight="1"
                         android:focusable="true"
                         android:focusableInTouchMode="true"
-                        android:hint="@string/please_collect_barcode"
+                        android:hint="@string/please_collect_box"
                         android:imeOptions="actionSend"
                         android:textColor="@color/black" />
 

+ 11 - 8
app/src/main/res/layout/fragment_whtransfer_location.xml

@@ -63,7 +63,8 @@
                     android:id="@+id/btn_confirm"
                     style="@style/PopWinButtonStyle"
                     android:layout_width="@dimen/width_64"
-                    android:text="@string/confirm" />
+                    android:text="@string/confirm"
+                    android:visibility="gone" />
             </TableRow>
             <!--新储位-->
             <TableRow style="@style/PopUpperLayoutStyle">
@@ -73,17 +74,19 @@
                     style="@style/PopWinEditTextStyle"
                     android:hint="@string/hint_newwhcode_whtransfer"
                     android:imeOptions="actionNone" />
-
-                <TextView
-                    android:id="@+id/btn_transfer"
-                    style="@style/PopWinButtonStyle"
-                    android:layout_width="@dimen/width_64"
-                    android:text="@string/btn_transform" />
             </TableRow>
         </TableLayout>
     </ScrollView>
     <!--3:List-->
     <ListView
         android:id="@+id/lv_data"
-        style="@style/CardWhiteSytle_fillheight" />
+        style="@style/CardWhiteSytle_fillheight"
+        android:layout_height="0dp"
+        android:layout_weight="1" />
+
+    <TextView
+        android:id="@+id/btn_transfer"
+        style="@style/ButtonStyle"
+        android:layout_margin="12dp"
+        android:text="@string/btn_transform" />
 </LinearLayout>