|
|
@@ -11,8 +11,12 @@ import android.net.Uri;
|
|
|
import android.os.Bundle;
|
|
|
import android.os.Handler;
|
|
|
import android.os.Message;
|
|
|
+import android.support.annotation.Nullable;
|
|
|
import android.support.v4.app.Fragment;
|
|
|
import android.support.v7.app.AlertDialog;
|
|
|
+import android.support.v7.widget.DividerItemDecoration;
|
|
|
+import android.support.v7.widget.LinearLayoutManager;
|
|
|
+import android.support.v7.widget.RecyclerView;
|
|
|
import android.text.Editable;
|
|
|
import android.text.TextUtils;
|
|
|
import android.text.TextWatcher;
|
|
|
@@ -22,6 +26,7 @@ import android.view.KeyEvent;
|
|
|
import android.view.LayoutInflater;
|
|
|
import android.view.View;
|
|
|
import android.view.ViewGroup;
|
|
|
+import android.view.Window;
|
|
|
import android.view.inputmethod.EditorInfo;
|
|
|
import android.widget.AdapterView;
|
|
|
import android.widget.ArrayAdapter;
|
|
|
@@ -51,12 +56,15 @@ import com.android.volley.VolleyError;
|
|
|
import com.android.volley.toolbox.HttpHeaderParser;
|
|
|
import com.android.volley.toolbox.JsonObjectRequest;
|
|
|
import com.android.volley.toolbox.StringRequest;
|
|
|
+import com.chad.library.adapter.base.BaseQuickAdapter;
|
|
|
+import com.chad.library.adapter.base.BaseViewHolder;
|
|
|
import com.uas.uas_mes_stw.R;
|
|
|
import com.uas.uas_mes_stw.activity.FunctionActivity;
|
|
|
import com.uas.uas_mes_stw.application.PdaApplication;
|
|
|
import com.uas.uas_mes_stw.bean.ErrorMsg;
|
|
|
import com.uas.uas_mes_stw.bean.IOCOutMakeMaterialOperMsd;
|
|
|
import com.uas.uas_mes_stw.bean.IOCOutmakeMaterialSplitBean;
|
|
|
+import com.uas.uas_mes_stw.bean.ItemNumberBean;
|
|
|
import com.uas.uas_mes_stw.bean.MaterialInformationBean;
|
|
|
import com.uas.uas_mes_stw.bean.SubmitNotParam;
|
|
|
import com.uas.uas_mes_stw.bean.WHBreakingBatchBreakingBtnClickEvent;
|
|
|
@@ -78,6 +86,7 @@ import com.uas.uas_mes_stw.util.JsonTools;
|
|
|
import com.uas.uas_mes_stw.util.JsonUtils;
|
|
|
import com.uas.uas_mes_stw.util.LogUtil;
|
|
|
import com.uas.uas_mes_stw.util.PrintUtils;
|
|
|
+import com.uas.uas_mes_stw.util.StringUtil;
|
|
|
import com.uas.uas_mes_stw.util.VolleyRequest;
|
|
|
import com.uas.uas_mes_stw.view.ClearableEditText;
|
|
|
import com.uuzuche.lib_zxing.activity.CaptureActivity;
|
|
|
@@ -99,6 +108,7 @@ import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
import butterknife.ButterKnife;
|
|
|
import okhttp3.OkHttpClient;
|
|
|
+import razerdp.basepopup.BasePopupWindow;
|
|
|
|
|
|
/**
|
|
|
* Created by RaoMeng on 2016/7/27.
|
|
|
@@ -110,8 +120,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;
|
|
|
@@ -133,6 +141,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
private String mBarRemain, mRestqty;
|
|
|
private String mResult1, mResult2, mResult3, mResult4;
|
|
|
private List<String> mResults;
|
|
|
+ private List<ItemNumberBean> itemNumberList; //料号数据
|
|
|
|
|
|
private TextWatcher watcher = new TextWatcher() {
|
|
|
@Override
|
|
|
@@ -424,6 +433,11 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
private TextView text_finishno;
|
|
|
private Button btn_startoutku;
|
|
|
private Button btn_stopoutku;
|
|
|
+ private ClearableEditText cet_item_number;
|
|
|
+ private ImageView iv_item_number_search;
|
|
|
+ private ClearableEditText edit_et;
|
|
|
+ private PopupWindow editPW;
|
|
|
+ private String pd_prodcode = ""; //物料编号
|
|
|
|
|
|
|
|
|
@Override
|
|
|
@@ -460,6 +474,9 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
btn_startoutku = root.findViewById(R.id.btn_startoutku);
|
|
|
btn_stopoutku = root.findViewById(R.id.btn_stopoutku);
|
|
|
|
|
|
+ cet_item_number = root.findViewById(R.id.cet_item_number);
|
|
|
+ iv_item_number_search = root.findViewById(R.id.iv_item_number_search);
|
|
|
+
|
|
|
text_finishno = root.findViewById(R.id.text_finishno);
|
|
|
((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(getString(R.string.out_material_collect));
|
|
|
// ((FunctionActivity) getActivity()).fragment = new IOCOutMakeMaterialOper();
|
|
|
@@ -487,7 +504,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
}
|
|
|
|
|
|
ButterKnife.bind(this, root);
|
|
|
-
|
|
|
+ itemNumberList = new ArrayList<>();
|
|
|
mResults = new ArrayList<>();
|
|
|
if (mCollectModel == 1) {
|
|
|
mCollectModelBtn.setText("在线");
|
|
|
@@ -546,7 +563,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
|
|
|
@Override
|
|
|
protected void initEvents() {
|
|
|
-
|
|
|
btnActionbarRight.setOnClickListener(this);
|
|
|
etBarCode.addTextChangedListener(watcher);
|
|
|
mCollectTypeRadioGroup.setOnCheckedChangeListener(this);
|
|
|
@@ -602,6 +618,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
startchuku();
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
btn_stopoutku.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
@@ -623,8 +640,250 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
.show();
|
|
|
}
|
|
|
});
|
|
|
+ cet_item_number.setOnKeyListener(new View.OnKeyListener() {
|
|
|
+ @Override
|
|
|
+ public boolean onKey(View v, int keyCode, KeyEvent event) {
|
|
|
+ if (keyCode == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_UP) {
|
|
|
+// getOutbybatch();
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ iv_item_number_search.setOnClickListener(new View.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+ String search = cet_item_number.getText().toString().trim();
|
|
|
+ getItemNumberData(search);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ private void getOutbybatch() {
|
|
|
+ try {
|
|
|
+ String url = GloableParams.ADDRESS_GETPRODOUTPROD + "?id="+pi_id;
|
|
|
+ VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
|
|
|
+ .url(url)
|
|
|
+ .method(Request.Method.GET)
|
|
|
+ .build(), new HttpCallback() {
|
|
|
+ @Override
|
|
|
+ public void onSuccess(int flag, Object o) throws Exception {
|
|
|
+ progressDialog.dismiss();
|
|
|
+ try {
|
|
|
+ //FastjsonUtil.getJSONObject(o.toString(), "success");
|
|
|
+ JSONObject jsonObject = new JSONObject(o.toString());
|
|
|
+ boolean success = jsonObject.getBoolean("success");
|
|
|
+ if (success) {
|
|
|
+ JSONArray dataArray = jsonObject.getJSONArray("data");
|
|
|
+ if (dataArray == null) {
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "未搜索到匹配数据");
|
|
|
+ } else {
|
|
|
+ handleItemNumberData(dataArray);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (JSONException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onFail(int flag, String failStr) throws Exception {
|
|
|
+ progressDialog.dismiss();
|
|
|
+ CommonUtil.toastNoRepeat(getActivity(), failStr);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } catch (Exception e) {
|
|
|
+ progressDialog.dismiss();
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+ private void getItemNumberData(String itemNumber) {
|
|
|
+ Log.e("pi_id",pi_id);
|
|
|
+ progressDialog.show();
|
|
|
+ String url = GloableParams.ADDRESS_GETPRODOUTPROD+ "?id="+pi_id;
|
|
|
+ PdaApplication.mRequestQueue.cancelAll(TAG);
|
|
|
+ mCollectTypeRadioGroup.setEnabled(false);
|
|
|
+ jsonRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {
|
|
|
+ @Override
|
|
|
+ public void onResponse(JSONObject jsonObject) {
|
|
|
+ progressDialog.dismiss();
|
|
|
+ try {
|
|
|
+ String success = jsonObject.getString("success");
|
|
|
+ if (success.equals("true")) {
|
|
|
+ JSONArray dataArray = jsonObject.getJSONArray("data");
|
|
|
+ if (dataArray == null) {
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "未搜索到匹配数据");
|
|
|
+ } else {
|
|
|
+ handleItemNumberData(dataArray);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, new Response.ErrorListener() {
|
|
|
+ @Override
|
|
|
+ public void onErrorResponse(VolleyError volleyError) {
|
|
|
+ progressDialog.dismiss();
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, volleyError.getMessage());
|
|
|
+
|
|
|
+ }
|
|
|
+ }) {
|
|
|
+ @Override
|
|
|
+ public Map<String, String> getHeaders() throws AuthFailureError {
|
|
|
+ return VolleyUtil.getVolleyUtil().setCookies();
|
|
|
+ }
|
|
|
+ };
|
|
|
+ jsonRequest.setRetryPolicy(new DefaultRetryPolicy(10 * 1000, 0, 1f));
|
|
|
+ jsonRequest.setTag(TAG);
|
|
|
+ PdaApplication.mRequestQueue.add(jsonRequest);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void handleItemNumberData(JSONArray dataArray) {
|
|
|
+ ItemNumberBean bean = null;
|
|
|
+ itemNumberList.clear();
|
|
|
+ for (int i = 0; i < dataArray.length(); i++) {
|
|
|
+ try {
|
|
|
+ JSONObject jsonObject = dataArray.getJSONObject(i);
|
|
|
+ bean = new ItemNumberBean();
|
|
|
+ bean.setPD_PRODCODE(jsonObject.getString("PD_PRODCODE"));
|
|
|
+ bean.setPD_OUTQTY(jsonObject.getInt("PD_OUTQTY"));
|
|
|
+ bean.setV_RESQTY(jsonObject.getInt("V_RESQTY"));
|
|
|
+ bean.setPR_DETAIL(jsonObject.getString("PR_DETAIL"));
|
|
|
+ bean.setPR_DETAIL(jsonObject.getString("PR_SPEC"));
|
|
|
+ bean.setSelect(false);
|
|
|
+ itemNumberList.add(bean);
|
|
|
+ } catch (JSONException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ initresourcesPopupWindow();
|
|
|
+ }
|
|
|
+
|
|
|
+ private void initresourcesPopupWindow() {
|
|
|
+ View contView = LayoutInflater.from(mActivity).inflate(R.layout.index_recycle_item, null);
|
|
|
+ edit_et = (ClearableEditText) contView.findViewById(R.id.edit_et);
|
|
|
+ TextView sure_tv = (TextView) contView.findViewById(R.id.sure_tv);
|
|
|
+ TextView cancle_tv = (TextView) contView.findViewById(R.id.cancle_tv);
|
|
|
+ ImageView search_im = contView.findViewById(R.id.search_im);
|
|
|
+ RecyclerView rv_ip_port_data = contView.findViewById(R.id.rv_ip_port_data);
|
|
|
+ rv_ip_port_data.addItemDecoration(new DividerItemDecoration(mActivity, LinearLayout.VERTICAL));
|
|
|
+ rv_ip_port_data.setLayoutManager(new LinearLayoutManager(mActivity));
|
|
|
+ MaterialAdapter materialAdapter = new MaterialAdapter(itemNumberList);
|
|
|
+ materialAdapter.setmList(itemNumberList);
|
|
|
+ rv_ip_port_data.setAdapter(materialAdapter);
|
|
|
+ edit_et.requestFocus();
|
|
|
+ editPW = new PopupWindow(contView, LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
|
|
|
+ editPW.setTouchable(true);
|
|
|
+ editPW.setBackgroundDrawable(new BitmapDrawable());
|
|
|
+ editPW.setOnDismissListener(new BasePopupWindow.OnDismissListener() {
|
|
|
+ @Override
|
|
|
+ public void onDismiss() {
|
|
|
+ closeItemNumberPopupWindow();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ View parentView = mActivity.getWindow().findViewById(Window.ID_ANDROID_CONTENT);
|
|
|
+ editPW.showAtLocation(parentView, Gravity.CENTER, 0, 0);
|
|
|
+ CommonUtil.setBackgroundAlpha(mActivity, 0.5f);
|
|
|
+ edit_et.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
|
|
+ @Override
|
|
|
+ public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
|
|
+ if (actionId == EditorInfo.IME_ACTION_DONE
|
|
|
+ || actionId == EditorInfo.IME_ACTION_SEND
|
|
|
+ || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
|
|
|
+ String mSearchStr = edit_et.getText().toString().trim();
|
|
|
+ if (!mSearchStr.isEmpty()) {
|
|
|
+ List<ItemNumberBean> thisList = new ArrayList<>();
|
|
|
+ for (int i = 0; i < itemNumberList.size(); i++) {
|
|
|
+ if (itemNumberList.get(i).getPD_PRODCODE().contains(mSearchStr)
|
|
|
+ || itemNumberList.get(i).getPR_DETAIL().contains(mSearchStr)
|
|
|
+ || itemNumberList.get(i).getPR_SPEC().contains(mSearchStr)
|
|
|
+ ) {
|
|
|
+ thisList.add(itemNumberList.get(i));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (thisList.size() > 0) {
|
|
|
+ materialAdapter.setmList(thisList);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ materialAdapter.setmList(itemNumberList);
|
|
|
+ }
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ search_im.setOnClickListener(new View.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+ String mSearchStr = edit_et.getText().toString().trim();
|
|
|
+ if (!mSearchStr.isEmpty()) {
|
|
|
+ List<ItemNumberBean> thisList = new ArrayList<>();
|
|
|
+ for (int i = 0; i < itemNumberList.size(); i++) {
|
|
|
+ if (itemNumberList.get(i).getPD_PRODCODE().contains(mSearchStr)
|
|
|
+ || itemNumberList.get(i).getPR_DETAIL().contains(mSearchStr)
|
|
|
+ || itemNumberList.get(i).getPR_SPEC().contains(mSearchStr)
|
|
|
+ ) {
|
|
|
+ thisList.add(itemNumberList.get(i));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (thisList.size() > 0) {
|
|
|
+ materialAdapter.setmList(thisList);
|
|
|
+ }else {
|
|
|
+ materialAdapter.setmList(itemNumberList);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ //确定
|
|
|
+ sure_tv.setOnClickListener(new View.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+ if (StringUtil.isEmpty(pd_prodcode)) {
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "请选择物料编号");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ cet_item_number.setText(pd_prodcode);
|
|
|
+ cet_item_number.requestFocus();
|
|
|
+ cet_item_number.setSelection(cet_item_number.getText().length());
|
|
|
+ closeItemNumberPopupWindow();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ //取消
|
|
|
+ cancle_tv.setOnClickListener(new View.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+ closeItemNumberPopupWindow();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ materialAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
|
|
|
+ List<ItemNumberBean> ipAndPortBeans = materialAdapter.getmList();
|
|
|
+ pd_prodcode = ipAndPortBeans.get(position).getPD_PRODCODE();
|
|
|
+ edit_et.setText(pd_prodcode);
|
|
|
+ ipAndPortBeans.get(position).setSelect(true);
|
|
|
+ materialAdapter.notifyDataSetChanged();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ private void closeItemNumberPopupWindow() {
|
|
|
+ if (editPW != null) {
|
|
|
+ editPW.dismiss();
|
|
|
+ editPW = null;
|
|
|
+ CommonUtil.setBackgroundAlpha(mActivity, 1f);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 采集方式切换成箱号
|
|
|
*/
|
|
|
@@ -701,22 +960,24 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
*/
|
|
|
private void getNextMaterialInfo() {
|
|
|
progressDialog.show();
|
|
|
- String url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH + "?pi_id=" + pi_id + "&pd_whcode=" + pd_whcode;
|
|
|
-// if (!isMultiple) {
|
|
|
- if (false) {
|
|
|
- if (mProdOutType.equals("byProdcode")) {
|
|
|
- url = GloableParams.ADDRESS_OUT_GET_NEXT_PRODCODE + "?pi_id=" + pi_id + "&pd_whcode=" + pd_whcode;
|
|
|
- } else if (mProdOutType.equals("byBatch")) {
|
|
|
- url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH + "?pi_id=" + pi_id + "&pd_whcode=" + pd_whcode;
|
|
|
- }
|
|
|
- } else {
|
|
|
- url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH_DEAL + "?ids=" + pi_id;
|
|
|
- if (mProdOutType.equals("byProdcode")) {
|
|
|
- url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH_DEAL + "?ids=" + pi_id;
|
|
|
- } else if (mProdOutType.equals("byBatch")) {
|
|
|
- url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH_DEAL + "?ids=" + pi_id;
|
|
|
- }
|
|
|
- }
|
|
|
+ String url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH_DEAL + "?ids=" + pi_id + "&prodcode=" + cet_item_number.getText().toString().trim();
|
|
|
+
|
|
|
+// String url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH + "?pi_id=" + pi_id + "&pd_whcode=" + pd_whcode;
|
|
|
+//// if (!isMultiple) {
|
|
|
+// if (false) {
|
|
|
+// if (mProdOutType.equals("byProdcode")) {
|
|
|
+// url = GloableParams.ADDRESS_OUT_GET_NEXT_PRODCODE + "?pi_id=" + pi_id + "&pd_whcode=" + pd_whcode;
|
|
|
+// } else if (mProdOutType.equals("byBatch")) {
|
|
|
+// url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH + "?pi_id=" + pi_id + "&pd_whcode=" + pd_whcode;
|
|
|
+// }
|
|
|
+// } else {
|
|
|
+// url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH_DEAL + "?ids=" + pi_id;
|
|
|
+// if (mProdOutType.equals("byProdcode")) {
|
|
|
+// url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH_DEAL + "?ids=" + pi_id;
|
|
|
+// } else if (mProdOutType.equals("byBatch")) {
|
|
|
+// url = GloableParams.ADDRESS_OUT_GET_NEXT_BATCH_DEAL + "?ids=" + pi_id;
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
PdaApplication.mRequestQueue.cancelAll(TAG + "getnext");
|
|
|
mStringRequest = new StringRequest(Request.Method.GET, url,
|
|
|
@@ -772,7 +1033,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
private void startchuku(){
|
|
|
Log.e("pi_id",pi_id);
|
|
|
progressDialog.show();
|
|
|
- String url = GloableParams.ADDRESS_PAD_STARTPRODOUT+ "?id="+pi_id;
|
|
|
+ String url = GloableParams.ADDRESS_PAD_STARTPRODOUT+ "?id="+pi_id +"&prodcode="+ cet_item_number.getText().toString().trim();
|
|
|
PdaApplication.mRequestQueue.cancelAll(TAG);
|
|
|
mCollectTypeRadioGroup.setEnabled(false);
|
|
|
jsonRequest = new JsonObjectRequest(Request.Method.POST, url, null, new Response.Listener<JSONObject>() {
|
|
|
@@ -840,7 +1101,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
*/
|
|
|
private void stopchuku(){
|
|
|
progressDialog.show();
|
|
|
- String url = GloableParams.ADDRESS_COMMON_ENDPRODOUT+ "?id="+pi_id;
|
|
|
+ String url = GloableParams.ADDRESS_COMMON_ENDPRODOUT+ "?id="+pi_id + "&prodcode=" + cet_item_number.getText().toString().trim();
|
|
|
PdaApplication.mRequestQueue.cancelAll(TAG);
|
|
|
mCollectTypeRadioGroup.setEnabled(false);
|
|
|
jsonRequest = new JsonObjectRequest(Request.Method.POST, url, null, new Response.Listener<JSONObject>() {
|
|
|
@@ -910,7 +1171,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
+ pi_id + "&whcode=" + pd_whcode
|
|
|
+ "&type=barcode&msdcheck=" + msdcheck
|
|
|
+ "&datecheck=" + datecheck
|
|
|
- +"&ifspecial="+checkeds;
|
|
|
+ +"&ifspecial="+checkeds
|
|
|
+ +"&prodcode="+ cet_item_number.getText().toString().trim();
|
|
|
try {
|
|
|
if (mProdOutType != null && mCollectType != null) {
|
|
|
if (mProdOutType.equals("byProdcode")) {
|
|
|
@@ -921,7 +1183,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
+ pi_id + "&whcode=" + pd_whcode
|
|
|
+ "&type=barcode&msdcheck=" + msdcheck
|
|
|
+ "&datecheck=" + datecheck
|
|
|
- +"&ifspecial="+checkeds;
|
|
|
+ +"&ifspecial="+checkeds
|
|
|
+ + "&prodcode=" + cet_item_number.getText().toString().trim();
|
|
|
|
|
|
} else if (mCollectType.equals("byBatchcode")) {
|
|
|
url = (isMultiple ? GloableParams.ADDRESS_OUT_BYBATCH_DEAL : GloableParams.ADDRESS_OUT_BYBATCH_DEAL)
|
|
|
@@ -930,7 +1193,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
+ pi_id + "&whcode=" + pd_whcode
|
|
|
+ "&type=boxcode&msdcheck=" + msdcheck
|
|
|
+ "&datecheck=" + datecheck
|
|
|
- +"&ifspecial="+checkeds;
|
|
|
+ +"&ifspecial="+checkeds
|
|
|
+ + "&prodcode=" + cet_item_number.getText().toString().trim();
|
|
|
}
|
|
|
} else if (mProdOutType.equals("byBatch")) {
|
|
|
if (mCollectType.equals("byBarcode")) {
|
|
|
@@ -940,7 +1204,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
+ pi_id + "&whcode=" + pd_whcode
|
|
|
+ "&type=barcode&msdcheck=" + msdcheck
|
|
|
+ "&datecheck=" + datecheck
|
|
|
- +"&ifspecial="+checkeds;
|
|
|
+ +"&ifspecial="+checkeds
|
|
|
+ + "&prodcode=" + cet_item_number.getText().toString().trim();
|
|
|
} else if (mCollectType.equals("byBatchcode")) {
|
|
|
url = (isMultiple ? GloableParams.ADDRESS_OUT_BYBATCH_DEAL : GloableParams.ADDRESS_OUT_BYBATCH_DEAL)
|
|
|
+ "?barcode=" + URLEncoder.encode(currentBarcode, "utf-8")
|
|
|
@@ -948,7 +1213,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
+ pi_id + "&whcode=" + pd_whcode
|
|
|
+ "&type=boxcode&msdcheck=" + msdcheck
|
|
|
+ "&datecheck=" + datecheck
|
|
|
- +"&ifspecial="+checkeds;
|
|
|
+ +"&ifspecial="+checkeds
|
|
|
+ + "&prodcode=" + cet_item_number.getText().toString().trim();
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -1752,6 +2018,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
.addParam("barcode", currentBarcode)
|
|
|
.addParam("or_remain", mBarRemain)
|
|
|
.addParam("bar_remain", mRestqty)
|
|
|
+ .addParam("prodcode", cet_item_number.getText().toString().trim())
|
|
|
.build(), new HttpCallback() {
|
|
|
@Override
|
|
|
public void onSuccess(int flag, Object o) throws Exception {
|
|
|
@@ -2899,4 +3166,42 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ private class MaterialAdapter extends BaseQuickAdapter<ItemNumberBean, BaseViewHolder> {
|
|
|
+ private List<ItemNumberBean> mmmmList;
|
|
|
+
|
|
|
+ public List<ItemNumberBean> getmList() {
|
|
|
+ return mmmmList;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setmList(List<ItemNumberBean> mList) {
|
|
|
+ this.mmmmList = mList;
|
|
|
+ notifyDataSetChanged();
|
|
|
+ }
|
|
|
+
|
|
|
+ public ItemNumberBean getBeanByPositon(int position) {
|
|
|
+ return mmmmList.get(position);
|
|
|
+ }
|
|
|
+
|
|
|
+ private MaterialAdapter(@Nullable List<ItemNumberBean> data) {
|
|
|
+ super(R.layout.pop_item_material, data);
|
|
|
+ this.mmmmList = data;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void convert(BaseViewHolder helper, ItemNumberBean item) {
|
|
|
+ helper.setText(R.id.tv_material_number, "物料编号: " + item.getPD_PRODCODE());
|
|
|
+ helper.setText(R.id.tv_name, "名称: " + item.getPR_DETAIL());
|
|
|
+ helper.setText(R.id.tv_specs, "规格: " + item.getPR_SPEC());
|
|
|
+ helper.setText(R.id.tv_outbound_number, "出库数量: " + item.getPD_OUTQTY());
|
|
|
+ helper.setText(R.id.tv_unprepared_materials_number, "未备料数量: " + item.getV_RESQTY());
|
|
|
+ if (item.isSelect()) {
|
|
|
+ helper.setBackgroundColor(R.id.ll_item_bg, getResources().getColor(R.color.blue));
|
|
|
+ }else {
|
|
|
+ helper.setBackgroundColor(R.id.ll_item_bg, getResources().getColor(R.color.white));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|