소스 검색

第一版

guilin 8 달 전
부모
커밋
a73443c011
27개의 변경된 파일2256개의 추가작업 그리고 330개의 파일을 삭제
  1. 6 0
      app/src/main/AndroidManifest.xml
  2. 3 0
      app/src/main/java/com/fxy/adapter/GridImageAdapter.java
  3. 239 0
      app/src/main/java/com/fxy/adapter/PictureListAdapter.java
  4. 39 50
      app/src/main/java/com/fxy/adapter/ShowPictureAdapter.java
  5. 14 0
      app/src/main/java/com/fxy/common/PictureSelectorUpload.java
  6. 703 0
      app/src/main/java/com/fxy/detection/DetectionConfirmGoodsMainActivity.java
  7. 1 1
      app/src/main/java/com/fxy/detection/DetectionDestroyOutboundMainActivity.java
  8. 2 2
      app/src/main/java/com/fxy/detection/DetectionPutInMainActivity.java
  9. 3 2
      app/src/main/java/com/fxy/detection/DetectionPutawayMainActivity.java
  10. 356 201
      app/src/main/java/com/fxy/detection/DetectionWorkMainActivity.java
  11. 86 0
      app/src/main/java/com/fxy/detection/bean/BoxInfoBean.java
  12. 116 0
      app/src/main/java/com/fxy/detection/bean/BoxSkuBean.java
  13. 95 0
      app/src/main/java/com/fxy/detection/bean/StepsBaseBean.java
  14. 161 0
      app/src/main/java/com/fxy/detection/bean/StepsInfoBean.java
  15. 114 0
      app/src/main/java/com/fxy/detection/bean/StepsPictureBean.java
  16. 2 1
      app/src/main/java/com/fxy/main/fragment/HomePagerFragment.java
  17. 12 3
      app/src/main/java/com/fxy/net/Urls.java
  18. 5 0
      app/src/main/res/drawable/selectable_background.xml
  19. 99 0
      app/src/main/res/layout/activity_fxy_detection_confirm_goods.xml
  20. 1 1
      app/src/main/res/layout/activity_fxy_detection_putaway.xml
  21. 91 32
      app/src/main/res/layout/activity_fxy_detection_work.xml
  22. 41 0
      app/src/main/res/layout/item_picture_selector.xml
  23. 29 37
      app/src/main/res/layout/item_preview_image.xml
  24. 19 0
      app/src/main/res/layout/item_sku_img.xml
  25. 2 0
      app/src/main/res/values/colors.xml
  26. 9 0
      app/src/main/res/values/styles.xml
  27. 8 0
      baselibrary/src/main/java/com/fxy/baselibrary/util/JsonUtil.java

+ 6 - 0
app/src/main/AndroidManifest.xml

@@ -224,6 +224,12 @@
             android:screenOrientation="sensor"
             android:configChanges="orientation|keyboardHidden|screenSize"
             tools:ignore="LockedOrientationActivity"/>
+        <activity
+            android:name=".detection.DetectionConfirmGoodsMainActivity"
+            android:windowSoftInputMode="stateHidden|adjustPan"
+            android:screenOrientation="sensor"
+            android:configChanges="orientation|keyboardHidden|screenSize"
+            tools:ignore="LockedOrientationActivity"/>
 
 
         <activity

+ 3 - 0
app/src/main/java/com/fxy/adapter/GridImageAdapter.java

@@ -256,6 +256,9 @@ public class GridImageAdapter extends RecyclerView.Adapter<GridImageAdapter.View
     public void setPhotoPath(String photoPath) {
         ossPhotoList.add(photoPath);
     }
+    public void setPhotoPath( ArrayList<String> AllPhotoPath) {
+        ossPhotoList = AllPhotoPath;
+    }
     public ArrayList<String> getPhotoList(){
         return ossPhotoList;
     }

+ 239 - 0
app/src/main/java/com/fxy/adapter/PictureListAdapter.java

@@ -0,0 +1,239 @@
+package com.fxy.adapter;
+
+import android.annotation.SuppressLint;
+import android.app.Activity;
+import android.content.Context;
+import android.graphics.drawable.Drawable;
+import android.support.v4.content.ContextCompat;
+import android.support.v7.widget.GridLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.util.DisplayMetrics;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
+import android.widget.ImageView;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import com.bumptech.glide.Glide;
+import com.bumptech.glide.load.engine.DiskCacheStrategy;
+import com.bumptech.glide.request.RequestOptions;
+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.views.dialog.RxDialogZoomImageView;
+import com.fxy.detection.bean.StepsPictureBean;
+import com.fxy.view.FullyGridLayoutManager;
+import com.luck.picture.lib.PictureSelector;
+import com.luck.picture.lib.config.PictureConfig;
+import com.luck.picture.lib.config.PictureMimeType;
+import com.luck.picture.lib.entity.LocalMedia;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static com.fxy.baselibrary.util.Tools.getScreenHeight;
+import static com.fxy.baselibrary.util.Tools.getScreenWidth;
+
+public class PictureListAdapter extends BaseQuickAdapter<StepsPictureBean, BaseViewHolder> {
+    private LayoutInflater mInflater;
+    private Context context;
+    private Activity mActivity;
+    private String PictureType = "";
+    private String tag = "";//各种特殊标识使用
+    private int screenWidth;
+    private int screenHeight;
+    private  float density;
+    private int spanCount;
+
+    private View errorView;     //错误显示页
+    private View emptyView;     //空显示页
+    private RecyclerView recyclerView;
+
+    private  onAddPicClickListener mOnAddPicClickListener;
+
+    public interface onAddPicClickListener {
+        void onAddPicClick(String PictureType);
+    }
+    public void setAddPicClick(onAddPicClickListener listener) {
+        this.mOnAddPicClickListener = listener;
+    }
+
+    //
+//    private OnItemClickListener mItemClickListener;
+//
+//    public interface OnItemClickListener {
+//        void onItemClick(int position, View v,String PictureType);
+//    }
+//
+//    public void setOnItemClickListener(OnItemClickListener listener) {
+//        this.mItemClickListener = listener;
+//    }
+
+    public PictureListAdapter(Context context, Activity activity, RecyclerView view, List<StepsPictureBean> list, String type){
+        super(R.layout.item_preview_image, list);
+        this.context = context;
+        this.mActivity = activity;
+        mInflater = LayoutInflater.from(context);
+        recyclerView = view;
+        PictureType  = type;
+
+        emptyView = mInflater.inflate(R.layout.pager_empty, (ViewGroup) recyclerView.getParent(), false);
+        errorView = mInflater.inflate(R.layout.pager_error, (ViewGroup) recyclerView.getParent(), false);
+        setEmptyView(emptyView);
+        openLoadAnimation(BaseQuickAdapter.SCALEIN);
+
+        DisplayMetrics displayMetrics = new DisplayMetrics();
+        activity.getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
+        screenHeight = displayMetrics.heightPixels; // 屏幕高度(像素)
+        screenWidth = displayMetrics.widthPixels; // 屏幕高度(像素)
+        density = activity.getResources().getDisplayMetrics().density;
+
+        spanCount = 3;
+        if (Math.max(screenHeight,screenWidth)>1000){
+            spanCount = (int) screenWidth/500;
+        }
+
+
+
+        recyclerView.setLayoutManager(new FullyGridLayoutManager(mContext, spanCount, GridLayoutManager.VERTICAL, false));
+        recyclerView.setAdapter(this);
+
+
+    }
+
+    public void setPictureType(String type){
+        PictureType  = type;
+    }
+    public void setTag(String str){
+        tag  = str;
+    }
+
+
+//    public void setNewData( List<StepsPictureBean> list){
+//        super(list);
+//    }
+
+
+    @Override
+    protected void convert(BaseViewHolder helper, StepsPictureBean item) {
+        //定义setOnItemChildClickListener 事件点击
+        helper.addOnClickListener(R.id.cb_select);
+        helper.addOnClickListener(R.id.ivp_img);
+        helper.addOnClickListener(R.id.tv_name);
+
+         ImageView  mImg = helper.getView(R.id.ivp_img);
+         CheckBox cbSelect = helper.getView(R.id.cb_select);
+         TextView tvName = helper.getView(R.id.tv_name);
+        RelativeLayout llImgCenter = helper.getView(R.id.ll_img_center);
+
+
+        // 设置宽度为 200 像素
+        if (Math.max(screenHeight,screenWidth)>1000){
+            RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) llImgCenter.getLayoutParams();
+
+            layoutParams.width = getDpValue(100,density);
+            layoutParams.setMargins(10,10,10,10);
+            llImgCenter.setLayoutParams(layoutParams);
+
+
+            // 获取ImageView的当前LayoutParams(假设它是RelativeLayout的子视图)
+//            RelativeLayout.LayoutParams imgParams = (RelativeLayout.LayoutParams) mImg.getLayoutParams();
+//            // 设置新的宽度,并保持高度不变(WRAP_CONTENT)
+//            imgParams.width = getDpValue(200,density); // 或者你可以使用 layoutParams.width = LinearLayout.LayoutParams.WRAP_CONTENT;
+//            imgParams.height = getDpValue(200,density); // 或者你可以使用 layoutParams.width = LinearLayout.LayoutParams.WRAP_CONTENT;
+//            mImg.setLayoutParams(layoutParams);
+
+
+        }
+
+
+
+        tvName.setVisibility(View.VISIBLE);
+        tvName.setText(item.getDesc());
+
+         if (item.getType().equals("picture") && !item.getUrl().isEmpty()){
+             mImg.setVisibility(View.VISIBLE);
+             cbSelect.setVisibility(View.VISIBLE);
+             cbSelect.setChecked((boolean)item.getChecked());
+
+             RequestOptions options = new RequestOptions()
+                     .centerCrop()
+                     .placeholder(R.color.color_f6)
+                     .diskCacheStrategy(DiskCacheStrategy.ALL);
+
+             Glide.with(helper.itemView.getContext())
+                     .load(item.getUrl())
+                     .apply(options)
+                     .into(mImg);
+
+         }else{
+             mImg.setVisibility(View.GONE);
+             cbSelect.setVisibility(View.VISIBLE);
+         }
+
+
+
+        cbSelect.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+            @Override
+            public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+                RelativeLayout parentLinearLayout = (RelativeLayout) buttonView.getParent();
+
+                View overlayView =  parentLinearLayout.findViewById(R.id.overlay_view);
+
+                // 当checkbox1的选中状态改变时执行
+                if (isChecked) {
+                    overlayView.setVisibility(View.VISIBLE);
+                } else {
+                    overlayView.setVisibility(View.GONE);
+                }
+            }
+        });
+
+        mImg.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+
+                XLog.e("--------setOnClickListener------");
+                int position = RecyclerView.NO_POSITION;
+                position = Math.max(position, 0);
+//                List<LocalMedia> mediasList = new ArrayList<>();
+//                for (int i = 0; i < mData.size(); i++) {
+//                    LocalMedia media = new LocalMedia (mData.get(i).getUrl(), 0, PictureConfig.TYPE_IMAGE, "");
+//                    media.setCut(false);
+//                    mediasList.add(media);
+//
+//                }
+//                com.luck.picture.lib.PictureSelector.create(mActivity).externalPicturePreview(position, mediasList);
+
+                RxDialogZoomImageView rxDialogZoomImageView = new RxDialogZoomImageView(mContext);
+                rxDialogZoomImageView.setImagePath(mData.get(position).getUrl());
+                rxDialogZoomImageView.show();
+
+            }
+        });
+
+
+    }
+
+    private int getDpValue(int dpValue,float density){
+        return Math.round((float)dpValue * density);
+    }
+
+    public void authCamera() {
+        //拍照
+        com.luck.picture.lib.PictureSelector.create(mActivity)
+                .openCamera(PictureMimeType.ofImage())
+                //只需要拍照
+                //.selectionMode(PictureConfig.SINGLE)
+//                .isCamera(true)
+                //.compressMaxKB()//压缩最大值kb compressGrade()为Luban.CUSTOM_GEAR有效
+                .compress(true) // 压缩
+                .cropCompressQuality(100)// 裁剪压缩质量 默认100
+                .minimumCompressSize(100) //最新压缩图片 默认100
+                .forResult(PictureConfig.REQUEST_CAMERA);
+    }
+}

