Browse Source

六月反馈解决

RaoMeng 6 years ago
parent
commit
e82942f8e1

+ 1 - 1
app/src/main/java/com/uas/jlt_storage/bean/JLTBarcodeParseBean.java

@@ -20,7 +20,7 @@ public class JLTBarcodeParseBean {
     @JSONField(name = "LOTNO")
     private String LOTNO;
     @JSONField(name = "QTY")
-    private double QTY;
+    private double QTY = -1;
     @JSONField(name = "PRCODE")
     private String PRCODE;
     @JSONField(name = "ORDERCODE")

+ 1 - 1
app/src/main/java/com/uas/jlt_storage/bean/JLTBrandEntity.java

@@ -20,7 +20,7 @@ public class JLTBrandEntity extends BaseSelectEntity {
 
     private String BRAND;
     private String ORDERCODE;
-    private double QTY;
+    private double QTY = -1;
     private String DATECODE;
     private String LOTNO;
     private String OUTBOX;

+ 9 - 0
app/src/main/java/com/uas/jlt_storage/bean/JLTMaterialBean.java

@@ -23,6 +23,7 @@ public class JLTMaterialBean implements Serializable {
     private String BAR_BRAND;
     private String BAR_WHCODE;
     private String BAR_LOCATION;
+    private String BAR_OUTBOXCODE1;
     private String oldLocation;
 
     public long getPOS() {
@@ -97,6 +98,14 @@ public class JLTMaterialBean implements Serializable {
         this.BAR_LOCATION = BAR_LOCATION;
     }
 
+    public String getBAR_OUTBOXCODE1() {
+        return BAR_OUTBOXCODE1;
+    }
+
+    public void setBAR_OUTBOXCODE1(String BAR_OUTBOXCODE1) {
+        this.BAR_OUTBOXCODE1 = BAR_OUTBOXCODE1;
+    }
+
     public String getOldLocation() {
         return oldLocation;
     }

+ 102 - 36
app/src/main/java/com/uas/jlt_storage/fragment/JLTPickMaterialOutScanFragment.java

@@ -6,7 +6,9 @@ import android.content.Intent;
 import android.os.Bundle;
 import android.os.Handler;
 import android.support.v7.app.AlertDialog;
+import android.text.Editable;
 import android.text.TextUtils;
+import android.text.TextWatcher;
 import android.view.KeyEvent;
 import android.view.View;
 import android.widget.Button;
@@ -60,11 +62,12 @@ public class JLTPickMaterialOutScanFragment extends BaseFragment implements View
     private JLTPickMaterialBean mPickMaterialBean;
     private JLTBoxBean mBoxBean;
     private String mPiid, mPN, mLotno, mDatecode, mBarcode;
-    private double mQty;
+    private double mQty = -1;
     private OnCollectFinishListener mOnCollectFinishListener;
     private String mDatecodebyparse;
     private boolean mNeedPkg;
     private List<WhcodeBean> mEnclosureList;
+    private String mPKG;
 
     public void setOnCollectFinishListener(OnCollectFinishListener onCollectFinishListener) {
         mOnCollectFinishListener = onCollectFinishListener;
@@ -93,14 +96,19 @@ public class JLTPickMaterialOutScanFragment extends BaseFragment implements View
         mScanImageView = root.findViewById(R.id.jlt_pick_material_out_scan_scan_iv);
         mBarcodeEditText = root.findViewById(R.id.jlt_pick_material_out_scan_barcode_et);
         mSaveButton = root.findViewById(R.id.jlt_pick_material_out_scan_save_btn);
+        mModelEditText = root.findViewById(R.id.jlt_pick_material_out_scan_model_et);
         mNextButton = root.findViewById(R.id.jlt_pick_material_out_scan_next_btn);
         mHbTextView = root.findViewById(R.id.jlt_pick_material_out_scan_hb_tv);
         mEnclosureEditText = root.findViewById(R.id.jlt_pick_material_out_scan_enclosure_et);
         mEnclosureImageView = root.findViewById(R.id.jlt_pick_material_out_scan_enclosure_iv);
         mEnclosureTextView = root.findViewById(R.id.jlt_pick_material_out_scan_enclosure_tv);
-        mModelEditText = root.findViewById(R.id.jlt_pick_material_out_scan_model_et);
 
-        mBarcodeEditText.requestFocus();
+        mBarcodeEditText.postDelayed(new Runnable() {
+            @Override
+            public void run() {
+                mBarcodeEditText.requestFocus();
+            }
+        }, 100);
 
         mEnclosureList = new ArrayList<>();
     }
@@ -135,6 +143,10 @@ public class JLTPickMaterialOutScanFragment extends BaseFragment implements View
                 }
             }
         });
+
+        mLotEditText.addTextChangedListener(new MyTextWatcher(mLotEditText));
+        mQuantityEditText.addTextChangedListener(new MyTextWatcher(mQuantityEditText));
+        mCycleEditText.addTextChangedListener(new MyTextWatcher(mCycleEditText));
     }
 
     @Override
