Compare commits

...

7 Commits

Author SHA1 Message Date
13c9c6f5dc feat: 国际出港运抵计重状态改为海关放行
- 主单列表项第二行「计重状态」改为「海关放行」,取运抵分页接口
  返回的 cmdStatus,按普通文本显示,与查询详情页「海关指令」一致
- 展开的分单列表在「申报状态」与「品名(中)」之间新增「海关放行」列
- GjcMaWb 补充 cmdStatus 字段,此前仅 GjcHaWb 有该字段

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 17:27:31 +08:00
de62b903d4 feat: 国际出港板箱过磅新增耗材重量并计入货重
- 过磅表单新增只读的耗材重量,数据随列表项 Bean 带入,扫码新增时
  取 queryUsingUldByUld 返回的 consumeWeight
- 货重公式由「装机重 - ULD自重」改为「装机重 - ULD自重 - 耗材自重」
- queryUsingUldByUld 返回后补触发重量计算,此前该接口异步返回时
  耗材重量不会参与计算
- 表单保持每行三列:第三列自上而下为总重、装机重、耗材重量、货重,
  目的港单独占一行三分之一宽,备注换行整行撑满

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 17:12:21 +08:00
2d42ce9cc3 feat: 国际出港重量回填页改名并新增耗材重量
- 页面标题由「国际出港修改组装重量」改为「国际出港重量回填」
- ULD 信息卡片在货重之后新增耗材重量,取组装分页接口返回的
  consumeWeight 字段,数据随列表页传入的 Bean 一并带过来

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 16:46:01 +08:00
861ce8ca1e feat: 国际出港交接复磅状态改为 IMP 代码
列表项第二行第三列由「复磅状态」改为「IMP 代码」,取交接分页接口
返回的 dgrCode 字段;值非空且不等于 ELI、ELM 时以红色显示,
空值与 ELI、ELM 保持常规颜色。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 16:31:27 +08:00
f312ef866c feat: 国际进港舱单新增开始理货按钮
- 底部「货物发放」改名为「理货完成」,「分拣理货」改名为「装机单」
- 新增蓝色「开始理货」按钮,选中唯一一条运单后弹出修改库位对话框,
  提交 /IntImpManifest/modifyStorage
- 弹窗默认回填该运单已有的理货库位:舱单列表接口不返回 locationTally,
  改为先按 fid + wbNo 查一次装机单记录取出库位再回填
- GjjManifest 补充 locationTallyId 字段
- 装机单列表项运单号、品名列 completeSpace 调整为 5 以对齐

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 16:19:47 +08:00
6f27c15d9a fix: 修复国际进港出库运单号搜索不生效
运单号原本传给了 no 参数,但接口中 no 是不含前缀的主单号
(如 33362265),wbNo 才是完整 11 位运单号,导致条件被忽略。
同模块提取记录、进港查询用的均为 wbNo,此处保持一致。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 15:08:04 +08:00
ded57554fa feat: 国际出港查询新增日期类型与航班航次统计
- 合计栏在总重量后追加航班航次(取统计接口 flightNumber)
- 日期范围前新增日期类型下拉(入库/离港),对应接口 dateState 参数
- 航班号从筛选弹框移至列表上方,出库状态移入筛选弹框
- dateState、outState 按接口文档改为整型传参

原航班号查询无效的原因并非参数名有误(fno 与文档一致),
而是缺少 dateState 导致后端按默认日期口径过滤,补齐后已实测生效。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-28 14:49:46 +08:00
18 changed files with 266 additions and 90 deletions

View File

