Browse Source

修改版本更新功能,兼容高版本Android安装权限,增加储位归属工单功能,

songw 4 months ago
parent
commit
6f975282a1

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

@@ -17,6 +17,10 @@
     <uses-permission android:name="android.permission.BLUETOOTH" />
     <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
 
+    <uses-permission android:name="android.permission.READ_CLIPBOARD_IN_BACKGROUND"/>
+
+    <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
+
     <application
         android:name="com.uas.lg_smart.application.PdaApplication"
         android:allowBackup="true"

+ 9 - 0
app/src/main/java/com/uas/lg_smart/bean/LinecodeBean.java

@@ -10,6 +10,15 @@ public class LinecodeBean {
     private String MA_ID;
     private String MA_BOMVERSION;
     private boolean checked;
+    private String DE_LOCATION;       //储位
+
+    public String getDE_LOCATION() {
+        return DE_LOCATION;
+    }
+
+    public void setDE_LOCATION(String DE_LOCATION) {
+        this.DE_LOCATION = DE_LOCATION;
+    }
 
     public String getMA_BOMVERSION() {
         return MA_BOMVERSION;

+ 0 - 5
app/src/main/java/com/uas/lg_smart/fragment/ProductDetailsFragment.java

@@ -119,12 +119,7 @@ public class ProductDetailsFragment extends BaseFragment{
                     JSONObject dataObject3 = resultObject.getJSONObject("data");
 
                     JSONObject resultObjectdata = JSON.parseObject(dataObject3.toString());
-
-
                     JSONArray dataArray = resultObjectdata.getJSONArray("data");
-
-
-
                     List<DeliveryorDerdetailBean> list=new ArrayList<>();
                     if (dataArray != null && dataArray.size() > 0) {
                         for (int i = 0; i < dataArray.size(); i++) {

+ 210 - 61
app/src/main/java/com/uas/lg_smart/fragment/SteelMeshControlFragment.java

@@ -9,11 +9,13 @@ import android.support.annotation.Nullable;
 import android.support.v7.widget.DividerItemDecoration;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
+import android.text.TextUtils;
 import android.view.Gravity;
 import android.view.KeyEvent;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.Window;
+import android.view.inputmethod.EditorInfo;
 import android.widget.AdapterView;
 import android.widget.ArrayAdapter;
 import android.widget.Button;
@@ -34,14 +36,18 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.BaseViewHolder;
 import com.uas.lg_smart.R;
 import com.uas.lg_smart.activity.FunctionActivity;
+import com.uas.lg_smart.bean.IPPORT;
 import com.uas.lg_smart.bean.LineCodeEntity;
 import com.uas.lg_smart.bean.LinecodeBean;
 import com.uas.lg_smart.global.GloableParams;
+import com.uas.lg_smart.tools.DataSourceManager;
+import com.uas.lg_smart.tools.SharedPreUtil;
 import com.uas.lg_smart.util.CommonUtil;
 import com.uas.lg_smart.util.FastjsonUtil;
 import com.uas.lg_smart.util.FragmentUtils;
 import com.uas.lg_smart.util.HttpCallback;
 import com.uas.lg_smart.util.HttpParams;
+import com.uas.lg_smart.util.JsonTools;
 import com.uas.lg_smart.util.StringUtil;
 import com.uas.lg_smart.util.VolleyRequest;
 import com.uas.lg_smart.util.VollyRequest;
@@ -75,16 +81,17 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
     private CommonSelectPop mLineSelectPop;
     private ClearableEditText solder_charging_linecode_et;
     private ImageView iv_popuwindow;
-    private ClearableEditText et_linecode_smts,tv_macode;
+    private ClearableEditText et_linecode_smts, tv_macode;
     private ClearableEditText edit_et;
     private List<LinecodeBean> linecodeBeanList;
     private PopupWindow editPW;
     private IpAndlinecodePortAdapter ipAndlinecodePortAdapter;
-    private String ma_code;
+
     private String pr_code;
     private String pr_detail;
     private String ma_id;
     private String ma_bomversion;
+    private String de_location;     //储位
     private ClearableEditText ce_gang;
     private Button btn_ling;
     private ClearableEditText tv_dc_emcode;
@@ -99,12 +106,14 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
     private CheckBox cb_xi;
     private Button btn_tui;
     private Button btn_bao;
-    private String  macode = "1";
+    private String macode = "1";
     private ClearableEditText editbao_et;
     private String trimeditbao_et;
     private String waring;
     private String resultdata;
-    private LinearLayout ll_bianhao_xiaoban,ll_zhangliceshi,ll_tuihui_baofei;
+    private String attributionWorkOrder;    //归属工单
+    private LinearLayout ll_bianhao_xiaoban, ll_zhangliceshi, ll_tuihui_baofei;
+    private ClearableEditText cet_storage;
 
     @Override
     protected int getLayout() {
@@ -146,8 +155,12 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
         ll_zhangliceshi = root.findViewById(R.id.ll_zhangliceshi);
         ll_tuihui_baofei = root.findViewById(R.id.ll_tuihui_baofei);
 
+        cet_storage = root.findViewById(R.id.cet_storage);
+
         mLineSelectPop = new CommonSelectPop(mActivity, "选择线别");
 
+        et_linecode_smts.requestFocus();
+
         btn_ling.setOnClickListener(this);
         btn_tui.setOnClickListener(this);
         btn_bao.setOnClickListener(this);
@@ -159,7 +172,7 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
             @SuppressLint("NonConstantResourceId")
             @Override
             public void onCheckedChanged(RadioGroup radioGroup, int checkid) {
-                switch (checkid){
+                switch (checkid) {
                     case R.id.rb_left:
                         lingytop.setVisibility(View.VISIBLE);
                         cb_xi.setVisibility(View.GONE);
@@ -180,7 +193,16 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
         tv_ok.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                ProductDetailsFragment productDetailsFragment=new ProductDetailsFragment();
+                if (!TextUtils.isEmpty(attributionWorkOrder)) {
+                    String[] split = attributionWorkOrder.split(",");
+                    if (split.length > 1) {
+                        CommonUtil.toastNoRepeat(mActivity, "多工单不允许访问");
+                        return;
+                    } else {
+                        macode = attributionWorkOrder;
+                    }
+                }
+                ProductDetailsFragment productDetailsFragment = new ProductDetailsFragment();
                 Bundle bundle = new Bundle();
                 bundle.putString("macode", macode);
                 productDetailsFragment.setArguments(bundle);
@@ -209,9 +231,46 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
             }
         });
 
+        et_linecode_smts.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                if (actionId == EditorInfo.IME_ACTION_DONE
+                        || actionId == EditorInfo.IME_ACTION_SEND
+                        || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
+                    String trim = et_linecode_smts.getText().toString().trim();
+                    if (!TextUtils.isEmpty(trim)) {
+                        et_linecode_smts.requestFocus();
+                        et_linecode_smts.setText(trim);
+                        et_linecode_smts.setSelection(trim.length());
+                    }
+                    getfuzzySearchData(trim, "");
+                    return true;
+                }
+                return false;
+            }
+        });
+
+        ce_gang.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                if (actionId == EditorInfo.IME_ACTION_DONE
+                        || actionId == EditorInfo.IME_ACTION_SEND
+                        || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
+                    String trim = ce_gang.getText().toString().trim();
+                    if (!TextUtils.isEmpty(trim)) {
+                        ce_gang.requestFocus();
+                        ce_gang.setText(trim);
+                        ce_gang.setSelection(trim.length());
+                    }
+                    return true;
+                }
+                return false;
+            }
+        });
     }
