feat(出港计重): 对接后端统计分项/计重人/通道号/托盘字段,筛选对齐平板(问题清单 #12~#18)
- #12 三格统计改取 pageQueryTotal 出参 waitCheckInNumber/checkingNumber(一次请求), 不再依赖 checkIn 入参过滤(内网实测 pageQuery 的 checkIn 过滤仍被忽略,统计出参正确) - #13 待计重筛选对齐平板:航班日期/代理人/特码(移除通道号/承运人/运单类型) - #14 计重记录筛选对齐平板:航班日期/代理人/特码(移除入库日期起止;dest/opId 实测被忽略一并移除) - #15 运单详情「通道号」绑 checked/pageQuery 出参 passageWay - #16 计重明细/修改记录「计重人」绑 listRecordByWh 出参 opUserName(回退 opId) - #17 arriveFlag 已回填,「已提前运抵」置灰态生效(无需改代码,实机确认) - #18 托盘改用平板同款 trayNumber + trayTotalWeight(= 数量 × 自重,自重默认 18kg); 记录卡片/修改记录托盘自重绑 trayTotalWeight;修复托盘输入框 Double 回写致光标跳位(输 18 存成 81) - 内网实测:三格 6/5/1;分托计重 trayNumber=2/trayTotalWeight=36 落库;修改记录保存 18.0 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,9 +22,16 @@ data class GjcCheckInRecord(
|
|||||||
var weight: Double = 0.0, // 运抵重量
|
var weight: Double = 0.0, // 运抵重量
|
||||||
var volume: Double = 0.0, // 运抵体积
|
var volume: Double = 0.0, // 运抵体积
|
||||||
var whId: Long = 0, // GJC_WAREHOUSE.ID
|
var whId: Long = 0, // GJC_WAREHOUSE.ID
|
||||||
var carWeight: String = "" // 托盘自重
|
var carWeight: String = "", // 托盘车重(平板托盘车号反查值)
|
||||||
|
var trayNumber: Int = 0, // 托盘数量
|
||||||
|
var trayTotalWeight: Double = 0.0, // 托盘重量(托盘数量 × 托盘自重,与平板端一致)
|
||||||
|
var opUserName: String = "" // 计重人姓名(opId 关联查询)
|
||||||
) : BaseObservable() {
|
) : BaseObservable() {
|
||||||
|
|
||||||
|
/** 计重人:优先姓名,为空回退操作员编码 */
|
||||||
|
val opUserDisplay: String
|
||||||
|
get() = opUserName.ifEmpty { opId }
|
||||||
|
|
||||||
// 数据变化回调
|
// 数据变化回调
|
||||||
var onDataChanged: (() -> Unit)? = null
|
var onDataChanged: (() -> Unit)? = null
|
||||||
|
|
||||||
@@ -54,14 +61,23 @@ data class GjcCheckInRecord(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 托盘自重的字符串表示(用于双向绑定,5.5寸手机版「修改记录」覆层)
|
/**
|
||||||
|
* 托盘重量输入原文(手机「修改记录」覆层)。保留原文而非由 Double 反推:
|
||||||
|
* 输入 "1" 时若 getter 返回 "1.0",输入框会被重设、光标回到开头,再输 "8" 就成了 "81"(实机踩过)。
|
||||||
|
* transient:不参与 Gson 提交序列化。
|
||||||
|
*/
|
||||||
|
@Transient
|
||||||
|
private var trayTotalWeightInput: String? = null
|
||||||
|
|
||||||
|
// 托盘重量的字符串表示(用于双向绑定,5.5寸手机版「修改记录」覆层)
|
||||||
@get:Bindable
|
@get:Bindable
|
||||||
var carWeightStr: String
|
var trayTotalWeightStr: String
|
||||||
get() = carWeight
|
get() = trayTotalWeightInput ?: if (trayTotalWeight == 0.0) "" else trayTotalWeight.toString()
|
||||||
set(value) {
|
set(value) {
|
||||||
if (carWeight != value) {
|
if (trayTotalWeightStr != value) {
|
||||||
carWeight = value
|
trayTotalWeightInput = value
|
||||||
notifyPropertyChanged(BR.carWeightStr)
|
trayTotalWeight = value.toDoubleOrNull() ?: 0.0
|
||||||
|
notifyPropertyChanged(BR.trayTotalWeightStr)
|
||||||
onDataChanged?.invoke()
|
onDataChanged?.invoke()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ data class GjcMaWb(
|
|||||||
var carNumber: String? = null, // 车牌号
|
var carNumber: String? = null, // 车牌号
|
||||||
var passageWay: String? = null, // 通道号
|
var passageWay: String? = null, // 通道号
|
||||||
var passageWayId: String? = null,
|
var passageWayId: String? = null,
|
||||||
var palletNumber: String? = null, // 托盘数量(5.5寸手机版开始计重页,后端暂无该入参,见接口问题清单)
|
var trayNumber: Int? = null, // 托盘数量(splitCheckIn / completeCheckIn 入参,与平板端一致)
|
||||||
var carWeight: String? = null, // 托盘自重(5.5寸手机版手输,后端暂无该入参,见接口问题清单)
|
var trayTotalWeight: Double? = null, // 托盘重量 = 托盘数量 × 托盘自重
|
||||||
|
|
||||||
// ==================== 状态信息 ====================
|
// ==================== 状态信息 ====================
|
||||||
var checkIn: String? = null, // 收运状态。0:待收运,1:已收运,2:收运中
|
var checkIn: String? = null, // 收运状态。0:待收运,1:已收运,2:收运中
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ class GjcWeighingRecordBean : Serializable {
|
|||||||
var paperTime: String = "" // 单据时间
|
var paperTime: String = "" // 单据时间
|
||||||
|
|
||||||
var userName: String = "" // 收运人
|
var userName: String = "" // 收运人
|
||||||
|
var passageWay: String = "" // 通道号(计重时选定的通道号名称)
|
||||||
var userId: String = "" // 收运人ID
|
var userId: String = "" // 收运人ID
|
||||||
|
|
||||||
var remark: String = "" // 备注
|
var remark: String = "" // 备注
|
||||||
|
|||||||
@@ -10,4 +10,6 @@ class GjcWeighingStatisticsBean {
|
|||||||
var totalPc: Long = 0 // 总件数
|
var totalPc: Long = 0 // 总件数
|
||||||
var totalWeight: Double = 0.0 // 总重量
|
var totalWeight: Double = 0.0 // 总重量
|
||||||
var cargoWeight: Double = 0.0 // 总货重
|
var cargoWeight: Double = 0.0 // 总货重
|
||||||
|
var waitCheckInNumber: Int = 0 // 待计重票数(IntExpCheckIn/pageQueryTotal)
|
||||||
|
var checkingNumber: Int = 0 // 计重中票数(IntExpCheckIn/pageQueryTotal)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,10 +78,9 @@ class GjcWeighingListActivity :
|
|||||||
|
|
||||||
/** 手机版筛选:重置(只清弹层内条件,不影响顶部搜索框) */
|
/** 手机版筛选:重置(只清弹层内条件,不影响顶部搜索框) */
|
||||||
fun resetFilter() {
|
fun resetFilter() {
|
||||||
viewModel.channelFilter.value = ""
|
viewModel.flightDate.value = ""
|
||||||
viewModel.carrierFilter.value = ""
|
|
||||||
viewModel.awbTypeFilter.value = ""
|
|
||||||
viewModel.agentCode.value = ""
|
viewModel.agentCode.value = ""
|
||||||
|
viewModel.spCode.value = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 手机版筛选:确认 */
|
/** 手机版筛选:确认 */
|
||||||
|
|||||||
@@ -75,12 +75,9 @@ class GjcWeighingRecordListActivity :
|
|||||||
|
|
||||||
/** 手机版筛选:重置(只清弹层内条件,不影响顶部搜索框) */
|
/** 手机版筛选:重置(只清弹层内条件,不影响顶部搜索框) */
|
||||||
fun resetFilter() {
|
fun resetFilter() {
|
||||||
viewModel.checkInDateStart.value = ""
|
viewModel.flightDate.value = ""
|
||||||
viewModel.checkInDateEnd.value = ""
|
|
||||||
viewModel.agentCode.value = ""
|
viewModel.agentCode.value = ""
|
||||||
viewModel.spCode.value = ""
|
viewModel.spCode.value = ""
|
||||||
viewModel.destFilter.value = ""
|
|
||||||
viewModel.opUserFilter.value = ""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 手机版筛选:确认 */
|
/** 手机版筛选:确认 */
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ class GjcWeighingRecordDetailsViewModel : BaseViewModel() {
|
|||||||
totalWeight.value = String.format("%.2f", sumWeight)
|
totalWeight.value = String.format("%.2f", sumWeight)
|
||||||
|
|
||||||
// 计算托盘总重(手机版顶部卡片)
|
// 计算托盘总重(手机版顶部卡片)
|
||||||
val sumCarWeight = records.sumOf { it.carWeight.toDoubleOrNull() ?: 0.0 }
|
val sumCarWeight = records.sumOf { it.trayTotalWeight }
|
||||||
totalCarWeight.value = String.format("%.2f", sumCarWeight)
|
totalCarWeight.value = String.format("%.2f", sumCarWeight)
|
||||||
|
|
||||||
// 计算重量误差百分比
|
// 计算重量误差百分比
|
||||||
|
|||||||
@@ -48,28 +48,19 @@ class GjcWeighingRecordViewModel : BasePageViewModel() {
|
|||||||
|
|
||||||
// ========== 5.5寸手机版专属字段(平板不调用 initPhoneExtras,行为零变化) ==========
|
// ========== 5.5寸手机版专属字段(平板不调用 initPhoneExtras,行为零变化) ==========
|
||||||
|
|
||||||
/** 目的站(后端支持入参 dest) */
|
// 手机版筛选弹层与平板端查询参数保持一致(后端确认):航班日期 / 代理人 / 特码,
|
||||||
val destFilter = MutableLiveData("")
|
// 运单号走顶部搜索框;dest / opId / 收运时间范围后端均不支持(dest、opId 内网实测被忽略)
|
||||||
|
|
||||||
/** 计重人(后端支持入参 opId,下拉复用仓库用户列表) */
|
|
||||||
val opUserFilter = MutableLiveData("")
|
|
||||||
val whsUserList = MutableLiveData<List<KeyValue>>(emptyList())
|
|
||||||
|
|
||||||
/** 入库日期起/止(后端暂无对应入参,传 opDateStart/opDateEnd 预留参数,见接口问题清单) */
|
|
||||||
val checkInDateStart = MutableLiveData("")
|
|
||||||
val checkInDateEnd = MutableLiveData("")
|
|
||||||
|
|
||||||
/** 由手机形态的 Activity 置 true,平板保持 false(不产生任何额外请求与参数) */
|
/** 由手机形态的 Activity 置 true,平板保持 false(不产生任何额外请求与参数) */
|
||||||
private var phoneExtrasEnabled = false
|
private var phoneExtrasEnabled = false
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开启手机版专属数据:放开「今天」默认日期(设计稿筛选无航班日期)、加载计重人下拉。
|
* 开启手机版专属数据:放开「今天」默认日期(手机默认查全量,航班日期在筛选弹层可选)。
|
||||||
* 仅由手机形态的 Activity 调用。
|
* 仅由手机形态的 Activity 调用。
|
||||||
*/
|
*/
|
||||||
fun initPhoneExtras() {
|
fun initPhoneExtras() {
|
||||||
phoneExtrasEnabled = true
|
phoneExtrasEnabled = true
|
||||||
flightDate.value = ""
|
flightDate.value = ""
|
||||||
DictUtils.getWHSUserList { whsUserList.postValue(it) }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
@@ -173,11 +164,6 @@ class GjcWeighingRecordViewModel : BasePageViewModel() {
|
|||||||
baseParams["wbNo"] = null
|
baseParams["wbNo"] = null
|
||||||
baseParams["likeNo"] = key
|
baseParams["likeNo"] = key
|
||||||
}
|
}
|
||||||
baseParams["dest"] = destFilter.value?.ifEmpty { null }
|
|
||||||
baseParams["opId"] = opUserFilter.value?.ifEmpty { null }
|
|
||||||
// 入库日期起/止为后端预留参数(暂无对应入参,静默忽略,见接口问题清单)
|
|
||||||
baseParams["opDateStart"] = checkInDateStart.value?.ifEmpty { null }
|
|
||||||
baseParams["opDateEnd"] = checkInDateEnd.value?.ifEmpty { null }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 构建查询参数(列表接口)
|
// 构建查询参数(列表接口)
|
||||||
|
|||||||
@@ -72,17 +72,28 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
|||||||
val spCodeList = MutableLiveData<List<KeyValue>>() // 特码列表
|
val spCodeList = MutableLiveData<List<KeyValue>>() // 特码列表
|
||||||
val businessTypeList = MutableLiveData<List<KeyValue>>() // 业务类型列表
|
val businessTypeList = MutableLiveData<List<KeyValue>>() // 业务类型列表
|
||||||
|
|
||||||
// 托盘车自重(平板:托盘车号查询回填只读;手机:手输,见下方 initPhoneExtras)
|
// 托盘车自重(平板:托盘车号查询回填只读)
|
||||||
val carWeight = MutableLiveData("0")
|
val carWeight = MutableLiveData("0")
|
||||||
|
|
||||||
// ========== 5.5寸手机版专属(平板不调用 initPhoneExtras,行为零变化) ==========
|
// ========== 5.5寸手机版专属(平板不调用 initPhoneExtras,行为零变化) ==========
|
||||||
|
|
||||||
/** 托盘数量(设计稿字段,后端暂无对应入参,提交时传 palletNumber 预留参数,见接口问题清单) */
|
// 托盘信息(与平板端一致:托盘重量 trayTotalWeight = 托盘数量 × 托盘自重,自重默认 18kg 可编辑)
|
||||||
val palletNumber = MutableLiveData("")
|
/** 托盘数量 → 入参 trayNumber */
|
||||||
|
val trayNumber = MutableLiveData("")
|
||||||
|
|
||||||
/** 手机形态标记:为 true 时提交体额外携带 palletNumber / carWeight(后端静默忽略) */
|
/** 单个托盘自重(默认 18kg)→ 与数量相乘得入参 trayTotalWeight */
|
||||||
|
val trayWeight = MutableLiveData("18")
|
||||||
|
|
||||||
|
/** 手机形态标记:为 true 时提交体携带 trayNumber / trayTotalWeight(平板保持原托盘车号链路) */
|
||||||
private var phoneMode = false
|
private var phoneMode = false
|
||||||
|
|
||||||
|
/** 托盘重量 = 托盘数量 × 托盘自重 */
|
||||||
|
private fun getTrayTotalWeight(): Double {
|
||||||
|
val num = trayNumber.value?.toIntOrNull() ?: 0
|
||||||
|
val weight = trayWeight.value?.toDoubleOrNull() ?: 0.0
|
||||||
|
return num * weight
|
||||||
|
}
|
||||||
|
|
||||||
/** 仅由手机形态的 Activity 调用 */
|
/** 仅由手机形态的 Activity 调用 */
|
||||||
fun initPhoneExtras() {
|
fun initPhoneExtras() {
|
||||||
phoneMode = true
|
phoneMode = true
|
||||||
@@ -406,10 +417,10 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
|||||||
|
|
||||||
remark = pageRemark.value
|
remark = pageRemark.value
|
||||||
|
|
||||||
// 手机版专属:托盘数量/托盘自重(后端暂无对应入参,静默忽略;平板 phoneMode 恒 false,字段为 null 不进请求体)
|
// 手机版:托盘数量/托盘重量(平板 phoneMode 恒 false,字段为 null 不进请求体)
|
||||||
if (this@GjcWeighingStartViewModel.phoneMode) {
|
if (this@GjcWeighingStartViewModel.phoneMode) {
|
||||||
palletNumber = this@GjcWeighingStartViewModel.palletNumber.value?.ifEmpty { null }
|
trayNumber = this@GjcWeighingStartViewModel.trayNumber.value?.toIntOrNull()
|
||||||
carWeight = this@GjcWeighingStartViewModel.carWeight.value?.ifEmpty { null }
|
trayTotalWeight = getTrayTotalWeight()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -442,10 +453,12 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
|||||||
maWbBean.value = maWbBean.value?.apply {
|
maWbBean.value = maWbBean.value?.apply {
|
||||||
carId = null
|
carId = null
|
||||||
remark = null
|
remark = null
|
||||||
palletNumber = null
|
trayNumber = null
|
||||||
|
trayTotalWeight = null
|
||||||
}
|
}
|
||||||
carWeight.value = "0"
|
carWeight.value = "0"
|
||||||
this@GjcWeighingStartViewModel.palletNumber.value = ""
|
this@GjcWeighingStartViewModel.trayNumber.value = ""
|
||||||
|
trayWeight.value = "18"
|
||||||
} else {
|
} else {
|
||||||
showToast(result.msg.noNull("分托计重失败"))
|
showToast(result.msg.noNull("分托计重失败"))
|
||||||
}
|
}
|
||||||
@@ -524,9 +537,9 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
|||||||
"checkIn" to "1", // 收运状态设置为已收运
|
"checkIn" to "1", // 收运状态设置为已收运
|
||||||
"passageWayId" to channel.value, // 通道号参数
|
"passageWayId" to channel.value, // 通道号参数
|
||||||
"passageWay" to (channelList.value?.firstOrNull{ it.value == channel.value }?.key ?: ""),
|
"passageWay" to (channelList.value?.firstOrNull{ it.value == channel.value }?.key ?: ""),
|
||||||
// 手机版专属预留参数(平板 phoneMode 恒 false → null → removeEmptyOrNull 移除,请求体不变)
|
// 手机版托盘信息(平板 phoneMode 恒 false → null → removeEmptyOrNull 移除,请求体不变)
|
||||||
"palletNumber" to (if (phoneMode) palletNumber.value?.ifEmpty { null } else null),
|
"trayNumber" to (if (phoneMode) trayNumber.value?.toIntOrNull() else null),
|
||||||
"carWeight" to (if (phoneMode) carWeight.value?.ifEmpty { null } else null)
|
"trayTotalWeight" to (if (phoneMode) getTrayTotalWeight() else null)
|
||||||
).toRequestBody(removeEmptyOrNull = true)
|
).toRequestBody(removeEmptyOrNull = true)
|
||||||
|
|
||||||
launchLoadingCollect({
|
launchLoadingCollect({
|
||||||
|
|||||||
@@ -61,33 +61,23 @@ class GjcWeighingViewModel : BasePageViewModel() {
|
|||||||
/** 手机版顶部搜索关键字(运单号/航班号混输,getData 内分流:含字母→fno,纯数字→likeNo 模糊) */
|
/** 手机版顶部搜索关键字(运单号/航班号混输,getData 内分流:含字母→fno,纯数字→likeNo 模糊) */
|
||||||
val searchKey = MutableLiveData("")
|
val searchKey = MutableLiveData("")
|
||||||
|
|
||||||
/** 主页三格统计:待计重(checkIn=0)/ 计重中(checkIn=2)数量 */
|
/** 主页三格统计:待计重 / 计重中数量(取 pageQueryTotal 出参 waitCheckInNumber / checkingNumber) */
|
||||||
val pendingCount = MutableLiveData("0")
|
val pendingCount = MutableLiveData("0")
|
||||||
val weighingCount = MutableLiveData("0")
|
val weighingCount = MutableLiveData("0")
|
||||||
|
|
||||||
/** 手机版筛选弹层字段。通道号/承运人/运单类型后端暂无查询入参(见接口问题清单),传预留参数名 */
|
// 手机版筛选弹层与平板端查询参数保持一致(后端确认):航班日期 / 代理人 / 特码,
|
||||||
val channelFilter = MutableLiveData("") // 通道号 → passageWayId
|
// 运单号与航班号走顶部搜索框,均复用上方既有字段
|
||||||
val carrierFilter = MutableLiveData("") // 承运人 → by0
|
|
||||||
val awbTypeFilter = MutableLiveData("") // 运单类型 → awbType
|
|
||||||
val channelList = MutableLiveData<List<KeyValue>>(emptyList())
|
|
||||||
val awbTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
|
||||||
|
|
||||||
/** 由手机形态的 Activity 置 true,平板保持 false(不产生任何额外请求与参数) */
|
/** 由手机形态的 Activity 置 true,平板保持 false(不产生任何额外请求与参数) */
|
||||||
private var phoneExtrasEnabled = false
|
private var phoneExtrasEnabled = false
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开启手机版专属数据:放开「今天」默认日期(设计稿主页无日期筛选)、加载筛选弹层字典。
|
* 开启手机版专属数据:放开「今天」默认日期(设计稿主页默认查全量,日期在筛选弹层可选)。
|
||||||
* 仅由手机形态的 Activity 调用。
|
* 仅由手机形态的 Activity 调用。
|
||||||
*/
|
*/
|
||||||
fun initPhoneExtras() {
|
fun initPhoneExtras() {
|
||||||
phoneExtrasEnabled = true
|
phoneExtrasEnabled = true
|
||||||
flightDate.value = ""
|
flightDate.value = ""
|
||||||
DictUtils.getGjcChannelList { list ->
|
|
||||||
channelList.postValue(listOf(KeyValue("全部", "")) + list)
|
|
||||||
}
|
|
||||||
DictUtils.getWaybillTypeList2(ieFlag = "E", type = "IO") {
|
|
||||||
awbTypeList.postValue(it)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -271,10 +261,6 @@ class GjcWeighingViewModel : BasePageViewModel() {
|
|||||||
else -> baseParams["likeNo"] = key
|
else -> baseParams["likeNo"] = key
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 以下三个为后端预留参数(暂无对应入参,后端静默忽略,见接口问题清单)
|
|
||||||
baseParams["passageWayId"] = channelFilter.value?.ifEmpty { null }
|
|
||||||
baseParams["by0"] = carrierFilter.value?.ifEmpty { null }
|
|
||||||
baseParams["awbType"] = awbTypeFilter.value?.ifEmpty { null }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 构建查询参数(列表接口)
|
// 构建查询参数(列表接口)
|
||||||
@@ -304,21 +290,9 @@ class GjcWeighingViewModel : 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()
|
||||||
}
|
// 手机版三格统计:后端统计出参直接给出分项计数,无需额外请求
|
||||||
}
|
pendingCount.value = (data?.waitCheckInNumber ?: 0).toString()
|
||||||
|
weighingCount.value = (data?.checkingNumber ?: 0).toString()
|
||||||
// 手机版三格统计:待计重 / 计重中(各带一次 checkIn 条件的统计请求,仅手机调用)
|
|
||||||
if (phoneExtrasEnabled) {
|
|
||||||
listOf("0" to pendingCount, "2" to weighingCount).forEach { (state, liveData) ->
|
|
||||||
launchCollect({
|
|
||||||
NetApply.api.getGjcWeighingStatistics(
|
|
||||||
(baseParams + mapOf("checkIn" to state)).toRequestBody()
|
|
||||||
)
|
|
||||||
}) {
|
|
||||||
onSuccess = { result ->
|
|
||||||
liveData.value = (result.data?.wbNumber ?: 0).toString()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -255,34 +255,16 @@
|
|||||||
setOnResetClick="@{(v)-> activity.resetFilter()}"
|
setOnResetClick="@{(v)-> activity.resetFilter()}"
|
||||||
title='@{"筛选条件"}'>
|
title='@{"筛选条件"}'>
|
||||||
|
|
||||||
<!-- 通道号(后端暂无查询入参,预留,见接口问题清单) -->
|
<!-- 筛选项与平板端查询参数保持一致:fdate / agentCode / spCode(运单号、航班号走顶部搜索框) -->
|
||||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
hint='@{"请选择通道号"}'
|
|
||||||
list="@{viewModel.channelList}"
|
|
||||||
title='@{"通道号"}'
|
|
||||||
type="@{PhoneDataLayoutType.SPINNER}"
|
|
||||||
value="@={viewModel.channelFilter}" />
|
|
||||||
|
|
||||||
<!-- 承运人(后端暂无查询入参,预留,见接口问题清单) -->
|
<!-- 航班日期(复用既有 flightDate,手机默认空 = 全部) -->
|
||||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
hint='@{"请输入承运人"}'
|
hint='@{"请选择航班日期"}'
|
||||||
title='@{"承运人"}'
|
title='@{"航班日期"}'
|
||||||
type="@{PhoneDataLayoutType.INPUT}"
|
type="@{PhoneDataLayoutType.DATE}"
|
||||||
value="@={viewModel.carrierFilter}" />
|
value="@={viewModel.flightDate}" />
|
||||||
|
|
||||||
<!-- 运单类型(后端暂无查询入参,预留,见接口问题清单) -->
|
|
||||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
hint='@{"请选择运单类型"}'
|
|
||||||
list="@{viewModel.awbTypeList}"
|
|
||||||
title='@{"运单类型"}'
|
|
||||||
type="@{PhoneDataLayoutType.SPINNER}"
|
|
||||||
value="@={viewModel.awbTypeFilter}" />
|
|
||||||
|
|
||||||
<!-- 代理人(复用既有 agentCode 查询字段) -->
|
<!-- 代理人(复用既有 agentCode 查询字段) -->
|
||||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||||
@@ -294,6 +276,16 @@
|
|||||||
type="@{PhoneDataLayoutType.SPINNER}"
|
type="@{PhoneDataLayoutType.SPINNER}"
|
||||||
value="@={viewModel.agentCode}" />
|
value="@={viewModel.agentCode}" />
|
||||||
|
|
||||||
|
<!-- 特码(复用既有 spCode 查询字段) -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
hint='@{"请选择特码"}'
|
||||||
|
list="@{viewModel.spCodeList}"
|
||||||
|
title='@{"特码"}'
|
||||||
|
type="@{PhoneDataLayoutType.SPINNER}"
|
||||||
|
value="@={viewModel.spCode}" />
|
||||||
|
|
||||||
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
|
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
变量 viewModel / activity / editRecord 与平板一致;保留 Activity 中引用的控件 id:recyclerView。
|
变量 viewModel / activity / editRecord 与平板一致;保留 Activity 中引用的控件 id:recyclerView。
|
||||||
|
|
||||||
交互差异(业务逻辑全部复用 GjcWeighingRecordDetailsViewModel):
|
交互差异(业务逻辑全部复用 GjcWeighingRecordDetailsViewModel):
|
||||||
· 顶部卡片:运单号 + 总件数/总重量/托盘总重(totalCarWeight 为手机专属统计字段)
|
· 顶部卡片:运单号 + 总件数/总重量/托盘总重(totalCarWeight = 各记录 trayTotalWeight 之和,手机专属统计字段)
|
||||||
|
· 托盘自重绑 trayTotalWeight(与平板端一致,后端 listRecordByWh / updateRecordList 均支持)
|
||||||
· 每条记录卡片带「修改」→ 全屏「修改记录」覆层(isEditMode 驱动显隐,
|
· 每条记录卡片带「修改」→ 全屏「修改记录」覆层(isEditMode 驱动显隐,
|
||||||
平板端该状态驱动列表内联编辑,互不影响);保存走 onPhoneSaveClick(成功后留在本页)
|
平板端该状态驱动列表内联编辑,互不影响);保存走 onPhoneSaveClick(成功后留在本页)
|
||||||
-->
|
-->
|
||||||
@@ -217,15 +218,15 @@
|
|||||||
required="@{true}"
|
required="@{true}"
|
||||||
title='@{"托盘自重(kg)"}'
|
title='@{"托盘自重(kg)"}'
|
||||||
type="@{PhoneFormRowType.INPUT}"
|
type="@{PhoneFormRowType.INPUT}"
|
||||||
value="@={editRecord.carWeightStr}" />
|
value="@={editRecord.trayTotalWeightStr}" />
|
||||||
|
|
||||||
<!-- 计重人:接口出参仅有操作员编码(无姓名,后端缺口见接口问题清单) -->
|
<!-- 计重人:opUserName 姓名,为空回退 opId -->
|
||||||
<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"
|
||||||
title='@{"计重人"}'
|
title='@{"计重人"}'
|
||||||
type="@{PhoneFormRowType.TEXT}"
|
type="@{PhoneFormRowType.TEXT}"
|
||||||
value="@{editRecord.opId}" />
|
value="@{editRecord.opUserDisplay}" />
|
||||||
|
|
||||||
<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"
|
||||||
|
|||||||
@@ -238,22 +238,14 @@
|
|||||||
setOnResetClick="@{(v)-> activity.resetFilter()}"
|
setOnResetClick="@{(v)-> activity.resetFilter()}"
|
||||||
title='@{"筛选条件"}'>
|
title='@{"筛选条件"}'>
|
||||||
|
|
||||||
<!-- 入库日期起/止:后端暂无查询入参,预留(见接口问题清单) -->
|
<!-- 航班日期(与平板端查询参数 fdate 一致;后端不提供入库日期范围入参) -->
|
||||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
hint='@{"请选择入库日期"}'
|
hint='@{"请选择航班日期"}'
|
||||||
title='@{"入库日期起"}'
|
title='@{"航班日期"}'
|
||||||
type="@{PhoneDataLayoutType.DATE}"
|
type="@{PhoneDataLayoutType.DATE}"
|
||||||
value="@={viewModel.checkInDateStart}" />
|
value="@={viewModel.flightDate}" />
|
||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
hint='@{"请选择入库日期"}'
|
|
||||||
title='@{"入库日期止"}'
|
|
||||||
type="@{PhoneDataLayoutType.DATE}"
|
|
||||||
value="@={viewModel.checkInDateEnd}" />
|
|
||||||
|
|
||||||
<!-- 代理人(复用既有 agentCode 查询字段) -->
|
<!-- 代理人(复用既有 agentCode 查询字段) -->
|
||||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
||||||
@@ -275,25 +267,6 @@
|
|||||||
type="@{PhoneDataLayoutType.SPINNER}"
|
type="@{PhoneDataLayoutType.SPINNER}"
|
||||||
value="@={viewModel.spCode}" />
|
value="@={viewModel.spCode}" />
|
||||||
|
|
||||||
<!-- 目的站(后端支持入参 dest) -->
|
|
||||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
hint='@{"请输入目的站"}'
|
|
||||||
title='@{"目的站"}'
|
|
||||||
type="@{PhoneDataLayoutType.INPUT}"
|
|
||||||
value="@={viewModel.destFilter}" />
|
|
||||||
|
|
||||||
<!-- 计重人(后端支持入参 opId) -->
|
|
||||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
hint='@{"全部"}'
|
|
||||||
list="@{viewModel.whsUserList}"
|
|
||||||
title='@{"计重人"}'
|
|
||||||
type="@{PhoneDataLayoutType.SPINNER}"
|
|
||||||
value="@={viewModel.opUserFilter}" />
|
|
||||||
|
|
||||||
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
|
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
交互差异(业务逻辑全部复用 GjcWeighingStartViewModel):
|
交互差异(业务逻辑全部复用 GjcWeighingStartViewModel):
|
||||||
· 手机版从待计重卡片进入(必带 maWbId),故不做运单号输入行
|
· 手机版从待计重卡片进入(必带 maWbId),故不做运单号输入行
|
||||||
· 平板「地磅称重」输入 → 手机直接编辑「运抵重量」(同一 arriveWeight 字段)
|
· 平板「地磅称重」输入 → 手机直接编辑「运抵重量」(同一 arriveWeight 字段)
|
||||||
· 平板「托盘车号」→ 手机按设计稿为「托盘数量」(palletNumber 预留字段),
|
· 平板「托盘车号」→ 手机按设计稿为「托盘数量」+「托盘自重」(默认 18kg),
|
||||||
「托盘自重」相应改为手输(carWeight),两者后端暂无入参,见接口问题清单
|
提交 trayNumber / trayTotalWeight(= 数量 × 自重),与平板端托盘口径一致
|
||||||
-->
|
-->
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
@@ -182,7 +182,7 @@
|
|||||||
type="@{PhoneFormRowType.TEXT}"
|
type="@{PhoneFormRowType.TEXT}"
|
||||||
value="@{viewModel.arriveVolume}" />
|
value="@{viewModel.arriveVolume}" />
|
||||||
|
|
||||||
<!-- 托盘数量:设计稿字段,后端暂无入参(预留 palletNumber,见接口问题清单) -->
|
<!-- 托盘数量 → trayNumber -->
|
||||||
<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"
|
||||||
@@ -190,9 +190,9 @@
|
|||||||
numeric="@{true}"
|
numeric="@{true}"
|
||||||
title='@{"托盘数量"}'
|
title='@{"托盘数量"}'
|
||||||
type="@{PhoneFormRowType.INPUT}"
|
type="@{PhoneFormRowType.INPUT}"
|
||||||
value="@={viewModel.palletNumber}" />
|
value="@={viewModel.trayNumber}" />
|
||||||
|
|
||||||
<!-- 托盘自重:手机版手输(平板为托盘车号查询回填) -->
|
<!-- 托盘自重(单个,默认 18kg)× 数量 → trayTotalWeight -->
|
||||||
<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"
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
numeric="@{true}"
|
numeric="@{true}"
|
||||||
title='@{"托盘自重"}'
|
title='@{"托盘自重"}'
|
||||||
type="@{PhoneFormRowType.INPUT}"
|
type="@{PhoneFormRowType.INPUT}"
|
||||||
value="@={viewModel.carWeight}" />
|
value="@={viewModel.trayWeight}" />
|
||||||
|
|
||||||
<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"
|
||||||
|
|||||||
@@ -4,8 +4,7 @@
|
|||||||
|
|
||||||
设计稿:documents/5.5寸手持端设计文件/03_出港计重/detail.html
|
设计稿:documents/5.5寸手持端设计文件/03_出港计重/detail.html
|
||||||
结构:白色卡片「基本信息」 + 两列灰底字段网格(PhoneKvItem 套 bg_phone_stat_box)
|
结构:白色卡片「基本信息」 + 两列灰底字段网格(PhoneKvItem 套 bg_phone_stat_box)
|
||||||
注:「通道号」在 /IntExpCheckIn/checked/pageQuery 出参中不存在(后端缺口,见接口问题清单),
|
「通道号」绑 /IntExpCheckIn/checked/pageQuery 出参 passageWay,空值由组件兜底显示 "-"。
|
||||||
此处绑定空串由组件兜底显示 "-"。
|
|
||||||
-->
|
-->
|
||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
@@ -196,7 +195,7 @@
|
|||||||
title='@{"业务类型"}'
|
title='@{"业务类型"}'
|
||||||
value="@{viewModel.bean.businessName.empty ? viewModel.bean.businessType : viewModel.bean.businessName}" />
|
value="@{viewModel.bean.businessName.empty ? viewModel.bean.businessType : viewModel.bean.businessName}" />
|
||||||
|
|
||||||
<!-- 通道号:接口出参无该字段(后端缺口),空值兜底 "-" -->
|
<!-- 通道号:passageWay,空值兜底 "-" -->
|
||||||
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
|
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -205,7 +204,7 @@
|
|||||||
android:background="@drawable/bg_phone_stat_box"
|
android:background="@drawable/bg_phone_stat_box"
|
||||||
android:padding="12dp"
|
android:padding="12dp"
|
||||||
title='@{"通道号"}'
|
title='@{"通道号"}'
|
||||||
value='@{""}' />
|
value="@{viewModel.bean.passageWay}" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 托盘自重(kg) -->
|
<!-- 托盘自重(kg):trayTotalWeight(与平板端一致) -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -103,14 +103,14 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{record.carWeight}"
|
android:text="@{String.valueOf(record.trayTotalWeight)}"
|
||||||
android:textColor="@color/phone_text_strong"
|
android:textColor="@color/phone_text_strong"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
tools:text="18" />
|
tools:text="18" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 计重人(接口出参仅操作员编码,无姓名,见接口问题清单) -->
|
<!-- 计重人:opUserName 姓名,为空回退 opId -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{record.opId}"
|
android:text="@{record.opUserDisplay}"
|
||||||
android:textColor="@color/phone_text_strong"
|
android:textColor="@color/phone_text_strong"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
tools:text="张三" />
|
tools:text="张三" />
|
||||||
|
|||||||
Reference in New Issue
Block a user