feat: 出港计重 ui v3
This commit is contained in:
@@ -124,6 +124,17 @@
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjc.activity.GjcWeighingRecordListActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjc.activity.GjcWeighingStartActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjc.activity.GjcHandoverActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
|
||||
@@ -1,58 +1,94 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
/**
|
||||
* 国际出港计重-列表数据Bean
|
||||
* 对应API: IntExpCheckIn/checked/pageQuery
|
||||
* 对应API返回类型: GjcWarehouse
|
||||
* 国际出港待计重-列表数据Bean
|
||||
* 对应API: IntExpCheckIn/pageQuery
|
||||
* 对应API返回类型: GjcMaWb
|
||||
*/
|
||||
class GjcWeighingBean {
|
||||
var whId: Long = 0 // Id
|
||||
var maWbId: Long = 0 // 运单主键ID
|
||||
var no: String = "" // 运单号
|
||||
var prefix: String = "" // 运单前缀
|
||||
var wbNo: String = "" // 主运单编号(11位)
|
||||
var wbNo: String = "" // 11位运单号
|
||||
var oldNo: String = "" // 旧运单号
|
||||
var oldPrefix: String = "" // 旧运单前缀
|
||||
|
||||
var agentCode: String = "" // 代理人code
|
||||
var agentName: String = "" // 代理人名称(查询后返回中文)
|
||||
var agentName: String = "" // 代理人名称
|
||||
|
||||
var fdate: String = "" // 航班时间
|
||||
var fid: Long = 0 // 航班主键id
|
||||
var fdate: String = "" // 航班日期
|
||||
var fno: String = "" // 航班号
|
||||
var flight: String = "" // 航班: 航班日期/航班号
|
||||
var fclose: String = "" // 航班关闭时间
|
||||
var scheduledTackOff: String = "" // 计划起飞时间
|
||||
var scheduledArrival: String = "" // 预计到达时间
|
||||
|
||||
var range: String = "" // 航程
|
||||
var dep: String = "" // 始发站
|
||||
var dest: String = "" // 目的站
|
||||
var dest1: String = "" // 目的站1
|
||||
var dest2: String = "" // 目的站2
|
||||
var dest: String = "" // 最终目的站
|
||||
var dest1: String = "" // 第一目的站
|
||||
var dest2: String = "" // 第二目的站
|
||||
|
||||
var pc: Long = 0 // 预配件数
|
||||
var weight: Double = 0.0 // 预配重量
|
||||
var volume: Double = 0.0 // 预配体积
|
||||
|
||||
var checkInPc: Long = 0 // 入库件数(关联查询)
|
||||
var checkInWeight: Double = 0.0 // 入库重量(关联查询)
|
||||
|
||||
var assembleCount: Int = 0 // 已经组装的数量(根据航班)
|
||||
var arrivePc: Long = 0 // 运抵件数
|
||||
var arriveWeight: Double = 0.0 // 运抵重量
|
||||
var arriveVolume: Double = 0.0 // 运抵体积
|
||||
var arriveFlag: String = "" // 运抵状态(0:正常运抵,1:提前运抵)
|
||||
|
||||
var spCode: String = "" // 特码
|
||||
var goods: String = "" // 品名
|
||||
var goodsCn: String = "" // 品名(中文)
|
||||
var subCode: String = "" // 子码
|
||||
var goods: String = "" // 品名(英)
|
||||
var goodsCn: String = "" // 品名(中)
|
||||
var businessType: String = "" // 业务类型
|
||||
var businessName: String = "" // 业务类型名称(中)
|
||||
var awbType: String = "" // 运单类型
|
||||
var awbName: String = "" // 运单类型名称(中)
|
||||
|
||||
var location: String = "" // uld
|
||||
var locFlag: String = "" // 位置标识
|
||||
var chargeFlag: String = "" // 收费标识
|
||||
var splitFlag: String = "" // 分单标识
|
||||
var subCode: String = "" // 子代码
|
||||
var checkIn: String = "" // 收运状态。0:待收运,1:已收运,2:收运中
|
||||
var reviewStatus: String = "" // 审核状态(0:未审核;1:通过;2:退回)
|
||||
var declareStatus: String = "" // 申报状态
|
||||
|
||||
var carId: String = "" // 平板车号
|
||||
var carNumber: String = "" // 车牌号
|
||||
var cargoType: String = "" // 货物类型
|
||||
var packageType: String = "" // 包装类型
|
||||
var origin: String = "" // 货源地
|
||||
var unNumber: String = "" // UN编号
|
||||
|
||||
var opId: String = "" // 收运人ID
|
||||
var userName: String = "" // 收运人(查询后返回中文)
|
||||
var opDate: String = "" // 收运时间
|
||||
var consignee: String = "" // 收货人
|
||||
var cneeTel: String = "" // 收货人电话
|
||||
|
||||
var by0: String = "" // 第一承运人
|
||||
var by1: String = "" // 第二承运人
|
||||
var by2: String = "" // 第三承运人
|
||||
|
||||
var opId: String = "" // 操作员id
|
||||
var opDate: String = "" // 操作时间
|
||||
var paperTime: String = "" // 单据时间
|
||||
|
||||
var remark: String = "" // 备注
|
||||
var ffmMemo: String = "" // ffm备注
|
||||
var mftMemo: String = "" // mft备注
|
||||
var billsNo: String = "" // 提单号
|
||||
|
||||
var haWbNumber: Int = 0 // 分单数
|
||||
var storageUseNumber: Int = 0 // 库位使用数
|
||||
var recheckCount: Long = 0 // 复核次数
|
||||
|
||||
var customsLib: String = "" // 代理人lib
|
||||
var tranFlag: String = "" // 转运标识
|
||||
var activeId: Long = 0 // 有效值
|
||||
var by1: String = "" // 备用字段1
|
||||
var by2: String = "" // 备用字段2
|
||||
|
||||
var whIdList: List<Long>? = null // idList(获取收运记录列表)
|
||||
var billsNo: Any? = null // 账单号
|
||||
var cityName: String = "" // 城市名称
|
||||
var proName: String = "" // 省份名称
|
||||
var areaName: String = "" // 区域名称
|
||||
|
||||
// 关联列表(可选,根据需要使用)
|
||||
var haWbList: List<Any>? = null // 分单列表
|
||||
var storageUseList: List<Any>? = null // 库位使用列表
|
||||
var attachList: List<Any>? = null // 附件列表
|
||||
}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
/**
|
||||
* 国际出港计重记录-列表数据Bean
|
||||
* 对应API: IntExpCheckIn/checked/pageQuery
|
||||
* 对应API返回类型: GjcWarehouse
|
||||
*/
|
||||
class GjcWeighingRecordBean {
|
||||
var whId: Long = 0 // 仓库主键ID
|
||||
var no: String = "" // 运单号
|
||||
var prefix: String = "" // 运单前缀
|
||||
var wbNo: String = "" // 11位运单号
|
||||
var oldNo: String = "" // 旧运单号
|
||||
var oldPrefix: String = "" // 旧运单前缀
|
||||
|
||||
var agentCode: String = "" // 代理人code
|
||||
var agentName: String = "" // 代理人名称
|
||||
|
||||
var fid: Long = 0 // 航班主键id
|
||||
var fdate: String = "" // 航班日期
|
||||
var fno: String = "" // 航班号
|
||||
var flight: String = "" // 航班: 航班日期/航班号
|
||||
var fclose: String = "" // 航班关闭时间
|
||||
var scheduledTackOff: String = "" // 计划起飞时间
|
||||
var scheduledArrival: String = "" // 预计到达时间
|
||||
|
||||
var range: String = "" // 航程
|
||||
var dep: String = "" // 始发站
|
||||
var dest: String = "" // 最终目的站
|
||||
var dest1: String = "" // 第一目的站
|
||||
var dest2: String = "" // 第二目的站
|
||||
|
||||
var pc: Long = 0 // 预配件数
|
||||
var weight: Double = 0.0 // 预配重量
|
||||
var volume: Double = 0.0 // 预配体积
|
||||
|
||||
var checkInPc: Long = 0 // 入库件数
|
||||
var checkInWeight: Double = 0.0 // 入库重量
|
||||
var checkInVolume: Double = 0.0 // 入库体积
|
||||
|
||||
var spCode: String = "" // 特码
|
||||
var subCode: String = "" // 子码
|
||||
var goods: String = "" // 品名(英)
|
||||
var goodsCn: String = "" // 品名(中)
|
||||
var businessType: String = "" // 业务类型
|
||||
var businessName: String = "" // 业务类型名称(中)
|
||||
var awbType: String = "" // 运单类型
|
||||
var awbName: String = "" // 运单类型名称(中)
|
||||
|
||||
var checkIn: String = "" // 收运状态。0:待收运,1:已收运,2:收运中
|
||||
var reviewStatus: String = "" // 审核状态(0:未审核;1:通过;2:退回)
|
||||
var declareStatus: String = "" // 申报状态
|
||||
|
||||
var carId: String = "" // 平板车号
|
||||
var carNumber: String = "" // 车牌号
|
||||
var cargoType: String = "" // 货物类型
|
||||
var packageType: String = "" // 包装类型
|
||||
var origin: String = "" // 货源地
|
||||
var unNumber: String = "" // UN编号
|
||||
|
||||
var consignee: String = "" // 收货人
|
||||
var cneeTel: String = "" // 收货人电话
|
||||
|
||||
var by0: String = "" // 第一承运人
|
||||
var by1: String = "" // 第二承运人
|
||||
var by2: String = "" // 第三承运人
|
||||
|
||||
var opId: String = "" // 操作员id
|
||||
var opDate: String = "" // 操作时间(入库时间)
|
||||
var paperTime: String = "" // 单据时间
|
||||
|
||||
var userName: String = "" // 收运人
|
||||
var userId: String = "" // 收运人ID
|
||||
|
||||
var remark: String = "" // 备注
|
||||
var ffmMemo: String = "" // ffm备注
|
||||
var mftMemo: String = "" // mft备注
|
||||
var billsNo: String = "" // 提单号
|
||||
|
||||
var haWbNumber: Int = 0 // 分单数
|
||||
var storageUseNumber: Int = 0 // 库位使用数
|
||||
var recheckCount: Long = 0 // 复核次数
|
||||
|
||||
var customsLib: String = "" // 代理人lib
|
||||
var tranFlag: String = "" // 转运标识
|
||||
var activeId: Long = 0 // 有效值
|
||||
|
||||
var cityName: String = "" // 城市名称
|
||||
var proName: String = "" // 省份名称
|
||||
var areaName: String = "" // 区域名称
|
||||
|
||||
var location: String = "" // 库位
|
||||
var carWeight: String = "" // 平板车重量
|
||||
|
||||
// 关联列表(可选,根据需要使用)
|
||||
var haWbList: List<Any>? = null // 分单列表
|
||||
var storageUseList: List<Any>? = null // 库位使用列表
|
||||
var attachList: List<Any>? = null // 附件列表
|
||||
}
|
||||
@@ -30,6 +30,7 @@ import com.lukouguoji.module_base.bean.GjcUldUseBean
|
||||
import com.lukouguoji.module_base.bean.GjcWaybillBean
|
||||
import com.lukouguoji.module_base.bean.GjcWaybillDataBean
|
||||
import com.lukouguoji.module_base.bean.GjcWeighingBean
|
||||
import com.lukouguoji.module_base.bean.GjcWeighingRecordBean
|
||||
import com.lukouguoji.module_base.bean.GjcWeighingStatisticsBean
|
||||
import com.lukouguoji.module_base.bean.GjjGoodsBean
|
||||
import com.lukouguoji.module_base.bean.GjjGoodsDetailsBean
|
||||
@@ -442,18 +443,39 @@ interface Api {
|
||||
suspend fun submitGjcBoxWeighing(@Body data: RequestBody): BaseResultBean<SimpleResultBean>
|
||||
|
||||
/**
|
||||
* 国际出港计重-分页搜索
|
||||
* 接口路径: /IntExpCheckIn/checked/pageQuery
|
||||
* 国际出港待计重-分页搜索
|
||||
* 接口路径: /IntExpCheckIn/pageQuery
|
||||
*/
|
||||
@POST("IntExpCheckIn/checked/pageQuery")
|
||||
@POST("IntExpCheckIn/pageQuery")
|
||||
suspend fun getGjcWeighingList(@Body data: RequestBody): BaseListBean<GjcWeighingBean>
|
||||
|
||||
/**
|
||||
* 国际出港计重-条件查询总件数、总重量、运单总数
|
||||
* 国际出港待计重-条件查询总件数、总重量、运单总数
|
||||
* 接口路径: /IntExpCheckIn/pageQueryTotal
|
||||
*/
|
||||
@POST("IntExpCheckIn/pageQueryTotal")
|
||||
suspend fun getGjcWeighingStatistics(@Body data: RequestBody): BaseResultBean<GjcWeighingStatisticsBean>
|
||||
|
||||
/**
|
||||
* 国际出港计重记录-分页搜索
|
||||
* 接口路径: /IntExpCheckIn/checked/pageQuery
|
||||
*/
|
||||
@POST("IntExpCheckIn/checked/pageQuery")
|
||||
suspend fun getGjcWeighingRecordList(@Body data: RequestBody): BaseListBean<GjcWeighingRecordBean>
|
||||
|
||||
/**
|
||||
* 国际出港计重记录-条件查询总件数、总重量、运单总数
|
||||
* 接口路径: /IntExpCheckIn/checked/pageQueryTotal
|
||||
*/
|
||||
@POST("IntExpCheckIn/checked/pageQueryTotal")
|
||||
suspend fun getGjcWeighingStatistics(@Body data: RequestBody): BaseResultBean<GjcWeighingStatisticsBean>
|
||||
suspend fun getGjcWeighingRecordStatistics(@Body data: RequestBody): BaseResultBean<GjcWeighingStatisticsBean>
|
||||
|
||||
/**
|
||||
* 国际出港待计重-开始计重-完成
|
||||
* 接口路径: /IntExpCheckIn/completeCheckIn
|
||||
*/
|
||||
@POST("IntExpCheckIn/completeCheckIn")
|
||||
suspend fun completeCheckIn(@Body data: RequestBody): BaseResultBean<Boolean>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 国际进-电报解析
|
||||
|
||||
@@ -120,6 +120,8 @@ object ARouterConstants {
|
||||
const val ACTIVITY_URL_GJC_BOX_WEIGHING_ADD = "/gjc/GjcBoxWeighingAddActivity" //国际出港模块 添加过磅
|
||||
|
||||
const val ACTIVITY_URL_GJC_WEIGHING_LIST = "/gjc/GjcWeighingListActivity" //国际出港模块 出港计重
|
||||
const val ACTIVITY_URL_GJC_WEIGHING_START = "/gjc/GjcWeighingStartActivity" //国际出港模块 开始计重
|
||||
const val ACTIVITY_URL_GJC_WEIGHING_RECORD_LIST = "/gjc/GjcWeighingRecordListActivity" //国际出港模块 计重记录
|
||||
|
||||
const val ACTIVITY_URL_GJC_WARE_HOUSE = "/gjc/GjcWareHouseActivity" //国际出港模块 仓库
|
||||
const val ACTIVITY_URL_GJC_WARE_HOUSE_INFO = "/gjc/GjcWareHouseInfoActivity" //国际出港模块 仓库详情
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<solid android:color="@color/white" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="@color/colorPrimary" />
|
||||
<corners android:radius="4dp" />
|
||||
|
||||
</shape>
|
||||
@@ -26,7 +26,7 @@ class GjcWeighingListActivity :
|
||||
override fun viewModelClass() = GjcWeighingViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("出港计重")
|
||||
setBackArrow("出港待计重")
|
||||
|
||||
binding.viewModel = viewModel
|
||||
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.lukouguoji.gjc.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.databinding.ActivityGjcWeighingRecordListBinding
|
||||
import com.lukouguoji.gjc.viewModel.GjcWeighingRecordViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.impl.observe
|
||||
import com.lukouguoji.module_base.ktx.getLifecycleOwner
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
/**
|
||||
* 国际出港计重记录列表页
|
||||
*/
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_RECORD_LIST)
|
||||
class GjcWeighingRecordListActivity :
|
||||
BaseBindingActivity<ActivityGjcWeighingRecordListBinding, GjcWeighingRecordViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_gjc_weighing_record_list
|
||||
|
||||
override fun viewModelClass() = GjcWeighingRecordViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("计重记录")
|
||||
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 绑定分页逻辑
|
||||
viewModel.pageModel
|
||||
.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, getLifecycleOwner())
|
||||
|
||||
// 监听刷新事件
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH)
|
||||
.observe(this) {
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
// 初始加载
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context) {
|
||||
val starter = Intent(context, GjcWeighingRecordListActivity::class.java)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.lukouguoji.gjc.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.databinding.ActivityGjcWeighingStartBinding
|
||||
import com.lukouguoji.gjc.viewModel.GjcWeighingStartViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
/**
|
||||
* 国际出港计重-开始计重页面
|
||||
*/
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_START)
|
||||
class GjcWeighingStartActivity :
|
||||
BaseBindingActivity<ActivityGjcWeighingStartBinding, GjcWeighingStartViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_gjc_weighing_start
|
||||
|
||||
override fun viewModelClass() = GjcWeighingStartViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("开始计重")
|
||||
binding.viewModel = viewModel
|
||||
viewModel.initOnCreated(this, intent)
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* 启动开始计重页面
|
||||
* @param context 上下文
|
||||
* @param maWbId 运单ID
|
||||
*/
|
||||
@JvmStatic
|
||||
fun startForAdd(context: Context, maWbId: Long) {
|
||||
val starter = Intent(context, GjcWeighingStartActivity::class.java)
|
||||
.putExtra(Constant.Key.MAWB_ID, maWbId)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.lukouguoji.gjc.holder
|
||||
|
||||
import android.view.View
|
||||
import com.lukouguoji.gjc.databinding.ItemGjcWeighingRecordBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.bean.GjcWeighingRecordBean
|
||||
|
||||
/**
|
||||
* 国际出港计重记录列表 ViewHolder
|
||||
*/
|
||||
class GjcWeighingRecordViewHolder(view: View) :
|
||||
BaseViewHolder<GjcWeighingRecordBean, ItemGjcWeighingRecordBinding>(view) {
|
||||
|
||||
override fun onBind(item: Any?, position: Int) {
|
||||
val bean = getItemBean(item)!!
|
||||
binding.bean = bean
|
||||
|
||||
// 整行点击跳转到详情页(暂未实现)
|
||||
binding.ll.setOnClickListener {
|
||||
// TODO: 跳转到详情页(待实现)
|
||||
// GjcWeighingRecordDetailsActivity.start(it.context, bean.whId)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.lukouguoji.gjc.holder
|
||||
|
||||
import android.view.View
|
||||
import com.lukouguoji.gjc.activity.GjcWeighingStartActivity
|
||||
import com.lukouguoji.gjc.databinding.ItemGjcWeighingBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.bean.GjcWeighingBean
|
||||
@@ -15,10 +16,9 @@ class GjcWeighingViewHolder(view: View) :
|
||||
val bean = getItemBean(item)!!
|
||||
binding.bean = bean
|
||||
|
||||
// 整行点击跳转到详情页(暂未实现)
|
||||
// 整行点击跳转到开始计重页面
|
||||
binding.ll.setOnClickListener {
|
||||
// TODO: 跳转到详情页(待实现)
|
||||
// GjcWeighingDetailsActivity.start(it.context, bean.whId)
|
||||
GjcWeighingStartActivity.startForAdd(it.context, bean.maWbId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
package com.lukouguoji.gjc.viewModel
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.holder.GjcWeighingRecordViewHolder
|
||||
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.ktx.launchCollect
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import com.lukouguoji.module_base.model.ScanModel
|
||||
|
||||
/**
|
||||
* 国际出港计重记录 ViewModel
|
||||
*/
|
||||
class GjcWeighingRecordViewModel : BasePageViewModel() {
|
||||
|
||||
// 搜索条件
|
||||
val flightDate = MutableLiveData("") // 航班日期
|
||||
val flightNo = MutableLiveData("") // 航班号
|
||||
val agentCode = MutableLiveData("") // 代理人
|
||||
val spCode = MutableLiveData("") // 特码
|
||||
val waybillNo = MutableLiveData("") // 运单号
|
||||
|
||||
// 适配器配置
|
||||
val itemViewHolder = GjcWeighingRecordViewHolder::class.java
|
||||
val itemLayoutId = R.layout.item_gjc_weighing_record
|
||||
|
||||
// 统计数据
|
||||
val totalCount = MutableLiveData("0") // 合计票数
|
||||
val totalPc = MutableLiveData("0") // 总件数
|
||||
val totalWeight = MutableLiveData("0") // 总重量
|
||||
val cargoWeight = MutableLiveData("0") // 总货重
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 方法区
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* 扫码输入航班号
|
||||
*/
|
||||
fun flightNoScanClick() {
|
||||
ScanModel.startScan(getTopActivity(), Constant.RequestCode.FLIGHT_NO)
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫码输入运单号
|
||||
*/
|
||||
fun waybillNoScanClick() {
|
||||
ScanModel.startScan(getTopActivity(), Constant.RequestCode.WAYBILL)
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索按钮点击
|
||||
*/
|
||||
fun searchClick() {
|
||||
refresh()
|
||||
}
|
||||
|
||||
/**
|
||||
* 运抵申报按钮点击(暂未实现)
|
||||
*/
|
||||
fun declareClick() {
|
||||
// TODO: 跳转到运抵申报页面(待实现)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取列表数据
|
||||
*/
|
||||
override fun getData() {
|
||||
// 构建查询参数(列表接口)
|
||||
val listParams = mapOf(
|
||||
"pageNum" to pageModel.page,
|
||||
"pageSize" to pageModel.limit,
|
||||
"fdate" to flightDate.value!!.ifEmpty { null },
|
||||
"fno" to flightNo.value!!.ifEmpty { null },
|
||||
"agentCode" to agentCode.value!!.ifEmpty { null },
|
||||
"spCode" to spCode.value!!.ifEmpty { null },
|
||||
"likeNo" to waybillNo.value!!.ifEmpty { null },
|
||||
).toRequestBody()
|
||||
|
||||
// 构建查询参数(统计接口 - 使用相同的搜索条件)
|
||||
val totalParams = mapOf(
|
||||
"fdate" to flightDate.value!!.ifEmpty { null },
|
||||
"fno" to flightNo.value!!.ifEmpty { null },
|
||||
"agentCode" to agentCode.value!!.ifEmpty { null },
|
||||
"spCode" to spCode.value!!.ifEmpty { null },
|
||||
"likeNo" to waybillNo.value!!.ifEmpty { null },
|
||||
).toRequestBody()
|
||||
|
||||
// 获取列表数据(显示loading)
|
||||
launchLoadingCollect({
|
||||
NetApply.api.getGjcWeighingRecordList(listParams)
|
||||
}) {
|
||||
onSuccess = {
|
||||
pageModel.handleListBean(it)
|
||||
}
|
||||
}
|
||||
|
||||
// 获取统计数据(后台调用,不显示loading)
|
||||
launchCollect({
|
||||
NetApply.api.getGjcWeighingRecordStatistics(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()
|
||||
cargoWeight.value = (data?.cargoWeight ?: 0.0).toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理扫码结果
|
||||
*/
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
if (resultCode == Activity.RESULT_OK && data != null) {
|
||||
when (requestCode) {
|
||||
Constant.RequestCode.FLIGHT_NO -> {
|
||||
flightNo.value = data.getStringExtra(Constant.Result.CODED_CONTENT)
|
||||
refresh()
|
||||
}
|
||||
Constant.RequestCode.WAYBILL -> {
|
||||
waybillNo.value = data.getStringExtra(Constant.Result.CODED_CONTENT)
|
||||
refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,323 @@
|
||||
package com.lukouguoji.gjc.viewModel
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Intent
|
||||
import android.view.View
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.lukouguoji.module_base.base.BaseViewModel
|
||||
import com.lukouguoji.module_base.bean.GjcWeighingBean
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.common.ConstantEvent
|
||||
import com.lukouguoji.module_base.http.net.DiBangWeightModel
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.impl.FlowBus
|
||||
import com.lukouguoji.module_base.ktx.formatDate
|
||||
import com.lukouguoji.module_base.ktx.getActivity
|
||||
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.ktx.verifyNullOrEmpty
|
||||
import com.lukouguoji.module_base.model.ScanModel
|
||||
import com.lukouguoji.module_base.util.Common
|
||||
import com.lukouguoji.module_base.util.DictUtils
|
||||
import dev.utils.app.info.KeyValue
|
||||
import kotlinx.coroutines.launch
|
||||
import java.util.Calendar
|
||||
import java.util.Date
|
||||
|
||||
/**
|
||||
* 国际出港计重-开始计重 ViewModel
|
||||
*/
|
||||
class GjcWeighingStartViewModel : BaseViewModel() {
|
||||
|
||||
// 运单ID(从列表页传入)
|
||||
var maWbId: Long = 0
|
||||
|
||||
// 数据Bean
|
||||
val dataBean = MutableLiveData(GjcWeighingBean())
|
||||
|
||||
// 地磅集成
|
||||
val diBangModel = DiBangWeightModel()
|
||||
val channel = MutableLiveData("") // 通道号(用于控制地磅key)
|
||||
|
||||
// 地磅称重显示
|
||||
val diBangWeight = MutableLiveData("0") // 地磅重量(右上角黄色显示区域)
|
||||
|
||||
// 可编辑字段(用于双向绑定)
|
||||
val realTimePc = MutableLiveData("") // 实时件数
|
||||
val realTimeWeight = MutableLiveData("") // 实时重量
|
||||
val realTimeVolume = MutableLiveData("") // 实时体积
|
||||
val arrivePc = MutableLiveData("") // 运抵件数
|
||||
val arriveWeight = MutableLiveData("") // 运抵重量
|
||||
val arriveVolume = MutableLiveData("") // 运抵体积
|
||||
|
||||
// 下拉选择数据源
|
||||
val channelList = MutableLiveData<List<KeyValue>>() // 通道号列表
|
||||
val agentList = MutableLiveData<List<KeyValue>>() // 代理人列表
|
||||
val spCodeList = MutableLiveData<List<KeyValue>>() // 特码列表
|
||||
val businessTypeList = MutableLiveData<List<KeyValue>>() // 业务类型列表
|
||||
|
||||
// 托盘车自重(查询获取)
|
||||
val carWeight = MutableLiveData("0")
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
*/
|
||||
fun initOnCreated(activity: Activity, intent: Intent) {
|
||||
// 获取传入的运单ID
|
||||
maWbId = intent.getLongExtra(Constant.Key.MAWB_ID, 0)
|
||||
|
||||
// 监听地磅重量变化
|
||||
diBangModel.weight.observe(activity as LifecycleOwner) { weight ->
|
||||
val w = weight?.toDoubleOrNull() ?: 0.0
|
||||
diBangWeight.value = if (w > 0) String.format("%.0f", w) else "0"
|
||||
}
|
||||
|
||||
// 监听通道号变化,设置地磅的key
|
||||
channel.observe(activity as LifecycleOwner) {
|
||||
diBangModel.key = it ?: ""
|
||||
}
|
||||
|
||||
// 加载下拉列表数据
|
||||
loadChannelList()
|
||||
loadAgentList()
|
||||
loadSpCodeList()
|
||||
loadBusinessTypeList()
|
||||
|
||||
// 加载运单数据
|
||||
if (maWbId > 0) {
|
||||
loadWeighingData()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载通道号列表
|
||||
*/
|
||||
private fun loadChannelList() {
|
||||
DictUtils.getChannelList {
|
||||
channelList.value = it
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载代理人列表
|
||||
*/
|
||||
private fun loadAgentList() {
|
||||
DictUtils.getAgentList {
|
||||
agentList.value = it
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载特码列表
|
||||
*/
|
||||
private fun loadSpCodeList() {
|
||||
// TODO: 从字典获取特码列表
|
||||
spCodeList.value = listOf()
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载业务类型列表
|
||||
*/
|
||||
private fun loadBusinessTypeList() {
|
||||
// TODO: 从字典获取业务类型列表
|
||||
businessTypeList.value = listOf()
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载运单数据
|
||||
*/
|
||||
private fun loadWeighingData() {
|
||||
val params = mapOf(
|
||||
"maWbId" to maWbId
|
||||
).toRequestBody()
|
||||
|
||||
launchCollect({
|
||||
// 使用查询接口获取运单详情(暂时使用列表接口,传入maWbId过滤)
|
||||
NetApply.api.getGjcWeighingList(params)
|
||||
}) {
|
||||
onSuccess = {
|
||||
if (it.list?.isNotEmpty() == true) {
|
||||
val bean = it.list!![0]
|
||||
dataBean.value = bean
|
||||
|
||||
// 填充可编辑字段
|
||||
realTimePc.value = if (bean.pc > 0) bean.pc.toString() else ""
|
||||
realTimeWeight.value = if (bean.weight > 0) bean.weight.toString() else ""
|
||||
realTimeVolume.value = if (bean.volume > 0) bean.volume.toString() else ""
|
||||
arrivePc.value = if (bean.arrivePc > 0) bean.arrivePc.toString() else ""
|
||||
arriveWeight.value = if (bean.arriveWeight > 0) bean.arriveWeight.toString() else ""
|
||||
arriveVolume.value = if (bean.arriveVolume > 0) bean.arriveVolume.toString() else ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 航班日期点击
|
||||
*/
|
||||
fun flightDateClick(view: View) {
|
||||
Common.onYearMonthDay(view.context.getActivity(), dataBean.value?.fdate) { year, month, day ->
|
||||
val calendar = Calendar.getInstance()
|
||||
calendar.set(year, month - 1, day)
|
||||
val date = calendar.time.formatDate()
|
||||
dataBean.value = dataBean.value?.apply { fdate = date }
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 运单号扫码
|
||||
*/
|
||||
fun waybillScanClick() {
|
||||
ScanModel.startScan(getTopActivity(), Constant.RequestCode.WAYBILL)
|
||||
}
|
||||
|
||||
/**
|
||||
* 航班号扫码
|
||||
*/
|
||||
fun flightScanClick() {
|
||||
ScanModel.startScan(getTopActivity(), Constant.RequestCode.FLIGHT_NO)
|
||||
}
|
||||
|
||||
/**
|
||||
* 托盘车号扫码
|
||||
*/
|
||||
fun carIdScanClick() {
|
||||
ScanModel.startScan(getTopActivity(), Constant.RequestCode.CAR)
|
||||
}
|
||||
|
||||
/**
|
||||
* 托盘车号输入后查询自重
|
||||
*/
|
||||
fun queryCarWeight(carId: String) {
|
||||
if (carId.isEmpty()) {
|
||||
carWeight.value = "0"
|
||||
return
|
||||
}
|
||||
|
||||
val params = mapOf(
|
||||
"carId" to carId
|
||||
).toRequestBody()
|
||||
|
||||
launchCollect({
|
||||
// 查询托盘车自重接口(待确认具体接口)
|
||||
// 暂时使用模拟数据
|
||||
// NetApply.api.queryCarWeight(params)
|
||||
carWeight.value = "0" // 模拟返回
|
||||
}) {
|
||||
onSuccess = {
|
||||
// carWeight.value = it.data?.weight?.toString() ?: "0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分拣计重按钮点击
|
||||
*/
|
||||
fun sortingWeighingClick() {
|
||||
showToast("分拣计重功能开发中")
|
||||
// TODO: 实现分拣计重功能
|
||||
}
|
||||
|
||||
/**
|
||||
* 完成计重按钮点击
|
||||
*/
|
||||
fun completeCheckInClick() {
|
||||
val bean = dataBean.value ?: return
|
||||
|
||||
// 验证必填字段
|
||||
if (bean.no.verifyNullOrEmpty("请输入运单号")) return
|
||||
if (bean.fno.verifyNullOrEmpty("请输入航班号")) return
|
||||
|
||||
// 从编辑字段获取数值
|
||||
val pc = realTimePc.value?.toLongOrNull() ?: bean.pc
|
||||
val weight = realTimeWeight.value?.toDoubleOrNull() ?: bean.weight
|
||||
val volume = realTimeVolume.value?.toDoubleOrNull() ?: bean.volume
|
||||
val arrivePcVal = arrivePc.value?.toLongOrNull() ?: bean.arrivePc
|
||||
val arriveWeightVal = arriveWeight.value?.toDoubleOrNull() ?: bean.arriveWeight
|
||||
val arriveVolumeVal = arriveVolume.value?.toDoubleOrNull() ?: bean.arriveVolume
|
||||
|
||||
// 提交数据到接口
|
||||
val params = mapOf(
|
||||
"maWbId" to bean.maWbId,
|
||||
"no" to bean.no,
|
||||
"prefix" to bean.prefix,
|
||||
"wbNo" to bean.wbNo,
|
||||
"agentCode" to bean.agentCode,
|
||||
"agentName" to bean.agentName,
|
||||
"fid" to bean.fid,
|
||||
"fdate" to bean.fdate,
|
||||
"fno" to bean.fno,
|
||||
"flight" to bean.flight,
|
||||
"range" to bean.range,
|
||||
"dep" to bean.dep,
|
||||
"dest" to bean.dest,
|
||||
"dest1" to bean.dest1,
|
||||
"dest2" to bean.dest2,
|
||||
"pc" to pc,
|
||||
"weight" to weight,
|
||||
"volume" to volume,
|
||||
"arrivePc" to arrivePcVal,
|
||||
"arriveWeight" to arriveWeightVal,
|
||||
"arriveVolume" to arriveVolumeVal,
|
||||
"spCode" to bean.spCode,
|
||||
"goods" to bean.goods,
|
||||
"goodsCn" to bean.goodsCn,
|
||||
"businessType" to bean.businessType,
|
||||
"carId" to bean.carId,
|
||||
"remark" to bean.remark,
|
||||
"checkIn" to "1" // 收运状态设置为已收运
|
||||
).toRequestBody(removeEmptyOrNull = true)
|
||||
|
||||
launchLoadingCollect({
|
||||
NetApply.api.completeCheckIn(params)
|
||||
}) {
|
||||
onSuccess = { result ->
|
||||
if (result.verifySuccess()) {
|
||||
showToast("计重完成")
|
||||
// 发送刷新事件
|
||||
viewModelScope.launch {
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||
}
|
||||
getTopActivity().finish()
|
||||
} else {
|
||||
showToast(result.msg.noNull("计重失败"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理扫码结果
|
||||
*/
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
if (resultCode == Activity.RESULT_OK && data != null) {
|
||||
val content = data.getStringExtra(Constant.Result.CODED_CONTENT).noNull()
|
||||
when (requestCode) {
|
||||
Constant.RequestCode.WAYBILL -> {
|
||||
dataBean.value = dataBean.value?.apply { no = content }
|
||||
}
|
||||
Constant.RequestCode.FLIGHT_NO -> {
|
||||
dataBean.value = dataBean.value?.apply { fno = content }
|
||||
}
|
||||
Constant.RequestCode.CAR -> {
|
||||
dataBean.value = dataBean.value?.apply { carId = content }
|
||||
// 查询托盘车自重
|
||||
queryCarWeight(content)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理资源
|
||||
*/
|
||||
override fun onCleared() {
|
||||
super.onCleared()
|
||||
diBangModel.cancelLooperGet()
|
||||
}
|
||||
}
|
||||
@@ -4,12 +4,15 @@ import android.app.Activity
|
||||
import android.content.Intent
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.activity.GjcWeighingRecordListActivity
|
||||
import com.lukouguoji.gjc.activity.GjcWeighingStartActivity
|
||||
import com.lukouguoji.gjc.holder.GjcWeighingViewHolder
|
||||
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.ktx.launchCollect
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import com.lukouguoji.module_base.model.ScanModel
|
||||
|
||||
@@ -61,17 +64,19 @@ class GjcWeighingViewModel : BasePageViewModel() {
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加按钮点击(暂未实现)
|
||||
* 添加按钮点击(跳转到开始计重页面)
|
||||
*/
|
||||
fun addClick() {
|
||||
// TODO: 跳转到添加页面(待实现)
|
||||
// showToast("请从列表中选择一条待计重运单")
|
||||
|
||||
GjcWeighingStartActivity.startForAdd(getTopActivity(), 123)
|
||||
}
|
||||
|
||||
/**
|
||||
* 计重记录按钮点击(暂未实现)
|
||||
* 计重记录按钮点击
|
||||
*/
|
||||
fun recordClick() {
|
||||
// TODO: 跳转到计重记录页面(待实现)
|
||||
GjcWeighingRecordListActivity.start(getTopActivity())
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.gjc.viewModel.GjcWeighingRecordViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<!-- 搜索区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 航班日期 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择航班日期"}'
|
||||
icon="@{@drawable/img_date}"
|
||||
type="@{SearchLayoutType.DATE}"
|
||||
value="@={viewModel.flightDate}" />
|
||||
|
||||
<!-- 航班号 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入航班号"}'
|
||||
icon="@{@drawable/img_scan}"
|
||||
setOnIconClickListener="@{()-> viewModel.flightNoScanClick()}"
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.flightNo}" />
|
||||
|
||||
<!-- 择代理 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择代理"}'
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
value="@={viewModel.agentCode}" />
|
||||
|
||||
<!-- 择特码 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择特码"}'
|
||||
type="@{SearchLayoutType.SPINNER}"
|
||||
value="@={viewModel.spCode}" />
|
||||
|
||||
<!-- 运单号 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入运单号"}'
|
||||
icon="@{@drawable/img_scan}"
|
||||
setOnIconClickListener="@{()-> viewModel.waybillNoScanClick()}"
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.waybillNo}" />
|
||||
|
||||
<!-- 搜索按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
style="@style/iv_search_action"
|
||||
android:onClick="@{()-> viewModel.searchClick()}"
|
||||
android:src="@drawable/img_search" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 列表 -->
|
||||
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/srl"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
itemLayoutId="@{viewModel.itemLayoutId}"
|
||||
viewHolder="@{viewModel.itemViewHolder}"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_gjc_weighing_record" />
|
||||
|
||||
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||
|
||||
<!-- 底部统计和按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@color/color_bottom_layout"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
<!-- 统计信息 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{"合计:"+viewModel.totalCount+"票"}'
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="合计:1票" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text='@{"总件数:"+viewModel.totalPc}'
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="总件数:100" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text='@{"总重量:"+viewModel.totalWeight}'
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="总重量:100" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:text='@{"总货重:"+viewModel.cargoWeight}'
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="总货重:100" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 运抵申报按钮 -->
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{()-> viewModel.declareClick()}"
|
||||
android:text="运抵申报" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
422
module_gjc/src/main/res/layout/activity_gjc_weighing_start.xml
Normal file
422
module_gjc/src/main/res/layout/activity_gjc_weighing_start.xml
Normal file
@@ -0,0 +1,422 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.gjc.viewModel.GjcWeighingStartViewModel" />
|
||||
</data>
|
||||
|
||||
<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="15dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="20dp">
|
||||
|
||||
<!-- 第一部分:前2行表单(左侧2列)+ 地磅称重(右侧) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 左侧:前2行表单(2列) -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 第1行:运单号、通道号 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入运单号"}'
|
||||
title='@{"运单号"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.dataBean.no}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择通道号"}'
|
||||
list="@{viewModel.channelList}"
|
||||
title='@{"通 道 号"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.channel}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第2行:代理人、特码 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择代理人"}'
|
||||
list="@{viewModel.agentList}"
|
||||
title='@{"代 理 人"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.dataBean.agentCode}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择特码"}'
|
||||
list="@{viewModel.spCodeList}"
|
||||
title='@{"特 码"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.dataBean.spCode}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 右侧:地磅称重区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 黄色标题栏 -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/bg_shouyun_dbcz"
|
||||
android:gravity="center"
|
||||
android:text="地磅称重"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- 青色重量显示区域 -->
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_shouyun_dbzl"
|
||||
android:minHeight="60dp"
|
||||
android:padding="8dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvWeight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="@{viewModel.diBangWeight}"
|
||||
android:textColor="@color/text_red"
|
||||
android:textSize="45sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="1655" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBaseline="@id/tvWeight"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_toEndOf="@id/tvWeight"
|
||||
android:text="kg"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第3行:航班日期、航班号、航程 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择航班日期"}'
|
||||
title='@{"航班日期"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.DATE}"
|
||||
value='@={viewModel.dataBean.fdate}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入航班号"}'
|
||||
title='@{"航 班 号"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.dataBean.fno}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入航程"}'
|
||||
title='@{"航 程"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.dataBean.range}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第4行:预配件数、预配重量、预配体积(只读) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"预配件数"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{String.valueOf(viewModel.dataBean.pc)}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"预配重量"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{String.valueOf(viewModel.dataBean.weight)}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"预配体积"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{String.valueOf(viewModel.dataBean.volume)}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第5行:实时件数、实时重量、实时体积 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入实时件数"}'
|
||||
title='@{"实时件数"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.realTimePc}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入实时重量"}'
|
||||
title='@{"实时重量"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.realTimeWeight}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入实时体积"}'
|
||||
title='@{"实时体积"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.realTimeVolume}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第6行:运抵件数、运抵重量、运抵体积 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入运抵件数"}'
|
||||
title='@{"运抵件数"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.arrivePc}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入运抵重量"}'
|
||||
title='@{"运抵重量"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.arriveWeight}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入运抵体积"}'
|
||||
title='@{"运抵体积"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.arriveVolume}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第7行:托盘车号、托盘车自重、业务类型 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请输入托盘车号"}'
|
||||
title='@{"托盘车号"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.dataBean.carId}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"托盘车自重"}'
|
||||
titleLength="@{6}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.carWeight}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_weight="1"
|
||||
hint='@{"请选择业务类型"}'
|
||||
list="@{viewModel.businessTypeList}"
|
||||
title='@{"业务类型"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.dataBean.businessType}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第8行:备注 -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
hint='@{"请输入备注"}'
|
||||
inputHeight="@{80}"
|
||||
title='@{"备 注"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.dataBean.remark}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<!-- 底部操作栏 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:padding="15dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:background="@drawable/bg_primary_stroke_radius_4"
|
||||
android:gravity="center"
|
||||
android:onClick="@{(v)-> viewModel.sortingWeighingClick()}"
|
||||
android:text="分托计重"
|
||||
android:textColor="@color/colorPrimary"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="50dp"
|
||||
android:background="@drawable/bg_primary_radius_4"
|
||||
android:gravity="center"
|
||||
android:onClick="@{(v)-> viewModel.completeCheckInClick()}"
|
||||
android:text="完成计重"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
274
module_gjc/src/main/res/layout/item_gjc_weighing_record.xml
Normal file
274
module_gjc/src/main/res/layout/item_gjc_weighing_record.xml
Normal file
@@ -0,0 +1,274 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="bean"
|
||||
type="com.lukouguoji.module_base.bean.GjcWeighingRecordBean" />
|
||||
</data>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginVertical="5dp"
|
||||
android:background="@drawable/bg_item"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<!-- 飞机图标 -->
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/img_plane" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 第一行数据 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!-- 运单号 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="运单号:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.no}"
|
||||
android:textColor="@color/colorPrimary"
|
||||
tools:text="78109081212" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 代理人 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="代理人:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{bean.agentName}'
|
||||
tools:text="SF" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 特码 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{3}"
|
||||
android:text="特码:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.spCode}"
|
||||
tools:text="NOR" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 入库件数 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="入库件数:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{String.valueOf(bean.checkInPc)}'
|
||||
tools:text="11" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 入库重量 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="入库重量:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{String.valueOf(bean.checkInWeight)}'
|
||||
tools:text="12" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 第二行数据 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<!-- 计划航班 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="计划航班:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.flight}"
|
||||
tools:text="20240216/MU2026" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 航程 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{3}"
|
||||
android:text="航程:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{bean.range}'
|
||||
tools:text="HFE - PEK" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 预计起飞 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="预计起飞:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.fdate}"
|
||||
tools:text="09:12" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 收运人 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="收运人:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{bean.userName}'
|
||||
tools:text="张三" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 入库时间 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="入库时间:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{bean.opDate}'
|
||||
tools:text="2024-02-16 09:12" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 右侧箭头 -->
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/img_pda_right"
|
||||
android:layout_marginLeft="10dp" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</layout>
|
||||
Reference in New Issue
Block a user