完善 盘点,新增移库

master
wanghao 3 weeks ago
parent e21b2942d1
commit d5b7f8e336

@ -15,6 +15,9 @@
android:theme="@style/Theme.Haiweimom"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".wms.semi.SeimMoveActivity"
android:exported="false" />
<activity
android:name=".wms.raw.CheckWorkActivity"
android:exported="false" />

@ -35,6 +35,8 @@ public class CheckWorkActivity extends BaseActivity {
private List<WmsInventoryVo> inventorylist;
private CheckWorkAdapter checkWorkAdapter;
private CheckRecordVo checkRecordVo;
private String checkCode;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -42,7 +44,7 @@ public class CheckWorkActivity extends BaseActivity {
Intent intent = getIntent();
list = Arrays.asList(intent.getStringArrayExtra("list"));
binding.setList(list);
String checkCode = intent.getStringExtra("code");
checkCode = intent.getStringExtra("code");
binding.setCode(checkCode);
binding.workListSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
@ -56,9 +58,9 @@ public class CheckWorkActivity extends BaseActivity {
}
});
checkWorkAdapter=new CheckWorkAdapter(this);
checkWorkAdapter = new CheckWorkAdapter(this);
binding.setAdapter(checkWorkAdapter);
checkRecordVo=new CheckRecordVo();
checkRecordVo = new CheckRecordVo();
checkRecordVo.setCheckCode(checkCode);
binding.setData(checkRecordVo);
}
@ -84,16 +86,37 @@ public class CheckWorkActivity extends BaseActivity {
});
}
public void storeCheckWork(View view){
// 完成
public void storeCheckWorkOver(View view) {
OkGo.<MyResult>post(url + "/wms/pda/storeCheck/storeCheckWorkOver")
.params("checkCode", checkCode)
.execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 200) {
finish();
Toast.makeText(CheckWorkActivity.this, "提交成功", Toast.LENGTH_SHORT).show();
return;
}
myToastUitls.show(body.getMsg());
}
});
}
// 提交
public void storeCheckWork(View view) {
String batchCode = checkRecordVo.getBatchCode();
WmsInventoryVo wmsInventoryVo= inventorylist.stream().filter(t->t.getBatchCode().equals(batchCode)).findFirst().get();
WmsInventoryVo wmsInventoryVo = inventorylist.stream().filter(t -> t.getBatchCode().equals(batchCode)).findFirst().get();
checkRecordVo.setMaterialCode(wmsInventoryVo.getMaterialCode());
checkRecordVo.setLocationCode(wmsInventoryVo.getLocationCode());
checkRecordVo.setInventoryQty(wmsInventoryVo.getInventoryQty());
checkRecordVo.setMaterialName(wmsInventoryVo.getMaterialName());
OkGo.<MyResult>post(url + "/wms/pda/storeCheck/submitCheckRecord")
.upRequestBody(RequestBody.create(JSON,gson.toJson(checkRecordVo)))
.upRequestBody(RequestBody.create(JSON, gson.toJson(checkRecordVo)))
.execute(new MyRecultCall(dialog, this) {
@Override

@ -134,10 +134,10 @@ public class StoreCheckActivity extends BaseActivity {
if (body.getCode() == 200) {
WmsInventoryCheck wmsInventoryCheck=gson.fromJson(body.getDataJson(),WmsInventoryCheck.class);
String[] array = list.toArray(new String[0]);
intent.putExtra("list",array);
intent.putExtra("code",wmsInventoryCheck.getCheckCode());
startActivity(intent);
finish();
return;
}
myToastUitls.show(body.getMsg());

@ -0,0 +1,18 @@
package com.example.haiwei_mom.wms.semi;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import com.bigkoo.pickerview.view.OptionsPickerView;
import com.example.haiwei_mom.R;
import com.example.haiwei_mom.base.BaseActivity;
public class SeimMoveActivity extends BaseActivity {
private OptionsPickerView opv;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_seim_move);
}
}

@ -135,7 +135,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:onClick="storeCheck2"
android:onClick="storeCheckWorkOver"
android:text="完成盘点" />
</LinearLayout>
</layout>

@ -0,0 +1,164 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="title"
type="String" />
<variable
name="data"
type="com.example.haiwei_mom.data.SemiOutVo" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".wms.semi.SeimMoveActivity">
<include
layout="@layout/toolbar"
app:title='@{title??"半成品移库"}' />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="110dp"
android:layout_height="match_parent"
android:text="扫描流转卡:" />
<EditText
android:id="@+id/semi_out_code"
style="@style/text_san"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:drawableRight="@mipmap/icon_chaxun" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="110dp"
android:layout_height="match_parent"
android:text="物料编码:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@{data.materialCode}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="110dp"
android:layout_height="match_parent"
android:text="物料规格:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@{data.materialSpec}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="110dp"
android:layout_height="match_parent"
android:text="数量:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginEnd="5dp"
android:layout_weight="1"
android:text='@{String.valueOf(data.storageNum)??"0"}' />
<TextView
style="@style/text_info"
android:layout_width="60dp"
android:layout_height="match_parent"
android:text="@{data.unitName}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="110dp"
android:layout_height="match_parent"
android:text="生产时间:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@{data.createTime}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="110dp"
android:layout_height="match_parent"
android:text="移入库位:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@{data.createTime}" />
</LinearLayout>
<Button
style="@style/button_style"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_margin="20dp"
android:onClick="semiInSubmit"
android:text="提交" />
</LinearLayout>
</layout>
Loading…
Cancel
Save