fix: 国际进港出库列表页面优化及交互完善
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -54,6 +54,18 @@ class IntImpPickUpDLVBean : Serializable {
|
|||||||
var awbPc: Long = 0
|
var awbPc: Long = 0
|
||||||
|
|
||||||
// ========== UI扩展字段 ==========
|
// ========== UI扩展字段 ==========
|
||||||
|
/**
|
||||||
|
* 航班信息展示:优先使用 flight 字段,否则用 fdate(去杠)/fno 拼接
|
||||||
|
* 格式示例:20240204/MU2023
|
||||||
|
*/
|
||||||
|
val flightInfo: String
|
||||||
|
get() {
|
||||||
|
if (!flight.isNullOrEmpty()) return flight
|
||||||
|
val dateStr = fdate?.replace("-", "")?.take(8) ?: ""
|
||||||
|
val noStr = fno ?: ""
|
||||||
|
return if (dateStr.isNotEmpty() || noStr.isNotEmpty()) "$dateStr/$noStr" else ""
|
||||||
|
}
|
||||||
|
|
||||||
val checked: ObservableBoolean = ObservableBoolean(false)
|
val checked: ObservableBoolean = ObservableBoolean(false)
|
||||||
|
|
||||||
var isSelected: Boolean
|
var isSelected: Boolean
|
||||||
|
|||||||
@@ -16,9 +16,12 @@ import com.lukouguoji.module_base.ktx.commonAdapter
|
|||||||
import com.lukouguoji.module_base.ktx.launchCollect
|
import com.lukouguoji.module_base.ktx.launchCollect
|
||||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||||
import com.lukouguoji.module_base.ktx.showToast
|
import com.lukouguoji.module_base.ktx.showToast
|
||||||
|
import com.lukouguoji.module_base.ktx.formatDate
|
||||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||||
|
import com.lukouguoji.module_base.model.ConfirmDialogModel
|
||||||
import com.lukouguoji.module_base.model.ScanModel
|
import com.lukouguoji.module_base.model.ScanModel
|
||||||
import dev.utils.app.info.KeyValue
|
import dev.utils.app.info.KeyValue
|
||||||
|
import dev.utils.common.DateUtils
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -27,7 +30,7 @@ import kotlinx.coroutines.launch
|
|||||||
class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
||||||
|
|
||||||
// ========== 搜索条件 ==========
|
// ========== 搜索条件 ==========
|
||||||
val paymentDateStart = MutableLiveData("") // 缴费日期起
|
val paymentDateStart = MutableLiveData(DateUtils.getCurrentTime().formatDate()) // 缴费日期起
|
||||||
val paymentDateEnd = MutableLiveData("") // 缴费日期止
|
val paymentDateEnd = MutableLiveData("") // 缴费日期止
|
||||||
val agentCode = MutableLiveData("") // 代理人
|
val agentCode = MutableLiveData("") // 代理人
|
||||||
val wbNo = MutableLiveData("") // 运单号
|
val wbNo = MutableLiveData("") // 运单号
|
||||||
@@ -116,15 +119,20 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
launchLoadingCollect({ NetApply.api.confirmIntImpPickUpDLV(selectedItems.toRequestBody()) }) {
|
ConfirmDialogModel(
|
||||||
onSuccess = {
|
message = "确定要将选中的${selectedItems.size}条记录确认出库吗?",
|
||||||
showToast("确认出库成功")
|
title = "确认出库"
|
||||||
viewModelScope.launch {
|
) {
|
||||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
launchLoadingCollect({ NetApply.api.confirmIntImpPickUpDLV(selectedItems.toRequestBody()) }) {
|
||||||
|
onSuccess = {
|
||||||
|
showToast("确认出库成功")
|
||||||
|
viewModelScope.launch {
|
||||||
|
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||||
|
}
|
||||||
|
refresh()
|
||||||
}
|
}
|
||||||
refresh()
|
|
||||||
}
|
}
|
||||||
}
|
}.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -61,6 +61,12 @@
|
|||||||
|
|
||||||
<!-- 运单号 -->
|
<!-- 运单号 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
|
autoQueryEnabled="@{true}"
|
||||||
|
autoQueryMaxLength="@{8}"
|
||||||
|
autoQueryMinLength="@{4}"
|
||||||
|
autoQueryParamKey="@{`wbNo`}"
|
||||||
|
autoQueryTitle="@{`选择运单号`}"
|
||||||
|
autoQueryUrl="@{`/IntImpPickUpDlv/queryWbNoList`}"
|
||||||
hint='@{"请输入运单号"}'
|
hint='@{"请输入运单号"}'
|
||||||
icon="@{@drawable/img_scan}"
|
icon="@{@drawable/img_scan}"
|
||||||
setOnIconClickListener="@{(v)-> viewModel.scanWbNo()}"
|
setOnIconClickListener="@{(v)-> viewModel.scanWbNo()}"
|
||||||
@@ -159,7 +165,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text='@{"合计:" + viewModel.totalCount + "票"}'
|
android:text='@{"合计:" + viewModel.totalCount + "票"}'
|
||||||
android:textColor="@color/bottom_tool_tips_text_color"
|
android:textColor="@color/bottom_tool_tips_text_color"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
@@ -168,7 +174,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
android:text='@{"总件数:" + viewModel.totalPc}'
|
android:text='@{"总件数:" + viewModel.totalPc}'
|
||||||
android:textColor="@color/bottom_tool_tips_text_color"
|
android:textColor="@color/bottom_tool_tips_text_color"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
@@ -177,7 +183,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_marginLeft="20dp"
|
||||||
android:text='@{"总重量:" + viewModel.totalWeight}'
|
android:text='@{"总重量:" + viewModel.totalWeight}'
|
||||||
android:textColor="@color/bottom_tool_tips_text_color"
|
android:textColor="@color/bottom_tool_tips_text_color"
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|||||||
@@ -13,12 +13,13 @@
|
|||||||
type="Integer" />
|
type="Integer" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
|
android:id="@+id/ll"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="10dp"
|
android:layout_marginHorizontal="15dp"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginVertical="5dp"
|
||||||
android:background="@drawable/bg_white_radius_8"
|
android:background="@drawable/bg_item"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:padding="10dp">
|
android:padding="10dp">
|
||||||
@@ -28,7 +29,7 @@
|
|||||||
android:id="@+id/iv_icon"
|
android:id="@+id/iv_icon"
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
android:layout_marginEnd="10dp"
|
android:layout_gravity="center"
|
||||||
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
|
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
|
||||||
android:src="@drawable/img_plane" />
|
android:src="@drawable/img_plane" />
|
||||||
|
|
||||||
@@ -36,22 +37,21 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<!-- 第一行:运单号、代理人、航班信息、件数、重量 -->
|
<!-- 第一行:运单号、代理人、航班信息、件数、重量 -->
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<!-- 运单号 -->
|
<!-- 运单号 -->
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.2"
|
android:layout_weight="1.0"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical">
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
completeSpace="@{5}"
|
completeSpace="@{5}"
|
||||||
@@ -65,17 +65,17 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{bean.wbNo}"
|
android:text="@{bean.wbNo}"
|
||||||
android:textColor="@color/colorPrimary"
|
android:textColor="@color/colorPrimary"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
<!-- 代理人 -->
|
<!-- 代理人 -->
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0.8"
|
android:layout_weight="0.6"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical">
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
completeSpace="@{4}"
|
completeSpace="@{4}"
|
||||||
@@ -90,15 +90,14 @@
|
|||||||
android:text="@{bean.agentCode}"
|
android:text="@{bean.agentCode}"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
<!-- 航班信息 -->
|
<!-- 航班信息 -->
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.2"
|
android:layout_weight="1.0"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical">
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
completeSpace="@{5}"
|
completeSpace="@{5}"
|
||||||
@@ -110,21 +109,20 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{bean.flight}"
|
android:text="@{bean.flightInfo}"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
<!-- 件数 -->
|
<!-- 件数 -->
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0.8"
|
android:layout_weight="0.8"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical">
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
completeSpace="@{3}"
|
completeSpace="@{5}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="件数:"
|
android:text="件数:"
|
||||||
@@ -136,15 +134,14 @@
|
|||||||
android:text="@{String.valueOf(bean.pc)}"
|
android:text="@{String.valueOf(bean.pc)}"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
<!-- 重量 -->
|
<!-- 重量 -->
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0.8"
|
android:layout_weight="0.6"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical">
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
completeSpace="@{3}"
|
completeSpace="@{3}"
|
||||||
@@ -159,24 +156,22 @@
|
|||||||
android:text="@{String.valueOf((int)bean.weight)}"
|
android:text="@{String.valueOf((int)bean.weight)}"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
<!-- 第二行:提货单号、库位、提取时间、品名(中) -->
|
<!-- 第二行:提货单号、库位、提取时间、品名(中) -->
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp">
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<!-- 提货单号 -->
|
<!-- 提货单号 -->
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.2"
|
android:layout_weight="1.0"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical">
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
completeSpace="@{5}"
|
completeSpace="@{5}"
|
||||||
@@ -191,21 +186,20 @@
|
|||||||
android:text="@{bean.pkId}"
|
android:text="@{bean.pkId}"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
<!-- 库位 -->
|
<!-- 库位 -->
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0.8"
|
android:layout_weight="0.6"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical">
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
completeSpace="@{4}"
|
completeSpace="@{4}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="库 位:"
|
android:text="库位:"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -214,15 +208,14 @@
|
|||||||
android:text="@{bean.location}"
|
android:text="@{bean.location}"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
<!-- 提取时间 -->
|
<!-- 提取时间 -->
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.2"
|
android:layout_weight="1.0"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical">
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
completeSpace="@{5}"
|
completeSpace="@{5}"
|
||||||
@@ -237,35 +230,37 @@
|
|||||||
android:text="@{bean.chargeTime}"
|
android:text="@{bean.chargeTime}"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
<!-- 品名(中):合并件数+重量列位置 -->
|
<!-- 品名(中):占据件数+重量两列宽度 -->
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.LinearLayoutCompat
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.6"
|
android:layout_weight="1.4"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical">
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
completeSpace="@{6}"
|
completeSpace="@{5}"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="品名(中):"
|
android:text="品名(中):"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
android:text="@{bean.goods}"
|
android:text="@{bean.goods}"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
Reference in New Issue
Block a user