@@ -259,22 +271,28 @@ public class JLTPickMaterialOutScanFragment extends BaseFragment implements View
             public void onSuccess(int flag, Object o) throws Exception {
                 progressDialog.dismiss();
                 try {
+                    mBarcodeEditText.setText("");
+                    mBarcodeEditText.requestFocus();
                     String result = o.toString();
                     JSONObject resultObject = JSON.parseObject(result);
                     JSONObject dataObject = resultObject.getJSONObject("data");
                     if (dataObject != null) {
-                        mPN = FastjsonUtil.getText(dataObject, "PN");
-                        mLotno = FastjsonUtil.getText(dataObject, "LOTNO");
-                        mDatecode = FastjsonUtil.getText(dataObject, "DATECODE");
-                        mQty = FastjsonUtil.getDouble(dataObject, "QTY");
-                        mDatecodebyparse = FastjsonUtil.getText(dataObject, "DATECODEBYPARSE");
-                        mNeedPkg = FastjsonUtil.getBoolean(dataObject, "NEEDPKG");
+                        mPN = getValuableValue(FastjsonUtil.getText(dataObject, "PN"), mPN);
+                        mLotno = getValuableValue(FastjsonUtil.getText(dataObject, "LOTNO"), mLotno);
+                        mDatecode = getValuableValue(FastjsonUtil.getText(dataObject, "DATECODE"), mDatecode);
+                        mQty = TextUtils.isEmpty(FastjsonUtil.getText(dataObject, "QTY")) ? mQty : FastjsonUtil.getDouble(dataObject, "QTY");
+                        mDatecodebyparse = getValuableValue(FastjsonUtil.getText(dataObject, "DATECODEBYPARSE"), mDatecodebyparse);
+                        mNeedPkg = TextUtils.isEmpty(FastjsonUtil.getText(dataObject, "NEEDPKG")) ?
+                                mNeedPkg : FastjsonUtil.getBoolean(dataObject, "NEEDPKG");
+                        mPKG = getValuableValue(FastjsonUtil.getText(dataObject, "PKG"), mPKG);
 
                         mModelEditText.setText(mPN);
                         mLotEditText.setText(mLotno);
-                        mQuantityEditText.setText(CommonUtil.doubleFormat(mQty));
+                        if (mQty != -1) {
+                            mQuantityEditText.setText(CommonUtil.doubleFormat(mQty));
+                        }
                         mCycleEditText.setText(mDatecode);
-                        mEnclosureEditText.setText(FastjsonUtil.getText(dataObject, "PKG"));
+                        mEnclosureEditText.setText(mPKG);
 
                         String Multiple = mMultipleEditText.getText().toString().trim();
                         int mulInt = 1;
@@ -284,9 +302,10 @@ public class JLTPickMaterialOutScanFragment extends BaseFragment implements View
                             if (mNeedPkg) {
                                 if ((mQty * mulInt) == mPickMaterialBean.getPD_RESTQTY() && !TextUtils.isEmpty(enclosure)) {
                                     confirmOut(false);
-                                } else {
-                                    mEnclosureEditText.requestFocus();
                                 }
+//                                else {
+//                                    mEnclosureEditText.requestFocus();
+//                                }
                             } else if ((mQty * mulInt) == mPickMaterialBean.getPD_RESTQTY()) {
                                 confirmOut(false);
                             }
@@ -311,6 +330,10 @@ public class JLTPickMaterialOutScanFragment extends BaseFragment implements View
         });
     }
 
+    private String getValuableValue(String netValue, String oldValue) {
+        return TextUtils.isEmpty(netValue) ? oldValue : netValue;
+    }
+
     private void analysisCache(String materialCache, int materialOrder) {
         JSONObject resultObject = JSON.parseObject(materialCache);
         JSONObject dataObject = resultObject.getJSONObject("data");
@@ -429,29 +452,33 @@ public class JLTPickMaterialOutScanFragment extends BaseFragment implements View
             return;
         }
 
-        long limitDays = mBoxBean.getCU_PRINT_LIMITEDDATE();
-        int daysInterval = DateFormatUtil.getDaysInterval(mDatecodebyparse, DateFormatUtil.long2Str("yyyyMMdd")
-                , DateFormatUtil.getFormat("yyyyMMdd"));
-
-        if (daysInterval > limitDays) {
-            int finalMulInt = mulInt;
-            new AlertDialog.Builder(mActivity)
-                    .setTitle("提示")
-                    .setMessage("捡料条码 生产日期(" + mDatecodebyparse
-                            + ")+ 有效天数(" + limitDays
-                            + ")<当天,是否确认捡料?")
-                    .setPositiveButton("确认", new DialogInterface.OnClickListener() {
-                        @Override
-                        public void onClick(DialogInterface dialog, int which) {
-                            confirmRequest(exist, finalMulInt, zxbzs, enclosure);
-                        }
-                    })
-                    .setNegativeButton("取消", new DialogInterface.OnClickListener() {
-                        @Override
-                        public void onClick(DialogInterface dialog, int which) {
-                            resetState();
-                        }
-                    }).create().show();
+        if (!TextUtils.isEmpty(mDatecodebyparse)) {
+            long limitDays = mBoxBean.getCU_PRINT_LIMITEDDATE();
+            int daysInterval = DateFormatUtil.getDaysInterval(mDatecodebyparse, DateFormatUtil.long2Str("yyyyMMdd")
+                    , DateFormatUtil.getFormat("yyyyMMdd"));
+
+            if (daysInterval > limitDays) {
+                int finalMulInt = mulInt;
+                new AlertDialog.Builder(mActivity)
+                        .setTitle("提示")
+                        .setMessage("捡料条码 生产日期(" + mDatecodebyparse
+                                + ")+ 有效天数(" + limitDays
+                                + ")<当天,是否确认捡料?")
+                        .setPositiveButton("确认", new DialogInterface.OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialog, int which) {
+                                confirmRequest(exist, finalMulInt, zxbzs, enclosure);
+                            }
+                        })
+                        .setNegativeButton("取消", new DialogInterface.OnClickListener() {
+                            @Override
+                            public void onClick(DialogInterface dialog, int which) {
+                                resetState();
+                            }
+                        }).create().show();
+            } else {
+                confirmRequest(exist, mulInt, zxbzs, enclosure);
+            }
         } else {
             confirmRequest(exist, mulInt, zxbzs, enclosure);
         }
@@ -595,4 +622,43 @@ public class JLTPickMaterialOutScanFragment extends BaseFragment implements View
     public interface OnCollectFinishListener {
         void onCollectFinish();
     }
