merge: 手机适配分支 feature/phone-ui-adaptation 合入 main,平板与 5.5 寸手机统一在主干开发

合并原则:业务层以 main 平板为准,手机端只做 UI 适配。
- 冲突布局:平板改动三方合并进 layout-sw600dp/,手机布局保留并补齐主干新增业务
- Bean/ViewModel 冲突取平板业务逻辑(计重托盘联动、开始计重运抵重量自动计算、
  出港查询 dateState、仓库入/出库件数重量、清仓备注等),手机仅保留展示字段
- 主干新功能同步到手机:运抵海关放行/分单号筛选/回执走 getResponse、删除申报;
  出库交接装机状态与允许装机/配运;出港移库详情与编辑共用 IntExpMoveEditActivity;
  出入港仓库清仓备注、出库弹框件数重量、进港仓库 pcLabel;ULD 所在港/位置
- 新增手机变体:出库/入库/清仓/配运/删除申报弹框、移库详情编辑页、海关回执页;
  PhoneBottomBar 增次操作按钮
- 手机对齐平板:去掉 likeNo 与平板没有的筛选入参、恢复平板默认查询日期,
  补齐平板表单/筛选项与操作入口;移除手机专属 IntExpMoveDetailActivity
- CLAUDE.md 记录单分支约定与「业务以平板为准」规则,CHANGELOG 补合并记录

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
YANG JIANKUAN
2026-10-11 21:20:03 -07:00
356 changed files with 44711 additions and 13385 deletions

View File

@@ -1,25 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.lukouguoji.gjc">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Aerologic">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="userLandscape"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.lukouguoji.gjc">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Aerologic">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="unspecified"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@@ -18,6 +18,7 @@ import com.lukouguoji.module_base.ktx.getLifecycleOwner
import com.lukouguoji.module_base.ktx.setUpperCaseAlphanumericFilter
import com.lukouguoji.module_base.ktx.setUpperCaseLetterFilter
import com.lukouguoji.module_base.router.ARouterConstants
import com.lukouguoji.module_base.util.DeviceUtil
/**
* 国际出港查询列表页
@@ -31,7 +32,7 @@ class GjcQueryActivity :
override fun viewModelClass() = GjcQueryViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际出港查询")
setBackArrow(if (DeviceUtil.isPhone()) "出港查询" else "国际出港查询")
binding.viewModel = viewModel
@@ -48,23 +49,31 @@ class GjcQueryActivity :
viewModel.initAgentList()
viewModel.initFilterLists()
// 观察筛选面板显示状态
viewModel.filterVisible.observe(this) { visible ->
if (visible) showFilterPanel() else hideFilterPanel()
}
// 平板变体才有侧滑筛选面板(filter_panel/filter_overlay 手机变体不存在,Binding 字段为 null)
val padFilterPanel = binding.filterPanel
if (padFilterPanel != null) {
// 观察筛选面板显示状态(滑入/滑出动画)
viewModel.filterVisible.observe(this) { visible ->
if (visible) showFilterPanel() else hideFilterPanel()
}
// 航班号:大写字母+数字
binding.flightNoSearch.et.setUpperCaseAlphanumericFilter()
// 目的港:仅大写字母
binding.filterPanel.filterDest.et.setUpperCaseLetterFilter()
// 航班号(搜索栏):大写字母+数字
binding.flightNoSearch?.et?.setUpperCaseAlphanumericFilter()
// 目的港:仅大写字母
padFilterPanel.filterDest.et.setUpperCaseLetterFilter()
} else {
// 手机变体:PhoneFilterPanel 的显隐由 XML 直接绑定 viewModel.filterVisible,无需动画代码
binding.phoneFilterFlightNo?.et?.setUpperCaseAlphanumericFilter()
binding.phoneFilterDest?.et?.setUpperCaseLetterFilter()
}
// 初始加载
viewModel.refresh()
}
private fun showFilterPanel() {
val panel = binding.filterPanel.root
val overlay = binding.filterOverlay
val panel = binding.filterPanel?.root ?: return
val overlay = binding.filterOverlay ?: return
val panelWidth = window.decorView.width / 3
panel.layoutParams = (panel.layoutParams as FrameLayout.LayoutParams).apply {
@@ -86,8 +95,8 @@ class GjcQueryActivity :
}
private fun hideFilterPanel() {
val panel = binding.filterPanel.root
val overlay = binding.filterOverlay
val panel = binding.filterPanel?.root ?: return
val overlay = binding.filterOverlay ?: return
if (panel.visibility != View.VISIBLE) return

View File

@@ -1,90 +1,91 @@
package com.lukouguoji.gjc.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.Gravity
import android.widget.ImageView
import android.widget.LinearLayout
import androidx.appcompat.widget.Toolbar
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityGjcQueryDetailsBinding
import com.lukouguoji.gjc.viewModel.GjcQueryDetailsViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.base.CustomVP2Adapter
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.router.ARouterConstants
/**
* 国际出港查询详情页面
*/
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_QUERY_DETAILS)
class GjcQueryDetailsActivity :
BaseBindingActivity<ActivityGjcQueryDetailsBinding, GjcQueryDetailsViewModel>() {
override fun layoutId() = R.layout.activity_gjc_query_details
override fun viewModelClass() = GjcQueryDetailsViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际出港查询详情")
binding.viewModel = viewModel
// 初始化ViewModel(传入maWbId)
viewModel.initOnCreated(intent)
// 配置ViewPager2
binding.vp.adapter = CustomVP2Adapter(
viewModel.fragmentList,
supportFragmentManager,
lifecycle
)
binding.vp.isUserInputEnabled = false // 禁用滑动
binding.vp.offscreenPageLimit = 3 // 预加载3个Fragment
// 监听Tab索引变化,切换Fragment
viewModel.currentTab.observe(this) {
binding.vp.setCurrentItem(it, false) // false:无动画
}
// 标题栏右侧添加日志查询图标
val toolbar = findViewById<Toolbar>(com.lukouguoji.module_base.R.id.toolbar)
val logIcon = ImageView(this).apply {
setImageResource(com.lukouguoji.module_base.R.drawable.img_log)
layoutParams = Toolbar.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT
).apply {
gravity = Gravity.END or Gravity.CENTER_VERTICAL
marginEnd = 15
width = 30.dp
height = 30.dp
}
setOnClickListener {
val wbNo = viewModel.maWbData.value?.get("wbNo") as? String ?: ""
ARouter.getInstance()
.build(ARouterConstants.ACTIVITY_URL_LOG_DETAIL)
.withString(Constant.Key.KEY, wbNo)
.withString(Constant.Key.AWB_TYPE, "IO")
.navigation()
}
}
toolbar.addView(logIcon)
// 加载详情数据
viewModel.loadDetails()
}
private val Int.dp: Int
get() = (this * resources!!.displayMetrics.density).toInt()
companion object {
@JvmStatic
fun start(context: Context, maWbId: Long?) {
val starter = Intent(context, GjcQueryDetailsActivity::class.java)
.putExtra(Constant.Key.ID, maWbId?.toString() ?: "")
context.startActivity(starter)
}
}
}
package com.lukouguoji.gjc.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.Gravity
import android.widget.ImageView
import android.widget.LinearLayout
import androidx.appcompat.widget.Toolbar
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityGjcQueryDetailsBinding
import com.lukouguoji.gjc.viewModel.GjcQueryDetailsViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.base.CustomVP2Adapter
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.router.ARouterConstants
import com.lukouguoji.module_base.util.DeviceUtil
/**
* 国际出港查询详情页面
*/
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_QUERY_DETAILS)
class GjcQueryDetailsActivity :
BaseBindingActivity<ActivityGjcQueryDetailsBinding, GjcQueryDetailsViewModel>() {
override fun layoutId() = R.layout.activity_gjc_query_details
override fun viewModelClass() = GjcQueryDetailsViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow(if (DeviceUtil.isPhone()) "出港货物" else "国际出港查询详情")
binding.viewModel = viewModel
// 初始化ViewModel(传入maWbId)
viewModel.initOnCreated(intent)
// 配置ViewPager2
binding.vp.adapter = CustomVP2Adapter(
viewModel.fragmentList,
supportFragmentManager,
lifecycle
)
binding.vp.isUserInputEnabled = false // 禁用滑动
binding.vp.offscreenPageLimit = 3 // 预加载3个Fragment
// 监听Tab索引变化,切换Fragment
viewModel.currentTab.observe(this) {
binding.vp.setCurrentItem(it, false) // false:无动画
}
// 标题栏右侧添加日志查询图标
val toolbar = findViewById<Toolbar>(com.lukouguoji.module_base.R.id.toolbar)
val logIcon = ImageView(this).apply {
setImageResource(com.lukouguoji.module_base.R.drawable.img_log)
layoutParams = Toolbar.LayoutParams(
LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT
).apply {
gravity = Gravity.END or Gravity.CENTER_VERTICAL
marginEnd = 15
width = 30.dp
height = 30.dp
}
setOnClickListener {
val wbNo = viewModel.maWbData.value?.get("wbNo") as? String ?: ""
ARouter.getInstance()
.build(ARouterConstants.ACTIVITY_URL_LOG_DETAIL)
.withString(Constant.Key.KEY, wbNo)
.withString(Constant.Key.AWB_TYPE, "IO")
.navigation()
}
}
toolbar.addView(logIcon)
// 加载详情数据
viewModel.loadDetails()
}
private val Int.dp: Int
get() = (this * resources!!.displayMetrics.density).toInt()
companion object {
@JvmStatic
fun start(context: Context, maWbId: Long?) {
val starter = Intent(context, GjcQueryDetailsActivity::class.java)
.putExtra(Constant.Key.ID, maWbId?.toString() ?: "")
context.startActivity(starter)
}
}
}

View File

@@ -1,62 +1,104 @@
package com.lukouguoji.gjc.activity
import android.content.Context
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.ActivityGjcWeighingListBinding
import com.lukouguoji.gjc.viewModel.GjcWeighingViewModel
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.getLifecycleOwner
import com.lukouguoji.module_base.router.ARouterConstants
/**
* 国际出港计重列表页
*/
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_LIST)
class GjcWeighingListActivity :
BaseBindingActivity<ActivityGjcWeighingListBinding, GjcWeighingViewModel>() {
override fun layoutId() = R.layout.activity_gjc_weighing_list
override fun viewModelClass() = GjcWeighingViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际出港待计重")
binding.viewModel = viewModel
// 初始化代理人列表(从API获取)
viewModel.initAgentList()
// 初始化特码列表(从API获取)
viewModel.initSpecialCodeList()
// 绑定分页逻辑
viewModel.pageModel
.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, getLifecycleOwner())
// 监听刷新事件
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).observe(this) { viewModel.onItemCheckChanged() }
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH)
.observe(this) {
viewModel.refresh()
}
// 初始加载
viewModel.refresh()
}
companion object {
@JvmStatic
fun start(context: Context) {
val starter = Intent(context, GjcWeighingListActivity::class.java)
context.startActivity(starter)
}
}
}
package com.lukouguoji.gjc.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.databinding.ObservableBoolean
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityGjcWeighingListBinding
import com.lukouguoji.gjc.viewModel.GjcWeighingViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.GjcWeighingBean
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.getLifecycleOwner
import com.lukouguoji.module_base.router.ARouterConstants
import com.lukouguoji.module_base.util.DeviceUtil
/**
* 国际出港计重列表页
*
* 布局 id 不区分设备,平板/手机由资源限定符自动选择:
* layout-sw600dp/activity_gjc_weighing_list.xml(平板)
* layout/activity_gjc_weighing_list.xml(手机)
*/
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_LIST)
class GjcWeighingListActivity :
BaseBindingActivity<ActivityGjcWeighingListBinding, GjcWeighingViewModel>() {
override fun layoutId() = R.layout.activity_gjc_weighing_list
override fun viewModelClass() = GjcWeighingViewModel::class.java
/** 手机版筛选弹层显隐(仅 UI 状态,不涉及业务逻辑) */
val filterPanelVisible = ObservableBoolean(false)
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow(if (DeviceUtil.isPhone()) "出港待计重" else "国际出港待计重")
binding.viewModel = viewModel
binding.activity = this
// 手机版专属数据:放开默认日期、加载筛选弹层字典、启用三格统计
// 平板端不调用,查询链路与请求次数与改造前完全一致
if (DeviceUtil.isPhone()) {
viewModel.initPhoneExtras()
}
// 初始化代理人列表(从API获取)
viewModel.initAgentList()
// 初始化特码列表(从API获取)
viewModel.initSpecialCodeList()
// 绑定分页逻辑
viewModel.pageModel
.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, getLifecycleOwner())
// 监听刷新事件
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).observe(this) { viewModel.onItemCheckChanged() }
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH)
.observe(this) {
viewModel.refresh()
}
// 初始加载
viewModel.refresh()
}
// ==================== 手机版专用交互(纯 UI,复用既有 ViewModel 字段) ====================
/** 手机版筛选弹层显隐切换 */
fun toggleFilterPanel() {
filterPanelVisible.set(!filterPanelVisible.get())
}
/** 手机版筛选:重置(只清弹层内条件,不影响顶部搜索框) */
fun resetFilter() {
viewModel.flightDate.value = ""
viewModel.agentCode.value = ""
viewModel.spCode.value = ""
}
/** 手机版筛选:确认 */
fun confirmFilter() {
filterPanelVisible.set(false)
viewModel.searchClick()
}
/** 手机版卡片内「提前运抵」(单票,由 ViewHolder 调用) */
fun preArriveClick(bean: GjcWeighingBean) {
viewModel.arrivedAheadSingle(bean)
}
companion object {
@JvmStatic
fun start(context: Context) {
val starter = Intent(context, GjcWeighingListActivity::class.java)
context.startActivity(starter)
}
}
}

View File

@@ -1,81 +1,104 @@
package com.lukouguoji.gjc.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityGjcWeighingRecordDetailsBinding
import com.lukouguoji.gjc.holder.GjcCheckInRecordViewHolder
import com.lukouguoji.gjc.viewModel.GjcWeighingRecordDetailsViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.base.CommonAdapter
import com.lukouguoji.module_base.bean.GjcWeighingRecordBean
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.router.ARouterConstants
/**
* 国际出港计重明细页
*/
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_RECORD_DETAILS)
class GjcWeighingRecordDetailsActivity :
BaseBindingActivity<ActivityGjcWeighingRecordDetailsBinding, GjcWeighingRecordDetailsViewModel>() {
private lateinit var adapter: CommonAdapter
// 当前编辑模式(供ViewHolder获取)
var currentEditMode = false
override fun layoutId() = R.layout.activity_gjc_weighing_record_details
override fun viewModelClass() = GjcWeighingRecordDetailsViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际出港计重明细")
binding.viewModel = viewModel
// 初始化RecyclerView
val layoutManager = LinearLayoutManager(this)
binding.recyclerView.layoutManager = layoutManager
// 添加分割线
val divider = DividerItemDecoration(this, DividerItemDecoration.VERTICAL)
binding.recyclerView.addItemDecoration(divider)
adapter = CommonAdapter(
this,
R.layout.item_gjc_check_in_record,
GjcCheckInRecordViewHolder::class.java
)
binding.recyclerView.adapter = adapter
// 监听数据变化更新RecyclerView
viewModel.recordList.observe(this) { records ->
adapter.refresh(records)
}
// 监听编辑模式变化,更新当前编辑模式并刷新列表
viewModel.isEditMode.observe(this) { isEditMode ->
// 更新当前编辑模式状态
currentEditMode = isEditMode
// 刷新所有可见的 ViewHolder
adapter.notifyDataSetChanged()
}
// 初始化数据
viewModel.initOnCreated(intent)
}
companion object {
@JvmStatic
fun start(context: Context, bean: GjcWeighingRecordBean) {
val starter = Intent(context, GjcWeighingRecordDetailsActivity::class.java)
.putExtra(Constant.Key.BEAN, bean)
context.startActivity(starter)
}
}
}
package com.lukouguoji.gjc.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.recyclerview.widget.DividerItemDecoration
import androidx.recyclerview.widget.LinearLayoutManager
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityGjcWeighingRecordDetailsBinding
import com.lukouguoji.gjc.holder.GjcCheckInRecordViewHolder
import com.lukouguoji.gjc.viewModel.GjcWeighingRecordDetailsViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.base.CommonAdapter
import com.lukouguoji.module_base.bean.GjcCheckInRecord
import com.lukouguoji.module_base.bean.GjcWeighingRecordBean
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.router.ARouterConstants
import com.lukouguoji.module_base.util.DeviceUtil
/**
* 国际出港计重明细页
*
* 布局 id 不区分设备,平板/手机由资源限定符自动选择:
* layout-sw600dp/activity_gjc_weighing_record_details.xml(平板,列表内联编辑)
* layout/activity_gjc_weighing_record_details.xml(手机,单条记录经全屏「修改记录」覆层编辑)
*/
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_RECORD_DETAILS)
class GjcWeighingRecordDetailsActivity :
BaseBindingActivity<ActivityGjcWeighingRecordDetailsBinding, GjcWeighingRecordDetailsViewModel>() {
private lateinit var adapter: CommonAdapter
// 当前编辑模式(供ViewHolder获取)
var currentEditMode = false
override fun layoutId() = R.layout.activity_gjc_weighing_record_details
override fun viewModelClass() = GjcWeighingRecordDetailsViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow(if (DeviceUtil.isPhone()) "计重明细" else "国际出港计重明细")
binding.viewModel = viewModel
// 初始化RecyclerView
val layoutManager = LinearLayoutManager(this)
binding.recyclerView.layoutManager = layoutManager
// 添加分割线
val divider = DividerItemDecoration(this, DividerItemDecoration.VERTICAL)
binding.recyclerView.addItemDecoration(divider)
adapter = CommonAdapter(
this,
R.layout.item_gjc_check_in_record,
GjcCheckInRecordViewHolder::class.java
)
binding.recyclerView.adapter = adapter
// 监听数据变化更新RecyclerView
viewModel.recordList.observe(this) { records ->
adapter.refresh(records)
}
// 监听编辑模式变化,更新当前编辑模式并刷新列表
viewModel.isEditMode.observe(this) { isEditMode ->
// 更新当前编辑模式状态
currentEditMode = isEditMode
// 刷新所有可见的 ViewHolder
adapter.notifyDataSetChanged()
}
// 初始化数据
viewModel.initOnCreated(intent)
}
// ==================== 手机版专用交互(纯 UI,复用既有 ViewModel 编辑链路) ====================
/**
* 手机版:打开「修改记录」覆层编辑指定记录。
* 复用 [GjcWeighingRecordDetailsViewModel.onModifyClick] 的备份/编辑态逻辑,
* 覆层显隐由 isEditMode 驱动(平板端该状态驱动列表内联编辑,互不影响)。
*/
fun openPhoneEdit(record: GjcCheckInRecord) {
viewModel.onModifyClick()
binding.editRecord = record
}
/** 手机版:取消编辑(恢复备份并收起覆层) */
fun closePhoneEdit() {
viewModel.onCancelClick()
}
companion object {
@JvmStatic
fun start(context: Context, bean: GjcWeighingRecordBean) {
val starter = Intent(context, GjcWeighingRecordDetailsActivity::class.java)
.putExtra(Constant.Key.BEAN, bean)
context.startActivity(starter)
}
}
}

View File

@@ -1,60 +1,91 @@
package com.lukouguoji.gjc.activity
import android.content.Context
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.ActivityGjcWeighingRecordListBinding
import com.lukouguoji.gjc.viewModel.GjcWeighingRecordViewModel
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.getLifecycleOwner
import com.lukouguoji.module_base.router.ARouterConstants
/**
* 国际出港计重记录列表页
*/
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_RECORD_LIST)
class GjcWeighingRecordListActivity :
BaseBindingActivity<ActivityGjcWeighingRecordListBinding, GjcWeighingRecordViewModel>() {
override fun layoutId() = R.layout.activity_gjc_weighing_record_list
override fun viewModelClass() = GjcWeighingRecordViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际出港计重记录")
binding.viewModel = viewModel
// 初始化代理人列表
viewModel.initAgentList()
// 初始化特码列表
viewModel.initSpecialCodeList()
// 绑定分页逻辑
viewModel.pageModel
.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, getLifecycleOwner())
// 监听刷新事件
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH)
.observe(this) {
viewModel.refresh()
}
// 初始加载
viewModel.refresh()
}
companion object {
@JvmStatic
fun start(context: Context) {
val starter = Intent(context, GjcWeighingRecordListActivity::class.java)
context.startActivity(starter)
}
}
}
package com.lukouguoji.gjc.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.databinding.ObservableBoolean
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityGjcWeighingRecordListBinding
import com.lukouguoji.gjc.viewModel.GjcWeighingRecordViewModel
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.getLifecycleOwner
import com.lukouguoji.module_base.router.ARouterConstants
import com.lukouguoji.module_base.util.DeviceUtil
/**
* 国际出港计重记录列表页
*
* 布局 id 不区分设备,平板/手机由资源限定符自动选择:
* layout-sw600dp/activity_gjc_weighing_record_list.xml(平板)
* layout/activity_gjc_weighing_record_list.xml(手机)
*/
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_RECORD_LIST)
class GjcWeighingRecordListActivity :
BaseBindingActivity<ActivityGjcWeighingRecordListBinding, GjcWeighingRecordViewModel>() {
override fun layoutId() = R.layout.activity_gjc_weighing_record_list
override fun viewModelClass() = GjcWeighingRecordViewModel::class.java
/** 手机版筛选弹层显隐(仅 UI 状态,不涉及业务逻辑) */
val filterPanelVisible = ObservableBoolean(false)
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow(if (DeviceUtil.isPhone()) "计重记录" else "国际出港计重记录")
binding.viewModel = viewModel
binding.activity = this
// 初始化代理人列表
viewModel.initAgentList()
// 初始化特码列表
viewModel.initSpecialCodeList()
// 绑定分页逻辑
viewModel.pageModel
.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, getLifecycleOwner())
// 监听刷新事件
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH)
.observe(this) {
viewModel.refresh()
}
// 初始加载
viewModel.refresh()
}
// ==================== 手机版专用交互(纯 UI,复用既有 ViewModel 字段) ====================
/** 手机版筛选弹层显隐切换 */
fun toggleFilterPanel() {
filterPanelVisible.set(!filterPanelVisible.get())
}
/** 手机版筛选:重置(只清弹层内条件,不影响顶部搜索框) */
fun resetFilter() {
viewModel.flightDate.value = ""
viewModel.flightNo.value = ""
viewModel.agentCode.value = ""
viewModel.spCode.value = ""
}
/** 手机版筛选:确认 */
fun confirmFilter() {
filterPanelVisible.set(false)
viewModel.searchClick()
}
companion object {
@JvmStatic
fun start(context: Context) {
val starter = Intent(context, GjcWeighingRecordListActivity::class.java)
context.startActivity(starter)
}
}
}

View File

@@ -1,198 +1,216 @@
package com.lukouguoji.gjc.activity
import android.animation.Animator
import android.animation.AnimatorListenerAdapter
import android.animation.AnimatorSet
import android.animation.ObjectAnimator
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.View
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityGjcWeighingStartBinding
import com.lukouguoji.gjc.viewModel.GjcWeighingStartViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.router.ARouterConstants
/**
* 国际出港计重-开始计重页面
*/
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_START)
class GjcWeighingStartActivity :
BaseBindingActivity<ActivityGjcWeighingStartBinding, GjcWeighingStartViewModel>() {
private var isExpanded = false
override fun layoutId() = R.layout.activity_gjc_weighing_start
override fun viewModelClass() = GjcWeighingStartViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际出港开始计重")
binding.viewModel = viewModel
viewModel.initOnCreated(this, intent)
setupFloatButtons()
}
private fun setupFloatButtons() {
// 主按钮点击事件
binding.mainFloatButton.setOnClickListener {
if (!isExpanded) {
expandButtons()
}
}
// 遮罩层点击事件
binding.maskView.setOnClickListener {
collapseButtons()
}
// 子按钮1点击事件 - 跳转到出港运抵页面
binding.subButton1.setOnClickListener {
com.alibaba.android.arouter.launcher.ARouter.getInstance()
.build(ARouterConstants.ACTIVITY_URL_INT_EXP_ARRIVE)
.navigation()
collapseButtons()
}
// 子按钮2点击事件 - 跳转到计重记录
binding.subButton2.setOnClickListener {
com.alibaba.android.arouter.launcher.ARouter.getInstance()
.build(ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_RECORD_LIST)
.navigation()
collapseButtons()
}
}
/**
* 展开子按钮
*/
private fun expandButtons() {
isExpanded = true
// 显示遮罩层
binding.maskView.visibility = View.VISIBLE
binding.maskView.alpha = 0f
binding.maskView.animate().alpha(0.3f).setDuration(200).start()
// 显示子按钮
binding.subButton1.visibility = View.VISIBLE
binding.subButton2.visibility = View.VISIBLE
// 子按钮1动画(向左上方移动: 左移15dp, 上移55dp)
val sub1TransX = ObjectAnimator.ofFloat(binding.subButton1, "translationX", 0f, -5f)
val sub1TransY = ObjectAnimator.ofFloat(binding.subButton1, "translationY", 0f, -25f)
val sub1Alpha = ObjectAnimator.ofFloat(binding.subButton1, "alpha", 0f, 1f)
val sub1Scale = ObjectAnimator.ofFloat(binding.subButton1, "scaleX", 0f, 1f)
val sub1ScaleY = ObjectAnimator.ofFloat(binding.subButton1, "scaleY", 0f, 1f)
val animSet1 = AnimatorSet()
animSet1.playTogether(sub1TransX, sub1TransY, sub1Alpha, sub1Scale, sub1ScaleY)
animSet1.duration = 200
// 子按钮2动画(向左下方移动: 左移55dp, 下移15dp)
val sub2TransX = ObjectAnimator.ofFloat(binding.subButton2, "translationX", 0f, -25f)
val sub2TransY = ObjectAnimator.ofFloat(binding.subButton2, "translationY", 0f, -5f)
val sub2Alpha = ObjectAnimator.ofFloat(binding.subButton2, "alpha", 0f, 1f)
val sub2Scale = ObjectAnimator.ofFloat(binding.subButton2, "scaleX", 0f, 1f)
val sub2ScaleY = ObjectAnimator.ofFloat(binding.subButton2, "scaleY", 0f, 1f)
val animSet2 = AnimatorSet()
animSet2.playTogether(sub2TransX, sub2TransY, sub2Alpha, sub2Scale, sub2ScaleY)
animSet2.duration = 200
animSet2.startDelay = 50
// 主按钮隐藏动画
binding.mainFloatButton.animate()
.scaleX(0f)
.scaleY(0f)
.alpha(0f)
.setDuration(150)
.setListener(object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator) {
binding.mainFloatButton.visibility = View.GONE
}
})
.start()
animSet1.start()
animSet2.start()
}
/**
* 收起子按钮
*/
private fun collapseButtons() {
isExpanded = false
// 隐藏遮罩层
binding.maskView.animate().alpha(0f).setDuration(200).withEndAction {
binding.maskView.visibility = View.GONE
}.start()
// 子按钮1动画(回到原位)
val sub1TransX = ObjectAnimator.ofFloat(binding.subButton1, "translationX", binding.subButton1.translationX, 0f)
val sub1TransY = ObjectAnimator.ofFloat(binding.subButton1, "translationY", binding.subButton1.translationY, 0f)
val sub1Alpha = ObjectAnimator.ofFloat(binding.subButton1, "alpha", 1f, 0f)
val sub1Scale = ObjectAnimator.ofFloat(binding.subButton1, "scaleX", 1f, 0f)
val sub1ScaleY = ObjectAnimator.ofFloat(binding.subButton1, "scaleY", 1f, 0f)
val animSet1 = AnimatorSet()
animSet1.playTogether(sub1TransX, sub1TransY, sub1Alpha, sub1Scale, sub1ScaleY)
animSet1.duration = 200
// 子按钮2动画(回到原位)
val sub2TransX = ObjectAnimator.ofFloat(binding.subButton2, "translationX", binding.subButton2.translationX, 0f)
val sub2TransY = ObjectAnimator.ofFloat(binding.subButton2, "translationY", binding.subButton2.translationY, 0f)
val sub2Alpha = ObjectAnimator.ofFloat(binding.subButton2, "alpha", 1f, 0f)
val sub2Scale = ObjectAnimator.ofFloat(binding.subButton2, "scaleX", 1f, 0f)
val sub2ScaleY = ObjectAnimator.ofFloat(binding.subButton2, "scaleY", 1f, 0f)
val animSet2 = AnimatorSet()
animSet2.playTogether(sub2TransX, sub2TransY, sub2Alpha, sub2Scale, sub2ScaleY)
animSet2.duration = 200
animSet1.addListener(object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator) {
binding.subButton1.visibility = View.GONE
}
})
animSet2.addListener(object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator) {
binding.subButton2.visibility = View.GONE
}
})
// 主按钮显示动画
binding.mainFloatButton.visibility = View.VISIBLE
binding.mainFloatButton.animate()
.scaleX(1f)
.scaleY(1f)
.alpha(1f)
.setDuration(200)
.setStartDelay(100)
.setListener(null)
.start()
animSet1.start()
animSet2.start()
}
companion object {
/**
* 启动开始计重页面
* @param context 上下文
* @param maWbId 运单ID,默认为0(新增模式)
*/
@JvmStatic
fun startForAdd(context: Context, maWbId: Long = 0) {
val starter = Intent(context, GjcWeighingStartActivity::class.java)
.putExtra(Constant.Key.MAWB_ID, maWbId)
context.startActivity(starter)
}
}
}
package com.lukouguoji.gjc.activity
import android.animation.Animator
import android.animation.AnimatorListenerAdapter
import android.animation.AnimatorSet
import android.animation.ObjectAnimator
import android.content.Context
import android.content.Intent
import android.os.Bundle
import android.view.View
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityGjcWeighingStartBinding
import com.lukouguoji.gjc.viewModel.GjcWeighingStartViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.router.ARouterConstants
import com.lukouguoji.module_base.util.DeviceUtil
/**
* 国际出港计重-开始计重页面
*/
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_START)
class GjcWeighingStartActivity :
BaseBindingActivity<ActivityGjcWeighingStartBinding, GjcWeighingStartViewModel>() {
private var isExpanded = false
override fun layoutId() = R.layout.activity_gjc_weighing_start
override fun viewModelClass() = GjcWeighingStartViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow(if (DeviceUtil.isPhone()) "开始计重" else "国际出港开始计重")
binding.viewModel = viewModel
viewModel.initOnCreated(this, intent)
setupFloatButtons()
}
private fun setupFloatButtons() {
// 浮动按钮组仅平板布局存在(layout-sw600dp),手机布局无这些 id,直接跳过
val mainFloatButton = binding.mainFloatButton ?: return
val maskView = binding.maskView ?: return
val subButton1 = binding.subButton1 ?: return
val subButton2 = binding.subButton2 ?: return
// 主按钮点击事件
mainFloatButton.setOnClickListener {
if (!isExpanded) {
expandButtons()
}
}
// 遮罩层点击事件
maskView.setOnClickListener {
collapseButtons()
}
// 子按钮1点击事件 - 跳转到出港运抵页面
subButton1.setOnClickListener {
com.alibaba.android.arouter.launcher.ARouter.getInstance()
.build(ARouterConstants.ACTIVITY_URL_INT_EXP_ARRIVE)
.navigation()
collapseButtons()
}
// 子按钮2点击事件 - 跳转到计重记录
subButton2.setOnClickListener {
com.alibaba.android.arouter.launcher.ARouter.getInstance()
.build(ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_RECORD_LIST)
.navigation()
collapseButtons()
}
}
/**
* 展开子按钮(仅平板,手机布局无浮动按钮组)
*/
private fun expandButtons() {
val mainFloatButton = binding.mainFloatButton ?: return
val maskView = binding.maskView ?: return
val subButton1 = binding.subButton1 ?: return
val subButton2 = binding.subButton2 ?: return
isExpanded = true
// 显示遮罩层
maskView.visibility = View.VISIBLE
maskView.alpha = 0f
maskView.animate().alpha(0.3f).setDuration(200).start()
// 显示子按钮
subButton1.visibility = View.VISIBLE
subButton2.visibility = View.VISIBLE
// 子按钮1动画(向左上方移动: 左移15dp, 上移55dp)
val sub1TransX = ObjectAnimator.ofFloat(subButton1, "translationX", 0f, -5f)
val sub1TransY = ObjectAnimator.ofFloat(subButton1, "translationY", 0f, -25f)
val sub1Alpha = ObjectAnimator.ofFloat(subButton1, "alpha", 0f, 1f)
val sub1Scale = ObjectAnimator.ofFloat(subButton1, "scaleX", 0f, 1f)
val sub1ScaleY = ObjectAnimator.ofFloat(subButton1, "scaleY", 0f, 1f)
val animSet1 = AnimatorSet()
animSet1.playTogether(sub1TransX, sub1TransY, sub1Alpha, sub1Scale, sub1ScaleY)
animSet1.duration = 200
// 子按钮2动画(向左下方移动: 左移55dp, 下移15dp)
val sub2TransX = ObjectAnimator.ofFloat(subButton2, "translationX", 0f, -25f)
val sub2TransY = ObjectAnimator.ofFloat(subButton2, "translationY", 0f, -5f)
val sub2Alpha = ObjectAnimator.ofFloat(subButton2, "alpha", 0f, 1f)
val sub2Scale = ObjectAnimator.ofFloat(subButton2, "scaleX", 0f, 1f)
val sub2ScaleY = ObjectAnimator.ofFloat(subButton2, "scaleY", 0f, 1f)
val animSet2 = AnimatorSet()
animSet2.playTogether(sub2TransX, sub2TransY, sub2Alpha, sub2Scale, sub2ScaleY)
animSet2.duration = 200
animSet2.startDelay = 50
// 主按钮隐藏动画
mainFloatButton.animate()
.scaleX(0f)
.scaleY(0f)
.alpha(0f)
.setDuration(150)
.setListener(object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator) {
mainFloatButton.visibility = View.GONE
}
})
.start()
animSet1.start()
animSet2.start()
}
/**
* 收起子按钮(仅平板,手机布局无浮动按钮组)
*/
private fun collapseButtons() {
val mainFloatButton = binding.mainFloatButton ?: return
val maskView = binding.maskView ?: return
val subButton1 = binding.subButton1 ?: return
val subButton2 = binding.subButton2 ?: return
isExpanded = false
// 隐藏遮罩层
maskView.animate().alpha(0f).setDuration(200).withEndAction {
maskView.visibility = View.GONE
}.start()
// 子按钮1动画(回到原位)
val sub1TransX = ObjectAnimator.ofFloat(subButton1, "translationX", subButton1.translationX, 0f)
val sub1TransY = ObjectAnimator.ofFloat(subButton1, "translationY", subButton1.translationY, 0f)
val sub1Alpha = ObjectAnimator.ofFloat(subButton1, "alpha", 1f, 0f)
val sub1Scale = ObjectAnimator.ofFloat(subButton1, "scaleX", 1f, 0f)
val sub1ScaleY = ObjectAnimator.ofFloat(subButton1, "scaleY", 1f, 0f)
val animSet1 = AnimatorSet()
animSet1.playTogether(sub1TransX, sub1TransY, sub1Alpha, sub1Scale, sub1ScaleY)
animSet1.duration = 200
// 子按钮2动画(回到原位)
val sub2TransX = ObjectAnimator.ofFloat(subButton2, "translationX", subButton2.translationX, 0f)
val sub2TransY = ObjectAnimator.ofFloat(subButton2, "translationY", subButton2.translationY, 0f)
val sub2Alpha = ObjectAnimator.ofFloat(subButton2, "alpha", 1f, 0f)
val sub2Scale = ObjectAnimator.ofFloat(subButton2, "scaleX", 1f, 0f)
val sub2ScaleY = ObjectAnimator.ofFloat(subButton2, "scaleY", 1f, 0f)
val animSet2 = AnimatorSet()
animSet2.playTogether(sub2TransX, sub2TransY, sub2Alpha, sub2Scale, sub2ScaleY)
animSet2.duration = 200
animSet1.addListener(object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator) {
subButton1.visibility = View.GONE
}
})
animSet2.addListener(object : AnimatorListenerAdapter() {
override fun onAnimationEnd(animation: Animator) {
subButton2.visibility = View.GONE
}
})
// 主按钮显示动画
mainFloatButton.visibility = View.VISIBLE
mainFloatButton.animate()
.scaleX(1f)
.scaleY(1f)
.alpha(1f)
.setDuration(200)
.setStartDelay(100)
.setListener(null)
.start()
animSet1.start()
animSet2.start()
}
companion object {
/**
* 启动开始计重页面
* @param context 上下文
* @param maWbId 运单ID,默认为0(新增模式)
*/
@JvmStatic
fun startForAdd(context: Context, maWbId: Long = 0) {
val starter = Intent(context, GjcWeighingStartActivity::class.java)
.putExtra(Constant.Key.MAWB_ID, maWbId)
context.startActivity(starter)
}
}
}

View File

@@ -0,0 +1,40 @@
package com.lukouguoji.gjc.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityGjcWeighingWbDetailBinding
import com.lukouguoji.gjc.viewModel.GjcWeighingWbDetailViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.GjcWeighingRecordBean
import com.lukouguoji.module_base.common.Constant
/**
* 国际出港计重-运单详情页(5.5寸手机版专属页面,平板端无对应页面)
*
* 由计重记录列表卡片的「查看详情」进入,只读展示运单基本信息,
* 对应设计稿 documents/5.5寸手持端设计文件/03_出港计重/detail.html。
*/
class GjcWeighingWbDetailActivity :
BaseBindingActivity<ActivityGjcWeighingWbDetailBinding, GjcWeighingWbDetailViewModel>() {
override fun layoutId() = R.layout.activity_gjc_weighing_wb_detail
override fun viewModelClass() = GjcWeighingWbDetailViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("运单详情")
binding.viewModel = viewModel
viewModel.initOnCreated(intent)
}
companion object {
@JvmStatic
fun start(context: Context, bean: GjcWeighingRecordBean) {
val starter = Intent(context, GjcWeighingWbDetailActivity::class.java)
.putExtra(Constant.Key.BEAN, bean)
context.startActivity(starter)
}
}
}

