Quellcode durchsuchen

数据采集界面修改不良现象为选择状态;
外观维修和性能维修界面增加人员编号扫描,带出人员照片;

ChengJH vor 2 Jahren
Ursprung
Commit
e5093c0ed5

+ 155 - 34
app/src/main/java/com/uas/collection/fragment/BreakdownRepairFragment.java

@@ -10,6 +10,7 @@ import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.text.Editable;
 import android.text.TextWatcher;
+import android.util.Base64;
 import android.util.SparseBooleanArray;
 import android.view.Gravity;
 import android.view.KeyEvent;
@@ -30,6 +31,8 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.android.volley.Request;
+import com.android.volley.toolbox.StringRequest;
+import com.bumptech.glide.Glide;
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.BaseViewHolder;
 import com.uas.collection.R;
@@ -37,8 +40,12 @@ import com.uas.collection.activity.FunctionActivity;
 import com.uas.collection.bean.LinecodeBean;
 import com.uas.collection.bean.ResourcesBean;
 import com.uas.collection.bean.StorageRechargeAloneBean;
+import com.uas.collection.camera.CaptureActivity;
 import com.uas.collection.global.GloableParams;
+import com.uas.collection.tools.SharedPreUtil;
+import com.uas.collection.util.CameraUtil;
 import com.uas.collection.util.CommonUtil;
+import com.uas.collection.util.Constants;
 import com.uas.collection.util.FastjsonUtil;
 import com.uas.collection.util.HttpCallback;
 import com.uas.collection.util.HttpParams;
@@ -86,7 +93,12 @@ public class BreakdownRepairFragment extends BaseFragment{
     private String ma_code;
     private String sc_code;
     private ImageView iv_resources;
-
+    private ClearableEditText tv_dc_emcode;
+    private StringRequest mStringRequest;
+    private ImageView iv_personnel_data;
+    private int mFocusId;
+    private static final int SCAN_BARCODE_CODESD = 925;
+    private ImageView iv_dc_emcode;
     @Override
     protected int getLayout() {
         return R.layout.fragment_breakdownrepair;
@@ -111,6 +123,9 @@ public class BreakdownRepairFragment extends BaseFragment{
         ce_product_bar_code = root.findViewById(R.id.ce_product_bar_code);
         iv_popuwindow = root.findViewById(R.id.iv_popuwindow);
         iv_resources = root.findViewById(R.id.iv_resources);
+        tv_dc_emcode = root.findViewById(R.id.tv_dc_emcode);
+        iv_personnel_data = root.findViewById(R.id.iv_personnel_data);
+        iv_dc_emcode = root.findViewById(R.id.iv_dc_emcode);
 //        ce_length.setEnabled(false);
 //        ce_length.setFocusable(false);
 //        ce_length.setKeyListener(null);//重点
@@ -169,6 +184,7 @@ public class BreakdownRepairFragment extends BaseFragment{
             }
         });
 
+
         iv_work_code.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
@@ -294,7 +310,40 @@ public class BreakdownRepairFragment extends BaseFragment{
         });
 
 
+        /**----------------------------人员编号------------------------------------**/
 
