dongke 1 ano atrás
pai
commit
aefdaa3afc
26 arquivos alterados com 160 adições e 269 exclusões
  1. 1 1
      AndroidManifest.xml
  2. 1 1
      bin/AndroidManifest.xml
  3. BIN
      bin/classes.dex
  4. BIN
      bin/dexedLibs/android-support-v4-93ed2114e4c51dbbc658911a9d3dcfac.jar
  5. BIN
      bin/dexedLibs/android-support-v4-fbb2046f26873adba4c6ad393a1ec005.jar
  6. BIN
      bin/dexedLibs/commons-codec-1.5-2d0f975d65afbaf72dc85e14c5c9a04e.jar
  7. BIN
      bin/dexedLibs/commons-codec-1.5-d2ed4bf3bc491ad4e322ba327d271401.jar
  8. BIN
      bin/dexedLibs/core-3.3.3-53b860abe81549e3d2f5416de5c5aa85.jar
  9. BIN
      bin/dexedLibs/core-3.3.3-7ee8ff9ec5e6a9a1a7707aea87e451a3.jar
  10. BIN
      bin/dexedLibs/gson-1.7.1-b6f94906364f5525199f51f3e36c9c1e.jar
  11. BIN
      bin/dexedLibs/gson-1.7.1-e0b2b5809d1a0922351903092d3e8a1e.jar
  12. BIN
      bin/dexedLibs/httpmime-4.0-5e89cab800337e151b56386696771f9d.jar
  13. BIN
      bin/dexedLibs/httpmime-4.0-e0f1fdee9a28a230e13fbaf990f067e0.jar
  14. BIN
      bin/dexedLibs/okhttp-3.5.0-130ea71b4e409bd0f37103a8d7f95e4b.jar
  15. BIN
      bin/dexedLibs/okhttp-3.5.0-b7e52e4c410f12907c48dd650d2a0577.jar
  16. BIN
      bin/dexedLibs/okio-1.11.0-4010f5fadc971b6e28dbe14eee7ded2f.jar
  17. BIN
      bin/dexedLibs/okio-1.11.0-a02d968eee3ef08240b1d1e0ce20197a.jar
  18. BIN
      bin/iBOSSPRDPDASS.apk
  19. 0 3
      bin/jarlist.cache
  20. BIN
      bin/resources.ap_
  21. 10 7
      src/com/jiaju/activity/CheckCollectModifyActivity.java
  22. 26 8
      src/com/jiaju/activity/ExternalPackingBarcodePrintActivity.java
  23. 47 202
      src/com/jiaju/activity/FinishedProductHandOverActivity.java
  24. 38 30
      src/com/jiaju/activity/PieceActivity.java
  25. 25 5
      src/com/jiaju/activity/ProductPathActivity.java
  26. 12 12
      src/com/jiaju/utils/CommonUtil.java

+ 1 - 1
AndroidManifest.xml

@@ -2,7 +2,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.jiaju.activity"
     android:versionCode="1"
-    android:versionName="1.2.24.0411" >
+    android:versionName="1.2.24.0506" >
 <!-- 23  14-->
     <uses-sdk
         android:minSdkVersion="14"

+ 1 - 1
bin/AndroidManifest.xml

@@ -2,7 +2,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.jiaju.activity"
     android:versionCode="1"
-    android:versionName="1.2.24.0411" >
+    android:versionName="1.2.24.0506" >
 <!-- 23  14-->
     <uses-sdk
         android:minSdkVersion="14"

BIN
bin/classes.dex


BIN
bin/dexedLibs/android-support-v4-93ed2114e4c51dbbc658911a9d3dcfac.jar


BIN
bin/dexedLibs/android-support-v4-fbb2046f26873adba4c6ad393a1ec005.jar


BIN
bin/dexedLibs/commons-codec-1.5-2d0f975d65afbaf72dc85e14c5c9a04e.jar


BIN
bin/dexedLibs/commons-codec-1.5-d2ed4bf3bc491ad4e322ba327d271401.jar


BIN
bin/dexedLibs/core-3.3.3-53b860abe81549e3d2f5416de5c5aa85.jar


BIN
bin/dexedLibs/core-3.3.3-7ee8ff9ec5e6a9a1a7707aea87e451a3.jar


BIN
bin/dexedLibs/gson-1.7.1-b6f94906364f5525199f51f3e36c9c1e.jar


