feat: visa
This commit is contained in:
@@ -47,7 +47,9 @@ fun setDataLayoutData(
|
|||||||
hint?.let {
|
hint?.let {
|
||||||
dataLayout.hint = hint
|
dataLayout.hint = hint
|
||||||
}
|
}
|
||||||
dataLayout.icon = icon
|
icon?.let {
|
||||||
|
dataLayout.icon = it
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -189,7 +191,9 @@ fun setDataLayoutDataNew(
|
|||||||
hint?.let {
|
hint?.let {
|
||||||
dataLayout.hint = hint
|
dataLayout.hint = hint
|
||||||
}
|
}
|
||||||
dataLayout.icon = icon
|
icon?.let {
|
||||||
|
dataLayout.icon = it
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -212,6 +212,11 @@ class PadDataLayout : FrameLayout {
|
|||||||
et.visibility = GONE
|
et.visibility = GONE
|
||||||
spinner.visibility = GONE
|
spinner.visibility = GONE
|
||||||
tvSpinner.visibility = GONE
|
tvSpinner.visibility = GONE
|
||||||
|
iv.visibility = VISIBLE
|
||||||
|
iv.setImageResource(R.mipmap.img_date)
|
||||||
|
val dp20 = dev.utils.app.SizeUtils.dp2px(20f)
|
||||||
|
iv.layoutParams.width = dp20
|
||||||
|
iv.layoutParams.height = dp20
|
||||||
|
|
||||||
setOnClickListener(dateClick)
|
setOnClickListener(dateClick)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -240,6 +240,11 @@ class PadDataLayoutNew : FrameLayout {
|
|||||||
et.visibility = GONE
|
et.visibility = GONE
|
||||||
spinner.visibility = GONE
|
spinner.visibility = GONE
|
||||||
tvSpinner.visibility = GONE
|
tvSpinner.visibility = GONE
|
||||||
|
iv.visibility = VISIBLE
|
||||||
|
iv.setImageResource(R.mipmap.img_date)
|
||||||
|
val dp20 = dev.utils.app.SizeUtils.dp2px(20f)
|
||||||
|
iv.layoutParams.width = dp20
|
||||||
|
iv.layoutParams.height = dp20
|
||||||
|
|
||||||
setOnClickListener(dateClick)
|
setOnClickListener(dateClick)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,9 +10,9 @@
|
|||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/rl"
|
android:id="@+id/rl"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="100dp"
|
||||||
android:layout_height="150dp"
|
android:layout_height="100dp"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="5dp"
|
||||||
android:background="@color/white">
|
android:background="@color/white">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.lukouguoji.module_base.base.BaseBindingActivity
|
|||||||
import com.lukouguoji.module_base.common.Constant
|
import com.lukouguoji.module_base.common.Constant
|
||||||
import com.lukouguoji.module_base.common.DetailsPageType
|
import com.lukouguoji.module_base.common.DetailsPageType
|
||||||
import com.lukouguoji.module_base.ktx.addOnItemClickListener
|
import com.lukouguoji.module_base.ktx.addOnItemClickListener
|
||||||
|
import com.lukouguoji.module_base.ktx.setUpperCaseAlphanumericFilter
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 国际进港-事故签证新增/编辑
|
* 国际进港-事故签证新增/编辑
|
||||||
@@ -23,6 +24,11 @@ class IntImpAccidentVisaEditActivity :
|
|||||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||||
binding.viewModel = viewModel
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
|
// 航班号:大写字母+数字
|
||||||
|
binding.fnoInput.et.setUpperCaseAlphanumericFilter()
|
||||||
|
// 运单号:大写字母+数字
|
||||||
|
binding.wbNoInput.et.setUpperCaseAlphanumericFilter()
|
||||||
|
|
||||||
viewModel.rv = binding.rv
|
viewModel.rv = binding.rv
|
||||||
binding.rv.addOnItemClickListener(viewModel)
|
binding.rv.addOnItemClickListener(viewModel)
|
||||||
viewModel.initOnCreate(intent)
|
viewModel.initOnCreate(intent)
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import com.lukouguoji.module_base.impl.FlowBus
|
|||||||
import com.lukouguoji.module_base.impl.ImageSelectViewHolder
|
import com.lukouguoji.module_base.impl.ImageSelectViewHolder
|
||||||
import com.lukouguoji.module_base.interfaces.IOnItemClickListener
|
import com.lukouguoji.module_base.interfaces.IOnItemClickListener
|
||||||
import com.lukouguoji.module_base.ktx.commonAdapter
|
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||||
|
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
|
||||||
@@ -26,6 +27,7 @@ import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
|
|||||||
import com.lukouguoji.module_base.util.MediaUtil
|
import com.lukouguoji.module_base.util.MediaUtil
|
||||||
import com.lukouguoji.module_base.util.UploadUtil
|
import com.lukouguoji.module_base.util.UploadUtil
|
||||||
import dev.utils.app.info.KeyValue
|
import dev.utils.app.info.KeyValue
|
||||||
|
import dev.utils.common.DateUtils
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.flow.asFlow
|
import kotlinx.coroutines.flow.asFlow
|
||||||
import kotlinx.coroutines.flow.catch
|
import kotlinx.coroutines.flow.catch
|
||||||
@@ -71,6 +73,13 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
|
|||||||
id = intent.getLongExtra(Constant.Key.ID, 0)
|
id = intent.getLongExtra(Constant.Key.ID, 0)
|
||||||
pageType.value = if (id == 0L) DetailsPageType.Add else DetailsPageType.Modify
|
pageType.value = if (id == 0L) DetailsPageType.Add else DetailsPageType.Modify
|
||||||
|
|
||||||
|
// 新增模式下默认航班日期为今天
|
||||||
|
if (pageType.value == DetailsPageType.Add) {
|
||||||
|
val bean = dataBean.value ?: GjAccidentVisaEditBean()
|
||||||
|
bean.fdate = DateUtils.getCurrentTime().formatDate()
|
||||||
|
dataBean.value = bean
|
||||||
|
}
|
||||||
|
|
||||||
loadDropdownLists()
|
loadDropdownLists()
|
||||||
|
|
||||||
if (id != 0L) {
|
if (id != 0L) {
|
||||||
|
|||||||
@@ -59,6 +59,7 @@
|
|||||||
value='@={viewModel.dataBean.fdate}' />
|
value='@={viewModel.dataBean.fdate}' />
|
||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
|
android:id="@+id/fnoInput"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
@@ -84,6 +85,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
enable="@{false}"
|
enable="@{false}"
|
||||||
|
hint='@{"航班信息自动填充"}'
|
||||||
title='@{"始发站"}'
|
title='@{"始发站"}'
|
||||||
titleLength="@{6}"
|
titleLength="@{6}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
@@ -94,6 +96,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
enable="@{false}"
|
enable="@{false}"
|
||||||
|
hint='@{"航班信息自动填充"}'
|
||||||
title='@{"目的站"}'
|
title='@{"目的站"}'
|
||||||
titleLength="@{6}"
|
titleLength="@{6}"
|
||||||
type="@{DataLayoutType.INPUT}"
|
type="@{DataLayoutType.INPUT}"
|
||||||
@@ -109,6 +112,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/wbNoInput"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
|||||||
Reference in New Issue
Block a user