Compare commits
3 Commits
06713190e0
...
03a6e75d68
| Author | SHA1 | Date | |
|---|---|---|---|
| 03a6e75d68 | |||
| 2729e18043 | |||
| abac0d28fa |
@@ -306,6 +306,14 @@
|
||||
android:name=".page.log.list.LogListActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<activity
|
||||
android:name=".page.log.list.LogQueryActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<activity
|
||||
android:name=".page.log.detail.LogDetailActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<activity
|
||||
android:name=".page.transportLog.list.TransportLogActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
|
||||
@@ -3,12 +3,15 @@ package com.lukouguoji.aerologic.page.flight.query.details
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.aerologic.R
|
||||
import com.lukouguoji.aerologic.databinding.ActivityFlightQueryDetailsBinding
|
||||
import com.lukouguoji.aerologic.databinding.ActivityGnjStashDetailsBinding
|
||||
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_FLIGHT_QUERY_DETAILS)
|
||||
class FlightQueryDetailsActivity :
|
||||
BaseBindingActivity<ActivityFlightQueryDetailsBinding, FlightQueryDetailsViewModel>() {
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.ktx.addOnItemClickListener
|
||||
import com.lukouguoji.module_base.ktx.getLifecycleOwner
|
||||
|
||||
@Deprecated("使用 module_hangban 中的 HbQueryListActivity 替代")
|
||||
class FlightQueryListActivity :
|
||||
BaseBindingActivity<ActivityFlightQueryListBinding, FlightQueryListViewModel>() {
|
||||
override fun layoutId() = R.layout.activity_flight_query_list
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
package com.lukouguoji.aerologic.page.log.detail
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.util.TypedValue
|
||||
import android.view.Gravity
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.google.gson.Gson
|
||||
import com.lukouguoji.aerologic.R
|
||||
import com.lukouguoji.aerologic.databinding.ActivityLogDetailBinding
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.bean.LogBean
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_LOG_DETAIL)
|
||||
class LogDetailActivity : BaseBindingActivity<ActivityLogDetailBinding, LogDetailViewModel>() {
|
||||
|
||||
private val timelineAdapter = LogDetailTimelineAdapter()
|
||||
|
||||
override fun layoutId(): Int {
|
||||
return R.layout.activity_log_detail
|
||||
}
|
||||
|
||||
override fun viewModelClass(): Class<LogDetailViewModel> {
|
||||
return LogDetailViewModel::class.java
|
||||
}
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("操作日志详情")
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 配置操作详情 RecyclerView(垂直时间线)
|
||||
binding.rvTimeline.adapter = timelineAdapter
|
||||
|
||||
// 观察流转状态变化,程序化构建步骤进度条
|
||||
viewModel.currentStepIndex.observe(this) { index ->
|
||||
buildStepProgressBar(viewModel.allSteps, index)
|
||||
}
|
||||
|
||||
viewModel.statusLogList.observe(this) { list ->
|
||||
timelineAdapter.setData(list)
|
||||
}
|
||||
|
||||
viewModel.initOnCreated(intent)
|
||||
}
|
||||
|
||||
private fun buildStepProgressBar(steps: List<String>, currentIndex: Int) {
|
||||
val container = binding.llSteps
|
||||
container.removeAllViews()
|
||||
|
||||
val colorBlue = 0xFF1C8CF5.toInt()
|
||||
val colorGray = 0xFFCCCCCC.toInt()
|
||||
val colorGreen = 0xFF4CAF50.toInt()
|
||||
val dotSize = dp(10)
|
||||
val lineHeight = dp(2)
|
||||
|
||||
for (i in steps.indices) {
|
||||
val isCompleted = i <= currentIndex
|
||||
val isCurrent = i == currentIndex
|
||||
val isFirst = i == 0
|
||||
val isLast = i == steps.size - 1
|
||||
|
||||
// 每个步骤的根容器(等宽)
|
||||
val stepLayout = LinearLayout(this).apply {
|
||||
orientation = LinearLayout.VERTICAL
|
||||
gravity = Gravity.CENTER_HORIZONTAL
|
||||
layoutParams = LinearLayout.LayoutParams(0, LinearLayout.LayoutParams.WRAP_CONTENT, 1f)
|
||||
}
|
||||
|
||||
// 步骤名称(所有步骤统一 padding 确保高度一致)
|
||||
val tvName = TextView(this).apply {
|
||||
text = steps[i]
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_SP, 13f)
|
||||
gravity = Gravity.CENTER
|
||||
setPadding(dp(6), dp(2), dp(6), dp(2))
|
||||
if (isCurrent) {
|
||||
setBackgroundResource(R.drawable.bg_step_current_badge)
|
||||
setTextColor(0xFFFFFFFF.toInt())
|
||||
} else {
|
||||
setTextColor(if (isCompleted) 0xFF333333.toInt() else 0xFF999999.toInt())
|
||||
}
|
||||
layoutParams = LinearLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.WRAP_CONTENT,
|
||||
LinearLayout.LayoutParams.WRAP_CONTENT
|
||||
)
|
||||
}
|
||||
stepLayout.addView(tvName)
|
||||
|
||||
// 圆点和连线区域(FrameLayout 叠加)
|
||||
val dotLineContainer = FrameLayout(this).apply {
|
||||
layoutParams = LinearLayout.LayoutParams(
|
||||
LinearLayout.LayoutParams.MATCH_PARENT, dp(20)
|
||||
).apply { topMargin = dp(8) }
|
||||
}
|
||||
|
||||
// 左半连线(从左边缘到中心,略超过中心以避免断层)
|
||||
if (!isFirst) {
|
||||
val lineLeft = View(this).apply {
|
||||
setBackgroundColor(if (isCompleted) colorBlue else colorGray)
|
||||
layoutParams = FrameLayout.LayoutParams(0, lineHeight).apply {
|
||||
gravity = Gravity.CENTER_VERTICAL or Gravity.START
|
||||
}
|
||||
}
|
||||
dotLineContainer.addView(lineLeft)
|
||||
dotLineContainer.post {
|
||||
lineLeft.layoutParams = FrameLayout.LayoutParams(
|
||||
dotLineContainer.width / 2 + dotSize / 2, lineHeight
|
||||
).apply { gravity = Gravity.CENTER_VERTICAL or Gravity.START }
|
||||
}
|
||||
}
|
||||
|
||||
// 右半连线(从中心到右边缘,略超过中心以避免断层)
|
||||
if (!isLast) {
|
||||
val rightLineColor = if (isCompleted && !isCurrent) colorBlue else colorGray
|
||||
val lineRight = View(this).apply {
|
||||
setBackgroundColor(rightLineColor)
|
||||
layoutParams = FrameLayout.LayoutParams(0, lineHeight).apply {
|
||||
gravity = Gravity.CENTER_VERTICAL or Gravity.END
|
||||
}
|
||||
}
|
||||
dotLineContainer.addView(lineRight)
|
||||
dotLineContainer.post {
|
||||
lineRight.layoutParams = FrameLayout.LayoutParams(
|
||||
dotLineContainer.width / 2 + dotSize / 2, lineHeight
|
||||
).apply { gravity = Gravity.CENTER_VERTICAL or Gravity.END }
|
||||
}
|
||||
}
|
||||
|
||||
// 圆点(叠加在连线之上)
|
||||
val dot = View(this).apply {
|
||||
setBackgroundResource(
|
||||
when {
|
||||
isCurrent -> R.drawable.bg_step_dot_green
|
||||
isCompleted -> R.drawable.bg_step_dot_blue
|
||||
else -> R.drawable.bg_step_dot_gray
|
||||
}
|
||||
)
|
||||
layoutParams = FrameLayout.LayoutParams(dotSize, dotSize).apply {
|
||||
gravity = Gravity.CENTER
|
||||
}
|
||||
}
|
||||
dotLineContainer.addView(dot)
|
||||
|
||||
stepLayout.addView(dotLineContainer)
|
||||
container.addView(stepLayout)
|
||||
}
|
||||
}
|
||||
|
||||
private fun dp(value: Int): Int {
|
||||
return TypedValue.applyDimension(
|
||||
TypedValue.COMPLEX_UNIT_DIP, value.toFloat(), resources?.displayMetrics
|
||||
).toInt()
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context, bean: LogBean) {
|
||||
val starter = Intent(context, LogDetailActivity::class.java)
|
||||
starter.putExtra(Constant.Key.DATA, Gson().toJson(bean))
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.lukouguoji.aerologic.page.log.detail
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.lukouguoji.aerologic.R
|
||||
|
||||
class LogDetailStepAdapter : RecyclerView.Adapter<LogDetailStepAdapter.StepViewHolder>() {
|
||||
|
||||
private var steps: List<String> = emptyList()
|
||||
private var currentIndex: Int = -1
|
||||
|
||||
fun setData(steps: List<String>, currentIndex: Int) {
|
||||
this.steps = steps
|
||||
this.currentIndex = currentIndex
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): StepViewHolder {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_log_step, parent, false)
|
||||
return StepViewHolder(view)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: StepViewHolder, position: Int) {
|
||||
val step = steps[position]
|
||||
val isCompleted = position <= currentIndex
|
||||
val isCurrent = position == currentIndex
|
||||
val isFirst = position == 0
|
||||
val isLast = position == steps.size - 1
|
||||
|
||||
// 步骤名称
|
||||
if (isCurrent) {
|
||||
holder.tvStepName.setBackgroundResource(R.drawable.bg_step_current_badge)
|
||||
holder.tvStepName.setTextColor(0xFFFFFFFF.toInt())
|
||||
} else {
|
||||
holder.tvStepName.setBackgroundResource(0)
|
||||
holder.tvStepName.setTextColor(
|
||||
if (isCompleted) 0xFF333333.toInt() else 0xFF999999.toInt()
|
||||
)
|
||||
}
|
||||
holder.tvStepName.text = step
|
||||
|
||||
// 圆点
|
||||
holder.dotView.setBackgroundResource(
|
||||
when {
|
||||
isCurrent -> R.drawable.bg_step_dot_green
|
||||
isCompleted -> R.drawable.bg_step_dot_blue
|
||||
else -> R.drawable.bg_step_dot_gray
|
||||
}
|
||||
)
|
||||
|
||||
// 左侧连线
|
||||
holder.lineLeft.visibility = if (isFirst) View.INVISIBLE else View.VISIBLE
|
||||
holder.lineLeft.setBackgroundColor(
|
||||
if (isCompleted) 0xFF1C8CF5.toInt() else 0xFFCCCCCC.toInt()
|
||||
)
|
||||
|
||||
// 右侧连线
|
||||
holder.lineRight.visibility = if (isLast) View.INVISIBLE else View.VISIBLE
|
||||
holder.lineRight.setBackgroundColor(
|
||||
if (isCompleted && position < currentIndex) 0xFF1C8CF5.toInt() else 0xFFCCCCCC.toInt()
|
||||
)
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = steps.size
|
||||
|
||||
class StepViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
val tvStepName: TextView = view.findViewById(R.id.tv_step_name)
|
||||
val dotView: View = view.findViewById(R.id.view_dot)
|
||||
val lineLeft: View = view.findViewById(R.id.view_line_left)
|
||||
val lineRight: View = view.findViewById(R.id.view_line_right)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.lukouguoji.aerologic.page.log.detail
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.lukouguoji.aerologic.R
|
||||
import com.lukouguoji.module_base.bean.StatusLogBean
|
||||
|
||||
class LogDetailTimelineAdapter : RecyclerView.Adapter<LogDetailTimelineAdapter.TimelineViewHolder>() {
|
||||
|
||||
private var items: List<StatusLogBean> = emptyList()
|
||||
|
||||
fun setData(list: List<StatusLogBean>) {
|
||||
items = list
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): TimelineViewHolder {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_log_timeline, parent, false)
|
||||
return TimelineViewHolder(view)
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: TimelineViewHolder, position: Int) {
|
||||
val item = items[position]
|
||||
val isFirst = position == 0
|
||||
val isLast = position == items.size - 1
|
||||
|
||||
holder.tvContent.text = item.content
|
||||
holder.tvTime.text = item.opDate
|
||||
|
||||
// 最后一项(当前步骤)用绿色圆点
|
||||
holder.dotView.setBackgroundResource(
|
||||
if (isLast) R.drawable.bg_timeline_dot_green
|
||||
else R.drawable.bg_timeline_dot_gray
|
||||
)
|
||||
|
||||
// 第一项不显示顶部连线
|
||||
holder.lineTop.visibility = if (isFirst) View.INVISIBLE else View.VISIBLE
|
||||
|
||||
// 最后一项不显示底部连线
|
||||
holder.lineBottom.visibility = if (isLast) View.INVISIBLE else View.VISIBLE
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = items.size
|
||||
|
||||
class TimelineViewHolder(view: View) : RecyclerView.ViewHolder(view) {
|
||||
val dotView: View = view.findViewById(R.id.view_dot)
|
||||
val lineTop: View = view.findViewById(R.id.view_line_top)
|
||||
val lineBottom: View = view.findViewById(R.id.view_line_bottom)
|
||||
val tvContent: TextView = view.findViewById(R.id.tv_content)
|
||||
val tvTime: TextView = view.findViewById(R.id.tv_time)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.lukouguoji.aerologic.page.log.detail
|
||||
|
||||
import android.content.Intent
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.google.gson.Gson
|
||||
import com.lukouguoji.module_base.base.BaseViewModel
|
||||
import com.lukouguoji.module_base.bean.LogBean
|
||||
import com.lukouguoji.module_base.bean.StatusLogBean
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.ktx.launchCollect
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
|
||||
class LogDetailViewModel : BaseViewModel() {
|
||||
|
||||
val waybillNo = MutableLiveData("")
|
||||
val waybillType = MutableLiveData("")
|
||||
|
||||
val statusLogList = MutableLiveData<List<StatusLogBean>>(emptyList())
|
||||
|
||||
// 流转状态步骤定义
|
||||
val allSteps = listOf(
|
||||
"预录入", "完成收运", "运抵申报", "海关放行",
|
||||
"完成组装", "完成复磅", "装载申报", "航班关闭", "理货申报"
|
||||
)
|
||||
|
||||
// 当前完成到哪一步(索引)
|
||||
val currentStepIndex = MutableLiveData(-1)
|
||||
|
||||
fun initOnCreated(intent: Intent) {
|
||||
val json = intent.getStringExtra(Constant.Key.DATA) ?: ""
|
||||
if (json.isNotEmpty()) {
|
||||
val bean = Gson().fromJson(json, LogBean::class.java)
|
||||
waybillNo.value = bean.key
|
||||
waybillType.value = getAwbTypeName(bean.logType)
|
||||
loadStatusList(bean.key, bean.logType)
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadStatusList(key: String, logType: String) {
|
||||
if (key.isEmpty()) {
|
||||
loadMockData()
|
||||
return
|
||||
}
|
||||
launchCollect({
|
||||
NetApply.api.getLogStatusList(
|
||||
mapOf(
|
||||
"key" to key,
|
||||
"awbType" to logType
|
||||
).toRequestBody()
|
||||
)
|
||||
}) {
|
||||
onSuccess = {
|
||||
val list = it.data ?: emptyList()
|
||||
if (list.isNotEmpty()) {
|
||||
statusLogList.value = list
|
||||
val lastStatus = list.last().content
|
||||
val index = allSteps.indexOfFirst { step ->
|
||||
lastStatus.contains(step)
|
||||
}
|
||||
currentStepIndex.value = if (index >= 0) index else list.size - 1
|
||||
} else {
|
||||
loadMockData()
|
||||
}
|
||||
}
|
||||
onFailed = { _, _ ->
|
||||
loadMockData()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadMockData() {
|
||||
// Mock 数据:模拟到"装载申报"步骤
|
||||
currentStepIndex.value = 6 // "装载申报" 在 allSteps 中的索引
|
||||
|
||||
statusLogList.value = listOf(
|
||||
StatusLogBean(content = "托书录入", opDate = "2017-04-01 12:00:00"),
|
||||
StatusLogBean(content = "完成收运", opDate = "2017-04-01 12:00:00"),
|
||||
StatusLogBean(content = "完成组装", opDate = "2017-04-01 12:00:00"),
|
||||
StatusLogBean(content = "已复磅", opDate = "2017-04-01 12:00:00"),
|
||||
StatusLogBean(content = "海关已放行", opDate = "2017-04-01 12:00:00"),
|
||||
StatusLogBean(content = "装载申报", opDate = "2017-04-01 12:00:00")
|
||||
)
|
||||
}
|
||||
|
||||
private fun getAwbTypeName(logType: String): String {
|
||||
return when (logType) {
|
||||
"CI" -> "国内进港"
|
||||
"CO" -> "国内出港"
|
||||
"II" -> "国际进港"
|
||||
"IO" -> "国际出港"
|
||||
else -> logType
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.lukouguoji.aerologic.page.log.list
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.aerologic.R
|
||||
import com.lukouguoji.aerologic.databinding.ActivityLogQueryBinding
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.ktx.getLifecycleOwner
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_LOG_QUERY)
|
||||
class LogQueryActivity : BaseBindingActivity<ActivityLogQueryBinding, LogQueryViewModel>() {
|
||||
|
||||
override fun layoutId(): Int {
|
||||
return R.layout.activity_log_query
|
||||
}
|
||||
|
||||
override fun viewModelClass(): Class<LogQueryViewModel> {
|
||||
return LogQueryViewModel::class.java
|
||||
}
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("日志查询")
|
||||
binding.viewModel = viewModel
|
||||
viewModel.pageModel.bindSmartRefreshLayout(
|
||||
binding.srl,
|
||||
binding.rv,
|
||||
viewModel,
|
||||
getLifecycleOwner()
|
||||
)
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context) {
|
||||
val starter = Intent(context, LogQueryActivity::class.java)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.lukouguoji.aerologic.page.log.list
|
||||
|
||||
import android.view.View
|
||||
import com.lukouguoji.aerologic.databinding.ItemLogQueryBinding
|
||||
import com.lukouguoji.aerologic.page.log.detail.LogDetailActivity
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.bean.LogBean
|
||||
|
||||
class LogQueryViewHolder(view: View) : BaseViewHolder<LogBean, ItemLogQueryBinding>(view) {
|
||||
|
||||
override fun onBind(item: Any?, position: Int) {
|
||||
val bean = getItemBean(item)
|
||||
binding.bean = bean
|
||||
itemView.setOnClickListener {
|
||||
bean?.let { LogDetailActivity.start(itemView.context, it) }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.lukouguoji.aerologic.page.log.list
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.lukouguoji.aerologic.R
|
||||
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||
import com.lukouguoji.module_base.bean.LogBean
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.ktx.formatDate
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import dev.utils.common.DateUtils
|
||||
|
||||
class LogQueryViewModel : BasePageViewModel() {
|
||||
|
||||
val startDate = MutableLiveData(DateUtils.getCurrentTime().formatDate())
|
||||
val endDate = MutableLiveData("")
|
||||
|
||||
val keyWord = MutableLiveData("")
|
||||
val operatorId = MutableLiveData("")
|
||||
|
||||
val count = MutableLiveData(0)
|
||||
|
||||
val itemLayoutId = R.layout.item_log_query
|
||||
val itemViewHolder = LogQueryViewHolder::class.java
|
||||
|
||||
fun searchClick() {
|
||||
refresh()
|
||||
}
|
||||
|
||||
override fun getData() {
|
||||
launchLoadingCollect({
|
||||
NetApply.api.getLogList(
|
||||
mapOf(
|
||||
"pageNum" to pageModel.page,
|
||||
"pageSize" to pageModel.limit,
|
||||
"startTime" to startDate.value,
|
||||
"endTime" to endDate.value,
|
||||
"key" to keyWord.value,
|
||||
"opId" to operatorId.value,
|
||||
).toRequestBody()
|
||||
)
|
||||
}) {
|
||||
onSuccess = {
|
||||
pageModel.handleListBean(it)
|
||||
count.value = it.total
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,7 @@ import com.lukouguoji.aerologic.page.gnj.query.list.GnjQueryListActivity
|
||||
import com.lukouguoji.aerologic.page.gnj.stash.list.GnjStashListActivity
|
||||
import com.lukouguoji.aerologic.page.gnj.unload.list.GnjUnloadListActivity
|
||||
import com.lukouguoji.aerologic.page.log.list.LogListActivity
|
||||
import com.lukouguoji.aerologic.page.log.list.LogQueryActivity
|
||||
import com.lukouguoji.aerologic.page.message.list.MessageListActivity
|
||||
import com.lukouguoji.aerologic.page.telegram.list.TelegramListActivity
|
||||
import com.lukouguoji.aerologic.page.test.PrintActivity
|
||||
@@ -106,7 +107,9 @@ class HomeFragment : Fragment() {
|
||||
if (Constant.AuthName.Flight == leftMenuTemp.id) {
|
||||
// ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_HANG_BAN_QUERY)
|
||||
// .navigation(activity, Constant.RequestCode.home_left_hang_ban_query)
|
||||
FlightQueryListActivity.start(requireContext())
|
||||
// FlightQueryListActivity.start(requireContext()) // 已废弃
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_HB_QUERY_LIST)
|
||||
.navigation()
|
||||
mPosition = oldPosition
|
||||
}
|
||||
//货物查询
|
||||
@@ -548,7 +551,7 @@ class HomeFragment : Fragment() {
|
||||
}
|
||||
// 日志查询
|
||||
Constant.AuthName.ComprehensiveLog -> {
|
||||
LogListActivity.start(requireContext())
|
||||
LogQueryActivity.start(requireContext())
|
||||
}
|
||||
// ULD管理
|
||||
Constant.AuthName.ComprehensiveUld -> {
|
||||
|
||||
6
app/src/main/res/drawable/bg_step_current_badge.xml
Normal file
6
app/src/main/res/drawable/bg_step_current_badge.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#4CAF50" />
|
||||
<corners android:radius="4dp" />
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/bg_step_dot_blue.xml
Normal file
5
app/src/main/res/drawable/bg_step_dot_blue.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#FF1C8CF5" />
|
||||
</shape>
|
||||
8
app/src/main/res/drawable/bg_step_dot_gray.xml
Normal file
8
app/src/main/res/drawable/bg_step_dot_gray.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<stroke
|
||||
android:width="1.5dp"
|
||||
android:color="#CCCCCC" />
|
||||
<solid android:color="#FFFFFF" />
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/bg_step_dot_green.xml
Normal file
5
app/src/main/res/drawable/bg_step_dot_green.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#4CAF50" />
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/bg_timeline_dot_gray.xml
Normal file
5
app/src/main/res/drawable/bg_timeline_dot_gray.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#CCCCCC" />
|
||||
</shape>
|
||||
5
app/src/main/res/drawable/bg_timeline_dot_green.xml
Normal file
5
app/src/main/res/drawable/bg_timeline_dot_green.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="#4CAF50" />
|
||||
</shape>
|
||||
@@ -13,265 +13,268 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/backgroud_gray"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="0dp">
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
android:padding="15dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp">
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
title='@{"航班日期:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.fdate}'
|
||||
android:layout_width="0dp"
|
||||
<!-- 第1行:航班日期、航班号、航程 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"航班号:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.fno}'
|
||||
android:layout_width="0dp"
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"航班日期"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.fdate}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"航班号"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.fno}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"航程"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.range}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第2行:地区类型、服务类型、经停站 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"航程:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.range}'
|
||||
android:layout_width="0dp"
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"地区类型"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.countryType}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"服务类型"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.serviceType}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"经停站"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.jtz}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第3行:计划起飞、预计起飞、实际起飞 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
</LinearLayout>
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"计划起飞"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.scheduledTackOff}' />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp">
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"预计起飞"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.estimatedTakeOff}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
title='@{"地区类型:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@{viewModel.dataBean.countryType}'
|
||||
android:layout_width="0dp"
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"实际起飞"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.actualTakeOff}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第4行:计划降落、预计降落、实际降落 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
title='@{"服务类型:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@{viewModel.dataBean.serviceType}'
|
||||
android:layout_width="0dp"
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"计划降落"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.scheduledArrival}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"预计降落"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.estimatedArrival}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"实际降落"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.actualArrival}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第5行:飞行状态、航班状态、延误原因 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
title='@{"经停站:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.jtz}'
|
||||
android:layout_width="0dp"
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"飞行状态"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.portCode}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"航班状态"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.flightStatus}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"延误原因"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.delayFreeText}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第6行:机号、机型、机位 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
</LinearLayout>
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"机号"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.registration}' />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp">
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"机型"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.aircraftCode}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"计划起飞:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.scheduledTackOff}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"机位"}'
|
||||
titleLength="@{4}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.standId}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"预计起飞:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.estimatedTakeOff}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"实际起飞:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.actualTakeOff}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
title='@{"计划降落:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.scheduledArrival}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"预计降落:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.estimatedArrival}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"实际降落:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.actualArrival}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
title='@{"飞行状态:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@{viewModel.dataBean.portCode}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"航班状态:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@{viewModel.dataBean.flightStatus}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"延误原因:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.delayFreeText}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="10dp">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
title='@{"机号:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.registration}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"机型:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.aircraftCode}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
enable="@{false}"
|
||||
hint='@{" "}'
|
||||
title='@{"机位:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.standId}'
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="#5c6890"
|
||||
android:gravity="center_vertical|end"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
</layout>
|
||||
|
||||
159
app/src/main/res/layout/activity_log_detail.xml
Normal file
159
app/src/main/res/layout/activity_log_detail.xml
Normal file
@@ -0,0 +1,159 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.aerologic.page.log.detail.LogDetailViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
<!-- 运单信息 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单信息"
|
||||
android:textColor="#333333"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单号: "
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{viewModel.waybillNo}"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单类型: "
|
||||
android:textColor="#666666"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{viewModel.waybillType}"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 流转状态 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="流转状态"
|
||||
android:textColor="#333333"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_steps"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:orientation="horizontal" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 操作详情 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="操作详情"
|
||||
android:textColor="#333333"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_timeline"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:nestedScrollingEnabled="false"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
119
app/src/main/res/layout/activity_log_query.xml
Normal file
119
app/src/main/res/layout/activity_log_query.xml
Normal file
@@ -0,0 +1,119 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.aerologic.page.log.list.LogQueryViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请选择航班日期起"}'
|
||||
icon="@{@drawable/img_date}"
|
||||
type="@{SearchLayoutType.DATE}"
|
||||
value="@={viewModel.startDate}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请选择航班日期止"}'
|
||||
icon="@{@drawable/img_date}"
|
||||
type="@{SearchLayoutType.DATE}"
|
||||
value="@={viewModel.endDate}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请输入关键字"}'
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.keyWord}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请输入操作员ID"}'
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.operatorId}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<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" />
|
||||
|
||||
</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"
|
||||
itemLayoutId="@{viewModel.itemLayoutId}"
|
||||
viewHolder="@{viewModel.itemViewHolder}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_log_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">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{"合计:" + viewModel.count + "条"}'
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="合计:1条" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
123
app/src/main/res/layout/item_log_query.xml
Normal file
123
app/src/main/res/layout/item_log_query.xml
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="bean"
|
||||
type="com.lukouguoji.module_base.bean.LogBean" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:background="@drawable/bg_item"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp">
|
||||
|
||||
<!-- 第一行:关键字 | 日志类型 | 操作员 | 操作时间 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="关键字 " />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.key}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="日志类型 " />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.logType}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="操作员 " />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.opId}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.3"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="操作时间 " />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.opTime}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第二行:操作内容 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="操作内容 " />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.content}" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
52
app/src/main/res/layout/item_log_step.xml
Normal file
52
app/src/main/res/layout/item_log_step.xml
Normal file
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="4dp">
|
||||
|
||||
<!-- 步骤名称 -->
|
||||
<TextView
|
||||
android:id="@+id/tv_step_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp" />
|
||||
|
||||
<!-- 圆点和连线区域 -->
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginTop="6dp">
|
||||
|
||||
<!-- 左侧连线 -->
|
||||
<View
|
||||
android:id="@+id/view_line_left"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toLeftOf="@+id/view_dot"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:background="#FF1C8CF5" />
|
||||
|
||||
<!-- 圆点 -->
|
||||
<View
|
||||
android:id="@+id/view_dot"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/bg_step_dot_blue" />
|
||||
|
||||
<!-- 右侧连线 -->
|
||||
<View
|
||||
android:id="@+id/view_line_right"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="2dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_toRightOf="@+id/view_dot"
|
||||
android:layout_alignParentRight="true"
|
||||
android:background="#FF1C8CF5" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
68
app/src/main/res/layout/item_log_timeline.xml
Normal file
68
app/src/main/res/layout/item_log_timeline.xml
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
<!-- 左侧:圆点 + 连线 -->
|
||||
<RelativeLayout
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginRight="12dp">
|
||||
|
||||
<!-- 顶部连线 -->
|
||||
<View
|
||||
android:id="@+id/view_line_top"
|
||||
android:layout_width="1.5dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="#E0E0E0" />
|
||||
|
||||
<!-- 圆点 -->
|
||||
<View
|
||||
android:id="@+id/view_dot"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:layout_below="@+id/view_line_top"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@drawable/bg_timeline_dot_gray" />
|
||||
|
||||
<!-- 底部连线 -->
|
||||
<View
|
||||
android:id="@+id/view_line_bottom"
|
||||
android:layout_width="1.5dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_below="@+id/view_dot"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="#E0E0E0" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- 右侧:内容 + 时间 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="20dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_content"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#333333"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="4dp"
|
||||
android:textColor="#999999"
|
||||
android:textSize="13sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -151,6 +151,46 @@ class FlightBean : ICheck {
|
||||
).noNull(scheduledTackOff)
|
||||
}
|
||||
|
||||
// 预计起飞时间-时分
|
||||
val estimatedTakeOffHM: String
|
||||
get() {
|
||||
return DateUtils.parseString(
|
||||
estimatedTakeOff,
|
||||
DevFinal.TIME.yyyyMMddHHmmss_HYPHEN,
|
||||
"HH:mm"
|
||||
).noNull(estimatedTakeOff)
|
||||
}
|
||||
|
||||
// 计划降落时间-时分
|
||||
val scheduledArrivalHM: String
|
||||
get() {
|
||||
return DateUtils.parseString(
|
||||
scheduledArrival,
|
||||
DevFinal.TIME.yyyyMMddHHmmss_HYPHEN,
|
||||
"HH:mm"
|
||||
).noNull(scheduledArrival)
|
||||
}
|
||||
|
||||
// 预计降落时间-时分
|
||||
val estimatedArrivalHM: String
|
||||
get() {
|
||||
return DateUtils.parseString(
|
||||
estimatedArrival,
|
||||
DevFinal.TIME.yyyyMMddHHmmss_HYPHEN,
|
||||
"HH:mm"
|
||||
).noNull(estimatedArrival)
|
||||
}
|
||||
|
||||
// 实际降落时间-时分
|
||||
val actualArrivalHM: String
|
||||
get() {
|
||||
return DateUtils.parseString(
|
||||
actualArrival,
|
||||
DevFinal.TIME.yyyyMMddHHmmss_HYPHEN,
|
||||
"HH:mm"
|
||||
).noNull(actualArrival)
|
||||
}
|
||||
|
||||
// 航班服务种类(0:客机;1:货机;2:卡车)
|
||||
var serviceType: String = ""
|
||||
|
||||
@@ -219,6 +259,50 @@ class FlightBean : ICheck {
|
||||
return calendar.get(Calendar.DAY_OF_YEAR) > current.get(Calendar.DAY_OF_YEAR)
|
||||
}
|
||||
|
||||
// 预计起飞 vs 计划起飞 是否跨日
|
||||
fun isEstimatedTakeOffNextDay(): Boolean {
|
||||
if (scheduledTackOff.isEmpty() || estimatedTakeOff.isEmpty()) return false
|
||||
return try {
|
||||
val calBase = DateUtils.getCalendar(DateUtils.parseDate(scheduledTackOff))
|
||||
val calTarget = DateUtils.getCalendar(DateUtils.parseDate(estimatedTakeOff))
|
||||
if (calTarget.get(Calendar.YEAR) > calBase.get(Calendar.YEAR)) true
|
||||
else calTarget.get(Calendar.DAY_OF_YEAR) > calBase.get(Calendar.DAY_OF_YEAR)
|
||||
} catch (e: Exception) { false }
|
||||
}
|
||||
|
||||
// 实际起飞 vs 计划起飞 是否跨日
|
||||
fun isActualTakeOffNextDay(): Boolean {
|
||||
if (scheduledTackOff.isEmpty() || actualTakeOff.isEmpty()) return false
|
||||
return try {
|
||||
val calBase = DateUtils.getCalendar(DateUtils.parseDate(scheduledTackOff))
|
||||
val calTarget = DateUtils.getCalendar(DateUtils.parseDate(actualTakeOff))
|
||||
if (calTarget.get(Calendar.YEAR) > calBase.get(Calendar.YEAR)) true
|
||||
else calTarget.get(Calendar.DAY_OF_YEAR) > calBase.get(Calendar.DAY_OF_YEAR)
|
||||
} catch (e: Exception) { false }
|
||||
}
|
||||
|
||||
// 预计降落 vs 计划降落 是否跨日
|
||||
fun isEstimatedArrivalNextDay(): Boolean {
|
||||
if (scheduledArrival.isEmpty() || estimatedArrival.isEmpty()) return false
|
||||
return try {
|
||||
val calBase = DateUtils.getCalendar(DateUtils.parseDate(scheduledArrival))
|
||||
val calTarget = DateUtils.getCalendar(DateUtils.parseDate(estimatedArrival))
|
||||
if (calTarget.get(Calendar.YEAR) > calBase.get(Calendar.YEAR)) true
|
||||
else calTarget.get(Calendar.DAY_OF_YEAR) > calBase.get(Calendar.DAY_OF_YEAR)
|
||||
} catch (e: Exception) { false }
|
||||
}
|
||||
|
||||
// 实际降落 vs 计划降落 是否跨日
|
||||
fun isActualArrivalNextDay(): Boolean {
|
||||
if (scheduledArrival.isEmpty() || actualArrival.isEmpty()) return false
|
||||
return try {
|
||||
val calBase = DateUtils.getCalendar(DateUtils.parseDate(scheduledArrival))
|
||||
val calTarget = DateUtils.getCalendar(DateUtils.parseDate(actualArrival))
|
||||
if (calTarget.get(Calendar.YEAR) > calBase.get(Calendar.YEAR)) true
|
||||
else calTarget.get(Calendar.DAY_OF_YEAR) > calBase.get(Calendar.DAY_OF_YEAR)
|
||||
} catch (e: Exception) { false }
|
||||
}
|
||||
|
||||
fun getCargoTypeName(): String {
|
||||
return when (cargoType) {
|
||||
"0" -> "国际货"
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
data class StatusLogBean(
|
||||
var id: Long = 0,
|
||||
var key: String = "", // 关键字(运单号)
|
||||
var awbType: String = "", // 运单类型(CI:国内进港,CO:国内出港,II:国际进港,IO:国际出港)
|
||||
var content: String = "", // 操作内容
|
||||
var opDate: String = "", // 操作时间
|
||||
var opId: String = "", // 操作人
|
||||
var status: String = "" // 操作环节(运单状态)
|
||||
)
|
||||
@@ -80,6 +80,7 @@ import com.lukouguoji.module_base.bean.GnjYiKuBean
|
||||
import com.lukouguoji.module_base.bean.GoodsTransportBean
|
||||
import com.lukouguoji.module_base.bean.JianDataBean
|
||||
import com.lukouguoji.module_base.bean.LogBean
|
||||
import com.lukouguoji.module_base.bean.StatusLogBean
|
||||
import com.lukouguoji.module_base.bean.ManifestTotalDto
|
||||
import com.lukouguoji.module_base.bean.MessageBean
|
||||
import com.lukouguoji.module_base.bean.MoveStashBean
|
||||
@@ -1466,6 +1467,12 @@ interface Api {
|
||||
@POST("log/pageQuery")
|
||||
suspend fun getLogList(@Body data: RequestBody): BaseListBean<LogBean>
|
||||
|
||||
/**
|
||||
* 获取-运单状态列表(关键词-运单号、运单类型必填)
|
||||
*/
|
||||
@POST("log/listStatus")
|
||||
suspend fun getLogStatusList(@Body data: RequestBody): BaseResultBean<List<StatusLogBean>>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 国内进港-舱单
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -184,8 +184,10 @@ object ARouterConstants {
|
||||
/**
|
||||
* 航班查询模块
|
||||
*/
|
||||
const val ACTIVITY_URL_HANG_BAN_QUERY = "/hb/HangBanQueryActivity" //航班查询模块
|
||||
const val ACTIVITY_URL_HANG_BAN_QUERY_INFO = "/hb/HangBanQueryInfoActivity" //航班查询模块
|
||||
const val ACTIVITY_URL_HANG_BAN_QUERY = "/hb/HangBanQueryActivity" //航班查询模块(旧版)
|
||||
const val ACTIVITY_URL_HANG_BAN_QUERY_INFO = "/hb/HangBanQueryInfoActivity" //航班查询模块(旧版)
|
||||
const val ACTIVITY_URL_HB_QUERY_LIST = "/hb/HbQueryListActivity" //航班管理 列表(新版)
|
||||
const val ACTIVITY_URL_FLIGHT_QUERY_DETAILS = "/app/FlightQueryDetailsActivity" //航班详情
|
||||
|
||||
///////////////// 货物追踪模块
|
||||
/**
|
||||
@@ -215,5 +217,7 @@ object ARouterConstants {
|
||||
|
||||
///////////////// 综合管理
|
||||
const val ACTIVITY_URL_COLD_STORAGE = "/app/ColdStorageActivity" //冷库登记
|
||||
const val ACTIVITY_URL_LOG_QUERY = "/app/LogQueryActivity" //日志查询
|
||||
const val ACTIVITY_URL_LOG_DETAIL = "/app/LogDetailActivity" //操作日志详情
|
||||
|
||||
}
|
||||
@@ -30,7 +30,8 @@ import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_HANG_BAN_QUERY)
|
||||
// @Route(path = ARouterConstants.ACTIVITY_URL_HANG_BAN_QUERY) // 已废弃,使用 HbQueryListActivity
|
||||
@Deprecated("使用 HbQueryListActivity 替代")
|
||||
class HangBanQueryActivity : BaseActivity(), View.OnClickListener {
|
||||
private val currentTitleName = "航班查询"
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.lukouguoji.hangban.page.query.list
|
||||
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.hangban.R
|
||||
import com.lukouguoji.hangban.databinding.ActivityHbQueryListBinding
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.ktx.addOnItemClickListener
|
||||
import com.lukouguoji.module_base.ktx.getLifecycleOwner
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_HB_QUERY_LIST)
|
||||
class HbQueryListActivity :
|
||||
BaseBindingActivity<ActivityHbQueryListBinding, HbQueryListViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_hb_query_list
|
||||
|
||||
override fun viewModelClass() = HbQueryListViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("航班管理")
|
||||
|
||||
binding.viewModel = viewModel
|
||||
viewModel.pageModel
|
||||
.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, getLifecycleOwner())
|
||||
|
||||
binding.rv.addOnItemClickListener(viewModel)
|
||||
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.lukouguoji.hangban.page.query.list
|
||||
|
||||
import android.view.View
|
||||
import com.lukouguoji.hangban.databinding.ItemHbQueryListBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.bean.FlightBean
|
||||
|
||||
class HbQueryListViewHolder(view: View) :
|
||||
BaseViewHolder<FlightBean, ItemHbQueryListBinding>(view) {
|
||||
|
||||
override fun onBind(item: Any?, position: Int) {
|
||||
val bean = getItemBean(item)!!
|
||||
binding.bean = bean
|
||||
|
||||
// 到达航班显示橙色
|
||||
val color = if (bean.beArrival()) {
|
||||
android.graphics.Color.parseColor("#FF8C00")
|
||||
} else {
|
||||
android.graphics.Color.parseColor("#333333")
|
||||
}
|
||||
setTextColorRecursive(binding.ll, color)
|
||||
|
||||
notifyItemClick(position, binding.ll)
|
||||
}
|
||||
|
||||
private fun setTextColorRecursive(view: View, color: Int) {
|
||||
if (view is android.widget.TextView) {
|
||||
view.setTextColor(color)
|
||||
} else if (view is android.view.ViewGroup) {
|
||||
for (i in 0 until view.childCount) {
|
||||
setTextColorRecursive(view.getChildAt(i), color)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package com.lukouguoji.hangban.page.query.list
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.lukouguoji.hangban.R
|
||||
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||
import com.lukouguoji.module_base.bean.FlightBean
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||
import com.lukouguoji.module_base.ktx.formatDate
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
import com.lukouguoji.module_base.util.DictUtils
|
||||
import dev.utils.app.info.KeyValue
|
||||
import dev.utils.common.DateUtils
|
||||
|
||||
class HbQueryListViewModel : BasePageViewModel() {
|
||||
|
||||
val date = MutableLiveData(DateUtils.getCurrentTime().formatDate())
|
||||
val fNo = MutableLiveData("")
|
||||
val range = MutableLiveData("")
|
||||
val addressType = MutableLiveData("")
|
||||
val serviceType = MutableLiveData("")
|
||||
|
||||
val addressTypeList = MutableLiveData(listOf(KeyValue("全部", ""))).apply {
|
||||
DictUtils.getAreaTypeList {
|
||||
value = it
|
||||
}
|
||||
}
|
||||
val serviceTypeList = MutableLiveData(
|
||||
listOf(
|
||||
KeyValue("全部", ""),
|
||||
KeyValue("客机", "0"),
|
||||
KeyValue("货机", "1"),
|
||||
KeyValue("卡车", "2"),
|
||||
)
|
||||
)
|
||||
|
||||
val itemLayoutId = R.layout.item_hb_query_list
|
||||
val itemViewHolder = HbQueryListViewHolder::class.java
|
||||
|
||||
val count = MutableLiveData(0)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 方法区
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
fun searchClick() {
|
||||
refresh()
|
||||
}
|
||||
|
||||
override fun getData() {
|
||||
launchLoadingCollect({
|
||||
NetApply.api.getFlightList(
|
||||
mapOf(
|
||||
"page" to pageModel.page,
|
||||
"limit" to pageModel.limit,
|
||||
"fdate" to date.value,
|
||||
"fno" to fNo.value,
|
||||
"range" to range.value,
|
||||
"countryType" to addressType.value,
|
||||
"serviceType" to serviceType.value,
|
||||
).toRequestBody()
|
||||
)
|
||||
}) {
|
||||
onSuccess = {
|
||||
pageModel.handleListBean(it)
|
||||
count.value = it.total
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onItemClick(position: Int, type: Int) {
|
||||
val bean = pageModel.rv!!.commonAdapter()!!.getItem(position) as FlightBean
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_FLIGHT_QUERY_DETAILS)
|
||||
.withString(Constant.Key.ID, bean.fid)
|
||||
.navigation()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,6 +13,11 @@
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".page.query.list.HbQueryListActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="userLandscape"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
|
||||
141
module_hangban/src/main/res/layout/activity_hb_query_list.xml
Normal file
141
module_hangban/src/main/res/layout/activity_hb_query_list.xml
Normal file
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.hangban.page.query.list.HbQueryListViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请选择航班日期"}'
|
||||
icon='@{@drawable/img_date}'
|
||||
type="@{SearchLayoutType.DATE}"
|
||||
value="@={viewModel.date}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请输入航班号"}'
|
||||
setTextAllCaps="@{true}"
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.fNo}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请输入航程"}'
|
||||
setTextAllCaps="@{true}"
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.range}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请选择地区类型"}'
|
||||
list="@{viewModel.addressTypeList}"
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
value="@={viewModel.addressType}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
hint='@{"请选择服务类型"}'
|
||||
list="@{viewModel.serviceTypeList}"
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
value="@={viewModel.serviceType}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<!-- 搜索按钮 -->
|
||||
<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" />
|
||||
|
||||
</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"
|
||||
itemLayoutId="@{viewModel.itemLayoutId}"
|
||||
viewHolder="@{viewModel.itemViewHolder}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_hb_query_list" />
|
||||
|
||||
</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="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{"合计:"+viewModel.count+"条"}'
|
||||
android:textColor="@color/bottom_tool_tips_text_color"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="合计:3条" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
284
module_hangban/src/main/res/layout/item_hb_query_list.xml
Normal file
284
module_hangban/src/main/res/layout/item_hb_query_list.xml
Normal file
@@ -0,0 +1,284 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="bean"
|
||||
type="com.lukouguoji.module_base.bean.FlightBean" />
|
||||
</data>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:background="@drawable/bg_item"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<!-- 左侧飞机图标 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/img_plane" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="航班日期:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.fdate}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="航班号:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.fno}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="航程:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.range}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="地区类型:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.getCountryTypeName()}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="计划起飞:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.scheduledTackOffHM}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="预计起飞:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.estimatedTakeOffHM}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="+1"
|
||||
android:textColor="@color/text_red"
|
||||
android:visibility="@{bean.isEstimatedTakeOffNextDay() ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="实际起飞:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.actualTakeOffHM}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="+1"
|
||||
android:textColor="@color/text_red"
|
||||
android:visibility="@{bean.isActualTakeOffNextDay() ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="计划降落:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.scheduledArrivalHM}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="预计降落:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.estimatedArrivalHM}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="+1"
|
||||
android:textColor="@color/text_red"
|
||||
android:visibility="@{bean.isEstimatedArrivalNextDay() ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
completeSpace="@{5}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="实际降落:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.actualArrivalHM}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="+1"
|
||||
android:textColor="@color/text_red"
|
||||
android:visibility="@{bean.isActualArrivalNextDay() ? View.VISIBLE : View.GONE}" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:src="@drawable/img_pda_right" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</layout>
|
||||
Reference in New Issue
Block a user