View File

@@ -1,83 +1,170 @@
package com.lukouguoji.gjc.activity
import android.app.Activity
import android.content.Intent
import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
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>() {
@JvmField
@Autowired
var wbNoParam: String? = null
override fun layoutId() = R.layout.activity_int_exp_arrive
override fun viewModelClass() = IntExpArriveViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
// 注入 ARouter 参数
ARouter.getInstance().inject(this)
setBackArrow("国际出港运抵")
binding.viewModel = viewModel
// 如果有传入运单号,自动填充并触发搜索
if (!wbNoParam.isNullOrEmpty()) {
viewModel.waybillNo.value = wbNoParam
viewModel.searchClick()
}
// 绑定分页
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
// 设置item点击监听
binding.rv.addOnItemClickListener(viewModel)
// 监听刷新事件
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).observe(this) { viewModel.onItemCheckChanged() }
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
viewModel.refresh()
}
// 初始加载数据(如果没有传入运单号,才执行初始加载)
if (wbNoParam.isNullOrEmpty()) {
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()
}
}
}
}
}
package com.lukouguoji.gjc.activity
import android.app.Activity
import android.content.Intent
import android.os.Bundle
import androidx.databinding.ObservableBoolean
import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
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.bean.GjcHaWb
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.impl.FlowBus
import com.lukouguoji.module_base.impl.observe
import com.lukouguoji.module_base.ktx.addOnItemClickListener
import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.router.ARouterConstants
import com.lukouguoji.module_base.util.DeviceUtil
import java.util.ArrayList
/**
* 国际出港-出港运抵页面
*
* 布局 id 不区分设备,平板/手机由资源限定符自动选择:
* layout-sw600dp/activity_int_exp_arrive.xml(平板)
* layout/activity_int_exp_arrive.xml(手机)
*/
@Route(path = ARouterConstants.ACTIVITY_URL_INT_EXP_ARRIVE)
class IntExpArriveActivity :
BaseBindingActivity<ActivityIntExpArriveBinding, IntExpArriveViewModel>() {
@JvmField
@Autowired
var wbNoParam: String? = null
override fun layoutId() = R.layout.activity_int_exp_arrive
override fun viewModelClass() = IntExpArriveViewModel::class.java
/** 手机版筛选弹层显隐(仅 UI 状态,不涉及业务逻辑) */
val filterPanelVisible = ObservableBoolean(false)
/** 供 [com.lukouguoji.gjc.holder.IntExpArriveViewHolder] 绑定 item 布局的 viewModel 变量(父类 viewModel 为 protected) */
val itemViewModel: IntExpArriveViewModel get() = viewModel
override fun initOnCreate(savedInstanceState: Bundle?) {
// 注入 ARouter 参数
ARouter.getInstance().inject(this)
setBackArrow(if (DeviceUtil.isPhone()) "出港运抵" else "国际出港运抵")
binding.viewModel = viewModel
binding.activity = this
// 手机版专属数据:加载「代理」筛选下拉
// 平板端不调用,查询链路与请求次数与改造前完全一致
if (DeviceUtil.isPhone()) {
viewModel.initPhoneExtras()
}
// 如果有传入运单号,自动填充并触发搜索
if (!wbNoParam.isNullOrEmpty()) {
viewModel.waybillNo.value = wbNoParam
viewModel.searchClick()
}
// 绑定分页
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
// 设置item点击监听
binding.rv.addOnItemClickListener(viewModel)
// 监听刷新事件
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).observe(this) { viewModel.onItemCheckChanged() }
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
viewModel.refresh()
}
// 初始加载数据(如果没有传入运单号,才执行初始加载)
if (wbNoParam.isNullOrEmpty()) {
viewModel.refresh()
}
}
// ==================== 手机版专用交互(纯 UI,复用既有 ViewModel 字段与数据) ====================
/**
* 手机版 Tab 切换回调:PhoneStatusTab 已通过双向绑定写入 viewModel.currentTab,
* 这里触发 ViewModel 把适配器数据集替换为过滤后的子集(不发起新请求)。
*/
fun onArriveTabChanged() {
viewModel.onTabChangedPhone()
}
/**
* 卡片长按:展开操作浮层(View.OnLongClickListener 要求返回 Boolean)。
* 仅已运抵 Tab 有操作(重置 / 回执);待运抵 Tab 的「补充信息」页后端确认暂不需要,已移除。
*/
fun showCardActionPhone(bean: GjcMaWb): Boolean {
if (viewModel.currentTab.value != "shipped") return false
bean.actionMenuVisible.set(true)
return true
}
/** 点击浮层遮罩/空白处:收起操作浮层 */
fun hideCardActionPhone(bean: GjcMaWb) {
bean.actionMenuVisible.set(false)
}
/** 选择圈勾选状态变化后回调(由 ViewHolder 调用) */
fun onItemCheckChanged() {
viewModel.onItemCheckChanged()
}
/** 手机版筛选弹层显隐切换 */
fun toggleFilterPanel() {
filterPanelVisible.set(!filterPanelVisible.get())
}
/** 手机版筛选:重置 */
fun resetFilter() {
viewModel.flightDate.value = ""
viewModel.flightNo.value = ""
viewModel.hno.value = ""
}
/** 手机版筛选:确认 */
fun confirmFilter() {
filterPanelVisible.set(false)
viewModel.searchClick()
}
/**
* 进入「分单明细」页:直接传递该运单已加载的 haWbList,零新增请求。
*/
fun openSubOrder(bean: GjcMaWb) {
val list = ArrayList<GjcHaWb>(bean.haWbList.orEmpty())
IntExpArriveSubOrderActivity.start(this, bean.wbNo.orEmpty(), list)
}
/**
* 浮层「回执」:与平板侧滑「回执」同链路(getResponse 查询海关回执 → 共用只读回执页)。
*/
fun openReceipt(bean: GjcMaWb) {
bean.actionMenuVisible.set(false)
viewModel.queryCustomsResponse(bean)
}
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()
}
}
}
}
}

View File

@@ -0,0 +1,43 @@
package com.lukouguoji.gjc.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityIntExpArriveReceiptBinding
import com.lukouguoji.gjc.viewModel.IntExpArriveReceiptViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.GjcHaWb
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.ktx.refresh
/**
* 国际出港运抵-回执内容页(5.5寸手机版专属只读新页,平板端无对应页面)
*
* 数据来自主列表页已加载的 haWbList,零新增请求。
* 对应设计稿 documents/5.5寸手持端设计文件/04_出港运抵/receipt.html。
*/
class IntExpArriveReceiptActivity :
BaseBindingActivity<ActivityIntExpArriveReceiptBinding, IntExpArriveReceiptViewModel>() {
override fun layoutId() = R.layout.activity_int_exp_arrive_receipt
override fun viewModelClass() = IntExpArriveReceiptViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("回执内容")
binding.viewModel = viewModel
viewModel.initOnCreated(intent)
viewModel.receiptList.observe(this) { binding.rv.refresh(it) }
}
companion object {
@JvmStatic
fun start(context: Context, wbNo: String, haWbList: ArrayList<GjcHaWb>) {
val starter = Intent(context, IntExpArriveReceiptActivity::class.java)
.putExtra(Constant.Key.CODE, wbNo)
.putExtra(Constant.Key.DATA, haWbList)
context.startActivity(starter)
}
}
}

View File

@@ -0,0 +1,98 @@
package com.lukouguoji.gjc.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.databinding.ObservableBoolean
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityIntExpArriveSubOrderBinding
import com.lukouguoji.gjc.viewModel.IntExpArriveSubOrderViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.GjcHaWb
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.ktx.refresh
/**
* 国际出港运抵-分单明细页(5.5寸手机版专属新页,平板端无对应页面)
*
* 数据来自主列表页已加载的 haWbList(Intent 传入),零新增请求。
* 对应设计稿 documents/5.5寸手持端设计文件/04_出港运抵/suborder.html。
*/
class IntExpArriveSubOrderActivity :
BaseBindingActivity<ActivityIntExpArriveSubOrderBinding, IntExpArriveSubOrderViewModel>() {
override fun layoutId() = R.layout.activity_int_exp_arrive_sub_order
override fun viewModelClass() = IntExpArriveSubOrderViewModel::class.java
/** 筛选弹层显隐(仅 UI 状态) */
val filterPanelVisible = ObservableBoolean(false)
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("分单明细")
binding.viewModel = viewModel
binding.activity = this
viewModel.initOnCreated(intent)
// 监听数据变化刷新列表
viewModel.displayList.observe(this) { binding.rv.refresh(it) }
}
/** 子项选中状态变化后回调(由 ViewHolder 调用) */
fun onItemCheckChanged() {
viewModel.onItemCheckChanged()
}
/** 全选按钮点击:切换全部选中状态后强制刷新列表(checked 为原地修改,不触发 LiveData) */
fun checkAllClick() {
viewModel.checkAllClick()
binding.rv.commonAdapter()?.notifyDataSetChanged()
}
/** 卡片长按:展开操作浮层(View.OnLongClickListener 要求返回 Boolean) */
fun showActionMenu(bean: GjcHaWb): Boolean {
bean.actionMenuVisible.set(true)
return true
}
/** 点击浮层遮罩:收起操作浮层 */
fun hideActionMenu(bean: GjcHaWb) {
bean.actionMenuVisible.set(false)
}
/** 长按菜单「重置」(单条) */
fun resetSingleClick(bean: GjcHaWb) {
bean.actionMenuVisible.set(false)
viewModel.resetSingleClick(bean)
}
/** 长按菜单「回执」(单条):复用回执只读页,仅传当前分单 */
fun openReceipt(bean: GjcHaWb) {
bean.actionMenuVisible.set(false)
IntExpArriveReceiptActivity.start(this, viewModel.wbNo, arrayListOf(bean))
}
fun toggleFilterPanel() {
filterPanelVisible.set(!filterPanelVisible.get())
}
fun resetFilter() {
viewModel.hnoFilter.value = ""
}
fun confirmFilter() {
filterPanelVisible.set(false)
viewModel.searchClick()
}
companion object {
@JvmStatic
fun start(context: Context, wbNo: String, haWbList: ArrayList<GjcHaWb>) {
val starter = Intent(context, IntExpArriveSubOrderActivity::class.java)
.putExtra(IntExpArriveSubOrderViewModel.KEY_WB_NO, wbNo)
.putExtra(Constant.Key.DATA, haWbList)
context.startActivity(starter)
}
}
}

View File

@@ -1,56 +1,96 @@
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.ActivityIntExpOutHandoverBinding
import com.lukouguoji.gjc.viewModel.IntExpOutHandoverViewModel
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_OUT_HANDOVER)
class IntExpOutHandoverActivity :
BaseBindingActivity<ActivityIntExpOutHandoverBinding, IntExpOutHandoverViewModel>() {
override fun layoutId() = R.layout.activity_int_exp_out_handover
override fun viewModelClass() = IntExpOutHandoverViewModel::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_CHECK_CHANGED).observe(this) { viewModel.onItemCheckChanged() }
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)
if (requestCode == Constant.RequestCode.ULD && resultCode == Activity.RESULT_OK) {
viewModel.uldNo.value = data?.getStringExtra(Constant.Result.CODED_CONTENT)
viewModel.searchClick()
}
}
}
package com.lukouguoji.gjc.activity
import android.app.Activity
import android.content.Intent
import android.os.Bundle
import androidx.databinding.ObservableBoolean
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityIntExpOutHandoverBinding
import com.lukouguoji.gjc.viewModel.IntExpOutHandoverViewModel
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
import com.lukouguoji.module_base.util.DeviceUtil
/**
* 国际出港-出库交接页面
*
* 布局 id 不区分设备,平板/手机由资源限定符自动选择:
* layout-sw600dp/activity_int_exp_out_handover.xml(平板)
* layout/activity_int_exp_out_handover.xml(手机)
*/
@Route(path = ARouterConstants.ACTIVITY_URL_INT_EXP_OUT_HANDOVER)
class IntExpOutHandoverActivity :
BaseBindingActivity<ActivityIntExpOutHandoverBinding, IntExpOutHandoverViewModel>() {
override fun layoutId() = R.layout.activity_int_exp_out_handover
override fun viewModelClass() = IntExpOutHandoverViewModel::class.java
/** 手机版筛选弹层显隐(仅 UI 状态,不涉及业务逻辑) */
val filterPanelVisible = ObservableBoolean(false)
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow(if (DeviceUtil.isPhone()) "出库交接" else "国际出港出库交接")
binding.viewModel = viewModel
binding.activity = this
// 手机版专属数据:默认「待交接」Tab、Tab 角标计数、交接人下拉
// 平板端不调用,查询链路与请求次数与改造前完全一致
if (DeviceUtil.isPhone()) {
viewModel.initPhoneExtras()
}
// 绑定分页
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
// 设置item点击监听
binding.rv.addOnItemClickListener(viewModel)
// 监听刷新事件
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).observe(this) { viewModel.onItemCheckChanged() }
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
viewModel.refresh()
}
// 初始加载数据
viewModel.refresh()
}
// ==================== 手机版专用交互(纯 UI,复用既有 ViewModel 字段) ====================
/** 手机版筛选弹层显隐切换 */
fun toggleFilterPanel() {
filterPanelVisible.set(!filterPanelVisible.get())
}
/**
* 手机版筛选:重置
*
* 只清空弹层内的三个条件(航班日期 / 航班号 / 目的站),不影响 Tab 与顶部搜索框。
*/
fun resetFilter() {
viewModel.flightDate.value = ""
viewModel.flightNo.value = ""
viewModel.fdest.value = ""
}
/** 手机版筛选:确认 */
fun confirmFilter() {
filterPanelVisible.set(false)
viewModel.searchClick()
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == Constant.RequestCode.ULD && resultCode == Activity.RESULT_OK) {
viewModel.uldNo.value = data?.getStringExtra(Constant.Result.CODED_CONTENT)
viewModel.searchClick()
}
}
}

View File

@@ -0,0 +1,40 @@
package com.lukouguoji.gjc.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.google.gson.Gson
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityIntExpOutHandoverDetailBinding
import com.lukouguoji.gjc.viewModel.IntExpOutHandoverDetailViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.GjcUldUseBean
import com.lukouguoji.module_base.common.Constant
/**
* 国际出港-出库交接「板箱详情」(手机版专属页面)
*
* 由手机版列表卡片的「查看详情」进入;平板端列表布局不含该入口,故不会走到本页。
*/
class IntExpOutHandoverDetailActivity :
BaseBindingActivity<ActivityIntExpOutHandoverDetailBinding, IntExpOutHandoverDetailViewModel>() {
override fun layoutId() = R.layout.activity_int_exp_out_handover_detail
override fun viewModelClass() = IntExpOutHandoverDetailViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("板箱详情")
binding.viewModel = viewModel
viewModel.initOnCreated(intent)
}
companion object {
@JvmStatic
fun start(context: Context, bean: GjcUldUseBean) {
context.startActivity(
Intent(context, IntExpOutHandoverDetailActivity::class.java)
.putExtra(Constant.Key.DATA, Gson().toJson(bean))
)
}
}
}

View File

@@ -19,6 +19,7 @@ import com.lukouguoji.module_base.impl.observe
import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.router.ARouterConstants
import com.lukouguoji.module_base.util.DeviceUtil
/**
* 国际出港-仓库
@@ -31,10 +32,13 @@ class IntExpStorageUseActivity :
override fun viewModelClass() = IntExpStorageUseViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际出港仓库")
setBackArrow(if (DeviceUtil.isPhone()) "出港仓库" else "国际出港仓库")
binding.viewModel = viewModel
binding.activity = this
// 手机形态专属:筛选字典 + 未清仓/已清仓分项统计(平板不调用,行为零变化)
if (DeviceUtil.isPhone()) viewModel.initPhoneExtras()
// 绑定分页
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
@@ -154,6 +158,71 @@ class IntExpStorageUseActivity :
}.show(this)
}
// ==================== 5.5寸手机版:卡片级操作 ====================
// 语义等价于「勾选该主单 + 其全部库位」再执行平板的批量操作,弹框与请求链路完全复用平板。
/** 卡片「清仓」(已清仓的卡片按钮置灰,ViewHolder 已拦截) */
fun cardClear(bean: com.lukouguoji.module_base.bean.GjcMaWb) {
val maWbListForClear = listOf(bean.copy(storageUseList = bean.storageUseList ?: emptyList()))
IntExpMoveClearDialogModel { dialog ->
viewModel.performClear(
dialog.clearNormal.value ?: "",
dialog.clearRemark.value ?: "",
maWbListForClear
)
}.show(this)
}
/** 卡片「修改库位」:弹层内先单选原库位(单库位时默认选中)再选新库位 */
fun cardModifyStorage(bean: com.lukouguoji.module_base.bean.GjcMaWb) {
val storageList = bean.storageUseList ?: emptyList()
if (storageList.isEmpty()) {
showToast("该运单暂无库位")
return
}
IntExpModifyStorageDialogModel(sourceStorageList = storageList) { dialog ->
val sourceStorage = dialog.selectedSourceStorage ?: return@IntExpModifyStorageDialogModel
viewModel.performModifyStorage(dialog.locationName, dialog.locationId, sourceStorage)
}.show(this)
}
/** 卡片「出库」:该运单全部库位出库(与平板勾选主单后出库同语义,件数/重量默认取库位入库件数/重量) */
fun cardOutStorage(bean: com.lukouguoji.module_base.bean.GjcMaWb) {
val storageList = bean.storageUseList ?: emptyList()
if (storageList.isEmpty()) {
showToast("该运单暂无库位")
return
}
IntExpOutStorageDialogModel(
storageCount = storageList.size,
defaultPc = storageList.mapNotNull { it.inPc }.takeIf { it.isNotEmpty() }?.sum(),
defaultWeight = storageList.mapNotNull { it.inWeight }.takeIf { it.isNotEmpty() }?.sum()
) { dialog ->
viewModel.performOutStorage(
dialog.pc.value?.toLongOrNull(),
dialog.weight.value?.toDoubleOrNull(),
storageList
)
}.show(this)
}
/** 卡片「入库」:弹层选库位、填件数重量后整票入库 */
fun cardInStorage(bean: com.lukouguoji.module_base.bean.GjcMaWb) {
val maWbListForInStorage = listOf(bean.copy(storageUseList = bean.storageUseList ?: emptyList()))
IntExpInStorageDialogModel(
defaultPc = bean.pc,
defaultWeight = bean.weight
) { dialog ->
viewModel.performInStorage(
dialog.locationName,
dialog.locationId,
dialog.pc.value?.toLongOrNull(),
dialog.weight.value?.toDoubleOrNull(),
maWbListForInStorage
)
}.show(this)
}
/**
* 显示入库操作对话框
*/

View File

@@ -6,15 +6,19 @@ import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.DialogIntExpArriveDeleteBinding
import com.lukouguoji.module_base.base.BaseDialogModel
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
import com.lukouguoji.module_base.util.DeviceUtil
import dev.utils.app.info.KeyValue
/**
* 国际出港运抵 - 删除申报对话框
* 手机为底部弹层(layout/ 变体),平板为居中弹框(layout-sw600dp/ 变体)
*/
class IntExpArriveDeleteDialogModel(
val changeReasonList: List<KeyValue>, // 变更原因列表
private val callback: (IntExpArriveDeleteDialogModel) -> Unit
) : BaseDialogModel<DialogIntExpArriveDeleteBinding>(DIALOG_TYPE_CENTER) {
) : BaseDialogModel<DialogIntExpArriveDeleteBinding>(
if (DeviceUtil.isPhone()) DIALOG_TYPE_BOTTOM else DIALOG_TYPE_CENTER
) {
// 变更原因代码(存储的是 code)
val changeReason = MutableLiveData("")

View File

@@ -6,14 +6,20 @@ import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.DialogIntExpArriveResetBinding
import com.lukouguoji.module_base.base.BaseDialogModel
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
import com.lukouguoji.module_base.util.DeviceUtil
import dev.utils.app.info.KeyValue
/**
* 国际出港运抵 - 状态重置对话框
*
* 布局按资源限定符自动切换:手机 layout/(底部弹层)、平板 layout-sw600dp/(居中弹框),
* 弹出位置随形态选择 BOTTOM/CENTER。
*/
class IntExpArriveResetDialogModel(
private val callback: (IntExpArriveResetDialogModel) -> Unit
) : BaseDialogModel<DialogIntExpArriveResetBinding>(DIALOG_TYPE_CENTER) {
) : BaseDialogModel<DialogIntExpArriveResetBinding>(
if (DeviceUtil.isPhone()) DIALOG_TYPE_BOTTOM else DIALOG_TYPE_CENTER
) {
// 重置状态列表
val resetStatusList = MutableLiveData<List<KeyValue>>()

View File

@@ -11,18 +11,22 @@ import com.lukouguoji.module_base.ktx.launchCollect
import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.ktx.toPlainText
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
import com.lukouguoji.module_base.util.DeviceUtil
import dev.utils.app.info.KeyValue
/**
* 国际出港仓库 - 入库操作对话框
* @param defaultPc 默认件数(选中运单的件数)
* @param defaultWeight 默认重量(选中运单的重量)
* 手机为底部弹层(layout/ 变体),平板为居中弹框(layout-sw600dp/ 变体)
*/
class IntExpInStorageDialogModel(
defaultPc: Long?,
defaultWeight: Double?,
private val callback: (IntExpInStorageDialogModel) -> Unit
) : BaseDialogModel<DialogIntExpInStorageBinding>(DIALOG_TYPE_CENTER) {
) : BaseDialogModel<DialogIntExpInStorageBinding>(
if (DeviceUtil.isPhone()) DIALOG_TYPE_BOTTOM else DIALOG_TYPE_CENTER
) {
// 库位列表
val locationList = MutableLiveData<List<KeyValue>>()
@@ -48,8 +52,13 @@ class IntExpInStorageDialogModel(
override fun onDialogCreated(context: Context) {
binding.model = this
binding.pcInput.et.inputType = InputType.TYPE_CLASS_NUMBER
binding.weightInput.et.inputType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL
// 平板变体 pc_input/weight_input,手机变体 pc_input_phone/weight_input_phone,单侧 id 在 Binding 中可空
val pcType = InputType.TYPE_CLASS_NUMBER
val weightType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL
binding.pcInput?.et?.inputType = pcType
binding.weightInput?.et?.inputType = weightType
binding.pcInputPhone?.et?.inputType = pcType
binding.weightInputPhone?.et?.inputType = weightType
loadLocationList()
// 监听选择变化,更新locationId和locationName

View File

@@ -8,15 +8,24 @@ import com.lukouguoji.module_base.base.BaseDialogModel
import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.ktx.launchCollect
import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.bean.GjcStorageUse
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
import com.lukouguoji.module_base.util.DeviceUtil
import dev.utils.app.info.KeyValue
/**
* 国际出港 - 修改库位对话框
* 手机为底部弹层(layout/ 变体),平板为居中弹框(layout-sw600dp/ 变体)。
*
* 平板:列表勾选唯一库位后打开,弹框内只选新库位(sourceStorageList 传 null,原库位项不存在于平板布局)。
* 手机:卡片级操作,运单可能有多个库位——传入该运单库位列表,弹层内先单选「原库位」再选新库位。
*/
class IntExpModifyStorageDialogModel(
private val sourceStorageList: List<GjcStorageUse>? = null,
private val callback: (IntExpModifyStorageDialogModel) -> Unit
) : BaseDialogModel<DialogIntExpModifyStorageBinding>(DIALOG_TYPE_CENTER) {
) : BaseDialogModel<DialogIntExpModifyStorageBinding>(
if (DeviceUtil.isPhone()) DIALOG_TYPE_BOTTOM else DIALOG_TYPE_CENTER
) {
// 库位列表
val locationList = MutableLiveData<List<KeyValue>>()
@@ -30,6 +39,13 @@ class IntExpModifyStorageDialogModel(
// 库位名称 (后端需要的name)
var locationName: String = ""
// ========== 手机卡片级操作专属:原库位单选 ==========
val sourceList = MutableLiveData<List<KeyValue>>(emptyList())
val selectedSourceId = MutableLiveData("")
// 选中的原库位对象(保存后由调用方取用)
var selectedSourceStorage: GjcStorageUse? = null
override fun layoutId(): Int {
return R.layout.dialog_int_exp_modify_storage
}
@@ -44,6 +60,19 @@ class IntExpModifyStorageDialogModel(
locationId = selectedItem?.value ?: ""
locationName = selectedItem?.key ?: ""
}
// 手机版:初始化原库位列表,单库位时默认选中
if (sourceStorageList != null) {
sourceList.value = sourceStorageList.map {
KeyValue(it.location ?: "", it.id?.toString() ?: "")
}
selectedSourceId.observeForever { id ->
selectedSourceStorage = sourceStorageList.find { it.id?.toString() == id }
}
if (sourceStorageList.size == 1) {
selectedSourceId.value = sourceStorageList[0].id?.toString() ?: ""
}
}
}
/**
@@ -65,6 +94,10 @@ class IntExpModifyStorageDialogModel(
* 保存按钮点击
*/
fun onSaveClick() {
if (sourceStorageList != null && selectedSourceStorage == null) {
showToast("请选择原库位")
return
}
if (selectedLocationCode.value.verifyNullOrEmpty("请选择库位")) {
return
}

View File

@@ -6,14 +6,18 @@ import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.DialogIntExpMoveClearBinding
import com.lukouguoji.module_base.base.BaseDialogModel
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
import com.lukouguoji.module_base.util.DeviceUtil
import dev.utils.app.info.KeyValue
/**
* 国际出港移库 - 清仓操作对话框
* 手机为底部弹层(layout/ 变体),平板为居中弹框(layout-sw600dp/ 变体)
*/
class IntExpMoveClearDialogModel(
private val callback: (IntExpMoveClearDialogModel) -> Unit
) : BaseDialogModel<DialogIntExpMoveClearBinding>(DIALOG_TYPE_CENTER) {
) : BaseDialogModel<DialogIntExpMoveClearBinding>(
if (DeviceUtil.isPhone()) DIALOG_TYPE_BOTTOM else DIALOG_TYPE_CENTER
) {
// 清仓正常(存储的是 code:"0" 或 "1")
val clearNormal = MutableLiveData("")

View File

@@ -8,9 +8,11 @@ import com.lukouguoji.gjc.databinding.DialogIntExpOutStorageBinding
import com.lukouguoji.module_base.base.BaseDialogModel
import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.ktx.toPlainText
import com.lukouguoji.module_base.util.DeviceUtil
/**
* 国际出港仓库 - 出库操作对话框
* 手机为底部弹层(layout/ 变体),平板为居中弹框(layout-sw600dp/ 变体)
* @param storageCount 选中的库位数
* @param defaultPc 默认件数(选中库位的入库件数)
* @param defaultWeight 默认重量(选中库位的入库重量)
@@ -20,7 +22,9 @@ class IntExpOutStorageDialogModel(
defaultPc: Long?,
defaultWeight: Double?,
private val callback: (IntExpOutStorageDialogModel) -> Unit
) : BaseDialogModel<DialogIntExpOutStorageBinding>(DIALOG_TYPE_CENTER) {
) : BaseDialogModel<DialogIntExpOutStorageBinding>(
if (DeviceUtil.isPhone()) DIALOG_TYPE_BOTTOM else DIALOG_TYPE_CENTER
) {
val tip = "已选择 $storageCount 个库位执行出库操作"
@@ -36,8 +40,13 @@ class IntExpOutStorageDialogModel(
override fun onDialogCreated(context: Context) {
binding.model = this
binding.pcInput.et.inputType = InputType.TYPE_CLASS_NUMBER
binding.weightInput.et.inputType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL
// 平板变体 pc_input/weight_input,手机变体 pc_input_phone/weight_input_phone,单侧 id 在 Binding 中可空
val pcType = InputType.TYPE_CLASS_NUMBER
val weightType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL
binding.pcInput?.et?.inputType = pcType
binding.weightInput?.et?.inputType = weightType
binding.pcInputPhone?.et?.inputType = pcType
binding.weightInputPhone?.et?.inputType = weightType
}
/**

View File

@@ -9,14 +9,18 @@ import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.ktx.launchCollect
import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
import com.lukouguoji.module_base.util.DeviceUtil
import dev.utils.app.info.KeyValue
/**
* 国际出港出库交接 - 待配运操作对话框
* 手机为底部弹层(layout/ 变体),平板为居中弹框(layout-sw600dp/ 变体)
*/
class IntExpOutWaitingTransDialogModel(
private val callback: (IntExpOutWaitingTransDialogModel) -> Unit
) : BaseDialogModel<DialogIntExpOutWaitingTransBinding>(DIALOG_TYPE_CENTER) {
) : BaseDialogModel<DialogIntExpOutWaitingTransBinding>(
if (DeviceUtil.isPhone()) DIALOG_TYPE_BOTTOM else DIALOG_TYPE_CENTER
) {
// 库位列表
val locationList = MutableLiveData<List<KeyValue>>()

View File

@@ -23,5 +23,10 @@ class GjcCheckInRecordViewHolder(view: View) :
binding.isEditMode = isEditMode
binding.position = position // 传入位置用于显示序号
binding.executePendingBindings()
// 「修改」按钮(手机独有):打开全屏修改覆层编辑本条记录
binding.btnEdit?.setOnClickListener {
activity?.openPhoneEdit(record)
}
}
}

View File

@@ -2,12 +2,18 @@ package com.lukouguoji.gjc.holder
import android.view.View
import com.lukouguoji.gjc.activity.GjcWeighingRecordDetailsActivity
import com.lukouguoji.gjc.activity.GjcWeighingWbDetailActivity
import com.lukouguoji.gjc.databinding.ItemGjcWeighingRecordBinding
import com.lukouguoji.gjc.viewModel.GjcWeighingRecordViewModel
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.GjcWeighingRecordBean
/**
* 国际出港计重记录列表 ViewHolder
*
* item 布局分平板(layout-sw600dp/item_gjc_weighing_record.xml,含选择图标 iv_icon)
* 与手机(layout/item_gjc_weighing_record.xml,卡片式,地磅图标 iv_scale 进计重明细、
* 「查看详情」tv_detail 进运单详情)两个变体,单侧独有的 id 需判空调用。
*/
class GjcWeighingRecordViewHolder(view: View) :
BaseViewHolder<GjcWeighingRecordBean, ItemGjcWeighingRecordBinding>(view) {
@@ -17,8 +23,8 @@ class GjcWeighingRecordViewHolder(view: View) :
binding.bean = bean
binding.executePendingBindings()
// 图标点击 - 切换选择状态
binding.ivIcon.setOnClickListener {
// 图标点击 - 切换选择状态(平板独有)
binding.ivIcon?.setOnClickListener {
// 反转checked状态
bean.checked.set(!bean.checked.get())
@@ -26,6 +32,21 @@ class GjcWeighingRecordViewHolder(view: View) :
binding.executePendingBindings()
}
// 地磅图标点击进计重明细(手机独有)
binding.ivScale?.setOnClickListener {
GjcWeighingRecordDetailsActivity.start(it.context, bean)
}
// 「运抵申报」携带运单号进入出港运抵(手机独有入口,对应平板勾选单条后的「运抵申报」)
binding.tvDeclare?.setOnClickListener {
GjcWeighingRecordViewModel.openArriveDeclare(bean.wbNo)
}
// 「查看详情」进运单详情(手机独有页面)
binding.tvDetail?.setOnClickListener {
GjcWeighingWbDetailActivity.start(it.context, bean)
}
// 整行点击跳转到计重明细页
binding.ll.setOnClickListener {
GjcWeighingRecordDetailsActivity.start(it.context, bean)

View File

@@ -1,15 +1,20 @@
package com.lukouguoji.gjc.holder
import android.view.View
import com.lukouguoji.gjc.activity.GjcWeighingListActivity
import com.lukouguoji.gjc.activity.GjcWeighingStartActivity
import com.lukouguoji.gjc.databinding.ItemGjcWeighingBinding
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.bean.GjcWeighingBean
/**
* 国际出港计重列表 ViewHolder
*
* item 布局分平板(layout-sw600dp/item_gjc_weighing.xml,含选择图标 iv_icon)
* 与手机(layout/item_gjc_weighing.xml,卡片式,含单票提前运抵按钮 btn_pre_arrive)两个变体,
* 单侧独有的 id 在 Binding 基类中为可空字段,需判空调用。
*/
class GjcWeighingViewHolder(view: View) :
BaseViewHolder<GjcWeighingBean, ItemGjcWeighingBinding>(view) {
@@ -20,8 +25,8 @@ class GjcWeighingViewHolder(view: View) :
binding.position = position
binding.executePendingBindings()
// 选择图标点击事件 - 切换选择状态
binding.ivIcon.setOnClickListener {
// 选择图标点击事件 - 切换选择状态(平板独有)
binding.ivIcon?.setOnClickListener {
// 反转checked状态
bean.checked.set(!bean.checked.get())
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).tryEmit("check_changed")
@@ -30,6 +35,11 @@ class GjcWeighingViewHolder(view: View) :
binding.executePendingBindings()
}
// 卡片内「提前运抵」按钮(手机独有,单票操作)
binding.btnPreArrive?.setOnClickListener {
(it.context as? GjcWeighingListActivity)?.preArriveClick(bean)
}
// 整行点击跳转到开始计重页面
binding.ll.setOnClickListener {
GjcWeighingStartActivity.startForAdd(it.context, bean.maWbId)

View File

@@ -0,0 +1,19 @@
package com.lukouguoji.gjc.holder
import android.view.View
import com.lukouguoji.gjc.databinding.ItemIntExpArriveReceiptBinding
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.GjcHaWb
/**
* 国际出港运抵-回执内容列表 ViewHolder(5.5寸手机版专属只读页)
*/
class IntExpArriveReceiptViewHolder(view: View) :
BaseViewHolder<GjcHaWb, ItemIntExpArriveReceiptBinding>(view) {
override fun onBind(item: Any?, position: Int) {
val bean = getItemBean(item) ?: return
binding.bean = bean
binding.executePendingBindings()
}
}

View File

@@ -0,0 +1,32 @@
package com.lukouguoji.gjc.holder
import android.view.View
import com.lukouguoji.gjc.activity.IntExpArriveSubOrderActivity
import com.lukouguoji.gjc.databinding.ItemIntExpArriveSubOrderBinding
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.GjcHaWb
/**
* 国际出港运抵-分单明细列表 ViewHolder(5.5寸手机版专属页面)
*
* 选中状态变化只影响本页自身的 ViewModel(不复用全局 FlowBus.EVENT_CHECK_CHANGED,
* 避免与主列表页共享同一事件、产生跨页面的无意义联动)。
*/
class IntExpArriveSubOrderViewHolder(view: View) :
BaseViewHolder<GjcHaWb, ItemIntExpArriveSubOrderBinding>(view) {
override fun onBind(item: Any?, position: Int) {
val bean = getItemBean(item) ?: return
val activity = itemView.context as? IntExpArriveSubOrderActivity
binding.bean = bean
binding.activity = activity
binding.executePendingBindings()
// 整卡点击切换选择状态
binding.ll.setOnClickListener {
bean.checked.set(!bean.checked.get())
activity?.onItemCheckChanged()
binding.executePendingBindings()
}
}
}

View File

@@ -2,6 +2,7 @@ package com.lukouguoji.gjc.holder
import android.view.View
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.activity.IntExpArriveActivity
import com.lukouguoji.gjc.databinding.ItemIntExpArriveBinding
import com.lukouguoji.module_base.adapter.setCommonAdapter
import com.lukouguoji.module_base.base.BaseViewHolder
@@ -13,58 +14,79 @@ import com.lukouguoji.module_base.ktx.ITEM_CLICK_TYPE_CUSTOMS_RESPONSE
/**
* 国际出港-出港运抵 列表项ViewHolder
*
* item 布局分平板(layout-sw600dp/item_int_exp_arrive.xml,内嵌分单子列表 rv_sub 展开/收起)
* 与手机(layout/item_int_exp_arrive.xml,分单改为独立「分单明细」页,无 rv_sub/iv_show 等 id)
* 两个变体,单侧独有的 id 在 Binding 基类中为 `@Nullable`,需判空调用。
*/
class IntExpArriveViewHolder(view: View) :
BaseViewHolder<GjcMaWb, ItemIntExpArriveBinding>(view) {
override fun onBind(item: Any?, position: Int) {
val bean = getItemBean(item) ?: return
val activity = itemView.context as? IntExpArriveActivity
binding.bean = bean
binding.position = position
binding.activity = activity
binding.viewModel = activity?.itemViewModel
binding.executePendingBindings()
// 侧滑菜单 - 回执按钮(关闭侧滑后分发到 ViewModel)
binding.btnResponse.setOnClickListener {
binding.swipeMenu.quickClose()
// 侧滑菜单 - 回执按钮(关闭侧滑后分发到 ViewModel,平板独有)
binding.btnResponse?.setOnClickListener {
binding.swipeMenu?.quickClose()
clickListener?.onItemClick(position, ITEM_CLICK_TYPE_CUSTOMS_RESPONSE)
}
// 添加图标点击事件 - 切换选择状态
binding.ivIcon.setOnClickListener {
// 添加图标点击事件 - 切换选择状态(平板独有)
binding.ivIcon?.setOnClickListener {
bean.checked.set(!bean.checked.get())
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).tryEmit("check_changed")
binding.executePendingBindings()
}
// 展开按钮点击事件
binding.ivShow.setOnClickListener {
// 展开按钮点击事件(平板独有)
binding.ivShow?.setOnClickListener {
bean.showMore.set(!bean.showMore.get())
}
// 选择圈点击事件(手机独有,仅待运抵 Tab 可见)
binding.ivSelect?.setOnClickListener {
bean.checked.set(!bean.checked.get())
activity?.onItemCheckChanged()
binding.executePendingBindings()
}
// 子列表 RecyclerView 仅平板存在,手机版分单改走独立页面
val rvSub = binding.rvSub ?: return
// 初始化子列表 RecyclerView
setCommonAdapter(
binding.rvSub,
rvSub,
IntExpArriveSubViewHolder::class.java,
R.layout.item_int_exp_arrive_sub
)
// 刷新子列表数据
val subList = bean.haWbList ?: emptyList()
binding.rvSub.refresh(subList)
rvSub.refresh(subList)
updateSubListVisibility(subList.isNotEmpty())
}
private fun updateSubListVisibility(hasData: Boolean) {
val llHeader = binding.llHeader ?: return
val dividerHeader = binding.dividerHeader ?: return
val rvSub = binding.rvSub ?: return
val tvEmpty = binding.tvEmpty ?: return
if (hasData) {
binding.llHeader.visibility = View.VISIBLE
binding.dividerHeader.visibility = View.VISIBLE
binding.rvSub.visibility = View.VISIBLE
binding.tvEmpty.visibility = View.GONE
llHeader.visibility = View.VISIBLE
dividerHeader.visibility = View.VISIBLE
rvSub.visibility = View.VISIBLE
tvEmpty.visibility = View.GONE
} else {
binding.llHeader.visibility = View.GONE
binding.dividerHeader.visibility = View.GONE
binding.rvSub.visibility = View.GONE
binding.tvEmpty.visibility = View.VISIBLE
llHeader.visibility = View.GONE
dividerHeader.visibility = View.GONE
rvSub.visibility = View.GONE
tvEmpty.visibility = View.VISIBLE
}
}
}

View File

@@ -21,6 +21,14 @@ class IntExpMoveViewHolder(view: View) :
binding.bean = bean
binding.position = position
// 手机版「查看详情」/「编辑」→ 与平板点击卡片 / 侧滑编辑同一页面(平板变体无此控件,为 null 时跳过)
binding.llDetail?.setOnClickListener {
IntExpMoveEditActivity.startForDetails(itemView.context, bean)
}
binding.tvEdit?.setOnClickListener {
IntExpMoveEditActivity.startForEdit(itemView.context, bean)
}
// 添加图标点击事件 - 切换选择状态
binding.ivIcon.setOnClickListener {
bean.checked.set(!bean.checked.get()) // 反转选择状态
@@ -33,13 +41,13 @@ class IntExpMoveViewHolder(view: View) :
}
// 点击列表项进入移库详情
binding.ll.setOnClickListener {
binding.ll?.setOnClickListener {
IntExpMoveEditActivity.startForDetails(itemView.context, bean)
}
// 侧滑菜单 - 编辑按钮
binding.btnEdit.setOnClickListener {
binding.swipeMenu.quickClose()
// 侧滑菜单 - 编辑按钮(平板独有)
binding.btnEdit?.setOnClickListener {
binding.swipeMenu?.quickClose()
IntExpMoveEditActivity.startForEdit(itemView.context, bean)
}

View File

@@ -1,32 +1,41 @@
package com.lukouguoji.gjc.holder
import android.view.View
import com.lukouguoji.gjc.databinding.ItemIntExpOutHandoverBinding
import com.lukouguoji.module_base.base.BaseViewHolder
package com.lukouguoji.gjc.holder
import android.view.View
import com.lukouguoji.gjc.activity.IntExpOutHandoverDetailActivity
import com.lukouguoji.gjc.databinding.ItemIntExpOutHandoverBinding
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.bean.GjcUldUseBean
/**
* 国际出港-出库交接 列表项ViewHolder
*/
class IntExpOutHandoverViewHolder(view: View) :
BaseViewHolder<GjcUldUseBean, ItemIntExpOutHandoverBinding>(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())
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).tryEmit("check_changed")
// 立即更新UI(图片自动切换)
binding.executePendingBindings()
}
}
}
import com.lukouguoji.module_base.bean.GjcUldUseBean
/**
* 国际出港-出库交接 列表项ViewHolder
*
* 平板 / 手机共用:布局按资源限定符切换,本类不做设备判断。
* `llDetail`(查看详情)仅存在于手机变体,平板变体中为 null,因此需判空。
*/
class IntExpOutHandoverViewHolder(view: View) :
BaseViewHolder<GjcUldUseBean, ItemIntExpOutHandoverBinding>(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())
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).tryEmit("check_changed")
// 立即更新UI(图片自动切换)
binding.executePendingBindings()
}
// 手机版「查看详情」→ 板箱详情页(平板变体无此控件,为 null 时跳过)
binding.llDetail?.setOnClickListener {
IntExpOutHandoverDetailActivity.start(itemView.context, bean)
}
}
}

View File

@@ -2,6 +2,8 @@ package com.lukouguoji.gjc.holder
import android.view.View
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.activity.GjcQueryDetailsActivity
import com.lukouguoji.gjc.activity.IntExpStorageUseActivity
import com.lukouguoji.gjc.databinding.ItemIntExpStorageUseBinding
import com.lukouguoji.module_base.adapter.setCommonAdapter
import com.lukouguoji.module_base.base.BaseViewHolder
@@ -12,6 +14,10 @@ import com.lukouguoji.module_base.ktx.refresh
/**
* 国际出港-仓库 ViewHolder
*
* 双形态布局:平板变体含 iv_icon/iv_show/rv_sub(多选 + 库位子列表),手机变体含
* ll/btn_clear/btn_modify/btn_out/btn_in(整卡进详情 + 卡片级四操作按钮)。
* 单侧独有的 id 在 Binding 基类中为 @Nullable,必须判空访问。
*/
class IntExpStorageUseViewHolder(view: View) :
BaseViewHolder<GjcMaWb, ItemIntExpStorageUseBinding>(view) {
@@ -22,8 +28,10 @@ class IntExpStorageUseViewHolder(view: View) :
binding.position = position
binding.executePendingBindings()
// ==================== 平板:多选 + 子列表 ====================
// 图标点击切换选择状态(联动子列表)
binding.ivIcon.setOnClickListener {
binding.ivIcon?.setOnClickListener {
// 切换主列表项的选择状态
val newCheckedState = !bean.checked.get()
bean.checked.set(newCheckedState)
@@ -37,25 +45,45 @@ class IntExpStorageUseViewHolder(view: View) :
// 刷新UI
binding.executePendingBindings()
binding.rvSub.adapter?.notifyDataSetChanged()
binding.rvSub?.adapter?.notifyDataSetChanged()
}
// 展开按钮点击事件
binding.ivShow.setOnClickListener {
binding.ivShow?.setOnClickListener {
bean.showMore.set(!bean.showMore.get())
}
// 初始化库位明细子列表 RecyclerView
setCommonAdapter(
binding.rvSub,
IntExpStorageUseSubViewHolder::class.java,
R.layout.item_int_exp_storage_use_sub
)
binding.rvSub?.let { rvSub ->
setCommonAdapter(
rvSub,
IntExpStorageUseSubViewHolder::class.java,
R.layout.item_int_exp_storage_use_sub
)
// 刷新库位明细数据(传递父Bean引用)
val storageUseList = bean.storageUseList ?: emptyList()
// 为每个子列表项设置父Bean引用(通过tag传递)
binding.rvSub.tag = bean
binding.rvSub.refresh(storageUseList)
// 刷新库位明细数据(传递父Bean引用)
val storageUseList = bean.storageUseList ?: emptyList()
// 为每个子列表项设置父Bean引用(通过tag传递)
rvSub.tag = bean
rvSub.refresh(storageUseList)
}
// ==================== 手机:整卡进详情 + 卡片级操作 ====================
val activity = itemView.context as? IntExpStorageUseActivity
// 整卡点击进详情(复用出港查询详情页,3 Tab 运单/仓库/库位信息)
binding.ll?.setOnClickListener {
GjcQueryDetailsActivity.start(itemView.context, bean.maWbId)
}
// 清仓(已清仓时置灰不可点,样式由 XML 按 bean.isCleared 切换)
binding.btnClear?.setOnClickListener {
if (!bean.isCleared) activity?.cardClear(bean)
}
binding.btnModify?.setOnClickListener { activity?.cardModifyStorage(bean) }
binding.btnOut?.setOnClickListener { activity?.cardOutStorage(bean) }
binding.btnIn?.setOnClickListener { activity?.cardInStorage(bean) }
}
}

View File

@@ -1,129 +1,171 @@
package com.lukouguoji.gjc.page.move
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AlertDialog
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityIntExpMoveBinding
import com.lukouguoji.gjc.viewModel.IntExpMoveViewModel
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.ktx.showToast
import com.lukouguoji.module_base.model.ScanModel
import com.lukouguoji.module_base.router.ARouterConstants
/**
* 国际出港-出港移库
*/
@Route(path = ARouterConstants.ACTIVITY_URL_INT_EXP_MOVE)
class IntExpMoveActivity : BaseBindingActivity<ActivityIntExpMoveBinding, IntExpMoveViewModel>() {
override fun layoutId() = R.layout.activity_int_exp_move
override fun viewModelClass() = IntExpMoveViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际出港移库")
binding.viewModel = viewModel
binding.activity = this
initRecyclerView()
initListeners()
observeData()
}
/**
* 初始化RecyclerView
*/
private fun initRecyclerView() {
viewModel.pageModel.bindSmartRefreshLayout(
binding.srl,
binding.rv,
viewModel,
this
)
binding.rv.addOnItemClickListener(viewModel)
}
/**
* 初始化监听器
*/
private fun initListeners() {
// 移库按钮
binding.btnMove.setOnClickListener {
showMoveConfirmDialog()
}
}
/**
* 观察数据变化
*/
private fun observeData() {
// 监听item选择变化事件,更新全选状态
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).observe(this) {
viewModel.onItemCheckChanged()
}
// 监听刷新事件
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
viewModel.refresh()
}
// 初始加载数据
viewModel.refresh()
}
/**
* 扫码运单号
*/
fun scanWaybill() {
ScanModel.startScan(this, Constant.RequestCode.WAYBILL)
}
/**
* 显示移库确认对话框
*/
private fun showMoveConfirmDialog() {
val selectedItems = viewModel.getSelectedItems()
if (selectedItems.isEmpty()) {
showToast("请至少选择一条运单")
return
}
AlertDialog.Builder(this)
.setTitle("移库确认")
.setMessage("确定要移库选中的 ${selectedItems.size} 条记录吗?")
.setPositiveButton("确定") { _, _ ->
viewModel.submitMove()
}
.setNegativeButton("取消", null)
.show()
}
/**
* 扫码回调
*/
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == Constant.RequestCode.WAYBILL && resultCode == Activity.RESULT_OK) {
val code = data?.getStringExtra(Constant.Result.CODED_CONTENT)
viewModel.waybillNo.value = code
viewModel.searchClick()
}
}
companion object {
@JvmStatic
fun start(context: Context) {
val starter = Intent(context, IntExpMoveActivity::class.java)
context.startActivity(starter)
}
}
}
package com.lukouguoji.gjc.page.move
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.databinding.ObservableBoolean
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.databinding.ActivityIntExpMoveBinding
import com.lukouguoji.gjc.viewModel.IntExpMoveViewModel
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.ktx.showToast
import com.lukouguoji.module_base.model.ConfirmDialogModel
import com.lukouguoji.module_base.model.ScanModel
import com.lukouguoji.module_base.router.ARouterConstants
import com.lukouguoji.module_base.util.DeviceUtil
/**
* 国际出港-出港移库
*/
@Route(path = ARouterConstants.ACTIVITY_URL_INT_EXP_MOVE)
class IntExpMoveActivity : BaseBindingActivity<ActivityIntExpMoveBinding, IntExpMoveViewModel>() {
// 布局 id 不区分设备,平板/手机由资源限定符自动选择:
// layout-sw600dp/activity_int_exp_move.xml(平板) / layout/activity_int_exp_move.xml(手机)
override fun layoutId() = R.layout.activity_int_exp_move
override fun viewModelClass() = IntExpMoveViewModel::class.java
/** 手机版筛选弹层显隐(仅 UI 状态,不涉及业务逻辑) */
val filterPanelVisible = ObservableBoolean(false)
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow(if (DeviceUtil.isPhone()) "出港移库" else "国际出港移库")
binding.viewModel = viewModel
binding.activity = this
// 手机版专属数据:默认「待移库」Tab、Tab 角标计数、特码下拉
// 平板端不调用,查询链路与请求次数与改造前完全一致
if (DeviceUtil.isPhone()) {
viewModel.initPhoneExtras()
}
initRecyclerView()
initListeners()
observeData()
}
/**
* 初始化RecyclerView
*/
private fun initRecyclerView() {
viewModel.pageModel.bindSmartRefreshLayout(
binding.srl,
binding.rv,
viewModel,
this
)
binding.rv.addOnItemClickListener(viewModel)
}
/**
* 初始化监听器
*/
private fun initListeners() {
// 移库按钮:btnMove 只存在于平板变体(手机版底部条走 setOnActionClick),故判空
binding.btnMove?.setOnClickListener {
showMoveConfirmDialog()
}
}
/**
* 观察数据变化
*/
private fun observeData() {
// 监听item选择变化事件,更新全选状态
FlowBus.with<String>(ConstantEvent.EVENT_CHECK_CHANGED).observe(this) {
viewModel.onItemCheckChanged()
}
// 监听刷新事件
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
viewModel.refresh()
}
// 初始加载数据
viewModel.refresh()
}
/**
* 扫码运单号
*/
fun scanWaybill() {
ScanModel.startScan(this, Constant.RequestCode.WAYBILL)
}
// ==================== 手机版专用交互(复用既有 ViewModel 字段,无新增业务逻辑) ====================
/**
* 手机版筛选弹层显隐切换
*/
fun toggleFilterPanel() {
filterPanelVisible.set(!filterPanelVisible.get())
}
/**
* 手机版筛选:重置
*
* 只清空弹层内的三个条件(承运人 / 运单类型 / 特码),不影响 Tab 与顶部搜索框。
*/
fun resetFilter() {
viewModel.by1.value = ""
viewModel.dest1.value = ""
viewModel.awbType.value = ""
}
/**
* 手机版筛选:确定
*/
fun confirmFilter() {
filterPanelVisible.set(false)
viewModel.searchClick()
}
/**
* 显示移库确认对话框
*
* 手机版底部操作条通过 XML 的 setOnActionClick 调用,故为 public。
*/
fun showMoveConfirmDialog() {
val selectedItems = viewModel.getSelectedItems()
if (selectedItems.isEmpty()) {
showToast("请至少选择一条运单")
return
}
ConfirmDialogModel(
message = "确定要移库选中的 ${selectedItems.size} 条运单吗?",
title = "移库确认"
) {
viewModel.submitMove()
}.show()
}
/**
* 扫码回调
*/
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == Constant.RequestCode.WAYBILL && resultCode == Activity.RESULT_OK) {
val code = data?.getStringExtra(Constant.Result.CODED_CONTENT)
viewModel.waybillNo.value = code
viewModel.searchClick()
}
}
companion object {
@JvmStatic
fun start(context: Context) {
val starter = Intent(context, IntExpMoveActivity::class.java)
context.startActivity(starter)
}
}
}