BIN
bin/dexedLibs/gson-1.7.1-e0b2b5809d1a0922351903092d3e8a1e.jar


BIN
bin/dexedLibs/httpmime-4.0-5e89cab800337e151b56386696771f9d.jar


BIN
bin/dexedLibs/httpmime-4.0-e0f1fdee9a28a230e13fbaf990f067e0.jar


BIN
bin/dexedLibs/okhttp-3.5.0-130ea71b4e409bd0f37103a8d7f95e4b.jar


BIN
bin/dexedLibs/okhttp-3.5.0-b7e52e4c410f12907c48dd650d2a0577.jar


BIN
bin/dexedLibs/okio-1.11.0-4010f5fadc971b6e28dbe14eee7ded2f.jar


BIN
bin/dexedLibs/okio-1.11.0-a02d968eee3ef08240b1d1e0ce20197a.jar


BIN
bin/iBOSSPRDPDASS.apk


+ 0 - 3
bin/jarlist.cache

@@ -1,3 +0,0 @@
-# cache for current jar dependency. DO NOT EDIT.
-# format is <lastModified> <length> <SHA-1> <path>
-# Encoding is UTF-8

BIN
bin/resources.ap_


+ 10 - 7
src/com/jiaju/activity/CheckCollectModifyActivity.java

@@ -278,7 +278,9 @@ public class CheckCollectModifyActivity extends Activity {
 						// 产品等级选择为冷补后,必须选择[冷补类别]
 	    // llay_cold_repair_category.setVisibility(View.VISIBLE);
 	}
-
+	if (proId == 157 ) { //修模进
+		 check_leak.setEnabled(true);// 漏气
+	}
 	if (proId == 123 || proId == 157) { // 修模 养水 进
 	    classifySpin.setEnabled(false);
 	}
@@ -1276,13 +1278,14 @@ public class CheckCollectModifyActivity extends Activity {
 			    }
 			}
 
-			if (classifyInfo.getGoodsLevelTypeID() != 16) { // 产品等级 是冷补的时候 不校验
-			    if ((!isModify) && (!deleteFlag) && (GoodsLevelTypeID == originalGoodsLevelTypeId)) {
-				CustomToast.showToast(getApplicationContext(), "数据没有修改不能保存", 2000);
-				return;
-			    }
+			if (proId != 157) { //不是修磨才进来判断,修磨不判断了
+				if (classifyInfo.getGoodsLevelTypeID() != 16) { // 产品等级 是冷补的时候 不校验
+				    if ((!isModify) && (!deleteFlag) && (GoodsLevelTypeID == originalGoodsLevelTypeId)) {
+					CustomToast.showToast(getApplicationContext(), "数据没有修改不能保存", 2000);
+					return;
+				    }
+				}
 			}
-
 		    }
 
 		    reworkProcedureInfo = (ReworkProcedureInfo) gotoSpin.getSelectedItem();

+ 26 - 8
src/com/jiaju/activity/ExternalPackingBarcodePrintActivity.java

@@ -37,7 +37,7 @@ import android.widget.ImageButton;
 import android.widget.ListView;
 import android.widget.Spinner;
 import android.widget.TextView;
-
+//条码补打
 public class ExternalPackingBarcodePrintActivity extends Activity {
 	private TextView titleTv;
 	private SharedPreferences preferences;
@@ -88,7 +88,7 @@ public class ExternalPackingBarcodePrintActivity extends Activity {
 		View head=View.inflate(this,R.layout.external_packing_barcode_print_header_view,null);
 		printerSpinner = (Spinner) head.findViewById(R.id.printerSpinner);
 		barcodeEdt = (EditText) head.findViewById(R.id.barcodeEdt);
-		CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//		CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 		barcodeEdt.requestFocus();
 		printNumEdt = (EditText)head.findViewById(R.id.printNumEdt);
 		printNumEdt.setInputType(InputType.TYPE_CLASS_NUMBER);
@@ -209,7 +209,7 @@ public class ExternalPackingBarcodePrintActivity extends Activity {
 										return null;
 									}
 								} });
-						CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//						CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 						CustomToast.showToast(getApplicationContext(),
 								"条码不能为空", 2000);
 						return;
@@ -221,7 +221,16 @@ public class ExternalPackingBarcodePrintActivity extends Activity {
 						}
 						barcodeInfoListAdapter.notifyDataSetChanged();
 					}
