feat: ui opt

This commit is contained in:
2025-11-26 18:08:02 +08:00
parent c002f1172a
commit ec9818e267

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,10 +22,14 @@
<!-- 主内容区域 --> <!-- 主内容区域 -->
<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" android:layout_weight="1">
android:padding="15dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="15dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -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.no}' /> value='@={viewModel.dataBean.no}'
<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='@{"请选择通道号"}'
list="@{viewModel.channelList}" list="@{viewModel.channelList}"
title='@{"通 道 号"}' title='@{"通 道 号"}'
titleLength="@{5}" titleLength="@{5}"
type="@{DataLayoutType.SPINNER}" type="@{DataLayoutType.SPINNER}"
value='@={viewModel.channel}' /> value='@={viewModel.channel}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout> </LinearLayout>
@@ -82,28 +87,28 @@
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.agentList}" list="@{viewModel.agentList}"
title='@{"代 理 人"}' title='@{"代 理 人"}'
titleLength="@{5}" titleLength="@{5}"
type="@{DataLayoutType.SPINNER}" type="@{DataLayoutType.SPINNER}"
value='@={viewModel.dataBean.agentCode}' /> value='@={viewModel.dataBean.agentCode}'
<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='@{"请选择特码"}'
list="@{viewModel.spCodeList}" list="@{viewModel.spCodeList}"
title='@{"特 码"}' title='@{"特 码"}'
titleLength="@{5}" titleLength="@{5}"
type="@{DataLayoutType.SPINNER}" type="@{DataLayoutType.SPINNER}"
value='@={viewModel.dataBean.spCode}' /> value='@={viewModel.dataBean.spCode}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout> </LinearLayout>
@@ -171,37 +176,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="@{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="@{5}" 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="@{5}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.range}' /> value='@={viewModel.dataBean.range}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout> </LinearLayout>
@@ -212,37 +217,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"
enable="@{false}" enable="@{false}"
title='@{"预配件数"}' title='@{"预配件数"}'
titleLength="@{5}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.pc)}' /> value='@{String.valueOf(viewModel.dataBean.pc)}'
<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
enable="@{false}" enable="@{false}"
title='@{"预配重量"}' title='@{"预配重量"}'
titleLength="@{5}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.weight)}' /> value='@{String.valueOf(viewModel.dataBean.weight)}'
<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="@{5}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.volume)}' /> value='@{String.valueOf(viewModel.dataBean.volume)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout> </LinearLayout>
@@ -253,37 +258,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="@{5}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@={viewModel.realTimePc}' /> value='@={viewModel.realTimePc}'
<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.realTimeWeight}' /> value='@={viewModel.realTimeWeight}'
<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="@{5}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@={viewModel.realTimeVolume}' /> value='@={viewModel.realTimeVolume}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout> </LinearLayout>
@@ -294,37 +299,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="@{5}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@={viewModel.arrivePc}' /> value='@={viewModel.arrivePc}'
<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.arriveWeight}' /> value='@={viewModel.arriveWeight}'
<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="@{5}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@={viewModel.arriveVolume}' /> value='@={viewModel.arriveVolume}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout> </LinearLayout>
@@ -335,63 +340,61 @@
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="@{5}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.carId}' /> value='@={viewModel.dataBean.carId}'
<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
enable="@{false}" enable="@{false}"
title='@{"托盘车自重"}' title='@{"托盘车自重"}'
titleLength="@{6}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{viewModel.carWeight}' /> value='@{viewModel.carWeight}'
<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='@{"请选择业务类型"}'
list="@{viewModel.businessTypeList}" list="@{viewModel.businessTypeList}"
title='@{"业务类型"}' title='@{"业务类型"}'
titleLength="@{5}" titleLength="@{5}"
type="@{DataLayoutType.SPINNER}" type="@{DataLayoutType.SPINNER}"
value='@={viewModel.dataBean.businessType}' /> value='@={viewModel.dataBean.businessType}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout> </LinearLayout>
<!-- 第8行备注 --> <!-- 第8行备注 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
hint='@{"请输入备注"}' hint='@{"请输入备注"}'
inputHeight="@{80}" inputHeight="@{80}"
title='@{"备 注"}' title='@{"备 注"}'
titleLength="@{5}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.remark}' /> value='@={viewModel.dataBean.remark}'
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp" />
</LinearLayout> </LinearLayout>
</ScrollView>
<!-- 底部操作栏 --> <!-- 底部操作栏 -->
<LinearLayout <LinearLayout
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:gravity="center" android:gravity="center"
android:paddingTop="15dp"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="15dp"> android:padding="15dp">
@@ -399,11 +402,11 @@
android:layout_width="150dp" android:layout_width="150dp"
android:layout_height="50dp" android:layout_height="50dp"
android:layout_marginEnd="30dp" android:layout_marginEnd="30dp"
android:background="@drawable/bg_primary_stroke_radius_4" android:background="@drawable/bg_primary_radius_4"
android:gravity="center" android:gravity="center"
android:onClick="@{(v)-> viewModel.sortingWeighingClick()}" android:onClick="@{(v)-> viewModel.sortingWeighingClick()}"
android:text="分托计重" android:text="分托计重"
android:textColor="@color/colorPrimary" android:textColor="@color/white"
android:textSize="18sp" /> android:textSize="18sp" />
<TextView <TextView
@@ -417,6 +420,13 @@
android:textSize="18sp" /> android:textSize="18sp" />
</LinearLayout> </LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout> </LinearLayout>
</layout> </layout>