From febb82da299a21cf8a85a4bb3c7ca570c9eb4294 Mon Sep 17 00:00:00 2001 From: wanghao Date: Fri, 27 Sep 2024 10:44:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E7=BB=84=E8=A3=85?= =?UTF-8?q?=E8=BF=94=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../example/jingyuan_mes/HomePageActivity.java | 3 ++- .../jingyuan_mes/store/AssemblyOutActivity.java | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) 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){