@@ -79,6 +79,7 @@ data class GjcMaWb(
// ==================== 状态信息 ==================== // ==================== 状态信息 ====================
var checkIn: String? = null, // 收运状态。0待收运1已收运2收运中 var checkIn: String? = null, // 收运状态。0待收运1已收运2收运中
var declareStatus: String? = null, // 申报状态 var declareStatus: String? = null, // 申报状态
var cmdStatus: String? = null, // 海关放行(命令状态)
var reviewStatus: String? = null, // 审核状态0未审核1通过2退回 var reviewStatus: String? = null, // 审核状态0未审核1通过2退回
var tranFlag: String? = null, // 转运标志 var tranFlag: String? = null, // 转运标志
var clearNormal: String? = null, // 清仓正常01 var clearNormal: String? = null, // 清仓正常01

View File

@@ -60,6 +60,7 @@ data class GjjManifest(
var unNumber: String = "", // 危险品编号 var unNumber: String = "", // 危险品编号
var activeId: Long = 0, // 活动ID var activeId: Long = 0, // 活动ID
var locationTally: String = "", // 理货库位号 var locationTally: String = "", // 理货库位号
var locationTallyId: Long = 0, // 理货库位ID
var pic: String = "", // 交接图片缩略图路径 var pic: String = "", // 交接图片缩略图路径
var originalPic: String = "", // 交接图片原图地址 var originalPic: String = "", // 交接图片原图地址
var picNumber: String = "" // 交接图片数量 var picNumber: String = "" // 交接图片数量

View File

@@ -30,7 +30,7 @@ class GjcAssembleWeightEditActivity :
override fun viewModelClass() = GjcAssembleWeightEditViewModel::class.java override fun viewModelClass() = GjcAssembleWeightEditViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) { override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际出港修改组装重量") setBackArrow("国际出港重量回填")
binding.viewModel = viewModel binding.viewModel = viewModel

View File

@@ -54,7 +54,7 @@ class GjcQueryActivity :
} }
// 航班号:大写字母+数字 // 航班号:大写字母+数字
binding.filterPanel.filterFlightNo.et.setUpperCaseAlphanumericFilter() binding.flightNoSearch.et.setUpperCaseAlphanumericFilter()
// 目的港:仅大写字母 // 目的港:仅大写字母
binding.filterPanel.filterDest.et.setUpperCaseLetterFilter() binding.filterPanel.filterDest.et.setUpperCaseLetterFilter()

View File

