feat: ui opt

This commit is contained in:
2025-11-26 17:56:00 +08:00
parent a01b17dd8f
commit 4a3b8a85eb
2 changed files with 354 additions and 347 deletions

View File

@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
<variable
@@ -21,8 +22,12 @@
<!-- 主内容区域 -->
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="15dp">
<LinearLayout
@@ -51,27 +56,27 @@
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入架子车号"}'
title='@{"架子车号"}'
title='@{"架子车号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.carId}' />
value='@={viewModel.dataBean.carId}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择通道号"}'
list="@{viewModel.passagewayList}"
title='@{"通道号"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.channel}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1"
hint='@{"请选择通道号"}'
list="@{viewModel.passagewayList}"
title='@{"通道号:"}'
titleLength="@{4}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.channel}' />
android:layout_weight="1" />
</LinearLayout>
@@ -82,26 +87,26 @@
android:layout_marginTop="15dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入ULD编号"}'
title='@{"ULD编号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.uld}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
hint='@{"请输入ULD编号"}'
title='@{"ULD编号"}'
titleLength="@{6}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.uld}' />
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入IMP代码"}'
title='@{"IMP代码"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.dgrCode}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1"
hint='@{"请输入IMP代码"}'
title='@{"IMP代码"}'
titleLength="@{6}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.dgrCode}' />
android:layout_weight="1" />
</LinearLayout>
@@ -152,9 +157,9 @@
android:layout_marginStart="8dp"
android:layout_toEndOf="@id/tvWeight"
android:text="kg"
android:textStyle="bold"
android:textColor="@color/black"
android:textSize="24sp" />
android:textColor="@color/text_red"
android:textSize="24sp"
android:textStyle="bold" />
</RelativeLayout>
@@ -169,37 +174,37 @@
android:layout_marginTop="15dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入板型"}'
title='@{"板型"}'
titleLength="@{3}"
title='@{"板型"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.boardType}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
value='@={viewModel.dataBean.boardType}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入高度"}'
title='@{"高度"}'
titleLength="@{3}"
title='@{"高度"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.height}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
value='@={viewModel.dataBean.height}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"总重"}'
titleLength="@{3}"
title='@{"总重"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.totalWeight}' />
value='@{viewModel.totalWeight}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
@@ -210,38 +215,38 @@
android:layout_marginTop="15dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择探板收口"}'
list="@{viewModel.piCloseList}"
title='@{"探板收口"}'
title='@{"探板收口"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.dataBean.piClose}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
value='@={viewModel.dataBean.piClose}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入探板尺寸"}'
title='@{"探板尺寸"}'
title='@{"探板尺寸"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.piCloseSize}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
value='@={viewModel.dataBean.piCloseSize}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"装机重"}'
titleLength="@{4}"
title='@{"装机重"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.netWeight}' />
value='@{viewModel.netWeight}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
@@ -252,37 +257,37 @@
android:layout_marginTop="15dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"架子车自重"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.carWeight)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"架子车自重:"}'
titleLength="@{6}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.carWeight)}' />
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"ULD自重"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.uldWeight)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1"
enable="@{false}"
title='@{"ULD自重"}'
titleLength="@{6}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.uldWeight)}' />
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"货重"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.cargoWeight}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1"
enable="@{false}"
title='@{"货重:"}'
titleLength="@{3}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.cargoWeight}' />
android:layout_weight="1" />
</LinearLayout>
@@ -293,36 +298,36 @@
android:layout_marginTop="15dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
title='@{"航班日期:"}'
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
title='@{"航班日期"}'
titleLength="@{5}"
type="@{DataLayoutType.DATE}"
value='@={viewModel.dataBean.fdate}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
value='@={viewModel.dataBean.fdate}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入航班号"}'
title='@{"航班号"}'
titleLength="@{4}"
title='@{"航班号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.fno}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
value='@={viewModel.dataBean.fno}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入目的港"}'
title='@{"目的港"}'
titleLength="@{4}"
title='@{"目的港"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.fdest}' />
value='@={viewModel.dataBean.fdest}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
@@ -333,62 +338,62 @@
android:layout_marginTop="15dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入件数"}'
title='@{"件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.pieces}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
hint='@{"请输入件数"}'
title='@{"件数:"}'
titleLength="@{3}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.pieces}' />
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入备注"}'
title='@{"备注"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.remark}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1"
hint='@{"请输入备注"}'
title='@{"备注:"}'
titleLength="@{3}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.remark}' />
<Space
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1" />
android:layout_weight="2" />
</LinearLayout>
</LinearLayout>
</ScrollView>
<!-- 底部操作栏 -->
<LinearLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal"
android:layout_marginTop="24dp"
android:padding="15dp">
<CheckBox
android:id="@+id/cbPrint"
android:layout_width="0dp"
<Space
android:id="@+id/sCenter"
android:layout_width="32dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_centerInParent="true"/>
<CheckBox
android:layout_toStartOf="@+id/btnReset"
android:id="@+id/cbPrint"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="32dp"
android:checked="@={viewModel.printTag}"
android:text="打印挂签"
android:textColor="@color/black"
android:textSize="18sp" />
<TextView
android:id="@+id/btnReset"
android:layout_toStartOf="@+id/sCenter"
android:layout_width="120dp"
android:layout_height="50dp"
android:layout_marginEnd="15dp"
android:background="@drawable/bg_gray_radius_4"
android:background="@drawable/bg_primary_radius_4"
android:gravity="center"
android:onClick="@{(v)-> viewModel.resetClick()}"
android:text="重置"
@@ -396,6 +401,7 @@
android:textSize="18sp" />
<TextView
android:layout_toEndOf="@+id/sCenter"
android:layout_width="120dp"
android:layout_height="50dp"
android:background="@drawable/bg_primary_radius_4"
@@ -405,7 +411,8 @@
android:textColor="@color/white"
android:textSize="18sp" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</layout>

View File

@@ -217,7 +217,7 @@
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"业务类型"}'
title='@{"业务类型"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.businessName}'
@@ -277,7 +277,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="80dp"
android:text="附件"
android:text="附件"
android:textColor="@color/text_gray"
android:textSize="14sp" />