feat: opt 进港查询
This commit is contained in:
@@ -13,6 +13,7 @@ import com.lukouguoji.module_base.base.BaseDialogModel
|
||||
import com.lxj.xpopup.XPopup
|
||||
import com.lxj.xpopup.enums.PopupPosition
|
||||
import dev.DevUtils
|
||||
import com.lukouguoji.module_base.util.DictUtils
|
||||
import dev.utils.app.info.KeyValue
|
||||
|
||||
/**
|
||||
@@ -29,21 +30,9 @@ class IntImpQueryFilterDialogModel(
|
||||
private val onConfirm: () -> Unit
|
||||
) : BaseDialogModel<DialogIntImpQueryFilterBinding>(DIALOG_TYPE_DRAWER) {
|
||||
|
||||
val awbTypeList = MutableLiveData(
|
||||
listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("主单", "1"),
|
||||
KeyValue("分单", "2")
|
||||
)
|
||||
)
|
||||
val awbTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
|
||||
val businessTypeList = MutableLiveData(
|
||||
listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("普货", "1"),
|
||||
KeyValue("特货", "2")
|
||||
)
|
||||
)
|
||||
val businessTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
|
||||
override fun layoutId() = R.layout.dialog_int_imp_query_filter
|
||||
|
||||
@@ -70,6 +59,13 @@ class IntImpQueryFilterDialogModel(
|
||||
binding.root.findViewById<View>(R.id.tool_back)?.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
|
||||
DictUtils.getWaybillTypeList(type = "II", addAll = true, checkedValue = awbType.value) {
|
||||
awbTypeList.postValue(it)
|
||||
}
|
||||
DictUtils.getBusinessTypeList(type = "II", addAll = true, checkedValue = businessType.value) {
|
||||
businessTypeList.postValue(it)
|
||||
}
|
||||
}
|
||||
|
||||
fun onResetClick() {
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.lukouguoji.module_base.ktx.launchCollect
|
||||
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.util.DictUtils
|
||||
import dev.utils.app.info.KeyValue
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@@ -102,21 +103,14 @@ class IntImpQueryEditViewModel : BaseViewModel() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载包装类型下拉列表(国际进港专用)
|
||||
* 加载包装类型下拉列表(收运包装类型)
|
||||
*/
|
||||
private fun loadPackageTypeList() {
|
||||
launchCollect({ NetApply.api.getGjjPackTypeList() }) {
|
||||
onSuccess = { result ->
|
||||
val list = result.data?.mapNotNull { bean ->
|
||||
if (bean.packageName.isNotEmpty()) {
|
||||
KeyValue(bean.packageName, bean.packageName)
|
||||
} else null
|
||||
} ?: emptyList()
|
||||
packageTypeList.value = list
|
||||
DictUtils.getShouYunPackageTypeList(checkedValue = dataBean.value?.packageType) {
|
||||
packageTypeList.postValue(it)
|
||||
matchPackageType()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载运单类型下拉列表
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
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:textSize="14sp" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user