完成 出库

master
wangh 11 months ago
parent 1ecf04b127
commit 709c63fc30

@ -17,6 +17,12 @@
android:theme="@style/Theme.Jingyuanmes"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".store.SemiActivity"
android:exported="false" />
<activity
android:name=".store.ProductOutInfoActivity"
android:exported="false" />
<activity
android:name=".store.ProductOutActivity"
android:exported="false" />

@ -20,6 +20,7 @@ import com.example.jingyuan_mes.store.MaterialInActivity;
import com.example.jingyuan_mes.store.MaterialOutListActivity;
import com.example.jingyuan_mes.store.MaterialPassActivity;
import com.example.jingyuan_mes.store.ProductInActivity;
import com.example.jingyuan_mes.store.ProductOutActivity;
import com.example.jingyuan_mes.store.ProductOutApplyActivity;
import com.example.jingyuan_mes.store.ProductOutConfirmActivity;
import com.example.jingyuan_mes.store.StockreturnActivity;
@ -60,7 +61,9 @@ public class HomePageActivity extends BaseActivity implements ItemClickCall {
map.put("原材料退库", StockreturnConfirmActivity.class);
map.put("成品入库", ProductInActivity.class);
map.put("成品出库申请", ProductOutApplyActivity.class);
map.put("成品出库", ProductOutActivity.class);
map.put("成品出库确认", ProductOutConfirmActivity.class);
map.put("半成品入成品库", ProductOutConfirmActivity.class);
}
private void initRequest() {

@ -0,0 +1,71 @@
package com.example.jingyuan_mes.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.databinding.DataBindingUtil;
import androidx.recyclerview.widget.RecyclerView;
import com.example.jingyuan_mes.BR;
import com.example.jingyuan_mes.R;
import com.example.jingyuan_mes.databinding.ItemProductOutConfirmBinding;
import com.example.jingyuan_mes.databinding.ItemReturnConfirmBinding;
import com.example.jingyuan_mes.entity.Outstock;
import com.example.jingyuan_mes.entity.ProductConfirm;
import com.example.jingyuan_mes.entity.ProductStock;
import com.example.jingyuan_mes.entity.RawReturn;
import java.util.List;
/**
* @author wanghao
* @date 2024/1/31 15:18
*/
public class ProductOutConfirmAdapter extends RecyclerView.Adapter<ProductOutConfirmAdapter.ItemtViewHolder> {
private List<ProductConfirm> list;
private Context context;
private LayoutInflater inflater;
private ItemClickCall clickCall;
public ProductOutConfirmAdapter(Context context, ItemClickCall clickCall) {
this.context = context;
this.clickCall = clickCall;
inflater = LayoutInflater.from(context);
}
public void setList(List<ProductConfirm> list) {
this.list = list;
}
@NonNull
@Override
public ItemtViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
ItemProductOutConfirmBinding binding = DataBindingUtil.inflate(inflater, R.layout.item_product_out_confirm, parent, false);
return new ItemtViewHolder(binding);
}
@Override
public void onBindViewHolder(@NonNull ItemtViewHolder holder, int position) {
var rawReturn = list.get(position);
var binding = holder.binding;
binding.setVariable(BR.vm,rawReturn);
binding.productOutConfirmLayout.setOnClickListener(v -> clickCall.onClick(position));
}
@Override
public int getItemCount() {
return list==null?0:list.size();
}
class ItemtViewHolder extends RecyclerView.ViewHolder {
private ItemProductOutConfirmBinding binding;
public ItemtViewHolder(ItemProductOutConfirmBinding binding) {
super(binding.getRoot());
this.binding = binding;
}
}
}