+
+    private class MyTextWatcher implements TextWatcher {
+        private TextView view;
+
+        public MyTextWatcher(TextView view) {
+            this.view = view;
+        }
+
+        @Override
+        public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+
+        }
+
+        @Override
+        public void onTextChanged(CharSequence s, int start, int before, int count) {
+
+        }
+
+        @Override
+        public void afterTextChanged(Editable s) {
+            String text = s.toString().trim();
+            switch (view.getId()) {
+                case R.id.jlt_pick_material_out_scan_lot_et:
+                    mLotno = text;
+                    break;
+                case R.id.jlt_pick_material_out_scan_quantity_et:
+                    try {
+                        mQty = Double.parseDouble(text);
+                    } catch (Exception e) {
+
+                    }
+                    break;
+                case R.id.jlt_pick_material_out_scan_cycle_et:
+                    mDatecode = text;
+                    break;
+            }
+        }
+    }
+
 }

+ 9 - 16
app/src/main/java/com/uas/jlt_storage/fragment/JLTStockInquiryLocationFragment.java

@@ -24,6 +24,7 @@ import com.uas.jlt_storage.R;
 import com.uas.jlt_storage.activity.FunctionActivity;
 import com.uas.jlt_storage.bean.JLTStorageModelBean;
 import com.uas.jlt_storage.global.GloableParams;
+import com.uas.jlt_storage.listener.MyEditorActionListener;
 import com.uas.jlt_storage.tools.SharedPreUtil;
 import com.uas.jlt_storage.util.CommonUtil;
 import com.uas.jlt_storage.util.Constants;
