Quellcode durchsuchen

返修易fxy1.2优化

guilin vor 2 Jahren
Ursprung
Commit
a2949e0808

+ 5 - 1
app/src/main/AndroidManifest.xml

@@ -264,7 +264,11 @@
             android:windowSoftInputMode="stateHidden|adjustPan"
             android:screenOrientation="portrait"
             tools:ignore="LockedOrientationActivity"/>
-
+        <activity
+            android:name=".putIn.TrayMainActivity"
+            android:windowSoftInputMode="stateHidden|adjustPan"
+            android:screenOrientation="portrait"
+            tools:ignore="LockedOrientationActivity"/>
     </application>
 
 

+ 255 - 0
app/src/main/java/com/fxy/common/CommonDialog.java

@@ -0,0 +1,255 @@
+package com.fxy.common;
+import com.elvishew.xlog.XLog;
+import com.fxy.R;
+import android.app.Dialog;
+import android.content.Context;
+import android.os.Build;
+import android.os.Bundle;
+import android.text.Editable;
+import android.text.InputType;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.inputmethod.EditorInfo;
+import android.widget.EditText;
+import android.widget.ImageButton;
+import android.widget.TextView;
+
+import androidx.annotation.RequiresApi;
+
+public class CommonDialog extends Dialog implements View.OnClickListener{
+    public EditText contentTxt;
+    private TextView titleTxt;
+    private TextView submitTxt;
+    private TextView cancelTxt;
+    private TextView tvContentLabel;
+    private ImageButton ibClear;
+
+    private Context mContext;
+    private String content;
+    private OnCloseListener listener;
+    private String positiveName;
+    private String negativeName;
+    private String title;
+    private String typeCode;
+
+    public CommonDialog(Context context) {
+        super(context);
+        this.mContext = context;
+        onCreate(null);
+    }
+
+    public CommonDialog(Context context, int themeResId, String typeCode) {
+        super(context, themeResId);
+        this.mContext = context;
+        setLayout();
+        setTypeCode(typeCode);
+    }
+
+    public CommonDialog(Context context, int themeResId, String typeCode, OnCloseListener listener) {
+        super(context, themeResId);
+        this.mContext = context;
+        this.listener = listener;
+        setLayout();
+        setTypeCode(typeCode);
+    }
+
+
+
+    public CommonDialog setTitle(String title){
+        this.title = title;
+        return this;
+    }
+    public CommonDialog setTitle(String title,String hint){
+        this.title = title;
+        if (contentTxt!=null){
+            titleTxt.setText(title);
+            contentTxt.setHint(hint);
+
+        }
+        return this;
+    }
+
+    public CommonDialog setContentHint(String hint){
+        if (contentTxt!=null){
+            contentTxt.setText("");
+            contentTxt.setHint(hint);
+        }
+        return this;
+    }
+
+    public CommonDialog setPositiveButton(String name){
+        this.positiveName = name;
+        return this;
+    }
+
+    public CommonDialog setNegativeButton(String name){
+        this.negativeName = name;
+        return this;
+    }
+
+    public CommonDialog setContent(String val){
+        if (contentTxt!=null){
+            contentTxt.setText(val);
+        }
+        return this;
+    }
+
+    public CommonDialog setTypeCode(String typeCode){
+        this.typeCode = typeCode;
+        if (tvContentLabel!=null){
+            if (typeCode.equals("need_customer")){
+                tvContentLabel.setText("FX");
+                tvContentLabel.setVisibility(View.VISIBLE);
+            }else{
+                tvContentLabel.setVisibility(View.GONE);
+            }
+        }
+
+        return this;
+    }
+
+    public CommonDialog setInputType(int type){
+        if (contentTxt!=null){
+            contentTxt.setInputType(type);
+        }
+        return this;
+    }
+
+    /**
+     * 获取当前操作类型
+     * @return
+     */
+    public String getTypeCode(){
+        return this.typeCode;
+    }
+
+    /**
+     * 提供尾部操作关闭
+     * @param confirm
+     */
+    public void closeDialog(boolean confirm){
+        if(listener != null){
+            if (confirm){
+                listener.onClickSubmit(CommonDialog.this, true);
+            }else {
+                listener.onClickCancel(CommonDialog.this, false);
+            }
+        }
+    }
+
+
+    protected void setLayout(){
+        setContentView(R.layout.dialog_normal_layout);
+        setCanceledOnTouchOutside(false);
+        initView();
+    }
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+    }
+
+    private void initView(){
+        contentTxt = (EditText) findViewById(R.id.et_content);
+        titleTxt = (TextView)findViewById(R.id.title);
+        submitTxt = (TextView)findViewById(R.id.submit);
+        submitTxt.setOnClickListener(this);
+        cancelTxt = (TextView)findViewById(R.id.cancel);
+        cancelTxt.setOnClickListener(this);
+
+        tvContentLabel = (TextView) findViewById(R.id.tv_content_label);
+        ibClear = (ImageButton)findViewById(R.id.ib_clear);
+
+        // contentTxt.setText(content);
+        if(!TextUtils.isEmpty(positiveName)){
+            submitTxt.setText(positiveName);
+        }
+
+        if(!TextUtils.isEmpty(negativeName)){
+            cancelTxt.setText(negativeName);
+        }
+
+        if(!TextUtils.isEmpty(title)){
+            titleTxt.setText(title);
+        }
+
+        if(!TextUtils.isEmpty(content)){
+            contentTxt.setText(content);
+        }
+
+        contentTxt.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                //XLog.e("KeyCode:"+event.getKeyCode());
+                if (actionId == EditorInfo.IME_ACTION_SEND || actionId == EditorInfo.IME_ACTION_DONE ||
+                        (event.getKeyCode()==KeyEvent.KEYCODE_ENTER   && actionId == KeyEvent.ACTION_DOWN)) {
+                    if (!v.getText().toString().trim().isEmpty()) {
+                        if(listener != null){
+                            listener.onClickSubmit(CommonDialog.this, true);
+                        }
+                    }
+
+                }
+                return true;
+            }
+        });
+        contentTxt.addTextChangedListener(new TextWatcher() {
+
+            @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) {
+                if (s.toString().isEmpty()){
+                    ibClear.setVisibility(View.GONE);
+                }else{
+                    ibClear.setVisibility(View.VISIBLE);
+                }
+            }
+        });
+        ibClear.setOnClickListener(new View.OnClickListener() {
+
+            @Override
+            public void onClick(View v) {
+                if (contentTxt!=null){
+                    contentTxt.setText("");
+                    contentTxt.requestFocus();
+                }
+                ibClear.setVisibility(View.GONE);
+            }
+        });
+    }
+
+    @Override
+    public void onClick(View v) {
+        switch (v.getId()){
+            case R.id.cancel:
+                if(listener != null){
+                    listener.onClickCancel(this, false);
+                }
+                this.dismiss();
+                break;
+            case R.id.submit:
+                if(listener != null){
+                    listener.onClickSubmit(this, true);
+                }
+                break;
+            case R.id.ib_clear:
+
+                break;
+        }
+    }
+    public interface OnCloseListener{
+        void onClickCancel(Dialog dialog, boolean confirm);
+        void onClickSubmit(Dialog dialog, boolean confirm);
+    }
+
+}

+ 7 - 2
app/src/main/java/com/fxy/main/fragment/HomePagerFragment.java

@@ -17,6 +17,7 @@ import android.widget.LinearLayout;
 import com.fxy.common.VersionUpgrades;
 import com.elvishew.xlog.XLog;
 import com.fxy.putIn.TallyMainActivity;
+import com.fxy.putIn.TrayMainActivity;
 import com.fxy.putOut.DeliveryGoodsMainActivity;
 import com.google.zxing.Result;
 import com.fxy.baselibrary.base.BaseFragment;
@@ -124,7 +125,7 @@ public class HomePagerFragment extends BaseFragment implements View.OnClickListe
      * 绑定事件
      * @param v
      */
