Compare commits

..

7 Commits

Author SHA1 Message Date
f628ae64a9 fix: 国际出港查询页日期参数修正及仓储列表日期显示兜底
- 统计接口日期参数与列表接口统一为 beginDate/endDate
- 入库/出库时间 substring 前增加长度校验,防止 StringIndexOutOfBoundsException

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:21:44 +08:00
b2cc0059b3 feat: 实现国际进港电报详情页编辑与报文生成功能
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:13:30 +08:00
3f56614df8 feat: 对接国际进港电报解析生成接口
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 15:39:28 +08:00
e12e0db7be refactor: 优化国际进港电报解析列表项UI对齐设计稿
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 15:33:36 +08:00
0a9230860b feat: 国际进港电报解析接口对接及仓库/提取记录页面
- 电报解析:航班级联查询(自动填充目的站、始发站下拉)
- 电报解析:修复接口返回格式(PageInfo 非 BaseResultBean)
- 电报解析:报文类型必选校验
- 新增进港仓库、提取记录页面及菜单入口
- 修复 Spinner 空列表时 hint 不显示的问题

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 15:15:56 +08:00
e50ce25eb3 refactor: 国际进港4页面标准化及始发站筛选控件优化
- 统一 getData() 使用 handleListBean 替代手动分页处理
- 底部栏背景色统一为 @color/white
- 进港舱单删除弹窗改用 ConfirmDialogModel
- 进港舱单新增始发站 SPINNER 筛选控件
- 电报解析始发站和报文类型改为 SPINNER 下拉选择

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 13:17:13 +08:00
c0025c949f refactor: 重构 CLAUDE.md,精简内容并新增 6 种典型页面类型指南
- 从 1200+ 行精简到约 730 行,删除冗余代码模板和通用开发建议
- 新增基于 module_gjc 归纳的 6 种页面类型开发指南
- 新增自定义 Dialog 开发模式(BaseDialogModel)
- 压缩 DataBinding 规则、编译错误、Import 路径为精简表格

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 12:10:21 +08:00
51 changed files with 4123 additions and 2166 deletions

View File

@@ -55,7 +55,12 @@
"Bash(xargs:*)", "Bash(xargs:*)",
"Bash(unzip:*)", "Bash(unzip:*)",
"WebFetch(domain:gainscha.github.io)", "WebFetch(domain:gainscha.github.io)",
"WebFetch(domain:m.gainscha.com)" "WebFetch(domain:m.gainscha.com)",
"Bash(git add:*)",
"Bash(git commit:*)",
"WebFetch(domain:support.claude.com)",
"WebFetch(domain:api.apifox.com)",
"Bash(curl:*)"
], ],
"deny": [], "deny": [],
"ask": [] "ask": []

2516
CLAUDE.md

File diff suppressed because it is too large Load Diff

View File

@@ -419,6 +419,27 @@
android:exported="false" android:exported="false"
android:screenOrientation="userLandscape" /> android:screenOrientation="userLandscape" />
<!-- 国际进港-仓库 -->
<activity
android:name="com.lukouguoji.gjj.activity.IntImpStorageUseActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<!-- 国际进港-提取记录 -->
<activity
android:name="com.lukouguoji.gjj.activity.IntImpPickUpRecordActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<!-- 国际进港-提取详情 -->
<activity
android:name="com.lukouguoji.gjj.activity.IntImpPickUpRecordDetailsActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<service android:name="com.huitao.printer.service.PrinterService" /> <service android:name="com.huitao.printer.service.PrinterService" />
<service android:name="com.lukouguoji.gnc.bluetooth.service.AncillaryService" /> <service android:name="com.lukouguoji.gnc.bluetooth.service.AncillaryService" />
<service android:name="com.lukouguoji.gnc.bluetooth.service.MyService" /> <service android:name="com.lukouguoji.gnc.bluetooth.service.MyService" />

View File

