feat: ui
This commit is contained in:
@@ -33,16 +33,14 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.3"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 搜索框 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayoutNew
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="15dp"
|
||||
android:background="@color/color_f2"
|
||||
android:layout_margin="4dp"
|
||||
hint='@{"请输入搜索内容"}'
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.searchText}" />
|
||||
@@ -53,7 +51,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
android:padding="8dp">
|
||||
|
||||
<!-- 组装信息标题 -->
|
||||
<TextView
|
||||
@@ -108,7 +106,7 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.7"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 运单列表 -->
|
||||
@@ -116,23 +114,24 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.4"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingHorizontal="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<!-- 搜索框 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayoutNew
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单列表"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
android:layout_margin="4dp"
|
||||
hint='@{"请输入搜索内容"}'
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.searchText}" />
|
||||
|
||||
<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" />
|
||||
|
||||
@@ -147,10 +146,10 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp">
|
||||
android:padding="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -214,7 +213,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp">
|
||||
android:padding="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
182
module_gjc/src/main/res/layout/activity_int_exp_move.xml
Normal file
182
module_gjc/src/main/res/layout/activity_int_exp_move.xml
Normal file
@@ -0,0 +1,182 @@
|
||||
<?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"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View" />
|
||||
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.gjc.viewModel.IntExpMoveViewModel" />
|
||||
|
||||
<variable
|
||||
name="activity"
|
||||
type="com.lukouguoji.gjc.page.move.IntExpMoveActivity" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<!-- 搜索区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 运单类型 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择运单类型"}'
|
||||
list="@{viewModel.awbTypeList}"
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
value="@={viewModel.awbType}" />
|
||||
|
||||
<!-- 承运人 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入承运人"}'
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.by1}" />
|
||||
|
||||
<!-- 卸货站 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入卸货站"}'
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.dest1}" />
|
||||
|
||||
<!-- 移库状态 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择移库状态"}'
|
||||
list="@{viewModel.moveStateList}"
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
value="@={viewModel.moveState}" />
|
||||
|
||||
<!-- 运单号 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:id="@+id/searchWaybillNo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入运单号"}'
|
||||
icon="@{@drawable/img_scan}"
|
||||
setOnIconClickListener="@{(v)-> activity.scanWaybill()}"
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.waybillNo}" />
|
||||
|
||||
<!-- 搜索按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
style="@style/iv_search_action"
|
||||
android:onClick="@{()-> viewModel.searchClick()}"
|
||||
android:src="@drawable/img_search" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 列表 -->
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/srl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:overScrollMode="never"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:itemCount="3"
|
||||
tools:listitem="@layout/item_int_exp_move" />
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
<!-- 底部统计和操作按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/color_bottom_layout"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
<!-- 全选 -->
|
||||
<CheckBox
|
||||
android:id="@+id/cbSelectAll"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:onClick="@{()-> viewModel.toggleSelectAll()}"
|
||||
android:text="全选"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<!-- 统计信息 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{"合计:"+viewModel.totalCount+"票"}'
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text='@{"总件数:"+viewModel.totalPieces}'
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text='@{"总重量:"+viewModel.totalWeight}'
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 移库按钮 -->
|
||||
<TextView
|
||||
android:id="@+id/btnMove"
|
||||
style="@style/tv_bottom_btn"
|
||||
android:text="移库"
|
||||
android:visibility="visible" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
155
module_gjc/src/main/res/layout/item_int_exp_move.xml
Normal file
155
module_gjc/src/main/res/layout/item_int_exp_move.xml
Normal file
@@ -0,0 +1,155 @@
|
||||
<?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.GjcMove" />
|
||||
|
||||
<variable
|
||||
name="position"
|
||||
type="Integer" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:padding="15dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<!-- 左侧:CheckBox -->
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="@{bean.isSelected}"
|
||||
android:clickable="false"
|
||||
android:focusable="false" />
|
||||
|
||||
<!-- 中间:飞机图标 -->
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:src="@drawable/img_plane"
|
||||
android:contentDescription="@string/app_name" />
|
||||
|
||||
<!-- 右侧:信息区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="15dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 第一行 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{`运单号:` + (bean.prefix.isEmpty() ? bean.wbNo : bean.prefix + `-` + bean.wbNo)}"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="@{`件数:` + bean.pc}"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_gray" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="@{`重量:` + bean.weight}"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_gray" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="@{`承运人:` + bean.by1}"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_gray" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="@{`特码:` + bean.spCode}"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_gray"
|
||||
android:visibility="@{bean.spCode != null && !bean.spCode.isEmpty() ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="@{`代理人:` + bean.agentName}"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_gray" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第二行 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{`出运路径:` + (bean.dep.isEmpty() ? "" : bean.dep + `—`) + (bean.dest1.isEmpty() ? "" : bean.dest1 + `—`) + (bean.dest2.isEmpty() ? "" : bean.dest2 + `—`) + bean.dest}'
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_gray" />
|
||||
|
||||
<!-- 移交状态标签 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:background="@drawable/bg_green_radius_4"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="4dp"
|
||||
android:text="@{bean.moveState == 1 ? `已移交` : `未移交`}"
|
||||
android:textSize="12sp"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="@{`运单类型:` + bean.awbTypeName}"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_gray" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:text="@{`品名:` + (bean.goodsCn.isEmpty() ? bean.goods : bean.goodsCn)}"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/text_gray" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
Reference in New Issue
Block a user