-    @OnClick({R.id.search_view, R.id.ima_or_code,R.id.ivt_tally,R.id.ivt_cargo_storage})
+    @OnClick({R.id.search_view, R.id.ima_or_code,R.id.ivt_tally,R.id.ivt_cargo_storage,R.id.ivt_tray})
     public void onClick(View v) {
         Bundle bundle = new Bundle();
         switch (v.getId()) {
@@ -132,11 +133,15 @@ public class HomePagerFragment extends BaseFragment implements View.OnClickListe
                 bundle.putString("action","receive");
                 intent2Page(getActivity(), TallyMainActivity.class, false,bundle);;
                 break;
+            //托盘入库
+            case R.id.ivt_tray:
+                intent2Page(getActivity(), TrayMainActivity.class, false,bundle);;
+                break;
             case R.id.ivt_cargo_storage:
                 bundle.putString("action","storage");
                 intent2Page(getActivity(), DeliveryGoodsMainActivity.class, false,bundle);;
                 break;
-                //
+
             default:
                 showToast("还没有配置点击事件");
                 break;

+ 3 - 1
app/src/main/java/com/fxy/net/Urls.java

@@ -94,7 +94,9 @@ public class Urls {
     // 删除
     public static final String FXY_DEL_OUTBOUND = "/pda/outbound/scanDoPallet";
     //完成装柜
-    public static final String FMS_FINISH_LOAD = "/pda/Outbound/finishLoad";
+    public static final String FXY_FINISH_LOAD = "/pda/Outbound/finishLoad";
+    //扫描跟踪单号
+    public static final String FXY_SCAN_PALLET_TRACKING = "/pda/inbound/scanPalletTracking";
     /*返修易 -- end*/
 
 

+ 164 - 48
app/src/main/java/com/fxy/putIn/TallyMainActivity.java

@@ -2,6 +2,7 @@ package com.fxy.putIn;
 
 import android.annotation.SuppressLint;
 import android.app.AlertDialog;
+import android.app.Dialog;
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.DialogInterface;
@@ -14,6 +15,7 @@ import android.os.Message;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.text.Editable;
+import android.text.InputType;
 import android.text.TextWatcher;
 import android.view.KeyEvent;
 import android.view.LayoutInflater;
@@ -42,6 +44,7 @@ import com.fxy.baselibrary.util.StringUtils;
 import com.fxy.baselibrary.views.MarqueeTextView;
 import com.fxy.bean.ActionBean;
 import com.fxy.bean.ScanBean;
+import com.fxy.common.CommonDialog;
 import com.fxy.constant.BaseConfig;
 import com.fxy.constant.EventCode;
 import com.fxy.constant.SPCache;
@@ -94,10 +97,6 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
     @BindView(R.id.et_container_code)
     EditText etContainerCode;
 
-    //单号
-    @BindView(R.id.et_customer_code)
-    EditText etCustomerCode;
-
     @BindView(R.id.mt_container_code)
     MarqueeTextView mtContainerCode;
 
@@ -107,13 +106,26 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
     @BindView(R.id.mt_putin_qty)
     MarqueeTextView mtPutinQty;
 
+
+    @BindView(R.id.mt_customer_code)
+    MarqueeTextView mtCustomerCode;
+
+    @BindView(R.id.mt_cnt)
+    MarqueeTextView mtCnt;
+
+
     //托盘组件
     @BindView(R.id.ll_container)
     LinearLayout llContainer;
 
-    //客户组件 llCustomer
-    @BindView(R.id.ll_customer)
-    LinearLayout llCustomer;
+
+
+    @BindView(R.id.ll_customer_code)
+    LinearLayout llCustomerCode;
+
+
+    @BindView(R.id.ll_cnt)
+    LinearLayout llCnt;
 
 
     @BindView(R.id.btn_change_confirm)
@@ -143,11 +155,22 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
     private JSONObject palletObject;
 
     private Unbinder unbinder;
+
+    private  CommonDialog commonDialog;
+
     //是否需要显示客户
     private boolean needCustomer;
+    private boolean needCtn;
     //强制更改
     private int isChange=0;
 
+    //是否重新打开
+    private int isOpen=0;
+
+    private String customerCode="";
+    //箱数 (整数字)
+    private String ctn = "";
+
     //托盘数据
     private List<JSONObject> tallyDataList = new ArrayList<>()   ;
     //托盘对象
@@ -216,6 +239,7 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
         initAdapter();
         initData();
         initEdit();
+        initDialog();
         //监听浮动按钮
         iv_drag.setOnClickListener(new View.OnClickListener() {
             @Override
@@ -240,21 +264,46 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
     }
 
 
+    private void initDialog(){
+        commonDialog = new CommonDialog(mContext, R.style.dialog, "need_customer", new CommonDialog.OnCloseListener() {
+            @Override
+            public void onClickCancel(Dialog dialog, boolean confirm) {
+                dialog.dismiss();
+            }
+            @Override
+            public void onClickSubmit(Dialog dialog, boolean confirm) {
+                String string = commonDialog.contentTxt.getText().toString().trim();
+                if (commonDialog.getTypeCode().equals("need_customer")){
+                    customerCode = string;
+                    mtCustomerCode.setText(string);
+
+                }
+                if (commonDialog.getTypeCode().equals("need_ctn")){
+                    ctn = string;
+                    mtCnt.setText(string);
+                }
+                doPutIn();
+                dialog.dismiss();
+            }
+        });
+
 
+    }
 
 
 
 
     @Override
     public boolean dispatchKeyEvent(KeyEvent event) {
-        //XLog.e("event:"+event.getKeyCode());
+        //XLog.e("Action:"+event.getAction()+"---event:"+event.getKeyCode());
         if ((event.getKeyCode()==KeyEvent.KEYCODE_DPAD_CENTER )  && event.getAction() == KeyEvent.ACTION_DOWN){
-            //按确定键
-            if(this.validate()){
-                //doPutIn();
+            if(validate()){
+                doPutIn();
             }
+            return true;
         }
-        return super.dispatchKeyEvent(event);
+        return true;
+        //return super.dispatchKeyEvent(event);
     }
 
     //监听按键
@@ -370,7 +419,6 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
                 getPalletInfo();
                 break;
             case R.id.et_order_no:
-            case R.id.et_customer_code:
                 doPutIn();
                 break;
             default:
@@ -385,7 +433,6 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
         List<EditText> list = new ArrayList<>();
         list.add(etOrderNo);
         list.add(etContainerCode);
-        list.add(etCustomerCode);
         unifyEdit(list);
     }
 
@@ -408,6 +455,10 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
 
     //把扫描结果赋值
     private void setScanResult(String scanResult){
+        if (commonDialog!=null && commonDialog.isShowing()){
+            commonDialog.setContent(scanResult);
+            return;
+        }
         //获取焦点的view对象
         View view=getWindow().getDecorView().findFocus();
         //如果是EditText
@@ -432,6 +483,9 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
         try {
             JSONObject jsonObject = new JSONObject();
             jsonObject.put("pallet_code",palletCode);
+            if (isOpen>0){
+                jsonObject.put("is_open",isOpen);
+            }
             if (!checkRepeat(Urls.FXY_CHECK_PALLET+(jsonObject.toString()))){
                 Toast.makeText(this, getString(R.string.error_data_processed), Toast.LENGTH_LONG).show();
                 return;
@@ -448,11 +502,9 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
                                 JSONObject result = new JSONObject();
                                 if (bean.data!=null && !bean.data.isEmpty() && !bean.data.equals("[]")){
                                      result = new JSONObject(bean.data);
-
                                 }
                                 setPageViewData(result);
 
-
                                 if(bean.code == 1){
                                     palletObject = result;
                                     llContainer.setVisibility(View.GONE);
@@ -462,10 +514,33 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
                                     mtContainerCode.setText(palletCode);
 
                                 }else{
-                                    palletObject = null;
-                                    showWarningToast(bean.msg);
-                                    etContainerCode.requestFocus();
-                                    etContainerCode.selectAll();
+
+                                    if (result.has("is_open") && result.getInt("is_open") == 1) {
+                                        new AlertDialog.Builder(mContext)
+                                                .setTitle(R.string.dl_hint)
+                                                .setMessage(bean.msg)
+                                                .setNegativeButton(R.string.str_submit, new DialogInterface.OnClickListener() {
+                                                    @RequiresApi(api = Build.VERSION_CODES.KITKAT)
+                                                    @Override
+                                                    public void onClick(DialogInterface dialogInterface, int i) {
+                                                        isOpen = 1;
+                                                        getPalletInfo();
+                                                    }
+                                                }).setPositiveButton(R.string.str_cancel, new DialogInterface.OnClickListener() {
+                                            @Override
+                                            public void onClick(DialogInterface dialogInterface, int i) {
+                                                //取消不做操作
+
+                                            }
+                                        }).show();
+                                    }else{
+                                        palletObject = null;
+                                        showWarningToast(bean.msg);
+                                        etContainerCode.requestFocus();
+                                        etContainerCode.selectAll();
+                                    }
+
+
                                 }
 
 
@@ -546,13 +621,22 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
             param.put("tracking_number",tracking_number);
 
             if (needCustomer){
-                param.put("customer_code",etCustomerCode.getText().toString().trim());
+                param.put("customer_code",customerCode);
             }
             if (isChange>0){
                 param.put("is_change",isChange);
             }
 
-            if (!checkRepeat(Urls.FMS_ADD_RECEIVE+(param.toString()))){return;}
+            if (isOpen>0){
+                param.put("is_open",isOpen);
+            }
+
+            if (needCtn){
+                param.put("ctn",ctn);
+            }
+
+
+            if (!checkRepeat(Urls.FXY_PUT_IN+(param.toString()))){return;}
 
             OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FXY_PUT_IN)
                     .upJson(param)
@@ -574,24 +658,16 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
                                 }else{
 
                                     if (result.has("tag") && result.getString("tag").equals("need_customer")){
-                                        new AlertDialog.Builder(mContext)
-                                                .setTitle(R.string.dl_hint)
-                                                .setMessage(bean.msg)
-                                                .setNegativeButton(R.string.str_submit, new DialogInterface.OnClickListener() {
-                                                    @RequiresApi(api = Build.VERSION_CODES.KITKAT)
-                                                    @Override
-                                                    public void onClick(DialogInterface dialogInterface, int i) {
-                                                        needCustomer = true;
-                                                        llCustomer.setVisibility(View.VISIBLE);
-                                                        etCustomerCode.requestFocus();
-                                                    }
-                                                }).setPositiveButton(R.string.str_cancel, new DialogInterface.OnClickListener() {
-                                            @Override
-                                            public void onClick(DialogInterface dialogInterface, int i) {
-                                                //取消不做操作
 
-                                            }
-                                        }).show();
+                                        commonDialog.setTitle("客户编号","请输入客户编号")
+                                                .setTypeCode("need_customer")
+                                                .setContent("")
+                                                .show();
+                                        llCustomerCode.setVisibility(View.VISIBLE);
+                                        needCustomer = true;
+
+
+
                                     }else if (result.has("is_change") && result.getInt("is_change")==1){
                                         new AlertDialog.Builder(mContext)
                                                 .setTitle(R.string.dl_hint)
@@ -610,6 +686,13 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
 
                                             }
                                         }).show();
+                                    }else if(result.has("need_ctn") && result.getInt("need_ctn") == 1) {
+                                        needCtn = true;
+                                        commonDialog.setTitle("箱数","请输入箱数")
+                                                .setTypeCode("need_ctn")
+                                                .setContent("")
+                                                .show();
+                                        llCnt.setVisibility(View.VISIBLE);
                                     }else {
                                         showWarningToast(bean.msg);
                                     }
@@ -645,13 +728,30 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
             return false;
         }
         if (needCustomer){
-            if(!checkNull(etCustomerCode)){
-                setEditTextFocused(etCustomerCode,true);
-                showWarningToast(etCustomerCode.getHint().toString());
+            if (customerCode.isEmpty()){
+                commonDialog.setTitle("客户编号","请输入客户编号")
+                        .setTypeCode("need_customer")
+                        .setContent("")
+                        .show();
+                showWarningToast("请输入客户编号");
                 return false;
             }
         }
 
+        if (needCtn){
+            if(ctn.isEmpty()){
+                commonDialog.setTitle("箱数","请输入箱数")
+                        .setTypeCode("need_ctn")
+                        .setContent("")
+                        .show();
+                showWarningToast("请输入箱数");
+                return false;
+            }
+            if (!isNumeric(ctn)){
+                showWarningToast("请输入正整数");
+                return false;
+            }
+        }
 
         return true;
     }
@@ -725,7 +825,8 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
 
             mtSendWay.setText(send_way);
             mtPutinQty.setText(putin_qty);
-
+            ctn = "";
+            customerCode = "";
 
         }catch (JSONException e) {
             XLog.e("获取理货缓存数据错误",e);
@@ -735,10 +836,14 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
     //清除订单信息
     private void clearData(boolean isAll) {
         etOrderNo.setText("");
-        etCustomerCode.setText("");
         needCustomer = false;
+        needCtn = false;
         isChange = 0;
-        llCustomer.setVisibility(View.GONE);
+        isOpen = 0;
+        ctn = "" ;
+        customerCode = "";
+        llCnt.setVisibility(View.GONE);
+        llCustomerCode.setVisibility(View.GONE);
         if (isAll){
             llContainer.setVisibility(View.VISIBLE);
             mtContainerCode.setText("");
@@ -751,10 +856,9 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
         }
         setEditTextNormal(etContainerCode,true);
         setEditTextNormal(etOrderNo,true);
-        setEditTextNormal(etCustomerCode,true);
     }
 
-    @OnClick({R.id.btn_confirm,R.id.btn_change_confirm})
+    @OnClick({R.id.btn_confirm,R.id.btn_change_confirm,R.id.tv_edit_customer,R.id.tv_edit_cnt})
     public void onViewClicked(View view) {
         Bundle bundle = new Bundle();
         switch (view.getId()) {
@@ -786,6 +890,18 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
                     }).show();
 
                 break;
+            case R.id.tv_edit_customer:
+                commonDialog.setTitle("客户编号","请输入客户编号")
+                        .setTypeCode("need_customer")
+                        .setContent(mtCustomerCode.getText().toString())
+                        .show();
+                break;
+            case R.id.tv_edit_cnt:
+                commonDialog.setTitle("箱数","请输入箱数")
+                        .setTypeCode("need_ctn")
+                        .setContent(mtCnt.getText().toString())
+                        .show();
+                break;
             default:
                 break;
         }
@@ -825,7 +941,7 @@ public class TallyMainActivity extends  BaseActivity implements StoJNI.ScanCallB
                 @Override
                 public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
                     //XLog.e("actionId:"+actionId);
-                    if (actionId == EditorInfo.IME_ACTION_SEND || actionId == EditorInfo.IME_ACTION_DONE  ) {
+                    if (actionId == EditorInfo.IME_ACTION_SEND || actionId == EditorInfo.IME_ACTION_DONE   ) {
                         if (v.getText().toString().trim().isEmpty()) {
                             setEditTextFocused(v,true);
                             showWarningToast(v.getHint().toString());

+ 814 - 0
app/src/main/java/com/fxy/putIn/TrayMainActivity.java

@@ -0,0 +1,814 @@
+package com.fxy.putIn;
+
+import android.annotation.SuppressLint;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.os.Build;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.text.Editable;
+import android.text.InputType;
+import android.text.TextWatcher;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.inputmethod.EditorInfo;
+import android.widget.EditText;
+import android.widget.ImageButton;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import androidx.annotation.RequiresApi;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.elvishew.xlog.XLog;
+import com.fxy.R;
+import com.fxy.baselibrary.base.BaseActivity;
+import com.fxy.baselibrary.bean.BaseEventBusBean;
+import com.fxy.baselibrary.interfaces.OnRxScanerListener;
+import com.fxy.baselibrary.qrcode.ActivityScanerCode;
+import com.fxy.baselibrary.util.JsonUtil;
+import com.fxy.baselibrary.util.StringUtils;
+import com.fxy.baselibrary.views.MarqueeTextView;
+import com.fxy.bean.ActionBean;
+import com.fxy.bean.ScanBean;
+import com.fxy.common.CommonDialog;
+import com.fxy.constant.BaseConfig;
+import com.fxy.constant.EventCode;
+import com.fxy.constant.SPCache;
+import com.fxy.net.MyDialogCallback;
+import com.fxy.net.Urls;
+import com.fxy.view.FloatingImageView;
+import com.google.zxing.Result;
+import com.lzy.okgo.OkGo;
+import com.lzy.okgo.model.Response;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+import butterknife.Unbinder;
+import sto.android.app.StoJNI;
+import sto.android.app.StoPdaKeyEvent;
+import sto.android.app.StoTongJNI;
+
+public class TrayMainActivity extends  BaseActivity implements StoJNI.ScanCallBack {
+    /**
+     * 列表适配器
+     */
+    Context mContext = this;
+
+    //单号清除
+    @BindView(R.id.ib_order_no_clear)
+    ImageButton ibOrderNoClear;
+
+    //单号
+    @BindView(R.id.et_order_no)
+    EditText etOrderNo;
+
+    //单号
+    @BindView(R.id.et_ctn)
+    EditText etCtn;
+
+    @BindView(R.id.mt_tracking_number)
+    MarqueeTextView mtTrackingNumber;
+
+    @BindView(R.id.mt_send_way)
+    MarqueeTextView mtSendWay;
+
+    @BindView(R.id.mt_putin_qty)
+    MarqueeTextView mtPutinQty;
+
+    @BindView(R.id.mt_customer_code)
+    MarqueeTextView mtCustomerCode;
+
+    @BindView(R.id.recyclerview)
+    RecyclerView recyclerView;
+
+
+    @BindView(R.id.ll_customer_code)
+    LinearLayout llCustomerCode;
+
+    //浮动按钮
+    @BindView(R.id.iv_drag)
+    FloatingImageView iv_drag;
+
+    private View notDataView;   //没有数据显示页
+    private View errorView;     //错误显示页
+    private View emptyView;     //空显示页
+    /**
+     * 列表适配器
+     */
+    private FinishWorkAdapter mAdapter;
+
+    //扫码扫码动作
+    private ScanBean scanBean;
+
+
+    //托盘返回对象
+    private JSONObject palletObject;
+
+    private Unbinder unbinder;
+    //是否需要显示客户
+    private boolean needCustomer;
+    //强制更改
+    private int isChange=0;
+
+    //是否已经检查数据
+    private boolean isCheck = false;
+
+    private String trackingNumber = "";
+    private String customerCode = "";
+    private  CommonDialog commonDialog;
+
+    //托盘数据
+    private List<JSONObject> tallyDataList = new ArrayList<>()   ;
+    //托盘对象
+    private JSONObject tallyInfo = null;
+
+    @Override
+    public int getContentViewResId() {
+        return R.layout.activity_fxy_tray;
+    }
+
+    @Override
+    public boolean showToolBar() {
+        return true;
+    }
+
+    @Override
+    public boolean openEventBus() {
+        return true;
+    }
+
+    @Override
+    protected void getBundleExtras(Bundle bundle) {
+
+    }
+    //finish的返回监听
+    //这里的requestCode参数,就是上面设置的 1 ,当跳转的页面返回的时候,通过这个加以判断
+    //resultCode ,这个参数是在跳转的页面里面规定的,它也是一个int类型的标志
+    //第三个参数包含了返回的值
+    //如果不需要所跳转的页面返回值,也就不需要这个方法了
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+//        XLog.e("requestCode:"+requestCode);
+//        XLog.e("resultCode:"+resultCode);
+        if (requestCode == 200 && resultCode == 200)//之前提到的两个标志,在这里显示出了作用
+        {
+        }else if (resultCode==0){
+        }
+    }
+
+
+    /**
+     * EventBus接收信息的方法,开启后才会调用(非粘性事件)
+     *
+     * @param event
+     */
+    @Override
+    protected void EventBean(BaseEventBusBean event) {
+//        XLog.e("----------接收返回--------------");
+//        XLog.e("接收返回:"+event.getEventCode());
+        if (event != null && event.getEventCode() == EventCode.displacement_refresh){
+
+        }
+    }
+
+    @Override
+    public boolean isPlayMusic() {
+        return true;
+    }
+
+    @Override
+    protected void initView() {
+        unbinder = ButterKnife.bind(this);
+        setTitleName("托盘入库");
+
+        initAdapter();
+        initData();
+        initEdit();
+        initDialog();
+        //监听浮动按钮
+        iv_drag.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                if(!iv_drag.isDrag()){
+                    ActivityScanerCode.setScanerListener(mScanerListener);
+                    ActivityScanerCode.intent2Activity(mContext, BaseConfig.COMMON_SCANNER_ONLY);
+                }
+            }
+        });
+
+
+
+    }
+
+
+    private void initData(){
+
+    }
+
+    private void initDialog(){
+        commonDialog = new CommonDialog(mContext, R.style.dialog, "need_customer", new CommonDialog.OnCloseListener() {
+            @Override
+            public void onClickCancel(Dialog dialog, boolean confirm) {
+
+                dialog.dismiss();
+            }
+            @Override
+            public void onClickSubmit(Dialog dialog, boolean confirm) {
+                customerCode = commonDialog.contentTxt.getText().toString().trim();
+                mtCustomerCode.setText(customerCode);
+                //tv1.setText(name);
+                dialog.dismiss();
+                //校验数据
+                if (validate()){
+                    doPutIn();
+                }
+
+            }
+        });
+
+    }
+
+    @Override
+    public boolean dispatchKeyEvent(KeyEvent event) {
+        //XLog.e("event:"+event.getKeyCode());
+//        if ((event.getKeyCode()==KeyEvent.KEYCODE_DPAD_CENTER )  && event.getAction() == KeyEvent.ACTION_DOWN){
+//            //按确定键
+//            if(validate()){
+//                doPutIn();
+//            }
+//            return true;
+//        }
+        return super.dispatchKeyEvent(event);
+    }
+
+    //监听按键
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        //XLog.e("监听按键:"+keyCode);XLog.e(event);
+        if (scanBean.getIsBroadcast()==0 && StoTongJNI.getIns(mContext).getEventFuction(keyCode)  == StoPdaKeyEvent.KEYCODE_SCAN
+                && event.getRepeatCount() == 0) {
+
+            if (StoTongJNI.getIns(mContext).GetScannerIsScanning()) {
+//
+            } else {
+                StoTongJNI.getIns(mContext).SetScannerStart();
+            }
+        }
+        return super.onKeyDown(keyCode, event);
+    }
+
+    @SuppressLint("HandlerLeak")
+    Handler scanHandler = new Handler() {
+
+        @Override
+        public void handleMessage(Message msg) {
+            // TODO Auto-generated method stub
+            if (msg.obj != null) {
+
+                String scanResult = msg.obj.toString().trim();
+                if (!scanResult.isEmpty()){
+                    setScanResult(scanResult);
+                }
+            }
+
+        }
+
+    };
+    @Override
+    public void onScanResults(String str) {
+        Message msg = new Message();
+        msg.obj = str;
+        scanHandler.sendMessage(msg);
+
+
+    }
+
+
+    @Override
+    public void onScanResults(String str, int type) {
+
+    }
+    /**
+     * 定义广播接受
+     */
+    BroadcastReceiver mReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            String scanResult = intent.getStringExtra(scanBean.getDataName());
+            if (scanResult==null){return; }
+            String scanStatus = "";
+            if (!scanBean.getStatusName().isEmpty()){
+                scanStatus = intent.getStringExtra(scanBean.getStatusName());
+            }else{
+                scanStatus = scanResult.isEmpty()? "" : "ok"; //有值 默认是扫码成功;
+            }
+
+            //新大陆(MT65,MT90) 需要手动关闭
+            if (!scanBean.getActionStop().isEmpty()){
+                Intent stopIntent = new Intent(scanBean.getActionStop());
+                mContext.sendBroadcast(stopIntent);
+            }
+
+            if ("ok".equals(scanStatus)){
+                setScanResult(scanResult);
+            }else{
+                showErrorToast(getString(R.string.scan_failed));
+            }
+        }
+    };
+
+    /**
+     * 注册广播
+     */
+    private void initReceiver(){
+
+        try {
+
+            String scanStr = getScanSetting();
+            scanBean = JsonUtil.getObject(scanStr, ScanBean.class);
+            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
+
+            if (is_broadcast ==1){
+                IntentFilter mFilter = new IntentFilter(scanBean.getAction());
+                this.registerReceiver(mReceiver, mFilter);
+            }else{
+                //不广播进行处理 jni模式
+                String pdaBrand = StoTongJNI.getmPdaBrand();
+                if (!pdaBrand.isEmpty()){
+                    StoTongJNI.getIns(this).setmScanCB(this);
+                    StoTongJNI.getIns(this).SetScannerOn();
+                }
+            }
+
+
+        }catch (Exception e) {
+            showErrorToast("获取扫码配置失败"+e.getMessage());
+            XLog.e("获取扫码配置失败:" + e.getMessage());
+        }
+    }
+
+
+    //统一按钮回调
+    public void callbackEditor(View v){
+        switch (v.getId()) {
+            case R.id.et_ctn:
+                if (!validate()){
+                    break;
+                }
+            case R.id.et_order_no:
+                doPutIn();
+                break;
+            default:
+        }
+    }
+
+
+
+
+
+    private void initEdit() {
+        List<EditText> list = new ArrayList<>();
+        list.add(etOrderNo);
+        list.add(etCtn);
+        unifyEdit(list);
+    }
+
+    private OnRxScanerListener mScanerListener = new OnRxScanerListener() {
+        @Override
+        public void onSuccess(String type, Result result) {
+            String scanResult = result.getText();
+            switch (type){
+                case BaseConfig.COMMON_SCANNER_ONLY:
+                    setScanResult(scanResult);
+
+                    break;
+            }
+        }
+        @Override
+        public void onFail(String type, String message) {
+
+        }
+    };
+
+    //把扫描结果赋值
+    private void setScanResult(String scanResult){
+        if (commonDialog!=null && commonDialog.isShowing()){
+            commonDialog.setContent(scanResult);
+            return;
+        }
+        //获取焦点的view对象
+        View view=getWindow().getDecorView().findFocus();
+        //如果是EditText
+        if(view instanceof EditText)
+        {
+            ((EditText) view).setText(scanResult);
+            //执行回调
+            callbackEditor(view);
+        }
+    }
+
+
+    private void doPutIn() {
+
+
+        try {
+            trackingNumber = etOrderNo.getText().toString().trim();
+            JSONObject param = new JSONObject();
+            param.put("tracking_number",trackingNumber);
+            param.put("ctn",etCtn.getText().toString().trim());
+
+            if (needCustomer){
+                param.put("customer_code",customerCode);
+            }
+            if (isChange>0){
+                param.put("is_change",isChange);
+            }
+
+            if (!checkRepeat(Urls.FXY_SCAN_PALLET_TRACKING+(param.toString()))){return;}
+
+            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FXY_SCAN_PALLET_TRACKING)
+                    .upJson(param)
+                    .execute(new MyDialogCallback(this, true, true) {
+                        @Override
+                        public void onSuccess(Response<String> response) {
+                            super.onSuccess(response);
+                            try {
+                                ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
+                                JSONObject result = new JSONObject();
+                                if (bean.data!=null && !bean.data.isEmpty() && !bean.data.equals("[]")){
+                                    result = new JSONObject(bean.data);
+                                }
+
+
+                                setPageViewData(result);
+                                if(bean.code == 1){
+                                    showSuccessToast(bean.msg);
+                                    if (result.has("is_success") && result.getInt("is_success")==1){
+                                        //提交数据
+                                        clearData();
+                                    }else{
+                                        //标记已检查通过
+                                        isCheck = true;
+                                        //检查订单号
+                                        etCtn.setEnabled(true);
+                                        etCtn.requestFocus();
+                                    }
+                                }else{
+
+                                    if (result.has("tag") && result.getString("tag").equals("need_customer")){
+                                        needCustomer = true;
+                                        commonDialog.setTitle("客户编号","请输入客户编号").setContent("").show();
+                                        llCustomerCode.setVisibility(View.VISIBLE);
+                                    }else if (result.has("is_change") && result.getInt("is_change")==1){
+                                        new AlertDialog.Builder(mContext)
+                                                .setTitle(R.string.dl_hint)
+                                                .setMessage(bean.msg)
+                                                .setNegativeButton(R.string.str_submit, new DialogInterface.OnClickListener() {
+                                                    @RequiresApi(api = Build.VERSION_CODES.KITKAT)
+                                                    @Override
+                                                    public void onClick(DialogInterface dialogInterface, int i) {
+                                                        isChange = 1;
+                                                        doPutIn();
+                                                    }
+                                                }).setPositiveButton(R.string.str_cancel, new DialogInterface.OnClickListener() {
+                                            @Override
+                                            public void onClick(DialogInterface dialogInterface, int i) {
+                                                //取消不做操作
+
+                                            }
+                                        }).show();
+                                    }else {
+                                        showWarningToast(bean.msg);
+                                        //当输入编号时
+                                        if (needCustomer){
+                                            commonDialog.setTitle("客户编号","请输入客户编号").show();
+                                            commonDialog.setContent(customerCode);
+                                            showWarningToast("请输入客户编号");
+                                        }
+                                    }
+
+                                }
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                                XLog.e("请求入库返回错误",e.getMessage());
+                            }
+                        }
+                    });
+        } catch (JSONException e) {
+            showEmptyView("请求入库失败:"+e.getMessage());
+            e.printStackTrace();
+        }
+
+
+    }
+
+    /*
+     * 校验必录
+     */
+    private boolean validate(){
+
+
+        if(!checkNull(etOrderNo)){
+            setEditTextFocused(etOrderNo,true);
+            showWarningToast(etOrderNo.getHint().toString());
+            return false;
+        }
+        if (needCustomer){
+            if(customerCode.isEmpty()){
+                commonDialog.setTitle("客户编号","请输入客户编号").setContent("").show();
+                showWarningToast("请输入客户编号");
+                return false;
+            }
+        }
+
+        if (isCheck){
+            if(!checkNull(etCtn)){
+                setEditTextFocused(etCtn,true);
+                showWarningToast(etCtn.getHint().toString());
+                return false;
+            }
+
+            if (!isNumeric(etCtn.getText().toString().trim())){
+                showWarningToast("请输入正整数");
+                return false;
+            }
+        }
+
+
+
+        return true;
+    }
+
+    private class FinishWorkAdapter extends BaseQuickAdapter<JSONObject, BaseViewHolder>{
+        public FinishWorkAdapter(List<JSONObject> data){
+            super(R.layout.item_putin_scan, data);
+        }
+
+
+        public void setNewData(List<JSONObject> tallyDataList) {
+        }
+
+        @Override
+        protected void convert(BaseViewHolder helper, JSONObject item) {
+            helper.addOnClickListener(R.id.ib_clear);//定义setOnItemChildClickListener 事件点击
+            try {
+                String number    = item.has("tracking_number")?item.getString("tracking_number"):"";
+                helper.setText(R.id.tv_number,number);
+                helper.getView(R.id.ib_clear).setVisibility(View.GONE);
+            } catch (Exception e) {
+                XLog.e("列表赋值错误",e);
+                e.printStackTrace();
+            }
+        }
+    }
+    private void initAdapter(){
+        emptyView = this.getLayoutInflater().inflate(R.layout.pager_empty, (ViewGroup) recyclerView.getParent(), false);
+        errorView = this.getLayoutInflater().inflate(R.layout.pager_error, (ViewGroup) recyclerView.getParent(), false);
+        notDataView = emptyView;
+
+        mAdapter  = new FinishWorkAdapter(tallyDataList);
+        mAdapter.setEmptyView(emptyView);
+        mAdapter.openLoadAnimation(BaseQuickAdapter.SCALEIN);
+        recyclerView.setLayoutManager(new LinearLayoutManager(this));
+        recyclerView.setAdapter(mAdapter);
+
+    }
+
+    /**
+     * 显示
+     * @param str
+     */
+    private void showList(String str){
+
+    }
+
+    private void setPageViewData(JSONObject jsonObject){
+        try {
+            String send_way = "";
+            String putin_qty = "";
+            if (jsonObject.has("list")){
+                String listStr = jsonObject.getString("list");
+                if ( !listStr.isEmpty() && !listStr.equals("[]")){
+                    tallyDataList.clear();
+                    JSONArray jsonArray = new JSONArray(listStr);
+                    for (int i = 0;i < jsonArray.length(); i++){
+                        JSONObject tallyObject = jsonArray.getJSONObject(i);
+                        tallyDataList.add(tallyObject);
+                    }
+                    mAdapter.setNewData(tallyDataList);
+                    mAdapter.notifyDataSetChanged();
+                }
+            }
+            if (jsonObject.has("send_way")){
+                send_way = jsonObject.getString("send_way");
+            }
+            if (jsonObject.has("qty")){
+                putin_qty = String.valueOf(jsonObject.getInt("qty"));
+            }
+            mtTrackingNumber.setText(trackingNumber);
+            mtSendWay.setText(send_way);
+            mtPutinQty.setText(putin_qty);
+
+        }catch (JSONException e) {
+            XLog.e("获取理货缓存数据错误",e);
+            e.printStackTrace();
+        }
+    }
+    //清除订单信息
+    private void clearData() {
+
+
+        llCustomerCode.setVisibility(View.GONE);
+
+        etOrderNo.setText("");
+        needCustomer = false;
+        isChange = 0;
+        trackingNumber = "";
+        customerCode = "";
+        isCheck = false;
+        etCtn.setText("");
+        etOrderNo.setEnabled(true);
+        etCtn.setEnabled(false);
+        etOrderNo.requestFocus();
+
+
+        setEditTextNormal(etCtn,true);
+        setEditTextNormal(etOrderNo,true);
+    }
+
+    @OnClick({R.id.ib_ctn_clear,R.id.tv_edit_customer})
+    public void onViewClicked(View view) {
+        Bundle bundle = new Bundle();
+        switch (view.getId()) {
+            case R.id.tv_edit_customer:
+                commonDialog.setTitle("客户编号","请输入客户编号")
+                        .setTypeCode("need_customer")
+                        .setContent(mtCustomerCode.getText().toString())
+                        .show();
+                break;
+            case R.id.ib_ctn_clear:
+
+                break;
+            default:
+                break;
+        }
+    }
+
+    /**
+     * 统一设置Edit监听
+     * @param  list
+     */
+    public void unifyEdit(List<EditText> list){
+        for (int i=0;i<list.size();i++){
+            EditText editText = list.get(i);
+
+            LinearLayout linearLayout = (LinearLayout)editText.getParent();
+            ImageButton imageButton = getChildImageButton(linearLayout);
+
+            //监听扫描
+            ImageView imageView = linearLayout.findViewById(R.id.ima_or_code);
+            if (imageView!=null){
+                imageView.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View v) {
+                        LinearLayout linearLayout = (LinearLayout)v.getParent();
+                        for( int i = 0; i < linearLayout.getChildCount(); i++ ){
+                            if( linearLayout.getChildAt(i) instanceof EditText ){
+                                ((EditText)linearLayout.getChildAt(i)).requestFocus();
+                                break;
+                            }
+                        }
+                        ActivityScanerCode.setScanerListener(mScanerListener);
+                        ActivityScanerCode.intent2Activity(mContext, BaseConfig.COMMON_SCANNER_ONLY);
+                    }
+                });
+            }
+
+
+
+            //监听按确定
+            editText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+                @Override
+                public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                    XLog.e("actionId:"+actionId);
+                    if (event!=null){
+                        XLog.e("KeyCode:"+event.getKeyCode()+"--ActionCode:"+event.getAction());
+                    }
+
+                    //|| (actionId == KeyEvent.ACTION_DOWN && event.getKeyCode()==KeyEvent.KEYCODE_ENTER )
+                    if (actionId == EditorInfo.IME_ACTION_SEND || actionId == EditorInfo.IME_ACTION_DONE ||
+                            (actionId == KeyEvent.ACTION_DOWN && event.getKeyCode()==KeyEvent.KEYCODE_ENTER )) {
+                        if (v.getText().toString().trim().isEmpty()) {
+                            setEditTextFocused(v,true);
+                            showWarningToast(v.getHint().toString());
+                            return true;
+                        }else{
+                            setEditTextNormal(v,true);
+                        }
+                        callbackEditor(v);
+                        return false;
+                    }
+                    return  false;
+
+                    //返回true,保留软键盘。false,隐藏软键盘
+                }
+            });
+            editText.addTextChangedListener(new TextWatcher() {
+                public void onTextChanged(CharSequence s, int start, int before, int count) {
+                    EditText currentEditText = null;
+                    ImageButton currentImage = null;
+                    //获取焦点的view对象
+                    View view=getWindow().getDecorView().findFocus();
+                    //如果是EditText
+                    if(view instanceof EditText){
+                        currentEditText = (EditText) view;
+                        currentImage = getChildImageButton((LinearLayout)currentEditText.getParent());
+                    }
+
+                    if (s.length() > 0  ) {
+
+                        if (currentImage !=null ){
+                            currentImage.setVisibility(View.VISIBLE);
+                        }
+                        if (currentEditText!=null){
+                            setEditTextNormal(currentEditText,true);
+                        }
+
+                    } else {
+                        if (currentImage !=null ){
+                            currentImage.setVisibility(View.INVISIBLE);
+                        }
+                        if (currentEditText!=null){
+                            setEditTextFocused(currentEditText,true);
+                        }
+                    }
+                }
+
+                public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+                }
+
+                public void afterTextChanged(Editable s) {
+
+                }
+            });
+
+            if (imageButton !=null ){
+                unifyClearEdit(imageButton);
+            }
+        }
+    }
+
+
+    @Override
+    protected void onDestroy() {
+        unbinder.unbind();
+
+
+        super.onDestroy();
+    }
+    @Override
+    protected void onResume() {
+        super.onResume();
+        initReceiver();
+    }
+    @Override
+    protected void onPause() {
+        super.onPause();
+        //销毁在onResume()方法中的广播
+        try {
+            //停止扫描
+            Integer is_broadcast = scanBean.getIsBroadcast();//是否广播
+            if (is_broadcast==0){
+                StoTongJNI.getIns(mContext).SetScannerStop();
+                StoTongJNI.getIns(mContext).SetScannerOff();
+            }else{
+                unregisterReceiver(mReceiver);
+            }
+        }catch (Exception e){
+            XLog.e("销毁广播失败:",e.getMessage());
+        }
+    }
+
+
+}

