Bläddra i källkod

单据入库确定按钮接口更换,输入框逻辑调整
入库扫描--料盘信息改成采集信息 代采、采集唯一码
入库中条码信息采集 放到 仓库管理中 logo采用盘点作业的
仓库管理去掉 拆批合批、盘点作业储位转移
入库扫描界面保存时 数量不可以为空

ChengJH 2 år sedan
förälder
incheckning
ed1b7ecdb2

+ 14 - 6
app/src/main/java/com/uas/uas_mes_standard/fragment/IndexWareHouseContentFragment.java

@@ -15,6 +15,7 @@ import com.uas.uas_mes_standard.global.GloableParams;
 import com.uas.uas_mes_standard.tools.DataSourceManager;
 import com.uas.uas_mes_standard.util.CommonUtil;
 import com.uas.uas_mes_standard.util.Constants;
+import com.uas.uas_mes_standard.util.FragmentUtils;
 
 import java.util.List;
 import java.util.Map;
@@ -26,7 +27,7 @@ public class IndexWareHouseContentFragment extends BaseFragment implements Adapt
     GridView gridView;
     List<Map<String, Object>> gridItemList;
     private boolean isShop;
-
+    private Fragment mFragment;
     @Override
     protected int getLayout() {
         return R.layout.fragment_index_storagemanager;
@@ -71,6 +72,7 @@ public class IndexWareHouseContentFragment extends BaseFragment implements Adapt
     public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
         String gridName = (String) gridItemList.get(position).get(DataSourceManager.KEY_GRID_ITEMNAME);
         Fragment fragment;
+        mFragment = null;
         if (isShop) {//车间
             //条码数量修改
             if (GloableParams.GRIDNAME_MODIFY_QUANTITY.equals(gridName)) {
@@ -121,11 +123,14 @@ 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 InventoryBillFragment();
-                    getFragmentManager().beginTransaction().addToBackStack(null)
-                            .replace(R.id.container_function_fragment, fragment).commit();
+//                //盘点作业
+//                case GloableParams.GRIDNAME_WORK_INVENTORY:
+//                    fragment = new InventoryBillFragment();
+//                    getFragmentManager().beginTransaction().addToBackStack(null)
+//                            .replace(R.id.container_function_fragment, fragment).commit();
+//                    break;
+                case GloableParams.MENU_STORAGE_BARCODE_INFO_COLLECT:
+                    mFragment = new BarcodeInfoCollectFragment();
                     break;
                     //条码数量修改
                 case GloableParams.GRIDNAME_MODIFY_QUANTITY:
@@ -140,6 +145,9 @@ public class IndexWareHouseContentFragment extends BaseFragment implements Adapt
                             .replace(R.id.container_function_fragment, fragment).commit();
                     break;
             }
+            if (mFragment != null) {
+                FragmentUtils.switchFragment(IndexWareHouseContentFragment.this, mFragment);
+            }
         }
     }
 

+ 4 - 0
app/src/main/java/com/uas/uas_mes_standard/fragment/JLTStorageInBarcodeFragment.java

@@ -765,6 +765,10 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
             CommonUtil.toastNoRepeat(mActivity, "条码号不可为空");
             return;
         }
+        if (jlt_edit_qtys.isEmpty()){
+            CommonUtil.toastNoRepeat(mActivity, "数量不可为空");
+            return;
+        }
         JSONObject obj = new JSONObject();
         obj.put("LOCATION", mLotEditTexts);
         obj.put("PRODCODE", prodcode);

+ 68 - 49
app/src/main/java/com/uas/uas_mes_standard/fragment/MaterialInCollectFragment.java

@@ -13,7 +13,6 @@ import android.text.Editable;
 import android.text.TextUtils;
 import android.text.TextWatcher;
 import android.text.format.DateFormat;
-import android.util.Log;
 import android.view.KeyEvent;
 import android.view.View;
 import android.view.inputmethod.EditorInfo;
@@ -231,7 +230,59 @@ public class MaterialInCollectFragment extends BaseFragment implements View.OnCl
             mDcTableRow.setVisibility(View.GONE);
         }
     }