-
+					if(barcode.length() >= 73)
+					{
+						String[] parts = barcode.split("-", 2); // 第二个参数限制分割后的数组长度,这里为2  
+						  
+				        if (parts.length == 2) {  
+				            //System.out.println("第一部分: " + parts[0]);  
+				            //System.out.println("第二部分: " + parts[1]);  
+				            barcode = parts[1];
+				        }  
+					} 
 					ProcessDialogUtils
 							.showProcessDialog(ExternalPackingBarcodePrintActivity.this);
 					thread = new HandlerThread("barcodeThread", 5);
@@ -325,7 +334,7 @@ public class ExternalPackingBarcodePrintActivity extends Activity {
 												return null;
 											}
 										} });
-								CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//								CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 								CustomToast.showToast(getApplicationContext(),
 										"条码不能为空", 2000);
 								return true;
@@ -338,7 +347,16 @@ public class ExternalPackingBarcodePrintActivity extends Activity {
 								}
 								barcodeInfoListAdapter.notifyDataSetChanged();
 							}
-
+							if(barcode.length() >= 73)
+							{
+								String[] parts = barcode.split("-", 2); // 第二个参数限制分割后的数组长度,这里为2  
+								  
+						        if (parts.length == 2) {  
+						            //System.out.println("第一部分: " + parts[0]);  
+						            //System.out.println("第二部分: " + parts[1]);  
+						            barcode = parts[1];
+						        }  
+							} 
 							ProcessDialogUtils
 									.showProcessDialog(ExternalPackingBarcodePrintActivity.this);
 							thread = new HandlerThread("barcodeThread", 5);
@@ -601,7 +619,7 @@ public class ExternalPackingBarcodePrintActivity extends Activity {
 											return null;
 										}
 									} });
-							CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//							CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 							InputMethodManager im = (InputMethodManager) barcodeEdt
 									.getContext().getSystemService(
 											Context.INPUT_METHOD_SERVICE);
@@ -645,7 +663,7 @@ public class ExternalPackingBarcodePrintActivity extends Activity {
 						return null;
 					}
 				} });
-				CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//				CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 				CommonUtil.setDefault(Notification.DEFAULT_VIBRATE,
 						getApplicationContext());
 				CustomToast.showToast(getApplicationContext(), message, 2000);

+ 47 - 202
src/com/jiaju/activity/FinishedProductHandOverActivity.java