+ 39 - 50
app/src/main/java/com/fxy/adapter/ShowPictureAdapter.java

@@ -1,51 +1,24 @@
 package com.fxy.adapter;
 
-import android.annotation.SuppressLint;
 import android.app.Activity;
 import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.graphics.drawable.Drawable;
-import android.os.Environment;
-import android.support.v4.app.ActivityCompat;
-import android.support.v4.content.ContextCompat;
 import android.support.v7.widget.RecyclerView;
-import android.util.Log;
-import android.view.Gravity;
 import android.view.LayoutInflater;
-import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.CheckBox;
 import android.widget.CompoundButton;
 import android.widget.ImageView;
-import android.widget.LinearLayout;
-import android.widget.ProgressBar;
-import android.widget.RadioButton;
-import android.widget.RadioGroup;
-import android.widget.TextView;
-import android.widget.Toast;
 
 import com.bumptech.glide.Glide;
 import com.bumptech.glide.load.engine.DiskCacheStrategy;
 import com.bumptech.glide.request.RequestOptions;
-import com.elvishew.xlog.XLog;
 import com.fxy.R;
-import com.fxy.common.AudioRecoderDialog;
-import com.fxy.utils.AudioRecoderUtils;
-import com.luck.picture.lib.config.PictureConfig;
-import com.luck.picture.lib.config.PictureMimeType;
+import com.fxy.detection.bean.StepsPictureBean;
 import com.luck.picture.lib.entity.LocalMedia;
-import com.luck.picture.lib.tools.DateUtils;
-import com.luck.picture.lib.tools.StringUtils;
 
-import java.io.File;
-import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.UUID;
-
-import es.dmoral.toasty.Toasty;
 
 
 public class ShowPictureAdapter extends RecyclerView.Adapter<ShowPictureAdapter.ViewHolder> {
@@ -68,6 +41,13 @@ public class ShowPictureAdapter extends RecyclerView.Adapter<ShowPictureAdapter.
     }
 
 
+    public ShowPictureAdapter(Context context, Activity activity, onAddPicClickListener mOnAddPicClickListener) {
+        this.context = context;
+        this.mActivity = activity;
+        mInflater = LayoutInflater.from(context);
+        this.mOnAddPicClickListener = mOnAddPicClickListener;
+    }
+
     public ShowPictureAdapter(Context context, Activity activity, onAddPicClickListener mOnAddPicClickListener, List<String> list) {
         this.context = context;
         this.mActivity = activity;
@@ -77,7 +57,17 @@ public class ShowPictureAdapter extends RecyclerView.Adapter<ShowPictureAdapter.
     }
 
     public void setList( List<String> list) {
+        pictureList.clear();
         this.pictureList = list;
+
+    }
+
+    public void setBeanList( List<StepsPictureBean> list) {
+
+        pictureList.clear();
+        for (int i = 0; i < list.size(); i++) {
+            pictureList.add(list.get(i).getUrl());
+        }
     }
 
     /**
@@ -113,14 +103,13 @@ public class ShowPictureAdapter extends RecyclerView.Adapter<ShowPictureAdapter.
             super(view);
             mImg = view.findViewById(R.id.ivp_img);
             cbSelect = view.findViewById(R.id.cb_select);
-            selectedOverlay = view.findViewById(R.id.selected_overlay);
         }
     }
 
     @Override
     public int getItemCount() {
         if (pictureList.size() < selectMax) {
-            return pictureList.size() + 1;
+            return pictureList.size();
         } else {
             return pictureList.size();
         }
@@ -132,7 +121,7 @@ public class ShowPictureAdapter extends RecyclerView.Adapter<ShowPictureAdapter.
      */
     @Override
     public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
-        View view = mInflater.inflate(R.layout.item_filter_image, viewGroup, false);
+        View view = mInflater.inflate(R.layout.item_preview_image, viewGroup, false);
         return new ViewHolder(view);
     }
     /**
@@ -156,29 +145,29 @@ public class ShowPictureAdapter extends RecyclerView.Adapter<ShowPictureAdapter.
             }
         });
 
+        if (pictureList.size()>0){
+            String path = pictureList.get(position);
+            RequestOptions options = new RequestOptions()
+                    .centerCrop()
+                    .placeholder(R.color.color_f6)
+                    .diskCacheStrategy(DiskCacheStrategy.ALL);
+            Glide.with(viewHolder.itemView.getContext())
+                    .load(path)
+                    .apply(options)
+                    .into(viewHolder.mImg);
+        }
 
 
-        String path = pictureList.get(position);
-        RequestOptions options = new RequestOptions()
-                .centerCrop()
-                .placeholder(R.color.color_f6)
-                .diskCacheStrategy(DiskCacheStrategy.ALL);
-        Glide.with(viewHolder.itemView.getContext())
-                .load(path)
-                .apply(options)
-                .into(viewHolder.mImg);
-
-        //itemView 的点击事件
-        if (mItemClickListener != null) {
-            viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
-                @Override
-                public void onClick(View v) {
-                    int adapterPosition = viewHolder.getAdapterPosition();
+        viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                int adapterPosition = viewHolder.getAdapterPosition();
+                //外部定义了
+                if (mItemClickListener != null) {
                     mItemClickListener.onItemClick(adapterPosition, v);
                 }
-            });
-        }
-
+            }
+        });
     }
 
     private OnItemClickListener mItemClickListener;

+ 14 - 0
app/src/main/java/com/fxy/common/PictureSelectorUpload.java

@@ -170,6 +170,20 @@ public class PictureSelectorUpload {
         return  adapter.getPhotoList();
     }
 
+    public List<LocalMedia> getSelectList(){
+        return  selectList;
+    }
+
+    public void setSelectList(List<LocalMedia> selectList,ArrayList<String> photoPathList){
+        if (selectList != null){
+            ossPhotoList = photoPathList;
+            adapter.setPhotoPath(photoPathList);
+            adapter.setList(selectList);
+            adapter.notifyDataSetChanged();
+        }
+    }
+
+
 
     public void emptyRemake(){
         selectList.clear();

+ 703 - 0
app/src/main/java/com/fxy/detection/DetectionConfirmGoodsMainActivity.java

@@ -0,0 +1,703 @@
+package com.fxy.detection;
+
+import android.annotation.SuppressLint;
+import android.app.Activity;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.Message;
+import android.support.v7.widget.GridLayoutManager;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.text.Editable;
+import android.text.TextWatcher;
+import android.util.DisplayMetrics;
+import android.view.KeyEvent;
+import android.view.LayoutInflater;
+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 com.bumptech.glide.Glide;
+import com.bumptech.glide.load.engine.DiskCacheStrategy;
+import com.bumptech.glide.request.RequestOptions;
+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.adapter.PictureListAdapter;
+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.bean.ActionBean;
+import com.fxy.bean.ScanBean;
+import com.fxy.constant.BaseConfig;
+import com.fxy.constant.EventCode;
+import com.fxy.detection.bean.BoxInfoBean;
+import com.fxy.detection.bean.BoxSkuBean;
+import com.fxy.mine.PictureSelectorActivity;
+import com.fxy.net.MyDialogCallback;
+import com.fxy.net.Urls;
+import com.fxy.putIn.TallyMainActivity;
+import com.fxy.view.FloatingImageView;
+import com.fxy.view.FullyGridLayoutManager;
+import com.google.zxing.Result;
+import com.lzy.okgo.OkGo;
+import com.lzy.okgo.model.Response;
+
+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 DetectionConfirmGoodsMainActivity extends BaseActivity implements StoJNI.ScanCallBack {
+    /**
+     * 列表适配器
+     */
+    Context mContext = this;
+    Activity mActivity = this;
+    //单号
+    @BindView(R.id.et_box_code)
+    EditText etBoxCode;
+
+    //单号
+    @BindView(R.id.et_unit_code)
+    EditText etUnitCode;
+
+
+    @BindView(R.id.recyclerview)
+    RecyclerView recyclerView;
+
+
+    //扫码扫码动作
+    private ScanBean scanBean;
+
+    //浮动按钮
+    @BindView(R.id.iv_drag)
+    FloatingImageView iv_drag;
+
+
+    private View errorView;     //错误显示页
+    private View emptyView;     //空显示页
+    /**
+     * 列表适配器
+     */
+    private FinishWorkAdapter mAdapter;
+
+    private List<BoxSkuBean> boxSkuBeanList;
+
+    private int currentSku = -1;
+
+    private Unbinder unbinder;
+    
+
+    @Override
+    public int getContentViewResId() {
+        return R.layout.activity_fxy_detection_confirm_goods;
+    }
+
+    @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);
+
+    }
+
+
+    /**
+     * 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();
+        //监听浮动按钮
+        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 initAdapter(){
+
+        int spanCount = 3;
+
+        DisplayMetrics displayMetrics = new DisplayMetrics();
+        getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
+        int screenHeight = displayMetrics.heightPixels; // 屏幕高度(像素)
+        int screenWidth = displayMetrics.widthPixels; // 屏幕高度(像素)
+         if (Math.max(screenHeight,screenWidth)>1000){
+            spanCount = (int) screenWidth/300;
+        }
+
+        emptyView = this.getLayoutInflater().inflate(R.layout.pager_empty, (ViewGroup) recyclerView.getParent(), false);
+        errorView = this.getLayoutInflater().inflate(R.layout.pager_error, (ViewGroup) recyclerView.getParent(), false);
+
+        mAdapter  = new FinishWorkAdapter(boxSkuBeanList);
+        mAdapter.setEmptyView(emptyView);
+        mAdapter.openLoadAnimation(BaseQuickAdapter.SCALEIN);
+
+        recyclerView.setLayoutManager(new FullyGridLayoutManager(mContext, spanCount, GridLayoutManager.VERTICAL, false));
+        recyclerView.setAdapter(mAdapter);
+
+         mAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
+            @Override
+            public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
+                currentSku = position;
+                confirmGoods();
+            }
+        });
+    }
+
+    public static class FinishWorkAdapter extends BaseQuickAdapter<BoxSkuBean, BaseViewHolder> {
+
+        public FinishWorkAdapter(List<BoxSkuBean> data){
+            super(R.layout.item_sku_img, data);
+        }
+
+        @Override
+        protected void convert(BaseViewHolder helper, BoxSkuBean item) {
+            //定义setOnItemChildClickListener 事件点击
+            helper.addOnClickListener(R.id.ll_show_img);
+            TextView textView = helper.getView(R.id.tv_name);
+            textView.setText(item.getSku());
+
+
+            ImageView imageView = helper.getView(R.id.iv_show);
+            RequestOptions options = new RequestOptions()
+                    .centerCrop()
+                    .placeholder(R.color.color_f6)
+                    .diskCacheStrategy(DiskCacheStrategy.ALL);
+
+            Glide.with(helper.itemView.getContext())
+                    .load(item.getUrl())
+                    .apply(options)
+                    .into(imageView);
+
+        }
+    }
+
+    @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_box_code:
+                checkBox();
+                break;
+            case R.id.et_unit_code:
+
+              
+                break;
+            
+            default:
+        }
+    }
+
+    private void initEdit() {
+        List<EditText> list = new ArrayList<>();
+        list.add(etUnitCode);
+        list.add(etBoxCode);
+        unifyEdit(list);
+        etBoxCode.requestFocus();
+    }
+
+    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) {
+        //获取焦点的view对象
+        View view = getWindow().getDecorView().findFocus();
+        //如果是EditText
+        if (view instanceof EditText) {
+            ((EditText) view).setText(scanResult);
+            //执行回调
+            callbackEditor(view);
+        }
+    }
+
+
+    /**
+     * 检查打托信息
+     */
+    private void confirmGoods() {
+
+        if (!validate()) {
+            return;
+        }
+
+
+        String postJson = formatParam(2);
+
+        if (!checkRepeat(Urls.FXY_DETECTION_CONFIRM_GOODS + (postJson))) {
+            return;
+        }
+
+        OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FXY_DETECTION_CONFIRM_GOODS).upJson(postJson)
+                .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);
+                            if (bean.code == 1) {
+                                //showSuccessToast(bean.msg);
+                                Bundle bundle = new Bundle();
+                                bundle.putString("data",bean.data);
+                                bundle.putInt("step",0);
+                                intent2Page(mActivity, DetectionWorkMainActivity.class, false,bundle);
+                            } else {
+                                etBoxCode.selectAll();
+                                showWarningToast(bean.msg);
+                            }
+
+
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                            XLog.e("请求返回打托信息错误", e.getMessage());
+                        }
+                    }
+                });
+    }
+
+    /**
+     * 检查库位
+     */
+    private void checkBox() {
+        if (!checkNull(etBoxCode)) {
+            setEditTextFocused(etBoxCode, true);
+            showWarningToast(etBoxCode.getHint().toString());
+            return ;
+        }
+
+        String postJson = formatParam(1);
+        if (!checkRepeat(Urls.FXY_DETECTION_BOX_NUMBER + (postJson))) {
+            return;
+        }
+
+        OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FXY_DETECTION_BOX_NUMBER).upJson(postJson)
+                .execute(new MyDialogCallback(this, true, true) {
+                    @Override
+                    public void onSuccess(Response<String> response) {
+                        super.onSuccess(response);
+                        ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
+
+                        try {
+                            if (bean.code == 1) {
+                                showSuccessToast(bean.msg);
+                                etUnitCode.requestFocus();
+                                BoxInfoBean boxInfoBean = JsonUtil.jsonString2Bean(bean.data, BoxInfoBean.class);
+
+                                List<BoxSkuBean> tmpBoxSkuBean = boxInfoBean.getSkuList();
+                                if (boxInfoBean.getPage()==1){
+                                    boxSkuBeanList = tmpBoxSkuBean;
+                                    mAdapter.setNewData(boxSkuBeanList);
+                                }else{
+                                    boxSkuBeanList.containsAll(tmpBoxSkuBean);
+                                    mAdapter.addData(boxSkuBeanList);
+                                }
+                                mAdapter.notifyDataSetChanged();
+                            } else {
+                                showWarningToast(bean.msg);
+                            }
+                        } catch (Error e) {
+                            e.printStackTrace();
+                            XLog.e("请求返回箱号检查错误", e.getMessage());
+                        }
+                    }
+                });
+    }
+
+
+    /**
+     * @param type int 1、库位,2、箱号
+     * @return
+     */
+    private String formatParam(int type) {
+        JSONObject jsonObject = new JSONObject();
+        try {
+            jsonObject.put("box_number", etBoxCode.getText().toString().trim());
+            if (type > 1) {
+                jsonObject.put("unit_code", etUnitCode.getText().toString().trim());
+
+                jsonObject.put("goods_id", boxSkuBeanList.get(currentSku).getGoodsId());
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            XLog.e("组装数据失败");
+        }
+        return jsonObject.toString();
+    }
+
+    /*
+     * 校验必录
+     */
+    private boolean validate() {
+
+        if (!checkNull(etUnitCode)) {
+            setEditTextFocused(etUnitCode, true);
+            showWarningToast(etUnitCode.getHint().toString());
+            return false;
+        }
+
+        if (!checkNull(etBoxCode)) {
+            setEditTextFocused(etBoxCode, true);
+            showWarningToast(etBoxCode.getHint().toString());
+            return false;
+        }
+
+        return true;
+    }
+
+
+
+
+    //清除订单信息
+    private void clearData() {
+        etBoxCode.setText("");
+        etUnitCode.setText("");
+
+        setEditTextNormal(etUnitCode, true);
+        setEditTextNormal(etBoxCode, true);
+        etUnitCode.requestFocus();
+    }
+
+    @OnClick({})
+    public void onViewClicked(View view) {
+        Bundle bundle = new Bundle();
+        switch (view.getId()) {
+
+            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);
+
+
+            //监听按确定
+            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());
+        }
+    }
+
+
+}

+ 1 - 1
app/src/main/java/com/fxy/detection/DetectionDestroyOutboundMainActivity.java

@@ -128,7 +128,7 @@ public class DetectionDestroyOutboundMainActivity extends BaseActivity implement
     @Override
     protected void initView() {
         unbinder = ButterKnife.bind(this);
-        setTitleName("单箱上架");
+        setTitleName("销毁出库");
 
         initAdapter();
         initData();

+ 2 - 2
app/src/main/java/com/fxy/detection/DetectionPutInMainActivity.java

@@ -417,8 +417,8 @@ public class DetectionPutInMainActivity extends  BaseActivity implements StoJNI.
                 return false;
             }
             Gson gson = new Gson();
