|
|
@ -40,6 +40,7 @@ public class WWKGActivity extends AppCompatActivity { |
|
|
|
private RadioButton rbOut; |
|
|
|
private Button btnok; |
|
|
|
private Button btndel; |
|
|
|
private Button btnclr; |
|
|
|
private SmartTable smartTable; |
|
|
|
String ErrorMsg =""; |
|
|
|
private List<WWKGData> data; |
|
|
@ -71,6 +72,7 @@ public class WWKGActivity extends AppCompatActivity { |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
HelpUtil.SetMsg(tvMsg, Color.BLUE, ErrorMsg); |
|
|
|
poNo.setFocusable(false); |
|
|
|
break; |
|
|
|
case 98: |
|
|
|
HelpUtil.SetMsg(tvMsg, Color.RED, ErrorMsg); |
|
|
@ -114,6 +116,7 @@ public class WWKGActivity extends AppCompatActivity { |
|
|
|
rbOut = findViewById(R.id.wwkg_rbOut); |
|
|
|
btnok = findViewById(R.id.btn_ok); |
|
|
|
btndel = findViewById(R.id.btn_del); |
|
|
|
btnclr = findViewById(R.id.btn_clear); |
|
|
|
|
|
|
|
|
|
|
|
poNo.setOnEditorActionListener(new TextView.OnEditorActionListener() { |
|
|
@ -210,6 +213,24 @@ public class WWKGActivity extends AppCompatActivity { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
btnclr.setOnClickListener(new View.OnClickListener() { |
|
|
|
@Override |
|
|
|
public void onClick(View v) { |
|
|
|
try{ |
|
|
|
clear(); |
|
|
|
poNo.postDelayed(new Runnable() { |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
poNo.requestFocus(); |
|
|
|
} |
|
|
|
},1000); |
|
|
|
HelpUtil.SetMsg(tvMsg, Color.BLUE, "数据清除成功,请重新扫描单据"); |
|
|
|
}catch (Exception ex){ |
|
|
|
ErrorMsg = ex.getMessage(); |
|
|
|
handler.sendEmptyMessage(99); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -432,6 +453,7 @@ public class WWKGActivity extends AppCompatActivity { |
|
|
|
poNo.setText(""); |
|
|
|
poNo.requestFocus(); |
|
|
|
datalist.clear(); |
|
|
|
poNo.setFocusable(true); |
|
|
|
smartTable.setData(datalist); |
|
|
|
} |
|
|
|
|
|
|
|