+ 46 - 17
app/src/main/java/com/fxy/putOut/DeliveryGoodsMainActivity.java

@@ -2,6 +2,7 @@ package com.fxy.putOut;
 
 import android.annotation.SuppressLint;
 import android.app.AlertDialog;
+import android.app.Dialog;
 import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.DialogInterface;
@@ -41,6 +42,7 @@ import com.fxy.baselibrary.util.StringUtils;
 import com.fxy.baselibrary.views.MarqueeTextView;
 import com.fxy.bean.ActionBean;
 import com.fxy.bean.ScanBean;
+import com.fxy.common.CommonDialog;
 import com.fxy.constant.BaseConfig;
 import com.fxy.constant.EventCode;
 import com.fxy.constant.SPCache;
@@ -124,8 +126,10 @@ public class DeliveryGoodsMainActivity extends  BaseActivity implements StoJNI.S
 
     private JSONObject outboundObject;
 
-    //托盘对象
-    private JSONObject outboundInfo = null;
+
+
+    private  CommonDialog commonDialog;
+
 
     @Override
     public int getContentViewResId() {
@@ -190,6 +194,7 @@ public class DeliveryGoodsMainActivity extends  BaseActivity implements StoJNI.S
         initAdapter();
         initData();
         initEdit();
+        initDialog();
         //监听浮动按钮
         iv_drag.setOnClickListener(new View.OnClickListener() {
             @Override
@@ -207,7 +212,21 @@ public class DeliveryGoodsMainActivity extends  BaseActivity implements StoJNI.S
 
     }
 
+    private void initDialog(){
+        commonDialog = new CommonDialog(mContext, R.style.dialog, "need_ctn", new CommonDialog.OnCloseListener() {
+            @Override
+            public void onClickCancel(Dialog dialog, boolean confirm) {
 
+                dialog.dismiss();
+            }
+            @Override
+            public void onClickSubmit(Dialog dialog, boolean confirm) {
+                String  ctn = commonDialog.contentTxt.getText().toString().trim();
+                addOutbound(ctn);
+            }
+        });
+
+    }
 
 
 
@@ -338,7 +357,7 @@ public class DeliveryGoodsMainActivity extends  BaseActivity implements StoJNI.S
                 getOutboundInfo();
                 break;
             case R.id.et_container_code:
-                addOutbound();
+                addOutbound("");
                 break;
             default:
         }
@@ -436,7 +455,6 @@ public class DeliveryGoodsMainActivity extends  BaseActivity implements StoJNI.S
                         }
                     });
         }catch (Exception e){
-            outboundInfo = null;
             XLog.e("请求托盘信息错误:"+e.getMessage(),e);
         }
     }