@ -0,0 +1,67 @@
package com.example.jingyuan_mes.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.databinding.DataBindingUtil;
import androidx.recyclerview.widget.RecyclerView;
import com.example.jingyuan_mes.BR;
import com.example.jingyuan_mes.R;
import com.example.jingyuan_mes.databinding.ItemReturnInfoBinding;
import com.example.jingyuan_mes.entity.ProductOutstockDetail;
import com.example.jingyuan_mes.entity.RawReturnDetail;
import com.example.jingyuan_mes.store.ProductOutInfoActivity;
import java.util.List;
/**
* @author wanghao
* @date 2024/1/31 15:18
*/
public class ProductOutInfoAdapter extends RecyclerView.Adapter<ProductOutInfoAdapter.MyViewHolder> {
private List<ProductOutstockDetail> list;
private Context context;
private LayoutInflater inflater;
public ProductOutInfoAdapter(Context context) {
this.context = context;
inflater = LayoutInflater.from(context);
}
public void setList(List<ProductOutstockDetail> list) {
this.list = list;
}
@NonNull
@Override
public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
ItemReturnInfoBinding binding = DataBindingUtil.inflate(inflater, R.layout.item_return_info, parent, false);
return new MyViewHolder(binding);
}
@Override
public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
var item = list.get(position);
item.setIndex(position+1);
var binding = holder.binding;
binding.setVariable(BR.vm,item);
}
@Override
public int getItemCount() {
return list==null?0:list.size();
}
class MyViewHolder extends RecyclerView.ViewHolder {
private ItemReturnInfoBinding binding;
public MyViewHolder(ItemReturnInfoBinding binding) {
super(binding.getRoot());
this.binding = binding;
}
}
}