View File

@@ -15,10 +15,12 @@ import com.lukouguoji.module_base.common.DetailsPageType
import com.lukouguoji.module_base.ktx.addOnItemClickListener
import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.router.ARouterConstants
import com.lukouguoji.module_base.util.DeviceUtil
/**
* 国际出港移库编辑/详情页
* 编辑模式仅支持拍照上传与备注修改
* 布局双变体:layout-sw600dp/(平板)与 layout/(手机,设计稿「运单详情」样式),共用本 Activity 与 ViewModel
*/
@Route(path = ARouterConstants.ACTIVITY_URL_INT_EXP_MOVE_EDIT)
class IntExpMoveEditActivity :
@@ -31,9 +33,10 @@ class IntExpMoveEditActivity :
override fun initOnCreate(savedInstanceState: Bundle?) {
viewModel.initOnCreated(intent)
val isPhone = DeviceUtil.isPhone()
when (viewModel.pageType.value) {
DetailsPageType.Modify -> setBackArrow("国际出港移库编辑")
else -> setBackArrow("国际出港移库详情")
DetailsPageType.Modify -> setBackArrow(if (isPhone) "移库编辑" else "国际出港移库编辑")
else -> setBackArrow(if (isPhone) "运单详情" else "国际出港移库详情")
}
binding.viewModel = viewModel

View File

@@ -34,6 +34,11 @@ class GjcQueryDetailsViewModel : BaseViewModel() {
// 库位列表 (storageUseList)
val storageUseList = MutableLiveData<List<Map<String, Any>>>(emptyList())
// ==================== 5.5寸手机版专属(展示用,平板布局不绑定) ====================
// 入库件数/入库重量 = warehouseList 各批次求和(设计稿「件重信息」区块)
val inPcTotal = MutableLiveData("--")
val inWeightTotal = MutableLiveData("--")
// ==================== Fragment列表 ====================
val fragmentList by lazy {
listOf(
@@ -59,6 +64,40 @@ class GjcQueryDetailsViewModel : BaseViewModel() {
currentTab.value = index
}
// ==================== 5.5寸手机版取值帮助方法(布局绑定用) ====================
// 表达式里必须把 map(maWbData)作为参数传入,DataBinding 才能追踪依赖并在数据到达后刷新
/**
* 从详情 Map 取字符串展示值;数字自动去掉无意义的 .0;空值兜底 "--"
*/
fun str(map: Map<String, Any>?, key: String): String {
val v = map?.get(key) ?: return "--"
val s = when (v) {
is Double -> if (v % 1.0 == 0.0) v.toLong().toString() else v.toString()
else -> v.toString()
}
return s.ifBlank { "--" }
}
/**
* 依次取第一个非空 key 的展示值(如 agentName 优先于 agentCode)
*/
fun strOr(map: Map<String, Any>?, key: String, fallbackKey: String): String {
val first = str(map, key)
return if (first != "--") first else str(map, fallbackKey)
}
/**
* 取重量类数值(保留小数形式),空值兜底 "--"
*/
fun dec(map: Map<String, Any>?, key: String): String {
val v = map?.get(key) ?: return "--"
return when (v) {
is Double -> v.toString()
else -> v.toString().ifBlank { "--" }
}
}
/**
* 加载详情数据
*/
@@ -111,6 +150,17 @@ class GjcQueryDetailsViewModel : BaseViewModel() {
val whList = data["warehouseList"] as? List<Map<String, Any>> ?: emptyList()
warehouseList.value = whList
// 手机版「入库件数/入库重量」= 各批次求和(Gson 反序列化数字均为 Double)
if (whList.isNotEmpty()) {
val pcSum = whList.sumOf { (it["pc"] as? Double) ?: 0.0 }
val weightSum = whList.sumOf { (it["weight"] as? Double) ?: 0.0 }
inPcTotal.value = pcSum.toLong().toString()
inWeightTotal.value = weightSum.toString()
} else {
inPcTotal.value = "--"
inWeightTotal.value = "--"
}
// 解析 storageUseList 列表
@Suppress("UNCHECKED_CAST")
val suList = data["storageUseList"] as? List<Map<String, Any>> ?: emptyList()

View File

@@ -79,6 +79,12 @@ class GjcQueryViewModel : BasePageViewModel() {
val businessType = MutableLiveData("") // 业务类型
val goodsCn = MutableLiveData("") // 品名(中)
// ==================== 5.5寸手机版三格统计 ====================
// 总票数 / 已入库 / 已离港,均取 pageQueryTotal 出参(wbNumber / storedNumber / departedNumber),
// 与列表同条件、服务端全量口径(平板布局不绑定)
val storedCount = MutableLiveData("0")
val departedCount = MutableLiveData("0")
// 是否有筛选条件(任意一个非空则为 true,用于筛选按钮红点)
val hasFilter: MediatorLiveData<Boolean> = MediatorLiveData<Boolean>().apply {
val update = { _: Any? ->
@@ -216,6 +222,9 @@ class GjcQueryViewModel : BasePageViewModel() {
totalPc.value = (data?.totalPc ?: 0).toString()
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
totalFlightNumber.value = (data?.flightNumber ?: 0).toString()
// 手机三格统计分项(平板布局不绑定,无影响)
storedCount.value = (data?.storedNumber ?: 0).toString()
departedCount.value = (data?.departedNumber ?: 0).toString()
}
}
}

View File

@@ -53,6 +53,7 @@ class GjcWeighingRecordDetailsViewModel : BaseViewModel() {
val totalPc = MutableLiveData("0") // 总件数
val totalWeight = MutableLiveData("0.0") // 总重量
val weightError = MutableLiveData("0.0%") // 重量误差百分比
val totalCarWeight = MutableLiveData("0") // 托盘总重(5.5寸手机版顶部卡片,平板布局不引用)
// 传递参数(用于API调用)
private var prefix = ""
@@ -143,6 +144,10 @@ class GjcWeighingRecordDetailsViewModel : BaseViewModel() {
val sumWeight = records.sumOf { it.weight }
totalWeight.value = String.format("%.2f", sumWeight)
// 计算托盘总重(手机版顶部卡片)
val sumCarWeight = records.sumOf { it.trayTotalWeight }
totalCarWeight.value = String.format("%.2f", sumCarWeight)
// 计算重量误差百分比
val preWeightValue = preWeight.value?.toDoubleOrNull() ?: 0.0
val error = if (sumWeight > 0 && preWeightValue > 0) {
@@ -191,6 +196,39 @@ class GjcWeighingRecordDetailsViewModel : BaseViewModel() {
saveRecords(records)
}
/**
* 5.5寸手机版「修改记录」覆层保存:与 [onSaveClick] 相同的批量更新接口,
* 但保存成功后留在本页(收起覆层 + 重新加载),不关闭页面。仅手机布局调用。
*/
fun onPhoneSaveClick() {
val records = recordList.value ?: return
if (!validateRecords(records)) return
launchLoadingCollect({
NetApply.api.updateGjcCheckInRecordList(records)
}) {
onSuccess = { result ->
if (result.data == true) {
showToast("保存成功")
// 收起编辑覆层
isEditMode.value = false
// 通知列表页刷新
viewModelScope.launch {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
}
// 重新加载本页数据
loadData()
} else {
showToast("保存失败")
}
}
onFailed = { code, msg ->
showToast("保存失败:$msg")
}
}
}
///////////////////////////////////////////////////////////////////////////
// 业务逻辑
///////////////////////////////////////////////////////////////////////////

View File

@@ -46,6 +46,11 @@ class GjcWeighingRecordViewModel : BasePageViewModel() {
val totalWeight = MutableLiveData("0") // 总重量
val cargoWeight = MutableLiveData("0") // 总货重
// ========== 5.5寸手机版 ==========
// 手机版筛选弹层与平板端查询参数保持一致(后端确认):航班日期 / 代理人 / 特码,
// 运单号走顶部搜索框;dest / opId / 收运时间范围后端均不支持(dest、opId 内网实测被忽略)
///////////////////////////////////////////////////////////////////////////
// 方法区
///////////////////////////////////////////////////////////////////////////
@@ -107,17 +112,11 @@ class GjcWeighingRecordViewModel : BasePageViewModel() {
when (selectedItems.size) {
0 -> {
// 没有选择单据:直接跳转(不带参数)
com.alibaba.android.arouter.launcher.ARouter.getInstance()
.build(com.lukouguoji.module_base.router.ARouterConstants.ACTIVITY_URL_INT_EXP_ARRIVE)
.navigation()
openArriveDeclare(null)
}
1 -> {
// 选择一个单据:跳转到出港运抵页面,携带运单号
val waybillNo = selectedItems[0].wbNo
com.alibaba.android.arouter.launcher.ARouter.getInstance()
.build(com.lukouguoji.module_base.router.ARouterConstants.ACTIVITY_URL_INT_EXP_ARRIVE)
.withString("wbNoParam", waybillNo)
.navigation()
openArriveDeclare(selectedItems[0].wbNo)
}
else -> {
// 选择多个单据:Toast 提示
@@ -126,29 +125,40 @@ class GjcWeighingRecordViewModel : BasePageViewModel() {
}
}
companion object {
/**
* 跳转出港运抵(运抵申报);wbNo 非空时携带运单号自动查询。
* 平板「运抵申报」按钮与手机卡片「运抵申报」(ViewHolder 调用)共用。
*/
fun openArriveDeclare(wbNo: String?) {
val postcard = com.alibaba.android.arouter.launcher.ARouter.getInstance()
.build(com.lukouguoji.module_base.router.ARouterConstants.ACTIVITY_URL_INT_EXP_ARRIVE)
if (!wbNo.isNullOrEmpty()) postcard.withString("wbNoParam", wbNo)
postcard.navigation()
}
}
/**
* 获取列表数据
*/
override fun getData() {
// 公共查询条件(列表与统计共用)
val baseParams = mutableMapOf<String, Any?>(
"fdate" to flightDate.value!!.ifEmpty { null },
"fno" to flightNo.value!!.ifEmpty { null },
"agentCode" to agentCode.value!!.ifEmpty { null },
"spCode" to spCode.value!!.ifEmpty { null },
"wbNo" to waybillNo.value!!.ifEmpty { null },
)
// 构建查询参数(列表接口)
val listParams = mapOf(
val listParams = (baseParams + mapOf(
"pageNum" to pageModel.page,
"pageSize" to pageModel.limit,
"fdate" to flightDate.value!!.ifEmpty { null },
"fno" to flightNo.value!!.ifEmpty { null },
"agentCode" to agentCode.value!!.ifEmpty { null },
"spCode" to spCode.value!!.ifEmpty { null },
"wbNo" to waybillNo.value!!.ifEmpty { null },
).toRequestBody()
)).toRequestBody()
// 构建查询参数(统计接口 - 使用相同的搜索条件)
val totalParams = mapOf(
"fdate" to flightDate.value!!.ifEmpty { null },
"fno" to flightNo.value!!.ifEmpty { null },
"agentCode" to agentCode.value!!.ifEmpty { null },
"spCode" to spCode.value!!.ifEmpty { null },
"wbNo" to waybillNo.value!!.ifEmpty { null },
).toRequestBody()
val totalParams = baseParams.toRequestBody()
// 获取列表数据(显示loading)
launchLoadingCollect({

View File

@@ -55,15 +55,69 @@ class GjcWeighingViewModel : BasePageViewModel() {
// 全选状态
val isAllChecked = MutableLiveData(false)
fun onItemCheckChanged() {
updateCheckAllStatus()
}
fun updateCheckAllStatus() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcWeighingBean> ?: return
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
}
// ========== 5.5寸手机版专属字段(平板不调用 initPhoneExtras,行为零变化) ==========
/** 手机版顶部搜索关键字(运单号/航班号混输,getData 内分流:含字母→fno,其余→wbNo) */
val searchKey = MutableLiveData("")
/** 主页三格统计:待计重 / 计重中数量(取 pageQueryTotal 出参 waitCheckInNumber / checkingNumber) */
val pendingCount = MutableLiveData("0")
val weighingCount = MutableLiveData("0")
// 手机版筛选弹层与平板端查询参数保持一致(后端确认):航班日期 / 代理人 / 特码,
// 运单号与航班号走顶部搜索框,均复用上方既有字段
/** 由手机形态的 Activity 置 true,平板保持 false(不产生任何额外请求与参数) */
private var phoneExtrasEnabled = false
/**
* 开启手机版专属数据:顶部「运单号/航班号」合并搜索框分流(见 getData)。
* 仅由手机形态的 Activity 调用。
*/
fun initPhoneExtras() {
phoneExtrasEnabled = true
}
/**
* 单票提前运抵(手机版卡片内按钮;平板走底部批量 [arrivedAhead])
*/
fun arrivedAheadSingle(bean: GjcWeighingBean) {
if (bean.arriveFlag == "1") {
showToast("该运单已提前运抵")
return
}
val maWbList = listOf(
GjcMaWb(
maWbId = bean.maWbId,
no = bean.no,
prefix = bean.prefix,
wbNo = bean.wbNo,
arriveFlag = "1"
)
)
launchLoadingCollect({ NetApply.api.preArrive(maWbList) }) {
onSuccess = {
showToast("提前运抵成功")
viewModelScope.launch {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
}
refresh()
}
onFailed = { code, msg ->
showToast(msg.noNull("提前运抵失败"))
}
}
}
fun onItemCheckChanged() {
updateCheckAllStatus()
}
fun updateCheckAllStatus() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcWeighingBean> ?: return
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
}
///////////////////////////////////////////////////////////////////////////
// 方法区
@@ -185,25 +239,32 @@ class GjcWeighingViewModel : BasePageViewModel() {
* 获取列表数据
*/
override fun getData() {
// 公共查询条件(列表与统计共用)
val baseParams = mutableMapOf<String, Any?>(
"fdate" to flightDate.value!!.ifEmpty { null },
"fno" to flightNo.value!!.ifEmpty { null },
"agentCode" to agentCode.value!!.ifEmpty { null },
"spCode" to spCode.value!!.ifEmpty { null },
"wbNo" to waybillNo.value!!.ifEmpty { null },
)
// 手机版专属条件(平板 phoneExtrasEnabled 恒为 false,请求体与改造前完全一致)
if (phoneExtrasEnabled) {
val key = searchKey.value?.trim() ?: ""
if (key.isNotEmpty()) {
// 「运单号/航班号」合并搜索框,只分流到平板同名入参:含字母 → fno,其余 → wbNo
if (key.any { it.isLetter() }) baseParams["fno"] = key else baseParams["wbNo"] = key
}
}
// 构建查询参数(列表接口)
val listParams = mapOf(
val listParams = (baseParams + mapOf(
"pageNum" to pageModel.page,
"pageSize" to pageModel.limit,
"fdate" to flightDate.value!!.ifEmpty { null },
"fno" to flightNo.value!!.ifEmpty { null },
"agentCode" to agentCode.value!!.ifEmpty { null },
"spCode" to spCode.value!!.ifEmpty { null },
"wbNo" to waybillNo.value!!.ifEmpty { null },
).toRequestBody()
)).toRequestBody()
// 构建查询参数(统计接口 - 使用相同的搜索条件)
val totalParams = mapOf(
"fdate" to flightDate.value!!.ifEmpty { null },
"fno" to flightNo.value!!.ifEmpty { null },
"agentCode" to agentCode.value!!.ifEmpty { null },
"spCode" to spCode.value!!.ifEmpty { null },
"wbNo" to waybillNo.value!!.ifEmpty { null },
).toRequestBody()
val totalParams = baseParams.toRequestBody()
// 获取列表数据(显示loading)
launchLoadingCollect({
@@ -223,6 +284,9 @@ class GjcWeighingViewModel : BasePageViewModel() {
totalCount.value = (data?.wbNumber ?: 0).toString()
totalPc.value = (data?.totalPc ?: 0).toString()
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
// 手机版三格统计:后端统计出参直接给出分项计数,无需额外请求
pendingCount.value = (data?.waitCheckInNumber ?: 0).toString()
weighingCount.value = (data?.checkingNumber ?: 0).toString()
}
}
}
@@ -234,7 +298,10 @@ class GjcWeighingViewModel : BasePageViewModel() {
if (resultCode == Activity.RESULT_OK && data != null) {
when (requestCode) {
Constant.RequestCode.WAYBILL -> {
waybillNo.value = data.getStringExtra(Constant.Result.CODED_CONTENT)
val content = data.getStringExtra(Constant.Result.CODED_CONTENT)
// 手机版扫码写入顶部搜索框,平板写入原运单号搜索条
if (phoneExtrasEnabled) searchKey.value = content
else waybillNo.value = content
refresh()
}
}

View File

@@ -0,0 +1,30 @@
package com.lukouguoji.gjc.viewModel
import android.content.Intent
import androidx.lifecycle.MutableLiveData
import com.lukouguoji.module_base.base.BaseViewModel
import com.lukouguoji.module_base.bean.GjcWeighingRecordBean
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.ktx.showToast
/**
* 国际出港计重-运单详情 ViewModel(5.5寸手机版专属页面)
*
* 只读展示计重记录列表传入的运单信息,无接口请求。
* 注:设计稿中的「通道号」字段在 /IntExpCheckIn/checked/pageQuery 出参中不存在(后端缺口,
* 见接口问题清单),布局侧空值兜底显示 "-"。
*/
class GjcWeighingWbDetailViewModel : BaseViewModel() {
// 运单信息(从计重记录列表页传入)
val bean = MutableLiveData(GjcWeighingRecordBean())
fun initOnCreated(intent: Intent) {
val data = intent.getSerializableExtra(Constant.Key.BEAN) as? GjcWeighingRecordBean
if (data != null) {
bean.value = data
} else {
showToast("参数错误")
}
}
}

View File

@@ -0,0 +1,34 @@
package com.lukouguoji.gjc.viewModel
import android.content.Intent
import androidx.lifecycle.MutableLiveData
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.holder.IntExpArriveReceiptViewHolder
import com.lukouguoji.module_base.base.BaseViewModel
import com.lukouguoji.module_base.bean.GjcHaWb
import com.lukouguoji.module_base.common.Constant
/**
* 国际出港运抵-回执内容 ViewModel(5.5寸手机版专属只读页)
*
* 数据直接复用主列表页已加载的 haWbList.response / arrivalOpDate 字段,无需任何新增请求。
* 对应设计稿 documents/5.5寸手持端设计文件/04_出港运抵/receipt.html。
*/
class IntExpArriveReceiptViewModel : BaseViewModel() {
val receiptList = MutableLiveData<List<GjcHaWb>>(emptyList())
// 适配器配置
val itemViewHolder = IntExpArriveReceiptViewHolder::class.java
val itemLayoutId = R.layout.item_int_exp_arrive_receipt
@Suppress("UNCHECKED_CAST")
fun initOnCreated(intent: Intent) {
val list = intent.getSerializableExtra(Constant.Key.DATA) as? ArrayList<GjcHaWb>
// .copy() 补上被 Java 序列化跳过的 @Transient 字段(checked 等),见分单明细页同款注释
receiptList.value = (list ?: emptyList())
.map { it.copy() }
.filter { !it.response.isNullOrEmpty() }
.sortedByDescending { it.arrivalOpDate }
}
}

View File

@@ -0,0 +1,137 @@
package com.lukouguoji.gjc.viewModel
import android.content.Intent
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.lukouguoji.gjc.R
import com.lukouguoji.gjc.dialog.IntExpArriveResetDialogModel
import com.lukouguoji.gjc.holder.IntExpArriveSubOrderViewHolder
import com.lukouguoji.module_base.base.BaseViewModel
import com.lukouguoji.module_base.bean.GjcHaWb
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.launchLoadingCollect
import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.ktx.toRequestBody
import kotlinx.coroutines.launch
/**
* 国际出港运抵-分单明细 ViewModel(5.5寸手机版专属页面)
*
* 数据直接复用主列表页已加载的 haWbList(Intent 传入),无需任何新增请求。
* 筛选仅「分单号」在客户端生效——航班日期/航班号/代理等字段在单个运单的分单集合内
* 恒为同一值,筛选它们没有实际意义(设计稿疑似沿用主列表筛选组件模板,未按此页场景定制)。
*/
class IntExpArriveSubOrderViewModel : BaseViewModel() {
// 运单号(页面标题辅助展示,非必需)
var wbNo: String = ""
private set
// 完整分单列表(Intent 传入,不随筛选变化)
private var fullList: List<GjcHaWb> = emptyList()
// 当前展示列表(按分单号筛选后的结果)
val displayList = MutableLiveData<List<GjcHaWb>>(emptyList())
// 筛选:分单号(客户端 contains 匹配)
val hnoFilter = MutableLiveData("")
// 全选状态与已选计数
val isAllChecked = MutableLiveData(false)
val selectedCount = MutableLiveData("0")
// 适配器配置
val itemViewHolder = IntExpArriveSubOrderViewHolder::class.java
val itemLayoutId = R.layout.item_int_exp_arrive_sub_order
@Suppress("UNCHECKED_CAST")
fun initOnCreated(intent: Intent) {
wbNo = intent.getStringExtra(KEY_WB_NO).orEmpty()
val list = intent.getSerializableExtra(Constant.Key.DATA) as? ArrayList<GjcHaWb>
// Java 序列化会跳过 checked/actionMenuVisible(标了 @Transient,即 JVM transient 修饰符),
// 反序列化后这两个 ObservableBoolean 字段为 null。.copy() 会重新走一遍类体初始化逻辑,
// 用全新的 ObservableBoolean(false) 补上,避免全选/长按时 NPE(已实机崩溃验证过)。
fullList = (list ?: emptyList()).map { it.copy() }
displayList.value = fullList
}
/**
* 分单号筛选(客户端 contains 匹配,非后端查询)。
*/
fun searchClick() {
val key = hnoFilter.value?.trim().orEmpty()
displayList.value = if (key.isEmpty()) {
fullList
} else {
fullList.filter { it.hno?.contains(key, ignoreCase = true) == true }
}
updateCheckAllStatus()
}
fun onItemCheckChanged() {
updateCheckAllStatus()
}
fun updateCheckAllStatus() {
val list = displayList.value ?: return
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
selectedCount.value = list.count { it.checked.get() }.toString()
}
fun checkAllClick() {
val list = displayList.value ?: return
val shouldCheckAll = !isAllChecked.value!!
list.forEach { it.checked.set(shouldCheckAll) }
isAllChecked.value = shouldCheckAll
selectedCount.value = if (shouldCheckAll) list.size.toString() else "0"
}
/**
* 长按菜单「重置」(单条分单)。
*/
fun resetSingleClick(bean: GjcHaWb) {
val dialog = IntExpArriveResetDialogModel { dialogModel ->
val params = mutableMapOf<String, Any?>("haWbList" to listOf(bean))
if (dialogModel.resetStatusCode != null) {
params["restStatus"] = dialogModel.resetStatusCode
}
launchLoadingCollect({ NetApply.api.resetArriveDeclare(params.toRequestBody()) }) {
onSuccess = {
showToast("状态重置成功,请返回列表页下拉刷新查看最新状态")
viewModelScope.launch {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
}
}
}
}
dialog.show()
}
/**
* 底部「申报」:批量申报当前选中的分单。
*/
fun declareClick() {
val selected = displayList.value?.filter { it.isSelected } ?: emptyList()
if (selected.isEmpty()) {
showToast("请选择要申报的分单")
return
}
val params = mapOf("haWbList" to selected).toRequestBody()
launchLoadingCollect({ NetApply.api.arriveDeclare(params) }) {
onSuccess = {
showToast("运抵申报成功")
viewModelScope.launch {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
}
getTopActivity().finish()
}
}
}
companion object {
const val KEY_WB_NO = "wbNo"
}
}

View File

@@ -59,6 +59,7 @@ class IntExpArriveViewModel : BasePageViewModel() {
fun onItemCheckChanged() {
updateCheckAllStatus()
updateCheckAllStatusPhone()
}
fun updateCheckAllStatus() {
@@ -66,6 +67,97 @@ class IntExpArriveViewModel : BasePageViewModel() {
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
}
// ========== 5.5寸手机版专属(平板布局不引用,零影响) ==========
/** 当前 Tab:"pending"(待运抵) / "shipped"(已运抵)。查询时映射为入参 arrivalStatus=0/1(与平板端运抵状态筛选一致) */
val currentTab = MutableLiveData("pending")
/** Tab 配置 */
val arriveTabs = MutableLiveData(
listOf(KeyValue("待运抵", "pending"), KeyValue("已运抵", "shipped"))
)
/** 两个 Tab 的角标计数(同条件 + arrivalStatus=0/1 各调一次 pageQueryTotal 取 wbNumber,全量口径) */
val arriveTabCounts = MutableLiveData(listOf("0", "0"))
/** 手机版空态(当前 Tab 过滤后无数据时显示,对应设计稿 empty-pending) */
val emptyVisiblePhone = MutableLiveData(false)
val emptyTextPhone = MutableLiveData("暂无待运抵的运单")
/** 手机版全选状态(仅统计待运抵 Tab 内的项,与 Pad 端 [isAllChecked] 统计口径不同) */
val isAllCheckedPhone = MutableLiveData(false)
/** 手机版已选数量(底部操作条「已选 N 项」) */
val selectedCountPhone = MutableLiveData("0")
private var phoneExtrasEnabled = false
/**
* 开启手机版专属数据:Tab(arrivalStatus)与角标统计。仅由手机形态的 Activity 调用。
* 筛选弹层与平板端查询参数一致(航班日期/航班号),agentCode 内网实测被后端忽略,已移除「代理」。
*/
fun initPhoneExtras() {
phoneExtrasEnabled = true
}
/**
* 手机版 Tab 切换:按 arrivalStatus 重新查询(服务端过滤,分页与角标均为全量口径)。
* 由 Activity 在 [com.lukouguoji.module_base.ui.weight.phone.PhoneStatusTab] 的
* 双向绑定写入 currentTab 后调用。
*/
fun onTabChangedPhone() {
refresh()
}
/** 当前 Tab 对应的运抵状态入参:待运抵=0 / 已运抵=1 */
private fun currentArrivalStatus(): String =
if (currentTab.value == "shipped") "1" else "0"
/** 列表加载完成后刷新空态文案(服务端已按 Tab 过滤,adapter 即当前 Tab 数据) */
private fun updateEmptyStatePhone() {
val isPendingTab = currentTab.value != "shipped"
emptyVisiblePhone.value = pageModel.rv?.commonAdapter()?.items.isNullOrEmpty()
emptyTextPhone.value = if (isPendingTab) "暂无待运抵的运单" else "暂无已运抵的运单"
}
/**
* 加载 Tab 角标:同条件 + arrivalStatus=0/1 各调一次 pageQueryTotal,取 wbNumber。
*/
private fun loadPhoneTabCounts(filterParams: Map<String, Any?>) {
listOf("0", "1").forEachIndexed { index, status ->
launchCollect({
NetApply.api.getIntExpArriveTotal((filterParams + mapOf("arrivalStatus" to status)).toRequestBody())
}) {
onSuccess = { result ->
val current = arriveTabCounts.value?.toMutableList() ?: mutableListOf("0", "0")
current[index] = (result.data?.wbNumber ?: 0).toString()
arriveTabCounts.value = current
}
}
}
}
/**
* 手机版全选(适配器此时已只包含当前 Tab 的子集,待运抵 Tab 下即为全部可选项)。
*/
fun checkAllClickPhone() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcMaWb> ?: return
val shouldCheckAll = !isAllCheckedPhone.value!!
list.forEach { it.checked.set(shouldCheckAll) }
isAllCheckedPhone.value = shouldCheckAll
updateCheckAllStatusPhone()
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
}
/**
* 更新手机版全选状态与已选计数(基于适配器当前子集,即当前 Tab 的数据)。
*/
fun updateCheckAllStatusPhone() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcMaWb> ?: return
isAllCheckedPhone.value = list.isNotEmpty() && list.all { it.checked.get() }
selectedCountPhone.value = list.count { it.checked.get() }.toString()
}
// ========== 全局展开状态 ==========
/**
* 全局展开状态
@@ -156,6 +248,13 @@ class IntExpArriveViewModel : BasePageViewModel() {
return
}
showResetDeclareDialog(selectedMaWbList, selectedHaWbList)
}
/**
* 状态重置弹框 + 请求(平板批量「状态重置」与手机卡片浮层「重置」共用)
*/
private fun showResetDeclareDialog(selectedMaWbList: List<GjcMaWb>, selectedHaWbList: List<GjcHaWb>) {
// 创建并显示弹框
val dialog = IntExpArriveResetDialogModel { dialogModel ->
// 弹框确认后的回调
@@ -216,6 +315,13 @@ class IntExpArriveViewModel : BasePageViewModel() {
return
}
deleteDeclare(selectedMaWbList, selectedHaWbList)
}
/**
* 删除申报校验 + 弹框 + 请求(平板批量「删除申报」与手机卡片浮层「删除申报」共用)
*/
private fun deleteDeclare(selectedMaWbList: List<GjcMaWb>, selectedHaWbList: List<GjcHaWb>) {
// 校验申报状态:只有申报状态为 01 的记录才能删除申报
if (selectedMaWbList.any { it.declareStatus != "01" } ||
selectedHaWbList.any { it.arrivalStatus != "01" }
@@ -306,12 +412,28 @@ class IntExpArriveViewModel : BasePageViewModel() {
}
}
/**
* 手机版:卡片长按菜单「重置」(单条,已运抵 Tab 专用,对应设计稿长按浮层)。
*/
fun resetSingleDeclareClick(bean: GjcMaWb) {
bean.actionMenuVisible.set(false)
showResetDeclareDialog(listOf(bean), emptyList())
}
/**
* 手机版:卡片长按菜单「删除申报」(单条,对应平板批量「删除申报」)。
*/
fun deleteSingleDeclareClick(bean: GjcMaWb) {
bean.actionMenuVisible.set(false)
deleteDeclare(listOf(bean), emptyList())
}
/**
* 获取数据 (重写BasePageViewModel)
*/
override fun getData() {
// 构建搜索条件
val filterParams = mapOf(
val filterParams = mutableMapOf<String, Any?>(
"fdate" to flightDate.value?.ifEmpty { null },
"fno" to flightNo.value?.ifEmpty { null },
"wbNo" to waybillNo.value?.ifEmpty { null },
@@ -319,19 +441,30 @@ class IntExpArriveViewModel : BasePageViewModel() {
"arrivalStatus" to arrivalStatus.value?.ifEmpty { null }
)
// 手机版 Tab 维度(运抵状态),角标需在不含该条件的基础上分别统计
val tabParams = if (phoneExtrasEnabled) {
filterParams + mapOf("arrivalStatus" to currentArrivalStatus())
} else filterParams
// 列表参数 (含分页)
val listParams = (filterParams + mapOf(
val listParams = (tabParams + mapOf(
"pageNum" to pageModel.page,
"pageSize" to pageModel.limit
)).toRequestBody()
// 统计参数 (无分页)
val totalParams = filterParams.toRequestBody()
val totalParams = tabParams.toRequestBody()
// 获取列表 (带Loading)
launchLoadingCollect({ NetApply.api.getIntExpArriveList(listParams) }) {
onSuccess = {
pageModel.handleListBean(it) { updateCheckAllStatus() }
onSuccess = { result ->
pageModel.handleListBean(result) {
updateCheckAllStatus()
if (phoneExtrasEnabled) {
updateEmptyStatePhone()
updateCheckAllStatusPhone()
}
}
// 数据加载完成后,重置全局展开状态为收起
isAllExpanded.value = false
}
@@ -346,6 +479,11 @@ class IntExpArriveViewModel : BasePageViewModel() {
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
}
}
// 手机版 Tab 角标(平板不触发)
if (phoneExtrasEnabled) {
loadPhoneTabCounts(filterParams)
}
}
/**
@@ -354,7 +492,12 @@ class IntExpArriveViewModel : BasePageViewModel() {
override fun onItemClick(position: Int, type: Int) {
val bean = pageModel.rv?.commonAdapter()?.getItem(position) as? GjcMaWb ?: return
if (type == ITEM_CLICK_TYPE_CUSTOMS_RESPONSE) {
showCustomsResponse(CustomsResponseUrl.INT_EXP_ARRIVE, bean.prefix, bean.no, "出港运抵回执")
queryCustomsResponse(bean)
}
}
/** 查询海关回执并跳转只读回执页(平板侧滑「回执」与手机长按浮层「回执」共用) */
fun queryCustomsResponse(bean: GjcMaWb) {
showCustomsResponse(CustomsResponseUrl.INT_EXP_ARRIVE, bean.prefix, bean.no, "出港运抵回执")
}
}

View File

@@ -35,8 +35,10 @@ class IntExpMoveEditViewModel : BaseViewModel(), IOnItemClickListener {
val pageType = MutableLiveData(DetailsPageType.Details)
private var maWbId: Long = 0L
// 列表页传入的运单数据,用于回填 detail 接口返回为空的展示字段(承运人、出运路径等)
private var listBean: GjcMove? = null
// 列表页传入的运单数据,用于回填 detail 接口返回为空的展示字段(承运人、出运路径等);
// 手机布局另用它展示移库人/移库时间(initOnCreated 在绑定前完成赋值)
var listBean: GjcMove? = null
private set
val dataBean = MutableLiveData(GjcMoveDetail())

View File

@@ -14,6 +14,7 @@ import com.lukouguoji.module_base.ktx.noNull
import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.ktx.toRequestBody
import com.lukouguoji.module_base.util.CheckUtil
import com.lukouguoji.module_base.util.DictUtils
import dev.utils.app.info.KeyValue
/**
@@ -24,10 +25,38 @@ class IntExpMoveViewModel : BasePageViewModel(), IOnItemClickListener {
// ========== 搜索字段 ==========
val awbType = MutableLiveData("") // 运单类型
val by1 = MutableLiveData("") // 承运人
val dest1 = MutableLiveData("") // 卸货站
val dest1 = MutableLiveData("") // 卸货站(仅平板筛选,手机版设计稿无此项)
val moveState = MutableLiveData("") // 移库状态
val waybillNo = MutableLiveData("") // 运单号
// ========== 手机版(5.5 寸手持端)专用 ==========
/** 手机版状态 Tab 配置(设计稿只有两个 Tab,无「全部」) */
val moveStateTabs = MutableLiveData(
listOf(KeyValue("待移库", "0"), KeyValue("已移库", "1"))
)
/** 手机版状态 Tab 角标(与 [moveStateTabs] 等长) */
val moveStateCounts = MutableLiveData(listOf("", ""))
/** 已选数量(手机版底部操作条「已选 N 项」) */
val selectedCount = MutableLiveData("0")
/**
* 是否启用手机版专属数据(Tab 角标计数)。
* 平板端保持 false,不产生任何额外接口请求。
*/
private var phoneExtrasEnabled = false
/**
* 开启手机版专属数据:默认停留「待移库」Tab、启用 Tab 角标计数。
* 仅由手机形态的 Activity 调用。
*/
fun initPhoneExtras() {
phoneExtrasEnabled = true
moveState.value = "0"
}
// ========== 运单类型下拉数据 ==========
val awbTypeList = MutableLiveData<List<KeyValue>>().apply {
value = listOf(
@@ -55,6 +84,8 @@ class IntExpMoveViewModel : BasePageViewModel(), IOnItemClickListener {
// ========== 适配器配置 ==========
val itemViewHolder = IntExpMoveViewHolder::class.java
// 布局 id 不区分设备,平板/手机由资源限定符自动选择(layout-sw600dp/ 与 layout/ 下的同名布局)
val itemLayoutId = R.layout.item_int_exp_move
/**
@@ -100,6 +131,8 @@ class IntExpMoveViewModel : BasePageViewModel(), IOnItemClickListener {
} else {
isAllChecked.value = false
}
selectedCount.value = list.count { it.checked.get() }.toString()
}
/**
@@ -172,6 +205,33 @@ class IntExpMoveViewModel : BasePageViewModel(), IOnItemClickListener {
// 获取统计(后台调用)
getTotalData(totalParams)
// 手机版 Tab 角标计数(平板端不触发,无额外请求)
if (phoneExtrasEnabled) {
loadTabCounts(filterParams)
}
}
/**
* 加载「待移库 / 已移库」Tab 角标数量。
*
* 复用统计接口,分别以 moveState=0 / 1 各查一次,并沿用当前其余筛选条件,
* 保证角标与列表口径一致。仅手机版调用。
*/
private fun loadTabCounts(filterParams: Map<String, Any>) {
listOf("0", "1").forEachIndexed { index, state ->
val params = (filterParams + mapOf("moveState" to state)).toRequestBody()
launchCollect({ NetApply.api.getIntExpMoveTotal(params) }) {
onSuccess = { result ->
val count = (result.data?.wbNumber ?: 0).toString()
val current = moveStateCounts.value?.toMutableList() ?: mutableListOf("", "")
if (index < current.size) {
current[index] = count
moveStateCounts.value = current
}
}
}
}
}
/**

View File

@@ -0,0 +1,25 @@
package com.lukouguoji.gjc.viewModel
import android.content.Intent
import androidx.lifecycle.MutableLiveData
import com.google.gson.Gson
import com.lukouguoji.module_base.base.BaseViewModel
import com.lukouguoji.module_base.bean.GjcUldUseBean
import com.lukouguoji.module_base.common.Constant
/**
* 国际出港-出库交接「板箱详情」ViewModel(手机版专属页面)
*
* 列表项数据已包含详情页所需全部字段,故直接由列表带入,不额外请求接口。
*/
class IntExpOutHandoverDetailViewModel : BaseViewModel() {
val dataBean = MutableLiveData(GjcUldUseBean())
fun initOnCreated(intent: Intent) {
val json = intent.getStringExtra(Constant.Key.DATA).orEmpty()
if (json.isNotEmpty()) {
dataBean.value = Gson().fromJson(json, GjcUldUseBean::class.java)
}
}
}

View File

@@ -18,6 +18,7 @@ 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 dev.utils.app.info.KeyValue
import dev.utils.common.DateUtils
import com.lukouguoji.module_base.ktx.formatDate
import kotlinx.coroutines.launch
@@ -33,21 +34,60 @@ class IntExpOutHandoverViewModel : BasePageViewModel() {
val fdest = MutableLiveData("") // 目的站
val uldNo = MutableLiveData("") // ULD编号
// ========== 手机版(5.5 寸手持端)专用筛选条件 ==========
// 平板布局不含对应控件,保持空值 → 不会进入请求参数,平板查询行为与改造前完全一致
val handoverState = MutableLiveData("") // 交接状态:"" 全部 / "0" 待交接 / "1" 已交接
/** 手机版状态 Tab 配置 */
val handoverStateTabs = MutableLiveData(
listOf(KeyValue("待交接", "0"), KeyValue("已交接", "1"))
)
/** 手机版状态 Tab 角标(与 [handoverStateTabs] 等长) */
val handoverStateCounts = MutableLiveData(listOf("", ""))
/**
* 是否启用手机版专属数据(Tab 角标计数)。
*
* 由 Activity 在手机形态下置 true。平板端保持 false,
* 因此不会产生任何额外接口请求,平板行为零变化。
*/
private var phoneExtrasEnabled = false
// ========== 统计信息 ==========
val totalCount = MutableLiveData("0") // 合计票数
val totalWeight = MutableLiveData("0") // 总重量
// ========== 全选状态 ==========
val isAllChecked = MutableLiveData(false)
fun onItemCheckChanged() {
updateCheckAllStatus()
}
fun updateCheckAllStatus() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcUldUseBean> ?: return
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
}
/** 已选数量(手机版底部操作条「已选 N 项」) */
val selectedCount = MutableLiveData("0")
/**
* 开启手机版专属数据:默认停留「待交接」Tab、启用 Tab 角标计数。
* 仅由手机形态的 Activity 调用。
*/
fun initPhoneExtras() {
phoneExtrasEnabled = true
handoverState.value = "0"
}
fun onItemCheckChanged() {
updateCheckAllStatus()
}
fun updateCheckAllStatus() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcUldUseBean> ?: return
isAllChecked.value = list.isNotEmpty() && list.all { it.checked.get() }
updateSelectedCount()
}
/** 刷新已选数量 */
private fun updateSelectedCount() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcUldUseBean> ?: return
selectedCount.value = list.count { it.checked.get() }.toString()
}
// ========== 适配器配置 ==========
val itemViewHolder = IntExpOutHandoverViewHolder::class.java
@@ -70,6 +110,7 @@ class IntExpOutHandoverViewModel : BasePageViewModel() {
val shouldCheckAll = !isAllChecked.value!!
list.forEach { it.checked.set(shouldCheckAll) }
isAllChecked.value = shouldCheckAll
updateSelectedCount()
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
}
@@ -198,7 +239,11 @@ class IntExpOutHandoverViewModel : BasePageViewModel() {
"fdate" to flightDate.value?.ifEmpty { null },
"fno" to flightNo.value?.ifEmpty { null },
"fdest" to fdest.value?.ifEmpty { null },
"uld" to uldNo.value?.ifEmpty { null }
"uld" to uldNo.value?.ifEmpty { null },
// 手机版 Tab 维度,平板端保持空值故不参与查询
// 参数名以 api-doc 为准:交接状态为 handoverState(integer,0 未交接 / 1 已交接)。
// 其余筛选与平板端口径一致(fdate/fno/fdest/uld),后端不提供交接人查询入参
"handoverState" to handoverState.value?.ifEmpty { null }
)
// 列表参数 (含分页)
@@ -223,5 +268,33 @@ class IntExpOutHandoverViewModel : BasePageViewModel() {
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
}
}
// 手机版 Tab 角标计数(平板端不触发,无额外请求)
if (phoneExtrasEnabled) {
loadTabCounts(filterParams)
}
}
/**
* 加载「待交接 / 已交接」Tab 角标数量。
*
* 复用统计接口,分别以 handoverState=0 / 1 各查一次,且沿用当前其余筛选条件;
* 角标取 uldNumber(板箱数,与列表 pageQuery 的 total 同口径)。仅手机版调用。
*/
private fun loadTabCounts(filterParams: Map<String, Any?>) {
listOf("0", "1").forEachIndexed { index, state ->
val params = (filterParams + mapOf("handoverState" to state)).toRequestBody()
launchCollect({ NetApply.api.getIntExpOutHandoverTotal(params) }) {
onSuccess = { result ->
val count = (result.data?.uldNumber ?: 0).toString()
val current = handoverStateCounts.value?.toMutableList()
?: mutableListOf("", "")
if (index < current.size) {
current[index] = count
handoverStateCounts.value = current
}
}
}
}
}
}

View File

@@ -38,6 +38,52 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
val totalPc = MutableLiveData("0") // 总件数
val totalWeight = MutableLiveData("0") // 总重量
// ========== 5.5寸手机版专属 ==========
// 筛选弹层显隐
val filterVisible = MutableLiveData(false)
// 筛选弹层与平板端查询参数保持一致(后端确认):航班日期 / 航班号 / 库位 / 清仓结果,运单号走顶部搜索框。
// 代理/特码/目的站/运单类型/业务类型/品名 后端均不支持(内网实测 agentCode/spCode/dest 亦被忽略),已移除
// 三格统计:未清仓 / 已清仓(总票数复用 totalWbNumber),直接取 pageQueryTotal 出参
// notClearNumber / clearNumber(与总票数同一次请求、同条件)
val unclearedCount = MutableLiveData("0")
val clearedCount = MutableLiveData("0")
private var phoneExtrasEnabled = false
/**
* 手机形态专属初始化(Activity 在 DeviceUtil.isPhone() 时调用)。
* 平板端不调用,请求次数与行为零变化。
*/
fun initPhoneExtras() {
phoneExtrasEnabled = true
}
/** 筛选按钮点击 - 打开筛选面板 */
fun filterClick() {
filterVisible.value = true
}
/** 关闭筛选面板 */
fun closeFilter() {
filterVisible.value = false
}
/** 重置筛选条件 */
fun resetFilter() {
flightDate.value = ""
flightNo.value = ""
location.value = ""
clearResult.value = ""
}
/** 确认筛选 - 关闭面板并刷新 */
fun confirmFilter() {
filterVisible.value = false
refresh()
}
// ========== 全选状态 ==========
val isAllChecked = MutableLiveData(false)
@@ -319,7 +365,7 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
* 获取数据 (重写BasePageViewModel)
*/
override fun getData() {
// 构建搜索条件
// 构建搜索条件(与平板端一致)
val filterParams = mapOf(
"fdate" to flightDate.value?.ifEmpty { null },
"fno" to flightNo.value?.ifEmpty { null },
@@ -355,6 +401,9 @@ class IntExpStorageUseViewModel : BasePageViewModel() {
totalWbNumber.value = (data?.wbNumber ?: 0).toString()
totalPc.value = (data?.totalPc ?: 0).toString()
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
// 手机三格统计分项(平板布局不绑定,无影响)
unclearedCount.value = (data?.notClearNumber ?: 0).toString()
clearedCount.value = (data?.clearNumber ?: 0).toString()
}
}
}

View File

@@ -1,82 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.lukouguoji.gjc">
<application>
<activity
android:name=".activity.GjcGoodsAddActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<activity
android:name=".activity.GjcGoodsManifestActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<activity
android:name=".activity.GjcUnLoadListActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<activity
android:name=".activity.GjcBoxAssembleAddActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<activity
android:name=".activity.GjcGoodsListActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<activity
android:name=".activity.GjcYiKuListActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<activity
android:name=".activity.GjcQueryInfoActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<activity
android:name=".activity.GjcQueryListActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<activity
android:name=".activity.GjcWareHouseInfoActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<activity
android:name=".activity.GjcWareHouseActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<activity
android:name=".activity.GjcFuBangActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<activity
android:name=".activity.GjcStartReceiveActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<activity
android:name=".activity.GjcReceiveListActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="true"
android:screenOrientation="userLandscape" />
<activity
android:name=".activity.BoxAssembleActivity"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="userLandscape" />
</application>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.lukouguoji.gjc">
<application>
<activity
android:name=".activity.GjcGoodsAddActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="unspecified" />
<activity
android:name=".activity.GjcGoodsManifestActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="unspecified" />
<activity
android:name=".activity.GjcUnLoadListActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="unspecified" />
<activity
android:name=".activity.GjcBoxAssembleAddActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="unspecified" />
<activity
android:name=".activity.GjcGoodsListActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="unspecified" />
<activity
android:name=".activity.GjcYiKuListActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="unspecified" />
<activity
android:name=".activity.GjcQueryInfoActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="unspecified" />
<activity
android:name=".activity.GjcQueryListActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="unspecified" />
<activity
android:name=".activity.GjcWareHouseInfoActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="unspecified" />
<activity
android:name=".activity.GjcWareHouseActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="unspecified" />
<activity
android:name=".activity.GjcFuBangActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="unspecified" />
<activity
android:name=".activity.GjcStartReceiveActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="unspecified" />
<activity
android:name=".activity.GjcReceiveListActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="unspecified" />
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="true"
android:screenOrientation="unspecified" />
<activity
android:name=".activity.BoxAssembleActivity"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="unspecified" />
</application>
</manifest>

View File

@@ -0,0 +1,257 @@
<?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="android.view.View" />
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcQueryViewModel" />
</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" />
<!-- 内容区域(FrameLayout 包裹,筛选面板和遮罩只在此区域内) -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<!-- 原有内容 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<!-- 搜索区域 -->
<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="0.7"
hint='@{"请选择日期类型"}'
list="@{viewModel.dateStateList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.dateState}" />
<!-- 航班日期起 -->
<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.flightDateStart}" />
<!-- 航班日期止 -->
<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.flightDateEnd}" />
<!-- 代理人 -->
<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.agentList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.agentId}" />
<!-- 航班号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:id="@+id/flight_no_search"
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/img_scan}"
setOnIconClickListener="@{()-> viewModel.waybillScanClick()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.waybillNo}"
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntExpSearch/queryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}" />
<!-- 搜索和筛选按钮 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:paddingHorizontal="24dp">
<!-- 搜索按钮 -->
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
<!-- 筛选按钮(含红点) -->
<FrameLayout
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginLeft="16dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:onClick="@{()-> viewModel.filterClick()}"
android:padding="5dp"
android:src="@drawable/img_filter" />
<View
android:layout_width="8dp"
android:layout_height="8dp"
android:layout_gravity="top|end"
android:background="@drawable/bg_red_dot"
android:visibility="@{viewModel.hasFilter ? View.VISIBLE : View.GONE}" />
</FrameLayout>
</LinearLayout>
</LinearLayout>
<!-- 列表区域 -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_gjc_query" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- 底部统计信息 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:gravity="center_vertical"
android:paddingHorizontal="15dp">
<!-- 统计信息 -->
<LinearLayout
android:layout_width="wrap_content"
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='@{`合计:` + viewModel.totalCount + `票`}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="16sp"
android:textStyle="bold"
tools:text="合计:3票" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{`总件数:` + viewModel.totalPc}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="16sp"
android:textStyle="bold"
tools:text="总件数:100" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{`总重量:` + viewModel.totalWeight}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="16sp"
android:textStyle="bold"
tools:text="总重量:100" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{`航班航次:` + viewModel.totalFlightNumber}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="16sp"
android:textStyle="bold"
tools:text="航班航次:2" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- 遮罩层(只覆盖内容区域) -->
<View
android:id="@+id/filter_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#80000000"
android:clickable="true"
android:focusable="true"
android:onClick="@{()-> viewModel.closeFilter()}"
android:visibility="gone" />
<!-- 筛选面板(从右侧滑入,只在内容区域内) -->
<include
android:id="@+id/filter_panel"
layout="@layout/layout_gjc_query_filter"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end"
android:visibility="gone"
app:viewModel="@{viewModel}" />
</FrameLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,125 @@
<?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="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcQueryDetailsViewModel" />
</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" />
<!-- Tab栏 (自定义,文字Tab + 底线) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginHorizontal="15dp"
android:layout_marginTop="15dp"
android:background="@drawable/bg_white_radius_top_8"
android:orientation="horizontal">
<!-- Tab1: 运单信息 -->
<LinearLayout
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:onClick="@{()->viewModel.onTabClick(0)}"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="运单信息"
android:textStyle="bold"
android:textColor="@{viewModel.currentTab == 0 ? @color/colorPrimary : @color/text_gray}"
android:textSize="16sp" />
<!-- 选中底线 -->
<View
android:layout_width="60dp"
android:layout_height="3dp"
android:background="@{viewModel.currentTab == 0 ? @color/colorPrimary : @color/transparent}"
android:visibility="@{viewModel.currentTab == 0 ? View.VISIBLE : View.INVISIBLE}" />
</LinearLayout>
<!-- Tab2: 仓库信息 -->
<LinearLayout
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:onClick="@{()->viewModel.onTabClick(1)}"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:textStyle="bold"
android:text="仓库信息"
android:textColor="@{viewModel.currentTab == 1 ? @color/colorPrimary : @color/text_gray}"
android:textSize="16sp" />
<View
android:layout_width="60dp"
android:layout_height="3dp"
android:background="@{viewModel.currentTab == 1 ? @color/colorPrimary : @color/transparent}"
android:visibility="@{viewModel.currentTab == 1 ? View.VISIBLE : View.INVISIBLE}" />
</LinearLayout>
<!-- Tab3: 库位信息 -->
<LinearLayout
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:onClick="@{()->viewModel.onTabClick(2)}"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:textStyle="bold"
android:text="库位信息"
android:textColor="@{viewModel.currentTab == 2 ? @color/colorPrimary : @color/text_gray}"
android:textSize="16sp" />
<View
android:layout_width="60dp"
android:layout_height="3dp"
android:background="@{viewModel.currentTab == 2 ? @color/colorPrimary : @color/transparent}"
android:visibility="@{viewModel.currentTab == 2 ? View.VISIBLE : View.INVISIBLE}" />
</LinearLayout>
</LinearLayout>
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="15dp"
android:layout_marginEnd="23dp"
android:background="@color/color_f2" />
<!-- ViewPager2 -->
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/vp"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
</layout>

View File

@@ -0,0 +1,227 @@
<?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.GjcWeighingViewModel" />
<!-- 平板端不使用,仅为与手机变体(layout/activity_gjc_weighing_list.xml)保持变量一致 -->
<variable
name="activity"
type="com.lukouguoji.gjc.activity.GjcWeighingListActivity" />
</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
hint='@{"请选择航班日期"}'
icon="@{@drawable/img_date}"
type="@{SearchLayoutType.DATE}"
value="@={viewModel.flightDate}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 航班号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入航班号"}'
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.flightNo}"
setUpperCaseAlphanumeric="@{true}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 择代理 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择代理"}'
list="@{viewModel.agentList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.agentCode}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 择特码 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择特码"}'
list="@{viewModel.spCodeList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.spCode}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 运单号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入运单号"}'
icon="@{@drawable/img_scan}"
setOnIconClickListener="@{()-> viewModel.waybillNoScanClick()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.waybillNo}"
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntExpCheckIn/queryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 搜索和添加按钮 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:paddingHorizontal="24dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
<!-- 添加按钮 -->
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginLeft="16dp"
android:onClick="@{()-> viewModel.addClick()}"
android:src="@drawable/img_add" />
</LinearLayout>
</LinearLayout>
<!-- 列表 -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_gjc_weighing" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- 底部统计和按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:gravity="center_vertical"
android:paddingHorizontal="15dp">
<!-- 全选按钮 (图标+文字) -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:onClick="@{()-> viewModel.checkAllClick()}">
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="全选"
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp" />
</LinearLayout>
<!-- 统计信息 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="20dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{"合计:"+viewModel.totalCount+"票"}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="合计:1票" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{"总件数:"+viewModel.totalPc}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="总件数:100" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{"总重量:"+viewModel.totalWeight}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="总重量:100" />
</LinearLayout>
<!-- 提前运抵按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.arrivedAhead()}"
android:text="提前运抵" />
<!-- 计重记录按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.recordClick()}"
android:text="计重记录" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,279 @@
<?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="android.view.View" />
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcWeighingRecordDetailsViewModel" />
<!-- 以下两个变量平板端不使用,仅为与手机变体(layout/activity_gjc_weighing_record_details.xml)保持变量一致 -->
<variable
name="activity"
type="com.lukouguoji.gjc.activity.GjcWeighingRecordDetailsActivity" />
<variable
name="editRecord"
type="com.lukouguoji.module_base.bean.GjcCheckInRecord" />
</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_margin="15dp"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="15dp"
android:layout_marginVertical="8dp"
android:text="运单信息"
android:textColor="@color/color_33"
android:textSize="17sp"
android:textStyle="bold" />
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:layout_height="1dp" />
<!-- 第一部分:运单信息区域 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="15dp">
<!-- 运单号 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单号:"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.waybillNo}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
</LinearLayout>
<!-- 预配件数 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="预配件数:"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.prePc}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
</LinearLayout>
<!-- 预配重量 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="预配重量:"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.preWeight}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
</LinearLayout>
<!-- 品名(中) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="品名(中):"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.goodsName}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginHorizontal="15dp"
android:layout_marginBottom="15dp"
android:layout_weight="1"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="15dp"
android:layout_marginVertical="8dp"
android:text="称重信息"
android:textColor="@color/color_33"
android:textSize="17sp"
android:textStyle="bold" />
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:background="#e7e7e7"
android:layout_height="1px" />
<!-- 第二部分:计重记录列表 -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:listitem="@layout/item_gjc_check_in_record" />
</LinearLayout>
<!-- 取消+保存按钮组(编辑模式,居中) -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="15dp"
android:layout_marginBottom="15dp"
android:orientation="horizontal"
android:visibility="@{viewModel.isEditMode ? View.VISIBLE : View.GONE}">
<!-- 取消按钮 -->
<TextView
android:id="@+id/btnCancel"
style="@style/tv_bottom_btn"
android:layout_marginEnd="10dp"
android:onClick="@{() -> viewModel.onCancelClick()}"
android:text="取消" />
<!-- 保存按钮 -->
<TextView
android:id="@+id/btnSave"
style="@style/tv_bottom_btn"
android:onClick="@{() -> viewModel.onSaveClick()}"
android:text="保存" />
</LinearLayout>
<!-- 第三部分:底部统计与按钮区域 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="64dp"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="15dp">
<!-- 统计信息(左侧) -->
<LinearLayout
android:id="@+id/statsLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- 总件数 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{`总件数:` + viewModel.totalPc}"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<!-- 总重量 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:text="@{`总重量:` + viewModel.totalWeight}"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<!-- 重量误差(红色) -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:text="@{`重量误差:` + viewModel.weightError}"
android:textColor="@color/text_red"
android:textSize="16sp" />
</LinearLayout>
<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 修改按钮(只读模式,右侧) -->
<TextView
android:id="@+id/btnModify"
style="@style/tv_bottom_btn"
android:onClick="@{() -> viewModel.onModifyClick()}"
android:text="修改"
android:visibility="@{viewModel.isEditMode ? View.GONE : View.VISIBLE}" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,188 @@
<?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.GjcWeighingRecordViewModel" />
<!-- 平板端不使用,仅为与手机变体(layout/activity_gjc_weighing_record_list.xml)保持变量一致 -->
<variable
name="activity"
type="com.lukouguoji.gjc.activity.GjcWeighingRecordListActivity" />
</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}"
setUpperCaseAlphanumeric="@{true}" />
<!-- 择代理 -->
<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.agentList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.agentCode}" />
<!-- 择特码 -->
<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.spCodeList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.spCode}" />
<!-- 运单号 -->
<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}"
setOnIconClickListener="@{()-> viewModel.waybillNoScanClick()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.waybillNo}"
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntExpCheckIn/checked/queryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}" />
<!-- 搜索按钮 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:paddingHorizontal="24dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
</LinearLayout>
</LinearLayout>
<!-- 列表 -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_gjc_weighing_record" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- 底部统计和按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:gravity="center_vertical"
android:paddingHorizontal="15dp">
<!-- 统计信息 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{"合计:"+viewModel.totalCount+"票"}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="合计:1票" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{"总件数:"+viewModel.totalPc}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="总件数:100" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{"总重量:"+viewModel.totalWeight}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="总重量:100" />
</LinearLayout>
<!-- 运抵申报按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.declareClick()}"
android:text="运抵申报" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,527 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcWeighingStartViewModel" />
</data>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_f2">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<!-- 主内容区域 -->
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="15dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
android:padding="8dp">
<!-- 第一部分:前2行表单(左侧2列)+ 地磅称重(右侧) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- 左侧:前2行表单(2列) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:orientation="vertical">
<!-- 第1行:运单号、通道号 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入运单号"}'
required="@{true}"
setRefreshCallBack="@{viewModel::onWaybillNoInputComplete}"
title='@{"运单号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.maWbBean.wbNo}'
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntExpCheckIn/queryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择通道号"}'
list="@{viewModel.channelList}"
required="@{true}"
title='@{"通 道 号"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.channel}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第2行:代理人、特码 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择代理人"}'
list="@{viewModel.agentList}"
title='@{"代 理 人"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.maWbBean.agentCode}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择特码"}'
list="@{viewModel.spCodeList}"
title='@{"特 码"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.maWbBean.spCode}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<!-- 右侧:地磅称重区域 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="15dp"
android:layout_weight="1"
android:orientation="vertical">
<!-- 黄色标题栏 -->
<TextView
android:layout_width="match_parent"
android:layout_height="36dp"
android:background="@drawable/bg_shouyun_dbcz"
android:gravity="center"
android:text="地磅称重"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold" />
<!-- 青色重量显示区域 -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_shouyun_dbzl"
android:minHeight="60dp">
<EditText
android:id="@+id/etWeight"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="@null"
android:gravity="center"
android:hint="0"
android:inputType="numberDecimal"
android:text="@={viewModel.diBangWeight}"
android:textColor="@color/text_red"
android:textColorHint="@color/text_red"
android:textSize="45sp"
android:textStyle="bold"
tools:text="1655" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@id/etWeight"
android:layout_marginStart="8dp"
android:layout_toEndOf="@id/etWeight"
android:text="kg"
android:textColor="@color/text_red"
android:textSize="24sp"
android:textStyle="bold" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<!-- 第3行:航班日期、航班号、航程 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择航班日期"}'
title='@{"航班日期"}'
titleLength="@{5}"
type="@{DataLayoutType.DATE}"
value='@={viewModel.flightDate}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入航班号"}'
title='@{"航 班 号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.maWbBean.fno}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入航程"}'
title='@{"航 程"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.maWbBean.range}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第4行:预配件数、预配重量、预配体积(只读) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"预配件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.maWbBean.pc)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"预配重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.maWbBean.weight)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"预配体积"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.maWbBean.volume)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第5行:实时件数、实时重量、实时体积 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
hint='@{"请输入实时件数"}'
title='@{"实时件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.realTimePc}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
hint='@{"请输入实时重量"}'
title='@{"实时重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.realTimeWeight}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
hint='@{"请输入实时体积"}'
title='@{"实时体积"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.realTimeVolume}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第6行:运抵件数、运抵重量、运抵体积 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入运抵件数"}'
required="@{true}"
title='@{"运抵件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.arrivePc}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入运抵重量"}'
required="@{true}"
title='@{"运抵重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.arriveWeight}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入运抵体积"}'
title='@{"运抵体积"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.arriveVolume}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第7行:托盘数量、托盘自重(用于自动计算运抵重量)、业务类型 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入托盘数量"}'
inputType="@{android.text.InputType.TYPE_CLASS_NUMBER}"
title='@{"托盘数量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.trayNumber}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入托盘自重"}'
inputType="@{android.text.InputType.TYPE_CLASS_NUMBER | android.text.InputType.TYPE_NUMBER_FLAG_DECIMAL}"
title='@{"托盘自重"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.trayWeight}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择业务类型"}'
list="@{viewModel.businessTypeList}"
title='@{"业务类型"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.maWbBean.businessType}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第8行:平板车、平板车自重、备注 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入平板车号"}'
setRefreshCallBack="@{viewModel::onCarIdInputComplete}"
title='@{"平 板 车"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.maWbBean.carId}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"平板车自重"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.carWeight}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入备注"}'
title='@{"备 注"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.pageRemark}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<!-- 底部操作栏 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:padding="15dp"
android:paddingTop="15dp">
<TextView
android:layout_width="150dp"
android:layout_height="50dp"
android:layout_marginEnd="30dp"
android:background="@drawable/bg_primary_radius_4"
android:gravity="center"
android:onClick="@{(v)-> viewModel.sortingWeighingClick()}"
android:text="分托计重"
android:textColor="@color/white"
android:textSize="18sp" />
<TextView
android:layout_width="150dp"
android:layout_height="50dp"
android:background="@drawable/bg_primary_radius_4"
android:gravity="center"
android:onClick="@{(v)-> viewModel.completeCheckInClick()}"
android:text="完成计重"
android:textColor="@color/white"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
<!-- 浮动按钮组 -->
<!-- 遮罩层(点击收起) -->
<View
android:id="@+id/maskView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
<!-- 子按钮1 -->
<View
android:id="@+id/subButton1"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_gravity="bottom|end"
android:layout_marginEnd="25dp"
android:layout_marginBottom="70dp"
android:background="@drawable/ic_btn_customs"
android:visibility="gone" />
<!-- 子按钮2 -->
<View
android:id="@+id/subButton2"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_gravity="bottom|end"
android:layout_marginEnd="70dp"
android:layout_marginBottom="25dp"
android:background="@drawable/ic_btn_record"
android:visibility="gone" />
<!-- 主浮动按钮 -->
<ImageView
android:id="@+id/mainFloatButton"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="bottom|end"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/ic_float_button_weighing_start" />
</FrameLayout>
</layout>

View File

@@ -0,0 +1,254 @@
<?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" />
<import type="com.lukouguoji.module_base.R" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.IntExpArriveViewModel" />
<!-- 平板端不使用,仅为与手机变体(layout/activity_int_exp_arrive.xml)保持变量一致 -->
<variable
name="activity"
type="com.lukouguoji.gjc.activity.IntExpArriveActivity" />
</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
hint='@{"请选择航班日期"}'
icon="@{@drawable/img_date}"
type="@{SearchLayoutType.DATE}"
value="@={viewModel.flightDate}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 航班号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入航班号"}'
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.flightNo}"
setUpperCaseAlphanumeric="@{true}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 运单号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入运单号"}'
icon="@{@drawable/img_scan}"
setOnIconClickListener="@{(v)-> viewModel.scanWaybill()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.waybillNo}"
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntExpArrive/queryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 分单号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入分单号"}'
icon="@{@drawable/img_scan}"
setOnIconClickListener="@{(v)-> viewModel.scanHaWb()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.hno}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 运抵状态 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择运抵状态"}'
list="@{viewModel.arrivalStatusList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.arrivalStatus}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 搜索按钮 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:paddingHorizontal="24dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
<!-- 全局展开/收起按钮 -->
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginStart="16dp"
android:onClick="@{()-> viewModel.toggleAllExpand()}"
android:padding="2dp"
android:scaleType="fitCenter"
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand_1 : R.drawable.ic_new_expand_1}"
android:contentDescription="展开/收起全部子列表" />
</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"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
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_arrive" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- 底部统计和操作按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@android:color/white"
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:onClick="@{()-> viewModel.checkAllClick()}"
android:orientation="horizontal">
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="全选"
android:textColor="@color/color_66"
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/bottom_tool_tips_text_color"
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/bottom_tool_tips_text_color"
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/bottom_tool_tips_text_color"
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="15dp"
android:onClick="@{()-> viewModel.resetDeclareClick()}"
android:text="状态重置" />
<TextView
style="@style/tv_bottom_btn"
android:layout_marginLeft="0dp"
android:layout_marginEnd="15dp"
android:onClick="@{()-> viewModel.deleteDeclareClick()}"
android:text="删除申报" />
<TextView
style="@style/tv_bottom_btn"
android:layout_marginLeft="0dp"
android:background="@drawable/bg_red_btn_bottom"
android:onClick="@{()-> viewModel.arriveReportClick()}"
android:text="运抵申报" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</layout>