-    private void initlinecodePopupWindow() {
 
+    private void initlinecodePopupWindow() {
+        attributionWorkOrder = "";
         ipAndlinecodePortAdapter = new IpAndlinecodePortAdapter(linecodeBeanList);
         View contView = LayoutInflater.from(mActivity).inflate(R.layout.index_edit_pup, null);
         edit_et = (ClearableEditText) contView.findViewById(R.id.edit_et);
@@ -224,7 +283,26 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
         rv_ip_port_data.setLayoutManager(new LinearLayoutManager(mActivity));
         ipAndlinecodePortAdapter.setmList(linecodeBeanList);
         rv_ip_port_data.setAdapter(ipAndlinecodePortAdapter);
-        getfuzzySearchData(edit_et.getText().toString().trim(),"弹框");
+        getfuzzySearchData(edit_et.getText().toString().trim(), "弹框");
+
+        edit_et.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                if (actionId == EditorInfo.IME_ACTION_DONE
+                        || actionId == EditorInfo.IME_ACTION_SEND
+                        || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
+                    //阻止换行
+                    String trim = edit_et.getText().toString().trim();
+                    if (!TextUtils.isEmpty(trim)) {
+                        edit_et.requestFocus();
+                        edit_et.setText(trim);
+                        edit_et.setSelection(trim.length());
+                    }
+                    return true;
+                }
+                return false;
+            }
+        });
 
         editPW = new PopupWindow(contView, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
         editPW.setTouchable(true);
@@ -241,41 +319,75 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
         search_im.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                getfuzzySearchData(edit_et.getText().toString().trim(),"弹框");
+                getfuzzySearchData(edit_et.getText().toString().trim(), "弹框");
             }
         });
 
         ipAndlinecodePortAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
