Parcourir la source

修改校验和品质校验站位异常信息,增加岗位备料相关设置功能, 同步修改相关设置数据影响功能. 对新接口功能进行调试. 设置增加备料上料取消手动采集站位及其应用功能.备料上料页增加自动设置站位与提示.增加备料上料取消站位校验设置功能, 增加新的提示功能,调整UI布局.岗位备料-上料增加提示信息, 调整校验设置逻辑.调整了SMT上料布局功能

songw il y a 4 mois
Parent
commit
e76a023978

+ 8 - 1
app/src/main/java/com/uas/pda_wps/fragment/DefaultSettingFragment.java

@@ -16,7 +16,7 @@ public class DefaultSettingFragment extends BaseFragment implements View.OnClick
     private ClearableEditText defaultSettingWarehouseEt;
     private ClearableEditText defaultSettingLinecodeEt;
     private ClearableEditText mDefaultRejectsWarehouseEt;
-    private SwitchView mOrderSwitchView, mMaterialSwitchView;
+    private SwitchView sv_cancel_station_verification,mOrderSwitchView, mMaterialSwitchView;
 
     @Override
     protected int getLayout() {
@@ -30,6 +30,8 @@ public class DefaultSettingFragment extends BaseFragment implements View.OnClick
         defaultSettingWarehouseEt = (ClearableEditText) root.findViewById(R.id.default_setting_warehouse_et);
         defaultSettingLinecodeEt = (ClearableEditText) root.findViewById(R.id.default_setting_linecode_et);
         mDefaultRejectsWarehouseEt = (ClearableEditText) root.findViewById(R.id.default_setting_rejects_warehouse_et);
+        sv_cancel_station_verification = root.findViewById(R.id.sv_cancel_station_verification);
+        sv_cancel_station_verification.setChecked(false);
         mOrderSwitchView = root.findViewById(R.id.default_setting_order_sv);
         mOrderSwitchView.setChecked(false);
         mMaterialSwitchView = root.findViewById(R.id.default_setting_material_sv);
@@ -61,8 +63,12 @@ public class DefaultSettingFragment extends BaseFragment implements View.OnClick
             mDefaultRejectsWarehouseEt.setText(defaultRejectsWarehouse);
         }
 
+        int stationVerification = SharedPreUtil.getInt(mActivity, Constants.FLAG.CANCEL_STATION_VERIFICATION + CommonUtil.getUserName(mActivity), 0);
+        sv_cancel_station_verification.setChecked(stationVerification == 1);
+
         int orderSwitch = SharedPreUtil.getInt(mActivity, Constants.FLAG.CACHE_DEFAULT_ORDER_SWITCH + CommonUtil.getUserName(mActivity), 0);
         mOrderSwitchView.setChecked(orderSwitch == 1);
+
         int materialSwitch = SharedPreUtil.getInt(mActivity, Constants.FLAG.CACHE_DEFAULT_MATERIAL_SWITCH + CommonUtil.getUserName(mActivity), 0);
         mMaterialSwitchView.setChecked(materialSwitch == 1);
 
@@ -79,6 +85,7 @@ public class DefaultSettingFragment extends BaseFragment implements View.OnClick
                 SharedPreUtil.saveString(mActivity, Constants.FLAG.DEFAULT_WAREHOUSE_CACHE + CommonUtil.getUserName(mActivity), defaultSettingWarehouseEt.getText().toString().trim());
                 SharedPreUtil.saveString(mActivity, Constants.FLAG.SMT_LINECODE_CACHE + CommonUtil.getUserName(mActivity) + CommonUtil.getFunMaster(mActivity), defaultSettingLinecodeEt.getText().toString().trim());
                 SharedPreUtil.saveString(mActivity, Constants.FLAG.CACHE_DEFAULT_REJECTS_WAREHOUSE + CommonUtil.getUserName(mActivity), mDefaultRejectsWarehouseEt.getText().toString().trim());
+                SharedPreUtil.saveInt(mActivity, Constants.FLAG.CANCEL_STATION_VERIFICATION + CommonUtil.getUserName(mActivity), sv_cancel_station_verification.isChecked() ? 1 : 0);
                 SharedPreUtil.saveInt(mActivity, Constants.FLAG.CACHE_DEFAULT_ORDER_SWITCH + CommonUtil.getUserName(mActivity), mOrderSwitchView.isChecked() ? 1 : 0);
                 SharedPreUtil.saveInt(mActivity, Constants.FLAG.CACHE_DEFAULT_MATERIAL_SWITCH + CommonUtil.getUserName(mActivity), mMaterialSwitchView.isChecked() ? 1 : 0);
                 Toast.makeText(getActivity(), "缺省项设置成功", Toast.LENGTH_SHORT).show();

+ 12 - 0
app/src/main/java/com/uas/pda_wps/fragment/LoginFragment.java

@@ -7,6 +7,7 @@ import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
 import android.support.v4.app.Fragment;
+import android.text.TextUtils;
 import android.util.Log;
 import android.view.KeyEvent;
 import android.view.View;
@@ -32,6 +33,7 @@ import com.uas.pda_wps.tools.VolleyUtil;
 import com.uas.pda_wps.util.CommonUtil;
 import com.uas.pda_wps.util.Constants;
 import com.uas.pda_wps.util.LogUtil;
+import com.uas.pda_wps.util.MyLog;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -67,6 +69,7 @@ public class LoginFragment extends BaseFragment implements AdapterView.OnItemSel
             String tip = (String) msg.obj;
             switch (msg.what) {
                 case VolleyUtil.SUCCESS_SUCCESS:
+                    MyLog.e("aaa","登录成功的数据:" + tip);
                     String userName = userEditText.getText().toString().trim();
                     String pwd = null;
                     if (rmbCheckBox.isChecked()) {
@@ -74,6 +77,15 @@ public class LoginFragment extends BaseFragment implements AdapterView.OnItemSel
                     }
                     saveCache(userName, pwd);
 
+                    //在登录界面增加返回值 角色,根据角色类型来控制。角色值为品质的时候,则可以点击【校验】,否则提示:您非品质角色,无操作权限!
+                    com.alibaba.fastjson.JSONObject resultObject = JSON.parseObject(tip);
+                    String em_role = resultObject.getString("em_role");
+                    if (!TextUtils.isEmpty(em_role)) {
+                        if (em_role.equals("品质")) {
+                            SharedPreUtil.saveBoolean(mActivity, Constants.FLAG.WHETHER_IT_IS_QUALITY, true);
+                        }
+                    }
+
                     String verificationPwd = pwdEditText.getText().toString().trim();
                     SharedPreUtil.saveString(mActivity, Constants.FLAG.VERIFICATION_PASSWORD, verificationPwd);
 

+ 274 - 223
app/src/main/java/com/uas/pda_wps/fragment/QualityVerificationFra.java

@@ -52,6 +52,7 @@ import com.uas.pda_wps.tools.SharedPreUtil;
 import com.uas.pda_wps.tools.VolleyUtil;
 import com.uas.pda_wps.util.CommonUtil;
 import com.uas.pda_wps.util.Constants;
+import com.uas.pda_wps.util.FastjsonUtil;
 import com.uas.pda_wps.util.FragmentUtils;
 import com.uas.pda_wps.util.HttpCallback;
 import com.uas.pda_wps.util.HttpParams;
@@ -78,7 +79,7 @@ public
         /**
          * Created by sw on 2026-01-04   品质校验
          */
-class QualityVerificationFra  extends BaseFragment implements View.OnClickListener {
+class QualityVerificationFra extends BaseFragment implements View.OnClickListener {
     private static final String COLLECT_LOCATION = "请录入站位编号";
     private static final String COLLECT_PRODCODE = "请录入物料编号";
     private static final String COLLECT_OLD_PRODCODE = "站位采集成功,请采集原物料号";
@@ -117,7 +118,7 @@ class QualityVerificationFra  extends BaseFragment implements View.OnClickListen
     private LineInfoBean mLineInfoBean;
     private AutoCompleteTextView mCollectEditText;
     private Button mConfirmButton;
-//    private String mSmtLocationCache;
+    //    private String mSmtLocationCache;
     private boolean mIgnoreFocusChange = false;
     private SmtDslBean mSmtDslBean = new SmtDslBean();
     private TextViewWithButton mLocationTextView;
@@ -371,7 +372,7 @@ class QualityVerificationFra  extends BaseFragment implements View.OnClickListen
                                                     confirmEvent(psl_location);
                                                 }
                                                 //notice = notice + psl_location + ",";
-                                                notice += "\n站位:"  + psl_location + " 料号:" + psl_prodcode;
+                                                notice += "\n站位:" + psl_location + " 料号:" + psl_prodcode;
                                             }
                                         }
                                         //notice = notice.substring(0, notice.length() - 1);
@@ -512,7 +513,6 @@ class QualityVerificationFra  extends BaseFragment implements View.OnClickListen
                 CommonUtil.toastNoRepeat(mActivity, failStr);
 
                 tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
-
                 String notice = failStr + "\n" + mNoticeStr;
                 SpannableString spannableString = CommonUtil.spanString(notice, mActivity, (failStr + "\n").length(), notice.length(), R.color.green);
                 tvMsgNotice.setText(spannableString);
@@ -535,144 +535,144 @@ class QualityVerificationFra  extends BaseFragment implements View.OnClickListen
         });
     }
 