View 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="android.view.View" />
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.IntExpMoveViewModel" />
<variable
name="activity"
type="com.lukouguoji.gjc.page.move.IntExpMoveActivity" />
</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='@{"请选择运单类型"}'
list="@{viewModel.awbTypeList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.awbType}" />
<!-- 承运人 -->
<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.by1}" />
<!-- 卸货站 -->
<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.dest1}" />
<!-- 移库状态 -->
<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.moveStateList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.moveState}" />
<!-- 运单号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:id="@+id/searchWaybillNo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
hint='@{"请输入运单号"}'
icon="@{@drawable/img_scan}"
setOnIconClickListener="@{(v)-> activity.scanWaybill()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.waybillNo}"
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntExpMove/queryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}" />
<!-- 搜索按钮 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:paddingHorizontal="24dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
</LinearLayout>
</LinearLayout>
<!-- 列表 -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_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_move" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- 底部统计和操作按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:gravity="center_vertical"
android:paddingHorizontal="15dp">
<!-- 全选按钮区域 (图标+文字) -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:onClick="@{()-> viewModel.toggleSelectAll()}">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="全选"
android:textColor="@color/c666666"
android:textSize="16sp" />
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginLeft="5dp"
android:src="@drawable/img_check_all_unchecked" />
</LinearLayout>
<!-- 统计信息 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="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/bottom_tool_tips_text_color"
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/bottom_tool_tips_text_color"
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/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
<!-- 移库按钮 -->
<TextView
android:id="@+id/btnMove"
style="@style/tv_bottom_btn"
android:text="移库"
android:visibility="visible" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,259 @@
<?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="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
<import type="com.lukouguoji.module_base.common.DetailsPageType" />
<import type="android.view.View" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.IntExpMoveEditViewModel" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_f2"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="15dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
android:padding="15dp">
<!-- 第一行:运单号、件数、重量(均只读) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"运单号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.wbNo}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.pc == null ? "" : String.valueOf(viewModel.dataBean.pc)}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.weight == null ? "" : String.valueOf(viewModel.dataBean.weight)}' />
</LinearLayout>
<!-- 第二行:特码、代理人、品名(均只读) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"特码"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.spCode}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"代理人"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.agentCode}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"品名"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.goods}' />
</LinearLayout>
<!-- 第三行:出运路径、运单类型、承运人(均只读,字段名以 /IntExpMove/detail 文档为准) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"出运路径"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.range}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"运单类型"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.awbTypeName}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"承运人"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.by}' />
</LinearLayout>
<!-- 第四行:移交状态(只读)、备注(编辑模式可编辑) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"移交状态"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.moveStateText}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
enable="@{viewModel.pageType != DetailsPageType.Details}"
hint='@{"请输入备注"}'
title='@{"备注"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.remark}' />
</LinearLayout>
<!-- 交接图片区域:label 在左,图片在右 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="交接图片"
android:textColor="@color/text_gray"
completeSpace="@{5}" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_images"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:overScrollMode="never"
itemLayoutId="@{viewModel.imageItemLayoutId}"
viewHolder="@{viewModel.imageItemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="9" />
</LinearLayout>
<!-- 详情模式下无图片时的占位提示 -->
<TextView
android:id="@+id/tv_no_image"
android:layout_width="match_parent"
android:layout_height="60dp"
android:gravity="center"
android:text="暂无图片"
android:textColor="@color/text_gray"
android:textSize="14sp"
android:visibility="@{viewModel.showNoImage ? View.VISIBLE : View.GONE}" />
</LinearLayout>
<!-- 底部按钮(详情模式不显示) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_marginBottom="15dp"
android:gravity="center"
android:orientation="horizontal"
android:visibility="@{viewModel.pageType != DetailsPageType.Details ? View.VISIBLE : View.GONE}">
<TextView
style="@style/tv_bottom_btn"
android:layout_width="120dp"
android:onClick="@{()-> viewModel.cancel()}"
android:text="取消" />
<TextView
style="@style/tv_bottom_btn"
android:layout_width="120dp"
android:onClick="@{()-> viewModel.submit()}"
android:text="保存" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,203 @@
<?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.IntExpOutHandoverViewModel" />
<!-- 平板端不使用,仅为与手机变体 layout/activity_int_exp_out_handover.xml 保持变量一致 -->
<variable
name="activity"
type="com.lukouguoji.gjc.activity.IntExpOutHandoverActivity" />
</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
hint='@{"请选择航班日期"}'
icon="@{@drawable/img_date}"
type="@{SearchLayoutType.DATE}"
value="@={viewModel.flightDate}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 航班号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入航班号"}'
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.flightNo}"
setUpperCaseAlphanumeric="@{true}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 目的站 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入目的站"}'
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.fdest}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- ULD编号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入ULD编号"}'
icon="@{@drawable/img_scan}"
setOnIconClickListener="@{(v)-> viewModel.scanUld()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.uldNo}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 搜索按钮 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:paddingHorizontal="24dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
</LinearLayout>
</LinearLayout>
<!-- 列表 -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="10dp"
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="3"
tools:listitem="@layout/item_int_exp_out_handover" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- 底部统计和操作按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@android:color/white"
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:onClick="@{()-> viewModel.checkAllClick()}"
android:orientation="horizontal">
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="全选"
android:textColor="@color/color_66"
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/bottom_tool_tips_text_color"
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/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
<!-- 允许装机按钮(多选) -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.allowLoadClick()}"
android:text="允许装机" />
<!-- 待配运按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.waitingTransClick()}"
android:text="配运" />
<!-- 交接完成按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.completeHandover()}"
android:text="交接完成" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,253 @@
<?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" />
<import type="com.lukouguoji.gjc.R" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.IntExpStorageUseViewModel" />
<variable
name="activity"
type="com.lukouguoji.gjc.activity.IntExpStorageUseActivity" />
</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
hint='@{"请选择航班日期"}'
icon="@{@drawable/img_date}"
type="@{SearchLayoutType.DATE}"
value="@={viewModel.flightDate}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 航班号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入航班号"}'
setUpperCaseAlphanumeric="@{true}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.flightNo}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 清仓综合结果 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择清仓结果"}'
list="@{viewModel.clearResultList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.clearResult}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 运单号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
autoQueryEnabled="@{true}"
autoQueryMaxLength="@{8}"
autoQueryMinLength="@{4}"
autoQueryParamKey="@{`wbNo`}"
autoQueryTitle="@{`选择运单号`}"
autoQueryUrl="@{`/IntExpStorageUse/queryWbNoList`}"
hint='@{"请输入运单号"}'
icon="@{@drawable/img_scan}"
setOnIconClickListener="@{(v)-> viewModel.scanWbNo()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.wbNo}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 库位号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入库位号"}'
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.location}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 搜索按钮 -->
<LinearLayout
android:layout_width="200dp"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="10dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
<!-- 全局展开/收起按钮 -->
<ImageView
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand_1 : R.drawable.ic_new_expand_1}"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginStart="16dp"
android:contentDescription="展开/收起全部子列表"
android:onClick="@{()-> viewModel.toggleAllExpand()}"
android:padding="2dp"
android:scaleType="fitCenter" />
</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"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
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_storage_use" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- 底部统计和操作按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@android:color/white"
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:onClick="@{()-> viewModel.checkAllClick()}"
android:orientation="horizontal">
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="全选"
android:textColor="@color/color_66"
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.totalWbNumber+"票"}'
android:textColor="@color/bottom_tool_tips_text_color"
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/bottom_tool_tips_text_color"
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/bottom_tool_tips_text_color"
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:onClick="@{()-> activity.showClearDialog()}"
android:text="清 仓" />
<!-- 修改库位按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> activity.showModifyStorageDialog()}"
android:text="修改库位" />
<!-- 出库按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> activity.showOutStorageDialog()}"
android:text="出 库" />
<!-- 入库按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> activity.showInStorageDialog()}"
android:text="入 库" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType"/>
<variable
name="model"
type="com.lukouguoji.gjc.dialog.IntExpArriveDeleteDialogModel" />
</data>
<LinearLayout
android:layout_width="480dp"
android:layout_height="wrap_content"
android:background="@drawable/bg_dialog_f2_radius_10"
android:gravity="center_horizontal"
android:orientation="vertical">
<!-- 标题栏 -->
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/bg_primary_radius_top_10"
android:gravity="center"
android:text="删除原因"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
<!-- 表单内容 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="30dp"
android:layout_marginTop="30dp"
android:orientation="vertical">
<!-- 变更原因 -->
<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"
completeSpace="@{6}"
android:text="变更原因:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
type="@{SearchLayoutType.SPINNER}"
list="@{model.changeReasonList}"
value="@={model.changeReason}" />
</LinearLayout>
<!-- 联系人姓名 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{6}"
android:text="联系人姓名:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
<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="@={model.contactName}" />
</LinearLayout>
<!-- 联系人电话 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{6}"
android:text="联系人电话:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
<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="@={model.contactPhone}" />
</LinearLayout>
</LinearLayout>
<!-- 底部按钮 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginBottom="20dp">
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.dismiss()}"
android:text="取消" />
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.onConfirmClick()}"
android:text="确定" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType"/>
<variable
name="model"
type="com.lukouguoji.gjc.dialog.IntExpArriveResetDialogModel" />
</data>
<LinearLayout
android:layout_width="480dp"
android:layout_height="wrap_content"
android:background="@drawable/bg_dialog_f2_radius_10"
android:gravity="center_horizontal"
android:orientation="vertical">
<!-- 标题栏 -->
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/bg_primary_radius_top_10"
android:gravity="center"
android:text="状态重置"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
<!-- 表单内容 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="30dp"
android:layout_marginTop="30dp"
android:orientation="vertical">
<!-- 重置状态 -->
<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"
completeSpace="@{5}"
android:text="重置状态:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
type="@{SearchLayoutType.SPINNER}"
hint='@{"请选择重置状态"}'
list="@{model.resetStatusList}"
value="@={model.selectedResetStatus}" />
</LinearLayout>
</LinearLayout>
<!-- 底部按钮 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginBottom="20dp">
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.dismiss()}"
android:text="取消" />
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.onSaveClick()}"
android:text="确定" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,141 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType"/>
<variable
name="model"
type="com.lukouguoji.gjc.dialog.IntExpInStorageDialogModel" />
</data>
<LinearLayout
android:layout_width="480dp"
android:layout_height="wrap_content"
android:background="@drawable/bg_dialog_f2_radius_10"
android:gravity="center_horizontal"
android:orientation="vertical">
<!-- 标题栏 -->
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/bg_primary_radius_top_10"
android:gravity="center"
android:text="入库操作"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
<!-- 表单内容 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="30dp"
android:layout_marginTop="30dp"
android:orientation="vertical">
<!-- 库位号 -->
<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"
completeSpace="@{5}"
android:text="库位号:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
type="@{SearchLayoutType.SPINNER}"
hint='@{"请选择库位"}'
list="@{model.locationList}"
value="@={model.selectedLocationCode}" />
</LinearLayout>
<!-- 件数 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
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" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:id="@+id/pc_input"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
type="@{SearchLayoutType.INPUT}"
hint='@{"请输入件数"}'
value="@={model.pc}" />
</LinearLayout>
<!-- 重量 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
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" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:id="@+id/weight_input"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
type="@{SearchLayoutType.INPUT}"
hint='@{"请输入重量"}'
value="@={model.weight}" />
</LinearLayout>
</LinearLayout>
<!-- 底部按钮 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginBottom="20dp">
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.dismiss()}"
android:text="取消" />
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.onSaveClick()}"
android:text="确定" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType"/>
<variable
name="model"
type="com.lukouguoji.gjc.dialog.IntExpModifyStorageDialogModel" />
</data>
<LinearLayout
android:layout_width="480dp"
android:layout_height="wrap_content"
android:background="@drawable/bg_dialog_f2_radius_10"
android:gravity="center_horizontal"
android:orientation="vertical">
<!-- 标题栏 -->
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/bg_primary_radius_top_10"
android:gravity="center"
android:text="库位信息"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
<!-- 表单内容 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="30dp"
android:layout_marginTop="30dp"
android:orientation="vertical">
<!-- 库位号 -->
<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"
completeSpace="@{5}"
android:text="库位号:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
type="@{SearchLayoutType.SPINNER}"
hint='@{"请选择库位"}'
list="@{model.locationList}"
value="@={model.selectedLocationCode}" />
</LinearLayout>
</LinearLayout>
<!-- 底部按钮 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginBottom="20dp">
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.dismiss()}"
android:text="取消" />
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.onSaveClick()}"
android:text="确定" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType"/>
<variable
name="model"
type="com.lukouguoji.gjc.dialog.IntExpMoveClearDialogModel" />
</data>
<LinearLayout
android:layout_width="480dp"
android:layout_height="wrap_content"
android:background="@drawable/bg_dialog_f2_radius_10"
android:gravity="center_horizontal"
android:orientation="vertical">
<!-- 标题栏 -->
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/bg_primary_radius_top_10"
android:gravity="center"
android:text="清仓操作"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
<!-- 表单内容 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="30dp"
android:layout_marginTop="30dp"
android:orientation="vertical">
<!-- 清仓正常 -->
<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"
completeSpace="@{5}"
android:text="清仓正常:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
type="@{SearchLayoutType.SPINNER}"
list="@{model.clearNormalList}"
value="@={model.clearNormal}" />
</LinearLayout>
<!-- 备注 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
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" />
<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="@={model.clearRemark}" />
</LinearLayout>
</LinearLayout>
<!-- 底部按钮 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginBottom="20dp">
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.dismiss()}"
android:text="取消" />
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.onSaveClick()}"
android:text="确定" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType"/>
<variable
name="model"
type="com.lukouguoji.gjc.dialog.IntExpOutStorageDialogModel" />
</data>
<LinearLayout
android:layout_width="480dp"
android:layout_height="wrap_content"
android:background="@drawable/bg_dialog_f2_radius_10"
android:gravity="center_horizontal"
android:orientation="vertical">
<!-- 标题栏 -->
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/bg_primary_radius_top_10"
android:gravity="center"
android:text="出库操作"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
<!-- 表单内容 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="30dp"
android:layout_marginTop="30dp"
android:orientation="vertical">
<!-- 提示 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{model.tip}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
<!-- 件数 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
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" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:id="@+id/pc_input"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
type="@{SearchLayoutType.INPUT}"
hint='@{"请输入件数"}'
value="@={model.pc}" />
</LinearLayout>
<!-- 重量 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
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" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:id="@+id/weight_input"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
type="@{SearchLayoutType.INPUT}"
hint='@{"请输入重量"}'
value="@={model.weight}" />
</LinearLayout>
</LinearLayout>
<!-- 底部按钮 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginBottom="20dp">
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.dismiss()}"
android:text="取消" />
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.onSaveClick()}"
android:text="确定" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType"/>
<variable
name="model"
type="com.lukouguoji.gjc.dialog.IntExpOutWaitingTransDialogModel" />
</data>
<LinearLayout
android:layout_width="480dp"
android:layout_height="wrap_content"
android:background="@drawable/bg_dialog_f2_radius_10"
android:gravity="center_horizontal"
android:orientation="vertical">
<!-- 标题栏 -->
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/bg_primary_radius_top_10"
android:gravity="center"
android:text="待配运操作"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
<!-- 表单内容 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="30dp"
android:layout_marginTop="30dp"
android:orientation="vertical">
<!-- 库位号 -->
<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"
completeSpace="@{5}"
android:text="库位号:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
type="@{SearchLayoutType.SPINNER}"
hint='@{"请选择库位"}'
list="@{model.locationList}"
value="@={model.selectedLocationCode}" />
</LinearLayout>
</LinearLayout>
<!-- 底部按钮 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginBottom="20dp">
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.dismiss()}"
android:text="取消" />
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.onSaveClick()}"
android:text="确定" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,137 @@
<?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" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingHorizontal="15dp"
android:paddingBottom="15dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_white_radius_bottom_8"
android:orientation="vertical">
<!-- tab 与表头分割线 -->
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/line" />
<!-- 表头 (白色背景) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/white"
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/black"
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/black"
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/black"
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/black"
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/black"
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/black"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<!-- 表头与内容分割线 -->
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/line" />
<!-- 数据列表 -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_storage_list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:nestedScrollingEnabled="true"
android:overScrollMode="never"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<!-- 暂无数据提示 (数据为空时显示) -->
<LinearLayout
android:id="@+id/ll_empty"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="暂无数据"
android:textColor="@color/text_gray"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,157 @@
<?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" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingHorizontal="15dp"
android:paddingBottom="15dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_white_radius_bottom_8"
android:orientation="vertical">
<!-- tab 与表头分割线 -->
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/line" />
<!-- 表头 (白色背景) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/white"
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/black"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center"
android:text="集装器"
android:textColor="@color/black"
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/black"
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/black"
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/black"
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/black"
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/black"
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/black"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<!-- 表头与内容分割线 -->
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/line" />
<!-- 数据列表 -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_warehouse_list"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:nestedScrollingEnabled="true"
android:overScrollMode="never"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<!-- 暂无数据提示 (数据为空时显示) -->
<LinearLayout
android:id="@+id/ll_empty"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="暂无数据"
android:textColor="@color/text_gray"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,319 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
<import type="android.view.View" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcQueryDetailsViewModel" />
</data>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_f2"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="15dp"
android:paddingBottom="15dp">
<!-- 运单信息卡片 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_bottom_8"
android:orientation="vertical"
android:padding="15dp">
<!-- 第1行: 运单号、代理人、特码 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"运单号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{(String)viewModel.maWbData.get("wbNo")}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"代理人"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{(String)viewModel.maWbData.get("agentCode")}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"特码"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{(String)viewModel.maWbData.get("spCode")}' />
</LinearLayout>
<!-- 第2行: 运单件数、运单重量、体积 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"运单件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.maWbData.get("pc") != null ? String.valueOf((int)Math.round(((Double)viewModel.maWbData.get("pc")))) : ``}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"运单重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.maWbData.get("weight") != null ? String.valueOf(viewModel.maWbData.get("weight")) : ``}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"体积"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.maWbData.get("volume") != null ? String.valueOf(viewModel.maWbData.get("volume")) : ``}' />
</LinearLayout>
<!-- 第3行: 包装类型、运单类型、业务类型 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"包装类型"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{(String)viewModel.maWbData.get("packageType")}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"运单类型"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{(String)viewModel.maWbData.get("awbName")}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"业务类型"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{(String)viewModel.maWbData.get("businessName")}' />
</LinearLayout>
<!-- 第4行: 品名(英) - 占整行 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="match_parent"
android:layout_height="wrap_content"
enable="@{false}"
title='@{"品名(英)"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{(String)viewModel.maWbData.get("goods")}' />
</LinearLayout>
<!-- 第5行: 品名(中) - 占整行 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="match_parent"
android:layout_height="wrap_content"
enable="@{false}"
title='@{"品名(中)"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{(String)viewModel.maWbData.get("goodsCn")}' />
</LinearLayout>
<!-- 第6行: 海关指令、预配舱单、运抵报告 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"海关指令"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{(String)viewModel.maWbData.get("customsCommand")}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"预配舱单"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{(String)viewModel.maWbData.get("mftStatus")}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"运抵报告"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{(String)viewModel.maWbData.get("arrivalStatus")}' />
</LinearLayout>
<!-- 第7行: 装载舱单、理货报告、入库时间 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"装载舱单"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{(String)viewModel.maWbData.get("loadStatus")}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"理货报告"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{(String)viewModel.maWbData.get("tallyStatus")}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"入库时间"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{(String)viewModel.maWbData.get("opDate")}' />
</LinearLayout>
<!-- 第8行: 省直辖市、地级市、行政区 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"省直辖市"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{(String)viewModel.maWbData.get("proName")}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"地级市"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{(String)viewModel.maWbData.get("cityName")}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"行政区"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{(String)viewModel.maWbData.get("areaName")}' />
</LinearLayout>
<!-- 第9行: 备注 - 多行输入 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
enable="@{false}"
inputHeight="@{80}"
title='@{"备注"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{(String)viewModel.maWbData.get("remark")}' />
</LinearLayout>
</LinearLayout>
</ScrollView>
</layout>