@@ -459,12 +477,12 @@ public class DeliveryGoodsMainActivity extends  BaseActivity implements StoJNI.S
                 jsonObject.put("is_confirm",is_confirm);
             }
 
-            if (!checkRepeat(Urls.FMS_FINISH_LOAD+(jsonObject.toString()))){
+            if (!checkRepeat(Urls.FXY_FINISH_LOAD+(jsonObject.toString()))){
                 Toast.makeText(this, getString(R.string.error_data_processed), Toast.LENGTH_LONG).show();
                 return;
             }
 
-            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FMS_FINISH_LOAD).upJson(jsonObject)
+            OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FXY_FINISH_LOAD).upJson(jsonObject)
                     .execute(new MyDialogCallback(this, true, true) {
                         @Override
                         public void onSuccess(Response<String> response) {
@@ -484,8 +502,9 @@ public class DeliveryGoodsMainActivity extends  BaseActivity implements StoJNI.S
                                     mAdapter.notifyDataSetChanged();
                                     etOrderNo.setText("");
                                     etOrderNo.requestFocus();
+                                    commonDialog.dismiss();
+                                    showSuccessToast(bean.msg);
 
-                                   showSuccessToast(bean.msg);
                                 }else{
 
                                     JSONObject result = new JSONObject();
@@ -526,26 +545,31 @@ public class DeliveryGoodsMainActivity extends  BaseActivity implements StoJNI.S
                         }
                     });
         }catch (Exception e){
-            outboundInfo = null;
             XLog.e("完成装柜错误:"+e.getMessage(),e);
         }
     }
 
