fix: 开始组装
This commit is contained in:
@@ -4,6 +4,7 @@ package com.lukouguoji.module_base.bean
|
|||||||
* 组装位置Bean
|
* 组装位置Bean
|
||||||
*/
|
*/
|
||||||
class AssemblePositionBean {
|
class AssemblePositionBean {
|
||||||
|
var positionCode: String = "" // 位置编码/ID
|
||||||
var positionName: String = "" // 位置名称
|
var positionName: String = "" // 位置名称
|
||||||
var isSelected: Boolean = false // 是否选中
|
var isSelected: Boolean = false // 是否选中
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
|||||||
onSuccess = { result ->
|
onSuccess = { result ->
|
||||||
val list = result.data?.mapIndexed { index, dictBean ->
|
val list = result.data?.mapIndexed { index, dictBean ->
|
||||||
AssemblePositionBean().apply {
|
AssemblePositionBean().apply {
|
||||||
|
positionCode = dictBean.code // 保存位置编码/ID
|
||||||
positionName = dictBean.name
|
positionName = dictBean.name
|
||||||
isSelected = (index == 0) // 默认选中第一项
|
isSelected = (index == 0) // 默认选中第一项
|
||||||
}
|
}
|
||||||
@@ -569,6 +570,8 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val loadAreaId = selectedPosition.value?.positionCode?.trim() ?: ""
|
||||||
|
|
||||||
// 2. 构建useInfo(ULD信息)
|
// 2. 构建useInfo(ULD信息)
|
||||||
val useInfo = mapOf(
|
val useInfo = mapOf(
|
||||||
"uld" to uldNo,
|
"uld" to uldNo,
|
||||||
@@ -579,6 +582,7 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
|||||||
else -> ""
|
else -> ""
|
||||||
},
|
},
|
||||||
"loadArea" to loadArea,
|
"loadArea" to loadArea,
|
||||||
|
"loadAreaId" to loadAreaId.ifEmpty { null }, // 组装位置ID
|
||||||
"useId" to if (uldInfo.value?.useId == 0L) null else uldInfo.value?.useId // 添加useId(来自getUld接口)
|
"useId" to if (uldInfo.value?.useId == 0L) null else uldInfo.value?.useId // 添加useId(来自getUld接口)
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -644,6 +648,7 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
|||||||
"consumeWeight" to materialWeight.toDoubleOrNull(),
|
"consumeWeight" to materialWeight.toDoubleOrNull(),
|
||||||
"ldId" to operatorValue,
|
"ldId" to operatorValue,
|
||||||
"loadArea" to loadArea,
|
"loadArea" to loadArea,
|
||||||
|
"loadAreaId" to loadAreaId.ifEmpty { null }, // 组装位置ID
|
||||||
"useInfo" to useInfo,
|
"useInfo" to useInfo,
|
||||||
"wbInfo" to wbInfo,
|
"wbInfo" to wbInfo,
|
||||||
"userId" to SharedPreferenceUtil.getString(Constant.Share.account)
|
"userId" to SharedPreferenceUtil.getString(Constant.Share.account)
|
||||||
|
|||||||
@@ -170,7 +170,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='@{bean.agentName}'
|
android:text='@{bean.agentCode}'
|
||||||
tools:text="顺丰" />
|
tools:text="顺丰" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|||||||
Reference in New Issue
Block a user