feat: 国际进港舱单添加分单子列表展开/收起功能
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,39 @@
|
|||||||
|
package com.lukouguoji.module_base.bean
|
||||||
|
|
||||||
|
import androidx.databinding.ObservableBoolean
|
||||||
|
import java.io.Serializable
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际进港舱单-分单Bean
|
||||||
|
*/
|
||||||
|
data class GjjHaWb(
|
||||||
|
var hawbId: Long = 0,
|
||||||
|
var hno: String = "",
|
||||||
|
var no: String = "",
|
||||||
|
var prefix: String = "",
|
||||||
|
var pc: Long = 0,
|
||||||
|
var weight: Double = 0.0,
|
||||||
|
var volume: Double = 0.0,
|
||||||
|
var cashWeight: Double = 0.0,
|
||||||
|
var goods: String = "",
|
||||||
|
var spCode: String = "",
|
||||||
|
var mftStatus: String = "",
|
||||||
|
var lastMftStatus: String = "",
|
||||||
|
var mftMsgId: String = "",
|
||||||
|
var lastMftMsgId: String = "",
|
||||||
|
var declareCount: Int = 0,
|
||||||
|
var checkInType: String = "",
|
||||||
|
var activeId: Long = 0,
|
||||||
|
var opId: String = "",
|
||||||
|
var opDate: String = "",
|
||||||
|
var billsNo: String = "",
|
||||||
|
var remark: String = "",
|
||||||
|
var response: String = ""
|
||||||
|
) : Serializable {
|
||||||
|
@Transient
|
||||||
|
val checked: ObservableBoolean = ObservableBoolean(false)
|
||||||
|
|
||||||
|
var isSelected: Boolean
|
||||||
|
get() = checked.get()
|
||||||
|
set(value) = checked.set(value)
|
||||||
|
}
|
||||||
@@ -56,6 +56,13 @@ data class GjjManifest(
|
|||||||
var unNumber: String = "", // 危险品编号
|
var unNumber: String = "", // 危险品编号
|
||||||
var activeId: Long = 0 // 活动ID
|
var activeId: Long = 0 // 活动ID
|
||||||
) : Serializable {
|
) : Serializable {
|
||||||
|
// 分单列表
|
||||||
|
var haWbList: List<GjjHaWb>? = null
|
||||||
|
|
||||||
|
// 展开/收起状态
|
||||||
|
@Transient
|
||||||
|
val showMore: ObservableBoolean = ObservableBoolean(false)
|
||||||
|
|
||||||
// 选中状态(用于多选功能)- 不参与序列化
|
// 选中状态(用于多选功能)- 不参与序列化
|
||||||
@Transient
|
@Transient
|
||||||
val checked: ObservableBoolean = ObservableBoolean(false)
|
val checked: ObservableBoolean = ObservableBoolean(false)
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ import com.lukouguoji.module_base.bean.GjcWeighingBean
|
|||||||
import com.lukouguoji.module_base.bean.GjcWeighingRecordBean
|
import com.lukouguoji.module_base.bean.GjcWeighingRecordBean
|
||||||
import com.lukouguoji.module_base.bean.GjcWeighingStatisticsBean
|
import com.lukouguoji.module_base.bean.GjcWeighingStatisticsBean
|
||||||
import com.lukouguoji.module_base.bean.GjjAirManifest
|
import com.lukouguoji.module_base.bean.GjjAirManifest
|
||||||
|
import com.lukouguoji.module_base.bean.GjjHaWb
|
||||||
import com.lukouguoji.module_base.bean.GjjGoodsBean
|
import com.lukouguoji.module_base.bean.GjjGoodsBean
|
||||||
import com.lukouguoji.module_base.bean.GjjGoodsDetailsBean
|
import com.lukouguoji.module_base.bean.GjjGoodsDetailsBean
|
||||||
import com.lukouguoji.module_base.bean.GjjGoodsTypeBean
|
import com.lukouguoji.module_base.bean.GjjGoodsTypeBean
|
||||||
@@ -1775,6 +1776,12 @@ interface Api {
|
|||||||
@POST("IntImpManifest/pageQueryTotal")
|
@POST("IntImpManifest/pageQueryTotal")
|
||||||
suspend fun getIntImpManifestTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
|
suspend fun getIntImpManifestTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际进港舱单-获取主单下分单
|
||||||
|
*/
|
||||||
|
@POST("IntImpManifest/listHaWbByManifest")
|
||||||
|
suspend fun getIntImpManifestHaWbList(@Body data: RequestBody): BaseResultBean<List<GjjHaWb>>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 国际进港舱单-分拣理货(装机单)-分页查询
|
* 国际进港舱单-分拣理货(装机单)-分页查询
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
package com.lukouguoji.gjj.holder
|
||||||
|
|
||||||
|
import android.view.View
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import com.lukouguoji.gjj.databinding.ItemIntImpManifestSubBinding
|
||||||
|
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||||
|
import com.lukouguoji.module_base.bean.GjjHaWb
|
||||||
|
import com.lukouguoji.module_base.bean.GjjManifest
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际进港舱单 - 分单子列表 ViewHolder
|
||||||
|
*/
|
||||||
|
class IntImpManifestSubViewHolder(view: View) :
|
||||||
|
BaseViewHolder<GjjHaWb, ItemIntImpManifestSubBinding>(view) {
|
||||||
|
|
||||||
|
override fun onBind(item: Any?, position: Int) {
|
||||||
|
val bean = getItemBean(item) ?: return
|
||||||
|
binding.bean = bean
|
||||||
|
binding.position = position
|
||||||
|
binding.executePendingBindings()
|
||||||
|
|
||||||
|
// 单选框点击切换选择状态
|
||||||
|
binding.ivCheckbox.setOnClickListener {
|
||||||
|
val newCheckedState = !bean.checked.get()
|
||||||
|
bean.checked.set(newCheckedState)
|
||||||
|
binding.executePendingBindings()
|
||||||
|
|
||||||
|
// 反向联动主列表项(勾选子项时自动勾选父项)
|
||||||
|
if (newCheckedState) {
|
||||||
|
val recyclerView = itemView.parent as? RecyclerView ?: return@setOnClickListener
|
||||||
|
val parentBean = recyclerView.tag as? GjjManifest ?: return@setOnClickListener
|
||||||
|
parentBean.checked.set(true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
package com.lukouguoji.gjj.holder
|
package com.lukouguoji.gjj.holder
|
||||||
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import com.lukouguoji.gjj.R
|
||||||
import com.lukouguoji.gjj.databinding.ItemIntImpManifestBinding
|
import com.lukouguoji.gjj.databinding.ItemIntImpManifestBinding
|
||||||
|
import com.lukouguoji.module_base.adapter.setCommonAdapter
|
||||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||||
import com.lukouguoji.module_base.bean.GjjManifest
|
import com.lukouguoji.module_base.bean.GjjManifest
|
||||||
|
import com.lukouguoji.module_base.ktx.refresh
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 国际进港舱单 ViewHolder
|
* 国际进港舱单 ViewHolder
|
||||||
@@ -17,10 +20,14 @@ class IntImpManifestViewHolder(view: View) :
|
|||||||
binding.position = position
|
binding.position = position
|
||||||
binding.executePendingBindings()
|
binding.executePendingBindings()
|
||||||
|
|
||||||
// 选中图标点击 - 切换选择状态
|
// 选中图标点击 - 切换选择状态(联动子列表)
|
||||||
binding.ivIcon.setOnClickListener {
|
binding.ivIcon.setOnClickListener {
|
||||||
bean.checked.set(!bean.checked.get())
|
val newCheckedState = !bean.checked.get()
|
||||||
|
bean.checked.set(newCheckedState)
|
||||||
|
// 联动子列表选中状态
|
||||||
|
bean.haWbList?.forEach { sub -> sub.checked.set(newCheckedState) }
|
||||||
binding.executePendingBindings()
|
binding.executePendingBindings()
|
||||||
|
binding.rvSub.adapter?.notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 编辑按钮点击
|
// 编辑按钮点击
|
||||||
@@ -32,5 +39,21 @@ class IntImpManifestViewHolder(view: View) :
|
|||||||
binding.btnDelete.setOnClickListener {
|
binding.btnDelete.setOnClickListener {
|
||||||
clickListener?.onItemClick(position, 102) // 102=删除
|
clickListener?.onItemClick(position, 102) // 102=删除
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 展开按钮点击事件
|
||||||
|
binding.ivShow.setOnClickListener {
|
||||||
|
bean.showMore.set(!bean.showMore.get())
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化分单子列表 RecyclerView
|
||||||
|
setCommonAdapter(
|
||||||
|
binding.rvSub,
|
||||||
|
IntImpManifestSubViewHolder::class.java,
|
||||||
|
R.layout.item_int_imp_manifest_sub
|
||||||
|
)
|
||||||
|
|
||||||
|
// 设置父Bean引用(用于子列表反向联动)
|
||||||
|
binding.rvSub.tag = bean
|
||||||
|
binding.rvSub.refresh(bean.haWbList ?: emptyList())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,70 @@ class IntImpManifestViewModel : BasePageViewModel() {
|
|||||||
val fdep = MutableLiveData("") // 目的站
|
val fdep = MutableLiveData("") // 目的站
|
||||||
val waybillNo = MutableLiveData("") // 运单号
|
val waybillNo = MutableLiveData("") // 运单号
|
||||||
|
|
||||||
|
// ========== 航班级联查询 ==========
|
||||||
|
private var lastQueriedFlight = ""
|
||||||
|
private var fid = ""
|
||||||
|
|
||||||
|
fun onFlightDateInputComplete() {
|
||||||
|
lastQueriedFlight = ""
|
||||||
|
queryFlightIfReady()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun onFlightNoInputComplete() {
|
||||||
|
queryFlightIfReady()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun queryFlightIfReady() {
|
||||||
|
val fdate = flightDate.value
|
||||||
|
val fno = flightNo.value
|
||||||
|
if (fdate.isNullOrEmpty() || fno.isNullOrEmpty()) 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!!
|
||||||
|
fid = flight.fid.noNull()
|
||||||
|
fdep.value = flight.fdest.noNull()
|
||||||
|
|
||||||
|
// 构建始发站下拉列表:fdep + jtz(经停港)
|
||||||
|
val list = mutableListOf(
|
||||||
|
KeyValue(flight.fdep.noNull(), flight.fdep.noNull()),
|
||||||
|
)
|
||||||
|
if (!flight.jtz.isNullOrEmpty()) {
|
||||||
|
list.add(KeyValue(flight.jtz.noNull(), flight.jtz.noNull()))
|
||||||
|
}
|
||||||
|
sendAddressList.value = list
|
||||||
|
sendAddress.value = flight.fdep.noNull()
|
||||||
|
} else {
|
||||||
|
fid = ""
|
||||||
|
fdep.value = ""
|
||||||
|
sendAddressList.value = emptyList()
|
||||||
|
sendAddress.value = ""
|
||||||
|
showToast(it.msg.noNull("获取航班信息失败"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onFailed = { _, _ ->
|
||||||
|
fid = ""
|
||||||
|
fdep.value = ""
|
||||||
|
sendAddressList.value = emptyList()
|
||||||
|
sendAddress.value = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ========== 统计信息 ==========
|
// ========== 统计信息 ==========
|
||||||
val totalCount = MutableLiveData("0") // 合计票数
|
val totalCount = MutableLiveData("0") // 合计票数
|
||||||
val totalPc = MutableLiveData("0") // 总件数
|
val totalPc = MutableLiveData("0") // 总件数
|
||||||
@@ -45,11 +109,17 @@ class IntImpManifestViewModel : BasePageViewModel() {
|
|||||||
// ========== 全选状态 ==========
|
// ========== 全选状态 ==========
|
||||||
val isAllChecked = MutableLiveData(false)
|
val isAllChecked = MutableLiveData(false)
|
||||||
|
|
||||||
|
// ========== 展开/收起 ==========
|
||||||
|
val isAllExpanded = MutableLiveData(false)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
// 监听全选状态,自动更新所有列表项
|
// 监听全选状态,自动更新所有列表项(联动子列表)
|
||||||
isAllChecked.observeForever { checked ->
|
isAllChecked.observeForever { checked ->
|
||||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return@observeForever
|
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return@observeForever
|
||||||
list.forEach { it.checked.set(checked) }
|
list.forEach {
|
||||||
|
it.checked.set(checked)
|
||||||
|
it.haWbList?.forEach { sub -> sub.checked.set(checked) }
|
||||||
|
}
|
||||||
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -66,19 +136,37 @@ class IntImpManifestViewModel : BasePageViewModel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 全选按钮点击(切换全选状态)
|
* 全选按钮点击(切换全选状态,联动子列表)
|
||||||
*/
|
*/
|
||||||
fun checkAllClick() {
|
fun checkAllClick() {
|
||||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return
|
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return
|
||||||
|
|
||||||
// 切换全选状态
|
// 切换全选状态
|
||||||
val shouldCheckAll = !isAllChecked.value!!
|
val shouldCheckAll = !isAllChecked.value!!
|
||||||
list.forEach { it.checked.set(shouldCheckAll) }
|
list.forEach {
|
||||||
|
it.checked.set(shouldCheckAll)
|
||||||
|
it.haWbList?.forEach { sub -> sub.checked.set(shouldCheckAll) }
|
||||||
|
}
|
||||||
isAllChecked.value = shouldCheckAll
|
isAllChecked.value = shouldCheckAll
|
||||||
|
|
||||||
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全部展开/收起
|
||||||
|
*/
|
||||||
|
fun toggleAllExpand() {
|
||||||
|
val shouldExpand = !isAllExpanded.value!!
|
||||||
|
isAllExpanded.value = shouldExpand
|
||||||
|
val list = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest> ?: return
|
||||||
|
list.forEach {
|
||||||
|
if (!it.haWbList.isNullOrEmpty()) {
|
||||||
|
it.showMore.set(shouldExpand)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 扫码运单号
|
* 扫码运单号
|
||||||
*/
|
*/
|
||||||
@@ -90,25 +178,14 @@ class IntImpManifestViewModel : BasePageViewModel() {
|
|||||||
* 新增按钮点击
|
* 新增按钮点击
|
||||||
*/
|
*/
|
||||||
fun onAddClick() {
|
fun onAddClick() {
|
||||||
// 获取当前航班信息
|
|
||||||
val fid = getCurrentFlightId()
|
|
||||||
|
|
||||||
GjjManifestAddActivity.start(
|
GjjManifestAddActivity.start(
|
||||||
context = getTopActivity(),
|
context = getTopActivity(),
|
||||||
fid = fid,
|
fid = fid,
|
||||||
dep = fdep.value ?: "",
|
dep = sendAddress.value ?: "",
|
||||||
dest = "" // 目的站暂时留空
|
dest = fdep.value ?: ""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取当前航班ID(从列表第一项获取)
|
|
||||||
*/
|
|
||||||
private fun getCurrentFlightId(): String {
|
|
||||||
val firstItem = pageModel.rv?.commonAdapter()?.items?.firstOrNull() as? GjjManifest
|
|
||||||
return firstItem?.fid?.toString() ?: ""
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Item点击处理(侧滑按钮)
|
* Item点击处理(侧滑按钮)
|
||||||
*/
|
*/
|
||||||
@@ -217,6 +294,14 @@ class IntImpManifestViewModel : BasePageViewModel() {
|
|||||||
launchLoadingCollect({ NetApply.api.getIntImpManifestList(listParams) }) {
|
launchLoadingCollect({ NetApply.api.getIntImpManifestList(listParams) }) {
|
||||||
onSuccess = { result ->
|
onSuccess = { result ->
|
||||||
pageModel.handleListBean(result.data?.toBaseListBean())
|
pageModel.handleListBean(result.data?.toBaseListBean())
|
||||||
|
|
||||||
|
// 列表加载完成后,加载分单数据
|
||||||
|
val items = pageModel.rv?.commonAdapter()?.items as? List<GjjManifest>
|
||||||
|
items?.forEach { bean ->
|
||||||
|
if (bean.haWbNum > 0) {
|
||||||
|
loadHaWbList(bean)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -230,4 +315,22 @@ class IntImpManifestViewModel : BasePageViewModel() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加载主单下的分单列表
|
||||||
|
*/
|
||||||
|
private fun loadHaWbList(bean: GjjManifest) {
|
||||||
|
val params = mapOf(
|
||||||
|
"mfId" to bean.mfId
|
||||||
|
).toRequestBody()
|
||||||
|
|
||||||
|
launchCollect({ NetApply.api.getIntImpManifestHaWbList(params) }) {
|
||||||
|
onSuccess = { result ->
|
||||||
|
if (result.verifySuccess() && !result.data.isNullOrEmpty()) {
|
||||||
|
bean.haWbList = result.data
|
||||||
|
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
hint='@{"请选择航班日期"}'
|
hint='@{"请选择航班日期"}'
|
||||||
icon="@{@drawable/img_date}"
|
icon="@{@drawable/img_date}"
|
||||||
|
setRefreshCallBack="@{viewModel::onFlightDateInputComplete}"
|
||||||
type="@{SearchLayoutType.DATE}"
|
type="@{SearchLayoutType.DATE}"
|
||||||
value="@={viewModel.flightDate}"
|
value="@={viewModel.flightDate}"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -42,6 +43,7 @@
|
|||||||
<!-- 航班号 -->
|
<!-- 航班号 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
hint='@{"请输入航班号"}'
|
hint='@{"请输入航班号"}'
|
||||||
|
setRefreshCallBack="@{viewModel::onFlightNoInputComplete}"
|
||||||
type="@{SearchLayoutType.INPUT}"
|
type="@{SearchLayoutType.INPUT}"
|
||||||
value="@={viewModel.flightNo}"
|
value="@={viewModel.flightNo}"
|
||||||
setUpperCaseAlphanumeric="@{true}"
|
setUpperCaseAlphanumeric="@{true}"
|
||||||
@@ -59,9 +61,10 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<!-- 目的站(固定HFE) -->
|
<!-- 目的站(航班查询自动填充) -->
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
hint='@{"HFE"}'
|
hint='@{"目的站"}'
|
||||||
|
enable="@{false}"
|
||||||
type="@{SearchLayoutType.INPUT}"
|
type="@{SearchLayoutType.INPUT}"
|
||||||
value="@={viewModel.fdep}"
|
value="@={viewModel.fdep}"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
@@ -114,6 +117,15 @@
|
|||||||
android:padding="4dp"
|
android:padding="4dp"
|
||||||
android:src="@drawable/img_delete" />
|
android:src="@drawable/img_delete" />
|
||||||
|
|
||||||
|
<!-- 展开/收起全部子列表 -->
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:onClick="@{()-> viewModel.toggleAllExpand()}"
|
||||||
|
android:padding="4dp"
|
||||||
|
android:src="@drawable/ic_new_expand" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -15,150 +15,47 @@
|
|||||||
type="Integer" />
|
type="Integer" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<com.mcxtzhang.swipemenulib.SwipeMenuLayout
|
<!-- 主列表项容器 -->
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="10dp">
|
android:layout_marginBottom="10dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<!-- 主内容区 -->
|
<com.mcxtzhang.swipemenulib.SwipeMenuLayout
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:background="@drawable/bg_white_radius_8"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:padding="15dp"
|
|
||||||
android:gravity="center_vertical">
|
|
||||||
|
|
||||||
<!-- 选中图标(飞机图标,根据选择状态切换图片) -->
|
<!-- 主内容区 -->
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_icon"
|
|
||||||
android:layout_width="40dp"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
|
|
||||||
android:src="@drawable/img_plane" />
|
|
||||||
|
|
||||||
<!-- 舱单信息区域 -->
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="15dp"
|
android:background="@drawable/bg_white_radius_8"
|
||||||
android:layout_weight="1"
|
android:gravity="center_vertical"
|
||||||
android:orientation="vertical">
|
android:orientation="horizontal"
|
||||||
|
android:padding="15dp">
|
||||||
|
|
||||||
<!-- 第一行:运单号 -->
|
<!-- 选中图标(飞机图标,根据选择状态切换图片) -->
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_icon"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
|
||||||
|
android:src="@drawable/img_plane" />
|
||||||
|
|
||||||
|
<!-- 舱单信息区域 -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center_vertical"
|
android:layout_marginLeft="15dp"
|
||||||
android:orientation="horizontal">
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<!-- 第一行:运单号 -->
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
completeSpace="@{5}"
|
|
||||||
android:text="运单号:"
|
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@{bean.getWaybillNo()}"
|
|
||||||
android:textColor="@color/colorPrimary"
|
|
||||||
android:textSize="18sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- 第二行:始发站、目的站、总件数、实到件数 -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<!-- 始发站 -->
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
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"
|
|
||||||
completeSpace="@{4}"
|
|
||||||
android:text="始发站:"
|
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@{bean.origin}"
|
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- 目的站 -->
|
|
||||||
<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"
|
|
||||||
completeSpace="@{4}"
|
|
||||||
android:text="目的站:"
|
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@{bean.dest}"
|
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- 总件数 -->
|
|
||||||
<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"
|
|
||||||
completeSpace="@{4}"
|
|
||||||
android:text="总件数:"
|
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@{String.valueOf(bean.totalPc)}"
|
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- 实到件数 -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
@@ -166,161 +63,272 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{5}"
|
completeSpace="@{5}"
|
||||||
android:text="实到件数:"
|
android:text="运单号:"
|
||||||
android:textColor="@color/text_normal"
|
android:textColor="@color/text_normal"
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{String.valueOf(bean.pc)}"
|
android:text="@{bean.getWaybillNo()}"
|
||||||
android:textColor="@color/text_normal"
|
android:textColor="@color/colorPrimary"
|
||||||
android:textSize="16sp" />
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
<!-- 第二行:始发站、目的站、总件数、实到件数 -->
|
||||||
|
|
||||||
<!-- 第三行:实到重量、计费重量、代理、特码、分单数 -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<!-- 实到重量 -->
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_marginTop="10dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<!-- 始发站 -->
|
||||||
android:layout_width="wrap_content"
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{5}"
|
android:layout_weight="1"
|
||||||
android:text="实到重量:"
|
android:gravity="center_vertical"
|
||||||
android:textColor="@color/text_normal"
|
android:orientation="horizontal">
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{4}"
|
||||||
|
android:text="始发站:"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.origin}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 目的站 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{String.valueOf((int)bean.weight)}"
|
android:layout_weight="1"
|
||||||
android:textColor="@color/text_normal"
|
android:gravity="center_vertical"
|
||||||
android:textSize="16sp" />
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{4}"
|
||||||
|
android:text="目的站:"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.dest}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 总件数 -->
|
||||||
|
<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"
|
||||||
|
completeSpace="@{4}"
|
||||||
|
android:text="总件数:"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{String.valueOf(bean.totalPc)}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 实到件数 -->
|
||||||
|
<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"
|
||||||
|
completeSpace="@{5}"
|
||||||
|
android:text="实到件数:"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{String.valueOf(bean.pc)}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 计费重量 -->
|
<!-- 第三行:实到重量、计费重量、代理、特码 -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_marginTop="10dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<!-- 实到重量 -->
|
||||||
android:layout_width="wrap_content"
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{5}"
|
android:layout_weight="1"
|
||||||
android:text="计费重量:"
|
android:gravity="center_vertical"
|
||||||
android:textColor="@color/text_normal"
|
android:orientation="horizontal">
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{5}"
|
||||||
|
android:text="实到重量:"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{String.valueOf((int)bean.weight)}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 计费重量 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{String.valueOf((int)bean.cashWeight)}"
|
android:layout_weight="1"
|
||||||
android:textColor="@color/text_normal"
|
android:gravity="center_vertical"
|
||||||
android:textSize="16sp" />
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{5}"
|
||||||
|
android:text="计费重量:"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{String.valueOf((int)bean.cashWeight)}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 代理 -->
|
||||||
|
<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"
|
||||||
|
completeSpace="@{3}"
|
||||||
|
android:text="代理:"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.agentCode}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 特码 -->
|
||||||
|
<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"
|
||||||
|
completeSpace="@{3}"
|
||||||
|
android:text="特码:"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.spCode}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- 代理 -->
|
<!-- 第四行:分单数 -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_marginTop="10dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<!-- 分单数 -->
|
||||||
android:layout_width="wrap_content"
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{3}"
|
android:layout_weight="1"
|
||||||
android:text="代理:"
|
android:gravity="center_vertical"
|
||||||
android:textColor="@color/text_normal"
|
android:orientation="horizontal">
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{bean.agentCode}"
|
completeSpace="@{4}"
|
||||||
android:textColor="@color/text_normal"
|
android:text="分单数:"
|
||||||
android:textSize="16sp" />
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{String.valueOf(bean.haWbNum)}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<!-- 特码 -->
|
</LinearLayout>
|
||||||
<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"
|
|
||||||
completeSpace="@{3}"
|
|
||||||
android:text="特码:"
|
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@{bean.spCode}"
|
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- 第四行:分单数 -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<!-- 分单数 -->
|
|
||||||
<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"
|
|
||||||
completeSpace="@{4}"
|
|
||||||
android:text="分单数:"
|
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@{String.valueOf(bean.haWbNum)}"
|
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -328,38 +336,163 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
<!-- 右侧箭头 -->
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:src="@drawable/img_pda_right" />
|
||||||
|
|
||||||
<!-- 右侧箭头 -->
|
<!-- 侧滑菜单区 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- 编辑按钮 -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnEdit"
|
||||||
|
style="@style/tv_item_action"
|
||||||
|
android:background="@color/colorPrimary"
|
||||||
|
android:text="编辑" />
|
||||||
|
|
||||||
|
<!-- 删除按钮 -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btnDelete"
|
||||||
|
style="@style/tv_item_action"
|
||||||
|
android:background="@color/red"
|
||||||
|
android:text="删除" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
|
||||||
|
|
||||||
|
<!-- 展开/折叠按钮(仅当有分单时显示) -->
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="30dp"
|
android:id="@+id/iv_show"
|
||||||
android:layout_height="30dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_gravity="center"
|
android:layout_height="20dp"
|
||||||
android:layout_marginLeft="10dp"
|
android:layout_marginTop="5dp"
|
||||||
android:src="@drawable/img_pda_right" />
|
android:layout_marginBottom="5dp"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:src="@mipmap/img_down"
|
||||||
|
visible="@{bean.haWbList != null && !bean.haWbList.empty}" />
|
||||||
|
|
||||||
<!-- 侧滑菜单区 -->
|
<!-- 分单子列表容器(淡绿色背景) -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
visible="@{bean.showMore}"
|
||||||
android:layout_height="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:orientation="horizontal">
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:background="#e3f6e0"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
<!-- 编辑按钮 -->
|
<!-- 表头 -->
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/btnEdit"
|
android:layout_width="match_parent"
|
||||||
style="@style/tv_item_action"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/colorPrimary"
|
android:layout_marginVertical="10dp"
|
||||||
android:text="编辑" />
|
android:orientation="horizontal"
|
||||||
|
android:paddingHorizontal="10dp">
|
||||||
|
|
||||||
<!-- 删除按钮 -->
|
<TextView
|
||||||
<TextView
|
android:layout_width="0dp"
|
||||||
android:id="@+id/btnDelete"
|
android:layout_height="wrap_content"
|
||||||
style="@style/tv_item_action"
|
android:layout_weight="0.5"
|
||||||
android:background="@color/red"
|
android:gravity="center"
|
||||||
android:text="删除" />
|
android:text="选项"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.0"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="运单号"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.0"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="分单号"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.8"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="件数"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.8"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="重量"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.8"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="原始舱单"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.8"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="理货报告"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.0"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="品名(中)"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.divider.MaterialDivider
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1px"
|
||||||
|
android:background="@color/c999999" />
|
||||||
|
|
||||||
|
<!-- 子列表 RecyclerView -->
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_sub"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
112
module_gjj/src/main/res/layout/item_int_imp_manifest_sub.xml
Normal file
112
module_gjj/src/main/res/layout/item_int_imp_manifest_sub.xml
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:loadImage="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="bean"
|
||||||
|
type="com.lukouguoji.module_base.bean.GjjHaWb" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="position"
|
||||||
|
type="Integer" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingHorizontal="10dp"
|
||||||
|
android:paddingVertical="8dp">
|
||||||
|
|
||||||
|
<!-- 选项(单选框) -->
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_checkbox"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_gray : @drawable/radiobtn_unchecked_gray}"
|
||||||
|
android:src="@drawable/radiobtn_unchecked_gray" />
|
||||||
|
|
||||||
|
<!-- 运单号 -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_weight="1.0"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text='@{bean.prefix + bean.no}'
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<!-- 分单号 -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_weight="1.0"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@{bean.hno ?? ``}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<!-- 件数 -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_weight="0.8"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@{String.valueOf((int)bean.pc)}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<!-- 重量 -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_weight="0.8"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@{String.valueOf((int)bean.weight)}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<!-- 原始舱单 -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_weight="0.8"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@{bean.mftStatus ?? ``}"
|
||||||
|
android:textColor="@color/colorPrimary"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<!-- 理货报告 -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_weight="0.8"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@{bean.lastMftStatus ?? ``}"
|
||||||
|
android:textColor="@color/colorPrimary"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<!-- 品名(中) -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_weight="1.0"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@{bean.goods ?? ``}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</layout>
|
||||||
Reference in New Issue
Block a user