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

View File

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