-//    private void joinDataCheck(final String collect, final String location) {
-//        progressDialog.show();
-//
-//        PdaApplication.mRequestQueue.cancelAll(TAG + "datacheck");
-//
-//        mStringRequest = new StringRequest(Request.Method.POST, GloableParams.ADDRESS_SMT_JOIN_FORECASTDATA_CHECK,
-//                new Response.Listener<String>() {
-//                    @Override
-//                    public void onResponse(String s) {
-//                        if (progressDialog.isShowing())
-//                            progressDialog.dismiss();
-//                        joinDataCheck(collect, location, "原物料号校验正确", true);
-//                    }
-//                },
-//                new Response.ErrorListener() {
-//                    @Override
-//                    public void onErrorResponse(VolleyError volleyError) {
-//                        if (progressDialog.isShowing())
-//                            progressDialog.dismiss();
-//                        String errorToast = CommonUtil.showErrorToast(volleyError, false);
-//                        joinDataCheck(collect, location, errorToast, false);
-//                    }
-//                }) {
-//            @Override
-//            public Map<String, String> getHeaders() throws AuthFailureError {
-//                return VolleyUtil.getVolleyUtil().setCookies();
-//            }
-//
-//            @Override
-//            protected Map<String, String> getParams() throws AuthFailureError {
-//                Map<String, String> params = new HashMap<>();
-//                Map<String, Object> dslMap = new HashMap<>();
-//                if (mUpRadioButton.isChecked()) {
-//                    dslMap.put("type", "loading");
-//                } else if (mJoinRadioButton.isChecked()) {
-//                    dslMap.put("type", "join");
-//                }
-//                dslMap.put("dsl_location", location);
-//                dslMap.put("dsl_prodcode", collect);
-//                dslMap.put("success", true);
-//
-//                params.put("dsl", JSON.toJSONString(dslMap));
-//                params.put("deviceLineMake", JSON.toJSONString(mLineInfoBean));
-//                Log.d("paramjson", params.toString());
-//                return params;
-//            }
-//        };
-//        mStringRequest.setRetryPolicy(new DefaultRetryPolicy(10 * 1000, 0, 1f));
-//        mStringRequest.setTag(TAG + "datacheck");
-//        PdaApplication.mRequestQueue.add(mStringRequest);
-//    }
-
-//    private void joinDataCheck(String collect, String location, String dataCheckResult, boolean isSuccess) {
-//        tvMsgProdcode.setText("");
-//        tvMsgLocation.setText("");
-//        tvMsgBarcode.setText("");
-//        tvMsgQuantity.setText("");
-//        tvMsgSpec.setText("");
-//
-//        collect = mLocationTextView.getText().toString().trim();
-//
-//        if (!TextUtils.isEmpty(mSmtLocationCache)) {
-//            try {
-//                JSONArray locationArray = new JSONArray(mSmtLocationCache);
-//                boolean isExist = false;
-//                for (int i = 0; i < locationArray.length(); i++) {
-//                    JSONObject locationObject = locationArray.getJSONObject(i);
-//                    if (collect.equals(JsonUtils.optStringNotNull(locationObject, "PSL_LOCATION"))) {
-//                        isExist = true;
-//                        mLocationTextView.setText(collect);
-//                        mCollectEditText.setText("");
-//
-//                        String psl_prodcode = JsonUtils.optStringNotNull(locationObject, "PSL_PRODCODE");
-//                        String psl_repcode = JsonUtils.optStringNotNull(locationObject, "PSL_REPCODE");
-//                        mSmtDslBean = new SmtDslBean();
-//                        mSmtDslBean.setDsl_location(location);
-//                        mSmtDslBean.setDsl_prodcode(psl_prodcode);
-//                        mSmtDslBean.setDsl_repcode(psl_repcode);
-//
-//                        mAutoStringAdapter = new MyArrayAdapter<String>(mActivity, android.R.layout.simple_dropdown_item_1line, new ArrayList<String>());
-//                        mCollectEditText.setAdapter(mAutoStringAdapter);
-//
-//                        mCollectEditText.setHint(COLLECT_PRODCODE);
-//                        if (!TextUtils.isEmpty(psl_repcode)) {
-//                            String[] repcodes = psl_repcode.split(",");
-//                            String notice = dataCheckResult + "\n请采集接料的物料号";
-//                            for (int j = 0; j < repcodes.length; j++) {
-//                                String repcode = repcodes[j];
-//                                notice = notice + "\n" + repcode;
-//                            }
-//                            tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
-//                            if (isSuccess) {
-//                                tvMsgNotice.setText(notice);
-//                            } else {
-//                                SpannableString spannableString = CommonUtil.spanString(notice, mActivity, 0, dataCheckResult.length(), R.color.red);
-//                                tvMsgNotice.setText(spannableString);
-//                            }
-//                        } else if (!TextUtils.isEmpty(psl_prodcode)) {
-//                            tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
-//                            if (isSuccess) {
-//                                tvMsgNotice.setText(dataCheckResult + "\n请采集接料的物料号\n" + psl_prodcode);
-//                            } else {
-//                                SpannableString spannableString = CommonUtil.spanString(dataCheckResult + "\n请采集接料的物料号\n" + psl_prodcode, mActivity, 0, dataCheckResult.length(), R.color.red);
-//                                tvMsgNotice.setText(spannableString);
-//                            }
-//
-//                        } else {
-//                            tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
-//                            if (isSuccess) {
-//                                CommonUtil.spanString(dataCheckResult + "\n物料编号获取失败", mActivity, 0, dataCheckResult.length(), R.color.green);
-//                                tvMsgNotice.setText(dataCheckResult + "\n物料编号获取失败");
-//                            } else {
-//                                tvMsgNotice.setText(dataCheckResult + "\n物料编号获取失败");
-//                            }
-//                        }
-//                    }
-//                }
-//
-//                if (!isExist) {
-//                    tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
-//                    String notice = "站位编号错误\n" + mNoticeStr;
-//                    SpannableString spannableString = CommonUtil.spanString(notice, mActivity, "站位编号错误\n".length(), notice.length(), R.color.green);
-//                    tvMsgNotice.setText(spannableString);
-//                    CommonUtil.makeNotice();
-//                    mCollectEditText.setText("");
-//                }
-//            } catch (JSONException e) {
-//                e.printStackTrace();
-//            }
-//        } else {
-//            tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
-//            String notice = "站位编号错误\n" + mNoticeStr;
-//            SpannableString spannableString = CommonUtil.spanString(notice, mActivity, "站位编号错误\n".length(), notice.length(), R.color.green);
-//            tvMsgNotice.setText(spannableString);
-//            CommonUtil.makeNotice();
-//            mCollectEditText.setText("");
-//        }
-//    }
+    //    private void joinDataCheck(final String collect, final String location) {
+    //        progressDialog.show();
+    //
+    //        PdaApplication.mRequestQueue.cancelAll(TAG + "datacheck");
+    //
+    //        mStringRequest = new StringRequest(Request.Method.POST, GloableParams.ADDRESS_SMT_JOIN_FORECASTDATA_CHECK,
+    //                new Response.Listener<String>() {
+    //                    @Override
+    //                    public void onResponse(String s) {
+    //                        if (progressDialog.isShowing())
+    //                            progressDialog.dismiss();
+    //                        joinDataCheck(collect, location, "原物料号校验正确", true);
+    //                    }
+    //                },
+    //                new Response.ErrorListener() {
+    //                    @Override
+    //                    public void onErrorResponse(VolleyError volleyError) {
+    //                        if (progressDialog.isShowing())
+    //                            progressDialog.dismiss();
+    //                        String errorToast = CommonUtil.showErrorToast(volleyError, false);
+    //                        joinDataCheck(collect, location, errorToast, false);
+    //                    }
+    //                }) {
+    //            @Override
+    //            public Map<String, String> getHeaders() throws AuthFailureError {
+    //                return VolleyUtil.getVolleyUtil().setCookies();
+    //            }
+    //
+    //            @Override
+    //            protected Map<String, String> getParams() throws AuthFailureError {
+    //                Map<String, String> params = new HashMap<>();
+    //                Map<String, Object> dslMap = new HashMap<>();
+    //                if (mUpRadioButton.isChecked()) {
+    //                    dslMap.put("type", "loading");
+    //                } else if (mJoinRadioButton.isChecked()) {
+    //                    dslMap.put("type", "join");
+    //                }
+    //                dslMap.put("dsl_location", location);
+    //                dslMap.put("dsl_prodcode", collect);
+    //                dslMap.put("success", true);
+    //
+    //                params.put("dsl", JSON.toJSONString(dslMap));
+    //                params.put("deviceLineMake", JSON.toJSONString(mLineInfoBean));
+    //                Log.d("paramjson", params.toString());
+    //                return params;
+    //            }
+    //        };
+    //        mStringRequest.setRetryPolicy(new DefaultRetryPolicy(10 * 1000, 0, 1f));
+    //        mStringRequest.setTag(TAG + "datacheck");
+    //        PdaApplication.mRequestQueue.add(mStringRequest);
+    //    }
+
+    //    private void joinDataCheck(String collect, String location, String dataCheckResult, boolean isSuccess) {
+    //        tvMsgProdcode.setText("");
+    //        tvMsgLocation.setText("");
+    //        tvMsgBarcode.setText("");
+    //        tvMsgQuantity.setText("");
+    //        tvMsgSpec.setText("");
+    //
+    //        collect = mLocationTextView.getText().toString().trim();
+    //
+    //        if (!TextUtils.isEmpty(mSmtLocationCache)) {
+    //            try {
+    //                JSONArray locationArray = new JSONArray(mSmtLocationCache);
+    //                boolean isExist = false;
+    //                for (int i = 0; i < locationArray.length(); i++) {
+    //                    JSONObject locationObject = locationArray.getJSONObject(i);
+    //                    if (collect.equals(JsonUtils.optStringNotNull(locationObject, "PSL_LOCATION"))) {
+    //                        isExist = true;
+    //                        mLocationTextView.setText(collect);
+    //                        mCollectEditText.setText("");
+    //
+    //                        String psl_prodcode = JsonUtils.optStringNotNull(locationObject, "PSL_PRODCODE");
+    //                        String psl_repcode = JsonUtils.optStringNotNull(locationObject, "PSL_REPCODE");
+    //                        mSmtDslBean = new SmtDslBean();
+    //                        mSmtDslBean.setDsl_location(location);
+    //                        mSmtDslBean.setDsl_prodcode(psl_prodcode);
+    //                        mSmtDslBean.setDsl_repcode(psl_repcode);
+    //
+    //                        mAutoStringAdapter = new MyArrayAdapter<String>(mActivity, android.R.layout.simple_dropdown_item_1line, new ArrayList<String>());
+    //                        mCollectEditText.setAdapter(mAutoStringAdapter);
+    //
+    //                        mCollectEditText.setHint(COLLECT_PRODCODE);
+    //                        if (!TextUtils.isEmpty(psl_repcode)) {
+    //                            String[] repcodes = psl_repcode.split(",");
+    //                            String notice = dataCheckResult + "\n请采集接料的物料号";
+    //                            for (int j = 0; j < repcodes.length; j++) {
+    //                                String repcode = repcodes[j];
+    //                                notice = notice + "\n" + repcode;
+    //                            }
+    //                            tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+    //                            if (isSuccess) {
+    //                                tvMsgNotice.setText(notice);
+    //                            } else {
+    //                                SpannableString spannableString = CommonUtil.spanString(notice, mActivity, 0, dataCheckResult.length(), R.color.red);
+    //                                tvMsgNotice.setText(spannableString);
+    //                            }
+    //                        } else if (!TextUtils.isEmpty(psl_prodcode)) {
+    //                            tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+    //                            if (isSuccess) {
+    //                                tvMsgNotice.setText(dataCheckResult + "\n请采集接料的物料号\n" + psl_prodcode);
+    //                            } else {
+    //                                SpannableString spannableString = CommonUtil.spanString(dataCheckResult + "\n请采集接料的物料号\n" + psl_prodcode, mActivity, 0, dataCheckResult.length(), R.color.red);
+    //                                tvMsgNotice.setText(spannableString);
+    //                            }
+    //
+    //                        } else {
+    //                            tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+    //                            if (isSuccess) {
+    //                                CommonUtil.spanString(dataCheckResult + "\n物料编号获取失败", mActivity, 0, dataCheckResult.length(), R.color.green);
+    //                                tvMsgNotice.setText(dataCheckResult + "\n物料编号获取失败");
+    //                            } else {
+    //                                tvMsgNotice.setText(dataCheckResult + "\n物料编号获取失败");
+    //                            }
+    //                        }
+    //                    }
+    //                }
+    //
+    //                if (!isExist) {
+    //                    tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+    //                    String notice = "站位编号错误\n" + mNoticeStr;
+    //                    SpannableString spannableString = CommonUtil.spanString(notice, mActivity, "站位编号错误\n".length(), notice.length(), R.color.green);
+    //                    tvMsgNotice.setText(spannableString);
+    //                    CommonUtil.makeNotice();
+    //                    mCollectEditText.setText("");
+    //                }
+    //            } catch (JSONException e) {
+    //                e.printStackTrace();
+    //            }
+    //        } else {
+    //            tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+    //            String notice = "站位编号错误\n" + mNoticeStr;
+    //            SpannableString spannableString = CommonUtil.spanString(notice, mActivity, "站位编号错误\n".length(), notice.length(), R.color.green);
+    //            tvMsgNotice.setText(spannableString);
+    //            CommonUtil.makeNotice();
+    //            mCollectEditText.setText("");
+    //        }
+    //    }
 
     private void locationCheck(String collect, String location) {
         tvMsgProdcode.setText("");
@@ -681,83 +681,134 @@ class QualityVerificationFra  extends BaseFragment implements View.OnClickListen
         tvMsgQuantity.setText("");
         tvMsgSpec.setText("");
 
-        mLocationTextView.setText(collect);
-        mCollectEditText.setText("");
-
-        mSmtDslBean = new SmtDslBean();
-        mSmtDslBean.setDsl_location(location);
-        mSmtDslBean.setDsl_prodcode("");
-        mSmtDslBean.setDsl_repcode("");
-
-        mAutoStringAdapter = new MyArrayAdapter<String>(mActivity, android.R.layout.simple_dropdown_item_1line, new ArrayList<String>());
-        mCollectEditText.setAdapter(mAutoStringAdapter);
-
-//        if (!TextUtils.isEmpty(mSmtLocationCache)) {
-//            try {
-//                JSONArray locationArray = new JSONArray(mSmtLocationCache);
-//                boolean isExist = false;
-//                for (int i = 0; i < locationArray.length(); i++) {
-//                    JSONObject locationObject = locationArray.getJSONObject(i);
-//                    if (collect.equals(JsonUtils.optStringNotNull(locationObject, "PSL_LOCATION"))) {
-//                        isExist = true;
-//                        mLocationTextView.setText(collect);
-//                        mCollectEditText.setText("");
-//
-//                        String psl_prodcode = JsonUtils.optStringNotNull(locationObject, "PSL_PRODCODE");
-//                        String psl_repcode = JsonUtils.optStringNotNull(locationObject, "PSL_REPCODE");
-//                        mSmtDslBean = new SmtDslBean();
-//                        mSmtDslBean.setDsl_location(location);
-//                        mSmtDslBean.setDsl_prodcode(psl_prodcode);
-//                        mSmtDslBean.setDsl_repcode(psl_repcode);
-//
-//                        mAutoStringAdapter = new MyArrayAdapter<String>(mActivity, android.R.layout.simple_dropdown_item_1line, new ArrayList<String>());
-//                        mCollectEditText.setAdapter(mAutoStringAdapter);
-//                        //no use
-//                        if (mUpRadioButton.isChecked()) {
-//                            mCollectEditText.setHint(COLLECT_PRODCODE);
-//                            if (!TextUtils.isEmpty(psl_repcode)) {
-//                                String[] repcodes = psl_repcode.split(",");
-//                                String notice = "站位采集成功,请采集物料\n";
-//                                for (int j = 0; j < repcodes.length; j++) {
-//                                    String repcode = repcodes[j];
-//                                    notice = notice + repcode + "\n";
-//                                }
-//                                notice = notice + "的物料编号";
-//                                tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
-//                                tvMsgNotice.setText(notice);
-//                            } else if (!TextUtils.isEmpty(psl_prodcode)) {
-//                                tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
-//                                tvMsgNotice.setText("站位采集成功,请采集物料\n" + psl_prodcode + "\n的物料编号");
-//                            } else {
-//                                tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
-//                                tvMsgNotice.setText("站位采集成功,物料编号获取失败");
-//                            }
-//                        } else {
-//                            tvMsgNotice.setText("");
-//                            mCollectEditText.setHint(COLLECT_OLD_PRODCODE);
-//                        }
-//                    }
-//                }
-//
-//                if (!isExist) {
-//                    tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
-//                    String notice = "站位编号错误\n" + mNoticeStr;
-//                    SpannableString spannableString = CommonUtil.spanString(notice, mActivity, "站位编号错误\n".length(), notice.length(), R.color.green);
-//                    tvMsgNotice.setText(spannableString);
-//                    CommonUtil.makeNotice();
-//                    mCollectEditText.setText("");
-//                }
-//            } catch (JSONException e) {
-//                e.printStackTrace();
-//            }
-//        } else {
-//            tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
-//            String notice = "站位编号错误\n" + mNoticeStr;
-//            SpannableString spannableString = CommonUtil.spanString(notice, mActivity, "站位编号错误\n".length(), notice.length(), R.color.green);
-//            tvMsgNotice.setText(spannableString);
-//            CommonUtil.makeNotice();
-//            mCollectEditText.setText("");
-//        }
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_QUA_CHECKLOC)
+                .method(Request.Method.GET)
+                .tag(GloableParams.ADDRESS_QUA_CHECKLOC)
+                .flag(0)
+                .addParam("li_code", mLineInfoBean.getDL_LINECODE())
+                .addParam("ma_code", mLineInfoBean.getDL_MACODE())
+                .addParam("dl_table", mLineInfoBean.getDL_TABLE())
+                .addParam("location", collect)
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                try {
+                    String result = o.toString();
+                    if (FastjsonUtil.validate(result)) {
+                        com.alibaba.fastjson.JSONObject resultObject = JSON.parseObject(result);
+                        com.alibaba.fastjson.JSONObject data = resultObject.getJSONObject("data");
+                        if (data != null) {
+                            mSmtDslBean = new SmtDslBean();
+                            mSmtDslBean.setDsl_location(location);
+                            mSmtDslBean.setDsl_prodcode("");
+                            mSmtDslBean.setDsl_repcode("");
+
+                            mAutoStringAdapter = new MyArrayAdapter<String>(mActivity, android.R.layout.simple_dropdown_item_1line, new ArrayList<String>());
+                            mCollectEditText.setAdapter(mAutoStringAdapter);
+
+                            String prodcode = data.getString("prodcode");
+                            String location1 = data.getString("location");
+                            mLocationTextView.setText(location1);
+                            mCollectEditText.setText("");
+
+                            tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+                            tvMsgNotice.setText("站位采集成功, 请采集物料" + prodcode + "的料卷号");
+                        } else {
+                            CommonUtil.toastNoRepeat(mActivity, "参数出错");
+                        }
+                    } else {
+                        CommonUtil.toastNoRepeat(mActivity, "数据出错");
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+
+                tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+                String str = "站位编号错误 " + failStr + "\n";
+                String notice = str + mNoticeStr;
+                SpannableString spannableString = CommonUtil.spanString(notice, mActivity, str.length(), notice.length(), R.color.green);
+                tvMsgNotice.setText(spannableString);
+                CommonUtil.makeNotice();
+                mCollectEditText.setText("");
+            }
+        });
+
+
+        //        if (!TextUtils.isEmpty(mSmtLocationCache)) {
+        //            try {
+        //                JSONArray locationArray = new JSONArray(mSmtLocationCache);
+        //                boolean isExist = false;
+        //                for (int i = 0; i < locationArray.length(); i++) {
+        //                    JSONObject locationObject = locationArray.getJSONObject(i);
+        //                    if (collect.equals(JsonUtils.optStringNotNull(locationObject, "PSL_LOCATION"))) {
+        //                        isExist = true;
+        //                        mLocationTextView.setText(collect);
+        //                        mCollectEditText.setText("");
+        //
+        //                        String psl_prodcode = JsonUtils.optStringNotNull(locationObject, "PSL_PRODCODE");
+        //                        String psl_repcode = JsonUtils.optStringNotNull(locationObject, "PSL_REPCODE");
+        //                        mSmtDslBean = new SmtDslBean();
+        //                        mSmtDslBean.setDsl_location(location);
+        //                        mSmtDslBean.setDsl_prodcode(psl_prodcode);
+        //                        mSmtDslBean.setDsl_repcode(psl_repcode);
+        //
+        //                        mAutoStringAdapter = new MyArrayAdapter<String>(mActivity, android.R.layout.simple_dropdown_item_1line, new ArrayList<String>());
+        //                        mCollectEditText.setAdapter(mAutoStringAdapter);
+        //                        //no use
+        //                        if (mUpRadioButton.isChecked()) {
+        //                            mCollectEditText.setHint(COLLECT_PRODCODE);
+        //                            if (!TextUtils.isEmpty(psl_repcode)) {
+        //                                String[] repcodes = psl_repcode.split(",");
+        //                                String notice = "站位采集成功,请采集物料\n";
+        //                                for (int j = 0; j < repcodes.length; j++) {
+        //                                    String repcode = repcodes[j];
+        //                                    notice = notice + repcode + "\n";
+        //                                }
+        //                                notice = notice + "的物料编号";
+        //                                tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+        //                                tvMsgNotice.setText(notice);
+        //                            } else if (!TextUtils.isEmpty(psl_prodcode)) {
+        //                                tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+        //                                tvMsgNotice.setText("站位采集成功,请采集物料\n" + psl_prodcode + "\n的物料编号");
+        //                            } else {
+        //                                tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+        //                                tvMsgNotice.setText("站位采集成功,物料编号获取失败");
+        //                            }
+        //                        } else {
+        //                            tvMsgNotice.setText("");
+        //                            mCollectEditText.setHint(COLLECT_OLD_PRODCODE);
+        //                        }
+        //                    }
+        //                }
+        //
+        //                if (!isExist) {
+        //                    tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+        //                    String notice = "站位编号错误\n" + mNoticeStr;
+        //                    SpannableString spannableString = CommonUtil.spanString(notice, mActivity, "站位编号错误\n".length(), notice.length(), R.color.green);
+        //                    tvMsgNotice.setText(spannableString);
+        //                    CommonUtil.makeNotice();
+        //                    mCollectEditText.setText("");
+        //                }
+        //            } catch (JSONException e) {
+        //                e.printStackTrace();
+        //            }
+        //        } else {
+        //            tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+        //            String notice = "站位编号错误\n" + mNoticeStr;
+        //            SpannableString spannableString = CommonUtil.spanString(notice, mActivity, "站位编号错误\n".length(), notice.length(), R.color.green);
+        //            tvMsgNotice.setText(spannableString);
+        //            CommonUtil.makeNotice();
+        //            mCollectEditText.setText("");
+        //        }
     }
 
     /**
@@ -908,8 +959,8 @@ class QualityVerificationFra  extends BaseFragment implements View.OnClickListen
                                                 }
                                                 //notice = notice + psl_location + ",";
                                                 //noticeStr = noticeStr + psl_location + ",";
-                                                notice += "\n站位:"  + psl_location + " 料号:" + psl_prodcode;
-                                                noticeStr += "\n站位:"  + psl_location + " 料号:" + psl_prodcode;
+                                                notice += "\n站位:" + psl_location + " 料号:" + psl_prodcode;
+                                                noticeStr += "\n站位:" + psl_location + " 料号:" + psl_prodcode;
                                             }
                                         }
                                         //notice = notice.substring(0, notice.length() - 1);
@@ -1048,7 +1099,7 @@ class QualityVerificationFra  extends BaseFragment implements View.OnClickListen
 
     @Override
     protected void initDatas() {
-//        mSmtLocationCache = SharedPreUtil.getString(mActivity, Constants.FLAG.SMT_LOCATION_CACHE, null);
+        //        mSmtLocationCache = SharedPreUtil.getString(mActivity, Constants.FLAG.SMT_LOCATION_CACHE, null);
         if (mLineInfoBean != null) {
             mLinecodeTextView.setText(mLineInfoBean.getDL_LINECODE());
             mTableTextView.setText(mLineInfoBean.getDL_TABLE() + "面");
@@ -1099,7 +1150,7 @@ class QualityVerificationFra  extends BaseFragment implements View.OnClickListen
                                                     confirmEvent(psl_location);
                                                 }
                                                 //notice = notice + psl_location + ",";
-                                                notice += "\n站位:"  + psl_location + " 料号:" + psl_prodcode;
+                                                notice += "\n站位:" + psl_location + " 料号:" + psl_prodcode;
                                             }
                                         }
                                         //notice = notice.substring(0, notice.length() - 1);

+ 62 - 13
app/src/main/java/com/uas/pda_wps/fragment/SCSMTCheckFragment.java

@@ -52,6 +52,7 @@ import com.uas.pda_wps.tools.SharedPreUtil;
 import com.uas.pda_wps.tools.VolleyUtil;
 import com.uas.pda_wps.util.CommonUtil;
 import com.uas.pda_wps.util.Constants;
+import com.uas.pda_wps.util.FastjsonUtil;
 import com.uas.pda_wps.util.FragmentUtils;
 import com.uas.pda_wps.util.HttpCallback;
 import com.uas.pda_wps.util.HttpParams;
@@ -182,7 +183,6 @@ public class SCSMTCheckFragment extends BaseFragment implements View.OnClickList
 
         mCollectEditText.requestFocus();
 
-
         //接口回调
         VolleyUtil.setVolleyHandler(handler);
 
@@ -683,16 +683,65 @@ public class SCSMTCheckFragment extends BaseFragment implements View.OnClickList
         tvMsgQuantity.setText("");
         tvMsgSpec.setText("");
 
-        mLocationTextView.setText(collect);
-        mCollectEditText.setText("");
-
-        mSmtDslBean = new SmtDslBean();
-        mSmtDslBean.setDsl_location(location);
-        mSmtDslBean.setDsl_prodcode("");
-        mSmtDslBean.setDsl_repcode("");
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_QUA_CHECKLOC)
+                .method(Request.Method.GET)
+                .tag(GloableParams.ADDRESS_QUA_CHECKLOC)
+                .flag(0)
+                .addParam("li_code",mLineInfoBean.getDL_LINECODE())
+                .addParam("ma_code",mLineInfoBean.getDL_MACODE())
+                .addParam("dl_table",mLineInfoBean.getDL_TABLE())
+                .addParam("location", collect)
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                progressDialog.dismiss();
+                try {
+                    String result = o.toString();
+                    if (FastjsonUtil.validate(result)) {
+                        com.alibaba.fastjson.JSONObject resultObject = JSON.parseObject(result);
+                        com.alibaba.fastjson.JSONObject data = resultObject.getJSONObject("data");
+                        if (data != null) {
+                            mSmtDslBean = new SmtDslBean();
+                            mSmtDslBean.setDsl_location(location);
+                            mSmtDslBean.setDsl_prodcode("");
+                            mSmtDslBean.setDsl_repcode("");
+
+                            mAutoStringAdapter = new MyArrayAdapter<String>(mActivity, android.R.layout.simple_dropdown_item_1line, new ArrayList<String>());
+                            mCollectEditText.setAdapter(mAutoStringAdapter);
+
+                            String prodcode = data.getString("prodcode");
+                            String location1 = data.getString("location");
+                            mLocationTextView.setText(location1);
+                            mCollectEditText.setText("");
+
+                            tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+                            tvMsgNotice.setText("站位采集成功, 请采集物料" + prodcode + "的料卷号");
+                        }else {
+                            CommonUtil.toastNoRepeat(mActivity, "参数出错");
+                        }
+                    }else {
+                        CommonUtil.toastNoRepeat(mActivity, "数据出错");
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
 
-        mAutoStringAdapter = new MyArrayAdapter<String>(mActivity, android.R.layout.simple_dropdown_item_1line, new ArrayList<String>());
-        mCollectEditText.setAdapter(mAutoStringAdapter);
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(mActivity, failStr);
+                tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+                String str = "站位编号错误 " + failStr + "\n";
+                String notice = str + mNoticeStr;
+                SpannableString spannableString = CommonUtil.spanString(notice, mActivity, str.length(), notice.length(), R.color.green);
+                tvMsgNotice.setText(spannableString);
+                CommonUtil.makeNotice();
+                mCollectEditText.setText("");
+            }
+        });
 
 //        if (!TextUtils.isEmpty(mSmtLocationCache)) {
 //            try {
@@ -1055,9 +1104,9 @@ public class SCSMTCheckFragment extends BaseFragment implements View.OnClickList
 
 //        mSmtLocationCache = SharedPreUtil.getString(mActivity, Constants.FLAG.SMT_LOCATION_CACHE, null);
         if (mLineInfoBean != null) {
-            mLinecodeTextView.setText(mLineInfoBean.getDL_LINECODE());
-            mTableTextView.setText(mLineInfoBean.getDL_TABLE() + "面");
-            mMacodeTextView.setText(mLineInfoBean.getDL_MACODE());
+            mLinecodeTextView.setText(mLineInfoBean.getDL_LINECODE());     //线别
+            mTableTextView.setText(mLineInfoBean.getDL_TABLE() + "面");      //板面
+            mMacodeTextView.setText(mLineInfoBean.getDL_MACODE());      //工单
         }
 
         getUncheckLocation();

+ 7 - 2
app/src/main/java/com/uas/pda_wps/fragment/SCSMTIndexFragment.java

@@ -280,8 +280,13 @@ public class SCSMTIndexFragment extends BaseFragment implements AdapterView.OnIt
                         break;
                     //校验
                     case GloableParams.LISTNAME_FEEDER_CHECK:
-                        fragment = new SCSMTCheckFragment();
-                        FragmentUtils.switchFragment(this, fragment);
+                        boolean aBoolean = SharedPreUtil.getBoolean(mActivity, Constants.FLAG.WHETHER_IT_IS_QUALITY, false);
+                        if (aBoolean) {
+                            fragment = new SCSMTCheckFragment();
+                            FragmentUtils.switchFragment(this, fragment);
+                        }else {
+                            CommonUtil.toastNoRepeat(mActivity, "您非品质角色,无操作权限!");
+                        }
                         break;
                      //机台操作
                     case GloableParams.LISTNAME_FEEDER_MACHINE:

+ 1023 - 0
app/src/main/java/com/uas/pda_wps/fragment/SMTMaterialPreparationLoading.java

@@ -0,0 +1,1023 @@
+package com.uas.pda_wps.fragment;
+
+import android.content.Context;
+import android.os.Handler;
+import android.os.Message;
+import android.text.SpannableString;
+import android.text.TextUtils;
+import android.util.Log;
+import android.view.KeyEvent;
+import android.view.View;
+import android.view.inputmethod.EditorInfo;
+import android.view.inputmethod.InputMethodManager;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.RelativeLayout;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.android.volley.AuthFailureError;
+import com.android.volley.DefaultRetryPolicy;
+import com.android.volley.Request;
+import com.android.volley.Response;
+import com.android.volley.VolleyError;
+import com.android.volley.toolbox.StringRequest;
+import com.uas.pda_wps.R;
+import com.uas.pda_wps.application.PdaApplication;
+import com.uas.pda_wps.bean.LineInfoBean;
+import com.uas.pda_wps.bean.SmtDslBean;
+import com.uas.pda_wps.global.GloableParams;
+import com.uas.pda_wps.tools.SharedPreUtil;
+import com.uas.pda_wps.tools.VolleyUtil;
+import com.uas.pda_wps.util.CommonUtil;
+import com.uas.pda_wps.util.Constants;
+import com.uas.pda_wps.util.FastjsonUtil;
+import com.uas.pda_wps.util.HttpCallback;
+import com.uas.pda_wps.util.HttpParams;
+import com.uas.pda_wps.util.JsonUtils;
+import com.uas.pda_wps.util.LogUtil;
+import com.uas.pda_wps.util.MyLog;
+import com.uas.pda_wps.util.SoundUtil;
+import com.uas.pda_wps.util.VolleyRequest;
+import com.uas.pda_wps.view.ClearableEditText;
+import com.uas.pda_wps.view.TextViewWithButton;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * SMT备料上料:上料子页面
+ */
+public class SMTMaterialPreparationLoading extends BaseFragment implements View.OnClickListener, TextViewWithButton.TvHintHelper {
+    private TextViewWithButton tvLocation, tvBarcode, tvRemainqty, tvFecode, mLocationTextView;
+    private TextView tvMsgNotice, tvMsgLocation, tvMsgProdcode, tvMsgBarcode, tvMsgQuantity, tvMsgSpec,tv_collection_info;
+    private RelativeLayout rlCollect;
+    private JSONArray smtLocation;
+    private JSONObject makeCraft;
+    private TextView mLinecodeTextView, mTableTextView, mMacodeTextView;
+    private ClearableEditText mCollectEditText;
+    int requestType = -1;
+
+    private Button btnCollect;
+    private LineInfoBean mLineInfoBean;     //线别enter数据
+
+    private SmtDslBean mSmtDslBean = new SmtDslBean();
+    private StringRequest mStringRequest;
+    private String mNoticeStr = "";
+    private boolean mOrderSwitch = false;
+    private String mSmtLocationCache;
+    private boolean isCancelVerification;       //设置-->备料上料--取消站位校验
+
+    @Override
+    protected int getLayout() {
+        return R.layout.fra_smt_material_preparation_loading;
+    }
+
+    @Override
+    protected void initViews() {
+        mOrderSwitch = SharedPreUtil.getInt(mActivity, Constants.FLAG.CACHE_DEFAULT_ORDER_SWITCH + CommonUtil.getUserName(mActivity), 0) == 1;
+        //获取组件
+        //->采集信息
+        btnCollect = (Button) root.findViewById(R.id.btn_collect_smtchildin);
+        tvLocation = (TextViewWithButton) root.findViewById(R.id.tv_innernotice_location_smtchildin);
+        tvFecode = (TextViewWithButton) root.findViewById(R.id.tv_innernotice_fecode_smtchildin);
+        tvBarcode = (TextViewWithButton) root.findViewById(R.id.tv_innernotice_barcode_smtchildin);
+        tvRemainqty = (TextViewWithButton) root.findViewById(R.id.tv_innernotice_remainqty_smtchildin);
+        rlCollect = (RelativeLayout) root.findViewById(R.id.rl_innernotice_smtchildin);
+
+        mLocationTextView = (TextViewWithButton) root.findViewById(R.id.smt_feeding_in_location_tv);
+        mLinecodeTextView = (TextView) root.findViewById(R.id.smt_feeding_in_linecode_tv);
+        mTableTextView = (TextView) root.findViewById(R.id.smt_feeding_in_table_tv);
+        mMacodeTextView = (TextView) root.findViewById(R.id.smt_feeding_in_macode_tv);
+        mCollectEditText = (ClearableEditText) root.findViewById(R.id.smt_feeding_in_collect_et);
+
+        mCollectEditText.requestFocus();
+        //->提示信息
+        tvMsgNotice = (TextView) root.findViewById(R.id.tv_innernotice_msgtitle_scmake);
+        tvMsgProdcode = (TextView) root.findViewById(R.id.tv_innernotice_1_scmake);
+        tvMsgLocation = (TextView) root.findViewById(R.id.tv_innernotice_2_scmake);
+        tvMsgBarcode = (TextView) root.findViewById(R.id.tv_innernotice_3_scmake);
+        tvMsgQuantity = (TextView) root.findViewById(R.id.tv_innernotice_4_scmake);
+        tvMsgSpec = (TextView) root.findViewById(R.id.tv_innernotice_5_scmake);
+
+        tv_collection_info = (TextView) root.findViewById(R.id.tv_collection_info);
+
+        //接口回调
+        VolleyUtil.setVolleyHandler(handler);
+
+        mLineInfoBean = (LineInfoBean) PdaApplication.getDataCacheFromMap(Constants.FLAG.SMT_DEVICE_LINE_CACHE);
+    }
+
+    @Override
+    protected void initEvents() {
+        tvLocation.setTvHintHelper(this);
+        tvBarcode.setTvHintHelper(this);
+        tvRemainqty.setTvHintHelper(this);
+        tvFecode.setTvHintHelper(this);
+
+        mLocationTextView.setTvHintHelper(this);
+
+        btnCollect.setOnClickListener(this);
+
+        mCollectEditText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
+            @Override
+            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
+                String collect = mCollectEditText.getText().toString().trim();
+                if (!TextUtils.isEmpty(collect)) {
+                    if (actionId == EditorInfo.IME_ACTION_DONE
+                            || actionId == EditorInfo.IME_ACTION_SEND
+                            || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
+                        confirmEvent(collect);
+                        return true;
+                    }
+                }
+                return false;
+            }
+        });
+
+        mLocationTextView.setOnTextClearListener(new TextViewWithButton.OnTextClearListener() {
+            @Override
+            public void onTextClear() {
+                //mCollectEditText.setHint("请录入站位编号");
+                mCollectEditText.setHint("请录入条码号");
+                mCollectEditText.setText("");
+            }
+        });
+    }
+
+    private void confirmEvent(String collect) {
+        String location = mLocationTextView.getText().toString().trim();
+        MyLog.e("aaa","站位数据为:" + location);
+        if (TextUtils.isEmpty(location)) {
+            //locationCheck(collect);
+            mLocationTextView.setText(collect);
+            mCollectEditText.setText("");
+
+            initLocation(collect);
+            setLocationCheck(collect);  //接口站位校验
+        } else {
+            mSmtDslBean.setDsl_barcode(collect);
+            feedLoading();
+        }
+    }
+
+    private void initLocation(String collect) {
+        mSmtDslBean = new SmtDslBean();
+        mSmtDslBean.setDsl_location(collect);
+        mSmtDslBean.setDsl_prodcode("");
+        mCollectEditText.setHint("请录入条码号");
+
+        tvMsgNotice.setText("");
+        tvMsgProdcode.setText("");
+        tvMsgLocation.setText("");
+        tvMsgBarcode.setText("");
+        tvMsgQuantity.setText("");
+        tvMsgSpec.setText("");
+    }
+
+    /**
+     * 接口: 站位校验
+     */
+    private void setLocationCheck(String collect) {
+        //        mLinecodeTextView.setText(mLineInfoBean.getDL_LINECODE());  //线别
+        //        mTableTextView.setText(mLineInfoBean.getDL_TABLE() + "面");  //板面
+        //        mMacodeTextView.setText(mLineInfoBean.getDL_MACODE());      //工单
+
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
+                .url(GloableParams.ADDRESS_LOADING_CHECKLOC)
+                .method(Request.Method.GET)
+                .addParam("li_code", mLineInfoBean.getDL_LINECODE())    //线别
+                .addParam("ma_code", mLineInfoBean.getDL_MACODE())      //工单
+                .addParam("dl_table", mLineInfoBean.getDL_TABLE())      //板面
+                .addParam("location", collect)         //站位
+                .build(), new HttpCallback() {
+            @Override
+            public void onSuccess(int flag, Object o) throws Exception {
+                try {
+                    progressDialog.dismiss();
+                    String result = o.toString();
+
+                    com.alibaba.fastjson.JSONObject resultObject = JSON.parseObject(result);
+                    com.alibaba.fastjson.JSONObject data = resultObject.getJSONObject("data");
+                    if (data != null) {
+                        String fecode = FastjsonUtil.getText(data, "fecode");
+                        String prodcode = FastjsonUtil.getText(data, "prodcode");
+                        String location = FastjsonUtil.getText(data, "location");
+
+                        mLocationTextView.setText(location);
+                        mCollectEditText.setText("");
+
+                        tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+                        String text = "校验成功" + "\n";
+                        text += "站位: " + location + "\n"
+                                + "飞达: " + fecode + "\n"
+                                + "请采集物料: " + prodcode + "的料卷编号/物料编号";
+                        tvMsgNotice.setText(text);
+                    }
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+
+            @Override
+            public void onFail(int flag, String failStr) throws Exception {
+                progressDialog.dismiss();
+                CommonUtil.toastNoRepeat(getActivity(), failStr);
+                mLocationTextView.setText("");
+                mCollectEditText.setText("");
+                tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+                tvMsgNotice.setText(failStr);
+            }
+        });
+    }
+
+    /**
+     * 站位本地校验
+     *
+     * @param collect 采集框采集内容
+     */
+    private void locationCheck(String collect) {
+        tvMsgProdcode.setText("");
+        tvMsgLocation.setText("");
+        tvMsgBarcode.setText("");
+        tvMsgQuantity.setText("");
+        tvMsgSpec.setText("");
+
+        mLocationTextView.setText(collect);
+        mCollectEditText.setText("");
+
+        mSmtDslBean = new SmtDslBean();
+        mSmtDslBean.setDsl_location(collect);
+        mSmtDslBean.setDsl_prodcode("");
+        mCollectEditText.setHint("请录入条码号");
+
+        //        if (!TextUtils.isEmpty(mSmtLocationCache)) {
+        //            try {
+        //                JSONArray locationArray = new JSONArray(mSmtLocationCache);
+        //                boolean isExist = false;
+        //                for (int i = 0; i < locationArray.length(); i++) {
+        //                    JSONObject locationObject = locationArray.getJSONObject(i);
+        //                    if (collect.equals(JsonUtils.optStringNotNull(locationObject, "PSL_LOCATION"))) {
+        //                        isExist = true;
+        //                        mLocationTextView.setText(collect);
+        //                        mCollectEditText.setText("");
+        //
+        //                        String psl_prodcode = JsonUtils.optStringNotNull(locationObject, "PSL_PRODCODE");
+        //                        String psl_repcode = JsonUtils.optStringNotNull(locationObject, "PSL_REPCODE");
+        //                        mSmtDslBean = new SmtDslBean();
+        //                        mSmtDslBean.setDsl_location(collect);
+        //                        mSmtDslBean.setDsl_prodcode(psl_prodcode);
+        //                        mCollectEditText.setHint("请录入飞达编号");
+        //
+        //                        if (!TextUtils.isEmpty(psl_repcode)) {
+        //                            String[] repcodes = psl_repcode.split(",");
+        //                            String notice = "站位采集成功,请采集物料\n";
+        //                            for (int j = 0; j < repcodes.length; j++) {
+        //                                String repcode = repcodes[j];
+        //                                notice = notice + repcode + "\n";
+        //                            }
+        //                            notice = notice + "的料卷编号/物料编号";
+        //                            tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+        //                            tvMsgNotice.setText(notice);
+        //                        } else if (!TextUtils.isEmpty(psl_prodcode)) {
+        //                            tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+        //                            tvMsgNotice.setText("站位采集成功,请采集物料\n" + psl_prodcode + "\n的飞达编号");
+        //                        } else {
+        //                            tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+        //                            tvMsgNotice.setText("站位采集成功,物料编号获取失败");
+        //                        }
+        //                    }
+        //                }
+        //
+        //                if (!isExist) {
+        //                    tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+        //                    String notice = "站位编号错误\n" + mNoticeStr;
+        //                    SpannableString spannableString = CommonUtil.spanString(notice, mActivity, "站位编号错误\n".length(), notice.length(), R.color.green);
+        //                    tvMsgNotice.setText(spannableString);
+        //                    CommonUtil.makeNotice();
+        //                    mCollectEditText.setText("");
+        //                }
+        //            } catch (JSONException e) {
+        //                e.printStackTrace();
+        //            }
+        //        } else {
+        //            tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+        //            String notice = "站位编号错误\n" + mNoticeStr;
+        //            SpannableString spannableString = CommonUtil.spanString(notice, mActivity, "站位编号错误\n".length(), notice.length(), R.color.green);
+        //            tvMsgNotice.setText(spannableString);
+        //            CommonUtil.makeNotice();
+        //            mCollectEditText.setText("");
+        //        }
+    }
+
+    /**
+     * 站位上料
+     */
+    private void feedLoading() {
+        progressDialog.show();
+        PdaApplication.mRequestQueue.cancelAll(TAG + "loading");
+
+        final String smtDsl = JSON.toJSONString(mSmtDslBean);
+        String deviceLineMake = "";
+        if (mLineInfoBean != null) {
+            deviceLineMake = JSON.toJSONString(mLineInfoBean);
+        }
+        final String finalDeviceLineMake = deviceLineMake;
+        mStringRequest = new StringRequest(Request.Method.POST, GloableParams.ADDRESS_SMT_LOADING,
+                new Response.Listener<String>() {
+                    @Override
+                    public void onResponse(String s) {
+                        try {
+                            LogUtil.i("inloading", s);
+                            if (progressDialog.isShowing())
+                                progressDialog.dismiss();
+                            JSONObject jsonObject = new JSONObject(s);
+                            JSONObject dataObject = jsonObject.optJSONObject("data");
+                            if (dataObject != null) {
+                                mLocationTextView.setText("");
+                                mCollectEditText.setText("");
+                                //mCollectEditText.setHint("请录入站位编号");
+                                mCollectEditText.setHint("请录入条码号");
+
+                                mSmtDslBean = new SmtDslBean();
+
+                                double notCheckCount = JsonUtils.optDoubleNotNull(dataObject, "NotFeedCount");
+                                String notice = "飞达规格:" + JsonUtils.optStringNotNull(dataObject, "DSL_FESPEC");
+                                if (notCheckCount == 0) {
+                                    notice = notice + "\n\n上料已完成";
+                                    mNoticeStr = "上料已完成";
+                                    SoundUtil.play(SoundUtil.SOUND_CERES);
+                                    tvMsgSpec.setText(notice);
+                                } else {
+                                    String buffer = notice;
+                                    notice = notice + "\n\n未上料站位" + CommonUtil.doubleFormat(notCheckCount) + "条";
+                                    String noticeStr = "未上料站位" + CommonUtil.doubleFormat(notCheckCount) + "条";
+                                    JSONArray notFeedArray = dataObject.optJSONArray("NotFeedLocation");
+                                    if (notFeedArray != null && notFeedArray.length() != 0) {
+                                        //notice = notice + "\n站位:\n";
+                                        //noticeStr = noticeStr + "\n站位:\n";
+                                        for (int i = 0; i < notFeedArray.length(); i++) {
+                                            JSONObject notCheckObject = notFeedArray.optJSONObject(i);
+                                            if (notCheckObject != null) {
+                                                String psl_location = JsonUtils.optStringNotNull(notCheckObject, "PSL_LOCATION");
+                                                String psl_prodcode = JsonUtils.optStringNotNull(notCheckObject, "PSL_PRODCODE");
+                                                //notice = notice + psl_location + "\n";
+                                                //noticeStr = noticeStr + psl_location + "\n";
+                                                notice += "\n站位:" + psl_location + " 料号:" + psl_prodcode;
+                                                noticeStr += "\n站位:" + psl_location + " 料号:" + psl_prodcode;
+                                                if (i == 0 && mOrderSwitch) {
+                                                    //过滤|,取前面的字段
+                                                    if (!TextUtils.isEmpty(psl_location) && psl_location.contains("|")) {
+                                                        String[] strLocation = psl_location.split("\\|");
+                                                        psl_location = strLocation[0];
+                                                    }
+                                                    mCollectEditText.setText(psl_location);
+                                                    confirmEvent(psl_location);
+                                                }
+                                            }
+                                        }
+                                        if (isCancelVerification) {
+                                            JSONObject notCheckObject = notFeedArray.optJSONObject(0);
+                                            if (notCheckObject != null) {
+                                                String psl_location = JsonUtils.optStringNotNull(notCheckObject, "PSL_LOCATION");
+                                                String psl_prodcode = JsonUtils.optStringNotNull(notCheckObject, "PSL_PRODCODE");
+                                                mLocationTextView.setText(psl_location);
+                                                initLocation(psl_location);
+                                                tv_collection_info.setVisibility(View.VISIBLE);
+                                                tv_collection_info.setText("请采集站位:" + psl_location + ",物料:" + psl_prodcode + "料卷编号/物料编号");
+                                            }
+                                        }else {
+                                            tv_collection_info.setVisibility(View.GONE);
+                                        }
+                                        //notice = notice.substring(0, notice.length() - 1);
+                                        //noticeStr = noticeStr.substring(0, noticeStr.length() - 1);
+                                    }
+
+                                    mNoticeStr = noticeStr;
+                                    SpannableString spannableString = CommonUtil.spanString(notice, mActivity, (buffer + "\n\n未上料站位").length(),
+                                            (buffer + "\n\n未上料站位").length() + CommonUtil.doubleFormat(notCheckCount).length(), R.color.blue_800);
+                                    tvMsgSpec.setText(spannableString);
+
+                                    MyLog.e("aaa","已经扫完条码号");
+                                    tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+                                    tvMsgNotice.setText("上料成功");
+                                    tvMsgProdcode.setText("料号:" + JsonUtils.optStringNotNull(dataObject, "DSL_PRODCODE"));
+                                    tvMsgLocation.setText("位号:" + JsonUtils.optStringNotNull(dataObject, "DSL_LOCATION"));
+                                    tvMsgBarcode.setText("料卷号:" + JsonUtils.optStringNotNull(dataObject, "DSL_BARCODE"));
+                                    tvMsgQuantity.setText("数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(dataObject, "DSL_REMAINQTY")));
+                                }
+                            }
+                        } catch (JSONException e) {
+                            e.printStackTrace();
+                        }
+                    }
+                },
+                new Response.ErrorListener() {
+                    @Override
+                    public void onErrorResponse(VolleyError volleyError) {
+                        if (progressDialog.isShowing())
+                            progressDialog.dismiss();
+                        String errorToast = CommonUtil.showErrorToast(volleyError, false);
+                        if (errorToast != null) {
+                            tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+                            String errorNotice = errorToast + "\n" + mNoticeStr;
+                            SpannableString spannableString = CommonUtil.spanString(errorNotice,
+                                    mActivity, (errorToast + "\n").length(), errorNotice.length(), R.color.green);
+                            tvMsgNotice.setText(spannableString);
+                            if (errorToast.contains("站位已经有在线料卷号")) {
+                                mLocationTextView.setText("");
+                                mCollectEditText.setText("");
+                            } else {
+                                mCollectEditText.setText("");
+                            }
+                        }
+                        tv_collection_info.setText("");
+                        tv_collection_info.setVisibility(View.GONE);
+                    }
+                }) {
+
+            @Override
+            protected Map<String, String> getParams() throws AuthFailureError {
+                Map<String, String> params = new HashMap<String, String>();
+                params.put("dsl", smtDsl);
+                params.put("deviceLineMake", finalDeviceLineMake);
+                return params;
+            }
+
+            @Override
+            public Map<String, String> getHeaders() throws AuthFailureError {
+                return VolleyUtil.getVolleyUtil().setCookies();
+            }
+        };
+        mStringRequest.setRetryPolicy(new DefaultRetryPolicy(10 * 1000, 0, 1f));
+        mStringRequest.setTag(TAG + "loading");
+        PdaApplication.mRequestQueue.add(mStringRequest);
+    }
+
+    @Override
+    protected void initDatas() {
+        //配置界面
+        ((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(R.string.title_feederin_smt);
+
+        mSmtLocationCache = SharedPreUtil.getString(mActivity, Constants.FLAG.SMT_LOCATION_CACHE, null);
+        if (mSmtLocationCache != null) {
+            Log.d("smtLocation", mSmtLocationCache);
+        }
+        if (mLineInfoBean != null) {
+            mLinecodeTextView.setText(mLineInfoBean.getDL_LINECODE());  //线别
+            mTableTextView.setText(mLineInfoBean.getDL_TABLE() + "面");  //板面
+            mMacodeTextView.setText(mLineInfoBean.getDL_MACODE());      //工单
+        }
+
+        //是否开启了不校验站位
+        isCancelVerification = SharedPreUtil.getInt(mActivity, Constants.FLAG.CANCEL_STATION_VERIFICATION + CommonUtil.getUserName(mActivity), 0) == 1;
+        MyLog.e("aaa","取消校验站位的值是:" + isCancelVerification + ",顺序上位的值是:" + mOrderSwitch);
+        getUnloadingLocation();
+    }
+
+    /**
+     * 获取未上料站位
+     */
+    private void getUnloadingLocation() {
+        MyLog.e("aaa", "获取为上料站位");
+        progressDialog.show();
+        VolleyRequest.getInstance().stringRequest(mStringRequest,
+                new HttpParams.Builder()
+                        .url(GloableParams.ADDRESS_SMT_GET_UNLOADING_LOCATION)
+                        .method(Request.Method.GET)
+                        .tag(TAG + "unloading")
+                        .flag(0)
+                        .addParam("linecode", (mLineInfoBean == null ? "" : mLineInfoBean.getDL_LINECODE()))
+                        .build(), new HttpCallback() {
+                    @Override
+                    public void onSuccess(int flag, Object o) throws Exception {
+                        try {
+                            if (progressDialog.isShowing())
+                                progressDialog.dismiss();
+                            JSONObject resultObject = new JSONObject(o.toString());
+                            JSONObject dataObject = resultObject.optJSONObject("data");
+                            if (dataObject != null) {
+                                double NotFeedCount = JsonUtils.optDoubleNotNull(dataObject, "NotFeedCount");
+                                String notice = "";
+                                if (NotFeedCount == 0) {
+                                    notice = notice + "上料已完成";
+                                    mNoticeStr = notice;
+                                    SoundUtil.play(SoundUtil.SOUND_CERES);
+                                    tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+                                    tvMsgNotice.setText(notice);
+                                } else {
+                                    notice = notice + "未上料站位" + CommonUtil.doubleFormat(NotFeedCount) + "条";
+                                    JSONArray notFeedArray = dataObject.optJSONArray("NotFeedLocation");
+                                    if (notFeedArray != null && notFeedArray.length() != 0) {
+                                        //notice = notice + "\n站位:\n";
+                                        for (int i = 0; i < notFeedArray.length(); i++) {
+                                            JSONObject notCheckObject = notFeedArray.optJSONObject(i);
+                                            if (notCheckObject != null) {
+                                                String psl_location = JsonUtils.optStringNotNull(notCheckObject, "PSL_LOCATION");
+                                                String psl_prodcode = JsonUtils.optStringNotNull(notCheckObject, "PSL_PRODCODE");
+                                                //notice = notice + psl_location + "\n";
+                                                notice += "\n站位:" + psl_location + " 料号:" + psl_prodcode;
+                                                if (i == 0 && mOrderSwitch) {
+                                                    //过滤|,取前面的字段
+                                                    if (!TextUtils.isEmpty(psl_location) && psl_location.contains("|")) {
+                                                        String[] strLocation = psl_location.split("\\|");
+                                                        psl_location = strLocation[0];
+                                                    }
+                                                    mCollectEditText.setText(psl_location);
+                                                    confirmEvent(psl_location);
+                                                }
+                                            }
+                                        }
+                                        if (isCancelVerification) {
+                                            JSONObject notCheckObject = notFeedArray.optJSONObject(0);
+                                            if (notCheckObject != null) {
+                                                String psl_location = JsonUtils.optStringNotNull(notCheckObject, "PSL_LOCATION");
+                                                String psl_prodcode = JsonUtils.optStringNotNull(notCheckObject, "PSL_PRODCODE");
+                                                mLocationTextView.setText(psl_location);
+                                                initLocation(psl_location);
+                                                tv_collection_info.setVisibility(View.VISIBLE);
+                                                tv_collection_info.setText("请采集站位:" + psl_location + ",物料:" + psl_prodcode + "料卷编号/物料编号");
+                                            }
+                                        }else {
+                                            tv_collection_info.setVisibility(View.GONE);
+                                        }
+                                        //notice = notice.substring(0, notice.length() - 1);
+                                    }
+                                    mNoticeStr = notice;
+                                    tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+                                    SpannableString spannableString = CommonUtil.spanString(notice, mActivity, 5, 5 + CommonUtil.doubleFormat(NotFeedCount).length(), R.color.blue_800);
+                                    tvMsgNotice.setText(spannableString);
+                                }
+                            }
+
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                        }
+                    }
+
+                    @Override
+                    public void onFail(int flag, String failStr) throws Exception {
+                        if (progressDialog.isShowing())
+                            progressDialog.dismiss();
+                        tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+                        tvMsgNotice.setText(failStr);
+                        tv_collection_info.setText("");
+                        tv_collection_info.setVisibility(View.GONE);
+                    }
+                });
+
+
+        //        String url = GloableParams.ADDRESS_SMT_GET_UNLOADING_LOCATION + "?linecode="
+        //                + (mLineInfoBean == null ? "" : mLineInfoBean.getDL_LINECODE());
+        //        PdaApplication.mRequestQueue.cancelAll(TAG + "unloading");
+        //
+        //        mStringRequest = new StringRequest(Request.Method.GET, url,
+        //                new Response.Listener<String>() {
+        //                    @Override
+        //                    public void onResponse(String s) {
+        //                        try {
+        //                            if (progressDialog.isShowing())
+        //                                progressDialog.dismiss();
+        //                            JSONObject resultObject = new JSONObject(s);
+        //                            JSONObject dataObject = resultObject.optJSONObject("data");
+        //                            if (dataObject != null) {
+        //                                double NotFeedCount = JsonUtils.optDoubleNotNull(dataObject, "NotFeedCount");
+        //                                String notice = "";
+        //                                if (NotFeedCount == 0) {
+        //                                    notice = notice + "上料已完成";
+        //                                    mNoticeStr = notice;
+        //                                    SoundUtil.play(SoundUtil.SOUND_CERES);
+        //                                    tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+        //                                    tvMsgNotice.setText(notice);
+        //                                } else {
+        //                                    notice = notice + "未上料站位" + CommonUtil.doubleFormat(NotFeedCount) + "条";
+        //                                    JSONArray notFeedArray = dataObject.optJSONArray("NotFeedLocation");
+        //                                    if (notFeedArray != null && notFeedArray.length() != 0) {
+        //                                        //notice = notice + "\n站位:\n";
+        //                                        for (int i = 0; i < notFeedArray.length(); i++) {
+        //                                            JSONObject notCheckObject = notFeedArray.optJSONObject(i);
+        //                                            if (notCheckObject != null) {
+        //                                                String psl_location = JsonUtils.optStringNotNull(notCheckObject, "PSL_LOCATION");
+        //                                                String psl_prodcode = JsonUtils.optStringNotNull(notCheckObject, "PSL_PRODCODE");
+        //                                                //notice = notice + psl_location + "\n";
+        //                                                notice += "\n站位:"  + psl_location + " 料号:" + psl_prodcode;
+        //                                                if (i == 0 && mOrderSwitch) {
+        //                                                    //过滤|,取前面的字段
+        //                                                    if(!TextUtils.isEmpty(psl_location)&&psl_location.contains("|")){
+        //                                                        String[] strLocation=psl_location.split("\\|");
+        //                                                        psl_location=strLocation[0];
+        //                                                    }
+        //                                                    mCollectEditText.setText(psl_location);
+        //                                                    confirmEvent(psl_location);
+        //                                                }
+        //                                            }
+        //                                        }
+        //                                        //notice = notice.substring(0, notice.length() - 1);
+        //                                    }
+        //                                    mNoticeStr = notice;
+        //                                    tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+        //                                    SpannableString spannableString = CommonUtil.spanString(notice, mActivity, 5, 5 + CommonUtil.doubleFormat(NotFeedCount).length(), R.color.blue_800);
+        //                                    tvMsgNotice.setText(spannableString);
+        //                                }
+        //                            }
+        //
+        //                        } catch (Exception e) {
+        //                            e.printStackTrace();
+        //                        }
+        //
+        //                    }
+        //                },
+        //                new Response.ErrorListener() {
+        //                    @Override
+        //                    public void onErrorResponse(VolleyError volleyError) {
+        //                        if (progressDialog.isShowing())
+        //                            progressDialog.dismiss();
+        //                        String errorToast = CommonUtil.showErrorToast(volleyError, false);
+        //                        tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
+        //                        tvMsgNotice.setText(errorToast);
+        //                    }
+        //                }) {
+        //            @Override
+        //            public Map<String, String> getHeaders() throws AuthFailureError {
+        //                return VolleyUtil.getVolleyUtil().setCookies();
+        //            }
+        //        };
+        //        mStringRequest.setRetryPolicy(new DefaultRetryPolicy(10 * 1000, 0, 1f));
+        //        mStringRequest.setTag(TAG + "unloading");
+        //        PdaApplication.mRequestQueue.add(mStringRequest);
+    }
+
+    @Override
+    public void onDestroy() {
+        VolleyUtil.distoryVolley();
+        super.onDestroy();
+    }
+
+    @Override
+    public void onDestroyView() {
+        CommonUtil.closeKeybord(mCollectEditText, mActivity);
+        super.onDestroyView();
+    }
+
+    //按钮点击事件:当Location为空的时候
+    private void disposeOnClickLocation() {
+        Log.e("SMTChildInOnclick", "站位为空");
+        String tmpLocation = null;
+        String title = null;
+        String content = null;
+        int color = 0;
+        isAgain = false;
+
+        //信息框都清空
+        tvBarcode.setText("");
+        tvRemainqty.setText("");
+        tvFecode.setText("");
+
+        try {
+            //比对smtLocation
+            for (int i = 0; i < smtLocation.length(); i++) {
+                JSONObject tmpJson = smtLocation.getJSONObject(i);
+                tmpLocation = tmpJson.getString("psl_location").trim();
+                //如果匹配
+                if (tmpLocation.equals(code)) {
+                    Log.e("SMTCHILD", "匹配");
+                    //显示在站位输入框,添加数据项
+                    tvLocation.setText(tmpLocation);
+                    msl = new JSONObject();
+                    msl.put("msl_location", code);
+                    msl.put("msl_prodcode", tmpJson.getString("psl_prodcode").trim());
+                    msl.put("msl_repcode", tmpJson.getString("psl_repcode").trim());
+                    // msl.put("msl_repcode","无");
+                    msl.put("psl_id", tmpJson.getString("psl_id").trim());
+                    msl.put("msl_fespec", tmpJson.getString("psl_feeder").trim());
+                    //msl = smtLocation.getJSONObject(i);
+                    Log.e("SMTCHILD", msl.toString());
+                    //更改etCollect的Hint
+                    setEtHint();
+                    //提示框中显示信息
+                    title = "站位采集成功";
+                    content = "站位采集成功,请采集物料" + msl.get("msl_prodcode") + "的条码";
+                    color = getResources().getColor(R.color.green);
+                    setNotice(title, content, color);
+                    break;
+                }
+                //如果不匹配
+                else {
+                    Log.e("SMTCHILD", "不匹配");
+                    title = "错误";
+                    content = getString(R.string.notice_smtchild_barcode);
+                    color = getResources().getColor(R.color.text_error);
+                }
+            }
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        setNotice(title, content, color);
+    }
+
+    //按钮点击事件:当料卷号为空的时候
+    private void disposeOnClickBarcode() {
+        Log.e("SMTChildInOnclick", "料卷为空");
+        //请求判断料卷编号是否正确,获取料卷数量
+        JSONObject paramJson = new JSONObject();
+        try {
+            paramJson.put("bar_code", code);
+            paramJson.put("prod_code", msl.getString("msl_prodcode"));
+            paramJson.put("rep_code", msl.getString("msl_repcode"));
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        showLoadingView();
+        requestType = VolleyUtil.FRAGMENT_SCMAKE_SMTIN_BARREMAIN;
+        VolleyUtil.getVolleyUtil().requestJsonObject(getActivity(), GloableParams.ADDRESS_SMT_BARREMAIN_APPLY, VolleyUtil.METHOD_POST,
+                VolleyUtil.FRAGMENT_SCMAKE_SMTIN_BARREMAIN, paramJson);
+    }
+
+    //按钮点击事件:当飞达编号为空时
+    private void disposeOnClickFecode() {
+        //获取飞达编号
+        String fecodeStr = tvFecode.getText().toString().trim();
+        //->else if(msl_fecode为空),料卷号不为空,飞达编号为空时
+        if (fecodeStr.equals("") || fecodeStr == null) {
+            //tvFecode.setText(code);
+            try {
+                msl.put("msl_fecode", code);
+            } catch (JSONException e) {
+                e.printStackTrace();
+            }
+            //上料操作
+            requestType = VolleyUtil.FRAGMENT_SCMAKE_SMTIN_UPLOAD;
+            showLoadingView();
+            VolleyUtil.getVolleyUtil().requestSMTInUpLoad(getActivity(), GloableParams.ADDRESS_SMTIN_UPLOAD_APPLY, VolleyUtil.METHOD_POST,
+                    requestType, msl.toString(), makeCraft.toString());
+        }
+    }
+
+    //扫描料卷编号成功
+    String mslBarcode = null, mslRemainQty = null;
+
+    private void disposeBarcodeSuccess(String result) {
+        String title, content;
+        int color;
+        JSONObject tmpJson, msgJson;
+        try {
+            tmpJson = new JSONObject(result);
+            msgJson = tmpJson.getJSONObject("message");
+            //将message中的值赋值给变量msl中的值
+            msl.put("msl_barcode", msgJson.getString("bar_code"));
+            msl.put("msl_prodcode", msgJson.get("bar_prodcode"));
+            msl.put("msl_remainqty", msgJson.get("bar_remain"));
+            mslBarcode = code;
+            mslRemainQty = msgJson.getString("bar_remain");
+            //料卷编号和数量输入框显示对应的值,清空采集栏中的值
+            tvBarcode.setText(mslBarcode);
+            tvRemainqty.setText(mslRemainQty);
+            //将采集栏中的提示文字修改为“请录入飞达编号”
+            setEtHint();
+            //清空提示栏信息
+            title = "料卷采集成功";
+            content = "请采集物料" + msl.get("msl_prodcode") + "的飞达编号";
+            color = getResources().getColor(R.color.green);
+            setNotice(title, content, color);
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+    }
+
+    //上料成功
+    private void disposeUpLoadSuccess(String result) {
+        JSONObject msgJson;
+        String productStr = "无", locationStr = "无", fecodeStr = "无", barcodeStr = "无", qtyStr = "无";
+        try {
+            JSONObject tmpJson = new JSONObject(result);
+            msgJson = tmpJson.getJSONObject("message");
+            productStr = msgJson.getString("msl_prodcode");
+            locationStr = msgJson.getString("msl_location");
+            fecodeStr = msgJson.getString("msl_fecode");
+            barcodeStr = msgJson.getString("msl_barcode");
+            qtyStr = msgJson.getString("msl_remainqty");
+        } catch (JSONException e) {
+            e.printStackTrace();
+        }
+        tvFecode.setText(code);
+        //信息提示框
+        tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+        tvMsgNotice.setText("上料成功");
+        tvMsgNotice.setTextColor(getResources().getColor(R.color.green));
+        tvMsgLocation.setText("物料号:" + productStr);
+        tvMsgProdcode.setText("站位:" + locationStr);
+        tvMsgBarcode.setText("飞达:" + fecodeStr);
+        tvMsgQuantity.setText("料卷号:" + barcodeStr);
+        tvMsgSpec.setText("数量:" + qtyStr);
+        //新一轮采集
+        msl = null;
+        isAgain = true;
+        setEtHint();
+    }
+
+    /*========================Volley Handler=================================*/
+    Handler handler = new Handler() {
+        @Override
+        public void handleMessage(Message msg) {
+            switch (msg.what) {
+                case VolleyUtil.SUCCESS_SUCCESS:
+                    disposeVolleySuccess(msg);
+                    break;
+                case VolleyUtil.FAILED_FAILED:
+                    disposeVolleyFaild(msg);
+                    break;
+            }
+        }
+    };
+
+    //Volley响应失败
+    private void disposeVolleyFaild(Message msg) {
+        String noticeMsg = (String) msg.obj;
+        String title = "失败";
+        String content = noticeMsg;
+        setNotice(title, content, getResources().getColor(R.color.red));
+        progressDialog.dismiss();
+    }
+
+    //Volley响应成功函数
+    private void disposeVolleySuccess(Message msg) {
+        Log.e("SCSMTFEEDER", "HandlerSuccess");
+        String result = (String) msg.obj;
+        switch (requestType) {
+            //请求详细数据
+            case VolleyUtil.FRAGMENT_SCMAKE_SMTINDETAIL:
+                Log.e("SCSMTFEEDER", "requestType:" + requestType);
+                String smtLocationStr = (String) msg.obj;
+                try {
+                    //保存请求的变量
+                    JSONObject tmpJson = new JSONObject(smtLocationStr);
+                    //如果没有获取到网络数据
+                    boolean isNull = tmpJson.isNull("message");
+                    if (isNull) {
+                        disposeNullServerData();
+                    } else {
+                        smtLocation = tmpJson.getJSONArray("message");
+                        //这里获取了数据 没有填充上去
+                        Log.e("SMTINChild", "smtLocation:" + smtLocation.toString());
+                    }
+                } catch (JSONException e) {
+                    e.printStackTrace();
+                }
+                break;
+            //物料
+            case VolleyUtil.FRAGMENT_SCMAKE_SMTIN_BARREMAIN:
+                Log.e("SMTWULIAO", "BARREMAIN");
+                disposeBarcodeSuccess(result);
+                // disposeFecodeCollect();
+                break;
+            //上料操作:上料成功以后,需要重新获取输入框文字
+            case VolleyUtil.FRAGMENT_SCMAKE_SMTIN_UPLOAD:
+                disposeUpLoadSuccess(result);
+                MyLog.e("aaa","旧的上料成功");
+                break;
+        }
+        progressDialog.dismiss();
+    }
+
+    //隐藏采集界面
+    private void disposeNullServerData() {
+        rlCollect.setVisibility(View.GONE);
+        String title = getString(R.string.notice_smtin_nulldata);
+        setNotice(title, "", getResources().getColor(R.color.text_error));
+    }
+    /*========================公用方法=================================*/
+
+    /**
+     * 显示loadingView
+     */
+    private void showLoadingView() {
+        if (!progressDialog.isShowing()) {
+            progressDialog.show();
+        }
+    }
+
+    /**
+     * 键盘
+     */
+    InputMethodManager inputManager;
+
+    private void hideKeyboard(final EditText view) {
+        inputManager = (InputMethodManager) view.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
+        //获取键盘管理对象
+        inputManager.hideSoftInputFromWindow(view.getWindowToken(), 0);
+    }
+
+    /**
+     * 获取输入框焦点
+     */
+    private void editTextGetFocus(EditText editText) {
+        editText.setFocusable(true);
+        editText.setFocusableInTouchMode(true);
+        editText.setEnabled(true);
+        editText.setClickable(true);
+        editText.requestFocus();
+    }
+
+    /**
+     * 设置提示信息
+     */
+    private void setNotice(String title, String content, int pid) {
+        tvMsgNotice.setText(title);
+        tvMsgNotice.setTextColor(pid);
+        tvMsgProdcode.setText(content);
+        //清除其它信息
+        tvMsgSpec.setText("");
+        tvMsgBarcode.setText("");
+        tvMsgLocation.setText("");
+        tvMsgQuantity.setText("");
+    }
+
+    /**
+     * 设置采集框提示信息
+     */
+    @Override
+    public void setEtHint() {
+        //获取站位\料卷\飞达编号
+        String locationStr = tvLocation.getText().toString().trim();
+        String barcodeStr = tvBarcode.getText().toString().trim();
+        String remainQty = tvRemainqty.getText().toString().trim();
+        String fecodeStr = tvFecode.getText().toString().trim();
+        /*//->if(msl_location为空),如果站位为null
+        if (isAgain || locationStr.equals("") || locationStr == null) {
+            etCollect.setHint(R.string.hint_smtchild_location);
+        }
+        //->else if(msl_barcode为空) 如果站位不为空,料卷号为空
+        else if (barcodeStr.equals("") || barcodeStr == null) {
+            etCollect.setHint(R.string.hint_smtchild_barcode);
+        }
+        //->else if(msl_remainqty为空) 如果数量为空
+        else if (remainQty.equals("") || remainQty == null) {
+            etCollect.setHint(R.string.hint_smtchild_barcode);
+        }
+        //->else if(msl_fecode为空),料卷号不为空,飞达编号为空时
+        else if (fecodeStr.equals("") || barcodeStr == null) {
+            etCollect.setHint(R.string.hint_smtchild_fecode);
+        }*/
+    }
+
+    /**
+     * 按钮点击事件
+     */
+    @Override
+    public void onClick(View v) {
+        disposeOnClick();
+    }
+
+    JSONObject msl = new JSONObject();
+    String code = null;
+    boolean isAgain = false;
+
+    private void disposeOnClick() {
+        //->获取输入框文字内容
+        //        code = etCollect.getText().toString().trim();
+        if (code.equals("") || code == null) {
+            return;
+        }
+        Log.e("SCSMT:code", "" + code);
+        //获取站位\料卷\飞达编号
+        String locationStr = tvLocation.getText().toString().trim();
+        String barcodeStr = tvBarcode.getText().toString().trim();
+        String fecodeStr = tvFecode.getText().toString().trim();
+        //->if(msl_location为空),如果站位为null,或者是新一轮采集
+        if (isAgain || locationStr.equals("") || locationStr == null) {
+            disposeOnClickLocation();
+        }
+        //->else if(msl_barcode为空) 如果站位不为空,料卷号为空
+        else if (barcodeStr.equals("") || barcodeStr == null) {
+            disposeOnClickBarcode();
+        }
+        //->else if(msl_fecode为空),料卷号不为空,飞达编号为空时
+        else if (fecodeStr.equals("") || barcodeStr == null) {
+            disposeOnClickFecode();
+        }
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
+            if (progressDialog != null && progressDialog.isShowing()) {
+                //                loadingView.dismiss();
+                return true;
+            }
+        }
+        return false;
+    }
+
+    @Override
+    public boolean onFragmentBackPressed() {
+        return false;
+    }
+}
+
+
+

+ 3 - 2
app/src/main/java/com/uas/pda_wps/fragment/SMTStandbyFunction.java

@@ -275,12 +275,13 @@ class SMTStandbyFunction extends BaseFragment implements AdapterView.OnItemClick
                         return;
                     }
                 }
-                MyLog.e("aaa", "是:" + selectedName);
+                MyLog.e("aaa", "选择的功能是:" + selectedName);
                 Fragment fragment = null;
                 switch (selectedName) {
                     //上料
                     case GloableParams.LISTNAME_FEEDER_IN2:
-                        fragment = new SCSMTInFragment();
+                        //fragment = new SCSMTInFragment();
+                        fragment = new SMTMaterialPreparationLoading();
                         break;
                     //下料
                     case GloableParams.LISTNAME_FEEDER_DOWN2:

+ 8 - 0
app/src/main/java/com/uas/pda_wps/global/GloableParams.java

@@ -262,6 +262,9 @@ public class GloableParams {
 
     public static String ADDRESS_LOADING_CHECKLOC;      //SMT上料-->校验站位
 
+    public static String ADDRESS_QUA_CHECKLOC;      //校验和品质套料 采集栏--站位校验--实时校验
+
+
 
 
     //连接服务器请求地址
@@ -549,6 +552,9 @@ public class GloableParams {
     //SMT上料-->站位校验
     private static final String ADDRESSTAIL_LOADING_CHECKLOC = "/api/pda/smt/loadingCheckLoc.action";
 
+    //校验和品质套料 采集栏--站位校验--实时校验
+    private static final String ADDRESSTAIL_QUA_CHECKLOC = "/api/pda/smt/quaCheckLoc.action";
+
     /**
      * 材料入库
      */
@@ -1179,6 +1185,8 @@ public class GloableParams {
 
         GloableParams.ADDRESS_LOADING_CHECKLOC = uriHead + GloableParams.ADDRESSTAIL_LOADING_CHECKLOC;
 
+        GloableParams.ADDRESS_QUA_CHECKLOC = uriHead + GloableParams.ADDRESSTAIL_QUA_CHECKLOC;
+
 
     }
 }

+ 16 - 0
app/src/main/java/com/uas/pda_wps/tools/SharedPreUtil.java

@@ -73,6 +73,22 @@ public class SharedPreUtil {
         return anInt;
     }
 
+    public static void saveBoolean(Context context, String key, boolean value) {
+        if (sharedPreUtil == null) {
+            sharedPreUtil = context.getSharedPreferences(SHAREDPREF_URI, 0);
+        }
+        sharedPreUtil.edit().putBoolean(key, value).commit();
+    }
+
+    public static boolean getBoolean(Context context, String key, boolean defaultInt) {
+        if (sharedPreUtil == null) {
+            sharedPreUtil = context.getSharedPreferences(SHAREDPREF_URI, 0);
+        }
+        boolean anInt = sharedPreUtil.getBoolean(key, defaultInt);
+        return anInt;
+    }
+
+
     public static void removeInt(Context context, String key) {
         if (sharedPreUtil == null) {
             sharedPreUtil = context.getSharedPreferences(SHAREDPREF_URI, 0);

+ 3 - 1
app/src/main/java/com/uas/pda_wps/tools/VolleyUtil.java

@@ -1749,7 +1749,9 @@ public class VolleyUtil {
             }
 
             //发送跳转命令
-            if (volleyHandler != null) sendHandler(SUCCESS_SUCCESS, null);
+            if (volleyHandler != null) {
+                sendHandler(SUCCESS_SUCCESS, s);
+            }
             releaseHandler();
             requestType = -1;
         }

+ 6 - 1
app/src/main/java/com/uas/pda_wps/util/Constants.java

@@ -87,6 +87,8 @@ public interface Constants {
         //账套缓存
         String ACCOUNT_NAME_CACHE = "account_name";
         String ACCOUNT_FUNNAME_CACHE = "account_funname";
+        //账号是否 校验 功能, 只有品质的人员才能操作
+        String WHETHER_IT_IS_QUALITY = "whether_it_is_quality";
         //默认仓库编号缓存
         String DEFAULT_WAREHOUSE_CACHE = "default_warehouse";
 
@@ -190,7 +192,7 @@ public interface Constants {
          * SMT作业
          */
         String SMT_LOCATION_CACHE = "smt_location_cache";
-        String SMT_DEVICE_LINE_CACHE = "smt_device_line_cache";
+        String SMT_DEVICE_LINE_CACHE = "smt_device_line_cache";     //线别数据
         String SMT_LINECODE_CACHE = "smt_linecode_cache";
 
         //SMT备料-->线别的缓存
@@ -205,6 +207,9 @@ public interface Constants {
         //登录数据缓存
         String CACHE_LOGIN_DATA_LIST = "cache_login_data_list";
 
+        //备料上料-取消站位校验设置缓存
+        String CANCEL_STATION_VERIFICATION = "cancel_station_verification";
+
         //顺序上料设置缓存
         String CACHE_DEFAULT_ORDER_SWITCH = "cache_default_order_switch";
 

+ 40 - 34
app/src/main/java/com/uas/pda_wps/util/MyLog.java

@@ -145,51 +145,57 @@ public class MyLog {
     private static void log(String tag, String msg, char level) {
         msg = "\r\n" + msg;
         if (MYLOG_SWITCH) {
-            if ('e' == level && ('e' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) { // 输出错误信息
-                //Log.e(tag, msg);
-                if (msg.length() > 4000) {
-                    // 因为Logcat一次最多能输出4000个字符左右,所以我们按4000字符分段
-                    int chunkCount = msg.length() / 4000; // 分割成多少段
-                    for (int i = 0; i <= chunkCount; i++) {
-                        int max = 4000 * (i + 1);
-                        if (max >= msg.length()) {
-                            Log.e(tag, msg.substring(4000 * i));
-                        } else {
-                            Log.e(tag, msg.substring(4000 * i, max));
-                        }
-                    }
-                } else {
-                    Log.d(tag, msg);
-                }
-            } else if ('w' == level && ('w' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) {
-                Log.w(tag, msg);
-            } else if ('d' == level && ('d' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) {
-                Log.d(tag, msg);
-            } else if ('i' == level && ('d' == MYLOG_TYPE || 'v' == MYLOG_TYPE)) {
-                Log.i(tag, msg);
-            } else {
-                Log.v(tag, msg);
-            }
+            setInterceptlength(tag, msg, level);
             if (MYLOG_WRITE_TO_FILE && 'd' == level) {
                 writeLogtoFile(String.valueOf(level), tag, msg);
             }
         }
     }
 
-    public static void logLongMessage(String tag, String message) {
-        if (message.length() > 4000) {
-            // 因为Logcat一次最多能输出4000个字符左右,所以我们按4000字符分段
-            int chunkCount = message.length() / 4000; // 分割成多少段
+    public static void setInterceptlength(String tag, String msg,char level) {
+        if (msg.length() > 3000) {
+            // 因为Logcat一次最多能输出4000个字符左右,所以按3000字符分段比较好
+            int chunkCount = msg.length() / 3000; // 分割成多少段
             for (int i = 0; i <= chunkCount; i++) {
-                int max = 4000 * (i + 1);
-                if (max >= message.length()) {
-                    Log.d(tag, message.substring(4000 * i));
+                int max = 3000 * (i + 1);
+                if (max >= msg.length()) {
+                    if ('e' == level) { // 输出错误信息
+                        Log.e(tag, msg.substring(3000 * i));
+                    } else if ('w' == level) {
+                        Log.w(tag, msg.substring(3000 * i));
+                    } else if ('d' == level) {
+                        Log.d(tag, msg.substring(3000 * i));
+                    } else if ('i' == level) {
+                        Log.i(tag, msg.substring(3000 * i));
+                    } else {
+                        Log.v(tag, msg.substring(3000 * i));
+                    }
                 } else {
-                    Log.d(tag, message.substring(4000 * i, max));
+                    if ('e' == level) {
+                        Log.e(tag, msg.substring(3000 * i, max));
+                    } else if ('w' == level) {
+                        Log.w(tag, msg.substring(3000 * i, max));
+                    } else if ('d' == level) {
+                        Log.d(tag, msg.substring(3000 * i, max));
+                    } else if ('i' == level) {
+                        Log.i(tag, msg.substring(3000 * i, max));
+                    } else {
+                        Log.v(tag, msg.substring(3000 * i, max));
+                    }
                 }
             }
         } else {
-            Log.d(tag, message);
+            if ('e' == level) {
+                Log.e(tag, msg);
+            } else if ('w' == level) {
+                Log.w(tag, msg);
+            } else if ('d' == level) {
+                Log.d(tag, msg);
+            } else if ('i' == level) {
+                Log.i(tag, msg);
+            } else {
+                Log.v(tag, msg);
+            }
         }
     }
 

+ 191 - 0
app/src/main/res/layout/fra_smt_material_preparation_loading.xml

@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="utf-8"?><!--SMTChild上料界面模板-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical">
+    <!--上部:设备信息-->
+    <include
+        layout="@layout/card_device_msg"
+        android:visibility="gone" />
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="10dp"
+        android:padding="10dp">
+
+        <TextView
+            android:id="@+id/smt_feeding_in_linecode_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:gravity="center_vertical"
+            android:textSize="@dimen/textsize_16"
+            tools:text="LINE01" />
+
+        <TextView
+            android:id="@+id/smt_feeding_in_table_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="10dp"
+            android:layout_weight="1"
+            android:gravity="center_vertical"
+            android:textSize="@dimen/textsize_16"
+            tools:text="A面" />
+
+        <TextView
+            android:id="@+id/smt_feeding_in_macode_tv"
+            android:layout_width="0dp"
+            android:layout_height="match_parent"
+            android:layout_marginLeft="10dp"
+            android:layout_weight="2"
+            android:gravity="center_vertical"
+            android:textSize="@dimen/textsize_16"
+            tools:text="BZBD23083333333ddddddd9" />
+    </LinearLayout>
+
+    <View style="@style/view_gray_line" />
+
+    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="10dp">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:orientation="vertical">
+            <!--中部:采集区域-->
+            <include
+                layout="@layout/include_scmake_smtfeederchild_in"
+                android:visibility="gone" />
+
+            <TableLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:stretchColumns="1">
+
+                <TableRow android:background="@color/white">
+
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:paddingLeft="20dp"
+                        android:paddingRight="20dp"
+                        android:text="站位"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+
+                    <com.uas.pda_wps.view.TextViewWithButton
+                        android:id="@+id/smt_feeding_in_location_tv"
+                        style="@style/EditTextLineEnableStyle"
+                        android:layout_width="0dp"
+                        android:layout_marginRight="16dp"
+                        android:layout_weight="1"
+                        android:imeOptions="actionSend"
+                        android:textColor="@color/black" />
+                </TableRow>
+
+                <TableRow
+                    android:layout_marginTop="5dp"
+                    android:background="@color/white">
+
+                    <TextView
+                        style="@style/tl_tv_style"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:paddingLeft="20dp"
+                        android:paddingRight="20dp"
+                        android:text="采集栏"
+                        android:textColor="@color/body_text_1"
+                        android:textSize="16sp" />
+
+                    <com.uas.pda_wps.view.ClearableEditText
+                        android:id="@+id/smt_feeding_in_collect_et"
+                        style="@style/EditTextLineStyle"
+                        android:layout_width="0dp"
+                        android:layout_marginRight="16dp"
+                        android:layout_weight="1"
+                        android:hint="请录入站位编号"
+                        android:imeOptions="actionSend" />
+                </TableRow>
+            </TableLayout>
+
+            <!--下部:提示TEXTView+显示TextView-->
+            <LinearLayout
+                style="@style/CardWhiteSytle_fillheight"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="vertical">
+
+                <TextView
+                    android:id="@+id/tv_collection_info"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="5dp"
+                    android:layout_marginTop="5dp"
+                    android:layout_marginEnd="5dp"
+                    android:layout_marginBottom="5dp"
+                    android:text=""
+                    android:textColor="@color/text_search"
+                    android:textSize="18sp"
+                    android:textStyle="bold"
+                    android:visibility="gone" />
+
+                <RelativeLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="vertical">
+
+                    <!--采集信息-->
+                    <RelativeLayout
+                        android:id="@+id/rl_innernotice"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:background="@color/white">
+                        <!--备料成功/备料完成-->
+                        <TextView
+                            android:id="@+id/tv_innernotice_msgtitle_scmake"
+                            style="@style/CardContentTextStyle"
+                            android:textColor="@color/green" />
+                        <!--1站位-->
+                        <TextView
+                            android:id="@+id/tv_innernotice_1_scmake"
+                            style="@style/CardContentTextStyle"
+                            android:layout_width="wrap_content"
+                            android:layout_below="@id/tv_innernotice_msgtitle_scmake"
+                            tools:text="1站位" />
+                        <!--2数量-->
+                        <TextView
+                            android:id="@+id/tv_innernotice_2_scmake"
+                            style="@style/CardContentTextStyle"
+                            android:layout_below="@id/tv_innernotice_1_scmake"
+                            tools:text="2数量" />
+                        <!--3料卷号-->
+                        <TextView
+                            android:id="@+id/tv_innernotice_3_scmake"
+                            style="@style/CardContentTextStyle"
+                            android:layout_below="@id/tv_innernotice_2_scmake"
+                            tools:text="3料卷号" />
+                        <!--4料号-->
+                        <TextView
+                            android:id="@+id/tv_innernotice_4_scmake"
+                            style="@style/CardContentTextStyle"
+                            android:layout_below="@id/tv_innernotice_3_scmake"
+                            tools:text="4料号" />
+                        <!--5名称规格-->
+                        <TextView
+                            android:id="@+id/tv_innernotice_5_scmake"
+                            style="@style/CardContentTextStyle"
+                            android:layout_below="@id/tv_innernotice_4_scmake"
+                            tools:text="5名称规格" />
+                    </RelativeLayout>
+
+                </RelativeLayout>
+
+            </LinearLayout>
+        </LinearLayout>
+    </ScrollView>
+</LinearLayout>

+ 24 - 0
app/src/main/res/layout/fragment_default_setting.xml

@@ -60,6 +60,30 @@
             android:hint="@string/default_linecode"
             android:textSize="@dimen/textsize_16" />
 
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dp"
+            android:background="@color/white"
+            android:gravity="center_vertical"
+            android:orientation="horizontal"
+            android:paddingTop="12dp"
+            android:paddingBottom="12dp">
+
+            <TextView
+                android:layout_width="0dp"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:text="备料上料 - 取消站位校验"
+                android:textSize="@dimen/textsize_18"
+                android:textStyle="bold" />
+
+            <com.uas.pda_wps.view.SwitchView
+                android:id="@+id/sv_cancel_station_verification"
+                android:layout_width="46dp"
+                android:layout_height="28dp" />
+        </LinearLayout>
+
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"

+ 5 - 5
app/src/main/res/layout/fragment_scmake_smtfeederchild_in.xml

@@ -19,8 +19,8 @@
             android:id="@+id/smt_feeding_in_linecode_tv"
             android:layout_width="0dp"
             android:layout_height="match_parent"
-            android:gravity="center_vertical"
             android:layout_weight="1"
+            android:gravity="center_vertical"
             android:textSize="@dimen/textsize_16"
             tools:text="LINE01" />
 
@@ -28,9 +28,9 @@
             android:id="@+id/smt_feeding_in_table_tv"
             android:layout_width="0dp"
             android:layout_height="match_parent"
-            android:gravity="center_vertical"
             android:layout_marginLeft="10dp"
             android:layout_weight="1"
+            android:gravity="center_vertical"
             android:textSize="@dimen/textsize_16"
             tools:text="A面" />
 
@@ -38,9 +38,9 @@
             android:id="@+id/smt_feeding_in_macode_tv"
             android:layout_width="0dp"
             android:layout_height="match_parent"
-            android:gravity="center_vertical"
             android:layout_marginLeft="10dp"
             android:layout_weight="2"
+            android:gravity="center_vertical"
             android:textSize="@dimen/textsize_16"
             tools:text="BZBD23083333333ddddddd9" />
     </LinearLayout>
@@ -121,10 +121,10 @@
 
                 <TextView
                     style="@style/CardTitleStyle"
-                    android:layout_marginBottom="5dp"
                     android:layout_marginTop="5dp"
+                    android:layout_marginBottom="5dp"
                     android:text="@string/text_search_collect_fragment_scmake"
-                    android:visibility="gone"/>
+                    android:visibility="gone" />
 
                 <include layout="@layout/innermsg_collect_scmake" />
             </LinearLayout>

+ 2 - 2
build.gradle

@@ -50,8 +50,8 @@ ext {
             targetSdkVersion : 28,
             compileSdkVersion: 28,
             buildToolsVersion: "28.0.3",
-            versionCode      : 17,
-            versionName      : "v1.1.6"
+            versionCode      : 21,
+            versionName      : "v1.2.0"
     ]
 
     depsVersion = [