Compare commits
13 Commits
2ba70d1a09
...
8853405ffc
| Author | SHA1 | Date | |
|---|---|---|---|
| 8853405ffc | |||
| ee0606230f | |||
| 07ea8853f3 | |||
| 6d4908da1a | |||
| a1d078db7a | |||
| f6e5b37eaa | |||
| 2f4e723dd7 | |||
| 52584b9cfe | |||
| efe7a1d2a9 | |||
| 85fd66b005 | |||
| de64c8ddb6 | |||
| 2a83c1393e | |||
| 9dddb7c079 |
@@ -95,7 +95,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="0.7"
|
android:layout_weight="0.8"
|
||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.lukouguoji.module_base.bean
|
|||||||
import androidx.databinding.BaseObservable
|
import androidx.databinding.BaseObservable
|
||||||
import androidx.databinding.Bindable
|
import androidx.databinding.Bindable
|
||||||
import androidx.databinding.library.baseAdapters.BR
|
import androidx.databinding.library.baseAdapters.BR
|
||||||
|
import com.lukouguoji.module_base.ktx.showToast
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 国际出港计重记录明细Bean
|
* 国际出港计重记录明细Bean
|
||||||
@@ -43,40 +44,76 @@ data class GjcCheckInRecord(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 重量的字符串表示(用于双向绑定)
|
// 重量 / 托盘自重编辑过程中的原始输入串(保持回显与输入一致,避免光标跳位)
|
||||||
@get:Bindable
|
// 不作为构造参数,data class copy 备份/恢复时自动丢弃,回退到数值显示
|
||||||
var weightStr: String
|
|
||||||
get() = if (weight == 0.0) "" else weight.toString()
|
|
||||||
set(value) {
|
|
||||||
val newWeight = value.toDoubleOrNull() ?: 0.0
|
|
||||||
if (weight != newWeight) {
|
|
||||||
weight = newWeight
|
|
||||||
notifyPropertyChanged(BR.weightStr)
|
|
||||||
onDataChanged?.invoke()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 托盘自重编辑过程中的原始输入串(保持回显与输入一致,避免光标跳位)
|
|
||||||
// 不作为构造参数,data class copy 备份/恢复时自动丢弃,回退到 trayTotalWeight 显示
|
|
||||||
// @Transient:仅界面内部状态,不参与 Gson 序列化提交
|
// @Transient:仅界面内部状态,不参与 Gson 序列化提交
|
||||||
|
@Transient
|
||||||
|
private var weightInput: String? = null
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
private var trayTotalWeightInput: String? = null
|
private var trayTotalWeightInput: String? = null
|
||||||
|
|
||||||
// 托盘自重的字符串表示(用于双向绑定)
|
// 重量的字符串表示(用于双向绑定)
|
||||||
// 业务规则:重量包含托盘自重,托盘自重编辑后,重量同步增减相同差值
|
// 业务规则:重量 + 托盘自重 恒定(等于接口返回初始值之和),修改一方另一方反向同步变动
|
||||||
|
// 校验:任一方不能小于 0,非法输入直接拒绝并回退显示
|
||||||
|
@get:Bindable
|
||||||
|
var weightStr: String
|
||||||
|
get() = weightInput ?: if (weight == 0.0) "" else weight.toString()
|
||||||
|
set(value) {
|
||||||
|
val newWeight = value.toDoubleOrNull() ?: 0.0
|
||||||
|
val newTrayWeight = round2(weight + trayTotalWeight - newWeight)
|
||||||
|
when {
|
||||||
|
newWeight < 0 -> {
|
||||||
|
showToast("重量不能小于 0")
|
||||||
|
notifyPropertyChanged(BR.weightStr)
|
||||||
|
}
|
||||||
|
newTrayWeight < 0 -> {
|
||||||
|
showToast("重量不能超过 ${round2(weight + trayTotalWeight)},否则托盘自重将小于 0")
|
||||||
|
notifyPropertyChanged(BR.weightStr)
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
|
weightInput = value
|
||||||
|
if (weight != newWeight) {
|
||||||
|
weight = newWeight
|
||||||
|
trayTotalWeight = newTrayWeight
|
||||||
|
trayTotalWeightInput = null
|
||||||
|
notifyPropertyChanged(BR.weightStr)
|
||||||
|
notifyPropertyChanged(BR.trayTotalWeightStr)
|
||||||
|
onDataChanged?.invoke()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 托盘自重的字符串表示(用于双向绑定),联动规则同上
|
||||||
@get:Bindable
|
@get:Bindable
|
||||||
var trayTotalWeightStr: String
|
var trayTotalWeightStr: String
|
||||||
get() = trayTotalWeightInput
|
get() = trayTotalWeightInput ?: if (trayTotalWeight == 0.0) "" else trayTotalWeight.toString()
|
||||||
?: if (trayTotalWeight == 0.0) "" else trayTotalWeight.toString()
|
|
||||||
set(value) {
|
set(value) {
|
||||||
trayTotalWeightInput = value
|
|
||||||
val newTrayWeight = value.toDoubleOrNull() ?: 0.0
|
val newTrayWeight = value.toDoubleOrNull() ?: 0.0
|
||||||
|
val newWeight = round2(weight + trayTotalWeight - newTrayWeight)
|
||||||
|
when {
|
||||||
|
newTrayWeight < 0 -> {
|
||||||
|
showToast("托盘自重不能小于 0")
|
||||||
|
notifyPropertyChanged(BR.trayTotalWeightStr)
|
||||||
|
}
|
||||||
|
newWeight < 0 -> {
|
||||||
|
showToast("托盘自重不能超过 ${round2(weight + trayTotalWeight)},否则重量将小于 0")
|
||||||
|
notifyPropertyChanged(BR.trayTotalWeightStr)
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
|
trayTotalWeightInput = value
|
||||||
if (trayTotalWeight != newTrayWeight) {
|
if (trayTotalWeight != newTrayWeight) {
|
||||||
weight = Math.round((weight + newTrayWeight - trayTotalWeight) * 100) / 100.0
|
|
||||||
trayTotalWeight = newTrayWeight
|
trayTotalWeight = newTrayWeight
|
||||||
|
weight = newWeight
|
||||||
|
weightInput = null
|
||||||
notifyPropertyChanged(BR.trayTotalWeightStr)
|
notifyPropertyChanged(BR.trayTotalWeightStr)
|
||||||
notifyPropertyChanged(BR.weightStr)
|
notifyPropertyChanged(BR.weightStr)
|
||||||
onDataChanged?.invoke()
|
onDataChanged?.invoke()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun round2(v: Double): Double = Math.round(v * 100) / 100.0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ data class GjcMaWb(
|
|||||||
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:是)
|
||||||
|
var clearRemark: String? = null, // 清仓备注
|
||||||
var allTally: String? = null, // 运单理货申报全部通过(0:否;1:是),为 1 时才允许全选该主单下的分单
|
var allTally: String? = null, // 运单理货申报全部通过(0:否;1:是),为 1 时才允许全选该主单下的分单
|
||||||
|
|
||||||
// ==================== 操作信息 ====================
|
// ==================== 操作信息 ====================
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package com.lukouguoji.module_base.bean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际出港移库详情数据模型
|
||||||
|
* 对应接口:/IntExpMove/detail 返回的 data,/IntExpMove/update 的请求体
|
||||||
|
*/
|
||||||
|
data class GjcMoveDetail(
|
||||||
|
var maWbId: Long? = null, // GJC_MAWB.MAWBID
|
||||||
|
var wbNo: String? = null, // 运单号
|
||||||
|
var pc: Long? = null, // 件数
|
||||||
|
var weight: Double? = null, // 重量
|
||||||
|
var by: String? = null, // 承运人1
|
||||||
|
var awbTypeName: String? = null, // 运单类型(中文)
|
||||||
|
var range: String? = null, // 出运路径
|
||||||
|
var spCode: String? = null, // 特码
|
||||||
|
var agentCode: String? = null, // 代理人
|
||||||
|
var moveState: Int? = null, // 交接状态:0 未交接,1 已交接
|
||||||
|
var goods: String? = null, // 品名
|
||||||
|
var remark: String? = null, // 备注
|
||||||
|
var pic: String? = null, // 交接图片缩略图路径(逗号分隔)
|
||||||
|
var originalPic: String? = null, // 交接图片原图路径(逗号分隔)
|
||||||
|
var picNumber: String? = null // 交接图片数量
|
||||||
|
) {
|
||||||
|
/**
|
||||||
|
* 移交状态中文(与列表项文案一致)
|
||||||
|
*/
|
||||||
|
val moveStateText: String
|
||||||
|
get() = if (moveState == 1) "已移交" else "未移交"
|
||||||
|
}
|
||||||
@@ -37,6 +37,7 @@ import com.lukouguoji.module_base.bean.GjcHandoverSheetResponse
|
|||||||
import com.lukouguoji.module_base.bean.GjcInspectionBean
|
import com.lukouguoji.module_base.bean.GjcInspectionBean
|
||||||
import com.lukouguoji.module_base.bean.GjcMaWb
|
import com.lukouguoji.module_base.bean.GjcMaWb
|
||||||
import com.lukouguoji.module_base.bean.GjcMove
|
import com.lukouguoji.module_base.bean.GjcMove
|
||||||
|
import com.lukouguoji.module_base.bean.GjcMoveDetail
|
||||||
import com.lukouguoji.module_base.bean.GjcUldUseBean
|
import com.lukouguoji.module_base.bean.GjcUldUseBean
|
||||||
import com.lukouguoji.module_base.bean.GjcWarehouse
|
import com.lukouguoji.module_base.bean.GjcWarehouse
|
||||||
import com.lukouguoji.module_base.bean.GjcWaybillBean
|
import com.lukouguoji.module_base.bean.GjcWaybillBean
|
||||||
@@ -573,6 +574,14 @@ interface Api {
|
|||||||
@POST("typeCode/assembleCompany")
|
@POST("typeCode/assembleCompany")
|
||||||
suspend fun getAssembleCompanyList(): BaseResultBean<List<AssembleCompanyBean>>
|
suspend fun getAssembleCompanyList(): BaseResultBean<List<AssembleCompanyBean>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取板型下拉列表(国际出港组装-开始组装)
|
||||||
|
* 接口路径: /typeCode/bordType(后端路径即为 bordType,非 boardType,2026-09-11 实测 boardType 返回 404)
|
||||||
|
* @param carrier 承运人二字码(取待组装运单航班号前两位);该参数后端必填(缺省返回 400),进入页面时传空串
|
||||||
|
*/
|
||||||
|
@POST("typeCode/bordType")
|
||||||
|
suspend fun getBoardTypeList(@Query("carrier") carrier: String): DictListBean
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 国际出港板箱过磅-分页搜索
|
* 国际出港板箱过磅-分页搜索
|
||||||
* 接口路径: /IntExpWeighting/pageQuery
|
* 接口路径: /IntExpWeighting/pageQuery
|
||||||
@@ -897,7 +906,7 @@ interface Api {
|
|||||||
* 接口路径: /IntExpMove/detail
|
* 接口路径: /IntExpMove/detail
|
||||||
*/
|
*/
|
||||||
@POST("IntExpMove/detail")
|
@POST("IntExpMove/detail")
|
||||||
suspend fun getIntExpMoveDetail(@Query("maWbId") maWbId: Long): BaseResultBean<GjcMaWb>
|
suspend fun getIntExpMoveDetail(@Query("maWbId") maWbId: Long): BaseResultBean<GjcMoveDetail>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 国际出港移库-编辑(仅更新备注与交接图片)
|
* 国际出港移库-编辑(仅更新备注与交接图片)
|
||||||
@@ -982,7 +991,11 @@ interface Api {
|
|||||||
* 接口路径: /IntImpStorage/updateClear
|
* 接口路径: /IntImpStorage/updateClear
|
||||||
*/
|
*/
|
||||||
@POST("IntImpStorage/updateClear")
|
@POST("IntImpStorage/updateClear")
|
||||||
suspend fun clearIntImpStorage(@Query("clearNormal") clearNormal: String, @Body data: RequestBody): BaseResultBean<Boolean>
|
suspend fun clearIntImpStorage(
|
||||||
|
@Query("clearNormal") clearNormal: String,
|
||||||
|
@Query("clearRemark") clearRemark: String?,
|
||||||
|
@Body data: RequestBody
|
||||||
|
): BaseResultBean<Boolean>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 国际进港库位操作-修改库位
|
* 国际进港库位操作-修改库位
|
||||||
|
|||||||
@@ -627,15 +627,16 @@ object DictUtils {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 板型列表(国际出港组装-开始组装)
|
* 板型列表(国际出港组装-开始组装)
|
||||||
* 字典 code:BOARDTYPE;显示与提交均使用 value 字段
|
* 接口 /typeCode/bordType
|
||||||
|
* @param carrier 承运人二字码(运单航班号前两位);为空时传空串(后端该参数必填,不传返回 400)
|
||||||
*/
|
*/
|
||||||
fun getBoardTypeList(callBack: (List<KeyValue>) -> Unit) {
|
fun getBoardTypeList(carrier: String? = null, callBack: (List<KeyValue>) -> Unit) {
|
||||||
launchCollect({
|
launchCollect({
|
||||||
NetApply.api
|
NetApply.api
|
||||||
.getDictList("BOARDTYPE")
|
.getBoardTypeList(carrier?.trim() ?: "")
|
||||||
}) {
|
}) {
|
||||||
onSuccess = {
|
onSuccess = {
|
||||||
callBack((it.data ?: emptyList()).map { b -> KeyValue(b.value, b.value) })
|
callBack(it.data?.map { b -> b.toKeyValue() } ?: emptyList())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_margin="20dp"
|
android:layout_margin="20dp"
|
||||||
android:background="@color/white"
|
android:background="@drawable/bg_white_radius_8"
|
||||||
android:gravity="top|start"
|
android:gravity="top|start"
|
||||||
android:inputType="textMultiLine"
|
android:inputType="textMultiLine"
|
||||||
android:lineSpacingExtra="4dp"
|
android:lineSpacingExtra="4dp"
|
||||||
|
|||||||
@@ -34,13 +34,13 @@ class IntExpMoveViewHolder(view: View) :
|
|||||||
|
|
||||||
// 点击列表项进入移库详情
|
// 点击列表项进入移库详情
|
||||||
binding.ll.setOnClickListener {
|
binding.ll.setOnClickListener {
|
||||||
IntExpMoveEditActivity.startForDetails(itemView.context, bean.maWbId)
|
IntExpMoveEditActivity.startForDetails(itemView.context, bean)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 侧滑菜单 - 编辑按钮
|
// 侧滑菜单 - 编辑按钮
|
||||||
binding.btnEdit.setOnClickListener {
|
binding.btnEdit.setOnClickListener {
|
||||||
binding.swipeMenu.quickClose()
|
binding.swipeMenu.quickClose()
|
||||||
IntExpMoveEditActivity.startForEdit(itemView.context, bean.maWbId)
|
IntExpMoveEditActivity.startForEdit(itemView.context, bean)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.executePendingBindings()
|
binding.executePendingBindings()
|
||||||
|
|||||||
@@ -4,10 +4,12 @@ import android.content.Context
|
|||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route
|
import com.alibaba.android.arouter.facade.annotation.Route
|
||||||
|
import com.google.gson.Gson
|
||||||
import com.lukouguoji.gjc.R
|
import com.lukouguoji.gjc.R
|
||||||
import com.lukouguoji.gjc.databinding.ActivityIntExpMoveEditBinding
|
import com.lukouguoji.gjc.databinding.ActivityIntExpMoveEditBinding
|
||||||
import com.lukouguoji.gjc.viewModel.IntExpMoveEditViewModel
|
import com.lukouguoji.gjc.viewModel.IntExpMoveEditViewModel
|
||||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||||
|
import com.lukouguoji.module_base.bean.GjcMove
|
||||||
import com.lukouguoji.module_base.common.Constant
|
import com.lukouguoji.module_base.common.Constant
|
||||||
import com.lukouguoji.module_base.common.DetailsPageType
|
import com.lukouguoji.module_base.common.DetailsPageType
|
||||||
import com.lukouguoji.module_base.ktx.addOnItemClickListener
|
import com.lukouguoji.module_base.ktx.addOnItemClickListener
|
||||||
@@ -49,19 +51,25 @@ class IntExpMoveEditActivity :
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
/**
|
||||||
|
* 列表 Bean 一并传入:detail 接口的承运人、出运路径等字段可能为空,
|
||||||
|
* 由 ViewModel 用列表数据回填
|
||||||
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun startForEdit(context: Context, maWbId: Long?) {
|
fun startForEdit(context: Context, bean: GjcMove) {
|
||||||
val starter = Intent(context, IntExpMoveEditActivity::class.java)
|
start(context, bean, DetailsPageType.Modify)
|
||||||
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Modify.name)
|
|
||||||
.putExtra(Constant.Key.ID, maWbId?.toString() ?: "")
|
|
||||||
context.startActivity(starter)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun startForDetails(context: Context, maWbId: Long?) {
|
fun startForDetails(context: Context, bean: GjcMove) {
|
||||||
|
start(context, bean, DetailsPageType.Details)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun start(context: Context, bean: GjcMove, pageType: DetailsPageType) {
|
||||||
val starter = Intent(context, IntExpMoveEditActivity::class.java)
|
val starter = Intent(context, IntExpMoveEditActivity::class.java)
|
||||||
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Details.name)
|
.putExtra(Constant.Key.PAGE_TYPE, pageType.name)
|
||||||
.putExtra(Constant.Key.ID, maWbId?.toString() ?: "")
|
.putExtra(Constant.Key.ID, bean.maWbId.toString())
|
||||||
|
.putExtra(Constant.Key.DATA, Gson().toJson(bean))
|
||||||
context.startActivity(starter)
|
context.startActivity(starter)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,12 +120,12 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
|
|||||||
val editBean = intent?.getSerializableExtra(Constant.Key.BEAN) as? GjcUldUseBean
|
val editBean = intent?.getSerializableExtra(Constant.Key.BEAN) as? GjcUldUseBean
|
||||||
if (editBean != null) {
|
if (editBean != null) {
|
||||||
prefillFromBean(editBean)
|
prefillFromBean(editBean)
|
||||||
loadPassagewayList(editBean.passagewayId)
|
// 优先本条记录自带的通道号,没有则回退到上一次称重记住的通道号(App 级持久化)
|
||||||
|
loadPassagewayList(editBean.passagewayId.ifEmpty { null })
|
||||||
loadPlCloseList(editBean.plClose)
|
loadPlCloseList(editBean.plClose)
|
||||||
} else {
|
} else {
|
||||||
// 新增模式:默认选中上一次称重使用的通道号
|
// 新增模式:默认选中上一次称重使用的通道号
|
||||||
val lastPassagewayId = SharedPreferenceUtil.getString(KEY_LAST_PASSAGEWAY_ID)
|
loadPassagewayList(null)
|
||||||
loadPassagewayList(lastPassagewayId.ifEmpty { null })
|
|
||||||
loadPlCloseList(null)
|
loadPlCloseList(null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -239,15 +239,27 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 加载通道号列表
|
* 加载通道号列表
|
||||||
* @param checkedValue 编辑模式下需要选中的 passagewayId;为空则按返回顺序展示
|
* @param preferredId 编辑模式下本条记录自带的 passagewayId;为空则回退到上一次称重记住的通道号
|
||||||
|
*
|
||||||
|
* 注意:Spinner 带 hint 时默认停在 hint 项,并不会显示列表首项,
|
||||||
|
* 所以必须显式给 channel 赋值才能选中,只调列表顺序无效。
|
||||||
*/
|
*/
|
||||||
private fun loadPassagewayList(checkedValue: String?) {
|
private fun loadPassagewayList(preferredId: String?) {
|
||||||
launchCollect({
|
launchCollect({
|
||||||
NetApply.api.getDictList("GJPASSAGEWAY")
|
NetApply.api.getDictList("GJPASSAGEWAY")
|
||||||
}) {
|
}) {
|
||||||
onSuccess = {
|
onSuccess = {
|
||||||
val list = (it.data ?: emptyList()).map { b -> b.toKeyValue() }
|
val list = (it.data ?: emptyList()).map { b -> b.toKeyValue() }
|
||||||
passagewayList.value = reorderChecked(list, checkedValue)
|
passagewayList.value = list
|
||||||
|
|
||||||
|
// 选中优先级:本条记录的通道号 → 上一次称重记住的通道号(SharedPreference,跨页面、跨启动保留)
|
||||||
|
val lastPassagewayId = SharedPreferenceUtil.getString(KEY_LAST_PASSAGEWAY_ID)
|
||||||
|
val selected = listOf(preferredId, lastPassagewayId).firstOrNull { id ->
|
||||||
|
!id.isNullOrEmpty() && list.any { kv -> kv.value == id }
|
||||||
|
}
|
||||||
|
if (selected != null) {
|
||||||
|
channel.value = selected
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,15 +44,6 @@ class GjcQueryViewModel : BasePageViewModel() {
|
|||||||
// 代理下拉列表(从API获取)
|
// 代理下拉列表(从API获取)
|
||||||
val agentList = MutableLiveData(listOf(KeyValue("全部", "")))
|
val agentList = MutableLiveData(listOf(KeyValue("全部", "")))
|
||||||
|
|
||||||
// 出库状态下拉列表
|
|
||||||
val outStatusList = MutableLiveData(
|
|
||||||
listOf(
|
|
||||||
KeyValue("全部", ""),
|
|
||||||
KeyValue("未出库", "0"),
|
|
||||||
KeyValue("已出库", "1")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
// ==================== 适配器配置 ====================
|
// ==================== 适配器配置 ====================
|
||||||
val itemViewHolder = GjcQueryViewHolder::class.java
|
val itemViewHolder = GjcQueryViewHolder::class.java
|
||||||
val itemLayoutId = R.layout.item_gjc_query
|
val itemLayoutId = R.layout.item_gjc_query
|
||||||
@@ -80,7 +71,6 @@ class GjcQueryViewModel : BasePageViewModel() {
|
|||||||
|
|
||||||
// ==================== 筛选条件 ====================
|
// ==================== 筛选条件 ====================
|
||||||
val spCode = MutableLiveData("") // 特码
|
val spCode = MutableLiveData("") // 特码
|
||||||
val outStatus = MutableLiveData("") // 出库状态
|
|
||||||
val dest = MutableLiveData("") // 目的港
|
val dest = MutableLiveData("") // 目的港
|
||||||
val awbType = MutableLiveData("") // 运单类型
|
val awbType = MutableLiveData("") // 运单类型
|
||||||
val businessType = MutableLiveData("") // 业务类型
|
val businessType = MutableLiveData("") // 业务类型
|
||||||
@@ -89,11 +79,10 @@ 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, outStatus, dest, awbType, businessType, goodsCn)
|
value = listOf(spCode, dest, awbType, businessType, goodsCn)
|
||||||
.any { !it.value.isNullOrEmpty() }
|
.any { !it.value.isNullOrEmpty() }
|
||||||
}
|
}
|
||||||
addSource(spCode, update)
|
addSource(spCode, update)
|
||||||
addSource(outStatus, update)
|
|
||||||
addSource(dest, update)
|
addSource(dest, update)
|
||||||
addSource(awbType, update)
|
addSource(awbType, update)
|
||||||
addSource(businessType, update)
|
addSource(businessType, update)
|
||||||
@@ -137,7 +126,6 @@ class GjcQueryViewModel : BasePageViewModel() {
|
|||||||
*/
|
*/
|
||||||
fun resetFilter() {
|
fun resetFilter() {
|
||||||
spCode.value = ""
|
spCode.value = ""
|
||||||
outStatus.value = ""
|
|
||||||
dest.value = ""
|
dest.value = ""
|
||||||
awbType.value = ""
|
awbType.value = ""
|
||||||
businessType.value = ""
|
businessType.value = ""
|
||||||
@@ -181,7 +169,6 @@ class GjcQueryViewModel : BasePageViewModel() {
|
|||||||
"wbNo" to waybillNo.value?.ifEmpty { null },
|
"wbNo" to waybillNo.value?.ifEmpty { null },
|
||||||
// 筛选面板条件
|
// 筛选面板条件
|
||||||
"spCode" to spCode.value?.ifEmpty { null },
|
"spCode" to spCode.value?.ifEmpty { null },
|
||||||
"outState" to outStatus.value?.ifEmpty { null }?.toIntOrNull(),
|
|
||||||
"dest" to dest.value?.ifEmpty { null },
|
"dest" to dest.value?.ifEmpty { null },
|
||||||
"awbType" to awbType.value?.ifEmpty { null },
|
"awbType" to awbType.value?.ifEmpty { null },
|
||||||
"businessType" to businessType.value?.ifEmpty { null },
|
"businessType" to businessType.value?.ifEmpty { null },
|
||||||
|
|||||||
@@ -271,6 +271,9 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
|||||||
assembleWeight = previousAssembleWeight
|
assembleWeight = previousAssembleWeight
|
||||||
operator = previousOperator // 从operator LiveData获取的值
|
operator = previousOperator // 从operator LiveData获取的值
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 按该运单航班号前两位(承运人)重新加载板型选项,覆盖下拉数据源
|
||||||
|
loadBoardTypeList(selectedWaybill.fno.trim().take(2))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 刷新列表
|
// 刷新列表
|
||||||
@@ -415,10 +418,11 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加载板型选项列表(字典)
|
* 加载板型选项列表
|
||||||
|
* @param carrier 承运人二字码(待组装运单航班号前两位);进入页面时不传,选中运单后按承运人重新加载并覆盖数据源
|
||||||
*/
|
*/
|
||||||
fun loadBoardTypeList() {
|
fun loadBoardTypeList(carrier: String? = null) {
|
||||||
DictUtils.getBoardTypeList { boardTypeList.value = it }
|
DictUtils.getBoardTypeList(carrier) { boardTypeList.value = it }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,8 +6,10 @@ import androidx.lifecycle.viewModelScope
|
|||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.lukouguoji.gjc.R
|
import com.lukouguoji.gjc.R
|
||||||
import com.lukouguoji.module_base.base.BaseViewModel
|
import com.lukouguoji.module_base.base.BaseViewModel
|
||||||
|
import com.google.gson.Gson
|
||||||
import com.lukouguoji.module_base.bean.FileBean
|
import com.lukouguoji.module_base.bean.FileBean
|
||||||
import com.lukouguoji.module_base.bean.GjcMaWb
|
import com.lukouguoji.module_base.bean.GjcMove
|
||||||
|
import com.lukouguoji.module_base.bean.GjcMoveDetail
|
||||||
import com.lukouguoji.module_base.common.Constant
|
import com.lukouguoji.module_base.common.Constant
|
||||||
import com.lukouguoji.module_base.common.ConstantEvent
|
import com.lukouguoji.module_base.common.ConstantEvent
|
||||||
import com.lukouguoji.module_base.common.DetailsPageType
|
import com.lukouguoji.module_base.common.DetailsPageType
|
||||||
@@ -25,14 +27,18 @@ import kotlinx.coroutines.launch
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 国际出港移库编辑/详情 ViewModel
|
* 国际出港移库编辑/详情 ViewModel
|
||||||
* 编辑模式仅支持修改备注与交接图片
|
* 详情:/IntExpMove/detail?maWbId= 返回 GjcMoveDetail
|
||||||
|
* 编辑:/IntExpMove/update 请求体为 GjcMoveDetail,仅允许修改备注与交接图片
|
||||||
*/
|
*/
|
||||||
class IntExpMoveEditViewModel : BaseViewModel(), IOnItemClickListener {
|
class IntExpMoveEditViewModel : BaseViewModel(), IOnItemClickListener {
|
||||||
|
|
||||||
val pageType = MutableLiveData(DetailsPageType.Details)
|
val pageType = MutableLiveData(DetailsPageType.Details)
|
||||||
private var maWbId: Long = 0L
|
private var maWbId: Long = 0L
|
||||||
|
|
||||||
val dataBean = MutableLiveData(GjcMaWb())
|
// 列表页传入的运单数据,用于回填 detail 接口返回为空的展示字段(承运人、出运路径等)
|
||||||
|
private var listBean: GjcMove? = null
|
||||||
|
|
||||||
|
val dataBean = MutableLiveData(GjcMoveDetail())
|
||||||
|
|
||||||
// 备注单独用 LiveData 双向绑定,避免修改 data class 属性后需重新赋值
|
// 备注单独用 LiveData 双向绑定,避免修改 data class 属性后需重新赋值
|
||||||
val remark = MutableLiveData("")
|
val remark = MutableLiveData("")
|
||||||
@@ -55,21 +61,22 @@ class IntExpMoveEditViewModel : BaseViewModel(), IOnItemClickListener {
|
|||||||
intent.getStringExtra(Constant.Key.PAGE_TYPE) ?: DetailsPageType.Details.name
|
intent.getStringExtra(Constant.Key.PAGE_TYPE) ?: DetailsPageType.Details.name
|
||||||
)
|
)
|
||||||
maWbId = intent.getStringExtra(Constant.Key.ID)?.toLongOrNull() ?: 0L
|
maWbId = intent.getStringExtra(Constant.Key.ID)?.toLongOrNull() ?: 0L
|
||||||
|
listBean = intent.getStringExtra(Constant.Key.DATA)
|
||||||
|
?.takeIf { it.isNotEmpty() }
|
||||||
|
?.let { runCatching { Gson().fromJson(it, GjcMove::class.java) }.getOrNull() }
|
||||||
loadData()
|
loadData()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun loadData() {
|
private fun loadData() {
|
||||||
launchLoadingCollect({ NetApply.api.getIntExpMoveDetail(maWbId) }) {
|
launchLoadingCollect({ NetApply.api.getIntExpMoveDetail(maWbId) }) {
|
||||||
onSuccess = {
|
onSuccess = {
|
||||||
val bean = it.data ?: GjcMaWb()
|
val bean = it.data ?: GjcMoveDetail()
|
||||||
// 详情接口 wbNo 可能为空,回退为 前缀 + 运单号
|
if (bean.maWbId == null) bean.maWbId = maWbId
|
||||||
if (bean.wbNo.isNullOrEmpty()) {
|
fillFromListBean(bean)
|
||||||
bean.wbNo = (bean.prefix ?: "") + (bean.no ?: "")
|
|
||||||
}
|
|
||||||
dataBean.value = bean
|
dataBean.value = bean
|
||||||
remark.value = bean.remark ?: ""
|
remark.value = bean.remark ?: ""
|
||||||
|
|
||||||
// 处理图片列表(同时保留缩略图和原图信息,确保二次编辑时不丢失)
|
// 解析图片:pic 为缩略图、originalPic 为原图,二者按逗号分隔且一一对应
|
||||||
val picList = (bean.pic ?: "").split(",").filter { p -> p.isNotEmpty() }
|
val picList = (bean.pic ?: "").split(",").filter { p -> p.isNotEmpty() }
|
||||||
val originalPicList = (bean.originalPic ?: "").split(",").filter { p -> p.isNotEmpty() }
|
val originalPicList = (bean.originalPic ?: "").split(",").filter { p -> p.isNotEmpty() }
|
||||||
val images = if (picList.isNotEmpty()) {
|
val images = if (picList.isNotEmpty()) {
|
||||||
@@ -101,7 +108,22 @@ class IntExpMoveEditViewModel : BaseViewModel(), IOnItemClickListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提交保存(只保存备注和图片)
|
* detail 接口的部分展示字段(承运人 by、出运路径 range 等)在测试环境返回 null,
|
||||||
|
* 列表接口有值时用列表数据回填,仅影响展示
|
||||||
|
*/
|
||||||
|
private fun fillFromListBean(bean: GjcMoveDetail) {
|
||||||
|
val src = listBean ?: return
|
||||||
|
if (bean.wbNo.isNullOrEmpty()) bean.wbNo = src.wbNo.ifEmpty { src.prefix + src.no }
|
||||||
|
if (bean.by.isNullOrEmpty()) bean.by = src.by1
|
||||||
|
if (bean.range.isNullOrEmpty()) bean.range = src.range
|
||||||
|
if (bean.spCode.isNullOrEmpty()) bean.spCode = src.spCode
|
||||||
|
if (bean.agentCode.isNullOrEmpty()) bean.agentCode = src.agentCode
|
||||||
|
if (bean.awbTypeName.isNullOrEmpty()) bean.awbTypeName = src.awbTypeName
|
||||||
|
if (bean.goods.isNullOrEmpty()) bean.goods = src.goodsCn.ifEmpty { src.goods }
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交保存:按接口文档回传完整详情对象,仅备注与交接图片三字段取页面上的新值
|
||||||
*/
|
*/
|
||||||
fun submit() {
|
fun submit() {
|
||||||
// 从 adapter 实时获取所有非空图片(ViewHolder 新增图片直接操作 adapter items)
|
// 从 adapter 实时获取所有非空图片(ViewHolder 新增图片直接操作 adapter items)
|
||||||
@@ -126,15 +148,15 @@ class IntExpMoveEditViewModel : BaseViewModel(), IOnItemClickListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val params = mapOf(
|
val bean = (dataBean.value ?: GjcMoveDetail()).copy(
|
||||||
"maWbId" to maWbId,
|
maWbId = maWbId,
|
||||||
"remark" to (remark.value ?: ""),
|
remark = remark.value ?: "",
|
||||||
"picNumber" to images.size.toString(),
|
picNumber = images.size.toString(),
|
||||||
"pic" to images.joinToString(",") { MediaUtil.removeUrl(it.url) },
|
pic = images.joinToString(",") { MediaUtil.removeUrl(it.url) },
|
||||||
"originalPic" to images.joinToString(",") { MediaUtil.removeUrl(it.originalPic) },
|
originalPic = images.joinToString(",") { MediaUtil.removeUrl(it.originalPic) }
|
||||||
).toRequestBody(removeEmptyOrNull = true)
|
)
|
||||||
|
|
||||||
NetApply.api.updateIntExpMove(params)
|
NetApply.api.updateIntExpMove(bean.toRequestBody())
|
||||||
}) {
|
}) {
|
||||||
onSuccess = {
|
onSuccess = {
|
||||||
showToast("保存成功")
|
showToast("保存成功")
|
||||||
|
|||||||
@@ -114,27 +114,17 @@
|
|||||||
title='@{"品名"}'
|
title='@{"品名"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
value='@{viewModel.dataBean.goodsCn == null || viewModel.dataBean.goodsCn.isEmpty() ? viewModel.dataBean.goods : viewModel.dataBean.goodsCn}' />
|
value='@{viewModel.dataBean.goods}' />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 第三行:出港航班、出运路径、运单类型(均只读) -->
|
<!-- 第三行:出运路径、运单类型、承运人(均只读,字段名以 /IntExpMove/detail 文档为准) -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:orientation="horizontal">
|
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="@{false}"
|
|
||||||
title='@{"出港航班"}'
|
|
||||||
titleLength="@{5}"
|
|
||||||
type="@{DataLayoutType.INPUT}"
|
|
||||||
value='@{viewModel.dataBean.flightInfo}' />
|
|
||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -143,7 +133,7 @@
|
|||||||
title='@{"出运路径"}'
|
title='@{"出运路径"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
value='@{viewModel.dataBean.rangeText}' />
|
value='@{viewModel.dataBean.range}' />
|
||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -153,11 +143,21 @@
|
|||||||
title='@{"运单类型"}'
|
title='@{"运单类型"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
value='@{viewModel.dataBean.awbName}' />
|
value='@{viewModel.dataBean.awbTypeName}' />
|
||||||
|
|
||||||
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
enable="@{false}"
|
||||||
|
title='@{"承运人"}'
|
||||||
|
titleLength="@{5}"
|
||||||
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
value='@{viewModel.dataBean.by}' />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 第四行:承运人(只读)、备注(编辑模式可编辑) -->
|
<!-- 第四行:移交状态(只读)、备注(编辑模式可编辑) -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -169,10 +169,10 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
enable="@{false}"
|
enable="@{false}"
|
||||||
title='@{"承运人"}'
|
title='@{"移交状态"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
value='@{viewModel.dataBean.by1}' />
|
value='@{viewModel.dataBean.moveStateText}' />
|
||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
|||||||
@@ -302,6 +302,29 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 第三行:清仓备注(独占整行) -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{4}"
|
||||||
|
android:text="备注:"
|
||||||
|
android:textSize="15sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@{bean.clearRemark}"
|
||||||
|
android:textSize="15sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -67,18 +67,6 @@
|
|||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
value='@={viewModel.spCode}' />
|
value='@={viewModel.spCode}' />
|
||||||
|
|
||||||
<!-- 出库状态 -->
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
hint='@{"请选择出库状态"}'
|
|
||||||
list="@{viewModel.outStatusList}"
|
|
||||||
title='@{"出库状态"}'
|
|
||||||
titleLength="@{4}"
|
|
||||||
type="@{DataLayoutType.SPINNER}"
|
|
||||||
value='@={viewModel.outStatus}' />
|
|
||||||
|
|
||||||
<!-- 目的港 -->
|
<!-- 目的港 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
android:id="@+id/filter_dest"
|
android:id="@+id/filter_dest"
|
||||||
|
|||||||
@@ -38,8 +38,9 @@ class IntImpPickUpDLVActivity :
|
|||||||
viewModel.refresh()
|
viewModel.refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化代理人列表
|
// 初始化代理人、特码下拉列表
|
||||||
viewModel.initAgentList()
|
viewModel.initAgentList()
|
||||||
|
viewModel.initSpecialCodeList()
|
||||||
|
|
||||||
// 初始加载数据
|
// 初始加载数据
|
||||||
viewModel.refresh()
|
viewModel.refresh()
|
||||||
|
|||||||
@@ -78,7 +78,8 @@ class IntImpStorageUseActivity :
|
|||||||
|
|
||||||
IntImpMoveClearDialogModel { dialog ->
|
IntImpMoveClearDialogModel { 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 IntImpMoveClearDialogModel(
|
|||||||
// 清仓正常(存储的是 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(
|
||||||
|
|||||||
@@ -556,7 +556,7 @@ class IntImpManifestViewModel : BasePageViewModel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 货物发放
|
* 理货完成(货物发放):库位已在「开始理货」时录入,此处不再弹库位框,直接提交所选运单
|
||||||
*/
|
*/
|
||||||
fun cargoReleaseClick() {
|
fun cargoReleaseClick() {
|
||||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return
|
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return
|
||||||
@@ -567,12 +567,7 @@ class IntImpManifestViewModel : BasePageViewModel() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
IntImpModifyStorageDialogModel { dialog ->
|
val params = mapOf("manifestList" to selectedItems).toRequestBody()
|
||||||
val params = mapOf(
|
|
||||||
"location" to dialog.locationName,
|
|
||||||
"locationId" to dialog.locationId.toLongOrNull(),
|
|
||||||
"manifestList" to selectedItems
|
|
||||||
).toRequestBody()
|
|
||||||
|
|
||||||
launchLoadingCollect({ NetApply.api.intImpManifestPutUpCargo(params) }) {
|
launchLoadingCollect({ NetApply.api.intImpManifestPutUpCargo(params) }) {
|
||||||
onSuccess = {
|
onSuccess = {
|
||||||
@@ -584,7 +579,6 @@ class IntImpManifestViewModel : BasePageViewModel() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.show()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import com.lukouguoji.module_base.ktx.formatDate
|
|||||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||||
import com.lukouguoji.module_base.model.ConfirmDialogModel
|
import com.lukouguoji.module_base.model.ConfirmDialogModel
|
||||||
import com.lukouguoji.module_base.model.ScanModel
|
import com.lukouguoji.module_base.model.ScanModel
|
||||||
|
import com.lukouguoji.module_base.util.DictUtils
|
||||||
import dev.utils.app.info.KeyValue
|
import dev.utils.app.info.KeyValue
|
||||||
import dev.utils.common.DateUtils
|
import dev.utils.common.DateUtils
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
@@ -38,6 +39,7 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
|||||||
|
|
||||||
// ========== 下拉列表数据源 ==========
|
// ========== 下拉列表数据源 ==========
|
||||||
val agentList = MutableLiveData(listOf(KeyValue("全部", "")))
|
val agentList = MutableLiveData(listOf(KeyValue("全部", "")))
|
||||||
|
val spCodeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||||
|
|
||||||
// ========== 统计信息 ==========
|
// ========== 统计信息 ==========
|
||||||
val totalCount = MutableLiveData("0") // 合计票数
|
val totalCount = MutableLiveData("0") // 合计票数
|
||||||
@@ -75,6 +77,19 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化特码列表(与国际进港查询筛选栏一致:国际、不区分进出港)
|
||||||
|
*/
|
||||||
|
fun initSpecialCodeList() {
|
||||||
|
DictUtils.getSpecialCodeList(
|
||||||
|
flag = 1,
|
||||||
|
ieFlag = "",
|
||||||
|
parentcode = ""
|
||||||
|
) {
|
||||||
|
spCodeList.value = it
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 搜索按钮点击
|
* 搜索按钮点击
|
||||||
*/
|
*/
|
||||||
@@ -89,13 +104,6 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
|||||||
ScanModel.startScan(getTopActivity(), Constant.RequestCode.WAYBILL)
|
ScanModel.startScan(getTopActivity(), Constant.RequestCode.WAYBILL)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 扫码特码
|
|
||||||
*/
|
|
||||||
fun scanSpCode() {
|
|
||||||
ScanModel.startScan(getTopActivity(), Constant.RequestCode.gnj_chu_ku_list)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 全选按钮点击
|
* 全选按钮点击
|
||||||
*/
|
*/
|
||||||
@@ -181,10 +189,6 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
|||||||
wbNo.value = data.getStringExtra(Constant.Result.CODED_CONTENT)
|
wbNo.value = data.getStringExtra(Constant.Result.CODED_CONTENT)
|
||||||
refresh()
|
refresh()
|
||||||
}
|
}
|
||||||
Constant.RequestCode.gnj_chu_ku_list -> {
|
|
||||||
spCode.value = data.getStringExtra(Constant.Result.CODED_CONTENT)
|
|
||||||
refresh()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,16 +117,22 @@ class IntImpStorageUseViewModel : 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()) {
|
if (maWbListForClear.isEmpty()) {
|
||||||
showToast("请至少选择一个库位")
|
showToast("请至少选择一个库位")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 备注同时通过 query 参数和主单字段传递,兼容服务端两种取值方式
|
||||||
|
val remark = clearRemark.ifEmpty { null }
|
||||||
|
maWbListForClear.forEach { it.clearRemark = remark }
|
||||||
val body = maWbListForClear.toRequestBody()
|
val body = maWbListForClear.toRequestBody()
|
||||||
|
|
||||||
launchLoadingCollect({ NetApply.api.clearIntImpStorage(clearNormal, body) }) {
|
launchLoadingCollect({ NetApply.api.clearIntImpStorage(clearNormal, remark, body) }) {
|
||||||
onSuccess = {
|
onSuccess = {
|
||||||
showToast("清仓成功")
|
showToast("清仓成功")
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
|
|||||||
@@ -78,10 +78,9 @@
|
|||||||
|
|
||||||
<!-- 特码 -->
|
<!-- 特码 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
hint='@{"请输入特码"}'
|
hint='@{"请选择特码"}'
|
||||||
icon="@{@drawable/img_scan}"
|
list="@{viewModel.spCodeList}"
|
||||||
setOnIconClickListener="@{(v)-> viewModel.scanSpCode()}"
|
type="@{SearchLayoutType.SPINNER}"
|
||||||
type="@{SearchLayoutType.INPUT}"
|
|
||||||
value="@={viewModel.spCode}"
|
value="@={viewModel.spCode}"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
@@ -62,16 +62,6 @@
|
|||||||
type="@{SearchLayoutType.DATE}"
|
type="@{SearchLayoutType.DATE}"
|
||||||
value="@={viewModel.flightDateEnd}" />
|
value="@={viewModel.flightDateEnd}" />
|
||||||
|
|
||||||
<!-- 代理人 -->
|
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
hint='@{"请选择代理"}'
|
|
||||||
list="@{viewModel.agentList}"
|
|
||||||
type="@{SearchLayoutType.SPINNER}"
|
|
||||||
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:id="@+id/flight_no_search"
|
||||||
@@ -82,6 +72,16 @@
|
|||||||
type="@{SearchLayoutType.INPUT}"
|
type="@{SearchLayoutType.INPUT}"
|
||||||
value="@={viewModel.flightNo}" />
|
value="@={viewModel.flightNo}" />
|
||||||
|
|
||||||
|
<!-- 代理人 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
hint='@{"请选择代理"}'
|
||||||
|
list="@{viewModel.agentList}"
|
||||||
|
type="@{SearchLayoutType.SPINNER}"
|
||||||
|
value="@={viewModel.agentId}" />
|
||||||
|
|
||||||
<!-- 运单号 -->
|
<!-- 运单号 -->
|
||||||
<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"
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
<!-- 底部按钮 -->
|
<!-- 底部按钮 -->
|
||||||
|
|||||||
@@ -303,6 +303,29 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 第三行:清仓备注(独占整行) -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{4}"
|
||||||
|
android:text="备注:"
|
||||||
|
android:textSize="15sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@{bean.clearRemark}"
|
||||||
|
android:textSize="15sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -64,7 +64,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="运单号:" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -262,7 +262,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="重量:" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ class HbFlightEditViewModel : BaseViewModel() {
|
|||||||
val fdest = MutableLiveData("")
|
val fdest = MutableLiveData("")
|
||||||
val countryType = MutableLiveData("")
|
val countryType = MutableLiveData("")
|
||||||
val serviceType = MutableLiveData("")
|
val serviceType = MutableLiveData("")
|
||||||
val status = MutableLiveData("")
|
|
||||||
val scheduledTackOff = MutableLiveData("")
|
val scheduledTackOff = MutableLiveData("")
|
||||||
val estimatedTakeOff = MutableLiveData("")
|
val estimatedTakeOff = MutableLiveData("")
|
||||||
val actualTakeOff = MutableLiveData("")
|
val actualTakeOff = MutableLiveData("")
|
||||||
@@ -50,20 +49,21 @@ class HbFlightEditViewModel : BaseViewModel() {
|
|||||||
val actualArrival = MutableLiveData("")
|
val actualArrival = MutableLiveData("")
|
||||||
val standId = MutableLiveData("")
|
val standId = MutableLiveData("")
|
||||||
val registration = MutableLiveData("")
|
val registration = MutableLiveData("")
|
||||||
val prefix = MutableLiveData("")
|
|
||||||
val flightStatus = MutableLiveData("")
|
val flightStatus = MutableLiveData("")
|
||||||
val cmFlag = MutableLiveData("")
|
|
||||||
val delayFreeText = MutableLiveData("")
|
val delayFreeText = MutableLiveData("")
|
||||||
|
|
||||||
|
// 表单已不展示的字段:编辑模式保留服务端原值原样回传,避免更新时被清空
|
||||||
|
private var status = ""
|
||||||
|
private var prefix = ""
|
||||||
|
private var cmFlag = ""
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// 下拉列表
|
// 下拉列表
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
val countryTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
val countryTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||||
val serviceTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
val serviceTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||||
val statusList = MutableLiveData<List<KeyValue>>(emptyList())
|
|
||||||
val flightStatusList = MutableLiveData<List<KeyValue>>(emptyList())
|
val flightStatusList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||||
val cmFlagList = MutableLiveData<List<KeyValue>>(emptyList())
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// 选项定义(服务端入库/过滤用 code,详情接口返回中文名,回填时需反查)
|
// 选项定义(服务端入库/过滤用 code,详情接口返回中文名,回填时需反查)
|
||||||
@@ -140,7 +140,7 @@ class HbFlightEditViewModel : BaseViewModel() {
|
|||||||
fdest.value = bean.fdest
|
fdest.value = bean.fdest
|
||||||
countryType.value = toCode(countryTypeOptions, bean.countryType)
|
countryType.value = toCode(countryTypeOptions, bean.countryType)
|
||||||
serviceType.value = toCode(serviceTypeOptions, bean.serviceType)
|
serviceType.value = toCode(serviceTypeOptions, bean.serviceType)
|
||||||
status.value = toCode(statusOptions, bean.status)
|
status = toCode(statusOptions, bean.status)
|
||||||
scheduledTackOff.value = bean.scheduledTackOff
|
scheduledTackOff.value = bean.scheduledTackOff
|
||||||
estimatedTakeOff.value = bean.estimatedTakeOff
|
estimatedTakeOff.value = bean.estimatedTakeOff
|
||||||
actualTakeOff.value = bean.actualTakeOff
|
actualTakeOff.value = bean.actualTakeOff
|
||||||
@@ -149,9 +149,9 @@ class HbFlightEditViewModel : BaseViewModel() {
|
|||||||
actualArrival.value = bean.actualArrival
|
actualArrival.value = bean.actualArrival
|
||||||
standId.value = bean.standId
|
standId.value = bean.standId
|
||||||
registration.value = bean.registration
|
registration.value = bean.registration
|
||||||
prefix.value = bean.prefix
|
prefix = bean.prefix.noNull()
|
||||||
flightStatus.value = toCode(flightStatusOptions, bean.flightStatus)
|
flightStatus.value = toCode(flightStatusOptions, bean.flightStatus)
|
||||||
cmFlag.value = toCode(cmFlagOptions, bean.cmFlag)
|
cmFlag = toCode(cmFlagOptions, bean.cmFlag)
|
||||||
delayFreeText.value = bean.delayFreeText
|
delayFreeText.value = bean.delayFreeText
|
||||||
}
|
}
|
||||||
// 字典加载必须在编辑数据回填之后,保证 checkedValue 可用
|
// 字典加载必须在编辑数据回填之后,保证 checkedValue 可用
|
||||||
@@ -176,14 +176,8 @@ class HbFlightEditViewModel : BaseViewModel() {
|
|||||||
serviceTypeList.value =
|
serviceTypeList.value =
|
||||||
buildStaticList(serviceTypeOptions, if (isModify) serviceType.value else null)
|
buildStaticList(serviceTypeOptions, if (isModify) serviceType.value else null)
|
||||||
|
|
||||||
statusList.value =
|
|
||||||
buildStaticList(statusOptions, if (isModify) status.value else null)
|
|
||||||
|
|
||||||
flightStatusList.value =
|
flightStatusList.value =
|
||||||
buildStaticList(flightStatusOptions, if (isModify) flightStatus.value else null)
|
buildStaticList(flightStatusOptions, if (isModify) flightStatus.value else null)
|
||||||
|
|
||||||
cmFlagList.value =
|
|
||||||
buildStaticList(cmFlagOptions, if (isModify) cmFlag.value else null)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -214,6 +208,12 @@ class HbFlightEditViewModel : BaseViewModel() {
|
|||||||
if (flightNo.value.verifyNullOrEmpty("请输入航班号")) return
|
if (flightNo.value.verifyNullOrEmpty("请输入航班号")) return
|
||||||
if (fdep.value.verifyNullOrEmpty("请输入始发港")) return
|
if (fdep.value.verifyNullOrEmpty("请输入始发港")) return
|
||||||
if (fdest.value.verifyNullOrEmpty("请输入目的港")) return
|
if (fdest.value.verifyNullOrEmpty("请输入目的港")) return
|
||||||
|
if (countryType.value.verifyNullOrEmpty("请选择地区类型")) return
|
||||||
|
if (serviceType.value.verifyNullOrEmpty("请选择服务类型")) return
|
||||||
|
if (scheduledTackOff.value.verifyNullOrEmpty("请选择计划起飞时间")) return
|
||||||
|
if (estimatedTakeOff.value.verifyNullOrEmpty("请选择预计起飞时间")) return
|
||||||
|
if (scheduledArrival.value.verifyNullOrEmpty("请选择计划降落时间")) return
|
||||||
|
if (estimatedArrival.value.verifyNullOrEmpty("请选择预计降落时间")) return
|
||||||
|
|
||||||
val isModify = pageType.value == DetailsPageType.Modify
|
val isModify = pageType.value == DetailsPageType.Modify
|
||||||
val dep = fdep.value?.trim().noNull()
|
val dep = fdep.value?.trim().noNull()
|
||||||
@@ -231,7 +231,6 @@ class HbFlightEditViewModel : BaseViewModel() {
|
|||||||
"countryName" to countryTypeList.value
|
"countryName" to countryTypeList.value
|
||||||
?.firstOrNull { it.value == countryType.value }?.key,
|
?.firstOrNull { it.value == countryType.value }?.key,
|
||||||
"serviceType" to serviceType.value,
|
"serviceType" to serviceType.value,
|
||||||
"status" to status.value,
|
|
||||||
"scheduledTackOff" to scheduledTackOff.value,
|
"scheduledTackOff" to scheduledTackOff.value,
|
||||||
"estimatedTakeOff" to estimatedTakeOff.value,
|
"estimatedTakeOff" to estimatedTakeOff.value,
|
||||||
"actualTakeOff" to actualTakeOff.value,
|
"actualTakeOff" to actualTakeOff.value,
|
||||||
@@ -240,13 +239,14 @@ class HbFlightEditViewModel : BaseViewModel() {
|
|||||||
"actualArrival" to actualArrival.value,
|
"actualArrival" to actualArrival.value,
|
||||||
"standId" to standId.value?.trim(),
|
"standId" to standId.value?.trim(),
|
||||||
"registration" to registration.value?.trim(),
|
"registration" to registration.value?.trim(),
|
||||||
"prefix" to prefix.value?.trim(),
|
|
||||||
"flightStatus" to flightStatus.value,
|
"flightStatus" to flightStatus.value,
|
||||||
"cmFlag" to cmFlag.value,
|
|
||||||
"delayFreeText" to delayFreeText.value?.trim(),
|
"delayFreeText" to delayFreeText.value?.trim(),
|
||||||
)
|
)
|
||||||
if (isModify) {
|
if (isModify) {
|
||||||
params["fid"] = fid.toLongOrNull() ?: fid
|
params["fid"] = fid.toLongOrNull() ?: fid
|
||||||
|
params["status"] = status
|
||||||
|
params["prefix"] = prefix
|
||||||
|
params["cmFlag"] = cmFlag
|
||||||
}
|
}
|
||||||
|
|
||||||
launchLoadingCollect({
|
launchLoadingCollect({
|
||||||
|
|||||||
@@ -125,7 +125,7 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 第3行:地区类型、服务类型、进出港 -->
|
<!-- 第3行:地区类型、服务类型、航班状态 -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -135,6 +135,7 @@
|
|||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
hint='@{"请选择地区类型"}'
|
hint='@{"请选择地区类型"}'
|
||||||
list="@{viewModel.countryTypeList}"
|
list="@{viewModel.countryTypeList}"
|
||||||
|
required="@{true}"
|
||||||
title='@{"地区类型"}'
|
title='@{"地区类型"}'
|
||||||
titleLength="@{4}"
|
titleLength="@{4}"
|
||||||
type="@{DataLayoutType.SPINNER}"
|
type="@{DataLayoutType.SPINNER}"
|
||||||
@@ -146,6 +147,7 @@
|
|||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
hint='@{"请选择服务类型"}'
|
hint='@{"请选择服务类型"}'
|
||||||
list="@{viewModel.serviceTypeList}"
|
list="@{viewModel.serviceTypeList}"
|
||||||
|
required="@{true}"
|
||||||
title='@{"服务类型"}'
|
title='@{"服务类型"}'
|
||||||
titleLength="@{4}"
|
titleLength="@{4}"
|
||||||
type="@{DataLayoutType.SPINNER}"
|
type="@{DataLayoutType.SPINNER}"
|
||||||
@@ -156,12 +158,12 @@
|
|||||||
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='@{"请选择进出港"}'
|
hint='@{"请选择航班状态"}'
|
||||||
list="@{viewModel.statusList}"
|
list="@{viewModel.flightStatusList}"
|
||||||
title='@{"进出港"}'
|
title='@{"航班状态"}'
|
||||||
titleLength="@{4}"
|
titleLength="@{4}"
|
||||||
type="@{DataLayoutType.SPINNER}"
|
type="@{DataLayoutType.SPINNER}"
|
||||||
value='@={viewModel.status}'
|
value='@={viewModel.flightStatus}'
|
||||||
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"
|
||||||
@@ -178,6 +180,7 @@
|
|||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
hint='@{"请选择计划起飞时间"}'
|
hint='@{"请选择计划起飞时间"}'
|
||||||
|
required="@{true}"
|
||||||
title='@{"计划起飞"}'
|
title='@{"计划起飞"}'
|
||||||
titleLength="@{4}"
|
titleLength="@{4}"
|
||||||
type="@{DataLayoutType.DATETIME}"
|
type="@{DataLayoutType.DATETIME}"
|
||||||
@@ -188,6 +191,7 @@
|
|||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
hint='@{"请选择预计起飞时间"}'
|
hint='@{"请选择预计起飞时间"}'
|
||||||
|
required="@{true}"
|
||||||
title='@{"预计起飞"}'
|
title='@{"预计起飞"}'
|
||||||
titleLength="@{4}"
|
titleLength="@{4}"
|
||||||
type="@{DataLayoutType.DATETIME}"
|
type="@{DataLayoutType.DATETIME}"
|
||||||
@@ -219,6 +223,7 @@
|
|||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
hint='@{"请选择计划降落时间"}'
|
hint='@{"请选择计划降落时间"}'
|
||||||
|
required="@{true}"
|
||||||
title='@{"计划降落"}'
|
title='@{"计划降落"}'
|
||||||
titleLength="@{4}"
|
titleLength="@{4}"
|
||||||
type="@{DataLayoutType.DATETIME}"
|
type="@{DataLayoutType.DATETIME}"
|
||||||
@@ -229,6 +234,7 @@
|
|||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
hint='@{"请选择预计降落时间"}'
|
hint='@{"请选择预计降落时间"}'
|
||||||
|
required="@{true}"
|
||||||
title='@{"预计降落"}'
|
title='@{"预计降落"}'
|
||||||
titleLength="@{4}"
|
titleLength="@{4}"
|
||||||
type="@{DataLayoutType.DATETIME}"
|
type="@{DataLayoutType.DATETIME}"
|
||||||
@@ -251,7 +257,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"
|
||||||
@@ -280,49 +286,6 @@
|
|||||||
android:layout_marginStart="15dp"
|
android:layout_marginStart="15dp"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
|
||||||
hint='@{"请输入运单前缀"}'
|
|
||||||
title='@{"运单前缀"}'
|
|
||||||
titleLength="@{4}"
|
|
||||||
type="@{DataLayoutType.INPUT}"
|
|
||||||
value='@={viewModel.prefix}'
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="15dp"
|
|
||||||
android:layout_weight="1" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- 第7行:航班状态、货邮状态、延误原因 -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
|
||||||
hint='@{"请选择航班状态"}'
|
|
||||||
list="@{viewModel.flightStatusList}"
|
|
||||||
title='@{"航班状态"}'
|
|
||||||
titleLength="@{4}"
|
|
||||||
type="@{DataLayoutType.SPINNER}"
|
|
||||||
value='@={viewModel.flightStatus}'
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1" />
|
|
||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
|
||||||
hint='@{"请选择货邮状态"}'
|
|
||||||
list="@{viewModel.cmFlagList}"
|
|
||||||
title='@{"货邮状态"}'
|
|
||||||
titleLength="@{4}"
|
|
||||||
type="@{DataLayoutType.SPINNER}"
|
|
||||||
value='@={viewModel.cmFlag}'
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="15dp"
|
|
||||||
android:layout_weight="1" />
|
|
||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
hint='@{"请输入延误原因"}'
|
hint='@{"请输入延误原因"}'
|
||||||
title='@{"延误原因"}'
|
title='@{"延误原因"}'
|
||||||
|
|||||||
Reference in New Issue
Block a user