fix(ULD管理): 新增/修改补充最大装载容积、最大载重为可编辑必填(问题清单 #36)

- 联调发现 saveUld 缺 maxVolume 或 maxWeight 时后端直接 500,手机新增表单(原仅详情展示两项)必然失败
- 按平板表单口径改为新增/修改可编辑(数字键盘,新增必填)并前端校验
- 内网实测:PMC12349JG 新增成功,source/inStoreTime(补 00:00:00)/nowPort/maxVolume/maxWeight 均落库,测试数据已清理

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
YANG JIANKUAN
2026-10-09 07:44:57 -07:00
parent 6f813f9cff
commit 5e8fe7d69d
2 changed files with 23 additions and 8 deletions

View File

@@ -107,6 +107,15 @@ class UldEditViewModel : BaseViewModel() {
showToast("自重不能为空") showToast("自重不能为空")
return return
} }
// saveUld 缺最大装载容积/最大载重时后端直接 500(内网实测),提前拦截
if (bean.maxVolume.isBlank()) {
showToast("最大装载容积不能为空")
return
}
if (bean.maxWeight.isBlank()) {
showToast("最大载重不能为空")
return
}
if (bean.inStoreTime.isBlank()) { if (bean.inStoreTime.isBlank()) {
showToast("入库时间不能为空") showToast("入库时间不能为空")
return return

View File

@@ -172,23 +172,29 @@
type="@{viewModel.pageType == DetailsPageType.Details ? PhoneFormRowType.TEXT : PhoneFormRowType.INPUT}" type="@{viewModel.pageType == DetailsPageType.Details ? PhoneFormRowType.TEXT : PhoneFormRowType.INPUT}"
value="@={viewModel.uldBean.uldWeight}" /> value="@={viewModel.uldBean.uldWeight}" />
<!-- 最大装载容积(仅详情展示,与设计稿一致) --> <!-- 最大装载容积:新增/修改可编辑(与平板一致;saveUld 缺该字段后端 500,内网实测) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow <com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
enable="@{viewModel.pageType != DetailsPageType.Details}"
hint='@{"请输入最大装载容积"}'
numeric="@{true}"
required="@{viewModel.pageType == DetailsPageType.Add}"
title='@{"最大装载容积(m³)"}' title='@{"最大装载容积(m³)"}'
type="@{PhoneFormRowType.TEXT}" type="@{viewModel.pageType == DetailsPageType.Details ? PhoneFormRowType.TEXT : PhoneFormRowType.INPUT}"
value="@{viewModel.uldBean.maxVolume}" value="@={viewModel.uldBean.maxVolume}" />
android:visibility="@{viewModel.pageType == DetailsPageType.Details ? View.VISIBLE : View.GONE}" />
<!-- 最大载重(仅详情展示,与设计稿一致) --> <!-- 最大载重:新增/修改可编辑(与平板一致;saveUld 缺该字段后端 500,内网实测) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow <com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
enable="@{viewModel.pageType != DetailsPageType.Details}"
hint='@{"请输入最大载重"}'
numeric="@{true}"
required="@{viewModel.pageType == DetailsPageType.Add}"
title='@{"最大载重(kg)"}' title='@{"最大载重(kg)"}'
type="@{PhoneFormRowType.TEXT}" type="@{viewModel.pageType == DetailsPageType.Details ? PhoneFormRowType.TEXT : PhoneFormRowType.INPUT}"
value="@{viewModel.uldBean.maxWeight}" value="@={viewModel.uldBean.maxWeight}" />
android:visibility="@{viewModel.pageType == DetailsPageType.Details ? View.VISIBLE : View.GONE}" />
<!-- 进港航班号(ifNo) --> <!-- 进港航班号(ifNo) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow <com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow