This commit is contained in:
2025-11-27 17:17:17 +08:00
parent 29b1875fa5
commit 0fbb9c3704
32 changed files with 1156 additions and 4 deletions

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/white"/>
<corners android:radius="4dp"/>
</shape>

View File

@@ -82,13 +82,28 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center">
android:gravity="center"
android:orientation="horizontal">
<ImageView
style="@style/iv_search_action"
android:onClick="@{()-> viewModel.searchClick()}"
android:src="@drawable/img_search" />
<!-- 加号按钮 -->
<ImageView
style="@style/iv_search_action"
android:onClick="@{()-> viewModel.onAddClick()}"
android:src="@drawable/img_add"
android:layout_marginLeft="10dp" />
<!-- 删除按钮 -->
<ImageView
style="@style/iv_search_action"
android:onClick="@{()-> viewModel.onDeleteClick()}"
android:src="@drawable/img_delete"
android:layout_marginLeft="10dp" />
</LinearLayout>
</LinearLayout>
@@ -170,10 +185,12 @@
android:text="删除"
android:visibility="gone" />
<!-- 回填重量按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.onBackfillWeightClick()}"
android:text="回填重量"
android:visibility="gone" />
android:visibility="visible" />
</LinearLayout>

View File

@@ -0,0 +1,395 @@
<?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">
<data>
<import type="android.view.View" />
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.IntExpAssembleStartViewModel" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/list_bg"
android:orientation="vertical">
<!-- 标题栏 -->
<include layout="@layout/title_tool_bar" />
<!-- 主体区域:左右分栏 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:orientation="horizontal"
android:padding="16dp">
<!-- ========== 左侧区域30%========== -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.3"
android:layout_marginEnd="8dp"
android:orientation="vertical">
<!-- 组装信息列表 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="组装信息"
android:textColor="@color/text_normal"
android:textSize="16sp"
android:textStyle="bold" />
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
app:dividerColor="@color/line" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_assemble_info"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 组装位置选择 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="组装位置"
android:textColor="@color/text_normal"
android:textSize="16sp"
android:textStyle="bold" />
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
app:dividerColor="@color/line" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_assemble_position"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
</LinearLayout>
<!-- ========== 右侧区域70%========== -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.7"
android:layout_marginStart="8dp"
android:orientation="vertical">
<!-- 搜索框 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
hint='@{"请输入运单号"}'
icon="@{@drawable/scan_code}"
setOnIconClickListener="@{(v) -> viewModel.scanWaybill()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.searchWaybillNo}" />
<!-- 运单列表 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.4"
android:layout_marginBottom="16dp"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单列表"
android:textColor="@color/text_normal"
android:textSize="16sp"
android:textStyle="bold" />
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
app:dividerColor="@color/line" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_waybill_list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
<!-- ULD信息卡片 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="ULD信息"
android:textColor="@color/text_normal"
android:textSize="16sp"
android:textStyle="bold" />
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
app:dividerColor="@color/line" />
<!-- ULD信息字段 - 使用PadDataLayoutNew横向排列 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
required="@{false}"
title='@{"ULD编号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value="@={viewModel.uldInfo.uldNo}" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
required="@{false}"
title='@{"机型:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value="@={viewModel.uldInfo.planeType}" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
required="@{false}"
title='@{"限重:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value="@={viewModel.uldInfo.weightLimit}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
required="@{false}"
title='@{"总件数:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value="@={viewModel.uldInfo.totalPieces}" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
required="@{false}"
title='@{"总重量:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value="@={viewModel.uldInfo.totalWeight}" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
required="@{false}"
title='@{"状态:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value="@={viewModel.uldInfo.status}" />
</LinearLayout>
</LinearLayout>
<!-- 运单信息卡片 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单信息"
android:textColor="@color/text_normal"
android:textSize="16sp"
android:textStyle="bold" />
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
app:dividerColor="@color/line" />
<!-- 运单信息字段 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
required="@{false}"
title='@{"运单号:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value="@={viewModel.waybillInfo.waybillNo}" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
required="@{false}"
title='@{"件数:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value="@={viewModel.waybillInfo.pieces}" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
required="@{false}"
title='@{"重量:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value="@={viewModel.waybillInfo.weight}" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
required="@{false}"
title='@{"目的港:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value="@={viewModel.waybillInfo.destination}" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
required="@{false}"
title='@{"特码:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value="@={viewModel.waybillInfo.specialCode}" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
required="@{false}"
title='@{"品名:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value="@={viewModel.waybillInfo.goodsName}" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- 底部操作按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="64dp"
android:background="@color/white"
android:gravity="center"
android:orientation="horizontal"
android:paddingHorizontal="16dp">
<TextView
style="@style/tv_bottom_btn"
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_marginEnd="8dp"
android:layout_weight="1"
android:background="@drawable/bg_blue_radius_4"
android:onClick="@{() -> viewModel.onUnloadClick()}"
android:text="卸货"
android:textSize="16sp" />
<TextView
style="@style/tv_bottom_btn"
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_marginStart="8dp"
android:layout_weight="1"
android:background="@drawable/bg_red_radius_4"
android:onClick="@{() -> viewModel.onLoadClick()}"
android:text="装货"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="android.view.View" />
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
<variable
name="bean"
type="com.lukouguoji.module_base.bean.AssembleInfoBean" />
<variable
name="position"
type="Integer" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:paddingVertical="8dp">
<!-- 编号圆圈 -->
<TextView
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginEnd="8dp"
android:background="@drawable/bg_circle_yellow"
android:gravity="center"
android:text="@{String.valueOf(position + 1)}"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
<!-- 运单号 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginEnd="8dp"
enable="@{false}"
required="@{false}"
title='@{"运单号:"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value="@={bean.waybillNo}" />
<!-- 件数 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.6"
enable="@{false}"
required="@{false}"
title='@{"件数:"}'
titleLength="@{3}"
type="@{DataLayoutType.INPUT}"
value="@={bean.pieces}" />
</LinearLayout>
</layout>

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="android.view.View" />
<variable
name="bean"
type="com.lukouguoji.module_base.bean.AssemblePositionBean" />
<variable
name="position"
type="Integer" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:paddingVertical="12dp"
android:paddingHorizontal="8dp"
android:background="@{bean.isSelected ? @drawable/bg_green_light : @drawable/bg_white}">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@{bean.positionName}"
android:textColor="@{bean.isSelected ? @color/colorPrimary : @color/text_normal}"
android:textSize="14sp"
android:textStyle="normal" />
<!-- 选中图标 -->
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:src="@drawable/ic_check_green"
android:visibility="@{bean.isSelected ? View.VISIBLE : View.GONE}" />
</LinearLayout>
</layout>

