完成 原材料出库详细

master
Administrator 9 months ago
parent 6e8ccc9074
commit 1ecf04b127

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

@ -8,6 +8,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.Window;
@ -29,11 +30,12 @@ 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.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6ImYzZDU3MWE5LWVhY2UtNGZlYi05OGIzLWI1YjlmNWI0ZmNlYyIsInVzZXJuYW1lIjoiYWRtaW4ifQ.IXlAZ1Byx_Ou6Szul1vy6AEpgsIMGZ97OAdpZjCbwTLoCwQ6jt2tJmxFtdL-FVl35zrAFqNHMPe-oxr5kaGY8A";
public String handle = "eyJhbGciOiJIUzUxMiJ9.eyJ1c2VyX2lkIjoxLCJ1c2VyX2tleSI6IjczZTJhYjFjLTc5ZDAtNDg5NS04MzE5LWZlYjdlYjAxZmIzMiIsInVzZXJuYW1lIjoiYWRtaW4ifQ.veofmW5UgF7f2qFVuTKMM0qOIvEbAoQ9V0Etf9xJXWHJmOfkTWxGgPlBibXKk-GXBvWGd-CgSM6ljhRu2Pz9xA";
public Context context;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.e("TAG", this.getLocalClassName() );
gson = new Gson();
SharedPreferencesUtils.putstring("access_token",handle);
this.context=this;

@ -9,6 +9,15 @@ public class MyResult {
private String msg;
private Object data;
private Object rows;
private int total;
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
public Object getRows() {
return rows;

@ -0,0 +1,19 @@
package com.example.jingyuan_mes.store;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import android.os.Bundle;
import com.example.jingyuan_mes.R;
import com.example.jingyuan_mes.databinding.ActivityProductOutBinding;
public class ProductOutActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActivityProductOutBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_product_out);
binding.setAdapter();
}
}

@ -46,7 +46,7 @@ public class StockreturnActivity extends BaseActivity implements ItemClickCall,
public void onSuccess(Response<MyResult> response) {
super.onSuccess(response);
var body = response.body();
if (body.getRows() == null) {
if (body.getTotal()==0) {
if (list != null) {
list.clear();
adapter.notifyDataSetChanged();

@ -0,0 +1,32 @@
<?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.RawReturnAdapter" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".store.ProductOutActivity">
<include layout="@layout/toolbar"
app:title='@{title??"待出库成品列表"}'/>
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="5dp"
android:adapter="@{adapter}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>
</LinearLayout>
</layout>

@ -10,9 +10,9 @@
<LinearLayout
android:id="@+id/item_menu"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_height="50dp"
android:background="@drawable/text_bg"
android:layout_marginTop="2dp"
android:layout_marginTop="5dp"
android:layout_marginStart="15dp"
android:padding="3dp">

Loading…
Cancel
Save