feat: 出港组装 list
This commit is contained in:
8
.idea/deploymentTargetSelector.xml
generated
8
.idea/deploymentTargetSelector.xml
generated
@@ -4,6 +4,14 @@
|
|||||||
<selectionStates>
|
<selectionStates>
|
||||||
<SelectionState runConfigName="app">
|
<SelectionState runConfigName="app">
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
|
<DropdownSelection timestamp="2025-11-27T05:04:50.474591Z">
|
||||||
|
<Target type="DEFAULT_BOOT">
|
||||||
|
<handle>
|
||||||
|
<DeviceId pluginId="PhysicalDevice" identifier="serial=80STHZCHDLL4311422" />
|
||||||
|
</handle>
|
||||||
|
</Target>
|
||||||
|
</DropdownSelection>
|
||||||
|
<DialogSelection />
|
||||||
</SelectionState>
|
</SelectionState>
|
||||||
</selectionStates>
|
</selectionStates>
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
@@ -145,6 +145,12 @@
|
|||||||
android:configChanges="orientation|keyboardHidden"
|
android:configChanges="orientation|keyboardHidden"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:screenOrientation="userLandscape" />
|
android:screenOrientation="userLandscape" />
|
||||||
|
<!-- 国际出港-出港组装 -->
|
||||||
|
<activity
|
||||||
|
android:name="com.lukouguoji.gjc.page.assemble.IntExpAssembleActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
android:exported="false"
|
||||||
|
android:screenOrientation="userLandscape" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".MineActivity"
|
android:name=".MineActivity"
|
||||||
android:configChanges="orientation|keyboardHidden"
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
|||||||
@@ -353,6 +353,11 @@ class HomeFragment : Fragment() {
|
|||||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GJC_INSPECTION)
|
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GJC_INSPECTION)
|
||||||
.navigation()
|
.navigation()
|
||||||
}
|
}
|
||||||
|
// 出港组装
|
||||||
|
Constant.AuthName.GjcIntExpAssembleActivity -> {
|
||||||
|
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_INT_EXP_ASSEMBLE)
|
||||||
|
.navigation()
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* 国际进港
|
* 国际进港
|
||||||
*/
|
*/
|
||||||
@@ -645,6 +650,13 @@ class HomeFragment : Fragment() {
|
|||||||
"板箱组装"
|
"板箱组装"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
list.add(
|
||||||
|
RightMenu(
|
||||||
|
Constant.AuthName.GjcIntExpAssembleActivity,
|
||||||
|
com.lukouguoji.module_base.R.drawable.img_gjc_banxiangzuzhuang,
|
||||||
|
"出港组装"
|
||||||
|
)
|
||||||
|
)
|
||||||
list.add(
|
list.add(
|
||||||
RightMenu(
|
RightMenu(
|
||||||
Constant.AuthName.GjcGoodsListActivity,
|
Constant.AuthName.GjcGoodsListActivity,
|
||||||
|
|||||||
@@ -51,4 +51,8 @@ class GjcUldUseBean {
|
|||||||
var remark: String = "" // 备注
|
var remark: String = "" // 备注
|
||||||
var checkFlag: String = "" // 检查标记
|
var checkFlag: String = "" // 检查标记
|
||||||
var emptyUld: String = "" // 空ULD
|
var emptyUld: String = "" // 空ULD
|
||||||
|
|
||||||
|
// ========== 出港组装页面扩展字段 ==========
|
||||||
|
var isExpanded: Boolean = false // 展开状态
|
||||||
|
var waybillDetails: MutableList<GjcWarehouse>? = null // 运单明细缓存
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.lukouguoji.module_base.bean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际出港-运单明细Bean
|
||||||
|
* 对应API: IntExpAssemble/queryAssembled
|
||||||
|
*/
|
||||||
|
class GjcWarehouse {
|
||||||
|
var whId: Long = 0 // ID
|
||||||
|
var no: String = "" // 运单号(11位)
|
||||||
|
var prefix: String = "" // 运单前缀
|
||||||
|
var wbNo: String = "" // 主运单编号
|
||||||
|
var pc: Long = 0 // 件数
|
||||||
|
var weight: Double = 0.0 // 重量
|
||||||
|
var volume: Double = 0.0 // 体积
|
||||||
|
var agentCode: String = "" // 代理code
|
||||||
|
var agentName: String = "" // 代理名称
|
||||||
|
var dest: String = "" // 目的港
|
||||||
|
var dest1: String = "" // 卸货站
|
||||||
|
var dest2: String = "" // 第二目的地
|
||||||
|
var dep: String = "" // 始发站
|
||||||
|
var spCode: String = "" // 特码
|
||||||
|
var goods: String = "" // 品名(英)
|
||||||
|
var goodsCn: String = "" // 品名(中)
|
||||||
|
var fdate: String = "" // 航班日期
|
||||||
|
var fno: String = "" // 航班号
|
||||||
|
var fclose: String = "" // 航班关闭时间
|
||||||
|
var flight: String = "" // 航班:航班日期/航班号
|
||||||
|
var range: String = "" // 航程
|
||||||
|
var businessType: String = "" // 业务类型
|
||||||
|
var opId: String = "" // 收运人ID
|
||||||
|
var userName: String = "" // 收运人
|
||||||
|
var opDate: String = "" // 收运时间
|
||||||
|
var location: String = "" // uld
|
||||||
|
var checkInPc: Long = 0 // 入库件数
|
||||||
|
var checkInWeight: Double = 0.0 // 入库重量
|
||||||
|
var assembleCount: Int = 0 // 已经组装的数量
|
||||||
|
}
|
||||||
@@ -244,6 +244,7 @@ interface Constant {
|
|||||||
const val GjcBanXListActivity = "AppIntExpBox" //板箱
|
const val GjcBanXListActivity = "AppIntExpBox" //板箱
|
||||||
const val GjcGoodsListActivity = "AppIntExpGoods" //货物交接
|
const val GjcGoodsListActivity = "AppIntExpGoods" //货物交接
|
||||||
const val GjcInspectionActivity = "AppIntExpInspection" //收运检查
|
const val GjcInspectionActivity = "AppIntExpInspection" //收运检查
|
||||||
|
const val GjcIntExpAssembleActivity = "AppIntExpAssemble" //出港组装
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 国际进港
|
* 国际进港
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import com.lukouguoji.module_base.bean.GjcGoodsAddBean
|
|||||||
import com.lukouguoji.module_base.bean.GjcGoodsBean
|
import com.lukouguoji.module_base.bean.GjcGoodsBean
|
||||||
import com.lukouguoji.module_base.bean.GjcGoodsDetailsBean
|
import com.lukouguoji.module_base.bean.GjcGoodsDetailsBean
|
||||||
import com.lukouguoji.module_base.bean.GjcUldUseBean
|
import com.lukouguoji.module_base.bean.GjcUldUseBean
|
||||||
|
import com.lukouguoji.module_base.bean.GjcWarehouse
|
||||||
import com.lukouguoji.module_base.bean.GjcWaybillBean
|
import com.lukouguoji.module_base.bean.GjcWaybillBean
|
||||||
import com.lukouguoji.module_base.bean.GjcWaybillDataBean
|
import com.lukouguoji.module_base.bean.GjcWaybillDataBean
|
||||||
import com.lukouguoji.module_base.bean.GjcWeighingBean
|
import com.lukouguoji.module_base.bean.GjcWeighingBean
|
||||||
@@ -443,6 +444,30 @@ interface Api {
|
|||||||
@POST("IntExpWeighting/weight")
|
@POST("IntExpWeighting/weight")
|
||||||
suspend fun submitGjcBoxWeighing(@Body data: RequestBody): BaseResultBean<SimpleResultBean>
|
suspend fun submitGjcBoxWeighing(@Body data: RequestBody): BaseResultBean<SimpleResultBean>
|
||||||
|
|
||||||
|
// ==================== 国际出港-出港组装 ====================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际出港组装-分页查询已组装的ULD列表
|
||||||
|
* 接口路径: /IntExpAssemble/pageQuery
|
||||||
|
*/
|
||||||
|
@POST("IntExpAssemble/pageQuery")
|
||||||
|
suspend fun getIntExpAssembleList(@Body data: RequestBody): BaseListBean<GjcUldUseBean>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际出港组装-分页合计统计数据
|
||||||
|
* 接口路径: /IntExpAssemble/pageQueryTotal
|
||||||
|
*/
|
||||||
|
@POST("IntExpAssemble/pageQueryTotal")
|
||||||
|
suspend fun getIntExpAssembleTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际出港组装-根据板箱组装记录查询运单明细
|
||||||
|
* 接口路径: /IntExpAssemble/queryAssembled
|
||||||
|
* @param data 请求参数:useId(ULD使用ID)
|
||||||
|
*/
|
||||||
|
@POST("IntExpAssemble/queryAssembled")
|
||||||
|
suspend fun getIntExpAssembleWaybillDetails(@Body data: RequestBody): BaseResultBean<MutableList<GjcWarehouse>>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 国际出港待计重-分页搜索
|
* 国际出港待计重-分页搜索
|
||||||
* 接口路径: /IntExpCheckIn/pageQuery
|
* 接口路径: /IntExpCheckIn/pageQuery
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ object ARouterConstants {
|
|||||||
const val ACTIVITY_URL_GJC_INSPECTION = "/gjc/GjcInspectionActivity" //国际出港 收运检查
|
const val ACTIVITY_URL_GJC_INSPECTION = "/gjc/GjcInspectionActivity" //国际出港 收运检查
|
||||||
const val ACTIVITY_URL_GJC_INSPECTION_DETAILS = "/gjc/GjcInspectionDetailsActivity" //国际出港 收运检查详情
|
const val ACTIVITY_URL_GJC_INSPECTION_DETAILS = "/gjc/GjcInspectionDetailsActivity" //国际出港 收运检查详情
|
||||||
const val ACTIVITY_URL_GJC_HANDOVER = "/gjc/GjcHandoverActivity" //国际出港 货物交接单
|
const val ACTIVITY_URL_GJC_HANDOVER = "/gjc/GjcHandoverActivity" //国际出港 货物交接单
|
||||||
|
const val ACTIVITY_URL_INT_EXP_ASSEMBLE = "/gjc/IntExpAssembleActivity" //国际出港 出港组装
|
||||||
|
|
||||||
///////////////// 国际进港模块
|
///////////////// 国际进港模块
|
||||||
/**
|
/**
|
||||||
|
|||||||
5
module_base/src/main/res/drawable/bg_green_radius_4.xml
Normal file
5
module_base/src/main/res/drawable/bg_green_radius_4.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#4CAF50" />
|
||||||
|
<corners android:radius="4dp" />
|
||||||
|
</shape>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
package com.lukouguoji.gjc.holder
|
||||||
|
|
||||||
|
import android.view.View
|
||||||
|
import com.lukouguoji.gjc.databinding.ItemAssembleWaybillDetailBinding
|
||||||
|
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||||
|
import com.lukouguoji.module_base.bean.GjcWarehouse
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际出港组装-运单明细ViewHolder
|
||||||
|
*/
|
||||||
|
class AssembleWaybillDetailViewHolder(view: View) :
|
||||||
|
BaseViewHolder<GjcWarehouse, ItemAssembleWaybillDetailBinding>(view) {
|
||||||
|
|
||||||
|
override fun onBind(item: Any?, position: Int) {
|
||||||
|
val bean = getItemBean(item) ?: return
|
||||||
|
binding.bean = bean
|
||||||
|
binding.position = position // 用于显示序号
|
||||||
|
binding.executePendingBindings()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,137 @@
|
|||||||
|
package com.lukouguoji.gjc.holder
|
||||||
|
|
||||||
|
import android.view.View
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import android.view.animation.Animation
|
||||||
|
import android.view.animation.Transformation
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import com.lukouguoji.gjc.R
|
||||||
|
import com.lukouguoji.gjc.databinding.ItemIntExpAssembleUldBinding
|
||||||
|
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||||
|
import com.lukouguoji.module_base.base.CommonAdapter
|
||||||
|
import com.lukouguoji.module_base.bean.GjcUldUseBean
|
||||||
|
import com.lukouguoji.module_base.bean.GjcWarehouse
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际出港组装-ULD列表ViewHolder
|
||||||
|
* 支持展开/收起运单明细
|
||||||
|
*/
|
||||||
|
class IntExpAssembleViewHolder(view: View) :
|
||||||
|
BaseViewHolder<GjcUldUseBean, ItemIntExpAssembleUldBinding>(view) {
|
||||||
|
|
||||||
|
private var waybillAdapter: CommonAdapter? = null
|
||||||
|
|
||||||
|
override fun onBind(item: Any?, position: Int) {
|
||||||
|
val bean = getItemBean(item) ?: return
|
||||||
|
binding.bean = bean
|
||||||
|
binding.position = position
|
||||||
|
|
||||||
|
// 初始化运单明细子列表
|
||||||
|
setupWaybillRecyclerView(bean)
|
||||||
|
|
||||||
|
// 更新展开状态(初次绑定不需要动画)
|
||||||
|
updateExpandState(bean, animate = false)
|
||||||
|
|
||||||
|
// 展开按钮点击事件
|
||||||
|
binding.btnExpand.setOnClickListener {
|
||||||
|
clickListener?.onItemClick(position, 1000) // type=1000表示展开操作
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.executePendingBindings()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化运单明细RecyclerView
|
||||||
|
*/
|
||||||
|
private fun setupWaybillRecyclerView(bean: GjcUldUseBean) {
|
||||||
|
if (binding.rvWaybillDetails.adapter == null) {
|
||||||
|
binding.rvWaybillDetails.layoutManager = LinearLayoutManager(itemView.context)
|
||||||
|
waybillAdapter = CommonAdapter(
|
||||||
|
itemView.context,
|
||||||
|
R.layout.item_assemble_waybill_detail,
|
||||||
|
AssembleWaybillDetailViewHolder::class.java
|
||||||
|
)
|
||||||
|
binding.rvWaybillDetails.adapter = waybillAdapter
|
||||||
|
}
|
||||||
|
|
||||||
|
// 刷新运单明细数据
|
||||||
|
waybillAdapter?.refresh(bean.waybillDetails ?: mutableListOf())
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新展开状态
|
||||||
|
* @param bean ULD数据
|
||||||
|
* @param animate 是否显示动画
|
||||||
|
*/
|
||||||
|
private fun updateExpandState(bean: GjcUldUseBean, animate: Boolean = true) {
|
||||||
|
if (bean.isExpanded) {
|
||||||
|
// 展开
|
||||||
|
if (animate) {
|
||||||
|
expand(binding.llWaybillDetails)
|
||||||
|
} else {
|
||||||
|
binding.llWaybillDetails.visibility = View.VISIBLE
|
||||||
|
}
|
||||||
|
binding.btnExpand.text = "收起"
|
||||||
|
} else {
|
||||||
|
// 收起
|
||||||
|
if (animate) {
|
||||||
|
collapse(binding.llWaybillDetails)
|
||||||
|
} else {
|
||||||
|
binding.llWaybillDetails.visibility = View.GONE
|
||||||
|
}
|
||||||
|
binding.btnExpand.text = "展开"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 展开动画(高度从0到wrap_content)
|
||||||
|
*/
|
||||||
|
private fun expand(view: View) {
|
||||||
|
// 测量目标高度
|
||||||
|
view.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED)
|
||||||
|
val targetHeight = view.measuredHeight
|
||||||
|
|
||||||
|
// 初始高度设为0
|
||||||
|
view.layoutParams.height = 0
|
||||||
|
view.visibility = View.VISIBLE
|
||||||
|
|
||||||
|
val animation = object : Animation() {
|
||||||
|
override fun applyTransformation(interpolatedTime: Float, t: Transformation?) {
|
||||||
|
view.layoutParams.height = if (interpolatedTime == 1f) {
|
||||||
|
ViewGroup.LayoutParams.WRAP_CONTENT
|
||||||
|
} else {
|
||||||
|
(targetHeight * interpolatedTime).toInt()
|
||||||
|
}
|
||||||
|
view.requestLayout()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun willChangeBounds() = true
|
||||||
|
}
|
||||||
|
|
||||||
|
animation.duration = 300 // 动画时长300ms
|
||||||
|
view.startAnimation(animation)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收起动画(高度从当前到0)
|
||||||
|
*/
|
||||||
|
private fun collapse(view: View) {
|
||||||
|
val initialHeight = view.measuredHeight
|
||||||
|
|
||||||
|
val animation = object : Animation() {
|
||||||
|
override fun applyTransformation(interpolatedTime: Float, t: Transformation?) {
|
||||||
|
if (interpolatedTime == 1f) {
|
||||||
|
view.visibility = View.GONE
|
||||||
|
} else {
|
||||||
|
view.layoutParams.height = initialHeight - (initialHeight * interpolatedTime).toInt()
|
||||||
|
view.requestLayout()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun willChangeBounds() = true
|
||||||
|
}
|
||||||
|
|
||||||
|
animation.duration = 300 // 动画时长300ms
|
||||||
|
view.startAnimation(animation)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
package com.lukouguoji.gjc.page.assemble
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import com.alibaba.android.arouter.facade.annotation.Route
|
||||||
|
import com.lukouguoji.gjc.R
|
||||||
|
import com.lukouguoji.gjc.databinding.ActivityIntExpAssembleBinding
|
||||||
|
import com.lukouguoji.gjc.viewModel.IntExpAssembleViewModel
|
||||||
|
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||||
|
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.ktx.addOnItemClickListener
|
||||||
|
import com.lukouguoji.module_base.router.ARouterConstants
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际出港-出港组装Activity
|
||||||
|
*/
|
||||||
|
@Route(path = ARouterConstants.ACTIVITY_URL_INT_EXP_ASSEMBLE)
|
||||||
|
class IntExpAssembleActivity :
|
||||||
|
BaseBindingActivity<ActivityIntExpAssembleBinding, IntExpAssembleViewModel>() {
|
||||||
|
|
||||||
|
override fun layoutId() = R.layout.activity_int_exp_assemble
|
||||||
|
override fun viewModelClass() = IntExpAssembleViewModel::class.java
|
||||||
|
|
||||||
|
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||||
|
setBackArrow("出港组装")
|
||||||
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
|
// 绑定分页
|
||||||
|
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
|
||||||
|
|
||||||
|
// 设置item点击监听
|
||||||
|
binding.rv.addOnItemClickListener(viewModel)
|
||||||
|
|
||||||
|
// 监听刷新事件
|
||||||
|
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
|
||||||
|
viewModel.refresh()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,132 @@
|
|||||||
|
package com.lukouguoji.gjc.viewModel
|
||||||
|
|
||||||
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import androidx.lifecycle.viewModelScope
|
||||||
|
import com.lukouguoji.gjc.R
|
||||||
|
import com.lukouguoji.gjc.holder.IntExpAssembleViewHolder
|
||||||
|
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||||
|
import com.lukouguoji.module_base.bean.GjcUldUseBean
|
||||||
|
import com.lukouguoji.module_base.http.net.NetApply
|
||||||
|
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.showToast
|
||||||
|
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||||
|
import dev.utils.app.info.KeyValue
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际出港-出港组装ViewModel
|
||||||
|
*/
|
||||||
|
class IntExpAssembleViewModel : BasePageViewModel() {
|
||||||
|
|
||||||
|
// ========== 搜索条件 ==========
|
||||||
|
val flightDate = MutableLiveData("") // 航班日期
|
||||||
|
val flightNo = MutableLiveData("") // 航班号
|
||||||
|
val uldNo = MutableLiveData("") // ULD编号
|
||||||
|
val reweighStatus = MutableLiveData("全部") // 复磅状态
|
||||||
|
val reweighStatusList = MutableLiveData( // 复磅状态选项
|
||||||
|
listOf(
|
||||||
|
KeyValue("全部", "全部"),
|
||||||
|
KeyValue("未复磅", "未复磅"),
|
||||||
|
KeyValue("已复磅", "已复磅")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
val assembler = MutableLiveData("") // 组装人
|
||||||
|
|
||||||
|
// ========== 适配器配置 ==========
|
||||||
|
val itemViewHolder = IntExpAssembleViewHolder::class.java
|
||||||
|
val itemLayoutId = R.layout.item_int_exp_assemble_uld
|
||||||
|
|
||||||
|
// ========== 底部统计 ==========
|
||||||
|
val totalCount = MutableLiveData("0") // 合计票数
|
||||||
|
val totalPieces = MutableLiveData("0") // 总件数
|
||||||
|
val totalWeight = MutableLiveData("0") // 总重量
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索按钮点击
|
||||||
|
*/
|
||||||
|
fun searchClick() {
|
||||||
|
refresh()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 切换展开/收起状态
|
||||||
|
*/
|
||||||
|
fun toggleExpand(position: Int) {
|
||||||
|
val bean = pageModel.rv?.commonAdapter()?.getItem(position) as? GjcUldUseBean ?: return
|
||||||
|
bean.isExpanded = !bean.isExpanded
|
||||||
|
|
||||||
|
if (bean.isExpanded && bean.waybillDetails == null) {
|
||||||
|
// 首次展开,加载运单明细
|
||||||
|
loadWaybillDetails(position, bean)
|
||||||
|
} else {
|
||||||
|
// 已有数据,直接刷新item显示/隐藏
|
||||||
|
pageModel.rv?.commonAdapter()?.notifyItemChanged(position)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加载运单明细
|
||||||
|
*/
|
||||||
|
private fun loadWaybillDetails(position: Int, bean: GjcUldUseBean) {
|
||||||
|
val params = mapOf("useId" to bean.useId).toRequestBody()
|
||||||
|
|
||||||
|
launchCollect({ NetApply.api.getIntExpAssembleWaybillDetails(params) }) {
|
||||||
|
onSuccess = { result ->
|
||||||
|
bean.waybillDetails = result.data ?: mutableListOf()
|
||||||
|
pageModel.rv?.commonAdapter()?.notifyItemChanged(position)
|
||||||
|
}
|
||||||
|
onFailed = { _, msg ->
|
||||||
|
bean.isExpanded = false // 加载失败,恢复展开状态
|
||||||
|
showToast(msg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取数据(列表 + 统计)
|
||||||
|
*/
|
||||||
|
override fun getData() {
|
||||||
|
// 构建筛选参数
|
||||||
|
val filterParams = mapOf(
|
||||||
|
"fdate" to flightDate.value!!.ifEmpty { null },
|
||||||
|
"fno" to flightNo.value!!.ifEmpty { null },
|
||||||
|
"uld" to uldNo.value!!.ifEmpty { null },
|
||||||
|
"ldUserName" to assembler.value!!.ifEmpty { null }
|
||||||
|
)
|
||||||
|
|
||||||
|
// 列表参数(含分页)
|
||||||
|
val listParams = (filterParams + mapOf(
|
||||||
|
"pageNum" to pageModel.page,
|
||||||
|
"pageSize" to pageModel.limit
|
||||||
|
)).toRequestBody()
|
||||||
|
|
||||||
|
// 统计参数(无分页)
|
||||||
|
val totalParams = filterParams.toRequestBody()
|
||||||
|
|
||||||
|
// 获取列表(显示loading)
|
||||||
|
launchLoadingCollect({ NetApply.api.getIntExpAssembleList(listParams) }) {
|
||||||
|
onSuccess = { pageModel.handleListBean(it) }
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取统计(后台调用)
|
||||||
|
launchCollect({ NetApply.api.getIntExpAssembleTotal(totalParams) }) {
|
||||||
|
onSuccess = { result ->
|
||||||
|
val data = result.data
|
||||||
|
totalCount.value = (data?.wbNumber ?: 0).toString()
|
||||||
|
totalPieces.value = (data?.totalPc ?: 0).toString()
|
||||||
|
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Item点击事件处理
|
||||||
|
*/
|
||||||
|
override fun onItemClick(position: Int, type: Int) {
|
||||||
|
if (type == 1000) { // 展开/收起操作
|
||||||
|
toggleExpand(position)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
181
module_gjc/src/main/res/layout/activity_int_exp_assemble.xml
Normal file
181
module_gjc/src/main/res/layout/activity_int_exp_assemble.xml
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="viewModel"
|
||||||
|
type="com.lukouguoji.gjc.viewModel.IntExpAssembleViewModel" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/color_f2"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<include layout="@layout/title_tool_bar" />
|
||||||
|
|
||||||
|
<!-- 搜索区域 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="10dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- 航班日期 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
hint='@{"请选择航班日期"}'
|
||||||
|
icon="@{@drawable/img_date}"
|
||||||
|
type="@{SearchLayoutType.DATE}"
|
||||||
|
value="@={viewModel.flightDate}" />
|
||||||
|
|
||||||
|
<!-- 航班号 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
hint='@{"请输入航班号"}'
|
||||||
|
icon="@{@drawable/img_scan}"
|
||||||
|
type="@{SearchLayoutType.INPUT}"
|
||||||
|
value="@={viewModel.flightNo}" />
|
||||||
|
|
||||||
|
<!-- ULD编号 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
hint='@{"请输入ULD编号"}'
|
||||||
|
type="@{SearchLayoutType.INPUT}"
|
||||||
|
value="@={viewModel.uldNo}" />
|
||||||
|
|
||||||
|
<!-- 复磅状态 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
hint='@{"请选择复磅状态"}'
|
||||||
|
list="@{viewModel.reweighStatusList}"
|
||||||
|
type="@{SearchLayoutType.SPINNER}"
|
||||||
|
value="@={viewModel.reweighStatus}" />
|
||||||
|
|
||||||
|
<!-- 组装人 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
hint='@{"请输入组装人"}'
|
||||||
|
type="@{SearchLayoutType.INPUT}"
|
||||||
|
value="@={viewModel.assembler}" />
|
||||||
|
|
||||||
|
<!-- 搜索按钮 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
style="@style/iv_search_action"
|
||||||
|
android:onClick="@{()-> viewModel.searchClick()}"
|
||||||
|
android:src="@drawable/img_search" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 列表 -->
|
||||||
|
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||||
|
android:id="@+id/srl"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginHorizontal="10dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
tools:itemCount="3"
|
||||||
|
tools:listitem="@layout/item_int_exp_assemble_uld" />
|
||||||
|
|
||||||
|
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||||
|
|
||||||
|
<!-- 底部统计和操作按钮 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:background="@color/color_bottom_layout"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingHorizontal="15dp">
|
||||||
|
|
||||||
|
<!-- 统计信息 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text='@{"合计:"+viewModel.totalCount+"票"}'
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:text='@{"总件数:"+viewModel.totalPieces}'
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:text='@{"总重量:"+viewModel.totalWeight}'
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 操作按钮(暂时预留,不实现功能) -->
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_bottom_btn"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:text="新增"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_bottom_btn"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:text="删除"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_bottom_btn"
|
||||||
|
android:text="回填重量"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</layout>
|
||||||
106
module_gjc/src/main/res/layout/item_assemble_waybill_detail.xml
Normal file
106
module_gjc/src/main/res/layout/item_assemble_waybill_detail.xml
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="bean"
|
||||||
|
type="com.lukouguoji.module_base.bean.GjcWarehouse" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="position"
|
||||||
|
type="Integer" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:minHeight="45dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingHorizontal="10dp"
|
||||||
|
android:paddingVertical="8dp">
|
||||||
|
|
||||||
|
<!-- 序号 -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@{String.valueOf(position + 1)}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<!-- 运单号 -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@{bean.no}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<!-- 件数 -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.8"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@{String.valueOf(bean.pc)}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<!-- 重量 -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.8"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@{String.valueOf(bean.weight)}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<!-- 代理 -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@{bean.agentCode}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<!-- 目的港 -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@{bean.dest}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<!-- 特码 -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@{bean.spCode}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<!-- 品名(中) -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@{bean.goodsCn}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</layout>
|
||||||
343
module_gjc/src/main/res/layout/item_int_exp_assemble_uld.xml
Normal file
343
module_gjc/src/main/res/layout/item_int_exp_assemble_uld.xml
Normal file
@@ -0,0 +1,343 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="bean"
|
||||||
|
type="com.lukouguoji.module_base.bean.GjcUldUseBean" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="position"
|
||||||
|
type="Integer" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:background="@drawable/bg_white_radius_8"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="15dp">
|
||||||
|
|
||||||
|
<!-- 主体部分 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- 飞机图标 -->
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="50dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:src="@drawable/img_plane" />
|
||||||
|
|
||||||
|
<!-- ULD信息区域 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="15dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!-- 第一行:ULD编号、航班日期、航班号、目的港 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text='@{"ULD编号:"}'
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.uld}"
|
||||||
|
android:textColor="@color/colorPrimary"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:text='@{"航班日期:"}'
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.fdate}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:text='@{"航班号:"}'
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.fno}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:text='@{"目的港:"}'
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.fdest}"
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 第二行:总重、货重、件数、组装人、组装时间 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text='@{"总重:"}'
|
||||||
|
android:textColor="@color/text_gray"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{String.valueOf(bean.totalWeight)}"
|
||||||
|
android:textColor="@color/text_gray"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:text='@{"货重:"}'
|
||||||
|
android:textColor="@color/text_gray"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{String.valueOf(bean.cargoWeight)}"
|
||||||
|
android:textColor="@color/text_gray"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:text='@{"件数:"}'
|
||||||
|
android:textColor="@color/text_gray"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.pieces}"
|
||||||
|
android:textColor="@color/text_gray"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:text='@{"组装人:"}'
|
||||||
|
android:textColor="@color/text_gray"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.ldUserName}"
|
||||||
|
android:textColor="@color/text_gray"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:text='@{"组装时间:"}'
|
||||||
|
android:textColor="@color/text_gray"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.ldDate}"
|
||||||
|
android:textColor="@color/text_gray"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 复磅状态标签(仅在ldDate不为空时显示) -->
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="15dp"
|
||||||
|
android:background="@drawable/bg_green_radius_4"
|
||||||
|
android:paddingHorizontal="12dp"
|
||||||
|
android:paddingVertical="6dp"
|
||||||
|
android:text="已复磅"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:visibility='@{bean.ldDate != null && !bean.ldDate.isEmpty() ? View.VISIBLE : View.GONE}' />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 展开/收起按钮 -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/btn_expand"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="35dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:background="@drawable/bg_gray_radius_4"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text='@{bean.isExpanded ? "收起" : "展开"}'
|
||||||
|
android:textColor="@color/text_normal"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<!-- 运单明细区域(可展开) -->
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_waybill_details"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:background="#E8F5E9"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:visibility='@{bean.isExpanded ? View.VISIBLE : View.GONE}'>
|
||||||
|
|
||||||
|
<!-- 表头(深绿色背景) -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:background="#4CAF50"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingHorizontal="10dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="序号"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="运单号"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
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/white"
|
||||||
|
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="重量(KG)"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="代理"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="目的港"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="特码"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.5"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="品名(中)"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 运单明细列表 -->
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv_waybill_details"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:nestedScrollingEnabled="false"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</layout>
|
||||||
Reference in New Issue
Block a user