Преглед на файлове

Merge branch 'master' of http://s.dev01.dkiboss.com:9001/DK-MES-2.0/HEGII.ss.mes.pda

李士越 преди 1 година
родител
ревизия
9832a0174e
променени са 2 файла, в които са добавени 19 реда и са изтрити 6 реда
  1. 1 1
      res/layout/activity_send_out_goods.xml
  2. 18 5
      src/com/jiaju/activity/SendOutGoods.java

+ 1 - 1
res/layout/activity_send_out_goods.xml

@@ -135,7 +135,7 @@
 
                        <TextView
                             android:id="@+id/sendOutGoodsLogidTxt"
-                            android:layout_width="150dp"
+                            android:layout_width="wrap_content"
                             android:layout_height="wrap_content"
                             android:layout_gravity="center_vertical"
                             android:scrollHorizontally="true"

+ 18 - 5
src/com/jiaju/activity/SendOutGoods.java

@@ -50,6 +50,7 @@ import android.app.Dialog;
 import android.app.Notification;
 import android.content.Context;
 import android.content.DialogInterface;
+import android.content.Intent;
 import android.content.SharedPreferences;
 import android.os.Bundle;
 import android.os.Handler;
@@ -159,7 +160,7 @@ public class SendOutGoods extends Activity {
 		loadProcedureDataSource();
 		initView();
 		sendOutGoodLogId="";
-	    sendOutGoodLogId = this.getIntent().getStringExtra("sendOutGoodLog");
+	    sendOutGoodLogId = this.getIntent().getStringExtra("sendoutCode");
 			if(sendOutGoodLogId==null||sendOutGoodLogId=="")
 			{
 				((LinearLayout) findViewById(R.id.LinearLayout06)).setVisibility(View.GONE);
@@ -1215,7 +1216,7 @@ public class SendOutGoods extends Activity {
 					jObject = new JSONObject(json2);
 					JSONObject object = (JSONObject) jObject.opt("d");
 					int status = object.optInt("Status");
-					String message = object.optString("Message");
+					String message = object.optString("Result");
 					//JSONObject result3 =(JSONObject) object.opt("Result");
 					//JSONArray resArray = (JSONArray)result3.opt("Result");
 					if (status == 0) {
@@ -1241,11 +1242,23 @@ public class SendOutGoods extends Activity {
 						CommonUtil.setDefault(Notification.DEFAULT_VIBRATE, getApplicationContext());
 						CommonUtil.showSaveAlertDialog(0, "存在已发货产品", SendOutGoods.this, null, barcodeEdt, 2);					
 						
+					}else if (status == -100) {	
+						CommonUtil.setDefault(Notification.DEFAULT_VIBRATE, getApplicationContext());
+						CommonUtil.showSaveAlertDialog(0, message, SendOutGoods.this, null, barcodeEdt, 2);					
+						
+					}else if (status == -101) {	
+						CommonUtil.setDefault(Notification.DEFAULT_VIBRATE, getApplicationContext());
+						CommonUtil.showSaveAlertDialog(0, "同步返回空值", SendOutGoods.this, null, barcodeEdt, 2);					
+						
 					}else if (status == -102) {	
 						CommonUtil.setDefault(Notification.DEFAULT_VIBRATE, getApplicationContext());
 						CommonUtil.showSaveAlertDialog(0, "库存不足", SendOutGoods.this, null, barcodeEdt, 2);					
 						
-					}else {
+					}else if (status == -103) {	
+						CommonUtil.setDefault(Notification.DEFAULT_VIBRATE, getApplicationContext());
+						CommonUtil.showSaveAlertDialog(0, "发货单信息不能为空", SendOutGoods.this, null, barcodeEdt, 2);					
+						
+					}else  {
 						CommonUtil.setDefault(Notification.DEFAULT_VIBRATE, getApplicationContext());
 						CommonUtil.showSaveAlertDialog(0, "失败", SendOutGoods.this, null, barcodeEdt, 2);
 					}
@@ -1393,9 +1406,9 @@ public class SendOutGoods extends Activity {
 								// groutingDate = CommonUtil.commonDateConverter(groutingDate);
 								String LogoName = object2.optString("MATERIALREMARK");
 								// String userCode = object2.optString("USERCODE");
-								String orderNo = object2.optString("COUNT");
+								String orderNo =String.valueOf((int) Double.parseDouble(object2.optString("COUNT")));
 								BarcodeInfo barcodeInfo = new BarcodeInfo();
-								barcodeInfo.setBanMa(barcode);
+								barcodeInfo.setBanMa(barcode==null||barcode.equals("null")?"":barcode);
 								barcodeInfo.setGoodsCode(goodsCode);
 								barcodeInfo.setLogoCode(LogoCode);
 								barcodeInfo.setLogoName(LogoName);