-
-
             @Override
             public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
-                List<LinecodeBean> ipAndPortBeans = ipAndlinecodePortAdapter.getmList();
-                ma_code = ipAndPortBeans.get(position).getMA_CODE();
-                pr_code = ipAndPortBeans.get(position).getPR_CODE();
-                pr_detail = ipAndPortBeans.get(position).getPR_DETAIL();
-                ma_id = ipAndPortBeans.get(position).getMA_ID();
-                ma_bomversion = ipAndPortBeans.get(position).getMA_BOMVERSION();
-                for (int i = 0; i < ipAndPortBeans.size(); i++) {
-                    ipAndPortBeans.get(i).setChecked(false);
+                try {
+                    List<LinecodeBean> ipAndPortBeans = ipAndlinecodePortAdapter.getmList();
+                    String ma_code = ipAndPortBeans.get(position).getMA_CODE();
+                    pr_code = ipAndPortBeans.get(position).getPR_CODE();
+                    pr_detail = ipAndPortBeans.get(position).getPR_DETAIL();
+                    ma_id = ipAndPortBeans.get(position).getMA_ID();
+                    ma_bomversion = ipAndPortBeans.get(position).getMA_BOMVERSION();
+                    de_location = ipAndPortBeans.get(position).getDE_LOCATION();
+
+                    if (TextUtils.isEmpty(attributionWorkOrder)) {
+                        attributionWorkOrder = ma_code;
+                    } else {
+                        if (attributionWorkOrder.contains(ma_code)) {
+                            String[] split = attributionWorkOrder.split(",");
+                            for (int i = 0; i < split.length; i++) {
+                                if (split[i].equals(ma_code)) {
+                                    if (attributionWorkOrder.length() > ma_code.length()) {
+                                        int start = attributionWorkOrder.indexOf(ma_code) - 1;
+                                        int end = start + ma_code.length() + 1;
+                                        if (start <= 0) {
+                                            attributionWorkOrder = attributionWorkOrder.substring(end);
+                                        } else {
+                                            attributionWorkOrder = attributionWorkOrder.substring(0, start).concat(attributionWorkOrder.substring(end));
+                                        }
+                                    } else {
+                                        attributionWorkOrder = "";
+                                    }
+                                }
+                            }
+                        } else {
+                            attributionWorkOrder += "," + ma_code;
+                        }
+                    }
+                    for (int i = 0; i < ipAndPortBeans.size(); i++) {
+                        String[] split = attributionWorkOrder.split(",");
+                        for (int i1 = 0; i1 < split.length; i1++) {
+                            if (ma_code.equals(split[i1])) {
+                                ipAndPortBeans.get(position).setChecked(true);
+                            } else {
+                                ipAndPortBeans.get(position).setChecked(false);
+                            }
+                        }
+                    }
+                    ipAndlinecodePortAdapter.notifyDataSetChanged();
+                } catch (Exception e) {
+                    e.printStackTrace();
                 }
-                ipAndPortBeans.get(position).setChecked(true);
-                ipAndlinecodePortAdapter.notifyDataSetChanged();
             }
         });
 
