Compare commits
12 Commits
d6f72186a3
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 0ae77ffbf8 | |||
| 78238907b0 | |||
| 5e1ccc9e8a | |||
| 89d4812d9f | |||
| 8af644288d | |||
| 9363717224 | |||
| df5fa2ea74 | |||
| 3c413833cf | |||
| 072df758db | |||
| 6c4e97945b | |||
| a663609eeb | |||
| 74e9f5a827 |
@@ -97,7 +97,13 @@
|
|||||||
"Read(//usr/local/**)",
|
"Read(//usr/local/**)",
|
||||||
"Read(//opt/homebrew/opt/**)",
|
"Read(//opt/homebrew/opt/**)",
|
||||||
"Bash(/Users/kid/.vfox/sdks/java/bin/java -version 2>&1)",
|
"Bash(/Users/kid/.vfox/sdks/java/bin/java -version 2>&1)",
|
||||||
"Bash(export JAVA_HOME=/Users/kid/.vfox/sdks/java)"
|
"Bash(export JAVA_HOME=/Users/kid/.vfox/sdks/java)",
|
||||||
|
"mcp__apifox__read_project_oas_kcl8s7",
|
||||||
|
"mcp__apifox__refresh_project_oas_kcl8s7",
|
||||||
|
"mcp__apifox__read_project_oas_ref_resources_kcl8s7",
|
||||||
|
"mcp__apifox__read_project_oas_x3v6fh",
|
||||||
|
"mcp__apifox__read_project_oas_ref_resources_x3v6fh",
|
||||||
|
"mcp__plugin_claude-mem_mcp-search__smart_outline"
|
||||||
],
|
],
|
||||||
"deny": [],
|
"deny": [],
|
||||||
"ask": []
|
"ask": []
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
/Users/kid/.vfox/cache/java/v-17+35-amzn/java-17+35-amzn
|
/Users/kid/.version-fox/cache/java/v-17+35-amzn/java-17+35-amzn
|
||||||
19
CLAUDE.md
19
CLAUDE.md
@@ -383,6 +383,25 @@ fun toggleAllExpand() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
4. **子列表项 checkbox 样式**(必须使用 `_style` 系列,禁止使用 `_gray` 系列):
|
||||||
|
```xml
|
||||||
|
<!-- 子列表项 item_xxx_sub.xml 中的 iv_checkbox -->
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_checkbox"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_style : @drawable/radiobtn_unchecked_style}"
|
||||||
|
android:src="@drawable/radiobtn_unchecked_style" />
|
||||||
|
```
|
||||||
|
|
||||||
|
| 资源 | 含义 | 外观 |
|
||||||
|
|------|------|------|
|
||||||
|
| `radiobtn_checked_style` | 选中 | colorPrimary 蓝色实心圆 + 白色内环 |
|
||||||
|
| `radiobtn_unchecked_style` | 未选中 | 透明 + 黑色边框圆 |
|
||||||
|
| ~~`radiobtn_checked_gray`~~ | ❌ 禁用 | 灰色实心圆(错误样式) |
|
||||||
|
|
||||||
**参考文件**: `module_gjc/.../IntExpStorageUseActivity.kt`、`IntExpStorageUseViewModel.kt`
|
**参考文件**: `module_gjc/.../IntExpStorageUseActivity.kt`、`IntExpStorageUseViewModel.kt`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -11,8 +11,5 @@ class LogQueryViewHolder(view: View) : BaseViewHolder<LogBean, ItemLogQueryBindi
|
|||||||
override fun onBind(item: Any?, position: Int) {
|
override fun onBind(item: Any?, position: Int) {
|
||||||
val bean = getItemBean(item)
|
val bean = getItemBean(item)
|
||||||
binding.bean = bean
|
binding.bean = bean
|
||||||
itemView.setOnClickListener {
|
|
||||||
bean?.let { LogDetailActivity.start(itemView.context, it) }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -825,16 +825,16 @@ class HomeFragment : Fragment() {
|
|||||||
)
|
)
|
||||||
list.add(
|
list.add(
|
||||||
RightMenu(
|
RightMenu(
|
||||||
Constant.AuthName.IntArrAirManifest,
|
Constant.AuthName.IntImpManifest,
|
||||||
R.mipmap.img_bwjx,
|
R.mipmap.img_bwjx,
|
||||||
"原始舱单"
|
"进港舱单"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
list.add(
|
list.add(
|
||||||
RightMenu(
|
RightMenu(
|
||||||
Constant.AuthName.IntImpManifest,
|
Constant.AuthName.IntArrAirManifest,
|
||||||
R.mipmap.img_bwjx,
|
R.mipmap.img_bwjx,
|
||||||
"进港舱单"
|
"原始舱单"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
list.add(
|
list.add(
|
||||||
@@ -970,13 +970,6 @@ class HomeFragment : Fragment() {
|
|||||||
"ULD管理"
|
"ULD管理"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
list.add(
|
|
||||||
RightMenu(
|
|
||||||
Constant.AuthName.ComprehensiveColdStorage,
|
|
||||||
com.lukouguoji.module_base.R.mipmap.gnc_cangku,
|
|
||||||
"冷库登记"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ data class GjcMaWb(
|
|||||||
|
|
||||||
// ==================== 操作信息 ====================
|
// ==================== 操作信息 ====================
|
||||||
var opDate: String? = null, // 操作时间(入库时间)
|
var opDate: String? = null, // 操作时间(入库时间)
|
||||||
|
var inDate: String? = null, // 入库时间
|
||||||
var opId: String? = null, // 操作员id
|
var opId: String? = null, // 操作员id
|
||||||
var paperTime: Date? = null, // 单证时间
|
var paperTime: Date? = null, // 单证时间
|
||||||
|
|
||||||
|
|||||||
@@ -302,6 +302,12 @@ interface Api {
|
|||||||
@POST("typeCode/countryType")
|
@POST("typeCode/countryType")
|
||||||
suspend fun getAreaTypeList(): DictListBean
|
suspend fun getAreaTypeList(): DictListBean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取国家代码
|
||||||
|
*/
|
||||||
|
@POST("typeCode/countryCode")
|
||||||
|
suspend fun getCountryCodeList(): DictListBean
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取通讯方式类型
|
* 获取通讯方式类型
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ package com.lukouguoji.gjj.activity
|
|||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.text.InputType
|
||||||
import com.lukouguoji.gjj.R
|
import com.lukouguoji.gjj.R
|
||||||
import com.lukouguoji.gjj.databinding.ActivityGjjManifestAddBinding
|
import com.lukouguoji.gjj.databinding.ActivityGjjManifestAddBinding
|
||||||
import com.lukouguoji.gjj.viewModel.GjjManifestAddViewModel
|
import com.lukouguoji.gjj.viewModel.GjjManifestAddViewModel
|
||||||
@@ -23,6 +23,14 @@ class GjjManifestAddActivity :
|
|||||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
binding.flightNoInput.et.setUpperCaseAlphanumericFilter()
|
binding.flightNoInput.et.setUpperCaseAlphanumericFilter()
|
||||||
|
|
||||||
|
// 件数只允许输入整数
|
||||||
|
binding.waybillNumInput.inputType = InputType.TYPE_CLASS_NUMBER
|
||||||
|
binding.actualNumInput.inputType = InputType.TYPE_CLASS_NUMBER
|
||||||
|
// 重量允许输入小数
|
||||||
|
binding.actualWeightInput.inputType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL
|
||||||
|
binding.billingWeightInput.inputType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL
|
||||||
|
|
||||||
viewModel.initOnCreated(intent)
|
viewModel.initOnCreated(intent)
|
||||||
|
|
||||||
// 动态设置标题(必须在 initOnCreated 之后,pageType 已从 Intent 解析)
|
// 动态设置标题(必须在 initOnCreated 之后,pageType 已从 Intent 解析)
|
||||||
@@ -38,12 +46,21 @@ class GjjManifestAddActivity :
|
|||||||
* 新增舱单
|
* 新增舱单
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun start(context: Context, fid: String = "", dep: String, dest: String) {
|
fun start(
|
||||||
|
context: Context,
|
||||||
|
fid: String = "",
|
||||||
|
dep: String,
|
||||||
|
dest: String,
|
||||||
|
flightDate: String = "",
|
||||||
|
flightNo: String = ""
|
||||||
|
) {
|
||||||
val starter = Intent(context, GjjManifestAddActivity::class.java)
|
val starter = Intent(context, GjjManifestAddActivity::class.java)
|
||||||
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Add.name)
|
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Add.name)
|
||||||
.putExtra(Constant.Key.ID, fid)
|
.putExtra(Constant.Key.ID, fid)
|
||||||
.putExtra(Constant.Key.DEPARTURE, dep)
|
.putExtra(Constant.Key.DEPARTURE, dep)
|
||||||
.putExtra(Constant.Key.DESTINATION, dest)
|
.putExtra(Constant.Key.DESTINATION, dest)
|
||||||
|
.putExtra("flightDate", flightDate)
|
||||||
|
.putExtra("flightNo", flightNo)
|
||||||
context.startActivity(starter)
|
context.startActivity(starter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,15 +31,28 @@ class IntImpManifestSubEditActivity :
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
const val KEY_MAIN_PC = "mainPc"
|
||||||
|
const val KEY_MAIN_WEIGHT = "mainWeight"
|
||||||
|
const val KEY_OTHER_SUB_PC = "otherSubPc"
|
||||||
|
const val KEY_OTHER_SUB_WEIGHT = "otherSubWeight"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增分单
|
* 新增分单
|
||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun startForAdd(context: Context, manifest: GjjManifest) {
|
fun startForAdd(context: Context, manifest: GjjManifest) {
|
||||||
|
// 新增模式:其他分单之和 = 所有已有分单之和
|
||||||
|
val otherSubPc = manifest.haWbList?.sumOf { it.pc } ?: 0L
|
||||||
|
val otherSubWeight = manifest.haWbList?.sumOf { it.weight } ?: 0.0
|
||||||
|
|
||||||
context.startActivity(
|
context.startActivity(
|
||||||
Intent(context, IntImpManifestSubEditActivity::class.java)
|
Intent(context, IntImpManifestSubEditActivity::class.java)
|
||||||
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Add.name)
|
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Add.name)
|
||||||
.putExtra(Constant.Key.BEAN, manifest)
|
.putExtra(Constant.Key.BEAN, manifest)
|
||||||
|
.putExtra(KEY_MAIN_PC, manifest.pc)
|
||||||
|
.putExtra(KEY_MAIN_WEIGHT, manifest.weight)
|
||||||
|
.putExtra(KEY_OTHER_SUB_PC, otherSubPc)
|
||||||
|
.putExtra(KEY_OTHER_SUB_WEIGHT, otherSubWeight)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,11 +61,19 @@ class IntImpManifestSubEditActivity :
|
|||||||
*/
|
*/
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun startForModify(context: Context, manifest: GjjManifest, haWb: GjjHaWb) {
|
fun startForModify(context: Context, manifest: GjjManifest, haWb: GjjHaWb) {
|
||||||
|
// 修改模式:其他分单之和 = 所有分单之和 - 当前编辑的分单
|
||||||
|
val otherSubPc = (manifest.haWbList?.sumOf { it.pc } ?: 0L) - haWb.pc
|
||||||
|
val otherSubWeight = (manifest.haWbList?.sumOf { it.weight } ?: 0.0) - haWb.weight
|
||||||
|
|
||||||
context.startActivity(
|
context.startActivity(
|
||||||
Intent(context, IntImpManifestSubEditActivity::class.java)
|
Intent(context, IntImpManifestSubEditActivity::class.java)
|
||||||
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Modify.name)
|
.putExtra(Constant.Key.PAGE_TYPE, DetailsPageType.Modify.name)
|
||||||
.putExtra(Constant.Key.BEAN, manifest)
|
.putExtra(Constant.Key.BEAN, manifest)
|
||||||
.putExtra("haWb", haWb)
|
.putExtra("haWb", haWb)
|
||||||
|
.putExtra(KEY_MAIN_PC, manifest.pc)
|
||||||
|
.putExtra(KEY_MAIN_WEIGHT, manifest.weight)
|
||||||
|
.putExtra(KEY_OTHER_SUB_PC, otherSubPc)
|
||||||
|
.putExtra(KEY_OTHER_SUB_WEIGHT, otherSubWeight)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ package com.lukouguoji.gjj.activity
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
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.alibaba.android.arouter.facade.annotation.Route
|
||||||
import com.lukouguoji.gjj.R
|
import com.lukouguoji.gjj.R
|
||||||
import com.lukouguoji.gjj.databinding.ActivityIntImpQueryBinding
|
import com.lukouguoji.gjj.databinding.ActivityIntImpQueryBinding
|
||||||
@@ -43,10 +46,66 @@ class IntImpQueryActivity :
|
|||||||
|
|
||||||
viewModel.initAgentList()
|
viewModel.initAgentList()
|
||||||
viewModel.initSpecialCodeList()
|
viewModel.initSpecialCodeList()
|
||||||
|
viewModel.initFilterLists()
|
||||||
|
|
||||||
|
// 观察筛选面板显示状态
|
||||||
|
viewModel.filterVisible.observe(this) { visible ->
|
||||||
|
if (visible) showFilterPanel() else hideFilterPanel()
|
||||||
|
}
|
||||||
|
|
||||||
viewModel.refresh()
|
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 {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun start(context: Context) {
|
fun start(context: Context) {
|
||||||
|
|||||||
@@ -110,8 +110,16 @@ class IntImpStorageUseActivity :
|
|||||||
|
|
||||||
val selectedStorage = selectedStorageUseList[0]
|
val selectedStorage = selectedStorageUseList[0]
|
||||||
|
|
||||||
// 弹出库位选择弹框,选择后再调用接口
|
// 已出库的分单不允许修改库位
|
||||||
IntImpModifyStorageDialogModel { dialog ->
|
if (!selectedStorage.outOpId.isNullOrEmpty() || !selectedStorage.outDate.isNullOrEmpty()) {
|
||||||
|
showToast("该分单已出库,不允许修改库位")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 弹出库位选择弹框,选择后再调用接口,传入当前库位ID以预填充
|
||||||
|
IntImpModifyStorageDialogModel(
|
||||||
|
currentLocationId = selectedStorage.locationId?.toString() ?: ""
|
||||||
|
) { dialog ->
|
||||||
val locationName = dialog.locationName
|
val locationName = dialog.locationName
|
||||||
val locationId = dialog.locationId
|
val locationId = dialog.locationId
|
||||||
viewModel.performModifyStorage(locationName, locationId, selectedStorage)
|
viewModel.performModifyStorage(locationName, locationId, selectedStorage)
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import dev.utils.app.info.KeyValue
|
|||||||
* 国际进港 - 修改库位对话框
|
* 国际进港 - 修改库位对话框
|
||||||
*/
|
*/
|
||||||
class IntImpModifyStorageDialogModel(
|
class IntImpModifyStorageDialogModel(
|
||||||
|
private val currentLocationId: String = "",
|
||||||
private val callback: (IntImpModifyStorageDialogModel) -> Unit
|
private val callback: (IntImpModifyStorageDialogModel) -> Unit
|
||||||
) : BaseDialogModel<DialogIntImpModifyStorageBinding>(DIALOG_TYPE_CENTER) {
|
) : BaseDialogModel<DialogIntImpModifyStorageBinding>(DIALOG_TYPE_CENTER) {
|
||||||
|
|
||||||
@@ -54,6 +55,10 @@ class IntImpModifyStorageDialogModel(
|
|||||||
onSuccess = { result ->
|
onSuccess = { result ->
|
||||||
val list = result.data?.map { it.toKeyValue() } ?: emptyList()
|
val list = result.data?.map { it.toKeyValue() } ?: emptyList()
|
||||||
locationList.value = list
|
locationList.value = list
|
||||||
|
// 列表加载完成后,预选当前库位
|
||||||
|
if (currentLocationId.isNotEmpty()) {
|
||||||
|
selectedLocationCode.value = currentLocationId
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onFailed = { _, msg ->
|
onFailed = { _, msg ->
|
||||||
showToast(msg ?: "加载库位列表失败")
|
showToast(msg ?: "加载库位列表失败")
|
||||||
|
|||||||
@@ -1,88 +0,0 @@
|
|||||||
package com.lukouguoji.gjj.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.gjj.R
|
|
||||||
import com.lukouguoji.gjj.databinding.DialogIntImpQueryFilterBinding
|
|
||||||
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 IntImpQueryFilterDialogModel(
|
|
||||||
val spCode: MutableLiveData<String>,
|
|
||||||
val spCodeList: MutableLiveData<List<KeyValue>>,
|
|
||||||
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<DialogIntImpQueryFilterBinding>(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_int_imp_query_filter
|
|
||||||
|
|
||||||
override fun onBuild(builder: XPopup.Builder) {
|
|
||||||
super.onBuild(builder)
|
|
||||||
builder.popupPosition(PopupPosition.Right)
|
|
||||||
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()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -12,6 +12,7 @@ import com.lukouguoji.module_base.common.DetailsPageType
|
|||||||
import com.lukouguoji.module_base.http.net.NetApply
|
import com.lukouguoji.module_base.http.net.NetApply
|
||||||
import com.lukouguoji.module_base.impl.FlowBus
|
import com.lukouguoji.module_base.impl.FlowBus
|
||||||
import com.lukouguoji.module_base.ktx.finish
|
import com.lukouguoji.module_base.ktx.finish
|
||||||
|
import com.lukouguoji.module_base.ktx.formatDate
|
||||||
import com.lukouguoji.module_base.ktx.launchCollect
|
import com.lukouguoji.module_base.ktx.launchCollect
|
||||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||||
import com.lukouguoji.module_base.ktx.noNull
|
import com.lukouguoji.module_base.ktx.noNull
|
||||||
@@ -20,6 +21,7 @@ import com.lukouguoji.module_base.ktx.toRequestBody
|
|||||||
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
|
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
|
||||||
import com.lukouguoji.module_base.util.DictUtils
|
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 kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
class GjjManifestAddViewModel : BaseViewModel() {
|
class GjjManifestAddViewModel : BaseViewModel() {
|
||||||
@@ -33,8 +35,8 @@ class GjjManifestAddViewModel : BaseViewModel() {
|
|||||||
// 航班ID
|
// 航班ID
|
||||||
var fid: String = ""
|
var fid: String = ""
|
||||||
|
|
||||||
// 航班日期
|
// 航班日期(新增模式默认今天)
|
||||||
val flightDate = MutableLiveData("")
|
val flightDate = MutableLiveData(DateUtils.getCurrentTime().formatDate())
|
||||||
|
|
||||||
// 航班号
|
// 航班号
|
||||||
val flightNo = MutableLiveData("")
|
val flightNo = MutableLiveData("")
|
||||||
@@ -173,6 +175,12 @@ class GjjManifestAddViewModel : BaseViewModel() {
|
|||||||
}
|
}
|
||||||
DictUtils.getBusinessTypeList(addAll = false) {
|
DictUtils.getBusinessTypeList(addAll = false) {
|
||||||
businessTypeList.postValue(it)
|
businessTypeList.postValue(it)
|
||||||
|
// 新增模式下默认选中"普通货物运输"
|
||||||
|
if (pageType.value == DetailsPageType.Add && businessType.value.isNullOrEmpty()) {
|
||||||
|
it.find { b -> b.key.contains("普通货物运输") }?.let { b ->
|
||||||
|
businessType.postValue(b.value)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
DictUtils.getShouYunPackageTypeList {
|
DictUtils.getShouYunPackageTypeList {
|
||||||
packageTypeList.postValue(listOf(KeyValue("", "")) + it)
|
packageTypeList.postValue(listOf(KeyValue("", "")) + it)
|
||||||
@@ -204,12 +212,22 @@ class GjjManifestAddViewModel : BaseViewModel() {
|
|||||||
departure.value = intent.getStringExtra(Constant.Key.DEPARTURE).noNull()
|
departure.value = intent.getStringExtra(Constant.Key.DEPARTURE).noNull()
|
||||||
destination.value = intent.getStringExtra(Constant.Key.DESTINATION).noNull()
|
destination.value = intent.getStringExtra(Constant.Key.DESTINATION).noNull()
|
||||||
|
|
||||||
|
// 回填航班日期和航班号(从列表页传入)
|
||||||
|
val passedFlightDate = intent.getStringExtra("flightDate").noNull()
|
||||||
|
val passedFlightNo = intent.getStringExtra("flightNo").noNull()
|
||||||
|
if (passedFlightDate.isNotEmpty()) {
|
||||||
|
flightDate.value = passedFlightDate
|
||||||
|
}
|
||||||
|
if (passedFlightNo.isNotEmpty()) {
|
||||||
|
flightNo.value = passedFlightNo
|
||||||
|
}
|
||||||
|
// 如果航班日期和航班号都有值且已从列表页获得航班信息,标记已查询避免重复请求
|
||||||
|
if (passedFlightDate.isNotEmpty() && passedFlightNo.isNotEmpty() && fid.isNotEmpty()) {
|
||||||
|
lastQueriedFlight = "$passedFlightDate-$passedFlightNo"
|
||||||
|
}
|
||||||
|
|
||||||
// 编辑模式:从Bean对象加载数据
|
// 编辑模式:从Bean对象加载数据
|
||||||
if (pageType.value == DetailsPageType.Modify) {
|
if (pageType.value == DetailsPageType.Modify) {
|
||||||
// 回填航班日期和航班号(Bean中不包含,从列表页传入)
|
|
||||||
flightDate.value = intent.getStringExtra("flightDate").noNull()
|
|
||||||
flightNo.value = intent.getStringExtra("flightNo").noNull()
|
|
||||||
|
|
||||||
val bean = intent.getSerializableExtra(Constant.Key.BEAN)
|
val bean = intent.getSerializableExtra(Constant.Key.BEAN)
|
||||||
if (bean is com.lukouguoji.module_base.bean.GjjManifest) {
|
if (bean is com.lukouguoji.module_base.bean.GjjManifest) {
|
||||||
loadManifestFromBean(bean)
|
loadManifestFromBean(bean)
|
||||||
@@ -273,17 +291,45 @@ class GjjManifestAddViewModel : BaseViewModel() {
|
|||||||
waybillType.value = manifest.awbType
|
waybillType.value = manifest.awbType
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验运单号格式
|
||||||
|
* 规则:纯数字,固定11位,后8位中前7位 mod 7 == 最后一位
|
||||||
|
*/
|
||||||
|
private fun verifyWaybillNo(wbNo: String?): Boolean {
|
||||||
|
if (wbNo.isNullOrEmpty()) return false
|
||||||
|
if (wbNo.length != 11) {
|
||||||
|
showToast("运单号必须为11位数字")
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
if (!wbNo.all { it.isDigit() }) {
|
||||||
|
showToast("运单号必须为纯数字")
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
// 后8位:前7位 mod 7 == 最后一位
|
||||||
|
val last8 = wbNo.substring(3) // 后8位
|
||||||
|
val first7ofLast8 = last8.substring(0, 7).toLong()
|
||||||
|
val lastDigit = last8.last().toString().toInt()
|
||||||
|
if (first7ofLast8 % 7 != lastDigit.toLong()) {
|
||||||
|
showToast("运单号校验位不正确")
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存点击
|
* 保存点击
|
||||||
*/
|
*/
|
||||||
fun onSaveClick(view: View) {
|
fun onSaveClick(view: View) {
|
||||||
if ((waybillNo.value.verifyNullOrEmpty("请输入运单号")
|
if ((waybillNo.value.verifyNullOrEmpty("请输入运单号")
|
||||||
|
|| verifyWaybillNo(waybillNo.value)
|
||||||
|| agent.value.verifyNullOrEmpty("请选择代理")
|
|| agent.value.verifyNullOrEmpty("请选择代理")
|
||||||
|| waybillNum.value.verifyNullOrEmpty("请输入运单件数")
|
|| waybillNum.value.verifyNullOrEmpty("请输入运单件数")
|
||||||
|| actualNum.value.verifyNullOrEmpty("请输入实到数量")
|
|
||||||
|| goodsNameEn.value.verifyNullOrEmpty("请输入品名(英)")
|
|
||||||
|| actualWeight.value.verifyNullOrEmpty("请输入实到重量")
|
|| actualWeight.value.verifyNullOrEmpty("请输入实到重量")
|
||||||
|| packageType.value.verifyNullOrEmpty("请选择包装类型")
|
|| goodsNameEn.value.verifyNullOrEmpty("请输入品名(英)")
|
||||||
|
|| waybillType.value.verifyNullOrEmpty("请选择运单类型")
|
||||||
|
|| businessType.value.verifyNullOrEmpty("请选择业务类型")
|
||||||
|
|| departure.value.verifyNullOrEmpty("请输入始发站")
|
||||||
|
|| destination.value.verifyNullOrEmpty("请输入目的站")
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
return
|
return
|
||||||
@@ -294,7 +340,7 @@ class GjjManifestAddViewModel : BaseViewModel() {
|
|||||||
"fid" to fid,
|
"fid" to fid,
|
||||||
"wbNo" to waybillNo.value,
|
"wbNo" to waybillNo.value,
|
||||||
"agentCode" to agent.value,
|
"agentCode" to agent.value,
|
||||||
"spCode" to specialCode.value,
|
"spCode" to specialCode.value.let { if (it.isNullOrEmpty()) "NOR" else it },
|
||||||
"businessType" to businessType.value,
|
"businessType" to businessType.value,
|
||||||
"totalPc" to waybillNum.value,
|
"totalPc" to waybillNum.value,
|
||||||
"pc" to actualNum.value,
|
"pc" to actualNum.value,
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import com.lukouguoji.module_base.bean.GjjDeclareParam
|
|||||||
import com.lukouguoji.module_base.bean.GjjImportManifest
|
import com.lukouguoji.module_base.bean.GjjImportManifest
|
||||||
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.gjj.dialog.IntImpTallyResetDialogModel
|
||||||
import com.lukouguoji.module_base.http.net.NetApply
|
import com.lukouguoji.module_base.http.net.NetApply
|
||||||
import com.lukouguoji.module_base.impl.FlowBus
|
import com.lukouguoji.module_base.impl.FlowBus
|
||||||
import com.lukouguoji.module_base.ktx.commonAdapter
|
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||||
@@ -134,22 +135,25 @@ class IntArrAirManifestViewModel : BasePageViewModel() {
|
|||||||
fun resetStatusClick() {
|
fun resetStatusClick() {
|
||||||
val (maWbList, haWbList) = getSelectedItems("请选择要重置的舱单") ?: return
|
val (maWbList, haWbList) = getSelectedItems("请选择要重置的舱单") ?: return
|
||||||
|
|
||||||
val param = GjjDeclareParam(
|
val dialog = IntImpTallyResetDialogModel { dialogModel ->
|
||||||
maWbList = maWbList,
|
val param = GjjDeclareParam(
|
||||||
haWbList = haWbList,
|
maWbList = maWbList,
|
||||||
restStatus = null,
|
haWbList = haWbList,
|
||||||
resetReason = "状态重置"
|
restStatus = dialogModel.resetStatusCode
|
||||||
)
|
)
|
||||||
|
|
||||||
launchLoadingCollect({ NetApply.api.resetIntArrManifestStatus(param.toRequestBody()) }) {
|
launchLoadingCollect({ NetApply.api.resetIntArrManifestStatus(param.toRequestBody()) }) {
|
||||||
onSuccess = {
|
onSuccess = {
|
||||||
showToast("状态重置成功")
|
showToast("状态重置成功")
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||||
|
}
|
||||||
|
refresh()
|
||||||
}
|
}
|
||||||
refresh()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dialog.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import com.lukouguoji.module_base.ktx.launchCollect
|
|||||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||||
import com.lukouguoji.module_base.ktx.showToast
|
import com.lukouguoji.module_base.ktx.showToast
|
||||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||||
|
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
|
||||||
import dev.utils.app.info.KeyValue
|
import dev.utils.app.info.KeyValue
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
@@ -56,7 +57,7 @@ class IntArrSupplementInfoViewModel : BaseViewModel() {
|
|||||||
* 加载国家代码下拉列表
|
* 加载国家代码下拉列表
|
||||||
*/
|
*/
|
||||||
private fun loadCountryCodeList() {
|
private fun loadCountryCodeList() {
|
||||||
launchCollect({ NetApply.api.getAreaTypeList() }) {
|
launchCollect({ NetApply.api.getCountryCodeList() }) {
|
||||||
onSuccess = { result ->
|
onSuccess = { result ->
|
||||||
val keyValueList = result.data?.mapNotNull { bean ->
|
val keyValueList = result.data?.mapNotNull { bean ->
|
||||||
if (bean.code != null && bean.name != null) {
|
if (bean.code != null && bean.name != null) {
|
||||||
@@ -96,6 +97,17 @@ class IntArrSupplementInfoViewModel : BaseViewModel() {
|
|||||||
fun save() {
|
fun save() {
|
||||||
val formBean = dataBean.value ?: return
|
val formBean = dataBean.value ?: return
|
||||||
|
|
||||||
|
// 收货人必填校验
|
||||||
|
if (formBean.consigneeName.verifyNullOrEmpty("收货人名称不能为空")) return
|
||||||
|
if (formBean.consigneeCountryCode.verifyNullOrEmpty("收货人国家代码不能为空")) return
|
||||||
|
if (formBean.consigneeComType.verifyNullOrEmpty("收货人通讯方式不能为空")) return
|
||||||
|
if (formBean.consigneePNum.verifyNullOrEmpty("收货人联系号码不能为空")) return
|
||||||
|
// 发货人必填校验
|
||||||
|
if (formBean.consignorName.verifyNullOrEmpty("发货人名称不能为空")) return
|
||||||
|
if (formBean.consignorCountryCode.verifyNullOrEmpty("发货人国家代码不能为空")) return
|
||||||
|
if (formBean.consignorComType.verifyNullOrEmpty("发货人通讯方式不能为空")) return
|
||||||
|
if (formBean.consignorPNum.verifyNullOrEmpty("发货人联系号码不能为空")) return
|
||||||
|
|
||||||
if (manifestList.isEmpty()) {
|
if (manifestList.isEmpty()) {
|
||||||
showToast("无可保存的数据")
|
showToast("无可保存的数据")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package com.lukouguoji.gjj.viewModel
|
|||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
|
import com.lukouguoji.gjj.activity.IntImpManifestSubEditActivity
|
||||||
import com.lukouguoji.module_base.base.BaseViewModel
|
import com.lukouguoji.module_base.base.BaseViewModel
|
||||||
import com.lukouguoji.module_base.bean.GjjHaWb
|
import com.lukouguoji.module_base.bean.GjjHaWb
|
||||||
import com.lukouguoji.module_base.bean.GjjManifest
|
import com.lukouguoji.module_base.bean.GjjManifest
|
||||||
@@ -11,7 +12,6 @@ import com.lukouguoji.module_base.common.ConstantEvent
|
|||||||
import com.lukouguoji.module_base.common.DetailsPageType
|
import com.lukouguoji.module_base.common.DetailsPageType
|
||||||
import com.lukouguoji.module_base.http.net.NetApply
|
import com.lukouguoji.module_base.http.net.NetApply
|
||||||
import com.lukouguoji.module_base.impl.FlowBus
|
import com.lukouguoji.module_base.impl.FlowBus
|
||||||
import com.lukouguoji.module_base.ktx.launchCollect
|
|
||||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||||
import com.lukouguoji.module_base.ktx.noNull
|
import com.lukouguoji.module_base.ktx.noNull
|
||||||
import com.lukouguoji.module_base.ktx.showToast
|
import com.lukouguoji.module_base.ktx.showToast
|
||||||
@@ -44,6 +44,17 @@ class IntImpManifestSubEditViewModel : BaseViewModel() {
|
|||||||
val weight = MutableLiveData("") // 重量
|
val weight = MutableLiveData("") // 重量
|
||||||
val goodsCn = MutableLiveData("") // 品名(中)
|
val goodsCn = MutableLiveData("") // 品名(中)
|
||||||
|
|
||||||
|
// 主单件数/重量
|
||||||
|
private var mainPc: Long = 0
|
||||||
|
private var mainWeight: Double = 0.0
|
||||||
|
|
||||||
|
// 其他分单件数/重量之和(不含当前编辑的分单)
|
||||||
|
private var otherSubPc: Long = 0
|
||||||
|
private var otherSubWeight: Double = 0.0
|
||||||
|
|
||||||
|
// 主分校验是否通过(true=绿色允许保存,false=红色不允许保存)
|
||||||
|
val isCheckValid = MutableLiveData(true)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化(从Intent获取参数)
|
* 初始化(从Intent获取参数)
|
||||||
*/
|
*/
|
||||||
@@ -61,6 +72,12 @@ class IntImpManifestSubEditViewModel : BaseViewModel() {
|
|||||||
waybillNo.value = manifest.getWaybillNo()
|
waybillNo.value = manifest.getWaybillNo()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取主分校验参数
|
||||||
|
mainPc = intent.getLongExtra(IntImpManifestSubEditActivity.KEY_MAIN_PC, 0)
|
||||||
|
mainWeight = intent.getDoubleExtra(IntImpManifestSubEditActivity.KEY_MAIN_WEIGHT, 0.0)
|
||||||
|
otherSubPc = intent.getLongExtra(IntImpManifestSubEditActivity.KEY_OTHER_SUB_PC, 0)
|
||||||
|
otherSubWeight = intent.getDoubleExtra(IntImpManifestSubEditActivity.KEY_OTHER_SUB_WEIGHT, 0.0)
|
||||||
|
|
||||||
// 编辑模式:回填分单数据
|
// 编辑模式:回填分单数据
|
||||||
if (pageType.value == DetailsPageType.Modify) {
|
if (pageType.value == DetailsPageType.Modify) {
|
||||||
val haWb = intent.getSerializableExtra("haWb") as? GjjHaWb
|
val haWb = intent.getSerializableExtra("haWb") as? GjjHaWb
|
||||||
@@ -69,28 +86,54 @@ class IntImpManifestSubEditViewModel : BaseViewModel() {
|
|||||||
subNo.value = haWb.hno
|
subNo.value = haWb.hno
|
||||||
pc.value = if (haWb.pc > 0) haWb.pc.toString() else ""
|
pc.value = if (haWb.pc > 0) haWb.pc.toString() else ""
|
||||||
weight.value = if (haWb.weight > 0) haWb.weight.toString() else ""
|
weight.value = if (haWb.weight > 0) haWb.weight.toString() else ""
|
||||||
goodsCn.value = haWb.goodsCn
|
goodsCn.value = haWb.goodsCn.ifEmpty { haWb.goods }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取主分校验数据
|
// 计算主分校验
|
||||||
loadMainSubCheck()
|
updateMainSubCheck()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取主单减去分单的件数重量
|
* 件数输入完成回调
|
||||||
*/
|
*/
|
||||||
private fun loadMainSubCheck() {
|
fun onPcInputComplete() {
|
||||||
if (mfId == 0L) return
|
updateMainSubCheck()
|
||||||
|
}
|
||||||
|
|
||||||
val params = mapOf("mfId" to mfId).toRequestBody()
|
/**
|
||||||
launchCollect({ NetApply.api.getMaWbMinusHaWb(params) }) {
|
* 重量输入完成回调
|
||||||
onSuccess = { result ->
|
*/
|
||||||
if (result.verifySuccess() && result.data != null) {
|
fun onWeightInputComplete() {
|
||||||
val data = result.data!!
|
updateMainSubCheck()
|
||||||
mainSubCheck.value = "剩余件数:${data.pc} 剩余重量:${data.weight}"
|
}
|
||||||
}
|
|
||||||
}
|
/**
|
||||||
|
* 实时计算主分校验
|
||||||
|
* 格式:分单之和件数/主单件数 分单之和重量/主单重量KG
|
||||||
|
* 颜色:分单之和 > 主单 → 红色(不允许保存),否则 → 绿色
|
||||||
|
*/
|
||||||
|
private fun updateMainSubCheck() {
|
||||||
|
val currentPc = pc.value?.toLongOrNull() ?: 0
|
||||||
|
val currentWeight = weight.value?.toDoubleOrNull() ?: 0.0
|
||||||
|
|
||||||
|
val totalSubPc = otherSubPc + currentPc
|
||||||
|
val totalSubWeight = otherSubWeight + currentWeight
|
||||||
|
|
||||||
|
mainSubCheck.value = "${totalSubPc}/${mainPc} ${formatWeight(totalSubWeight)}/${formatWeight(mainWeight)}KG"
|
||||||
|
|
||||||
|
// 件数或重量任一超过主单则校验不通过
|
||||||
|
isCheckValid.value = totalSubPc <= mainPc && totalSubWeight <= mainWeight
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 格式化重量显示(整数不显示小数位)
|
||||||
|
*/
|
||||||
|
private fun formatWeight(value: Double): String {
|
||||||
|
return if (value % 1.0 == 0.0) {
|
||||||
|
value.toLong().toString()
|
||||||
|
} else {
|
||||||
|
value.toString()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,6 +141,12 @@ class IntImpManifestSubEditViewModel : BaseViewModel() {
|
|||||||
* 保存
|
* 保存
|
||||||
*/
|
*/
|
||||||
fun onSaveClick() {
|
fun onSaveClick() {
|
||||||
|
// 主分校验不通过时禁止保存
|
||||||
|
if (isCheckValid.value == false) {
|
||||||
|
showToast("分单之和超过主单,不允许保存")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
val params = mutableMapOf<String, Any?>(
|
val params = mutableMapOf<String, Any?>(
|
||||||
"mfId" to mfId,
|
"mfId" to mfId,
|
||||||
"prefix" to prefix,
|
"prefix" to prefix,
|
||||||
|
|||||||
@@ -257,7 +257,9 @@ class IntImpManifestViewModel : BasePageViewModel() {
|
|||||||
context = getTopActivity(),
|
context = getTopActivity(),
|
||||||
fid = fid,
|
fid = fid,
|
||||||
dep = sendAddress.value ?: "",
|
dep = sendAddress.value ?: "",
|
||||||
dest = fdest.value ?: ""
|
dest = fdest.value ?: "",
|
||||||
|
flightDate = flightDate.value ?: "",
|
||||||
|
flightNo = flightNo.value ?: ""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -375,7 +377,18 @@ class IntImpManifestViewModel : BasePageViewModel() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
IntImpManifestSubEditActivity.startForAdd(getTopActivity(), selectedItems[0])
|
val manifest = selectedItems[0]
|
||||||
|
if (manifest.haWbList == null) {
|
||||||
|
// 分单列表未加载,先加载再跳转
|
||||||
|
launchLoadingCollect({ NetApply.api.getIntImpManifestHaWbList(manifest.toRequestBody()) }) {
|
||||||
|
onSuccess = { result ->
|
||||||
|
manifest.haWbList = result.data ?: emptyList()
|
||||||
|
IntImpManifestSubEditActivity.startForAdd(getTopActivity(), manifest)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
IntImpManifestSubEditActivity.startForAdd(getTopActivity(), manifest)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import com.lukouguoji.module_base.ktx.launchCollect
|
|||||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||||
import com.lukouguoji.module_base.ktx.showToast
|
import com.lukouguoji.module_base.ktx.showToast
|
||||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||||
|
import com.lukouguoji.module_base.util.DictUtils
|
||||||
import dev.utils.app.info.KeyValue
|
import dev.utils.app.info.KeyValue
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
@@ -102,19 +103,12 @@ class IntImpQueryEditViewModel : BaseViewModel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加载包装类型下拉列表(国际进港专用)
|
* 加载包装类型下拉列表(收运包装类型)
|
||||||
*/
|
*/
|
||||||
private fun loadPackageTypeList() {
|
private fun loadPackageTypeList() {
|
||||||
launchCollect({ NetApply.api.getGjjPackTypeList() }) {
|
DictUtils.getShouYunPackageTypeList(checkedValue = dataBean.value?.packageType) {
|
||||||
onSuccess = { result ->
|
packageTypeList.postValue(it)
|
||||||
val list = result.data?.mapNotNull { bean ->
|
matchPackageType()
|
||||||
if (bean.packageName.isNotEmpty()) {
|
|
||||||
KeyValue(bean.packageName, bean.packageName)
|
|
||||||
} else null
|
|
||||||
} ?: emptyList()
|
|
||||||
packageTypeList.value = list
|
|
||||||
matchPackageType()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import android.content.Intent
|
|||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
import com.lukouguoji.gjj.R
|
import com.lukouguoji.gjj.R
|
||||||
import com.lukouguoji.gjj.activity.IntImpQueryEditActivity
|
import com.lukouguoji.gjj.activity.IntImpQueryEditActivity
|
||||||
import com.lukouguoji.gjj.dialog.IntImpQueryFilterDialogModel
|
|
||||||
import com.lukouguoji.gjj.holder.IntImpQueryViewHolder
|
import com.lukouguoji.gjj.holder.IntImpQueryViewHolder
|
||||||
import com.lukouguoji.gjj.activity.IntImpQueryDetailsActivity
|
import com.lukouguoji.gjj.activity.IntImpQueryDetailsActivity
|
||||||
import com.lukouguoji.module_base.base.BasePageViewModel
|
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||||
@@ -59,10 +58,15 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
|
|||||||
// ==================== 特码下拉 ====================
|
// ==================== 特码下拉 ====================
|
||||||
val spCodeList = MutableLiveData<List<KeyValue>>(emptyList())
|
val spCodeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||||
|
|
||||||
|
// ==================== 筛选面板 ====================
|
||||||
|
val filterVisible = MutableLiveData(false)
|
||||||
|
val awbTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||||
|
val businessTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||||
|
|
||||||
// ==================== 筛选条件 ====================
|
// ==================== 筛选条件 ====================
|
||||||
val spCode = MutableLiveData("")
|
val spCode = MutableLiveData("")
|
||||||
val flightNo = MutableLiveData("")
|
val flightNo = MutableLiveData("")
|
||||||
val dest = MutableLiveData("")
|
val origin = MutableLiveData("")
|
||||||
val awbType = MutableLiveData("")
|
val awbType = MutableLiveData("")
|
||||||
val businessType = MutableLiveData("")
|
val businessType = MutableLiveData("")
|
||||||
val goodsCn = MutableLiveData("")
|
val goodsCn = MutableLiveData("")
|
||||||
@@ -80,17 +84,34 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun filterClick() {
|
fun filterClick() {
|
||||||
val filterDialog = IntImpQueryFilterDialogModel(
|
filterVisible.value = true
|
||||||
spCode = spCode,
|
}
|
||||||
spCodeList = spCodeList,
|
|
||||||
flightNo = flightNo,
|
fun closeFilter() {
|
||||||
dest = dest,
|
filterVisible.value = false
|
||||||
awbType = awbType,
|
}
|
||||||
businessType = businessType,
|
|
||||||
goodsCn = goodsCn,
|
fun resetFilter() {
|
||||||
onConfirm = { refresh() }
|
spCode.value = ""
|
||||||
)
|
flightNo.value = ""
|
||||||
filterDialog.show()
|
origin.value = ""
|
||||||
|
awbType.value = ""
|
||||||
|
businessType.value = ""
|
||||||
|
goodsCn.value = ""
|
||||||
|
}
|
||||||
|
|
||||||
|
fun confirmFilter() {
|
||||||
|
filterVisible.value = false
|
||||||
|
refresh()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun initFilterLists() {
|
||||||
|
DictUtils.getWaybillTypeList(type = "II", addAll = true, checkedValue = awbType.value) {
|
||||||
|
awbTypeList.postValue(it)
|
||||||
|
}
|
||||||
|
DictUtils.getBusinessTypeList(type = "II", addAll = true, checkedValue = businessType.value) {
|
||||||
|
businessTypeList.postValue(it)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getData() {
|
override fun getData() {
|
||||||
@@ -104,7 +125,7 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
|
|||||||
"wbNo" to waybillNo.value!!.ifEmpty { null },
|
"wbNo" to waybillNo.value!!.ifEmpty { null },
|
||||||
"spCode" to spCode.value!!.ifEmpty { null },
|
"spCode" to spCode.value!!.ifEmpty { null },
|
||||||
"fno" to flightNo.value!!.ifEmpty { null },
|
"fno" to flightNo.value!!.ifEmpty { null },
|
||||||
"dest" to dest.value!!.ifEmpty { null },
|
"origin" to origin.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 },
|
||||||
"goods" to goodsCn.value!!.ifEmpty { null }
|
"goods" to goodsCn.value!!.ifEmpty { null }
|
||||||
@@ -118,7 +139,7 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
|
|||||||
"wbNo" to waybillNo.value!!.ifEmpty { null },
|
"wbNo" to waybillNo.value!!.ifEmpty { null },
|
||||||
"spCode" to spCode.value!!.ifEmpty { null },
|
"spCode" to spCode.value!!.ifEmpty { null },
|
||||||
"fno" to flightNo.value!!.ifEmpty { null },
|
"fno" to flightNo.value!!.ifEmpty { null },
|
||||||
"dest" to dest.value!!.ifEmpty { null },
|
"origin" to origin.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 },
|
||||||
"goods" to goodsCn.value!!.ifEmpty { null }
|
"goods" to goodsCn.value!!.ifEmpty { null }
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
enable="@{viewModel.pageType == DetailsPageType.Add}"
|
enable="@{viewModel.pageType == DetailsPageType.Add}"
|
||||||
hint='@{"请输入运单号"}'
|
hint='@{"请输入运单号"}'
|
||||||
required="@{false}"
|
required="@{true}"
|
||||||
title='@{"运 单 号"}'
|
title='@{"运 单 号"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
hint='@{"请选择代理"}'
|
hint='@{"请选择代理"}'
|
||||||
list="@{viewModel.agentList}"
|
list="@{viewModel.agentList}"
|
||||||
required="@{false}"
|
required="@{true}"
|
||||||
title='@{"代 理"}'
|
title='@{"代 理"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.SPINNER}"
|
type="@{DataLayoutType.SPINNER}"
|
||||||
@@ -149,7 +149,7 @@
|
|||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
hint='@{"请输入始发站"}'
|
hint='@{"请输入始发站"}'
|
||||||
required="@{false}"
|
required="@{true}"
|
||||||
title='@{"始 发 站"}'
|
title='@{"始 发 站"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
hint='@{"请输入目的站"}'
|
hint='@{"请输入目的站"}'
|
||||||
required="@{false}"
|
required="@{true}"
|
||||||
title='@{"目 的 站"}'
|
title='@{"目 的 站"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
@@ -173,7 +173,7 @@
|
|||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
hint='@{"请选择运单类型"}'
|
hint='@{"请选择运单类型"}'
|
||||||
list="@{viewModel.waybillTypeList}"
|
list="@{viewModel.waybillTypeList}"
|
||||||
required="@{false}"
|
required="@{true}"
|
||||||
title='@{"运单类型"}'
|
title='@{"运单类型"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.SPINNER}"
|
type="@{DataLayoutType.SPINNER}"
|
||||||
@@ -193,8 +193,9 @@
|
|||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
|
android:id="@+id/waybillNumInput"
|
||||||
hint='@{"请输入总件数"}'
|
hint='@{"请输入总件数"}'
|
||||||
required="@{false}"
|
required="@{true}"
|
||||||
title='@{"总 件 数"}'
|
title='@{"总 件 数"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
@@ -204,6 +205,7 @@
|
|||||||
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
|
||||||
|
android:id="@+id/actualNumInput"
|
||||||
hint='@{"请输入实到件数"}'
|
hint='@{"请输入实到件数"}'
|
||||||
required="@{false}"
|
required="@{false}"
|
||||||
title='@{"实到件数"}'
|
title='@{"实到件数"}'
|
||||||
@@ -216,8 +218,9 @@
|
|||||||
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
|
||||||
|
android:id="@+id/actualWeightInput"
|
||||||
hint='@{"请输入实到重量"}'
|
hint='@{"请输入实到重量"}'
|
||||||
required="@{false}"
|
required="@{true}"
|
||||||
title='@{"实到重量"}'
|
title='@{"实到重量"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
@@ -237,6 +240,7 @@
|
|||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
|
android:id="@+id/billingWeightInput"
|
||||||
hint='@{"请输入计费重量"}'
|
hint='@{"请输入计费重量"}'
|
||||||
required="@{false}"
|
required="@{false}"
|
||||||
title='@{"计费重量"}'
|
title='@{"计费重量"}'
|
||||||
@@ -261,7 +265,7 @@
|
|||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
hint='@{"请输入品名(英)"}'
|
hint='@{"请输入品名(英)"}'
|
||||||
required="@{false}"
|
required="@{true}"
|
||||||
title='@{"品名(英)"}'
|
title='@{"品名(英)"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
@@ -295,7 +299,7 @@
|
|||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
hint='@{"请选择业务类型"}'
|
hint='@{"请选择业务类型"}'
|
||||||
list="@{viewModel.businessTypeList}"
|
list="@{viewModel.businessTypeList}"
|
||||||
required="@{false}"
|
required="@{true}"
|
||||||
title='@{"业务类型"}'
|
title='@{"业务类型"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.SPINNER}"
|
type="@{DataLayoutType.SPINNER}"
|
||||||
|
|||||||
@@ -59,6 +59,7 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
enable="@{true}"
|
enable="@{true}"
|
||||||
hint='@{"请输入名称"}'
|
hint='@{"请输入名称"}'
|
||||||
|
required="@{true}"
|
||||||
title='@{"名称"}'
|
title='@{"名称"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
@@ -71,6 +72,7 @@
|
|||||||
enable="@{true}"
|
enable="@{true}"
|
||||||
hint='@{"请选择国家代码"}'
|
hint='@{"请选择国家代码"}'
|
||||||
list="@{viewModel.countryCodeList}"
|
list="@{viewModel.countryCodeList}"
|
||||||
|
required="@{true}"
|
||||||
title='@{"国家代码"}'
|
title='@{"国家代码"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.SPINNER}"
|
type="@{DataLayoutType.SPINNER}"
|
||||||
@@ -83,6 +85,7 @@
|
|||||||
enable="@{true}"
|
enable="@{true}"
|
||||||
hint='@{"请选择通讯方式"}'
|
hint='@{"请选择通讯方式"}'
|
||||||
list="@{viewModel.comTypeList}"
|
list="@{viewModel.comTypeList}"
|
||||||
|
required="@{true}"
|
||||||
title='@{"通讯方式"}'
|
title='@{"通讯方式"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.SPINNER}"
|
type="@{DataLayoutType.SPINNER}"
|
||||||
@@ -103,6 +106,7 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
enable="@{true}"
|
enable="@{true}"
|
||||||
hint='@{"请输入联系号码"}'
|
hint='@{"请输入联系号码"}'
|
||||||
|
required="@{true}"
|
||||||
title='@{"联系号码"}'
|
title='@{"联系号码"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
@@ -154,6 +158,7 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
enable="@{true}"
|
enable="@{true}"
|
||||||
hint='@{"请输入名称"}'
|
hint='@{"请输入名称"}'
|
||||||
|
required="@{true}"
|
||||||
title='@{"名称"}'
|
title='@{"名称"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
@@ -166,6 +171,7 @@
|
|||||||
enable="@{true}"
|
enable="@{true}"
|
||||||
hint='@{"请选择国家代码"}'
|
hint='@{"请选择国家代码"}'
|
||||||
list="@{viewModel.countryCodeList}"
|
list="@{viewModel.countryCodeList}"
|
||||||
|
required="@{true}"
|
||||||
title='@{"国家代码"}'
|
title='@{"国家代码"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.SPINNER}"
|
type="@{DataLayoutType.SPINNER}"
|
||||||
@@ -178,6 +184,7 @@
|
|||||||
enable="@{true}"
|
enable="@{true}"
|
||||||
hint='@{"请选择通讯方式"}'
|
hint='@{"请选择通讯方式"}'
|
||||||
list="@{viewModel.comTypeList}"
|
list="@{viewModel.comTypeList}"
|
||||||
|
required="@{true}"
|
||||||
title='@{"通讯方式"}'
|
title='@{"通讯方式"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.SPINNER}"
|
type="@{DataLayoutType.SPINNER}"
|
||||||
@@ -198,6 +205,7 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
enable="@{true}"
|
enable="@{true}"
|
||||||
hint='@{"请输入联系号码"}'
|
hint='@{"请输入联系号码"}'
|
||||||
|
required="@{true}"
|
||||||
title='@{"联系号码"}'
|
title='@{"联系号码"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
|||||||
@@ -72,7 +72,8 @@
|
|||||||
title='@{"主分校验"}'
|
title='@{"主分校验"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
value='@{viewModel.mainSubCheck}' />
|
value='@{viewModel.mainSubCheck}'
|
||||||
|
valueTextColor="@{viewModel.isCheckValid ? @color/text_green : @color/red}" />
|
||||||
|
|
||||||
<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"
|
||||||
@@ -103,6 +104,7 @@
|
|||||||
enable="@{true}"
|
enable="@{true}"
|
||||||
hint='@{"请输入件数"}'
|
hint='@{"请输入件数"}'
|
||||||
required="@{false}"
|
required="@{false}"
|
||||||
|
setRefreshCallBack="@{viewModel::onPcInputComplete}"
|
||||||
title='@{"件 数"}'
|
title='@{"件 数"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
@@ -116,6 +118,7 @@
|
|||||||
enable="@{true}"
|
enable="@{true}"
|
||||||
hint='@{"请输入重量"}'
|
hint='@{"请输入重量"}'
|
||||||
required="@{false}"
|
required="@{false}"
|
||||||
|
setRefreshCallBack="@{viewModel::onWeightInputComplete}"
|
||||||
title='@{"重 量"}'
|
title='@{"重 量"}'
|
||||||
titleLength="@{5}"
|
titleLength="@{5}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
|
|||||||
@@ -17,167 +17,204 @@
|
|||||||
android:background="@color/color_f2"
|
android:background="@color/color_f2"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<!-- 标题栏 -->
|
<!-- 标题栏(始终在最上层,不被遮挡) -->
|
||||||
<include layout="@layout/title_tool_bar" />
|
<include layout="@layout/title_tool_bar" />
|
||||||
|
|
||||||
<!-- 搜索区域 -->
|
<!-- 内容区域(FrameLayout 包裹,筛选面板和遮罩只在此区域内) -->
|
||||||
<LinearLayout
|
<FrameLayout
|
||||||
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="@{`/IntImpSearch/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_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_weight="1">
|
android:layout_weight="1">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<!-- 原有内容 -->
|
||||||
android:id="@+id/rv"
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
itemLayoutId="@{viewModel.itemLayoutId}"
|
android:orientation="vertical">
|
||||||
viewHolder="@{viewModel.itemViewHolder}"
|
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
|
||||||
tools:listitem="@layout/item_int_imp_query" />
|
|
||||||
|
|
||||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
<!-- 搜索区域 -->
|
||||||
|
<LinearLayout
|
||||||
<!-- 底部统计信息 -->
|
android:layout_width="match_parent"
|
||||||
<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:layout_height="wrap_content"
|
||||||
android:text='@{`合计:` + viewModel.totalCount + `票`}'
|
android:layout_marginHorizontal="10dp"
|
||||||
android:textColor="@color/bottom_tool_tips_text_color"
|
android:layout_marginTop="10dp"
|
||||||
android:textSize="16sp"
|
android:gravity="center_vertical"
|
||||||
android:textStyle="bold"
|
android:orientation="horizontal">
|
||||||
tools:text="合计:3票" />
|
|
||||||
|
|
||||||
<TextView
|
<!-- 航班日期起 -->
|
||||||
android:layout_width="wrap_content"
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_height="wrap_content"
|
||||||
android:text='@{`总件数:` + viewModel.totalPc}'
|
android:layout_weight="1"
|
||||||
android:textColor="@color/bottom_tool_tips_text_color"
|
hint='@{"请选择开始日期"}'
|
||||||
android:textSize="16sp"
|
icon="@{@drawable/img_date}"
|
||||||
android:textStyle="bold"
|
type="@{SearchLayoutType.DATE}"
|
||||||
tools:text="总件数:100" />
|
value="@={viewModel.flightDateStart}" />
|
||||||
|
|
||||||
<TextView
|
<!-- 航班日期止 -->
|
||||||
android:layout_width="wrap_content"
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_marginLeft="20dp"
|
android:layout_height="wrap_content"
|
||||||
android:text='@{`总重量:` + viewModel.totalWeight}'
|
android:layout_weight="1"
|
||||||
android:textColor="@color/bottom_tool_tips_text_color"
|
hint='@{"请选择结束日期"}'
|
||||||
android:textSize="16sp"
|
icon="@{@drawable/img_date}"
|
||||||
android:textStyle="bold"
|
type="@{SearchLayoutType.DATE}"
|
||||||
tools:text="总重量:100" />
|
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="@{`/IntImpSearch/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_int_imp_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>
|
</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_int_imp_query_filter"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:viewModel="@{viewModel}" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
@@ -27,8 +27,8 @@
|
|||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_weight="0.5"
|
android:layout_weight="0.5"
|
||||||
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_gray : @drawable/radiobtn_unchecked_gray}"
|
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_style : @drawable/radiobtn_unchecked_style}"
|
||||||
android:src="@drawable/radiobtn_unchecked_gray" />
|
android:src="@drawable/radiobtn_unchecked_style" />
|
||||||
|
|
||||||
<!-- 分单号 -->
|
<!-- 分单号 -->
|
||||||
<TextView
|
<TextView
|
||||||
|
|||||||
@@ -27,8 +27,8 @@
|
|||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_weight="0.5"
|
android:layout_weight="0.5"
|
||||||
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_gray : @drawable/radiobtn_unchecked_gray}"
|
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_style : @drawable/radiobtn_unchecked_style}"
|
||||||
android:src="@drawable/radiobtn_unchecked_gray" />
|
android:src="@drawable/radiobtn_unchecked_style" />
|
||||||
|
|
||||||
<!-- 运单号 -->
|
<!-- 运单号 -->
|
||||||
<TextView
|
<TextView
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text='@{String.valueOf(bean.awbPc)}'
|
android:text='@{String.valueOf(bean.inPc)}'
|
||||||
tools:text="10" />
|
tools:text="10" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text='@{String.valueOf(bean.awbWeight)}'
|
android:text='@{String.valueOf(bean.inWeight)}'
|
||||||
tools:text="200" />
|
tools:text="200" />
|
||||||
|
|
||||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.5"
|
android:layout_weight="1.5"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@{bean.outDate != null && bean.outDate.length() >= 16 ? bean.outDate.substring(0, 16) : (bean.outDate != null && bean.outDate.length() > 0 ? bean.outDate : `--`)}"
|
android:text="@{bean.outDate != null && bean.outDate.length() >= 16 ? bean.outDate.substring(0, 16) : (bean.outDate ?? ``)}"
|
||||||
android:textColor="@android:color/black"
|
android:textColor="@android:color/black"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
|||||||
@@ -266,7 +266,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{bean.opDate}"
|
android:text="@{bean.inDate}"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_weight="0.5"
|
android:layout_weight="0.5"
|
||||||
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_gray : @drawable/radiobtn_unchecked_gray}"
|
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_style : @drawable/radiobtn_unchecked_style}"
|
||||||
android:src="@drawable/radiobtn_unchecked_style" />
|
android:src="@drawable/radiobtn_unchecked_style" />
|
||||||
|
|
||||||
<!-- 库位号 -->
|
<!-- 库位号 -->
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_weight="0.5"
|
android:layout_weight="0.5"
|
||||||
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_gray : @drawable/radiobtn_unchecked_gray}"
|
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_style : @drawable/radiobtn_unchecked_style}"
|
||||||
android:src="@drawable/radiobtn_unchecked_style" />
|
android:src="@drawable/radiobtn_unchecked_style" />
|
||||||
|
|
||||||
<!-- 分单号 -->
|
<!-- 分单号 -->
|
||||||
|
|||||||
@@ -5,24 +5,40 @@
|
|||||||
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
|
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="model"
|
name="viewModel"
|
||||||
type="com.lukouguoji.gjj.dialog.IntImpQueryFilterDialogModel" />
|
type="com.lukouguoji.gjj.viewModel.IntImpQueryViewModel" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/white"
|
android:background="@color/white"
|
||||||
|
android:elevation="8dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<!-- 状态栏占位 -->
|
<!-- 筛选标题栏 -->
|
||||||
<View
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="25dp"
|
android:layout_height="50dp"
|
||||||
android:background="@color/white" />
|
android:gravity="center_vertical"
|
||||||
|
android:paddingHorizontal="15dp">
|
||||||
|
|
||||||
<!-- 标题栏 -->
|
<ImageView
|
||||||
<include layout="@layout/title_tool_bar" />
|
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
|
<com.google.android.material.divider.MaterialDivider
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -42,72 +58,72 @@
|
|||||||
|
|
||||||
<!-- 特码 -->
|
<!-- 特码 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
hint='@{"请选择特码"}'
|
hint='@{"请选择特码"}'
|
||||||
list="@{model.spCodeList}"
|
list="@{viewModel.spCodeList}"
|
||||||
title='@{"特码"}'
|
title='@{"特码"}'
|
||||||
titleLength="@{4}"
|
titleLength="@{4}"
|
||||||
type="@{DataLayoutType.SPINNER}"
|
type="@{DataLayoutType.SPINNER}"
|
||||||
value='@={model.spCode}'
|
value='@={viewModel.spCode}' />
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="10dp" />
|
|
||||||
|
|
||||||
<!-- 航班号 -->
|
<!-- 航班号 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
hint='@{"请输入航班号"}'
|
hint='@{"请输入航班号"}'
|
||||||
title='@{"航班号"}'
|
title='@{"航班号"}'
|
||||||
titleLength="@{4}"
|
titleLength="@{4}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
value='@={model.flightNo}'
|
value='@={viewModel.flightNo}' />
|
||||||
|
|
||||||
|
<!-- 始发港 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="10dp" />
|
android:layout_marginBottom="10dp"
|
||||||
|
hint='@{"请输入始发港"}'
|
||||||
<!-- 目的港 -->
|
title='@{"始发港"}'
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
|
||||||
hint='@{"请输入目的港"}'
|
|
||||||
title='@{"目的港"}'
|
|
||||||
titleLength="@{4}"
|
titleLength="@{4}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
value='@={model.dest}'
|
value='@={viewModel.origin}' />
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="10dp" />
|
|
||||||
|
|
||||||
<!-- 运单类型 -->
|
<!-- 运单类型 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
hint='@{"请选择运单类型"}'
|
hint='@{"请选择运单类型"}'
|
||||||
list="@{model.awbTypeList}"
|
list="@{viewModel.awbTypeList}"
|
||||||
title='@{"运单类型"}'
|
title='@{"运单类型"}'
|
||||||
titleLength="@{4}"
|
titleLength="@{4}"
|
||||||
type="@{DataLayoutType.SPINNER}"
|
type="@{DataLayoutType.SPINNER}"
|
||||||
value='@={model.awbType}'
|
value='@={viewModel.awbType}' />
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="10dp" />
|
|
||||||
|
|
||||||
<!-- 业务类型 -->
|
<!-- 业务类型 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
hint='@{"请选择业务类型"}'
|
hint='@{"请选择业务类型"}'
|
||||||
list="@{model.businessTypeList}"
|
list="@{viewModel.businessTypeList}"
|
||||||
title='@{"业务类型"}'
|
title='@{"业务类型"}'
|
||||||
titleLength="@{4}"
|
titleLength="@{4}"
|
||||||
type="@{DataLayoutType.SPINNER}"
|
type="@{DataLayoutType.SPINNER}"
|
||||||
value='@={model.businessType}'
|
value='@={viewModel.businessType}' />
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="10dp" />
|
|
||||||
|
|
||||||
<!-- 品名(中) -->
|
<!-- 品名(中) -->
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
hint='@{"请输入品名"}'
|
hint='@{"请输入品名"}'
|
||||||
title='@{"品名(中)"}'
|
title='@{"品名(中)"}'
|
||||||
titleLength="@{4}"
|
titleLength="@{4}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
value='@={model.goodsCn}'
|
value='@={viewModel.goodsCn}' />
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="10dp" />
|
|
||||||
|
|
||||||
<!-- 底部按钮区域 -->
|
<!-- 底部按钮区域 -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -127,7 +143,7 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/bg_primary_radius_4"
|
android:background="@drawable/bg_primary_radius_4"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:onClick="@{()-> model.onResetClick()}"
|
android:onClick="@{()-> viewModel.resetFilter()}"
|
||||||
android:text="重置"
|
android:text="重置"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
@@ -138,7 +154,7 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/bg_primary_radius_4"
|
android:background="@drawable/bg_primary_radius_4"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:onClick="@{()-> model.onConfirmClick()}"
|
android:onClick="@{()-> viewModel.confirmFilter()}"
|
||||||
android:text="搜索"
|
android:text="搜索"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
Reference in New Issue
Block a user