Compare commits
3 Commits
7b2bc00afc
...
9c4588e47e
| Author | SHA1 | Date | |
|---|---|---|---|
| 9c4588e47e | |||
| 084832e4e9 | |||
| 89989ef00a |
@@ -719,7 +719,7 @@ XxxDialogModel(onConfirm = { refresh() }).show()
|
||||
|------|------|------|------|
|
||||
| 底部 | `DIALOG_TYPE_BOTTOM` | 操作选项 | 默认类型 |
|
||||
| 中间 | `DIALOG_TYPE_CENTER` | 确认框、表单输入 | `ConfirmDialogModel` |
|
||||
| 抽屉 | `DIALOG_TYPE_DRAWER` | 筛选条件 | `GjcQueryFilterDialogModel` |
|
||||
| 抽屉 | `DIALOG_TYPE_DRAWER` | 通用右侧抽屉 | 见下方模板 |
|
||||
| 全屏 | `DIALOG_TYPE_FULL` | 列表展示 | `NoticeMessageDialogModel` |
|
||||
|
||||
### 抽屉弹窗(筛选场景)
|
||||
|
||||
@@ -26,8 +26,8 @@ android {
|
||||
applicationId "com.lukouguoji.aerologic"
|
||||
minSdkVersion 24
|
||||
targetSdkVersion 30
|
||||
versionCode 87
|
||||
versionName "1.8.7"
|
||||
versionCode 88
|
||||
versionName "1.8.8"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
hint='@{"请输入备注"}'
|
||||
inputHeight="@{80}"
|
||||
title='@{"备注"}'
|
||||
titleLength="@{3}"
|
||||
titleLength="@{7}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.uldBean.remark}' />
|
||||
|
||||
|
||||
@@ -152,6 +152,10 @@ class PadDataLayout : FrameLayout {
|
||||
spinner = view.findViewById(R.id.spinner)
|
||||
iv = view.findViewById(R.id.iv)
|
||||
|
||||
// 默认单行,禁止换行(多行输入框通过 inputHeight 属性恢复为多行)
|
||||
et.isSingleLine = true
|
||||
et.maxLines = 1
|
||||
|
||||
et.doOnTextChanged { text, _, _, _ ->
|
||||
value = text.toString()
|
||||
}
|
||||
|
||||
@@ -198,6 +198,10 @@ class PadDataLayoutNew : FrameLayout {
|
||||
spinner = view.findViewById(R.id.spinner)
|
||||
iv = view.findViewById(R.id.iv)
|
||||
|
||||
// 默认单行,禁止换行(多行输入框通过 inputHeight 属性恢复为多行)
|
||||
et.isSingleLine = true
|
||||
et.maxLines = 1
|
||||
|
||||
et.doOnTextChanged { text, _, _, _ ->
|
||||
value = text.toString()
|
||||
}
|
||||
@@ -274,7 +278,8 @@ class PadDataLayoutNew : FrameLayout {
|
||||
|
||||
tvSpinner.text = list.find { b -> b.value == value }?.key ?: value
|
||||
|
||||
if (value.isNotEmpty() && list.isNotEmpty()) {
|
||||
// 同步 Spinner 选中项(含 value 为空时重置到对应项,如"全部"),修复重置后 UI 不清空的问题
|
||||
if (list.isNotEmpty()) {
|
||||
val index = list.indexOfFirst { b -> b.value == value }
|
||||
if (index >= 0) {
|
||||
spinner.post {
|
||||
|
||||
@@ -1,56 +1,122 @@
|
||||
package com.lukouguoji.gjc.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.databinding.ActivityGjcQueryBinding
|
||||
import com.lukouguoji.gjc.viewModel.GjcQueryViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.impl.observe
|
||||
import com.lukouguoji.module_base.ktx.getLifecycleOwner
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
/**
|
||||
* 国际出港查询列表页
|
||||
*/
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_QUERY_LIST)
|
||||
class GjcQueryActivity :
|
||||
BaseBindingActivity<ActivityGjcQueryBinding, GjcQueryViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_gjc_query
|
||||
|
||||
override fun viewModelClass() = GjcQueryViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("国际出港查询")
|
||||
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 绑定分页逻辑
|
||||
viewModel.pageModel
|
||||
.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, getLifecycleOwner())
|
||||
|
||||
// 监听刷新事件
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
// 初始化代理列表
|
||||
viewModel.initAgentList()
|
||||
|
||||
// 初始加载
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context) {
|
||||
val starter = Intent(context, GjcQueryActivity::class.java)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
package com.lukouguoji.gjc.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.databinding.ActivityGjcQueryBinding
|
||||
import com.lukouguoji.gjc.viewModel.GjcQueryViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.impl.observe
|
||||
import com.lukouguoji.module_base.ktx.getLifecycleOwner
|
||||
import com.lukouguoji.module_base.ktx.setUpperCaseAlphanumericFilter
|
||||
import com.lukouguoji.module_base.ktx.setUpperCaseLetterFilter
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
/**
|
||||
* 国际出港查询列表页
|
||||
*/
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_QUERY_LIST)
|
||||
class GjcQueryActivity :
|
||||
BaseBindingActivity<ActivityGjcQueryBinding, GjcQueryViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_gjc_query
|
||||
|
||||
override fun viewModelClass() = GjcQueryViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("国际出港查询")
|
||||
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 绑定分页逻辑
|
||||
viewModel.pageModel
|
||||
.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, getLifecycleOwner())
|
||||
|
||||
// 监听刷新事件
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
// 初始化代理列表 & 筛选下拉列表
|
||||
viewModel.initAgentList()
|
||||
viewModel.initFilterLists()
|
||||
|
||||
// 观察筛选面板显示状态
|
||||
viewModel.filterVisible.observe(this) { visible ->
|
||||
if (visible) showFilterPanel() else hideFilterPanel()
|
||||
}
|
||||
|
||||
// 航班号:大写字母+数字
|
||||
binding.filterPanel.filterFlightNo.et.setUpperCaseAlphanumericFilter()
|
||||
// 目的港:仅大写字母
|
||||
binding.filterPanel.filterDest.et.setUpperCaseLetterFilter()
|
||||
|
||||
// 初始加载
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
private fun showFilterPanel() {
|
||||
val panel = binding.filterPanel.root
|
||||
val overlay = binding.filterOverlay
|
||||
val panelWidth = window.decorView.width / 3
|
||||
|
||||
panel.layoutParams = (panel.layoutParams as FrameLayout.LayoutParams).apply {
|
||||
width = panelWidth
|
||||
gravity = Gravity.END
|
||||
}
|
||||
|
||||
// 先 INVISIBLE 完成测量,避免第一次显示时闪烁
|
||||
panel.visibility = View.INVISIBLE
|
||||
panel.translationX = panelWidth.toFloat()
|
||||
overlay.visibility = View.VISIBLE
|
||||
overlay.alpha = 0f
|
||||
|
||||
panel.post {
|
||||
panel.visibility = View.VISIBLE
|
||||
panel.animate().translationX(0f).setDuration(250).start()
|
||||
overlay.animate().alpha(1f).setDuration(250).start()
|
||||
}
|
||||
}
|
||||
|
||||
private fun hideFilterPanel() {
|
||||
val panel = binding.filterPanel.root
|
||||
val overlay = binding.filterOverlay
|
||||
|
||||
if (panel.visibility != View.VISIBLE) return
|
||||
|
||||
panel.animate()
|
||||
.translationX(panel.width.toFloat())
|
||||
.setDuration(250)
|
||||
.withEndAction { panel.visibility = View.GONE }
|
||||
.start()
|
||||
|
||||
overlay.animate()
|
||||
.alpha(0f)
|
||||
.setDuration(250)
|
||||
.withEndAction { overlay.visibility = View.GONE }
|
||||
.start()
|
||||
}
|
||||
|
||||
override fun onBackPressed() {
|
||||
if (viewModel.filterVisible.value == true) {
|
||||
viewModel.closeFilter()
|
||||
} else {
|
||||
super.onBackPressed()
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context) {
|
||||
val starter = Intent(context, GjcQueryActivity::class.java)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
package com.lukouguoji.gjc.dialog
|
||||
|
||||
import android.content.Context
|
||||
import android.content.res.ColorStateList
|
||||
import android.graphics.Color
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.databinding.DialogGjcQueryFilterBinding
|
||||
import com.lukouguoji.module_base.base.BaseDialogModel
|
||||
import com.lxj.xpopup.XPopup
|
||||
import com.lxj.xpopup.enums.PopupPosition
|
||||
import dev.DevUtils
|
||||
import dev.utils.app.info.KeyValue
|
||||
|
||||
/**
|
||||
* 国际出港查询筛选抽屉
|
||||
*/
|
||||
class GjcQueryFilterDialogModel(
|
||||
val spCode: MutableLiveData<String>, // 特码
|
||||
val flightNo: MutableLiveData<String>, // 航班号
|
||||
val dest: MutableLiveData<String>, // 目的港
|
||||
val awbType: MutableLiveData<String>, // 运单类型
|
||||
val businessType: MutableLiveData<String>, // 业务类型
|
||||
val goodsCn: MutableLiveData<String>, // 品名(中)
|
||||
private val onConfirm: () -> Unit
|
||||
) : BaseDialogModel<DialogGjcQueryFilterBinding>(DIALOG_TYPE_DRAWER) {
|
||||
|
||||
// 运单类型列表
|
||||
val awbTypeList = MutableLiveData(
|
||||
listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("主单", "1"),
|
||||
KeyValue("分单", "2")
|
||||
)
|
||||
)
|
||||
|
||||
// 业务类型列表
|
||||
val businessTypeList = MutableLiveData(
|
||||
listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("普货", "1"),
|
||||
KeyValue("特货", "2")
|
||||
)
|
||||
)
|
||||
|
||||
override fun layoutId() = R.layout.dialog_gjc_query_filter
|
||||
|
||||
override fun onBuild(builder: XPopup.Builder) {
|
||||
super.onBuild(builder)
|
||||
// 设置从右边弹出
|
||||
builder.popupPosition(PopupPosition.Right)
|
||||
|
||||
// 设置抽屉宽度为 Activity contentView 宽度的1/3(横屏长边)
|
||||
val activity = DevUtils.getTopActivity()
|
||||
val activityWidth = activity.window.decorView.width
|
||||
builder.maxWidth(activityWidth / 3)
|
||||
builder.popupWidth(activityWidth / 3)
|
||||
}
|
||||
|
||||
override fun onDialogCreated(context: Context) {
|
||||
binding.model = this
|
||||
binding.lifecycleOwner = context as? androidx.lifecycle.LifecycleOwner
|
||||
|
||||
val titleColor = Color.parseColor("#666666")
|
||||
|
||||
// 设置标题
|
||||
binding.root.findViewById<TextView>(R.id.title_name)?.text = "筛选条件"
|
||||
binding.root.findViewById<TextView>(R.id.title_name)?.setTextColor(titleColor)
|
||||
binding.root.findViewById<TextView>(R.id.tool_tv_back)?.setTextColor(titleColor)
|
||||
binding.root.findViewById<ImageView>(R.id.tool_iv_back)?.imageTintList = ColorStateList.valueOf(titleColor)
|
||||
binding.root.findViewById<View>(R.id.toolbar)?.setBackgroundColor(Color.WHITE)
|
||||
|
||||
// 返回按钮
|
||||
binding.root.findViewById<View>(R.id.tool_back)?.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置筛选条件
|
||||
*/
|
||||
fun onResetClick() {
|
||||
spCode.value = ""
|
||||
flightNo.value = ""
|
||||
dest.value = ""
|
||||
awbType.value = ""
|
||||
businessType.value = ""
|
||||
goodsCn.value = ""
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认筛选
|
||||
*/
|
||||
fun onConfirmClick() {
|
||||
dismiss()
|
||||
onConfirm()
|
||||
}
|
||||
}
|
||||
@@ -366,8 +366,7 @@ class GjcBoxWeighingAddViewModel : BaseViewModel() {
|
||||
bean.passageway = passagewayList.value?.firstOrNull{ it.value == channel.value }?.key ?: ""
|
||||
bean.passagewayId = channel.value ?: ""
|
||||
|
||||
// 验证必填字段
|
||||
if (bean.carId.verifyNullOrEmpty("请输入架子车号")) return
|
||||
// 验证必填字段(架子车号改为非必填)
|
||||
if (bean.uld.verifyNullOrEmpty("请输入ULD编号")) return
|
||||
if (bean.passageway.verifyNullOrEmpty("请选择通道号")) return
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@ package com.lukouguoji.gjc.viewModel
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import androidx.lifecycle.MediatorLiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.dialog.GjcQueryFilterDialogModel
|
||||
import com.lukouguoji.gjc.holder.GjcQueryViewHolder
|
||||
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
@@ -14,6 +14,7 @@ import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import com.lukouguoji.module_base.model.ScanModel
|
||||
import com.lukouguoji.module_base.util.DictUtils
|
||||
import dev.utils.app.info.KeyValue
|
||||
import dev.utils.common.DateUtils
|
||||
import com.lukouguoji.module_base.ktx.formatDate
|
||||
@@ -52,7 +53,22 @@ class GjcQueryViewModel : BasePageViewModel() {
|
||||
val totalPc = MutableLiveData("0") // 总件数
|
||||
val totalWeight = MutableLiveData("0") // 总重量
|
||||
|
||||
// ==================== 筛选条件(预留)====================
|
||||
// ==================== 筛选面板 ====================
|
||||
val filterVisible = MutableLiveData(false)
|
||||
|
||||
// 运单类型列表(字典接口 typeCode/awb,type=IO 国际出港)
|
||||
val awbTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
|
||||
// 业务类型列表
|
||||
val businessTypeList = MutableLiveData(
|
||||
listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("普货", "1"),
|
||||
KeyValue("特货", "2")
|
||||
)
|
||||
)
|
||||
|
||||
// ==================== 筛选条件 ====================
|
||||
val spCode = MutableLiveData("") // 特码
|
||||
val flightNo = MutableLiveData("") // 航班号
|
||||
val dest = MutableLiveData("") // 目的港
|
||||
@@ -60,6 +76,20 @@ class GjcQueryViewModel : BasePageViewModel() {
|
||||
val businessType = MutableLiveData("") // 业务类型
|
||||
val goodsCn = MutableLiveData("") // 品名(中)
|
||||
|
||||
// 是否有筛选条件(任意一个非空则为 true,用于筛选按钮红点)
|
||||
val hasFilter: MediatorLiveData<Boolean> = MediatorLiveData<Boolean>().apply {
|
||||
val update = { _: Any? ->
|
||||
value = listOf(spCode, flightNo, dest, awbType, businessType, goodsCn)
|
||||
.any { !it.value.isNullOrEmpty() }
|
||||
}
|
||||
addSource(spCode, update)
|
||||
addSource(flightNo, update)
|
||||
addSource(dest, update)
|
||||
addSource(awbType, update)
|
||||
addSource(businessType, update)
|
||||
addSource(goodsCn, update)
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 方法区
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
@@ -79,19 +109,50 @@ class GjcQueryViewModel : BasePageViewModel() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 筛选按钮点击
|
||||
* 筛选按钮点击 - 打开筛选面板
|
||||
*/
|
||||
fun filterClick() {
|
||||
val filterDialog = GjcQueryFilterDialogModel(
|
||||
spCode = spCode,
|
||||
flightNo = flightNo,
|
||||
dest = dest,
|
||||
awbType = awbType,
|
||||
businessType = businessType,
|
||||
goodsCn = goodsCn,
|
||||
onConfirm = { refresh() }
|
||||
)
|
||||
filterDialog.show()
|
||||
filterVisible.value = true
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭筛选面板
|
||||
*/
|
||||
fun closeFilter() {
|
||||
filterVisible.value = false
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置筛选条件
|
||||
*/
|
||||
fun resetFilter() {
|
||||
spCode.value = ""
|
||||
flightNo.value = ""
|
||||
dest.value = ""
|
||||
awbType.value = ""
|
||||
businessType.value = ""
|
||||
goodsCn.value = ""
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认筛选 - 关闭面板并刷新
|
||||
*/
|
||||
fun confirmFilter() {
|
||||
filterVisible.value = false
|
||||
refresh()
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化筛选下拉列表(运单类型从字典接口获取,type=IO 国际出港)
|
||||
*/
|
||||
fun initFilterLists() {
|
||||
DictUtils.getWaybillTypeList(
|
||||
type = Constant.businessType.IO,
|
||||
addAll = true,
|
||||
checkedValue = awbType.value
|
||||
) {
|
||||
awbTypeList.postValue(it)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -110,7 +171,7 @@ class GjcQueryViewModel : BasePageViewModel() {
|
||||
"wbNo" to waybillNo.value!!.ifEmpty { null },
|
||||
// 筛选条件(暂未使用)
|
||||
"spCode" to spCode.value!!.ifEmpty { null },
|
||||
"flightNo" to flightNo.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 },
|
||||
@@ -126,7 +187,7 @@ class GjcQueryViewModel : BasePageViewModel() {
|
||||
"wbNo" to waybillNo.value!!.ifEmpty { null },
|
||||
// 筛选条件
|
||||
"spCode" to spCode.value!!.ifEmpty { null },
|
||||
"flightNo" to flightNo.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 },
|
||||
|
||||
@@ -355,7 +355,11 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
||||
if (bean.fno.verifyNullOrEmpty("请输入航班号")) return
|
||||
if (channel.value.verifyNullOrEmpty("请选择通道号")) return
|
||||
|
||||
// 2. 校验件数: 运抵件数 + 实时件数 不能大于 预配件数
|
||||
// 2. 校验运抵件数、运抵重量必填
|
||||
if (arrivePc.value.verifyNullOrEmpty("请输入运抵件数")) return
|
||||
if (arriveWeight.value.verifyNullOrEmpty("请输入运抵重量")) return
|
||||
|
||||
// 3. 校验件数: 运抵件数 + 实时件数 不能大于 预配件数
|
||||
val realTimePcVal = realTimePc.value?.toLongOrNull() ?: 0L
|
||||
val arrivePcVal = arrivePc.value?.toLongOrNull() ?: bean.arrivePc ?: 0L
|
||||
val preallocatedPc = bean.pc ?: 0L
|
||||
@@ -365,7 +369,17 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
||||
return
|
||||
}
|
||||
|
||||
// 3. 收集当前表单数据,更新到 bean
|
||||
// 4. 校验重量: 运抵重量 + 实时重量 不能超过预配重量的3%
|
||||
val realTimeWeightVal = realTimeWeight.value?.toDoubleOrNull() ?: 0.0
|
||||
val arriveWeightCheckVal = arriveWeight.value?.toDoubleOrNull() ?: 0.0
|
||||
val preallocatedWeight = bean.weight ?: 0.0
|
||||
|
||||
if (arriveWeightCheckVal + realTimeWeightVal > preallocatedWeight * 1.03) {
|
||||
showToast("运抵重量 + 实时重量不能超过预配重量的3%")
|
||||
return
|
||||
}
|
||||
|
||||
// 5. 收集当前表单数据,更新到 bean
|
||||
bean.apply {
|
||||
// 更新运抵数据(如果用户已编辑)
|
||||
arrivePc = this@GjcWeighingStartViewModel.arrivePc.value?.toLongOrNull() ?: arrivePc
|
||||
@@ -429,6 +443,10 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
||||
if (bean.fno.verifyNullOrEmpty("请输入航班号")) return
|
||||
if (channel.value.verifyNullOrEmpty("请选择通道号")) return
|
||||
|
||||
// 校验运抵件数、运抵重量必填
|
||||
if (arrivePc.value.verifyNullOrEmpty("请输入运抵件数")) return
|
||||
if (arriveWeight.value.verifyNullOrEmpty("请输入运抵重量")) return
|
||||
|
||||
// 校验件数: 运抵件数 + 实时件数 不能大于 预配件数
|
||||
val realTimePcVal = realTimePc.value?.toLongOrNull() ?: 0L
|
||||
val arrivePcVal = arrivePc.value?.toLongOrNull() ?: bean.arrivePc ?: 0L
|
||||
@@ -439,6 +457,16 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
||||
return
|
||||
}
|
||||
|
||||
// 校验重量: 运抵重量 + 实时重量 不能超过预配重量的3%
|
||||
val realTimeWeightVal = realTimeWeight.value?.toDoubleOrNull() ?: 0.0
|
||||
val arriveWeightCheckVal = arriveWeight.value?.toDoubleOrNull() ?: 0.0
|
||||
val preallocatedWeight = bean.weight ?: 0.0
|
||||
|
||||
if (arriveWeightCheckVal + realTimeWeightVal > preallocatedWeight * 1.03) {
|
||||
showToast("运抵重量 + 实时重量不能超过预配重量的3%")
|
||||
return
|
||||
}
|
||||
|
||||
// 从编辑字段获取数值
|
||||
val arriveWeightVal = arriveWeight.value?.toDoubleOrNull() ?: bean.arriveWeight
|
||||
val arriveVolumeVal = arriveVolume.value?.toDoubleOrNull() ?: bean.arriveVolume
|
||||
|
||||
@@ -449,7 +449,7 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
||||
assembleInfoList.value = mutableListOf()
|
||||
}
|
||||
} else {
|
||||
showToast("未查询到该ULD信息")
|
||||
showToast("ULD 编号未维护,请先进行维护!")
|
||||
}
|
||||
}
|
||||
onFailed = { code, message ->
|
||||
|
||||
@@ -62,8 +62,8 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
|
||||
// 初始化清仓综合结果列表(根据实际需求配置)
|
||||
clearResultList.value = listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("正常", "0"),
|
||||
KeyValue("异常", "1")
|
||||
KeyValue("正常", "1"),
|
||||
KeyValue("异常", "0")
|
||||
)
|
||||
|
||||
}
|
||||
@@ -306,7 +306,8 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
|
||||
"fdate" to flightDate.value?.ifEmpty { null },
|
||||
"fno" to flightNo.value?.ifEmpty { null },
|
||||
"wbNo" to wbNo.value?.ifEmpty { null },
|
||||
"location" to location.value?.ifEmpty { null }
|
||||
"location" to location.value?.ifEmpty { null },
|
||||
"clearNormal" to clearResult.value?.ifEmpty { null }
|
||||
)
|
||||
|
||||
// 列表参数 (含分页)
|
||||
|
||||
5
module_gjc/src/main/res/drawable/bg_red_dot.xml
Normal file
5
module_gjc/src/main/res/drawable/bg_red_dot.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#F44336" />
|
||||
</shape>
|
||||
@@ -1,187 +1,237 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.gjc.viewModel.GjcQueryViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<!-- 搜索区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 航班日期起 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择开始日期"}'
|
||||
icon="@{@drawable/img_date}"
|
||||
type="@{SearchLayoutType.DATE}"
|
||||
value="@={viewModel.flightDateStart}" />
|
||||
|
||||
<!-- 航班日期止 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择结束日期"}'
|
||||
icon="@{@drawable/img_date}"
|
||||
type="@{SearchLayoutType.DATE}"
|
||||
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
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择出库状态"}'
|
||||
list="@{viewModel.outStatusList}"
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
value="@={viewModel.outStatus}" />
|
||||
|
||||
<!-- 运单号 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入运单号"}'
|
||||
icon="@{@drawable/img_scan}"
|
||||
setOnIconClickListener="@{()-> viewModel.waybillScanClick()}"
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.waybillNo}"
|
||||
autoQueryEnabled="@{true}"
|
||||
autoQueryUrl="@{`/IntExpSearch/queryWbNoList`}"
|
||||
autoQueryParamKey="@{`wbNo`}"
|
||||
autoQueryMinLength="@{4}"
|
||||
autoQueryMaxLength="@{8}"
|
||||
autoQueryTitle="@{`选择运单号`}" />
|
||||
|
||||
<!-- 搜索和筛选按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|start"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="24dp">
|
||||
|
||||
<!-- 搜索按钮 -->
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:onClick="@{()-> viewModel.searchClick()}"
|
||||
android:padding="2dp"
|
||||
android:src="@drawable/img_search" />
|
||||
|
||||
<!-- 筛选按钮 -->
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:onClick="@{()-> viewModel.filterClick()}"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/img_filter" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 列表区域 -->
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/srl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
itemLayoutId="@{viewModel.itemLayoutId}"
|
||||
viewHolder="@{viewModel.itemViewHolder}"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_gjc_query" />
|
||||
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
<!-- 底部统计信息 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/white"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
<!-- 统计信息 -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{`合计:` + viewModel.totalCount + `票`}'
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="合计:3票" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text='@{`总件数:` + viewModel.totalPc}'
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="总件数:100" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text='@{`总重量:` + viewModel.totalWeight}'
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="总重量:100" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View" />
|
||||
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.gjc.viewModel.GjcQueryViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 标题栏(始终在最上层,不被遮挡) -->
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<!-- 内容区域(FrameLayout 包裹,筛选面板和遮罩只在此区域内) -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<!-- 原有内容 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 搜索区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 航班日期起 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择开始日期"}'
|
||||
icon="@{@drawable/img_date}"
|
||||
type="@{SearchLayoutType.DATE}"
|
||||
value="@={viewModel.flightDateStart}" />
|
||||
|
||||
<!-- 航班日期止 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择结束日期"}'
|
||||
icon="@{@drawable/img_date}"
|
||||
type="@{SearchLayoutType.DATE}"
|
||||
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
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择出库状态"}'
|
||||
list="@{viewModel.outStatusList}"
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
value="@={viewModel.outStatus}" />
|
||||
|
||||
<!-- 运单号 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入运单号"}'
|
||||
icon="@{@drawable/img_scan}"
|
||||
setOnIconClickListener="@{()-> viewModel.waybillScanClick()}"
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.waybillNo}"
|
||||
autoQueryEnabled="@{true}"
|
||||
autoQueryUrl="@{`/IntExpSearch/queryWbNoList`}"
|
||||
autoQueryParamKey="@{`wbNo`}"
|
||||
autoQueryMinLength="@{4}"
|
||||
autoQueryMaxLength="@{8}"
|
||||
autoQueryTitle="@{`选择运单号`}" />
|
||||
|
||||
<!-- 搜索和筛选按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical|start"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="24dp">
|
||||
|
||||
<!-- 搜索按钮 -->
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:onClick="@{()-> viewModel.searchClick()}"
|
||||
android:padding="2dp"
|
||||
android:src="@drawable/img_search" />
|
||||
|
||||
<!-- 筛选按钮(含红点) -->
|
||||
<FrameLayout
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginLeft="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="@{()-> viewModel.filterClick()}"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/img_filter" />
|
||||
|
||||
<View
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_gravity="top|end"
|
||||
android:background="@drawable/bg_red_dot"
|
||||
android:visibility="@{viewModel.hasFilter ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 列表区域 -->
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/srl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
itemLayoutId="@{viewModel.itemLayoutId}"
|
||||
viewHolder="@{viewModel.itemViewHolder}"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_gjc_query" />
|
||||
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
<!-- 底部统计信息 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/white"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
<!-- 统计信息 -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{`合计:` + viewModel.totalCount + `票`}'
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="合计:3票" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text='@{`总件数:` + viewModel.totalPc}'
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="总件数:100" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text='@{`总重量:` + viewModel.totalWeight}'
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="总重量:100" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 遮罩层(只覆盖内容区域) -->
|
||||
<View
|
||||
android:id="@+id/filter_overlay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#80000000"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:onClick="@{()-> viewModel.closeFilter()}"
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- 筛选面板(从右侧滑入,只在内容区域内) -->
|
||||
<include
|
||||
android:id="@+id/filter_panel"
|
||||
layout="@layout/layout_gjc_query_filter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="end"
|
||||
android:visibility="gone"
|
||||
app:viewModel="@{viewModel}" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
||||
@@ -322,6 +322,7 @@
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请输入运抵件数"}'
|
||||
required="@{true}"
|
||||
title='@{"运抵件数"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
@@ -332,6 +333,7 @@
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请输入运抵重量"}'
|
||||
required="@{true}"
|
||||
title='@{"运抵重量"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
|
||||
@@ -1,158 +1,171 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
|
||||
|
||||
<variable
|
||||
name="model"
|
||||
type="com.lukouguoji.gjc.dialog.GjcQueryFilterDialogModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 状态栏占位 -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="25dp"
|
||||
android:background="@color/white" />
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"/>
|
||||
|
||||
<!-- 筛选条件区域 -->
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:padding="15dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 特码 -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请输入特码"}'
|
||||
title='@{"特码"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={model.spCode}'
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp" />
|
||||
|
||||
<!-- 航班号 -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请输入航班号"}'
|
||||
title='@{"航班号"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={model.flightNo}'
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp" />
|
||||
|
||||
<!-- 目的港 -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请输入目的港"}'
|
||||
title='@{"目的港"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={model.dest}'
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp" />
|
||||
|
||||
<!-- 运单类型 -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请选择运单类型"}'
|
||||
list="@{model.awbTypeList}"
|
||||
title='@{"运单类型"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={model.awbType}'
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp" />
|
||||
|
||||
<!-- 业务类型 -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请选择业务类型"}'
|
||||
list="@{model.businessTypeList}"
|
||||
title='@{"业务类型"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={model.businessType}'
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp" />
|
||||
|
||||
<!-- 品名(中) -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请输入品名"}'
|
||||
title='@{"品名(中)"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={model.goodsCn}'
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp" />
|
||||
|
||||
<!-- 底部按钮区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="32dp"
|
||||
android:background="@color/white"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
<!-- 重置按钮 -->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_primary_radius_4"
|
||||
android:gravity="center"
|
||||
android:onClick="@{()-> model.onResetClick()}"
|
||||
android:text="重置"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<!-- 搜索按钮 -->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_primary_radius_4"
|
||||
android:gravity="center"
|
||||
android:onClick="@{()-> model.onConfirmClick()}"
|
||||
android:text="搜索"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</ScrollView>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.gjc.viewModel.GjcQueryViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:elevation="8dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 筛选标题栏 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:onClick="@{()-> viewModel.closeFilter()}"
|
||||
android:src="@mipmap/left_icon"
|
||||
android:tint="#666666" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="筛选条件"
|
||||
android:textColor="#666666"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp" />
|
||||
|
||||
<!-- 筛选条件区域 -->
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:padding="15dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 特码 -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
hint='@{"请输入特码"}'
|
||||
title='@{"特码"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.spCode}' />
|
||||
|
||||
<!-- 航班号 -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:id="@+id/filter_flight_no"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
hint='@{"请输入航班号"}'
|
||||
title='@{"航班号"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.flightNo}' />
|
||||
|
||||
<!-- 目的港 -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:id="@+id/filter_dest"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
hint='@{"请输入目的港"}'
|
||||
title='@{"目的港"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.dest}' />
|
||||
|
||||
<!-- 运单类型 -->
|
||||
<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.awbTypeList}"
|
||||
title='@{"运单类型"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.awbType}' />
|
||||
|
||||
<!-- 业务类型 -->
|
||||
<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.businessTypeList}"
|
||||
title='@{"业务类型"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.businessType}' />
|
||||
|
||||
<!-- 品名(中) -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="10dp"
|
||||
hint='@{"请输入品名"}'
|
||||
title='@{"品名(中)"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.goodsCn}' />
|
||||
|
||||
<!-- 底部按钮区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="32dp"
|
||||
android:background="@color/white"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginRight="24dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_primary_radius_4"
|
||||
android:gravity="center"
|
||||
android:onClick="@{()-> viewModel.resetFilter()}"
|
||||
android:text="重置"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_primary_radius_4"
|
||||
android:gravity="center"
|
||||
android:onClick="@{()-> viewModel.confirmFilter()}"
|
||||
android:text="搜索"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
@@ -368,7 +368,6 @@ class GjjManifestAddViewModel : BaseViewModel() {
|
||||
|| actualNum.value.verifyNullOrEmpty("请输入实到件数")
|
||||
|| actualWeight.value.verifyNullOrEmpty("请输入实到重量")
|
||||
|| billingWeight.value.verifyNullOrEmpty("请输入计费重量")
|
||||
|| goodsNameCn.value.verifyNullOrEmpty("请输入品名(中)")
|
||||
|| goodsNameEn.value.verifyNullOrEmpty("请输入品名(英)")
|
||||
|| waybillType.value.verifyNullOrEmpty("请选择运单类型")
|
||||
|| businessType.value.verifyNullOrEmpty("请选择业务类型")
|
||||
|
||||
@@ -34,7 +34,7 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
||||
val paymentDateEnd = MutableLiveData("") // 缴费日期止
|
||||
val agentCode = MutableLiveData("") // 代理人
|
||||
val wbNo = MutableLiveData("") // 运单号
|
||||
val pickUpNo = MutableLiveData("") // 提货单号
|
||||
val spCode = MutableLiveData("") // 特码
|
||||
|
||||
// ========== 下拉列表数据源 ==========
|
||||
val agentList = MutableLiveData(listOf(KeyValue("全部", "")))
|
||||
@@ -90,9 +90,9 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫码提货单号
|
||||
* 扫码特码
|
||||
*/
|
||||
fun scanPickUpNo() {
|
||||
fun scanSpCode() {
|
||||
ScanModel.startScan(getTopActivity(), Constant.RequestCode.gnj_chu_ku_list)
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
||||
"endDate" to paymentDateEnd.value?.ifEmpty { null },
|
||||
"agentCode" to agentCode.value?.ifEmpty { null },
|
||||
"no" to wbNo.value?.ifEmpty { null },
|
||||
"pkId" to pickUpNo.value?.ifEmpty { null }
|
||||
"spCode" to spCode.value?.ifEmpty { null }
|
||||
)
|
||||
|
||||
val listParams = (filterParams + mapOf(
|
||||
@@ -182,7 +182,7 @@ class IntImpPickUpDLVViewModel : BasePageViewModel() {
|
||||
refresh()
|
||||
}
|
||||
Constant.RequestCode.gnj_chu_ku_list -> {
|
||||
pickUpNo.value = data.getStringExtra(Constant.Result.CODED_CONTENT)
|
||||
spCode.value = data.getStringExtra(Constant.Result.CODED_CONTENT)
|
||||
refresh()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,8 +57,8 @@ class IntImpStorageUseViewModel : BasePageViewModel() {
|
||||
init {
|
||||
clearResultList.value = listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("正常", "0"),
|
||||
KeyValue("异常", "1")
|
||||
KeyValue("正常", "1"),
|
||||
KeyValue("异常", "0")
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
hint='@{"请输入品名(中)"}'
|
||||
required="@{true}"
|
||||
required="@{false}"
|
||||
title='@{"品名(中)"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
|
||||
@@ -76,13 +76,13 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<!-- 提货单号 -->
|
||||
<!-- 特码 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请输入提货单号"}'
|
||||
hint='@{"请输入特码"}'
|
||||
icon="@{@drawable/img_scan}"
|
||||
setOnIconClickListener="@{(v)-> viewModel.scanPickUpNo()}"
|
||||
setOnIconClickListener="@{(v)-> viewModel.scanSpCode()}"
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.pickUpNo}"
|
||||
value="@={viewModel.spCode}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
@@ -160,13 +160,13 @@
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 第二行:提货单号、库位、提取时间、品名(中) -->
|
||||
<!-- 第二行:特码、库位、办理时间、品名(中) -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<!-- 提货单号 -->
|
||||
<!-- 特码 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -177,13 +177,13 @@
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="提货单号:"
|
||||
android:text="特码:"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.pkId}"
|
||||
android:text="@{bean.spCode}"
|
||||
android:textSize="15sp" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
@@ -210,7 +210,7 @@
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 提取时间 -->
|
||||
<!-- 办理时间 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -221,7 +221,7 @@
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="提取时间:"
|
||||
android:text="办理时间:"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<TextView
|
||||
|
||||
Reference in New Issue
Block a user