-            postParam.put("label_photo",gson.toJson(labelPhotoList));
-            postParam.put("weigh_photo",gson.toJson(weighPhotoList));
+            postParam.put("label_img",gson.toJson(labelPhotoList));
+            postParam.put("weight_img",gson.toJson(weighPhotoList));
 
         } catch (JSONException e) {
             showWarningToast("系统异常"+e.getMessage());

+ 3 - 2
app/src/main/java/com/fxy/detection/DetectionPutawayMainActivity.java

@@ -286,7 +286,8 @@ public class DetectionPutawayMainActivity extends BaseActivity implements StoJNI
     public void callbackEditor(View v) {
         switch (v.getId()) {
             case R.id.et_location_code:
-                checkLocation();
+//                checkLocation();
+                etBoxCode.requestFocus();
                 break;
             case R.id.et_box_code:
                 bindLocation();
@@ -423,7 +424,7 @@ public class DetectionPutawayMainActivity extends BaseActivity implements StoJNI
         try {
             jsonObject.put("location_number", etLocationCode.getText().toString().trim());
             if (type > 1) {
-                jsonObject.put("box_code", etBoxCode.getText().toString().trim());
+                jsonObject.put("box_number", etBoxCode.getText().toString().trim());
             }
 
 

+ 356 - 201
app/src/main/java/com/fxy/detection/DetectionWorkMainActivity.java

@@ -8,40 +8,45 @@ import android.content.IntentFilter;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
-import android.text.Editable;
-import android.text.TextWatcher;
+import android.support.v7.widget.RecyclerView;
 import android.view.KeyEvent;
 import android.view.View;
-import android.view.inputmethod.EditorInfo;
 import android.widget.EditText;
-import android.widget.GridLayout;
-import android.widget.ImageButton;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
+import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.elvishew.xlog.XLog;
 import com.fxy.R;
-import com.fxy.adapter.GridImageAdapter;
-import com.fxy.adapter.ShowPictureAdapter;
+import com.fxy.adapter.PictureListAdapter;
 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.views.MarqueeTextView;
 import com.fxy.bean.ActionBean;
 import com.fxy.bean.ScanBean;
+import com.fxy.common.PictureSelectorUpload;
 import com.fxy.constant.BaseConfig;
 import com.fxy.constant.EventCode;
+import com.fxy.detection.bean.StepsBaseBean;
+import com.fxy.detection.bean.StepsInfoBean;
+import com.fxy.detection.bean.StepsPictureBean;
 import com.fxy.net.MyDialogCallback;
 import com.fxy.net.Urls;
-import com.fxy.view.FloatingImageView;
+import com.google.gson.Gson;
 import com.google.zxing.Result;
+import com.luck.picture.lib.config.PictureConfig;
+import com.luck.picture.lib.entity.LocalMedia;
 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.HashMap;
 import java.util.List;
 
 import butterknife.BindView;
@@ -52,35 +57,75 @@ import sto.android.app.StoJNI;
 import sto.android.app.StoPdaKeyEvent;
 import sto.android.app.StoTongJNI;
 
+import static com.fxy.baselibrary.util.Tools.getScreenHeight;
+import static com.fxy.baselibrary.util.Tools.getScreenWidth;
+
 public class DetectionWorkMainActivity extends BaseActivity implements StoJNI.ScanCallBack {
     /**
      * 列表适配器
      */
     Context mContext = this;
 
-    //单号
-    @BindView(R.id.et_box_code)
-    EditText etBoxCode;
 
-    //单号
-    @BindView(R.id.et_location_code)
-    EditText etLocationCode;
+    @BindView(R.id.mt_box_number)
+    MarqueeTextView mtBoxNumber;
 
-    @BindView(R.id.gl_img)
-    GridLayout glImg;
+    @BindView(R.id.mt_unit_code)
+    MarqueeTextView mtUnitCode;
 
-    //扫码扫码动作
-    private ScanBean scanBean;
+    @BindView(R.id.recyclerview)
+    RecyclerView recyclerView;
+
+
+    @BindView(R.id.tv_pictures_type)
+    TextView tvPicturesType;
+
+
+    @BindView(R.id.btn_last_step)
+    TextView btnLastStep;
+
+    @BindView(R.id.btn_confirm)
+    TextView btnConfirm;
+//
+    @BindView(R.id.ll_recycler_view)
+    LinearLayout llRecyclerView;
+
+     private PictureListAdapter pictureAdapter;
+
+    //分步数据
+    private JSONObject stepsBaseObject = new JSONObject();
+    private List<JSONObject> stepsListObject = new ArrayList();
+    private List<String> mapPictureCode = new ArrayList();
+
+
+
+    private StepsBaseBean stepsBaseBean;
+    private List<StepsPictureBean> listStepsPictureBean;
+
+    private String nodeCode = "";
 
-    //浮动按钮
-    @BindView(R.id.iv_drag)
-    FloatingImageView iv_drag;
+    private JSONObject submitData = new JSONObject();
 
-    private ShowPictureAdapter pictureAdapter;
-    
+
+    //当几个
+    private HashMap<Integer,String> mapStepsAttrId  = new HashMap<>();;
+    private HashMap<Integer,PictureSelectorUpload> mapPictureSelector = new HashMap<>();;
+    //第几部
+    private int step;
+
+    private int currentPictureInx = -1;
+
+    //所有选择中数据
+    private HashMap<Integer, HashMap<Integer,String>> AllStepsAttrId  = new HashMap<>();
+    private HashMap<Integer,HashMap<Integer,PictureSelectorUpload>>  AllPictureSelector= new HashMap<>();
+
+    private JSONArray submitStepsArray = new JSONArray();
+
+    private ScanBean scanBean;
 
     private Unbinder unbinder;
-    
+
+
 
     @Override
     public int getContentViewResId() {
@@ -100,6 +145,9 @@ public class DetectionWorkMainActivity extends BaseActivity implements StoJNI.Sc
     @Override
     protected void getBundleExtras(Bundle bundle) {
 
+        stepsBaseBean = JsonUtil.jsonString2Bean(bundle.getString("data"),StepsBaseBean.class);
+        step = bundle.getInt("step",0);
+
     }
 
     //finish的返回监听
@@ -111,6 +159,17 @@ public class DetectionWorkMainActivity extends BaseActivity implements StoJNI.Sc
     public void onActivityResult(int requestCode, int resultCode, Intent data) {
         super.onActivityResult(requestCode, resultCode, data);
 
+        // 图片选择结果回调
+        if (resultCode == RESULT_OK) {
+            // 图片选择结果回调
+            if (requestCode == PictureConfig.CHOOSE_REQUEST || requestCode == PictureConfig.REQUEST_CAMERA) {
+                PictureSelectorUpload filedUpload = mapPictureSelector.get(currentPictureInx);
+                if (filedUpload != null){
+                    filedUpload.getSelectImg(data);
+                }
+            }
+        }
+
     }
 
 
@@ -136,36 +195,208 @@ public class DetectionWorkMainActivity extends BaseActivity implements StoJNI.Sc
     @Override
     protected void initView() {
         unbinder = ButterKnife.bind(this);
-        setTitleName("单箱上架");
+        setTitleName("按箱操作");
+        stepInitData();
+    }
 
+    private void stepInitData(){
         initAdapter();
         initData();
-        initEdit();
-        //监听浮动按钮
-        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() {
+        StepsInfoBean currentStepsBaseBean = stepsBaseBean.getSteps().get(step);
+        nodeCode = currentStepsBaseBean.getNodeCode();
+
+        mtBoxNumber.setText(stepsBaseBean.getBoxNumber());
+        mtUnitCode.setText(stepsBaseBean.getUnitCode());
+        pictureAdapter.setPictureType(nodeCode);
+
+        //
+        btnLastStep.setVisibility(step>0?View.VISIBLE:View.GONE);
+
+        String nextName = step == stepsBaseBean.getSteps().size()-1 ? "检测完成" : "下一步";
+        btnConfirm.setText(nextName);
+        tvPicturesType.setText(currentStepsBaseBean.getNodeName());
+
+
+
+        //想要清空
+        llRecyclerView.removeAllViews();
+        mapStepsAttrId = new HashMap<>();;
+        mapPictureSelector = new HashMap<>();;
+
+
+
+        listStepsPictureBean = new ArrayList<>();
+
+        switch (nodeCode){
+            case "parts":
+                listStepsPictureBean.addAll(listStepsPictureBean.size(),currentStepsBaseBean.getPicture_1());
+                listStepsPictureBean.addAll(listStepsPictureBean.size(),currentStepsBaseBean.getPicture_2());
+                listStepsPictureBean.addAll(listStepsPictureBean.size(),currentStepsBaseBean.getPicture_3());
+                break;
+            case "func":
+                listStepsPictureBean = currentStepsBaseBean.getFunc_points();
+                break;
+            case "facade":
+                listStepsPictureBean = currentStepsBaseBean.getFacade_points();
+                break;
+            case "spare":
+                listStepsPictureBean.addAll(currentStepsBaseBean.getSpare_picture_1());
+                listStepsPictureBean.addAll(currentStepsBaseBean.getSpare_picture_2());
+                break;
+            case "pack":
+                listStepsPictureBean = currentStepsBaseBean.getPack_points();
+                break;
+        }
+
+
+        if (AllStepsAttrId.containsKey(step)){
+            mapStepsAttrId = AllStepsAttrId.get(step);
+            if (AllPictureSelector.containsKey(step)){
+                mapPictureSelector = AllPictureSelector.get(step);
+
             }
-        });
+            for (int i=0;i<listStepsPictureBean.size();i++){
+                StepsPictureBean tmp = listStepsPictureBean.get(i);
+                if (mapStepsAttrId.containsKey(i)){
+                    tmp.setChecked(true);
 
+                    if (tmp.getNeedPhoto().equals("1")){
 
+                        ArrayList<String> photoList = mapPictureSelector.get(i).getPhotoList();
+                        List<LocalMedia> selectList = mapPictureSelector.get(i).getSelectList();
+                        addPictureSelectorUpload(i);
+                        mapPictureSelector.get(i).setSelectList(selectList,photoList);
 
-    }
 
+                    }
+                }
+                listStepsPictureBean.set(i,tmp);
+
+
+            }
 
-    private void initData() {
+
+        }
+
+        pictureAdapter.setNewData(listStepsPictureBean);
+        pictureAdapter.notifyDataSetChanged();
 
     }
 
+
     private void initAdapter() {
 
 
+
+        pictureAdapter = new PictureListAdapter(mContext,DetectionWorkMainActivity.this,recyclerView,listStepsPictureBean,nodeCode);
+        pictureAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+            @Override
+            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                XLog.e("运行setOnItemClickListener"+view.getId());
+
+
+            }
+        });
+
+        pictureAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
+            @Override
+            public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
+               XLog.e("运行setOnItemChildClickListener");
+
+                StepsPictureBean stepsPictureBean = listStepsPictureBean.get(position);
+                String attrId = stepsPictureBean.getAttrId();
+                String field_key = stepsPictureBean.getFieldKey();
+
+                try {
+                    if ((view.getId() == R.id.cb_select || view.getId() == R.id.tv_name)){
+
+
+                        if (mapStepsAttrId.containsKey(position)){
+                            mapStepsAttrId.remove(position);
+                        }else{
+                            mapStepsAttrId.put(position,attrId);
+                        }
+
+                        //不选中且需要拍照则自动打开
+                        if (listStepsPictureBean.get(position).getNeedPhoto().equals("1")){
+
+                            currentPictureInx = position;
+                            String tagKey = "recyclerview"+position;
+                            if (mapPictureSelector.containsKey(position)){
+                                mapPictureSelector.remove(position);
+                                // 或者,如果你需要遍历并删除满足某个条件的视图
+                                for (int i = 0; i < llRecyclerView.getChildCount(); i++) {
+                                    View child = llRecyclerView.getChildAt(i);
+                                    if (tagKey.equals(child.getTag().toString())) {
+                                        llRecyclerView.removeViewAt(i);
+                                    }
+                                }
+                            }else{
+
+                                addPictureSelectorUpload(position);
+                            }
+
+                        }
+
+
+
+                        XLog.e("看看是不是异步执行");
+                    }
+
+
+                } catch (Exception e) {
+                    e.printStackTrace();
+                    showErrorToast("异常"+e.getMessage());
+                }
+
+            }
+        });
+    }
+
+    private void addPictureSelectorUpload(int position){
+        String tagKey = "recyclerview"+position;
+        View itemPictureSelector = View.inflate(mContext, R.layout.item_picture_selector, null);
+        TextView tvPicturesTitle =   itemPictureSelector.findViewById(R.id.tv_pictures_title);
+        tvPicturesTitle.setText(listStepsPictureBean.get(position).getDesc());
+        RecyclerView rvLabelShowImg = (RecyclerView)itemPictureSelector.findViewById(R.id.recyclerview);
+        itemPictureSelector.setTag(tagKey);
+        llRecyclerView.addView(itemPictureSelector);
+        PictureSelectorUpload tmpPictureSelector  = setItemPicture(String.valueOf(position),rvLabelShowImg,9,PictureConfig.TYPE_IMAGE);
+        mapPictureSelector.put(position,tmpPictureSelector);
     }
 
