Compare commits
5 Commits
feature/ph
...
2f3ae2a814
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f3ae2a814 | |||
| 19d02700b8 | |||
| aa6cc43bfa | |||
| dcb335ecdf | |||
| 567b76014b |
@@ -19,7 +19,7 @@ class GnjUnloadAddActivity :
|
||||
override fun viewModelClass() = GnjUnloadAddViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("国内进港开始卸机")
|
||||
setBackArrow("进港开始卸机")
|
||||
|
||||
binding.viewModel = viewModel
|
||||
viewModel.rv = binding.rv
|
||||
|
||||
@@ -24,7 +24,7 @@ class GnjUnloadListActivity :
|
||||
}
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("国内进港卸机")
|
||||
setBackArrow("进港卸机")
|
||||
binding.viewModel = viewModel
|
||||
viewModel.pageModel.bindSmartRefreshLayout(
|
||||
binding.srl,
|
||||
|
||||
@@ -30,6 +30,14 @@ class UldEditViewModel : BaseViewModel() {
|
||||
)
|
||||
)
|
||||
|
||||
// 来源下拉列表
|
||||
val sourceList = MutableLiveData<List<KeyValue>>(
|
||||
listOf(
|
||||
KeyValue("空运", "空运"),
|
||||
KeyValue("陆运", "陆运"),
|
||||
)
|
||||
)
|
||||
|
||||
// 所属航司下拉列表(数据源:POST /typeCode/intCarrier)
|
||||
val carrierList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
|
||||
@@ -40,7 +48,8 @@ class UldEditViewModel : BaseViewModel() {
|
||||
else if (modify) DetailsPageType.Modify else DetailsPageType.Details
|
||||
|
||||
if (id.isEmpty()) {
|
||||
// 新增:直接加载航司列表
|
||||
// 新增:所在港默认 HFE,直接加载航司列表
|
||||
uldBean.value = ULDBean(nowPort = "HFE")
|
||||
loadCarrierList(null)
|
||||
} else {
|
||||
getData()
|
||||
@@ -79,7 +88,7 @@ class UldEditViewModel : BaseViewModel() {
|
||||
}) {
|
||||
onSuccess = {
|
||||
showToast(it.msg.noNull(if (isAdd) "新增成功" else "修改成功"))
|
||||
if (isAdd) uldBean.value = ULDBean() else getData()
|
||||
if (isAdd) uldBean.value = ULDBean(nowPort = "HFE") else getData()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,6 +121,49 @@
|
||||
|
||||
</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
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
@@ -109,7 +109,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="自重:"
|
||||
android:textSize="15sp"
|
||||
completeSpace="@{3}" />
|
||||
completeSpace="@{4}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -165,7 +165,7 @@
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 第二行:最大载重 | 备注 -->
|
||||
<!-- 第二行:最大载重 | 来源 | 所在港 | 位置 | 入库时间 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -175,7 +175,7 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
@@ -193,24 +193,90 @@
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 备注 -->
|
||||
<!-- 来源 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="3.6"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="备注:"
|
||||
android:text="来源:"
|
||||
android:textSize="15sp"
|
||||
completeSpace="@{3}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="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" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
@@ -12,6 +12,8 @@ data class GjjManifest(
|
||||
var no: String = "", // 编号
|
||||
var prefix: String = "", // 前缀
|
||||
var wbNo: String = "", // 运单号
|
||||
var fdate: String = "", // 航班日期
|
||||
var fno: String = "", // 航班号
|
||||
var origin: String = "", // 货源地(始发站)
|
||||
var dest: String = "", // 目的站
|
||||
var fdep: String = "", // 航班起始站
|
||||
|
||||
@@ -8,5 +8,6 @@ data class ManifestTotalDto(
|
||||
var wbNumber: Int = 0, // 运单票数/总票数
|
||||
var totalPc: Long = 0, // 总件数
|
||||
var totalWeight: Double = 0.0, // 总重量
|
||||
var cargoWeight: Double = 0.0 // 总货重
|
||||
var cargoWeight: Double = 0.0, // 总货重
|
||||
var flightNumber: Int = 0 // 航班航次
|
||||
)
|
||||
|
||||
@@ -19,6 +19,14 @@ data class ULDBean(
|
||||
var status: 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)
|
||||
|
||||
|
||||
@@ -1891,6 +1891,14 @@ interface Api {
|
||||
@POST("IntImpManifest/pageQueryTotal")
|
||||
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>
|
||||
|
||||
/**
|
||||
* 国际进港舱单-获取主单下分单
|
||||
*/
|
||||
|
||||
@@ -211,7 +211,7 @@ class PadDataLayout : FrameLayout {
|
||||
setOnClickListener(null)
|
||||
}
|
||||
|
||||
DataLayoutType.DATE -> {
|
||||
DataLayoutType.DATE, DataLayoutType.DATETIME -> {
|
||||
tv.visibility = VISIBLE
|
||||
et.visibility = GONE
|
||||
spinner.visibility = GONE
|
||||
@@ -258,4 +258,5 @@ enum class DataLayoutType {
|
||||
INPUT, // 文本
|
||||
SPINNER, // 下拉选择
|
||||
DATE, // 日期
|
||||
DATETIME, // 日期时间(yyyy-MM-dd HH:mm:ss)
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.lukouguoji.module_base.adapter.visible
|
||||
import com.lukouguoji.module_base.interfaces.IOnFocusChangeListener
|
||||
import com.lukouguoji.module_base.interfaces.IOnSpinnerSelected
|
||||
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.loge
|
||||
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 {
|
||||
initView()
|
||||
}
|
||||
@@ -252,7 +265,7 @@ class PadDataLayoutNew : FrameLayout {
|
||||
setOnClickListener(null)
|
||||
}
|
||||
|
||||
DataLayoutType.DATE -> {
|
||||
DataLayoutType.DATE, DataLayoutType.DATETIME -> {
|
||||
tv.visibility = VISIBLE
|
||||
et.visibility = GONE
|
||||
spinner.visibility = GONE
|
||||
@@ -263,7 +276,7 @@ class PadDataLayoutNew : FrameLayout {
|
||||
iv.layoutParams.width = dp20
|
||||
iv.layoutParams.height = dp20
|
||||
|
||||
setOnClickListener(dateClick)
|
||||
setOnClickListener(if (type == DataLayoutType.DATETIME) dateTimeClick else dateClick)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,8 @@ class IntExpStorageUseActivity :
|
||||
IntExpMoveClearDialogModel { dialog ->
|
||||
// 用户点击保存后,执行清仓操作
|
||||
val clearNormal = dialog.clearNormal.value ?: ""
|
||||
viewModel.performClear(clearNormal, maWbListForClear)
|
||||
val clearRemark = dialog.clearRemark.value ?: ""
|
||||
viewModel.performClear(clearNormal, clearRemark, maWbListForClear)
|
||||
}.show(this)
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,9 @@ class IntExpMoveClearDialogModel(
|
||||
// 清仓正常(存储的是 code:"0" 或 "1")
|
||||
val clearNormal = MutableLiveData("")
|
||||
|
||||
// 清仓备注(选填)
|
||||
val clearRemark = MutableLiveData("")
|
||||
|
||||
// 清仓正常选项列表
|
||||
val clearNormalList = MutableLiveData<List<KeyValue>>().apply {
|
||||
value = listOf(
|
||||
|
||||
@@ -140,9 +140,10 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
|
||||
/**
|
||||
* 执行清仓操作
|
||||
* @param clearNormal 清仓正常("0"或"1")
|
||||
* @param clearRemark 清仓备注(选填)
|
||||
* @param maWbListForClear 包含选中子列表项的主列表数据
|
||||
*/
|
||||
fun performClear(clearNormal: String, maWbListForClear: List<GjcMaWb>) {
|
||||
fun performClear(clearNormal: String, clearRemark: String, maWbListForClear: List<GjcMaWb>) {
|
||||
if (maWbListForClear.isEmpty()) {
|
||||
showToast("请至少选择一个库位")
|
||||
return
|
||||
@@ -151,6 +152,7 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
|
||||
// 构建请求参数:完整的主子列表结构
|
||||
val params = mapOf(
|
||||
"clearNormal" to clearNormal,
|
||||
"clearRemark" to clearRemark.ifEmpty { null },
|
||||
"maWbList" to maWbListForClear
|
||||
).toRequestBody()
|
||||
|
||||
|
||||
@@ -61,6 +61,32 @@
|
||||
|
||||
</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>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.text.InputType
|
||||
import androidx.core.widget.doOnTextChanged
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.databinding.ActivityIntImpAccidentVisaEditBinding
|
||||
import com.lukouguoji.gjj.viewModel.IntImpAccidentVisaEditViewModel
|
||||
@@ -29,6 +30,10 @@ class IntImpAccidentVisaEditActivity :
|
||||
binding.fnoInput.et.setUpperCaseAlphanumericFilter()
|
||||
// 运单号:纯数字11位
|
||||
binding.wbNoInput.et.inputType = InputType.TYPE_CLASS_NUMBER
|
||||
// 运单号满11位后自动查询舱单信息带出表单数据(覆盖手输、联想填充、弹窗选择)
|
||||
binding.wbNoInput.et.doOnTextChanged { text, _, _, _ ->
|
||||
viewModel.onWbNoChanged(text?.toString()?.trim() ?: "")
|
||||
}
|
||||
|
||||
viewModel.rv = binding.rv
|
||||
binding.rv.addOnItemClickListener(viewModel)
|
||||
|
||||
@@ -55,8 +55,8 @@ class IntImpQueryActivity :
|
||||
if (visible) showFilterPanel() else hideFilterPanel()
|
||||
}
|
||||
|
||||
// 航班号:大写字母+数字
|
||||
binding.filterPanel.filterFlightNo.et.setUpperCaseAlphanumericFilter()
|
||||
// 航班号(顶部搜索区):大写字母+数字
|
||||
binding.flightNoSearch.et.setUpperCaseAlphanumericFilter()
|
||||
// 始发港:仅大写字母
|
||||
binding.filterPanel.filterOrigin.et.setUpperCaseLetterFilter()
|
||||
|
||||
|
||||
@@ -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("未查询到该运单的进港舱单信息"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 保存
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -33,7 +33,7 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
|
||||
val flightDateStart = MutableLiveData<String>(DateUtils.getCurrentTime().formatDate())
|
||||
val flightDateEnd = MutableLiveData("")
|
||||
val agentId = MutableLiveData("")
|
||||
val outStatus = MutableLiveData("")
|
||||
val flightNo = MutableLiveData("")
|
||||
val waybillNo = MutableLiveData("")
|
||||
|
||||
// ==================== 下拉列表 ====================
|
||||
@@ -55,6 +55,7 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
|
||||
val totalCount = MutableLiveData("0")
|
||||
val totalPc = MutableLiveData("0")
|
||||
val totalWeight = MutableLiveData("0")
|
||||
val totalFlightNumber = MutableLiveData("0")
|
||||
|
||||
// ==================== 特码下拉 ====================
|
||||
val spCodeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
@@ -66,7 +67,7 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
|
||||
|
||||
// ==================== 筛选条件 ====================
|
||||
val spCode = MutableLiveData("")
|
||||
val flightNo = MutableLiveData("")
|
||||
val outStatus = MutableLiveData("")
|
||||
val origin = MutableLiveData("")
|
||||
val awbType = MutableLiveData("")
|
||||
val businessType = MutableLiveData("")
|
||||
@@ -75,11 +76,11 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
|
||||
// 是否有筛选条件(任意一个非空则为 true)
|
||||
val hasFilter: MediatorLiveData<Boolean> = MediatorLiveData<Boolean>().apply {
|
||||
val update = { _: Any? ->
|
||||
value = listOf(spCode, flightNo, origin, awbType, businessType, goodsCn)
|
||||
value = listOf(spCode, outStatus, origin, awbType, businessType, goodsCn)
|
||||
.any { !it.value.isNullOrEmpty() }
|
||||
}
|
||||
addSource(spCode, update)
|
||||
addSource(flightNo, update)
|
||||
addSource(outStatus, update)
|
||||
addSource(origin, update)
|
||||
addSource(awbType, update)
|
||||
addSource(businessType, update)
|
||||
@@ -108,7 +109,7 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
|
||||
|
||||
fun resetFilter() {
|
||||
spCode.value = ""
|
||||
flightNo.value = ""
|
||||
outStatus.value = ""
|
||||
origin.value = ""
|
||||
awbType.value = ""
|
||||
businessType.value = ""
|
||||
@@ -176,6 +177,7 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
|
||||
totalCount.value = (data?.wbNumber ?: 0).toString()
|
||||
totalPc.value = (data?.totalPc ?: 0).toString()
|
||||
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
|
||||
totalFlightNumber.value = (data?.flightNumber ?: 0).toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,6 +118,12 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
autoQueryEnabled="@{true}"
|
||||
autoQueryMaxLength="@{8}"
|
||||
autoQueryMinLength="@{8}"
|
||||
autoQueryParamKey="@{`wbNo`}"
|
||||
autoQueryTitle="@{`选择运单号`}"
|
||||
autoQueryUrl="@{`/IntImpManifest/pageQueryWbNoList`}"
|
||||
enable="@{!viewModel.isDetailMode}"
|
||||
hint='@{"请输入运单号"}'
|
||||
title='@{"运单号"}'
|
||||
|
||||
@@ -72,15 +72,15 @@
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
value="@={viewModel.agentId}" />
|
||||
|
||||
<!-- 出库状态 -->
|
||||
<!-- 航班号 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:id="@+id/flight_no_search"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择出库状态"}'
|
||||
list="@{viewModel.outStatusList}"
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
value="@={viewModel.outStatus}" />
|
||||
hint='@{"请输入航班号"}'
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.flightNo}" />
|
||||
|
||||
<!-- 运单号 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
@@ -201,6 +201,16 @@
|
||||
android:textStyle="bold"
|
||||
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>
|
||||
|
||||
@@ -68,17 +68,17 @@
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.spCode}' />
|
||||
|
||||
<!-- 航班号 -->
|
||||
<!-- 出库状态 -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:id="@+id/filter_flight_no"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
hint='@{"请输入航班号"}'
|
||||
title='@{"航班号"}'
|
||||
hint='@{"请选择出库状态"}'
|
||||
list="@{viewModel.outStatusList}"
|
||||
title='@{"出库状态"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.flightNo}' />
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.outStatus}' />
|
||||
|
||||
<!-- 始发港 -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
|
||||
@@ -23,7 +23,7 @@ class PdaGnjXieJiAddActivity :
|
||||
}
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("国内进港开始卸机")
|
||||
setBackArrow("进港开始卸机")
|
||||
viewModel.rv = binding.rv
|
||||
binding.viewModel = viewModel
|
||||
binding.rv.addOnItemClickListener(viewModel)
|
||||
|
||||
@@ -27,7 +27,7 @@ class PdaGnjXieJiListActivity :
|
||||
}
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("国内进港卸机")
|
||||
setBackArrow("进港卸机")
|
||||
binding.viewModel = viewModel
|
||||
|
||||
viewModel.pageModel.bindSmartRefreshLayout(
|
||||
|
||||
Reference in New Issue
Block a user