Compare commits
12 Commits
feature/ph
...
13c9c6f5dc
| Author | SHA1 | Date | |
|---|---|---|---|
| 13c9c6f5dc | |||
| de62b903d4 | |||
| 2d42ce9cc3 | |||
| 861ce8ca1e | |||
| f312ef866c | |||
| 6f27c15d9a | |||
| ded57554fa | |||
| 2f3ae2a814 | |||
| 19d02700b8 | |||
| aa6cc43bfa | |||
| dcb335ecdf | |||
| 567b76014b |
@@ -19,7 +19,7 @@ class GnjUnloadAddActivity :
|
|||||||
override fun viewModelClass() = GnjUnloadAddViewModel::class.java
|
override fun viewModelClass() = GnjUnloadAddViewModel::class.java
|
||||||
|
|
||||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||||
setBackArrow("国内进港开始卸机")
|
setBackArrow("进港开始卸机")
|
||||||
|
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
viewModel.rv = binding.rv
|
viewModel.rv = binding.rv
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class GnjUnloadListActivity :
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||||
setBackArrow("国内进港卸机")
|
setBackArrow("进港卸机")
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
viewModel.pageModel.bindSmartRefreshLayout(
|
viewModel.pageModel.bindSmartRefreshLayout(
|
||||||
binding.srl,
|
binding.srl,
|
||||||
|
|||||||
@@ -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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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, // 清仓正常(0:否,1:是)
|
var clearNormal: String? = null, // 清仓正常(0:否,1:是)
|
||||||
|
|||||||
@@ -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 = "", // 航班起始站
|
||||||
@@ -58,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 = "" // 交接图片数量
|
||||||
|
|||||||
@@ -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 // 航班航次
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 国际进港舱单-获取主单下分单
|
* 国际进港舱单-获取主单下分单
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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(
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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 绑定到 channel(KeyValue.value 即 passagewayId)
|
// 通道号 Spinner 绑定到 channel(KeyValue.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
|
||||||
|
|||||||
@@ -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("全部", "")))
|
||||||
|
|
||||||
@@ -52,6 +61,7 @@ class GjcQueryViewModel : BasePageViewModel() {
|
|||||||
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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
<!-- 底部按钮 -->
|
<!-- 底部按钮 -->
|
||||||
|
|||||||
@@ -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 && !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"
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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 && !bean.wtDate.isEmpty() ? `已复磅` : `未复磅`}"
|
android:text="@{bean.dgrCode}"
|
||||||
android:textColor="@{bean.wtDate != null && !bean.wtDate.isEmpty() ? @color/text_green : @color/text_normal}"
|
android:textColor="@{bean.dgrCode != null && !bean.dgrCode.isEmpty() && !bean.dgrCode.equals(`ELI`) && !bean.dgrCode.equals(`ELM`) ? @color/text_red : @color/text_normal}"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|
||||||
|
|||||||
@@ -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("未查询到该运单的进港舱单信息"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// 保存
|
// 保存
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -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()
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 货物发放
|
* 货物发放
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -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 }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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='@{"运单号"}'
|
||||||
|
|||||||
@@ -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" />
|
||||||
|
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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" />
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class PdaGnjXieJiAddActivity :
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||||
setBackArrow("国内进港开始卸机")
|
setBackArrow("进港开始卸机")
|
||||||
viewModel.rv = binding.rv
|
viewModel.rv = binding.rv
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
binding.rv.addOnItemClickListener(viewModel)
|
binding.rv.addOnItemClickListener(viewModel)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class PdaGnjXieJiListActivity :
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||||
setBackArrow("国内进港卸机")
|
setBackArrow("进港卸机")
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
viewModel.pageModel.bindSmartRefreshLayout(
|
viewModel.pageModel.bindSmartRefreshLayout(
|
||||||
|
|||||||
Reference in New Issue
Block a user