feat: 删除申报/理货申报增加申报状态校验

四个页面删除申报仅允许申报状态为01的记录;
出港理货申报仅允许状态为空的记录;
并修复理货分单申报状态误绑定 arrivalStatus 的问题

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-20 13:46:32 +08:00
parent f53a15abb5
commit faf7698829
5 changed files with 37 additions and 1 deletions

View File

@@ -175,6 +175,12 @@ class IntArrAirManifestViewModel : BasePageViewModel() {
fun deleteDeclarationClick() {
val (maWbList, haWbList) = getSelectedItems("请选择要删除申报的舱单") ?: return
// 校验申报状态:只有申报状态为 01 的舱单才能删除申报
if (maWbList.any { it.mftStatus != "01" } || haWbList.any { it.mftStatus != "01" }) {
showToast("只能删除申报状态为01的舱单")
return
}
// 从接口获取删除原因列表
launchLoadingCollect({ NetApply.api.getDelReasonList() }) {
onSuccess = { result ->