@@ -451,6 +451,18 @@ class HomeFragment : Fragment() {
.navigation() .navigation()
} }
// 进港仓库
Constant.AuthName.GjjWareHouseActivity -> {
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GJJ_WARE_HOUSE)
.navigation()
}
// 提取记录
Constant.AuthName.IntImpPickUpRecord -> {
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_INT_IMP_PICK_UP_RECORD)
.navigation()
}
/** /**
* 航班查询 * 航班查询
*/ */
@@ -800,6 +812,20 @@ class HomeFragment : Fragment() {
"理货报告" "理货报告"
) )
) )
list.add(
RightMenu(
Constant.AuthName.GjjWareHouseActivity,
R.mipmap.gnj_cang_ku_icon,
"进港仓库"
)
)
list.add(
RightMenu(
Constant.AuthName.IntImpPickUpRecord,
R.mipmap.gnj_cang_ku_icon,
"提取记录"
)
)
} }
Constant.AuthName.Flight -> { Constant.AuthName.Flight -> {

View File

@@ -41,7 +41,7 @@ import me.jessyan.autosize.internal.CustomAdapt
* ========== 开发调试开关 ========== * ========== 开发调试开关 ==========
* TODO: 正式发布前务必设置为 false * TODO: 正式发布前务必设置为 false
*/ */
private const val DEV_AUTO_LOGIN = false // 自动登录开关 private const val DEV_AUTO_LOGIN = true // 自动登录开关
@Route(path = ARouterConstants.ACTIVITY_URL_LOGIN) @Route(path = ARouterConstants.ACTIVITY_URL_LOGIN)
class LoginActivity : BaseActivity(), class LoginActivity : BaseActivity(),

View File

@@ -49,6 +49,26 @@ fun bindAdapter(
if (hint.isNullOrEmpty()) { if (hint.isNullOrEmpty()) {
val adapter = ArrayAdapter(spinner.context, layoutId, list) val adapter = ArrayAdapter(spinner.context, layoutId, list)
spinner.adapter = adapter spinner.adapter = adapter
} else if (list.isEmpty()) {
// 列表为空时:控件上显示 hint 占位文字(灰色),下拉列表隐藏
// 不能用 SpinnerHintAdapter其 getCount()=0 会导致 Spinner 不渲染
val adapter = object : ArrayAdapter<String>(spinner.context, layoutId, listOf(hint)) {
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View {
val view = super.getView(position, convertView, parent)
(view as TextView).setTextColor(context.resources.getColor(R.color.text_gray_l))
return view
}
override fun getDropDownView(position: Int, convertView: View?, parent: ViewGroup): View {
// 下拉列表中隐藏 hint 项
val view = super.getDropDownView(position, convertView, parent)
view.visibility = View.GONE
view.layoutParams = ViewGroup.LayoutParams(0, 0)
return view
}
}
spinner.adapter = adapter
spinner.setSelection(0)
} else { } else {
val containHintList = list + hint val containHintList = list + hint
val adapter = SpinnerHintAdapter(spinner.context, layoutId, containHintList) val adapter = SpinnerHintAdapter(spinner.context, layoutId, containHintList)

View File

@@ -0,0 +1,37 @@
package com.lukouguoji.module_base.bean
import androidx.databinding.ObservableBoolean
import java.io.Serializable
/**
* 国际进港提取记录-列表数据Bean
* 对应API: IntImpPickUpRecord/pageQuery
*/
class IntImpPickUpRecordBean : Serializable {
var id: Long = 0 // 主键ID
var wbNo: String = "" // 运单号
var pc: Int = 0 // 件数
var weight: Double = 0.0 // 重量
var checkWeight: Double = 0.0 // 计重重量
var agentCode: String = "" // 代理人
var spCode: String = "" // 特码
var serviceFee: Double = 0.0 // 服务费
var storageFee: Double = 0.0 // 仓储费
var totalAmount: Double = 0.0 // 总金额
var pickUpTime: String = "" // 提取时间
var pickUpNo: String = "" // 提货编号
var infoFee: Double = 0.0 // 信息费
var drawFee: Double = 0.0 // 抽单费
var coldFee: Double = 0.0 // 冷藏费
var forkliftFee: Double = 0.0 // 铲车费
var tallyFee: Double = 0.0 // 理货费
var operator: String = "" // 办理人
var outTime: String = "" // 出库时间
// ========== UI扩展字段 ==========
val checked: ObservableBoolean = ObservableBoolean(false)
var isSelected: Boolean
get() = checked.get()
set(value) = checked.set(value)
}

View File

@@ -23,7 +23,8 @@ class MsgReceivePool(
var interfaceType: String = "" // 接口类型 var interfaceType: String = "" // 接口类型
) : BaseObservable(), ICheck { ) : BaseObservable(), ICheck {
// 选中状态 // 选中状态UI状态不参与序列化
@Transient
val checked = ObservableBoolean(false) val checked = ObservableBoolean(false)
override fun getCheckObservable() = checked override fun getCheckObservable() = checked

View File

@@ -270,6 +270,7 @@ interface Constant {
const val IntArrAirManifest = "AppIntArrAirManifest" //原始舱单 const val IntArrAirManifest = "AppIntArrAirManifest" //原始舱单
const val IntImpManifest = "AppIntImpManifest" //进港舱单 const val IntImpManifest = "AppIntImpManifest" //进港舱单
const val IntImpTally = "AppIntImpTally" //理货报告 const val IntImpTally = "AppIntImpTally" //理货报告
const val IntImpPickUpRecord = "AppIntImpPickUpRecord" //提取记录
const val GjjManifestListActivity = "AppIntExpManifest" //舱单 const val GjjManifestListActivity = "AppIntExpManifest" //舱单
const val GjjTallyListActivity = "AppIntExpTally" //理货 const val GjjTallyListActivity = "AppIntExpTally" //理货
const val GjjGoodsListActivity = "AppIntExpGjjGoods" //货物交接 const val GjjGoodsListActivity = "AppIntExpGjjGoods" //货物交接

View File

@@ -49,6 +49,7 @@ import com.lukouguoji.module_base.bean.GjjGoodsDetailsBean
import com.lukouguoji.module_base.bean.GjjGoodsTypeBean import com.lukouguoji.module_base.bean.GjjGoodsTypeBean
import com.lukouguoji.module_base.bean.GjjHandoverRecordBean import com.lukouguoji.module_base.bean.GjjHandoverRecordBean
import com.lukouguoji.module_base.bean.GjjImportTally import com.lukouguoji.module_base.bean.GjjImportTally
import com.lukouguoji.module_base.bean.IntImpPickUpRecordBean
import com.lukouguoji.module_base.bean.GjjManifest import com.lukouguoji.module_base.bean.GjjManifest
import com.lukouguoji.module_base.bean.GjjManifestBean import com.lukouguoji.module_base.bean.GjjManifestBean
import com.lukouguoji.module_base.bean.GjjPackTypeBean import com.lukouguoji.module_base.bean.GjjPackTypeBean
@@ -227,6 +228,12 @@ interface Api {
@POST("typeCode/intExp/agentCode") @POST("typeCode/intExp/agentCode")
suspend fun getIntExpAgentList(): DictListBean suspend fun getIntExpAgentList(): DictListBean
/**
* 获取代理人-国际进港-下拉框
*/
@POST("typeCode/intImp/agentCode")
suspend fun getIntImpAgentList(): DictListBean
/** /**
* 获取业务类型---CI:国内进港,CO:国内出港,II:国际进港,IO:国际出港 下拉框 * 获取业务类型---CI:国内进港,CO:国内出港,II:国际进港,IO:国际出港 下拉框
*/ */
@@ -891,6 +898,76 @@ interface Api {
@GET("typeCode/locationByFlag") @GET("typeCode/locationByFlag")
suspend fun getLocationList(@Query("flag") flag: Int): BaseResultBean<List<DictLocationBean>> suspend fun getLocationList(@Query("flag") flag: Int): BaseResultBean<List<DictLocationBean>>
/**
* 国际进港仓库-分页查询
* 接口路径: /IntImpStorageUse/pageQuery
*/
@POST("IntImpStorageUse/pageQuery")
suspend fun getIntImpStorageUseList(@Body data: RequestBody): PageInfo<GjcMaWb>
/**
* 国际进港仓库-分页合计
* 接口路径: /IntImpStorageUse/pageQueryTotal
*/
@POST("IntImpStorageUse/pageQueryTotal")
suspend fun getIntImpStorageUseTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
/**
* 国际进港库位操作-清仓
* 接口路径: /IntImpStorageUse/updateClear
*/
@POST("IntImpStorageUse/updateClear")
suspend fun clearIntImpStorage(@Body data: RequestBody): BaseResultBean<Boolean>
/**
* 国际进港库位操作-修改库位
* 接口路径: /IntImpStorageUse/modifyStorage
*/
@POST("IntImpStorageUse/modifyStorage")
suspend fun modifyIntImpStorage(@Body data: RequestBody): BaseResultBean<Boolean>
/**
* 国际进港库位操作-出库
* 接口路径: /IntImpStorageUse/outStorage
*/
@POST("IntImpStorageUse/outStorage")
suspend fun outIntImpStorage(@Body data: RequestBody): BaseResultBean<Boolean>
/**
* 国际进港库位操作-入库
* 接口路径: /IntImpStorageUse/inStorage
*/
@POST("IntImpStorageUse/inStorage")
suspend fun inIntImpStorage(@Body data: RequestBody): BaseResultBean<Boolean>
/**
* 国际进港提取记录-分页查询
* 接口路径: /IntImpPickUpRecord/pageQuery
*/
@POST("IntImpPickUpRecord/pageQuery")
suspend fun getIntImpPickUpRecordList(@Body data: RequestBody): PageInfo<IntImpPickUpRecordBean>
/**
* 国际进港提取记录-分页合计
* 接口路径: /IntImpPickUpRecord/pageQueryTotal
*/
@POST("IntImpPickUpRecord/pageQueryTotal")
suspend fun getIntImpPickUpRecordTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
/**
* 国际进港提取记录-清除提货
* 接口路径: /IntImpPickUpRecord/clearPickUp
*/
@POST("IntImpPickUpRecord/clearPickUp")
suspend fun clearIntImpPickUp(@Body data: RequestBody): BaseResultBean<Boolean>
/**
* 国际进港提取记录-详情
* 接口路径: /IntImpPickUpRecord/getDetails
*/
@POST("IntImpPickUpRecord/getDetails")
suspend fun getIntImpPickUpRecordDetails(@Body data: RequestBody): BaseResultBean<IntImpPickUpRecordBean>
/** /**
* 国际出港待计重-分页搜索 * 国际出港待计重-分页搜索
* 接口路径: /IntExpCheckIn/pageQuery * 接口路径: /IntExpCheckIn/pageQuery
@@ -1634,13 +1711,13 @@ interface Api {
* 分页查询国际进港电报 * 分页查询国际进港电报
*/ */
@POST("IntImpMsg/pageQuery") @POST("IntImpMsg/pageQuery")
suspend fun getIntImpMsgList(@Body data: RequestBody): BaseResultBean<PageInfo<MsgReceivePool>> suspend fun getIntImpMsgList(@Body data: RequestBody): PageInfo<MsgReceivePool>
/** /**
* 批量生成电报 * 解析电报(电报生成)
*/ */
@POST("IntImpMsg/batchGenerate") @POST("IntImpMsg/analyseMsg")
suspend fun batchGenerateMsg(@Body data: RequestBody): BaseResultBean<SimpleResultBean> suspend fun analyseMsg(@Body data: RequestBody): BaseResultBean<Boolean>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// 国际进港-原始舱单 // 国际进港-原始舱单

View File

@@ -160,6 +160,7 @@ object ARouterConstants {
const val ACTIVITY_URL_GJJ_WARE_HOUSE_INFO = "/gjj/GjjWareHouseInfoActivity" //国际进港模块 仓库详情 const val ACTIVITY_URL_GJJ_WARE_HOUSE_INFO = "/gjj/GjjWareHouseInfoActivity" //国际进港模块 仓库详情
const val ACTIVITY_URL_GJJ_CHU_KU_LIST = "/gjj/GjjChuKuListActivity" //国际进港 出库 const val ACTIVITY_URL_GJJ_CHU_KU_LIST = "/gjj/GjjChuKuListActivity" //国际进港 出库
const val ACTIVITY_URL_INT_IMP_PICK_UP_RECORD = "/gjj/IntImpPickUpRecordActivity" //国际进港 提取记录
const val ACTIVITY_URL_GJJ_QUERY_LIST = "/gjj/GjjQueryListActivity" //国际进港 查询 列表 const val ACTIVITY_URL_GJJ_QUERY_LIST = "/gjj/GjjQueryListActivity" //国际进港 查询 列表
const val ACTIVITY_URL_GJJ_QUERY_INFO = "/gjj/GnjQueryInfoActivity" //国际进港 查询 详情 const val ACTIVITY_URL_GJJ_QUERY_INFO = "/gjj/GnjQueryInfoActivity" //国际进港 查询 详情

View File

@@ -119,8 +119,8 @@ class GjcQueryViewModel : BasePageViewModel() {
// 构建查询参数(统计接口 - 使用相同的搜索条件) // 构建查询参数(统计接口 - 使用相同的搜索条件)
val totalParams = mapOf( val totalParams = mapOf(
"fdateStart" to flightDateStart.value!!.ifEmpty { null }, "beginDate" to flightDateStart.value!!.ifEmpty { null },
"fdateEnd" to flightDateEnd.value!!.ifEmpty { null }, "endDate" to flightDateEnd.value!!.ifEmpty { null },
"agentCode" to agentId.value!!.ifEmpty { null }, "agentCode" to agentId.value!!.ifEmpty { null },
"outState" to outStatus.value!!.ifEmpty { null }, "outState" to outStatus.value!!.ifEmpty { null },
"wbNo" to waybillNo.value!!.ifEmpty { null }, "wbNo" to waybillNo.value!!.ifEmpty { null },

View File

@@ -58,7 +58,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.5" android:layout_weight="1.5"
android:gravity="center" android:gravity="center"
android:text="@{bean.inDate != null ? String.valueOf(bean.inDate).substring(0, 16) : `--`}" 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="@android:color/black" android:textColor="@android:color/black"
android:textSize="14sp" /> android:textSize="14sp" />
@@ -78,7 +78,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.5" android:layout_weight="1.5"
android:gravity="center" android:gravity="center"
android:text="@{bean.outDate != null ? String.valueOf(bean.outDate).substring(0, 16) : `--`}" 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="@android:color/black" android:textColor="@android:color/black"
android:textSize="14sp" /> android:textSize="14sp" />

View File

@@ -29,7 +29,7 @@ import com.scwang.smart.refresh.layout.api.RefreshLayout
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
import java.util.* import java.util.*
@Route(path = ARouterConstants.ACTIVITY_URL_GJJ_WARE_HOUSE) //@Route(path = ARouterConstants.ACTIVITY_URL_GJJ_WARE_HOUSE)
class GjjWareHouseActivity : BaseActivity(), View.OnClickListener { class GjjWareHouseActivity : BaseActivity(), View.OnClickListener {
private lateinit var viewModel: GjjWareHouseListViewModel private lateinit var viewModel: GjjWareHouseListViewModel
private val currentTitleName = "国际进港仓库管理" private val currentTitleName = "国际进港仓库管理"

View File

@@ -4,10 +4,12 @@ import android.content.Context
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route import com.alibaba.android.arouter.facade.annotation.Route
import com.google.gson.Gson
import com.lukouguoji.gjj.R import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityIntArrTelegramDetailsBinding import com.lukouguoji.gjj.databinding.ActivityIntArrTelegramDetailsBinding
import com.lukouguoji.gjj.viewModel.IntArrTelegramDetailsViewModel import com.lukouguoji.gjj.viewModel.IntArrTelegramDetailsViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.MsgReceivePool
import com.lukouguoji.module_base.common.Constant import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.router.ARouterConstants import com.lukouguoji.module_base.router.ARouterConstants
@@ -23,8 +25,6 @@ class IntArrTelegramDetailsActivity : BaseBindingActivity<ActivityIntArrTelegram
override fun initOnCreate(savedInstanceState: Bundle?) { override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际进港电报详情") setBackArrow("国际进港电报详情")
binding.viewModel = viewModel binding.viewModel = viewModel
// 初始化数据
viewModel.initOnCreated(intent) viewModel.initOnCreated(intent)
} }
@@ -32,14 +32,14 @@ class IntArrTelegramDetailsActivity : BaseBindingActivity<ActivityIntArrTelegram
/** /**
* 启动电报详情页面 * 启动电报详情页面
* @param context 上下文 * @param context 上下文
* @param id 电报ID * @param bean 电报Bean
* @param flow 流向(接收0、发送1) * @param fid 航班ID
*/ */
@JvmStatic @JvmStatic
fun start(context: Context, id: String, flow: String) { fun start(context: Context, bean: MsgReceivePool, fid: String) {
val starter = Intent(context, IntArrTelegramDetailsActivity::class.java) val starter = Intent(context, IntArrTelegramDetailsActivity::class.java)
.putExtra(Constant.Key.ID, id) .putExtra(Constant.Key.DATA, Gson().toJson(bean))
.putExtra(Constant.Key.FLOW, flow) .putExtra("fid", fid)
context.startActivity(starter) context.startActivity(starter)
} }
} }

View File

@@ -0,0 +1,88 @@
package com.lukouguoji.gjj.activity
import android.app.Activity
import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AlertDialog
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityIntImpPickUpRecordBinding
import com.lukouguoji.gjj.viewModel.IntImpPickUpRecordViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.IntImpPickUpRecordBean
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.commonAdapter
import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.router.ARouterConstants
/**
* 国际进港-提取记录
*/
@Route(path = ARouterConstants.ACTIVITY_URL_INT_IMP_PICK_UP_RECORD)
class IntImpPickUpRecordActivity :
BaseBindingActivity<ActivityIntImpPickUpRecordBinding, IntImpPickUpRecordViewModel>() {
override fun layoutId() = R.layout.activity_int_imp_pick_up_record
override fun viewModelClass() = IntImpPickUpRecordViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际进港提取记录")
binding.viewModel = viewModel
binding.activity = this
// 观察全选状态,更新图标透明度
viewModel.isAllChecked.observe(this) { isAllChecked ->
binding.checkIcon.alpha = if (isAllChecked) 1.0f else 0.5f
}
// 绑定分页
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
// 监听刷新事件
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
viewModel.refresh()
}
// 初始化下拉列表
viewModel.initAgentList()
viewModel.initSpecialCodeList()
// 初始加载数据
viewModel.refresh()
}
/**
* 清除提货操作
*/
fun clearPickUp() {
val list = viewModel.pageModel.rv?.commonAdapter()?.items as? List<*> ?: return
val allItems = list.filterIsInstance<IntImpPickUpRecordBean>()
val selectedItems = allItems.filter { it.isSelected }
if (selectedItems.isEmpty()) {
showToast("请选择要清除提货的记录")
return
}
AlertDialog.Builder(this)
.setTitle("清除提货确认")
.setMessage("确定要清除选中的 ${selectedItems.size} 条提货记录吗?")
.setPositiveButton("确定") { _, _ ->
viewModel.clearPickUp(selectedItems)
}
.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) {
viewModel.wbNo.value = data?.getStringExtra(Constant.Result.CODED_CONTENT)
viewModel.searchClick()
}
}
}

View File

@@ -0,0 +1,35 @@
package com.lukouguoji.gjj.activity
import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityIntImpPickUpRecordDetailsBinding
import com.lukouguoji.gjj.viewModel.IntImpPickUpRecordDetailsViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.common.Constant
/**
* 国际进港-提取详情
*/
class IntImpPickUpRecordDetailsActivity :
BaseBindingActivity<ActivityIntImpPickUpRecordDetailsBinding, IntImpPickUpRecordDetailsViewModel>() {
override fun layoutId() = R.layout.activity_int_imp_pick_up_record_details
override fun viewModelClass() = IntImpPickUpRecordDetailsViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际进港提取详情")
binding.viewModel = viewModel
viewModel.initOnCreated(intent)
}
companion object {
@JvmStatic
fun start(context: Context, id: Long) {
val starter = Intent(context, IntImpPickUpRecordDetailsActivity::class.java)
.putExtra(Constant.Key.ID, id)
context.startActivity(starter)
}
}
}

View File

@@ -0,0 +1,178 @@
package com.lukouguoji.gjj.activity
import android.app.Activity
import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AlertDialog
import com.alibaba.android.arouter.facade.annotation.Route
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityIntImpStorageUseBinding
import com.lukouguoji.gjj.dialog.IntImpMoveClearDialogModel
import com.lukouguoji.gjj.dialog.IntImpModifyStorageDialogModel
import com.lukouguoji.gjj.dialog.IntImpInStorageDialogModel
import com.lukouguoji.gjj.viewModel.IntImpStorageUseViewModel
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.commonAdapter
import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.router.ARouterConstants
/**
* 国际进港-仓库
*/
@Route(path = ARouterConstants.ACTIVITY_URL_GJJ_WARE_HOUSE)
class IntImpStorageUseActivity :
BaseBindingActivity<ActivityIntImpStorageUseBinding, IntImpStorageUseViewModel>() {
override fun layoutId() = R.layout.activity_int_imp_storage_use
override fun viewModelClass() = IntImpStorageUseViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
setBackArrow("国际进港仓库")
binding.viewModel = viewModel
binding.activity = this
// 观察全选状态,更新图标透明度
viewModel.isAllChecked.observe(this) { isAllChecked ->
binding.checkIcon.alpha = if (isAllChecked) 1.0f else 0.5f
}
// 绑定分页
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
// 监听刷新事件
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
viewModel.refresh()
}
// 初始加载数据
viewModel.refresh()
}
/**
* 显示清仓操作对话框
*/
fun showClearDialog() {
val list = viewModel.pageModel.rv?.commonAdapter()?.items as? List<*> ?: return
val allItems = list.filterIsInstance<com.lukouguoji.module_base.bean.GjcMaWb>()
val maWbListForClear = allItems.mapNotNull { maWb ->
val selectedStorageList = maWb.storageUseList?.filter { it.isSelected } ?: emptyList()
if (selectedStorageList.isNotEmpty() || maWb.isSelected) {
maWb.copy(storageUseList = selectedStorageList)
} else {
null
}
}
if (maWbListForClear.isEmpty()) {
showToast("请至少选择一个库位")
return
}
IntImpMoveClearDialogModel { dialog ->
val clearNormal = dialog.clearNormal.value ?: ""
viewModel.performClear(clearNormal, maWbListForClear)
}.show(this)
}
/**
* 显示修改库位对话框
*/
fun showModifyStorageDialog() {
val list = viewModel.pageModel.rv?.commonAdapter()?.items as? List<*> ?: return
val allItems = list.filterIsInstance<com.lukouguoji.module_base.bean.GjcMaWb>()
val selectedStorageUseList = mutableListOf<com.lukouguoji.module_base.bean.GjcStorageUse>()
allItems.forEach { maWb ->
maWb.storageUseList?.filter { it.isSelected }?.let { selectedStorageUseList.addAll(it) }
}
when {
selectedStorageUseList.isEmpty() -> {
showToast("请选择要修改的库位")
return
}
selectedStorageUseList.size > 1 -> {
showToast("只能选择一个库位进行修改")
return
}
}
val selectedStorage = selectedStorageUseList[0]
IntImpModifyStorageDialogModel { dialog ->
val locationName = dialog.locationName
val locationId = dialog.locationId
viewModel.performModifyStorage(locationName, locationId, selectedStorage)
}.show(this)
}
/**
* 显示出库二次确认对话框
*/
fun showOutStorageDialog() {
val list = viewModel.pageModel.rv?.commonAdapter()?.items as? List<*> ?: return
val allItems = list.filterIsInstance<com.lukouguoji.module_base.bean.GjcMaWb>()
val selectedStorageUseList = mutableListOf<com.lukouguoji.module_base.bean.GjcStorageUse>()
allItems.forEach { maWb ->
maWb.storageUseList?.filter { it.isSelected }?.let { selectedStorageUseList.addAll(it) }
}
if (selectedStorageUseList.isEmpty()) {
showToast("请选择要出库的库位")
return
}
AlertDialog.Builder(this)
.setTitle("出库确认")
.setMessage("确定要将选中的 ${selectedStorageUseList.size} 个库位执行出库操作吗?")
.setPositiveButton("确定") { _, _ ->
viewModel.performOutStorage(selectedStorageUseList)
}
.setNegativeButton("取消", null)
.show()
}
/**
* 显示入库操作对话框
*/
fun showInStorageDialog() {
val list = viewModel.pageModel.rv?.commonAdapter()?.items as? List<*> ?: return
val allItems = list.filterIsInstance<com.lukouguoji.module_base.bean.GjcMaWb>()
val maWbListForInStorage = allItems.mapNotNull { maWb ->
val selectedStorageList = maWb.storageUseList?.filter { it.isSelected } ?: emptyList()
if (selectedStorageList.isNotEmpty() || maWb.isSelected) {
maWb.copy(storageUseList = selectedStorageList)
} else {
null
}
}
if (maWbListForInStorage.isEmpty()) {
showToast("请至少选择一个单据")
return
}
IntImpInStorageDialogModel { dialog ->
val locationName = dialog.locationName
val locationId = dialog.locationId
viewModel.performInStorage(locationName, locationId, maWbListForInStorage)
}.show(this)
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == Constant.RequestCode.WAYBILL && resultCode == Activity.RESULT_OK) {
viewModel.wbNo.value = data?.getStringExtra(Constant.Result.CODED_CONTENT)
viewModel.searchClick()
}
}
}

View File

@@ -0,0 +1,74 @@
package com.lukouguoji.gjj.dialog
import android.content.Context
import androidx.lifecycle.MutableLiveData
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.DialogIntImpInStorageBinding
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.ktx.verifyNullOrEmpty
import dev.utils.app.info.KeyValue
/**
* 国际进港仓库 - 入库操作对话框
*/
class IntImpInStorageDialogModel(
private val callback: (IntImpInStorageDialogModel) -> Unit
) : BaseDialogModel<DialogIntImpInStorageBinding>(DIALOG_TYPE_CENTER) {
// 库位列表
val locationList = MutableLiveData<List<KeyValue>>()
// 选中的库位存储的是code
val selectedLocationCode = MutableLiveData("")
// 库位ID (后端需要的code)
var locationId: String = ""
// 库位名称 (后端需要的name)
var locationName: String = ""
override fun layoutId(): Int {
return R.layout.dialog_int_imp_in_storage
}
override fun onDialogCreated(context: Context) {
binding.model = this
loadLocationList()
// 监听选择变化更新locationId和locationName
selectedLocationCode.observeForever { code ->
val selectedItem = locationList.value?.find { it.value == code }
locationId = selectedItem?.value ?: ""
locationName = selectedItem?.key ?: ""
}
}
/**
* 加载库位列表
*/
private fun loadLocationList() {
launchCollect({ NetApply.api.getLocationList(flag = 4) }) {
onSuccess = { result ->
val list = result.data?.map { it.toKeyValue() } ?: emptyList()
locationList.value = list
}
onFailed = { _, msg ->
showToast(msg ?: "加载库位列表失败")
}
}
}
/**
* 保存按钮点击
*/
fun onSaveClick() {
if (selectedLocationCode.value.verifyNullOrEmpty("请选择库位")) {
return
}
dismiss()
callback(this)
}
}

View File

@@ -0,0 +1,74 @@
package com.lukouguoji.gjj.dialog
import android.content.Context
import androidx.lifecycle.MutableLiveData
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.DialogIntImpModifyStorageBinding
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.ktx.verifyNullOrEmpty
import dev.utils.app.info.KeyValue
/**
* 国际进港 - 修改库位对话框
*/
class IntImpModifyStorageDialogModel(
private val callback: (IntImpModifyStorageDialogModel) -> Unit
) : BaseDialogModel<DialogIntImpModifyStorageBinding>(DIALOG_TYPE_CENTER) {
// 库位列表
val locationList = MutableLiveData<List<KeyValue>>()
// 选中的库位存储的是code
val selectedLocationCode = MutableLiveData("")
// 库位ID (后端需要的code)
var locationId: String = ""
// 库位名称 (后端需要的name)
var locationName: String = ""
override fun layoutId(): Int {
return R.layout.dialog_int_imp_modify_storage
}
override fun onDialogCreated(context: Context) {
binding.model = this
loadLocationList()
// 监听选择变化更新locationId和locationName
selectedLocationCode.observeForever { code ->
val selectedItem = locationList.value?.find { it.value == code }
locationId = selectedItem?.value ?: ""
locationName = selectedItem?.key ?: ""
}
}
/**
* 加载库位列表
*/
private fun loadLocationList() {
launchCollect({ NetApply.api.getLocationList(flag = 4) }) {
onSuccess = { result ->
val list = result.data?.map { it.toKeyValue() } ?: emptyList()
locationList.value = list
}
onFailed = { _, msg ->
showToast(msg ?: "加载库位列表失败")
}
}
}
/**
* 保存按钮点击
*/
fun onSaveClick() {
if (selectedLocationCode.value.verifyNullOrEmpty("请选择库位")) {
return
}
dismiss()
callback(this)
}
}

View File

@@ -0,0 +1,47 @@
package com.lukouguoji.gjj.dialog
import android.content.Context
import androidx.lifecycle.MutableLiveData
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.DialogIntImpMoveClearBinding
import com.lukouguoji.module_base.base.BaseDialogModel
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
import dev.utils.app.info.KeyValue
/**
* 国际进港移库 - 清仓操作对话框
*/
class IntImpMoveClearDialogModel(
private val callback: (IntImpMoveClearDialogModel) -> Unit
) : BaseDialogModel<DialogIntImpMoveClearBinding>(DIALOG_TYPE_CENTER) {
// 清仓正常(存储的是 code"0" 或 "1"
val clearNormal = MutableLiveData("")
// 清仓正常选项列表
val clearNormalList = MutableLiveData<List<KeyValue>>().apply {
value = listOf(
KeyValue("", "1"),
KeyValue("", "0")
)
}
override fun layoutId(): Int {
return R.layout.dialog_int_imp_move_clear
}
override fun onDialogCreated(context: Context) {
binding.model = this
}
/**
* 保存按钮点击
*/
fun onSaveClick() {
if (clearNormal.value.verifyNullOrEmpty("请选择清仓正常")) {
return
}
dismiss()
callback(this)
}
}

View File

@@ -5,9 +5,6 @@ import com.lukouguoji.gjj.databinding.ItemIntImpMsgParseBinding
import com.lukouguoji.module_base.base.BaseViewHolder import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.MsgReceivePool import com.lukouguoji.module_base.bean.MsgReceivePool
/**
* 国际进港电报解析列表项ViewHolder
*/
class IntImpMsgParseViewHolder(view: View) : class IntImpMsgParseViewHolder(view: View) :
BaseViewHolder<MsgReceivePool, ItemIntImpMsgParseBinding>(view) { BaseViewHolder<MsgReceivePool, ItemIntImpMsgParseBinding>(view) {
@@ -17,15 +14,12 @@ class IntImpMsgParseViewHolder(view: View) :
binding.position = position binding.position = position
binding.executePendingBindings() binding.executePendingBindings()
// 添加卡片点击事件 - 查看详情 // 卡片点击 - 查看详情
notifyItemClick(position, binding.cardView) notifyItemClick(position, binding.llContent)
// 添加选择图标点击事件 - 切换选择状态 // 选择框点击 - 切换选择状态
binding.ivCheck.setOnClickListener { binding.ivCheck.setOnClickListener {
// 反转checked状态
bean.checked.set(!bean.checked.get()) bean.checked.set(!bean.checked.get())
// 立即更新UI
binding.executePendingBindings() binding.executePendingBindings()
} }
} }

View File

@@ -0,0 +1,32 @@
package com.lukouguoji.gjj.holder
import android.view.View
import com.lukouguoji.gjj.activity.IntImpPickUpRecordDetailsActivity
import com.lukouguoji.gjj.databinding.ItemIntImpPickUpRecordBinding
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.IntImpPickUpRecordBean
/**
* 国际进港-提取记录 ViewHolder
*/
class IntImpPickUpRecordViewHolder(view: View) :
BaseViewHolder<IntImpPickUpRecordBean, ItemIntImpPickUpRecordBinding>(view) {
override fun onBind(item: Any?, position: Int) {
val bean = getItemBean(item) ?: return
binding.bean = bean
binding.position = position
binding.executePendingBindings()
// 图标点击切换选择状态
binding.ivIcon.setOnClickListener {
bean.checked.set(!bean.checked.get())
binding.executePendingBindings()
}
// 列表项点击进入提取详情
itemView.setOnClickListener {
IntImpPickUpRecordDetailsActivity.start(itemView.context, bean.id)
}
}
}

View File

@@ -0,0 +1,45 @@
package com.lukouguoji.gjj.holder
import android.view.View
import androidx.recyclerview.widget.RecyclerView
import com.lukouguoji.gjj.databinding.ItemIntImpStorageUseSubBinding
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.GjcMaWb
import com.lukouguoji.module_base.bean.GjcStorageUse
/**
* 国际进港-仓库 库位明细行 ViewHolder
*/
class IntImpStorageUseSubViewHolder(view: View) :
BaseViewHolder<GjcStorageUse, ItemIntImpStorageUseSubBinding>(view) {
override fun onBind(item: Any?, position: Int) {
val bean = getItemBean(item) ?: return
binding.bean = bean
binding.position = position
binding.executePendingBindings()
// 单选框点击切换选择状态(反向联动主列表)
binding.ivCheckbox.setOnClickListener {
// 切换子列表项的选择状态
val newCheckedState = !bean.checked.get()
bean.checked.set(newCheckedState)
binding.executePendingBindings()
// 反向联动主列表项(仅在勾选时联动)
updateParentCheckState(newCheckedState)
}
}
/**
* 更新父列表项的选择状态
*/
private fun updateParentCheckState(newCheckedState: Boolean) {
val recyclerView = itemView.parent as? RecyclerView ?: return
val parentBean = recyclerView.tag as? GjcMaWb ?: return
if (newCheckedState) {
parentBean.checked.set(true)
}
}
}

View File

@@ -0,0 +1,54 @@
package com.lukouguoji.gjj.holder
import android.view.View
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ItemIntImpStorageUseBinding
import com.lukouguoji.module_base.adapter.setCommonAdapter
import com.lukouguoji.module_base.base.BaseViewHolder
import com.lukouguoji.module_base.bean.GjcMaWb
import com.lukouguoji.module_base.ktx.refresh
/**
* 国际进港-仓库 ViewHolder
*/
class IntImpStorageUseViewHolder(view: View) :
BaseViewHolder<GjcMaWb, ItemIntImpStorageUseBinding>(view) {
override fun onBind(item: Any?, position: Int) {
val bean = getItemBean(item) ?: return
binding.bean = bean
binding.position = position
binding.executePendingBindings()
// 图标点击切换选择状态(联动子列表)
binding.ivIcon.setOnClickListener {
val newCheckedState = !bean.checked.get()
bean.checked.set(newCheckedState)
// 联动勾选/取消所有子列表项
bean.storageUseList?.forEach { storageUse ->
storageUse.checked.set(newCheckedState)
}
binding.executePendingBindings()
binding.rvSub.adapter?.notifyDataSetChanged()
}
// 展开按钮点击事件
binding.ivShow.setOnClickListener {
bean.showMore.set(!bean.showMore.get())
}
// 初始化库位明细子列表 RecyclerView
setCommonAdapter(
binding.rvSub,
IntImpStorageUseSubViewHolder::class.java,
R.layout.item_int_imp_storage_use_sub
)
// 刷新库位明细数据传递父Bean引用
val storageUseList = bean.storageUseList ?: emptyList()
binding.rvSub.tag = bean
binding.rvSub.refresh(storageUseList)
}
}

View File

@@ -267,19 +267,7 @@ class IntArrAirManifestViewModel : BasePageViewModel() {
// 获取列表带Loading // 获取列表带Loading
launchLoadingCollect({ NetApply.api.getIntArrAirManifestList(listParams) }) { launchLoadingCollect({ NetApply.api.getIntArrAirManifestList(listParams) }) {
onSuccess = { result -> onSuccess = { result ->
// 处理PageInfo结构 pageModel.handleListBean(result.data?.toBaseListBean())
val pageInfo = result.data
if (pageInfo != null) {
val list = pageInfo.list ?: emptyList()
val pages = pageInfo.pages ?: 1
// 处理分页数据
pageModel.handleDataList(list)
pageModel.haveMore.postValue(pages > pageModel.page)
} else {
pageModel.handleDataList(emptyList())
pageModel.haveMore.postValue(false)
}
} }
} }

View File

@@ -2,55 +2,74 @@ package com.lukouguoji.gjj.viewModel
import android.content.Intent import android.content.Intent
import androidx.lifecycle.MutableLiveData import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.google.gson.Gson
import com.lukouguoji.module_base.base.BaseViewModel import com.lukouguoji.module_base.base.BaseViewModel
import com.lukouguoji.module_base.bean.TelegramBean import com.lukouguoji.module_base.bean.MsgReceivePool
import com.lukouguoji.module_base.common.Constant 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.http.net.NetApply
import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.ktx.launchLoadingCollect import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.ktx.showToast import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.ktx.toRequestBody
import kotlinx.coroutines.launch
/** /**
* 国际进港电报详情 ViewModel * 国际进港电报详情 ViewModel
*/ */
class IntArrTelegramDetailsViewModel : BaseViewModel() { class IntArrTelegramDetailsViewModel : BaseViewModel() {
var id = "" private var fid = ""
var flow = "" private var msgBean: MsgReceivePool? = null
// 电报内容 // 电报内容(双向绑定)
val telegramContent = MutableLiveData<String>("") val telegramContent = MutableLiveData("")
// 是否可编辑(未生成时可编辑)
val isEditable = MutableLiveData(false)
/**
* 初始化
*/
fun initOnCreated(intent: Intent) { fun initOnCreated(intent: Intent) {
id = intent.getStringExtra(Constant.Key.ID) ?: "" fid = intent.getStringExtra("fid") ?: ""
flow = intent.getStringExtra(Constant.Key.FLOW) ?: "" val json = intent.getStringExtra(Constant.Key.DATA) ?: ""
if (id.isNotEmpty() && flow.isNotEmpty()) { if (json.isNotEmpty()) {
getData() val bean = Gson().fromJson(json, MsgReceivePool::class.java)
msgBean = bean
telegramContent.value = bean.teleContent
isEditable.value = !bean.isGenerated()
} }
} }
/** /**
* 获取电报详情 * 修改报文按钮点击 — 调用报文生成接口
*/
private fun getData() {
launchLoadingCollect({ NetApply.api.getTelegramDetails(flow, id) }) {
onSuccess = { result ->
val data = result.data
if (data is TelegramBean) {
telegramContent.value = data.teleContent
} else if (data is Map<*, *>) {
telegramContent.value = data["teleContent"]?.toString() ?: ""
}
}
}
}
/**
* 修改报文按钮点击
*/ */
fun onModifyClick() { fun onModifyClick() {
showToast("修改报文功能待实现") val bean = msgBean ?: return
val content = telegramContent.value ?: ""
if (content.isEmpty()) {
showToast("报文内容不能为空")
return
}
// 更新报文内容
bean.teleContent = content
val requestData = mapOf(
"fid" to fid.toLongOrNull(),
"msgList" to listOf(bean)
).toRequestBody()
launchLoadingCollect({ NetApply.api.analyseMsg(requestData) }) {
onSuccess = {
showToast("报文生成成功")
// 更新状态为已生成
bean.anaStatus = "1"
isEditable.value = false
// 通知列表刷新
viewModelScope.launch {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
}
}
}
} }
} }

View File

@@ -1,7 +1,5 @@
package com.lukouguoji.gjj.viewModel package com.lukouguoji.gjj.viewModel
import android.app.Activity
import androidx.appcompat.app.AlertDialog
import androidx.lifecycle.MutableLiveData import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.lukouguoji.gjj.R import com.lukouguoji.gjj.R
@@ -21,6 +19,8 @@ import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.ktx.noNull import com.lukouguoji.module_base.ktx.noNull
import com.lukouguoji.module_base.ktx.showToast import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.ktx.toRequestBody import com.lukouguoji.module_base.ktx.toRequestBody
import com.lukouguoji.module_base.model.ConfirmDialogModel
import dev.utils.app.info.KeyValue
import com.lukouguoji.module_base.model.ScanModel import com.lukouguoji.module_base.model.ScanModel
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
@@ -32,7 +32,9 @@ class IntImpManifestViewModel : BasePageViewModel() {
// ========== 搜索条件 ========== // ========== 搜索条件 ==========
val flightDate = MutableLiveData<String>(DateUtils.getCurrentTime().formatDate()) // 航班日期 val flightDate = MutableLiveData<String>(DateUtils.getCurrentTime().formatDate()) // 航班日期
val flightNo = MutableLiveData("") // 航班号 val flightNo = MutableLiveData("") // 航班号
val fdep = MutableLiveData("") // 始发站 val sendAddress = MutableLiveData("") // 始发站
val sendAddressList = MutableLiveData<List<KeyValue>>(emptyList())
val fdep = MutableLiveData("") // 目的站
val waybillNo = MutableLiveData("") // 运单号 val waybillNo = MutableLiveData("") // 运单号
// ========== 统计信息 ========== // ========== 统计信息 ==========
@@ -129,10 +131,10 @@ class IntImpManifestViewModel : BasePageViewModel() {
* 删除单个舱单 * 删除单个舱单
*/ */
private fun deleteManifest(bean: GjjManifest) { private fun deleteManifest(bean: GjjManifest) {
AlertDialog.Builder(getTopActivity()) ConfirmDialogModel(
.setTitle("提示") message = "确定要删除运单号 ${bean.getWaybillNo()} 的舱单吗?",
.setMessage("确定要删除运单号 ${bean.getWaybillNo()} 的舱单吗?") title = "提示"
.setPositiveButton("确定") { _, _ -> ) {
val params = mapOf("mfId" to bean.mfId).toRequestBody() val params = mapOf("mfId" to bean.mfId).toRequestBody()
launchLoadingCollect({ NetApply.api.gjjManifestDelete(params) }) { launchLoadingCollect({ NetApply.api.gjjManifestDelete(params) }) {
@@ -148,9 +150,7 @@ class IntImpManifestViewModel : BasePageViewModel() {
} }
} }
} }
} }.show()
.setNegativeButton("取消", null)
.show()
} }
/** /**
@@ -199,6 +199,7 @@ class IntImpManifestViewModel : BasePageViewModel() {
val filterParams = mapOf( val filterParams = mapOf(
"fdate" to flightDate.value?.ifEmpty { null }, "fdate" to flightDate.value?.ifEmpty { null },
"fno" to flightNo.value?.ifEmpty { null }, "fno" to flightNo.value?.ifEmpty { null },
"sendAddress" to sendAddress.value?.ifEmpty { null },
"fdep" to fdep.value?.ifEmpty { null }, "fdep" to fdep.value?.ifEmpty { null },
"wbNo" to waybillNo.value?.ifEmpty { null } "wbNo" to waybillNo.value?.ifEmpty { null }
) )
@@ -215,19 +216,7 @@ class IntImpManifestViewModel : BasePageViewModel() {
// 获取列表带Loading // 获取列表带Loading
launchLoadingCollect({ NetApply.api.getIntImpManifestList(listParams) }) { launchLoadingCollect({ NetApply.api.getIntImpManifestList(listParams) }) {
onSuccess = { result -> onSuccess = { result ->
// 处理PageInfo结构 pageModel.handleListBean(result.data?.toBaseListBean())
val pageInfo = result.data
if (pageInfo != null) {
val list = pageInfo.list ?: emptyList()
val pages = pageInfo.pages ?: 1
// 处理分页数据
pageModel.handleDataList(list)
pageModel.haveMore.postValue(pages > pageModel.page)
} else {
pageModel.handleDataList(emptyList())
pageModel.haveMore.postValue(false)
}
} }
} }

View File

@@ -5,16 +5,21 @@ import androidx.lifecycle.viewModelScope
import com.lukouguoji.gjj.R import com.lukouguoji.gjj.R
import dev.utils.common.DateUtils import dev.utils.common.DateUtils
import com.lukouguoji.module_base.ktx.formatDate import com.lukouguoji.module_base.ktx.formatDate
import com.lukouguoji.gjj.activity.IntArrTelegramDetailsActivity
import com.lukouguoji.gjj.holder.IntImpMsgParseViewHolder import com.lukouguoji.gjj.holder.IntImpMsgParseViewHolder
import com.lukouguoji.module_base.base.BasePageViewModel import com.lukouguoji.module_base.base.BasePageViewModel
import com.lukouguoji.module_base.bean.FlightBean
import com.lukouguoji.module_base.bean.MsgReceivePool import com.lukouguoji.module_base.bean.MsgReceivePool
import com.lukouguoji.module_base.common.ConstantEvent import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.http.net.NetApply import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.impl.FlowBus import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.ktx.commonAdapter import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.ktx.launchCollect
import com.lukouguoji.module_base.ktx.launchLoadingCollect import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.ktx.noNull
import com.lukouguoji.module_base.ktx.showToast import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.ktx.toRequestBody import com.lukouguoji.module_base.ktx.toRequestBody
import dev.utils.app.info.KeyValue
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
/** /**
@@ -26,8 +31,14 @@ class IntImpMsgParseViewModel : BasePageViewModel() {
val flightDate = MutableLiveData<String>(DateUtils.getCurrentTime().formatDate()) // 航班日期 val flightDate = MutableLiveData<String>(DateUtils.getCurrentTime().formatDate()) // 航班日期
val flightNo = MutableLiveData("") // 航班号 val flightNo = MutableLiveData("") // 航班号
val sendAddress = MutableLiveData("") // 发站(择始发站) val sendAddress = MutableLiveData("") // 发站(择始发站)
val receiveAddress = MutableLiveData("HFE") // 收报地址(目的站) val sendAddressList = MutableLiveData<List<KeyValue>>(emptyList())
val receiveAddress = MutableLiveData("") // 收报地址(目的站,由航班查询返回)
val msgType = MutableLiveData("") // 报文类型 val msgType = MutableLiveData("") // 报文类型
val msgTypeList = MutableLiveData<List<KeyValue>>(emptyList())
// ========== 航班查询 ==========
private var fid: String = "" // 航班ID
private var lastQueriedFlight = "" // 避免重复查询
// ========== 统计信息 ========== // ========== 统计信息 ==========
val totalCount = MutableLiveData("0") // 合计条数 val totalCount = MutableLiveData("0") // 合计条数
@@ -36,6 +47,12 @@ class IntImpMsgParseViewModel : BasePageViewModel() {
val isAllChecked = MutableLiveData(false) val isAllChecked = MutableLiveData(false)
init { init {
// 初始化报文类型静态数据
msgTypeList.value = listOf(
KeyValue("FFM", "FFM"),
KeyValue("FWB/FHL", "FWB/FHL")
)
// 监听全选状态,自动更新所有列表项 // 监听全选状态,自动更新所有列表项
isAllChecked.observeForever { checked -> isAllChecked.observeForever { checked ->
val list = pageModel.rv?.commonAdapter()?.items as? List<MsgReceivePool> ?: return@observeForever val list = pageModel.rv?.commonAdapter()?.items as? List<MsgReceivePool> ?: return@observeForever
@@ -44,6 +61,68 @@ class IntImpMsgParseViewModel : BasePageViewModel() {
} }
} }
// ========== 航班级联查询 ==========
fun onFlightDateInputComplete() {
lastQueriedFlight = ""
queryFlightIfReady()
}
fun onFlightNoInputComplete() {
queryFlightIfReady()
}
private fun queryFlightIfReady() {
val fdate = flightDate.value
val fno = flightNo.value
if (fdate.isNullOrEmpty() || fno.isNullOrEmpty()) return
val key = "$fdate-$fno"
if (key == lastQueriedFlight) return
lastQueriedFlight = key
launchCollect({
NetApply.api.getGjFlightBean(
mapOf(
"fdate" to fdate,
"fno" to fno,
"ieFlag" to "I",
).toRequestBody()
)
}) {
onSuccess = {
if (it.verifySuccess() && it.data != null) {
val flight = it.data!!
fid = flight.fid.noNull()
receiveAddress.value = flight.fdest.noNull()
// 构建始发站下拉列表fdep + jtz经停港
val list = mutableListOf(
KeyValue(flight.fdep.noNull(), flight.fdep.noNull()),
)
if (!flight.jtz.isNullOrEmpty()) {
list.add(KeyValue(flight.jtz.noNull(), flight.jtz.noNull()))
}
sendAddressList.value = list
sendAddress.value = flight.fdep.noNull()
} else {
fid = ""
receiveAddress.value = ""
sendAddressList.value = emptyList()
sendAddress.value = ""
showToast(it.msg.noNull("获取航班信息失败"))
}
}
onFailed = { _, _ ->
fid = ""
receiveAddress.value = ""
sendAddressList.value = listOf(KeyValue("全部", ""))
sendAddress.value = ""
}
}
}
// ========== 适配器配置 ========== // ========== 适配器配置 ==========
val itemViewHolder = IntImpMsgParseViewHolder::class.java val itemViewHolder = IntImpMsgParseViewHolder::class.java
val itemLayoutId = R.layout.item_int_imp_msg_parse val itemLayoutId = R.layout.item_int_imp_msg_parse
@@ -52,6 +131,10 @@ class IntImpMsgParseViewModel : BasePageViewModel() {
* 搜索按钮点击 * 搜索按钮点击
*/ */
fun searchClick() { fun searchClick() {
if (msgType.value.isNullOrEmpty()) {
showToast("请选择报文类型")
return
}
refresh() refresh()
} }
@@ -70,7 +153,7 @@ class IntImpMsgParseViewModel : BasePageViewModel() {
} }
/** /**
* 电报生成(批量操作 * 电报生成(解析电报
*/ */
fun generateMsg() { fun generateMsg() {
val list = pageModel.rv?.commonAdapter()?.items as? List<MsgReceivePool> ?: return val list = pageModel.rv?.commonAdapter()?.items as? List<MsgReceivePool> ?: return
@@ -81,11 +164,17 @@ class IntImpMsgParseViewModel : BasePageViewModel() {
return return
} }
// 提取选中项的ID列表 if (fid.isEmpty()) {
val ids = selectedItems.mapNotNull { it.id } showToast("请先查询航班信息")
val requestData = mapOf("ids" to ids).toRequestBody() return
}
launchLoadingCollect({ NetApply.api.batchGenerateMsg(requestData) }) { val requestData = mapOf(
"fid" to fid.toLongOrNull(),
"msgList" to selectedItems
).toRequestBody()
launchLoadingCollect({ NetApply.api.analyseMsg(requestData) }) {
onSuccess = { onSuccess = {
showToast("电报生成成功") showToast("电报生成成功")
viewModelScope.launch { viewModelScope.launch {
@@ -100,13 +189,18 @@ class IntImpMsgParseViewModel : BasePageViewModel() {
* 获取数据重写BasePageViewModel * 获取数据重写BasePageViewModel
*/ */
override fun getData() { override fun getData() {
// 构建搜索条件 // 构建搜索条件:优先用 fid否则用 fdate + fno
val filterParams = mutableMapOf( val filterParams = mutableMapOf<String, Any?>(
"fdate" to flightDate.value?.ifEmpty { null },
"fno" to flightNo.value?.ifEmpty { null },
"sendAddress" to sendAddress.value?.ifEmpty { null }, "sendAddress" to sendAddress.value?.ifEmpty { null },
"receiveAddress" to receiveAddress.value?.ifEmpty { null },
"msgType" to msgType.value?.ifEmpty { null } "msgType" to msgType.value?.ifEmpty { null }
) )
if (fid.isNotEmpty()) {
filterParams["fid"] = fid
} else {
filterParams["fdate"] = flightDate.value?.ifEmpty { null }
filterParams["fno"] = flightNo.value?.ifEmpty { null }
}
// 列表参数(含分页) // 列表参数(含分页)
val listParams = (filterParams + mapOf( val listParams = (filterParams + mapOf(
@@ -116,25 +210,18 @@ class IntImpMsgParseViewModel : BasePageViewModel() {
// 获取列表带Loading // 获取列表带Loading
launchLoadingCollect({ NetApply.api.getIntImpMsgList(listParams) }) { launchLoadingCollect({ NetApply.api.getIntImpMsgList(listParams) }) {
onSuccess = { result -> onSuccess = { pageInfo ->
// 处理PageInfo结构 pageModel.handleListBean(pageInfo.toBaseListBean())
val pageInfo = result.data
if (pageInfo != null) {
val list = pageInfo.list ?: emptyList()
val pages = pageInfo.pages ?: 1
// 更新统计信息
totalCount.value = (pageInfo.total ?: 0).toString() totalCount.value = (pageInfo.total ?: 0).toString()
}
}
}
// 处理分页数据 /**
pageModel.handleDataList(list) * 列表项点击 — 跳转电报详情页
pageModel.haveMore.postValue(pages > pageModel.page) */
} else { override fun onItemClick(position: Int, type: Int) {
pageModel.handleDataList(emptyList()) val bean = pageModel.rv?.commonAdapter()?.getItem(position) as? MsgReceivePool ?: return
pageModel.haveMore.postValue(false) IntArrTelegramDetailsActivity.start(getTopActivity(), bean, fid)
totalCount.value = "0"
}
}
}
} }
} }

View File

@@ -0,0 +1,42 @@
package com.lukouguoji.gjj.viewModel
import android.content.Intent
import androidx.lifecycle.MutableLiveData
import com.lukouguoji.module_base.base.BaseViewModel
import com.lukouguoji.module_base.bean.IntImpPickUpRecordBean
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.ktx.toRequestBody
/**
* 国际进港提取详情 ViewModel
*/
class IntImpPickUpRecordDetailsViewModel : BaseViewModel() {
var recordId: Long = 0
val dataBean = MutableLiveData(IntImpPickUpRecordBean())
fun initOnCreated(intent: Intent) {
recordId = intent.getLongExtra(Constant.Key.ID, 0)
if (recordId > 0) {
getData()
} else {
showToast("参数错误")
getTopActivity().finish()
}
}
private fun getData() {
val params = mapOf("id" to recordId).toRequestBody()
launchLoadingCollect({
NetApply.api.getIntImpPickUpRecordDetails(params)
}) {
onSuccess = {
dataBean.value = it.data ?: IntImpPickUpRecordBean()
}
}
}
}

View File

@@ -0,0 +1,191 @@
package com.lukouguoji.gjj.viewModel
import android.app.Activity
import android.content.Intent
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.holder.IntImpPickUpRecordViewHolder
import com.lukouguoji.module_base.base.BasePageViewModel
import com.lukouguoji.module_base.bean.IntImpPickUpRecordBean
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.ktx.launchCollect
import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.ktx.noNull
import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.ktx.toRequestBody
import com.lukouguoji.module_base.model.ScanModel
import com.lukouguoji.module_base.util.DictUtils
import dev.utils.app.info.KeyValue
import kotlinx.coroutines.launch
/**
* 国际进港-提取记录 ViewModel
*/
class IntImpPickUpRecordViewModel : BasePageViewModel() {
// ========== 筛选条件 ==========
val paymentDateStart = MutableLiveData("") // 缴费日期起
val paymentDateEnd = MutableLiveData("") // 缴费日期止
val agentCode = MutableLiveData("") // 代理人
val spCode = MutableLiveData("") // 特码
val wbNo = MutableLiveData("") // 运单号
// ========== 下拉列表数据源 ==========
val agentList = MutableLiveData(listOf(KeyValue("全部", "")))
val spCodeList = MutableLiveData<List<KeyValue>>(emptyList())
// ========== 统计信息 ==========
val totalCount = MutableLiveData("0") // 合计票数
val totalPc = MutableLiveData("0") // 总件数
val totalWeight = MutableLiveData("0") // 总重量
// ========== 全选状态 ==========
val isAllChecked = MutableLiveData(false)
init {
isAllChecked.observeForever { checked ->
val list = pageModel.rv?.commonAdapter()?.items as? List<IntImpPickUpRecordBean>
?: return@observeForever
list.forEach { it.checked.set(checked) }
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
}
}
// ========== 适配器配置 ==========
val itemViewHolder = IntImpPickUpRecordViewHolder::class.java
val itemLayoutId = R.layout.item_int_imp_pick_up_record
/**
* 初始化代理人列表
*/
fun initAgentList() {
launchCollect({ NetApply.api.getIntImpAgentList() }) {
onSuccess = { result ->
val list = mutableListOf(KeyValue("全部", ""))
result.data?.forEach {
list.add(KeyValue(it.name ?: "", it.code ?: ""))
}
agentList.value = list
}
}
}
/**
* 初始化特码列表
*/
fun initSpecialCodeList() {
DictUtils.getSpecialCodeList(
flag = 1, // 国际
ieFlag = "I", // 进港
parentcode = ""
) {
spCodeList.value = it
}
}
/**
* 搜索按钮点击
*/
fun searchClick() {
refresh()
}
/**
* 扫码运单号
*/
fun scanWbNo() {
ScanModel.startScan(getTopActivity(), Constant.RequestCode.WAYBILL)
}
/**
* 全选按钮点击
*/
fun checkAllClick() {
val list = pageModel.rv?.commonAdapter()?.items as? List<IntImpPickUpRecordBean> ?: return
val shouldCheckAll = !isAllChecked.value!!
list.forEach { it.checked.set(shouldCheckAll) }
isAllChecked.value = shouldCheckAll
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
}
/**
* 清除提货操作
*/
fun clearPickUp(selectedItems: List<IntImpPickUpRecordBean>) {
if (selectedItems.isEmpty()) {
showToast("请选择要清除提货的记录")
return
}
val params = selectedItems.toRequestBody()
launchLoadingCollect({ NetApply.api.clearIntImpPickUp(params) }) {
onSuccess = {
showToast("清除提货成功")
viewModelScope.launch {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
}
refresh()
}
onFailed = { _, msg ->
showToast(msg.noNull("清除提货失败"))
}
}
}
/**
* 获取列表数据
*/
override fun getData() {
val filterParams = mapOf(
"paymentDateStart" to paymentDateStart.value?.ifEmpty { null },
"paymentDateEnd" to paymentDateEnd.value?.ifEmpty { null },
"agentCode" to agentCode.value?.ifEmpty { null },
"spCode" to spCode.value?.ifEmpty { null },
"wbNo" to wbNo.value?.ifEmpty { null }
)
val listParams = (filterParams + mapOf(
"pageNum" to pageModel.page,
"pageSize" to pageModel.limit
)).toRequestBody()
val totalParams = filterParams.toRequestBody()
launchLoadingCollect({ NetApply.api.getIntImpPickUpRecordList(listParams) }) {
onSuccess = { result ->
pageModel.handleDataList(result.list)
pageModel.haveMore.postValue((result.pages) > pageModel.page)
}
}
launchCollect({ NetApply.api.getIntImpPickUpRecordTotal(totalParams) }) {
onSuccess = { result ->
val data = result.data
totalCount.value = (data?.wbNumber ?: 0).toString()
totalPc.value = (data?.totalPc ?: 0).toString()
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
}
}
}
/**
* 处理扫码结果
*/
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
if (resultCode == Activity.RESULT_OK && data != null) {
when (requestCode) {
Constant.RequestCode.WAYBILL -> {
wbNo.value = data.getStringExtra(Constant.Result.CODED_CONTENT)
refresh()
}
}
}
}
}

View File

@@ -0,0 +1,287 @@
package com.lukouguoji.gjj.viewModel
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.holder.IntImpStorageUseViewHolder
import com.lukouguoji.module_base.base.BasePageViewModel
import com.lukouguoji.module_base.bean.GjcMaWb
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.ktx.formatDate
import com.lukouguoji.module_base.ktx.launchCollect
import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.ktx.noNull
import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.ktx.toRequestBody
import com.lukouguoji.module_base.model.ScanModel
import dev.utils.app.info.KeyValue
import kotlinx.coroutines.launch
import java.util.Date
/**
* 国际进港-仓库 ViewModel
*/
class IntImpStorageUseViewModel : BasePageViewModel() {
// ========== 筛选条件 ==========
val flightDate = MutableLiveData(Date().formatDate()) // 航班日期,默认今天
val flightNo = MutableLiveData("") // 航班号
val clearResult = MutableLiveData("") // 清仓综合结果
val clearResultList = MutableLiveData<List<KeyValue>>() // 清仓综合结果列表
val wbNo = MutableLiveData("") // 运单号
val location = MutableLiveData("") // 库位号
// ========== 统计信息 ==========
val totalWbNumber = MutableLiveData("0") // 总票数
val totalPc = MutableLiveData("0") // 总件数
val totalWeight = MutableLiveData("0") // 总重量
// ========== 全选状态 ==========
val isAllChecked = MutableLiveData(false)
// ========== 全局展开状态 ==========
val isAllExpanded = MutableLiveData(false)
init {
clearResultList.value = listOf(
KeyValue("全部", ""),
KeyValue("正常", "0"),
KeyValue("异常", "1")
)
isAllChecked.observeForever { checked ->
val list =
pageModel.rv?.commonAdapter()?.items as? List<GjcMaWb> ?: return@observeForever
list.forEach { it.checked.set(checked) }
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
}
}
// ========== 适配器配置 ==========
val itemViewHolder = IntImpStorageUseViewHolder::class.java
val itemLayoutId = R.layout.item_int_imp_storage_use
fun searchClick() {
refresh()
}
/**
* 全选按钮点击(联动勾选所有子列表项)
*/
fun checkAllClick() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcMaWb> ?: return
val shouldCheckAll = !isAllChecked.value!!
list.forEach { maWb ->
maWb.checked.set(shouldCheckAll)
maWb.storageUseList?.forEach { storageUse ->
storageUse.checked.set(shouldCheckAll)
}
}
isAllChecked.value = shouldCheckAll
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
}
/**
* 切换全局展开/收起状态
*/
fun toggleAllExpand() {
val list = pageModel.rv?.commonAdapter()?.items as? List<GjcMaWb> ?: return
val shouldExpand = !isAllExpanded.value!!
isAllExpanded.value = shouldExpand
list.forEach { bean ->
if (!bean.storageUseList.isNullOrEmpty()) {
bean.showMore.set(shouldExpand)
}
}
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
}
fun scanWbNo() {
ScanModel.startScan(getTopActivity(), Constant.RequestCode.WAYBILL)
}
fun clearStorage() {
// 由Activity显示对话框
}
/**
* 执行清仓操作
*/
fun performClear(clearNormal: String, maWbListForClear: List<GjcMaWb>) {
if (maWbListForClear.isEmpty()) {
showToast("请至少选择一个库位")
return
}
val params = mapOf(
"clearNormal" to clearNormal,
"maWbList" to maWbListForClear
).toRequestBody()
launchLoadingCollect({ NetApply.api.clearIntImpStorage(params) }) {
onSuccess = {
showToast("清仓成功")
viewModelScope.launch {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
}
refresh()
}
onFailed = { _, msg ->
showToast(msg.noNull("清仓失败"))
}
}
}
fun modifyStorage() {
// 由Activity显示对话框
}
/**
* 执行修改库位操作
*/
fun performModifyStorage(
locationName: String,
locationId: String,
storageUse: com.lukouguoji.module_base.bean.GjcStorageUse
) {
if (locationName.isEmpty() || locationId.isEmpty()) {
showToast("请选择库位")
return
}
val updatedStorage = storageUse.copy(
location = locationName,
locationId = locationId.toLongOrNull() ?: 0
)
val params = updatedStorage.toRequestBody()
launchLoadingCollect({ NetApply.api.modifyIntImpStorage(params) }) {
onSuccess = {
showToast("修改库位成功")
viewModelScope.launch {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
}
refresh()
}
onFailed = { _, msg ->
showToast(msg.noNull("修改库位失败"))
}
}
}
fun outStorage() {
// 由Activity显示二次确认对话框
}
/**
* 执行出库操作
*/
fun performOutStorage(selectedStorageList: List<com.lukouguoji.module_base.bean.GjcStorageUse>) {
if (selectedStorageList.isEmpty()) {
showToast("请选择要出库的库位")
return
}
val params = selectedStorageList.toRequestBody()
launchLoadingCollect({ NetApply.api.outIntImpStorage(params) }) {
onSuccess = {
showToast("出库成功")
viewModelScope.launch {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
}
refresh()
}
onFailed = { _, msg ->
showToast(msg.noNull("出库失败"))
}
}
}
fun inStorage() {
// 由Activity显示对话框
}
/**
* 执行入库操作
*/
fun performInStorage(
locationName: String,
locationId: String,
maWbListForInStorage: List<GjcMaWb>
) {
if (maWbListForInStorage.isEmpty()) {
showToast("请至少选择一个单据")
return
}
if (locationName.isEmpty() || locationId.isEmpty()) {
showToast("请选择库位")
return
}
val params = mapOf(
"location" to locationName,
"locationId" to locationId.toLongOrNull(),
"maWbList" to maWbListForInStorage
).toRequestBody()
launchLoadingCollect({ NetApply.api.inIntImpStorage(params) }) {
onSuccess = {
showToast("入库成功")
viewModelScope.launch {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
}
refresh()
}
onFailed = { _, msg ->
showToast(msg.noNull("入库失败"))
}
}
}
override fun getData() {
val filterParams = mapOf(
"fdate" to flightDate.value?.ifEmpty { null },
"fno" to flightNo.value?.ifEmpty { null },
"wbNo" to wbNo.value?.ifEmpty { null },
"location" to location.value?.ifEmpty { null }
)
val listParams = (filterParams + mapOf(
"pageNum" to pageModel.page,
"pageSize" to pageModel.limit
)).toRequestBody()
val totalParams = filterParams.toRequestBody()
launchLoadingCollect({ NetApply.api.getIntImpStorageUseList(listParams) }) {
onSuccess = { result ->
pageModel.handleDataList(result.list)
pageModel.haveMore.postValue((result.pages) > pageModel.page)
isAllExpanded.value = false
}
}
launchCollect({ NetApply.api.getIntImpStorageUseTotal(totalParams) }) {
onSuccess = { result ->
val data = result.data
totalWbNumber.value = (data?.wbNumber ?: 0).toString()
totalPc.value = (data?.totalPc ?: 0).toString()
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
}
}
}
}

View File

@@ -0,0 +1,18 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="20dp"
android:viewportWidth="24"
android:viewportHeight="24">
<!-- 蓝色圆形背景 -->
<path
android:fillColor="@color/colorPrimary"
android:pathData="M12,12m-11,0a11,11 0,1 1,22 0a11,11 0,1 1,-22 0" />
<!-- 白色勾 -->
<path
android:fillColor="@android:color/transparent"
android:strokeColor="#FFFFFF"
android:strokeWidth="2.5"
android:strokeLineCap="round"
android:strokeLineJoin="round"
android:pathData="M7,12.5L10.5,16L17,8.5" />
</vector>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<stroke
android:width="1.5dp"
android:color="#CCCCCC" />
<solid android:color="@android:color/transparent" />
<size
android:width="20dp"
android:height="20dp" />
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#E57373" />
<corners android:radius="100dp" />
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#4CAF50" />
<corners android:radius="100dp" />
</shape>

View File

@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="20dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/transparent"
android:strokeColor="#CCCCCC"
android:strokeWidth="2"
android:strokeLineCap="round"
android:strokeLineJoin="round"
android:pathData="M9,6L15,12L9,18" />
</vector>

View File

@@ -115,7 +115,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
android:background="@android:color/white" android:background="@color/white"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingHorizontal="15dp"> android:paddingHorizontal="15dp">

View File

@@ -19,31 +19,33 @@
<include layout="@layout/title_tool_bar" /> <include layout="@layout/title_tool_bar" />
<!-- 电报内容区域 --> <!-- 电报内容区域 -->
<ScrollView <EditText
android:id="@+id/etContent"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1" android:layout_weight="1"
android:layout_margin="20dp" android:layout_margin="20dp"
android:background="@color/white" android:background="@color/white"
android:padding="20dp"> android:padding="20dp"
android:gravity="top|start"
<TextView android:text="@={viewModel.telegramContent}"
android:id="@+id/tvContent" android:enabled="@{viewModel.isEditable}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{viewModel.telegramContent}"
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="16sp" android:textSize="16sp"
android:lineSpacingExtra="4dp" /> android:lineSpacingExtra="4dp"
android:inputType="textMultiLine"
</ScrollView> android:scrollbars="vertical"
android:overScrollMode="always" />
<!-- 底部按钮 --> <!-- 底部按钮 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="20dp" android:layout_marginStart="20dp"
android:gravity="center"> android:layout_marginEnd="20dp"
android:layout_marginBottom="20dp"
android:gravity="center"
android:visibility="@{viewModel.isEditable ? View.VISIBLE : View.GONE}">
<TextView <TextView
android:layout_width="200dp" android:layout_width="200dp"

View File

@@ -50,6 +50,16 @@
android:layout_weight="1" /> android:layout_weight="1" />
<!-- 始发站 --> <!-- 始发站 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择始发站"}'
type="@{SearchLayoutType.SPINNER}"
list="@{viewModel.sendAddressList}"
value="@={viewModel.sendAddress}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 目的站固定HFE -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout <com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"HFE"}' hint='@{"HFE"}'
type="@{SearchLayoutType.INPUT}" type="@{SearchLayoutType.INPUT}"

View File

@@ -33,6 +33,7 @@
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout <com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择航班日期"}' hint='@{"请选择航班日期"}'
icon="@{@drawable/img_date}" icon="@{@drawable/img_date}"
setRefreshCallBack="@{viewModel::onFlightDateInputComplete}"
type="@{SearchLayoutType.DATE}" type="@{SearchLayoutType.DATE}"
value="@={viewModel.flightDate}" value="@={viewModel.flightDate}"
android:layout_width="0dp" android:layout_width="0dp"
@@ -42,6 +43,7 @@
<!-- 航班号 --> <!-- 航班号 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout <com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入航班号"}' hint='@{"请输入航班号"}'
setRefreshCallBack="@{viewModel::onFlightNoInputComplete}"
type="@{SearchLayoutType.INPUT}" type="@{SearchLayoutType.INPUT}"
value="@={viewModel.flightNo}" value="@={viewModel.flightNo}"
setUpperCaseAlphanumeric="@{true}" setUpperCaseAlphanumeric="@{true}"
@@ -51,16 +53,18 @@
<!-- 择始发站 --> <!-- 择始发站 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout <com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择始发站"}' hint='@{"始发站"}'
type="@{SearchLayoutType.INPUT}" type="@{SearchLayoutType.SPINNER}"
list="@{viewModel.sendAddressList}"
value="@={viewModel.sendAddress}" value="@={viewModel.sendAddress}"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1" />
<!-- 目的站(固定HFE --> <!-- 目的站(由航班查询返回 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout <com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"HFE"}' enable="@{false}"
hint='@{"目的站"}'
type="@{SearchLayoutType.INPUT}" type="@{SearchLayoutType.INPUT}"
value="@={viewModel.receiveAddress}" value="@={viewModel.receiveAddress}"
android:layout_width="0dp" android:layout_width="0dp"
@@ -70,7 +74,8 @@
<!-- 报文类型 --> <!-- 报文类型 -->
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout <com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择报文类型"}' hint='@{"请选择报文类型"}'
type="@{SearchLayoutType.INPUT}" type="@{SearchLayoutType.SPINNER}"
list="@{viewModel.msgTypeList}"
value="@={viewModel.msgType}" value="@={viewModel.msgType}"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@@ -123,7 +128,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="50dp" android:layout_height="50dp"
android:background="@android:color/white" android:background="@color/white"
android:gravity="center_vertical" android:gravity="center_vertical"
android:paddingHorizontal="15dp"> android:paddingHorizontal="15dp">

View File

@@ -0,0 +1,200 @@
<?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.gjj.viewModel.IntImpPickUpRecordViewModel" />
<variable
name="activity"
type="com.lukouguoji.gjj.activity.IntImpPickUpRecordActivity" />
</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.paymentDateStart}"
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_date}"
type="@{SearchLayoutType.DATE}"
value="@={viewModel.paymentDateEnd}"
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="@{(v)-> viewModel.scanWbNo()}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.wbNo}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<!-- 搜索按钮 -->
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginHorizontal="10dp"
android:onClick="@{()-> viewModel.searchClick()}"
android:padding="2dp"
android:src="@drawable/img_search" />
</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_imp_pick_up_record" />
</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"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
android:src="@drawable/img_check_all" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="全选"
android:textColor="@color/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>
<!-- 清除提货按钮 -->
<TextView
style="@style/tv_bottom_btn"
android:onClick="@{()-> activity.clearPickUp()}"
android:text="清除提货" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,274 @@
<?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" />
<variable
name="viewModel"
type="com.lukouguoji.gjj.viewModel.IntImpPickUpRecordDetailsViewModel" />
</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="0dp"
android:layout_weight="1"
android:padding="10dp">
<!-- 白色圆角卡片 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_white_radius_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
enable="@{false}"
title='@{"运单号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.wbNo}'
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.dataBean.agentCode}'
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.dataBean.spCode}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<!-- 第2行提货编号、件数、重量 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"提货编号"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.pickUpNo}'
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.dataBean.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.dataBean.weight)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<!-- 第3行计费重量、信息费、服务费 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"计费重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.checkWeight)}'
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.dataBean.infoFee)}'
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.dataBean.serviceFee)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<!-- 第4行仓储费、抽单费、冷藏费 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"仓储费"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.storageFee)}'
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.dataBean.drawFee)}'
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.dataBean.coldFee)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<!-- 第5行铲车费、理货费、总金额 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"铲车费"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.forkliftFee)}'
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.dataBean.tallyFee)}'
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.dataBean.totalAmount)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<!-- 第6行提取时间、办理人、出库时间 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"提取时间"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.pickUpTime}'
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.dataBean.operator}'
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.dataBean.outTime}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
</ScrollView>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,252 @@
<?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.gjj.R" />
<variable
name="viewModel"
type="com.lukouguoji.gjj.viewModel.IntImpStorageUseViewModel" />
<variable
name="activity"
type="com.lukouguoji.gjj.activity.IntImpStorageUseActivity" />
</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="@{`/IntImpStorageUse/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 : R.drawable.ic_new_expand}"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginStart="8dp"
android:contentDescription="展开/收起全部子列表"
android:onClick="@{()-> viewModel.toggleAllExpand()}"
android:padding="4dp"
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_imp_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"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginEnd="5dp"
android:src="@drawable/img_check_all" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="全选"
android:textColor="@color/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,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.gjj.dialog.IntImpInStorageDialogModel" />
</data>
<LinearLayout
android:layout_width="600dp"
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,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.gjj.dialog.IntImpModifyStorageDialogModel" />
</data>
<LinearLayout
android:layout_width="600dp"
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,86 @@
<?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.gjj.dialog.IntImpMoveClearDialogModel" />
</data>
<LinearLayout
android:layout_width="600dp"
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>
<!-- 底部按钮 -->
<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

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android" <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"> xmlns:tools="http://schemas.android.com/tools">
<data> <data>
@@ -16,159 +15,172 @@
type="Integer" /> type="Integer" />
</data> </data>
<androidx.cardview.widget.CardView
android:id="@+id/cardView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
app:cardBackgroundColor="@android:color/white"
app:cardCornerRadius="8dp"
app:cardElevation="2dp">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:layout_marginHorizontal="5dp"
android:padding="12dp"> android:layout_marginTop="10dp"
android:background="@drawable/bg_white_radius_8"
android:orientation="vertical">
<!-- 顶部:选择图标 + 报文类型 + 状态标签 --> <!-- 上部内容区 -->
<LinearLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="16dp"
android:paddingTop="16dp"
android:paddingBottom="12dp">
<!-- 第一行:报文类型 + 状态标签 -->
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<!-- 选择图标 --> <LinearLayout
<ImageView
android:id="@+id/iv_check"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
android:src="@drawable/img_plane"
tools:src="@drawable/img_plane" />
<!-- 报文类型标题 -->
<TextView
android:id="@+id/tv_msg_type"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginLeft="10dp" android:orientation="horizontal">
android:layout_toRightOf="@id/iv_check"
android:text="@{`报文类型 ` + bean.msgType}" <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="报文类型"
android:textColor="@color/text_gray_l"
android:textSize="15sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="@{bean.msgType}"
android:textColor="@color/colorPrimary" android:textColor="@color/colorPrimary"
android:textSize="16sp" android:textSize="15sp"
android:textStyle="bold" tools:text="FFM" />
tools:text="报文类型 FFM" />
</LinearLayout>
<!-- 状态标签 --> <!-- 状态标签 -->
<TextView <TextView
android:id="@+id/tv_status" android:id="@+id/tv_status"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_alignParentEnd="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:background="@{bean.isGenerated() ? @drawable/bg_status_success : @drawable/bg_status_error}" android:background="@{bean.isGenerated() ? @drawable/bg_status_success : @drawable/bg_status_error}"
android:paddingHorizontal="8dp" android:paddingHorizontal="12dp"
android:paddingVertical="4dp" android:paddingVertical="4dp"
android:text="@{bean.getStatusLabel()}" android:text="@{bean.getStatusLabel()}"
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:textSize="12sp" android:textSize="13sp"
tools:text="生成" /> tools:text="生成" />
</RelativeLayout> </RelativeLayout>
<!-- 收报时间 --> <!-- 第二行:收报时间 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="12dp"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="收报时间" android:text="收报时间"
android:textColor="@color/text_normal" android:textColor="@color/text_gray_l"
android:textSize="14sp" /> android:textSize="15sp" />
<TextView <TextView
android:layout_width="0dp" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_marginStart="16dp"
android:text="@{bean.receiveTime}" android:text="@{bean.receiveTime}"
android:textColor="@color/text_normal" android:textColor="@color/text_normal"
android:textSize="14sp" android:textSize="15sp"
tools:text="2025-08-27 12:22:34" /> tools:text="2025-08-27 12:22:34" />
</LinearLayout> </LinearLayout>
<!-- 报文内容 --> <!-- 第三行:报文内容 -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="8dp" android:layout_marginTop="12dp"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="报文内容" android:text="报文内容"
android:textColor="@color/text_normal" android:textColor="@color/text_gray_l"
android:textSize="14sp" /> android:textSize="15sp" />
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_weight="1" android:layout_weight="1"
android:ellipsize="end" android:ellipsize="end"
android:maxLines="4" android:lineSpacingExtra="3dp"
android:maxLines="6"
android:text="@{bean.teleContent}" android:text="@{bean.teleContent}"
android:textColor="@color/text_gray" android:textColor="@color/text_normal"
android:textSize="13sp" android:textSize="15sp"
tools:text="ZCZC DFA0156 270443 QK\nHFEFI8X.\nSELFMKE 270443 FFM/4\n1/KE135/\n27AUG/ICN/HL8348 HFE/NIL\nLAST" /> tools:text="ZCZC DFA0156 270443 QK\nHFEFI8X.\nSELFMKE 270443 FFM/4\n1/KE135/\n27AUG/ICN/HL8348 HFE/NIL\nLAST" />
</LinearLayout> </LinearLayout>
<!-- 查看详情按钮 --> </LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center"
android:orientation="horizontal">
<!-- 分隔线 -->
<View <View
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="1dp"
android:layout_weight="1" /> android:background="@color/line" />
<!-- 底部操作栏:圆形选择框 + 查看详情 + 箭头 -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:paddingHorizontal="16dp">
<!-- 左侧:选择框 + 查看详情 -->
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
android:layout_width="16dp" android:id="@+id/iv_check"
android:layout_height="16dp" android:layout_width="20dp"
android:src="@drawable/ic_arrow_right" android:layout_height="20dp"
app:tint="@color/colorPrimary" /> loadImage="@{bean.checked.get() ? @drawable/bg_circle_checked : @drawable/bg_circle_unchecked}" />
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="4dp" android:layout_marginStart="10dp"
android:text="查看详情" android:text="查看详情"
android:textColor="@color/colorPrimary" android:textColor="@color/text_gray"
android:textSize="14sp" /> android:textSize="14sp" />
</LinearLayout> </LinearLayout>
</LinearLayout> <!-- 右侧箭头 -->
<ImageView
android:id="@+id/iv_arrow"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:src="@drawable/ic_chevron_right" />
</RelativeLayout>
</LinearLayout> </LinearLayout>
</androidx.cardview.widget.CardView>
</layout> </layout>