+    /**
+     * 设置多个上传文件
+     * @param actionType String
+     * @param showImg RecyclerView
+     */
+    private PictureSelectorUpload setItemPicture(String actionType,RecyclerView showImg,int maxNum,int pictureType){
+        PictureSelectorUpload pictureUpload = new PictureSelectorUpload(DetectionWorkMainActivity.this,showImg,"detection",maxNum,pictureType);
+        pictureUpload.setActionType(actionType);
+        pictureUpload.setCompress(true,100,500);
+        pictureUpload.setOnlyCamera(true);
+        pictureUpload.setProgressType(2);
+        //showImg.onTouchEvent()
+
+        pictureUpload.setOnChangeListener(new PictureSelectorUpload.UploadChangeListener() {
+            @Override
+            public void uploadResult(boolean State,String actionType) {
+                if (State) {
+
+                }
+            }
+
+            @Override
+            public void uploadActionType(String actionType) {
+                System.out.println("actionType:"+actionType);
+                currentPictureInx = Integer.parseInt(actionType);
+            }
+        });
+        return  pictureUpload;
+    }
 
     @Override
     public boolean dispatchKeyEvent(KeyEvent event) {
@@ -293,22 +524,12 @@ public class DetectionWorkMainActivity extends BaseActivity implements StoJNI.Sc
     //统一按钮回调
     public void callbackEditor(View v) {
         switch (v.getId()) {
-            case R.id.et_location_code:
-                checkLocation();
-                break;
-            case R.id.et_box_code:
-                bindLocation();
-                break;
             default:
         }
     }
 
     private void initEdit() {
-        List<EditText> list = new ArrayList<>();
-        list.add(etLocationCode);
-        list.add(etBoxCode);
-        unifyEdit(list);
-        etLocationCode.requestFocus();
+
     }
 
     private OnRxScanerListener mScanerListener = new OnRxScanerListener() {
@@ -343,58 +564,28 @@ public class DetectionWorkMainActivity extends BaseActivity implements StoJNI.Sc
 
 
     /**
-     * 检查打托信息
+     * 完成
      */
-    private void bindLocation() {
-
+    private void DecorationCompleted() {
         if (!validate()) {
             return;
         }
 
 
-        String postJson = formatParam(2);
-        if (!checkRepeat(Urls.FXY_DETECTION_PUTAWAY + (postJson))) {
+        if (step < stepsBaseBean.getSteps().size()-1){
+            step = step+1;
+            stepInitData();
             return;
         }
-
-        OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FXY_DETECTION_PUTAWAY).upJson(postJson)
-                .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);
-                            if (bean.code == 1) {
-                                showSuccessToast(bean.msg);
-                                clearData();
-                            } else {
-                                etBoxCode.selectAll();
-                                showWarningToast(bean.msg);
-                            }
-                        } catch (Exception e) {
-                            e.printStackTrace();
-                            XLog.e("请求返回打托信息错误", e.getMessage());
-                        }
-                    }
-                });
-    }
-
-    /**
-     * 检查库位
-     */
-    private void checkLocation() {
-        if (!checkNull(etLocationCode)) {
-            setEditTextFocused(etLocationCode, true);
-            showWarningToast(etLocationCode.getHint().toString());
-            return ;
+        if (!formatParam()) {
+            return;
         }
 
-        String postJson = formatParam(1);
-        if (!checkRepeat(Urls.FXY_DETECTION_CHECK_LOCATION + (postJson))) {
+        String postJson = submitData.toString();;
+        if (!checkRepeat(Urls.FXY_DETECTION_COMPLETED + (postJson))) {
             return;
         }
-
-        OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FXY_DETECTION_CHECK_LOCATION).upJson(postJson)
+        OkGo.<String>post(Urls.getServiceAddress(this) + Urls.FXY_DETECTION_COMPLETED).upJson(postJson)
                 .execute(new MyDialogCallback(this, true, true) {
                     @Override
                     public void onSuccess(Response<String> response) {
@@ -403,25 +594,18 @@ public class DetectionWorkMainActivity extends BaseActivity implements StoJNI.Sc
                             ActionBean bean = JsonUtil.getObject(response.body(), ActionBean.class);
                             if (bean.code == 1) {
                                 showSuccessToast(bean.msg);
-                                etBoxCode.requestFocus();
+                                finish();
                             } else {
                                 showWarningToast(bean.msg);
                             }
                         } catch (Exception e) {
                             e.printStackTrace();
-                            XLog.e("请求返回箱号检查错误", e.getMessage());
+                            XLog.e("请求返回打托信息错误", e.getMessage());
                         }
                     }
                 });
     }
 