@@ -119,8 +119,7 @@ public class FinishedProductHandOverActivity extends Activity {
 		tvTitle.setText(title);
 		orderEdt.setFocusable(true);
 		orderEdt.requestFocus();
-		orderEdt.findFocus();
-		CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+		orderEdt.findFocus(); 
 		allListeners();
 		thread = new HandlerThread("trademarkThread", 5);
 		thread.start();
@@ -362,7 +361,9 @@ public class FinishedProductHandOverActivity extends Activity {
 		});
 		barcodeEdt.addTextChangedListener(new TextWatcher() {
 			@Override
-			public void afterTextChanged(Editable arg0) {
+			public void afterTextChanged(Editable arg0) { 
+				
+				
 			}
 			@Override
 			public void beforeTextChanged(CharSequence s, int start, int count,
@@ -372,6 +373,16 @@ public class FinishedProductHandOverActivity extends Activity {
 			public void onTextChanged(CharSequence s, int start, int before,
 					int count) {
 				barcodeUpper = barcodeEdt.getText().toString().trim();
+				if(barcodeUpper.length() >= 73)
+				{
+					String[] parts = barcodeUpper.split("-", 2); // 第二个参数限制分割后的数组长度,这里为2  
+					  
+			        if (parts.length == 2) {  
+			            //System.out.println("第一部分: " + parts[0]);  
+			            //System.out.println("第二部分: " + parts[1]);  
+			        	barcodeUpper = parts[1];
+			        }  
+				} 
 				// 判断输入的文字是否是小写
 				for (int i = 0; i < barcodeUpper.length(); i++) {
 					if (barcodeUpper.charAt(i) - 0 >= 97
@@ -381,8 +392,22 @@ public class FinishedProductHandOverActivity extends Activity {
 				}
 				if (start == 0 && before == 0 && count > 1) {
 					String barcode = barcodeEdt.getText().toString();
+					
+					
+					
 					barcode = barcode.trim();
 					if (!TextUtils.isEmpty(barcode)) {
+					 
+						if(barcode.length() >= 73)
+						{
+							String[] parts = barcode.split("-", 2); // 第二个参数限制分割后的数组长度,这里为2  
+							  
+					        if (parts.length == 2) {  
+					            //System.out.println("第一部分: " + parts[0]);  
+					            //System.out.println("第二部分: " + parts[1]);  
+					            barcode = parts[1];
+					        }  
+						} 
 						ProcessDialogUtils.showProcessDialog(
 								FinishedProductHandOverActivity.this);
 						barcodeEdt.setEnabled(false);
@@ -399,6 +424,7 @@ public class FinishedProductHandOverActivity extends Activity {
 												: "";
 									}
 								}});
+					
 						thread = new HandlerThread("barcodeThread", 5);
 						thread.start();
 						mHandler = new Handler(thread.getLooper());
@@ -415,8 +441,18 @@ public class FinishedProductHandOverActivity extends Activity {
 					public boolean onEditorAction(TextView v, int actionId,
 							KeyEvent event) {
 						if (actionId == EditorInfo.IME_ACTION_GO) {
-							String barcode = barcodeEdt.getText().toString();
+							String barcode = barcodeEdt.getText().toString(); 
 							if (!TextUtils.isEmpty(barcode)) {
+								if(barcode.length() >= 73)
+								{
+									String[] parts = barcode.split("-", 2); // 第二个参数限制分割后的数组长度,这里为2  
+									  
+							        if (parts.length == 2) {  
+							            //System.out.println("第一部分: " + parts[0]);  
+							            //System.out.println("第二部分: " + parts[1]);  
+							            barcode = parts[1];
+							        }  
+								} 
 								ProcessDialogUtils.showProcessDialog(
 										FinishedProductHandOverActivity.this);
 								barcodeEdt.setEnabled(false);
@@ -727,8 +763,7 @@ public class FinishedProductHandOverActivity extends Activity {
 								int dend) {
 							return null;
 						}
-					}});
-					CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+					}}); 
 					break;
 				case 1 :
 					Bundle b1 = msg.getData();
@@ -833,9 +868,7 @@ public class FinishedProductHandOverActivity extends Activity {
 															int dend) {
 														return null;
 													}
-												}});
-										CommonUtil.BarcodeMaxLength(barcodeEdt,
-												50);
+												}}); 
 										return;
 									}
 								}
@@ -885,137 +918,7 @@ public class FinishedProductHandOverActivity extends Activity {
 											(jobj5.optString("BANMA") == "null")
 													? ""
 													: jobj5.optString("BANMA"));
