|
|
@@ -4,6 +4,7 @@ import android.text.TextUtils;
|
|
|
import android.view.KeyEvent;
|
|
|
import android.view.View;
|
|
|
import android.widget.Button;
|
|
|
+import android.widget.TextView;
|
|
|
|
|
|
import com.android.volley.Request;
|
|
|
import com.uas.lcp_newelectronic.R;
|
|
|
@@ -18,6 +19,7 @@ import com.uas.lcp_newelectronic.view.ClearableEditText;
|
|
|
public class BomCheckFragment extends BaseFragment {
|
|
|
private ClearableEditText mBomIdEditText, mBarcodeEditText;
|
|
|
private Button mConfirmButton;
|
|
|
+ private TextView tv_tishi;
|
|
|
|
|
|
@Override
|
|
|
protected int getLayout() {
|
|
|
@@ -26,10 +28,11 @@ public class BomCheckFragment extends BaseFragment {
|
|
|
|
|
|
@Override
|
|
|
protected void initViews() {
|
|
|
- setTitle("BOM校验");
|
|
|
+ setTitle("条码料号校验");
|
|
|
mBomIdEditText = root.findViewById(R.id.bom_check_id_cet);
|
|
|
mBarcodeEditText = root.findViewById(R.id.bom_check_barcode_cet);
|
|
|
mConfirmButton = root.findViewById(R.id.bom_check_confirm_btn);
|
|
|
+ tv_tishi = root.findViewById(R.id.tv_tishi);
|
|
|
|
|
|
mBomIdEditText.requestFocus();
|
|
|
}
|
|
|
@@ -101,17 +104,22 @@ public class BomCheckFragment extends BaseFragment {
|
|
|
@Override
|
|
|
public void onSuccess(int flag, Object o) throws Exception {
|
|
|
progressDialog.dismiss();
|
|
|
- CommonUtil.toastNoRepeat(mActivity, "BOM校验成功");
|
|
|
+ tv_tishi.setTextColor(getResources().getColor(R.color.green));
|
|
|
+ tv_tishi.setText("条码料号校验成功");
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "条码料号校验成功");
|
|
|
mBarcodeEditText.setText("");
|
|
|
- mBarcodeEditText.requestFocus();
|
|
|
+ mBomIdEditText.setText("");
|
|
|
+ mBomIdEditText.requestFocus();
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void onFail(int flag, String failStr) throws Exception {
|
|
|
progressDialog.dismiss();
|
|
|
mBarcodeEditText.setText("");
|
|
|
- mBarcodeEditText.requestFocus();
|
|
|
-
|
|
|
+ mBomIdEditText.setText("");
|
|
|
+ mBomIdEditText.requestFocus();
|
|
|
+ tv_tishi.setTextColor(getResources().getColor(R.color.red));
|
|
|
+ tv_tishi.setText(failStr);
|
|
|
CommonUtil.makeNotice();
|
|
|
CommonUtil.toastNoRepeat(mActivity, failStr);
|
|
|
}
|