原实现是卡片内上下各缩进 12dp 的独立短竖条,与原型 rounded-lg border-l-[4px] 不符。 新增 bg_phone_stat_blue/orange/green(白底 12dp 圆角 + 左侧 4dp 色边),替换出港待计重、 计重记录、出港查询、出港仓库、进港查询、进港仓库 6 个页面共 18 处统计卡。 Refs: 禅道 Bug #620 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
326 lines
14 KiB
XML
326 lines
14 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!--
|
||
国际出港查询 —— 手机版布局(5.5 寸手持端,最小宽度 < 600dp 时生效)
|
||
|
||
平板版为同名文件 layout-sw600dp/activity_gjc_query.xml,两者是同一布局的资源变体,
|
||
DataBinding 因此生成同一个 ActivityGjcQueryBinding 类。
|
||
|
||
变体之间必须满足:
|
||
· DataBinding 变量完全一致:viewModel
|
||
· 保留 Activity 中引用的控件 id:srl / rv
|
||
· 平板独有的 filter_overlay / filter_panel(侧滑筛选)手机版不提供,
|
||
Binding 基类中自动变 @Nullable,GjcQueryActivity 已判空处理
|
||
|
||
交互差异(均复用既有 GjcQueryViewModel 字段与接口):
|
||
· 平板 5 个横排搜索条 → 手机顶部搜索框(运单号)+ 底部筛选弹层
|
||
(航班日期起/止、代理从搜索行移入弹层;设计稿无「出库状态」项,未提供)
|
||
· 三格统计(总票数/已入库/已离港),后两格为手机专属统计请求(initPhoneExtras 开启)
|
||
· 筛选弹层显隐直接绑既有 viewModel.filterVisible,无需平板的滑入动画代码
|
||
-->
|
||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||
xmlns:tools="http://schemas.android.com/tools">
|
||
|
||
<data>
|
||
|
||
<import type="android.view.View" />
|
||
|
||
<import type="com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayoutType" />
|
||
|
||
<variable
|
||
name="viewModel"
|
||
type="com.lukouguoji.gjc.viewModel.GjcQueryViewModel" />
|
||
</data>
|
||
|
||
<FrameLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="match_parent"
|
||
android:background="@color/phone_page_bg">
|
||
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="match_parent"
|
||
android:orientation="vertical">
|
||
|
||
<include layout="@layout/title_tool_bar" />
|
||
|
||
<!-- ==================== 搜索行 ==================== -->
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:background="@color/white"
|
||
android:orientation="vertical"
|
||
android:paddingHorizontal="16dp"
|
||
android:paddingTop="16dp"
|
||
android:paddingBottom="12dp">
|
||
|
||
<com.lukouguoji.module_base.ui.weight.phone.PhoneSearchBar
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
hint='@{"搜索运单号"}'
|
||
setOnFilterClickListener="@{(v)-> viewModel.filterClick()}"
|
||
setOnScanClickListener="@{(v)-> viewModel.waybillScanClick()}"
|
||
setRefreshCallBack="@{viewModel::searchClick}"
|
||
value="@={viewModel.waybillNo}" />
|
||
|
||
</LinearLayout>
|
||
|
||
<!-- ==================== 三格统计:总票数 / 已入库 / 已离港 ==================== -->
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginHorizontal="16dp"
|
||
android:layout_marginTop="12dp"
|
||
android:orientation="horizontal">
|
||
|
||
<!-- 总票数(蓝) -->
|
||
<LinearLayout
|
||
android:layout_width="0dp"
|
||
android:layout_height="wrap_content"
|
||
android:layout_weight="1"
|
||
android:background="@drawable/bg_phone_stat_blue"
|
||
android:orientation="horizontal">
|
||
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:orientation="vertical"
|
||
android:paddingHorizontal="12dp"
|
||
android:paddingVertical="10dp">
|
||
|
||
<TextView
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:text="总票数"
|
||
android:textColor="@color/phone_text_body"
|
||
android:textSize="12sp" />
|
||
|
||
<TextView
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginTop="2dp"
|
||
android:text="@{viewModel.totalCount}"
|
||
android:textColor="@color/phone_primary"
|
||
android:textSize="20sp"
|
||
android:textStyle="bold"
|
||
tools:text="4" />
|
||
|
||
</LinearLayout>
|
||
|
||
</LinearLayout>
|
||
|
||
<!-- 已入库(橙) -->
|
||
<LinearLayout
|
||
android:layout_width="0dp"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginStart="10dp"
|
||
android:layout_weight="1"
|
||
android:background="@drawable/bg_phone_stat_orange"
|
||
android:orientation="horizontal">
|
||
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:orientation="vertical"
|
||
android:paddingHorizontal="12dp"
|
||
android:paddingVertical="10dp">
|
||
|
||
<TextView
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:text="已入库"
|
||
android:textColor="@color/phone_text_body"
|
||
android:textSize="12sp" />
|
||
|
||
<TextView
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginTop="2dp"
|
||
android:text="@{viewModel.storedCount}"
|
||
android:textColor="@color/phone_tag_orange_text"
|
||
android:textSize="20sp"
|
||
android:textStyle="bold"
|
||
tools:text="2" />
|
||
|
||
</LinearLayout>
|
||
|
||
</LinearLayout>
|
||
|
||
<!-- 已离港(绿) -->
|
||
<LinearLayout
|
||
android:layout_width="0dp"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginStart="10dp"
|
||
android:layout_weight="1"
|
||
android:background="@drawable/bg_phone_stat_green"
|
||
android:orientation="horizontal">
|
||
|
||
<LinearLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
android:orientation="vertical"
|
||
android:paddingHorizontal="12dp"
|
||
android:paddingVertical="10dp">
|
||
|
||
<TextView
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:text="已离港"
|
||
android:textColor="@color/phone_text_body"
|
||
android:textSize="12sp" />
|
||
|
||
<TextView
|
||
android:layout_width="wrap_content"
|
||
android:layout_height="wrap_content"
|
||
android:layout_marginTop="2dp"
|
||
android:text="@{viewModel.departedCount}"
|
||
android:textColor="@color/phone_tag_green_text"
|
||
android:textSize="20sp"
|
||
android:textStyle="bold"
|
||
tools:text="2" />
|
||
|
||
</LinearLayout>
|
||
|
||
</LinearLayout>
|
||
|
||
</LinearLayout>
|
||
|
||
<!-- ==================== 列表 ==================== -->
|
||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||
android:id="@+id/srl"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="0dp"
|
||
android:layout_weight="1">
|
||
|
||
<androidx.recyclerview.widget.RecyclerView
|
||
android:id="@+id/rv"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="match_parent"
|
||
android:clipToPadding="false"
|
||
android:overScrollMode="never"
|
||
android:paddingTop="4dp"
|
||
android:paddingBottom="24dp"
|
||
itemLayoutId="@{viewModel.itemLayoutId}"
|
||
viewHolder="@{viewModel.itemViewHolder}"
|
||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||
tools:itemCount="3"
|
||
tools:listitem="@layout/item_gjc_query" />
|
||
|
||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||
|
||
</LinearLayout>
|
||
|
||
<!-- ==================== 筛选弹层(绑既有 filterVisible) ==================== -->
|
||
<com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel
|
||
android:layout_width="match_parent"
|
||
android:layout_height="match_parent"
|
||
android:elevation="8dp"
|
||
panelVisible="@{viewModel.filterVisible}"
|
||
setOnConfirmClick="@{(v)-> viewModel.confirmFilter()}"
|
||
setOnDismissClick="@{(v)-> viewModel.closeFilter()}"
|
||
setOnResetClick="@{(v)-> viewModel.resetFilter()}"
|
||
title='@{"筛选条件"}'>
|
||
|
||
<!-- 日期类型(dateState:入库/离港,与主干平板一致;后端起止日期仅在携带它时生效) -->
|
||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
hint='@{"请选择日期类型"}'
|
||
list="@{viewModel.dateStateList}"
|
||
title='@{"日期类型"}'
|
||
type="@{PhoneDataLayoutType.SPINNER}"
|
||
value="@={viewModel.dateState}" />
|
||
|
||
<!-- 开始日期(平板搜索行字段,手机移入弹层) -->
|
||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
hint='@{"请选择开始日期"}'
|
||
title='@{"开始日期"}'
|
||
type="@{PhoneDataLayoutType.DATE}"
|
||
value="@={viewModel.flightDateStart}" />
|
||
|
||
<!-- 结束日期 -->
|
||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
hint='@{"请选择结束日期"}'
|
||
title='@{"结束日期"}'
|
||
type="@{PhoneDataLayoutType.DATE}"
|
||
value="@={viewModel.flightDateEnd}" />
|
||
|
||
<!-- 航班号 -->
|
||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||
android:id="@+id/phone_filter_flight_no"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
hint='@{"请输入航班号"}'
|
||
title='@{"航班号"}'
|
||
type="@{PhoneDataLayoutType.INPUT}"
|
||
value="@={viewModel.flightNo}" />
|
||
|
||
<!-- 代理(平板搜索行字段,手机移入弹层) -->
|
||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
hint='@{"请选择代理"}'
|
||
list="@{viewModel.agentList}"
|
||
title='@{"代理"}'
|
||
type="@{PhoneDataLayoutType.SPINNER}"
|
||
value="@={viewModel.agentId}" />
|
||
|
||
<!-- 特码(设计稿为下拉,字典由 initPhoneExtras 加载;平板为文本输入) -->
|
||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
hint='@{"请选择特码"}'
|
||
list="@{viewModel.spCodeList}"
|
||
title='@{"特码"}'
|
||
type="@{PhoneDataLayoutType.SPINNER}"
|
||
value="@={viewModel.spCode}" />
|
||
|
||
<!-- 目的港 -->
|
||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||
android:id="@+id/phone_filter_dest"
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
hint='@{"请输入目的港"}'
|
||
title='@{"目的港"}'
|
||
type="@{PhoneDataLayoutType.INPUT}"
|
||
value="@={viewModel.dest}" />
|
||
|
||
<!-- 运单类型 -->
|
||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
hint='@{"请选择运单类型"}'
|
||
list="@{viewModel.awbTypeList}"
|
||
title='@{"运单类型"}'
|
||
type="@{PhoneDataLayoutType.SPINNER}"
|
||
value="@={viewModel.awbType}" />
|
||
|
||
<!-- 业务类型 -->
|
||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
hint='@{"请选择业务类型"}'
|
||
list="@{viewModel.businessTypeList}"
|
||
title='@{"业务类型"}'
|
||
type="@{PhoneDataLayoutType.SPINNER}"
|
||
value="@={viewModel.businessType}" />
|
||
|
||
<!-- 品名(中) -->
|
||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||
android:layout_width="match_parent"
|
||
android:layout_height="wrap_content"
|
||
hint='@{"请输入中文品名"}'
|
||
title='@{"品名(中)"}'
|
||
type="@{PhoneDataLayoutType.INPUT}"
|
||
value="@={viewModel.goodsCn}" />
|
||
|
||
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
|
||
|
||
</FrameLayout>
|
||
|
||
</layout>
|