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