增加 组装出库

master
wangh 9 months ago
parent 249f0b28f0
commit 7ab203ded4

@ -17,6 +17,9 @@
android:theme="@style/Theme.Jingyuanmes"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".store.AssemblyOutActivity"
android:exported="false" />
<activity
android:name=".store.MaterialPassActivity"
android:exported="true">
@ -34,8 +37,7 @@
android:exported="false" />
<activity
android:name=".store.MaterialOutListActivity"
android:exported="true"/>
android:exported="true" />
<activity
android:name=".store.MaterialInActivity"
android:exported="true" />

@ -19,7 +19,7 @@ public class OutStoreSubmit extends BaseObservable {
private String searchText;
private int outstockAmount = 1;
private String instockBatch;
private int rawOutstockDetailId;
private Long rawOutstockDetailId;
public String getLocationCode() {
return locationCode;
@ -56,13 +56,12 @@ public class OutStoreSubmit extends BaseObservable {
notifyChange();
}
public int getRawOutstockDetailId() {
public Long getRawOutstockDetailId() {
return rawOutstockDetailId;
}
public void setRawOutstockDetailId(int rawOutstockDetailId) {
public void setRawOutstockDetailId(Long rawOutstockDetailId) {
this.rawOutstockDetailId = rawOutstockDetailId;
notifyChange();
}
public void subClear() {

@ -2,6 +2,7 @@ package com.example.jingyuan_mes.entity;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;
/**
* wms_raw_outstock_detail
@ -341,4 +342,23 @@ public class OutstockDetail {
public void setApplyDate(String applyDate) {
this.applyDate = applyDate;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
OutstockDetail that = (OutstockDetail) o;
if (!Objects.equals(locationCode, that.locationCode))
return false;
return Objects.equals(materialBarcode, that.materialBarcode);
}
@Override
public int hashCode() {
int result = locationCode != null ? locationCode.hashCode() : 0;
result = 31 * result + (materialBarcode != null ? materialBarcode.hashCode() : 0);
return result;
}
}

@ -0,0 +1,45 @@
package com.example.jingyuan_mes.store;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import com.example.jingyuan_mes.R;
import com.example.jingyuan_mes.base.BaseActivity;
import com.example.jingyuan_mes.databinding.ActivityAssemblyOutBinding;
public class AssemblyOutActivity extends BaseActivity {
private ActivityAssemblyOutBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = DataBindingUtil.setContentView(this,R.layout.activity_assembly_out);
binding.assemblyOutText.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
if (s.length()==13) {
}
}
});
binding.assemblyOutButton.setOnClickListener(v -> {
binding.assemblyOutText.getText().toString();
});
}
private void submint(String s){
}
}

@ -74,6 +74,17 @@ public class MaterialPassActivity extends BaseActivity {
}
public void outPassSubmit(View view) {
var instockBatch = vm.getInstockBatch();
var locationCode = vm.getLocationCode();
var tag=new OutstockDetail();
tag.setLocationCode(locationCode);
tag.setMaterialBarcode(instockBatch);
var index = list.indexOf(tag);
if (index==-1) {
Toast.makeText(this, "扫描错误", Toast.LENGTH_SHORT).show();
return;
}
vm.setRawOutstockDetailId(list.get(index).getRawOutstockDetailId());
OkGo.<MyResult>post(url + "/wms/mobile/confirmRawOutstock")
.headers("Authorization", SharedPreferencesUtils.getstring("access_token", ""))
.upRequestBody(RequestBody.create(JSON, gson.toJson(vm)))

@ -0,0 +1,48 @@
<?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" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".store.AssemblyOutActivity">
<include
layout="@layout/toolbar"
app:title='@{title,default="组装出库"}'/>
<LinearLayout
android:layout_width="match_parent"
android:layout_marginTop="15dp"
android:layout_marginEnd="5dp"
android:layout_height="55dp">
<TextView
android:layout_width="110dp"
android:layout_height="match_parent"
style="@style/text_title"
android:text="背板条码:"/>
<EditText
android:id="@+id/assembly_out_text"
android:layout_width="match_parent"
android:layout_height="match_parent"
style="@style/text_san"/>
</LinearLayout>
<Button
android:id="@+id/assembly_out_button"
android:layout_width="match_parent"
android:layout_height="55dp"
android:text="提交"
style="@style/button_style"
android:layout_margin="20dp"/>
</LinearLayout>
</layout>
Loading…
Cancel
Save