feat: 出港运抵
This commit is contained in:
@@ -115,6 +115,12 @@
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<!-- 国际出港运抵 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjc.activity.IntExpArriveActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<!-- 国际出港查询 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjc.activity.GjcQueryActivity"
|
||||
|
||||
@@ -368,6 +368,11 @@ class HomeFragment : Fragment() {
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_INT_EXP_OUT_HANDOVER)
|
||||
.navigation()
|
||||
}
|
||||
// 出港运抵
|
||||
Constant.AuthName.GjcIntExpArrive -> {
|
||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_INT_EXP_ARRIVE)
|
||||
.navigation()
|
||||
}
|
||||
/**
|
||||
* 国际进港
|
||||
*/
|
||||
@@ -666,6 +671,14 @@ class HomeFragment : Fragment() {
|
||||
)
|
||||
)
|
||||
|
||||
list.add(
|
||||
RightMenu(
|
||||
Constant.AuthName.GjcIntExpArrive,
|
||||
com.lukouguoji.module_base.R.drawable.img_gjc_banxiangzuzhuang,
|
||||
"出港运抵"
|
||||
)
|
||||
)
|
||||
|
||||
// list.add(
|
||||
// RightMenu(
|
||||
// Constant.AuthName.GjcWareHouseActivity,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
import androidx.databinding.ObservableBoolean
|
||||
import java.util.Date
|
||||
|
||||
/**
|
||||
@@ -106,7 +107,15 @@ data class GjcMaWb(
|
||||
var haWbList: List<GjcHaWb>? = null, // 分单列表
|
||||
var storageUseList: List<GjcStorageUse>? = null, // 库位使用列表
|
||||
var attachList: List<ComAttach>? = null // 附件列表
|
||||
)
|
||||
) {
|
||||
// ==================== UI扩展字段 ====================
|
||||
val checked: ObservableBoolean = ObservableBoolean(false) // 选中状态
|
||||
|
||||
// 兼容现有API的isSelected属性
|
||||
var isSelected: Boolean
|
||||
get() = checked.get()
|
||||
set(value) = checked.set(value)
|
||||
}
|
||||
|
||||
/**
|
||||
* 国际出港分单数据模型
|
||||
@@ -185,7 +194,15 @@ data class GjcHaWb(
|
||||
var tallyOpId: String? = null, // 理货操作人ID
|
||||
var declareCount: Long? = null, // 申报次数
|
||||
var activeId: Long? = null // 活动ID
|
||||
)
|
||||
) {
|
||||
// ==================== UI扩展字段 ====================
|
||||
val checked: ObservableBoolean = ObservableBoolean(false) // 选中状态
|
||||
|
||||
// 兼容现有API的isSelected属性
|
||||
var isSelected: Boolean
|
||||
get() = checked.get()
|
||||
set(value) = checked.set(value)
|
||||
}
|
||||
|
||||
/**
|
||||
* 库位使用记录
|
||||
|
||||
@@ -247,6 +247,7 @@ interface Constant {
|
||||
const val GjcIntExpAssembleActivity = "AppIntExpAssemble" //出港组装
|
||||
const val GjcAssembleAllocateActivity = "AppIntExpAssembleAllocate" //组装分配
|
||||
const val GjcIntExpOutHandover = "AppIntExpOutHandover" //出库交接
|
||||
const val GjcIntExpArrive = "AppIntExpArrive" //出港运抵
|
||||
|
||||
/**
|
||||
* 国际进港
|
||||
|
||||
@@ -558,6 +558,36 @@ interface Api {
|
||||
@POST("IntExpOutHandover/handover")
|
||||
suspend fun completeHandover(@Body data: RequestBody): BaseResultBean<Boolean>
|
||||
|
||||
/**
|
||||
* 国际出港运抵-分页列表
|
||||
* 接口路径: /IntExpArrive/pageQuery
|
||||
*/
|
||||
@POST("IntExpArrive/pageQuery")
|
||||
suspend fun getIntExpArriveList(@Body data: RequestBody): BaseListBean<GjcMaWb>
|
||||
|
||||
/**
|
||||
* 国际出港运抵-分页合计
|
||||
* 接口路径: /IntExpArrive/pageQueryTotal
|
||||
*/
|
||||
@POST("IntExpArrive/pageQueryTotal")
|
||||
suspend fun getIntExpArriveTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
|
||||
|
||||
/**
|
||||
* 国际出港运抵-重置运抵申报状态
|
||||
* 接口路径: /IntExpArrive/resetDeclare
|
||||
* @param data 请求参数:选中的运单列表
|
||||
*/
|
||||
@POST("IntExpArrive/resetDeclare")
|
||||
suspend fun resetArriveDeclare(@Body data: RequestBody): BaseResultBean<Boolean>
|
||||
|
||||
/**
|
||||
* 国际出港运抵-运抵申报(分单+主单)
|
||||
* 接口路径: /IntExpArrive/declare
|
||||
* @param data 请求参数:选中的运单列表
|
||||
*/
|
||||
@POST("IntExpArrive/declare")
|
||||
suspend fun arriveDeclare(@Body data: RequestBody): BaseResultBean<Boolean>
|
||||
|
||||
/**
|
||||
* 国际出港移库-分页查询
|
||||
* 接口路径: /IntExpMove/pageQuery
|
||||
|
||||
@@ -143,6 +143,7 @@ object ARouterConstants {
|
||||
const val ACTIVITY_URL_INT_EXP_MOVE = "/gjc/IntExpMoveActivity" //国际出港 出港移库
|
||||
const val ACTIVITY_URL_GJC_ASSEMBLE_ALLOCATE = "/gjc/GjcAssembleAllocateActivity" //国际出港 组装分配
|
||||
const val ACTIVITY_URL_INT_EXP_OUT_HANDOVER = "/gjc/IntExpOutHandoverActivity" //国际出港 出库交接
|
||||
const val ACTIVITY_URL_INT_EXP_ARRIVE = "/gjc/IntExpArriveActivity" //国际出港 出港运抵
|
||||
|
||||
///////////////// 国际进港模块
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.lukouguoji.gjc.activity
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.databinding.ActivityIntExpArriveBinding
|
||||
import com.lukouguoji.gjc.viewModel.IntExpArriveViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.impl.observe
|
||||
import com.lukouguoji.module_base.ktx.addOnItemClickListener
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
/**
|
||||
* 国际出港-出港运抵页面
|
||||
*/
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_INT_EXP_ARRIVE)
|
||||
class IntExpArriveActivity :
|
||||
BaseBindingActivity<ActivityIntExpArriveBinding, IntExpArriveViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_int_exp_arrive
|
||||
override fun viewModelClass() = IntExpArriveViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("出港运抵")
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 观察全选状态,更新图标透明度
|
||||
viewModel.isAllChecked.observe(this) { isAllChecked ->
|
||||
binding.checkIcon.alpha = if (isAllChecked) 1.0f else 0.5f
|
||||
}
|
||||
|
||||
// 绑定分页
|
||||
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
|
||||
|
||||
// 设置item点击监听
|
||||
binding.rv.addOnItemClickListener(viewModel)
|
||||
|
||||
// 监听刷新事件
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
// 初始加载数据
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
when (requestCode) {
|
||||
Constant.RequestCode.WAYBILL -> {
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
viewModel.waybillNo.value = data?.getStringExtra(Constant.Result.CODED_CONTENT)
|
||||
viewModel.searchClick()
|
||||
}
|
||||
}
|
||||
Constant.RequestCode.CODE -> {
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
viewModel.hno.value = data?.getStringExtra(Constant.Result.CODED_CONTENT)
|
||||
viewModel.searchClick()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.lukouguoji.gjc.holder
|
||||
|
||||
import android.view.View
|
||||
import com.lukouguoji.gjc.databinding.ItemIntExpArriveBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.bean.GjcMaWb
|
||||
|
||||
/**
|
||||
* 国际出港-出港运抵 列表项ViewHolder
|
||||
*/
|
||||
class IntExpArriveViewHolder(view: View) :
|
||||
BaseViewHolder<GjcMaWb, ItemIntExpArriveBinding>(view) {
|
||||
|
||||
override fun onBind(item: Any?, position: Int) {
|
||||
val bean = getItemBean(item) ?: return
|
||||
binding.bean = bean
|
||||
binding.position = position
|
||||
binding.executePendingBindings()
|
||||
|
||||
// 添加图标点击事件 - 切换选择状态
|
||||
binding.ivIcon.setOnClickListener {
|
||||
// 反转checked状态
|
||||
bean.checked.set(!bean.checked.get())
|
||||
|
||||
// 立即更新UI(图片自动切换)
|
||||
binding.executePendingBindings()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
package com.lukouguoji.gjc.viewModel
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.holder.IntExpArriveViewHolder
|
||||
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||
import com.lukouguoji.module_base.bean.GjcMaWb
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
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 com.lukouguoji.module_base.model.ScanModel
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
/**
|
||||
* 国际出港-出港运抵 ViewModel
|
||||
*/
|
||||
class IntExpArriveViewModel : BasePageViewModel() {
|
||||
|
||||
// ========== 搜索条件 ==========
|
||||
val flightDate = MutableLiveData("") // 航班日期
|
||||
val flightNo = MutableLiveData("") // 航班号
|
||||
val waybillNo = MutableLiveData("") // 运单号
|
||||
val hno = MutableLiveData("") // 分单号
|
||||
|
||||
// ========== 统计信息 ==========
|
||||
val totalCount = MutableLiveData("0") // 合计票数
|
||||
val totalPc = MutableLiveData("0") // 总件数
|
||||
val totalWeight = MutableLiveData("0") // 总重量
|
||||
|
||||
// ========== 全选状态 ==========
|
||||
val isAllChecked = MutableLiveData(false)
|
||||
|
||||
init {
|
||||
// 监听全选状态,自动更新所有列表项
|
||||
isAllChecked.observeForever { checked ->
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcMaWb> ?: return@observeForever
|
||||
list.forEach { it.checked.set(checked) }
|
||||
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
|
||||
// ========== 适配器配置 ==========
|
||||
val itemViewHolder = IntExpArriveViewHolder::class.java
|
||||
val itemLayoutId = R.layout.item_int_exp_arrive
|
||||
|
||||
/**
|
||||
* 搜索按钮点击
|
||||
*/
|
||||
fun searchClick() {
|
||||
refresh()
|
||||
}
|
||||
|
||||
/**
|
||||
* 全选按钮点击 (切换全选状态)
|
||||
*/
|
||||
fun checkAllClick() {
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcMaWb> ?: return
|
||||
|
||||
// 切换全选状态
|
||||
val shouldCheckAll = !isAllChecked.value!!
|
||||
list.forEach { it.checked.set(shouldCheckAll) }
|
||||
isAllChecked.value = shouldCheckAll
|
||||
|
||||
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫码运单号
|
||||
*/
|
||||
fun scanWaybill() {
|
||||
ScanModel.startScan(getTopActivity(), Constant.RequestCode.WAYBILL)
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫码分单号
|
||||
*/
|
||||
fun scanHaWb() {
|
||||
ScanModel.startScan(getTopActivity(), Constant.RequestCode.CODE)
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态重置
|
||||
*/
|
||||
fun resetDeclareClick() {
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcMaWb> ?: return
|
||||
val selectedItems = list.filter { it.isSelected }
|
||||
|
||||
if (selectedItems.isEmpty()) {
|
||||
showToast("请选择要重置的运单")
|
||||
return
|
||||
}
|
||||
|
||||
val requestData = mapOf("maWbList" to selectedItems).toRequestBody()
|
||||
|
||||
launchLoadingCollect({ NetApply.api.resetArriveDeclare(requestData) }) {
|
||||
onSuccess = {
|
||||
showToast("状态重置成功")
|
||||
viewModelScope.launch {
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||
}
|
||||
refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 运抵申报
|
||||
*/
|
||||
fun arriveReportClick() {
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcMaWb> ?: return
|
||||
val selectedItems = list.filter { it.isSelected }
|
||||
|
||||
if (selectedItems.isEmpty()) {
|
||||
showToast("请选择要申报的运单")
|
||||
return
|
||||
}
|
||||
|
||||
val requestData = mapOf("maWbList" to selectedItems).toRequestBody()
|
||||
|
||||
launchLoadingCollect({ NetApply.api.arriveDeclare(requestData) }) {
|
||||
onSuccess = {
|
||||
showToast("运抵申报成功")
|
||||
viewModelScope.launch {
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||
}
|
||||
refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据 (重写BasePageViewModel)
|
||||
*/
|
||||
override fun getData() {
|
||||
// 构建搜索条件
|
||||
val filterParams = mapOf(
|
||||
"fdate" to flightDate.value?.ifEmpty { null },
|
||||
"fno" to flightNo.value?.ifEmpty { null },
|
||||
"likeNo" to waybillNo.value?.ifEmpty { null },
|
||||
"hno" to hno.value?.ifEmpty { null }
|
||||
)
|
||||
|
||||
// 列表参数 (含分页)
|
||||
val listParams = (filterParams + mapOf(
|
||||
"pageNum" to pageModel.page,
|
||||
"pageSize" to pageModel.limit
|
||||
)).toRequestBody()
|
||||
|
||||
// 统计参数 (无分页)
|
||||
val totalParams = filterParams.toRequestBody()
|
||||
|
||||
// 获取列表 (带Loading)
|
||||
launchLoadingCollect({ NetApply.api.getIntExpArriveList(listParams) }) {
|
||||
onSuccess = { pageModel.handleListBean(it) }
|
||||
}
|
||||
|
||||
// 获取统计信息 (后台请求)
|
||||
launchCollect({ NetApply.api.getIntExpArriveTotal(totalParams) }) {
|
||||
onSuccess = { result ->
|
||||
val data = result.data
|
||||
totalCount.value = (data?.wbNumber ?: 0).toString()
|
||||
totalPc.value = (data?.totalPc ?: 0).toString()
|
||||
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
206
module_gjc/src/main/res/layout/activity_int_exp_arrive.xml
Normal file
206
module_gjc/src/main/res/layout/activity_int_exp_arrive.xml
Normal file
@@ -0,0 +1,206 @@
|
||||
<?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.IntExpArriveViewModel" />
|
||||
</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='@{"请输入航班号"}'
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.flightNo}" />
|
||||
|
||||
<!-- 运单号 -->
|
||||
<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/scan_code}"
|
||||
setOnIconClickListener="@{(v)-> viewModel.scanWaybill()}"
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.waybillNo}" />
|
||||
|
||||
<!-- 分单号 -->
|
||||
<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/scan_code}"
|
||||
setOnIconClickListener="@{(v)-> viewModel.scanHaWb()}"
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.hno}" />
|
||||
|
||||
<!-- 搜索按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<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"
|
||||
itemLayoutId="@{viewModel.itemLayoutId}"
|
||||
viewHolder="@{viewModel.itemViewHolder}"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:itemCount="3"
|
||||
tools:listitem="@layout/item_int_exp_arrive" />
|
||||
|
||||
</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="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:onClick="@{()-> viewModel.checkAllClick()}">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkIcon"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:src="@drawable/img_check_all" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="全选"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 统计信息 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
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.totalPc}'
|
||||
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>
|
||||
|
||||
<!-- 批量操作按钮组 -->
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:onClick="@{()-> viewModel.resetDeclareClick()}"
|
||||
android:text="状态重置" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:background="#dc7771"
|
||||
android:onClick="@{()-> viewModel.arriveReportClick()}"
|
||||
android:text="运抵申报" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
318
module_gjc/src/main/res/layout/item_int_exp_arrive.xml
Normal file
318
module_gjc/src/main/res/layout/item_int_exp_arrive.xml
Normal file
@@ -0,0 +1,318 @@
|
||||
<?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.GjcMaWb" />
|
||||
|
||||
<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="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
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 第一行:运单号、状态、代理、件数、重量 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 运单号 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
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="@{bean.no}"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</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.declareStatus}"
|
||||
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.agentName}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 件数 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
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="@{String.valueOf(bean.pc)}"
|
||||
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="@{String.valueOf((int)bean.weight)}"
|
||||
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.5"
|
||||
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.range}"
|
||||
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="-"
|
||||
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="@{bean.arriveFlag}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 运单类型 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
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="@{bean.awbName}"
|
||||
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.haWbNumber)}"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
Reference in New Issue
Block a user