-    /**
-     * 完成
-     */
-    private void finished() {
-        clearData();
-    }
-
     /**
      * @param type int 1、库位,2、箱号
      * @return
@@ -429,11 +613,6 @@ public class DetectionWorkMainActivity extends BaseActivity implements StoJNI.Sc
     private String formatParam(int type) {
         JSONObject jsonObject = new JSONObject();
         try {
-            jsonObject.put("location_number", etLocationCode.getText().toString().trim());
-            if (type > 1) {
-                jsonObject.put("box_code", etBoxCode.getText().toString().trim());
-            }
-
 
         } catch (Exception e) {
             e.printStackTrace();
@@ -447,128 +626,104 @@ public class DetectionWorkMainActivity extends BaseActivity implements StoJNI.Sc
      */
     private boolean validate() {
 
-        if (!checkNull(etLocationCode)) {
-            setEditTextFocused(etLocationCode, true);
-            showWarningToast(etLocationCode.getHint().toString());
-            return false;
-        }
+        try {
+            submitData.put("box_number",stepsBaseBean.getBoxNumber());
+            submitData.put("goods_id",stepsBaseBean.getGoodsId());
+            submitData.put("unit_code",stepsBaseBean.getUnitCode());
 
-        if (!checkNull(etBoxCode)) {
-            setEditTextFocused(etBoxCode, true);
-            showWarningToast(etBoxCode.getHint().toString());
-            return false;
-        }
+            JSONObject item = new JSONObject();
+            Gson gson = new Gson();
 
-        return true;
-    }
+            JSONArray stepsArray = new JSONArray();
+            for (Integer position : mapStepsAttrId.keySet()) {
 
+                StepsPictureBean stepsPictureBean = listStepsPictureBean.get(position);
+                item.put("node_code",nodeCode);
+                item.put("field_key",stepsPictureBean.getFieldKey());
+                item.put("attr_id",mapStepsAttrId.get(position));
 
+                if (stepsPictureBean.getNeedPhoto().equals("1")){
+                    if (mapPictureSelector.get(position)==null){
+                        showToast(stepsPictureBean.getDesc()+"需要拍照");
+                        return false;
+                    }
 
+                    ArrayList<String> urlList = mapPictureSelector.get(position).getPhotoList();
+                    if (urlList.size()==0){
+                        showToast(stepsPictureBean.getDesc()+"需要拍照");
+                        return false;
+                    }
+                    item.put("url",gson.toJson(urlList));
 
-    //清除订单信息
-    private void clearData() {
-        etBoxCode.setText("");
-        etLocationCode.setText("");
+                }
 
-        setEditTextNormal(etLocationCode, true);
-        setEditTextNormal(etBoxCode, true);
-        etLocationCode.requestFocus();
-    }
+                stepsArray.put(item);
+            }
+            submitStepsArray.put(step,stepsArray);
 
-    @OnClick({R.id.btn_confirm})
-    public void onViewClicked(View view) {
-        Bundle bundle = new Bundle();
-        switch (view.getId()) {
-            case R.id.btn_confirm:
-                finished();
-                break;
-            default:
-                break;
+
+            AllPictureSelector.put(step,mapPictureSelector);
+            AllStepsAttrId.put(step,mapStepsAttrId);
+        } catch (JSONException e) {
+            e.printStackTrace();
+            showToast(e.getMessage());
+            return false;
         }
-    }
 
-    /**
-     * 统一设置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);
+        return true;
+    }
 
 
-            //监听按确定
-            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;
+    /*
+     * 校验必录
+     */
+    private boolean formatParam() {
 
-                    //返回true,保留软键盘。false,隐藏软键盘
+        try {
+            JSONArray stepsArray = new JSONArray();
+            for (int i=0;i<submitStepsArray.length();i++){
+                JSONArray tmp = submitStepsArray.getJSONArray(i);
+                for (int j=0;j<tmp.length();j++){
+                    stepsArray.put(tmp.getJSONObject(j));
                 }
-            });
-            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());
-                    }
+            }
+            submitData.put("steps",stepsArray );
+        } catch (JSONException e) {
+            e.printStackTrace();
+            showToast(e.getMessage());
+            return false;
+        }
 
-                    if (s.length() > 0) {
 
-                        if (currentImage != null) {
-                            currentImage.setVisibility(View.VISIBLE);
-                        }
-                        if (currentEditText != null) {
-                            setEditTextNormal(currentEditText, true);
-                        }
+        return 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) {
+    //清除订单信息
+    private void clearData() {
+
+    }
 
+    @OnClick({R.id.btn_confirm,R.id.btn_last_step})
+    public void onViewClicked(View view) {
+        Bundle bundle = new Bundle();
+        switch (view.getId()) {
+            case R.id.btn_confirm:
+                DecorationCompleted();
+                break;
+            case R.id.btn_last_step:
+                if (step>0){
+                    step = step-1;
+                    stepInitData();
                 }
-            });
 
-            if (imageButton != null) {
-                unifyClearEdit(imageButton);
-            }
+                break;
+            default:
+                break;
         }
     }
 

+ 86 - 0
app/src/main/java/com/fxy/detection/bean/BoxInfoBean.java

