Bladeren bron

吉利通演示版本

RaoMeng 6 jaren geleden
bovenliggende
commit
2e847707d6

+ 10 - 7
app/src/main/java/com/uas/jlt_storage/fragment/JLTPickMaterialOutBoxFragment.java

@@ -96,12 +96,12 @@ public class JLTPickMaterialOutBoxFragment extends BaseFragment implements JLTPi
                 .setShowYSequence(false)
                 .setShowTableTitle(false)
                 .setFixedTitle(true)
-                .setVerticalPadding(CommonUtil.dip2px(mActivity,8))
-                .setColumnTitleVerticalPadding(CommonUtil.dip2px(mActivity,8))
-                .setHorizontalPadding(CommonUtil.dip2px(mActivity,10))
-                .setSequenceHorizontalPadding(CommonUtil.dip2px(mActivity,10))
-                .setColumnTitleHorizontalPadding(CommonUtil.dip2px(mActivity,10))
-                .setColumnTitleStyle(new FontStyle(CommonUtil.sp2px(mActivity,15), Color.parseColor("#000000")))
+                .setVerticalPadding(CommonUtil.dip2px(mActivity, 8))
+                .setColumnTitleVerticalPadding(CommonUtil.dip2px(mActivity, 8))
+                .setHorizontalPadding(CommonUtil.dip2px(mActivity, 10))
+                .setSequenceHorizontalPadding(CommonUtil.dip2px(mActivity, 10))
+                .setColumnTitleHorizontalPadding(CommonUtil.dip2px(mActivity, 10))
+                .setColumnTitleStyle(new FontStyle(CommonUtil.sp2px(mActivity, 15), Color.parseColor("#000000")))
                 .setContentCellBackgroundFormat(new BaseCellBackgroundFormat<CellInfo>() {
                     @Override
                     public int getBackGroundColor(CellInfo cellInfo) {
@@ -116,7 +116,7 @@ public class JLTPickMaterialOutBoxFragment extends BaseFragment implements JLTPi
         mPosColumn.setFixed(true);
         mLocationColumn = new ArrayColumn<String>("仓位", "LOCATION");
         mBoxColumn = new ArrayColumn<String>("箱号", "BOXCODE");
-        mQtyColumn = new ArrayColumn<Double>("QTY", "QTY", false,
+        mQtyColumn = new ArrayColumn<Double>("数量", "QTY", false,
                 new IFormat<Double>() {
                     @Override
                     public String format(Double aDouble) {
@@ -210,6 +210,9 @@ public class JLTPickMaterialOutBoxFragment extends BaseFragment implements JLTPi
         super.onHiddenChanged(hidden);
         if (!hidden && !this.isRemoving()) {
             ((FunctionActivity) getActivity()).setTitle("出库捡料箱号");
+            if (mBoxEditText != null) {
+                mBoxEditText.requestFocus();
+            }
             initDatas();
         }
     }

+ 1 - 1
app/src/main/java/com/uas/jlt_storage/fragment/JLTPickMaterialOutFragment.java

@@ -133,7 +133,7 @@ public class JLTPickMaterialOutFragment extends BaseFragment implements OnColumn
         mPosColumn = new ArrayColumn<Long>("序号", "RN");
         mPosColumn.setFixed(true);
         mModelColumn = new ArrayColumn<String>("型号", "PR_ORISPECCODE");
-        mQtyColumn = new ArrayColumn<Double>("QTY", "PD_OUTQTY", false,
+        mQtyColumn = new ArrayColumn<Double>("数量", "PD_OUTQTY", false,
                 new IFormat<Double>() {
                     @Override
                     public String format(Double aDouble) {

+ 36 - 29
app/src/main/java/com/uas/jlt_storage/fragment/JLTStorageInBarcodeFragment.java

@@ -312,7 +312,7 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
                                                 .setView(mMpqView)
                                                 .enableBackgroundDark(true)
                                                 .enableOutsideTouchableDissmiss(false)
-                                                .size(mMpqView.getWidth(),mMpqView.getHeight())
+                                                .size(mMpqView.getWidth(), mMpqView.getHeight())
                                                 .create();
                                         mMpqPopWindow.showAtLocation(mActivity.getWindow().getDecorView(),
                                                 Gravity.CENTER, 0, 0);
@@ -387,10 +387,10 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
                 mMpqPopWindow.dissmiss();
                 break;
             case R.id.jlt_storage_in_barcode_save_btn:
-                saveBarcode(false);
+                saveBarcode(false, true);
                 break;
             case R.id.jlt_storage_in_barcode_next_btn:
-                saveBarcode(true);
+                saveBarcode(true, true);
                 break;
             case R.id.jlt_storage_in_barcode_enclosure_et:
             case R.id.jlt_storage_in_barcode_enclosure_filter_iv:
@@ -405,7 +405,7 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
         }
     }
 
-    private void saveBarcode(boolean exist) {
+    private void saveBarcode(boolean exist, boolean checkDate) {
         if (TextUtils.isEmpty(mBarcodeParseBean.getPN()) ||
                 TextUtils.isEmpty(mBarcodeParseBean.getBRAND())) {
             CommonUtil.toastNoRepeat(mActivity, "请采集条码获取必填数据");
@@ -419,32 +419,37 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
             CommonUtil.toastNoRepeat(mActivity, "当前采集的条码不属于当前箱号");
             return;
         }*/
-        if (TextUtils.isEmpty(mBarcodeParseBean.getPR_PKG())) {
+        if (mEnclosureList.size() > 0 && TextUtils.isEmpty(mBarcodeParseBean.getPR_PKG())) {
             CommonUtil.toastNoRepeat(mActivity, "请选择封装形式");
             return;
         }
-        long limitDays = SharedPreUtil.getInt(mActivity, Constants.FLAG.JLT_VALID_DAYS_CACHE, 0);
-        int daysInterval = DateFormatUtil.getDaysInterval(mDatecodebyparse, DateFormatUtil.long2Str("yyyyMMdd")
-                , DateFormatUtil.getFormat("yyyyMMdd"));
-
-        if (limitDays != 0 && daysInterval > limitDays) {
-            new AlertDialog.Builder(mActivity)
-                    .setTitle("提示")
-                    .setMessage("入库校验 生产日期(" + mDatecodebyparse
-                            + ")+ 有效天数(" + limitDays
-                            + ")<当天,是否确认入库?")
-                    .setPositiveButton("确认", new DialogInterface.OnClickListener() {
-                        @Override
-                        public void onClick(DialogInterface dialog, int which) {
-                            confirmRequest(exist);
-                        }
-                    })
-                    .setNegativeButton("取消", new DialogInterface.OnClickListener() {
-                        @Override
-                        public void onClick(DialogInterface dialog, int which) {
-                            resetState();
-                        }
-                    }).create().show();
+
+        if (checkDate) {
+            long limitDays = SharedPreUtil.getInt(mActivity, Constants.FLAG.JLT_VALID_DAYS_CACHE, 0);
+            int daysInterval = DateFormatUtil.getDaysInterval(mDatecodebyparse, DateFormatUtil.long2Str("yyyyMMdd")
+                    , DateFormatUtil.getFormat("yyyyMMdd"));
+
+            if (limitDays != 0 && daysInterval > limitDays) {
+                new AlertDialog.Builder(mActivity)
+                        .setTitle("提示")
+                        .setMessage("入库校验 生产日期(" + mDatecodebyparse
+                                + ")+ 有效天数(" + limitDays
+                                + ")<当天,是否确认入库?")
+                        .setPositiveButton("确认", new DialogInterface.OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialog, int which) {
+                                confirmRequest(exist);
+                            }
+                        })
+                        .setNegativeButton("取消", new DialogInterface.OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialog, int which) {
+                                resetState();
+                            }
+                        }).create().show();
+            } else {
+                confirmRequest(exist);
+            }
         } else {
             confirmRequest(exist);
         }
@@ -478,7 +483,7 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
                                         @Override
                                         public void onClick(DialogInterface dialog, int which) {
                                             mPoCheckBox.setChecked(false);
-                                            saveBarcode(exist);
+                                            saveBarcode(exist, false);
                                         }
                                     }).create().show();
                             return;
@@ -542,7 +547,9 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
         if (requestCode == REQUEST_DATE) {
             try {
                 Date date = (Date) data.getSerializableExtra("extra_date");
-                mDateEditText.setText(DateFormat.format("yyyyMMdd", date));
+                String formatDate = DateFormat.format("yyyyMMdd", date).toString();
+                mDateEditText.setText(formatDate);
+                mDatecodebyparse = formatDate;
             } catch (Exception e) {
                 mDateEditText.setText("");
             }

+ 1 - 1
app/src/main/java/com/uas/jlt_storage/fragment/JLTStorageMaterialMoveFragment.java

@@ -114,7 +114,7 @@ public class JLTStorageMaterialMoveFragment extends BaseFragment implements OnCo
                         return CommonUtil.doubleFormat(aDouble);
                     }
                 });
-        mQtyColumn = new ArrayColumn<Double>("QTY", "BAR_REMAIN", false,
+        mQtyColumn = new ArrayColumn<Double>("数量", "BAR_REMAIN", false,
                 new IFormat<Double>() {
                     @Override
                     public String format(Double aDouble) {

+ 1 - 1
app/src/main/java/com/uas/jlt_storage/global/GloableParams.java

@@ -222,8 +222,8 @@ public class GloableParams {
     /**
      * 吉利通
      */
+    //获取配置
     private static final String ADDRESSTAIL_JLT_JCOMMON_GETDBSETTING = "/api/pda/jcommon/GetDBsetting.action";
-
     //入库单号模糊查询
     private static final String ADDRESSTAIL_JLT_RECEIVING_FUZZYSEARCH = "/api/pda/receiving/fuzzySearch.action";
     //入库单获取

+ 9 - 2
app/src/main/java/com/uas/jlt_storage/view/CustomPopWindow.java

@@ -167,13 +167,20 @@ public class CustomPopWindow implements PopupWindow.OnDismissListener {
 
         if (mWidth == 0 || mHeight == 0) {
             mPopupWindow.getContentView().measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
-
-            mPopupWindow.getContentView().getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
+            ViewTreeObserver viewTreeObserver = mPopupWindow.getContentView().getViewTreeObserver();
+            viewTreeObserver.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
                 @Override
                 public void onGlobalLayout() {
                     //如果外面没有设置宽高的情况下,计算宽高并赋值
                     mWidth = mPopupWindow.getContentView().getWidth();
                     mHeight = mPopupWindow.getContentView().getHeight();
+                    if (viewTreeObserver.isAlive()) {
+                        if (Build.VERSION.SDK_INT < 16) {
+                            viewTreeObserver.removeGlobalOnLayoutListener(this);
+                        } else {
+                            viewTreeObserver.removeOnGlobalLayoutListener(this);
+                        }
+                    }
                 }
             });
         }

+ 7 - 18
app/src/main/res/layout/activity_index.xml

@@ -1,12 +1,13 @@
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                xmlns:tools="http://schemas.android.com/tools"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent"
-                android:background="@color/white">
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/white">
 
     <include
         android:id="@+id/include_menuactionbar"
-        layout="@layout/actionbar"/>
+        layout="@layout/actionbar" />
+
     <RelativeLayout
         android:id="@+id/ll_content"
         android:layout_width="match_parent"
@@ -18,18 +19,6 @@
         <GridView
             android:id="@+id/grid_menu"
             style="@style/MenuGridViewStyle"
-            android:numColumns="3">
-
-        </GridView>
-
+            android:numColumns="3" />
     </RelativeLayout>
-
-    <LinearLayout
-        android:id="@+id/root_container"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:layout_alignParentBottom="true"
-        android:orientation="vertical">
-
-    </LinearLayout>
 </RelativeLayout>

+ 1 - 1
app/src/main/res/layout/fragment_jlt_storage_material_move_detail.xml

@@ -48,7 +48,7 @@
             android:layout_height="wrap_content"
             android:layout_marginLeft="10dp"
             android:checked="true"
-            android:enabled="false"
+            android:clickable="false"
             android:paddingRight="10dp"
             android:text="货架"
             android:textColor="#333333" />