@@ -38,6 +38,7 @@ class GjcAssembleWeightEditViewModel : BaseViewModel() {
val totalPc = MutableLiveData("") // 总件数 val totalPc = MutableLiveData("") // 总件数
val totalWeight = MutableLiveData("") // 总重量 val totalWeight = MutableLiveData("") // 总重量
val cargoWeight = MutableLiveData("") // 货重 val cargoWeight = MutableLiveData("") // 货重
val consumeWeight = MutableLiveData("") // 耗材重量
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// 底部统计字段 // 底部统计字段
@@ -74,6 +75,7 @@ class GjcAssembleWeightEditViewModel : BaseViewModel() {
totalPc.value = it.pc.toString() totalPc.value = it.pc.toString()
totalWeight.value = it.totalWeight.toString() totalWeight.value = it.totalWeight.toString()
cargoWeight.value = it.cargoWeight.toString() cargoWeight.value = it.cargoWeight.toString()
consumeWeight.value = it.consumeWeight.toString()
// 保存参数用于API调用 // 保存参数用于API调用
useId = it.useId useId = it.useId

View File

@@ -51,6 +51,7 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
val totalWeight = MutableLiveData("0") // 总重(红色) val totalWeight = MutableLiveData("0") // 总重(红色)
val netWeight = MutableLiveData("0") // 装机重(蓝色) val netWeight = MutableLiveData("0") // 装机重(蓝色)
val cargoWeight = MutableLiveData("0") // 货重(绿色) val cargoWeight = MutableLiveData("0") // 货重(绿色)
val consumeWeight = MutableLiveData("0") // 耗材重量(只读,随 ULD 记录带出)
// 需要自动查询的独立字段(用于监听输入变化) // 需要自动查询的独立字段(用于监听输入变化)
val carId = MutableLiveData("") // 架子车号 val carId = MutableLiveData("") // 架子车号
@@ -138,6 +139,7 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
totalWeight.value = bean.totalWeight.toString() totalWeight.value = bean.totalWeight.toString()
netWeight.value = bean.netWeight.toString() netWeight.value = bean.netWeight.toString()
cargoWeight.value = bean.cargoWeight.toString() cargoWeight.value = bean.cargoWeight.toString()
consumeWeight.value = bean.consumeWeight.toString()
diBangWeight.value = bean.totalWeight.toString() diBangWeight.value = bean.totalWeight.toString()
// 通道号 Spinner 绑定到 channelKeyValue.value 即 passagewayId // 通道号 Spinner 绑定到 channelKeyValue.value 即 passagewayId
@@ -273,15 +275,16 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
/** /**
* 计算重量字段 * 计算重量字段
* 装机重 = 总重 - 架子车自重 * 装机重 = 总重 - 架子车自重
* 货重 = 装机重 - ULD自重 * 货重 = 装机重 - ULD自重 - 耗材自重
*/ */
private fun calculateWeights() { private fun calculateWeights() {
val total = totalWeight.value?.toDoubleOrNull() ?: 0.0 val total = totalWeight.value?.toDoubleOrNull() ?: 0.0
val carW = dataBean.value?.carWeight ?: 0.0 val carW = dataBean.value?.carWeight ?: 0.0
val uldW = dataBean.value?.uldWeight ?: 0.0 val uldW = dataBean.value?.uldWeight ?: 0.0
val consumeW = consumeWeight.value?.toDoubleOrNull() ?: 0.0
val net = total - carW val net = total - carW
val cargo = net - uldW val cargo = net - uldW - consumeW
netWeight.value = if (net > 0) net.toString() else "0" netWeight.value = if (net > 0) net.toString() else "0"
cargoWeight.value = if (cargo > 0) cargo.toString() else "0" cargoWeight.value = if (cargo > 0) cargo.toString() else "0"
@@ -334,6 +337,7 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
totalWeight.value = "0" totalWeight.value = "0"
netWeight.value = "0" netWeight.value = "0"
cargoWeight.value = "0" cargoWeight.value = "0"
consumeWeight.value = "0"
channel.value = "" channel.value = ""
printTag.value = false printTag.value = false
@@ -519,6 +523,9 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
if (usingData != null && usingData.useId > 0) { if (usingData != null && usingData.useId > 0) {
// 保存返回的数据,用于提交时传递 // 保存返回的数据,用于提交时传递
usingUldData = usingData usingUldData = usingData
// 耗材重量随该记录带回,需要重新参与货重计算
consumeWeight.value = usingData.consumeWeight.toString()
calculateWeights()
} else { } else {
// 没有 useId说明未组装不可复磅 // 没有 useId说明未组装不可复磅
usingUldData = null usingUldData = null

View File

@@ -25,13 +25,22 @@ import com.lukouguoji.module_base.ktx.formatDate
class GjcQueryViewModel : BasePageViewModel() { class GjcQueryViewModel : BasePageViewModel() {
// ==================== 搜索条件 ==================== // ==================== 搜索条件 ====================
val dateState = MutableLiveData("0") // 日期类型0入库1离港
val flightDateStart = MutableLiveData<String>(DateUtils.getCurrentTime().formatDate()) // 航班日期起 val flightDateStart = MutableLiveData<String>(DateUtils.getCurrentTime().formatDate()) // 航班日期起
val flightDateEnd = MutableLiveData("") // 航班日期止 val flightDateEnd = MutableLiveData("") // 航班日期止
val agentId = MutableLiveData("") // 代理ID val agentId = MutableLiveData("") // 代理ID
val outStatus = MutableLiveData("") // 出库状态 val flightNo = MutableLiveData("") // 航班号
val waybillNo = MutableLiveData("") // 运单号 val waybillNo = MutableLiveData("") // 运单号
// ==================== 下拉列表 ==================== // ==================== 下拉列表 ====================
// 日期类型下拉列表(对应接口 dateState
val dateStateList = MutableLiveData(
listOf(
KeyValue("入库", "0"),
KeyValue("离港", "1")
)
)
// 代理下拉列表从API获取 // 代理下拉列表从API获取
val agentList = MutableLiveData(listOf(KeyValue("全部", ""))) val agentList = MutableLiveData(listOf(KeyValue("全部", "")))
@@ -49,9 +58,10 @@ class GjcQueryViewModel : BasePageViewModel() {
val itemLayoutId = R.layout.item_gjc_query val itemLayoutId = R.layout.item_gjc_query
// ==================== 统计数据 ==================== // ==================== 统计数据 ====================
val totalCount = MutableLiveData("0") // 合计票数 val totalCount = MutableLiveData("0") // 合计票数
val totalPc = MutableLiveData("0") // 总件数 val totalPc = MutableLiveData("0") // 总件数
val totalWeight = MutableLiveData("0") // 总重量 val totalWeight = MutableLiveData("0") // 总重量
val totalFlightNumber = MutableLiveData("0") // 航班航次
// ==================== 筛选面板 ==================== // ==================== 筛选面板 ====================
val filterVisible = MutableLiveData(false) val filterVisible = MutableLiveData(false)
@@ -70,7 +80,7 @@ class GjcQueryViewModel : BasePageViewModel() {
// ==================== 筛选条件 ==================== // ==================== 筛选条件 ====================
val spCode = MutableLiveData("") // 特码 val spCode = MutableLiveData("") // 特码
val flightNo = MutableLiveData("") // 航班号 val outStatus = MutableLiveData("") // 出库状态
val dest = MutableLiveData("") // 目的港 val dest = MutableLiveData("") // 目的港
val awbType = MutableLiveData("") // 运单类型 val awbType = MutableLiveData("") // 运单类型
val businessType = MutableLiveData("") // 业务类型 val businessType = MutableLiveData("") // 业务类型
@@ -79,11 +89,11 @@ class GjcQueryViewModel : BasePageViewModel() {
// 是否有筛选条件(任意一个非空则为 true用于筛选按钮红点 // 是否有筛选条件(任意一个非空则为 true用于筛选按钮红点
val hasFilter: MediatorLiveData<Boolean> = MediatorLiveData<Boolean>().apply { val hasFilter: MediatorLiveData<Boolean> = MediatorLiveData<Boolean>().apply {
val update = { _: Any? -> val update = { _: Any? ->
value = listOf(spCode, flightNo, dest, awbType, businessType, goodsCn) value = listOf(spCode, outStatus, dest, awbType, businessType, goodsCn)
.any { !it.value.isNullOrEmpty() } .any { !it.value.isNullOrEmpty() }
} }
addSource(spCode, update) addSource(spCode, update)
addSource(flightNo, update) addSource(outStatus, update)
addSource(dest, update) addSource(dest, update)
addSource(awbType, update) addSource(awbType, update)
addSource(businessType, update) addSource(businessType, update)
@@ -127,7 +137,7 @@ class GjcQueryViewModel : BasePageViewModel() {
*/ */
fun resetFilter() { fun resetFilter() {
spCode.value = "" spCode.value = ""
flightNo.value = "" outStatus.value = ""
dest.value = "" dest.value = ""
awbType.value = "" awbType.value = ""
businessType.value = "" businessType.value = ""
@@ -160,39 +170,32 @@ class GjcQueryViewModel : BasePageViewModel() {
* 核心方法调用API获取数据并转换PageInfo为BaseListBean * 核心方法调用API获取数据并转换PageInfo为BaseListBean
*/ */
override fun getData() { override fun getData() {
// 公共查询条件(列表与统计接口共用)
val commonParams = mapOf(
// 日期类型0入库1离港+ 日期范围
"dateState" to dateState.value?.ifEmpty { null }?.toIntOrNull(),
"beginDate" to flightDateStart.value?.ifEmpty { null },
"endDate" to flightDateEnd.value?.ifEmpty { null },
"agentCode" to agentId.value?.ifEmpty { null },
"fno" to flightNo.value?.ifEmpty { null },
"wbNo" to waybillNo.value?.ifEmpty { null },
// 筛选面板条件
"spCode" to spCode.value?.ifEmpty { null },
"outState" to outStatus.value?.ifEmpty { null }?.toIntOrNull(),
"dest" to dest.value?.ifEmpty { null },
"awbType" to awbType.value?.ifEmpty { null },
"businessType" to businessType.value?.ifEmpty { null },
"goodsCn" to goodsCn.value?.ifEmpty { null }
)
// 构建查询参数(列表接口) // 构建查询参数(列表接口)
val listParams = mapOf( val listParams = (commonParams + mapOf(
"pageNum" to pageModel.page, "pageNum" to pageModel.page,
"pageSize" to pageModel.limit, "pageSize" to pageModel.limit
"beginDate" to flightDateStart.value!!.ifEmpty { null }, )).toRequestBody()
"endDate" to flightDateEnd.value!!.ifEmpty { null },
"agentCode" to agentId.value!!.ifEmpty { null },
"outState" to outStatus.value!!.ifEmpty { null },
"wbNo" to waybillNo.value!!.ifEmpty { null },
// 筛选条件(暂未使用)
"spCode" to spCode.value!!.ifEmpty { null },
"fno" to flightNo.value!!.ifEmpty { null },
"dest" to dest.value!!.ifEmpty { null },
"awbType" to awbType.value!!.ifEmpty { null },
"businessType" to businessType.value!!.ifEmpty { null },
"goodsCn" to goodsCn.value!!.ifEmpty { null }
).toRequestBody()
// 构建查询参数(统计接口 - 使用相同的搜索条件) // 构建查询参数(统计接口 - 使用相同的搜索条件)
val totalParams = mapOf( val totalParams = commonParams.toRequestBody()
"beginDate" to flightDateStart.value!!.ifEmpty { null },
"endDate" to flightDateEnd.value!!.ifEmpty { null },
"agentCode" to agentId.value!!.ifEmpty { null },
"outState" to outStatus.value!!.ifEmpty { null },
"wbNo" to waybillNo.value!!.ifEmpty { null },
// 筛选条件
"spCode" to spCode.value!!.ifEmpty { null },
"fno" to flightNo.value!!.ifEmpty { null },
"dest" to dest.value!!.ifEmpty { null },
"awbType" to awbType.value!!.ifEmpty { null },
"businessType" to businessType.value!!.ifEmpty { null },
"goodsCn" to goodsCn.value!!.ifEmpty { null }
).toRequestBody()
// 获取列表数据显示loading // 获取列表数据显示loading
launchLoadingCollect({ launchLoadingCollect({
@@ -213,6 +216,7 @@ class GjcQueryViewModel : BasePageViewModel() {
totalCount.value = (data?.wbNumber ?: 0).toString() totalCount.value = (data?.wbNumber ?: 0).toString()
totalPc.value = (data?.totalPc ?: 0).toString() totalPc.value = (data?.totalPc ?: 0).toString()
totalWeight.value = (data?.totalWeight ?: 0.0).toString() totalWeight.value = (data?.totalWeight ?: 0.0).toString()
totalFlightNumber.value = (data?.flightNumber ?: 0).toString()
} }
} }
} }

View File

@@ -139,6 +139,29 @@
android:textSize="16sp" /> android:textSize="16sp" />
</LinearLayout> </LinearLayout>
<!-- 耗材重量 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="耗材重量:"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.consumeWeight}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@@ -259,7 +259,7 @@
</LinearLayout> </LinearLayout>
<!-- 第5行架子车自重、ULD自重、货重(绿色只读) --> <!-- 第5行架子车自重、ULD自重、耗材重量(只读) -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -289,10 +289,10 @@
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}" enable="@{false}"
title='@{"货重"}' title='@{"耗材重量"}'
titleLength="@{5}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@{viewModel.cargoWeight}' value='@{viewModel.consumeWeight}'
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
@@ -300,7 +300,7 @@
</LinearLayout> </LinearLayout>
<!-- 第6行航班日期、航班号、目的港 --> <!-- 第6行航班日期、航班号、货重(绿色只读) -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -331,11 +331,11 @@
android:layout_weight="1" /> android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入目的港"}' enable="@{false}"
title='@{"目的港"}' title='@{"货重"}'
titleLength="@{5}" titleLength="@{5}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.fdest}' value='@{viewModel.cargoWeight}'
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="15dp" android:layout_marginStart="15dp"
@@ -343,7 +343,32 @@
</LinearLayout> </LinearLayout>
<!-- 第7行备注 --> <!-- 第7行目的港(占 1/3 宽度) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入目的港"}'
title='@{"目的港"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.fdest}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 占位:保持目的港与上方各行第一列同宽 -->
<Space
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="2" />
</LinearLayout>
<!-- 第8行备注整行 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@@ -42,6 +42,16 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<!-- 日期类型(入库/离港) -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
hint='@{"请选择日期类型"}'
list="@{viewModel.dateStateList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.dateState}" />
<!-- 航班日期起 --> <!-- 航班日期起 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout <com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:layout_width="0dp" android:layout_width="0dp"
@@ -72,15 +82,15 @@
type="@{SearchLayoutType.SPINNER}" type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.agentId}" /> value="@={viewModel.agentId}" />
<!-- 出库状态 --> <!-- 航班号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout <com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:id="@+id/flight_no_search"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
hint='@{"请选择出库状态"}' hint='@{"请输入航班号"}'
list="@{viewModel.outStatusList}" type="@{SearchLayoutType.INPUT}"
type="@{SearchLayoutType.SPINNER}" value="@={viewModel.flightNo}" />
value="@={viewModel.outStatus}" />
<!-- 运单号 --> <!-- 运单号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout <com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
@@ -204,6 +214,16 @@
android:textStyle="bold" android:textStyle="bold"
tools:text="总重量100" /> tools:text="总重量100" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{`航班航次:` + viewModel.totalFlightNumber}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="16sp"
android:textStyle="bold"
tools:text="航班航次2" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@@ -198,7 +198,7 @@
</LinearLayout> </LinearLayout>
<!-- 第二行:航程、计重状态、运抵状态、运单类型、分单数 --> <!-- 第二行:航程、海关放行、运抵状态、运单类型、分单数 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -231,7 +231,7 @@
</LinearLayout> </LinearLayout>
<!-- 计重状态 --> <!-- 海关放行 -->
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -243,20 +243,16 @@
completeSpace="@{5}" completeSpace="@{5}"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="计重状态" android:text="海关放行"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="15sp" /> android:textSize="15sp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@{`1`.equals(bean.checkIn) ? @drawable/tag_status_green : (`2`.equals(bean.checkIn) ? @drawable/tag_status_blue : @drawable/tag_status_gray)}" android:text="@{bean.cmdStatus}"
android:paddingHorizontal="8dp" android:textColor="@color/text_normal"
android:paddingVertical="2dp" android:textSize="15sp" />
android:text="@{bean.checkInText}"
android:textColor="@{`1`.equals(bean.checkIn) ? @color/text_green : (`2`.equals(bean.checkIn) ? @color/colorPrimary : @color/text_gray)}"
android:textSize="14sp"
android:visibility="@{bean.checkIn != null &amp;&amp; !bean.checkIn.isEmpty() ? View.VISIBLE : View.GONE}" />
</LinearLayout> </LinearLayout>
@@ -439,6 +435,16 @@
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" /> android:textStyle="bold" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.9"
android:gravity="center"
android:text="海关放行"
android:textColor="@color/text_normal"
android:textSize="14sp"
android:textStyle="bold" />
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@@ -90,6 +90,16 @@
</LinearLayout> </LinearLayout>
<!-- 海关放行 -->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.9"
android:gravity="center"
android:text="@{bean.cmdStatus ?? ``}"
android:textColor="@color/text_normal"
android:textSize="14sp" />
<!-- 品名(中) --> <!-- 品名(中) -->
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"

View File

@@ -167,7 +167,7 @@
</LinearLayout> </LinearLayout>
<!-- 第二行:目的港、库位号、复磅状态、交接人、交接时间 --> <!-- 第二行:目的港、库位号、IMP代码、交接人、交接时间 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -221,7 +221,7 @@
</LinearLayout> </LinearLayout>
<!-- 复磅状态 --> <!-- IMP代码非空且不是 ELI/ELM 时标红) -->
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -233,14 +233,14 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{5}" completeSpace="@{5}"
android:text="复磅状态" android:text="IMP代码"
android:textSize="15sp" /> android:textSize="15sp" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{bean.wtDate != null &amp;&amp; !bean.wtDate.isEmpty() ? `已复磅` : `未复磅`}" android:text="@{bean.dgrCode}"
android:textColor="@{bean.wtDate != null &amp;&amp; !bean.wtDate.isEmpty() ? @color/text_green : @color/text_normal}" android:textColor="@{bean.dgrCode != null &amp;&amp; !bean.dgrCode.isEmpty() &amp;&amp; !bean.dgrCode.equals(`ELI`) &amp;&amp; !bean.dgrCode.equals(`ELM`) ? @color/text_red : @color/text_normal}"
android:textSize="15sp" /> android:textSize="15sp" />
</LinearLayout> </LinearLayout>

View File

@@ -67,17 +67,17 @@
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.INPUT}"
value='@={viewModel.spCode}' /> value='@={viewModel.spCode}' />
<!-- 航班号 --> <!-- 出库状态 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:id="@+id/filter_flight_no"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="10dp" android:layout_marginBottom="10dp"
hint='@{"请输入航班号"}' hint='@{"请选择出库状态"}'
title='@{"航班号"}' list="@{viewModel.outStatusList}"
title='@{"出库状态"}'
titleLength="@{4}" titleLength="@{4}"
type="@{DataLayoutType.INPUT}" type="@{DataLayoutType.SPINNER}"
value='@={viewModel.flightNo}' /> value='@={viewModel.outStatus}' />
<!-- 目的港 --> <!-- 目的港 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew

View File

@@ -125,15 +125,15 @@ class IntImpManifestViewModel : BasePageViewModel() {
// ========== 全选状态 ========== // ========== 全选状态 ==========
val isAllChecked = MutableLiveData(false) val isAllChecked = MutableLiveData(false)
fun onItemCheckChanged() { fun onItemCheckChanged() {
updateCheckAllStatus() updateCheckAllStatus()
} }
fun updateCheckAllStatus() { fun updateCheckAllStatus() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() } isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
} }
// ========== 展开/收起 ========== // ========== 展开/收起 ==========
val isAllExpanded = MutableLiveData(false) val isAllExpanded = MutableLiveData(false)
@@ -481,6 +481,77 @@ class IntImpManifestViewModel : BasePageViewModel() {
.navigation() .navigation()
} }
/**
* 开始理货(弹出修改库位对话框,提交理货库位)
*/
fun startTallyClick() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return
val selectedItems = list.filter { it.isSelected }
if (selectedItems.isEmpty()) {
showToast("请选择要理货的运单")
return
}
if (selectedItems.size > 1) {
showToast("只能选择一个运单")
return
}
// 舱单列表接口不返回理货库位,需先查装机单记录取出该运单已有的库位再弹窗回填
val selectedItem = selectedItems.first()
val queryParams = mapOf(
"fid" to fid.ifEmpty { null },
"fdep" to fdep.ifEmpty { null },
"wbNo" to selectedItem.wbNo.ifEmpty { null },
"pageNum" to 1,
"pageSize" to 1
).toRequestBody()
launchLoadingCollect({ NetApply.api.getIntImpLoadingList(queryParams) }) {
onSuccess = { result ->
val tallyRecord = result.list?.firstOrNull()
showModifyStorageDialog(
selectedItems = selectedItems,
currentLocationId = tallyRecord?.locationTallyId?.takeIf { it > 0 }?.toString() ?: "",
currentLocationName = tallyRecord?.locationTally ?: ""
)
}
// 查询失败不阻断操作,直接弹出空白库位的对话框
onFailed = { _, _ -> showModifyStorageDialog(selectedItems, "", "") }
}
}
/**
* 弹出修改库位对话框并提交currentLocation* 用于回填该运单已有的理货库位)
*/
private fun showModifyStorageDialog(
selectedItems: List<GjjManifest>,
currentLocationId: String,
currentLocationName: String
) {
IntImpModifyStorageDialogModel(
currentLocationId = currentLocationId,
currentLocationName = currentLocationName
) { dialog ->
val params = mapOf(
"location" to dialog.locationName,
"locationId" to dialog.locationId.toLongOrNull(),
"manifestList" to selectedItems
).toRequestBody()
launchLoadingCollect({ NetApply.api.modifyIntImpLoadingStorage(params) }) {
onSuccess = {
if (it.verifySuccess()) {
showToast(it.msg.noNull("修改库位成功"))
refresh()
} else {
showToast(it.msg.noNull("修改库位失败"))
}
}
}
}.show()
}
/** /**
* 货物发放 * 货物发放
*/ */

View File

@@ -143,7 +143,7 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
"beginDate" to paymentDateStart.value?.ifEmpty { null }, "beginDate" to paymentDateStart.value?.ifEmpty { null },
"endDate" to paymentDateEnd.value?.ifEmpty { null }, "endDate" to paymentDateEnd.value?.ifEmpty { null },
"agentCode" to agentCode.value?.ifEmpty { null }, "agentCode" to agentCode.value?.ifEmpty { null },
"no" to wbNo.value?.ifEmpty { null }, "wbNo" to wbNo.value?.ifEmpty { null },
"spCode" to spCode.value?.ifEmpty { null } "spCode" to spCode.value?.ifEmpty { null }
) )

View File

@@ -274,9 +274,15 @@
style="@style/tv_bottom_btn" style="@style/tv_bottom_btn"
android:layout_marginEnd="15dp" android:layout_marginEnd="15dp"
android:onClick="@{()-> viewModel.sortingTallyClick()}" android:onClick="@{()-> viewModel.sortingTallyClick()}"
android:text="分拣理货" /> android:text="装机单" />
<!-- 货物发放按钮 (红色) --> <TextView
style="@style/tv_bottom_btn"
android:layout_marginEnd="15dp"
android:onClick="@{()-> viewModel.startTallyClick()}"
android:text="开始理货" />
<!-- 理货完成按钮 (红色) -->
<TextView <TextView
android:layout_width="100dp" android:layout_width="100dp"
android:layout_height="40dp" android:layout_height="40dp"
@@ -284,7 +290,7 @@
android:background="@drawable/bg_red_btn_bottom" android:background="@drawable/bg_red_btn_bottom"
android:gravity="center" android:gravity="center"
android:onClick="@{()-> viewModel.cargoReleaseClick()}" android:onClick="@{()-> viewModel.cargoReleaseClick()}"
android:text="货物发放" android:text="理货完成"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="18sp" /> android:textSize="18sp" />

View File

@@ -67,7 +67,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}" completeSpace="@{5}"
android:text="运单号:" android:text="运单号:"
android:textSize="15sp" /> android:textSize="15sp" />
@@ -194,7 +194,7 @@
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
completeSpace="@{4}" completeSpace="@{5}"
android:text="品名(中)" android:text="品名(中)"
android:textSize="15sp" /> android:textSize="15sp" />