|
|
|
@ -66,7 +66,7 @@ public class X1Activity extends BaseActivity {
|
|
|
|
|
private ListPopupWindow lpw;
|
|
|
|
|
private List<String> planList;
|
|
|
|
|
private String planId;
|
|
|
|
|
private String zbCode = null;//整包流水号
|
|
|
|
|
private List<String> serialList;//整包流水号
|
|
|
|
|
|
|
|
|
|
// 提交字段
|
|
|
|
|
private X1Submit entrySubmit;
|
|
|
|
@ -77,6 +77,7 @@ public class X1Activity extends BaseActivity {
|
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
|
setContentView(R.layout.activity_x1);
|
|
|
|
|
ButterKnife.bind(this);
|
|
|
|
|
serialList = new ArrayList<>();//初始化流水号
|
|
|
|
|
entrySubmit = new X1Submit();
|
|
|
|
|
scanStates = true;
|
|
|
|
|
x1RecyclerView.setLayoutManager(new LinearLayoutManager(this));
|
|
|
|
@ -111,16 +112,16 @@ public class X1Activity extends BaseActivity {
|
|
|
|
|
double goodsWeight = Double.parseDouble(stringFormatWeight);
|
|
|
|
|
String name1 = info.substring(info.indexOf("-") + 1, info.indexOf("|"));//20230805-0001-CF-130
|
|
|
|
|
String name2 = name1.substring(name1.indexOf("-") + 1, name1.length());
|
|
|
|
|
String name3 = name2.substring(name2.indexOf("-") + 1, name2.length());
|
|
|
|
|
String name3 = name2.substring(name2.indexOf("-") + 1, name2.length());//物料名称
|
|
|
|
|
String lxh = name2.substring(0, name2.indexOf("-"));
|
|
|
|
|
Log.e("TAG", "流水号:" + lxh);
|
|
|
|
|
Log.e("TAG", "物料名称:" + name3);
|
|
|
|
|
if (zbCode == null) {
|
|
|
|
|
checkItem(goodsCode, goodsWeight, "整包", "", name3, lxh);
|
|
|
|
|
} else {
|
|
|
|
|
Toast.makeText(this, "物料已确认", Toast.LENGTH_SHORT).show();
|
|
|
|
|
String plancode = x1PlanCode.getText().toString();
|
|
|
|
|
String zh = plancode + goodsCode + lxh;//流水号组合
|
|
|
|
|
Log.e("TAG", "流水号组合:" + zh);
|
|
|
|
|
if (serialList.contains(zh)) {
|
|
|
|
|
tipDialog.showMsg(false, "相同流水号物料已确认");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
checkItem(goodsCode, goodsWeight, "整包", "", name3, zh);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
Toast.makeText(this, "整包条码错误", Toast.LENGTH_SHORT).show();
|
|
|
|
@ -252,6 +253,7 @@ public class X1Activity extends BaseActivity {
|
|
|
|
|
x1Tong.setText(null);
|
|
|
|
|
x1GoodsCode.setText(null);
|
|
|
|
|
x1GoodsWeight.setText(null);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
Toast.makeText(X1Activity.this, "请求失败,计划条码不正确", Toast.LENGTH_SHORT).show();
|
|
|
|
|
}
|
|
|
|
@ -356,7 +358,7 @@ public class X1Activity extends BaseActivity {
|
|
|
|
|
selectItem.setState(true);
|
|
|
|
|
adapter.notifyDataSetChanged();
|
|
|
|
|
if (matType.equals("整包")) {
|
|
|
|
|
this.zbCode = zbCode;
|
|
|
|
|
serialList.add(zbCode);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
tipDialog.showState(false);
|
|
|
|
|