|
|
@@ -53,7 +53,6 @@ import com.android.volley.toolbox.JsonObjectRequest;
|
|
|
import com.android.volley.toolbox.StringRequest;
|
|
|
import com.bin.david.form.core.SmartTable;
|
|
|
import com.bin.david.form.data.column.Column;
|
|
|
-import com.bin.david.form.data.format.IFormat;
|
|
|
import com.bin.david.form.data.table.TableData;
|
|
|
import com.uas.saiej.R;
|
|
|
import com.uas.saiej.activity.FunctionActivity;
|
|
|
@@ -244,7 +243,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
- mCollectResultTextView.setVisibility(View.VISIBLE);
|
|
|
+ line_caiji.setVisibility(View.VISIBLE);
|
|
|
mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
|
|
|
mCollectResultTextView.setText(null);
|
|
|
JSONArray listArray = dataObject.optJSONArray("nolist");
|
|
|
@@ -357,9 +356,9 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
if (materialInformationBean.getPD_BATCHCODE() != null) {
|
|
|
materialInfo = materialInfo + "; 批号:" + materialInformationBean.getPD_BATCHCODE();
|
|
|
}
|
|
|
- mMaterialInforTextView.setText(materialInfo);
|
|
|
}
|
|
|
} else {
|
|
|
+ mMaterialInforTextView.setVisibility(View.VISIBLE);
|
|
|
mMaterialInforTextView.setText("该出库单已经完成备料");
|
|
|
}
|
|
|
}
|
|
|
@@ -437,11 +436,13 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
|
|
|
private SmartTable mSmartTable;
|
|
|
private Column<String> mProdcodeColumn, mOutqtyColumn,mTypeColumn;
|
|
|
- private Column<Double> mPdaqtyColumn, mDetailColumn;
|
|
|
+ private Column<String> mPdaqtyColumn, mDetailColumn;
|
|
|
private TableData<StockTaskMultipleBean> mTableData;
|
|
|
private TextView mNumTextView;
|
|
|
private CheckBox mCheckBox;
|
|
|
private List<StockTaskMultipleBean> mStockTaskMultipleBeans;
|
|
|
+ private LinearLayout line_caiji;
|
|
|
+ private TextView iocout_collect_text;
|
|
|
|
|
|
@Override
|
|
|
protected int getLayout() {
|
|
|
@@ -476,6 +477,9 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
special_check = root.findViewById(R.id.special_check);
|
|
|
et_client_code = root.findViewById(R.id.et_client_code);
|
|
|
|
|
|
+ line_caiji = root.findViewById(R.id.line_caiji);
|
|
|
+ iocout_collect_text = root.findViewById(R.id.iocout_collect_text);
|
|
|
+
|
|
|
mNumTextView = root.findViewById(R.id.stock_data_summary_num_tv);
|
|
|
mCheckBox = root.findViewById(R.id.stock_data_summary_cb);
|
|
|
mSmartTable = root.findViewById(R.id.stock_data_summary_st);
|
|
|
@@ -483,18 +487,9 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
mTypeColumn = new Column<String>(" 规格 ", "PR_SPEC");
|
|
|
mProdcodeColumn = new Column<String>("物料编号", "PD_PRODCODE");
|
|
|
mOutqtyColumn = new Column<String>("名称", "PR_DETAIL");
|
|
|
- mPdaqtyColumn = new Column<Double>("出库数量", "PD_OUTQTY", new IFormat<Double>() {
|
|
|
- @Override
|
|
|
- public String format(Double aDouble) {
|
|
|
- return CommonUtil.doubleFormat(aDouble);
|
|
|
- }
|
|
|
- });
|
|
|
- mDetailColumn = new Column<Double>("已采集数量", "PD_RESTQTY", new IFormat<Double>() {
|
|
|
- @Override
|
|
|
- public String format(Double aDouble) {
|
|
|
- return CommonUtil.doubleFormat(aDouble);
|
|
|
- }
|
|
|
- });
|
|
|
+
|
|
|
+ mPdaqtyColumn = new Column<String>("出库数量", "PD_OUTQTY");
|
|
|
+ mDetailColumn = new Column<String>("已采集数量", "PD_RESTQTY");
|
|
|
|
|
|
|
|
|
|
|
|
@@ -719,6 +714,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
getNextMaterialInfo();
|
|
|
} else {
|
|
|
CommonUtil.toastNoRepeat(mActivity, getString(R.string.net_not_connect));
|
|
|
+ mMaterialInforTextView.setVisibility(View.VISIBLE);
|
|
|
mMaterialInforTextView.setText(getString(R.string.net_not_connect));
|
|
|
}
|
|
|
|
|
|
@@ -773,8 +769,8 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
StockTaskMultipleBean stockTaskMultipleBean = new StockTaskMultipleBean();
|
|
|
stockTaskMultipleBean.setPD_PRODCODE(FastjsonUtil.getText(dataObject, "PD_PRODCODE"));
|
|
|
stockTaskMultipleBean.setPR_DETAIL(FastjsonUtil.getText(dataObject, "PR_DETAIL"));
|
|
|
- stockTaskMultipleBean.setPD_OUTQTY(FastjsonUtil.getDouble(dataObject, "PD_OUTQTY"));
|
|
|
- stockTaskMultipleBean.setPD_RESTQTY(FastjsonUtil.getDouble(dataObject, "PD_PDAQTY"));
|
|
|
+ stockTaskMultipleBean.setPD_OUTQTY(FastjsonUtil.getText(dataObject, "PD_OUTQTY"));
|
|
|
+ stockTaskMultipleBean.setPD_RESTQTY(FastjsonUtil.getText(dataObject, "PD_PDAQTY"));
|
|
|
//新增型号
|
|
|
stockTaskMultipleBean.setPR_SPEC(FastjsonUtil.getText(dataObject,"PR_SPEC"));
|
|
|
|
|
|
@@ -847,10 +843,10 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
if (materialInformationBean.getData().getPD_BATCHCODE() != null) {
|
|
|
materialInfo = materialInfo + "; 批号:" + materialInformationBean.getData().getPD_BATCHCODE();
|
|
|
}
|
|
|
- if (mMaterialInforTextView != null)
|
|
|
- mMaterialInforTextView.setText(materialInfo);
|
|
|
+
|
|
|
} else {
|
|
|
if (mMaterialInforTextView != null)
|
|
|
+ mMaterialInforTextView.setVisibility(View.VISIBLE);
|
|
|
mMaterialInforTextView.setText("该出库单当前的仓库已经完成备料");
|
|
|
}
|
|
|
}
|
|
|
@@ -861,6 +857,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
progressDialog.dismiss();
|
|
|
String errorMsg = CommonUtil.showErrorToast(volleyError);
|
|
|
if (mMaterialInforTextView != null)
|
|
|
+ mMaterialInforTextView.setVisibility(View.VISIBLE);
|
|
|
mMaterialInforTextView.setText(errorMsg);
|
|
|
}
|
|
|
}) {
|
|
|
@@ -1039,13 +1036,13 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
- mCollectResultTextView.setVisibility(View.VISIBLE);
|
|
|
+ line_caiji.setVisibility(View.VISIBLE);
|
|
|
mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
|
|
|
mCollectResultTextView.setText(null);
|
|
|
JSONArray listArray = dataObject.optJSONArray("nolist");
|
|
|
if (mCollectType.equals("byBarcode") || mCollectType.equals("byBatchcode")) {
|
|
|
- String barcodeResult = "采集成功;" + JsonUtils.optStringNotNull(dataObject, "finishno")
|
|
|
- + "\n条码:" + JsonUtils.optStringNotNull(messageObject, "BAR_CODE")
|
|
|
+ String strings="采集成功" + JsonUtils.optStringNotNull(dataObject, "finishno");
|
|
|
+ String barcodeResult = "条码:" + JsonUtils.optStringNotNull(messageObject, "BAR_CODE")
|
|
|
+ ";数量:" + CommonUtil.doubleFormat(messageObject.optDouble("BAR_REMAIN"))
|
|
|
+ ";批号:" + JsonUtils.optStringNotNull(messageObject, "BAR_BATCHCODE")
|
|
|
+ ";料号:" + JsonUtils.optStringNotNull(messageObject, "BAR_PRODCODE")
|
|
|
@@ -1053,16 +1050,19 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
+ " " + 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"));
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
+// 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"));
|
|
|
+// }
|
|
|
+// }
|
|
|
+ mMaterialInforTextView.setVisibility(View.GONE);
|
|
|
+ iocout_collect_text.setVisibility(View.VISIBLE);
|
|
|
+ iocout_collect_text.setText(strings);
|
|
|
+ iocout_collect_text.setTextColor(getResources().getColor(R.color.green));
|
|
|
mCollectResultTextView.setText(barcodeResult);
|
|
|
mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
|
|
|
|
|
|
@@ -1151,9 +1151,10 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
if (materialInformationBean.getPD_BATCHCODE() != null) {
|
|
|
materialInfo = materialInfo + "; 批号:" + materialInformationBean.getPD_BATCHCODE();
|
|
|
}
|
|
|
- mMaterialInforTextView.setText(materialInfo);
|
|
|
+
|
|
|
}
|
|
|
} else {
|
|
|
+ mMaterialInforTextView.setVisibility(View.VISIBLE);
|
|
|
mMaterialInforTextView.setText("该出库单已经完成备料");
|
|
|
}
|
|
|
}
|
|
|
@@ -1174,13 +1175,15 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
mCollectTypeRadioGroup.setEnabled(true);
|
|
|
CommonUtil.editTextGetFocus(etBarCode);
|
|
|
String errorToast = CommonUtil.showErrorToast(volleyError, true);
|
|
|
- mCollectResultTextView.setVisibility(View.VISIBLE);
|
|
|
+ line_caiji.setVisibility(View.VISIBLE);
|
|
|
+ iocout_collect_text.setVisibility(View.GONE);
|
|
|
mCollectResultTextView.setTextColor(getResources().getColor(R.color.red));
|
|
|
mCollectResultTextView.setText(errorToast);
|
|
|
}
|
|
|
etBarCode.setText(null);
|
|
|
et_client_code.setText(null);
|
|
|
et_client_code.requestFocus();
|
|
|
+ mMaterialInforTextView.setVisibility(View.GONE);
|
|
|
|
|
|
}
|
|
|
}) {
|
|
|
@@ -1810,7 +1813,7 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
- mCollectResultTextView.setVisibility(View.VISIBLE);
|
|
|
+ line_caiji.setVisibility(View.VISIBLE);
|
|
|
mCollectResultTextView.setTextColor(getResources().getColor(R.color.green));
|
|
|
mCollectResultTextView.setText(null);
|
|
|
JSONArray listArray = dataObject.optJSONArray("nolist");
|
|
|
@@ -1925,9 +1928,9 @@ public class IOCOutMakeMaterialOper extends BaseFragment implements View.OnClick
|
|
|
if (materialInformationBean.getPD_BATCHCODE() != null) {
|
|
|
materialInfo = materialInfo + "; 批号:" + materialInformationBean.getPD_BATCHCODE();
|
|
|
}
|
|
|
- mMaterialInforTextView.setText(materialInfo);
|
|
|
}
|
|
|
} else {
|
|
|
+ mMaterialInforTextView.setVisibility(View.VISIBLE);
|
|
|
mMaterialInforTextView.setText("该出库单已经完成备料");
|
|
|
}
|
|
|
}
|