Compare commits

...

3 Commits

Author SHA1 Message Date
5e1ccc9e8a feat: dev 2026-03-22 17:55:05 +08:00
89d4812d9f feat: 国际进港舱单新增页面优化及菜单调整
- 对调首页国际进港模块"原始舱单"和"进港舱单"菜单位置
- 航班日期默认为当天日期
- 运单号增加11位数字及mod7校验位验证
- 业务类型默认选中"普通货物运输"
- 件数限制整数输入,重量允许小数输入

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 17:54:26 +08:00
8af644288d fix: 修复国际进港分单列表项选中样式并补充规范文档
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 17:31:36 +08:00
10 changed files with 80 additions and 14 deletions

View File

@@ -102,7 +102,8 @@
"mcp__apifox__refresh_project_oas_kcl8s7",
"mcp__apifox__read_project_oas_ref_resources_kcl8s7",
"mcp__apifox__read_project_oas_x3v6fh",
"mcp__apifox__read_project_oas_ref_resources_x3v6fh"
"mcp__apifox__read_project_oas_ref_resources_x3v6fh",
"mcp__plugin_claude-mem_mcp-search__smart_outline"
],
"deny": [],
"ask": []

View File

@@ -383,6 +383,25 @@ fun toggleAllExpand() {
}
```
4. **子列表项 checkbox 样式**(必须使用 `_style` 系列,禁止使用 `_gray` 系列):
```xml
<!-- 子列表项 item_xxx_sub.xml 中的 iv_checkbox -->
<ImageView
android:id="@+id/iv_checkbox"
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:layout_weight="0.5"
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_style : @drawable/radiobtn_unchecked_style}"
android:src="@drawable/radiobtn_unchecked_style" />
```
| 资源 | 含义 | 外观 |
|------|------|------|
| `radiobtn_checked_style` | 选中 | colorPrimary 蓝色实心圆 + 白色内环 |
| `radiobtn_unchecked_style` | 未选中 | 透明 + 黑色边框圆 |
| ~~`radiobtn_checked_gray`~~ | ❌ 禁用 | 灰色实心圆(错误样式) |
**参考文件**: `module_gjc/.../IntExpStorageUseActivity.kt``IntExpStorageUseViewModel.kt`
---

View File

@@ -825,16 +825,16 @@ class HomeFragment : Fragment() {
)
list.add(
RightMenu(
Constant.AuthName.IntArrAirManifest,
Constant.AuthName.IntImpManifest,
R.mipmap.img_bwjx,
"原始舱单"
"进港舱单"
)
)
list.add(
RightMenu(
Constant.AuthName.IntImpManifest,
Constant.AuthName.IntArrAirManifest,
R.mipmap.img_bwjx,
"进港舱单"
"原始舱单"
)
)
list.add(

View File

@@ -2,8 +2,8 @@ package com.lukouguoji.gjj.activity
import android.content.Context
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.text.InputType
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityGjjManifestAddBinding
import com.lukouguoji.gjj.viewModel.GjjManifestAddViewModel
@@ -23,6 +23,14 @@ class GjjManifestAddActivity :
override fun initOnCreate(savedInstanceState: Bundle?) {
binding.viewModel = viewModel
binding.flightNoInput.et.setUpperCaseAlphanumericFilter()
// 件数只允许输入整数
binding.waybillNumInput.inputType = InputType.TYPE_CLASS_NUMBER
binding.actualNumInput.inputType = InputType.TYPE_CLASS_NUMBER
// 重量允许输入小数
binding.actualWeightInput.inputType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL
binding.billingWeightInput.inputType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL
viewModel.initOnCreated(intent)
// 动态设置标题(必须在 initOnCreated 之后pageType 已从 Intent 解析)

View File

@@ -12,6 +12,7 @@ import com.lukouguoji.module_base.common.DetailsPageType
import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.ktx.finish
import com.lukouguoji.module_base.ktx.formatDate
import com.lukouguoji.module_base.ktx.launchCollect
import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.ktx.noNull
@@ -20,6 +21,7 @@ import com.lukouguoji.module_base.ktx.toRequestBody
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
import com.lukouguoji.module_base.util.DictUtils
import dev.utils.app.info.KeyValue
import dev.utils.common.DateUtils
import kotlinx.coroutines.launch
class GjjManifestAddViewModel : BaseViewModel() {
@@ -33,8 +35,8 @@ class GjjManifestAddViewModel : BaseViewModel() {
// 航班ID
var fid: String = ""
// 航班日期
val flightDate = MutableLiveData("")
// 航班日期(新增模式默认今天)
val flightDate = MutableLiveData(DateUtils.getCurrentTime().formatDate())
// 航班号
val flightNo = MutableLiveData("")
@@ -173,6 +175,12 @@ class GjjManifestAddViewModel : BaseViewModel() {
}
DictUtils.getBusinessTypeList(addAll = false) {
businessTypeList.postValue(it)
// 新增模式下默认选中"普通货物运输"
if (pageType.value == DetailsPageType.Add && businessType.value.isNullOrEmpty()) {
it.find { b -> b.key.contains("普通货物运输") }?.let { b ->
businessType.postValue(b.value)
}
}
}
DictUtils.getShouYunPackageTypeList {
packageTypeList.postValue(listOf(KeyValue("", "")) + it)
@@ -273,11 +281,37 @@ class GjjManifestAddViewModel : BaseViewModel() {
waybillType.value = manifest.awbType
}
/**
* 校验运单号格式
* 规则纯数字固定11位后8位中前7位 mod 7 == 最后一位
*/
private fun verifyWaybillNo(wbNo: String?): Boolean {
if (wbNo.isNullOrEmpty()) return false
if (wbNo.length != 11) {
showToast("运单号必须为11位数字")
return true
}
if (!wbNo.all { it.isDigit() }) {
showToast("运单号必须为纯数字")
return true
}
// 后8位前7位 mod 7 == 最后一位
val last8 = wbNo.substring(3) // 后8位
val first7ofLast8 = last8.substring(0, 7).toLong()
val lastDigit = last8.last().toString().toInt()
if (first7ofLast8 % 7 != lastDigit.toLong()) {
showToast("运单号校验位不正确")
return true
}
return false
}
/**
* 保存点击
*/
fun onSaveClick(view: View) {
if ((waybillNo.value.verifyNullOrEmpty("请输入运单号")
|| verifyWaybillNo(waybillNo.value)
|| agent.value.verifyNullOrEmpty("请选择代理")
|| waybillNum.value.verifyNullOrEmpty("请输入运单件数")
|| actualNum.value.verifyNullOrEmpty("请输入实到数量")

View File

@@ -193,6 +193,7 @@
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:id="@+id/waybillNumInput"
hint='@{"请输入总件数"}'
required="@{false}"
title='@{"总 件 数"}'
@@ -204,6 +205,7 @@
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:id="@+id/actualNumInput"
hint='@{"请输入实到件数"}'
required="@{false}"
title='@{"实到件数"}'
@@ -216,6 +218,7 @@
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:id="@+id/actualWeightInput"
hint='@{"请输入实到重量"}'
required="@{false}"
title='@{"实到重量"}'
@@ -237,6 +240,7 @@
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:id="@+id/billingWeightInput"
hint='@{"请输入计费重量"}'
required="@{false}"
title='@{"计费重量"}'

View File

@@ -27,8 +27,8 @@
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:layout_weight="0.5"
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_gray : @drawable/radiobtn_unchecked_gray}"
android:src="@drawable/radiobtn_unchecked_gray" />
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_style : @drawable/radiobtn_unchecked_style}"
android:src="@drawable/radiobtn_unchecked_style" />
<!-- 分单号 -->
<TextView

View File

@@ -27,8 +27,8 @@
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:layout_weight="0.5"
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_gray : @drawable/radiobtn_unchecked_gray}"
android:src="@drawable/radiobtn_unchecked_gray" />
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_style : @drawable/radiobtn_unchecked_style}"
android:src="@drawable/radiobtn_unchecked_style" />
<!-- 运单号 -->
<TextView

View File

@@ -27,7 +27,7 @@
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:layout_weight="0.5"
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_gray : @drawable/radiobtn_unchecked_gray}"
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_style : @drawable/radiobtn_unchecked_style}"
android:src="@drawable/radiobtn_unchecked_style" />
<!-- 库位号 -->

View File

@@ -27,7 +27,7 @@
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:layout_weight="0.5"
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_gray : @drawable/radiobtn_unchecked_gray}"
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_style : @drawable/radiobtn_unchecked_style}"
android:src="@drawable/radiobtn_unchecked_style" />
<!-- 分单号 -->