-
+    private void setPageDisplays() {
+        mSetString = SharedPreUtil.getString(mActivity, Constants.FLAG.MATERIAL_IN_COLLECT_SET, null);
+        if (mSetString != null) {
+            try {
+                JSONObject setJsonObject = new JSONObject(mSetString);
+                mLotnoCheck = setJsonObject.optBoolean("lotno");
+                mDateCodeCheck = setJsonObject.optBoolean("datecode");
+                mNumCheck = setJsonObject.optBoolean("num");
+                mOldCheck = setJsonObject.optBoolean("old");
+                mLocationCheck = setJsonObject.optBoolean("location");
+                mDcCheck = setJsonObject.optBoolean("dc");
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+        } else {
+            mLotnoCheck = true;
+            mDateCodeCheck = true;
+            mNumCheck = true;
+            mOldCheck = false;
+            mLocationCheck = true;
+            mDcCheck = true;
+        }
+        if (mLotnoCheck) {
+            mLotNoTableRow.setVisibility(View.VISIBLE);
+        } else {
+            mLotNoTableRow.setVisibility(View.GONE);
+        }
+        if (mDateCodeCheck) {
+            mDateCodeTableRow.setVisibility(View.VISIBLE);
+        } else {
+            mDateCodeTableRow.setVisibility(View.GONE);
+        }
+        if (mNumCheck) {
+            mNumTableRow.setVisibility(View.VISIBLE);
+        } else {
+            mNumTableRow.setVisibility(View.GONE);
+        }
+        if (mOldCheck) {
+            mOldTableRow.setVisibility(View.VISIBLE);
+        } else {
+            mOldTableRow.setVisibility(View.GONE);
+        }
+        if (mLocationCheck) {
+            mLocationTableRow.setVisibility(View.VISIBLE);
+        } else {
+            mLocationTableRow.setVisibility(View.GONE);
+        }
+        if (mDcCheck) {
+            mDcTableRow.setVisibility(View.VISIBLE);
+        } else {
+            mDcTableRow.setVisibility(View.GONE);
+        }
+    }
     @Override
     protected void initEvents() {
         mMoreMenuButton.setOnClickListener(this);
@@ -450,7 +501,6 @@ public class MaterialInCollectFragment extends BaseFragment implements View.OnCl
      * 获取相应条码号或箱号的物料信息
      */
     private void getCodeData() {
-        Log.e("xxxxxx","进入方法");
         mBarcodeEditText.setEnabled(false);
         String barcode = mBarcodeEditText.getText().toString().trim();
         if (TextUtils.isEmpty(barcode)) {
@@ -485,32 +535,26 @@ public class MaterialInCollectFragment extends BaseFragment implements View.OnCl
             url = GloableParams.ADDRESS_INMATERIAL_GETCODEDATA + "?type=barcode&pi_id=" + mPiid
                     + "&whcode=" + URLEncoder.encode(mWhcode, "utf-8")
                     + "&code=" + URLEncoder.encode(mBarcodeEditText.getText().toString().trim(), "utf-8");
-            Log.e("xxxxxx","进入拼接1");
             if ("barcode".equals(mCollectType)) {
                 url = GloableParams.ADDRESS_INMATERIAL_GETCODEDATA + "?type=barcode&pi_id=" + mPiid
                         + "&whcode=" + URLEncoder.encode(mWhcode, "utf-8")
                         + "&code=" + URLEncoder.encode(mBarcodeEditText.getText().toString().trim(), "utf-8")
                         +"&datas="+URLEncoder.encode(datasJson, "utf-8");
-                Log.e("xxxxxx","进入拼接2");
             } else if ("package".equals(mCollectType)) {
                 url = GloableParams.ADDRESS_INMATERIAL_GETCODEDATA + "?type=package&pi_id=" + mPiid
                         + "&whcode=" + URLEncoder.encode(mWhcode, "utf-8")
                         + "&code=" + URLEncoder.encode(mBarcodeEditText.getText().toString().trim(), "utf-8")
                         +"&datas="+URLEncoder.encode(datasJson, "utf-8");
-                Log.e("xxxxxx","进入拼接3");
             }
         } catch (UnsupportedEncodingException e) {
             e.printStackTrace();
         }
         mResultTextView.setText(null);
-        Log.e("xxxxxx","展厅1");
         PdaApplication.mRequestQueue.cancelAll(TAG + "codedata");
-        Log.e("xxxxxx","展厅2");
         mStringRequest = new StringRequest(Request.Method.GET, url,
                 new Response.Listener<String>() {
                     @Override
                     public void onResponse(String s) {
-                        Log.d("materialin", s);
                         mBarcodeEditText.setEnabled(true);
                         mResultTextView.setVisibility(View.GONE);
                         try {
@@ -541,49 +585,25 @@ public class MaterialInCollectFragment extends BaseFragment implements View.OnCl
                                     }
                                 }
                             }
-                            mBarcodeEditText.requestFocus();
-                            mBarcodeEditText.setSelection(mBarcodeEditText.getText().toString().length());
-//                            if (isAllEdit()) {
-//                                confirmEvent();
-//                            } else {
-//                                    if (mNumCheck) {
-//                                        mNumEditText.requestFocus();
-//                                        if(!TextUtils.isEmpty(mNumEditText.getText().toString())){
-//                                            mNumEditText.setSelection(mNumEditText.getText().toString().length());
-//                                        }
-//
-//                                    } else if (mLotnoCheck) {
-//                                        mLotNoEditText.requestFocus();
-//                                        if(!TextUtils.isEmpty(mLotNoEditText.getText().toString())){
-//                                            mLotNoEditText.setSelection(mLotNoEditText.getText().toString().length());
-//                                        }
-//                                    } else if (mDateCodeCheck) {
-//                                        mDateCodeEditText.requestFocus();
-//                                        if(!TextUtils.isEmpty(mDateCodeEditText.getText().toString())){
-//                                            mDateCodeEditText.setSelection(mDateCodeEditText.getText().toString().length());
-//                                        }
-//                                    } else if (mOldCheck) {
-//                                        mOldEditText.requestFocus();
-//                                        if(!TextUtils.isEmpty(mOldEditText.getText().toString())){
-//                                            mOldEditText.setSelection(mOldEditText.getText().toString().length());
-//                                        }
-//                                    } else if (mLocationCheck) {
-//                                        mLocationEditText.requestFocus();
-//                                        if(!TextUtils.isEmpty(mLocationEditText.getText().toString())){
-//                                            mLocationEditText.setSelection(mLocationEditText.getText().toString().length());
-//                                        }
-//                                    } else if (mDcCheck) {
-//                                        mDcEditText.requestFocus();
-//                                        if(!TextUtils.isEmpty(mDcEditText.getText().toString())){
-//                                            mDcEditText.setSelection(mDcEditText.getText().toString().length());
-//                                        }
-//                                    }
-//                            }
+//                            mBarcodeEditText.requestFocus();
+//                            mBarcodeEditText.setSelection(mBarcodeEditText.getText().toString().length());
+                            if (mLotnoCheck){
+                                mLotNoEditText.requestFocus();
+                            }else if (mDateCodeCheck) {
+                                mDateCodeEditText.requestFocus();
+                                mDateCodeEditText.setSelection(mDateCodeEditText.getText().toString().trim().length());
+                            } else if (mLocationCheck) {
+                                mLocationEditText.requestFocus();
+                                mLocationEditText.setSelection(mLocationEditText.getText().toString().trim().length());
+                            } else if (mDcCheck) {
+                                mDcEditText.requestFocus();
+                                mDcEditText.setSelection(mDcEditText.getText().toString().trim().length());
+                            }
+
                         } catch (JSONException e) {
                             e.printStackTrace();
                         }
                         mIgnoreFocusChange = false;
-                        Log.e("xxxxxx","请求成功");
                     }
                 },
                 new Response.ErrorListener() {
@@ -596,7 +616,6 @@ public class MaterialInCollectFragment extends BaseFragment implements View.OnCl
                         mBarcodeEditText.setText(null);
                         mBarcodeEditText.requestFocus();
                         mIgnoreFocusChange = false;
-                        Log.e("xxxxxx","请求失败");
                     }
                 }) {
             @Override

+ 4 - 4
app/src/main/java/com/uas/uas_mes_standard/fragment/StorageInFragment.java

@@ -98,10 +98,10 @@ public class StorageInFragment extends BaseFragment implements View.OnClickListe
 
 
                         break;
-                    case GloableParams.MENU_STORAGE_BARCODE_INFO_COLLECT:
-                        //条码信息采集
-                        mFragment = new BarcodeInfoCollectFragment();
-                        break;
+//                    case GloableParams.MENU_STORAGE_BARCODE_INFO_COLLECT:
+//                        //条码信息采集
+//                        mFragment = new BarcodeInfoCollectFragment();
+//                        break;
                     case GloableParams.LIBRARY_COLLECTION:
 //                        mFragment = new BarcodeInfoCollectFragment();
                         CommonUtil.toastNoRepeat(mActivity, "正在开发中");

+ 18 - 9
app/src/main/java/com/uas/uas_mes_standard/global/GloableParams.java

@@ -506,7 +506,7 @@ public class GloableParams {
     private static String ADDRESSTAIL_INGETINBAR = "";
 
     //材料入库确认采集
-    private static final String ADDRESSTAIL_SAVE_BARCODE = "/api/inMaterial/saveBarcodeByParse.action";
+    private static final String ADDRESSTAIL_SAVE_BARCODE = "/api/pda/inMaterial/saveBarcodeByParse.action";
     //材料入库已采集列表
     private static final String ADDRESSTAIL_HAVE_SUBMIT_LIST = "/api/pda/common/getHaveSubmitList.action";
     private static final String ADDRESSTAIL_HAVE_SUBMIT_LIST_DEAL = "/api/pda/outMaterial/getHaveSubmitListDeal.action";
@@ -762,14 +762,24 @@ public class GloableParams {
     public static final String GRIDNAME_STORAGE_TRANSFER = "储位转移";
     public static final String GRIDNAME_STOCK_BARCODE = "补贴库存条码";
     public static final String GRIDNAME_WORK_INVENTORY = "盘点作业";
+    public static final String MENU_STORAGE_BARCODE_INFO_COLLECT = "条码信息采集";
     public static final String GRIDNAME_MODIFY_QUANTITY = "条码数量修改";
     public static final String GRIDNAME_BOM_CHECK = "BOM校验";
-    public static final String[] storageGridNames = {GRIDNAME_GOOD_SEARCH, GRIDNAME_BATCH_OPRATION,
-            GRIDNAME_STORAGE_TRANSFER, GRIDNAME_MODIFY_QUANTITY, GRIDNAME_WORK_INVENTORY, GRIDNAME_BOM_CHECK};
-    public static final int[] storageGridImgs = {R.drawable.storage_good_search,
-            R.drawable.storage_bach_operation, R.drawable.storage_transfer,
+    public static final String[] storageGridNames = {
+            GRIDNAME_GOOD_SEARCH,
+//            GRIDNAME_BATCH_OPRATION,
+//            GRIDNAME_STORAGE_TRANSFER,
+            GRIDNAME_MODIFY_QUANTITY,
+//            GRIDNAME_WORK_INVENTORY,
+            MENU_STORAGE_BARCODE_INFO_COLLECT,
+            GRIDNAME_BOM_CHECK};
+    public static final int[] storageGridImgs = {
+            R.drawable.storage_good_search,
+//            R.drawable.storage_bach_operation,
+//            R.drawable.storage_transfer,
             R.drawable.storage_work_inventory,
-            R.drawable.ic_modify_quantity, R.drawable.storage_msd_manager};
+            R.drawable.ic_modify_quantity,
+            R.drawable.storage_msd_manager};
     //DETAIL:搜索备料单号,下拉列表
     public static final String SPINNER_PREPARE_SEARCH = "搜索备料单号";
     public static final String SPINNER_MAKECODE_SEARCH = "搜索制造单号";
@@ -813,7 +823,6 @@ public class GloableParams {
     public static final String MENU_STORAGE_PRODUCT_STORAGE_IN = "完工品入库";
     public static final String MENU_STORAGE_RANDOM_CHECK = "抽查校验";
     public static final String MENU_STORAGE_BARCODE_IN = "条码入库";
-    public static final String MENU_STORAGE_BARCODE_INFO_COLLECT = "条码信息采集";
     public static final String LIBRARY_COLLECTION="入库采集";
 
     public static final String[] storageInMenuNames = {
@@ -824,7 +833,7 @@ public class GloableParams {
 //            MENU_STORAGE_PRODUCT_STORAGE_IN,
 //            MENU_STORAGE_RANDOM_CHECK,
             MENU_STORAGE_BARCODE_IN,
-            MENU_STORAGE_BARCODE_INFO_COLLECT,
+//            MENU_STORAGE_BARCODE_INFO_COLLECT,
 //            LIBRARY_COLLECTION
     };
     public static final int[] storageInMenuImgs = {
@@ -835,7 +844,7 @@ public class GloableParams {
 //            R.drawable.ic_storage_finish_in,
 //            R.drawable.ic_storage_random_check,
             R.drawable.ic_storage_barcode_in,
-            R.drawable.ic_barcode_info_collect,
+//            R.drawable.ic_barcode_info_collect,
 //            R.drawable.ic_storage_iqc
     };
 

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

@@ -95,6 +95,7 @@
         android:layout_marginBottom="10dp">
 
         <TextView
+            android:visibility="gone"
             android:id="@+id/iocout_material_multiple_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"

+ 7 - 7
app/src/main/res/layout/fragment_jlt_storage_in_barcode.xml

@@ -29,7 +29,7 @@
             android:gravity="center"
             android:layout_gravity="center"
             android:id="@+id/jlt_check_ok"
-            android:text="选中"
+            android:text="采集唯一码"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content">
         </CheckBox>
@@ -389,7 +389,7 @@
                     android:background="@drawable/selector_radio_bg"
                     android:button="@null"
                     android:gravity="center"
-                    android:text="料盘信息"
+                    android:text="采集信息"
                     android:textColor="@color/selector_radio_text_color" />
 
                 <RadioButton
@@ -401,7 +401,7 @@
                     android:button="@null"
                     android:checked="true"
                     android:gravity="center"
-                    android:text="库位提示"
+                    android:text="待采提示"
                     android:textColor="@color/selector_radio_text_color" />
             </RadioGroup>
             <android.support.v7.widget.RecyclerView
@@ -444,7 +444,7 @@
                         android:layout_height="match_parent"
                         android:gravity="center"
                         android:minWidth="60dp"
-                        android:text="DataeCode"
+                        android:text="日期"
                         android:textColor="@color/body_text_1"
                         android:textSize="16sp" />
 
@@ -453,7 +453,7 @@
                         style="@style/EditTextStyle"
                         android:layout_width="0dp"
                         android:layout_weight="1"
-                        android:hint="请输入DataeCode" />
+                        android:hint="请输入日期" />
                     <ImageView
                         android:id="@+id/jlt_storage_in_barcode_date_iv"
                         android:layout_width="wrap_content"
@@ -474,7 +474,7 @@
                         android:layout_height="match_parent"
                         android:gravity="center"
                         android:minWidth="60dp"
-                        android:text="DC"
+                        android:text="字符"
                         android:textColor="@color/body_text_1"
                         android:textSize="16sp" />
 
@@ -483,7 +483,7 @@
                         style="@style/EditTextStyle"
                         android:layout_width="0dp"
                         android:layout_weight="1"
-                        android:hint="请输入DC" />
+                        android:hint="请输入字符" />
 
                 </LinearLayout>
                 <LinearLayout

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

@@ -76,6 +76,5 @@
         android:layout_marginRight="10dp"
         android:background="@color/transparent"
         android:text="单据过账"
-        android:textSize="@dimen/app_text_size_body_2"
-        android:visibility="gone"/>
+        android:textSize="@dimen/app_text_size_body_2" />
 </LinearLayout>