浏览代码

外观维修添加勾选列表;
数据采集界面数量改为勾选;

ChengJH 2 年之前
父节点
当前提交
d7ab3813f8

+ 1 - 0
app/build.gradle

@@ -100,6 +100,7 @@ dependencies {
     implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
     implementation "org.java-websocket:Java-WebSocket:1.4.0"
     implementation 'org.greenrobot:eventbus:3.1.1'
+    implementation 'com.android.support:design:28.0.0'
 }
 
 def getVersionName() {

+ 136 - 119
app/src/main/java/com/uas/collection/fragment/BreakdownRepairFragment.java

@@ -11,6 +11,7 @@ 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;
@@ -673,44 +674,59 @@ 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){
+            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 (selectedItemtwo.size() == 0){
+            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 (selectedItemthree.size()==0){
+            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", "");
         object_1.put("SR_MAKECODE", ce_work_codetrim);//工单号
         object_1.put("SR_SOURCECODE", at_stationtrim);//资源
@@ -722,6 +738,7 @@ public class BreakdownRepairFragment 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)
@@ -1001,52 +1018,52 @@ public class BreakdownRepairFragment extends BaseFragment{
         });
 
 
-        edit_et.addTextChangedListener(new TextWatcher() {
-            @Override
-            public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
-            @Override
-            public void onTextChanged(CharSequence s, int start, int before, int count) { }
-            @Override
-            public void afterTextChanged(Editable s) {
-                if (linecodeBeanList.isEmpty()){
-                    getfuzzySearchData(ce_work_code.getText().toString().trim(),"弹框");
-                }
-                if (s.length() >= 0) {
-                    String mSearchStr = s.toString().trim();
-                    LogUtil.i("mSearchStr",mSearchStr);
-                    List<LinecodeBean> thisList = new ArrayList<>();
-                    for(int i=0;i<linecodeBeanList.size();i++){
-                        if(linecodeBeanList.get(i).getMA_CODE().contains(mSearchStr)){
-                            thisList.add(linecodeBeanList.get(i));
-                        }
-                        if(i == linecodeBeanList.size() -1){
-                            ipAndlinecodePortAdapter = new IpAndlinecodePortAdapter(thisList);
-                            rv_ip_port_data.setAdapter(ipAndlinecodePortAdapter);
-                            LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
-                        }
-                    }
-                    ipAndlinecodePortAdapter.notifyDataSetChanged();
-
-                } else {
-
-                    ipAndlinecodePortAdapter = new IpAndlinecodePortAdapter(linecodeBeanList);
-                    rv_ip_port_data.setAdapter(ipAndlinecodePortAdapter);
-
-                }
-                ipAndlinecodePortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
-                    @Override
-                    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
-                        List<LinecodeBean> ipAndPortBeans = ipAndlinecodePortAdapter.getmList();
-                        for (int i = 0; i < ipAndPortBeans.size(); i++) {
-                            ipAndPortBeans.get(i).setChecked(false);
-                        }
-                        ipAndPortBeans.get(position).setChecked(true);
-                        ipAndlinecodePortAdapter.notifyDataSetChanged();
-                    }
-                });
-            }
-
-        });
+//        edit_et.addTextChangedListener(new TextWatcher() {
+//            @Override
+//            public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
+//            @Override
+//            public void onTextChanged(CharSequence s, int start, int before, int count) { }
+//            @Override
+//            public void afterTextChanged(Editable s) {
+//                if (linecodeBeanList.isEmpty()){
+//                    getfuzzySearchData(ce_work_code.getText().toString().trim(),"弹框");
+//                }
+//                if (s.length() >= 0) {
+//                    String mSearchStr = s.toString().trim();
+//                    LogUtil.i("mSearchStr",mSearchStr);
+//                    List<LinecodeBean> thisList = new ArrayList<>();
+//                    for(int i=0;i<linecodeBeanList.size();i++){
+//                        if(linecodeBeanList.get(i).getMA_CODE().contains(mSearchStr)){
+//                            thisList.add(linecodeBeanList.get(i));
+//                        }
+//                        if(i == linecodeBeanList.size() -1){
+//                            ipAndlinecodePortAdapter = new IpAndlinecodePortAdapter(thisList);
+//                            rv_ip_port_data.setAdapter(ipAndlinecodePortAdapter);
+//                            LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
+//                        }
+//                    }
+//                    ipAndlinecodePortAdapter.notifyDataSetChanged();
+//
+//                } else {
+//
+//                    ipAndlinecodePortAdapter = new IpAndlinecodePortAdapter(linecodeBeanList);
+//                    rv_ip_port_data.setAdapter(ipAndlinecodePortAdapter);
+//
+//                }
+//                ipAndlinecodePortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+//                    @Override
+//                    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+//                        List<LinecodeBean> ipAndPortBeans = ipAndlinecodePortAdapter.getmList();
+//                        for (int i = 0; i < ipAndPortBeans.size(); i++) {
+//                            ipAndPortBeans.get(i).setChecked(false);
+//                        }
+//                        ipAndPortBeans.get(position).setChecked(true);
+//                        ipAndlinecodePortAdapter.notifyDataSetChanged();
+//                    }
+//                });
+//            }
+//
+//        });
 
 
     }
@@ -1123,52 +1140,52 @@ public class BreakdownRepairFragment extends BaseFragment{
         });
 
 
-        edit_et.addTextChangedListener(new TextWatcher() {
-            @Override
-            public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
-            @Override
-            public void onTextChanged(CharSequence s, int start, int before, int count) { }
-            @Override
-            public void afterTextChanged(Editable s) {
-                if (resourcesBeanList.isEmpty()){
-                    getfuzzySearchSourceData(at_station.getText().toString().trim(),"弹框");
-                }
-                if (s.length() >= 0) {
-                    String mSearchStr = s.toString().trim();
-                    LogUtil.i("mSearchStr",mSearchStr);
-                    List<ResourcesBean> thisList = new ArrayList<>();
-                    for(int i=0;i<resourcesBeanList.size();i++){
-                        if(resourcesBeanList.get(i).getSC_CODE().contains(mSearchStr)){
-                            thisList.add(resourcesBeanList.get(i));
-                        }
-                        if(i == resourcesBeanList.size() -1){
-                            ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(thisList);
-                            rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
-                            LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
-                        }
-                    }
-                    ipAndResourcesPortAdapter.notifyDataSetChanged();
-
-                } else {
-
-                    ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(resourcesBeanList);
-                    rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
-
-                }
-                ipAndResourcesPortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
-                    @Override
-                    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
-                        List<ResourcesBean> ipAndPortBeans = ipAndResourcesPortAdapter.getmList();
-                        for (int i = 0; i < ipAndPortBeans.size(); i++) {
-                            ipAndPortBeans.get(i).setChecked(false);
-                        }
-                        ipAndPortBeans.get(position).setChecked(true);
-                        ipAndResourcesPortAdapter.notifyDataSetChanged();
-                    }
-                });
-            }
-
-        });
+//        edit_et.addTextChangedListener(new TextWatcher() {
+//            @Override
+//            public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
+//            @Override
+//            public void onTextChanged(CharSequence s, int start, int before, int count) { }
+//            @Override
+//            public void afterTextChanged(Editable s) {
+//                if (resourcesBeanList.isEmpty()){
+//                    getfuzzySearchSourceData(at_station.getText().toString().trim(),"弹框");
+//                }
+//                if (s.length() >= 0) {
+//                    String mSearchStr = s.toString().trim();
+//                    LogUtil.i("mSearchStr",mSearchStr);
+//                    List<ResourcesBean> thisList = new ArrayList<>();
+//                    for(int i=0;i<resourcesBeanList.size();i++){
+//                        if(resourcesBeanList.get(i).getSC_CODE().contains(mSearchStr)){
+//                            thisList.add(resourcesBeanList.get(i));
+//                        }
+//                        if(i == resourcesBeanList.size() -1){
+//                            ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(thisList);
+//                            rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+//                            LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
+//                        }
+//                    }
+//                    ipAndResourcesPortAdapter.notifyDataSetChanged();
+//
+//                } else {
+//
+//                    ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(resourcesBeanList);
+//                    rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+//
+//                }
+//                ipAndResourcesPortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+//                    @Override
+//                    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+//                        List<ResourcesBean> ipAndPortBeans = ipAndResourcesPortAdapter.getmList();
+//                        for (int i = 0; i < ipAndPortBeans.size(); i++) {
+//                            ipAndPortBeans.get(i).setChecked(false);
+//                        }
+//                        ipAndPortBeans.get(position).setChecked(true);
+//                        ipAndResourcesPortAdapter.notifyDataSetChanged();
+//                    }
+//                });
+//            }
+//
+//        });
 
 
     }

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