-									// info.setBarcodeLimitNum(limitNum);
-									// if (trademarkSettingValue != null &&
-									// trademarkSettingValue.equals("1")) {
-									// if (barcodeInfoList != null &&
-									// barcodeInfoList.size() > 0) {
-									// BarcodeInfo barcodeInfo =
-									// barcodeInfoList.get(0);
-									// boolean logoFlag =
-									// CompareLogoId(barcodeInfo, logoId);
-									// if (!logoFlag) {
-									//
-									// String originalLogoName =
-									// barcodeInfo.getLogoName();
-									// String message = "此产品[" + barcode +
-									// "]的商标[" + logoName + "]与此批次商标["
-									// + originalLogoName + "]不同,不能进行该操作";
-									// CustomToast.showToast(getApplicationContext(),
-									// message, 2000);
-									//
-									// CommonUtil.setDefault(Notification.DEFAULT_VIBRATE,
-									// getApplicationContext());
-									// 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);
-									//
-									// return;
-									//
-									// }
-									// }
-									// }
-									// if (modelSettingValue != null &&
-									// modelSettingValue.equals("1")) {
-									// if (barcodeInfoList != null &&
-									// barcodeInfoList.size() > 0) {
-									// BarcodeInfo barcodeInfo =
-									// barcodeInfoList.get(0);
-									// boolean modelFlag =
-									// CompareGoodsModel(barcodeInfo,
-									// goodsModel);
-									// if (!modelFlag) {
-									// String goodsModel1=
-									// barcodeInfo.getGoodsModel();
-									// //String originalGoodsCode =
-									// barcodeInfo.getGoodsCode();
-									// String message = "此产品[" + barcode +
-									// "]的型号[" + goodsModel + "]与此批次型号["
-									// + goodsModel1 + "]不同,不能进行该操作";
-									// CustomToast.showToast(getApplicationContext(),
-									// message, 2000);
-									//
-									// CommonUtil.setDefault(Notification.DEFAULT_VIBRATE,
-									// getApplicationContext());
-									// 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);
-									// return;
-									//
-									// }
-									// }
-									// }
-									// if (quantitySettingValue != null &&
-									// quantitySettingValue.equals("1")) {
-									// if (modelSettingValue.equals("1")) {
-									// if (limitNum > 0) {
-									// if (barcodeInfoList.size() == limitNum) {
-									// String message = "超过最大装板数量[" + limitNum +
-									// "]";
-									// CustomToast.showToast(getApplicationContext(),
-									// message, 2000);
-									//
-									// CommonUtil.setDefault(Notification.DEFAULT_VIBRATE,
-									// getApplicationContext());
-									// 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);
-									//
-									// return;
-									//
-									// }
-									// }
-									// }
-									//
-									// }
+								 
 									barcodeInfoList.add(info);
 								}
 								if (handoverAdapter == null) {
@@ -1023,67 +926,11 @@ public class FinishedProductHandOverActivity extends Activity {
 											FinishedProductHandOverActivity.this,
 											barcodeInfoList);
 									barcodeLst.setAdapter(handoverAdapter);
-									// handoverAdapter.setOnRightItemClickListener(new
-									// HandOverAdapter.onRightItemClickListener()
-									// {
-									//
-									// @Override
-									// public void onRightItemClick(View v, int
-									// position) {
-									// int pos = position -
-									// barcodeLst.getFirstVisiblePosition() + 1;
-									// barcodeLst.deleteItem(barcodeLst.getChildAt(pos));
-									//
-									// barcodeInfoList.remove(position);
-									//
-									// saveBtn.setText("保存(" +
-									// barcodeInfoList.size() + ")");
-									// handoverAdapter.notifyDataSetChanged();
-									//// if (quantitySettingValue != null &&
-									// quantitySettingValue.equals("1")) {
-									//// if (modelSettingValue.equals("1")) {
-									//// if (limitNum > 0) {
-									//// if (barcodeInfoList.size() < limitNum)
-									// {
-									//// saveBtn.setEnabled(false);
-									////
-									//// }
-									////
-									//// }
-									//// }
-									//// }
-									// }
-									// }
-									//
-									// );
+								 
 								} else {
 									handoverAdapter.notifyDataSetChanged();
 								}
-								// if (barcodeInfoList != null &&
-								// barcodeInfoList.size() > 0) {
-								// BarcodeInfo info1 = barcodeInfoList.get(0);
-								// limitNum = info1.getBarcodeLimitNum();
-								// if (quantitySettingValue != null &&
-								// quantitySettingValue.equals("1")) {
-								// if (modelSettingValue.equals("1")) {
-								// if (limitNum > 0) {
-								// if (barcodeInfoList.size() == limitNum) {
-								// saveBtn.setEnabled(true);
-								//
-								// } else {
-								// saveBtn.setEnabled(false);
-								//
-								// }
-								// }
-								//
-								// else {
-								// saveBtn.setEnabled(true);
-								//
-								// }
-								// }
-								//
-								// }
-								// }
+							 
 								barcodeEdt.setEnabled(true);
 								barcodeEdt.setText("");
 								barcodeEdt.setFocusable(true);
@@ -1100,8 +947,7 @@ public class FinishedProductHandOverActivity extends Activity {
 													int dend) {
 												return null;
 											}
-										}});
-								CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+										}}); 
 							}
 						} else {
 							String message = jobj3.optString("Message");
@@ -1233,8 +1079,7 @@ public class FinishedProductHandOverActivity extends Activity {
 						int end, Spanned dest, int dstart, int dend) {
 					return null;
 				}
-			}});
-			CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+			}}); 
 		}
 	}
 	@Override

+ 38 - 30
src/com/jiaju/activity/PieceActivity.java