@@ -41,8 +42,7 @@ import java.util.List;
  * Desc: 库存查询-按仓位
  */
 public class JLTStockInquiryLocationFragment extends BaseFragment {
-    private ClearableEditText mWhcodeEditText, mLocationEditText;
-    private Button mConfirmButton;
+    private ClearableEditText mLocationEditText;
     private TextView mModelTextView, mQuantityTextView, mBoxTextView;
     private List<JLTStorageModelBean> mStorageModelBeans;
     private SmartTable mSmartTable;
@@ -59,10 +59,8 @@ public class JLTStockInquiryLocationFragment extends BaseFragment {
     protected void initViews() {
         ((FunctionActivity) getActivity()).setTitle("库存查询-按仓位");
 
-        mWhcodeEditText = root.findViewById(R.id.jlt_stock_inquiry_location_whcode_et);
-        mWhcodeEditText.requestFocus();
         mLocationEditText = root.findViewById(R.id.jlt_stock_inquiry_location_location_et);
-        mConfirmButton = root.findViewById(R.id.jlt_stock_inquiry_location_confirm_btn);
+        mLocationEditText.requestFocus();
         mModelTextView = root.findViewById(R.id.jlt_stock_inquiry_location_model_tv);
         mQuantityTextView = root.findViewById(R.id.jlt_stock_inquiry_location_quantity_tv);
         mBoxTextView = root.findViewById(R.id.jlt_stock_inquiry_location_box_tv);
@@ -81,7 +79,7 @@ public class JLTStockInquiryLocationFragment extends BaseFragment {
                 .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")))
+                .setColumnTitleStyle(new FontStyle(CommonUtil.sp2px(mActivity, 15), Color.parseColor("#000000")))
                 .setContentCellBackgroundFormat(new BaseCellBackgroundFormat<CellInfo>() {
                     @Override
                     public int getBackGroundColor(CellInfo cellInfo) {
@@ -102,9 +100,9 @@ public class JLTStockInquiryLocationFragment extends BaseFragment {
 
     @Override
     protected void initEvents() {
-        mConfirmButton.setOnClickListener(new View.OnClickListener() {
+        CommonUtil.setEditorActionListener(mLocationEditText, new MyEditorActionListener() {
             @Override
-            public void onClick(View v) {
+            public void MyEditorAction(String text, int actionId, KeyEvent event) {
                 searchByLocation();
             }
         });
@@ -112,18 +110,14 @@ public class JLTStockInquiryLocationFragment extends BaseFragment {
 
     @Override
     protected void initDatas() {
-        String whcodeCache = SharedPreUtil.getString(mActivity, Constants.FLAG.DEFAULT_WAREHOUSE_CACHE + CommonUtil.getUserName(mActivity), "");
-        if (!TextUtils.isEmpty(whcodeCache)) {
-            mWhcodeEditText.setText(whcodeCache);
-            mWhcodeEditText.setSelection(whcodeCache.length());
-        }
+
     }
 
     private void searchByLocation() {
         String location = mLocationEditText.getText().toString().trim();
-        String whcode = mWhcodeEditText.getText().toString().trim();
 
-        if (TextUtils.isEmpty(location) && TextUtils.isEmpty(whcode)) {
+        if (TextUtils.isEmpty(location)) {
+            CommonUtil.toastNoRepeat(mActivity, "仓位/箱号为必填项");
             return;
         }
 
@@ -133,7 +127,6 @@ public class JLTStockInquiryLocationFragment extends BaseFragment {
                 .url(GloableParams.ADDRESS_JLT_BARONHANDQUERY_SEARCHBYLOCATION)
                 .method(Request.Method.GET)
                 .tag(TAG + "searchbylocation")
-                .addParam("whcode", whcode)
                 .addParam("location", location)
                 .build(), new HttpCallback() {
             @Override

+ 12 - 30
app/src/main/java/com/uas/jlt_storage/fragment/JLTStockInquiryModelFragment.java

@@ -24,6 +24,7 @@ import com.uas.jlt_storage.R;
 import com.uas.jlt_storage.activity.FunctionActivity;
 import com.uas.jlt_storage.bean.JLTStorageModelBean;
 import com.uas.jlt_storage.global.GloableParams;
+import com.uas.jlt_storage.listener.MyEditorActionListener;
 import com.uas.jlt_storage.tools.SharedPreUtil;
 import com.uas.jlt_storage.util.CommonUtil;
 import com.uas.jlt_storage.util.Constants;
@@ -41,13 +42,12 @@ import java.util.List;
  * Desc: 库存查询-按型号
  */
 public class JLTStockInquiryModelFragment extends BaseFragment {
-    private ClearableEditText mModelEditText, mWhcodeEditText, mLocationEditText;
-    private Button mConfirmButton;
-    private TextView mWhcodeTextView, mLocationTextView, mQuantityTextView, mBoxTextView;
+    private ClearableEditText mModelEditText;
+    private TextView mLocationTextView, mQuantityTextView, mBoxTextView;
     private List<JLTStorageModelBean> mStorageModelBeans;
     private SmartTable mSmartTable;
     private Column<Long> mPosColumn;
-    private Column<String> mLocationColumn, mQuantityColumn, mWhcodeColumn, mWhcodeDesColumn, mBoxColumn;
+    private Column<String> mLocationColumn, mModelColumn, mQuantityColumn, mBoxColumn;
     private TableData<JLTStorageModelBean> mTableData;
 
     @Override
@@ -61,10 +61,6 @@ public class JLTStockInquiryModelFragment extends BaseFragment {
 
         mModelEditText = root.findViewById(R.id.jlt_stock_inquiry_model_model_et);
         mModelEditText.requestFocus();
-        mWhcodeEditText = root.findViewById(R.id.jlt_stock_inquiry_model_whcode_et);
-        mLocationEditText = root.findViewById(R.id.jlt_stock_inquiry_model_location_et);
-        mConfirmButton = root.findViewById(R.id.jlt_stock_inquiry_model_confirm_btn);
-        mWhcodeTextView = root.findViewById(R.id.jlt_stock_inquiry_model_whcode_tv);
         mLocationTextView = root.findViewById(R.id.jlt_stock_inquiry_model_location_tv);
         mQuantityTextView = root.findViewById(R.id.jlt_stock_inquiry_model_quantity_tv);
         mBoxTextView = root.findViewById(R.id.jlt_stock_inquiry_model_box_tv);
@@ -96,18 +92,18 @@ public class JLTStockInquiryModelFragment extends BaseFragment {
 
         mPosColumn = new Column<Long>("序号", "RN");
         mPosColumn.setFixed(true);
-        mWhcodeColumn = new Column<String>("仓库编号", "mModel");
-        mWhcodeDesColumn = new Column<String>("仓库名称", "mWhcodeDes");
         mLocationColumn = new Column<String>("仓位", "mLocation");
         mBoxColumn = new Column<String>("箱号", "mBox");
+        mModelColumn = new Column<String>("型号", "mModel");
         mQuantityColumn = new Column<String>("数量", "mQuantity");
     }
 
     @Override
     protected void initEvents() {
-        mConfirmButton.setOnClickListener(new View.OnClickListener() {
+
+        CommonUtil.setEditorActionListener(mModelEditText, new MyEditorActionListener() {
             @Override
-            public void onClick(View v) {
+            public void MyEditorAction(String text, int actionId, KeyEvent event) {
                 searchByModel();
             }
         });
@@ -115,16 +111,10 @@ public class JLTStockInquiryModelFragment extends BaseFragment {
 
     @Override
     protected void initDatas() {
-        String whcodeCache = SharedPreUtil.getString(mActivity, Constants.FLAG.DEFAULT_WAREHOUSE_CACHE + CommonUtil.getUserName(mActivity), "");
-        if (!TextUtils.isEmpty(whcodeCache)) {
-            mWhcodeEditText.setText(whcodeCache);
-            mWhcodeEditText.setSelection(whcodeCache.length());
-        }
+
     }
 
     private void searchByModel() {
-        String location = mLocationEditText.getText().toString().trim();
-        String whcode = mWhcodeEditText.getText().toString().trim();
         String model = mModelEditText.getText().toString().trim();
 
         if (TextUtils.isEmpty(model)) {
@@ -132,19 +122,12 @@ public class JLTStockInquiryModelFragment extends BaseFragment {
             return;
         }
 
-        if (TextUtils.isEmpty(location) && TextUtils.isEmpty(whcode)) {
-            CommonUtil.toastNoRepeat(mActivity, "仓库和仓位/箱号必填其中一项");
-            return;
-        }
-
         progressDialog.show();
         mStorageModelBeans.clear();
         VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
                 .url(GloableParams.ADDRESS_JLT_BARONHANDQUERY_SEARCHBYMPN)
                 .method(Request.Method.GET)
                 .tag(TAG + "searchbylocation")
-                .addParam("whcode", whcode)
-                .addParam("location", location)
                 .addParam("Mpn", model)
                 .build(), new HttpCallback() {
             @Override
@@ -164,7 +147,6 @@ public class JLTStockInquiryModelFragment extends BaseFragment {
                     double boxQuantity = FastjsonUtil.getDouble(dataObject, "BOXNUM");
                     double total = FastjsonUtil.getDouble(dataObject, "TOTALQTY");
 
-                    mWhcodeTextView.setText(CommonUtil.doubleFormat(whcodeQuantity));
                     mLocationTextView.setText(CommonUtil.doubleFormat(locationQuantity));
                     mQuantityTextView.setText(CommonUtil.doubleFormat(total));
                     mBoxTextView.setText(CommonUtil.doubleFormat(boxQuantity));
@@ -180,7 +162,7 @@ public class JLTStockInquiryModelFragment extends BaseFragment {
                                 jltStorageModelBean.setRN(i + 1);
                                 jltStorageModelBean.setLocation(FastjsonUtil.getText(modelObject, "LOCATION"));
                                 jltStorageModelBean.setBox(FastjsonUtil.getText(modelObject, "BOXCODE"));
-                                jltStorageModelBean.setModel(FastjsonUtil.getText(modelObject, "BAR_WHCODE"));
+                                jltStorageModelBean.setModel(FastjsonUtil.getText(modelObject, "MPN"));
                                 jltStorageModelBean.setWhcodeDes(FastjsonUtil.getText(modelObject, "WH_DESCRIPTION"));
                                 jltStorageModelBean.setQuantity(FastjsonUtil.getText(modelObject, "QTY"));
 
@@ -190,7 +172,7 @@ public class JLTStockInquiryModelFragment extends BaseFragment {
                     }
 
                     mTableData = new TableData<JLTStorageModelBean>("库存列表", mStorageModelBeans,
-                            mPosColumn, mWhcodeColumn, mWhcodeDesColumn, mLocationColumn, mBoxColumn, mQuantityColumn);
+                            mPosColumn, mLocationColumn, mBoxColumn, mModelColumn, mQuantityColumn);
                     mSmartTable.setTableData(mTableData);
                 } catch (Exception e) {
                     e.printStackTrace();
@@ -204,7 +186,7 @@ public class JLTStockInquiryModelFragment extends BaseFragment {
                 CommonUtil.toastNoRepeat(mActivity, failStr);
 
                 mTableData = new TableData<JLTStorageModelBean>("库存列表", mStorageModelBeans,
-                        mPosColumn, mWhcodeColumn,mWhcodeDesColumn, mLocationColumn, mBoxColumn, mQuantityColumn);
+                        mPosColumn, mLocationColumn, mBoxColumn, mModelColumn, mQuantityColumn);
                 mSmartTable.setTableData(mTableData);
             }
         });

+ 33 - 16
app/src/main/java/com/uas/jlt_storage/fragment/JLTStorageInBarcodeFragment.java

@@ -71,10 +71,10 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
     private Button mMoreButton, mSaveButton, mNextButton;
     private PopupWindow mMenuPopupWindow;
     private View mMenuView;
-    private TextView mBoxTextView;
+    private TextView mBoxTextView, mMpqEditText, mBrandEditText, mPanEditText;
     private ImageView mCalendarImageView, mScanImageView, mEnclosureFitlerIv;
     private ClearableEditText mDateEditText, mBarcodeEditText, mModelEditText, mQuantityEditText,
-            mMpqEditText, mLotEditText, mPanEditText, mPoEditText, mBrandEditText, mEnclosureEditText;
+            mLotEditText, mPoEditText, mEnclosureEditText;
     private CheckBox mPoCheckBox;
     private String mBoxNum, mPiid, mPiClass, mRealBoxNum, mDatecodebyparse;
     private JLTBarcodeParseBean mBarcodeParseBean;
@@ -218,8 +218,10 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
             public void onDataSelect(int position) {
                 mMpqSelectPop.dismiss();
                 double qty = mBarcodeParseBean.getQTY();
-                double mpq = mMpqEntities.get(position).getMPQ();
-                verifyPan(qty, mpq);
+                if (qty != -1) {
+                    double mpq = mMpqEntities.get(position).getMPQ();
+                    verifyPan(qty, mpq);
+                }
             }
         });
     }
@@ -267,6 +269,16 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
                     if (dataObject != null) {
                         JSONArray brandArray = dataObject.getJSONArray("BRANDLIST");
                         if (brandArray != null && brandArray.size() > 0) {
+                            JSONObject testBrand = brandArray.getJSONObject(0);
+                            if (TextUtils.isEmpty(mQuantityEditText.getText().toString().trim())
+                                    && TextUtils.isEmpty(FastjsonUtil.getText(testBrand, "QTY"))) {
+                                if (!TextUtils.isEmpty(FastjsonUtil.getText(testBrand, "PN"))
+                                        || !TextUtils.isEmpty(FastjsonUtil.getText(testBrand, "PKGLIST"))) {
+                                    CommonUtil.toastNoRepeat(mActivity, "请先采集数量");
+                                    return;
+                                }
+                            }
+
                             if (mBrandEntities == null) {
                                 mBrandEntities = new ArrayList<>();
                             } else {
@@ -278,7 +290,11 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
                                     JLTBrandEntity brandEntity = new JLTBrandEntity();
                                     brandEntity.setBRAND(FastjsonUtil.getText(brandObject, "BRAND"));
                                     brandEntity.setORDERCODE(FastjsonUtil.getText(brandObject, "ORDERCODE"));
-                                    brandEntity.setQTY(FastjsonUtil.getDouble(brandObject, "QTY"));
+                                    if (!TextUtils.isEmpty(FastjsonUtil.getText(brandObject, "QTY"))) {
+                                        brandEntity.setQTY(FastjsonUtil.getDouble(brandObject, "QTY"));
+                                    } else {
+                                        brandEntity.setQTY(mBarcodeParseBean.getQTY());
+                                    }
                                     brandEntity.setDATECODE(FastjsonUtil.getText(brandObject, "DATECODE"));
                                     brandEntity.setLOTNO(FastjsonUtil.getText(brandObject, "LOTNO"));
                                     brandEntity.setOUTBOX(FastjsonUtil.getText(brandObject, "OUTBOX"));
@@ -377,7 +393,9 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
         String po = mPoEditText.getText().toString().trim();
         mPoCheckBox.setChecked(!TextUtils.isEmpty(po));
         double qty = brandEntity.getQTY();
-        mQuantityEditText.setText(CommonUtil.doubleFormat(qty));
+        if (qty != -1) {
+            mQuantityEditText.setText(CommonUtil.doubleFormat(qty));
+        }
         setValuableText(mDateEditText, brandEntity.getDATECODE());
         setValuableText(mLotEditText, brandEntity.getLOTNO());
         setValuableText(mModelEditText, brandEntity.getPN());
@@ -390,12 +408,12 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
         }
 
         List<JLTPkgEntity> pkglist = brandEntity.getPKGLIST();
-        if (pkglist.size() == 1) {
-            JLTPkgEntity pkgEntity = pkglist.get(0);
+        mPkgEntities = pkglist;
+        if (mPkgEntities.size() == 1) {
+            JLTPkgEntity pkgEntity = mPkgEntities.get(0);
 
             selectMpq(qty, pkgEntity);
-        } else if (pkglist.size() > 1) {
-            mPkgEntities = pkglist;
+        } else if (mPkgEntities.size() > 1) {
             mEnclosureSelectPop.setData(mPkgEntities);
             mEnclosureSelectPop.showPopupWindow();
         }
@@ -499,12 +517,11 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
                 break;
             case R.id.jlt_storage_in_barcode_enclosure_et:
             case R.id.jlt_storage_in_barcode_enclosure_filter_iv:
-                /*if (mEnclosureList.size() == 0) {
+                if (mPkgEntities.size() <= 1) {
 //                    CommonUtil.toastNoRepeat(mActivity, "封装形式为空");
                 } else {
-                    mEnclosureDialog.show();
-                }*/
-                mEnclosureSelectPop.showPopupWindow();
+                    mEnclosureSelectPop.showPopupWindow();
+                }
                 break;
             default:
                 break;
@@ -794,9 +811,9 @@ public class JLTStorageInBarcodeFragment extends BaseFragment implements View.On
     }
 
     private class MyTextWatcher implements TextWatcher {
-        private EditText view;
+        private TextView view;
 
-        public MyTextWatcher(EditText view) {
+        public MyTextWatcher(TextView view) {
             this.view = view;
         }
 

+ 0 - 2
app/src/main/java/com/uas/jlt_storage/fragment/JLTStorageInDoneListFragment.java

@@ -133,8 +133,6 @@ public class JLTStorageInDoneListFragment extends BaseFragment {
                                         jltStorageModelBean.setQuantity(FastjsonUtil.getText(modelObject,"BI_QTY"));
 
                                         jltStorageModelBeans.add(jltStorageModelBean);
-                                        jltStorageModelBeans.add(jltStorageModelBean);
-                                        jltStorageModelBeans.add(jltStorageModelBean);
                                     }
                                 }
                             }

+ 2 - 0
app/src/main/java/com/uas/jlt_storage/fragment/JLTStorageMaterialMoveDetailFragment.java

@@ -264,6 +264,7 @@ public class JLTStorageMaterialMoveDetailFragment extends BaseFragment {
             public void onSuccess(int flag, Object o) throws Exception {
                 progressDialog.dismiss();
                 try {
+                    mBoxEditText.requestFocus();
                     String result = o.toString();
                     JSONObject resultObject = JSON.parseObject(result);
                     JSONObject dataObject = FastjsonUtil.getJSONObject(resultObject, "data");
@@ -322,6 +323,7 @@ public class JLTStorageMaterialMoveDetailFragment extends BaseFragment {
                 CommonUtil.toastNoRepeat(mActivity, failStr);
                 mLocationEditText.setText("");
                 mShelvesCheckBox.setChecked(true);
+                mLocationEditText.requestFocus();
             }
         });
     }

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

@@ -54,7 +54,7 @@ public class JLTStorageMaterialMoveFragment extends BaseFragment implements OnCo
     private TextView mConfirmTextView;
     private List<JLTMaterialBean> mMaterialBeans;
     private TableData<JLTMaterialBean> mTableData;
-    private ArrayColumn<String> mWhcodeColumn, mLocationColumn, mModelColumn, mBrandColumn;
+    private ArrayColumn<String> mLocationColumn, mBoxColumn, mModelColumn, mBrandColumn;
     private ArrayColumn<Double> mMpqColumn, mQtyColumn, mPanColumn;
     private ArrayColumn<Long> mPosColumn;
 
@@ -100,8 +100,8 @@ public class JLTStorageMaterialMoveFragment extends BaseFragment implements OnCo
         mPosColumn = new ArrayColumn<Long>("序号", "POS");
         mPosColumn.setFixed(true);
 
-        mWhcodeColumn = new ArrayColumn<String>("仓库", "BAR_WHCODE");
         mLocationColumn = new ArrayColumn<String>("仓位", "BAR_LOCATION");
+        mBoxColumn = new ArrayColumn<String>("箱号", "BAR_OUTBOXCODE1");
         mModelColumn = new ArrayColumn<String>("型号", "BAR_MPN");
         mMpqColumn = new ArrayColumn<Double>("MPQ", "BAR_ZXBZS", false,
                 new IFormat<Double>() {
@@ -153,13 +153,14 @@ public class JLTStorageMaterialMoveFragment extends BaseFragment implements OnCo
         mMpqColumn.setOnColumnItemClickListener(this);
         mQtyColumn.setOnColumnItemClickListener(this);
         mPanColumn.setOnColumnItemClickListener(this);
-        mWhcodeColumn.setOnColumnItemClickListener(new OnColumnItemClickListener<String>() {
+
+        mLocationColumn.setOnColumnItemClickListener(new OnColumnItemClickListener<String>() {
             @Override
             public void onClick(Column<String> column, String value, String s, int position) {
                 jumpToDetail(position);
             }
         });
-        mLocationColumn.setOnColumnItemClickListener(new OnColumnItemClickListener<String>() {
+        mBoxColumn.setOnColumnItemClickListener(new OnColumnItemClickListener<String>() {
             @Override
             public void onClick(Column<String> column, String value, String s, int position) {
                 jumpToDetail(position);
@@ -240,6 +241,7 @@ public class JLTStorageMaterialMoveFragment extends BaseFragment implements OnCo
                                 jltMaterialBean.setBAR_ZXBZS(FastjsonUtil.getDouble(dataObject, "BAR_ZXBZS"));
                                 jltMaterialBean.setBAR_BRAND(FastjsonUtil.getText(dataObject, "BAR_BRAND"));
                                 jltMaterialBean.setBAR_WHCODE(FastjsonUtil.getText(dataObject, "BAR_WHCODE"));
+                                jltMaterialBean.setBAR_OUTBOXCODE1(FastjsonUtil.getText(dataObject, "BAR_OUTBOXCODE1"));
                                 jltMaterialBean.setBAR_LOCATION(FastjsonUtil.getText(dataObject, "BAR_LOCATION"));
                                 jltMaterialBean.setOldLocation(keyStr);
 
@@ -249,7 +251,7 @@ public class JLTStorageMaterialMoveFragment extends BaseFragment implements OnCo
                     }
 
                     mTableData = new TableData<JLTMaterialBean>("型号列表", mMaterialBeans,
-                            mPosColumn, mWhcodeColumn, mLocationColumn, mModelColumn, mQtyColumn, mPanColumn, mBrandColumn, mMpqColumn);
+                            mPosColumn, mLocationColumn, mBoxColumn, mModelColumn, mQtyColumn, mPanColumn, mBrandColumn, mMpqColumn);
                     mSmartTable.setTableData(mTableData);
                 } catch (Exception e) {
                     e.printStackTrace();
@@ -260,7 +262,7 @@ public class JLTStorageMaterialMoveFragment extends BaseFragment implements OnCo
             public void onFail(int flag, String failStr) throws Exception {
                 progressDialog.dismiss();
                 mTableData = new TableData<JLTMaterialBean>("型号列表", mMaterialBeans,
-                        mPosColumn, mWhcodeColumn, mLocationColumn, mModelColumn, mQtyColumn, mPanColumn, mBrandColumn, mMpqColumn);
+                        mPosColumn, mLocationColumn, mBoxColumn, mModelColumn, mQtyColumn, mPanColumn, mBrandColumn, mMpqColumn);
                 mSmartTable.setTableData(mTableData);
                 CommonUtil.toastNoRepeat(mActivity, failStr);
             }

+ 4 - 4
app/src/main/res/layout/fragment_jlt_pick_material_out_box.xml

@@ -20,12 +20,12 @@
             android:id="@+id/jlt_pick_material_out_box_model_tv"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
+            android:focusable="true"
+            android:longClickable="true"
             android:paddingLeft="10dp"
             android:textColor="#333333"
-            tools:text="2342353543"
             android:textIsSelectable="true"
-            android:focusable="true"
-            android:longClickable="true" />
+            tools:text="2342353543" />
     </LinearLayout>
 
     <LinearLayout
@@ -88,7 +88,7 @@
             <TextView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:text="MPQLIST"
+                android:text="MPQ"
                 android:textColor="#333333" />
 
             <TextView

+ 31 - 26
app/src/main/res/layout/fragment_jlt_pick_material_out_scan.xml

@@ -4,6 +4,8 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="@color/white"
+    android:focusable="true"
+    android:focusableInTouchMode="true"
     android:orientation="vertical"
     android:padding="12dp">
 
@@ -21,12 +23,12 @@
             android:id="@+id/jlt_pick_material_out_scan_model_tv"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
+            android:focusable="true"
+            android:longClickable="true"
             android:paddingLeft="10dp"
             android:textColor="#333333"
-            tools:text="2342353543"
             android:textIsSelectable="true"
-            android:focusable="true"
-            android:longClickable="true" />
+            tools:text="2342353543" />
     </LinearLayout>
 
     <LinearLayout
@@ -89,7 +91,7 @@
             <TextView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:text="MPQLIST"
+                android:text="MPQ"
                 android:textColor="#333333" />
 
             <TextView
@@ -212,7 +214,9 @@
 
     <ScrollView
         android:layout_width="match_parent"
-        android:layout_height="match_parent">
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        android:visibility="visible">
 
         <LinearLayout
             android:layout_width="match_parent"
@@ -240,7 +244,7 @@
                     style="@style/EditTextStyle"
                     android:layout_width="0dp"
                     android:layout_weight="1"
-                    android:hint="请采集型号"/>
+                    android:hint="请采集型号" />
             </LinearLayout>
 
             <LinearLayout
@@ -384,28 +388,29 @@
 
             </LinearLayout>
 
-            <LinearLayout
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="10dp">
 
-                <Button
-                    android:id="@+id/jlt_pick_material_out_scan_save_btn"
-                    style="@style/ButtonStyle"
-                    android:layout_width="0dp"
-                    android:layout_margin="14dp"
-                    android:layout_weight="1"
-                    android:text="保存" />
-
-                <Button
-                    android:id="@+id/jlt_pick_material_out_scan_next_btn"
-                    style="@style/ButtonStyle"
-                    android:layout_width="0dp"
-                    android:layout_margin="14dp"
-                    android:layout_weight="1"
-                    android:text="保存并下一箱" />
-            </LinearLayout>
         </LinearLayout>
     </ScrollView>
 
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="10dp">
+
+        <Button
+            android:id="@+id/jlt_pick_material_out_scan_save_btn"
+            style="@style/ButtonStyle"
+            android:layout_width="0dp"
+            android:layout_margin="14dp"
+            android:layout_weight="1"
+            android:text="保存" />
+
+        <Button
+            android:id="@+id/jlt_pick_material_out_scan_next_btn"
+            style="@style/ButtonStyle"
+            android:layout_width="0dp"
+            android:layout_margin="14dp"
+            android:layout_weight="1"
+            android:text="保存并下一箱" />
+    </LinearLayout>
 </LinearLayout>

+ 3 - 33
app/src/main/res/layout/fragment_jlt_stock_inquiry_location.xml

@@ -6,30 +6,6 @@
     android:orientation="vertical"
     android:padding="12dp">
 
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal">
-
-        <TextView
-            style="@style/inputItemCaption"
-            android:minWidth="100dp"
-            android:text="仓库" />
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:padding="4dp"
-            android:text="*"
-            android:textColor="@color/red"
-            android:visibility="invisible" />
-
-        <com.uas.jlt_storage.view.ClearableEditText
-            android:id="@+id/jlt_stock_inquiry_location_whcode_et"
-            style="@style/inputItemValue"
-            android:hint="请输入仓库" />
-    </LinearLayout>
-
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
@@ -47,7 +23,7 @@
             android:padding="4dp"
             android:text="*"
             android:textColor="@color/red"
-            android:visibility="invisible" />
+            android:visibility="visible" />
 
         <com.uas.jlt_storage.view.ClearableEditText
             android:id="@+id/jlt_stock_inquiry_location_location_et"
@@ -55,12 +31,6 @@
             android:hint="请采集箱号" />
     </LinearLayout>
 
-    <Button
-        android:id="@+id/jlt_stock_inquiry_location_confirm_btn"
-        style="@style/ButtonStyle"
-        android:layout_marginTop="10dp"
-        android:text="查询" />
-
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
@@ -77,7 +47,7 @@
             android:id="@+id/jlt_stock_inquiry_location_model_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_weight="3"
+            android:layout_weight="2"
             android:textColor="#333333"
             tools:text="1232" />
 
@@ -107,7 +77,7 @@
             android:id="@+id/jlt_stock_inquiry_location_box_tv"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_weight="3"
+            android:layout_weight="2"
             android:textColor="#333333"
             tools:text="1232" />
     </LinearLayout>

+ 4 - 74
app/src/main/res/layout/fragment_jlt_stock_inquiry_model.xml

@@ -32,80 +32,16 @@
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginTop="6dp"
-        android:orientation="horizontal">
+        android:layout_marginTop="6dp">
 
-        <TextView
-            style="@style/inputItemCaption"
-            android:minWidth="100dp"
-            android:text="仓库" />
 
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:padding="4dp"
-            android:text="*"
-            android:textColor="@color/red"
-            android:visibility="invisible" />
-
-        <com.uas.jlt_storage.view.ClearableEditText
-            android:id="@+id/jlt_stock_inquiry_model_whcode_et"
-            style="@style/inputItemValue"
-            android:hint="请输入仓库" />
     </LinearLayout>
 
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="6dp"
-        android:orientation="horizontal">
-
-        <TextView
-            style="@style/inputItemCaption"
-            android:minWidth="100dp"
-            android:text="仓位/箱号" />
-
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:padding="4dp"
-            android:text="*"
-            android:textColor="@color/red"
-            android:visibility="invisible" />
-
-        <com.uas.jlt_storage.view.ClearableEditText
-            android:id="@+id/jlt_stock_inquiry_model_location_et"
-            style="@style/inputItemValue"
-            android:hint="请采集仓位/箱号" />
-    </LinearLayout>
-
-    <Button
-        android:id="@+id/jlt_stock_inquiry_model_confirm_btn"
-        style="@style/ButtonStyle"
-        android:layout_marginTop="10dp"
-        android:text="查询" />
-
-
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_marginTop="6dp">
 
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginLeft="4dp"
-            android:text="仓库:"
-            android:textColor="#333333" />
-
-        <TextView
-            android:id="@+id/jlt_stock_inquiry_model_whcode_tv"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="2"
-            android:textColor="#333333"
-            tools:text="1232" />
-
         <TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
@@ -117,16 +53,10 @@
             android:id="@+id/jlt_stock_inquiry_model_location_tv"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_weight="3"
+            android:layout_weight="2"
             android:textColor="#333333"
             tools:text="1232" />
 
-    </LinearLayout>
-
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="6dp">
         <TextView
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
@@ -138,7 +68,7 @@
             android:id="@+id/jlt_stock_inquiry_model_quantity_tv"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_weight="2"
+            android:layout_weight="3"
             android:textColor="#333333"
             tools:text="1232" />
 
@@ -153,7 +83,7 @@
             android:id="@+id/jlt_stock_inquiry_model_box_tv"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_weight="3"
+            android:layout_weight="2"
             android:textColor="#333333"
             tools:text="1232" />
     </LinearLayout>

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

@@ -126,7 +126,7 @@
                         android:textColor="@color/body_text_1"
                         android:textSize="16sp" />
 
-                    <com.uas.jlt_storage.view.ClearableEditText
+                    <TextView
                         android:id="@+id/jlt_storage_in_barcode_mpq_et"
                         style="@style/EditTextUnableStyle"
                         android:layout_width="0dp"
@@ -200,7 +200,7 @@
                         android:textColor="@color/body_text_1"
                         android:textSize="16sp" />
 
-                    <com.uas.jlt_storage.view.ClearableEditText
+                    <TextView
                         android:id="@+id/jlt_storage_in_barcode_brand_et"
                         style="@style/EditTextUnableStyle"
                         android:layout_width="0dp"
@@ -221,7 +221,7 @@
                         android:textColor="@color/body_text_1"
                         android:textSize="16sp" />
 
-                    <com.uas.jlt_storage.view.ClearableEditText
+                    <TextView
                         android:id="@+id/jlt_storage_in_barcode_reel_et"
                         style="@style/EditTextUnableStyle"
                         android:layout_width="0dp"

+ 3 - 0
app/src/main/res/layout/fragment_jlt_upper_shelf_box.xml

@@ -83,6 +83,7 @@
         <com.uas.jlt_storage.view.ClearableEditText
             android:id="@+id/jlt_upper_shelf_box_box_et"
             style="@style/inputItemValue"
+            android:nextFocusDown="@id/jlt_upper_shelf_box_box_et"
             android:hint="请采集箱号" />
     </LinearLayout>
 
@@ -109,6 +110,7 @@
         android:id="@+id/jlt_upper_shelf_box_box_rv"
         android:layout_width="match_parent"
         android:layout_height="0dp"
+        android:focusable="false"
         android:layout_marginLeft="16dp"
         android:layout_marginRight="16dp"
         android:layout_weight="1" />
@@ -116,5 +118,6 @@
     <Button
         android:id="@+id/jlt_upper_shelf_box_confirm_btn"
         style="@style/ButtonStyle"
+        android:focusable="false"
         android:text="确认上架" />
 </LinearLayout>

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

@@ -4,6 +4,7 @@
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:orientation="vertical"
+    android:background="@drawable/selector_pop_item_bg"
     android:padding="6dp">
 
     <TextView