@@ -8,6 +8,7 @@ import android.graphics.drawable.BitmapDrawable;
 import android.support.annotation.Nullable;
 import android.support.v4.content.ContextCompat;
 import android.support.v7.widget.DividerItemDecoration;
+import android.support.v7.widget.GridLayoutManager;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
 import android.text.Editable;
@@ -64,7 +65,6 @@ 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;
@@ -102,7 +102,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
     private Column<String> va_classColumn,va_codeColumn,va_statusColumn;
     private TableData<TestcollectDataBean> mTableData;
     private List<TestcollectDataBean> mFilterStorageInBeans;
-    private ClearableEditText ce_bit_number,ec_passqty;
+    private ClearableEditText ce_bit_number;
     private ImageView iv_personnel_data;
     private ClearableEditText edit_et;
     private PopupWindow editPW;
@@ -133,6 +133,9 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
     private ArrayList<StorageRechargeAloneBean> mFeededList;
     private SelectAdapter selectAdapter;
     private String alonedata;
+    private RecyclerView rv_datapassqty;
+    private ArrayList<StorageRechargeAloneBean> passFeededListQty;
+    private SelectAdapterQty selectAdapterQty;
 
     @Override
     protected int getLayout() {
@@ -163,7 +166,6 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         iv_resources_delete = root.findViewById(R.id.iv_resources_delete);
         iv_resources = root.findViewById(R.id.iv_resources);
         ce_bit_number = root.findViewById(R.id.ce_bit_number);
-        ec_passqty = root.findViewById(R.id.ec_passqty);
         iv_unhealthy_delete = root.findViewById(R.id.iv_unhealthy_delete);
         iv_personnel_data = root.findViewById(R.id.iv_personnel_data);
 
@@ -174,6 +176,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         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);
+        rv_datapassqty = root.findViewById(R.id.rv_datapassqty);
 
         mFilterStorageInBeans = Collections.synchronizedList(new ArrayList<>());
 
@@ -338,18 +341,52 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         mFeededList = new ArrayList<>();
         selectAdapter = new SelectAdapter(mFeededList);
         LinearLayoutManager layoutmanager = new LinearLayoutManager(mActivity);
-        MyLayoutManager layout = new MyLayoutManager();
-        layout.setAutoMeasureEnabled(true);//防止recyclerview高度为wrap时测量item高度0(一定要加这个属性,否则显示不出来)
+//        MyLayoutManager layout = new MyLayoutManager();
+//        layout.setAutoMeasureEnabled(true);//防止recyclerview高度为wrap时测量item高度0(一定要加这个属性,否则显示不出来)
+        GridLayoutManager gridLayoutManager=new GridLayoutManager(mActivity,3);
         layoutmanager.setOrientation(LinearLayoutManager.HORIZONTAL);//列表横向显示
-        rv_datachange.setLayoutManager(layout);
+        rv_datachange.setLayoutManager(gridLayoutManager);
         setAdapter(mFeededList);
         rv_datachange.setAdapter(selectAdapter);
+        /**--------------------------数量---------------------------------------**/
+        passFeededListQty = new ArrayList<>();
+        selectAdapterQty = new SelectAdapterQty(passFeededListQty);
+        LinearLayoutManager layoutmanagertwo = new LinearLayoutManager(mActivity);
+//        MyLayoutManager layouttwo = new MyLayoutManager();
+//        layouttwo.setAutoMeasureEnabled(true);//防止recyclerview高度为wrap时测量item高度0(一定要加这个属性,否则显示不出来)
+        layoutmanagertwo.setOrientation(LinearLayoutManager.HORIZONTAL);//列表横向显示
+        rv_datapassqty.setLayoutManager(layoutmanagertwo);
+        setAdaptertwo(passFeededListQty);
+        rv_datapassqty.setAdapter(selectAdapterQty);
+        List<String> list=new ArrayList<>();
+        list.add("1");
+        list.add("2");
+        list.add("3");
+        list.add("4");
+        list.add("5");
+        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");
+        handleFeededDataTwo(dataArray);
+
+
+
+
 
 
         tv_save.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-
                 getNewData();
             }
         });
@@ -388,6 +425,25 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         });
 
     }
+    private void handleFeededDataTwo(JSONArray dataArray) {
+        StorageRechargeAloneBean bean;
+        passFeededListQty.clear();
+        for (Object index : dataArray) {
+            JSONObject data = (JSONObject) index;
+            bean= new StorageRechargeAloneBean(
+                    data.getString("alonedata"));
+            passFeededListQty.add(bean);
+        }
+        setAdaptertwo(passFeededListQty);
+    }
+    private void setAdaptertwo(ArrayList<StorageRechargeAloneBean> mList) {
+        LogUtil.i("mList", JSON.toJSONString(mList));
+        selectAdapterQty = new SelectAdapterQty(mList);
+        rv_datapassqty.setAdapter(selectAdapterQty);
+    }
+
+
+
 
     private void closeListPopupWindow() {
         if (editPW != null) {
@@ -902,7 +958,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         }, 100);
 
     }
-
+    String ec_passqtytrim;
     public void getNewData(){
         String ce_work_codetrim = et_linecode_smts.getText().toString().trim();
         String at_stationtrim = ce_resources.getText().toString().trim();
@@ -910,10 +966,6 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         if (ce_bit_numbertrim.isEmpty()){
             ce_bit_numbertrim="0";
         }
-        String ec_passqtytrim = ec_passqty.getText().toString().trim();
-        if (ec_passqtytrim.isEmpty()){
-            ec_passqtytrim="1";
-        }
         ArrayList<StorageRechargeAloneBean> selectedItem = selectAdapter.getSelectedItem();
         if (selectedItem.size()==0){
             CommonUtil.toastNoRepeat(mActivity, "请选择不良现象");
@@ -922,6 +974,14 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         for (int i=0;i<selectedItem.size();i++){
             alonedata = selectedItem.get(i).getAlonedata();
         }
+        ArrayList<StorageRechargeAloneBean> selectAdapterQtySelectedItem = selectAdapterQty.getSelectedItem();
+        if (selectAdapterQtySelectedItem.size()==0){
+            ec_passqtytrim="1";
+        }else {
+            for (int i=0;i<selectAdapterQtySelectedItem.size();i++){
+                ec_passqtytrim = selectAdapterQtySelectedItem.get(i).getAlonedata();
+            }
+        }
 
         JSONArray jsonArray = new JSONArray();
         JSONObject object_1 = new JSONObject();
@@ -939,6 +999,7 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         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)
@@ -1488,6 +1549,153 @@ public class DataCollectionFragment extends BaseFragment implements View.OnClick
         }
     }
 
