From d69f964464663c1e79d84008e914e914389ba306 Mon Sep 17 00:00:00 2001 From: YANGJIANKUAN Date: Thu, 27 Nov 2025 17:49:14 +0800 Subject: [PATCH] feat: io --- .../module_base/bean/AssembleInfoBean.kt | 9 +- .../src/main/res/drawable/bg_circle_gray.xml | 7 ++ .../src/main/res/drawable/ic_arrow_right.xml | 9 ++ module_base/src/main/res/values/colors.xml | 1 + .../viewModel/IntExpAssembleStartViewModel.kt | 54 +++++++-- .../activity_int_exp_assemble_start.xml | 105 +++++++++--------- .../main/res/layout/item_assemble_info.xml | 58 +++++----- 7 files changed, 145 insertions(+), 98 deletions(-) create mode 100644 module_base/src/main/res/drawable/bg_circle_gray.xml create mode 100644 module_base/src/main/res/drawable/ic_arrow_right.xml diff --git a/module_base/src/main/java/com/lukouguoji/module_base/bean/AssembleInfoBean.kt b/module_base/src/main/java/com/lukouguoji/module_base/bean/AssembleInfoBean.kt index 09c4060..30fbd1f 100644 --- a/module_base/src/main/java/com/lukouguoji/module_base/bean/AssembleInfoBean.kt +++ b/module_base/src/main/java/com/lukouguoji/module_base/bean/AssembleInfoBean.kt @@ -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 // 是否显示序号圆圈 } diff --git a/module_base/src/main/res/drawable/bg_circle_gray.xml b/module_base/src/main/res/drawable/bg_circle_gray.xml new file mode 100644 index 0000000..bfe12c0 --- /dev/null +++ b/module_base/src/main/res/drawable/bg_circle_gray.xml @@ -0,0 +1,7 @@ + + + + + + diff --git a/module_base/src/main/res/drawable/ic_arrow_right.xml b/module_base/src/main/res/drawable/ic_arrow_right.xml new file mode 100644 index 0000000..b79e8b7 --- /dev/null +++ b/module_base/src/main/res/drawable/ic_arrow_right.xml @@ -0,0 +1,9 @@ + + + diff --git a/module_base/src/main/res/values/colors.xml b/module_base/src/main/res/values/colors.xml index 9169954..501232f 100644 --- a/module_base/src/main/res/values/colors.xml +++ b/module_base/src/main/res/values/colors.xml @@ -32,6 +32,7 @@ #EA6BE1 #d9001b #4CAF50 + #FF9800 #5c6890 #F2F2F2 diff --git a/module_gjc/src/main/java/com/lukouguoji/gjc/viewModel/IntExpAssembleStartViewModel.kt b/module_gjc/src/main/java/com/lukouguoji/gjc/viewModel/IntExpAssembleStartViewModel.kt index 6ad8ef8..4de9fd3 100644 --- a/module_gjc/src/main/java/com/lukouguoji/gjc/viewModel/IntExpAssembleStartViewModel.kt +++ b/module_gjc/src/main/java/com/lukouguoji/gjc/viewModel/IntExpAssembleStartViewModel.kt @@ -15,7 +15,7 @@ import com.lukouguoji.module_base.ktx.showToast class IntExpAssembleStartViewModel : BaseViewModel() { // ========== 搜索条件 ========== - val searchWaybillNo = MutableLiveData("") + val searchText = MutableLiveData("") // ========== 左侧组装信息列表 ========== val assembleInfoList = MutableLiveData>() @@ -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 } ) diff --git a/module_gjc/src/main/res/layout/activity_int_exp_assemble_start.xml b/module_gjc/src/main/res/layout/activity_int_exp_assemble_start.xml index e2d2f1c..4180053 100644 --- a/module_gjc/src/main/res/layout/activity_int_exp_assemble_start.xml +++ b/module_gjc/src/main/res/layout/activity_int_exp_assemble_start.xml @@ -26,7 +26,7 @@ android:layout_height="0dp" android:layout_weight="1" android:orientation="horizontal" - android:padding="16dp"> + android:padding="10dp"> - + + + + + + - - - - + android:layout_weight="1" + android:layout_marginBottom="16dp" /> + + - - - + + + + + + + + + - - - - - - diff --git a/module_gjc/src/main/res/layout/item_assemble_info.xml b/module_gjc/src/main/res/layout/item_assemble_info.xml index ae9bd21..a3eb62d 100644 --- a/module_gjc/src/main/res/layout/item_assemble_info.xml +++ b/module_gjc/src/main/res/layout/item_assemble_info.xml @@ -3,7 +3,6 @@ - @@ -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"> - + + android:textSize="14sp" + android:textStyle="bold" + android:visibility="@{bean.showIndex ? View.VISIBLE : View.GONE}" /> - - + + android:text="@{bean.uldNo}" + android:textColor="@color/text_normal" + android:textSize="15sp" /> - - + + android:layout_marginStart="12dp" + android:text="@{bean.weightInfo}" + android:textColor="@{bean.isOrange ? @color/text_orange : @color/colorPrimary}" + android:textSize="15sp" /> + + +