@ -30,7 +30,7 @@ public class BaseActivity extends AppCompatActivity {
public Gson gson;
public MediaType JSON = MediaType.parse("application/json; charset=utf-8");
private MyReceiver myReceiver;
public String handle = "eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6IjczZTJhYjFjLTc5ZDAtNDg5NS04MzE5LWZlYjdlYjAxZmIzMiIsInVzZXJuYW1lIjoiYWRtaW4ifQ.veofmW5UgF7f2qFVuTKMM0qOIvEbAoQ9V0Etf9xJXWHJmOfkTWxGgPlBibXKk-GXBvWGd-CgSM6ljhRu2Pz9xA";
public String handle = "eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6ImVjNTExZWRmLTFhZmUtNGM3NC1hYzY0LWE0NDAzNGYyNjViZCIsInVzZXJuYW1lIjoiYWRtaW4ifQ.o5gRcCOrE9xBzwgy5-emClML29gWyuS9sYW12Nd9XvJrUVBEcrDvemHGIsUm_SVsGuZYPAWjMPN0zSARQ5UHvw";
public Context context;
@Override
protected void onCreate(Bundle savedInstanceState) {

@ -0,0 +1,91 @@
package com.example.jingyuan_mes.entity;
import androidx.databinding.BaseObservable;
import java.util.List;
/**
*
*
* @author wanghao
* @date 2024/2/22 16:31
*/
public class ProductConfirm extends BaseObservable {
private int productOutstockId;
private String planDetailCode;
private String materialName;
private String warehouseName;
/**
*
*/
private String saleorderCode;
private int applyQty;
private int outstockQty;
private List<ProductOutstockDetail> wmsProductOutstockDetailList;
public int getOutstockQty() {
return outstockQty;
}
public void setOutstockQty(int outstockQty) {
this.outstockQty = outstockQty;
}
public List<ProductOutstockDetail> getWmsProductOutstockDetailList() {
return wmsProductOutstockDetailList;
}
public void setWmsProductOutstockDetailList(List<ProductOutstockDetail> wmsProductOutstockDetailList) {
this.wmsProductOutstockDetailList = wmsProductOutstockDetailList;
}
public int getProductOutstockId() {
return productOutstockId;
}
public void setProductOutstockId(int productOutstockId) {
this.productOutstockId = productOutstockId;
}
public String getPlanDetailCode() {
return planDetailCode;
}
public void setPlanDetailCode(String planDetailCode) {
this.planDetailCode = planDetailCode;
}
public String getMaterialName() {
return materialName;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public String getWarehouseName() {
return warehouseName;
}
public void setWarehouseName(String warehouseName) {
this.warehouseName = warehouseName;
}
public String getSaleorderCode() {
return saleorderCode;
}
public void setSaleorderCode(String saleorderCode) {
this.saleorderCode = saleorderCode;
}
public int getApplyQty() {
return applyQty;
}
public void setApplyQty(int applyQty) {
this.applyQty = applyQty;
}
}

@ -0,0 +1,42 @@
package com.example.jingyuan_mes.entity;
/**
* @author wanghao
* @date 2024/2/27 15:42
*/
public class ProductOutSubmit {
/**
* productOutstockId : 1
* locationCode : 123
* productBarcode : 12
*/
private int productOutstockId;
private String locationCode;
private String productBarcode;
public int getProductOutstockId() {
return productOutstockId;
}
public void setProductOutstockId(int productOutstockId) {
this.productOutstockId = productOutstockId;
}
public String getLocationCode() {
return locationCode;
}
public void setLocationCode(String locationCode) {
this.locationCode = locationCode;
}
public String getProductBarcode() {
return productBarcode;
}
public void setProductBarcode(String productBarcode) {
this.productBarcode = productBarcode;
}
}

@ -0,0 +1,116 @@
package com.example.jingyuan_mes.entity;
import java.math.BigDecimal;
import java.util.Date;
/**
* wms_product_outstock_detail
*/
public class ProductOutstockDetail {
private int index;
/**
* ID
*/
private Long productOutstockDetailId;
/**
* ID
*/
private Long productOutstockId;
/**
*
*/
private String locationCode;
/**
*
*/
private String productBarcode;
/**
*
*/
private String productBatch;
/**
* ID
*/
private Long productId;
/**
*
*/
private int planAmount;
/**
*
*/
private int outstockAmount;
public Long getProductOutstockDetailId() {
return productOutstockDetailId;
}
public void setProductOutstockDetailId(Long productOutstockDetailId) {
this.productOutstockDetailId = productOutstockDetailId;
}
public Long getProductOutstockId() {
return productOutstockId;
}
public void setProductOutstockId(Long productOutstockId) {
this.productOutstockId = productOutstockId;
}
public String getLocationCode() {
return locationCode;
}
public void setLocationCode(String locationCode) {
this.locationCode = locationCode;
}
public String getProductBarcode() {
return productBarcode;
}
public void setProductBarcode(String productBarcode) {
this.productBarcode = productBarcode;
}
public String getProductBatch() {
return productBatch;
}
public void setProductBatch(String productBatch) {
this.productBatch = productBatch;
}
public Long getProductId() {
return productId;
}
public void setProductId(Long productId) {
this.productId = productId;
}
public int getPlanAmount() {
return planAmount;
}
public void setPlanAmount(int planAmount) {
this.planAmount = planAmount;
}
public int getOutstockAmount() {
return outstockAmount;
}
public void setOutstockAmount(int outstockAmount) {
this.outstockAmount = outstockAmount;
}
public int getIndex() {
return index;
}
public void setIndex(int index) {
this.index = index;
}
}

@ -46,25 +46,21 @@ public class MaterialPassActivity extends BaseActivity {
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 200) {
if (body.getRows() == null) {
Toast.makeText(MaterialPassActivity.this, "暂无审批完成数据", Toast.LENGTH_SHORT).show();
if (list != null) {
list.clear();
passAdapter.notifyDataSetChanged();
}
return;
if (body.getRows() == null) {
Toast.makeText(context, body.getCode() == 200 ? "暂无审批数据" : body.getMsg(), Toast.LENGTH_SHORT).show();
if (list != null) {
list.clear();
passAdapter.notifyDataSetChanged();
}
list = gson.fromJson(gson.toJson(body.getRows()), new TypeToken<List<OutstockDetail>>() {
}.getType());
passAdapter.setList(list);
passAdapter.notifyDataSetChanged();
} else {
Toast.makeText(MaterialPassActivity.this, body.getMsg(), Toast.LENGTH_SHORT).show();
return;
}
}
});
}
list = gson.fromJson(gson.toJson(body.getRows()), new TypeToken<List<OutstockDetail>>() {}.getType());
passAdapter.setList(list);
passAdapter.notifyDataSetChanged();
}
});
}
public void outPassSearch(View view) {
var searchText = vm.getSearchText();
@ -76,11 +72,11 @@ public class MaterialPassActivity extends BaseActivity {
public void outPassSubmit(View view) {
var instockBatch = vm.getInstockBatch();
var locationCode = vm.getLocationCode();
var tag=new OutstockDetail();
var tag = new OutstockDetail();
tag.setLocationCode(locationCode);
tag.setMaterialBarcode(instockBatch);
var index = list.indexOf(tag);
if (index==-1) {
if (index == -1) {
Toast.makeText(this, "扫描错误", Toast.LENGTH_SHORT).show();
return;
}
@ -92,7 +88,7 @@ public class MaterialPassActivity extends BaseActivity {
@Override
public void onSuccess(Response<MyResult> response) {
var body = response.body();
if (body.getCode()==200){
if (body.getCode() == 200) {
vm.subClear();
}
Toast.makeText(MaterialPassActivity.this, body.getMsg(), Toast.LENGTH_SHORT).show();

@ -3,17 +3,71 @@ package com.example.jingyuan_mes.store;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;
import com.example.jingyuan_mes.R;
import com.example.jingyuan_mes.adapter.ItemClickCall;
import com.example.jingyuan_mes.adapter.ProductOutConfirmAdapter;
import com.example.jingyuan_mes.adapter.RawReturnConfirmAdapter;
import com.example.jingyuan_mes.base.BaseActivity;
import com.example.jingyuan_mes.base.MyRecultCall;
import com.example.jingyuan_mes.base.MyResult;
import com.example.jingyuan_mes.databinding.ActivityProductOutBinding;
import com.example.jingyuan_mes.entity.OutstockDetail;
import com.example.jingyuan_mes.entity.ProductConfirm;
import com.example.jingyuan_mes.entity.RawReturn;
import com.example.jingyuan_mes.uitls.SharedPreferencesUtils;
import com.google.gson.reflect.TypeToken;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
public class ProductOutActivity extends AppCompatActivity {
import java.util.List;
public class ProductOutActivity extends BaseActivity implements ItemClickCall {
private ProductOutConfirmAdapter adapter;
private List<ProductConfirm> list;
private Intent intent;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActivityProductOutBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_product_out);
binding.setAdapter();
adapter = new ProductOutConfirmAdapter(this, this);
binding.setAdapter(adapter);
intent = new Intent(this, ProductOutInfoActivity.class);
}
@Override
protected void onResume() {
super.onResume();
OkGo.<MyResult>get(url + "/wms/mobile/getProductOutStocks").tag(this)
.headers("Authorization", SharedPreferencesUtils.getstring("access_token", ""))
.execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getTotal() == 0) {
if (list != null) {
list.clear();
adapter.notifyDataSetChanged();
}
Toast.makeText(context, body.getCode()==200?"暂无审批完成数据":body.getMsg(), Toast.LENGTH_SHORT).show();
return;
}
list = gson.fromJson(gson.toJson(body.getRows()), new TypeToken<List<ProductConfirm>>() { }.getType());
adapter.setList(list);
adapter.notifyDataSetChanged();
}
});
}
@Override
public void onClick(int position) {
intent.putExtra("id", list.get(position).getProductOutstockId());
startActivity(intent);
}
}

@ -0,0 +1,85 @@
package com.example.jingyuan_mes.store;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
import com.example.jingyuan_mes.R;
import com.example.jingyuan_mes.adapter.ProductOutInfoAdapter;
import com.example.jingyuan_mes.base.BaseActivity;
import com.example.jingyuan_mes.base.MyRecultCall;
import com.example.jingyuan_mes.base.MyResult;
import com.example.jingyuan_mes.databinding.ActivityProductOutInfoBinding;
import com.example.jingyuan_mes.entity.ProductConfirm;
import com.example.jingyuan_mes.entity.ProductOutSubmit;
import com.example.jingyuan_mes.entity.ProductOutstockDetail;
import com.example.jingyuan_mes.entity.RawReturn;
import com.example.jingyuan_mes.uitls.SharedPreferencesUtils;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import java.util.List;
import okhttp3.RequestBody;
public class ProductOutInfoActivity extends BaseActivity {
private ProductOutSubmit submit;
private ActivityProductOutInfoBinding binding;
private ProductOutInfoAdapter adapter;
private int id;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = DataBindingUtil.setContentView(this, R.layout.activity_product_out_info);
id = getIntent().getIntExtra("id", 0);
submit = new ProductOutSubmit();
submit.setProductOutstockId(id);
binding.setSub(submit);
adapter=new ProductOutInfoAdapter(this);
binding.setAdapter(adapter);
initRequest(id);
}
private void initRequest(int id) {
OkGo.<MyResult>get(url + "/wms/mobile/getProductOutStockWithDetails").tag(this)
.headers("Authorization", SharedPreferencesUtils.getstring("access_token", ""))
.params("productOutstockId",id)
.execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 200) {
ProductConfirm rawReturn = gson.fromJson(body.getData().toString(), ProductConfirm.class);
binding.setVm(rawReturn);
var wmsProductOutstockDetailList = rawReturn.getWmsProductOutstockDetailList();
adapter.setList(wmsProductOutstockDetailList);
adapter.notifyDataSetChanged();
}
Toast.makeText(context, body.getMsg(), Toast.LENGTH_SHORT).show();
}
});
}
public void productOutConfirmSubmit(View view) {
OkGo.<MyResult>post(url + "/wms/mobile/confirmProductOutstockDetail")
.headers("Authorization", SharedPreferencesUtils.getstring("access_token", ""))
.upRequestBody(RequestBody.create(JSON, gson.toJson(submit)))
.execute(new MyRecultCall(dialog, this) {
@Override
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getCode() == 200) {
initRequest(id);
}
Toast.makeText(context, body.getMsg(), Toast.LENGTH_SHORT).show();
}
});
}
}

