diff --git a/app/src/main/java/com/example/jingyuan_mes/HomePageActivity.java b/app/src/main/java/com/example/jingyuan_mes/HomePageActivity.java index c5cd995..7b2d902 100644 --- a/app/src/main/java/com/example/jingyuan_mes/HomePageActivity.java +++ b/app/src/main/java/com/example/jingyuan_mes/HomePageActivity.java @@ -67,6 +67,7 @@ public class HomePageActivity extends BaseActivity implements ItemClickCall { map.put("原材料出库审批", MaterialOutListActivity.class); map.put("原材料出库", MaterialPassActivity.class); map.put("组装出库", AssemblyOutActivity.class); + map.put("组装返库", AssemblyOutActivity.class); map.put("生产入库", AssemblyOutActivity.class); map.put("原材料退库审批", StockreturnActivity.class); map.put("原材料退库", StockreturnConfirmActivity.class); @@ -133,7 +134,7 @@ public class HomePageActivity extends BaseActivity implements ItemClickCall { if (cls==null) return; var intent = new Intent(this, cls); if (menuName.equals("物料质检列表")||menuName.equals("不合格处置") - ||menuName.equals("组装出库")||menuName.equals("生产入库") + ||menuName.equals("组装出库")||menuName.equals("组装返库")||menuName.equals("生产入库") ||menuName.equals("人工移库")||menuName.equals("人工合库")){ intent.putExtra("title",menuName); } diff --git a/app/src/main/java/com/example/jingyuan_mes/store/AssemblyOutActivity.java b/app/src/main/java/com/example/jingyuan_mes/store/AssemblyOutActivity.java index b3f5105..f3eb58a 100644 --- a/app/src/main/java/com/example/jingyuan_mes/store/AssemblyOutActivity.java +++ b/app/src/main/java/com/example/jingyuan_mes/store/AssemblyOutActivity.java @@ -26,19 +26,33 @@ import okhttp3.RequestBody; public class AssemblyOutActivity extends BaseActivity { private ActivityAssemblyOutBinding binding; private String title; + private String uri; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // 组装出库& 生产入库 binding = DataBindingUtil.setContentView(this, R.layout.activity_assembly_out); title = getIntent().getStringExtra("title"); + switch (title){ + case "组装出库" : + uri="assembleOutstock"; + break; + case "组装返库" : + uri="assembleBack"; + break; + case "生产入库" : + uri="produceInstock"; + break; + + + } binding.setTitle(title); } public void assemblyOutSubmint(View s) { Map map=new HashMap<>(); map.put("materialBarcode",binding.assemblyOutText.getText().toString().trim()); - OkGo.post(url+"/wms/mobile/"+(title.equals("组装出库")?"assembleOutstock":"produceInstock")) + OkGo.post(url+"/wms/mobile/"+uri) .headers("Authorization", SharedPreferencesUtils.getstring("access_token", "")) .upRequestBody(RequestBody.create(JSON,gson.toJson(map))) .execute(new MyRecultCall(dialog,this){