View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="android.view.View" />
<variable
name="bean"
type="com.lukouguoji.module_base.bean.AssembleWaybillBean" />
<variable
name="position"
type="Integer" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:paddingVertical="12dp"
android:paddingHorizontal="8dp"
android:background="@color/white">
<!-- 序号 -->
<TextView
android:layout_width="40dp"
android:layout_height="wrap_content"
android:text="@{String.valueOf(position + 1)}"
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
android:textSize="14sp"
android:gravity="center" />
<!-- 运单号 -->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@{bean.waybillNo}"
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
android:textSize="14sp" />
<!-- 件数 -->
<TextView
android:layout_width="60dp"
android:layout_height="wrap_content"
android:text="@{bean.pieces}"
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
android:textSize="14sp"
android:gravity="center" />
<!-- 重量 -->
<TextView
android:layout_width="80dp"
android:layout_height="wrap_content"
android:text="@{bean.weight}"
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
android:textSize="14sp"
android:gravity="end" />
</LinearLayout>
</layout>

View File

@@ -30,6 +30,15 @@
android:gravity="center_vertical"
android:orientation="horizontal">
<!-- 选择框 -->
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:checked="@{bean.isSelected}"
android:clickable="false"
android:focusable="false" />
<!-- 飞机图标 -->
<ImageView
android:layout_width="50dp"