@ -0,0 +1,16 @@
package com.example.jingyuan_mes.store;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import com.example.jingyuan_mes.R;
public class SemiActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_semi);
}
}

@ -9,7 +9,7 @@
type="String" />
<variable
name="adapter"
type="com.example.jingyuan_mes.adapter.RawReturnAdapter" />
type="com.example.jingyuan_mes.adapter.ProductOutConfirmAdapter" />
</data>

@ -0,0 +1,179 @@
<?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="adapter"
type="com.example.jingyuan_mes.adapter.ProductOutInfoAdapter" />
<variable
name="vm"
type="com.example.jingyuan_mes.entity.ProductConfirm" />
<variable
name="sub"
type="com.example.jingyuan_mes.entity.ProductOutSubmit" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".store.ProductOutInfoActivity">
<include
layout="@layout/toolbar"
app:title='@{title??"成品出库确认"}' />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="成品名称:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@{vm.materialName}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="190dp"
android:layout_height="match_parent"
android:text="申请数量/已出数量:" />
<TextView
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text='@{vm.applyQty+"/"+vm.outstockQty}' />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="38dp"
android:layout_marginTop="10dp"
android:background="@color/white"
android:paddingLeft="10dp"
android:paddingRight="10dp">
<TextView
style="@style/item_title"
android:layout_width="35dp"
android:layout_height="match_parent"
android:text="" />
<TextView
style="@style/item_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2"
android:text="物料编码" />
<TextView
style="@style/item_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3"
android:text="库位" />
<TextView
style="@style/item_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3"
android:text="数量" />
<TextView
style="@style/item_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3"
android:text="出库数量" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:adapter="@{adapter}"
android:background="@color/white"
android:padding="5dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="扫描库位:" />
<EditText
style="@style/text_san"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@={sub.locationCode}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="扫描成品:" />
<EditText
style="@style/text_san"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="45dp"
android:text="@={sub.productBarcode}" />
</LinearLayout>
<Button
style="@style/button_style"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_margin="12dp"
android:onClick="productOutConfirmSubmit"
android:text="提交" />
</LinearLayout>
</layout>