+
+    public class SelectAdapterQty 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 SelectAdapterQty(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, viewGroup, false);
+            return new SelectAdapterQty.ListItemViewHolder(itemView);
+        }
+
+        private Map<Integer, Boolean> map = new HashMap<>();
+        //绑定界面,设置监听
+        @SuppressLint("SetTextI18n")
+        @Override
+        public void onBindViewHolder(final RecyclerView.@NotNull ViewHolder holder, @SuppressLint("RecyclerView") int i) {
+
+            //设置条目状态
+            (( SelectAdapterQty.ListItemViewHolder) holder).mainTitle.setTextSize(15);
+            (( SelectAdapterQty.ListItemViewHolder) holder).mainTitle.setText(mList.get(i).getAlonedata());
+            ((SelectAdapterQty.ListItemViewHolder) holder).ce_other.setVisibility(View.GONE);
+//            ((ListItemViewHolder) holder).checkBox.setChecked();
+            //checkBox的监听
+            ((SelectAdapterQty.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)) {
+                (( SelectAdapterQty.ListItemViewHolder) holder).checkBox.setChecked(true);
+            } else {
+                (( SelectAdapterQty.ListItemViewHolder) holder).checkBox.setChecked(false);
+            }
+            onBind = false;
+
+
+
+            (( SelectAdapterQty.ListItemViewHolder) holder).ce_other.addTextChangedListener(new TextWatcher() {
+                @Override
+                public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+
+                }
+
+                @Override
+                public void onTextChanged(CharSequence s, int start, int before, int count) {
+                    mList.get(i).setInputce((( SelectAdapterQty.ListItemViewHolder) holder).ce_other.getText().toString().trim());
+                }
+
+                @Override
+                public void afterTextChanged(Editable s) {
+
+                }
+            });
+        }
+
+        //获得选中条目的结果
+        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) {
         return false;

+ 311 - 101
app/src/main/java/com/uas/collection/fragment/StorageRechargeListFragment.java

@@ -95,6 +95,9 @@ public class StorageRechargeListFragment extends BaseFragment{
     private ImageView iv_dc_emcode;
     private int mFocusId;
     private static final int SCAN_BARCODE_CODESD = 925;
+    private RecyclerView rv_two;
+    private SelectAdaptertwo myAdaptertwo;
+    private ArrayList<StorageRechargeAloneBean>  mFeededListtwo;
     @Override
     protected int getLayout() {
         return R.layout.fragment_storage_recharge_list;
@@ -124,6 +127,7 @@ public class StorageRechargeListFragment extends BaseFragment{
         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);
+        rv_two = root.findViewById(R.id.rv_datachangetwo);
 
 
 //        ce_length.setEnabled(false);
@@ -168,8 +172,8 @@ public class StorageRechargeListFragment extends BaseFragment{
 
         JSONArray dataArray = FastjsonUtil.getJSONArray(jsonObject.toString(), "formStore");
         handleFeededData(dataArray);
-
-
+        //不良原因
+        recycleDatatwo();
         /**--------------------------------工单号----------------------------**/
 
         ce_work_code.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@@ -692,17 +696,19 @@ public class StorageRechargeListFragment extends BaseFragment{
             return;
         }
         String input_Aloneda = null;
+        String input_AlonedaTwo = null;
 //        if (myAdapter.getCheckedPosition()==-1){
 //            CommonUtil.toastNoRepeat(mActivity, "请选择不良现象");
 //            return;
 //        }
+
+
         JSONArray jsonArray = new JSONArray();
         JSONObject object_1 = new JSONObject();
         String ce_work_codetrim = ce_work_code.getText().toString().trim();
         String at_stationtrim = at_station.getText().toString().trim();
         ArrayList<StorageRechargeAloneBean> selectedItem = myAdapter.getSelectedItem();
         if (selectedItem.size()==0){
-            CommonUtil.toastNoRepeat(mActivity, "请选择不良现象");
             object_1.put("SR_BADNAMEREMARK",null);//不良现象
         }else {
             for (int i=0;i<selectedItem.size();i++){
@@ -719,8 +725,15 @@ public class StorageRechargeListFragment extends BaseFragment{
                 }
             }
         }
-
-
+        ArrayList<StorageRechargeAloneBean> selectedItemtwo = myAdaptertwo.getSelectedItem();
+        if (selectedItemtwo.size()==0){
+            object_1.put("SR_REASON", null);//原因
+        }else {
+            for (int i=0;i<selectedItemtwo.size();i++){
+                input_AlonedaTwo = selectedItemtwo.get(i).getAlonedata();
+            }
+            object_1.put("SR_REASON", input_AlonedaTwo);//原因
+        }
 
         object_1.put("SR_ID", "");
         object_1.put("SR_MAKECODE", ce_work_codetrim);//工单号
@@ -729,7 +742,6 @@ public class StorageRechargeListFragment extends BaseFragment{
         object_1.put("SR_NGQTY", "1");//NG数量
         object_1.put("SR_TYPE", "外观维修");//种类(数据采集/、外观维修/性能维修)
         object_1.put("SR_LOCATION", "");//位号
-        object_1.put("SR_REASNO", "");//原因
         object_1.put("SR_SN",ce_product_bar_code.getText().toString().trim());//SN号
         object_1.put("SR_REMARK", "");//备注/其他
         object_1.put("SR_INMAN", "");//录入人
@@ -802,9 +814,6 @@ public class StorageRechargeListFragment extends BaseFragment{
         });
 
         ipAndlinecodePortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
-
-
-
             @Override
             public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
                 List<LinecodeBean> ipAndPortBeans = ipAndlinecodePortAdapter.getmList();
@@ -838,52 +847,52 @@ public class StorageRechargeListFragment extends BaseFragment{
         });
 
 
-        edit_et.addTextChangedListener(new TextWatcher() {
-            @Override
-            public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
-            @Override
-            public void onTextChanged(CharSequence s, int start, int before, int count) { }
-            @Override
-            public void afterTextChanged(Editable s) {
-                if (linecodeBeanList.isEmpty()){
-                    getfuzzySearchData(ce_work_code.getText().toString().trim(),"弹框");
-                }
-                if (s.length() >= 0) {
-                    String mSearchStr = s.toString().trim();
-                    LogUtil.i("mSearchStr",mSearchStr);
-                    List<LinecodeBean> thisList = new ArrayList<>();
-                    for(int i=0;i<linecodeBeanList.size();i++){
-                        if(linecodeBeanList.get(i).getMA_CODE().contains(mSearchStr)){
-                            thisList.add(linecodeBeanList.get(i));
-                        }
-                        if(i == linecodeBeanList.size() -1){
-                            ipAndlinecodePortAdapter = new IpAndlinecodePortAdapter(thisList);
-                            rv_ip_port_data.setAdapter(ipAndlinecodePortAdapter);
-                            LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
-                        }
-                    }
-                    ipAndlinecodePortAdapter.notifyDataSetChanged();
-
-                } else {
-
-                    ipAndlinecodePortAdapter = new IpAndlinecodePortAdapter(linecodeBeanList);
-                    rv_ip_port_data.setAdapter(ipAndlinecodePortAdapter);
-
-                }
-                ipAndlinecodePortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
-                    @Override
-                    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
-                        List<LinecodeBean> ipAndPortBeans = ipAndlinecodePortAdapter.getmList();
-                        for (int i = 0; i < ipAndPortBeans.size(); i++) {
-                            ipAndPortBeans.get(i).setChecked(false);
-                        }
-                        ipAndPortBeans.get(position).setChecked(true);
-                        ipAndlinecodePortAdapter.notifyDataSetChanged();
-                    }
-                });
-            }
-
-        });
+//        edit_et.addTextChangedListener(new TextWatcher() {
+//            @Override
+//            public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
+//            @Override
+//            public void onTextChanged(CharSequence s, int start, int before, int count) { }
+//            @Override
+//            public void afterTextChanged(Editable s) {
+//                if (linecodeBeanList.isEmpty()){
+//                    getfuzzySearchData(ce_work_code.getText().toString().trim(),"弹框");
+//                }
+//                if (s.length() >= 0) {
+//                    String mSearchStr = s.toString().trim();
+//                    LogUtil.i("mSearchStr",mSearchStr);
+//                    List<LinecodeBean> thisList = new ArrayList<>();
+//                    for(int i=0;i<linecodeBeanList.size();i++){
+//                        if(linecodeBeanList.get(i).getMA_CODE().contains(mSearchStr)){
+//                            thisList.add(linecodeBeanList.get(i));
+//                        }
+//                        if(i == linecodeBeanList.size() -1){
+//                            ipAndlinecodePortAdapter = new IpAndlinecodePortAdapter(thisList);
+//                            rv_ip_port_data.setAdapter(ipAndlinecodePortAdapter);
+//                            LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
+//                        }
+//                    }
+//                    ipAndlinecodePortAdapter.notifyDataSetChanged();
+//
+//                } else {
+//
+//                    ipAndlinecodePortAdapter = new IpAndlinecodePortAdapter(linecodeBeanList);
+//                    rv_ip_port_data.setAdapter(ipAndlinecodePortAdapter);
+//
+//                }
+//                ipAndlinecodePortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+//                    @Override
+//                    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+//                        List<LinecodeBean> ipAndPortBeans = ipAndlinecodePortAdapter.getmList();
+//                        for (int i = 0; i < ipAndPortBeans.size(); i++) {
+//                            ipAndPortBeans.get(i).setChecked(false);
+//                        }
+//                        ipAndPortBeans.get(position).setChecked(true);
+//                        ipAndlinecodePortAdapter.notifyDataSetChanged();
+//                    }
+//                });
+//            }
+//
+//        });
 
 
     }