@@ -141,8 +141,7 @@ public class PieceActivity extends Activity {
 	super.onCreate(savedInstanceState);
 	setContentView(R.layout.activity_pieces);
 	piecelist = new ArrayList<Piece>();
-	initview();
-	CommonUtil.BarcodeMaxLength(barcode, 50);
+	initview(); 
 	alllistener();
 	Intent intent = getIntent();
 	Bundle bundle = intent.getExtras();
@@ -654,6 +653,14 @@ public class PieceActivity extends Activity {
 	    public void afterTextChanged(Editable arg0) {
 		if (barcode.getText().toString().contains("\n")) {
 		    String etcode = barcode.getText().toString().trim().replaceAll("\\n", "");
+		    if(etcode.length() >= 73)
+					{
+						String[] parts = etcode.split("-", 2);   
+				        if (parts.length == 2) {   
+				        	etcode = parts[1];
+				        }  
+					} 
+
 		    LogToFile.v("barcode", "addTextChangedListener");
 		    if (ispackagpage && (etcode.length() == 8)) { // 在包装页 等于8的是板码
 			edtBoardCode.setText(etcode);
@@ -673,6 +680,14 @@ public class PieceActivity extends Activity {
 	    @Override
 	    public void onTextChanged(CharSequence s, int start, int before, int count) {
 		barcodeUpper = barcode.getText().toString();
+	    if(barcodeUpper.length() >= 73)
+		{
+			String[] parts = barcodeUpper.split("-", 2);   
+	        if (parts.length == 2) {   
+	        	barcodeUpper = parts[1];
+	        }  
+		} 
+
 		// 判断输入的文字是否是小写
 		for (int i = 0; i < barcodeUpper.length(); i++) {
 		    if (barcodeUpper.charAt(i) - 0 >= 97 && barcodeUpper.charAt(i) - 0 <= 122) {
@@ -688,6 +703,13 @@ public class PieceActivity extends Activity {
 		if (arg1 == EditorInfo.IME_ACTION_GO) {
 		    // functionStatus ==0 普通 ==1绑定 ==2验证
 		    String etcode = barcode.getText().toString().trim().replaceAll("\\n", "");
+		    if(etcode.length() >= 73)
+			{
+				String[] parts = etcode.split("-", 2);   
+		        if (parts.length == 2) {   
+		        	etcode = parts[1];
+		        }  
+			} 
 		    LogToFile.v("barcode", "setOnEditorActionListener");
 		    if (ispackagpage && (etcode.length() == 8)) { // 在包装页 等于8的是板码
 			edtBoardCode.setText(etcode);
@@ -745,8 +767,7 @@ public class PieceActivity extends Activity {
 				    return null;
 				}
 			    } });
-
-			    CommonUtil.BarcodeMaxLength(barcode, 50);
+ 
 			    userID1 = object.getString("UserID");
 			    userCode1 = object.getString("UserCode");
 			    userName1 = object.getString("UserName");
@@ -886,8 +907,7 @@ public class PieceActivity extends Activity {
 						    Spanned dest, int dstart, int dend) {
 						return null;
 					    }
-					} });
-					CommonUtil.BarcodeMaxLength(barcode, 50);
+					} }); 
 					CommonUtil.setDefault(Notification.DEFAULT_VIBRATE, getApplicationContext());
 					if (collectType == 2) {
 					    CommonUtil.showRepeatDialog("条码" + strcode + "重复", PieceActivity.this);
@@ -1023,8 +1043,7 @@ public class PieceActivity extends Activity {
 			    int dend) {
 			return null;
 		    }
-		} });
-		CommonUtil.BarcodeMaxLength(barcode, 50);
+		} }); 
 		edtSecurityCode.setText("");
 		llSecurityCode.setVisibility(View.GONE);
 		llSecurityLine.setVisibility(View.GONE);
@@ -1066,8 +1085,7 @@ public class PieceActivity extends Activity {
 			    int dend) {
 			return null;
 		    }
-		} });
-		CommonUtil.BarcodeMaxLength(barcode, 50);
+		} }); 
 		edtSecurityCode.setText("");
 		llSecurityCode.setVisibility(View.GONE);
 		llSecurityLine.setVisibility(View.GONE);
@@ -1105,8 +1123,7 @@ public class PieceActivity extends Activity {
 				int dend) {
 			    return null;
 			}
-		    } });
-		    CommonUtil.BarcodeMaxLength(barcode, 50);
+		    } }); 
 		} else {
 		    barcode.setText("");
 		    barcode.setEnabled(true);
@@ -1120,8 +1137,7 @@ public class PieceActivity extends Activity {
 				int dend) {
 			    return null;
 			}
-		    } });
-		    CommonUtil.BarcodeMaxLength(barcode, 50);
+		    } }); 
 		}
 		Bundle b2 = msg.getData();
 		int status2 = b2.getInt("Status");
@@ -1258,8 +1274,7 @@ public class PieceActivity extends Activity {
 					    int dstart, int dend) {
 					return null;
 				    }