View File

@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="android.view.View" />
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
<variable
name="record"
type="com.lukouguoji.module_base.bean.GjcCheckInRecord" />
<variable
name="isEditMode"
type="Boolean" />
<variable
name="position"
type="Integer" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingVertical="8dp"
android:paddingHorizontal="15dp">
<!-- 绿色圆圈序号 -->
<TextView
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/bg_circle_green"
android:gravity="center"
android:text="@{String.valueOf(position + 1)}"
android:textColor="@color/c666666"
android:textSize="16sp" />
<!-- 件数字段 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
enable="@{isEditMode}"
hint="@{`件数`}"
inputType="@{android.text.InputType.TYPE_CLASS_NUMBER}"
title="@{`件数`}"
titleLength="@{2}"
type="@{DataLayoutType.INPUT}"
value="@={record.pcStr}" />
<!-- 重量字段 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
enable="@{isEditMode}"
hint="@{`重量`}"
inputType="@{android.text.InputType.TYPE_CLASS_NUMBER | android.text.InputType.TYPE_NUMBER_FLAG_DECIMAL}"
title="@{`重量`}"
titleLength="@{2}"
type="@{DataLayoutType.INPUT}"
value="@={record.weightStr}" />
<!-- 托盘自重字段(取托盘重量 trayTotalWeight,可编辑) -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
enable="@{isEditMode}"
hint="@{`托盘自重`}"
inputType="@{android.text.InputType.TYPE_CLASS_NUMBER | android.text.InputType.TYPE_NUMBER_FLAG_DECIMAL}"
title="@{`托盘自重`}"
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value="@={record.trayTotalWeightStr}" />
<!-- 计重时间字段(只读) -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1.5"
enable="@{false}"
title="@{`计重时间`}"
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
value="@{record.opDate}" />
</LinearLayout>
</layout>

View File

@@ -0,0 +1,339 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="bean"
type="com.lukouguoji.module_base.bean.GjcMaWb" />
</data>
<com.mcxtzhang.swipemenulib.SwipeMenuLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- 主内容区 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_white_radius_8"
android:orientation="horizontal"
android:paddingVertical="20dp"
android:paddingHorizontal="10dp">
<!-- 左侧图标 -->
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:src="@drawable/img_plane"
android:layout_marginTop="0.5px" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginLeft="15dp"
android:orientation="vertical">
<!-- 第一行数据:运单号、件数、重量、代理人、入库时间 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- 运单号 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.1"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="运单号:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary"
android:textSize="15sp"
tools:text="78109081212"
android:textStyle="bold" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 件数 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="件数:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.pc)}'
android:textSize="15sp"
tools:text="10"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 重量 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{3}"
android:text="重量:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.weight)}'
android:textSize="15sp"
tools:text="200"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 代理人 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="代理人:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.agentName ?? bean.agentCode}'
android:textSize="15sp"
tools:text="SF"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 入库时间 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="入库时间:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.opDate ?? ""}'
android:textSize="15sp"
tools:text="2024-05-13 17:10:22"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 第二行数据:航班、目的港、特码、运单类型、离港时间 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp">
<!-- 航班 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.1"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="航班:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.flight}"
android:textSize="15sp"
tools:text="20240513/MU2026"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 目的港 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="目的港:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.dest}"
android:textSize="15sp"
tools:text="PEK"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 特码 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{3}"
android:text="特码:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.spCode}"
android:textSize="15sp"
tools:text="NOR"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 运单类型 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="运单类型:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.awbName ?? bean.awbType}'
android:textSize="15sp"
tools:text="国际出港(直航)"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 离港时间 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center_vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="离港时间:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.fclose ?? ""}'
android:textSize="15sp"
tools:text="2024-05-13 17:10:22"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</LinearLayout>
<!-- 右侧箭头 -->
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:src="@drawable/img_pda_right"
android:layout_marginLeft="10dp" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 侧滑菜单区 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="match_parent">
<TextView
android:id="@+id/btnEdit"
style="@style/tv_item_action"
android:background="@color/colorPrimary"
android:text="修改" />
</androidx.appcompat.widget.LinearLayoutCompat>
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
</layout>

View File

@@ -0,0 +1,99 @@
<?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.GjcStorageUse" />
<variable
name="position"
type="Integer" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:minHeight="40dp"
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.location ?? `--`}"
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.inOpId ?? `--`}"
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.inDate != null &amp;&amp; String.valueOf(bean.inDate).length() >= 16 ? String.valueOf(bean.inDate).substring(0, 16) : (bean.inDate != null &amp;&amp; String.valueOf(bean.inDate).length() > 0 ? String.valueOf(bean.inDate) : `--`)}"
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.outOpId ?? `--`}"
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.outDate != null &amp;&amp; String.valueOf(bean.outDate).length() >= 16 ? String.valueOf(bean.outDate).substring(0, 16) : (bean.outDate != null &amp;&amp; String.valueOf(bean.outDate).length() > 0 ? String.valueOf(bean.outDate) : `--`)}"
android:textColor="@color/text_normal"
android:textSize="14sp" />
</LinearLayout>
<!-- 内容分割线 -->
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/sub_list_divider" />
</LinearLayout>
</layout>

View File

@@ -0,0 +1,119 @@
<?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:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:minHeight="40dp"
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.2"
android:gravity="center"
android:text="@{bean.location}"
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.fdate}"
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.fno}"
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="@{bean.range}"
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="@{`1`}"
android:textColor="@color/text_normal"
android:textSize="14sp" />
</LinearLayout>
<!-- 内容分割线 -->
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/sub_list_divider" />
</LinearLayout>
</layout>

View File

@@ -0,0 +1,338 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="android.view.View" />
<variable
name="bean"
type="com.lukouguoji.module_base.bean.GjcWeighingBean" />
<variable
name="position"
type="int" />
</data>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="10dp"
android:background="@{bean.checkIn.equals(`2`) ? @drawable/bg_item_green : @drawable/bg_white_radius_8}"
android:orientation="horizontal"
android:paddingVertical="20dp"
android:paddingHorizontal="10dp">
<!-- 飞机图标 (根据checked状态切换图片) -->
<ImageView
android:id="@+id/iv_icon"
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:src="@drawable/img_plane"
android:layout_marginTop="0.5px" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_weight="1"
android:orientation="vertical">
<!-- 第一行数据 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- 运单号 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="运单号:"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary"
tools:text="78109081212"
android:textStyle="bold" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 代理人 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical">
<TextView
completeSpace="@{4}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="代理人:"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:maxLines="1"
android:lines="1"
android:ellipsize="end"
android:text='@{bean.agentName}'
tools:text="SF"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 特码 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="特码:"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.spCode}"
tools:text="NOR"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 预配件数 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="预配件数:"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{String.valueOf(bean.pc)}'
tools:text="11"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 预配重量 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="预配重量:"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{String.valueOf(bean.weight)}'
tools:text="12"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 第二行数据 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp">
<!-- 计划航班 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="计划航班:"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.flight}"
tools:text="20240216/MU2026"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 航程 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical">
<TextView
completeSpace="@{4}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="航程:"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{bean.range}'
tools:text="HFE - PEK"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 预计起飞 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="预计起飞:"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.scheduledTackOffHM}"
tools:text="09:12"
android:textColor="@color/text_normal" />
<TextView
android:id="@+id/tvDayPlus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:text="+1"
android:textColor="@color/text_red"
android:visibility="@{bean.verifyScheduledTackOffNextDay() ? View.VISIBLE : View.GONE}"
android:textSize="15sp" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 业务类型 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="业务类型:"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{bean.businessName}'
tools:text="普通货物运输"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 品名 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="品名(中):"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:ellipsize="end"
android:lines="1"
android:maxLines="1"
android:text='@{bean.goodsCn}'
tools:text="电子元器件"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</LinearLayout>
<!-- 右侧箭头 -->
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:src="@drawable/img_pda_right" />
</androidx.appcompat.widget.LinearLayoutCompat>
</layout>

View File

@@ -0,0 +1,291 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="bean"
type="com.lukouguoji.module_base.bean.GjcWeighingRecordBean" />
</data>
<androidx.appcompat.widget.LinearLayoutCompat
android:id="@+id/ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_white_radius_8"
android:orientation="horizontal"
android:paddingVertical="20dp"
android:paddingHorizontal="10dp">
<!-- 飞机图标 -->
<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"
android:layout_marginTop="0.5px" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_weight="1"
android:orientation="vertical">
<!-- 第一行数据 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- 运单号 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单号:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary"
android:textSize="15sp"
tools:text="78109081212"
android:textStyle="bold" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 预配件数 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="预配件数:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.pc)}'
android:textSize="15sp"
tools:text="10"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 预配重量 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="预配重量:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{String.valueOf((int)bean.weight)}'
android:textSize="15sp"
tools:text="100"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 入库件数 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="入库件数:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.checkInPc)}'
android:textSize="15sp"
tools:text="11"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 入库重量 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="入库重量:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{String.valueOf(bean.checkInWeight)}'
android:textSize="15sp"
tools:text="12"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 第二行数据 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp">
<!-- 代理人 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="代理人:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.agentName}'
android:textSize="15sp"
tools:text="顺丰"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 特码 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="特码:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.spCode}'
android:textSize="15sp"
tools:text="NOR"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 收运人 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="收运人:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.userName}'
android:textSize="15sp"
tools:text="张三"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
<!-- 入库时间 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="center_vertical">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="入库时间:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{bean.opDate}'
android:textSize="15sp"
tools:text="2024-02-16 09:12"
android:textColor="@color/text_normal" />
</androidx.appcompat.widget.LinearLayoutCompat>
</androidx.appcompat.widget.LinearLayoutCompat>
</LinearLayout>
<!-- 右侧箭头 -->
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center"
android:layout_marginLeft="10dp"
android:src="@drawable/img_pda_right" />
</androidx.appcompat.widget.LinearLayoutCompat>
</layout>

View File