@@ -960,52 +969,52 @@ public class StorageRechargeListFragment extends BaseFragment{
         });
 
 
-        edit_et.addTextChangedListener(new TextWatcher() {
-            @Override
-            public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
-            @Override
-            public void onTextChanged(CharSequence s, int start, int before, int count) { }
-            @Override
-            public void afterTextChanged(Editable s) {
-                if (resourcesBeanList.isEmpty()){
-                    getfuzzySearchSourceData(at_station.getText().toString().trim(),"弹框");
-                }
-                if (s.length() >= 0) {
-                    String mSearchStr = s.toString().trim();
-                    LogUtil.i("mSearchStr",mSearchStr);
-                    List<ResourcesBean> thisList = new ArrayList<>();
-                    for(int i=0;i<resourcesBeanList.size();i++){
-                        if(resourcesBeanList.get(i).getSC_CODE().contains(mSearchStr)){
-                            thisList.add(resourcesBeanList.get(i));
-                        }
-                        if(i == resourcesBeanList.size() -1){
-                            ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(thisList);
-                            rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
-                            LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
-                        }
-                    }
-                    ipAndResourcesPortAdapter.notifyDataSetChanged();
-
-                } else {
-
-                    ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(resourcesBeanList);
-                    rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
-
-                }
-                ipAndResourcesPortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
-                    @Override
-                    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
-                        List<ResourcesBean> ipAndPortBeans = ipAndResourcesPortAdapter.getmList();
-                        for (int i = 0; i < ipAndPortBeans.size(); i++) {
-                            ipAndPortBeans.get(i).setChecked(false);
-                        }
-                        ipAndPortBeans.get(position).setChecked(true);
-                        ipAndResourcesPortAdapter.notifyDataSetChanged();
-                    }
-                });
-            }
-
-        });
+//        edit_et.addTextChangedListener(new TextWatcher() {
+//            @Override
+//            public void beforeTextChanged(CharSequence s, int start, int count, int after) { }
+//            @Override
+//            public void onTextChanged(CharSequence s, int start, int before, int count) { }
+//            @Override
+//            public void afterTextChanged(Editable s) {
+//                if (resourcesBeanList.isEmpty()){
+//                    getfuzzySearchSourceData(at_station.getText().toString().trim(),"弹框");
+//                }
+//                if (s.length() >= 0) {
+//                    String mSearchStr = s.toString().trim();
+//                    LogUtil.i("mSearchStr",mSearchStr);
+//                    List<ResourcesBean> thisList = new ArrayList<>();
+//                    for(int i=0;i<resourcesBeanList.size();i++){
+//                        if(resourcesBeanList.get(i).getSC_CODE().contains(mSearchStr)){
+//                            thisList.add(resourcesBeanList.get(i));
+//                        }
+//                        if(i == resourcesBeanList.size() -1){
+//                            ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(thisList);
+//                            rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+//                            LogUtil.i("mSearchStr", JSON.toJSONString(thisList));
+//                        }
+//                    }
+//                    ipAndResourcesPortAdapter.notifyDataSetChanged();
+//
+//                } else {
+//
+//                    ipAndResourcesPortAdapter = new IpAndResourcesPortAdapter(resourcesBeanList);
+//                    rv_ip_port_data.setAdapter(ipAndResourcesPortAdapter);
+//
+//                }
+//                ipAndResourcesPortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+//                    @Override
+//                    public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+//                        List<ResourcesBean> ipAndPortBeans = ipAndResourcesPortAdapter.getmList();
+//                        for (int i = 0; i < ipAndPortBeans.size(); i++) {
+//                            ipAndPortBeans.get(i).setChecked(false);
+//                        }
+//                        ipAndPortBeans.get(position).setChecked(true);
+//                        ipAndResourcesPortAdapter.notifyDataSetChanged();
+//                    }
+//                });
+//            }
+//
+//        });
 
 
     }
@@ -1024,9 +1033,210 @@ public class StorageRechargeListFragment extends BaseFragment{
 
 
 
+    public void recycleDatatwo(){
+        mFeededListtwo = new ArrayList<>();
+        myAdaptertwo = new SelectAdaptertwo(mFeededListtwo);
+        LinearLayoutManager layoutmanager = new LinearLayoutManager(mActivity);
+        MyLayoutManager layout = new MyLayoutManager();
+        layout.setAutoMeasureEnabled(true);//防止recyclerview高度为wrap时测量item高度0(一定要加这个属性,否则显示不出来)
+        layoutmanager.setOrientation(LinearLayoutManager.HORIZONTAL);//列表横向显示
+        rv_two.setLayoutManager(layout);
+        setAdaptertwo(mFeededListtwo);
+        rv_two.setAdapter(myAdaptertwo);
+        List<String> list=new ArrayList<>();
+        list.add("外观维修");
+        list.add("制程");
+        list.add("来料");
+        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);
+
+        JSONArray dataArray = FastjsonUtil.getJSONArray(jsonObject.toString(), "formStore");
+        handleFeededDatatwo(dataArray);
+
+    }
+
+    private void handleFeededDatatwo(JSONArray dataArray) {
+        StorageRechargeAloneBean bean;
+        mFeededListtwo.clear();
+        for (Object index : dataArray) {
+            JSONObject data = (JSONObject) index;
+            bean= new StorageRechargeAloneBean(
+                    data.getString("alonedata"));
+            mFeededListtwo.add(bean);
+        }
+        setAdaptertwo(mFeededListtwo);
+    }
+    private void setAdaptertwo(ArrayList<StorageRechargeAloneBean> mList) {
+        LogUtil.i("mList", JSON.toJSONString(mList));
+        myAdaptertwo = new SelectAdaptertwo(mList);
+        rv_two.setAdapter(myAdaptertwo);
+    }
+
+
+    public class  SelectAdaptertwo 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  SelectAdaptertwo(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, viewGroup, false);
+            return new    SelectAdaptertwo.ListItemViewHolder(itemView);
+        }
+
+        private Map<Integer, Boolean> map = new HashMap<>();
+        //绑定界面,设置监听
+        @SuppressLint("SetTextI18n")
+        @Override
+        public void onBindViewHolder(final RecyclerView.@NotNull ViewHolder holder, @SuppressLint("RecyclerView") int i) {
+
+            //设置条目状态
+            ((   SelectAdaptertwo.ListItemViewHolder) holder).mainTitle.setText(mList.get(i).getAlonedata());
+            ((   SelectAdaptertwo.ListItemViewHolder) holder).ce_other.setVisibility(View.GONE);
+            ((   SelectAdaptertwo.ListItemViewHolder) holder).ce_qty.setVisibility(View.GONE);
+
+//            ((ListItemViewHolder) holder).checkBox.setChecked();
+            //checkBox的监听
+            ((   SelectAdaptertwo.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)) {
+                ((   SelectAdaptertwo.ListItemViewHolder) holder).checkBox.setChecked(true);
+            } else {
+                ((   SelectAdaptertwo.ListItemViewHolder) holder).checkBox.setChecked(false);
+            }
+            onBind = false;
+
+            (( SelectAdaptertwo.ListItemViewHolder) holder).ce_other.addTextChangedListener(new TextWatcher() {
+                @Override
+                public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+
+                }
+
+                @Override
+                public void onTextChanged(CharSequence s, int start, int before, int count) {
+                    mList.get(i).setInputce((( SelectAdaptertwo.ListItemViewHolder) holder).ce_other.getText().toString().trim());
+                }
+
+                @Override
+                public void afterTextChanged(Editable s) {
+
+                }
+            });
+            (( SelectAdaptertwo.ListItemViewHolder) holder).ce_qty.addTextChangedListener(new TextWatcher() {
+                @Override
+                public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+
+                }
+
+                @Override
+                public void onTextChanged(CharSequence s, int start, int before, int count) {
+                    mList.get(i).setQtyce((( SelectAdaptertwo.ListItemViewHolder) holder).ce_qty.getText().toString().trim());
+                }
+
+                @Override
+                public void afterTextChanged(Editable s) {
 
+                }
+            });
+        }
 
