|
@@ -64,6 +64,7 @@ import com.uas.jc_wms.bean.IOCOutMakeMaterialOperMsd;
|
|
import com.uas.jc_wms.bean.IOCOutmakeMaterialSplitBean;
|
|
import com.uas.jc_wms.bean.IOCOutmakeMaterialSplitBean;
|
|
import com.uas.jc_wms.bean.MaterialInformationBean;
|
|
import com.uas.jc_wms.bean.MaterialInformationBean;
|
|
import com.uas.jc_wms.bean.SubmitNotParam;
|
|
import com.uas.jc_wms.bean.SubmitNotParam;
|
|
|
|
+import com.uas.jc_wms.bean.WHBreakingBatchBreakingBtnClickEvent;
|
|
import com.uas.jc_wms.bean.WHBreakingBatchBreakingBtnClickEventNew;
|
|
import com.uas.jc_wms.bean.WHBreakingBatchBreakingBtnClickEventNew;
|
|
import com.uas.jc_wms.database.DBManager;
|
|
import com.uas.jc_wms.database.DBManager;
|
|
import com.uas.jc_wms.global.GloableParams;
|
|
import com.uas.jc_wms.global.GloableParams;
|
|
@@ -134,6 +135,7 @@ public class IOCOutMakeMaterialOperNew extends BaseFragment implements View.OnCl
|
|
private StringRequest stringRequestPost;
|
|
private StringRequest stringRequestPost;
|
|
private String mProdOutType;
|
|
private String mProdOutType;
|
|
private List<WHBreakingBatchBreakingBtnClickEventNew.DataBean> messages = new ArrayList<>();
|
|
private List<WHBreakingBatchBreakingBtnClickEventNew.DataBean> messages = new ArrayList<>();
|
|
|
|
+ private List<WHBreakingBatchBreakingBtnClickEvent.DataBean> messagesOld = new ArrayList<>();
|
|
|
|
|
|
private int mCollectModel = 1;//采集模式:1代表在线,0代表离线
|
|
private int mCollectModel = 1;//采集模式:1代表在线,0代表离线
|
|
private String mBarRemain, mRestqty;
|
|
private String mBarRemain, mRestqty;
|
|
@@ -425,7 +427,7 @@ public class IOCOutMakeMaterialOperNew extends BaseFragment implements View.OnCl
|
|
private Spinner mTypeSpinner;
|
|
private Spinner mTypeSpinner;
|
|
private TextView mMaterialInforTextView;
|
|
private TextView mMaterialInforTextView;
|
|
private TextView mCollectResultTextView;
|
|
private TextView mCollectResultTextView;
|
|
- private Button btn_oneprint;
|
|
|
|
|
|
+ private Button btn_oneprint, bt_inventory_barcode_printing;
|
|
private com.alibaba.fastjson.JSONArray listArray;
|
|
private com.alibaba.fastjson.JSONArray listArray;
|
|
|
|
|
|
private RecyclerView rv_line_ip_port_data;
|
|
private RecyclerView rv_line_ip_port_data;
|
|
@@ -476,6 +478,7 @@ public class IOCOutMakeMaterialOperNew extends BaseFragment implements View.OnCl
|
|
mMaterialInforTextView = mActivity.findViewById(R.id.iocout_next_material_information);
|
|
mMaterialInforTextView = mActivity.findViewById(R.id.iocout_next_material_information);
|
|
mCollectResultTextView = mActivity.findViewById(R.id.iocout_collect_result);
|
|
mCollectResultTextView = mActivity.findViewById(R.id.iocout_collect_result);
|
|
btn_oneprint = root.findViewById(R.id.btn_oneprint);
|
|
btn_oneprint = root.findViewById(R.id.btn_oneprint);
|
|
|
|
+ bt_inventory_barcode_printing = root.findViewById(R.id.bt_inventory_barcode_printing);
|
|
|
|
|
|
mDbManager = new DBManager(getActivity().getApplicationContext());
|
|
mDbManager = new DBManager(getActivity().getApplicationContext());
|
|
mOkHttpClient = new OkHttpClient.Builder()
|
|
mOkHttpClient = new OkHttpClient.Builder()
|
|
@@ -598,6 +601,12 @@ public class IOCOutMakeMaterialOperNew extends BaseFragment implements View.OnCl
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ bt_inventory_barcode_printing.setOnClickListener(new View.OnClickListener() {
|
|
|
|
+ @Override
|
|
|
|
+ public void onClick(View v) {
|
|
|
|
+ getWhcode();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1319,7 +1328,6 @@ public class IOCOutMakeMaterialOperNew extends BaseFragment implements View.OnCl
|
|
closeListPopupWindow();
|
|
closeListPopupWindow();
|
|
//弹出拨入仓
|
|
//弹出拨入仓
|
|
getRepairStep("");
|
|
getRepairStep("");
|
|
- //getWhcode(0);
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
@@ -1476,35 +1484,88 @@ public class IOCOutMakeMaterialOperNew extends BaseFragment implements View.OnCl
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- // private void getWhcode() {
|
|
|
|
- // View mPopView = View.inflate(mActivity, R.layout.pop_whcode_dlert_dialog, null);
|
|
|
|
- // ClearableEditText cet_whcode = (ClearableEditText) mPopView.findViewById(R.id.cet_whcode);
|
|
|
|
- // Button bt_ok = (Button) mPopView.findViewById(R.id.bt_ok);
|
|
|
|
- // AlertDialog mWarehouseDialog = new AlertDialog.Builder(mActivity)
|
|
|
|
- // .setView(mPopView)
|
|
|
|
- // .create();
|
|
|
|
- // mWarehouseDialog.show();
|
|
|
|
- //
|
|
|
|
- // bt_ok.setOnClickListener(new View.OnClickListener() {
|
|
|
|
- // @Override
|
|
|
|
- // public void onClick(View v) {
|
|
|
|
- // mWarehouseDialog.cancel();
|
|
|
|
- // VolleyRequest.getInstance().stringRequest(mStringRequest,
|
|
|
|
- // new HttpParams.Builder()
|
|
|
|
- // .url(GloableParams.ADDRESS_BARCODE_SPLITTING)
|
|
|
|
- // .method(Request.Method.GET)
|
|
|
|
- // .addParam("id", pi_id)
|
|
|
|
- // .addParam("whcode", cet_whcode.getText().toString().trim())
|
|
|
|
- // .tag(TAG + "_barcodeSplitting")
|
|
|
|
- // .flag(BarcodeSplitting).build(),
|
|
|
|
- // 30 * 1000, IOCOutMakeMaterialOperNew.this);
|
|
|
|
- // }
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
|
|
+ private void getWhcode() {
|
|
|
|
+ View mPopView = View.inflate(mActivity, R.layout.pop_inventory_barcode_dialog, null);
|
|
|
|
+ ClearableEditText cet_barcode = (ClearableEditText) mPopView.findViewById(R.id.cet_barcode);
|
|
|
|
+ Button bt_ok = (Button) mPopView.findViewById(R.id.bt_ok);
|
|
|
|
+ AlertDialog mWarehouseDialog = new AlertDialog.Builder(mActivity)
|
|
|
|
+ .setView(mPopView)
|
|
|
|
+ .create();
|
|
|
|
+ mWarehouseDialog.show();
|
|
|
|
+
|
|
|
|
+ cet_barcode.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
|
|
|
+ @Override
|
|
|
|
+ public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
|
|
|
+ if (actionId == EditorInfo.IME_ACTION_SEND
|
|
|
|
+ || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
|
|
|
|
+ if (TextUtils.isEmpty(cet_barcode.getText().toString().trim())) {
|
|
|
|
+ getInvertoryBarcode(cet_barcode.getText().toString().trim());
|
|
|
|
+ }
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ bt_ok.setOnClickListener(new View.OnClickListener() {
|
|
|
|
+ @Override
|
|
|
|
+ public void onClick(View v) {
|
|
|
|
+ mWarehouseDialog.cancel();
|
|
|
|
+ getInvertoryBarcode(cet_barcode.getText().toString().trim());
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private void getInvertoryBarcode(String barcode) {
|
|
|
|
+ progressDialog.show();
|
|
|
|
+ VollyRequest.getInstance().stringRequest(mStringRequest,
|
|
|
|
+ new HttpParams.Builder()
|
|
|
|
+ .url(GloableParams.ADDRESS_GET_INVENTORY_BARCODE_DATA)
|
|
|
|
+ .method(Request.Method.GET)
|
|
|
|
+ .tag(TAG + "getInvertoryBarcode")
|
|
|
|
+ .addParam("code", barcode)
|
|
|
|
+ .flag(0)
|
|
|
|
+ .build(), new HttpCallback() {
|
|
|
|
+ @Override
|
|
|
|
+ public void onSuccess(int flag, Object o) throws Exception {
|
|
|
|
+ progressDialog.dismiss();
|
|
|
|
+ Boolean isSuccess = FastjsonUtil.getBoolean(o.toString(), "success");
|
|
|
|
+ com.alibaba.fastjson.JSONObject data = FastjsonUtil.getJSONObject(o.toString(), "data");
|
|
|
|
+// com.alibaba.fastjson.JSONArray dataArray = FastjsonUtil.getJSONArray(data.toString(), "data");
|
|
|
|
+ if (isSuccess) {
|
|
|
|
+ try {
|
|
|
|
+// com.alibaba.fastjson.JSONArray listArray = new com.alibaba.fastjson.JSONArray();
|
|
|
|
+// Gson gson = new Gson();
|
|
|
|
+// PrintStye printStye = gson.fromJson(o.toString(), PrintStye.class);
|
|
|
|
+// if (printStye.getData() == null || printStye.getData().getData() == null){
|
|
|
|
+// return;
|
|
|
|
+// }
|
|
|
|
+// PrintStye.DataBeanX.DataBean data = printStye.getData().getData();
|
|
|
|
+// String json = gson.toJson(data);
|
|
|
|
+// com.alibaba.fastjson.JSONObject resultObject = JSON.parseObject(json);
|
|
|
|
+// listArray.add(new com.alibaba.fastjson.JSONObject(resultObject));
|
|
|
|
+
|
|
|
|
+ com.alibaba.fastjson.JSONArray listArray = new com.alibaba.fastjson.JSONArray();
|
|
|
|
+ String data1 = data.getString("data");
|
|
|
|
+ listArray.add(JSON.parseObject(data1));
|
|
|
|
+ initBreakPopupWindow(listArray);
|
|
|
|
+ }catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void onFail(int flag, String failStr) throws Exception {
|
|
|
|
+ progressDialog.dismiss();
|
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, failStr);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
|
|
private void getRepairStep(String trim) {
|
|
private void getRepairStep(String trim) {
|
|
-// String pi_class = "完工入库单";
|
|
|
|
-// String pi_type = "良品";
|
|
|
|
|
|
+ // String pi_class = "完工入库单";
|
|
|
|
+ // String pi_type = "良品";
|
|
String pi_class = "";
|
|
String pi_class = "";
|
|
String pi_type = "";
|
|
String pi_type = "";
|
|
progressDialog.show();
|
|
progressDialog.show();
|