|
|
@@ -8,6 +8,7 @@ import android.content.Intent;
|
|
|
import android.content.IntentFilter;
|
|
|
import android.os.Bundle;
|
|
|
import android.os.Handler;
|
|
|
+import android.os.Looper;
|
|
|
import android.view.View;
|
|
|
import android.widget.Button;
|
|
|
import android.widget.ImageView;
|
|
|
@@ -54,6 +55,7 @@ public class StockInNewActivity extends BaseActivity {
|
|
|
private String from;
|
|
|
private String erpInstockCode;
|
|
|
private boolean isSubmit = true;
|
|
|
+ private boolean isResumed = false;
|
|
|
|
|
|
@Override
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
@@ -332,15 +334,35 @@ public class StockInNewActivity extends BaseActivity {
|
|
|
@Subscribe(threadMode = ThreadMode.MAIN, sticky = true, priority = 1)
|
|
|
public void onReceiveMsg(EventMessage message){
|
|
|
if(message.getType() == 2){
|
|
|
- if(StringUtils.isEmpty(erpInstockCode)){
|
|
|
- erpInstockCode = message.getMessage();
|
|
|
- }
|
|
|
- if(!StringUtils.isEmpty(erpInstockCode)){
|
|
|
- loadErpTask();
|
|
|
- }
|
|
|
+ new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
|
|
+ if(StringUtils.isEmpty(erpInstockCode)){
|
|
|
+ erpInstockCode = message.getMessage();
|
|
|
+ }
|
|
|
+ if(!StringUtils.isEmpty(erpInstockCode)){
|
|
|
+ loadErpTask();
|
|
|
+ }
|
|
|
+ }, 1000);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ protected void onResume() {
|
|
|
+ super.onResume();
|
|
|
+ isResumed = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void onPause() {
|
|
|
+ super.onPause();
|
|
|
+ isResumed = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void onDestroy() {
|
|
|
+ super.onDestroy();
|
|
|
+ EventBus.getDefault().unregister(this);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
protected String getCommonTopTitle() {
|
|
|
return "入库单信息";
|