View File

@@ -0,0 +1,304 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:loadImage="http://schemas.android.com/tools">
<data>
<variable
name="bean"
type="com.lukouguoji.module_base.bean.IntImpPickUpRecordBean" />
<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:gravity="center_vertical"
android:orientation="horizontal"
android:padding="10dp">
<!-- 选中图标 -->
<ImageView
android:id="@+id/iv_icon"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginEnd="10dp"
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">
<!-- 第一行:运单号、件数、重量、计重重量、代理 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<!-- 运单号 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.2"
android:orientation="horizontal">
<TextView
completeSpace="@{4}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="运单号"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary"
android:textSize="16sp" />
</LinearLayout>
<!-- 件数 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:orientation="horizontal">
<TextView
completeSpace="@{3}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="件数"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="@{String.valueOf(bean.pc)}"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
<!-- 重量 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:orientation="horizontal">
<TextView
completeSpace="@{3}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="重量"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="@{String.valueOf((int)bean.weight)}"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
<!-- 计重重量 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="计重重量"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:text="@{String.valueOf((int)bean.checkWeight)}"
android:textSize="16sp" />
</LinearLayout>
<!-- 代理 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:orientation="horizontal">
<TextView
completeSpace="@{3}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="代理"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="@{bean.agentCode}"
android:textSize="16sp" />
</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="1.2"
android:orientation="horizontal">
<TextView
completeSpace="@{4}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="特码"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="@{bean.spCode}"
android:textSize="16sp" />
</LinearLayout>
<!-- 服务费 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:orientation="horizontal">
<TextView
completeSpace="@{4}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="服务费"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:text="@{String.valueOf((int)bean.serviceFee)}"
android:textSize="16sp" />
</LinearLayout>
<!-- 仓储费 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.8"
android:orientation="horizontal">
<TextView
completeSpace="@{4}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="仓储费"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:text="@{String.valueOf((int)bean.storageFee)}"
android:textSize="16sp" />
</LinearLayout>
<!-- 总金额 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
completeSpace="@{4}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="总金额"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:text="@{String.valueOf((int)bean.totalAmount)}"
android:textSize="16sp" />
</LinearLayout>
<!-- 提取时间 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:orientation="horizontal">
<TextView
completeSpace="@{5}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="提取时间"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:text="@{bean.pickUpTime}"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- 右侧箭头 -->
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginStart="5dp"
android:src="@drawable/ic_arrow_right" />
</LinearLayout>
</layout>

