|
@@ -416,6 +416,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
private Spinner mTypeSpinner;
|
|
|
private TextView mMaterialInforTextView;
|
|
|
private TextView mCollectResultTextView;
|
|
|
+ private Button btn_oneprint;
|
|
|
+ private JSONArray listArray;
|
|
|
|
|
|
@Override
|
|
|
protected int getLayout() {
|
|
@@ -455,7 +457,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
mTypeSpinner = mActivity.findViewById(R.id.iocout_material_type_sp);
|
|
|
mMaterialInforTextView = mActivity.findViewById(R.id.iocout_next_material_information);
|
|
|
mCollectResultTextView = mActivity.findViewById(R.id.iocout_collect_result);
|
|
|
-
|
|
|
+ btn_oneprint = root.findViewById(R.id.btn_oneprint);
|
|
|
|
|
|
mDbManager = new DBManager(getActivity().getApplicationContext());
|
|
|
mOkHttpClient = new OkHttpClient.Builder()
|
|
@@ -570,6 +572,18 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
|
|
|
}
|
|
|
});
|
|
|
+ btn_oneprint.setOnClickListener(new View.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+
|
|
|
+
|
|
|
+ if (listArray != null && listArray.length() > 0) {
|
|
|
+ printEvent(listArray);
|
|
|
+ }else {
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "数据为空");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1592,7 +1606,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
mCollectResultTextView.setVisibility(View.VISIBLE);
|
|
|
mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
|
|
|
mCollectResultTextView.setText(null);
|
|
|
- JSONArray listArray = dataObject.optJSONArray("nolist");
|
|
|
+ listArray = dataObject.optJSONArray("nolist");
|
|
|
if (mCollectType.equals("byBarcode") || mCollectType.equals("byBatchcode")) {
|
|
|
String barcodeResult = "采集成功;" + JsonUtils.optStringNotNull(dataObject, "finishno")
|
|
|
+ "\n条码:" + JsonUtils.optStringNotNull(messageObject, "BAR_CODE")
|