|
|
@@ -491,35 +491,6 @@ public class SendOutGoods extends Activity {
|
|
|
|
|
|
else {
|
|
|
|
|
|
- if (barcodeList != null && barcodeList.size() > 0) {
|
|
|
- boolean b = removeBanma(barcode, barcodeList);
|
|
|
- if (b) {
|
|
|
- ProcessDialogUtils.closeProgressDilog();
|
|
|
- barcodeEdt.setEnabled(true);
|
|
|
- barcodeEdt.setText("");
|
|
|
- barcodeEdt.setFocusable(true);
|
|
|
- barcodeEdt.setFocusableInTouchMode(true);
|
|
|
- barcodeEdt.requestFocus();
|
|
|
- barcodeEdt.findFocus();
|
|
|
- barcodeEdt.setFilters(new InputFilter[] { new InputFilter() {
|
|
|
-
|
|
|
- @Override
|
|
|
- public CharSequence filter(CharSequence source, int start, int end, Spanned dest,
|
|
|
- int dstart, int dend) {
|
|
|
-
|
|
|
- return null;
|
|
|
- }
|
|
|
- } });
|
|
|
- CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
|
|
|
-
|
|
|
- CommonUtil.setDefault(Notification.DEFAULT_VIBRATE, getApplicationContext());
|
|
|
-
|
|
|
- CustomToast.showToast(getApplicationContext(), "条码" + barcode + "重复", 2000);
|
|
|
-
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
thread = new HandlerThread("BarCodeThread", 5);
|
|
|
thread.start();
|
|
|
mHandler = new Handler(thread.getLooper());
|
|
|
@@ -589,35 +560,6 @@ public class SendOutGoods extends Activity {
|
|
|
|
|
|
else {
|
|
|
|
|
|
- if (barcodeList != null && barcodeList.size() > 0) {
|
|
|
- boolean b = removeBanma(barcode, barcodeList);
|
|
|
- if (b) {
|
|
|
- ProcessDialogUtils.closeProgressDilog();
|
|
|
- barcodeEdt.setEnabled(true);
|
|
|
- barcodeEdt.setText("");
|
|
|
- barcodeEdt.setFocusable(true);
|
|
|
- barcodeEdt.setFocusableInTouchMode(true);
|
|
|
- barcodeEdt.requestFocus();
|
|
|
- barcodeEdt.findFocus();
|
|
|
- barcodeEdt.setFilters(new InputFilter[] { new InputFilter() {
|
|
|
-
|
|
|
- @Override
|
|
|
- public CharSequence filter(CharSequence source, int start, int end, Spanned dest,
|
|
|
- int dstart, int dend) {
|
|
|
-
|
|
|
- return null;
|
|
|
- }
|
|
|
- } });
|
|
|
- CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
|
|
|
-
|
|
|
- CommonUtil.setDefault(Notification.DEFAULT_VIBRATE, getApplicationContext());
|
|
|
-
|
|
|
- CustomToast.showToast(getApplicationContext(), "条码" + barcode + "重复", 2000);
|
|
|
-
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
thread = new HandlerThread("BarCodeThread", 5);
|
|
|
thread.start();
|
|
|
mHandler = new Handler(thread.getLooper());
|
|
|
@@ -651,7 +593,7 @@ public class SendOutGoods extends Activity {
|
|
|
|
|
|
}
|
|
|
|
|
|
- public boolean removeBanma(String code, List<BarcodeInfo> data) {
|
|
|
+ public boolean removeFinishedBarCode(String code, List<BarcodeInfo> data) {
|
|
|
boolean rem = false;
|
|
|
for (int i = 0; i < data.size(); i++) {
|
|
|
Object S = data.get(i);
|
|
|
@@ -660,7 +602,7 @@ public class SendOutGoods extends Activity {
|
|
|
Method m = null;
|
|
|
Method mouldId = null;
|
|
|
try {
|
|
|
- m = clss.getMethod("getBanMa");
|
|
|
+ m = clss.getMethod("getFinishedBarCode");
|
|
|
} catch (NoSuchMethodException e) {
|
|
|
// TODO Auto-generated catch block
|
|
|
e.printStackTrace();
|
|
|
@@ -1087,7 +1029,7 @@ public class SendOutGoods extends Activity {
|
|
|
}
|
|
|
if ((Double.parseDouble(Count)) <= storageConout-mcount) {
|
|
|
//CommonUtil.setDefault(Notification.DEFAULT_VIBRATE, getApplicationContext());
|
|
|
- CommonUtil.showBarCodeAlertDialog(status, "库存不足", SendOutGoods.this, barcodeEdt, null,
|
|
|
+ CommonUtil.showBarCodeAlertDialog(0, "库存不足", SendOutGoods.this, barcodeEdt, null,
|
|
|
null);
|
|
|
return;
|
|
|
} else {
|
|
|
@@ -1099,6 +1041,17 @@ public class SendOutGoods extends Activity {
|
|
|
String LogoCode = object2.optString("MATERIALCODE");
|
|
|
String LogoName = object2.optString("MATERIALREMARK");
|
|
|
int orderNo = object2.optInt("COUNT");
|
|
|
+ boolean isHas =removeFinishedBarCode(object2.optString("FINISHEDLOADBATCHNO"), barcodeList);
|
|
|
+ if(isHas)
|
|
|
+ {
|
|
|
+ CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
|
|
|
+
|
|
|
+ CommonUtil.setDefault(Notification.DEFAULT_VIBRATE, getApplicationContext());
|
|
|
+
|
|
|
+ CustomToast.showToast(getApplicationContext(), "条码" + barcode + "重复", 2000);
|
|
|
+
|
|
|
+ return;
|
|
|
+ }
|
|
|
BarcodeInfo barcodeInfo = new BarcodeInfo();
|
|
|
barcodeInfo.setBanMa(barcode=="null"?"":barcode);
|
|
|
barcodeInfo.setGoodsCode(goodsCode);
|