View File

@@ -0,0 +1,411 @@
<?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:padding="10dp">
<!-- 选中图标 -->
<ImageView
android:id="@+id/iv_icon"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginEnd="10dp"
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">
<!-- 第一行:运单号、航班信息、航程、品名、重量 -->
<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="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.wbNo}"
android:textColor="@color/colorPrimary"
android:textSize="16sp" />
</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="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.flightInfo}"
android:textSize="16sp" />
</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="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.range}"
android:textSize="16sp" />
</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="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="1"
android:text="@{bean.goods}"
android:textSize="16sp" />
</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="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf((int)bean.weight)}"
android:textSize="16sp" />
</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="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.agentCode}"
android:textSize="16sp" />
</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="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf(bean.pc)}"
android:textSize="16sp" />
</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="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.clearNormalText}"
android:textSize="16sp" />
</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="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{bean.opDate}"
android:textSize="16sp" />
</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="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{String.valueOf(bean.storageUseNumber)}"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<!-- 展开/折叠按钮 -->
<ImageView
android:id="@+id/iv_show"
android:layout_width="match_parent"
android:layout_height="20dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:padding="5dp"
android:src="@mipmap/img_down"
visible="@{bean.storageUseList != null &amp;&amp; !bean.storageUseList.empty}" />
</LinearLayout>
<!-- 库位明细列表容器(在白色卡片外面) -->
<LinearLayout
visible="@{bean.showMore}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:background="#e3f6e0"
android:orientation="vertical"
android:visibility="gone">
<!-- 表头 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginVertical="10dp"
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/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"
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="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"
android:background="@color/c999999" />
<!-- 子列表 RecyclerView -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_sub"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</LinearLayout>
</LinearLayout>
</layout>