-				} });
-				CommonUtil.BarcodeMaxLength(barcode, 50);
+				} }); 
 			    }
 			    CustomToast.showToast(getApplicationContext(), "上传成功", 2000);
 			    CommonUtil.playSound(PieceActivity.this);
@@ -1327,8 +1342,7 @@ public class PieceActivity extends Activity {
 			    int dend) {
 			return null;
 		    }
-		} });
-		CommonUtil.BarcodeMaxLength(barcode, 50);
+		} }); 
 		// functionStatus ==0 普通 ==1绑定 ==2验证
 		if (functionStatus == 2) {
 		    edtSecurityCode.setEnabled(true);
@@ -1483,8 +1497,7 @@ public class PieceActivity extends Activity {
 			    int dend) {
 			return null;
 		    }
-		} });
-		CommonUtil.BarcodeMaxLength(barcode, 50);
+		} }); 
 		InputMethodManager im = (InputMethodManager) barcode.getContext()
 			.getSystemService(Context.INPUT_METHOD_SERVICE);
 		im.hideSoftInputFromWindow(PieceActivity.this.getCurrentFocus().getWindowToken(),
@@ -1511,8 +1524,7 @@ public class PieceActivity extends Activity {
 			    int dend) {
 			return null;
 		    }
-		} });
-		CommonUtil.BarcodeMaxLength(barcode, 50);
+		} }); 
 		Bundle b5 = msg.getData();
 		String waterLabelCode = b5.getString("waterLabelCode");
 		String checkFlag = b5.getString("checkFlag");
@@ -2641,8 +2653,7 @@ public class PieceActivity extends Activity {
 			int dend) {
 		    return null;
 		}
-	    } });
-	    CommonUtil.BarcodeMaxLength(barcode, 50);
+	    } }); 
 	}
 	if (requestCode == 103 && resultCode == 104) {
 	    barcode.setEnabled(true);
@@ -2657,8 +2668,7 @@ public class PieceActivity extends Activity {
 			int dend) {
 		    return null;
 		}
-	    } });
-	    CommonUtil.BarcodeMaxLength(barcode, 50);
+	    } }); 
 	}
 	if (requestCode == 102 && resultCode == RESULT_OK) {
 	    Bundle bundle = intent.getExtras();
@@ -2797,8 +2807,7 @@ public class PieceActivity extends Activity {
 					int dstart, int dend) {
 				    return null;
 				}
-			    } });
-			    CommonUtil.BarcodeMaxLength(barcode, 50);
+			    } }); 
 			    CommonUtil.setDefault(Notification.DEFAULT_VIBRATE, getApplicationContext());
 			    if (collectType == 2) {
 				CommonUtil.showRepeatDialog("条码" + etcode + "重复", PieceActivity.this);
@@ -2849,8 +2858,7 @@ public class PieceActivity extends Activity {
 				int dend) {
 			    return null;
 			}
-		    } });
-		    CommonUtil.BarcodeMaxLength(barcode, 50);
+		    } }); 
 		    return;
 		}
 		break;

+ 25 - 5
src/com/jiaju/activity/ProductPathActivity.java

@@ -51,7 +51,7 @@ import android.widget.PopupWindow;
 import android.widget.SimpleAdapter;
 import android.widget.TextView;
 import android.widget.TextView.OnEditorActionListener;
-
+//产品跟踪
 public class ProductPathActivity extends Activity {
     private EditText barcodeEdt;// 条码
     private TextView productcode, productName;// 产品编码
@@ -121,7 +121,7 @@ public class ProductPathActivity extends Activity {
 	listItem = new ArrayList<HashMap<String, Object>>();
 	listItemdetail = new ArrayList<HashMap<String, Object>>();
 	initview();
-	CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//	CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 	title.setText("产品跟踪");
 	title.setTextSize(24);
 	alllistener();
@@ -256,6 +256,17 @@ public class ProductPathActivity extends Activity {
 			    return source.length() < 1 ? dest.subSequence(dstart, dend) : "";
 			}
 		    } });
+		    
+		    if(barcode.length() >= 73)
+			{
+				String[] parts = barcode.split("-", 2); // 第二个参数限制分割后的数组长度,这里为2  
+				  
+		        if (parts.length == 2) {  
+		            //System.out.println("第一部分: " + parts[0]);  
+		            //System.out.println("第二部分: " + parts[1]);  
+		            barcode = parts[1];
+		        }  
+			} 
 		    thread = null;
 		    thread = new HandlerThread("BarCoderThread", 5);
 		    thread.start();