@@ -0,0 +1,549 @@
<?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" />
<!-- 以下两个变量平板端不使用,仅为与手机变体(layout/item_int_exp_arrive.xml)保持变量一致 -->
<variable
name="activity"
type="com.lukouguoji.gjc.activity.IntExpArriveActivity" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.IntExpArriveViewModel" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="10dp"
android:orientation="vertical">
<!-- 侧滑布局:白色卡片(含展开按钮)+ 侧滑菜单 -->
<com.mcxtzhang.swipemenulib.SwipeMenuLayout
android:id="@+id/swipe_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- 白色卡片 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical">
<!-- 主要内容区域 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingVertical="20dp"
android:paddingHorizontal="10dp">
<!-- 选中图标 (飞机图标,根据选择状态切换图片) -->
<ImageView
android:id="@+id/iv_icon"
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginTop="0.5px"
android:layout_gravity="center"
android:src="@drawable/img_plane" />
<!-- 运单信息区域 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_weight="0.8"
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.0"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
completeSpace="@{4}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单号:"
android:textColor="@color/text_normal"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary"
android:textSize="15sp"
android:textStyle="bold" />
</LinearLayout>
<!-- 状态 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="状态:"
android:textColor="@color/text_normal"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@{`01`.equals(bean.declareStatus) ? @drawable/tag_status_green : (`W`.equals(bean.declareStatus) ? @drawable/tag_status_blue : @drawable/tag_status_gray)}"
android:paddingHorizontal="8dp"
android:paddingVertical="2dp"
android:text="@{bean.declareStatus}"
android:textColor="@{`01`.equals(bean.declareStatus) ? @color/text_green : (`W`.equals(bean.declareStatus) ? @color/colorPrimary : @color/text_gray)}"
android:textSize="14sp"
android:visibility="@{bean.declareStatus != null &amp;&amp; !bean.declareStatus.isEmpty() ? View.VISIBLE : View.GONE}" />
</LinearLayout>
<!-- 代理 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="代理:"
android:textColor="@color/text_normal"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:lines="1"
android:maxLines="1"
android:text="@{bean.agentName}"
android:textColor="@color/text_normal"
android:textSize="15sp" />
</LinearLayout>
<!-- 件数 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="件数:"
android:textColor="@color/text_normal"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf(bean.pc)}"
android:textColor="@color/text_normal"
android:textSize="15sp" />
</LinearLayout>
<!-- 重量 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
completeSpace="@{4}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="重量:"
android:textColor="@color/text_normal"
android:textSize="15sp" />
<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="15sp" />
</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.0"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
completeSpace="@{4}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="航程:"
android:textColor="@color/text_normal"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.range}"
android:textColor="@color/text_normal"
android:textSize="15sp" />
</LinearLayout>
<!-- 海关放行 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="海关放行:"
android:textColor="@color/text_normal"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.cmdStatus}"
android:textColor="@color/text_normal"
android:textSize="15sp" />
</LinearLayout>
<!-- 运抵模式 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运抵模式:"
android:textColor="@color/text_normal"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@{`0`.equals(bean.arriveFlag) ? @drawable/tag_status_green : (`1`.equals(bean.arriveFlag) ? @drawable/tag_status_orange : @drawable/tag_status_gray)}"
android:paddingHorizontal="8dp"
android:paddingVertical="2dp"
android:text="@{bean.arriveFlagText}"
android:textColor="@{`0`.equals(bean.arriveFlag) ? @color/text_green : (`1`.equals(bean.arriveFlag) ? @color/text_orange : @color/text_gray)}"
android:textSize="14sp"
android:visibility="@{bean.arriveFlag != null &amp;&amp; !bean.arriveFlag.isEmpty() ? View.VISIBLE : View.GONE}" />
</LinearLayout>
<!-- 运单类型 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.5"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单类型:"
android:textColor="@color/text_normal"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.awbName}"
android:textColor="@color/text_normal"
android:textSize="15sp" />
</LinearLayout>
<!-- 分单数 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
completeSpace="@{4}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="分单数:"
android:textColor="@color/text_normal"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf(bean.haWbNumber)}"
android:textColor="@color/text_normal"
android:textSize="15sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- 展开按钮 -->
<ImageView
android:id="@+id/iv_show"
android:layout_width="match_parent"
android:layout_height="20dp"
android:paddingVertical="2.5dp"
android:layout_marginTop="-20dp"
android:scaleType="center"
android:src="@mipmap/img_down" />
</LinearLayout>
<!-- 侧滑菜单区 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal">
<!-- 回执按钮 -->
<TextView
android:id="@+id/btnResponse"
style="@style/tv_item_action"
android:background="@color/colorPrimary"
android:text="回执" />
</LinearLayout>
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
<!-- 子订单列表容器(白色圆角卡片,圆角同主单) -->
<LinearLayout
visible="@{bean.showMore}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
android:visibility="gone">
<!-- 暂无数据提示 -->
<TextView
android:id="@+id/tv_empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingVertical="15dp"
android:text="暂无分单数据"
android:textColor="@color/text_gray"
android:textSize="14sp"
android:visibility="gone" />
<!-- 表头(浅蓝色背景,仅 Title 有背景色,顶部圆角同卡片) -->
<LinearLayout
android:id="@+id/ll_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_arrive_sub_header"
android:orientation="horizontal"
android:paddingHorizontal="10dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.5"
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.2"
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="重量(KG)"
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"
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.9"
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"
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.9"
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.9"
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.9"
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.9"
android:gravity="center"
android:text="删除费率"
android:textColor="@color/text_normal"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<com.google.android.material.divider.MaterialDivider
android:id="@+id/divider_header"
android:layout_width="match_parent"
android:layout_height="1px"
app:dividerColor="@color/sub_list_divider" />
<!-- 子列表 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>
</layout>

View File

@@ -0,0 +1,372 @@
<?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.GjcMove" />
<variable
name="position"
type="Integer" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="10dp"
android:orientation="vertical">
<!-- 侧滑布局 -->
<com.mcxtzhang.swipemenulib.SwipeMenuLayout
android:id="@+id/swipe_menu"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- 白色卡片 -->
<LinearLayout
android:id="@+id/ll"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8"
android:orientation="horizontal"
android:paddingVertical="20dp"
android:paddingHorizontal="10dp"
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"
android:layout_marginTop="0.5px" />
<!-- 运单信息区域 -->
<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.0"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{5}"
android:text="运单号:"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary"
android:textStyle="bold" />
</LinearLayout>
<!-- 件数 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{3}"
android:text="件数:"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{String.valueOf(bean.pc)}"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 重量 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{4}"
android:text="重量:"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{String.valueOf((int)bean.weight)}"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 承运人 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{5}"
android:text="承运人:"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.by1}"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 运单类型 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{5}"
android:text="运单类型:"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.awbTypeName}"
android:lines="1"
android:maxLines="1"
android:ellipsize="end"
android:textColor="@color/text_normal" />
</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.0"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{5}"
android:text="出运路径:"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text='@{bean.range}'
android:lines="1"
android:maxLines="1"
android:ellipsize="end"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 特码 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{3}"
android:text="特码:"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.spCode}"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 代理人 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{4}"
android:text="代理人:"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.agentCode}"
android:lines="1"
android:maxLines="1"
android:ellipsize="end"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 移交状态 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{5}"
android:text="移交状态:"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:text="@{bean.moveState == 1 ? `已移交` : `未移交`}"
android:textColor="@{bean.moveState == 1 ? @color/text_green : @color/text_gray}" />
</LinearLayout>
<!-- 品名 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
completeSpace="@{5}"
android:text="品名:"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="15sp"
android:text="@{bean.goodsCn.isEmpty() ? bean.goods : bean.goodsCn}"
android:lines="1"
android:maxLines="1"
android:ellipsize="end"
android:textColor="@color/text_normal" />
</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>
<!-- 侧滑菜单区域 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal">
<!-- 编辑按钮 -->
<TextView
android:id="@+id/btn_edit"
style="@style/tv_item_action"
android:background="@color/colorPrimary"
android:text="编辑" />
</androidx.appcompat.widget.LinearLayoutCompat>
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,352 @@
<?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_marginHorizontal="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_white_radius_8"
android:orientation="horizontal"
android:paddingVertical="20dp"
android:paddingHorizontal="10dp"
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"
android:layout_marginTop="0.5px" />
<!-- 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">
<!-- ULD编码 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="ULD编码:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.uld}"
android:textSize="15sp"
android:textColor="@color/colorPrimary"
android:textStyle="bold"/>
</LinearLayout>
<!-- 架子车号 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="架子车号:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.carId}"
android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 装机重 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="装机重:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf((int)bean.netWeight)}"
android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 板型 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.75"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="板型:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.boardType}"
android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 航班信息 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.3"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="航班信息:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.flight}"
android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 装机状态(允许装机绿色,不允许装机红色) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="装机状态:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.allowLoadText}"
android:textColor="@{bean.isAllowLoad() ? @color/text_green : @color/text_red}"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
<!-- 第二行:目的港、库位号、IMP代码、交接人、交接时间 -->
<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.0"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="目的港:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.fdest}"
android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 库位号 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="库位号:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.transArea}"
android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- IMP代码(非空且不是 ELI/ELM 时标红) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="IMP代码:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.dgrCode}"
android:textColor="@{bean.dgrCode != null &amp;&amp; !bean.dgrCode.isEmpty() &amp;&amp; !bean.dgrCode.equals(`ELI`) &amp;&amp; !bean.dgrCode.equals(`ELM`) ? @color/text_red : @color/text_normal}"
android:textSize="15sp" />
</LinearLayout>
<!-- 交接人 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.75"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="交接人:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.hoUserName}"
android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 交接时间 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.3"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="交接时间:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.hoDate}"
android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 占位(与第一行装机状态列等宽,保持列对齐) -->
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_weight="1.0" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,503 @@
<?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:loadImage="http://schemas.android.com/tools">
<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_marginHorizontal="10dp"
android:layout_marginTop="10dp"
android:orientation="vertical">
<!-- 白色卡片主要内容区域 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical">
<!-- 主要内容区域 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingVertical="20dp"
android:paddingHorizontal="10dp">
<!-- 选中图标 -->
<ImageView
android:id="@+id/iv_icon"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginTop="0.5px"
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_weight="1"
android:orientation="vertical"
android:layout_marginLeft="15dp">
<!-- 第一行:运单号、航班信息、航程、件数、重量 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- 运单号 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.9"
android:orientation="horizontal">
<TextView
completeSpace="@{4}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单号:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary"
android:textSize="15sp"
android:textStyle="bold" />
</LinearLayout>
<!-- 航班信息 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="航班信息:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.flightInfo}"
android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 航程 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="航程:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.range}"
android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 件数 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="件数:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf(bean.pc)}"
android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 重量 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.6"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="重量:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf((int)bean.weight)}"
android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout>
</LinearLayout>
<!-- 第二行:代理人、品名、清仓正常否、入库时间、库位数 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<!-- 代理人 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.9"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="代理人:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.agentCode}"
android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 品名(英) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="品名(英):"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="@{bean.goods}"
android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 清仓正常否 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="清仓正常:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@{`1`.equals(bean.clearNormal) ? @drawable/tag_status_green : (`0`.equals(bean.clearNormal) ? @drawable/tag_status_orange : @drawable/tag_status_gray)}"
android:paddingHorizontal="8dp"
android:paddingVertical="2dp"
android:text="@{bean.clearNormalText}"
android:textColor="@{`1`.equals(bean.clearNormal) ? @color/text_green : (`0`.equals(bean.clearNormal) ? @color/text_orange : @color/text_gray)}"
android:textSize="14sp"
android:visibility="@{bean.clearNormalText != null &amp;&amp; !bean.clearNormalText.isEmpty() ? View.VISIBLE : View.GONE}" />
</LinearLayout>
<!-- 入库时间 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="入库时间:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.opDate}"
android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout>
<!-- 库位数 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.6"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="库位数:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf(bean.storageUseNumber)}"
android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout>
</LinearLayout>
<!-- 第三行:清仓备注(独占整行) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{4}"
android:text="备注:"
android:textSize="15sp"
android:textColor="@color/text_normal" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@{bean.clearRemark}"
android:textSize="15sp"
android:textColor="@color/text_normal" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- 展开/折叠按钮 -->
<ImageView
android:id="@+id/iv_show"
visible="@{bean.storageUseList != null &amp;&amp; !bean.storageUseList.empty}"
android:layout_width="match_parent"
android:layout_height="20dp"
android:paddingVertical="2.5dp"
android:layout_marginTop="-20dp"
android:scaleType="center"
android:src="@mipmap/img_down" />
</LinearLayout>
<!-- 库位明细列表容器(在白色卡片外面) -->
<LinearLayout
visible="@{bean.showMore}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
android:visibility="gone">
<!-- 表头(浅蓝色背景,顶部圆角同卡片) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_arrive_sub_header"
android:orientation="horizontal"
android:paddingHorizontal="10dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.5"
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"
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"
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.5"
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"
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.5"
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"
app:dividerColor="@color/sub_list_divider" />
<!-- 子列表 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>
</layout>

View File

@@ -1,228 +1,201 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港查询 —— 手机版布局(5.5 寸手持端,最小宽度 < 600dp 时生效)
平板版为同名文件 layout-sw600dp/activity_gjc_query.xml,两者是同一布局的资源变体,
DataBinding 因此生成同一个 ActivityGjcQueryBinding 类。
变体之间必须满足:
· DataBinding 变量完全一致:viewModel
· 保留 Activity 中引用的控件 id:srl / rv
· 平板独有的 filter_overlay / filter_panel(侧滑筛选)手机版不提供,
Binding 基类中自动变 @Nullable,GjcQueryActivity 已判空处理
交互差异(均复用既有 GjcQueryViewModel 字段与接口):
· 平板 5 个横排搜索条 → 手机顶部搜索框(运单号)+ 底部筛选弹层
(航班日期起/止、代理从搜索行移入弹层;设计稿无「出库状态」项,未提供)
· 三格统计(总票数/已入库/已离港),后两格为手机专属统计请求(initPhoneExtras 开启)
· 筛选弹层显隐直接绑既有 viewModel.filterVisible,无需平板的滑入动画代码
-->
<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="android.view.View" />
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
<import type="com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcQueryViewModel" />
</data>
<LinearLayout
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_f2"
android:orientation="vertical">
android:background="@color/phone_page_bg">
<!-- 标题栏(始终在最上层,不被遮挡) -->
<include layout="@layout/title_tool_bar" />
<!-- 内容区域(FrameLayout 包裹,筛选面板和遮罩只在此区域内) -->
<FrameLayout
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
android:layout_height="match_parent"
android:orientation="vertical">
<!-- 原有内容 -->
<include layout="@layout/title_tool_bar" />
<!-- ==================== 搜索行 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingTop="16dp"
android:paddingBottom="12dp">
<!-- 搜索区域 -->
<LinearLayout
<com.lukouguoji.module_base.ui.weight.phone.PhoneSearchBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="10dp"
android:gravity="center_vertical"
hint='@{"搜索运单号"}'
setOnFilterClickListener="@{(v)-> viewModel.filterClick()}"
setOnScanClickListener="@{(v)-> viewModel.waybillScanClick()}"
setRefreshCallBack="@{viewModel::searchClick}"
value="@={viewModel.waybillNo}" />
</LinearLayout>
<!-- ==================== 三格统计:总票数 / 已入库 / 已离港 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<!-- 总票数(蓝) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/bg_phone_card"
android:orientation="horizontal">
<!-- 日期类型(入库/离港) -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
hint='@{"请选择日期类型"}'
list="@{viewModel.dateStateList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.dateState}" />
<View
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginVertical="12dp"
android:background="@color/phone_primary" />
<!-- 航班日期起 -->
<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.flightDateStart}" />
<!-- 航班日期止 -->
<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.flightDateEnd}" />
<!-- 代理人 -->
<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.agentList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.agentId}" />
<!-- 航班号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:id="@+id/flight_no_search"
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/img_scan}"
setOnIconClickListener="@{()-> viewModel.waybillScanClick()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.waybillNo}"
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntExpSearch/queryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}" />
<!-- 搜索和筛选按钮 -->
<LinearLayout
android:layout_width="0dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:paddingHorizontal="24dp">
android:orientation="vertical"
android:paddingHorizontal="12dp"
android:paddingVertical="10dp">
<!-- 搜索按钮 -->
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="总票数"
android:textColor="@color/phone_text_body"
android:textSize="12sp" />
<!-- 筛选按钮(含红点) -->
<FrameLayout
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginLeft="16dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:onClick="@{()-> viewModel.filterClick()}"
android:padding="5dp"
android:src="@drawable/img_filter" />
<View
android:layout_width="8dp"
android:layout_height="8dp"
android:layout_gravity="top|end"
android:background="@drawable/bg_red_dot"
android:visibility="@{viewModel.hasFilter ? View.VISIBLE : View.GONE}" />
</FrameLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@{viewModel.totalCount}"
android:textColor="@color/phone_primary"
android:textSize="20sp"
android:textStyle="bold"
tools:text="4" />
</LinearLayout>
</LinearLayout>
<!-- 列表区域 -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_gjc_query" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- 底部统计信息 -->
<!-- 已入库(橙) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:gravity="center_vertical"
android:paddingHorizontal="15dp">
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_card"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginVertical="12dp"
android:background="@color/phone_tag_orange_text" />
<!-- 统计信息 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
android:orientation="vertical"
android:paddingHorizontal="12dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{`合计:` + viewModel.totalCount + `票`}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="16sp"
android:textStyle="bold"
tools:text="合计:3票" />
android:text="已入库"
android:textColor="@color/phone_text_body"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{`总件数:` + viewModel.totalPc}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="16sp"
android:layout_marginTop="2dp"
android:text="@{viewModel.storedCount}"
android:textColor="@color/phone_tag_orange_text"
android:textSize="20sp"
android:textStyle="bold"
tools:text="总件数:100" />
tools:text="2" />
</LinearLayout>
</LinearLayout>
<!-- 已离港(绿) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_card"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginVertical="12dp"
android:background="@color/phone_tag_green_text" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="12dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{`总重量:` + viewModel.totalWeight}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="16sp"
android:textStyle="bold"
tools:text="总重量:100" />
android:text="已离港"
android:textColor="@color/phone_text_body"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{`航班航次:` + viewModel.totalFlightNumber}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="16sp"
android:layout_marginTop="2dp"
android:text="@{viewModel.departedCount}"
android:textColor="@color/phone_tag_green_text"
android:textSize="20sp"
android:textStyle="bold"
tools:text="航班航次:2" />
tools:text="2" />
</LinearLayout>
@@ -230,28 +203,141 @@
</LinearLayout>
<!-- 遮罩层(只覆盖内容区域) -->
<View
android:id="@+id/filter_overlay"
<!-- ==================== 列表 ==================== -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#80000000"
android:clickable="true"
android:focusable="true"
android:onClick="@{()-> viewModel.closeFilter()}"
android:visibility="gone" />
android:layout_height="0dp"
android:layout_weight="1">
<!-- 筛选面板(从右侧滑入,只在内容区域内) -->
<include
android:id="@+id/filter_panel"
layout="@layout/layout_gjc_query_filter"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end"
android:visibility="gone"
app:viewModel="@{viewModel}" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingTop="4dp"
android:paddingBottom="24dp"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="3"
tools:listitem="@layout/item_gjc_query" />
</FrameLayout>
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout>
<!-- ==================== 筛选弹层(绑既有 filterVisible) ==================== -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="8dp"
panelVisible="@{viewModel.filterVisible}"
setOnConfirmClick="@{(v)-> viewModel.confirmFilter()}"
setOnDismissClick="@{(v)-> viewModel.closeFilter()}"
setOnResetClick="@{(v)-> viewModel.resetFilter()}"
title='@{"筛选条件"}'>
<!-- 日期类型(dateState:入库/离港,与主干平板一致;后端起止日期仅在携带它时生效) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择日期类型"}'
list="@{viewModel.dateStateList}"
title='@{"日期类型"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={viewModel.dateState}" />
<!-- 开始日期(平板搜索行字段,手机移入弹层) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择开始日期"}'
title='@{"开始日期"}'
type="@{PhoneDataLayoutType.DATE}"
value="@={viewModel.flightDateStart}" />
<!-- 结束日期 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择结束日期"}'
title='@{"结束日期"}'
type="@{PhoneDataLayoutType.DATE}"
value="@={viewModel.flightDateEnd}" />
<!-- 航班号 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:id="@+id/phone_filter_flight_no"
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入航班号"}'
title='@{"航班号"}'
type="@{PhoneDataLayoutType.INPUT}"
value="@={viewModel.flightNo}" />
<!-- 代理(平板搜索行字段,手机移入弹层) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择代理"}'
list="@{viewModel.agentList}"
title='@{"代理"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={viewModel.agentId}" />
<!-- 特码(设计稿为下拉,字典由 initPhoneExtras 加载;平板为文本输入) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择特码"}'
list="@{viewModel.spCodeList}"
title='@{"特码"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={viewModel.spCode}" />
<!-- 目的港 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:id="@+id/phone_filter_dest"
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入目的港"}'
title='@{"目的港"}'
type="@{PhoneDataLayoutType.INPUT}"
value="@={viewModel.dest}" />
<!-- 运单类型 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择运单类型"}'
list="@{viewModel.awbTypeList}"
title='@{"运单类型"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={viewModel.awbType}" />
<!-- 业务类型 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择业务类型"}'
list="@{viewModel.businessTypeList}"
title='@{"业务类型"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={viewModel.businessType}" />
<!-- 品名(中) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入中文品名"}'
title='@{"品名(中)"}'
type="@{PhoneDataLayoutType.INPUT}"
value="@={viewModel.goodsCn}" />
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
</FrameLayout>
</LinearLayout>
</layout>

View File

@@ -1,125 +1,137 @@
<?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="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcQueryDetailsViewModel" />
</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" />
<!-- Tab栏 (自定义,文字Tab + 底线) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginHorizontal="15dp"
android:layout_marginTop="15dp"
android:background="@drawable/bg_white_radius_top_8"
android:orientation="horizontal">
<!-- Tab1: 运单信息 -->
<LinearLayout
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:onClick="@{()->viewModel.onTabClick(0)}"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="运单信息"
android:textStyle="bold"
android:textColor="@{viewModel.currentTab == 0 ? @color/colorPrimary : @color/text_gray}"
android:textSize="16sp" />
<!-- 选中底线 -->
<View
android:layout_width="60dp"
android:layout_height="3dp"
android:background="@{viewModel.currentTab == 0 ? @color/colorPrimary : @color/transparent}"
android:visibility="@{viewModel.currentTab == 0 ? View.VISIBLE : View.INVISIBLE}" />
</LinearLayout>
<!-- Tab2: 仓库信息 -->
<LinearLayout
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:onClick="@{()->viewModel.onTabClick(1)}"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:textStyle="bold"
android:text="仓库信息"
android:textColor="@{viewModel.currentTab == 1 ? @color/colorPrimary : @color/text_gray}"
android:textSize="16sp" />
<View
android:layout_width="60dp"
android:layout_height="3dp"
android:background="@{viewModel.currentTab == 1 ? @color/colorPrimary : @color/transparent}"
android:visibility="@{viewModel.currentTab == 1 ? View.VISIBLE : View.INVISIBLE}" />
</LinearLayout>
<!-- Tab3: 库位信息 -->
<LinearLayout
android:layout_width="100dp"
android:layout_height="match_parent"
android:gravity="center"
android:onClick="@{()->viewModel.onTabClick(2)}"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:textStyle="bold"
android:text="库位信息"
android:textColor="@{viewModel.currentTab == 2 ? @color/colorPrimary : @color/text_gray}"
android:textSize="16sp" />
<View
android:layout_width="60dp"
android:layout_height="3dp"
android:background="@{viewModel.currentTab == 2 ? @color/colorPrimary : @color/transparent}"
android:visibility="@{viewModel.currentTab == 2 ? View.VISIBLE : View.INVISIBLE}" />
</LinearLayout>
</LinearLayout>
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginStart="15dp"
android:layout_marginEnd="23dp"
android:background="@color/color_f2" />
<!-- ViewPager2 -->
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/vp"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港查询详情 —— 手机版布局(5.5 寸手持端,最小宽度 < 600dp 时生效)
平板版为同名文件 layout-sw600dp/activity_gjc_query_details.xml,两者是同一布局的资源变体,
DataBinding 因此生成同一个 ActivityGjcQueryDetailsBinding 类。
变体之间必须满足:
· DataBinding 变量完全一致:viewModel
· 保留 Activity 中引用的控件 id:vp
→ Tab 切换 / ViewPager2 / 3 个 Fragment 全部复用,Fragment 布局各自有手机变体
与平板差异:Tab 栏通栏白底、三等分、选中蓝字 + 底部指示条(设计稿样式)
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="android.view.View" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcQueryDetailsViewModel" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_page_bg"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<!-- ==================== Tab 栏:运单信息 / 仓库信息 / 库位信息 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="42dp"
android:background="@color/white"
android:orientation="horizontal">
<!-- Tab1: 运单信息 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:onClick="@{()-> viewModel.onTabClick(0)}"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="运单信息"
android:textColor="@{viewModel.currentTab == 0 ? @color/phone_primary : @color/phone_text_body}"
android:textSize="14sp"
android:textStyle="bold" />
<View
android:layout_width="28dp"
android:layout_height="3dp"
android:background="@color/phone_primary"
android:visibility="@{viewModel.currentTab == 0 ? View.VISIBLE : View.INVISIBLE}" />
</LinearLayout>
<!-- Tab2: 仓库信息 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:onClick="@{()-> viewModel.onTabClick(1)}"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="仓库信息"
android:textColor="@{viewModel.currentTab == 1 ? @color/phone_primary : @color/phone_text_body}"
android:textSize="14sp"
android:textStyle="bold" />
<View
android:layout_width="28dp"
android:layout_height="3dp"
android:background="@color/phone_primary"
android:visibility="@{viewModel.currentTab == 1 ? View.VISIBLE : View.INVISIBLE}" />
</LinearLayout>
<!-- Tab3: 库位信息 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:onClick="@{()-> viewModel.onTabClick(2)}"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
android:text="库位信息"
android:textColor="@{viewModel.currentTab == 2 ? @color/phone_primary : @color/phone_text_body}"
android:textSize="14sp"
android:textStyle="bold" />
<View
android:layout_width="28dp"
android:layout_height="3dp"
android:background="@color/phone_primary"
android:visibility="@{viewModel.currentTab == 2 ? View.VISIBLE : View.INVISIBLE}" />
</LinearLayout>
</LinearLayout>
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/phone_divider" />
<!-- ViewPager2 -->
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/vp"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>
</layout>

View File

@@ -1,222 +1,310 @@
<?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.GjcWeighingViewModel" />
</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
hint='@{"请选择航班日期"}'
icon="@{@drawable/img_date}"
type="@{SearchLayoutType.DATE}"
value="@={viewModel.flightDate}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 航班号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入航班号"}'
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.flightNo}"
setUpperCaseAlphanumeric="@{true}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 择代理 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择代理"}'
list="@{viewModel.agentList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.agentCode}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 择特码 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择特码"}'
list="@{viewModel.spCodeList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.spCode}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 运单号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入运单号"}'
icon="@{@drawable/img_scan}"
setOnIconClickListener="@{()-> viewModel.waybillNoScanClick()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.waybillNo}"
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntExpCheckIn/queryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 搜索和添加按钮 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:paddingHorizontal="24dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
<!-- 添加按钮 -->
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginLeft="16dp"
android:onClick="@{()-> viewModel.addClick()}"
android:src="@drawable/img_add" />
</LinearLayout>
</LinearLayout>
<!-- 列表 -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_gjc_weighing" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- 底部统计和按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:gravity="center_vertical"
android:paddingHorizontal="15dp">
<!-- 全选按钮 (图标+文字) -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:onClick="@{()-> viewModel.checkAllClick()}">
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="全选"
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp" />
</LinearLayout>
<!-- 统计信息 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="20dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{"合计:"+viewModel.totalCount+"票"}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="合计:1票" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{"总件数:"+viewModel.totalPc}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="总件数:100" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{"总重量:"+viewModel.totalWeight}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="总重量:100" />
</LinearLayout>
<!-- 提前运抵按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.arrivedAhead()}"
android:text="提前运抵" />
<!-- 计重记录按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.recordClick()}"
android:text="计重记录" />
</LinearLayout>
</LinearLayout>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港待计重 —— 手机版布局(5.5 寸手持端,最小宽度 < 600dp 时生效)
平板版为同名文件 layout-sw600dp/activity_gjc_weighing_list.xml,两者是同一布局的资源变体,
DataBinding 因此生成同一个 ActivityGjcWeighingListBinding 类。
变体之间必须满足:
· DataBinding 变量完全一致:viewModel / activity
· 保留 Activity 中引用的控件 id:srl / rv
→ GjcWeighingViewModel 的业务逻辑与接口调用全部复用,平板端行为不受影响
交互差异(均复用既有 ViewModel 字段与接口):
· 平板 5 个横排搜索条 → 手机顶部搜索框(运单号/航班号混输)+ 底部筛选弹层
· 三格统计(总票数/待计重/计重中),后两格为手机专属统计请求(initPhoneExtras 开启)
· 平板底部全选 + 批量提前运抵 → 手机卡片内单票「提前运抵」按钮
· 右下 FAB 进入计重记录(平板为搜索区图标按钮)
-->
<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.phone.PhoneDataLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcWeighingViewModel" />
<variable
name="activity"
type="com.lukouguoji.gjc.activity.GjcWeighingListActivity" />
</data>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_page_bg">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<!-- ==================== 搜索行 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingTop="16dp"
android:paddingBottom="12dp">
<com.lukouguoji.module_base.ui.weight.phone.PhoneSearchBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"搜索运单号/航班号..."}'
setOnFilterClickListener="@{(v)-> activity.toggleFilterPanel()}"
setOnScanClickListener="@{(v)-> viewModel.waybillNoScanClick()}"
setRefreshCallBack="@{viewModel::searchClick}"
upperCase="@{true}"
value="@={viewModel.searchKey}" />
</LinearLayout>
<!-- ==================== 三格统计:总票数 / 待计重 / 计重中 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<!-- 总票数(蓝) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/bg_phone_card"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginVertical="12dp"
android:background="@color/phone_primary" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="12dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="总票数"
android:textColor="@color/phone_text_body"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@{viewModel.totalCount}"
android:textColor="@color/phone_primary"
android:textSize="20sp"
android:textStyle="bold"
tools:text="4" />
</LinearLayout>
</LinearLayout>
<!-- 待计重(橙) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_card"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginVertical="12dp"
android:background="@color/phone_tag_orange_text" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="12dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="待计重"
android:textColor="@color/phone_text_body"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@{viewModel.pendingCount}"
android:textColor="@color/phone_tag_orange_text"
android:textSize="20sp"
android:textStyle="bold"
tools:text="2" />
</LinearLayout>
</LinearLayout>
<!-- 计重中(绿) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_card"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginVertical="12dp"
android:background="@color/phone_tag_green_text" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="12dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="计重中"
android:textColor="@color/phone_text_body"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@{viewModel.weighingCount}"
android:textColor="@color/phone_tag_green_text"
android:textSize="20sp"
android:textStyle="bold"
tools:text="2" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- ==================== 列表 ==================== -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingTop="4dp"
android:paddingBottom="80dp"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="3"
tools:listitem="@layout/item_gjc_weighing" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout>
<!-- ==================== 右下 FAB:新增计重(与平板搜索栏「+」一致,空运单进入开始计重) ==================== -->
<TextView
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_gravity="bottom|end"
android:layout_marginEnd="20dp"
android:layout_marginBottom="84dp"
android:background="@drawable/bg_phone_fab"
android:contentDescription="新增计重"
android:elevation="6dp"
android:gravity="center"
android:includeFontPadding="false"
android:onClick="@{()-> viewModel.addClick()}"
android:text="+"
android:textColor="@color/white"
android:textSize="32sp" />
<!-- ==================== 右下 FAB:计重记录 ==================== -->
<ImageView
android:layout_width="52dp"
android:layout_height="52dp"
android:layout_gravity="bottom|end"
android:layout_marginEnd="20dp"
android:layout_marginBottom="20dp"
android:background="@drawable/bg_phone_fab"
android:contentDescription="计重记录"
android:elevation="6dp"
android:onClick="@{()-> viewModel.recordClick()}"
android:padding="14dp"
android:src="@drawable/ic_phone_clipboard" />
<!-- ==================== 筛选弹层(elevation 需大于 FAB 的 6dp) ==================== -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="8dp"
panelVisible="@{activity.filterPanelVisible}"
setOnConfirmClick="@{(v)-> activity.confirmFilter()}"
setOnDismissClick="@{(v)-> activity.toggleFilterPanel()}"
setOnResetClick="@{(v)-> activity.resetFilter()}"
title='@{"筛选条件"}'>
<!-- 筛选项与平板端查询参数保持一致:fdate / agentCode / spCode(运单号、航班号走顶部搜索框) -->
<!-- 航班日期(复用既有 flightDate,手机默认空 = 全部) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择航班日期"}'
title='@{"航班日期"}'
type="@{PhoneDataLayoutType.DATE}"
value="@={viewModel.flightDate}" />
<!-- 代理人(复用既有 agentCode 查询字段) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择代理人"}'
list="@{viewModel.agentList}"
title='@{"代理人"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={viewModel.agentCode}" />
<!-- 特码(复用既有 spCode 查询字段) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择特码"}'
list="@{viewModel.spCodeList}"
title='@{"特码"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={viewModel.spCode}" />
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
</FrameLayout>
</layout>

View File

@@ -1,270 +1,258 @@
<?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="android.view.View" />
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcWeighingRecordDetailsViewModel" />
</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_margin="15dp"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="15dp"
android:layout_marginVertical="8dp"
android:text="运单信息"
android:textColor="@color/color_33"
android:textSize="17sp"
android:textStyle="bold" />
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:layout_height="1dp" />
<!-- 第一部分:运单信息区域 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="15dp">
<!-- 运单号 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单号:"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.waybillNo}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
</LinearLayout>
<!-- 预配件数 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="预配件数:"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.prePc}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
</LinearLayout>
<!-- 预配重量 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="预配重量:"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.preWeight}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
</LinearLayout>
<!-- 品名(中) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="品名(中):"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.goodsName}"
android:textColor="@color/text_normal"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginHorizontal="15dp"
android:layout_marginBottom="15dp"
android:layout_weight="1"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginHorizontal="15dp"
android:layout_marginVertical="8dp"
android:text="称重信息"
android:textColor="@color/color_33"
android:textSize="17sp"
android:textStyle="bold" />
<com.google.android.material.divider.MaterialDivider
android:layout_width="match_parent"
android:background="#e7e7e7"
android:layout_height="1px" />
<!-- 第二部分:计重记录列表 -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:listitem="@layout/item_gjc_check_in_record" />
</LinearLayout>
<!-- 取消+保存按钮组(编辑模式,居中) -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginHorizontal="15dp"
android:layout_marginBottom="15dp"
android:orientation="horizontal"
android:visibility="@{viewModel.isEditMode ? View.VISIBLE : View.GONE}">
<!-- 取消按钮 -->
<TextView
android:id="@+id/btnCancel"
style="@style/tv_bottom_btn"
android:layout_marginEnd="10dp"
android:onClick="@{() -> viewModel.onCancelClick()}"
android:text="取消" />
<!-- 保存按钮 -->
<TextView
android:id="@+id/btnSave"
style="@style/tv_bottom_btn"
android:onClick="@{() -> viewModel.onSaveClick()}"
android:text="保存" />
</LinearLayout>
<!-- 第三部分:底部统计与按钮区域 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="64dp"
android:background="@color/white"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="15dp">
<!-- 统计信息(左侧) -->
<LinearLayout
android:id="@+id/statsLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- 总件数 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{`总件数:` + viewModel.totalPc}"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<!-- 总重量 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:text="@{`总重量:` + viewModel.totalWeight}"
android:textColor="@color/text_gray"
android:textSize="16sp" />
<!-- 重量误差(红色) -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:text="@{`重量误差:` + viewModel.weightError}"
android:textColor="@color/text_red"
android:textSize="16sp" />
</LinearLayout>
<Space
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 修改按钮(只读模式,右侧) -->
<TextView
android:id="@+id/btnModify"
style="@style/tv_bottom_btn"
android:onClick="@{() -> viewModel.onModifyClick()}"
android:text="修改"
android:visibility="@{viewModel.isEditMode ? View.GONE : View.VISIBLE}" />
</LinearLayout>
</LinearLayout>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港计重明细 —— 手机版布局(5.5 寸手持端,最小宽度 < 600dp 时生效)
平板版为同名文件 layout-sw600dp/activity_gjc_weighing_record_details.xml(列表内联编辑)。
变量 viewModel / activity / editRecord 与平板一致;保留 Activity 中引用的控件 id:recyclerView。
交互差异(业务逻辑全部复用 GjcWeighingRecordDetailsViewModel):
· 顶部卡片:运单号 + 总件数/总重量/托盘总重(totalCarWeight = 各记录 trayTotalWeight 之和,手机专属统计字段)
· 托盘自重绑 trayTotalWeight(与平板端一致,后端 listRecordByWh / updateRecordList 均支持)
· 每条记录卡片带「修改」→ 全屏「修改记录」覆层(isEditMode 驱动显隐,
平板端该状态驱动列表内联编辑,互不影响);保存走 onPhoneSaveClick(成功后留在本页)
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="android.view.View" />
<import type="com.lukouguoji.module_base.ui.weight.phone.PhoneFormRowType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcWeighingRecordDetailsViewModel" />
<variable
name="activity"
type="com.lukouguoji.gjc.activity.GjcWeighingRecordDetailsActivity" />
<variable
name="editRecord"
type="com.lukouguoji.module_base.bean.GjcCheckInRecord" />
</data>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_page_bg">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<!-- ============ 头部卡片:运单号 + 汇总统计 ============ -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp"
android:background="@drawable/bg_phone_card"
android:orientation="vertical">
<!-- 顶部主色描边条 -->
<View
android:layout_width="match_parent"
android:layout_height="5dp"
android:background="@drawable/bg_phone_card_top_accent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="14dp">
<!-- 运单号行 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<View
android:layout_width="8dp"
android:layout_height="8dp"
android:background="@drawable/bg_phone_fab" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:text="@{viewModel.waybillNo}"
android:textColor="@color/phone_text_strong"
android:textSize="20sp"
android:textStyle="bold"
tools:text="78133363396" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_phone_btn_weak"
android:paddingHorizontal="10dp"
android:paddingVertical="4dp"
android:text="国际出港"
android:textColor="@color/phone_primary"
android:textSize="12sp" />
</LinearLayout>
<!-- 汇总统计 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneStatBox
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
label1='@{"总件数"}'
label2='@{"总重量(kg)"}'
label3='@{"托盘总重(kg)"}'
value1="@{viewModel.totalPc}"
value2="@{viewModel.totalWeight}"
value3="@{viewModel.totalCarWeight}" />
</LinearLayout>
</LinearLayout>
<!-- ============ 计重记录列表 ============ -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingTop="2dp"
android:paddingBottom="16dp"
tools:itemCount="3"
tools:listitem="@layout/item_gjc_check_in_record" />
</LinearLayout>
<!-- ============ 全屏「修改记录」覆层(isEditMode 驱动) ============ -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_page_bg"
android:clickable="true"
android:elevation="10dp"
android:focusable="true"
android:orientation="vertical"
android:visibility="@{viewModel.isEditMode ? View.VISIBLE : View.GONE}"
tools:visibility="gone">
<!-- 覆层顶栏(与公共标题栏同规格) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@color/phone_primary"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:onClick="@{()-> activity.closePhoneEdit()}"
android:paddingHorizontal="16dp"
android:text="‹ 返回"
android:textColor="@color/white"
android:textSize="16sp" />
<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="18sp"
android:textStyle="bold" />
<!-- 右侧占位,保证标题居中 -->
<View
android:layout_width="62dp"
android:layout_height="match_parent" />
</LinearLayout>
<!-- 编辑表单卡片 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp"
android:background="@drawable/bg_phone_card"
android:orientation="vertical"
android:paddingHorizontal="14dp"
android:paddingVertical="4dp">
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入运抵件数"}'
numeric="@{true}"
required="@{true}"
title='@{"运抵件数"}'
type="@{PhoneFormRowType.INPUT}"
value="@={editRecord.pcStr}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入运抵重量"}'
numeric="@{true}"
required="@{true}"
title='@{"运抵重量(kg)"}'
type="@{PhoneFormRowType.INPUT}"
value="@={editRecord.weightStr}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入托盘自重"}'
numeric="@{true}"
required="@{true}"
title='@{"托盘自重(kg)"}'
type="@{PhoneFormRowType.INPUT}"
value="@={editRecord.trayTotalWeightStr}" />
<!-- 计重人:opUserName 姓名,为空回退 opId -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
title='@{"计重人"}'
type="@{PhoneFormRowType.TEXT}"
value="@{editRecord.opUserDisplay}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
title='@{"计重时间"}'
type="@{PhoneFormRowType.TEXT}"
value="@{editRecord.opDate}" />
</LinearLayout>
<!-- 保存 -->
<TextView
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="24dp"
android:background="@drawable/bg_phone_btn_primary"
android:gravity="center"
android:onClick="@{()-> viewModel.onPhoneSaveClick()}"
android:text="保存"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
</FrameLayout>
</layout>

