|
|
@@ -25,6 +25,8 @@ import android.os.Bundle;
|
|
|
import android.os.Handler;
|
|
|
import android.os.HandlerThread;
|
|
|
import android.os.Message;
|
|
|
+import android.text.Editable;
|
|
|
+import android.text.TextWatcher;
|
|
|
import android.view.View;
|
|
|
import android.widget.Button;
|
|
|
import android.widget.EditText;
|
|
|
@@ -94,7 +96,8 @@ public class DeliveryNoteInquiryActivity extends Activity {
|
|
|
/** 删除按钮 */
|
|
|
private Button Delete_Button;
|
|
|
private List<DeliveryNoteInquiryItemModel> detailList = new ArrayList<DeliveryNoteInquiryItemModel>();
|
|
|
-
|
|
|
+ private Handler barcodeUpperH = new Handler();
|
|
|
+ private String barcodeUpper;
|
|
|
@Override
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
super.onCreate(savedInstanceState);
|
|
|
@@ -347,6 +350,26 @@ public class DeliveryNoteInquiryActivity extends Activity {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ //生产工号大写转小写
|
|
|
+ edt_barcode.addTextChangedListener(new TextWatcher() {
|
|
|
+ @Override
|
|
|
+ public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void afterTextChanged(Editable s) {
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void onTextChanged(CharSequence s, int start, int before, int count) {
|
|
|
+ barcodeUpper = edt_barcode.getText().toString();
|
|
|
+ // 判断输入的文字是否是小写
|
|
|
+ for (int i = 0; i < barcodeUpper.length(); i++) {
|
|
|
+ if (barcodeUpper.charAt(i) - 0 >= 97 && barcodeUpper.charAt(i) - 0 <= 122) {
|
|
|
+ barcodeUpperH.postDelayed(BarcodeUpperCase, 300);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
// 记账日期点击事件
|
|
|
PostingDateWorker.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
@@ -390,6 +413,15 @@ public class DeliveryNoteInquiryActivity extends Activity {
|
|
|
List<DeliveryNoteInquiryItemModel> Wherelist = steamfilter();
|
|
|
// 总单id数据集合
|
|
|
List<String> ementy = new ArrayList<>();
|
|
|
+ if(Wherelist.size()==0) {
|
|
|
+ Message m = new Message();
|
|
|
+ m.what = 0;
|
|
|
+ Bundle b = new Bundle();
|
|
|
+ b.putString("message", "未选择数据");
|
|
|
+ m.setData(b);
|
|
|
+ exceptionHandler.sendMessage(m);
|
|
|
+ return;
|
|
|
+ }
|
|
|
// 遍历数据
|
|
|
for (DeliveryNoteInquiryItemModel item : Wherelist) {
|
|
|
ementy.add(item.getSenddoutgoodsLogID());
|
|
|
@@ -448,6 +480,15 @@ public class DeliveryNoteInquiryActivity extends Activity {
|
|
|
List<DeliveryNoteInquiryItemModel> Wherelist = steamfilter();
|
|
|
// 总单id数据集合
|
|
|
List<String> ementy = new ArrayList<>();
|
|
|
+ if(Wherelist.size()==0) {
|
|
|
+ Message m = new Message();
|
|
|
+ m.what = 0;
|
|
|
+ Bundle b = new Bundle();
|
|
|
+ b.putString("message", "未选择数据");
|
|
|
+ m.setData(b);
|
|
|
+ exceptionHandler.sendMessage(m);
|
|
|
+ return;
|
|
|
+ }
|
|
|
// 遍历数据
|
|
|
for (DeliveryNoteInquiryItemModel item : Wherelist) {
|
|
|
ementy.add(item.getSenddoutgoodsLogID());
|
|
|
@@ -505,6 +546,15 @@ public class DeliveryNoteInquiryActivity extends Activity {
|
|
|
List<DeliveryNoteInquiryItemModel> Wherelist = steamfilter();
|
|
|
// 总单id数据集合
|
|
|
List<String> ementy = new ArrayList<>();
|
|
|
+ if(Wherelist.size()==0) {
|
|
|
+ Message m = new Message();
|
|
|
+ m.what = 0;
|
|
|
+ Bundle b = new Bundle();
|
|
|
+ b.putString("message", "未选择数据");
|
|
|
+ m.setData(b);
|
|
|
+ exceptionHandler.sendMessage(m);
|
|
|
+ return;
|
|
|
+ }
|
|
|
// 遍历数据
|
|
|
for (DeliveryNoteInquiryItemModel item : Wherelist) {
|
|
|
ementy.add(item.getSenddoutgoodsLogID());
|
|
|
@@ -788,4 +838,16 @@ public class DeliveryNoteInquiryActivity extends Activity {
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+ /**大写转小写*/
|
|
|
+ Runnable BarcodeUpperCase = new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ // 小写转大写
|
|
|
+ edt_barcode.setText(barcodeUpper.toUpperCase());
|
|
|
+ // 设置EditText光标位置
|
|
|
+ edt_barcode.setSelection(barcodeUpper.length());
|
|
|
+ }
|
|
|
+
|
|
|
+ };
|
|
|
}
|