|
@@ -103,7 +103,7 @@ import okhttp3.OkHttpClient;
|
|
|
* Created by RaoMeng on 2016/7/27.
|
|
* 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 SCAN_BARCODE_CODE = 103;
|
|
|
private static final int SPLIT_BARCODE_SUCCESS = 104;
|
|
private static final int SPLIT_BARCODE_SUCCESS = 104;
|
|
|
private static final int SPLIT_BARCODE_FAIL = 105;
|
|
private static final int SPLIT_BARCODE_FAIL = 105;
|
|
@@ -255,7 +255,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//弹出拆分结果弹框
|
|
//弹出拆分结果弹框
|
|
|
- initBreakPopupWindow(listArray);
|
|
|
|
|
|
|
+ initBreakPopupWindow(listArray,"1");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
mCollectResultTextView.setText(barcodeResult);
|
|
mCollectResultTextView.setText(barcodeResult);
|
|
@@ -422,6 +422,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
private CheckBox special_check;
|
|
private CheckBox special_check;
|
|
|
private TextView text_finishno;
|
|
private TextView text_finishno;
|
|
|
|
|
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
protected int getLayout() {
|
|
protected int getLayout() {
|
|
|
return R.layout.fragment_iocout_make_material_oper;
|
|
return R.layout.fragment_iocout_make_material_oper;
|
|
@@ -455,7 +456,6 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
special_check = root.findViewById(R.id.special_check);
|
|
special_check = root.findViewById(R.id.special_check);
|
|
|
|
|
|
|
|
text_finishno = root.findViewById(R.id.text_finishno);
|
|
text_finishno = root.findViewById(R.id.text_finishno);
|
|
|
-
|
|
|
|
|
((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(getString(R.string.out_material_collect));
|
|
((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()).setMoreBtnVisible(true);
|
|
@@ -541,6 +541,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
protected void initEvents() {
|
|
protected void initEvents() {
|
|
|
|
|
+
|
|
|
btnActionbarRight.setOnClickListener(this);
|
|
btnActionbarRight.setOnClickListener(this);
|
|
|
etBarCode.addTextChangedListener(watcher);
|
|
etBarCode.addTextChangedListener(watcher);
|
|
|
mCollectTypeRadioGroup.setOnCheckedChangeListener(this);
|
|
mCollectTypeRadioGroup.setOnCheckedChangeListener(this);
|
|
@@ -818,6 +819,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
CommonUtil.toastNoRepeat(mActivity, "采集结果获取失败!");
|
|
CommonUtil.toastNoRepeat(mActivity, "采集结果获取失败!");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ etBarCode.setText(null);
|
|
|
|
|
+
|
|
|
JSONObject messageObject = dataObject.getJSONObject("barcode");
|
|
JSONObject messageObject = dataObject.getJSONObject("barcode");
|
|
|
|
|
|
|
|
if (messageObject.has("IFOVER") && messageObject.optBoolean("IFOVER")) {
|
|
if (messageObject.has("IFOVER") && messageObject.optBoolean("IFOVER")) {
|
|
@@ -1647,7 +1650,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
//弹出拆分结果弹框
|
|
//弹出拆分结果弹框
|
|
|
- initBreakPopupWindow(listArray);
|
|
|
|
|
|
|
+ initBreakPopupWindow(listArray,"1");
|
|
|
}
|
|
}
|
|
|
String finishno = JsonUtils.optStringNotNull(dataObject, "finishno");
|
|
String finishno = JsonUtils.optStringNotNull(dataObject, "finishno");
|
|
|
if (!finishno.isEmpty()){
|
|
if (!finishno.isEmpty()){
|
|
@@ -2022,7 +2025,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
PdaApplication.mRequestQueue.add(stringRequest);*/
|
|
PdaApplication.mRequestQueue.add(stringRequest);*/
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- protected void initBreakPopupWindow(JSONArray listArray) {
|
|
|
|
|
|
|
+ protected void initBreakPopupWindow(JSONArray listArray,String bolle) {
|
|
|
messages.clear();
|
|
messages.clear();
|
|
|
for (int i = 0; i < listArray.length(); i++) {
|
|
for (int i = 0; i < listArray.length(); i++) {
|
|
|
try {
|
|
try {
|
|
@@ -2030,9 +2033,15 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
|
|
|
|
|
if (barcodeObject != null) {
|
|
if (barcodeObject != null) {
|
|
|
WHBreakingBatchBreakingBtnClickEvent.DataBean dataBean = new WHBreakingBatchBreakingBtnClickEvent.DataBean();
|
|
WHBreakingBatchBreakingBtnClickEvent.DataBean dataBean = new WHBreakingBatchBreakingBtnClickEvent.DataBean();
|
|
|
-
|
|
|
|
|
- dataBean.setBAR_CODE(JsonUtils.optStringNotNull(barcodeObject, "BAR_CODE"));
|
|
|
|
|
- dataBean.setBAR_REMAIN(JsonUtils.optDoubleNotNull(barcodeObject, "BAR_REMAIN"));
|
|
|
|
|
|
|
+ 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 {
|
|
|
|
|
+ dataBean.setBAR_CODE(JsonUtils.optStringNotNull(barcodeObject, "BAR_CODE"));
|
|
|
|
|
+ dataBean.setBAR_REMAIN(JsonUtils.optStringNotNull(barcodeObject, "BAR_REMAIN"));
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
messages.add(dataBean);
|
|
messages.add(dataBean);
|
|
|
}
|
|
}
|
|
@@ -2215,7 +2224,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
// tv_bar_code.setText(target.bar_code);
|
|
// tv_bar_code.setText(target.bar_code);
|
|
|
// tv_bar_remain.setText(target.bar_remain);
|
|
// tv_bar_remain.setText(target.bar_remain);
|
|
|
tv_bar_code.setText(person.getBAR_CODE());
|
|
tv_bar_code.setText(person.getBAR_CODE());
|
|
|
- tv_bar_remain.setText(CommonUtil.doubleFormat(person.getBAR_REMAIN()));
|
|
|
|
|
|
|
+ tv_bar_remain.setText(person.getBAR_REMAIN());
|
|
|
return convertView;
|
|
return convertView;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -2635,6 +2644,11 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 清除所有信息
|
|
* 清除所有信息
|
|
|
*/
|
|
*/
|