View File

@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:loadImage="http://schemas.android.com/tools">
<data>
<variable
name="bean"
type="com.lukouguoji.module_base.bean.GjcStorageUse" />
<variable
name="position"
type="Integer" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingHorizontal="10dp"
android:paddingVertical="8dp">
<!-- 选项(单选框) -->
<ImageView
android:id="@+id/iv_checkbox"
android:layout_width="0dp"
android:layout_height="20dp"
android:layout_gravity="center_vertical"
android:layout_weight="0.5"
loadImage="@{bean.checked.get() ? @drawable/radiobtn_checked_gray : @drawable/radiobtn_unchecked_gray}"
android:src="@drawable/radiobtn_unchecked_style" />
<!-- 库位号 -->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:gravity="center"
android:text="@{bean.location ?? bean.storageCode}"
android:textColor="@color/text_normal"
android:textSize="14sp" />
<!-- 入库人 -->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:gravity="center"
android:text="@{bean.inOpId ?? bean.inId}"
android:textColor="@color/text_normal"
android:textSize="14sp" />
<!-- 入库时间 -->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1.5"
android:gravity="center"
android:text="@{bean.inDate ?? ``}"
android:textColor="@color/text_normal"
android:textSize="14sp" />
<!-- 出库人 -->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:gravity="center"
android:text="@{bean.outOpId ?? bean.outId}"
android:textColor="@color/text_normal"
android:textSize="14sp" />
<!-- 出库时间 -->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1.5"
android:gravity="center"
android:text="@{bean.outDate ?? ``}"
android:textColor="@color/text_normal"
android:textSize="14sp" />
</LinearLayout>
</layout>