Compare commits

...

4 Commits

Author SHA1 Message Date
2f3ae2a814 feat: 国际进港查询统计新增航班航次并调整筛选条件布局
- 底部统计栏在总重量后新增航班航次显示
- 航班号从筛选面板移至页面上方搜索区,出库状态移入筛选面板
- 筛选红点提示与重置逻辑同步调整字段归属

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-08-27 17:08:47 +08:00
19d02700b8 feat: 国际出港仓库清仓弹窗增加备注输入框
清仓操作弹窗在「清仓正常」下拉基础上新增选填备注,提交时随 clearRemark 字段传给 updateClear 接口

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-08-27 16:41:49 +08:00
aa6cc43bfa feat: 国际事故签证新增支持运单号联想并自动带出舱单信息
- 运单号输入启用自动联想(1条自动填充、多条弹窗选择)
- 运单号满11位自动查询进港舱单,带出航班日期、航班号、始发/目的站、总件数、总重量、品名及交接图片
- 仅新增模式触发带出,避免编辑模式覆盖已保存数据和图片

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-08-27 16:31:16 +08:00
dcb335ecdf feat: ULD新增编辑表单增加来源、入库时间、所在港字段
- 编辑表单新增来源(空运/陆运)、入库时间、所在港(默认HFE)三个字段
- 列表项同步显示来源、所在港、位置、入库时间,去掉备注展示并收窄首列
- PadDataLayoutNew 新增 DATETIME 类型,支持年月日时分秒选择

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-08-27 15:30:23 +08:00
20 changed files with 299 additions and 34 deletions

View File

@@ -30,6 +30,14 @@ class UldEditViewModel : BaseViewModel() {
) )
) )
// 来源下拉列表
val sourceList = MutableLiveData<List<KeyValue>>(
listOf(
KeyValue("空运", "空运"),
KeyValue("陆运", "陆运"),
)
)
// 所属航司下拉列表数据源POST /typeCode/intCarrier // 所属航司下拉列表数据源POST /typeCode/intCarrier
val carrierList = MutableLiveData<List<KeyValue>>(emptyList()) val carrierList = MutableLiveData<List<KeyValue>>(emptyList())
@@ -40,7 +48,8 @@ class UldEditViewModel : BaseViewModel() {
else if (modify) DetailsPageType.Modify else DetailsPageType.Details else if (modify) DetailsPageType.Modify else DetailsPageType.Details
if (id.isEmpty()) { if (id.isEmpty()) {
// 新增:直接加载航司列表 // 新增:所在港默认 HFE直接加载航司列表
uldBean.value = ULDBean(nowPort = "HFE")
loadCarrierList(null) loadCarrierList(null)
} else { } else {
getData() getData()
@@ -79,7 +88,7 @@ class UldEditViewModel : BaseViewModel() {
}) { }) {
onSuccess = { onSuccess = {
showToast(it.msg.noNull(if (isAdd) "新增成功" else "修改成功")) showToast(it.msg.noNull(if (isAdd) "新增成功" else "修改成功"))
if (isAdd) uldBean.value = ULDBean() else getData() if (isAdd) uldBean.value = ULDBean(nowPort = "HFE") else getData()
} }
} }
} }

View File