+        //获得选中条目的结果
+        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;
+            AutoCompleteTextView ce_qty;
+            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);
+                this.ce_qty = (AutoCompleteTextView) view.findViewById(R.id.ce_qty);
+
+            }
+        }
+    }
     private class IpAndlinecodePortAdapter extends BaseQuickAdapter<LinecodeBean, BaseViewHolder> {
         private List<LinecodeBean> mmmmList;
 

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

@@ -4,366 +4,394 @@
     android:layout_height="match_parent"
     xmlns:tools="http://schemas.android.com/tools"
     xmlns:app="http://schemas.android.com/apk/res-auto"
-
     android:orientation="vertical">
-    <LinearLayout
-        android:layout_weight="1"
-        android:orientation="horizontal"
+    <android.support.design.widget.AppBarLayout
+        android:background="@color/white"
         android:layout_width="match_parent"
+        android:layout_weight="1"
         android:layout_height="match_parent">
-        <LinearLayout
-            android:orientation="vertical"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="2">
 
-            <TableLayout
+        <android.support.design.widget.CollapsingToolbarLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            app:contentScrim="@color/colorPrimary"
+            app:layout_scrollFlags="scroll|enterAlwaysCollapsed|exitUntilCollapsed">
+            <android.support.v4.widget.NestedScrollView
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="@dimen/spacing_big"
-                android:stretchColumns="1">
-                <TableRow  >
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="工单号"
-                        android:layout_gravity="center"
-                        android:textColor="@color/black">
-                    </TextView>
+                android:layout_height="match_parent">
+                <LinearLayout
+                    android:orientation="vertical"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent">
                     <LinearLayout
                         android:orientation="horizontal"
                         android:layout_width="match_parent"
-                        android:layout_height="wrap_content">
+                        android:layout_height="match_parent">
 
-                        <FrameLayout
+                        <LinearLayout
+                            android:orientation="vertical"
                             android:layout_width="0dp"
                             android:layout_height="wrap_content"
-                            android:layout_weight="1">
-
-                            <AutoCompleteTextView
-                                android:id="@+id/et_linecode_smts"
-                                style="@style/EditTextLineStyle"
-                                android:layout_height="30dp"
-                                android:layout_marginLeft="23dp"
-                                android:hint="请输入工单号" />
-
-                            <ImageView
-                                android:id="@+id/iocout_smts"
-                                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>
-                </TableRow>
+                            android:layout_weight="3">
+                            <LinearLayout
+                                android:layout_width="match_parent"
+                                android:layout_height="match_parent">
+                                <LinearLayout
+                                    android:orientation="vertical"
+                                    android:layout_width="0dp"
+                                    android:layout_height="match_parent"
+                                    android:layout_weight="2">
+                                    <TableLayout
+                                        android:layout_width="match_parent"
+                                        android:layout_height="0dp"
+                                        android:layout_weight="1"
+                                        android:layout_marginTop="@dimen/spacing_big"
+                                        android:stretchColumns="1">
+                                        <TableRow>
+                                            <TextView
+                                                android:layout_width="wrap_content"
+                                                android:layout_height="wrap_content"
+                                                android:text="工单号"
+                                                android:layout_gravity="center"
+                                                android:textColor="@color/black">
+                                            </TextView>
+                                            <LinearLayout
+                                                android:orientation="horizontal"
+                                                android:layout_width="match_parent"
+                                                android:layout_height="wrap_content">
 
-                <LinearLayout
-                     android:layout_marginTop="@dimen/dp_10"
-                    android:orientation="horizontal"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
-                    <TextView
-                        android:id="@+id/tv_pr_code"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_weight="1"
-                        android:text="产品编号"
-                        android:layout_gravity="center"
-                        android:textColor="@color/black">
-                    </TextView>
-                    <TextView
-                        android:id="@+id/tv_pr_detail"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_weight="1"
-                        android:text="产品名称"
-                        android:layout_gravity="center"
-                        android:textColor="@color/black">
-                    </TextView>
-                </LinearLayout>
+                                                <FrameLayout
+                                                    android:layout_width="0dp"
+                                                    android:layout_height="wrap_content"
+                                                    android:layout_weight="1">
 
-                <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>
+                                                    <AutoCompleteTextView
+                                                        android:id="@+id/et_linecode_smts"
+                                                        style="@style/EditTextLineStyle"
+                                                        android:layout_height="30dp"
+                                                        android:layout_marginLeft="23dp"
+                                                        android:hint="请输入工单号" />
 
+                                                    <ImageView
+                                                        android:id="@+id/iocout_smts"
+                                                        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>
+                                        </TableRow>
 
+                                        <LinearLayout
+                                            android:layout_marginTop="@dimen/dp_10"
+                                            android:orientation="horizontal"
+                                            android:layout_width="match_parent"
+                                            android:layout_height="wrap_content">
+                                            <TextView
+                                                android:id="@+id/tv_pr_code"
+                                                android:layout_width="match_parent"
+                                                android:layout_height="wrap_content"
+                                                android:layout_weight="1"
+                                                android:text="产品编号"
+                                                android:layout_gravity="center"
+                                                android:textColor="@color/black">
+                                            </TextView>
+                                            <TextView
+                                                android:id="@+id/tv_pr_detail"
+                                                android:layout_width="match_parent"
+                                                android:layout_height="wrap_content"
+                                                android:layout_weight="1"
+                                                android:text="产品名称"
+                                                android:layout_gravity="center"
+                                                android:textColor="@color/black">
+                                            </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"
+                                                    />
 
-                </TableRow>
+                                                <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
-                     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:orientation="horizontal"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content">
 
-                        <FrameLayout
-                            android:layout_width="0dp"
-                            android:layout_height="wrap_content"
-                            android:layout_weight="1">
-
-                            <AutoCompleteTextView
-                                android:id="@+id/ce_resources"
-                                style="@style/EditTextLineStyle"
-                                android:layout_height="30dp"
-                                android:layout_marginLeft="23dp"
-                                android:hint="请输入岗位资源" />
-
-                            <ImageView
-                                android:id="@+id/iv_resources_delete"
-                                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>
-                </TableRow>
-
-                <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:orientation="horizontal"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content">
 
-                        <com.uas.collection.view.ClearableEditText
-                            android:id="@+id/ce_bit_number"
-                            style="@style/EditTextLineStyle"
-                            android:layout_gravity="center"
-                            android:layout_width="0dp"
-                            android:layout_height="30dp"
-                            android:layout_weight="1"
-                            android:layout_marginLeft="23dp"
-                            android:hint="请输入位号"
-                            android:textColor="@color/black"
-                            />
-                        <View
-                            android:layout_gravity="center"
-                            android:layout_width="30dp"
-                            android:layout_height="match_parent"
-                            android:layout_marginRight="10dp"
-                            android:layout_marginLeft="5dp" />
-                    </LinearLayout>
-                </TableRow>
-                <TableRow
-                    android:visibility="gone"
-                     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:orientation="horizontal"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content">
 
-                        <FrameLayout
-                            android:layout_width="0dp"
-                            android:layout_height="wrap_content"
-                            android:layout_weight="1">
-
-                            <AutoCompleteTextView
-                                android:id="@+id/ce_unhealthy"
-                                style="@style/EditTextLineStyle"
-                                android:layout_height="30dp"
-                                android:layout_marginLeft="23dp"
-                                android:hint="请输入不良现象" />
-
-                            <ImageView
-                                android:id="@+id/iv_unhealthy_delete"
-                                android:layout_width="wrap_content"
+                                        </TableRow>
+
+                                        <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:orientation="horizontal"
+                                                android:layout_width="match_parent"
+                                                android:layout_height="wrap_content">
+
+                                                <FrameLayout
+                                                    android:layout_width="0dp"
+                                                    android:layout_height="wrap_content"
+                                                    android:layout_weight="1">
+
+                                                    <AutoCompleteTextView
+                                                        android:id="@+id/ce_resources"
+                                                        style="@style/EditTextLineStyle"
+                                                        android:layout_height="30dp"
+                                                        android:layout_marginLeft="23dp"
+                                                        android:hint="请输入岗位资源" />
+
+                                                    <ImageView
+                                                        android:id="@+id/iv_resources_delete"
+                                                        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>
+                                        </TableRow>
+
+                                        <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:orientation="horizontal"
+                                                android:layout_width="match_parent"
+                                                android:layout_height="wrap_content">
+
+                                                <com.uas.collection.view.ClearableEditText
+                                                    android:id="@+id/ce_bit_number"
+                                                    style="@style/EditTextLineStyle"
+                                                    android:layout_gravity="center"
+                                                    android:layout_width="0dp"
+                                                    android:layout_height="30dp"
+                                                    android:layout_weight="1"
+                                                    android:layout_marginLeft="23dp"
+                                                    android:hint="请输入位号"
+                                                    android:textColor="@color/black"
+                                                    />
+                                                <View
+                                                    android:layout_gravity="center"
+                                                    android:layout_width="30dp"
+                                                    android:layout_height="match_parent"
+                                                    android:layout_marginRight="10dp"
+                                                    android:layout_marginLeft="5dp" />
+                                            </LinearLayout>
+                                        </TableRow>
+                                        <TableRow
+                                            android:visibility="gone"
+                                            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:orientation="horizontal"
+                                                android:layout_width="match_parent"
+                                                android:layout_height="wrap_content">
+
+                                                <FrameLayout
+                                                    android:layout_width="0dp"
+                                                    android:layout_height="wrap_content"
+                                                    android:layout_weight="1">
+
+                                                    <AutoCompleteTextView
+                                                        android:id="@+id/ce_unhealthy"
+                                                        style="@style/EditTextLineStyle"
+                                                        android:layout_height="30dp"
+                                                        android:layout_marginLeft="23dp"
+                                                        android:hint="请输入不良现象" />
+
+                                                    <ImageView
+                                                        android:id="@+id/iv_unhealthy_delete"
+                                                        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_unhealthy"
+                                                    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>
+                                        </TableRow>
+                                    </TableLayout>
+                                </LinearLayout>
+                                <LinearLayout
+                                    android:orientation="vertical"
+                                    android:layout_width="0dp"
+                                    android:layout_height="match_parent"
+                                    android:layout_weight="0.7"
+                                    android:layout_marginLeft="@dimen/textsize_20"
+                                    android:layout_marginRight="@dimen/textsize_20">
+                                    <TextView
+                                        android:layout_width="match_parent"
+                                        android:layout_height="wrap_content"
+                                        android:text="人员照片"
+                                        android:layout_gravity="center"
+                                        android:gravity="center">
+                                    </TextView>
+                                    <ImageView
+                                        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
+                                        android:visibility="gone"
+                                        android:id="@+id/rv_data"
+                                        android:layout_width="match_parent"
+                                        android:layout_height="match_parent">
+                                    </android.support.v7.widget.RecyclerView>
+
+                                </LinearLayout>
+                            </LinearLayout>
+                            <TableLayout
+                                android:layout_width="match_parent"
                                 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_unhealthy"
-                            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>
-                </TableRow>
-                <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>
-                    <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"
-                        android:text="数量"
-                        android:layout_gravity="center"
-                        android:textColor="@color/black">
-                    </TextView>
-                    <LinearLayout
-                        android:orientation="horizontal"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content">
+                                android:stretchColumns="1">
+                                <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>
+                                    <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"
+                                        android:text="数量"
+                                        android:layout_gravity="center"
+                                        android:textColor="@color/black">
+                                    </TextView>
+                                    <LinearLayout
+                                        android:orientation="horizontal"
+                                        android:layout_width="match_parent"
+                                        android:layout_height="wrap_content">
+
 
-                        <com.uas.collection.view.ClearableEditText
-                            android:id="@+id/ec_passqty"
-                            style="@style/EditTextLineStyle"
-                            android:layout_gravity="center"
+                                        <android.support.v7.widget.RecyclerView
+                                            android:id="@+id/rv_datapassqty"
+                                            android:layout_width="match_parent"
+                                            android:layout_height="wrap_content">
+                                        </android.support.v7.widget.RecyclerView>
+                                    </LinearLayout>
+                                </TableRow>
+                            </TableLayout>
+                            <TextView
+                                android:layout_marginTop="@dimen/dp_10"
+                                android:id="@+id/tv_save"
+                                android:layout_width="100dp"
+                                android:layout_height="wrap_content"
+                                android:text="保存"
+                                android:layout_gravity="center"
+                                android:gravity="center"
+                                android:textSize="@dimen/textsize_20"
+                                android:background="@color/gray_light">
+                            </TextView>
+                        </LinearLayout>
+                        <com.bin.david.form.core.SmartTable
+                            android:id="@+id/jlt_storage_in_filter_list_st"
                             android:layout_width="0dp"
-                            android:layout_height="30dp"
-                            android:layout_weight="1"
-                            android:layout_marginLeft="23dp"
-                            android:hint="请输入数量"
-                            android:text="1"
-                            android:textColor="@color/black"
-                            />
-                        <View
-                            android:layout_gravity="center"
-                            android:layout_width="30dp"
                             android:layout_height="match_parent"
-                            android:layout_marginRight="10dp"
-                            android:layout_marginLeft="5dp" />
+                            android:layout_weight="2" />
+
                     </LinearLayout>
-                </TableRow>
-            </TableLayout>
-            <TextView
-                android:layout_marginTop="@dimen/dp_10"
-                android:id="@+id/tv_save"
-                android:layout_width="100dp"
-                android:layout_height="wrap_content"
-                android:text="保存"
-                android:layout_gravity="center"
-                android:gravity="center"
-                android:textSize="@dimen/textsize_20"
-                android:background="@color/gray_light">
-            </TextView>
-        </LinearLayout>
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content">
-        </TextView>
-        <LinearLayout
-            android:orientation="vertical"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="0.7"
-            android:layout_marginLeft="@dimen/textsize_20"
-            android:layout_marginRight="@dimen/textsize_20">
-            <TextView
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:text="人员照片"
-                android:layout_gravity="center"
-                android:gravity="center">
-            </TextView>
-            <ImageView
-                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
-                android:id="@+id/rv_data"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent">
-            </android.support.v7.widget.RecyclerView>
 
-        </LinearLayout>
+
+
+                </LinearLayout>
+
+
+            </android.support.v4.widget.NestedScrollView>
+
+        </android.support.design.widget.CollapsingToolbarLayout>
+    </android.support.design.widget.AppBarLayout>
 
 
 
-        <com.bin.david.form.core.SmartTable
-            android:id="@+id/jlt_storage_in_filter_list_st"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="2" />
 
-    </LinearLayout>
 
     <LinearLayout
         android:orientation="horizontal"

+ 11 - 1
app/src/main/res/layout-large/fragment_storage_recharge_list.xml

@@ -173,7 +173,17 @@
                 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_gravity="left"
+                android:text="不良原因">
+            </TextView>
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/rv_datachangetwo"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+            </android.support.v7.widget.RecyclerView>
 
         </LinearLayout>
 

+ 357 - 329
app/src/main/res/layout/fragment_datacollection.xml

@@ -4,366 +4,394 @@
     android:layout_height="match_parent"
     xmlns:tools="http://schemas.android.com/tools"
     xmlns:app="http://schemas.android.com/apk/res-auto"
-
     android:orientation="vertical">
-    <LinearLayout
-        android:layout_weight="1"
-        android:orientation="horizontal"
+    <android.support.design.widget.AppBarLayout
+        android:background="@color/white"
         android:layout_width="match_parent"
+        android:layout_weight="1"
         android:layout_height="match_parent">
-        <LinearLayout
-            android:orientation="vertical"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="2">
 
-            <TableLayout
+        <android.support.design.widget.CollapsingToolbarLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            app:contentScrim="@color/colorPrimary"
+            app:layout_scrollFlags="scroll|enterAlwaysCollapsed|exitUntilCollapsed">
+            <android.support.v4.widget.NestedScrollView
                 android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="@dimen/spacing_big"
-                android:stretchColumns="1">
-                <TableRow  >
-                    <TextView
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="工单号"
-                        android:layout_gravity="center"
-                        android:textColor="@color/black">
-                    </TextView>
+                android:layout_height="match_parent">
+                <LinearLayout
+                    android:orientation="vertical"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent">
                     <LinearLayout
                         android:orientation="horizontal"
                         android:layout_width="match_parent"
-                        android:layout_height="wrap_content">
+                        android:layout_height="match_parent">
 
-                        <FrameLayout
+                        <LinearLayout
+                            android:orientation="vertical"
                             android:layout_width="0dp"
                             android:layout_height="wrap_content"
-                            android:layout_weight="1">
-
-                            <AutoCompleteTextView
-                                android:id="@+id/et_linecode_smts"
-                                style="@style/EditTextLineStyle"
-                                android:layout_height="30dp"
-                                android:layout_marginLeft="23dp"
-                                android:hint="请输入工单号" />
-
-                            <ImageView
-                                android:id="@+id/iocout_smts"
-                                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>
-                </TableRow>
+                            android:layout_weight="3">
+                            <LinearLayout
+                                android:layout_width="match_parent"
+                                android:layout_height="match_parent">
+                                <LinearLayout
+                                    android:orientation="vertical"
+                                    android:layout_width="0dp"
+                                    android:layout_height="match_parent"
+                                    android:layout_weight="2">
+                                    <TableLayout
+                                        android:layout_width="match_parent"
+                                        android:layout_height="0dp"
+                                        android:layout_weight="1"
+                                        android:layout_marginTop="@dimen/spacing_big"
+                                        android:stretchColumns="1">
+                                        <TableRow>
+                                            <TextView
+                                                android:layout_width="wrap_content"
+                                                android:layout_height="wrap_content"
+                                                android:text="工单号"
+                                                android:layout_gravity="center"
+                                                android:textColor="@color/black">
+                                            </TextView>
+                                            <LinearLayout
+                                                android:orientation="horizontal"
+                                                android:layout_width="match_parent"
+                                                android:layout_height="wrap_content">
 
-                <LinearLayout
-                    android:layout_marginTop="@dimen/dp_10"
-                    android:orientation="horizontal"
-                    android:layout_width="match_parent"
-                    android:layout_height="wrap_content">
-                    <TextView
-                        android:id="@+id/tv_pr_code"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_weight="1"
-                        android:text="产品编号"
-                        android:layout_gravity="center"
-                        android:textColor="@color/black">
-                    </TextView>
-                    <TextView
-                        android:id="@+id/tv_pr_detail"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        android:layout_weight="1"
-                        android:text="产品名称"
-                        android:layout_gravity="center"
-                        android:textColor="@color/black">
-                    </TextView>
-                </LinearLayout>
+                                                <FrameLayout
+                                                    android:layout_width="0dp"
+                                                    android:layout_height="wrap_content"
+                                                    android:layout_weight="1">
 
-                <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>
+                                                    <AutoCompleteTextView
+                                                        android:id="@+id/et_linecode_smts"
+                                                        style="@style/EditTextLineStyle"
+                                                        android:layout_height="30dp"
+                                                        android:layout_marginLeft="23dp"
+                                                        android:hint="请输入工单号" />
 
+                                                    <ImageView
+                                                        android:id="@+id/iocout_smts"
+                                                        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>
+                                        </TableRow>
 
+                                        <LinearLayout
+                                            android:layout_marginTop="@dimen/dp_10"
+                                            android:orientation="horizontal"
+                                            android:layout_width="match_parent"
+                                            android:layout_height="wrap_content">
+                                            <TextView
+                                                android:id="@+id/tv_pr_code"
+                                                android:layout_width="match_parent"
+                                                android:layout_height="wrap_content"
+                                                android:layout_weight="1"
+                                                android:text="产品编号"
+                                                android:layout_gravity="center"
+                                                android:textColor="@color/black">
+                                            </TextView>
+                                            <TextView
+                                                android:id="@+id/tv_pr_detail"
+                                                android:layout_width="match_parent"
+                                                android:layout_height="wrap_content"
+                                                android:layout_weight="1"
+                                                android:text="产品名称"
+                                                android:layout_gravity="center"
+                                                android:textColor="@color/black">
+                                            </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"
+                                                    />
 
-                </TableRow>
+                                                <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
-                    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:orientation="horizontal"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content">
 
-                        <FrameLayout
-                            android:layout_width="0dp"
-                            android:layout_height="wrap_content"
-                            android:layout_weight="1">
-
-                            <AutoCompleteTextView
-                                android:id="@+id/ce_resources"
-                                style="@style/EditTextLineStyle"
-                                android:layout_height="30dp"
-                                android:layout_marginLeft="23dp"
-                                android:hint="请输入岗位资源" />
-
-                            <ImageView
-                                android:id="@+id/iv_resources_delete"
-                                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>
-                </TableRow>
-
-                <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:orientation="horizontal"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content">
 
-                        <com.uas.collection.view.ClearableEditText
-                            android:id="@+id/ce_bit_number"
-                            style="@style/EditTextLineStyle"
-                            android:layout_gravity="center"
-                            android:layout_width="0dp"
-                            android:layout_height="30dp"
-                            android:layout_weight="1"
-                            android:layout_marginLeft="23dp"
-                            android:hint="请输入位号"
-                            android:textColor="@color/black"
-                            />
-                        <View
-                            android:layout_gravity="center"
-                            android:layout_width="30dp"
-                            android:layout_height="match_parent"
-                            android:layout_marginRight="10dp"
-                            android:layout_marginLeft="5dp" />
-                    </LinearLayout>
-                </TableRow>
-                <TableRow
-                    android:visibility="gone"
-                    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:orientation="horizontal"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content">
 
-                        <FrameLayout
-                            android:layout_width="0dp"
-                            android:layout_height="wrap_content"
-                            android:layout_weight="1">
-
-                            <AutoCompleteTextView
-                                android:id="@+id/ce_unhealthy"
-                                style="@style/EditTextLineStyle"
-                                android:layout_height="30dp"
-                                android:layout_marginLeft="23dp"
-                                android:hint="请输入不良现象" />
-
-                            <ImageView
-                                android:id="@+id/iv_unhealthy_delete"
-                                android:layout_width="wrap_content"
+                                        </TableRow>
+
+                                        <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:orientation="horizontal"
+                                                android:layout_width="match_parent"
+                                                android:layout_height="wrap_content">
+
+                                                <FrameLayout
+                                                    android:layout_width="0dp"
+                                                    android:layout_height="wrap_content"
+                                                    android:layout_weight="1">
+
+                                                    <AutoCompleteTextView
+                                                        android:id="@+id/ce_resources"
+                                                        style="@style/EditTextLineStyle"
+                                                        android:layout_height="30dp"
+                                                        android:layout_marginLeft="23dp"
+                                                        android:hint="请输入岗位资源" />
+
+                                                    <ImageView
+                                                        android:id="@+id/iv_resources_delete"
+                                                        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>
+                                        </TableRow>
+
+                                        <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:orientation="horizontal"
+                                                android:layout_width="match_parent"
+                                                android:layout_height="wrap_content">
+
+                                                <com.uas.collection.view.ClearableEditText
+                                                    android:id="@+id/ce_bit_number"
+                                                    style="@style/EditTextLineStyle"
+                                                    android:layout_gravity="center"
+                                                    android:layout_width="0dp"
+                                                    android:layout_height="30dp"
+                                                    android:layout_weight="1"
+                                                    android:layout_marginLeft="23dp"
+                                                    android:hint="请输入位号"
+                                                    android:textColor="@color/black"
+                                                    />
+                                                <View
+                                                    android:layout_gravity="center"
+                                                    android:layout_width="30dp"
+                                                    android:layout_height="match_parent"
+                                                    android:layout_marginRight="10dp"
+                                                    android:layout_marginLeft="5dp" />
+                                            </LinearLayout>
+                                        </TableRow>
+                                        <TableRow
+                                            android:visibility="gone"
+                                            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:orientation="horizontal"
+                                                android:layout_width="match_parent"
+                                                android:layout_height="wrap_content">
+
+                                                <FrameLayout
+                                                    android:layout_width="0dp"
+                                                    android:layout_height="wrap_content"
+                                                    android:layout_weight="1">
+
+                                                    <AutoCompleteTextView
+                                                        android:id="@+id/ce_unhealthy"
+                                                        style="@style/EditTextLineStyle"
+                                                        android:layout_height="30dp"
+                                                        android:layout_marginLeft="23dp"
+                                                        android:hint="请输入不良现象" />
+
+                                                    <ImageView
+                                                        android:id="@+id/iv_unhealthy_delete"
+                                                        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_unhealthy"
+                                                    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>
+                                        </TableRow>
+                                    </TableLayout>
+                                </LinearLayout>
+                                <LinearLayout
+                                    android:orientation="vertical"
+                                    android:layout_width="0dp"
+                                    android:layout_height="match_parent"
+                                    android:layout_weight="0.7"
+                                    android:layout_marginLeft="@dimen/textsize_20"
+                                    android:layout_marginRight="@dimen/textsize_20">
+                                    <TextView
+                                        android:layout_width="match_parent"
+                                        android:layout_height="wrap_content"
+                                        android:text="人员照片"
+                                        android:layout_gravity="center"
+                                        android:gravity="center">
+                                    </TextView>
+                                    <ImageView
+                                        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
+                                        android:visibility="gone"
+                                        android:id="@+id/rv_data"
+                                        android:layout_width="match_parent"
+                                        android:layout_height="match_parent">
+                                    </android.support.v7.widget.RecyclerView>
+
+                                </LinearLayout>
+                            </LinearLayout>
+                            <TableLayout
+                                android:layout_width="match_parent"
                                 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_unhealthy"
-                            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>
-                </TableRow>
-                <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>
-                    <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"
-                        android:text="数量"
-                        android:layout_gravity="center"
-                        android:textColor="@color/black">
-                    </TextView>
-                    <LinearLayout
-                        android:orientation="horizontal"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content">
+                                android:stretchColumns="1">
+                                <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>
+                                    <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"
+                                        android:text="数量"
+                                        android:layout_gravity="center"
+                                        android:textColor="@color/black">
+                                    </TextView>
+                                    <LinearLayout
+                                        android:orientation="horizontal"
+                                        android:layout_width="match_parent"
+                                        android:layout_height="wrap_content">
+
 
-                        <com.uas.collection.view.ClearableEditText
-                            android:id="@+id/ec_passqty"
-                            style="@style/EditTextLineStyle"
-                            android:layout_gravity="center"
+                                        <android.support.v7.widget.RecyclerView
+                                            android:id="@+id/rv_datapassqty"
+                                            android:layout_width="match_parent"
+                                            android:layout_height="wrap_content">
+                                        </android.support.v7.widget.RecyclerView>
+                                    </LinearLayout>
+                                </TableRow>
+                            </TableLayout>
+                            <TextView
+                                android:layout_marginTop="@dimen/dp_10"
+                                android:id="@+id/tv_save"
+                                android:layout_width="100dp"
+                                android:layout_height="wrap_content"
+                                android:text="保存"
+                                android:layout_gravity="center"
+                                android:gravity="center"
+                                android:textSize="@dimen/textsize_20"
+                                android:background="@color/gray_light">
+                            </TextView>
+                        </LinearLayout>
+                        <com.bin.david.form.core.SmartTable
+                            android:id="@+id/jlt_storage_in_filter_list_st"
                             android:layout_width="0dp"
-                            android:layout_height="30dp"
-                            android:layout_weight="1"
-                            android:layout_marginLeft="23dp"
-                            android:hint="请输入数量"
-                            android:text="1"
-                            android:textColor="@color/black"
-                            />
-                        <View
-                            android:layout_gravity="center"
-                            android:layout_width="30dp"
                             android:layout_height="match_parent"
-                            android:layout_marginRight="10dp"
-                            android:layout_marginLeft="5dp" />
+                            android:layout_weight="2" />
+
                     </LinearLayout>
-                </TableRow>
-            </TableLayout>
-            <TextView
-                android:layout_marginTop="@dimen/dp_10"
-                android:id="@+id/tv_save"
-                android:layout_width="100dp"
-                android:layout_height="wrap_content"
-                android:text="保存"
-                android:layout_gravity="center"
-                android:gravity="center"
-                android:textSize="@dimen/textsize_20"
-                android:background="@color/gray_light">
-            </TextView>
-        </LinearLayout>
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content">
-        </TextView>
-        <LinearLayout
-            android:orientation="vertical"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="0.7"
-            android:layout_marginLeft="@dimen/textsize_20"
-            android:layout_marginRight="@dimen/textsize_20">
-            <TextView
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:text="人员照片"
-                android:layout_gravity="center"
-                android:gravity="center">
-            </TextView>
-            <ImageView
-                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
-                android:id="@+id/rv_data"
-                android:layout_width="match_parent"
-                android:layout_height="match_parent">
-            </android.support.v7.widget.RecyclerView>
 
-        </LinearLayout>
+
+
+                </LinearLayout>
+
+
+            </android.support.v4.widget.NestedScrollView>
+
+        </android.support.design.widget.CollapsingToolbarLayout>
+    </android.support.design.widget.AppBarLayout>
 
 
 
-        <com.bin.david.form.core.SmartTable
-            android:id="@+id/jlt_storage_in_filter_list_st"
-            android:layout_width="0dp"
-            android:layout_height="match_parent"
-            android:layout_weight="2" />
 
-    </LinearLayout>
 
     <LinearLayout
         android:orientation="horizontal"

+ 12 - 2
app/src/main/res/layout/fragment_storage_recharge_list.xml

@@ -173,7 +173,17 @@
                 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_gravity="left"
+                android:text="不良原因">
+            </TextView>
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/rv_datachangetwo"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content">
+            </android.support.v7.widget.RecyclerView>
 
         </LinearLayout>
 
@@ -181,7 +191,7 @@
 
 
     <LinearLayout
-        android:layout_marginLeft="10dp"
+        android:layout_marginLeft="5dp"
         android:layout_marginTop="30dp"
         android:orientation="horizontal"
         android:layout_width="match_parent"