-
         //确定
         sure_tv.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-//                if(StringUtil.isEmpty(ma_id)){
-//                    CommonUtil.toastNoRepeat(mActivity,"请选择工单流水");
-//                    return;
-//                }
-                macode = ma_code;
+                if (StringUtil.isEmpty(attributionWorkOrder)) {
+                    CommonUtil.toastNoRepeat(mActivity, "请选择归属工单");
+                    return;
+                }
+                macode = attributionWorkOrder;
                 et_linecode_smts.setText(macode);
                 tv_macode.setText(pr_code);
+                cet_storage.setText(de_location);
                 closeListPopupWindow();
             }
         });
@@ -284,12 +396,12 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
         cancle_tv.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-
                 closeListPopupWindow();
             }
         });
 
     }
+
     private void closeListPopupWindow() {
         if (editPW != null) {
             editPW.dismiss();
@@ -298,7 +410,8 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
         }
 
     }
-    public void getfuzzySearchData(String inoutNo,String sone){
+
+    public void getfuzzySearchData(String inoutNo, String sone) {
         progressDialog.show();
         VollyRequest.getInstance().stringRequest(new HttpParams.Builder()
                 .url(GloableParams.ADDRESS_SMT_FUZZY_SEARCH)
@@ -314,15 +427,13 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
                     mAutoStrings.clear();
                     linecodeBeanList.clear();
                     org.json.JSONObject resultObject = new org.json.JSONObject(s);
-                    org.json.JSONArray dataArray = resultObject.optJSONArray("data");
-
-                    JSONArray dataArrayone = FastjsonUtil.getJSONArray(o.toString(),"data");
-                    if (sone.equals("弹框")){
-                        if (dataArrayone == null|| dataArrayone.size() == 0){
-                            CommonUtil.toastNoRepeat(mActivity,"未搜索到匹配数据");
+                    org.json.JSONObject data1 = resultObject.optJSONObject("data");
+                    JSONArray dataArrayone = FastjsonUtil.getJSONArray(o.toString(), "data");
+                    if (sone.equals("弹框")) {
+                        if (dataArrayone == null || dataArrayone.size() == 0) {
+                            CommonUtil.toastNoRepeat(mActivity, "未搜索到匹配数据");
                         }
-
-                        for(Object index:dataArrayone){
+                        for (Object index : dataArrayone) {
                             JSONObject data = (JSONObject) index;
                             LinecodeBean bean = new LinecodeBean();
                             bean.setMA_CODE(data.getString("MA_CODE"));
@@ -330,12 +441,25 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
                             bean.setPR_DETAIL(data.getString("PR_DETAIL"));
                             bean.setMA_ID(data.getString("MA_ID"));
                             bean.setMA_BOMVERSION(data.getString("MA_BOMVERSION"));
-
+                            bean.setDE_LOCATION(data.getString("DE_LOCATION"));
                             linecodeBeanList.add(bean);
                         }
                         ipAndlinecodePortAdapter.setmList(linecodeBeanList);
                         ipAndlinecodePortAdapter.notifyDataSetChanged();
-
+                    } else {
+                        //                        if (data1 != null) {
+                        //                            et_linecode_smts.setText(data1.getString("MA_CODE"));
+                        //                            tv_macode.setText(data1.getString("PR_CODE"));
+                        //                        }
+                        if (dataArrayone != null) {
+                            for (int i = 0; i < dataArrayone.size(); i++) {
+                                JSONObject jb = (JSONObject) dataArrayone.get(i);
+                                et_linecode_smts.setText(jb.getString("MA_CODE"));
+                                tv_macode.setText(jb.getString("PR_CODE"));
+                            }
+                        } else {
+                            CommonUtil.toastNoRepeat(mActivity, "未搜索到匹配数据");
+                        }
                     }
                 } catch (JSONException e) {
                     e.printStackTrace();
@@ -396,12 +520,13 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
             }
         });
     }
+
     @Override
     protected void initDatas() {
-        m = new String[]{"BOTTOM","TOP"};
+        m = new String[]{"BOTTOM", "TOP"};
 
         //将可选内容与ArrayAdapter连接起来
-        adapter = new ArrayAdapter<String>(mActivity,android.R.layout.simple_spinner_item,m);
+        adapter = new ArrayAdapter<String>(mActivity, android.R.layout.simple_spinner_item, m);
 
         //设置下拉列表的风格
         adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);//风格一
@@ -410,11 +535,26 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
         spinner02.setAdapter(adapter);
         //添加事件Spinner事件监听
         spinner02.setOnItemSelectedListener(new SpinnerSelectedListener());
-    }
-
-
 
+        String str = SharedPreUtil.getString(getActivity(), SharedPreUtil.KEY_URI, null);
+        IPPORT ip = JsonTools.parseJsonToBean(str, IPPORT.class);
+        String mIp = ip.uriArray.get(0).ip;
+        String mPort = ip.uriArray.get(0).port;
+
+        String mUserCache = SharedPreUtil.getString(getActivity(), mIp + ":" + mPort, null);
+        String mUserName = "";
+        try {
+            org.json.JSONObject userCacheJsonObject = new org.json.JSONObject(mUserCache);
+            org.json.JSONArray userCacheArray = userCacheJsonObject.getJSONArray(DataSourceManager.KEY_INFOARRAY);
+
+            org.json.JSONObject userCacheObject = (org.json.JSONObject) userCacheArray.get(0);
+            mUserName = userCacheObject.getString(DataSourceManager.KEY_USERNAME);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
 
+        tv_dc_emcode.setText(mUserName);
+    }
 
     /**
      * 领用
@@ -426,12 +566,12 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
                 .method(Request.Method.POST)
                 .tag(TAG + "loading")
                 .flag(0)
-                .addParam("devcode", ce_gang.getText().toString().trim())//钢网编号  板面  单片印刷次数  线别  人员编号
-                .addParam("sttable", maintenanceType)
-                .addParam("singlepringqty", ce_dan.getText().toString().trim())
-                .addParam("licode", solder_charging_linecode_et.getText().toString().trim())
-                .addParam("emcode", tv_dc_emcode.getText().toString().trim())
-                .addParam("macode", et_linecode_smts.getText().toString().trim())
+                .addParam("devcode", ce_gang.getText().toString().trim())//钢网编号
+                .addParam("sttable", maintenanceType)       //板面
+                .addParam("singlepringqty", ce_dan.getText().toString().trim()) //单片印刷次数
+                .addParam("licode", solder_charging_linecode_et.getText().toString().trim())    //线别
+                .addParam("emcode", tv_dc_emcode.getText().toString().trim())       //人员编号
+                .addParam("macode", attributionWorkOrder)   //归属工单
                 .addParam("ENSIONA", ce_a.getText().toString().trim())
                 .addParam("ENSIONB", ce_b.getText().toString().trim())
                 .addParam("ENSIONC", ce_c.getText().toString().trim())
@@ -442,8 +582,8 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
             public void onSuccess(int flag, Object o) throws Exception {
                 progressDialog.dismiss();
                 String result = o.toString();
-//                JSONArray dataArray = FastjsonUtil.getJSONArray(s, "data");
-//                JSONArray data1 = FastjsonUtil.getJSONArray(dataArray.toString(), "data");
+                //                JSONArray dataArray = FastjsonUtil.getJSONArray(s, "data");
+                //                JSONArray data1 = FastjsonUtil.getJSONArray(dataArray.toString(), "data");
                 JSONObject resultObject = JSON.parseObject(result);
                 JSONObject dataObject = resultObject.getJSONObject("data");
 
@@ -451,8 +591,8 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
                 JSONObject data = resultObjectdata.getJSONObject("data");
                 waring = FastjsonUtil.getText(data, "waring");
                 resultdata = FastjsonUtil.getText(data, "result");
-                if (!StringUtil.isEmpty(waring)){
-                    CommonUtil.toastNoRepeat(mActivity, resultdata+"");
+                if (!StringUtil.isEmpty(waring)) {
+                    CommonUtil.toastNoRepeat(mActivity, resultdata + "");
                 }
             }
 
@@ -463,6 +603,7 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
             }
         });
     }
+
     /**
      * 退回
      */
@@ -476,7 +617,7 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
                 .addParam("devcode", ce_wang.getText().toString().trim())//钢网编号 人员编号  加工小板数  是否清洗  张力ABCDE
                 .addParam("emcode", tv_dc_emcode.getText().toString().trim())
                 .addParam("stcombinenumber", ce_ban.getText().toString().trim())
-                .addParam("isclean", cb_xi.isChecked()+"")
+                .addParam("isclean", cb_xi.isChecked() + "")
                 .build(), new HttpCallback() {
             @Override
             public void onSuccess(int flag, Object o) throws Exception {
@@ -491,6 +632,7 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
             }
         });
     }