@@ -121,6 +121,49 @@
</LinearLayout> </LinearLayout>
<!-- Row 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
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{viewModel.pageType != DetailsPageType.Details}"
hint='@{"请选择来源"}'
list="@{viewModel.sourceList}"
title='@{"来源"}'
titleLength="@{7}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.uldBean.source}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{viewModel.pageType != DetailsPageType.Details}"
hint='@{"请选择入库时间"}'
title='@{"入库时间"}'
titleLength="@{5}"
type="@{DataLayoutType.DATETIME}"
value='@={viewModel.uldBean.inStoreTime}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{viewModel.pageType != DetailsPageType.Details}"
hint='@{"请输入所在港"}'
title='@{"所在港"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.uldBean.nowPort}' />
</LinearLayout>
<!-- 备注(全行,多行输入) --> <!-- 备注(全行,多行输入) -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@@ -55,7 +55,7 @@
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.5" android:layout_weight="1.0"
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
@@ -109,7 +109,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="自重:" android:text="自重:"
android:textSize="15sp" android:textSize="15sp"
completeSpace="@{3}" /> completeSpace="@{4}" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@@ -165,7 +165,7 @@
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
<!-- 第二行:最大载重 | 备注 --> <!-- 第二行:最大载重 | 来源 | 所在港 | 位置 | 入库时间 -->
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -175,7 +175,7 @@
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.5" android:layout_weight="1.0"
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
@@ -193,24 +193,90 @@
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
<!-- 备注 --> <!-- 来源 -->
<androidx.appcompat.widget.LinearLayoutCompat <androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="3.6" android:layout_weight="0.8"
android:gravity="center_vertical"> android:gravity="center_vertical">
<TextView <TextView
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:textSize="15sp" android:textSize="15sp"
completeSpace="@{3}" /> completeSpace="@{3}" />
<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.remark}" android:text="@{bean.source}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 所在港 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="所在港:"
android:textSize="15sp"
completeSpace="@{4}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.nowPort}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 位置 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="位置:"
android:textSize="15sp"
completeSpace="@{5}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.nowPosition}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 入库时间 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="入库时间:"
android:textSize="15sp"
completeSpace="@{7}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.inStoreTime}"
android:textSize="15sp" /> android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -12,6 +12,8 @@ data class GjjManifest(
var no: String = "", // 编号 var no: String = "", // 编号
var prefix: String = "", // 前缀 var prefix: String = "", // 前缀
var wbNo: String = "", // 运单号 var wbNo: String = "", // 运单号
var fdate: String = "", // 航班日期
var fno: String = "", // 航班号
var origin: String = "", // 货源地(始发站) var origin: String = "", // 货源地(始发站)
var dest: String = "", // 目的站 var dest: String = "", // 目的站
var fdep: String = "", // 航班起始站 var fdep: String = "", // 航班起始站

View File

@@ -8,5 +8,6 @@ data class ManifestTotalDto(
var wbNumber: Int = 0, // 运单票数/总票数 var wbNumber: Int = 0, // 运单票数/总票数
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 flightNumber: Int = 0 // 航班航次
) )

View File

@@ -19,6 +19,14 @@ data class ULDBean(
var status: String = "", var status: String = "",
// 备注 // 备注
var remark: String = "", var remark: String = "",
// 来源(空运、陆运)
var source: String = "",
// 入库时间 yyyy-MM-dd HH:mm:ss
var inStoreTime: String = "",
// 所在港
var nowPort: String = "",
// 位置信息
var nowPosition: String = "",
){ ){
val checked = ObservableBoolean(false) val checked = ObservableBoolean(false)

View File

@@ -1891,6 +1891,14 @@ interface Api {
@POST("IntImpManifest/pageQueryTotal") @POST("IntImpManifest/pageQueryTotal")
suspend fun getIntImpManifestTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto> suspend fun getIntImpManifestTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
/**
* 国际进港舱单-根据11位具体运单号查询运单信息
* 接口路径: /IntImpManifest/queryWbByNo
* @param wbNo 11位运单号
*/
@POST("IntImpManifest/queryWbByNo")
suspend fun getIntImpManifestByWbNo(@Query("wbNo") wbNo: String): BaseResultBean<GjjManifest>
/** /**
* 国际进港舱单-获取主单下分单 * 国际进港舱单-获取主单下分单
*/ */

View File

@@ -211,7 +211,7 @@ class PadDataLayout : FrameLayout {
setOnClickListener(null) setOnClickListener(null)
} }
DataLayoutType.DATE -> { DataLayoutType.DATE, DataLayoutType.DATETIME -> {
tv.visibility = VISIBLE tv.visibility = VISIBLE
et.visibility = GONE et.visibility = GONE
spinner.visibility = GONE spinner.visibility = GONE
@@ -258,4 +258,5 @@ enum class DataLayoutType {
INPUT, // 文本 INPUT, // 文本
SPINNER, // 下拉选择 SPINNER, // 下拉选择
DATE, // 日期 DATE, // 日期
DATETIME, // 日期时间yyyy-MM-dd HH:mm:ss
} }

View File

@@ -25,6 +25,7 @@ import com.lukouguoji.module_base.adapter.visible
import com.lukouguoji.module_base.interfaces.IOnFocusChangeListener import com.lukouguoji.module_base.interfaces.IOnFocusChangeListener
import com.lukouguoji.module_base.interfaces.IOnSpinnerSelected import com.lukouguoji.module_base.interfaces.IOnSpinnerSelected
import com.lukouguoji.module_base.ktx.formatDate import com.lukouguoji.module_base.ktx.formatDate
import com.lukouguoji.module_base.ktx.formatDateTime
import com.lukouguoji.module_base.ktx.getActivity import com.lukouguoji.module_base.ktx.getActivity
import com.lukouguoji.module_base.ktx.loge import com.lukouguoji.module_base.ktx.loge
import com.lukouguoji.module_base.util.Common import com.lukouguoji.module_base.util.Common
@@ -182,6 +183,18 @@ class PadDataLayoutNew : FrameLayout {
} }
} }
// 选择日期时间yyyy-MM-dd HH:mm:ss
private val dateTimeClick: (v: View) -> Unit = {
if (enable) {
Common.onYearMonthDayTime(context.getActivity(), value) { year, month, day, hour, minute, second ->
val calendar = Calendar.getInstance()
calendar.set(year, month - 1, day, hour, minute, second)
value = calendar.time.formatDateTime()
refreshCallBack?.invoke()
}
}
}
init { init {
initView() initView()
} }
@@ -252,7 +265,7 @@ class PadDataLayoutNew : FrameLayout {
setOnClickListener(null) setOnClickListener(null)
} }
DataLayoutType.DATE -> { DataLayoutType.DATE, DataLayoutType.DATETIME -> {
tv.visibility = VISIBLE tv.visibility = VISIBLE
et.visibility = GONE et.visibility = GONE
spinner.visibility = GONE spinner.visibility = GONE
@@ -263,7 +276,7 @@ class PadDataLayoutNew : FrameLayout {
iv.layoutParams.width = dp20 iv.layoutParams.width = dp20
iv.layoutParams.height = dp20 iv.layoutParams.height = dp20
setOnClickListener(dateClick) setOnClickListener(if (type == DataLayoutType.DATETIME) dateTimeClick else dateClick)
} }
} }
} }

