feat: io
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
/**
|
||||
* 组装信息Bean(左侧列表)
|
||||
* 组装信息Bean(左侧列表)
|
||||
*/
|
||||
class AssembleInfoBean {
|
||||
var waybillNo: String = "" // 运单号
|
||||
var pieces: String = "" // 件数
|
||||
var uldNo: String = "" // ULD编号
|
||||
var weightInfo: String = "" // 重量信息(如100/290kg)
|
||||
var hasArrow: Boolean = false // 是否显示箭头(可点击)
|
||||
var isOrange: Boolean = false // 是否橙色文字
|
||||
var showIndex: Boolean = true // 是否显示序号圆圈
|
||||
}
|
||||
|
||||
7
module_base/src/main/res/drawable/bg_circle_gray.xml
Normal file
7
module_base/src/main/res/drawable/bg_circle_gray.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
|
||||
<solid android:color="#999999" />
|
||||
|
||||
</shape>
|
||||
9
module_base/src/main/res/drawable/ic_arrow_right.xml
Normal file
9
module_base/src/main/res/drawable/ic_arrow_right.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp"
|
||||
android:height="20dp"
|
||||
android:viewportWidth="20"
|
||||
android:viewportHeight="20">
|
||||
<path
|
||||
android:fillColor="#999999"
|
||||
android:pathData="M8,4L8,16L12,10L8,4Z"/>
|
||||
</vector>
|
||||
@@ -32,6 +32,7 @@
|
||||
<color name="text_pink">#EA6BE1</color>
|
||||
<color name="text_red">#d9001b</color>
|
||||
<color name="text_green">#4CAF50</color>
|
||||
<color name="text_orange">#FF9800</color>
|
||||
|
||||
<color name="color_bottom_layout">#5c6890</color>
|
||||
<color name="color_f2">#F2F2F2</color>
|
||||
|
||||
@@ -15,7 +15,7 @@ import com.lukouguoji.module_base.ktx.showToast
|
||||
class IntExpAssembleStartViewModel : BaseViewModel() {
|
||||
|
||||
// ========== 搜索条件 ==========
|
||||
val searchWaybillNo = MutableLiveData("")
|
||||
val searchText = MutableLiveData("")
|
||||
|
||||
// ========== 左侧组装信息列表 ==========
|
||||
val assembleInfoList = MutableLiveData<MutableList<AssembleInfoBean>>()
|
||||
@@ -59,35 +59,65 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
||||
// 组装信息列表(左侧)
|
||||
assembleInfoList.value = mutableListOf(
|
||||
AssembleInfoBean().apply {
|
||||
waybillNo = "99912345678"
|
||||
pieces = "25"
|
||||
uldNo = "PMC12345MU"
|
||||
weightInfo = "100/290kg"
|
||||
hasArrow = true
|
||||
isOrange = false
|
||||
showIndex = true
|
||||
},
|
||||
AssembleInfoBean().apply {
|
||||
waybillNo = "99912345679"
|
||||
pieces = "18"
|
||||
uldNo = "AKE453654CZ"
|
||||
weightInfo = "100/290kg"
|
||||
hasArrow = true
|
||||
isOrange = false
|
||||
showIndex = true
|
||||
},
|
||||
AssembleInfoBean().apply {
|
||||
waybillNo = "99912345680"
|
||||
pieces = "32"
|
||||
uldNo = "AKE598190CZ"
|
||||
weightInfo = "100/290kg"
|
||||
hasArrow = true
|
||||
isOrange = false
|
||||
showIndex = true
|
||||
},
|
||||
AssembleInfoBean().apply {
|
||||
waybillNo = "99912345681"
|
||||
pieces = "15"
|
||||
uldNo = "78112345678"
|
||||
weightInfo = "100/100kg"
|
||||
hasArrow = false
|
||||
isOrange = true
|
||||
showIndex = false
|
||||
},
|
||||
AssembleInfoBean().apply {
|
||||
uldNo = "78112345999"
|
||||
weightInfo = "150/200kg"
|
||||
hasArrow = false
|
||||
isOrange = true
|
||||
showIndex = false
|
||||
},
|
||||
AssembleInfoBean().apply {
|
||||
uldNo = "78112345454"
|
||||
weightInfo = "120/300kg"
|
||||
hasArrow = false
|
||||
isOrange = true
|
||||
showIndex = false
|
||||
}
|
||||
)
|
||||
|
||||
// 组装位置列表(左侧)
|
||||
assemblePositionList.value = mutableListOf(
|
||||
AssemblePositionBean().apply {
|
||||
positionName = "A区-01号位"
|
||||
positionName = "组装区001"
|
||||
isSelected = true
|
||||
},
|
||||
AssemblePositionBean().apply {
|
||||
positionName = "A区-02号位"
|
||||
positionName = "组装区002"
|
||||
isSelected = false
|
||||
},
|
||||
AssemblePositionBean().apply {
|
||||
positionName = "B区-01号位"
|
||||
positionName = "组装区003"
|
||||
isSelected = false
|
||||
},
|
||||
AssemblePositionBean().apply {
|
||||
positionName = "组装区004"
|
||||
isSelected = false
|
||||
}
|
||||
)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp">
|
||||
android:padding="10dp">
|
||||
|
||||
<!-- ========== 左侧区域(30%)========== -->
|
||||
<LinearLayout
|
||||
@@ -34,17 +34,28 @@
|
||||
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
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="15dp"
|
||||
android:background="@color/color_f2"
|
||||
hint='@{"请输入搜索内容"}'
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.searchText}" />
|
||||
|
||||
<!-- 组装信息和组装位置卡片 -->
|
||||
<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"
|
||||
@@ -60,22 +71,15 @@
|
||||
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">
|
||||
android:layout_weight="1"
|
||||
android:layout_marginBottom="16dp" />
|
||||
|
||||
<!-- 组装位置标题 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -91,6 +95,7 @@
|
||||
android:layout_marginBottom="8dp"
|
||||
app:dividerColor="@color/line" />
|
||||
|
||||
<!-- 组装位置列表 -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_assemble_position"
|
||||
android:layout_width="match_parent"
|
||||
@@ -106,17 +111,6 @@
|
||||
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"
|
||||
@@ -356,40 +350,41 @@
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value="@={viewModel.waybillInfo.goodsName}" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<!-- 底部操作按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="15dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
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="120dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:background="@drawable/bg_red_radius_4"
|
||||
android:onClick="@{() -> viewModel.onLoadClick()}"
|
||||
android:text="装货"
|
||||
android:textSize="16sp" />
|
||||
</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>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
|
||||
<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" />
|
||||
@@ -17,43 +16,46 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingVertical="8dp">
|
||||
android:paddingVertical="12dp"
|
||||
android:paddingHorizontal="8dp">
|
||||
|
||||
<!-- 编号圆圈 -->
|
||||
<!-- 序号圆圈 -->
|
||||
<TextView
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@drawable/bg_circle_yellow"
|
||||
android:layout_width="28dp"
|
||||
android:layout_height="28dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:background="@drawable/bg_circle_gray"
|
||||
android:gravity="center"
|
||||
android:text="@{String.valueOf(position + 1)}"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="@{bean.showIndex ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
<!-- 运单号 -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
<!-- ULD编号 -->
|
||||
<TextView
|
||||
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}" />
|
||||
android:text="@{bean.uldNo}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<!-- 件数 -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
<!-- 重量信息 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.6"
|
||||
enable="@{false}"
|
||||
required="@{false}"
|
||||
title='@{"件数:"}'
|
||||
titleLength="@{3}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value="@={bean.pieces}" />
|
||||
android:layout_marginStart="12dp"
|
||||
android:text="@{bean.weightInfo}"
|
||||
android:textColor="@{bean.isOrange ? @color/text_orange : @color/colorPrimary}"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<!-- 箭头图标 -->
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:src="@drawable/ic_arrow_right"
|
||||
android:visibility="@{bean.hasArrow ? View.VISIBLE : View.GONE}" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
Reference in New Issue
Block a user