|
|
@@ -12,6 +12,7 @@ import android.view.inputmethod.EditorInfo;
|
|
|
import android.view.inputmethod.InputMethodManager;
|
|
|
import android.widget.Button;
|
|
|
import android.widget.CheckBox;
|
|
|
+import android.widget.CompoundButton;
|
|
|
import android.widget.EditText;
|
|
|
import android.widget.RelativeLayout;
|
|
|
import android.widget.TextView;
|
|
|
@@ -33,6 +34,7 @@ import com.uas.huiyan.tools.VolleyUtil;
|
|
|
import com.uas.huiyan.util.CommonUtil;
|
|
|
import com.uas.huiyan.util.Constants;
|
|
|
import com.uas.huiyan.util.JsonUtils;
|
|
|
+import com.uas.huiyan.util.MyLog;
|
|
|
import com.uas.huiyan.view.ClearableEditText;
|
|
|
import com.uas.huiyan.view.TextViewWithButton;
|
|
|
|
|
|
@@ -70,6 +72,9 @@ public class SCSMTJointFragment extends BaseFragment implements View.OnClickList
|
|
|
private StringRequest mStringRequest;
|
|
|
private CheckBox cb_xiaoyan;
|
|
|
|
|
|
+ private boolean isScanLocation = false; //判断是否已扫了站位
|
|
|
+ private boolean isLocationState = false; //记录站位的状态
|
|
|
+
|
|
|
@Override
|
|
|
protected int getLayout() {
|
|
|
return R.layout.fragment_scmake_smtfeederchild_jointchange;
|
|
|
@@ -128,6 +133,7 @@ public class SCSMTJointFragment extends BaseFragment implements View.OnClickList
|
|
|
// VolleyUtil.getVolleyUtil().requestJsonObject(getActivity(), GloableParams.ADDRESS_SMTDETAIL_APPLY,VolleyUtil.METHOD_POST,
|
|
|
// requestType,paramJson);
|
|
|
|
|
|
+ mLocationTextView.setOnClearIconVisible(false);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -167,6 +173,21 @@ public class SCSMTJointFragment extends BaseFragment implements View.OnClickList
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ cb_xiaoyan.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
+ @Override
|
|
|
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
|
|
+ MyLog.e("aaa","勾选框的值:" + isChecked + ",是否输入了站位:" + isScanLocation);
|
|
|
+ if (isScanLocation) {
|
|
|
+ cb_xiaoyan.setChecked(isLocationState);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private void setCbState(boolean isState) {
|
|
|
+ isScanLocation = isState;
|
|
|
+ isLocationState = cb_xiaoyan.isChecked();
|
|
|
}
|
|
|
|
|
|
private void confirmEvent(String collect) {
|
|
|
@@ -237,6 +258,7 @@ public class SCSMTJointFragment extends BaseFragment implements View.OnClickList
|
|
|
if (!cb_xiaoyan.isChecked()) {
|
|
|
joinForcast(collect);
|
|
|
}
|
|
|
+ setCbState(true);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
@@ -315,6 +337,7 @@ public class SCSMTJointFragment extends BaseFragment implements View.OnClickList
|
|
|
tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
|
|
|
tvMsgNotice.setText(errorToast);
|
|
|
mLocationTextView.setText(null);
|
|
|
+ setCbState(false);
|
|
|
}
|
|
|
}) {
|
|
|
@Override
|
|
|
@@ -357,6 +380,7 @@ public class SCSMTJointFragment extends BaseFragment implements View.OnClickList
|
|
|
mCollectEditText.setText("");
|
|
|
tvMsgNotice.setTextColor(getResources().getColor(R.color.red));
|
|
|
tvMsgNotice.setText(errorToast);
|
|
|
+ setCbState(false);
|
|
|
}
|
|
|
}) {
|
|
|
@Override
|
|
|
@@ -745,6 +769,7 @@ public class SCSMTJointFragment extends BaseFragment implements View.OnClickList
|
|
|
case VolleyUtil.FRAGMENT_SCMAKE_SMTJOINT_BARREMAIN:
|
|
|
tmpJson = (JSONObject) msg.obj;
|
|
|
disposeBarcodeSuccess(tmpJson);
|
|
|
+ setCbState(false);
|
|
|
break;
|
|
|
//接料成功
|
|
|
case VolleyUtil.FRAGMENT_SCMAKE_SMTJOINT_JOINT:
|