View File

@@ -1,183 +1,283 @@
<?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.GjcWeighingRecordViewModel" />
</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}"
setUpperCaseAlphanumeric="@{true}" />
<!-- 择代理 -->
<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.agentList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.agentCode}" />
<!-- 择特码 -->
<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.spCodeList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.spCode}" />
<!-- 运单号 -->
<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}"
setOnIconClickListener="@{()-> viewModel.waybillNoScanClick()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.waybillNo}"
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntExpCheckIn/checked/queryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}" />
<!-- 搜索按钮 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:paddingHorizontal="24dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
</LinearLayout>
</LinearLayout>
<!-- 列表 -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_gjc_weighing_record" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- 底部统计和按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:gravity="center_vertical"
android:paddingHorizontal="15dp">
<!-- 统计信息 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{"合计:"+viewModel.totalCount+"票"}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="合计:1票" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{"总件数:"+viewModel.totalPc}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="总件数:100" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text='@{"总重量:"+viewModel.totalWeight}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"
tools:text="总重量:100" />
</LinearLayout>
<!-- 运抵申报按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.declareClick()}"
android:text="运抵申报" />
</LinearLayout>
</LinearLayout>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港计重记录 —— 手机版布局(5.5 寸手持端,最小宽度 < 600dp 时生效)
平板版为同名文件 layout-sw600dp/activity_gjc_weighing_record_list.xml。
变量 viewModel / activity 与平板一致;保留 Activity 中引用的控件 id:srl / rv。
交互差异(业务逻辑全部复用 GjcWeighingRecordViewModel):
· 平板 5 个横排搜索条 → 手机顶部搜索框(运单号模糊)+ 底部筛选弹层
· 筛选弹层:入库日期起/止(后端暂无入参,预留)、代理人、特码、目的站、计重人
· 三格统计复用既有统计接口出参(总票数/总件数/总重量)
-->
<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.phone.PhoneDataLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcWeighingRecordViewModel" />
<variable
name="activity"
type="com.lukouguoji.gjc.activity.GjcWeighingRecordListActivity" />
</data>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_page_bg">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<!-- ==================== 搜索行 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingTop="16dp"
android:paddingBottom="12dp">
<com.lukouguoji.module_base.ui.weight.phone.PhoneSearchBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"搜索运单号"}'
setOnFilterClickListener="@{(v)-> activity.toggleFilterPanel()}"
setOnScanClickListener="@{(v)-> viewModel.waybillNoScanClick()}"
setRefreshCallBack="@{viewModel::searchClick}"
upperCase="@{true}"
value="@={viewModel.waybillNo}" />
</LinearLayout>
<!-- ==================== 三格统计:总票数 / 总件数 / 总重量 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<!-- 总票数(蓝) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/bg_phone_card"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginVertical="12dp"
android:background="@color/phone_primary" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingHorizontal="8dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="总票数"
android:textColor="@color/phone_text_body"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@{viewModel.totalCount}"
android:textColor="@color/phone_primary"
android:textSize="20sp"
android:textStyle="bold"
tools:text="3" />
</LinearLayout>
</LinearLayout>
<!-- 总件数(橙) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_card"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginVertical="12dp"
android:background="@color/phone_tag_orange_text" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingHorizontal="8dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="总件数"
android:textColor="@color/phone_text_body"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@{viewModel.totalPc}"
android:textColor="@color/phone_tag_orange_text"
android:textSize="20sp"
android:textStyle="bold"
tools:text="145" />
</LinearLayout>
</LinearLayout>
<!-- 总重量(绿) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_card"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginVertical="12dp"
android:background="@color/phone_tag_green_text" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:orientation="vertical"
android:paddingHorizontal="8dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="总重量"
android:textColor="@color/phone_text_body"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@{viewModel.totalWeight}"
android:textColor="@color/phone_tag_green_text"
android:textSize="20sp"
android:textStyle="bold"
tools:text="2480" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- ==================== 列表 ==================== -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingTop="4dp"
android:paddingBottom="16dp"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="2"
tools:listitem="@layout/item_gjc_weighing_record" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout>
<!-- ==================== 筛选弹层 ==================== -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="8dp"
panelVisible="@{activity.filterPanelVisible}"
setOnConfirmClick="@{(v)-> activity.confirmFilter()}"
setOnDismissClick="@{(v)-> activity.toggleFilterPanel()}"
setOnResetClick="@{(v)-> activity.resetFilter()}"
title='@{"筛选条件"}'>
<!-- 航班日期(与平板端查询参数 fdate 一致;后端不提供入库日期范围入参) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择航班日期"}'
title='@{"航班日期"}'
type="@{PhoneDataLayoutType.DATE}"
value="@={viewModel.flightDate}" />
<!-- 航班号(与平板搜索栏 fno 一致) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入航班号"}'
title='@{"航班号"}'
type="@{PhoneDataLayoutType.INPUT}"
value="@={viewModel.flightNo}" />
<!-- 代理人(复用既有 agentCode 查询字段) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"全部"}'
list="@{viewModel.agentList}"
title='@{"代理人"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={viewModel.agentCode}" />
<!-- 特码(复用既有 spCode 查询字段) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"全部"}'
list="@{viewModel.spCodeList}"
title='@{"特码"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={viewModel.spCode}" />
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
</FrameLayout>
</layout>

View File

@@ -1,527 +1,329 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcWeighingStartViewModel" />
</data>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_f2">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<!-- 主内容区域 -->
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="15dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
android:padding="8dp">
<!-- 第一部分:前2行表单(左侧2列)+ 地磅称重(右侧) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- 左侧:前2行表单(2列) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:orientation="vertical">
<!-- 第1行:运单号、通道号 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入运单号"}'
required="@{true}"
setRefreshCallBack="@{viewModel::onWaybillNoInputComplete}"
title='@{"运单号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.maWbBean.wbNo}'
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntExpCheckIn/queryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择通道号"}'
list="@{viewModel.channelList}"
required="@{true}"
title='@{"通 道 号"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.channel}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第2行:代理人、特码 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择代理人"}'
list="@{viewModel.agentList}"
title='@{"代 理 人"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.maWbBean.agentCode}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择特码"}'
list="@{viewModel.spCodeList}"
title='@{"特 码"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.maWbBean.spCode}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<!-- 右侧:地磅称重区域 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginStart="15dp"
android:layout_weight="1"
android:orientation="vertical">
<!-- 黄色标题栏 -->
<TextView
android:layout_width="match_parent"
android:layout_height="36dp"
android:background="@drawable/bg_shouyun_dbcz"
android:gravity="center"
android:text="地磅称重"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold" />
<!-- 青色重量显示区域 -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_shouyun_dbzl"
android:minHeight="60dp">
<EditText
android:id="@+id/etWeight"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:background="@null"
android:gravity="center"
android:hint="0"
android:inputType="numberDecimal"
android:text="@={viewModel.diBangWeight}"
android:textColor="@color/text_red"
android:textColorHint="@color/text_red"
android:textSize="45sp"
android:textStyle="bold"
tools:text="1655" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@id/etWeight"
android:layout_marginStart="8dp"
android:layout_toEndOf="@id/etWeight"
android:text="kg"
android:textColor="@color/text_red"
android:textSize="24sp"
android:textStyle="bold" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
<!-- 第3行:航班日期、航班号、航程 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择航班日期"}'
title='@{"航班日期"}'
titleLength="@{5}"
type="@{DataLayoutType.DATE}"
value='@={viewModel.flightDate}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入航班号"}'
title='@{"航 班 号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.maWbBean.fno}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入航程"}'
title='@{"航 程"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.maWbBean.range}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第4行:预配件数、预配重量、预配体积(只读) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"预配件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.maWbBean.pc)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"预配重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.maWbBean.weight)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"预配体积"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.maWbBean.volume)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第5行:实时件数、实时重量、实时体积 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
hint='@{"请输入实时件数"}'
title='@{"实时件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.realTimePc}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
hint='@{"请输入实时重量"}'
title='@{"实时重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.realTimeWeight}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
hint='@{"请输入实时体积"}'
title='@{"实时体积"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.realTimeVolume}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第6行:运抵件数、运抵重量、运抵体积 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入运抵件数"}'
required="@{true}"
title='@{"运抵件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.arrivePc}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入运抵重量"}'
required="@{true}"
title='@{"运抵重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.arriveWeight}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入运抵体积"}'
title='@{"运抵体积"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.arriveVolume}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第7行:托盘数量、托盘自重(用于自动计算运抵重量)、业务类型 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入托盘数量"}'
inputType="@{android.text.InputType.TYPE_CLASS_NUMBER}"
title='@{"托盘数量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.trayNumber}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入托盘自重"}'
inputType="@{android.text.InputType.TYPE_CLASS_NUMBER | android.text.InputType.TYPE_NUMBER_FLAG_DECIMAL}"
title='@{"托盘自重"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.trayWeight}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请选择业务类型"}'
list="@{viewModel.businessTypeList}"
title='@{"业务类型"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.maWbBean.businessType}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 第8行:平板车、平板车自重、备注 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入平板车号"}'
setRefreshCallBack="@{viewModel::onCarIdInputComplete}"
title='@{"平 板 车"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.maWbBean.carId}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"平板车自重"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.carWeight}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入备注"}'
title='@{"备 注"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.pageRemark}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<!-- 底部操作栏 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:padding="15dp"
android:paddingTop="15dp">
<TextView
android:layout_width="150dp"
android:layout_height="50dp"
android:layout_marginEnd="30dp"
android:background="@drawable/bg_primary_radius_4"
android:gravity="center"
android:onClick="@{(v)-> viewModel.sortingWeighingClick()}"
android:text="分托计重"
android:textColor="@color/white"
android:textSize="18sp" />
<TextView
android:layout_width="150dp"
android:layout_height="50dp"
android:background="@drawable/bg_primary_radius_4"
android:gravity="center"
android:onClick="@{(v)-> viewModel.completeCheckInClick()}"
android:text="完成计重"
android:textColor="@color/white"
android:textSize="18sp" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
<!-- 浮动按钮组 -->
<!-- 遮罩层(点击收起) -->
<View
android:id="@+id/maskView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
<!-- 子按钮1 -->
<View
android:id="@+id/subButton1"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_gravity="bottom|end"
android:layout_marginEnd="25dp"
android:layout_marginBottom="70dp"
android:background="@drawable/ic_btn_customs"
android:visibility="gone" />
<!-- 子按钮2 -->
<View
android:id="@+id/subButton2"
android:layout_width="44dp"
android:layout_height="44dp"
android:layout_gravity="bottom|end"
android:layout_marginEnd="70dp"
android:layout_marginBottom="25dp"
android:background="@drawable/ic_btn_record"
android:visibility="gone" />
<!-- 主浮动按钮 -->
<ImageView
android:id="@+id/mainFloatButton"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="bottom|end"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:background="@drawable/ic_float_button_weighing_start" />
</FrameLayout>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港开始计重 —— 手机版布局(5.5 寸手持端,最小宽度 < 600dp 时生效)
平板版为同名文件 layout-sw600dp/activity_gjc_weighing_start.xml。
变量与平板一致(仅 viewModel);平板独有 id(etWeight / mainFloatButton / maskView /
subButton1 / subButton2)手机变体不存在,Activity 中已判空处理。
交互差异(业务逻辑全部复用 GjcWeighingStartViewModel):
· 手机版从待计重卡片进入(必带 maWbId),故不做运单号输入行
· 平板「地磅称重」输入 → 手机直接编辑「运抵重量」(同一 arriveWeight 字段)
· 平板「托盘车号」→ 手机按设计稿为「托盘数量」+「托盘自重」(默认 18kg),
提交 trayNumber / trayTotalWeight(= 数量 × 自重),与平板端托盘口径一致
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<import type="com.lukouguoji.module_base.ui.weight.phone.PhoneFormRowType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcWeighingStartViewModel" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_page_bg"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingBottom="16dp">
<!-- ============ 头部卡片:运单号 + 预配统计 ============ -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp"
android:background="@drawable/bg_phone_card"
android:orientation="vertical">
<!-- 顶部主色描边条 -->
<View
android:layout_width="match_parent"
android:layout_height="5dp"
android:background="@drawable/bg_phone_card_top_accent" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="14dp">
<!-- 运单号行 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<View
android:layout_width="8dp"
android:layout_height="8dp"
android:background="@drawable/bg_phone_fab" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:text="@{viewModel.maWbBean.wbNo}"
android:textColor="@color/phone_text_strong"
android:textSize="20sp"
android:textStyle="bold"
tools:text="781333617" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/bg_phone_btn_weak"
android:paddingHorizontal="10dp"
android:paddingVertical="4dp"
android:text="国际出港"
android:textColor="@color/phone_primary"
android:textSize="12sp" />
</LinearLayout>
<!-- 预配统计 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneStatBox
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
label1='@{"预配件数"}'
label2='@{"预配重量"}'
label3='@{"预配体积"}'
value1="@{String.valueOf(viewModel.maWbBean.pc)}"
value2='@{viewModel.maWbBean.weight == null ? "--" : viewModel.maWbBean.weight + " kg"}'
value3='@{viewModel.maWbBean.volume == null ? "--" : viewModel.maWbBean.volume + " m³"}' />
</LinearLayout>
</LinearLayout>
<!-- ============ 表单卡片 ============ -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp"
android:background="@drawable/bg_phone_card"
android:orientation="vertical"
android:paddingHorizontal="14dp"
android:paddingVertical="4dp">
<!-- 运单号(与平板一致可输入,输入完成按运单号回查运单信息;新增计重从这里录入) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入运单号"}'
numeric="@{true}"
setRefreshCallBack="@{viewModel::onWaybillNoInputComplete}"
title='@{"运单号"}'
type="@{PhoneFormRowType.INPUT}"
value="@={viewModel.maWbBean.wbNo}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择通道号"}'
list="@{viewModel.channelList}"
required="@{true}"
title='@{"通道号"}'
type="@{PhoneFormRowType.SELECT}"
value="@={viewModel.channel}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择代理人"}'
list="@{viewModel.agentList}"
title='@{"代理人"}'
type="@{PhoneFormRowType.SELECT}"
value="@={viewModel.maWbBean.agentCode}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择特码"}'
list="@{viewModel.spCodeList}"
title='@{"特码"}'
type="@{PhoneFormRowType.SELECT}"
value="@={viewModel.maWbBean.spCode}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入运抵件数"}'
numeric="@{true}"
title='@{"运抵件数"}'
type="@{PhoneFormRowType.INPUT}"
value="@={viewModel.arrivePc}" />
<!-- 地磅重量(与平板右上角地磅称重一致):运抵重量 = 地磅重量 - 托盘数量 × 托盘自重,由 ViewModel 自动计算 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入地磅重量"}'
numeric="@{true}"
title='@{"地磅重量"}'
type="@{PhoneFormRowType.INPUT}"
value="@={viewModel.diBangWeight}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入运抵重量"}'
numeric="@{true}"
title='@{"运抵重量"}'
type="@{PhoneFormRowType.INPUT}"
value="@={viewModel.arriveWeight}" />
<!-- 运抵体积:随运抵重量自动计算,可手动修改(与平板一致) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入运抵体积"}'
numeric="@{true}"
title='@{"运抵体积"}'
type="@{PhoneFormRowType.INPUT}"
value="@={viewModel.arriveVolume}" />
<!-- 托盘数量 → trayNumber -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入托盘数量"}'
numeric="@{true}"
title='@{"托盘数量"}'
type="@{PhoneFormRowType.INPUT}"
value="@={viewModel.trayNumber}" />
<!-- 托盘自重(单个,默认 18kg)× 数量 → trayTotalWeight,参与运抵重量计算 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入托盘自重"}'
numeric="@{true}"
title='@{"托盘自重"}'
type="@{PhoneFormRowType.INPUT}"
value="@={viewModel.trayWeight}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择航班日期"}'
title='@{"航班日期"}'
type="@{PhoneFormRowType.DATE}"
value="@={viewModel.flightDate}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入航班号"}'
title='@{"航班号"}'
type="@{PhoneFormRowType.INPUT}"
value="@={viewModel.maWbBean.fno}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入航程"}'
title='@{"航程"}'
type="@{PhoneFormRowType.INPUT}"
value="@={viewModel.maWbBean.range}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择业务类型"}'
list="@{viewModel.businessTypeList}"
title='@{"业务类型"}'
type="@{PhoneFormRowType.SELECT}"
value="@={viewModel.maWbBean.businessType}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入平板车号"}'
setRefreshCallBack="@{viewModel::onCarIdInputComplete}"
title='@{"平板车"}'
type="@{PhoneFormRowType.INPUT}"
value="@={viewModel.maWbBean.carId}" />
<!-- 平板车自重:平板车号输入完成后回查,只读 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
title='@{"平板车自重"}'
type="@{PhoneFormRowType.TEXT}"
value="@{viewModel.carWeight}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入备注"}'
title='@{"备注"}'
type="@{PhoneFormRowType.INPUT}"
value="@={viewModel.pageRemark}" />
</LinearLayout>
</LinearLayout>
</ScrollView>
<!-- ============ 底部按钮:分托计重 / 完成计重 ============ -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:elevation="8dp"
android:orientation="horizontal"
android:paddingHorizontal="16dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_btn_outline"
android:gravity="center"
android:onClick="@{()-> viewModel.sortingWeighingClick()}"
android:text="分托计重"
android:textColor="@color/phone_primary"
android:textSize="16sp" />
<TextView
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_btn_primary"
android:gravity="center"
android:onClick="@{()-> viewModel.completeCheckInClick()}"
android:text="完成计重"
android:textColor="@color/white"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,253 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港计重 - 运单详情(5.5 寸手机版专属页面,无平板变体)
设计稿:documents/5.5寸手持端设计文件/03_出港计重/detail.html
结构:白色卡片「基本信息」 + 两列灰底字段网格(PhoneKvItem 套 bg_phone_stat_box)
「通道号」绑 /IntExpCheckIn/checked/pageQuery 出参 passageWay,空值由组件兜底显示 "-"。
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.GjcWeighingWbDetailViewModel" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_page_bg"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<!-- 基本信息卡片 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_phone_card"
android:orientation="vertical"
android:padding="16dp">
<!-- 卡片标题:蓝色竖条 + 基本信息 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="16dp"
android:background="@color/phone_primary" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="基本信息"
android:textColor="@color/phone_text_strong"
android:textSize="15sp"
android:textStyle="bold" />
</LinearLayout>
<!-- 运单号 / 件数 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"运单号"}'
value="@{viewModel.bean.wbNo}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"件数"}'
value="@{String.valueOf(viewModel.bean.pc)}" />
</LinearLayout>
<!-- 重量 / 特码 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"重量"}'
value='@{viewModel.bean.weight + " kg"}' />
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"特码"}'
value="@{viewModel.bean.spCode}" />
</LinearLayout>
<!-- 代理 / 航班日期 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"代理"}'
value="@{viewModel.bean.agentName}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"航班日期"}'
value="@{viewModel.bean.fdate}" />
</LinearLayout>
<!-- 航班号 / 航程 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"航班号"}'
value="@{viewModel.bean.fno}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"航程"}'
value="@{viewModel.bean.range}" />
</LinearLayout>
<!-- 业务类型 / 通道号 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"业务类型"}'
value="@{viewModel.bean.businessName.empty ? viewModel.bean.businessType : viewModel.bean.businessName}" />
<!-- 通道号:passageWay,空值兜底 "-" -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"通道号"}'
value="@{viewModel.bean.passageWay}" />
</LinearLayout>
<!-- 品名(半宽,与设计稿一致) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"品名"}'
value="@{viewModel.bean.goodsCn.empty ? viewModel.bean.goods : viewModel.bean.goodsCn}" />
<View
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginStart="12dp"
android:layout_weight="1" />
</LinearLayout>
<!-- 备注(整行) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:background="@drawable/bg_phone_stat_box"
android:padding="12dp"
title='@{"备注"}'
value="@{viewModel.bean.remark}" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</layout>

View File

@@ -1,249 +1,193 @@
<?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" />
<import type="com.lukouguoji.module_base.R" />
<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
hint='@{"请选择航班日期"}'
icon="@{@drawable/img_date}"
type="@{SearchLayoutType.DATE}"
value="@={viewModel.flightDate}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 航班号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入航班号"}'
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.flightNo}"
setUpperCaseAlphanumeric="@{true}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 运单号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入运单号"}'
icon="@{@drawable/img_scan}"
setOnIconClickListener="@{(v)-> viewModel.scanWaybill()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.waybillNo}"
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntExpArrive/queryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 分单号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入分单号"}'
icon="@{@drawable/img_scan}"
setOnIconClickListener="@{(v)-> viewModel.scanHaWb()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.hno}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 运抵状态 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择运抵状态"}'
list="@{viewModel.arrivalStatusList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.arrivalStatus}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 搜索按钮 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:paddingHorizontal="24dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
<!-- 全局展开/收起按钮 -->
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginStart="16dp"
android:onClick="@{()-> viewModel.toggleAllExpand()}"
android:padding="2dp"
android:scaleType="fitCenter"
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand_1 : R.drawable.ic_new_expand_1}"
android:contentDescription="展开/收起全部子列表" />
</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"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
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_arrive" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- 底部统计和操作按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@android:color/white"
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:onClick="@{()-> viewModel.checkAllClick()}"
android:orientation="horizontal">
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="全选"
android:textColor="@color/color_66"
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/bottom_tool_tips_text_color"
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/bottom_tool_tips_text_color"
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/bottom_tool_tips_text_color"
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="15dp"
android:onClick="@{()-> viewModel.resetDeclareClick()}"
android:text="状态重置" />
<TextView
style="@style/tv_bottom_btn"
android:layout_marginLeft="0dp"
android:layout_marginEnd="15dp"
android:onClick="@{()-> viewModel.deleteDeclareClick()}"
android:text="删除申报" />
<TextView
style="@style/tv_bottom_btn"
android:layout_marginLeft="0dp"
android:background="@drawable/bg_red_btn_bottom"
android:onClick="@{()-> viewModel.arriveReportClick()}"
android:text="运抵申报" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港运抵 —— 手机版布局(5.5 寸手持端,最小宽度 < 600dp 时生效)
平板版为同名文件 layout-sw600dp/activity_int_exp_arrive.xml,两者是同一布局的资源变体,
DataBinding 因此生成同一个 ActivityIntExpArriveBinding 类。
变体之间必须满足:
· DataBinding 变量完全一致:viewModel / activity
· 保留 Activity 中引用的控件 id:srl / rv
→ IntExpArriveViewModel 的业务逻辑与接口调用全部复用,平板端行为不受影响
交互差异(均复用既有 ViewModel 字段与接口,或为纯客户端拆分,零新增请求):
· 平板 4 个横排搜索条 → 手机顶部搜索框(运单号)+ 底部筛选弹层(航班日期/航班号/代理)
· 新增「待运抵 / 已运抵」Tab(客户端按 declareStatus 是否为空拆分,接口无此查询参数)
· 平板内嵌分单展开列表 → 手机「查看分单」按钮进入独立「分单明细」页
· 平板常驻底部全选+状态重置+删除申报+运抵申报 → 手机仅待运抵 Tab 显示全选+申报;
状态重置/回执改为卡片长按浮层(已运抵 Tab);删除申报设计稿未提供,手机端不可用
-->
<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="android.view.View" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.IntExpArriveViewModel" />
<variable
name="activity"
type="com.lukouguoji.gjc.activity.IntExpArriveActivity" />
</data>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_page_bg">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<!-- ==================== 搜索行 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingTop="16dp"
android:paddingBottom="12dp">
<com.lukouguoji.module_base.ui.weight.phone.PhoneSearchBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"搜索运单号"}'
setOnFilterClickListener="@{(v)-> activity.toggleFilterPanel()}"
setOnScanClickListener="@{(v)-> viewModel.scanWaybill()}"
setRefreshCallBack="@{viewModel::searchClick}"
upperCase="@{true}"
value="@={viewModel.waybillNo}" />
</LinearLayout>
<!-- ==================== 待运抵 / 已运抵 Tab ==================== -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneStatusTab
android:layout_width="match_parent"
android:layout_height="wrap_content"
counts="@{viewModel.arriveTabCounts}"
setOnTabChanged="@{()-> activity.onArriveTabChanged()}"
tabs="@{viewModel.arriveTabs}"
value="@={viewModel.currentTab}" />
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/phone_divider" />
<!-- ==================== 列表 ==================== -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingTop="4dp"
android:paddingBottom="12dp"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="2"
tools:listitem="@layout/item_int_exp_arrive" />
<!-- 空态(对应设计稿 empty-pending:图标 + 文案,按当前 Tab 切换) -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical"
android:visibility="@{viewModel.emptyVisiblePhone ? View.VISIBLE : View.GONE}">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_phone_clipboard"
android:tint="@color/phone_text_hint" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@{viewModel.emptyTextPhone}"
android:textColor="@color/phone_text_hint"
android:textSize="14sp"
tools:text="暂无待运抵的运单" />
</LinearLayout>
</FrameLayout>
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- ==================== 底部操作条(仅待运抵 Tab 显示) ==================== -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneBottomBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
actionText='@{"申报"}'
allChecked="@{viewModel.isAllCheckedPhone}"
countText='@{"已选 " + viewModel.selectedCountPhone + " 项"}'
android:visibility="@{`pending`.equals(viewModel.currentTab) ? View.VISIBLE : View.GONE}"
setOnActionClick="@{(v)-> viewModel.arriveReportClick()}"
setOnAllCheckClick="@{(v)-> viewModel.checkAllClickPhone()}" />
</LinearLayout>
<!-- ==================== 筛选弹层 ==================== -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="8dp"
panelVisible="@{activity.filterPanelVisible}"
setOnConfirmClick="@{(v)-> activity.confirmFilter()}"
setOnDismissClick="@{(v)-> activity.toggleFilterPanel()}"
setOnResetClick="@{(v)-> activity.resetFilter()}"
title='@{"筛选条件"}'>
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择航班日期"}'
title='@{"航班日期"}'
type="@{com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayoutType.DATE}"
value="@={viewModel.flightDate}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入航班号"}'
title='@{"航班号"}'
type="@{com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayoutType.INPUT}"
value="@={viewModel.flightNo}" />
<!-- 分单号(与平板搜索栏一致) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入分单号"}'
title='@{"分单号"}'
type="@{com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayoutType.INPUT}"
value="@={viewModel.hno}" />
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
</FrameLayout>
</layout>

View File

@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港运抵-回执内容 —— 5.5 寸手机版专属只读新页(平板端无对应页面)
数据来自主列表页已加载的 GjcMaWb.haWbList[].response / arrivalOpDate,零新增请求。
对应设计稿 documents/5.5寸手持端设计文件/04_出港运抵/receipt.html。
-->
<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="android.view.View" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.IntExpArriveReceiptViewModel" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_page_bg"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingTop="12dp"
android:paddingBottom="16dp"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="3"
tools:listitem="@layout/item_int_exp_arrive_receipt" />
<!-- 空态兜底(设计稿未覆盖:单分单入口常无回执内容,避免纯白屏) -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:orientation="vertical"
android:visibility="@{viewModel.receiptList.empty ? View.VISIBLE : View.GONE}">
<ImageView
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_phone_clipboard"
android:tint="@color/phone_text_hint" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="暂无回执内容"
android:textColor="@color/phone_text_hint"
android:textSize="14sp" />
</LinearLayout>
</FrameLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港运抵-分单明细 —— 5.5 寸手机版专属新页(平板端无对应页面,分单在平板上内嵌展开于主列表)
数据来自主列表页已加载的 GjcMaWb.haWbList(Intent 传入),不发起任何新增网络请求。
对应设计稿 documents/5.5寸手持端设计文件/04_出港运抵/suborder.html。
与设计稿的差异:
· 筛选弹层设计稿含"航班日期/航班号/代理"三项,但本页数据是单个运单的分单集合,
这三项在集合内恒为同一值,筛选无实际意义(判断为设计稿沿用主列表筛选组件模板未定制),
故只保留真正可筛选的「分单号」
· 搜索框设计稿占位符字面是"搜索运单号"(同样的模板复用),本页按实际语义改为"搜索分单号",
并去掉扫码图标(此场景无可扫描目标)
-->
<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>
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.IntExpArriveSubOrderViewModel" />
<variable
name="activity"
type="com.lukouguoji.gjc.activity.IntExpArriveSubOrderActivity" />
</data>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_page_bg">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<!-- ==================== 搜索行 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingTop="16dp"
android:paddingBottom="12dp">
<com.lukouguoji.module_base.ui.weight.phone.PhoneSearchBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"搜索分单号"}'
setOnFilterClickListener="@{(v)-> activity.toggleFilterPanel()}"
setRefreshCallBack="@{viewModel::searchClick}"
showScan="@{false}"
value="@={viewModel.hnoFilter}" />
</LinearLayout>
<!-- ==================== 列表 ==================== -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingTop="4dp"
android:paddingBottom="12dp"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="3"
tools:listitem="@layout/item_int_exp_arrive_sub_order" />
<!-- ==================== 底部操作条 ==================== -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneBottomBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
actionText='@{"申报"}'
allChecked="@{viewModel.isAllChecked}"
countText='@{"已选 " + viewModel.selectedCount + " / " + viewModel.displayList.size() + " 项"}'
setOnActionClick="@{(v)-> viewModel.declareClick()}"
setOnAllCheckClick="@{(v)-> activity.checkAllClick()}" />
</LinearLayout>
<!-- ==================== 筛选弹层 ==================== -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="8dp"
panelVisible="@{activity.filterPanelVisible}"
setOnConfirmClick="@{(v)-> activity.confirmFilter()}"
setOnDismissClick="@{(v)-> activity.toggleFilterPanel()}"
setOnResetClick="@{(v)-> activity.resetFilter()}"
title='@{"筛选条件"}'>
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入分单号"}'
title='@{"分单号"}'
type="@{com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayoutType.INPUT}"
value="@={viewModel.hnoFilter}" />
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
</FrameLayout>
</layout>

View File

@@ -1,206 +1,167 @@
<?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="android.view.View" />
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.IntExpMoveViewModel" />
<variable
name="activity"
type="com.lukouguoji.gjc.page.move.IntExpMoveActivity" />
</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='@{"请选择运单类型"}'
list="@{viewModel.awbTypeList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.awbType}" />
<!-- 承运人 -->
<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.by1}" />
<!-- 卸货站 -->
<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.dest1}" />
<!-- 移库状态 -->
<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.moveStateList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.moveState}" />
<!-- 运单号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:id="@+id/searchWaybillNo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
hint='@{"请输入运单号"}'
icon="@{@drawable/img_scan}"
setOnIconClickListener="@{(v)-> activity.scanWaybill()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.waybillNo}"
autoQueryEnabled="@{true}"
autoQueryUrl="@{`/IntExpMove/queryWbNoList`}"
autoQueryParamKey="@{`wbNo`}"
autoQueryMinLength="@{4}"
autoQueryMaxLength="@{8}"
autoQueryTitle="@{`选择运单号`}" />
<!-- 搜索按钮 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:paddingHorizontal="24dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
</LinearLayout>
</LinearLayout>
<!-- 列表 -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_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_move" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- 底部统计和操作按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/white"
android:gravity="center_vertical"
android:paddingHorizontal="15dp">
<!-- 全选按钮区域 (图标+文字) -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:onClick="@{()-> viewModel.toggleSelectAll()}">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="全选"
android:textColor="@color/c666666"
android:textSize="16sp" />
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginLeft="5dp"
android:src="@drawable/img_check_all_unchecked" />
</LinearLayout>
<!-- 统计信息 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="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/bottom_tool_tips_text_color"
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/bottom_tool_tips_text_color"
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/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
<!-- 移库按钮 -->
<TextView
android:id="@+id/btnMove"
style="@style/tv_bottom_btn"
android:text="移库"
android:visibility="visible" />
</LinearLayout>
</LinearLayout>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港移库 —— 手机版布局(5.5 寸手持端,最小宽度 < 600dp 时生效)
平板版为同名文件 layout-sw600dp/activity_int_exp_move.xml,两者是同一布局的资源变体,
DataBinding 因此生成同一个 ActivityIntExpMoveBinding 类。
变体之间必须满足:
· DataBinding 变量完全一致:viewModel / activity
· 保留 Activity 中引用的控件 id:srl / rv / btnMove
→ IntExpMoveViewModel 的业务逻辑与接口调用全部复用,平板端行为不受影响
交互差异(均复用既有 ViewModel 字段与接口):
· 平板 4 个横排搜索条 → 手机顶部搜索框(运单号)+ 底部筛选弹层(承运人 / 运单类型 / 特码)
· 「待移库 / 已移库」Tab 绑定既有 viewModel.moveState("0" 待移库 / "1" 已移库)
· 已移库 Tab 下隐藏底部操作条(与设计稿一致)
-->
<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="android.view.View" />
<import type="com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.IntExpMoveViewModel" />
<variable
name="activity"
type="com.lukouguoji.gjc.page.move.IntExpMoveActivity" />
</data>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_page_bg">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<!-- ==================== 搜索行 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingTop="16dp"
android:paddingBottom="12dp">
<com.lukouguoji.module_base.ui.weight.phone.PhoneSearchBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"搜索运单号"}'
setOnFilterClickListener="@{(v)-> activity.toggleFilterPanel()}"
setOnScanClickListener="@{(v)-> activity.scanWaybill()}"
setRefreshCallBack="@{viewModel::searchClick}"
upperCase="@{true}"
value="@={viewModel.waybillNo}" />
</LinearLayout>
<!-- ==================== 待移库 / 已移库 Tab ==================== -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneStatusTab
android:layout_width="match_parent"
android:layout_height="wrap_content"
counts="@{viewModel.moveStateCounts}"
setOnTabChanged="@{viewModel::searchClick}"
tabs="@{viewModel.moveStateTabs}"
value="@={viewModel.moveState}" />
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/phone_divider" />
<!-- ==================== 列表 ==================== -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingBottom="12dp"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="3"
tools:listitem="@layout/item_int_exp_move" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- ==================== 底部操作条(已移库 Tab 下隐藏) ==================== -->
<!--
不复用平板变体的 btnMove id:平板那边是 TextView,此处是 PhoneBottomBar,
同名不同类型会让 DataBinding 生成的字段类型退化。
因此 btnMove 仅存在于平板变体(Activity 侧判空调用),手机端走 setOnActionClick。
-->
<com.lukouguoji.module_base.ui.weight.phone.PhoneBottomBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
actionText='@{"移库"}'
allChecked="@{viewModel.isAllChecked}"
countText='@{"已选 " + viewModel.selectedCount + " 项"}'
setOnActionClick="@{(v)-> activity.showMoveConfirmDialog()}"
setOnAllCheckClick="@{(v)-> viewModel.toggleSelectAll()}"
android:visibility="@{`1`.equals(viewModel.moveState) ? View.GONE : View.VISIBLE}" />
</LinearLayout>
<!-- ==================== 筛选弹层 ==================== -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel
android:layout_width="match_parent"
android:layout_height="match_parent"
panelVisible="@{activity.filterPanelVisible}"
setOnConfirmClick="@{(v)-> activity.confirmFilter()}"
setOnDismissClick="@{(v)-> activity.toggleFilterPanel()}"
setOnResetClick="@{(v)-> activity.resetFilter()}"
title='@{"筛选条件"}'>
<!-- 承运人 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入承运人"}'
title='@{"承运人"}'
type="@{PhoneDataLayoutType.INPUT}"
value="@={viewModel.by1}" />
<!-- 卸货站(与平板搜索栏 dest1 一致) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入卸货站"}'
title='@{"卸货站"}'
type="@{PhoneDataLayoutType.INPUT}"
value="@={viewModel.dest1}" />
<!-- 运单类型 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择运单类型"}'
list="@{viewModel.awbTypeList}"
title='@{"运单类型"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={viewModel.awbType}" />
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
</FrameLayout>
</layout>

View File