+
     /**
      * 报废
      */
@@ -521,8 +663,8 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
             @Override
             public void onClick(View v) {
                 trimeditbao_et = editbao_et.getText().toString().trim();
-                if(StringUtil.isEmpty(trimeditbao_et)){
-                    CommonUtil.toastNoRepeat(mActivity,"请输入报废原因");
+                if (StringUtil.isEmpty(trimeditbao_et)) {
+                    CommonUtil.toastNoRepeat(mActivity, "请输入报废原因");
                     return;
                 }
                 confirmbaog(trimeditbao_et);
@@ -549,7 +691,7 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
                 .flag(0)
                 .addParam("devcode", ce_wang.getText().toString().trim())//钢网编号 报废原因 是否清洗 张力ABCDE
                 .addParam("scrapreason", editbao)//报废原因
-                .addParam("isclean", cb_xi.isChecked()+"")
+                .addParam("isclean", cb_xi.isChecked() + "")
                 .addParam("ENSIONA", ce_a.getText().toString().trim())
                 .addParam("ENSIONB", ce_b.getText().toString().trim())
                 .addParam("ENSIONC", ce_c.getText().toString().trim())
@@ -571,10 +713,11 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
             }
         });
     }
+
     @SuppressLint("NonConstantResourceId")
     @Override
     public void onClick(View v) {
-        switch (v.getId()){
+        switch (v.getId()) {
             case R.id.btn_ling:
                 confirmCharging();
                 break;
@@ -599,6 +742,7 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
         public void onNothingSelected(AdapterView<?> arg0) {
         }
     }
+
     @Override
     public void onActivityResult(int requestCode, int resultCode, Intent data) {
         super.onActivityResult(requestCode, resultCode, data);
@@ -622,6 +766,7 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
     public boolean onFragmentBackPressed() {
         return false;
     }
+
     @Override
     public void onHiddenChanged(boolean hidden) {
         super.onHiddenChanged(hidden);
@@ -629,11 +774,13 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
             setTitle("钢网管控");
         }
     }
+
     @Override
     public void onDestroyView() {
         super.onDestroyView();
         ((FunctionActivity) getActivity()).setScanIvVisible(false);
     }
+
     private class IpAndlinecodePortAdapter extends BaseQuickAdapter<LinecodeBean, BaseViewHolder> {
         private List<LinecodeBean> mmmmList;
 
@@ -644,7 +791,8 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
         public void setmList(List<LinecodeBean> mList) {
             this.mmmmList = mList;
         }
-        public LinecodeBean getBeanByPositon(int position){
+
+        public LinecodeBean getBeanByPositon(int position) {
             return mmmmList.get(position);
         }
 
@@ -652,9 +800,10 @@ public class SteelMeshControlFragment extends BaseFragment implements View.OnCli
             super(R.layout.fuzzy_ipandport_item, data);
             this.mmmmList = data;
         }
+
         @Override
         protected void convert(BaseViewHolder helper, LinecodeBean item) {
-            helper.setText(R.id.macode_ip__Tv,item.getMA_CODE()+"-"+item.getPR_CODE()+"-"+item.getPR_DETAIL());
+            helper.setText(R.id.macode_ip__Tv, item.getMA_CODE() + "-" + item.getPR_CODE() + "-" + item.getPR_DETAIL() + "-" + item.getDE_LOCATION());
             LinearLayout line_true = helper.itemView.findViewById(R.id.line_true);
             if (item.getChecked()) {
                 line_true.setSelected(true);

+ 1 - 0
app/src/main/java/com/uas/lg_smart/fragment/VersionUpgradeFragment.java

@@ -202,6 +202,7 @@ public class VersionUpgradeFragment extends BaseFragment implements ProgressResp
                                 mUpgradeButton.setVisibility(View.GONE);
                             }
                         }
+                        progressDialog.dismiss();
                     }
 
                     @Override

+ 81 - 15
app/src/main/res/layout/fragment_steel_mesh_contrpl.xml

@@ -83,7 +83,7 @@
                     android:gravity="center"
                     android:paddingLeft="@dimen/textsize_20"
                     android:paddingRight="@dimen/textsize_20"
-                    android:text="明细"></TextView>
+                    android:text="明细"/>
             </RelativeLayout>
 
             <LinearLayout
@@ -122,7 +122,9 @@
                                 android:layout_height="35dp"
                                 android:layout_marginLeft="23dp"
                                 android:background="@drawable/bg_line_edittext"
-                                android:hint="请输入归属工单" />
+                                android:hint="请输入归属工单"
+                                />
+
                         </FrameLayout>
 
                         <ImageView
@@ -148,7 +150,7 @@
                         android:layout_height="wrap_content"
                         android:layout_gravity="center"
                         android:text="产品编号:"
-                        android:textColor="@color/black"></TextView>
+                        android:textColor="@color/black"/>
 
                     <LinearLayout
                         android:layout_width="match_parent"
@@ -166,7 +168,10 @@
                                 android:layout_height="35dp"
                                 android:layout_marginLeft="23dp"
                                 android:background="@drawable/bg_line_edittext"
-                                android:hint="请输入产品编号" />
+                                android:hint="请输入产品编号"
+                                android:inputType="text"
+                                android:imeOptions="actionDone"
+                                />
 
                         </FrameLayout>
 
@@ -191,7 +196,7 @@
                         android:layout_height="wrap_content"
                         android:layout_gravity="center"
                         android:text="人员编号:"
-                        android:textColor="@color/black"></TextView>
+                        android:textColor="@color/black"/>
 
                     <LinearLayout
                         android:layout_width="match_parent"
@@ -209,7 +214,10 @@
                                 android:layout_height="35dp"
                                 android:layout_marginLeft="23dp"
                                 android:background="@drawable/bg_line_edittext"
-                                android:hint="请输入人员编号" />
+                                android:hint="请输入人员编号"
+                                android:inputType="text"
+                                android:imeOptions="actionDone"
+                                />
 
                         </FrameLayout>
 
@@ -222,6 +230,60 @@
                             android:clickable="false" />
                     </LinearLayout>
                 </LinearLayout>
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="5dp"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center"
+                        android:text="储位"
+                        android:textColor="@color/black"/>
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_gravity="center"
+                        android:text=":        "
+                        android:textColor="@color/black"/>
+
+                    <LinearLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content">
+
+                        <FrameLayout
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1">
+
+                            <com.uas.lg_smart.view.ClearableEditText
+                                android:id="@+id/cet_storage"
+                                style="@style/inputItemValue"
+                                android:layout_width="match_parent"
+                                android:layout_height="35dp"
+                                android:layout_marginLeft="23dp"
+                                android:background="@drawable/bg_line_edittext"
+                                android:hint="请输入储位"
+                                android:inputType="text"
+                                android:imeOptions="actionDone"
+                                />
+
+                        </FrameLayout>
+
+                        <ImageView
+                            android:layout_width="35dp"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center"
+                            android:layout_marginLeft="5dp"
+                            android:layout_marginRight="10dp"
+                            android:clickable="false" />
+                    </LinearLayout>
+                </LinearLayout>
+
             </LinearLayout>
 
             <LinearLayout
@@ -241,7 +303,7 @@
                         android:layout_gravity="center"
                         android:gravity="center"
                         android:text="钢网编号:"
-                        android:textColor="@color/black"></TextView>
+                        android:textColor="@color/black"/>
 
                     <LinearLayout
                         android:layout_width="match_parent"
@@ -527,7 +589,8 @@
                                     android:layout_height="30dp"
                                     android:layout_marginLeft="5dp"
                                     android:background="@drawable/bg_line_edittext"
-                                    android:hint="" />
+                                    android:hint=""
+                                    />
                             </FrameLayout>
                         </LinearLayout>
 
@@ -558,7 +621,8 @@
                                     android:layout_height="30dp"
                                     android:layout_marginLeft="5dp"
                                     android:background="@drawable/bg_line_edittext"
-                                    android:hint="" />
+                                    android:hint=""
+                                    />
                             </FrameLayout>
                         </LinearLayout>
                     </LinearLayout>
@@ -589,7 +653,7 @@
                                 android:layout_gravity="center"
                                 android:gravity="center"
                                 android:text="C"
-                                android:textColor="@color/black"></TextView>
+                                android:textColor="@color/black"/>
 
                             <FrameLayout
                                 android:layout_width="0dp"
@@ -603,7 +667,8 @@
                                     android:layout_height="30dp"
                                     android:layout_marginLeft="5dp"
                                     android:background="@drawable/bg_line_edittext"
-                                    android:hint="" />
+                                    android:hint=""
+                                    />
                             </FrameLayout>
                         </LinearLayout>
 
@@ -620,7 +685,7 @@
                                 android:layout_gravity="center"
                                 android:gravity="center"
                                 android:text="D"
-                                android:textColor="@color/black"></TextView>
+                                android:textColor="@color/black"/>
 
                             <FrameLayout
                                 android:layout_width="0dp"
@@ -634,7 +699,8 @@
                                     android:layout_height="30dp"
                                     android:layout_marginLeft="5dp"
                                     android:background="@drawable/bg_line_edittext"
-                                    android:hint="" />
+                                    android:hint=""
+                                    />
                             </FrameLayout>
                         </LinearLayout>
                     </LinearLayout>
@@ -665,7 +731,7 @@
                                 android:layout_gravity="center"
                                 android:gravity="center"
                                 android:text="E"
-                                android:textColor="@color/black"></TextView>
+                                android:textColor="@color/black"/>
 
                             <FrameLayout
                                 android:layout_width="0dp"
@@ -688,7 +754,7 @@
                             android:layout_height="wrap_content"
                             android:layout_marginLeft="@dimen/dp_10"
                             android:layout_weight="1"
-                            android:orientation="horizontal"></LinearLayout>
+                            android:orientation="horizontal"/>
                     </LinearLayout>
 
 

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

@@ -27,4 +27,5 @@
             />
 
     </LinearLayout>
+
 </RelativeLayout>

+ 2 - 1
app/src/main/res/layout/index_edit_pup.xml

@@ -32,7 +32,8 @@
             android:gravity="center_vertical"
             android:hint="请输入要搜索的内容"
             android:padding="5dp"
-            android:textSize="14sp"/>
+            android:textSize="14sp"
+            />
 
         <ImageView
             android:id="@+id/search_im"

+ 2 - 2
build.gradle

@@ -54,8 +54,8 @@ ext {
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 17,
-            versionName      : "v1.0.7"
+            versionCode      : 14,
+            versionName      : "v1.1.3"
     ]
 
     depsVersion = [