idata
wangh 1 year ago
parent 7cdc1bedff
commit 35a44b4000

@ -59,7 +59,6 @@ public class FpInActivity extends BaseActivity {
public void fpin_submit(View view){
Log.e("TAG", "onSuccess:" +vm.toString() );
var state = vm.getState();
if (!state.equals("报废")){
Toast.makeText(this, "轮挡状态:"+state+",不能使用废品入库功能", Toast.LENGTH_SHORT).show();

@ -1,17 +1,37 @@
package com.example.beijing_daxing.been;
import androidx.databinding.BaseObservable;
import java.util.Objects;
/**
* @author wanghao
* @date 2024/1/19 13:45
*/
public class Stock {
public class Stock extends BaseObservable {
private int index;
private String epcCode;
private String locationCode;
private String state;
private String createTime;
private String remark;
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
notifyChange();
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getState() {
return state;
}

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="item"
type="com.example.beijing_daxing.been.Stock" />
<import type="android.view.View"/>
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/info_text_bg"
android:orientation="vertical"
android:padding="8dp">
<TextView
style="@style/item_text_style1"
android:layout_width="match_parent"
android:layout_height="30dp"
android:text="@{item.epcCode}" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_marginTop="2dp">
<TextView
style="@style/item_text_style"
android:layout_width="100dp"
android:layout_height="match_parent"
android:text="机位编码:" />
<TextView
style="@style/item_text_style"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="left|center"
android:text="@{item.locationCode}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_marginTop="2dp">
<TextView
style="@style/item_text_style"
android:layout_width="100dp"
android:layout_height="match_parent"
android:text="入场时间:" />
<TextView
style="@style/item_text_style"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="left|center"
android:text="@{item.createTime}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="30dp"
android:visibility='@{(item.state.equals("跳过") || item.state.equals("异常")) ?View.VISIBLE : View.GONE }'
android:layout_marginTop="2dp">
<TextView
style="@style/item_text_style"
android:layout_width="100dp"
android:layout_height="match_parent"
android:text='@{item.state+"原因:"}' />
<TextView
style="@style/item_text_style"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="left|center"
android:text="@{item.createTime}" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_marginTop="2dp"
android:background="@color/bg1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="42dp"
android:layout_marginTop="2dp">
<TextView
style="@style/item_text_style"
android:layout_width="100dp"
android:layout_height="match_parent"
android:text="巡检状态:" />
<TextView
style="@style/item_text_style"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="left|center"
android:text="@{item.state}" />
<View
android:layout_width="1dp"
android:layout_height="28dp"
android:layout_gravity="center"
android:layout_marginTop="2dp"
android:background="@color/bg1" />
<TextView
style="@style/item_text_style"
android:layout_width="100dp"
android:layout_height="match_parent"
android:letterSpacing="0.5"
android:text="跳过"
android:textColor="@color/blue" />
</LinearLayout>
</LinearLayout>
</layout>

@ -9,8 +9,14 @@
<style name="item_text_style">
<item name="android:textColor">#666666</item>
<item name="android:gravity">center</item>
<item name="android:textSize">15sp</item>
</style>
<style name="item_text_style1">
<item name="android:textColor">@color/black</item>
<item name="android:gravity">left|center</item>
<item name="android:textSize">17sp</item>
</style>
<style name="title_text">
<item name="android:background">@color/blue</item>
<item name="android:textColor">@color/white</item>

Loading…
Cancel
Save