Browse Source

产成品入库卡控数量为1

master
姜鹏 12 months ago
parent
commit
ed6bbc98a5
  1. 2
      app/build.gradle
  2. 15
      app/src/main/java/com/icssoft/icspda/activity/MOStockINActivity.java

2
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"
}

15
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());

Loading…
Cancel
Save