+        tv_dc_emcode.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                if (actionId == EditorInfo.IME_ACTION_DONE
+                        || actionId == EditorInfo.IME_ACTION_SEND
+                        || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
+                    String dc_emcode = tv_dc_emcode.getText().toString().trim();
+                    getOrImage(dc_emcode);
+                    return true;
+                }
+                return false;
+            }
+        });
+        iv_dc_emcode.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                tv_dc_emcode.requestFocus();
+                if (CameraUtil.hasCamera()) {
+                    if (root.findFocus() != null) {
+                        mFocusId = root.findFocus().getId();
+                        Intent intent = new Intent();
+                        intent.setClass(mActivity, CaptureActivity.class);
+                        startActivityForResult(intent, SCAN_BARCODE_CODESD);
+                        SharedPreUtil.saveString(mActivity, Constants.STORAGEERECHADD, "NO");
+                    } else {
+                        CommonUtil.toastNoRepeat(mActivity, "请选择您要操作的输入框");
+                    }
+                } else {
+                    CommonUtil.toastNoRepeat(mActivity, getString(R.string.no_camera_detected));
+                }
+            }
+        });
 
         //保存
         tv_save.setOnClickListener(new View.OnClickListener() {
@@ -306,6 +355,49 @@ public class BreakdownRepairFragment extends BaseFragment{
         });
 
 
+    }
+    public void getOrImage(String em_code){
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ASTATIONTHE_RESOURCEFILE)
+                        .method(Request.Method.GET)
+                        .addParam("em_code",em_code)
+                        .tag("Tag" + "getSourceByEmp")
+                        .flag(0)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        progressDialog.dismiss();
+                        Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
+                        if (isSuccess){
+                            JSONObject data = FastjsonUtil.getJSONObject(o.toString(), "data");
+                            JSONArray url = FastjsonUtil.getJSONArray(data, "url");
+                            if (url == null || url.size() == 0){
+                                CommonUtil.toastNoRepeat(mActivity,"未搜索到匹配数据");
+                            }
+                            for(int i=0;i<url.size();i++){
+                                JSONObject data2 = (JSONObject) url.get(i);
+                                if (!StringUtil.isEmpty(data2.getString("path"))){
+                                    String path = data2.getString("path");
+                                    String str2 = new String(Base64.decode(path.getBytes(),Base64.DEFAULT));
+                                    Glide.with(mActivity).load(str2).into(iv_personnel_data);
+                                }
+
+                            }
+                        }
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+                    }
+
+                });
+
+
+
     }
     //工单号
     public void getfuzzySearchData(String inoutNo,String sone){
@@ -475,42 +567,58 @@ public class BreakdownRepairFragment extends BaseFragment{
         String ce_work_codetrim = ce_work_code.getText().toString().trim();
         String at_stationtrim = at_station.getText().toString().trim();
         ArrayList<StorageRechargeAloneBean> selectedItemone = myAdapterone.getSelectedItem();
-        for (int i=0;i<selectedItemone.size();i++){
-            if (selectedItemone.get(i).getAlonedata().equals("其他")){
-                alonedataone=selectedItemone.get(i).getInputce();
-                if (StringUtil.isEmpty(alonedataone)){
-                    object_1.put("SR_BADNAMEREMARK",null);//不良现象
-                }}else {
-                alonedataone = selectedItemone.get(i).getAlonedata();
-                object_1.put("SR_BADNAME",alonedataone);
+        if (selectedItemone.size()==0){
+            CommonUtil.toastNoRepeat(mActivity, "请选择不良现象");
+            object_1.put("SR_BADNAMEREMARK",null);//不良现象
+        }else {
+            for (int i=0;i<selectedItemone.size();i++){
+                if (selectedItemone.get(i).getAlonedata().equals("其他")){
+                    alonedataone=selectedItemone.get(i).getInputce();
+                    if (StringUtil.isEmpty(alonedataone)){
+                        object_1.put("SR_BADNAMEREMARK",null);//不良现象
+                    }}else {
+                    alonedataone = selectedItemone.get(i).getAlonedata();
+                    object_1.put("SR_BADNAME",alonedataone);
+                }
             }
         }
-        ArrayList<StorageRechargeAloneBean> selectedItemtwo = myAdaptertwo.getSelectedItem();
-        if (selectedItemone.get(0).getAlonedata().equals("其他")){
-            alonedatatwo=selectedItemtwo.get(0).getInputce();
-            if (StringUtil.isEmpty(alonedatatwo)){
-                object_1.put("SR_BADLOCATIONREMARK", null);//不良位号
-            }
 
+        ArrayList<StorageRechargeAloneBean> selectedItemtwo = myAdaptertwo.getSelectedItem();
+        if (selectedItemone.size()==0){
+            CommonUtil.toastNoRepeat(mActivity, "请选择不良现象");
+            object_1.put("SR_BADLOCATIONREMARK",null);//不良位号
         }else {
-            if (StringUtil.isEmpty(selectedItemtwo.get(0).getQtyce())){
-                Qtycetwo="0";
+            if (selectedItemone.get(0).getAlonedata().equals("其他")){
+                alonedatatwo=selectedItemtwo.get(0).getInputce();
+                if (StringUtil.isEmpty(alonedatatwo)){
+                    object_1.put("SR_BADLOCATIONREMARK", null);//不良位号
+                }
             }else {
-                Qtycetwo=selectedItemtwo.get(0).getQtyce();
+                if (StringUtil.isEmpty(selectedItemtwo.get(0).getQtyce())){
+                    Qtycetwo="0";
+                }else {
+                    Qtycetwo=selectedItemtwo.get(0).getQtyce();
+                }
+                alonedatatwo = selectedItemtwo.get(0).getAlonedata()+""+Qtycetwo;
+                object_1.put("SR_LOCATION", alonedatatwo);
             }
-            alonedatatwo = selectedItemtwo.get(0).getAlonedata()+""+Qtycetwo;
-            object_1.put("SR_LOCATION", alonedatatwo);
         }
-        ArrayList<StorageRechargeAloneBean> selectedItemthree = myAdapterthree.getSelectedItem();
-        if (selectedItemone.get(0).getAlonedata().equals("其他")){
-            alonedatathree=selectedItemthree.get(0).getInputce();
-            if (StringUtil.isEmpty(alonedatathree)){
-                object_1.put("SR_BADREASONREMARK", null);//原因
-            }
 
+        ArrayList<StorageRechargeAloneBean> selectedItemthree = myAdapterthree.getSelectedItem();
+        if (selectedItemone.size()==0){
+            CommonUtil.toastNoRepeat(mActivity, "请选择不良现象");
+            object_1.put("SR_BADREASONREMARK",null);//原因
         }else {
-            alonedatathree = selectedItemthree.get(0).getAlonedata();
-            object_1.put("SR_REASON", alonedatathree);
+            if (selectedItemone.get(0).getAlonedata().equals("其他")){
+                alonedatathree=selectedItemthree.get(0).getInputce();
+                if (StringUtil.isEmpty(alonedatathree)){
+                    object_1.put("SR_BADREASONREMARK", null);//原因
+                }
+
+            }else {
+                alonedatathree = selectedItemthree.get(0).getAlonedata();
+                object_1.put("SR_REASON", alonedatathree);
+            }
         }
 
         object_1.put("SR_ID", "");
@@ -1171,9 +1279,10 @@ public class BreakdownRepairFragment extends BaseFragment{
             ArrayList<StorageRechargeAloneBean> selectList = new ArrayList<>();
             int checkedPosition = getCheckedPosition();
             if (checkedPosition==-1){
-                checkedPosition=0;
+                selectList.clear();
+            }else {
+                selectList.add(mList.get(checkedPosition));
             }
-            selectList.add(mList.get(checkedPosition));
             return selectList;
         }
         //设置给定位置条目的选择状态
@@ -1334,9 +1443,10 @@ public class BreakdownRepairFragment extends BaseFragment{
             ArrayList<StorageRechargeAloneBean> selectList = new ArrayList<>();
             int checkedPosition = getCheckedPosition();
             if (checkedPosition==-1){
-                checkedPosition=0;
+                selectList.clear();
+            }else {
+                selectList.add(mList.get(checkedPosition));
             }
-            selectList.add(mList.get(checkedPosition));
             return selectList;
         }
         //设置给定位置条目的选择状态
@@ -1548,9 +1658,10 @@ public class BreakdownRepairFragment extends BaseFragment{
             ArrayList<StorageRechargeAloneBean> selectList = new ArrayList<>();
             int checkedPosition = getCheckedPosition();
             if (checkedPosition==-1){
-                checkedPosition=0;
+                selectList.clear();
+            }else {
+                selectList.add(mList.get(checkedPosition));
             }
-            selectList.add(mList.get(checkedPosition));
             return selectList;
         }
         //设置给定位置条目的选择状态
@@ -1623,6 +1734,16 @@ public class BreakdownRepairFragment extends BaseFragment{
         if (resultCode != Activity.RESULT_OK) {
             return;
         }
+        if (requestCode == SCAN_BARCODE_CODESD && data != null) {
+            if (data.getExtras() != null) {
+                String result = data.getExtras().getString(com.uas.collection.camera.CodeUtils.RESULT_STRING);
+                if (mFocusId == R.id.tv_dc_emcode) {
+                    tv_dc_emcode.setText(result);
+                    tv_dc_emcode.setSelection(result.length());
+                    getOrImage(result);
+                }
+            }
+        }
 
     }
 

+ 202 - 12
app/src/main/java/com/uas/collection/fragment/DataCollectionFragment.java

@@ -1,5 +1,6 @@
 package com.uas.collection.fragment;
 
+import android.annotation.SuppressLint;
 import android.app.Activity;
 import android.content.Intent;
 import android.graphics.Color;
@@ -12,14 +13,19 @@ import android.support.v7.widget.RecyclerView;
 import android.text.Editable;
 import android.text.TextWatcher;
 import android.util.Base64;
+import android.util.Log;
+import android.util.SparseBooleanArray;
 import android.view.Gravity;
 import android.view.KeyEvent;
 import android.view.LayoutInflater;
 import android.view.View;
+import android.view.ViewGroup;
 import android.view.Window;
 import android.view.WindowManager;
 import android.view.inputmethod.EditorInfo;
 import android.widget.AutoCompleteTextView;
+import android.widget.CheckBox;
+import android.widget.CompoundButton;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.PopupWindow;
@@ -45,6 +51,7 @@ import com.uas.collection.activity.FunctionActivity;
 import com.uas.collection.bean.IpAndPortBean;
 import com.uas.collection.bean.LinecodeBean;
 import com.uas.collection.bean.ResourcesBean;
+import com.uas.collection.bean.StorageRechargeAloneBean;
 import com.uas.collection.bean.TestcollectDataBean;
 import com.uas.collection.camera.CaptureActivity;
 import com.uas.collection.global.GloableParams;
@@ -57,15 +64,20 @@ import com.uas.collection.util.HttpCallback;
 import com.uas.collection.util.HttpParams;
 import com.uas.collection.util.LogUtil;
 import com.uas.collection.util.MyArrayAdapter;
+import com.uas.collection.util.MyLayoutManager;
 import com.uas.collection.util.StringUtil;
 import com.uas.collection.util.VollyRequest;
 import com.uas.collection.view.ClearableEditText;
 
+import org.jetbrains.annotations.NotNull;
 import org.json.JSONException;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import razerdp.basepopup.BasePopupWindow;
 
@@ -75,8 +87,6 @@ import razerdp.basepopup.BasePopupWindow;
  * 数据采集
  */
 public class DataCollectionFragment extends BaseFragment implements View.OnClickListener {
-
-
     private TextView tv_save;
     private AutoCompleteTextView et_linecode_smts;
     private ImageView iv_popuwindow;
@@ -119,6 +129,11 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
     private ImageView iv_dc_emcode;
     private int mFocusId;
     private static final int SCAN_BARCODE_CODESD = 925;
+    private RecyclerView rv_datachange;
+    private ArrayList<StorageRechargeAloneBean> mFeededList;
+    private SelectAdapter selectAdapter;
+    private String alonedata;
+
     @Override
     protected int getLayout() {
         return R.layout.fragment_datacollection;
@@ -158,6 +173,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         tv_station = root.findViewById(R.id.tv_station);
         tv_dc_emcode = root.findViewById(R.id.tv_dc_emcode);
         iv_dc_emcode = root.findViewById(R.id.iv_dc_emcode);
+        rv_datachange = root.findViewById(R.id.rv_datachange);
 
         mFilterStorageInBeans = Collections.synchronizedList(new ArrayList<>());
 
@@ -319,7 +335,15 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
 ////                initunhealthyPopupWindow();
 //            }
 //        });
-
+        mFeededList = new ArrayList<>();
+        selectAdapter = new SelectAdapter(mFeededList);
+        LinearLayoutManager layoutmanager = new LinearLayoutManager(mActivity);
+        MyLayoutManager layout = new MyLayoutManager();
+        layout.setAutoMeasureEnabled(true);//防止recyclerview高度为wrap时测量item高度0(一定要加这个属性,否则显示不出来)
+        layoutmanager.setOrientation(LinearLayoutManager.HORIZONTAL);//列表横向显示
+        rv_datachange.setLayoutManager(layout);
+        setAdapter(mFeededList);
+        rv_datachange.setAdapter(selectAdapter);
 
 
         tv_save.setOnClickListener(new View.OnClickListener() {
@@ -363,11 +387,6 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
             }
         });
 
-
-
-
-
-
     }
 
     private void closeListPopupWindow() {
@@ -425,6 +444,24 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
 
     }
 
+    private void handleFeededData(JSONArray dataArray) {
+        StorageRechargeAloneBean bean;
+        mFeededList.clear();
+        for (Object index : dataArray) {
+            JSONObject data = (JSONObject) index;
+            bean= new StorageRechargeAloneBean(
+                    data.getString("alonedata"));
+            mFeededList.add(bean);
+        }
+        setAdapter(mFeededList);
+    }
+
+    private void setAdapter(ArrayList<StorageRechargeAloneBean> mList) {
+        LogUtil.i("mList", JSON.toJSONString(mList));
+        selectAdapter = new SelectAdapter(mList);
+        rv_datachange.setAdapter(selectAdapter);
+    }
+
     private class ComDataBean{
         String PS_CODE = null;
         String PS_PRODCODE = null;
@@ -749,7 +786,6 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
                         if (dataArrayone == null|| dataArrayone.size() == 0){
                             CommonUtil.toastNoRepeat(mActivity,"未搜索到匹配数据");
                         }
-
                         if (sourstring.equals("不良")){
                             for(Object index:dataArrayone){
                                 JSONObject data = (JSONObject) index;
@@ -771,6 +807,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
                                 JSONObject data = (JSONObject) index;
                                 ResourcesBean bean = new ResourcesBean();
                                 bean.setSC_CODE(data.getString("SC_CODE"));
+                                bean.setST_REMARK(data.getString("ST_REMARK"));
                                 resourcesBeanList.add(bean);
                             }
                             ipAndResourcesPortAdapter.setmList(resourcesBeanList);
@@ -877,6 +914,14 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         if (ec_passqtytrim.isEmpty()){
             ec_passqtytrim="1";
         }
+        ArrayList<StorageRechargeAloneBean> selectedItem = selectAdapter.getSelectedItem();
+        if (selectedItem.size()==0){
+            CommonUtil.toastNoRepeat(mActivity, "请选择不良现象");
+            return;
+        }
+        for (int i=0;i<selectedItem.size();i++){
+            alonedata = selectedItem.get(i).getAlonedata();
+        }
 
         JSONArray jsonArray = new JSONArray();
         JSONObject object_1 = new JSONObject();
@@ -885,7 +930,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         object_1.put("SR_SOURCECODE", at_stationtrim);//资源
         object_1.put("SR_PASSQTY", "0");//通过数量
         object_1.put("SR_NGQTY", ec_passqtytrim);//NG数量
-        object_1.put("SR_BADNAME","ce_unhealthytrim");//不良现象
+        object_1.put("SR_BADNAME",alonedata);//不良现象
         object_1.put("SR_TYPE", "数据采集");//种类(数据采集/、外观维修/性能维修)
         object_1.put("SR_LOCATION", ce_bit_numbertrim);//位号
         object_1.put("SR_REASON", "");//原因
@@ -1077,16 +1122,16 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         search_im.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                getfuzzySearchSourceData(ce_resources.getText().toString().trim(),"弹框");
+                getfuzzySearchSourceData(edit_et.getText().toString().trim(),"弹框");
             }
         });
 
         ipAndResourcesPortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
-
             @Override
             public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
                 List<ResourcesBean> ipAndPortBeans = ipAndResourcesPortAdapter.getmList();
                 sc_code = ipAndPortBeans.get(position).getSC_CODE();
+                st_remark = ipAndPortBeans.get(position).getST_REMARK();
                 for (int i = 0; i < ipAndPortBeans.size(); i++) {
                     ipAndPortBeans.get(i).setChecked(false);
                 }
@@ -1096,12 +1141,39 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         });
 
 
+        List<String> list=new ArrayList<>();
         //确定
         sure_tv.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
+                list.clear();
                 ce_resources.setText(sc_code);
                 tv_station.setText("当前岗位:"+sc_code);
+                if (!StringUtil.isEmpty(st_remark)){
+                    if (st_remark.contains("|")){
+                        String[] split = st_remark.split("\\|");
+                        list.addAll(Arrays.asList(split));
+                    }else {
+                        list.add(st_remark);
+                    }
+                    JSONObject jsonObject = new JSONObject();
+                    JSONArray jsonArray = new JSONArray();
+                    JSONObject object_1 = new JSONObject();
+                    for (int i=0;i<list.size();i++){
+                        StorageRechargeAloneBean bean=new StorageRechargeAloneBean(list.get(i));
+                        object_1.put("alone", list.get(i));
+                        jsonArray.add(bean);
+                    }
+
+                    jsonObject.put("formStore", jsonArray);
+                    Log.e("alone===2",jsonObject.toString());
+
+                    JSONArray dataArray = FastjsonUtil.getJSONArray(jsonObject.toString(), "formStore");
+                    handleFeededData(dataArray);
+                }
+
+
+
                 closeListPopupWindow();
             }
         });
@@ -1296,7 +1368,125 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
 
 
 
+    public class SelectAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
+        private int checkedPosition = -1;
+        private boolean onBind;
+        private ArrayList<StorageRechargeAloneBean> mList = new ArrayList<>();
+        private SparseBooleanArray mSelectedPositions = new SparseBooleanArray();
+        private boolean mIsSelectable = false;
+
+
+        public SelectAdapter(ArrayList<StorageRechargeAloneBean> list) {
+            if (list == null) {
+                throw new IllegalArgumentException("model Data must not be null");
+            }
+            mList = list;
+        }
+
+        //更新adpter的数据和选择状态
+        public void updateDataSet(ArrayList<StorageRechargeAloneBean> list) {
+            this.mList = list;
+            mSelectedPositions = new SparseBooleanArray();
+//            ab.setTitle("已选择" + 0 + "项");
+        }
+
 
+        @Override
+        public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
+            View itemView = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.recyclerview_item_data, viewGroup, false);
+            return new  SelectAdapter.ListItemViewHolder(itemView);
+        }
+
+        private Map<Integer, Boolean> map = new HashMap<>();
+        //绑定界面,设置监听
+        @SuppressLint("SetTextI18n")
+        @Override
+        public void onBindViewHolder(final RecyclerView.@NotNull ViewHolder holder, @SuppressLint("RecyclerView") int i) {
+
+            //设置条目状态
+            (( SelectAdapter.ListItemViewHolder) holder).mainTitle.setText(mList.get(i).getAlonedata());
+//            ((ListItemViewHolder) holder).checkBox.setChecked();
+            //checkBox的监听
+            (( SelectAdapter.ListItemViewHolder) holder).checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+                @Override
+                public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+                    if (isChecked == true) {
+                        map.clear();
+                        map.put(i, true);
+                        checkedPosition = i;
+                    } else {
+                        map.remove(i);
+                        if (map.size() == 0) {
+                            checkedPosition = -1; //-1 代表一个都未选择
+                        }
+                    }
+                    if (!onBind) {
+                        notifyDataSetChanged();
+                    }
+                }
+            });
+            onBind = true;
+            if (map != null && map.containsKey(i)) {
+                (( SelectAdapter.ListItemViewHolder) holder).checkBox.setChecked(true);
+            } else {
+                (( SelectAdapter.ListItemViewHolder) holder).checkBox.setChecked(false);
+            }
+            onBind = false;
+        }
+
+        //获得选中条目的结果
+        public ArrayList<StorageRechargeAloneBean> getSelectedItem() {
+            ArrayList<StorageRechargeAloneBean> selectList = new ArrayList<>();
+            int checkedPosition = getCheckedPosition();
+            if (checkedPosition==-1){
+                selectList.clear();
+            }else {
+                selectList.add(mList.get(checkedPosition));
+            }
+
+            return selectList;
+        }
+        //设置给定位置条目的选择状态
+        private void setItemChecked(int position, boolean isChecked) {
+            mSelectedPositions.put(position, isChecked);
+        }
+
+
+        //根据位置判断条目是否选中
+        private boolean isItemChecked(int position) {
+            return mSelectedPositions.get(position);
+        }
+
+        //得到当前选中的位置
+        public int getCheckedPosition() {
+            return checkedPosition;
+        }
+        @Override
+        public int getItemCount() {
+            return mList == null ? 0 : mList.size();
+        }
+        //根据位置判断条目是否可选
+        private boolean isSelectable() {
+            return mIsSelectable;
+        }
+        //设置给定位置条目的可选与否的状态
+        private void setSelectable(boolean selectable) {
+            mIsSelectable = selectable;
+        }
+        public class ListItemViewHolder extends RecyclerView.ViewHolder{
+            //ViewHolder
+            CheckBox checkBox;
+            TextView mainTitle;
+            ClearableEditText ce_other;
+            ListItemViewHolder(View view) {
+                super(view);
+                this.mainTitle = (TextView) view.findViewById(R.id.text);
+                this.checkBox = (CheckBox) view.findViewById(R.id.select_checkbox);
+                this.ce_other = (ClearableEditText) view.findViewById(R.id.ce_other);
+
+            }
+        }
+    }
 
     @Override
     public boolean onKeyDown(int keyCode, KeyEvent event) {

+ 147 - 25
app/src/main/java/com/uas/collection/fragment/StorageRechargeListFragment.java

@@ -10,6 +10,7 @@ import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.text.Editable;
 import android.text.TextWatcher;
+import android.util.Base64;
 import android.util.Log;
 import android.util.SparseBooleanArray;
 import android.view.Gravity;
@@ -31,6 +32,8 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.android.volley.Request;
+import com.android.volley.toolbox.StringRequest;
+import com.bumptech.glide.Glide;
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.BaseViewHolder;
 import com.uas.collection.R;
@@ -38,8 +41,12 @@ import com.uas.collection.activity.FunctionActivity;
 import com.uas.collection.bean.LinecodeBean;
 import com.uas.collection.bean.ResourcesBean;
 import com.uas.collection.bean.StorageRechargeAloneBean;
+import com.uas.collection.camera.CaptureActivity;
 import com.uas.collection.global.GloableParams;
+import com.uas.collection.tools.SharedPreUtil;
+import com.uas.collection.util.CameraUtil;
 import com.uas.collection.util.CommonUtil;
+import com.uas.collection.util.Constants;
 import com.uas.collection.util.FastjsonUtil;
 import com.uas.collection.util.HttpCallback;
 import com.uas.collection.util.HttpParams;
@@ -82,7 +89,12 @@ public class StorageRechargeListFragment extends BaseFragment{
     private ImageView iv_resources;
     private IpAndResourcesPortAdapter ipAndResourcesPortAdapter;
     private String sc_code;
-
+    private ClearableEditText tv_dc_emcode;
+    private StringRequest mStringRequest;
+    private ImageView iv_personnel_data;
+    private ImageView iv_dc_emcode;
+    private int mFocusId;
+    private static final int SCAN_BARCODE_CODESD = 925;
     @Override
     protected int getLayout() {
         return R.layout.fragment_storage_recharge_list;
@@ -109,6 +121,9 @@ public class StorageRechargeListFragment extends BaseFragment{
         ce_product_bar_code = root.findViewById(R.id.ce_product_bar_code);
         iv_popuwindow = root.findViewById(R.id.iv_popuwindow);
         iv_resources = root.findViewById(R.id.iv_resources);
+        tv_dc_emcode = root.findViewById(R.id.tv_dc_emcode);
+        iv_personnel_data = root.findViewById(R.id.iv_personnel_data);
+        iv_dc_emcode = root.findViewById(R.id.iv_dc_emcode);
 
 
 //        ce_length.setEnabled(false);
@@ -332,6 +347,49 @@ public class StorageRechargeListFragment extends BaseFragment{
                 return false;
             }
         });
+        /**----------------------------人员编号------------------------------------**/
+
+        tv_dc_emcode.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                if (actionId == EditorInfo.IME_ACTION_DONE
+                        || actionId == EditorInfo.IME_ACTION_SEND
+                        || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
+                    String dc_emcode = tv_dc_emcode.getText().toString().trim();
+                    getOrImage(dc_emcode);
+                    return true;
+                }
+                return false;
+            }
+        });
+
+        iv_dc_emcode.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                tv_dc_emcode.requestFocus();
+                if (CameraUtil.hasCamera()) {
+                    if (root.findFocus() != null) {
+                        mFocusId = root.findFocus().getId();
+                        Intent intent = new Intent();
+                        intent.setClass(mActivity, CaptureActivity.class);
+                        startActivityForResult(intent, SCAN_BARCODE_CODESD);
+                        SharedPreUtil.saveString(mActivity, Constants.STORAGEERECHADD, "NO");
+                    } else {
+                        CommonUtil.toastNoRepeat(mActivity, "请选择您要操作的输入框");
+                    }
+                } else {
+                    CommonUtil.toastNoRepeat(mActivity, getString(R.string.no_camera_detected));
+                }
+            }
+        });
+
+
+
+
+
+
+
+
 
         tv_save.setOnClickListener(new View.OnClickListener() {
             @Override
@@ -342,6 +400,49 @@ public class StorageRechargeListFragment extends BaseFragment{
             }
         });
 
