|
|
@@ -114,7 +114,7 @@ import razerdp.basepopup.BasePopupWindow;
|
|
|
* Created by RaoMeng on 2016/7/27.
|
|
|
* 材料出库采集页面
|
|
|
*/
|
|
|
-public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClickListener, RadioGroup.OnCheckedChangeListener, HttpCallback {
|
|
|
+public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClickListener, RadioGroup.OnCheckedChangeListener, HttpCallback {
|
|
|
private static final int SCAN_BARCODE_CODE = 103;
|
|
|
private static final int SPLIT_BARCODE_SUCCESS = 104;
|
|
|
private static final int SPLIT_BARCODE_FAIL = 105;
|
|
|
@@ -228,7 +228,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
if (messageObject.optBoolean("ISMSD")) {
|
|
|
//成功,有返回值,判断返回值message中isMsd是否存在,存在判断if(isMsd)true,弹出显示框
|
|
|
iocOutMakeMaterialOperMsd = JsonTools.parseJsonToBean(jsonObject.toString(), IOCOutMakeMaterialOperMsd.class);
|
|
|
-// Log.i("msdresult", iocOutMakeMaterialOperMsd.toString());
|
|
|
+ // Log.i("msdresult", iocOutMakeMaterialOperMsd.toString());
|
|
|
mBarRemain = CommonUtil.doubleFormat(iocOutMakeMaterialOperMsd.getData().getBarcode().getBAR_REMAIN());
|
|
|
mRestqty = CommonUtil.doubleFormat(iocOutMakeMaterialOperMsd.getData().getBarcode().getRESTQTY());
|
|
|
showDewPopupWindow();
|
|
|
@@ -251,7 +251,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
+ ";数量:" + CommonUtil.doubleFormat(messageObject.optDouble("BAR_REMAIN"))
|
|
|
+ ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
|
|
|
+ ";料号:" + JsonUtils.optStringNotNull(messageObject, "BAR_PRODCODE")
|
|
|
- + ";名称规格:" + messageObject. optString("PR_DETAIL")
|
|
|
+ + ";名称规格:" + messageObject.optString("PR_DETAIL")
|
|
|
+ " " + JsonUtils.optStringNotNull(messageObject, "PR_SPEC")
|
|
|
+ ";仓位:" + JsonUtils.optStringNotNull(messageObject, "BAR_LOCATION");
|
|
|
|
|
|
@@ -265,7 +265,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
}
|
|
|
|
|
|
//弹出拆分结果弹框
|
|
|
- initBreakPopupWindow(listArray,"1");
|
|
|
+ initBreakPopupWindow(listArray, "1");
|
|
|
}
|
|
|
|
|
|
mCollectResultTextView.setText(barcodeResult);
|
|
|
@@ -438,6 +438,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
private ClearableEditText edit_et;
|
|
|
private PopupWindow editPW;
|
|
|
private String pd_prodcode = ""; //物料编号
|
|
|
+ private RecyclerView rv_ip_port_data;
|
|
|
+ private MaterialAdapter materialAdapter;
|
|
|
|
|
|
|
|
|
@Override
|
|
|
@@ -479,7 +481,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
|
|
|
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();
|
|
|
+ // ((FunctionActivity) getActivity()).fragment = new IOCOutMakeMaterialOper();
|
|
|
((FunctionActivity) getActivity()).setMoreBtnVisible(true);
|
|
|
((FunctionActivity) getActivity()).setScanIvVisible(true);
|
|
|
|
|
|
@@ -512,8 +514,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
mCollectModelBtn.setText("离线");
|
|
|
}
|
|
|
|
|
|
- //条码输入框获取焦点
|
|
|
- etBarCode.requestFocus();
|
|
|
+ //料号输入框获取焦点
|
|
|
+ cet_item_number.requestFocus();
|
|
|
|
|
|
tvPiInoutno.setText(pi_inoutno);
|
|
|
tvPdWhcode.setText(pd_whcode);
|
|
|
@@ -549,16 +551,13 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
mPrintDpi = SharedPreUtil.getInt(mActivity, "printDpi", 203);
|
|
|
|
|
|
|
|
|
-
|
|
|
special_check.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
@Override
|
|
|
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
|
|
boolean checked = special_check.isChecked();
|
|
|
- Log.e("checked",checked+"");
|
|
|
+ Log.e("checked", checked + "");
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -644,7 +643,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
@Override
|
|
|
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
|
|
if (keyCode == KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_UP) {
|
|
|
-// getOutbybatch();
|
|
|
+ // getOutbybatch();
|
|
|
return true;
|
|
|
}
|
|
|
return false;
|
|
|
@@ -653,15 +652,14 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
iv_item_number_search.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
|
- String search = cet_item_number.getText().toString().trim();
|
|
|
- getItemNumberData(search);
|
|
|
+ getItemNumberData();
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
private void getOutbybatch() {
|
|
|
try {
|
|
|
- String url = GloableParams.ADDRESS_GETPRODOUTPROD + "?id="+pi_id;
|
|
|
+ String url = GloableParams.ADDRESS_GETPRODOUTPROD + "?id=" + pi_id;
|
|
|
VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
|
|
|
.url(url)
|
|
|
.method(Request.Method.GET)
|
|
|
@@ -698,10 +696,10 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void getItemNumberData(String itemNumber) {
|
|
|
- Log.e("pi_id",pi_id);
|
|
|
+ private void getItemNumberData() {
|
|
|
+ Log.e("pi_id", pi_id);
|
|
|
progressDialog.show();
|
|
|
- String url = GloableParams.ADDRESS_GETPRODOUTPROD+ "?id="+pi_id;
|
|
|
+ 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>() {
|
|
|
@@ -764,13 +762,14 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
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);
|
|
|
+ Button sure_tv = (Button) contView.findViewById(R.id.sure_tv);
|
|
|
+ sure_tv.setVisibility(View.GONE);
|
|
|
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 = 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 = new MaterialAdapter(itemNumberList);
|
|
|
materialAdapter.setmList(itemNumberList);
|
|
|
rv_ip_port_data.setAdapter(materialAdapter);
|
|
|
edit_et.requestFocus();
|
|
|
@@ -823,17 +822,20 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
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)
|
|
|
+ if ((!TextUtils.isEmpty(itemNumberList.get(i).getPD_PRODCODE()) && itemNumberList.get(i).getPD_PRODCODE().contains(mSearchStr))
|
|
|
+ || (!TextUtils.isEmpty(itemNumberList.get(i).getPR_DETAIL()) && itemNumberList.get(i).getPR_DETAIL().contains(mSearchStr))
|
|
|
+ || (!TextUtils.isEmpty(itemNumberList.get(i).getPR_SPEC()) && itemNumberList.get(i).getPR_SPEC().contains(mSearchStr))
|
|
|
) {
|
|
|
thisList.add(itemNumberList.get(i));
|
|
|
}
|
|
|
}
|
|
|
if (thisList.size() > 0) {
|
|
|
- materialAdapter.setmList(thisList);
|
|
|
- }else {
|
|
|
- materialAdapter.setmList(itemNumberList);
|
|
|
+ pd_prodcode = "";
|
|
|
+ //setAdapterData(thisList);
|
|
|
+ materialAdapter.updateList(thisList);
|
|
|
+ } else {
|
|
|
+ setAdapterData(itemNumberList);
|
|
|
+ // materialAdapter.setmList(itemNumberList);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -841,19 +843,19 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
});
|
|
|
|
|
|
//确定
|
|
|
- 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();
|
|
|
- }
|
|
|
- });
|
|
|
+ // 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() {
|
|
|
@@ -866,11 +868,31 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
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();
|
|
|
+ try {
|
|
|
+ List<ItemNumberBean> ipAndPortBeans = materialAdapter.getmList();
|
|
|
+ pd_prodcode = ipAndPortBeans.get(position).getPD_PRODCODE();
|
|
|
+ // edit_et.setText(pd_prodcode);
|
|
|
+ // for (int i = 0; i < ipAndPortBeans.size(); i++) {
|
|
|
+ // if (i == position){
|
|
|
+ // ipAndPortBeans.get(i).setSelect(true);
|
|
|
+ // }else {
|
|
|
+ // ipAndPortBeans.get(i).setSelect(false);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // setAdapterData(ipAndPortBeans);
|
|
|
+ // rv_ip_port_data.scrollToPosition(position);
|
|
|
+ if (StringUtil.isEmpty(pd_prodcode)) {
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "请选择物料编号");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ cet_item_number.setText(pd_prodcode);
|
|
|
+ etBarCode.requestFocus();
|
|
|
+ etBarCode.setSelection(etBarCode.getText().length());
|
|
|
+ startchuku();
|
|
|
+ closeItemNumberPopupWindow();
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
@@ -924,7 +946,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
SharedPreUtil.saveString(getActivity().getApplicationContext(), Constants.FLAG.MATERIAL_OUT_COLLECT_TYPE, "byBarcode");
|
|
|
mCollectType = "byBarcode";
|
|
|
|
|
|
-// mBarcodeTableLayout.setVisibility(View.VISIBLE);
|
|
|
+ // mBarcodeTableLayout.setVisibility(View.VISIBLE);
|
|
|
mBarcodeTableLayout.setVisibility(View.GONE);
|
|
|
mBoxTableLayout.setVisibility(View.GONE);
|
|
|
|
|
|
@@ -962,22 +984,22 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
progressDialog.show();
|
|
|
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;
|
|
|
-// }
|
|
|
-// }
|
|
|
+ // 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,
|
|
|
@@ -1030,10 +1052,10 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
/**
|
|
|
* 开始出库
|
|
|
*/
|
|
|
- private void startchuku(){
|
|
|
- Log.e("pi_id",pi_id);
|
|
|
+ private void startchuku() {
|
|
|
+ Log.e("pi_id", pi_id);
|
|
|
progressDialog.show();
|
|
|
- String url = GloableParams.ADDRESS_PAD_STARTPRODOUT+ "?id="+pi_id +"&prodcode="+ cet_item_number.getText().toString().trim();
|
|
|
+ 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>() {
|
|
|
@@ -1041,7 +1063,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
public void onResponse(JSONObject jsonObject) {
|
|
|
progressDialog.dismiss();
|
|
|
try {
|
|
|
- Log.e("jsonObject",jsonObject.toString());
|
|
|
+ Log.e("jsonObject", jsonObject.toString());
|
|
|
JSONObject dataObject = jsonObject.optJSONObject("data");
|
|
|
JSONObject dataData = dataObject.optJSONObject("next");
|
|
|
Object log = dataObject.get("log");
|
|
|
@@ -1055,17 +1077,17 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
String dc = dataData.getString("DC");
|
|
|
mCollectResultTextView.setVisibility(View.VISIBLE);
|
|
|
mCollectResultTextView.setText(log.toString());
|
|
|
- mMaterialInforTextView.setText("物料:"+bar_prodcode
|
|
|
- +"名称:"+pr_detail
|
|
|
- +"规格:"+pr_spec
|
|
|
- +"未备料数:"+pd_restqty
|
|
|
- +"批数量:"+bar_remain
|
|
|
- +"DC:"+dc
|
|
|
+ mMaterialInforTextView.setText("物料:" + bar_prodcode
|
|
|
+ + "名称:" + pr_detail
|
|
|
+ + "规格:" + pr_spec
|
|
|
+ + "未备料数:" + pd_restqty
|
|
|
+ + "批数量:" + bar_remain
|
|
|
+ + "DC:" + dc
|
|
|
);
|
|
|
|
|
|
|
|
|
getNextMaterialInfo();
|
|
|
-// JSONObject messageObject = dataObject.getJSONObject("barcode");
|
|
|
+ // JSONObject messageObject = dataObject.getJSONObject("barcode");
|
|
|
CommonUtil.toastNoRepeat(mActivity, "货架点亮成功");
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
@@ -1099,9 +1121,9 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
/**
|
|
|
* 结束出库
|
|
|
*/
|
|
|
- private void stopchuku(){
|
|
|
+ private void stopchuku() {
|
|
|
progressDialog.show();
|
|
|
- String url = GloableParams.ADDRESS_COMMON_ENDPRODOUT+ "?id="+pi_id + "&prodcode=" + cet_item_number.getText().toString().trim();
|
|
|
+ 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>() {
|
|
|
@@ -1109,14 +1131,14 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
public void onResponse(JSONObject jsonObject) {
|
|
|
progressDialog.dismiss();
|
|
|
try {
|
|
|
- Log.e("jsonObject",jsonObject.toString());
|
|
|
-// JSONObject dataObject = jsonObject.optJSONObject("data");
|
|
|
+ Log.e("jsonObject", jsonObject.toString());
|
|
|
+ // JSONObject dataObject = jsonObject.optJSONObject("data");
|
|
|
String data = FastjsonUtil.getText(jsonObject.toString(), "data");
|
|
|
|
|
|
mCollectResultTextView.setVisibility(View.VISIBLE);
|
|
|
mCollectResultTextView.setTextColor(getResources().getColor(R.color.blue));
|
|
|
mCollectResultTextView.setText(data.toString());
|
|
|
-// JSONObject messageObject = dataObject.getJSONObject("barcode");
|
|
|
+ // JSONObject messageObject = dataObject.getJSONObject("barcode");
|
|
|
CommonUtil.toastNoRepeat(mActivity, data.toString());
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
@@ -1164,15 +1186,15 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
private void barcodeEnterEvent(boolean msdcheck, boolean datecheck) {
|
|
|
progressDialog.show();
|
|
|
boolean checkeds = special_check.isChecked();
|
|
|
-// currentBarcode = etBarCode.getText().toString().trim();
|
|
|
+ // 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
|
|
|
- +"&prodcode="+ cet_item_number.getText().toString().trim();
|
|
|
+ + "&ifspecial=" + checkeds
|
|
|
+ + "&prodcode=" + cet_item_number.getText().toString().trim();
|
|
|
try {
|
|
|
if (mProdOutType != null && mCollectType != null) {
|
|
|
if (mProdOutType.equals("byProdcode")) {
|
|
|
@@ -1183,8 +1205,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
+ pi_id + "&whcode=" + pd_whcode
|
|
|
+ "&type=barcode&msdcheck=" + msdcheck
|
|
|
+ "&datecheck=" + datecheck
|
|
|
- +"&ifspecial="+checkeds
|
|
|
- + "&prodcode=" + cet_item_number.getText().toString().trim();
|
|
|
+ + "&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)
|
|
|
@@ -1193,8 +1215,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
+ pi_id + "&whcode=" + pd_whcode
|
|
|
+ "&type=boxcode&msdcheck=" + msdcheck
|
|
|
+ "&datecheck=" + datecheck
|
|
|
- +"&ifspecial="+checkeds
|
|
|
- + "&prodcode=" + cet_item_number.getText().toString().trim();
|
|
|
+ + "&ifspecial=" + checkeds
|
|
|
+ + "&prodcode=" + cet_item_number.getText().toString().trim();
|
|
|
}
|
|
|
} else if (mProdOutType.equals("byBatch")) {
|
|
|
if (mCollectType.equals("byBarcode")) {
|
|
|
@@ -1204,8 +1226,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
+ pi_id + "&whcode=" + pd_whcode
|
|
|
+ "&type=barcode&msdcheck=" + msdcheck
|
|
|
+ "&datecheck=" + datecheck
|
|
|
- +"&ifspecial="+checkeds
|
|
|
- + "&prodcode=" + cet_item_number.getText().toString().trim();
|
|
|
+ + "&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")
|
|
|
@@ -1213,8 +1235,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
+ pi_id + "&whcode=" + pd_whcode
|
|
|
+ "&type=boxcode&msdcheck=" + msdcheck
|
|
|
+ "&datecheck=" + datecheck
|
|
|
- +"&ifspecial="+checkeds
|
|
|
- + "&prodcode=" + cet_item_number.getText().toString().trim();
|
|
|
+ + "&ifspecial=" + checkeds
|
|
|
+ + "&prodcode=" + cet_item_number.getText().toString().trim();
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -1242,7 +1264,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
etBarCode.setText(null);
|
|
|
|
|
|
JSONObject messageObject = dataObject.getJSONObject("barcode");
|
|
|
-
|
|
|
if (messageObject.has("IFOVER") && messageObject.optBoolean("IFOVER")) {
|
|
|
new AlertDialog.Builder(mActivity)
|
|
|
.setMessage("采集条码[" + messageObject.optString("BAR_CODE") + "]有效期已过,是否继续采集?")
|
|
|
@@ -1276,32 +1297,36 @@ 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");
|
|
|
+ // JSONArray listArray = dataObject.optJSONArray("nolist");
|
|
|
if (mCollectType.equals("byBarcode") || mCollectType.equals("byBatchcode")) {
|
|
|
String barcodeResult = "采集成功!\n"
|
|
|
-// + JsonUtils.optStringNotNull(dataObject, "finishno")
|
|
|
+ // + JsonUtils.optStringNotNull(dataObject, "finishno")
|
|
|
+ "\n条码:" + JsonUtils.optStringNotNull(messageObject, "BAR_CODE")
|
|
|
+ ";数量:" + CommonUtil.doubleFormat(messageObject.optDouble("BAR_REMAIN"))
|
|
|
-// + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
|
|
|
+ // + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
|
|
|
+ ";\n料号:" + JsonUtils.optStringNotNull(messageObject, "BAR_PRODCODE")
|
|
|
- + ";\n名称规格:" + messageObject.optString("PR_DETAIL")+";";
|
|
|
-// + " " + 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);
|
|
|
-// barcodeResult = barcodeResult
|
|
|
-// + "\n单号:" + JsonUtils.optStringNotNull(listObject, "PI_INOUTNO")
|
|
|
-// + ";条码号:" + JsonUtils.optStringNotNull(listObject, "BAR_CODE")
|
|
|
-// + ";数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(listObject, "BAR_REMAIN"));
|
|
|
-// }
|
|
|
-// }
|
|
|
+ + ";\n名称规格:" + messageObject.optString("PR_DETAIL") + ";";
|
|
|
+ // + " " + 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);
|
|
|
+ // barcodeResult = barcodeResult
|
|
|
+ // + "\n单号:" + JsonUtils.optStringNotNull(listObject, "PI_INOUTNO")
|
|
|
+ // + ";条码号:" + JsonUtils.optStringNotNull(listObject, "BAR_CODE")
|
|
|
+ // + ";数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(listObject, "BAR_REMAIN"));
|
|
|
+ // }
|
|
|
+ // }
|
|
|
String finishno = JsonUtils.optStringNotNull(dataObject, "finishno");
|
|
|
- if (!finishno.isEmpty()){
|
|
|
+ if (!finishno.isEmpty()) {
|
|
|
text_finishno.setVisibility(View.VISIBLE);
|
|
|
text_finishno.setText(finishno);
|
|
|
- }else {
|
|
|
+ //包含 当前物料 并且 包含 已完成备料 才弹出物料的放大镜来
|
|
|
+ if (finishno.contains("当前物料") && finishno.contains("已完成备料")){
|
|
|
+ getItemNumberData();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
text_finishno.setVisibility(View.GONE);
|
|
|
}
|
|
|
|
|
|
@@ -1338,15 +1363,15 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
+ " " + 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"));
|
|
|
-// }
|
|
|
-// }
|
|
|
+ // 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));
|
|
|
@@ -1399,7 +1424,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
mMaterialInforTextView.setText("该出库单已经完成备料");
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ etBarCode.requestFocus();
|
|
|
} catch (JSONException e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
@@ -1647,7 +1672,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
clickToFragment(new MaterialOutStockTaskMultipleFragment());
|
|
|
} else {
|
|
|
clickToFragment(new MaterialOutStockTaskMultipleFragment());
|
|
|
-// clickToFragment(new MaterialOutStockTaskFragment());
|
|
|
+ // clickToFragment(new MaterialOutStockTaskFragment());
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
@@ -1677,7 +1702,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
public void onClick(View v) {
|
|
|
closeListPopupWindow();
|
|
|
((FunctionActivity) getActivity()).setMoreBtnVisible(false);
|
|
|
-// ((FunctionActivity) getActivity()).setScanIvVisible(false);
|
|
|
+ // ((FunctionActivity) getActivity()).setScanIvVisible(false);
|
|
|
clickToFragment(new MaterialOutRevocationStockFragment());
|
|
|
}
|
|
|
});
|
|
|
@@ -1687,7 +1712,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
public void onClick(View v) {
|
|
|
closeListPopupWindow();
|
|
|
((FunctionActivity) getActivity()).setMoreBtnVisible(false);
|
|
|
-// ((FunctionActivity) getActivity()).setScanIvVisible(false);
|
|
|
+ // ((FunctionActivity) getActivity()).setScanIvVisible(false);
|
|
|
clickToFragment(new ModifyQuantityOutFragment());
|
|
|
}
|
|
|
});
|
|
|
@@ -1697,7 +1722,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
public void onClick(View v) {
|
|
|
closeListPopupWindow();
|
|
|
((FunctionActivity) getActivity()).setMoreBtnVisible(false);
|
|
|
-// ((FunctionActivity) getActivity()).setScanIvVisible(false);
|
|
|
+ // ((FunctionActivity) getActivity()).setScanIvVisible(false);
|
|
|
clickToFragment(new SpecialMaterialOutFragment());
|
|
|
}
|
|
|
});
|
|
|
@@ -1846,7 +1871,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
case R.id.btn_dew_cancel:
|
|
|
//点击取消按钮,关闭窗口
|
|
|
closePopupWindow();
|
|
|
-// clearAll();
|
|
|
+ // clearAll();
|
|
|
break;
|
|
|
case R.id.iocout_collect_model_btn:
|
|
|
if (mCollectModelBtn.getText().toString().trim().equals("在线")) {
|
|
|
@@ -1961,8 +1986,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
|
|
|
} else {
|
|
|
Toast.makeText(mActivity, "出烘烤失败", Toast.LENGTH_LONG).show();
|
|
|
-// etBarCode.setText("");
|
|
|
-// CommonUtil.editTextGetFocus(etBarCode);
|
|
|
+ // etBarCode.setText("");
|
|
|
+ // CommonUtil.editTextGetFocus(etBarCode);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -2044,7 +2069,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
if (messageObject.optBoolean("ISMSD")) {
|
|
|
//成功,有返回值,判断返回值message中isMsd是否存在,存在判断if(isMsd)true,弹出显示框
|
|
|
iocOutMakeMaterialOperMsd = JsonTools.parseJsonToBean(jsonObject.toString(), IOCOutMakeMaterialOperMsd.class);
|
|
|
-// Log.i("msdresult", iocOutMakeMaterialOperMsd.toString());
|
|
|
+ // Log.i("msdresult", iocOutMakeMaterialOperMsd.toString());
|
|
|
mBarRemain = CommonUtil.doubleFormat(iocOutMakeMaterialOperMsd.getData().getBarcode().getBAR_REMAIN());
|
|
|
mRestqty = CommonUtil.doubleFormat(iocOutMakeMaterialOperMsd.getData().getBarcode().getRESTQTY());
|
|
|
showDewPopupWindow();
|
|
|
@@ -2063,32 +2088,32 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
JSONArray listArray = dataObject.optJSONArray("nolist");
|
|
|
if (mCollectType.equals("byBarcode") || mCollectType.equals("byBatchcode")) {
|
|
|
String barcodeResult = "采集成功!"
|
|
|
-// + JsonUtils.optStringNotNull(dataObject, "finishno")
|
|
|
+ // + JsonUtils.optStringNotNull(dataObject, "finishno")
|
|
|
+ "\n条码:" + JsonUtils.optStringNotNull(messageObject, "BAR_CODE")
|
|
|
+ ";数量:" + CommonUtil.doubleFormat(messageObject.optDouble("BAR_REMAIN"))
|
|
|
-// + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
|
|
|
+ // + ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
|
|
|
+ ";\n料号:" + JsonUtils.optStringNotNull(messageObject, "BAR_PRODCODE")
|
|
|
+ ";\n名称规格:" + messageObject.optString("PR_DETAIL");
|
|
|
-// + " " + JsonUtils.optStringNotNull(messageObject, "PR_SPEC")
|
|
|
-// + ";仓位:" + JsonUtils.optStringNotNull(messageObject, "BAR_LOCATION");
|
|
|
+ // + " " + 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);
|
|
|
-// barcodeResult = barcodeResult
|
|
|
-// + "\n单号:" + JsonUtils.optStringNotNull(listObject, "PI_INOUTNO")
|
|
|
-// + ";条码号:" + JsonUtils.optStringNotNull(listObject, "BAR_CODE")
|
|
|
-// + ";数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(listObject, "BAR_REMAIN"));
|
|
|
-// }
|
|
|
+ // for (int i = 0; i < listArray.length(); i++) {
|
|
|
+ // JSONObject listObject = listArray.optJSONObject(i);
|
|
|
+ // barcodeResult = barcodeResult
|
|
|
+ // + "\n单号:" + JsonUtils.optStringNotNull(listObject, "PI_INOUTNO")
|
|
|
+ // + ";条码号:" + JsonUtils.optStringNotNull(listObject, "BAR_CODE")
|
|
|
+ // + ";数量:" + CommonUtil.doubleFormat(JsonUtils.optDoubleNotNull(listObject, "BAR_REMAIN"));
|
|
|
+ // }
|
|
|
|
|
|
//弹出拆分结果弹框
|
|
|
- initBreakPopupWindow(listArray,"1");
|
|
|
+ initBreakPopupWindow(listArray, "1");
|
|
|
}
|
|
|
String finishno = JsonUtils.optStringNotNull(dataObject, "finishno");
|
|
|
- if (!finishno.isEmpty()){
|
|
|
+ if (!finishno.isEmpty()) {
|
|
|
text_finishno.setVisibility(View.VISIBLE);
|
|
|
text_finishno.setText(finishno);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
text_finishno.setVisibility(View.GONE);
|
|
|
}
|
|
|
|
|
|
@@ -2457,7 +2482,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
PdaApplication.mRequestQueue.add(stringRequest);*/
|
|
|
}
|
|
|
|
|
|
- protected void initBreakPopupWindow(JSONArray listArray,String bolle) {
|
|
|
+ protected void initBreakPopupWindow(JSONArray listArray, String bolle) {
|
|
|
messages.clear();
|
|
|
for (int i = 0; i < listArray.length(); i++) {
|
|
|
try {
|
|
|
@@ -2465,12 +2490,12 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
|
|
|
if (barcodeObject != null) {
|
|
|
WHBreakingBatchBreakingBtnClickEvent.DataBean dataBean = new WHBreakingBatchBreakingBtnClickEvent.DataBean();
|
|
|
- if (bolle.equals("true")){
|
|
|
+ if (bolle.equals("true")) {
|
|
|
dataBean.setBAR_CODE(JsonUtils.optStringNotNull(barcodeObject, "BAR_CODE"));
|
|
|
dataBean.setBAR_REMAIN(JsonUtils.optStringNotNull(barcodeObject, "BAR_REMAIN"));
|
|
|
dataBean.setPR_CODE(JsonUtils.optStringNotNull(barcodeObject, "PR_CODE"));
|
|
|
dataBean.setPR_SPEC(JsonUtils.optStringNotNull(barcodeObject, "PR_SPEC"));
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
dataBean.setBAR_CODE(JsonUtils.optStringNotNull(barcodeObject, "BAR_CODE"));
|
|
|
dataBean.setBAR_REMAIN(JsonUtils.optStringNotNull(barcodeObject, "BAR_REMAIN"));
|
|
|
}
|
|
|
@@ -2545,7 +2570,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
@Override
|
|
|
public void onDismiss() {
|
|
|
closeSplitPopupWindow();
|
|
|
-// confirmEvent();
|
|
|
+ // confirmEvent();
|
|
|
}
|
|
|
});
|
|
|
CommonUtil.setBackgroundAlpha(mActivity, 0.5f);
|
|
|
@@ -2670,9 +2695,9 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
if (TextUtils.isEmpty(currentBarcode)) {
|
|
|
CommonUtil.toastNoRepeat(getActivity(), "请输入号码");
|
|
|
}
|
|
|
-// else if (!currentBarcode.matches(Constants.REGEX.NO_CN_SYMBOL)) {
|
|
|
-// CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.barcode_cannot_contain_special));
|
|
|
-// }
|
|
|
+ // else if (!currentBarcode.matches(Constants.REGEX.NO_CN_SYMBOL)) {
|
|
|
+ // CommonUtil.toastNoRepeat(getActivity(), getResources().getString(R.string.barcode_cannot_contain_special));
|
|
|
+ // }
|
|
|
else {
|
|
|
if (mCollectModel == 1) {
|
|
|
if (CommonUtil.isNetWorkConnected(getActivity())) {
|
|
|
@@ -2903,7 +2928,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
@Override
|
|
|
public void onResponse(String s) {
|
|
|
LogUtil.e("已空", s + "");
|
|
|
-// progressDialog.dismiss();
|
|
|
+ // progressDialog.dismiss();
|
|
|
CommonUtil.toastNoRepeat(getActivity(), "已清空采集数据");
|
|
|
getCollectNotListOnline(pi_id, pd_whcode);
|
|
|
}
|
|
|
@@ -2913,7 +2938,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
progressDialog.dismiss();
|
|
|
if (getActivity() != null) {
|
|
|
closeListPopupWindow();
|
|
|
-// getCollectNotListOnline(pi_id, pd_whcode);
|
|
|
+ // getCollectNotListOnline(pi_id, pd_whcode);
|
|
|
CommonUtil.showErrorToast(volleyError);
|
|
|
}
|
|
|
}
|
|
|
@@ -3076,11 +3101,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 清除所有信息
|
|
|
*/
|
|
|
@@ -3142,7 +3162,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
TableLPRODIONEEDGET tableLPRODIONEEDGET = allLprodioneedgets.get(i);
|
|
|
if (tableLPRODIONEEDGET.getLPN_PIID() == deleteLbarcodeio.getLBI_PIID()
|
|
|
&& tableLPRODIONEEDGET.getLPN_WHCODE().equals(deleteLbarcodeio.getLBI_WHCODE())
|
|
|
-// && tableLPRODIONEEDGET.getLPN_PRODCODE().equals(deleteLbarcodeio.getLBI_PRODCODE())
|
|
|
+ // && tableLPRODIONEEDGET.getLPN_PRODCODE().equals(deleteLbarcodeio.getLBI_PRODCODE())
|
|
|
) {
|
|
|
tableLPRODIONEEDGET.setLPN_RESTQTY(CommonUtil.doubleAddition(tableLPRODIONEEDGET.getLPN_RESTQTY(), deleteLbarcodeio.getLBI_INQTY()));
|
|
|
mDbManager.updateProductWaitCollect(tableLPRODIONEEDGET);
|
|
|
@@ -3159,13 +3179,18 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
}
|
|
|
}
|
|
|
}).show();
|
|
|
-// ((FunctionActivity) getActivity()).fragment = new MaterialStorageFragment();
|
|
|
+ // ((FunctionActivity) getActivity()).fragment = new MaterialStorageFragment();
|
|
|
return true;
|
|
|
} else {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void setAdapterData(List<ItemNumberBean> mList) {
|
|
|
+ LogUtil.i("mList", JSON.toJSONString(mList));
|
|
|
+ materialAdapter.setmList(mList);
|
|
|
+ //rv_ip_port_data.setAdapter(materialAdapter);
|
|
|
+ }
|
|
|
|
|
|
private class MaterialAdapter extends BaseQuickAdapter<ItemNumberBean, BaseViewHolder> {
|
|
|
private List<ItemNumberBean> mmmmList;
|
|
|
@@ -3176,7 +3201,13 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
|
|
|
public void setmList(List<ItemNumberBean> mList) {
|
|
|
this.mmmmList = mList;
|
|
|
- notifyDataSetChanged();
|
|
|
+ this.notifyDataSetChanged();
|
|
|
+ }
|
|
|
+
|
|
|
+ public void updateList(List<ItemNumberBean> mList) {
|
|
|
+ mmmmList.clear();
|
|
|
+ mmmmList.addAll(mList);
|
|
|
+ this.notifyDataSetChanged();
|
|
|
}
|
|
|
|
|
|
public ItemNumberBean getBeanByPositon(int position) {
|
|
|
@@ -3197,7 +3228,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
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 {
|
|
|
+ } else {
|
|
|
helper.setBackgroundColor(R.id.ll_item_bg, getResources().getColor(R.color.white));
|
|
|
}
|
|
|
}
|