-    private void addOutbound() {
+    private void addOutbound(String ctn) {
         //校验数据
         if (!validate()){
             return;
         }
 
+        if (!ctn.isEmpty() && !isNumeric(ctn)){
+            showWarningToast("请输入正整数");
+            return ;
+        }
+
+
         try {
             String pallet_code = etContainerCode.getText().toString().trim();
             final String outbound_number = etOrderNo.getText().toString().trim();
             JSONObject param = new JSONObject();
             param.put("pallet_code",pallet_code);
             param.put("outbound_number",outbound_number);
-
-
-
+            if (!ctn.isEmpty()){
+                param.put("ctn",ctn);
+            }
 
             if (!checkRepeat(Urls.FXY_ADD_OUTBOUND+(param.toString()))){return;}
 
@@ -567,7 +591,7 @@ public class DeliveryGoodsMainActivity extends  BaseActivity implements StoJNI.S
                                     showSuccessToast(bean.msg);
                                     clearData();
                                     setPageViewData(result);
-
+                                    commonDialog.dismiss();
                                 }else{
 
                                     if (result.has("is_confirm") && result.getInt("is_confirm")>0){
@@ -587,6 +611,12 @@ public class DeliveryGoodsMainActivity extends  BaseActivity implements StoJNI.S
 
                                             }
                                         }).show();
+                                    }else if(result.has("need_ctn") && result.getInt("need_ctn") == 1) {
+
+                                        commonDialog.setTitle("托数","请输入托数")
+                                                .setTypeCode("need_ctn")
+                                                .show();
+                                        commonDialog.setContent("");
                                     }else {
                                         showWarningToast(bean.msg);
                                     }
