fix: 开始组装
This commit is contained in:
@@ -145,6 +145,7 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
||||
onSuccess = { result ->
|
||||
val list = result.data?.mapIndexed { index, dictBean ->
|
||||
AssemblePositionBean().apply {
|
||||
positionCode = dictBean.code // 保存位置编码/ID
|
||||
positionName = dictBean.name
|
||||
isSelected = (index == 0) // 默认选中第一项
|
||||
}
|
||||
@@ -569,6 +570,8 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
||||
return
|
||||
}
|
||||
|
||||
val loadAreaId = selectedPosition.value?.positionCode?.trim() ?: ""
|
||||
|
||||
// 2. 构建useInfo(ULD信息)
|
||||
val useInfo = mapOf(
|
||||
"uld" to uldNo,
|
||||
@@ -579,6 +582,7 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
||||
else -> ""
|
||||
},
|
||||
"loadArea" to loadArea,
|
||||
"loadAreaId" to loadAreaId.ifEmpty { null }, // 组装位置ID
|
||||
"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(),
|
||||
"ldId" to operatorValue,
|
||||
"loadArea" to loadArea,
|
||||
"loadAreaId" to loadAreaId.ifEmpty { null }, // 组装位置ID
|
||||
"useInfo" to useInfo,
|
||||
"wbInfo" to wbInfo,
|
||||
"userId" to SharedPreferenceUtil.getString(Constant.Share.account)
|
||||
|
||||
Reference in New Issue
Block a user