feat: 国际事故签证新增/编辑页面及列表侧滑菜单
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -529,6 +529,12 @@
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpAccidentVisaEditActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<service android:name="com.huitao.printer.service.PrinterService" />
|
||||
<service android:name="com.lukouguoji.gnc.bluetooth.service.AncillaryService" />
|
||||
<service android:name="com.lukouguoji.gnc.bluetooth.service.MyService" />
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
class GjAccidentVisaEditBean {
|
||||
var id: Long = 0
|
||||
var fdate: String = "" // 航班日期
|
||||
var fno: String = "" // 航班号
|
||||
var dep: String = "" // 始发站
|
||||
var dest: String = "" // 目的站
|
||||
var wbNo: String = "" // 运单号
|
||||
var dpc: String = "" // 不正常件数
|
||||
var pc: String = "" // 运单总件数
|
||||
var weight: String = "" // 运单总重量
|
||||
var reweight: String = "" // 复称重量
|
||||
var goods: String = "" // 品名
|
||||
var opacking: String = "" // 外包装
|
||||
var damage: String = "" // 包装破损情况
|
||||
var condition: String = "" // 内容物情况
|
||||
var problem: String = "" // 不正常类型
|
||||
var seachDate: String = "" // 发现时间
|
||||
var photo: String = "" // 图片是否留底
|
||||
var remarks: String = "" // 备注
|
||||
var pic: String = "" // 缩略图
|
||||
var originalPic: String = "" // 原图
|
||||
var picNumber: String = "" // 图片数量
|
||||
var idFlag: String = "1" // 国际标志(固定为1=国际)
|
||||
}
|
||||
@@ -51,6 +51,7 @@ import com.lukouguoji.module_base.bean.GjjGoodsDetailsBean
|
||||
import com.lukouguoji.module_base.bean.GjjGoodsTypeBean
|
||||
import com.lukouguoji.module_base.bean.GjjHandoverRecordBean
|
||||
import com.lukouguoji.module_base.bean.GjjImportTally
|
||||
import com.lukouguoji.module_base.bean.GjAccidentVisaEditBean
|
||||
import com.lukouguoji.module_base.bean.IntImpAccidentVisaBean
|
||||
import com.lukouguoji.module_base.bean.IntImpPickUpDLVBean
|
||||
import com.lukouguoji.module_base.bean.IntImpPickUpRecordBean
|
||||
@@ -1962,6 +1963,42 @@ interface Api {
|
||||
@POST("GjAccidentVisa/delete")
|
||||
suspend fun deleteIntImpAccidentVisa(@Body data: RequestBody): BaseResultBean<String>
|
||||
|
||||
/**
|
||||
* 国际事故签证-新增
|
||||
*/
|
||||
@POST("GjAccidentVisa/saveVisa")
|
||||
suspend fun saveGjAccidentVisa(@Body data: RequestBody): BaseResultBean<String>
|
||||
|
||||
/**
|
||||
* 国际事故签证-修改
|
||||
*/
|
||||
@POST("GjAccidentVisa/modifyVisa")
|
||||
suspend fun modifyGjAccidentVisa(@Body data: RequestBody): BaseResultBean<String>
|
||||
|
||||
/**
|
||||
* 国际事故签证-详情
|
||||
*/
|
||||
@POST("GjAccidentVisa/detail")
|
||||
suspend fun getGjAccidentVisaDetail(@Query("id") id: Long): BaseResultBean<GjAccidentVisaEditBean>
|
||||
|
||||
/**
|
||||
* 字典-破损情况
|
||||
*/
|
||||
@POST("typeCode/damageType")
|
||||
suspend fun getDamageTypeList(): DictListBean
|
||||
|
||||
/**
|
||||
* 字典-内容物情况
|
||||
*/
|
||||
@POST("typeCode/contentType")
|
||||
suspend fun getContentTypeList(): DictListBean
|
||||
|
||||
/**
|
||||
* 字典-不正常类型
|
||||
*/
|
||||
@POST("typeCode/unusualType")
|
||||
suspend fun getUnusualTypeList(): DictListBean
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// ULD管理
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -8,10 +8,14 @@ import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.databinding.ActivityIntImpAccidentVisaBinding
|
||||
import com.lukouguoji.gjj.viewModel.IntImpAccidentVisaViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.bean.IntImpAccidentVisaBean
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.impl.observe
|
||||
import com.lukouguoji.module_base.interfaces.IOnItemClickListener
|
||||
import com.lukouguoji.module_base.ktx.addOnItemClickListener
|
||||
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
/**
|
||||
@@ -19,7 +23,8 @@ import com.lukouguoji.module_base.router.ARouterConstants
|
||||
*/
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_INT_IMP_ACCIDENT_VISA)
|
||||
class IntImpAccidentVisaActivity :
|
||||
BaseBindingActivity<ActivityIntImpAccidentVisaBinding, IntImpAccidentVisaViewModel>() {
|
||||
BaseBindingActivity<ActivityIntImpAccidentVisaBinding, IntImpAccidentVisaViewModel>(),
|
||||
IOnItemClickListener {
|
||||
|
||||
override fun layoutId() = R.layout.activity_int_imp_accident_visa
|
||||
override fun viewModelClass() = IntImpAccidentVisaViewModel::class.java
|
||||
@@ -34,6 +39,8 @@ class IntImpAccidentVisaActivity :
|
||||
|
||||
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
|
||||
|
||||
binding.rv.addOnItemClickListener(this)
|
||||
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
|
||||
viewModel.refresh()
|
||||
}
|
||||
@@ -48,4 +55,15 @@ class IntImpAccidentVisaActivity :
|
||||
viewModel.searchClick()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onItemClick(position: Int, type: Int) {
|
||||
when (type) {
|
||||
2000 -> {
|
||||
// 侧滑菜单 - 修改
|
||||
val bean = binding.rv.commonAdapter()?.getItem(position) as? IntImpAccidentVisaBean
|
||||
?: return
|
||||
IntImpAccidentVisaEditActivity.start(this, bean.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.lukouguoji.gjj.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.databinding.ActivityIntImpAccidentVisaEditBinding
|
||||
import com.lukouguoji.gjj.viewModel.IntImpAccidentVisaEditViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.DetailsPageType
|
||||
import com.lukouguoji.module_base.ktx.addOnItemClickListener
|
||||
|
||||
/**
|
||||
* 国际进港-事故签证新增/编辑
|
||||
*/
|
||||
class IntImpAccidentVisaEditActivity :
|
||||
BaseBindingActivity<ActivityIntImpAccidentVisaEditBinding, IntImpAccidentVisaEditViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_int_imp_accident_visa_edit
|
||||
override fun viewModelClass() = IntImpAccidentVisaEditViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
binding.viewModel = viewModel
|
||||
|
||||
viewModel.rv = binding.rv
|
||||
binding.rv.addOnItemClickListener(viewModel)
|
||||
viewModel.initOnCreate(intent)
|
||||
|
||||
viewModel.pageType.observe(this) {
|
||||
val title = if (it == DetailsPageType.Add) "国际事故签证新增" else "国际事故签证修改"
|
||||
setBackArrow(title)
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context, id: Long = 0) {
|
||||
context.startActivity(
|
||||
Intent(context, IntImpAccidentVisaEditActivity::class.java)
|
||||
.putExtra(Constant.Key.ID, id)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,5 +21,11 @@ class IntImpAccidentVisaViewHolder(view: View) :
|
||||
bean.checked.set(!bean.checked.get())
|
||||
binding.executePendingBindings()
|
||||
}
|
||||
|
||||
// 侧滑菜单 - 修改按钮
|
||||
binding.btnEdit.setOnClickListener {
|
||||
binding.swipeMenu.quickClose()
|
||||
clickListener?.onItemClick(position, 2000) // type=2000表示修改操作
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,271 @@
|
||||
package com.lukouguoji.gjj.viewModel
|
||||
|
||||
import android.content.Intent
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.module_base.base.BaseViewModel
|
||||
import com.lukouguoji.module_base.bean.FileBean
|
||||
import com.lukouguoji.module_base.bean.GjAccidentVisaEditBean
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.common.DetailsPageType
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.impl.ImageSelectViewHolder
|
||||
import com.lukouguoji.module_base.interfaces.IOnItemClickListener
|
||||
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||
import com.lukouguoji.module_base.ktx.launchCollect
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.noNull
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
|
||||
import com.lukouguoji.module_base.util.MediaUtil
|
||||
import com.lukouguoji.module_base.util.UploadUtil
|
||||
import dev.utils.app.info.KeyValue
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.flow.asFlow
|
||||
import kotlinx.coroutines.flow.catch
|
||||
import kotlinx.coroutines.flow.filter
|
||||
import kotlinx.coroutines.flow.flowOn
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
import kotlinx.coroutines.flow.map
|
||||
import kotlinx.coroutines.flow.onCompletion
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
import kotlinx.coroutines.flow.onStart
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
|
||||
|
||||
var id: Long = 0
|
||||
|
||||
val pageType = MutableLiveData(DetailsPageType.Add)
|
||||
|
||||
val dataBean = MutableLiveData(GjAccidentVisaEditBean())
|
||||
|
||||
// 图片列表
|
||||
val itemLayoutId = R.layout.item_image_select
|
||||
val itemViewHolder = ImageSelectViewHolder::class.java
|
||||
var rv: RecyclerView? = null
|
||||
|
||||
// 下拉列表
|
||||
val outerPackageList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
val damageTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
val contentTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
val unusualTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
val photoList = MutableLiveData(
|
||||
listOf(KeyValue("是", "是"), KeyValue("否", "否"))
|
||||
)
|
||||
|
||||
// 航班级联查询
|
||||
private var lastQueriedFlight = ""
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 初始化
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
fun initOnCreate(intent: Intent) {
|
||||
id = intent.getLongExtra(Constant.Key.ID, 0)
|
||||
pageType.value = if (id == 0L) DetailsPageType.Add else DetailsPageType.Modify
|
||||
|
||||
loadDropdownLists()
|
||||
|
||||
if (id != 0L) {
|
||||
loadDetail()
|
||||
}
|
||||
|
||||
rv?.post {
|
||||
rv?.commonAdapter()?.addItem(FileBean())
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadDropdownLists() {
|
||||
launchCollect({ NetApply.api.getPackTypeList() }) {
|
||||
onSuccess = { result ->
|
||||
outerPackageList.value = result.data?.mapNotNull { bean ->
|
||||
bean.name?.let { name -> KeyValue(name, name) }
|
||||
} ?: emptyList()
|
||||
}
|
||||
}
|
||||
launchCollect({ NetApply.api.getDamageTypeList() }) {
|
||||
onSuccess = { result ->
|
||||
damageTypeList.value = result.data?.mapNotNull { bean ->
|
||||
bean.name?.let { name -> KeyValue(name, name) }
|
||||
} ?: emptyList()
|
||||
}
|
||||
}
|
||||
launchCollect({ NetApply.api.getContentTypeList() }) {
|
||||
onSuccess = { result ->
|
||||
contentTypeList.value = result.data?.mapNotNull { bean ->
|
||||
bean.name?.let { name -> KeyValue(name, name) }
|
||||
} ?: emptyList()
|
||||
}
|
||||
}
|
||||
launchCollect({ NetApply.api.getUnusualTypeList() }) {
|
||||
onSuccess = { result ->
|
||||
unusualTypeList.value = result.data?.mapNotNull { bean ->
|
||||
bean.name?.let { name -> KeyValue(name, name) }
|
||||
} ?: emptyList()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun loadDetail() {
|
||||
launchLoadingCollect({ NetApply.api.getGjAccidentVisaDetail(id) }) {
|
||||
onSuccess = {
|
||||
dataBean.value = it.data ?: GjAccidentVisaEditBean()
|
||||
|
||||
// 渲染图片
|
||||
val bean = dataBean.value!!
|
||||
val picList = bean.pic.split(",")
|
||||
.filter { url -> url.isNotEmpty() }
|
||||
.map { url -> FileBean(MediaUtil.fillUrl(url), url) }
|
||||
val originalList = bean.originalPic.split(",")
|
||||
.filter { url -> url.isNotEmpty() }
|
||||
.map { url -> FileBean(MediaUtil.fillUrl(url)) }
|
||||
for ((index, fileBean) in picList.withIndex()) {
|
||||
if (index < originalList.size) {
|
||||
picList[index].originalPic = originalList[index].path
|
||||
}
|
||||
}
|
||||
rv?.commonAdapter()?.loadMore(picList)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 航班级联查询
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
fun onFlightDateInputComplete() {
|
||||
lastQueriedFlight = ""
|
||||
queryFlightIfReady()
|
||||
}
|
||||
|
||||
fun onFlightNoInputComplete() {
|
||||
queryFlightIfReady()
|
||||
}
|
||||
|
||||
private fun queryFlightIfReady() {
|
||||
val bean = dataBean.value ?: return
|
||||
val fdate = bean.fdate
|
||||
val fno = bean.fno
|
||||
if (fdate.isEmpty() || fno.isEmpty()) return
|
||||
|
||||
val key = "$fdate-$fno"
|
||||
if (key == lastQueriedFlight) return
|
||||
lastQueriedFlight = key
|
||||
|
||||
launchCollect({
|
||||
NetApply.api.getGjFlightBean(
|
||||
mapOf(
|
||||
"fdate" to fdate,
|
||||
"fno" to fno,
|
||||
"ieFlag" to "I",
|
||||
).toRequestBody()
|
||||
)
|
||||
}) {
|
||||
onSuccess = {
|
||||
if (it.verifySuccess() && it.data != null) {
|
||||
val flight = it.data!!
|
||||
val b = dataBean.value ?: GjAccidentVisaEditBean()
|
||||
b.dep = flight.fdep.noNull()
|
||||
b.dest = flight.fdest.noNull()
|
||||
dataBean.value = b
|
||||
} else {
|
||||
val b = dataBean.value ?: GjAccidentVisaEditBean()
|
||||
b.dep = ""
|
||||
b.dest = ""
|
||||
dataBean.value = b
|
||||
showToast(it.msg.noNull("获取航班信息失败"))
|
||||
}
|
||||
}
|
||||
|
||||
onFailed = { _, _ ->
|
||||
val b = dataBean.value ?: GjAccidentVisaEditBean()
|
||||
b.dep = ""
|
||||
b.dest = ""
|
||||
dataBean.value = b
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 保存
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
fun onSaveClick() {
|
||||
val bean = dataBean.value ?: return
|
||||
if (bean.fdate.verifyNullOrEmpty("请输入航班日期")) return
|
||||
if (bean.fno.verifyNullOrEmpty("请输入航班号")) return
|
||||
if (bean.wbNo.verifyNullOrEmpty("请输入运单号")) return
|
||||
|
||||
(rv?.commonAdapter()?.items ?: emptyList())
|
||||
.asFlow()
|
||||
.map { it as FileBean }
|
||||
.filter { it.path.isNotEmpty() && it.url.isEmpty() }
|
||||
.onEach {
|
||||
val data = UploadUtil.upload(it.path).data
|
||||
it.url = data?.newName ?: ""
|
||||
it.originalPic = data?.zipFileName ?: ""
|
||||
}
|
||||
.flowOn(Dispatchers.IO)
|
||||
.onStart { showLoading() }
|
||||
.catch {
|
||||
showToast(it.message.noNull("上传图片失败"))
|
||||
dismissLoading()
|
||||
}
|
||||
.onCompletion {
|
||||
launchLoadingCollect({
|
||||
val list = (rv?.commonAdapter()?.items as List<FileBean>)
|
||||
.filter { it.path.isNotEmpty() }
|
||||
bean.picNumber = list.size.toString()
|
||||
bean.originalPic = list.joinToString(separator = ",") { MediaUtil.removeUrl(it.url) }
|
||||
bean.pic = list.joinToString(separator = ",") { MediaUtil.removeUrl(it.originalPic) }
|
||||
bean.idFlag = "1"
|
||||
|
||||
if (pageType.value == DetailsPageType.Add) {
|
||||
NetApply.api.saveGjAccidentVisa(bean.toRequestBody())
|
||||
} else {
|
||||
NetApply.api.modifyGjAccidentVisa(bean.toRequestBody())
|
||||
}
|
||||
}) {
|
||||
onSuccess = {
|
||||
showToast(it.msg.noNull("${pageType.value!!.title}成功"))
|
||||
viewModelScope.launch {
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||
}
|
||||
getTopActivity().finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
.launchIn(viewModelScope)
|
||||
}
|
||||
|
||||
fun onCancelClick() {
|
||||
getTopActivity().finish()
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 图片操作
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
override fun onItemClick(position: Int, type: Int) {
|
||||
val adapter = rv!!.commonAdapter()!!
|
||||
val bean = adapter.getItem(position) as FileBean
|
||||
when (type) {
|
||||
R.id.rl -> {
|
||||
bean.canDelete.set(!bean.canDelete.get())
|
||||
}
|
||||
|
||||
R.id.iv_delete -> {
|
||||
adapter.removeItem(position)
|
||||
}
|
||||
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -123,6 +123,10 @@ class IntImpAccidentVisaViewModel : BasePageViewModel() {
|
||||
ScanModel.startScan(getTopActivity(), Constant.RequestCode.WAYBILL)
|
||||
}
|
||||
|
||||
fun addClick() {
|
||||
com.lukouguoji.gjj.activity.IntImpAccidentVisaEditActivity.start(getTopActivity())
|
||||
}
|
||||
|
||||
fun searchClick() {
|
||||
refresh()
|
||||
}
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:onClick="@{()-> viewModel.addClick()}"
|
||||
android:padding="4dp"
|
||||
android:src="@drawable/img_add" />
|
||||
|
||||
|
||||
@@ -0,0 +1,363 @@
|
||||
<?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.data.layout.DataLayoutType" />
|
||||
|
||||
<import type="com.lukouguoji.module_base.common.DetailsPageType" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.gjj.viewModel.IntImpAccidentVisaEditViewModel" />
|
||||
</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" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<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">
|
||||
|
||||
<!-- Row 1: 航班日期 | 航班号 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{true}"
|
||||
hint='@{"请选择航班日期"}'
|
||||
setRefreshCallBack="@{viewModel::onFlightDateInputComplete}"
|
||||
title='@{"航班日期"}'
|
||||
titleLength="@{6}"
|
||||
type="@{DataLayoutType.DATE}"
|
||||
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="@{true}"
|
||||
hint='@{"请输入航班号"}'
|
||||
setRefreshCallBack="@{viewModel::onFlightNoInputComplete}"
|
||||
title='@{"航班号"}'
|
||||
titleLength="@{6}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.dataBean.fno}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Row 2: 始发站 | 目的站 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<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="@{6}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.dep}' />
|
||||
|
||||
<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="@{6}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.dest}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Row 3: 运单号 | 不正常件数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{true}"
|
||||
hint='@{"请输入运单号"}'
|
||||
title='@{"运单号"}'
|
||||
titleLength="@{6}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.dataBean.wbNo}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{true}"
|
||||
hint='@{"请输入不正常件数"}'
|
||||
title='@{"不正常件数"}'
|
||||
titleLength="@{6}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.dataBean.dpc}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Row 4: 运单总件数 | 运单总重量 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{true}"
|
||||
hint='@{"请输入运单总件数"}'
|
||||
title='@{"运单总件数"}'
|
||||
titleLength="@{6}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.dataBean.pc}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{true}"
|
||||
hint='@{"请输入运单总重量"}'
|
||||
title='@{"运单总重量"}'
|
||||
titleLength="@{6}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.dataBean.weight}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Row 5: 复称重量 | 品名 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{true}"
|
||||
hint='@{"请输入复称重量"}'
|
||||
title='@{"复称重量"}'
|
||||
titleLength="@{6}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.dataBean.reweight}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{true}"
|
||||
hint='@{"请输入品名"}'
|
||||
title='@{"品名"}'
|
||||
titleLength="@{6}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.dataBean.goods}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Row 6: 外包装 | 包装破损情况 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择外包装"}'
|
||||
list="@{viewModel.outerPackageList}"
|
||||
title='@{"外包装"}'
|
||||
titleLength="@{6}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.dataBean.opacking}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择破损情况"}'
|
||||
list="@{viewModel.damageTypeList}"
|
||||
title='@{"包装破损情况"}'
|
||||
titleLength="@{6}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.dataBean.damage}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Row 7: 内容物情况 | 不正常类型 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择内容物情况"}'
|
||||
list="@{viewModel.contentTypeList}"
|
||||
title='@{"内容物情况"}'
|
||||
titleLength="@{6}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.dataBean.condition}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择不正常类型"}'
|
||||
list="@{viewModel.unusualTypeList}"
|
||||
title='@{"不正常类型"}'
|
||||
titleLength="@{6}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.dataBean.problem}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Row 8: 发现时间 | 图片是否留底 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{true}"
|
||||
hint='@{"请选择发现时间"}'
|
||||
title='@{"发现时间"}'
|
||||
titleLength="@{6}"
|
||||
type="@{DataLayoutType.DATE}"
|
||||
value='@={viewModel.dataBean.seachDate}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择"}'
|
||||
list="@{viewModel.photoList}"
|
||||
title='@{"图片是否留底"}'
|
||||
titleLength="@{6}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.dataBean.photo}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Row 9: 备注(整行) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
enable="@{true}"
|
||||
hint='@{"请输入备注"}'
|
||||
inputHeight="@{80}"
|
||||
title='@{"备注"}'
|
||||
titleLength="@{6}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.dataBean.remarks}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 上传图像区域 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text="上传图像"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv"
|
||||
itemLayoutId="@{viewModel.itemLayoutId}"
|
||||
viewHolder="@{viewModel.itemViewHolder}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
app:spanCount="4"
|
||||
tools:listitem="@layout/item_image_select" />
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:layout_width="120dp"
|
||||
android:onClick="@{()-> viewModel.onCancelClick()}"
|
||||
android:text="取消" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:layout_width="120dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:onClick="@{()-> viewModel.onSaveClick()}"
|
||||
android:text="保存" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
@@ -12,283 +12,315 @@
|
||||
type="Integer" />
|
||||
</data>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/ll"
|
||||
<!-- 外层容器承载间距 -->
|
||||
<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:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 左侧选中图标 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/img_plane"
|
||||
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}" />
|
||||
<!-- 侧滑布局 -->
|
||||
<com.mcxtzhang.swipemenulib.SwipeMenuLayout
|
||||
android:id="@+id/swipe_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!-- 中间内容区 -->
|
||||
<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:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical">
|
||||
android:background="@drawable/bg_item"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<!-- 航班日期 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
<!-- 左侧选中图标 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/img_plane"
|
||||
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}" />
|
||||
|
||||
<!-- 中间内容区 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
<!-- 第一行:航班日期 | 始发站 | 运单总件数 | 不正常件数 | 运单号 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="航班日期:"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{5}" />
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="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
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="航班日期:"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{5}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.fdate}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</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
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="始发站:"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{4}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.fdep}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 运单总件数 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单总件数:"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{6}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf(bean.totalPc)}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</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
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="不正常件数:"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{6}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf(bean.abnPc)}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 运单号 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单号:"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{5}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.wbNo}"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 第二行:航班号 | 目的站 | 运单总重量 | 经办人 | 经办时间 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.fdate}"
|
||||
android:textSize="16sp" />
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
<!-- 航班号 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<!-- 始发站 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="航班号:"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{5}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="始发站:"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{4}" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.fno}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.fdep}"
|
||||
android:textSize="16sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</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">
|
||||
|
||||
<!-- 运单总件数 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="目的站:"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{4}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单总件数:"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{6}" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.fdest}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf(bean.totalPc)}"
|
||||
android:textSize="16sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
<!-- 运单总重量 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<!-- 不正常件数 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单总重量:"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{6}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="不正常件数:"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{6}" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf(bean.totalWeight)}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf(bean.abnPc)}"
|
||||
android:textSize="16sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</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">
|
||||
|
||||
<!-- 运单号 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="经办人:"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{6}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单号:"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{5}" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.opName}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.wbNo}"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="16sp" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
<!-- 经办时间 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="经办时间:"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{5}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.opDate}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</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>
|
||||
|
||||
<!-- 第二行:航班号 | 目的站 | 运单总重量 | 经办人 | 经办时间 -->
|
||||
<!-- 侧滑菜单按钮区 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical">
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 航班号 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="航班号:"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{5}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.fno}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</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
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="目的站:"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{4}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.fdest}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 运单总重量 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单总重量:"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{6}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf(bean.totalWeight)}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</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
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="经办人:"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{6}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.opName}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 经办时间 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="经办时间:"
|
||||
android:textSize="16sp"
|
||||
completeSpace="@{5}" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.opDate}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
<!-- 修改按钮 -->
|
||||
<TextView
|
||||
android:id="@+id/btn_edit"
|
||||
style="@style/tv_item_action"
|
||||
android:background="@color/colorPrimary"
|
||||
android:text="修改" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</LinearLayout>
|
||||
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
|
||||
|
||||
<!-- 右侧箭头 -->
|
||||
<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>
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
|
||||
Reference in New Issue
Block a user