feat: 开始组装 opt
This commit is contained in:
@@ -236,13 +236,7 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
||||
fun loadWaitingAssembleWaybills() {
|
||||
val wbNo = searchText.value?.trim() ?: ""
|
||||
|
||||
// 验证运单号不能为空
|
||||
if (wbNo.isEmpty()) {
|
||||
showToast("请输入运单号")
|
||||
return
|
||||
}
|
||||
|
||||
// 发起网络请求
|
||||
// 发起网络请求(空参数时相当于刷新列表)
|
||||
launchLoadingCollect({ NetApply.api.queryWaitingAssemble(wbNo) }) {
|
||||
onSuccess = { result ->
|
||||
// 数据转换: GjcWarehouse -> AssembleWaybillBean
|
||||
@@ -447,6 +441,16 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
||||
return
|
||||
}
|
||||
|
||||
// 校验组装件数不能大于运单件数
|
||||
val waybillPieces = waybillInfo.value?.waybillPieces?.trim() ?: ""
|
||||
val assembleCountInt = assembleCount.toLongOrNull() ?: 0L
|
||||
val waybillPiecesInt = waybillPieces.toLongOrNull() ?: 0L
|
||||
|
||||
if (assembleCountInt > waybillPiecesInt) {
|
||||
showToast("组装件数不能大于运单件数")
|
||||
return
|
||||
}
|
||||
|
||||
val assembleWeight = waybillInfo.value?.assembleWeight?.trim() ?: ""
|
||||
// 组装重量为非必填,不进行验证
|
||||
|
||||
|
||||
@@ -167,10 +167,13 @@
|
||||
|
||||
<!-- 选择列占位 -->
|
||||
|
||||
<Space
|
||||
<TextView
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center" />
|
||||
android:gravity="center"
|
||||
android:text="选择"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<!-- 运单号 -->
|
||||
<TextView
|
||||
|
||||
Reference in New Issue
Block a user