@@ -0,0 +1,86 @@
+package com.fxy.detection.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class BoxInfoBean implements Parcelable {
+    private String box_number; //
+    private List<BoxSkuBean> sku_list = new ArrayList<>(); //
+    private int page = 1;
+    private int limit = 6;
+
+    public BoxInfoBean() {
+        // 可以在这里进行初始化,但通常对于反序列化来说不需要
+    }
+
+    public String getBoxNumber() {
+        return box_number;
+    }
+
+    public void setBoxNumber(String box_number) {
+        this.box_number = box_number;
+    }
+
+    public List<BoxSkuBean> getSkuList() {
+        return sku_list;
+    }
+
+    public void setSkuList(List<BoxSkuBean> sku_list) {
+        this.sku_list = sku_list;
+    }
+
+    public int getPage() {
+        return page;
+    }
+
+    public void setPage(int page) {
+        this.page = page;
+    }
+
+    public int getLimit() {
+        return limit;
+    }
+
+    public void setLimit(int limit) {
+        this.limit = limit;
+    }
+
+    public static Creator<BoxInfoBean> getCREATOR() {
+        return CREATOR;
+    }
+
+    protected BoxInfoBean(Parcel in) {
+        box_number = in.readString();
+        sku_list = in.createTypedArrayList(BoxSkuBean.CREATOR);
+        page = in.readInt();
+        limit = in.readInt();
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(box_number);
+        dest.writeTypedList(sku_list);
+        dest.writeInt(page);
+        dest.writeInt(limit);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    public static final Creator<BoxInfoBean> CREATOR = new Creator<BoxInfoBean>() {
+        @Override
+        public BoxInfoBean createFromParcel(Parcel in) {
+            return new BoxInfoBean(in);
+        }
+
+        @Override
+        public BoxInfoBean[] newArray(int size) {
+            return new BoxInfoBean[size];
+        }
+    };
+}

+ 116 - 0
app/src/main/java/com/fxy/detection/bean/BoxSkuBean.java

@@ -0,0 +1,116 @@
+package com.fxy.detection.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+public class BoxSkuBean  implements Parcelable {
+    private String goods_id = ""; //
+    private String sku = ""; //
+    private String file_name = ""; //
+    private String url = ""; //
+    private String remark = ""; //
+    private String need_photo = ""; //
+    private String type = ""; //
+
+    public BoxSkuBean(){
+
+    }
+
+    public String getGoodsId() {
+        return goods_id;
+    }
+
+    public void setGoodsId(String goods_id) {
+        this.goods_id = goods_id;
+    }
+
+    public String getSku() {
+        return sku;
+    }
+
+    public void setSku(String sku) {
+        this.sku = sku;
+    }
+
+    public String getFileName() {
+        return file_name;
+    }
+
+    public void setFileName(String file_name) {
+        this.file_name = file_name;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getNeedPhoto() {
+        return need_photo;
+    }
+
+    public void setNeedPhoto(String need_photo) {
+        this.need_photo = need_photo;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public static Creator<BoxSkuBean> getCREATOR() {
+        return CREATOR;
+    }
+
+    protected BoxSkuBean(Parcel in) {
+        goods_id = in.readString();
+        sku = in.readString();
+        file_name = in.readString();
+        url = in.readString();
+        remark = in.readString();
+        need_photo = in.readString();
+        type = in.readString();
+    }
+
+    public static final Creator<BoxSkuBean> CREATOR = new Creator<BoxSkuBean>() {
+        @Override
+        public BoxSkuBean createFromParcel(Parcel in) {
+            return new BoxSkuBean(in);
+        }
+
+        @Override
+        public BoxSkuBean[] newArray(int size) {
+            return new BoxSkuBean[size];
+        }
+    };
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public void writeToParcel(Parcel parcel, int i) {
+        parcel.writeString(goods_id);
+        parcel.writeString(sku);
+        parcel.writeString(file_name);
+        parcel.writeString(url);
+        parcel.writeString(remark);
+        parcel.writeString(need_photo);
+        parcel.writeString(type);
+    }
+}

+ 95 - 0
app/src/main/java/com/fxy/detection/bean/StepsBaseBean.java

@@ -0,0 +1,95 @@
+package com.fxy.detection.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import com.zebra.adc.decoder.BarCodeReader;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class StepsBaseBean  implements Parcelable  {
+
+    private String box_number = ""; //
+    private String goods_id = ""; //
+    private String unit_code = ""; //
+    private String total = ""; //
+    private List<StepsInfoBean> steps = new ArrayList<>(); //
+
+    public StepsBaseBean(){
+
+    }
+    protected StepsBaseBean(Parcel in) {
+        box_number = in.readString();
+        goods_id = in.readString();
+        unit_code = in.readString();
+        total = in.readString();
+        steps = in.createTypedArrayList(StepsInfoBean.CREATOR);
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(box_number);
+        dest.writeString(goods_id);
+        dest.writeString(unit_code);
+        dest.writeString(total);
+        dest.writeTypedList(steps);
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    public static final Creator<StepsBaseBean> CREATOR = new Creator<StepsBaseBean>() {
+        @Override
+        public StepsBaseBean createFromParcel(Parcel in) {
+            return new StepsBaseBean(in);
+        }
+
+        @Override
+        public StepsBaseBean[] newArray(int size) {
+            return new StepsBaseBean[size];
+        }
+    };
+
+    public String getBoxNumber() {
+        return box_number;
+    }
+
+    public void setBoxNumber(String box_number) {
+        this.box_number = box_number;
+    }
+
+    public String getGoodsId() {
+        return goods_id;
+    }
+
+    public void setGoodsId(String goods_id) {
+        this.goods_id = goods_id;
+    }
+
+    public String getUnitCode() {
+        return unit_code;
+    }
+
+    public void setUnitCode(String unit_code) {
+        this.unit_code = unit_code;
+    }
+
+    public String getTotal() {
+        return total;
+    }
+
+    public void setTotal(String total) {
+        this.total = total;
+    }
+
+    public List<StepsInfoBean> getSteps() {
+        return steps;
+    }
+
+    public void setSteps(List<StepsInfoBean> steps) {
+        this.steps = steps;
+    }
+}

+ 161 - 0
app/src/main/java/com/fxy/detection/bean/StepsInfoBean.java

@@ -0,0 +1,161 @@
+package com.fxy.detection.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class StepsInfoBean implements Parcelable {
+
+    private String sort = ""; //
+    private String node_code = ""; //
+    private String node_name = ""; //
+    public List<StepsPictureBean> picture_1 = new ArrayList<>(); //
+    public List<StepsPictureBean> picture_2 = new ArrayList<>(); //
+    public List<StepsPictureBean> picture_3 = new ArrayList<>(); //
+    public List<StepsPictureBean> func_points = new ArrayList<>(); //
+    public List<StepsPictureBean> facade_points = new ArrayList<>(); //
+    public List<StepsPictureBean> spare_picture_1 = new ArrayList<>(); //
+    public List<StepsPictureBean> spare_picture_2 = new ArrayList<>(); //
+    public List<StepsPictureBean> pack_points = new ArrayList<>(); //
+
+    public StepsInfoBean(){
+
+    }
+
+    protected StepsInfoBean(Parcel in) {
+        sort = in.readString();
+        node_code = in.readString();
+        node_name = in.readString();
+        picture_1 = in.createTypedArrayList(StepsPictureBean.CREATOR);
+        picture_2 = in.createTypedArrayList(StepsPictureBean.CREATOR);
+        picture_3 = in.createTypedArrayList(StepsPictureBean.CREATOR);
+        func_points = in.createTypedArrayList(StepsPictureBean.CREATOR);
+        facade_points = in.createTypedArrayList(StepsPictureBean.CREATOR);
+        spare_picture_1 = in.createTypedArrayList(StepsPictureBean.CREATOR);
+        spare_picture_2 = in.createTypedArrayList(StepsPictureBean.CREATOR);
+        pack_points = in.createTypedArrayList(StepsPictureBean.CREATOR);
+    }
+
+    public static final Creator<StepsInfoBean> CREATOR = new Creator<StepsInfoBean>() {
+        @Override
+        public StepsInfoBean createFromParcel(Parcel in) {
+            return new StepsInfoBean(in);
+        }
+
+        @Override
+        public StepsInfoBean[] newArray(int size) {
+            return new StepsInfoBean[size];
+        }
+    };
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    @Override
+    public void writeToParcel(Parcel parcel, int i) {
+        parcel.writeString(sort);
+        parcel.writeString(node_code);
+        parcel.writeString(node_name);
+        parcel.writeTypedList(picture_1);
+        parcel.writeTypedList(picture_2);
+        parcel.writeTypedList(picture_3);
+        parcel.writeTypedList(func_points);
+        parcel.writeTypedList(facade_points);
+        parcel.writeTypedList(spare_picture_1);
+        parcel.writeTypedList(spare_picture_2);
+        parcel.writeTypedList(pack_points);
+    }
+
+    public void setSort(String sort) {
+        this.sort = sort;
+    }
+
+    public void setNode_code(String node_code) {
+        this.node_code = node_code;
+    }
+
+    public void setNode_name(String node_name) {
+        this.node_name = node_name;
+    }
+
+    public void setPicture_1(List<StepsPictureBean> picture_1) {
+        this.picture_1 = picture_1;
+    }
+
+    public void setPicture_2(List<StepsPictureBean> picture_2) {
+        this.picture_2 = picture_2;
+    }
+
+    public void setPicture_3(List<StepsPictureBean> picture_3) {
+        this.picture_3 = picture_3;
+    }
+
+    public void setFunc_points(List<StepsPictureBean> func_points) {
+        this.func_points = func_points;
+    }
+
+    public void setFacade_points(List<StepsPictureBean> facade_points) {
+        this.facade_points = facade_points;
+    }
+
+    public void setSpare_picture_1(List<StepsPictureBean> spare_picture_1) {
+        this.spare_picture_1 = spare_picture_1;
+    }
+
+    public void setSpare_picture_2(List<StepsPictureBean> spare_picture_2) {
+        this.spare_picture_2 = spare_picture_2;
+    }
+
+    public void setPack_points(List<StepsPictureBean> pack_points) {
+        this.pack_points = pack_points;
+    }
+
+    public String getSort() {
+        return sort;
+    }
+
+    public String getNodeCode() {
+        return node_code;
+    }
+
+    public String getNodeName() {
+        return node_name;
+    }
+
+    public List<StepsPictureBean> getPicture_1() {
+        return picture_1;
+    }
+
+    public List<StepsPictureBean> getPicture_2() {
+        return picture_2;
+    }
+
+    public List<StepsPictureBean> getPicture_3() {
+        return picture_3;
+    }
+
+    public List<StepsPictureBean> getFunc_points() {
+        return func_points;
+    }
+
+    public List<StepsPictureBean> getFacade_points() {
+        return facade_points;
+    }
+
+    public List<StepsPictureBean> getSpare_picture_1() {
+        return spare_picture_1;
+    }
+
+    public List<StepsPictureBean> getSpare_picture_2() {
+        return spare_picture_2;
+    }
+
+    public List<StepsPictureBean> getPack_points() {
+        return pack_points;
+    }
+}

+ 114 - 0
app/src/main/java/com/fxy/detection/bean/StepsPictureBean.java

@@ -0,0 +1,114 @@
+package com.fxy.detection.bean;
+
+import android.os.Parcel;
+import android.os.Parcelable;
+
+public class StepsPictureBean implements Parcelable {
+    private String attr_id = ""; //
+    private String desc = ""; //
+    private String url = ""; //
+    private String type = ""; //
+    private String need_photo = ""; //
+    private String field_key = ""; //
+    private Boolean checked = false;
+
+    public StepsPictureBean() {
+
+    }
+
+
+    protected StepsPictureBean(Parcel in) {
+        attr_id = in.readString();
+        desc = in.readString();
+        url = in.readString();
+        type = in.readString();
+        need_photo = in.readString();
+        field_key = in.readString();
+        byte tmpChecked = in.readByte();
+        checked = tmpChecked == 0 ? null : tmpChecked == 1;
+    }
+
+    @Override
+    public void writeToParcel(Parcel dest, int flags) {
+        dest.writeString(attr_id);
+        dest.writeString(desc);
+        dest.writeString(url);
+        dest.writeString(type);
+        dest.writeString(need_photo);
+        dest.writeString(field_key);
+        dest.writeByte((byte) (checked == null ? 0 : checked ? 1 : 2));
+    }
+
+    @Override
+    public int describeContents() {
+        return 0;
+    }
+
+    public static final Creator<StepsPictureBean> CREATOR = new Creator<StepsPictureBean>() {
+        @Override
+        public StepsPictureBean createFromParcel(Parcel in) {
+            return new StepsPictureBean(in);
+        }
+
+        @Override
+        public StepsPictureBean[] newArray(int size) {
+            return new StepsPictureBean[size];
+        }
+    };
+
+    public String getAttrId() {
+        return attr_id;
+    }
+
+    public void setAttrId(String attr_id) {
+        this.attr_id = attr_id;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+
+    public void setDesc(String desc) {
+        this.desc = desc;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getNeedPhoto() {
+        return need_photo;
+    }
+
+    public void setNeedPhoto(String need_photo) {
+        this.need_photo = need_photo;
+    }
+
+    public String getFieldKey() {
+        return field_key;
+    }
+
+    public void setFieldKey(String field_key) {
+        this.field_key = field_key;
+    }
+
+    public Boolean getChecked() {
+        return checked;
+    }
+
+    public void setChecked(Boolean checked) {
+        this.checked = checked;
+    }
+}

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

@@ -14,6 +14,7 @@ import android.widget.LinearLayout;
 import com.fxy.common.VersionUpgrades;
 import com.elvishew.xlog.XLog;
 import com.fxy.constant.SPCache;
+import com.fxy.detection.DetectionConfirmGoodsMainActivity;
 import com.fxy.detection.DetectionDestroyOutboundMainActivity;
 import com.fxy.detection.DetectionPutInMainActivity;
 import com.fxy.detection.DetectionPutawayMainActivity;
@@ -188,7 +189,7 @@ public class HomePagerFragment extends BaseFragment implements View.OnClickListe
                 break;
 
             case R.id.ivt_detection_work:
-                intent2Page(getActivity(), DetectionWorkMainActivity.class, false,bundle);
+                intent2Page(getActivity(), DetectionConfirmGoodsMainActivity.class, false,bundle);
                 break;
 
 

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

@@ -156,13 +156,22 @@ public class Urls {
     /*开始检修功能*/
 
     //单箱入库
-    public static final String FXY_DETECTION_PUTIN = "/pda/inbound/pictureCheck";
+    public static final String FXY_DETECTION_PUTIN = "/pda/inbound/QcInbound";
 
     // 单箱上架 -- 查验库位
-    public static final String FXY_DETECTION_CHECK_LOCATION = "/pda/inbound/putaway";
+    public static final String FXY_DETECTION_CHECK_LOCATION = "/pda/inbound/QcBindLocation";
     // 单箱上架
-    public static final String FXY_DETECTION_PUTAWAY = "/pda/inbound/putaway";
+    public static final String FXY_DETECTION_PUTAWAY = "/pda/inbound/QcBindLocation";
 
+    //检查批次
+
+    public static final String FXY_DETECTION_BOX_NUMBER = "/pda/inbound/QcScanBoxNumber";
+
+    //确认商品
+    public static final String FXY_DETECTION_CONFIRM_GOODS = "/pda/inbound/QcConfirmGoods";
+
+    //装修完成
+    public static final String FXY_DETECTION_COMPLETED = "/pda/Inbound/QcFinish";
 
     //打托 - 扫托盘
     public static final String FXY_HK_CHECK_PALLET = "/pda/HongkongInbound/checkPallet";

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

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <solid android:color="#000000"/> <!-- 80% 黑色透明 -->
+    <!-- 其他属性,如corners、stroke等 -->
+</selector>

+ 99 - 0
app/src/main/res/layout/activity_fxy_detection_confirm_goods.xml

@@ -0,0 +1,99 @@
+<?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">
+            <LinearLayout
+                android:id="@+id/ll_from"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="vertical">
+                <LinearLayout
+                    android:id="@+id/ll_box_code"
+                    style="@style/FromLinearLayoutItem"
+                    android:orientation="horizontal">
+                    <EditText
+                        android:id="@+id/et_box_code"
+                        style="@style/EditTextStyle"
+                        android:hint="请输入/扫描箱号"
+                        android:text="" />
+                    <ImageButton
+                        android:id="@+id/ib_box_code_clear"
+                        style="@style/ClearImg" />
+                </LinearLayout>
+                <LinearLayout
+                    style="@style/FromLinearLayoutItem"
+                    android:orientation="horizontal">
+                    <EditText
+                        style="@style/EditTextStyle"
+                        android:id="@+id/et_unit_code"
+                        android:hint="请输入/扫描内件码"
+                        android:text=""/>
+                    <ImageButton
+                        style="@style/ClearImg"
+                        android:id="@+id/ib_unit_code_clear"
+                        />
+
+                </LinearLayout>
+
+            </LinearLayout>
+
+
+            <!--xians-->
+            <LinearLayout
+                android:id="@+id/ll_pictures_title"
+                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>

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

@@ -82,7 +82,7 @@
                     android:layout_marginRight="@dimen/dp_10"
                     android:background="@drawable/bg_orange_item"
                     android:gravity="center"
-                    android:text="上架完"
+                    android:text="上架完"
                     android:padding="10dp"
                     android:textColor="@color/white"
                     android:visibility="visible" />

+ 91 - 32
app/src/main/res/layout/activity_fxy_detection_work.xml

@@ -21,48 +21,113 @@
 
 
 
+
             <LinearLayout
-                android:id="@+id/ll_from"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
                 android:layout_marginLeft="@dimen/dp_10"
                 android:layout_marginRight="@dimen/dp_10"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:orientation="horizontal">
+                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
-                    style="@style/FromLinearLayoutItem"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:paddingBottom="5dp"
+                    android:paddingTop="5dp"
                     android:orientation="horizontal">
-                    <EditText
-                        style="@style/EditTextStyle"
-                        android:id="@+id/et_location_code"
-                        android:hint="请输入/扫描库位"
-                        android:text=""/>
-                    <ImageButton
-                        style="@style/ClearImg"
-                        android:id="@+id/ib_location_code_clear"
+
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text="箱号" />
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text=":" />
+
+                    <com.fxy.baselibrary.views.MarqueeTextView
+                        style="@style/mtRightStyle"
+                        android:id="@+id/mt_box_number"
                         />
 
                 </LinearLayout>
+
+
                 <LinearLayout
-                    android:id="@+id/ll_container"
-                    style="@style/FromLinearLayoutItem"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:paddingBottom="5dp"
+                    android:paddingTop="5dp"
                     android:orientation="horizontal">
-                    <EditText
-                        android:id="@+id/et_box_code"
-                        style="@style/EditTextStyle"
-                        android:hint="请输入/扫描箱号"
-                        android:text="" />
-                    <ImageButton
-                        android:id="@+id/ib_box_code_clear"
-                        style="@style/ClearImg" />
+
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text="内件码" />
+                    <TextView
+                        style="@style/tvLeftStyle"
+                        android:text=":" />
+
+                    <com.fxy.baselibrary.views.MarqueeTextView
+                        style="@style/mtRightStyle"
+                        android:id="@+id/mt_unit_code"
+                        />
                 </LinearLayout>
+
+
+            </LinearLayout>
+
+
+            <!--xians-->
+            <LinearLayout
+                android:id="@+id/ll_pictures_title"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginRight="@dimen/dp_10"
+                android:paddingBottom="5dp"
+                android:paddingTop="5dp"
+                android:orientation="horizontal">
+                <TextView
+                    android:id="@+id/tv_pictures_type"
+                    style="@style/tvLeftStyle"
+                    android:text="确认货品" />
             </LinearLayout>
 
             <LinearLayout
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                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:overScrollMode="never"/>
+            </LinearLayout>
+
+
+            <LinearLayout
+                android:id="@+id/ll_recycler_view"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:orientation="vertical" >
+            </LinearLayout>
+
+
+
+<!--            <LinearLayout
                 android:layout_marginLeft="@dimen/dp_10"
                 android:layout_marginRight="@dimen/dp_10"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content">
-
                 <GridLayout
                     android:id="@+id/gl_img"
                     android:layout_width="match_parent"
@@ -70,10 +135,8 @@
                     android:layout_margin="10dp"
                     android:background="@color/white"
                     android:layout_height="wrap_content">
-
                 </GridLayout>
-
-            </LinearLayout>
+            </LinearLayout>-->
 
 
             <LinearLayout
@@ -115,14 +178,10 @@
                     android:textColor="@color/white"
                     android:visibility="visible" />
             </LinearLayout>
-        </LinearLayout>
-
-
-
-
 
 
 
+        </LinearLayout>
     </ScrollView>
 
 

+ 41 - 0
app/src/main/res/layout/item_picture_selector.xml

@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:id="@+id/ll_pictures_model"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+    <LinearLayout
+        android:id="@+id/ll_pictures_title"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:paddingBottom="5dp"
+        android:paddingTop="5dp"
+        android:orientation="horizontal">
+        <TextView
+            android:id="@+id/tv_pictures_title"
+            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>

+ 29 - 37
app/src/main/res/layout/item_preview_image.xml

@@ -1,61 +1,53 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                 android:layout_width="wrap_content"
-                android:layout_height="wrap_content">
+                android:layout_height="wrap_content"
+
+
+   >
 
     <RelativeLayout
-        android:layout_width="110dp"
-        android:layout_height="110dp"
+        android:id="@+id/ll_img_center"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:layout_margin="5dp"
+        android:background="@drawable/bg_white_et"
         android:layout_centerInParent="true">
 
         <ImageView
             android:id="@+id/ivp_img"
             android:layout_width="110dp"
             android:layout_height="110dp"
-            android:layout_marginTop="10dp"
+            style="@android:style/Animation"
+            android:src="@mipmap/cat"
             android:contentDescription="@null"
-            android:scaleType="centerCrop"
-            android:src="@drawable/sto_logo"/>
-        <View
-            android:id="@+id/selected_overlay"
-            android:layout_width="match_parent"
-            android:layout_height="match_parent"
-            android:visibility="gone"
-            android:background="#80000000" />
-
-
-        <CheckBox
-            android:id="@+id/cb_select"
+            android:scaleType="centerCrop"/>
+        <TextView
+            android:id="@+id/tv_name"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_alignParentEnd="true"
-            android:checked="true"
-            android:gravity="end"
-            android:text="" />
+            android:padding="2dp"
+            android:hint="标题"
+            android:layout_marginBottom="5dp"
+            android:layout_below="@id/ivp_img"  />
 
 
 
-        <LinearLayout
-            android:id="@+id/ll_del"
-            android:layout_width="30dp"
-            android:layout_height="30dp"
+        <CheckBox
+            android:id="@+id/cb_select"
+            style="@style/checkboxStyle"
             android:layout_alignParentEnd="true"
-            android:layout_alignParentRight="true"
             android:gravity="end"
-            android:visibility="gone"
-            android:orientation="vertical">
-
-            <ImageView
-                android:id="@+id/iv_del"
-                android:layout_width="25dp"
-                android:layout_height="25dp"
-                android:contentDescription="@null"
-                android:scaleType="fitXY"
-                android:src="@drawable/delete"/>
-
-        </LinearLayout>
+            android:text="" />
 
 
+        <!-- 遮罩层View -->
+        <View
+            android:id="@+id/overlay_view"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:background="@drawable/selectable_background" />
 
     </RelativeLayout>
 

+ 19 - 0
app/src/main/res/layout/item_sku_img.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:gravity="center"
+    android:orientation="vertical"
+    android:id="@+id/ll_show_img"
+    android:layout_height="wrap_content">
+
+    <ImageView
+        android:id="@+id/iv_show"
+        android:layout_width="100dp"
+        android:layout_height="100dp" />
+    <TextView
+        android:id="@+id/tv_name"
+        android:layout_width="100dp"
+        android:layout_height="wrap_content"
+        android:padding="2dp"
+        android:hint="标题"  />
+</LinearLayout>

+ 2 - 0
app/src/main/res/values/colors.xml

@@ -7,4 +7,6 @@
     <color name="colorUserName">#656464</color>
 
     <color name="color_f6">#f6f6f6</color>
+
+    <color name="selectBackground">#80000000</color>
 </resources>

+ 9 - 0
app/src/main/res/values/styles.xml

@@ -217,4 +217,13 @@
 
     </style>
 
+    <!--单选 Widget.AppCompat.CompoundButton.RadioButton-->
+    <style name="checkboxStyle"  parent="@style/Widget.AppCompat.CompoundButton.RadioButton">
+        <item name="android:layout_width">30dp</item>
+        <item name="android:layout_height">30dp</item>
+    </style>
+
+
+
+
 </resources>

+ 8 - 0
baselibrary/src/main/java/com/fxy/baselibrary/util/JsonUtil.java

@@ -113,6 +113,14 @@ public class JsonUtil {
 		}
 	}
 
+	public static Map toJsonMap(String str){
+		if(str != null){
+			return JSONObject.parseObject(str, Map.class);
+		}else{
+			throw new RuntimeException("对象不能为空");
+		}
+	}
+
 	public static <T> T jsonString2Bean(String jsonString ,Class<T> beanClazz){
 		if(jsonString == null){
 			return null;