View File

@@ -79,7 +79,8 @@ class IntExpStorageUseActivity :
IntExpMoveClearDialogModel { dialog -> IntExpMoveClearDialogModel { dialog ->
// 用户点击保存后,执行清仓操作 // 用户点击保存后,执行清仓操作
val clearNormal = dialog.clearNormal.value ?: "" val clearNormal = dialog.clearNormal.value ?: ""
viewModel.performClear(clearNormal, maWbListForClear) val clearRemark = dialog.clearRemark.value ?: ""
viewModel.performClear(clearNormal, clearRemark, maWbListForClear)
}.show(this) }.show(this)
} }

View File

@@ -18,6 +18,9 @@ class IntExpMoveClearDialogModel(
// 清仓正常(存储的是 code"0" 或 "1" // 清仓正常(存储的是 code"0" 或 "1"
val clearNormal = MutableLiveData("") val clearNormal = MutableLiveData("")
// 清仓备注(选填)
val clearRemark = MutableLiveData("")
// 清仓正常选项列表 // 清仓正常选项列表
val clearNormalList = MutableLiveData<List<KeyValue>>().apply { val clearNormalList = MutableLiveData<List<KeyValue>>().apply {
value = listOf( value = listOf(

View File

@@ -140,9 +140,10 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
/** /**
* 执行清仓操作 * 执行清仓操作
* @param clearNormal 清仓正常("0"或"1" * @param clearNormal 清仓正常("0"或"1"
* @param clearRemark 清仓备注(选填)
* @param maWbListForClear 包含选中子列表项的主列表数据 * @param maWbListForClear 包含选中子列表项的主列表数据
*/ */
fun performClear(clearNormal: String, maWbListForClear: List<GjcMaWb>) { fun performClear(clearNormal: String, clearRemark: String, maWbListForClear: List<GjcMaWb>) {
if (maWbListForClear.isEmpty()) { if (maWbListForClear.isEmpty()) {
showToast("请至少选择一个库位") showToast("请至少选择一个库位")
return return
@@ -151,6 +152,7 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
// 构建请求参数:完整的主子列表结构 // 构建请求参数:完整的主子列表结构
val params = mapOf( val params = mapOf(
"clearNormal" to clearNormal, "clearNormal" to clearNormal,
"clearRemark" to clearRemark.ifEmpty { null },
"maWbList" to maWbListForClear "maWbList" to maWbListForClear
).toRequestBody() ).toRequestBody()

View File

@@ -61,6 +61,32 @@
</LinearLayout> </LinearLayout>
<!-- 备注 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="备注:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
hint='@{"请输入备注"}'
type="@{SearchLayoutType.INPUT}"
value="@={model.clearRemark}" />
</LinearLayout>
</LinearLayout> </LinearLayout>
<!-- 底部按钮 --> <!-- 底部按钮 -->

View File

@@ -4,6 +4,7 @@ import android.content.Context
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.text.InputType import android.text.InputType
import androidx.core.widget.doOnTextChanged
import com.lukouguoji.gjj.R import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityIntImpAccidentVisaEditBinding import com.lukouguoji.gjj.databinding.ActivityIntImpAccidentVisaEditBinding
import com.lukouguoji.gjj.viewModel.IntImpAccidentVisaEditViewModel import com.lukouguoji.gjj.viewModel.IntImpAccidentVisaEditViewModel
@@ -29,6 +30,10 @@ class IntImpAccidentVisaEditActivity :
binding.fnoInput.et.setUpperCaseAlphanumericFilter() binding.fnoInput.et.setUpperCaseAlphanumericFilter()
// 运单号纯数字11位 // 运单号纯数字11位
binding.wbNoInput.et.inputType = InputType.TYPE_CLASS_NUMBER binding.wbNoInput.et.inputType = InputType.TYPE_CLASS_NUMBER
// 运单号满11位后自动查询舱单信息带出表单数据覆盖手输、联想填充、弹窗选择
binding.wbNoInput.et.doOnTextChanged { text, _, _, _ ->
viewModel.onWbNoChanged(text?.toString()?.trim() ?: "")
}
viewModel.rv = binding.rv viewModel.rv = binding.rv
binding.rv.addOnItemClickListener(viewModel) binding.rv.addOnItemClickListener(viewModel)

View File

@@ -55,8 +55,8 @@ class IntImpQueryActivity :
if (visible) showFilterPanel() else hideFilterPanel() if (visible) showFilterPanel() else hideFilterPanel()
} }
// 航班号:大写字母+数字 // 航班号(顶部搜索区):大写字母+数字
binding.filterPanel.filterFlightNo.et.setUpperCaseAlphanumericFilter() binding.flightNoSearch.et.setUpperCaseAlphanumericFilter()
// 始发港:仅大写字母 // 始发港:仅大写字母
binding.filterPanel.filterOrigin.et.setUpperCaseLetterFilter() binding.filterPanel.filterOrigin.et.setUpperCaseLetterFilter()

View File

@@ -233,6 +233,65 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
} }
} }
///////////////////////////////////////////////////////////////////////////
// 运单号带出国际进港舱单信息
///////////////////////////////////////////////////////////////////////////
private var lastQueriedWbNo = ""
/**
* 运单号文本变化回调Activity 中监听输入框)
* 满11位且与上次查询不同时查询进港舱单信息并回填表单
* 仅新增模式生效:编辑模式下 loadDetail 回显运单号会触发本回调,
* 若不拦截会用舱单数据覆盖已保存的表单和图片列表
*/
fun onWbNoChanged(wbNo: String) {
if (pageType.value != DetailsPageType.Add) return
if (wbNo.length != 11) return
if (wbNo == lastQueriedWbNo) return
lastQueriedWbNo = wbNo
queryWbInfo(wbNo)
}
private fun queryWbInfo(wbNo: String) {
launchLoadingCollect({ NetApply.api.getIntImpManifestByWbNo(wbNo) }) {
onSuccess = {
val data = it.data
if (it.verifySuccess() && data != null) {
// 接口可能返回 null 字段Gson 反射注入会绕过 Kotlin 非空默认值),统一 noNull 防护
val b = dataBean.value ?: GjAccidentVisaEditBean()
b.fdate = data.fdate.noNull().take(10)
b.fno = data.fno.noNull()
b.dep = data.origin.noNull()
b.dest = data.dest.noNull()
b.pc = (if (data.totalPc > 0) data.totalPc else data.pc).toString()
b.weight = (if (data.totalWeight > 0.0) data.totalWeight else data.weight).toString()
b.goods = data.goods.noNull().ifEmpty { data.goodsCn.noNull() }
dataBean.value = b
// 与航班级联查询判重键同步,避免航班输入框失焦后重复查询覆盖带出的始发/目的站
lastQueriedFlight = "${b.fdate}-${b.fno}"
// 回填交接图片path 取原图完整 URL 用于预览url 取缩略图相对路径用于提交
val picList = data.pic.noNull().split(",").filter { p -> p.isNotEmpty() }
val originalList = data.originalPic.noNull().split(",").filter { p -> p.isNotEmpty() }
val images = picList.mapIndexed { index, picUrl ->
val originalUrl = originalList.getOrElse(index) { picUrl }
FileBean(
path = MediaUtil.fillUrl(originalUrl),
url = picUrl,
originalPic = originalUrl
)
}
// 重置图片区:舱单图片 + 末尾空白添加占位
rv?.commonAdapter()?.refresh(images + FileBean())
} else {
showToast(it.msg.noNull("未查询到该运单的进港舱单信息"))
}
}
}
}
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// 保存 // 保存
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////

View File

@@ -33,7 +33,7 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
val flightDateStart = MutableLiveData<String>(DateUtils.getCurrentTime().formatDate()) val flightDateStart = MutableLiveData<String>(DateUtils.getCurrentTime().formatDate())
val flightDateEnd = MutableLiveData("") val flightDateEnd = MutableLiveData("")
val agentId = MutableLiveData("") val agentId = MutableLiveData("")
val outStatus = MutableLiveData("") val flightNo = MutableLiveData("")
val waybillNo = MutableLiveData("") val waybillNo = MutableLiveData("")
// ==================== 下拉列表 ==================== // ==================== 下拉列表 ====================
@@ -55,6 +55,7 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
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 spCodeList = MutableLiveData<List<KeyValue>>(emptyList()) val spCodeList = MutableLiveData<List<KeyValue>>(emptyList())
@@ -66,7 +67,7 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
// ==================== 筛选条件 ==================== // ==================== 筛选条件 ====================
val spCode = MutableLiveData("") val spCode = MutableLiveData("")
val flightNo = MutableLiveData("") val outStatus = MutableLiveData("")
val origin = MutableLiveData("") val origin = MutableLiveData("")
val awbType = MutableLiveData("") val awbType = MutableLiveData("")
val businessType = MutableLiveData("") val businessType = MutableLiveData("")
@@ -75,11 +76,11 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
// 是否有筛选条件(任意一个非空则为 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, origin, awbType, businessType, goodsCn) value = listOf(spCode, outStatus, origin, awbType, businessType, goodsCn)
.any { !it.value.isNullOrEmpty() } .any { !it.value.isNullOrEmpty() }
} }
addSource(spCode, update) addSource(spCode, update)
addSource(flightNo, update) addSource(outStatus, update)
addSource(origin, update) addSource(origin, update)
addSource(awbType, update) addSource(awbType, update)
addSource(businessType, update) addSource(businessType, update)
@@ -108,7 +109,7 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
fun resetFilter() { fun resetFilter() {
spCode.value = "" spCode.value = ""
flightNo.value = "" outStatus.value = ""
origin.value = "" origin.value = ""
awbType.value = "" awbType.value = ""
businessType.value = "" businessType.value = ""
@@ -176,6 +177,7 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
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

@@ -118,6 +118,12 @@
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"
autoQueryEnabled="@{true}"
autoQueryMaxLength="@{8}"
autoQueryMinLength="@{8}"
autoQueryParamKey="@{`wbNo`}"
autoQueryTitle="@{`选择运单号`}"
autoQueryUrl="@{`/IntImpManifest/pageQueryWbNoList`}"
enable="@{!viewModel.isDetailMode}" enable="@{!viewModel.isDetailMode}"
hint='@{"请输入运单号"}' hint='@{"请输入运单号"}'
title='@{"运单号"}' title='@{"运单号"}'

View File

@@ -72,15 +72,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
@@ -201,6 +201,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

@@ -68,17 +68,17 @@
type="@{DataLayoutType.SPINNER}" type="@{DataLayoutType.SPINNER}"
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