diff --git a/app/build.gradle b/app/build.gradle index 5911823..b1eb171 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,7 +10,7 @@ android {compileSdkVersion 30 minSdkVersion 18 //noinspection ExpiredTargetSdkVersion targetSdkVersion 28 - versionCode 36 + versionCode 38 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/main/java/com/icssoft/icspda/activity/MOStockINActivity.java b/app/src/main/java/com/icssoft/icspda/activity/MOStockINActivity.java index 5ef15e9..3e4be71 100644 --- a/app/src/main/java/com/icssoft/icspda/activity/MOStockINActivity.java +++ b/app/src/main/java/com/icssoft/icspda/activity/MOStockINActivity.java @@ -252,17 +252,16 @@ public class MOStockINActivity extends AppCompatActivity { @Override public void onClick(View v) { try { - if (et_quantity.getText() == null || et_quantity.getText().toString().trim().equals("")) { + if (et_quantity.getText() == null || et_quantity.getText().toString().trim().equals("") || new BigDecimal(et_quantity.getText().toString().trim()).equals(BigDecimal.ZERO)) { HelpUtil.SetMsg(tvMsg, Color.RED, "请输入出库数量"); return; } - new Thread(new Runnable() { - @Override - public void run() { - confirmClick(); - } - }).start(); - + if (new BigDecimal(et_quantity.getText().toString().trim()).equals(BigDecimal.ONE)) { + HelpUtil.SetMsg(tvMsg, Color.RED, "数量不能为1"); + et_quantity.requestFocus(); + return; + } + confirmClick(); } catch (NumberFormatException ex) { HelpUtil.SetMsg(tvMsg, Color.RED, ex.getMessage());