|
|
@@ -279,51 +279,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
mCollectBarProdcodeTv.setText(mResult3);
|
|
|
|
|
|
PdaApplication.putDataCache2Map(Constants.FLAG.MATERIAL_COLLECT_BARCODE_RESULT + pi_inoutno, mResults);
|
|
|
- } else if (false) {
|
|
|
- String boxResult = "采集成功;" + JsonUtils.optStringNotNull(dataObject, "finishno")
|
|
|
- + "\n箱号:" + JsonUtils.optStringNotNull(messageObject, "BAR_OUTBOXCODE1")
|
|
|
- + ";数量:" + CommonUtil.doubleFormat(messageObject.optDouble("BAR_REMAIN"))
|
|
|
- + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
|
|
|
- + ";料号:" + JsonUtils.optStringNotNull(messageObject, "BAR_PRODCODE")
|
|
|
- + ";名称规格:" + JsonUtils.optStringNotNull(messageObject, "PR_DETAIL")
|
|
|
- + " " + JsonUtils.optStringNotNull(messageObject, "PR_SPEC");
|
|
|
-
|
|
|
-
|
|
|
- if (listArray != null && listArray.length() > 0) {
|
|
|
- for (int i = 0; i < listArray.length(); i++) {
|
|
|
- JSONObject listObject = listArray.optJSONObject(i);
|
|
|
- boxResult = boxResult
|
|
|
- + "\n单号:" + JsonUtils.optStringNotNull(listObject, "PI_INOUTNO")
|
|
|
- + ";条码号:" + JsonUtils.optStringNotNull(listObject, "BAR_CODE")
|
|
|
- + ";数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(listObject, "BAR_REMAIN"));
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- mCollectResultTextView.setText(boxResult);
|
|
|
- mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
|
|
|
-
|
|
|
- mBarcodeTableLayout.setVisibility(View.GONE);
|
|
|
- mBoxTableLayout.setVisibility(View.GONE);
|
|
|
-
|
|
|
- tvBoxCollectionSuccess.setVisibility(View.VISIBLE);
|
|
|
- tvBoxCollectionSuccess.setText("采集成功");
|
|
|
-
|
|
|
- mResult1 = messageObject.optString("PA_OUTBOXCODE");
|
|
|
- mResult2 = messageObject.optInt("PA_TOTALQTY") + "";
|
|
|
- mResult3 = messageObject.optString("PA_PRODCODE");
|
|
|
- mResult4 = messageObject.optString("PA_WHCODE");
|
|
|
-
|
|
|
- mResults.add(mResult1);
|
|
|
- mResults.add(mResult2);
|
|
|
- mResults.add(mResult3);
|
|
|
- mResults.add(mResult4);
|
|
|
-
|
|
|
- mCollectBoxTv.setText(mResult1);
|
|
|
- mCollectBoxNumTv.setText(mResult2);
|
|
|
- mCollectBoxrProdcodeTv.setText(mResult3);
|
|
|
- mCollectBoxWhcodeTv.setText(mResult4);
|
|
|
-
|
|
|
- PdaApplication.putDataCache2Map(Constants.FLAG.MATERIAL_COLLECT_BOX_RESULT + pi_inoutno, mResults);
|
|
|
}
|
|
|
CommonUtil.toastNoRepeat(getActivity(), "采集成功");
|
|
|
|
|
|
@@ -507,7 +462,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
|
|
|
mBarcodeTableLayout.setVisibility(View.GONE);
|
|
|
mBoxTableLayout.setVisibility(View.GONE);
|
|
|
- mCollectType = SharedPreUtil.getString(getActivity().getApplicationContext(), Constants.FLAG.MATERIAL_OUT_COLLECT_TYPE, "byBarcode");
|
|
|
+ //mCollectType = SharedPreUtil.getString(getActivity().getApplicationContext(), Constants.FLAG.MATERIAL_OUT_COLLECT_TYPE, "byBarcode");
|
|
|
+ mCollectType = "byBarcode"; //这样可以去掉箱号
|
|
|
|
|
|
if (mCollectType != null) {
|
|
|
//取消箱号采集
|
|
|
@@ -517,9 +473,9 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
etBarCode.setHint(R.string.please_collect_barcode);
|
|
|
mtypeNameTv.setText("条码");
|
|
|
} else if (mCollectType.equals("byBatchcode")) {
|
|
|
- CommonUtil.setSpinnerItemSelectedByValue(mTypeSpinner, "箱号");
|
|
|
- etBarCode.setHint("请采集箱号");
|
|
|
- mtypeNameTv.setText("箱号");
|
|
|
+// CommonUtil.setSpinnerItemSelectedByValue(mTypeSpinner, "箱号");
|
|
|
+// etBarCode.setHint("请采集箱号");
|
|
|
+// mtypeNameTv.setText("箱号");
|
|
|
}
|
|
|
}
|
|
|
btnActionbarRight = (Button) getActivity().findViewById(R.id.btn_actionbar_more);
|
|
|
@@ -558,35 +514,35 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- mtypeNameTv.setOnClickListener(new View.OnClickListener() {
|
|
|
- @Override
|
|
|
- public void onClick(View v) {
|
|
|
- String typeName = mtypeNameTv.getText().toString().trim();
|
|
|
- if ("条码".equals(typeName)) {
|
|
|
- changeToTypeBatch();
|
|
|
- } else if ("箱号".equals(typeName)) {
|
|
|
- changeToTypeBarcode();
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- mTypeSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
|
|
- @Override
|
|
|
- public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
|
|
- if (mCollectTypes != null) {
|
|
|
- if (mCollectTypes.get(position).equals("条码号")) {
|
|
|
- changeToTypeBarcode();
|
|
|
- } else if (mCollectTypes.get(position).equals("外箱号")) {
|
|
|
- changeToTypeBatch();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onNothingSelected(AdapterView<?> parent) {
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
+// mtypeNameTv.setOnClickListener(new View.OnClickListener() {
|
|
|
+// @Override
|
|
|
+// public void onClick(View v) {
|
|
|
+// String typeName = mtypeNameTv.getText().toString().trim();
|
|
|
+// if ("条码".equals(typeName)) {
|
|
|
+// changeToTypeBatch();
|
|
|
+// } else if ("箱号".equals(typeName)) {
|
|
|
+// changeToTypeBarcode();
|
|
|
+// }
|
|
|
+// }
|
|
|
+// });
|
|
|
+
|
|
|
+// mTypeSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
|
|
+// @Override
|
|
|
+// public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
|
|
+// if (mCollectTypes != null) {
|
|
|
+// if (mCollectTypes.get(position).equals("条码号")) {
|
|
|
+// changeToTypeBarcode();
|
|
|
+// } else if (mCollectTypes.get(position).equals("外箱号")) {
|
|
|
+// changeToTypeBatch();
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Override
|
|
|
+// public void onNothingSelected(AdapterView<?> parent) {
|
|
|
+//
|
|
|
+// }
|
|
|
+// });
|
|
|
|
|
|
btn_startoutku.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
@@ -897,13 +853,18 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
progressDialog.show();
|
|
|
boolean checkeds = special_check.isChecked();
|
|
|
// currentBarcode = etBarCode.getText().toString().trim();
|
|
|
- String url = (isMultiple ? GloableParams.ADDRESS_OUT_BYBATCH_DEAL : GloableParams.ADDRESS_OUT_BYBATCH_DEAL)
|
|
|
- + "?barcode=" + currentBarcode
|
|
|
- + (isMultiple ? "&ids=" : "&ids=")
|
|
|
- + pi_id + "&whcode=" + pd_whcode
|
|
|
- + "&type=barcode&msdcheck=" + msdcheck
|
|
|
- + "&datecheck=" + datecheck
|
|
|
- +"&ifspecial="+checkeds;
|
|
|
+ String url = "";
|
|
|
+ try {
|
|
|
+ url = GloableParams.ADDRESS_OUT_BYBATCH_DEAL
|
|
|
+ + "?barcode=" + URLEncoder.encode(currentBarcode, "utf-8")
|
|
|
+ + (isMultiple ? "&ids=" : "&ids=")
|
|
|
+ + pi_id + "&whcode=" + pd_whcode
|
|
|
+ + "&type=barcode&msdcheck=" + msdcheck
|
|
|
+ + "&datecheck=" + datecheck
|
|
|
+ +"&ifspecial="+checkeds;
|
|
|
+ }catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
try {
|
|
|
if (mProdOutType != null && mCollectType != null) {
|
|
|
if (mProdOutType.equals("byProdcode")) {
|
|
|
@@ -1053,52 +1014,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
mCollectBarProdcodeTv.setText(mResult3);
|
|
|
|
|
|
PdaApplication.putDataCache2Map(Constants.FLAG.MATERIAL_COLLECT_BARCODE_RESULT + pi_inoutno, mResults);
|
|
|
- } else if (false) {
|
|
|
- String boxResult = "采集成功;" + JsonUtils.optStringNotNull(dataObject, "finishno")
|
|
|
- + "\n箱号:" + JsonUtils.optStringNotNull(messageObject, "BAR_OUTBOXCODE1")
|
|
|
- + ";数量:" + CommonUtil.doubleFormat(messageObject.optDouble("BAR_REMAIN"))
|
|
|
- + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
|
|
|
- + ";料号:" + JsonUtils.optStringNotNull(messageObject, "BAR_PRODCODE")
|
|
|
- + ";名称规格:" + JsonUtils.optStringNotNull(messageObject, "PR_DETAIL")
|
|
|
- + " " + JsonUtils.optStringNotNull(messageObject, "PR_SPEC");
|
|
|
-
|
|
|
-
|
|
|
-// if (listArray != null && listArray.length() > 0) {
|
|
|
-// for (int i = 0; i < listArray.length(); i++) {
|
|
|
-// JSONObject listObject = listArray.optJSONObject(i);
|
|
|
-// boxResult = boxResult
|
|
|
-// + "\n单号:" + JsonUtils.optStringNotNull(listObject, "PI_INOUTNO")
|
|
|
-// + ";条码号:" + JsonUtils.optStringNotNull(listObject, "BAR_CODE")
|
|
|
-// + ";数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(listObject, "BAR_REMAIN"));
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
- mCollectResultTextView.setText(boxResult);
|
|
|
- mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
|
|
|
-
|
|
|
-
|
|
|
- mBarcodeTableLayout.setVisibility(View.GONE);
|
|
|
- mBoxTableLayout.setVisibility(View.GONE);
|
|
|
-
|
|
|
- tvBoxCollectionSuccess.setVisibility(View.VISIBLE);
|
|
|
- tvBoxCollectionSuccess.setText("采集成功");
|
|
|
-
|
|
|
- mResult1 = messageObject.optString("PA_OUTBOXCODE");
|
|
|
- mResult2 = messageObject.optInt("PA_TOTALQTY") + "";
|
|
|
- mResult3 = messageObject.optString("PA_PRODCODE");
|
|
|
- mResult4 = messageObject.optString("PA_WHCODE");
|
|
|
-
|
|
|
- mResults.add(mResult1);
|
|
|
- mResults.add(mResult2);
|
|
|
- mResults.add(mResult3);
|
|
|
- mResults.add(mResult4);
|
|
|
-
|
|
|
- mCollectBoxTv.setText(mResult1);
|
|
|
- mCollectBoxNumTv.setText(mResult2);
|
|
|
- mCollectBoxrProdcodeTv.setText(mResult3);
|
|
|
- mCollectBoxWhcodeTv.setText(mResult4);
|
|
|
-
|
|
|
- PdaApplication.putDataCache2Map(Constants.FLAG.MATERIAL_COLLECT_BOX_RESULT + pi_inoutno, mResults);
|
|
|
}
|
|
|
CommonUtil.toastNoRepeat(getActivity(), "采集成功");
|
|
|
|
|
|
@@ -1828,52 +1743,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
mCollectBarProdcodeTv.setText(mResult3);
|
|
|
|
|
|
PdaApplication.putDataCache2Map(Constants.FLAG.MATERIAL_COLLECT_BARCODE_RESULT + pi_inoutno, mResults);
|
|
|
- } else if (false) {
|
|
|
- String boxResult = "采集成功;" + JsonUtils.optStringNotNull(dataObject, "finishno")
|
|
|
- + "\n箱号:" + JsonUtils.optStringNotNull(messageObject, "BAR_OUTBOXCODE1")
|
|
|
- + ";数量:" + CommonUtil.doubleFormat(messageObject.optDouble("BAR_REMAIN"))
|
|
|
- + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
|
|
|
- + ";料号:" + JsonUtils.optStringNotNull(messageObject, "BAR_PRODCODE")
|
|
|
- + ";名称规格:" + JsonUtils.optStringNotNull(messageObject, "PR_DETAIL")
|
|
|
- + " " + JsonUtils.optStringNotNull(messageObject, "PR_SPEC");
|
|
|
-
|
|
|
-
|
|
|
- if (listArray != null && listArray.length() > 0) {
|
|
|
- for (int i = 0; i < listArray.length(); i++) {
|
|
|
- JSONObject listObject = listArray.optJSONObject(i);
|
|
|
- boxResult = boxResult
|
|
|
- + "\n单号:" + JsonUtils.optStringNotNull(listObject, "PI_INOUTNO")
|
|
|
- + ";条码号:" + JsonUtils.optStringNotNull(listObject, "BAR_CODE")
|
|
|
- + ";数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(listObject, "BAR_REMAIN"));
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- mCollectResultTextView.setText(boxResult);
|
|
|
- mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
|
|
|
-
|
|
|
-
|
|
|
- mBarcodeTableLayout.setVisibility(View.GONE);
|
|
|
- mBoxTableLayout.setVisibility(View.GONE);
|
|
|
-
|
|
|
- tvBoxCollectionSuccess.setVisibility(View.VISIBLE);
|
|
|
- tvBoxCollectionSuccess.setText("采集成功");
|
|
|
-
|
|
|
- mResult1 = messageObject.optString("PA_OUTBOXCODE");
|
|
|
- mResult2 = messageObject.optInt("PA_TOTALQTY") + "";
|
|
|
- mResult3 = messageObject.optString("PA_PRODCODE");
|
|
|
- mResult4 = messageObject.optString("PA_WHCODE");
|
|
|
-
|
|
|
- mResults.add(mResult1);
|
|
|
- mResults.add(mResult2);
|
|
|
- mResults.add(mResult3);
|
|
|
- mResults.add(mResult4);
|
|
|
-
|
|
|
- mCollectBoxTv.setText(mResult1);
|
|
|
- mCollectBoxNumTv.setText(mResult2);
|
|
|
- mCollectBoxrProdcodeTv.setText(mResult3);
|
|
|
- mCollectBoxWhcodeTv.setText(mResult4);
|
|
|
-
|
|
|
- PdaApplication.putDataCache2Map(Constants.FLAG.MATERIAL_COLLECT_BOX_RESULT + pi_inoutno, mResults);
|
|
|
}
|
|
|
CommonUtil.toastNoRepeat(getActivity(), "采集成功");
|
|
|
|