+    }
+    public void getOrImage(String em_code){
+        progressDialog.show();
+        VollyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ASTATIONTHE_RESOURCEFILE)
+                        .method(Request.Method.GET)
+                        .addParam("em_code",em_code)
+                        .tag("Tag" + "getSourceByEmp")
+                        .flag(0)
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        progressDialog.dismiss();
+                        Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(),"success");
+                        if (isSuccess){
+                            JSONObject data = FastjsonUtil.getJSONObject(o.toString(), "data");
+                            JSONArray url = FastjsonUtil.getJSONArray(data, "url");
+                            if (url == null || url.size() == 0){
+                                CommonUtil.toastNoRepeat(mActivity,"未搜索到匹配数据");
+                            }
+                            for(int i=0;i<url.size();i++){
+                                JSONObject data2 = (JSONObject) url.get(i);
+                                if (!StringUtil.isEmpty(data2.getString("path"))){
+                                    String path = data2.getString("path");
+                                    String str2 = new String(Base64.decode(path.getBytes(),Base64.DEFAULT));
+                                    Glide.with(mActivity).load(str2).into(iv_personnel_data);
+                                }
+
+                            }
+                        }
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        progressDialog.dismiss();
+                        CommonUtil.toastNoRepeat(mActivity, failStr);
+                    }
+
+                });
+
+
+
     }
     public void getfuzzySearchData(String inoutNo,String sone){
 
@@ -529,21 +630,24 @@ public class StorageRechargeListFragment extends BaseFragment{
         String ce_work_codetrim = ce_work_code.getText().toString().trim();
         String at_stationtrim = at_station.getText().toString().trim();
         ArrayList<StorageRechargeAloneBean> selectedItem = myAdapter.getSelectedItem();
-        for (int i=0;i<selectedItem.size();i++){
-            String alonedata = selectedItem.get(i).getAlonedata();
-            if (alonedata.equals("其他")){
-                input_Aloneda=selectedItem.get(i).getInputce();
-                if (StringUtil.isEmpty(input_Aloneda)){
-                    object_1.put("SR_BADNAMEREMARK",null);//不良现象
-                }
+        if (selectedItem.size()==0){
+            CommonUtil.toastNoRepeat(mActivity, "请选择不良现象");
+            object_1.put("SR_BADNAME",null);//不良现象
+        }else {
+            for (int i=0;i<selectedItem.size();i++){
+                String alonedata = selectedItem.get(i).getAlonedata();
+                if (alonedata.equals("其他")){
+                    input_Aloneda=selectedItem.get(i).getInputce();
+                    if (StringUtil.isEmpty(input_Aloneda)){
+                        object_1.put("SR_BADNAMEREMARK",null);//不良现象
+                    }
 
-            }else {
-                input_Aloneda=selectedItem.get(i).getAlonedata();
-                object_1.put("SR_BADNAME",input_Aloneda);//不良现象
+                }else {
+                    input_Aloneda=selectedItem.get(i).getAlonedata();
+                    object_1.put("SR_BADNAME",input_Aloneda);//不良现象
+                }
             }
         }
-
-
         object_1.put("SR_ID", "");
         object_1.put("SR_MAKECODE", ce_work_codetrim);//工单号
         object_1.put("SR_SOURCECODE", at_stationtrim);//资源
@@ -597,21 +701,27 @@ public class StorageRechargeListFragment extends BaseFragment{
         String ce_work_codetrim = ce_work_code.getText().toString().trim();
         String at_stationtrim = at_station.getText().toString().trim();
         ArrayList<StorageRechargeAloneBean> selectedItem = myAdapter.getSelectedItem();
-        for (int i=0;i<selectedItem.size();i++){
-            String alonedata = selectedItem.get(i).getAlonedata();
-            if (alonedata.equals("其他")){
-                input_Aloneda=selectedItem.get(i).getInputce();
-                if (StringUtil.isEmpty(input_Aloneda)){
-                    object_1.put("SR_BADNAMEREMARK",null);//不良现象
-                }
+        if (selectedItem.size()==0){
+            CommonUtil.toastNoRepeat(mActivity, "请选择不良现象");
+            object_1.put("SR_BADNAMEREMARK",null);//不良现象
+        }else {
+            for (int i=0;i<selectedItem.size();i++){
+                String alonedata = selectedItem.get(i).getAlonedata();
+                if (alonedata.equals("其他")){
+                    input_Aloneda=selectedItem.get(i).getInputce();
+                    if (StringUtil.isEmpty(input_Aloneda)){
+                        object_1.put("SR_BADNAMEREMARK",null);//不良现象
+                    }
 
-            }else {
-                input_Aloneda=selectedItem.get(i).getAlonedata();
-                object_1.put("SR_BADNAME",input_Aloneda);//不良现象
+                }else {
+                    input_Aloneda=selectedItem.get(i).getAlonedata();
+                    object_1.put("SR_BADNAME",input_Aloneda);//不良现象
+                }
             }
         }
 
 
+
         object_1.put("SR_ID", "");
         object_1.put("SR_MAKECODE", ce_work_codetrim);//工单号
         object_1.put("SR_SOURCECODE", at_stationtrim);//资源
@@ -625,6 +735,7 @@ public class StorageRechargeListFragment extends BaseFragment{
         object_1.put("SR_INMAN", "");//录入人
         object_1.put("SR_INDATE", "");//录入时间
         jsonArray.add(object_1);
+        Log.e("jsonArray=====",jsonArray.toJSONString());
         progressDialog.show();
         VollyRequest.getInstance().stringRequest(new HttpParams.Builder()
                 .url(GloableParams.ASTATIONTHE_SELECT_COLLECTDATA)
@@ -1073,9 +1184,10 @@ public class StorageRechargeListFragment extends BaseFragment{
             ArrayList<StorageRechargeAloneBean> selectList = new ArrayList<>();
             int checkedPosition = getCheckedPosition();
             if (checkedPosition==-1){
-                checkedPosition=0;
+                selectList.clear();
+            }else {
+                selectList.add(mList.get(checkedPosition));
             }
-            selectList.add(mList.get(checkedPosition));
             return selectList;
         }
         //设置给定位置条目的选择状态
@@ -1155,6 +1267,16 @@ public class StorageRechargeListFragment extends BaseFragment{
         if (resultCode != Activity.RESULT_OK) {
             return;
         }
+        if (requestCode == SCAN_BARCODE_CODESD && data != null) {
+            if (data.getExtras() != null) {
+                String result = data.getExtras().getString(com.uas.collection.camera.CodeUtils.RESULT_STRING);
+                if (mFocusId == R.id.tv_dc_emcode) {
+                    tv_dc_emcode.setText(result);
+                    tv_dc_emcode.setSelection(result.length());
+                    getOrImage(result);
+                }
+            }
+        }
     }
 
 

+ 180 - 114
app/src/main/res/layout-large/fragment_breakdownrepair.xml

@@ -7,140 +7,206 @@
         android:layout_weight="1"
         android:layout_width="match_parent"
         android:layout_height="match_parent">
-    <LinearLayout
-        android:orientation="vertical"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content">
         <LinearLayout
-            android:layout_marginRight="@dimen/dp_10"
-            android:layout_marginLeft="@dimen/dp_10"
-            android:layout_marginTop="@dimen/dp_10"
             android:orientation="horizontal"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content">
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center"
-                android:text="不良现象">
-            </TextView>
+            android:layout_height="match_parent">
             <LinearLayout
-                android:layout_marginLeft="30dp"
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:layout_weight="1">
+                android:layout_marginLeft="5dp"
+                android:orientation="vertical"
+                android:layout_width="wrap_content"
+                android:layout_marginTop="@dimen/dp_10"
+                android:layout_height="wrap_content">
                 <TextView
-                    android:layout_width="wrap_content"
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
+                    android:text="人员照片"
                     android:layout_gravity="center"
-                    android:text="工单号:">
+                    android:gravity="center">
                 </TextView>
+                <ImageView
+                    android:id="@+id/iv_personnel_data"
+                    android:layout_width="100dp"
+                    android:layout_height="120dp"
+                    android:scaleType="centerCrop"
+                    android:background="@drawable/bg_line_edittext">
+                </ImageView>
 
-                <FrameLayout
-                    android:layout_width="0dp"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="1">
+            </LinearLayout>
+            <LinearLayout
+                android:orientation="vertical"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+                <LinearLayout
+                    android:layout_marginRight="@dimen/dp_10"
+                    android:layout_marginLeft="@dimen/dp_10"
+                    android:layout_marginTop="@dimen/dp_10"
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <LinearLayout
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1">
 
-                    <AutoCompleteTextView
-                        android:id="@+id/ce_work_code"
-                        style="@style/EditTextLineStyle"
-                        android:layout_height="30dp"
-                        android:hint="请输入工单号" />
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:text="人员编号:"
+                            android:layout_gravity="center"
+                            android:textColor="@color/black">
+                        </TextView>
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content">
+                            <com.uas.collection.view.ClearableEditText
+                                android:id="@+id/tv_dc_emcode"
+                                style="@style/EditTextLineStyle"
+                                android:text=""
+                                android:hint="请输入人员编号"
+                                android:layout_width="match_parent"
+                                android:layout_height="30dp"
+                                android:layout_weight="1"
+                                android:textColor="@color/black"
+                                />
 
-                    <ImageView
-                        android:id="@+id/iv_work_code"
-                        android:layout_width="wrap_content"
+                            <ImageView
+                                android:id="@+id/iv_dc_emcode"
+                                android:layout_width="30dp"
+                                android:layout_height="wrap_content"
+                                android:layout_gravity="center"
+                                android:layout_marginRight="10dp"
+                                android:layout_marginLeft="5dp"
+                                android:clickable="false"
+                                android:src="@drawable/ic_edittext_scan" />
+                        </LinearLayout>
+                    </LinearLayout>
+                    <LinearLayout
+                        android:layout_marginLeft="@dimen/dp_10"
+                        android:layout_width="0dp"
                         android:layout_height="wrap_content"
-                        android:layout_gravity="center|right"
-                        android:layout_marginRight="13dp"
-                        android:src="@drawable/wrong"
-                        android:visibility="gone" />
-                </FrameLayout>
-                <ImageView
-                    android:layout_gravity="center"
-                    android:id="@+id/iv_popuwindow"
-                    android:layout_width="30dp"
-                    android:layout_height="match_parent"
-                    android:layout_marginRight="10dp"
-                    android:layout_marginLeft="5dp"
-                    android:background="@drawable/bg_button"
-                    android:src="@drawable/search_48" />
-            </LinearLayout>
-            <LinearLayout
-                android:layout_marginLeft="30dp"
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:layout_weight="1">
+                        android:layout_weight="1">
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center"
+                            android:text="工单号:">
+                        </TextView>
+
+                        <FrameLayout
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1">
+
+                            <AutoCompleteTextView
+                                android:id="@+id/ce_work_code"
+                                style="@style/EditTextLineStyle"
+                                android:layout_height="30dp"
+                                android:hint="请输入工单号" />
+
+                            <ImageView
+                                android:id="@+id/iv_work_code"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_gravity="center|right"
+                                android:layout_marginRight="13dp"
+                                android:src="@drawable/wrong"
+                                android:visibility="gone" />
+                        </FrameLayout>
+                        <ImageView
+                            android:layout_gravity="center"
+                            android:id="@+id/iv_popuwindow"
+                            android:layout_width="30dp"
+                            android:layout_height="match_parent"
+                            android:layout_marginRight="10dp"
+                            android:layout_marginLeft="5dp"
+                            android:background="@drawable/bg_button"
+                            android:src="@drawable/search_48" />
+                    </LinearLayout>
+                    <LinearLayout
+                        android:layout_marginLeft="@dimen/dp_10"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1">
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center"
+                            android:text="岗位资源:">
+                        </TextView>
+
+                        <FrameLayout
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1">
+
+                            <AutoCompleteTextView
+                                android:id="@+id/at_station"
+                                style="@style/EditTextLineStyle"
+                                android:layout_height="30dp"
+                                android:hint="请输入岗位资源" />
+
+                            <ImageView
+                                android:id="@+id/iv_station"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_gravity="center|right"
+                                android:layout_marginRight="13dp"
+                                android:src="@drawable/wrong"
+                                android:visibility="gone" />
+                        </FrameLayout>
+                        <ImageView
+                            android:id="@+id/iv_resources"
+                            android:layout_gravity="center"
+                            android:layout_width="30dp"
+                            android:layout_height="match_parent"
+                            android:layout_marginRight="10dp"
+                            android:layout_marginLeft="5dp"
+                            android:background="@drawable/bg_button"
+                            android:src="@drawable/search_48" />
+                    </LinearLayout>
+
+                </LinearLayout>
                 <TextView
+                    android:layout_marginLeft="@dimen/dp_10"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_gravity="center"
-                    android:text="岗位资源:">
+                    android:layout_gravity="left"
+                    android:text="不良现象">
                 </TextView>
-
-                <FrameLayout
-                    android:layout_width="0dp"
+                <android.support.v7.widget.RecyclerView
+                    android:id="@+id/rv_one"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                </android.support.v7.widget.RecyclerView>
+                <TextView
+                    android:layout_marginLeft="@dimen/dp_10"
+                    android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_weight="1">
-
-                    <AutoCompleteTextView
-                        android:id="@+id/at_station"
-                        style="@style/EditTextLineStyle"
-                        android:layout_height="30dp"
-                        android:hint="请输入岗位资源" />
+                    android:layout_marginTop="@dimen/dp_10"
+                    android:text="不良位号">
+                </TextView>
+                <android.support.v7.widget.RecyclerView
+                    android:id="@+id/rv_two"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                </android.support.v7.widget.RecyclerView>
+                <TextView
+                    android:layout_marginLeft="@dimen/dp_10"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/dp_10"
+                    android:text="不良原因">
+                </TextView>
+                <android.support.v7.widget.RecyclerView
+                    android:id="@+id/rv_three"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                </android.support.v7.widget.RecyclerView>
 
-                    <ImageView
-                        android:id="@+id/iv_station"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_gravity="center|right"
-                        android:layout_marginRight="13dp"
-                        android:src="@drawable/wrong"
-                        android:visibility="gone" />
-                </FrameLayout>
-                <ImageView
-                    android:id="@+id/iv_resources"
-                    android:layout_gravity="center"
-                    android:layout_width="30dp"
-                    android:layout_height="match_parent"
-                    android:layout_marginRight="10dp"
-                    android:layout_marginLeft="5dp"
-                    android:background="@drawable/bg_button"
-                    android:src="@drawable/search_48" />
             </LinearLayout>
-
         </LinearLayout>
-        <android.support.v7.widget.RecyclerView
-            android:id="@+id/rv_one"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content">
-        </android.support.v7.widget.RecyclerView>
-        <TextView
-            android:layout_marginLeft="@dimen/dp_10"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="@dimen/dp_10"
-            android:text="不良位号">
-        </TextView>
-        <android.support.v7.widget.RecyclerView
-            android:id="@+id/rv_two"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content">
-        </android.support.v7.widget.RecyclerView>
-        <TextView
-            android:layout_marginLeft="@dimen/dp_10"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="@dimen/dp_10"
-            android:text="不良原因">
-        </TextView>
-        <android.support.v7.widget.RecyclerView
-            android:id="@+id/rv_three"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content">
-        </android.support.v7.widget.RecyclerView>
 
-    </LinearLayout>
     </ScrollView>
     <View
         android:layout_width="match_parent"
@@ -148,7 +214,7 @@
         android:background="@color/black">
     </View>
     <LinearLayout
-        android:layout_marginLeft="10dp"
+        android:layout_marginLeft="5dp"
         android:layout_marginTop="30dp"
         android:orientation="horizontal"
         android:layout_width="match_parent"

+ 7 - 7
app/src/main/res/layout-large/fragment_datacollection.xml

@@ -69,7 +69,7 @@
                 </TableRow>
 
                 <LinearLayout
-                    android:layout_marginTop="20dp"
+                     android:layout_marginTop="@dimen/dp_10"
                     android:orientation="horizontal"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content">
@@ -94,7 +94,7 @@
                 </LinearLayout>
 
                 <TableRow
-                    android:layout_marginTop="20dp">
+                     android:layout_marginTop="@dimen/dp_10">
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
@@ -134,7 +134,7 @@
                 </TableRow>
 
                 <TableRow
-                    android:layout_marginTop="20dp">
+                     android:layout_marginTop="@dimen/dp_10">
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
@@ -181,7 +181,7 @@
                 </TableRow>
 
                 <TableRow
-                    android:layout_marginTop="20dp">
+                     android:layout_marginTop="@dimen/dp_10">
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
@@ -215,7 +215,7 @@
                 </TableRow>
                 <TableRow
                     android:visibility="gone"
-                    android:layout_marginTop="20dp">
+                     android:layout_marginTop="@dimen/dp_10">
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
@@ -261,7 +261,7 @@
                     </LinearLayout>
                 </TableRow>
                 <TableRow
-                    android:layout_marginTop="20dp">
+                    android:layout_marginTop="@dimen/dp_10">
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
@@ -276,7 +276,7 @@
                     </android.support.v7.widget.RecyclerView>
                 </TableRow>
                 <TableRow
-                    android:layout_marginTop="20dp">
+                     android:layout_marginTop="@dimen/dp_10">
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"

+ 155 - 83
app/src/main/res/layout-large/fragment_storage_recharge_list.xml

@@ -5,111 +5,183 @@
     android:layout_height="match_parent"
     android:orientation="vertical">
     <LinearLayout
-        android:layout_marginRight="@dimen/dp_10"
-        android:layout_marginLeft="@dimen/dp_10"
-        android:layout_marginTop="@dimen/dp_10"
         android:orientation="horizontal"
         android:layout_width="match_parent"
         android:layout_height="wrap_content">
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center"
-            android:text="不良现象">
-        </TextView>
         <LinearLayout
-            android:layout_marginLeft="30dp"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1">
+            android:layout_marginLeft="5dp"
+            android:orientation="vertical"
+            android:layout_width="wrap_content"
+            android:layout_marginTop="@dimen/dp_10"
+            android:layout_height="wrap_content">
             <TextView
-                android:layout_width="wrap_content"
+                android:layout_width="match_parent"
                 android:layout_height="wrap_content"
+                android:text="人员照片"
                 android:layout_gravity="center"
-                android:text="工单号:">
+                android:gravity="center">
             </TextView>
+            <ImageView
+                android:id="@+id/iv_personnel_data"
+                android:layout_width="100dp"
+                android:layout_height="120dp"
+                android:scaleType="centerCrop"
+                android:background="@drawable/bg_line_edittext">
+            </ImageView>
 
-            <FrameLayout
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:layout_weight="1">
+        </LinearLayout>
+        <LinearLayout
+            android:layout_marginLeft="5dp"
+            android:orientation="vertical"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <LinearLayout
+                android:layout_marginRight="5dp"
+                android:layout_marginTop="@dimen/dp_10"
+                android:orientation="horizontal"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1">
 
-                <AutoCompleteTextView
-                    android:id="@+id/ce_work_code"
-                    style="@style/EditTextLineStyle"
-                    android:layout_height="30dp"
-                    android:hint="请输入工单号" />
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="人员编号:"
+                        android:layout_gravity="center"
+                        android:textColor="@color/black">
+                    </TextView>
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content">
+                        <com.uas.collection.view.ClearableEditText
+                            android:id="@+id/tv_dc_emcode"
+                            style="@style/EditTextLineStyle"
+                            android:text=""
+                            android:hint="请输入人员编号"
+                            android:layout_width="match_parent"
+                            android:layout_height="30dp"
+                            android:layout_weight="1"
+                            android:textColor="@color/black"
+                            />
 
-                <ImageView
-                    android:id="@+id/iv_work_code"
-                    android:layout_width="wrap_content"
+                        <ImageView
+                            android:id="@+id/iv_dc_emcode"
+                            android:layout_width="30dp"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center"
+                            android:layout_marginRight="10dp"
+                            android:layout_marginLeft="5dp"
+                            android:clickable="false"
+                            android:src="@drawable/ic_edittext_scan" />
+                    </LinearLayout>
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
-                    android:layout_gravity="center|right"
-                    android:layout_marginRight="13dp"
-                    android:src="@drawable/wrong"
-                    android:visibility="gone" />
-            </FrameLayout>
-            <ImageView
-                android:layout_gravity="center"
-                android:id="@+id/iv_popuwindow"
-                android:layout_width="30dp"
-                android:layout_height="match_parent"
-                android:layout_marginRight="10dp"
-                android:layout_marginLeft="5dp"
-                android:background="@drawable/bg_button"
-                android:src="@drawable/search_48" />
-        </LinearLayout>
-        <LinearLayout
-            android:layout_marginLeft="30dp"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1">
+                    android:layout_weight="1">
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center"
+                        android:text="工单号:">
+                    </TextView>
+
+                    <FrameLayout
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1">
+
+                        <AutoCompleteTextView
+                            android:id="@+id/ce_work_code"
+                            style="@style/EditTextLineStyle"
+                            android:layout_height="30dp"
+                            android:hint="请输入工单号" />
+
+                        <ImageView
+                            android:id="@+id/iv_work_code"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center|right"
+                            android:layout_marginRight="13dp"
+                            android:src="@drawable/wrong"
+                            android:visibility="gone" />
+                    </FrameLayout>
+                    <ImageView
+                        android:layout_gravity="center"
+                        android:id="@+id/iv_popuwindow"
+                        android:layout_width="30dp"
+                        android:layout_height="match_parent"
+                        android:layout_marginRight="10dp"
+                        android:layout_marginLeft="5dp"
+                        android:background="@drawable/bg_button"
+                        android:src="@drawable/search_48" />
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1">
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center"
+                        android:text="岗位资源:">
+                    </TextView>
+
+                    <FrameLayout
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1">
+
+                        <AutoCompleteTextView
+                            android:id="@+id/at_station"
+                            style="@style/EditTextLineStyle"
+                            android:layout_height="30dp"
+                            android:hint="请输入岗位资源" />
+
+                        <ImageView
+                            android:id="@+id/iv_station"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center|right"
+                            android:layout_marginRight="13dp"
+                            android:src="@drawable/wrong"
+                            android:visibility="gone" />
+                    </FrameLayout>
+                    <ImageView
+                        android:id="@+id/iv_resources"
+                        android:layout_gravity="center"
+                        android:layout_width="30dp"
+                        android:layout_height="match_parent"
+                        android:layout_marginRight="10dp"
+                        android:layout_marginLeft="5dp"
+                        android:background="@drawable/bg_button"
+                        android:src="@drawable/search_48" />
+                </LinearLayout>
+
+            </LinearLayout>
             <TextView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_gravity="center"
-                android:text="岗位资源:">
+                android:layout_gravity="left"
+                android:text="不良现象">
             </TextView>
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/rv_datachange"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+            </android.support.v7.widget.RecyclerView>
 
-            <FrameLayout
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:layout_weight="1">
-
-                <AutoCompleteTextView
-                    android:id="@+id/at_station"
-                    style="@style/EditTextLineStyle"
-                    android:layout_height="30dp"
-                    android:hint="请输入岗位资源" />
 
-                <ImageView
-                    android:id="@+id/iv_station"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_gravity="center|right"
-                    android:layout_marginRight="13dp"
-                    android:src="@drawable/wrong"
-                    android:visibility="gone" />
-            </FrameLayout>
-            <ImageView
-                android:id="@+id/iv_resources"
-                android:layout_gravity="center"
-                android:layout_width="30dp"
-                android:layout_height="match_parent"
-                android:layout_marginRight="10dp"
-                android:layout_marginLeft="5dp"
-                android:background="@drawable/bg_button"
-                android:src="@drawable/search_48" />
         </LinearLayout>
 
     </LinearLayout>
-    <android.support.v7.widget.RecyclerView
-        android:id="@+id/rv_datachange"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content">
-    </android.support.v7.widget.RecyclerView>
+
+
     <LinearLayout
-        android:layout_marginLeft="10dp"
+        android:layout_marginLeft="5dp"
         android:layout_marginTop="30dp"
         android:orientation="horizontal"
         android:layout_width="match_parent"

+ 63 - 0
app/src/main/res/layout-large/recyclerview_item_data.xml

@@ -0,0 +1,63 @@
+<?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="wrap_content"
+    android:layout_height="wrap_content"
+    android:orientation="horizontal"
+    tools:ignore="MissingDefaultResource">
+
+    <LinearLayout
+
+        android:layout_marginLeft="@dimen/textsize_20"
+        android:layout_marginTop="5dp"
+        android:orientation="horizontal"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent">
+        <CheckBox
+            android:layout_gravity="center_vertical"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:id="@+id/select_checkbox"/>
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:text="1111111"
+            android:textSize="@dimen/textsize_20"
+            android:textColor="@color/black"
+            android:id="@+id/text"
+            android:gravity="left"
+            tools:ignore="RtlCompat">
+        </TextView>
+        <com.uas.collection.view.ClearableEditText
+            android:id="@+id/ce_other"
+            style="@style/EditTextLineStyle"
+            android:layout_gravity="center"
+            android:layout_width="200dp"
+            android:layout_height="@dimen/textsize_20"
+            android:layout_weight="1"
+            android:layout_marginLeft="@dimen/dp_10"
+            android:textColor="@color/black"
+            android:visibility="gone" />
+
+        <AutoCompleteTextView
+            android:id="@+id/ce_qty"
+            android:background="@drawable/bg_line_edittext"
+            android:layout_gravity="center"
+            android:layout_width="@dimen/dp_40"
+            android:layout_height="@dimen/textsize_20"
+            android:layout_weight="1"
+            android:text="0"
+            android:gravity="center"
+            android:layout_marginLeft="5dp"
+            android:textColor="@color/black"
+            android:visibility="gone"
+            />
+
+
+    </LinearLayout>
+
+
+
+
+</LinearLayout>

+ 171 - 103
app/src/main/res/layout/fragment_breakdownrepair.xml

@@ -8,137 +8,205 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent">
         <LinearLayout
-            android:orientation="vertical"
+            android:orientation="horizontal"
             android:layout_width="match_parent"
-            android:layout_height="wrap_content">
+            android:layout_height="match_parent">
             <LinearLayout
-                android:layout_marginRight="@dimen/dp_10"
-                android:layout_marginLeft="@dimen/dp_10"
+                android:layout_marginLeft="5dp"
+                android:orientation="vertical"
+                android:layout_width="wrap_content"
                 android:layout_marginTop="@dimen/dp_10"
-                android:orientation="horizontal"
-                android:layout_width="match_parent"
                 android:layout_height="wrap_content">
                 <TextView
-                    android:layout_width="wrap_content"
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
+                    android:text="人员照片"
                     android:layout_gravity="center"
-                    android:text="不良现象">
+                    android:gravity="center">
                 </TextView>
-                <LinearLayout
-                    android:layout_marginLeft="30dp"
-                    android:layout_width="0dp"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="1">
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_gravity="center"
-                        android:text="工单号:">
-                    </TextView>
+                <ImageView
+                    android:id="@+id/iv_personnel_data"
+                    android:layout_width="100dp"
+                    android:layout_height="120dp"
+                    android:scaleType="centerCrop"
+                    android:background="@drawable/bg_line_edittext">
+                </ImageView>
 
-                    <FrameLayout
+            </LinearLayout>
+            <LinearLayout
+                android:orientation="vertical"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+                <LinearLayout
+                    android:layout_marginRight="@dimen/dp_10"
+                    android:layout_marginLeft="@dimen/dp_10"
+                    android:layout_marginTop="@dimen/dp_10"
+                    android:orientation="horizontal"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                    <LinearLayout
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_weight="1">
 
-                        <AutoCompleteTextView
-                            android:id="@+id/ce_work_code"
-                            style="@style/EditTextLineStyle"
-                            android:layout_height="30dp"
-                            android:hint="请输入工单号" />
-
-                        <ImageView
-                            android:id="@+id/iv_work_code"
+                        <TextView
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:layout_gravity="center|right"
-                            android:layout_marginRight="13dp"
-                            android:src="@drawable/wrong"
-                            android:visibility="gone" />
-                    </FrameLayout>
-                    <ImageView
-                        android:layout_gravity="center"
-                        android:id="@+id/iv_popuwindow"
-                        android:layout_width="30dp"
-                        android:layout_height="match_parent"
-                        android:layout_marginRight="10dp"
-                        android:layout_marginLeft="5dp"
-                        android:background="@drawable/bg_button"
-                        android:src="@drawable/search_48" />
-                </LinearLayout>
-                <LinearLayout
-                    android:layout_marginLeft="30dp"
-                    android:layout_width="0dp"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="1">
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_gravity="center"
-                        android:text="岗位资源:">
-                    </TextView>
+                            android:text="人员编号:"
+                            android:layout_gravity="center"
+                            android:textColor="@color/black">
+                        </TextView>
+                        <LinearLayout
+                            android:layout_width="match_parent"
+                            android:layout_height="wrap_content">
+                            <com.uas.collection.view.ClearableEditText
+                                android:id="@+id/tv_dc_emcode"
+                                style="@style/EditTextLineStyle"
+                                android:text=""
+                                android:hint="请输入人员编号"
+                                android:layout_width="match_parent"
+                                android:layout_height="30dp"
+                                android:layout_weight="1"
+                                android:textColor="@color/black"
+                                />
 
-                    <FrameLayout
+                            <ImageView
+                                android:id="@+id/iv_dc_emcode"
+                                android:layout_width="30dp"
+                                android:layout_height="wrap_content"
+                                android:layout_gravity="center"
+                                android:layout_marginRight="10dp"
+                                android:layout_marginLeft="5dp"
+                                android:clickable="false"
+                                android:src="@drawable/ic_edittext_scan" />
+                        </LinearLayout>
+                    </LinearLayout>
+                    <LinearLayout
+                        android:layout_marginLeft="@dimen/dp_10"
                         android:layout_width="0dp"
                         android:layout_height="wrap_content"
                         android:layout_weight="1">
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center"
+                            android:text="工单号:">
+                        </TextView>
+
+                        <FrameLayout
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1">
 
-                        <AutoCompleteTextView
-                            android:id="@+id/at_station"
-                            style="@style/EditTextLineStyle"
-                            android:layout_height="30dp"
-                            android:hint="请输入岗位资源" />
+                            <AutoCompleteTextView
+                                android:id="@+id/ce_work_code"
+                                style="@style/EditTextLineStyle"
+                                android:layout_height="30dp"
+                                android:hint="请输入工单号" />
 
+                            <ImageView
+                                android:id="@+id/iv_work_code"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_gravity="center|right"
+                                android:layout_marginRight="13dp"
+                                android:src="@drawable/wrong"
+                                android:visibility="gone" />
+                        </FrameLayout>
                         <ImageView
-                            android:id="@+id/iv_station"
+                            android:layout_gravity="center"
+                            android:id="@+id/iv_popuwindow"
+                            android:layout_width="30dp"
+                            android:layout_height="match_parent"
+                            android:layout_marginRight="10dp"
+                            android:layout_marginLeft="5dp"
+                            android:background="@drawable/bg_button"
+                            android:src="@drawable/search_48" />
+                    </LinearLayout>
+                    <LinearLayout
+                        android:layout_marginLeft="@dimen/dp_10"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1">
+                        <TextView
                             android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
-                            android:layout_gravity="center|right"
-                            android:layout_marginRight="13dp"
-                            android:src="@drawable/wrong"
-                            android:visibility="gone" />
-                    </FrameLayout>
-                    <ImageView
-                        android:id="@+id/iv_resources"
-                        android:layout_gravity="center"
-                        android:layout_width="30dp"
-                        android:layout_height="match_parent"
-                        android:layout_marginRight="10dp"
-                        android:layout_marginLeft="5dp"
-                        android:background="@drawable/bg_button"
-                        android:src="@drawable/search_48" />
+                            android:layout_gravity="center"
+                            android:text="岗位资源:">
+                        </TextView>
+
+                        <FrameLayout
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1">
+
+                            <AutoCompleteTextView
+                                android:id="@+id/at_station"
+                                style="@style/EditTextLineStyle"
+                                android:layout_height="30dp"
+                                android:hint="请输入岗位资源" />
+
+                            <ImageView
+                                android:id="@+id/iv_station"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:layout_gravity="center|right"
+                                android:layout_marginRight="13dp"
+                                android:src="@drawable/wrong"
+                                android:visibility="gone" />
+                        </FrameLayout>
+                        <ImageView
+                            android:id="@+id/iv_resources"
+                            android:layout_gravity="center"
+                            android:layout_width="30dp"
+                            android:layout_height="match_parent"
+                            android:layout_marginRight="10dp"
+                            android:layout_marginLeft="5dp"
+                            android:background="@drawable/bg_button"
+                            android:src="@drawable/search_48" />
+                    </LinearLayout>
+
                 </LinearLayout>
+                <TextView
+                    android:layout_marginLeft="@dimen/dp_10"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="left"
+                    android:text="不良现象">
+                </TextView>
+                <android.support.v7.widget.RecyclerView
+                    android:id="@+id/rv_one"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                </android.support.v7.widget.RecyclerView>
+                <TextView
+                    android:layout_marginLeft="@dimen/dp_10"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/dp_10"
+                    android:text="不良位号">
+                </TextView>
+                <android.support.v7.widget.RecyclerView
+                    android:id="@+id/rv_two"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                </android.support.v7.widget.RecyclerView>
+                <TextView
+                    android:layout_marginLeft="@dimen/dp_10"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/dp_10"
+                    android:text="不良原因">
+                </TextView>
+                <android.support.v7.widget.RecyclerView
+                    android:id="@+id/rv_three"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+                </android.support.v7.widget.RecyclerView>
 
             </LinearLayout>
-            <android.support.v7.widget.RecyclerView
-                android:id="@+id/rv_one"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content">
-            </android.support.v7.widget.RecyclerView>
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="@dimen/dp_10"
-                android:text="不良位号">
-            </TextView>
-            <android.support.v7.widget.RecyclerView
-                android:id="@+id/rv_two"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content">
-            </android.support.v7.widget.RecyclerView>
-            <TextView
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="@dimen/dp_10"
-                android:text="不良原因">
-            </TextView>
-            <android.support.v7.widget.RecyclerView
-                android:id="@+id/rv_three"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content">
-            </android.support.v7.widget.RecyclerView>
-
         </LinearLayout>
+
     </ScrollView>
     <View
         android:layout_width="match_parent"

+ 60 - 6
app/src/main/res/layout/fragment_datacollection.xml

@@ -69,7 +69,7 @@
                 </TableRow>
 
                 <LinearLayout
-                    android:layout_marginTop="20dp"
+                    android:layout_marginTop="@dimen/dp_10"
                     android:orientation="horizontal"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content">
@@ -93,10 +93,48 @@
                     </TextView>
                 </LinearLayout>
 
+                <TableRow
+                    android:layout_marginTop="@dimen/dp_10">
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="人员编号"
+                        android:layout_gravity="center"
+                        android:textColor="@color/black">
+                    </TextView>
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginLeft="23dp">
+                        <com.uas.collection.view.ClearableEditText
+                            android:id="@+id/tv_dc_emcode"
+                            style="@style/EditTextLineStyle"
+                            android:text=""
+                            android:hint="请输入人员编号"
+                            android:layout_width="match_parent"
+                            android:layout_height="30dp"
+                            android:layout_weight="1"
+                            android:textColor="@color/black"
+                            />
+
+                        <ImageView
+                            android:id="@+id/iv_dc_emcode"
+                            android:layout_width="30dp"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center"
+                            android:layout_marginRight="10dp"
+                            android:layout_marginLeft="5dp"
+                            android:clickable="false"
+                            android:src="@drawable/ic_edittext_scan" />
+                    </LinearLayout>
+
 
 
+
+                </TableRow>
+
                 <TableRow
-                    android:layout_marginTop="20dp">
+                    android:layout_marginTop="@dimen/dp_10">
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
@@ -143,7 +181,7 @@
                 </TableRow>
 
                 <TableRow
-                    android:layout_marginTop="20dp">
+                    android:layout_marginTop="@dimen/dp_10">
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
@@ -176,7 +214,8 @@
                     </LinearLayout>
                 </TableRow>
                 <TableRow
-                    android:layout_marginTop="20dp">
+                    android:visibility="gone"
+                    android:layout_marginTop="@dimen/dp_10">
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
@@ -221,9 +260,23 @@
                             android:src="@drawable/search_48" />
                     </LinearLayout>
                 </TableRow>
-
                 <TableRow
-                    android:layout_marginTop="20dp">
+                    android:layout_marginTop="@dimen/dp_10">
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="不良现象"
+                        android:layout_gravity="center"
+                        android:textColor="@color/black">
+                    </TextView>
+                    <android.support.v7.widget.RecyclerView
+                        android:id="@+id/rv_datachange"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content">
+                    </android.support.v7.widget.RecyclerView>
+                </TableRow>
+                <TableRow
+                    android:layout_marginTop="@dimen/dp_10">
                     <TextView
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
@@ -291,6 +344,7 @@
                 android:id="@+id/iv_personnel_data"
                 android:layout_width="match_parent"
                 android:layout_height="150dp"
+                android:scaleType="centerCrop"
                 android:background="@drawable/bg_line_edittext">
             </ImageView>
             <android.support.v7.widget.RecyclerView

+ 155 - 82
app/src/main/res/layout/fragment_storage_recharge_list.xml

@@ -5,109 +5,181 @@
     android:layout_height="match_parent"
     android:orientation="vertical">
     <LinearLayout
-        android:layout_marginRight="@dimen/dp_10"
-        android:layout_marginLeft="@dimen/dp_10"
-        android:layout_marginTop="@dimen/dp_10"
         android:orientation="horizontal"
         android:layout_width="match_parent"
         android:layout_height="wrap_content">
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center"
-            android:text="不良现象">
-        </TextView>
         <LinearLayout
-            android:layout_marginLeft="30dp"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1">
+            android:layout_marginLeft="5dp"
+            android:orientation="vertical"
+            android:layout_width="wrap_content"
+            android:layout_marginTop="@dimen/dp_10"
+            android:layout_height="wrap_content">
             <TextView
-                android:layout_width="wrap_content"
+                android:layout_width="match_parent"
                 android:layout_height="wrap_content"
+                android:text="人员照片"
                 android:layout_gravity="center"
-                android:text="工单号:">
+                android:gravity="center">
             </TextView>
+            <ImageView
+                android:id="@+id/iv_personnel_data"
+                android:layout_width="100dp"
+                android:layout_height="120dp"
+                android:scaleType="centerCrop"
+                android:background="@drawable/bg_line_edittext">
+            </ImageView>
 
-            <FrameLayout
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:layout_weight="1">
+        </LinearLayout>
+        <LinearLayout
+            android:layout_marginLeft="5dp"
+            android:orientation="vertical"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content">
+            <LinearLayout
+                android:layout_marginRight="5dp"
+                android:layout_marginTop="@dimen/dp_10"
+                android:orientation="horizontal"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1">
 
-                <AutoCompleteTextView
-                    android:id="@+id/ce_work_code"
-                    style="@style/EditTextLineStyle"
-                    android:layout_height="30dp"
-                    android:hint="请输入工单号" />
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="人员编号:"
+                        android:layout_gravity="center"
+                        android:textColor="@color/black">
+                    </TextView>
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content">
+                        <com.uas.collection.view.ClearableEditText
+                            android:id="@+id/tv_dc_emcode"
+                            style="@style/EditTextLineStyle"
+                            android:text=""
+                            android:hint="请输入人员编号"
+                            android:layout_width="match_parent"
+                            android:layout_height="30dp"
+                            android:layout_weight="1"
+                            android:textColor="@color/black"
+                            />
 
-                <ImageView
-                    android:id="@+id/iv_work_code"
-                    android:layout_width="wrap_content"
+                        <ImageView
+                            android:id="@+id/iv_dc_emcode"
+                            android:layout_width="30dp"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center"
+                            android:layout_marginRight="10dp"
+                            android:layout_marginLeft="5dp"
+                            android:clickable="false"
+                            android:src="@drawable/ic_edittext_scan" />
+                    </LinearLayout>
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
-                    android:layout_gravity="center|right"
-                    android:layout_marginRight="13dp"
-                    android:src="@drawable/wrong"
-                    android:visibility="gone" />
-            </FrameLayout>
-            <ImageView
-                android:layout_gravity="center"
-                android:id="@+id/iv_popuwindow"
-                android:layout_width="30dp"
-                android:layout_height="match_parent"
-                android:layout_marginRight="10dp"
-                android:layout_marginLeft="5dp"
-                android:background="@drawable/bg_button"
-                android:src="@drawable/search_48" />
-        </LinearLayout>
-        <LinearLayout
-            android:layout_marginLeft="30dp"
-            android:layout_width="0dp"
-            android:layout_height="wrap_content"
-            android:layout_weight="1">
+                    android:layout_weight="1">
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center"
+                        android:text="工单号:">
+                    </TextView>
+
+                    <FrameLayout
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1">
+
+                        <AutoCompleteTextView
+                            android:id="@+id/ce_work_code"
+                            style="@style/EditTextLineStyle"
+                            android:layout_height="30dp"
+                            android:hint="请输入工单号" />
+
+                        <ImageView
+                            android:id="@+id/iv_work_code"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center|right"
+                            android:layout_marginRight="13dp"
+                            android:src="@drawable/wrong"
+                            android:visibility="gone" />
+                    </FrameLayout>
+                    <ImageView
+                        android:layout_gravity="center"
+                        android:id="@+id/iv_popuwindow"
+                        android:layout_width="30dp"
+                        android:layout_height="match_parent"
+                        android:layout_marginRight="10dp"
+                        android:layout_marginLeft="5dp"
+                        android:background="@drawable/bg_button"
+                        android:src="@drawable/search_48" />
+                </LinearLayout>
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1">
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center"
+                        android:text="岗位资源:">
+                    </TextView>
+
+                    <FrameLayout
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1">
+
+                        <AutoCompleteTextView
+                            android:id="@+id/at_station"
+                            style="@style/EditTextLineStyle"
+                            android:layout_height="30dp"
+                            android:hint="请输入岗位资源" />
+
+                        <ImageView
+                            android:id="@+id/iv_station"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center|right"
+                            android:layout_marginRight="13dp"
+                            android:src="@drawable/wrong"
+                            android:visibility="gone" />
+                    </FrameLayout>
+                    <ImageView
+                        android:id="@+id/iv_resources"
+                        android:layout_gravity="center"
+                        android:layout_width="30dp"
+                        android:layout_height="match_parent"
+                        android:layout_marginRight="10dp"
+                        android:layout_marginLeft="5dp"
+                        android:background="@drawable/bg_button"
+                        android:src="@drawable/search_48" />
+                </LinearLayout>
+
+            </LinearLayout>
             <TextView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_gravity="center"
-                android:text="岗位资源:">
+                android:layout_gravity="left"
+                android:text="不良现象">
             </TextView>
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/rv_datachange"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+            </android.support.v7.widget.RecyclerView>
 
-            <FrameLayout
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:layout_weight="1">
-
-                <AutoCompleteTextView
-                    android:id="@+id/at_station"
-                    style="@style/EditTextLineStyle"
-                    android:layout_height="30dp"
-                    android:hint="请输入岗位资源" />
 
-                <ImageView
-                    android:id="@+id/iv_station"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_gravity="center|right"
-                    android:layout_marginRight="13dp"
-                    android:src="@drawable/wrong"
-                    android:visibility="gone" />
-            </FrameLayout>
-            <ImageView
-                android:id="@+id/iv_resources"
-                android:layout_gravity="center"
-                android:layout_width="30dp"
-                android:layout_height="match_parent"
-                android:layout_marginRight="10dp"
-                android:layout_marginLeft="5dp"
-                android:background="@drawable/bg_button"
-                android:src="@drawable/search_48" />
         </LinearLayout>
 
     </LinearLayout>
-    <android.support.v7.widget.RecyclerView
-        android:id="@+id/rv_datachange"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content">
-    </android.support.v7.widget.RecyclerView>
+
+
     <LinearLayout
         android:layout_marginLeft="10dp"
         android:layout_marginTop="30dp"
@@ -173,6 +245,7 @@
                     android:layout_weight="1"
                     android:layout_height="30dp"
                     android:text="0"
+                    android:inputType="number"
                     android:layout_marginLeft="@dimen/dp_10"
                     android:textColor="@color/black"
                     android:layout_marginRight="@dimen/dp_10"

+ 63 - 0
app/src/main/res/layout/recyclerview_item_data.xml

@@ -0,0 +1,63 @@
+<?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="wrap_content"
+    android:layout_height="wrap_content"
+    android:orientation="horizontal"
+    tools:ignore="MissingDefaultResource">
+
+    <LinearLayout
+
+        android:layout_marginLeft="@dimen/textsize_20"
+        android:layout_marginTop="5dp"
+        android:orientation="horizontal"
+        android:layout_width="wrap_content"
+        android:layout_height="match_parent">
+        <CheckBox
+            android:layout_gravity="center_vertical"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:id="@+id/select_checkbox"/>
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:text="1111111"
+            android:textSize="@dimen/textsize_20"
+            android:textColor="@color/black"
+            android:id="@+id/text"
+            android:gravity="left"
+            tools:ignore="RtlCompat">
+        </TextView>
+        <com.uas.collection.view.ClearableEditText
+            android:id="@+id/ce_other"
+            style="@style/EditTextLineStyle"
+            android:layout_gravity="center"
+            android:layout_width="200dp"
+            android:layout_height="@dimen/textsize_20"
+            android:layout_weight="1"
+            android:layout_marginLeft="@dimen/dp_10"
+            android:textColor="@color/black"
+            android:visibility="gone" />
+
+        <AutoCompleteTextView
+            android:id="@+id/ce_qty"
+            android:background="@drawable/bg_line_edittext"
+            android:layout_gravity="center"
+            android:layout_width="@dimen/dp_40"
+            android:layout_height="@dimen/textsize_20"
+            android:layout_weight="1"
+            android:text="0"
+            android:gravity="center"
+            android:layout_marginLeft="5dp"
+            android:textColor="@color/black"
+            android:visibility="gone"
+            />
+
+
+    </LinearLayout>
+
+
+
+
+</LinearLayout>