@@ -316,7 +327,16 @@ public class ProductPathActivity extends Activity {
 			    return source.length() < 1 ? dest.subSequence(dstart, dend) : "";
 			}
 		    } });
-
+		    if(barcode.length() >= 73)
+			{
+				String[] parts = barcode.split("-", 2); // 第二个参数限制分割后的数组长度,这里为2  
+				  
+		        if (parts.length == 2) {  
+		            //System.out.println("第一部分: " + parts[0]);  
+		            //System.out.println("第二部分: " + parts[1]);  
+		            barcode = parts[1];
+		        }  
+			} 
 		    thread = null;
 		    thread = new HandlerThread("BarCoderThread", 5);
 		    thread.start();
@@ -558,7 +578,7 @@ public class ProductPathActivity extends Activity {
 				return null;
 			    }
 			} });
-			CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//			CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 			InputMethodManager im = (InputMethodManager) barcodeEdt.getContext()
 				.getSystemService(Context.INPUT_METHOD_SERVICE);
 			im.hideSoftInputFromWindow(ProductPathActivity.this.getCurrentFocus().getWindowToken(),
@@ -607,7 +627,7 @@ public class ProductPathActivity extends Activity {
 			return null;
 		    }
 		} });
-		CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//		CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 		Bundle b1 = msg.getData();
 		String message = b1.getString("message");
 		CustomToast.showToast(getApplicationContext(), message, 2000);

+ 12 - 12
src/com/jiaju/utils/CommonUtil.java

@@ -1095,7 +1095,7 @@ public class CommonUtil {
 				    }
 				} });
 
-				CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//				CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 				if (bugnoEdt != null) {
 				    bugnoEdt.setEnabled(true);
 				    bugnoEdt.setText("");
@@ -1168,7 +1168,7 @@ public class CommonUtil {
 				    }
 				} });
 
-				CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//				CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 				if (bugnoEdt != null) {
 				    bugnoEdt.setEnabled(true);
 				    bugnoEdt.setText("");
@@ -1361,7 +1361,7 @@ public class CommonUtil {
 				    }
 				} });
 
-				CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//				CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 				InputMethodManager im = (InputMethodManager) barcodeEdt.getContext()
 					.getSystemService(Context.INPUT_METHOD_SERVICE);
 				im.hideSoftInputFromWindow(barcodeEdt.getWindowToken(),
@@ -1415,7 +1415,7 @@ public class CommonUtil {
 				    }
 				} });
 
-				CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//				CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 
 				InputMethodManager im = (InputMethodManager) barcodeEdt.getContext()
 					.getSystemService(Context.INPUT_METHOD_SERVICE);
@@ -1486,7 +1486,7 @@ public class CommonUtil {
 				}
 			    } });
 
-			    CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//			    CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 			    InputMethodManager im = (InputMethodManager) barcodeEdt.getContext()
 				    .getSystemService(Context.INPUT_METHOD_SERVICE);
 			    im.hideSoftInputFromWindow(barcodeEdt.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
@@ -1536,7 +1536,7 @@ public class CommonUtil {
 				}
 			    } });
 
-			    CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//			    CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 
 			    InputMethodManager im = (InputMethodManager) barcodeEdt.getContext()
 				    .getSystemService(Context.INPUT_METHOD_SERVICE);
@@ -1618,7 +1618,7 @@ public class CommonUtil {
 					return null;
 				    }
 				} });
-				CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//				CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 
 			    }
 			    return;
@@ -1655,7 +1655,7 @@ public class CommonUtil {
 					return null;
 				    }
 				} });
-				CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//				CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 
 			    }
 			    return;
@@ -1712,7 +1712,7 @@ public class CommonUtil {
 					    return null;
 					}
 				    } });
-				    CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//				    CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 
 				}
 			    }
@@ -1732,7 +1732,7 @@ public class CommonUtil {
 					return null;
 				    }
 				} });
-				CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//				CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 			    }
 			    return;
 			}
@@ -1769,7 +1769,7 @@ public class CommonUtil {
 					    return null;
 					}
 				    } });
-				    CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//				    CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 
 				}
 			    } else if (deliveryType == 1) {
@@ -1787,7 +1787,7 @@ public class CommonUtil {
 					return null;
 				    }
 				} });
-				CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
+//				CommonUtil.BarcodeMaxLength(barcodeEdt, 50);
 			    }
 			    return;
 			}