@@ -721,7 +751,6 @@ public class DeliveryGoodsMainActivity extends  BaseActivity implements StoJNI.S
                         }
                     });
         }catch (Exception e){
-            outboundInfo = null;
             XLog.e("删除出库错误:"+e.getMessage(),e);
         }
     }
@@ -838,16 +867,16 @@ public class DeliveryGoodsMainActivity extends  BaseActivity implements StoJNI.S
                         if (v.getText().toString().trim().isEmpty()) {
                             setEditTextFocused(v,true);
                             showWarningToast(v.getHint().toString());
-                            return false;
+                            return true;
                         }else{
                             setEditTextNormal(v,true);
                         }
 
                         callbackEditor(v);
 
-                        return false;
+                        return true;
                     }
-                    return false;
+                    return true;
                 }
             });
             editText.addTextChangedListener(new TextWatcher() {

BIN
app/src/main/res/drawable-xxhdpi/ic_tray.png


BIN
app/src/main/res/drawable-xxhdpi/ic_tray2.png


+ 11 - 0
app/src/main/res/drawable/bg_round_edit_background.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item>
+        <shape android:shape="rectangle">
+            <corners android:radius="5dp"/>
+            <stroke
+                android:width="1dp"
+                android:color="#958D8D"/>
+        </shape>
+    </item>
+</layer-list>

+ 7 - 0
app/src/main/res/drawable/bg_round_left_white.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
+    <corners android:radius="5dp" />
+    <stroke
+        android:width="1dp"
+        android:color="#d6d6d6"/>
+</shape>

+ 5 - 0
app/src/main/res/drawable/bg_round_right_white.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
+    <solid android:color="#FF690F" />
+    <corners android:radius="5dp" />
+</shape>

+ 5 - 0
app/src/main/res/drawable/bg_round_white.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
+    <solid android:color="#ffffff" />
+    <corners android:radius="10dp" />
+</shape>

+ 5 - 0
app/src/main/res/drawable/color_cursor.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
+    <size android:width="2dp" />
+    <solid android:color="@color/md_orange_STO"  />
+</shape>

+ 4 - 3
app/src/main/res/layout/activity_fms_storage_add.xml

@@ -81,20 +81,21 @@
                 android:gravity= "center"
                 android:orientation="horizontal"
                 android:padding="10dp">
+
                 <TextView
-                    style="@style/fontSize"
                     android:id="@+id/btn_add_loader"
+                    style="@style/fontSize"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_marginLeft="@dimen/dp_10"
                     android:layout_marginRight="@dimen/dp_10"
                     android:background="@drawable/bg_orange_item"
                     android:gravity="center"
-                    android:text="装柜"
-                    android:paddingRight="40dp"
                     android:paddingLeft="40dp"
                     android:paddingTop="@dimen/dp_10"
+                    android:paddingRight="40dp"
                     android:paddingBottom="@dimen/dp_10"
+                    android:text="装柜"
                     android:textColor="@color/white"
                     android:visibility="visible" />
                 <TextView

+ 63 - 31
app/src/main/res/layout/activity_fxy_tally.xml

@@ -64,37 +64,6 @@
             </LinearLayout>
 
 
-            <LinearLayout
-                android:id="@+id/ll_customer"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginLeft="@dimen/dp_10"
-                android:gravity="center_vertical"
-                android:visibility="gone"
-                android:orientation="horizontal">
-                <TextView
-                    style="@style/tvLeftStyle"
-                    android:text="FX" />
-
-                <LinearLayout
-                    style="@style/FromLinearLayoutItem"
-                    android:layout_width="match_parent"
-                    android:orientation="horizontal">
-
-                    <EditText
-                        android:id="@+id/et_customer_code"
-                        style="@style/EditTextStyle"
-                        android:hint="请输入客户编号"
-                        android:text=""  />
-
-                    <ImageButton style="@style/ClearImg" />
-
-                    <include layout="@layout/item_image_code" />
-                </LinearLayout>
-
-            </LinearLayout>
-
-
             <View
                 android:layout_width="match_parent"
                 android:layout_height="1dp"
@@ -132,6 +101,11 @@
                         />
 
                 </LinearLayout>
+
+
+
+
+
                 <LinearLayout
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
@@ -174,6 +148,64 @@
                 </LinearLayout>
 
 
+                <LinearLayout
+                    android:id="@+id/ll_customer_code"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:paddingBottom="5dp"
+                    android:paddingTop="5dp"
+                    android:visibility="gone"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text="客户编号" />
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text=":" />
+
+                    <com.fxy.baselibrary.views.MarqueeTextView
+                        style="@style/mtRightStyle"
+                        android:id="@+id/mt_customer_code"
+                        />
+
+                    <TextView
+                        android:id="@+id/tv_edit_customer"
+                        style="@style/tvLeftStyle"
+                        android:layout_height="42dp"
+                        android:text="修改"
+                        android:textColor="@color/actionsheet_blue" />
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:id="@+id/ll_cnt"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:paddingBottom="5dp"
+                    android:paddingTop="5dp"
+                    android:visibility="gone"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text="箱数" />
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text=":" />
+
+                    <com.fxy.baselibrary.views.MarqueeTextView
+                        style="@style/mtRightStyle"
+                        android:id="@+id/mt_cnt"
+                        />
+                    <TextView
+                        android:id="@+id/tv_edit_cnt"
+                        style="@style/tvLeftStyle"
+                        android:textColor="@color/actionsheet_blue"
+                        android:text="修改" />
+
+                </LinearLayout>
+
             </LinearLayout>
 
             <View

+ 215 - 0
app/src/main/res/layout/activity_fxy_tray.xml

@@ -0,0 +1,215 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout 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"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:background="@color/md_grey_100"
+    android:orientation="vertical">
+
+    <ScrollView
+        android:id="@+id/ll_scroll_view"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:scrollbars="none">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical">
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="4dp"
+                android:background="@color/md_grey_100" />
+
+            <LinearLayout
+                style="@style/FromLinearLayoutItem"
+                android:orientation="horizontal">
+                <EditText
+                    style="@style/EditTextStyle"
+                    android:id="@+id/et_order_no"
+                    android:hint="@string/hint_please_scan_no"
+                    android:text=""/>
+                <ImageButton
+                    style="@style/ClearImg"
+                    android:id="@+id/ib_order_no_clear"
+                    />
+
+                <include   layout="@layout/item_image_code" />
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="4dp"
+                android:background="@color/md_grey_100" />
+
+            <LinearLayout
+                style="@style/FromLinearLayoutItem"
+                android:orientation="horizontal">
+                <EditText
+                    style="@style/EditTextStyle"
+                    android:id="@+id/et_ctn"
+                    android:hint="请输入托数"
+                    android:enabled="false"
+                    android:text=""/>
+                <ImageButton style="@style/ClearImg" android:id="@+id/ib_ctn_clear" />
+
+            </LinearLayout>
+
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/md_grey_100" />
+
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10"
+                android:layout_marginTop="@dimen/dp_10"
+                android:background="@drawable/bg_white_et"
+                android:gravity="center_vertical"
+                android:orientation="vertical"
+                android:paddingLeft="10dp"
+                android:paddingRight="10dp">
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:paddingBottom="5dp"
+                    android:paddingTop="5dp"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text="入库单号" />
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text=":" />
+
+                    <com.fxy.baselibrary.views.MarqueeTextView
+                        style="@style/mtRightStyle"
+                        android:id="@+id/mt_tracking_number"
+                        />
+
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:paddingBottom="5dp"
+                    android:paddingTop="5dp"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text="货物类型" />
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text=":" />
+
+                    <com.fxy.baselibrary.views.MarqueeTextView
+                        style="@style/mtRightStyle"
+                        android:id="@+id/mt_send_way"
+                        />
+
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:paddingBottom="5dp"
+                    android:paddingTop="5dp"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text="入库托数" />
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text=":" />
+
+                    <com.fxy.baselibrary.views.MarqueeTextView
+                        style="@style/mtRightStyle"
+                        android:id="@+id/mt_putin_qty"
+                        />
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:id="@+id/ll_customer_code"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:paddingBottom="5dp"
+                    android:paddingTop="5dp"
+                    android:visibility="gone"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text="客户编号" />
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text=":" />
+
+                    <com.fxy.baselibrary.views.MarqueeTextView
+                        style="@style/mtRightStyle"
+                        android:id="@+id/mt_customer_code"
+                        />
+
+                    <TextView
+                        android:id="@+id/tv_edit_customer"
+                        style="@style/tvLeftStyle"
+                        android:layout_height="42dp"
+                        android:text="修改"
+                        android:textColor="@color/actionsheet_blue" />
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="@color/md_grey_100" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:paddingBottom="5dp"
+                android:paddingTop="5dp"
+                android:orientation="horizontal">
+                <TextView
+                    android:layout_marginLeft="@dimen/dp_10"
+                    style="@style/tvLeftStyle"
+                    android:text="最近扫描:" />
+
+
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:background="@drawable/bg_white_et"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10"
+                android:gravity="center_vertical"
+                android:orientation="horizontal"
+                android:scrollbars="vertical"
+                android:paddingTop="@dimen/dp_10"
+                android:paddingBottom="@dimen/dp_10"
+                >
+                <android.support.v7.widget.RecyclerView
+                    android:id="@+id/recyclerview"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:background="#fff"
+                    android:overScrollMode="never"/>
+            </LinearLayout>
+
+        </LinearLayout>
+    </ScrollView>
+
+
+    <include layout="@layout/item_float_image" />
+</LinearLayout>

+ 109 - 0
app/src/main/res/layout/dialog_normal_layout.xml

@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@drawable/bg_round_white"
+    android:layout_margin="@dimen/dp_10"
+    android:paddingTop="@dimen/dp_10"
+    android:paddingBottom="@dimen/dp_10"
+    android:orientation="vertical"
+    tools:ignore="MissingConstraints">
+
+
+    <TextView
+        android:id="@+id/title"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:gravity="center_horizontal"
+        android:padding="5dp"
+        android:text="标题提示"
+        android:background="@color/white"
+        android:textColor="@color/black_3d3d3d"
+        android:textSize="16sp" />
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="#ccc"/>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="35dp"
+        android:layout_marginTop="20dp"
+        android:layout_marginBottom="20dp"
+        android:layout_marginLeft="20dp"
+        android:layout_marginRight="20dp"
+        android:orientation="horizontal">
+
+        <TextView
+            android:id="@+id/tv_content_label"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:gravity="center_horizontal"
+            android:padding="5dp"
+            android:text="FX"
+            android:background="@color/white"
+            android:textColor="@color/black_3d3d3d"
+            android:layout_marginEnd="10dp"
+            android:textSize="16sp" />
+        <EditText
+            android:id="@+id/et_content"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center_horizontal"
+            android:padding="@dimen/dp_10"
+            android:hint="请输入"
+            android:lineSpacingExtra="3dp"
+            android:background="@drawable/bg_round_edit_background"
+            android:textCursorDrawable="@drawable/color_cursor"
+            android:cursorVisible="true"
+            android:textSize="14sp"
+            android:inputType="number"
+            android:text=""
+            android:textColor="@color/black_3d3d3d"/>
+        <ImageButton
+            style="@style/ClearImg"
+            android:id="@+id/ib_clear"
+            />
+    </LinearLayout>
+
+
+
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="35dp"
+        android:layout_marginLeft="20dp"
+        android:layout_marginRight="20dp"
+        android:orientation="horizontal">
+
+
+        <TextView
+            android:id="@+id/cancel"
+            android:layout_width="25dp"
+            android:layout_height="match_parent"
+            android:background="@drawable/bg_round_left_white"
+            android:layout_weight="1.0"
+            android:gravity="center"
+            android:text="取消"
+            android:textSize="12sp"
+            android:textColor="@color/black_3d3d3d"/>
+
+        <View
+            android:layout_width="40dp"
+            android:layout_height="match_parent"
+            />
+
+
+        <TextView
+            android:id="@+id/submit"
+            android:layout_width="25dp"
+            android:layout_height="match_parent"
+            android:background="@drawable/bg_round_right_white"
+            android:gravity="center"
+            android:layout_weight="1.0"
+            android:text="确定"
+            android:textSize="12sp"
+            android:textColor="#fff"/>
+    </LinearLayout>
+</LinearLayout>

+ 6 - 0
app/src/main/res/layout/fragment_homepager.xml

@@ -104,6 +104,12 @@
                         android:drawableTop="@drawable/ic_mapan"
                         android:drawablePadding="5dp"
                         android:text="快速入库" />
+                    <TextView
+                        style="@style/ImageViewWithTextStyle.FontSize"
+                        android:id="@+id/ivt_tray"
+                        android:drawableTop="@drawable/ic_tray"
+                        android:drawablePadding="5dp"
+                        android:text="托盘入库" />
 
 
                 </TableRow>

+ 20 - 1
app/src/main/res/values/styles.xml

@@ -126,7 +126,7 @@
         <item name="android:layout_marginEnd">3dp</item>
         <item name="android:background">@android:color/transparent</item>
         <item name="android:padding">6dp</item>
-        <item name="android:src">@drawable/ic_clear2</item>
+        <item name="android:src">@drawable/ic_clear</item>
         <item name="android:visibility">invisible</item>
     </style>
 
@@ -178,4 +178,23 @@
         <item name="android:textColor">@color/font_color_3</item>
         <item name="android:textSize">@dimen/t20</item>
     </style>
+
+
+    <!--弹窗输入 parent="android:Theme.Dialog" @android:style/Theme.Dialog-->
+    <style name="dialog"  parent="@android:style/Theme.Dialog">
+        <item name="android:windowFrame">@null</item>
+        <!--边框-->
+        <item name="android:windowIsFloating">true</item>
+        <!--是否浮现在activity之上-->
+        <item name="android:windowIsTranslucent">false</item>
+        <!--半透明-->
+        <item name="android:windowNoTitle">true</item>
+        <!--无标题-->
+        <item name="android:windowBackground">@android:color/transparent</item>
+        <!--背景透明-->
+        <item name="android:backgroundDimEnabled">true</item>
+        <!--模糊-->
+
+    </style>
+
 </resources>

+ 2 - 2
config.gradle

@@ -8,8 +8,8 @@ ext {
             minSdkVersion    : 17,
             targetSdkVersion : 23,
             versionCode      : 1,
-            versionName      : "1.0.0",
-            versionApi       : "1.0",
+            versionName      : "1.1.0",
+            versionApi       : "1.1",
     ]
 
     dependencies = [

+ 1 - 1
gradle.properties

@@ -23,4 +23,4 @@ org.gradle.damen=true
 org.gradle.parallel=true
 ##启用新的孵化模式
 org.gradle.configureondemand=true
-android.injected.testOnly=false
+android.injected.testOnly=false