@ -0,0 +1,103 @@
<?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="vm"
type="com.example.jingyuan_mes.entity.OutStoreSubmit" />
<variable
name="adapter"
type="com.example.jingyuan_mes.adapter.MaterialOutPassAdapter" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".store.SemiActivity">
<include layout="@layout/toolbar"
app:title='@{title??"出半成品库入成品库"}'/>
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:padding="5dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
android:adapter="@{adapter}" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="扫描物料:" />
<EditText
style="@style/text_san"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@={vm.instockBatch}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginEnd="4dp">
<TextView
style="@style/text_title"
android:layout_width="90dp"
android:layout_height="match_parent"
android:text="扫描库位:" />
<!-- -->
<EditText
style="@style/text_san"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="45dp"
android:text="@={vm.locationCode}" />
</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="90dp"
android:layout_height="match_parent"
android:text="输入数量:" />
<EditText
style="@style/text_info"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:inputType="numberDecimal"
android:text='@={vm.outstockAmount + ""}' />
</LinearLayout>
<Button
style="@style/button_style"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_margin="20dp"
android:onClick="outPassSubmit"
android:text="提交" />
</LinearLayout>
</layout>

@ -0,0 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="vm"
type="com.example.jingyuan_mes.entity.ProductConfirm" />
</data>
<LinearLayout
android:id="@+id/product_out_confirm_layout"
android:orientation="vertical"
android:background="@drawable/san_text_bg"
android:layout_width="match_parent"
android:layout_height="182dp"
android:layout_marginTop="5dp"
android:padding="4dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="35dp">
<TextView
style="@style/item_title_left"
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='@{vm.planDetailCode}' />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="35dp">
<TextView
style="@style/item_title_left"
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="@{vm.materialName}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="35dp">
<TextView
style="@style/item_title_left"
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="@{vm.saleorderCode }"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="35dp">
<TextView
style="@style/item_title_left"
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="@{vm.warehouseName}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="35dp">
<TextView
style="@style/item_title_left"
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='@{vm.applyQty+""}' />
</LinearLayout>
</LinearLayout>
</layout>

@ -4,7 +4,7 @@
<data>
<variable
name="vm"
type="com.example.jingyuan_mes.entity.RawReturnDetail" />
type="com.example.jingyuan_mes.entity.ProductOutstockDetail" />
</data>
<LinearLayout
@ -29,7 +29,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="2"
android:text="@{vm.materialBarcode}" />
android:text="@{vm.productBarcode}" />
<View
android:layout_width="1dp"
android:layout_height="match_parent"
@ -49,6 +49,16 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3"
android:text="@{String.valueOf(vm.returnAmount)}" />
android:text="@{String.valueOf(vm.planAmount)}" />
<View
android:layout_width="1dp"
android:layout_height="match_parent"
android:background="@color/white"/>
<TextView
style="@style/item_title"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="3"
android:text="@{String.valueOf(vm.outstockAmount)}" />
</LinearLayout>
</layout>
Loading…
Cancel
Save