|
|
@@ -69,6 +69,7 @@ import com.uas.xuslectronic.tools.VolleyUtil;
|
|
|
import com.uas.xuslectronic.util.CameraUtil;
|
|
|
import com.uas.xuslectronic.util.CommonUtil;
|
|
|
import com.uas.xuslectronic.util.Constants;
|
|
|
+import com.uas.xuslectronic.util.FastjsonUtil;
|
|
|
import com.uas.xuslectronic.util.FileUtils;
|
|
|
import com.uas.xuslectronic.util.FragmentUtils;
|
|
|
import com.uas.xuslectronic.util.HttpCallback;
|
|
|
@@ -78,6 +79,7 @@ import com.uas.xuslectronic.util.JsonUtils;
|
|
|
import com.uas.xuslectronic.util.LogUtil;
|
|
|
import com.uas.xuslectronic.util.PrintUtils;
|
|
|
import com.uas.xuslectronic.util.VolleyRequest;
|
|
|
+import com.uas.xuslectronic.util.VollyRequest;
|
|
|
import com.uas.xuslectronic.view.ClearableEditText;
|
|
|
import com.uuzuche.lib_zxing.activity.CaptureActivity;
|
|
|
import com.uuzuche.lib_zxing.activity.CodeUtils;
|
|
|
@@ -109,8 +111,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
private static final int SPLIT_BARCODE_FAIL = 105;
|
|
|
private static final int FLAG_CONFIRM_POST = 0x05;
|
|
|
|
|
|
-
|
|
|
-
|
|
|
private ImageView mScanImageView;
|
|
|
|
|
|
private JsonObjectRequest jsonRequest;
|
|
|
@@ -280,51 +280,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(), "采集成功");
|
|
|
|
|
|
@@ -344,10 +299,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
if (materialInformationBean.getPD_BATCHCODE() != null) {
|
|
|
materialInfo = materialInfo + "; 批号:" + materialInformationBean.getPD_BATCHCODE();
|
|
|
}
|
|
|
- mMaterialInforTextView.setText(materialInfo);
|
|
|
+ text_finishno.setText(materialInfo);
|
|
|
}
|
|
|
- } else {
|
|
|
- mMaterialInforTextView.setText("该出库单已经完成备料");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -416,12 +369,13 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
private Button mCollectModelBtn;
|
|
|
private TextView mtypeNameTv;
|
|
|
private Spinner mTypeSpinner;
|
|
|
- private TextView mMaterialInforTextView;
|
|
|
private TextView mCollectResultTextView;
|
|
|
private TextView mCollectBarProdcodeTv;
|
|
|
private CheckBox special_check;
|
|
|
private CheckBox more_check;
|
|
|
private TextView text_finishno;
|
|
|
+ private Button bt_save;
|
|
|
+ private ClearableEditText cet_xianghao;
|
|
|
|
|
|
@Override
|
|
|
protected int getLayout() {
|
|
|
@@ -451,12 +405,13 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
mCollectModelBtn = root.findViewById(R.id.iocout_collect_model_btn);
|
|
|
mtypeNameTv = root.findViewById(R.id.iocout_material_type_tv);
|
|
|
mTypeSpinner = root.findViewById(R.id.iocout_material_type_sp);
|
|
|
- mMaterialInforTextView = root.findViewById(R.id.iocout_next_material_information);
|
|
|
mCollectResultTextView = root.findViewById(R.id.iocout_collect_result);
|
|
|
special_check = root.findViewById(R.id.special_check);
|
|
|
more_check = root.findViewById(R.id.more_check);
|
|
|
|
|
|
text_finishno = root.findViewById(R.id.text_finishno);
|
|
|
+ bt_save = root.findViewById(R.id.bt_save);
|
|
|
+ cet_xianghao = root.findViewById(R.id.cet_xianghao);
|
|
|
|
|
|
((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(getString(R.string.out_material_collect));
|
|
|
// ((FunctionActivity) getActivity()).fragment = new IOCOutMakeMaterialOper();
|
|
|
@@ -591,6 +546,100 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ bt_save.setOnClickListener(new View.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+ currentBarcode = etBarCode.getText().toString().trim();
|
|
|
+ currentBarcode = currentBarcode.replace("#", "%23");
|
|
|
+ if (TextUtils.isEmpty(currentBarcode)) {
|
|
|
+ CommonUtil.toastNoRepeat(getActivity(), "请输入二维码");
|
|
|
+ } else {
|
|
|
+ if (mCollectModel == 1) {
|
|
|
+ if (CommonUtil.isNetWorkConnected(getActivity())) {
|
|
|
+ String boxcode = cet_xianghao.getText().toString().trim();
|
|
|
+ if (TextUtils.isEmpty(boxcode)) {
|
|
|
+ CommonUtil.toastNoRepeat(getActivity(), "请填入箱号");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ barcodeSaveEnter(boxcode);
|
|
|
+ } else {
|
|
|
+ CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.str_net_not_connect));
|
|
|
+ }
|
|
|
+ } else if (mCollectModel == 0) {
|
|
|
+ //离线模式
|
|
|
+ saveToDatabase(currentBarcode);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ private void barcodeSaveEnter(String boxcode) {
|
|
|
+ progressDialog.show();
|
|
|
+ VollyRequest.getInstance().stringRequest(mStringRequest,
|
|
|
+ new HttpParams.Builder()
|
|
|
+ .url(GloableParams.ADDRESS_OUTBOUND_COLLECTION_SAVE_BARCODE)
|
|
|
+ .method(Request.Method.POST)
|
|
|
+ .tag(TAG + "startMa")
|
|
|
+ .flag(0)
|
|
|
+ .addParam("ids", pi_id)
|
|
|
+ .addParam("barcode", currentBarcode)
|
|
|
+ .addParam("boxcode", boxcode)
|
|
|
+ .build(), new HttpCallback() {
|
|
|
+ @Override
|
|
|
+ public void onSuccess(int flag, Object o) throws Exception {
|
|
|
+ try {
|
|
|
+ progressDialog.dismiss();
|
|
|
+ String s = o.toString();
|
|
|
+ Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(), "success");
|
|
|
+ if (isSuccess) {
|
|
|
+ JSONObject jsonObject = new JSONObject(s);
|
|
|
+ JSONObject dataObject = jsonObject.optJSONObject("data");
|
|
|
+ if (dataObject == null) {
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "保存结果获取失败!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ mCollectResultTextView.setVisibility(View.VISIBLE);
|
|
|
+ mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
|
|
|
+ mCollectResultTextView.setText(null);
|
|
|
+ String barcodeResult = "采集成功" + "!\n"
|
|
|
+ + "\n型号:" + JsonUtils.optStringNotNull(dataObject, "PN")
|
|
|
+ + ";数量:" + CommonUtil.doubleFormat(dataObject.optDouble("QTY"))
|
|
|
+ + ";\nDC:" + JsonUtils.optStringNotNull(dataObject, "DC")
|
|
|
+ + ";\nLOT:" + JsonUtils.optStringNotNull(dataObject,"LOT");
|
|
|
+
|
|
|
+ if (dataObject.getString("finishFlag").equals("true")) {
|
|
|
+ barcodeResult += "; \n出库单号:" + JsonUtils.optStringNotNull(dataObject,"inoutno") + "已完成备料!";
|
|
|
+ }
|
|
|
+
|
|
|
+ String finishno = JsonUtils.optStringNotNull(dataObject, "finishno");
|
|
|
+ if (!finishno.isEmpty()){
|
|
|
+ text_finishno.setVisibility(View.VISIBLE);
|
|
|
+ text_finishno.setText(finishno);
|
|
|
+ }else {
|
|
|
+ text_finishno.setVisibility(View.GONE);
|
|
|
+ }
|
|
|
+ mCollectResultTextView.setText(barcodeResult);
|
|
|
+ mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
|
|
|
+ mBarcodeTableLayout.setVisibility(View.GONE);
|
|
|
+ mBoxTableLayout.setVisibility(View.GONE);
|
|
|
+
|
|
|
+ etBarCode.setText("");
|
|
|
+ currentBarcode = "";
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onFail(int flag, String failStr) throws Exception {
|
|
|
+ progressDialog.dismiss();
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, failStr);
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -660,7 +709,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
getNextMaterialInfo();
|
|
|
} else {
|
|
|
CommonUtil.toastNoRepeat(mActivity, getString(R.string.net_not_connect));
|
|
|
- mMaterialInforTextView.setText(getString(R.string.net_not_connect));
|
|
|
+ text_finishno.setText(getString(R.string.net_not_connect));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -707,11 +756,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
if (materialInformationBean.getData().getPD_BATCHCODE() != null) {
|
|
|
materialInfo = materialInfo + "; 批号:" + materialInformationBean.getData().getPD_BATCHCODE();
|
|
|
}
|
|
|
- if (mMaterialInforTextView != null)
|
|
|
- mMaterialInforTextView.setText(materialInfo);
|
|
|
- } else {
|
|
|
- if (mMaterialInforTextView != null)
|
|
|
- mMaterialInforTextView.setText("该出库单当前的仓库已经完成备料");
|
|
|
+ if (text_finishno != null)
|
|
|
+ text_finishno.setText(materialInfo);
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -720,8 +766,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
public void onErrorResponse(VolleyError volleyError) {
|
|
|
progressDialog.dismiss();
|
|
|
String errorMsg = CommonUtil.showErrorToast(volleyError);
|
|
|
- if (mMaterialInforTextView != null)
|
|
|
- mMaterialInforTextView.setText(errorMsg);
|
|
|
+ if (text_finishno != null)
|
|
|
+ text_finishno.setText(errorMsg);
|
|
|
}
|
|
|
}) {
|
|
|
@Override
|
|
|
@@ -752,7 +798,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
boolean checkeds = special_check.isChecked();
|
|
|
boolean more_is = more_check.isChecked();
|
|
|
// currentBarcode = etBarCode.getText().toString().trim();
|
|
|
- String url = (isMultiple ? GloableParams.ADDRESS_OUT_BYBATCH_DEAL : GloableParams.ADDRESS_OUT_BYBATCH_DEAL)
|
|
|
+ String url = (isMultiple ? GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE : GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE)
|
|
|
+ "?barcode=" + currentBarcode
|
|
|
+ (isMultiple ? "&ids=" : "&ids=")
|
|
|
+ pi_id + "&whcode=" + pd_whcode
|
|
|
@@ -764,7 +810,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
if (mProdOutType != null && mCollectType != null) {
|
|
|
if (mProdOutType.equals("byProdcode")) {
|
|
|
if (mCollectType.equals("byBarcode")) {
|
|
|
- url = (isMultiple ? GloableParams.ADDRESS_OUT_BYBATCH_DEAL : GloableParams.ADDRESS_OUT_BYBATCH_DEAL)
|
|
|
+ url = (isMultiple ? GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE : GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE)
|
|
|
+ "?barcode=" + URLEncoder.encode(currentBarcode, "utf-8")
|
|
|
+ (isMultiple ? "&ids=" : "&ids=")
|
|
|
+ pi_id + "&whcode=" + pd_whcode
|
|
|
@@ -774,7 +820,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
+"&isover="+more_is;
|
|
|
|
|
|
} else if (mCollectType.equals("byBatchcode")) {
|
|
|
- url = (isMultiple ? GloableParams.ADDRESS_OUT_BYBATCH_DEAL : GloableParams.ADDRESS_OUT_BYBATCH_DEAL)
|
|
|
+ url = (isMultiple ? GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE : GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE)
|
|
|
+ "?barcode=" + URLEncoder.encode(currentBarcode, "utf-8")
|
|
|
+ (isMultiple ? "&ids=" : "&ids=")
|
|
|
+ pi_id + "&whcode=" + pd_whcode
|
|
|
@@ -785,7 +831,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
}
|
|
|
} else if (mProdOutType.equals("byBatch")) {
|
|
|
if (mCollectType.equals("byBarcode")) {
|
|
|
- url = (isMultiple ? GloableParams.ADDRESS_OUT_BYBATCH_DEAL : GloableParams.ADDRESS_OUT_BYBATCH_DEAL)
|
|
|
+ url = (isMultiple ? GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE : GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE)
|
|
|
+ "?barcode=" + URLEncoder.encode(currentBarcode, "utf-8")
|
|
|
+ (isMultiple ? "&ids=" : "&ids=")
|
|
|
+ pi_id + "&whcode=" + pd_whcode
|
|
|
@@ -794,7 +840,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
+"&ifspecial="+checkeds
|
|
|
+"&isover="+more_is;
|
|
|
} else if (mCollectType.equals("byBatchcode")) {
|
|
|
- url = (isMultiple ? GloableParams.ADDRESS_OUT_BYBATCH_DEAL : GloableParams.ADDRESS_OUT_BYBATCH_DEAL)
|
|
|
+ url = (isMultiple ? GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE : GloableParams.ADDRESS_OUTBOUND_COLLECTION_PARSE_BARCODE)
|
|
|
+ "?barcode=" + URLEncoder.encode(currentBarcode, "utf-8")
|
|
|
+ (isMultiple ? "&ids=" : "&ids=")
|
|
|
+ pi_id + "&whcode=" + pd_whcode
|
|
|
@@ -810,7 +856,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
LogUtil.i("iocouturl", url);
|
|
|
- etBarCode.setText(null);
|
|
|
PdaApplication.mRequestQueue.cancelAll(TAG);
|
|
|
mCollectTypeRadioGroup.setEnabled(false);
|
|
|
jsonRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {
|
|
|
@@ -826,8 +871,22 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
CommonUtil.toastNoRepeat(mActivity, "采集结果获取失败!");
|
|
|
return;
|
|
|
}
|
|
|
- JSONObject messageObject = dataObject.getJSONObject("barcode");
|
|
|
+ if (dataObject.has("tip")) {
|
|
|
+ mCollectResultTextView.setVisibility(View.VISIBLE);
|
|
|
+ mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
|
|
|
+ mCollectResultTextView.setText(null);
|
|
|
+ mCollectResultTextView.setText(dataObject.getString("tip"));
|
|
|
|
|
|
+ String boxcode = cet_xianghao.getText().toString().trim();
|
|
|
+ if (TextUtils.isEmpty(boxcode)) {
|
|
|
+ cet_xianghao.requestFocus();
|
|
|
+ return;
|
|
|
+ }else {
|
|
|
+ barcodeSaveEnter(boxcode);
|
|
|
+ }
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ JSONObject messageObject = dataObject.getJSONObject("barcode");
|
|
|
if (messageObject.has("IFOVER") && messageObject.optBoolean("IFOVER")) {
|
|
|
new AlertDialog.Builder(mActivity)
|
|
|
.setMessage("采集条码[" + messageObject.optString("BAR_CODE") + "]有效期已过,是否继续采集?")
|
|
|
@@ -869,10 +928,13 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
+ ";数量:" + CommonUtil.doubleFormat(messageObject.optDouble("BAR_REMAIN"))
|
|
|
// + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
|
|
|
+ ";\n料号:" + JsonUtils.optStringNotNull(messageObject, "BAR_PRODCODE")
|
|
|
- + ";\n名称规格:" + messageObject.optString("PR_DETAIL")+";";
|
|
|
+ + ";\n名称规格:" + JsonUtils.optStringNotNull(messageObject,"PR_DETAIL")
|
|
|
+ + "; \n型号:" + JsonUtils.optStringNotNull(messageObject,"PR_ORISPECCODE")
|
|
|
+ + ";";
|
|
|
// + " " + JsonUtils.optStringNotNull(messageObject, "PR_SPEC");
|
|
|
// + ";仓位:" + JsonUtils.optStringNotNull(messageObject, "BAR_LOCATION");
|
|
|
|
|
|
+
|
|
|
// if (listArray != null && listArray.length() > 0) {
|
|
|
// for (int i = 0; i < listArray.length(); i++) {
|
|
|
// JSONObject listObject = listArray.optJSONObject(i);
|
|
|
@@ -913,52 +975,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(), "采集成功");
|
|
|
|
|
|
@@ -978,10 +994,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
if (materialInformationBean.getPD_BATCHCODE() != null) {
|
|
|
materialInfo = materialInfo + "; 批号:" + materialInformationBean.getPD_BATCHCODE();
|
|
|
}
|
|
|
- mMaterialInforTextView.setText(materialInfo);
|
|
|
+ text_finishno.setText(materialInfo);
|
|
|
}
|
|
|
- } else {
|
|
|
- mMaterialInforTextView.setText("该出库单已经完成备料");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1755,10 +1769,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
if (materialInformationBean.getPD_BATCHCODE() != null) {
|
|
|
materialInfo = materialInfo + "; 批号:" + materialInformationBean.getPD_BATCHCODE();
|
|
|
}
|
|
|
- mMaterialInforTextView.setText(materialInfo);
|
|
|
+ text_finishno.setText(materialInfo);
|
|
|
}
|
|
|
- } else {
|
|
|
- mMaterialInforTextView.setText("该出库单已经完成备料");
|
|
|
}
|
|
|
}
|
|
|
|