feat: io
This commit is contained in:
@@ -1,9 +1,12 @@
|
|||||||
package com.lukouguoji.module_base.bean
|
package com.lukouguoji.module_base.bean
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 组装信息Bean(左侧列表)
|
* 组装信息Bean(左侧列表)
|
||||||
*/
|
*/
|
||||||
class AssembleInfoBean {
|
class AssembleInfoBean {
|
||||||
var waybillNo: String = "" // 运单号
|
var uldNo: String = "" // ULD编号
|
||||||
var pieces: String = "" // 件数
|
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_pink">#EA6BE1</color>
|
||||||
<color name="text_red">#d9001b</color>
|
<color name="text_red">#d9001b</color>
|
||||||
<color name="text_green">#4CAF50</color>
|
<color name="text_green">#4CAF50</color>
|
||||||
|
<color name="text_orange">#FF9800</color>
|
||||||
|
|
||||||
<color name="color_bottom_layout">#5c6890</color>
|
<color name="color_bottom_layout">#5c6890</color>
|
||||||
<color name="color_f2">#F2F2F2</color>
|
<color name="color_f2">#F2F2F2</color>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import com.lukouguoji.module_base.ktx.showToast
|
|||||||
class IntExpAssembleStartViewModel : BaseViewModel() {
|
class IntExpAssembleStartViewModel : BaseViewModel() {
|
||||||
|
|
||||||
// ========== 搜索条件 ==========
|
// ========== 搜索条件 ==========
|
||||||
val searchWaybillNo = MutableLiveData("")
|
val searchText = MutableLiveData("")
|
||||||
|
|
||||||
// ========== 左侧组装信息列表 ==========
|
// ========== 左侧组装信息列表 ==========
|
||||||
val assembleInfoList = MutableLiveData<MutableList<AssembleInfoBean>>()
|
val assembleInfoList = MutableLiveData<MutableList<AssembleInfoBean>>()
|
||||||
@@ -59,35 +59,65 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
|||||||
// 组装信息列表(左侧)
|
// 组装信息列表(左侧)
|
||||||
assembleInfoList.value = mutableListOf(
|
assembleInfoList.value = mutableListOf(
|
||||||
AssembleInfoBean().apply {
|
AssembleInfoBean().apply {
|
||||||
waybillNo = "99912345678"
|
uldNo = "PMC12345MU"
|
||||||
pieces = "25"
|
weightInfo = "100/290kg"
|
||||||
|
hasArrow = true
|
||||||
|
isOrange = false
|
||||||
|
showIndex = true
|
||||||
},
|
},
|
||||||
AssembleInfoBean().apply {
|
AssembleInfoBean().apply {
|
||||||
waybillNo = "99912345679"
|
uldNo = "AKE453654CZ"
|
||||||
pieces = "18"
|
weightInfo = "100/290kg"
|
||||||
|
hasArrow = true
|
||||||
|
isOrange = false
|
||||||
|
showIndex = true
|
||||||
},
|
},
|
||||||
AssembleInfoBean().apply {
|
AssembleInfoBean().apply {
|
||||||
waybillNo = "99912345680"
|
uldNo = "AKE598190CZ"
|
||||||
pieces = "32"
|
weightInfo = "100/290kg"
|
||||||
|
hasArrow = true
|
||||||
|
isOrange = false
|
||||||
|
showIndex = true
|
||||||
},
|
},
|
||||||
AssembleInfoBean().apply {
|
AssembleInfoBean().apply {
|
||||||
waybillNo = "99912345681"
|
uldNo = "78112345678"
|
||||||
pieces = "15"
|
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(
|
assemblePositionList.value = mutableListOf(
|
||||||
AssemblePositionBean().apply {
|
AssemblePositionBean().apply {
|
||||||
positionName = "A区-01号位"
|
positionName = "组装区001"
|
||||||
isSelected = true
|
isSelected = true
|
||||||
},
|
},
|
||||||
AssemblePositionBean().apply {
|
AssemblePositionBean().apply {
|
||||||
positionName = "A区-02号位"
|
positionName = "组装区002"
|
||||||
isSelected = false
|
isSelected = false
|
||||||
},
|
},
|
||||||
AssemblePositionBean().apply {
|
AssemblePositionBean().apply {
|
||||||
positionName = "B区-01号位"
|
positionName = "组装区003"
|
||||||
|
isSelected = false
|
||||||
|
},
|
||||||
|
AssemblePositionBean().apply {
|
||||||
|
positionName = "组装区004"
|
||||||
isSelected = false
|
isSelected = false
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:padding="16dp">
|
android:padding="10dp">
|
||||||
|
|
||||||
<!-- ========== 左侧区域(30%)========== -->
|
<!-- ========== 左侧区域(30%)========== -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -34,17 +34,28 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="0.3"
|
android:layout_weight="0.3"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
|
android:background="@drawable/bg_white_radius_8"
|
||||||
android:orientation="vertical">
|
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
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/bg_white_radius_8"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="16dp">
|
android:padding="16dp">
|
||||||
|
|
||||||
|
<!-- 组装信息标题 -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -60,22 +71,15 @@
|
|||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
app:dividerColor="@color/line" />
|
app:dividerColor="@color/line" />
|
||||||
|
|
||||||
|
<!-- 组装信息列表 -->
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/rv_assemble_info"
|
android:id="@+id/rv_assemble_info"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1"
|
||||||
</LinearLayout>
|
android:layout_marginBottom="16dp" />
|
||||||
|
|
||||||
<!-- 组装位置选择 -->
|
|
||||||
<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
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -91,6 +95,7 @@
|
|||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
app:dividerColor="@color/line" />
|
app:dividerColor="@color/line" />
|
||||||
|
|
||||||
|
<!-- 组装位置列表 -->
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/rv_assemble_position"
|
android:id="@+id/rv_assemble_position"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -106,17 +111,6 @@
|
|||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:orientation="vertical">
|
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
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -356,40 +350,41 @@
|
|||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
value="@={viewModel.waybillInfo.goodsName}" />
|
value="@={viewModel.waybillInfo.goodsName}" />
|
||||||
</LinearLayout>
|
</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>
|
||||||
</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>
|
</LinearLayout>
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
<data>
|
<data>
|
||||||
<import type="android.view.View" />
|
<import type="android.view.View" />
|
||||||
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
|
|
||||||
<variable
|
<variable
|
||||||
name="bean"
|
name="bean"
|
||||||
type="com.lukouguoji.module_base.bean.AssembleInfoBean" />
|
type="com.lukouguoji.module_base.bean.AssembleInfoBean" />
|
||||||
@@ -17,43 +16,46 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:paddingVertical="8dp">
|
android:paddingVertical="12dp"
|
||||||
|
android:paddingHorizontal="8dp">
|
||||||
|
|
||||||
<!-- 编号圆圈 -->
|
<!-- 序号圆圈 -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="32dp"
|
android:layout_width="28dp"
|
||||||
android:layout_height="32dp"
|
android:layout_height="28dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="12dp"
|
||||||
android:background="@drawable/bg_circle_yellow"
|
android:background="@drawable/bg_circle_gray"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@{String.valueOf(position + 1)}"
|
android:text="@{String.valueOf(position + 1)}"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="16sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold"
|
||||||
|
android:visibility="@{bean.showIndex ? View.VISIBLE : View.GONE}" />
|
||||||
|
|
||||||
<!-- 运单号 -->
|
<!-- ULD编号 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_marginEnd="8dp"
|
android:text="@{bean.uldNo}"
|
||||||
enable="@{false}"
|
android:textColor="@color/text_normal"
|
||||||
required="@{false}"
|
android:textSize="15sp" />
|
||||||
title='@{"运单号:"}'
|
|
||||||
titleLength="@{5}"
|
|
||||||
type="@{DataLayoutType.INPUT}"
|
|
||||||
value="@={bean.waybillNo}" />
|
|
||||||
|
|
||||||
<!-- 件数 -->
|
<!-- 重量信息 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0.6"
|
android:layout_marginStart="12dp"
|
||||||
enable="@{false}"
|
android:text="@{bean.weightInfo}"
|
||||||
required="@{false}"
|
android:textColor="@{bean.isOrange ? @color/text_orange : @color/colorPrimary}"
|
||||||
title='@{"件数:"}'
|
android:textSize="15sp" />
|
||||||
titleLength="@{3}"
|
|
||||||
type="@{DataLayoutType.INPUT}"
|
<!-- 箭头图标 -->
|
||||||
value="@={bean.pieces}" />
|
<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>
|
</LinearLayout>
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
Reference in New Issue
Block a user