@@ -1,13 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港移库详情/编辑 —— 手机版(5.5 寸手持端)
平板变体:layout-sw600dp/activity_int_exp_move_edit.xml,两者共用 IntExpMoveEditActivity / IntExpMoveEditViewModel。
详情(DetailsPageType.Details):列表卡片「查看详情」进入,全部只读;
编辑(DetailsPageType.Modify):列表卡片「编辑」进入(对应平板侧滑「编辑」),仅备注与交接图片可改。
样式沿用设计稿 05_出港移库「运单详情」:蓝色表头卡片 + 两列字段网格;移库人/移库时间取列表数据(listBean)。
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
<import type="com.lukouguoji.module_base.common.DetailsPageType" />
<import type="com.lukouguoji.module_base.ui.weight.phone.PhoneFormRowType" />
<import type="android.view.View" />
<variable
@@ -18,242 +26,307 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_f2"
android:background="@color/phone_page_bg"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="15dp">
android:padding="16dp">
<!-- ==================== 卡片一:运单基本信息 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical"
android:padding="15dp">
android:background="@drawable/bg_phone_card"
android:orientation="vertical">
<!-- 第一行:运单号、件数、重量(均只读) -->
<!-- 蓝色表头:运单号 + 移交状态 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
android:background="@drawable/bg_phone_card_header_blue"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="16dp"
android:paddingVertical="12dp">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"运单号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.wbNo}' />
android:text="@{viewModel.dataBean.wbNo}"
android:textColor="@color/white"
android:textSize="17sp"
android:textStyle="bold" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"件数"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.pc == null ? "" : String.valueOf(viewModel.dataBean.pc)}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.weight == null ? "" : String.valueOf(viewModel.dataBean.weight)}' />
</LinearLayout>
<!-- 第二行:特码、代理人、品名(均只读) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"特码"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.spCode}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"代理人"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.agentCode}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"品名"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.goods}' />
</LinearLayout>
<!-- 第三行:出运路径、运单类型、承运人(均只读,字段名以 /IntExpMove/detail 文档为准) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"出运路径"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.range}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"运单类型"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.awbTypeName}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"承运人"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.by}' />
</LinearLayout>
<!-- 第四行:移交状态(只读)、备注(编辑模式可编辑) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"移交状态"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.moveStateText}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
enable="@{viewModel.pageType != DetailsPageType.Details}"
hint='@{"请输入备注"}'
title='@{"备注"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.remark}' />
</LinearLayout>
<!-- 交接图片区域:label 在左,图片在右 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:orientation="horizontal">
<View
android:layout_width="8dp"
android:layout_height="8dp"
android:layout_marginEnd="6dp"
android:background="@{viewModel.dataBean.moveState == 1 ? @drawable/bg_phone_dot_green : @drawable/bg_phone_dot_gray}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="交接图片"
android:textColor="@color/text_gray"
completeSpace="@{5}" />
android:text="@{viewModel.dataBean.moveStateText}"
android:textColor="@color/white"
android:textSize="14sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_images"
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<!-- 运单类型(红标签) -->
<TextView
android:layout_width="wrap_content"
android:layout_height="22dp"
android:background="@drawable/bg_phone_tag_red"
android:gravity="center"
android:paddingHorizontal="8dp"
android:text='@{viewModel.dataBean.awbTypeName == null || viewModel.dataBean.awbTypeName.empty ? "-" : viewModel.dataBean.awbTypeName}'
android:textColor="@color/phone_tag_red_text"
android:textSize="12sp"
android:textStyle="bold" />
<!-- 品名(主字段大字) -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
android:text='@{viewModel.dataBean.goods == null || viewModel.dataBean.goods.empty ? "-" : viewModel.dataBean.goods}'
android:textColor="@color/phone_text_strong"
android:textSize="22sp"
android:textStyle="bold" />
<!-- 第 1 行:件数 / 重量 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
title='@{"件数"}'
value='@{viewModel.dataBean.pc == null ? "" : String.valueOf(viewModel.dataBean.pc)}' />
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_weight="1"
title='@{"重量"}'
value='@{viewModel.dataBean.weight == null ? "" : String.valueOf(viewModel.dataBean.weight) + " kg"}' />
</LinearLayout>
<!-- 第 2 行:特码 / 代理人 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
title='@{"特码"}'
value="@{viewModel.dataBean.spCode}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_weight="1"
title='@{"代理人"}'
value="@{viewModel.dataBean.agentCode}" />
</LinearLayout>
<!-- 第 3 行:出运路径 / 承运人 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
title='@{"出运路径"}'
value="@{viewModel.dataBean.range}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_weight="1"
title='@{"承运人"}'
value="@{viewModel.dataBean.by}" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- ==================== 卡片二:移库信息(列表数据,仅已移库显示) ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@drawable/bg_phone_card"
android:orientation="vertical"
android:visibility="@{viewModel.listBean != null &amp;&amp; viewModel.listBean.isMoved ? View.VISIBLE : View.GONE}">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_phone_card_header_green"
android:paddingHorizontal="16dp"
android:paddingVertical="10dp"
android:text="移库信息"
android:textColor="@color/white"
android:textSize="15sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingHorizontal="16dp"
android:paddingVertical="12dp">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:overScrollMode="never"
itemLayoutId="@{viewModel.imageItemLayoutId}"
viewHolder="@{viewModel.imageItemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="9" />
title='@{"移库人"}'
value="@{viewModel.listBean.opUserDisplay}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_weight="1"
title='@{"移库时间"}'
value="@{viewModel.listBean.opdate}" />
</LinearLayout>
</LinearLayout>
<!-- ==================== 卡片三:备注 + 交接图片(编辑态可改) ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@drawable/bg_phone_card"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingBottom="12dp">
<com.lukouguoji.module_base.ui.weight.phone.PhoneFormRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
enable="@{viewModel.pageType != DetailsPageType.Details}"
hint='@{"请输入备注"}'
title='@{"备注"}'
type="@{viewModel.pageType == DetailsPageType.Details ? PhoneFormRowType.TEXT : PhoneFormRowType.INPUT}"
value="@={viewModel.remark}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="交接图片"
android:textColor="@color/phone_text_label"
android:textSize="15sp" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_images"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:overScrollMode="never"
itemLayoutId="@{viewModel.imageItemLayoutId}"
viewHolder="@{viewModel.imageItemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="4" />
<!-- 详情模式下无图片时的占位提示 -->
<TextView
android:id="@+id/tv_no_image"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="48dp"
android:gravity="center"
android:text="暂无图片"
android:textColor="@color/text_gray"
android:textColor="@color/phone_text_hint"
android:textSize="14sp"
android:visibility="@{viewModel.showNoImage ? View.VISIBLE : View.GONE}" />
</LinearLayout>
<!-- 底部按钮(详情模式不显示) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_marginBottom="15dp"
android:gravity="center"
android:orientation="horizontal"
android:visibility="@{viewModel.pageType != DetailsPageType.Details ? View.VISIBLE : View.GONE}">
<TextView
style="@style/tv_bottom_btn"
android:layout_width="120dp"
android:onClick="@{()-> viewModel.cancel()}"
android:text="取消" />
<TextView
style="@style/tv_bottom_btn"
android:layout_width="120dp"
android:onClick="@{()-> viewModel.submit()}"
android:text="保存" />
</LinearLayout>
</LinearLayout>
</ScrollView>
<!-- ==================== 底部按钮(编辑态显示):取消 / 保存 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:elevation="8dp"
android:orientation="horizontal"
android:paddingHorizontal="16dp"
android:paddingVertical="12dp"
android:visibility="@{viewModel.pageType != DetailsPageType.Details ? View.VISIBLE : View.GONE}">
<TextView
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_btn_weak"
android:gravity="center"
android:onClick="@{()-> viewModel.cancel()}"
android:text="取消"
android:textColor="@color/phone_primary"
android:textSize="16sp" />
<TextView
android:layout_width="0dp"
android:layout_height="44dp"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_btn_primary"
android:gravity="center"
android:onClick="@{()-> viewModel.submit()}"
android:text="保存"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -1,198 +1,165 @@
<?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.IntExpOutHandoverViewModel" />
</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
hint='@{"请选择航班日期"}'
icon="@{@drawable/img_date}"
type="@{SearchLayoutType.DATE}"
value="@={viewModel.flightDate}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 航班号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入航班号"}'
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.flightNo}"
setUpperCaseAlphanumeric="@{true}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 目的站 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入目的站"}'
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.fdest}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- ULD编号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入ULD编号"}'
icon="@{@drawable/img_scan}"
setOnIconClickListener="@{(v)-> viewModel.scanUld()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.uldNo}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 搜索按钮 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical|start"
android:orientation="horizontal"
android:paddingHorizontal="24dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
</LinearLayout>
</LinearLayout>
<!-- 列表 -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginHorizontal="10dp"
android:layout_marginTop="10dp"
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="3"
tools:listitem="@layout/item_int_exp_out_handover" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- 底部统计和操作按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@android:color/white"
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:onClick="@{()-> viewModel.checkAllClick()}"
android:orientation="horizontal">
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="全选"
android:textColor="@color/color_66"
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/bottom_tool_tips_text_color"
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/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold" />
</LinearLayout>
<!-- 允许装机按钮(多选) -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.allowLoadClick()}"
android:text="允许装机" />
<!-- 待配运按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.waitingTransClick()}"
android:text="配运" />
<!-- 交接完成按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> viewModel.completeHandover()}"
android:text="交接完成" />
</LinearLayout>
</LinearLayout>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港出库交接 —— 手机版布局(5.5 寸手持端,最小宽度 < 600dp 时生效)
平板版为同名文件 layout-sw600dp/activity_int_exp_out_handover.xml,两者是同一布局的资源变体,
DataBinding 因此生成同一个 ActivityIntExpOutHandoverBinding 类。
变体之间必须满足:
· DataBinding 变量完全一致:viewModel / activity
· 保留 Activity 中引用的控件 id:srl / rv
→ 因此 IntExpOutHandoverViewModel 的业务逻辑与接口调用全部复用,平板端行为不受影响
交互差异(均复用既有 ViewModel 字段与接口):
· 平板 4 个横排搜索条 → 手机顶部搜索框(ULD 编号)+ 底部筛选弹层(航班日期 / 航班号 / 交接人)
· 新增「待交接 / 已交接」Tab,绑定 viewModel.handoverState("0" 待交接 / "1" 已交接)
· 已交接 Tab 下隐藏底部操作条(与设计稿一致)
-->
<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="android.view.View" />
<import type="com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.IntExpOutHandoverViewModel" />
<variable
name="activity"
type="com.lukouguoji.gjc.activity.IntExpOutHandoverActivity" />
</data>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_page_bg">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<!-- ==================== 搜索行 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingTop="16dp"
android:paddingBottom="12dp">
<com.lukouguoji.module_base.ui.weight.phone.PhoneSearchBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"搜索ULD编号"}'
setOnFilterClickListener="@{(v)-> activity.toggleFilterPanel()}"
setOnScanClickListener="@{(v)-> viewModel.scanUld()}"
setRefreshCallBack="@{viewModel::searchClick}"
upperCase="@{true}"
value="@={viewModel.uldNo}" />
</LinearLayout>
<!-- ==================== 待交接 / 已交接 Tab ==================== -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneStatusTab
android:layout_width="match_parent"
android:layout_height="wrap_content"
counts="@{viewModel.handoverStateCounts}"
setOnTabChanged="@{viewModel::searchClick}"
tabs="@{viewModel.handoverStateTabs}"
value="@={viewModel.handoverState}" />
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/phone_divider" />
<!-- ==================== 列表 ==================== -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingBottom="12dp"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="3"
tools:listitem="@layout/item_int_exp_out_handover" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- ==================== 底部操作条(已交接 Tab 下隐藏) ==================== -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneBottomBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
actionText='@{"交接"}'
allChecked="@{viewModel.isAllChecked}"
countText='@{"已选 " + viewModel.selectedCount + " 项"}'
setOnActionClick="@{(v)-> viewModel.completeHandover()}"
setOnAllCheckClick="@{(v)-> viewModel.checkAllClick()}"
setOnSubAction1Click="@{(v)-> viewModel.allowLoadClick()}"
setOnSubAction2Click="@{(v)-> viewModel.waitingTransClick()}"
subAction1Text='@{"允许装机"}'
subAction2Text='@{"配运"}'
android:visibility="@{`1`.equals(viewModel.handoverState) ? View.GONE : View.VISIBLE}" />
</LinearLayout>
<!-- ==================== 筛选弹层 ==================== -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel
android:layout_width="match_parent"
android:layout_height="match_parent"
panelVisible="@{activity.filterPanelVisible}"
setOnConfirmClick="@{(v)-> activity.confirmFilter()}"
setOnDismissClick="@{(v)-> activity.toggleFilterPanel()}"
setOnResetClick="@{(v)-> activity.resetFilter()}"
title='@{"筛选条件"}'>
<!-- 航班日期 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择航班日期"}'
title='@{"航班日期"}'
type="@{PhoneDataLayoutType.DATE}"
value="@={viewModel.flightDate}" />
<!-- 航班号 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入航班号"}'
title='@{"航班号"}'
type="@{PhoneDataLayoutType.INPUT}"
value="@={viewModel.flightNo}" />
<!-- 目的站(与平板端查询参数 fdest 一致;后端不提供交接人查询入参) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入目的站"}'
title='@{"目的站"}'
type="@{PhoneDataLayoutType.INPUT}"
value="@={viewModel.fdest}" />
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
</FrameLayout>
</layout>

View File

@@ -0,0 +1,285 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港出库交接「板箱详情」—— 手机版专属页面(无平板变体)
对应设计稿 02_出库交接 的第二个页面「板箱详情」:
· 卡片一:蓝色表头(ULD 编号)+ 架子车号大字 + 两列字段网格(库位为橙色高亮标签)
· 卡片二:绿色表头「复磅信息」+ 复磅人/复磅时间,已交接时追加交接人/交接时间
字段全部由列表项带入,不额外请求接口。
-->
<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="viewModel"
type="com.lukouguoji.gjc.viewModel.IntExpOutHandoverDetailViewModel" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/phone_page_bg"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:fillViewport="true"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<!-- ==================== 卡片一:板箱基本信息 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_phone_card"
android:orientation="vertical">
<!-- 蓝色表头:ULD 编号 -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_phone_card_header_blue"
android:paddingHorizontal="16dp"
android:paddingVertical="12dp"
android:text="@{viewModel.dataBean.uld}"
android:textColor="@color/white"
android:textSize="17sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<!-- 架子车号(主字段大字) -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:text="@{viewModel.dataBean.carId}"
android:textColor="@color/phone_text_strong"
android:textSize="22sp"
android:textStyle="bold" />
<!-- 第 1 行:装机重 / 航班日期 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
title='@{"装机重"}'
value='@{String.valueOf((int)viewModel.dataBean.netWeight) + "kg"}' />
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_weight="1"
title='@{"航班日期"}'
value="@{viewModel.dataBean.fdateFormatted}" />
</LinearLayout>
<!-- 第 2 行:航班号 / 目的港 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
title='@{"航班号"}'
value="@{viewModel.dataBean.fno}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_weight="1"
title='@{"目的港"}'
value="@{viewModel.dataBean.fdest}" />
</LinearLayout>
<!-- 第 3 行:IMP代码 / 板型 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
title='@{"IMP代码"}'
value="@{viewModel.dataBean.dgrCode}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_weight="1"
title='@{"板型"}'
value="@{viewModel.dataBean.boardType}" />
</LinearLayout>
<!-- 第 4 行:库位(橙色高亮) / 备注 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
tag="@{true}"
title='@{"库位"}'
value="@{viewModel.dataBean.transArea}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_weight="1"
title='@{"备注"}'
value="@{viewModel.dataBean.remark}" />
</LinearLayout>
<!-- 第 5 行:装机状态(与平板列表「装机状态」一致) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
title='@{"装机状态"}'
value="@{viewModel.dataBean.allowLoadText}" />
<Space
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginStart="32dp"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- ==================== 卡片二:复磅信息 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:background="@drawable/bg_phone_card"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_phone_card_header_green"
android:paddingHorizontal="16dp"
android:paddingVertical="10dp"
android:text="复磅信息"
android:textColor="@color/white"
android:textSize="15sp"
android:textStyle="bold" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingVertical="12dp">
<!-- 复磅人 / 复磅时间 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
title='@{"复磅人"}'
value="@{viewModel.dataBean.wtUsername}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_weight="1"
title='@{"复磅时间"}'
value="@{viewModel.dataBean.wtDate}" />
</LinearLayout>
<!-- 交接人 / 交接时间(仅已交接时显示,与设计稿一致) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:orientation="horizontal"
android:visibility="@{viewModel.dataBean.isHandovered ? View.VISIBLE : View.GONE}">
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
title='@{"交接人"}'
value="@{viewModel.dataBean.hoUserName}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneKvItem
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_weight="1"
title='@{"交接时间"}'
value="@{viewModel.dataBean.hoDate}" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</layout>

View File

@@ -1,253 +1,288 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
国际出港仓库 —— 手机版布局(5.5 寸手持端,最小宽度 < 600dp 时生效)
平板版为同名文件 layout-sw600dp/activity_int_exp_storage_use.xml,两者是同一布局的资源变体,
DataBinding 因此生成同一个 ActivityIntExpStorageUseBinding 类。
变体之间必须满足:
· DataBinding 变量完全一致:viewModel / activity
· 保留 Activity 中引用的控件 id:srl / rv
· 平板独有的 checkIcon(底部全选)手机版不提供,Binding 基类中自动变 @Nullable
交互差异(均复用既有 IntExpStorageUseViewModel 字段与接口):
· 平板 5 个横排搜索条 → 手机顶部搜索框(运单号)+ 底部筛选弹层 4 项
(航班日期/航班号/库位/清仓结果,后端确认与平板端查询参数保持一致)
· 三格统计(总票数/未清仓/已清仓),后两格为手机专属统计请求(initPhoneExtras 开启,
复用 pageQueryTotal 按 clearNormal=0/1 各查一次)
· 平板底部批量操作条 → 手机卡片级操作按钮(见 item 布局),无全选/批量
-->
<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" />
<import type="android.view.View" />
<import type="com.lukouguoji.gjc.R" />
<import type="com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayoutType" />
<variable
name="viewModel"
type="com.lukouguoji.gjc.viewModel.IntExpStorageUseViewModel" />
<!-- 与平板变体保持一致(手机版卡片操作经 ViewHolder 调 Activity,XML 中不直接引用) -->
<variable
name="activity"
type="com.lukouguoji.gjc.activity.IntExpStorageUseActivity" />
</data>
<LinearLayout
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_f2"
android:orientation="vertical">
android:background="@color/phone_page_bg">
<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">
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/title_tool_bar" />
<!-- ==================== 搜索行 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingTop="16dp"
android:paddingBottom="12dp">
<com.lukouguoji.module_base.ui.weight.phone.PhoneSearchBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"搜索运单号"}'
setOnFilterClickListener="@{(v)-> viewModel.filterClick()}"
setOnScanClickListener="@{(v)-> viewModel.scanWbNo()}"
setRefreshCallBack="@{viewModel::searchClick}"
value="@={viewModel.wbNo}" />
</LinearLayout>
<!-- ==================== 三格统计:总票数 / 未清仓 / 已清仓 ==================== -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="12dp"
android:orientation="horizontal">
<!-- 总票数(蓝) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/bg_phone_card"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginVertical="12dp"
android:background="@color/phone_primary" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="12dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="总票数"
android:textColor="@color/phone_text_body"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@{viewModel.totalWbNumber}"
android:textColor="@color/phone_primary"
android:textSize="20sp"
android:textStyle="bold"
tools:text="8" />
</LinearLayout>
</LinearLayout>
<!-- 未清仓(橙) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_card"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginVertical="12dp"
android:background="@color/phone_tag_orange_text" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="12dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="未清仓"
android:textColor="@color/phone_text_body"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@{viewModel.unclearedCount}"
android:textColor="@color/phone_tag_orange_text"
android:textSize="20sp"
android:textStyle="bold"
tools:text="4" />
</LinearLayout>
</LinearLayout>
<!-- 已清仓(绿) -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_weight="1"
android:background="@drawable/bg_phone_card"
android:orientation="horizontal">
<View
android:layout_width="4dp"
android:layout_height="match_parent"
android:layout_marginVertical="12dp"
android:background="@color/phone_tag_green_text" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="12dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="已清仓"
android:textColor="@color/phone_text_body"
android:textSize="12sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@{viewModel.clearedCount}"
android:textColor="@color/phone_tag_green_text"
android:textSize="20sp"
android:textStyle="bold"
tools:text="4" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- ==================== 列表 ==================== -->
<com.scwang.smart.refresh.layout.SmartRefreshLayout
android:id="@+id/srl"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingTop="4dp"
android:paddingBottom="24dp"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="3"
tools:listitem="@layout/item_int_exp_storage_use" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout>
<!-- ==================== 筛选弹层(与平板端查询参数一致:航班日期/航班号/库位/清仓结果) ==================== -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="8dp"
panelVisible="@{viewModel.filterVisible}"
setOnConfirmClick="@{(v)-> viewModel.confirmFilter()}"
setOnDismissClick="@{(v)-> viewModel.closeFilter()}"
setOnResetClick="@{(v)-> viewModel.resetFilter()}"
title='@{"筛选条件"}'>
<!-- 航班日期 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择航班日期"}'
icon="@{@drawable/img_date}"
type="@{SearchLayoutType.DATE}"
value="@={viewModel.flightDate}"
android:layout_width="0dp"
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
hint='@{"请选择航班日期"}'
title='@{"航班日期"}'
type="@{PhoneDataLayoutType.DATE}"
value="@={viewModel.flightDate}" />
<!-- 航班号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入航班号"}'
setUpperCaseAlphanumeric="@{true}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.flightNo}"
android:layout_width="0dp"
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
hint='@{"请输入航班号"}'
title='@{"航班号"}'
type="@{PhoneDataLayoutType.INPUT}"
value="@={viewModel.flightNo}" />
<!-- 清仓综合结果 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
<!-- 库位(与平板端查询参数 location 一致) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请输入库位"}'
title='@{"库位"}'
type="@{PhoneDataLayoutType.INPUT}"
value="@={viewModel.location}" />
<!-- 清仓结果(与平板端查询参数 clearNormal 一致) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择清仓结果"}'
list="@{viewModel.clearResultList}"
type="@{SearchLayoutType.SPINNER}"
value="@={viewModel.clearResult}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
title='@{"清仓结果"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={viewModel.clearResult}" />
<!-- 运单号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
autoQueryEnabled="@{true}"
autoQueryMaxLength="@{8}"
autoQueryMinLength="@{4}"
autoQueryParamKey="@{`wbNo`}"
autoQueryTitle="@{`选择运单号`}"
autoQueryUrl="@{`/IntExpStorageUse/queryWbNoList`}"
hint='@{"请输入运单号"}'
icon="@{@drawable/img_scan}"
setOnIconClickListener="@{(v)-> viewModel.scanWbNo()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.wbNo}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</com.lukouguoji.module_base.ui.weight.phone.PhoneFilterPanel>
<!-- 库位号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入库位号"}'
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.location}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 搜索按钮 -->
<LinearLayout
android:layout_width="200dp"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="10dp">
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
<!-- 全局展开/收起按钮 -->
<ImageView
loadImage="@{viewModel.isAllExpanded ? R.drawable.ic_new_expand_1 : R.drawable.ic_new_expand_1}"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginStart="16dp"
android:contentDescription="展开/收起全部子列表"
android:onClick="@{()-> viewModel.toggleAllExpand()}"
android:padding="2dp"
android:scaleType="fitCenter" />
</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"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
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_storage_use" />
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
<!-- 底部统计和操作按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@android:color/white"
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:onClick="@{()-> viewModel.checkAllClick()}"
android:orientation="horizontal">
<ImageView
android:id="@+id/checkIcon"
setIVCheckAllImage="@{viewModel.isAllChecked}"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
android:src="@drawable/img_check_all_unchecked" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="全选"
android:textColor="@color/color_66"
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.totalWbNumber+"票"}'
android:textColor="@color/bottom_tool_tips_text_color"
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/bottom_tool_tips_text_color"
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/bottom_tool_tips_text_color"
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:onClick="@{()-> activity.showClearDialog()}"
android:text="清 仓" />
<!-- 修改库位按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> activity.showModifyStorageDialog()}"
android:text="修改库位" />
<!-- 出库按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> activity.showOutStorageDialog()}"
android:text="出 库" />
<!-- 入库按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> activity.showInStorageDialog()}"
android:text="入 库" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</FrameLayout>
</layout>

View File

@@ -1,8 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
删除申报弹框(手机版,5.5 寸手持端):底部弹层样式。
平板变体:layout-sw600dp/dialog_int_exp_arrive_delete.xml(居中弹框),
弹出位置由 IntExpArriveDeleteDialogModel 按设备形态选择 BOTTOM/CENTER。
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType"/>
<import type="com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayoutType" />
<variable
name="model"
@@ -11,128 +16,80 @@
</data>
<LinearLayout
android:layout_width="480dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_dialog_f2_radius_10"
android:gravity="center_horizontal"
android:orientation="vertical">
android:background="@drawable/bg_phone_panel_top"
android:orientation="vertical"
android:paddingHorizontal="20dp"
android:paddingTop="24dp"
android:paddingBottom="32dp">
<!-- 标题栏 -->
<!-- 标题行:标题居中 + 右上关闭 -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="24dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="删除原因"
android:textColor="@color/phone_text_strong"
android:textSize="18sp"
android:textStyle="bold" />
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="end|center_vertical"
android:onClick="@{()-> model.dismiss()}"
android:src="@drawable/ic_phone_close" />
</FrameLayout>
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择变更原因"}'
list="@{model.changeReasonList}"
required="@{true}"
title='@{"变更原因"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={model.changeReason}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
hint='@{"请输入联系人姓名"}'
required="@{true}"
title='@{"联系人姓名"}'
type="@{PhoneDataLayoutType.INPUT}"
value="@={model.contactName}" />
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
hint='@{"请输入联系人电话"}'
required="@{true}"
title='@{"联系人电话"}'
type="@{PhoneDataLayoutType.INPUT}"
value="@={model.contactPhone}" />
<!-- 确定按钮 -->
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/bg_primary_radius_top_10"
android:layout_height="48dp"
android:layout_marginTop="32dp"
android:background="@drawable/bg_phone_btn_primary"
android:gravity="center"
android:text="删除原因"
android:onClick="@{()-> model.onConfirmClick()}"
android:text="确定"
android:textColor="@color/white"
android:textSize="18sp"
android:textSize="16sp"
android:textStyle="bold" />
<!-- 表单内容 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="30dp"
android:layout_marginTop="30dp"
android:orientation="vertical">
<!-- 变更原因 -->
<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"
completeSpace="@{6}"
android:text="变更原因:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
type="@{SearchLayoutType.SPINNER}"
list="@{model.changeReasonList}"
value="@={model.changeReason}" />
</LinearLayout>
<!-- 联系人姓名 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{6}"
android:text="联系人姓名:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
<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="@={model.contactName}" />
</LinearLayout>
<!-- 联系人电话 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{6}"
android:text="联系人电话:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
<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="@={model.contactPhone}" />
</LinearLayout>
</LinearLayout>
<!-- 底部按钮 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginBottom="20dp">
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.dismiss()}"
android:text="取消" />
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.onConfirmClick()}"
android:text="确定" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -1,8 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
状态重置弹框(手机版,5.5 寸手持端)
对应设计稿 04_出港运抵/main.html 的 reset-sheet 底部弹层:
标题「重置状态」+ 右上关闭 + 「状态」下拉 + 全宽主色「确定」按钮。
平板变体:layout-sw600dp/dialog_int_exp_arrive_reset.xml(居中弹框),
弹出位置由 IntExpArriveResetDialogModel 按设备形态选择 BOTTOM/CENTER。
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType"/>
<import type="com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayoutType" />
<variable
name="model"
@@ -11,77 +19,60 @@
</data>
<LinearLayout
android:layout_width="480dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_dialog_f2_radius_10"
android:gravity="center_horizontal"
android:orientation="vertical">
android:background="@drawable/bg_phone_panel_top"
android:orientation="vertical"
android:paddingHorizontal="20dp"
android:paddingTop="24dp"
android:paddingBottom="32dp">
<!-- 标题栏 -->
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/bg_primary_radius_top_10"
android:gravity="center"
android:text="状态重置"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
<!-- 表单内容 -->
<LinearLayout
<!-- 标题行:标题居中 + 右上关闭 -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="30dp"
android:layout_marginTop="30dp"
android:orientation="vertical">
android:layout_marginBottom="24dp">
<!-- 重置状态 -->
<LinearLayout
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
android:gravity="center"
android:text="重置状态"
android:textColor="@color/phone_text_strong"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="重置状态:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="end|center_vertical"
android:onClick="@{()-> model.dismiss()}"
android:src="@drawable/ic_phone_close" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
type="@{SearchLayoutType.SPINNER}"
hint='@{"请选择重置状态"}'
list="@{model.resetStatusList}"
value="@={model.selectedResetStatus}" />
</FrameLayout>
</LinearLayout>
</LinearLayout>
<!-- 底部按钮 -->
<LinearLayout
android:layout_width="wrap_content"
<!-- 状态下拉 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginBottom="20dp">
hint='@{"请选择状态"}'
list="@{model.resetStatusList}"
title='@{"状态"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={model.selectedResetStatus}" />
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.dismiss()}"
android:text="取消" />
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.onSaveClick()}"
android:text="确定" />
</LinearLayout>
<!-- 确定按钮 -->
<TextView
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginTop="32dp"
android:background="@drawable/bg_phone_btn_primary"
android:gravity="center"
android:onClick="@{()-> model.onSaveClick()}"
android:text="确定"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
</layout>

View File

@@ -1,8 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
入库操作弹框(手机版,5.5 寸手持端):底部弹层样式。
平板变体:layout-sw600dp/dialog_int_exp_in_storage.xml(居中弹框),
弹出位置由 IntExpInStorageDialogModel 按设备形态选择 BOTTOM/CENTER。
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType"/>
<import type="com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayoutType" />
<variable
name="model"
@@ -11,131 +16,88 @@
</data>
<LinearLayout
android:layout_width="480dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_dialog_f2_radius_10"
android:gravity="center_horizontal"
android:orientation="vertical">
android:background="@drawable/bg_phone_panel_top"
android:orientation="vertical"
android:paddingHorizontal="20dp"
android:paddingTop="24dp"
android:paddingBottom="32dp">
<!-- 标题栏 -->
<TextView
<!-- 标题行:标题居中 + 右上关闭 -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/bg_primary_radius_top_10"
android:gravity="center"
android:text="入库操作"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
android:layout_height="wrap_content"
android:layout_marginBottom="24dp">
<!-- 表单内容 -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="入库操作"
android:textColor="@color/phone_text_strong"
android:textSize="18sp"
android:textStyle="bold" />
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="end|center_vertical"
android:onClick="@{()-> model.dismiss()}"
android:src="@drawable/ic_phone_close" />
</FrameLayout>
<!-- 库位号下拉 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择库位"}'
list="@{model.locationList}"
title='@{"库位号"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={model.selectedLocationCode}" />
<!-- 件数 / 重量(与平板一致,默认取选中运单的件数/重量)-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="30dp"
android:layout_marginTop="30dp"
android:orientation="vertical">
<!-- 库位号 -->
<LinearLayout
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:id="@+id/pc_input_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
android:layout_marginTop="20dp"
hint='@{"请输入件数"}'
title='@{"件数"}'
type="@{PhoneDataLayoutType.INPUT}"
value="@={model.pc}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="库位号:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
type="@{SearchLayoutType.SPINNER}"
hint='@{"请选择库位"}'
list="@{model.locationList}"
value="@={model.selectedLocationCode}" />
</LinearLayout>
<!-- 件数 -->
<LinearLayout
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:id="@+id/weight_input_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
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" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:id="@+id/pc_input"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
type="@{SearchLayoutType.INPUT}"
hint='@{"请输入件数"}'
value="@={model.pc}" />
</LinearLayout>
<!-- 重量 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
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" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:id="@+id/weight_input"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
type="@{SearchLayoutType.INPUT}"
hint='@{"请输入重量"}'
value="@={model.weight}" />
</LinearLayout>
android:layout_marginTop="20dp"
hint='@{"请输入重量"}'
title='@{"重量"}'
type="@{PhoneDataLayoutType.INPUT}"
value="@={model.weight}" />
</LinearLayout>
<!-- 底部按钮 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginBottom="20dp">
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.dismiss()}"
android:text="取消" />
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.onSaveClick()}"
android:text="确定" />
</LinearLayout>
<!-- 确定按钮 -->
<TextView
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginTop="32dp"
android:background="@drawable/bg_phone_btn_primary"
android:gravity="center"
android:onClick="@{()-> model.onSaveClick()}"
android:text="确定"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
</layout>

View File

@@ -1,8 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
修改库位弹框(手机版,5.5 寸手持端):底部弹层样式。
平板变体:layout-sw600dp/dialog_int_exp_modify_storage.xml(居中弹框,由列表勾选唯一库位后打开,
无「原库位」项);手机为卡片级操作,运单可能有多个库位,弹层内先单选「原库位」再选新库位。
弹出位置由 IntExpModifyStorageDialogModel 按设备形态选择 BOTTOM/CENTER。
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType"/>
<import type="com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayoutType" />
<variable
name="model"
@@ -11,77 +17,71 @@
</data>
<LinearLayout
android:layout_width="480dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_dialog_f2_radius_10"
android:gravity="center_horizontal"
android:orientation="vertical">
android:background="@drawable/bg_phone_panel_top"
android:orientation="vertical"
android:paddingHorizontal="20dp"
android:paddingTop="24dp"
android:paddingBottom="32dp">
<!-- 标题栏 -->
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/bg_primary_radius_top_10"
android:gravity="center"
android:text="库位信息"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold" />
<!-- 表单内容 -->
<LinearLayout
<!-- 标题行:标题居中 + 右上关闭 -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="30dp"
android:layout_marginTop="30dp"
android:orientation="vertical">
android:layout_marginBottom="24dp">
<!-- 库位号 -->
<LinearLayout
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
android:gravity="center"
android:text="修改库位"
android:textColor="@color/phone_text_strong"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
completeSpace="@{5}"
android:text="库位号:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="end|center_vertical"
android:onClick="@{()-> model.dismiss()}"
android:src="@drawable/ic_phone_close" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
type="@{SearchLayoutType.SPINNER}"
hint='@{"请选择库位"}'
list="@{model.locationList}"
value="@={model.selectedLocationCode}" />
</FrameLayout>
</LinearLayout>
</LinearLayout>
<!-- 底部按钮 -->
<LinearLayout
android:layout_width="wrap_content"
<!-- 原库位(手机卡片级操作专属:该运单的库位列表,单库位时默认选中) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginBottom="20dp">
hint='@{"请选择原库位"}'
list="@{model.sourceList}"
title='@{"原库位"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={model.selectedSourceId}" />
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.dismiss()}"
android:text="取消" />
<!-- 新库位下拉 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
hint='@{"请选择库位"}'
list="@{model.locationList}"
title='@{"新库位"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={model.selectedLocationCode}" />
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.onSaveClick()}"
android:text="确定" />
</LinearLayout>
<!-- 确定按钮 -->
<TextView
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginTop="32dp"
android:background="@drawable/bg_phone_btn_primary"
android:gravity="center"
android:onClick="@{()-> model.onSaveClick()}"
android:text="确定"
android:textColor="@color/white"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
</layout>

View File

@@ -1,8 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
清仓操作弹框(手机版,5.5 寸手持端):底部弹层样式。
平板变体:layout-sw600dp/dialog_int_exp_move_clear.xml(居中弹框),
弹出位置由 IntExpMoveClearDialogModel 按设备形态选择 BOTTOM/CENTER。
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType"/>
<import type="com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayoutType" />
<variable
name="model"
@@ -11,102 +16,70 @@
</data>
<LinearLayout
android:layout_width="480dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_dialog_f2_radius_10"
android:gravity="center_horizontal"
android:orientation="vertical">
android:background="@drawable/bg_phone_panel_top"
android:orientation="vertical"
android:paddingHorizontal="20dp"
android:paddingTop="24dp"
android:paddingBottom="32dp">
<!-- 标题栏 -->
<!-- 标题行:标题居中 + 右上关闭 -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="24dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="清仓操作"
android:textColor="@color/phone_text_strong"
android:textSize="18sp"
android:textStyle="bold" />
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="end|center_vertical"
android:onClick="@{()-> model.dismiss()}"
android:src="@drawable/ic_phone_close" />
</FrameLayout>
<!-- 清仓正常下拉 -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
hint='@{"请选择清仓正常"}'
list="@{model.clearNormalList}"
title='@{"清仓正常"}'
type="@{PhoneDataLayoutType.SPINNER}"
value="@={model.clearNormal}" />
<!-- 备注(与平板一致,提交为 clearRemark) -->
<com.lukouguoji.module_base.ui.weight.phone.PhoneDataLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
hint='@{"请输入备注"}'
title='@{"备注"}'
type="@{PhoneDataLayoutType.INPUT}"
value="@={model.clearRemark}" />
<!-- 确定按钮 -->
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@drawable/bg_primary_radius_top_10"
android:layout_height="48dp"
android:layout_marginTop="32dp"
android:background="@drawable/bg_phone_btn_primary"
android:gravity="center"
android:text="清仓操作"
android:onClick="@{()-> model.onSaveClick()}"
android:text="确定"
android:textColor="@color/white"
android:textSize="18sp"
android:textSize="16sp"
android:textStyle="bold" />
<!-- 表单内容 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="30dp"
android:layout_marginTop="30dp"
android:orientation="vertical">
<!-- 清仓正常 -->
<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"
completeSpace="@{5}"
android:text="清仓正常:"
android:textColor="@color/text_normal"
android:textSize="16sp" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
type="@{SearchLayoutType.SPINNER}"
list="@{model.clearNormalList}"
value="@={model.clearNormal}" />
</LinearLayout>
<!-- 备注 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
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" />
<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="@={model.clearRemark}" />
</LinearLayout>
</LinearLayout>
<!-- 底部按钮 -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginBottom="20dp">
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.dismiss()}"
android:text="取消" />
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()->model.onSaveClick()}"
android:text="确定" />
</LinearLayout>
</LinearLayout>
</layout>

Some files were not shown because too many files have changed in this diff Show More