feat: 出港计重 ui
This commit is contained in:
@@ -119,6 +119,11 @@
|
|||||||
android:configChanges="orientation|keyboardHidden"
|
android:configChanges="orientation|keyboardHidden"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:screenOrientation="userLandscape" />
|
android:screenOrientation="userLandscape" />
|
||||||
|
<activity
|
||||||
|
android:name="com.lukouguoji.gjc.activity.GjcWeighingListActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
android:exported="false"
|
||||||
|
android:screenOrientation="userLandscape" />
|
||||||
<activity
|
<activity
|
||||||
android:name="com.lukouguoji.gjc.activity.GjcHandoverActivity"
|
android:name="com.lukouguoji.gjc.activity.GjcHandoverActivity"
|
||||||
android:configChanges="orientation|keyboardHidden"
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
|||||||
@@ -318,6 +318,11 @@ class HomeFragment : Fragment() {
|
|||||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GJC_BOX_WEIGHING)
|
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GJC_BOX_WEIGHING)
|
||||||
.navigation()
|
.navigation()
|
||||||
}
|
}
|
||||||
|
//出港计重
|
||||||
|
Constant.AuthName.GjcCheckWeighing -> {
|
||||||
|
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_LIST)
|
||||||
|
.navigation()
|
||||||
|
}
|
||||||
//仓库
|
//仓库
|
||||||
Constant.AuthName.GjcWareHouseActivity -> {
|
Constant.AuthName.GjcWareHouseActivity -> {
|
||||||
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GJC_WARE_HOUSE)
|
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_GJC_WARE_HOUSE)
|
||||||
@@ -604,6 +609,13 @@ class HomeFragment : Fragment() {
|
|||||||
"板箱过磅"
|
"板箱过磅"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
list.add(
|
||||||
|
RightMenu(
|
||||||
|
Constant.AuthName.GjcCheckWeighing,
|
||||||
|
R.mipmap.gjc_fu_bang_icon,
|
||||||
|
"出港计重"
|
||||||
|
)
|
||||||
|
)
|
||||||
list.add(
|
list.add(
|
||||||
RightMenu(
|
RightMenu(
|
||||||
Constant.AuthName.GjcWareHouseActivity,
|
Constant.AuthName.GjcWareHouseActivity,
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package com.lukouguoji.module_base.bean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际出港计重-列表数据Bean
|
||||||
|
* 对应API: IntExpCheckIn/checked/pageQuery
|
||||||
|
* 对应API返回类型: GjcWarehouse
|
||||||
|
*/
|
||||||
|
class GjcWeighingBean {
|
||||||
|
var whId: Long = 0 // Id
|
||||||
|
var no: String = "" // 运单号
|
||||||
|
var prefix: String = "" // 运单前缀
|
||||||
|
var wbNo: String = "" // 主运单编号(11位)
|
||||||
|
|
||||||
|
var agentCode: String = "" // 代理人code
|
||||||
|
var agentName: String = "" // 代理人名称(查询后返回中文)
|
||||||
|
|
||||||
|
var fdate: String = "" // 航班时间
|
||||||
|
var fno: String = "" // 航班号
|
||||||
|
var flight: String = "" // 航班: 航班日期/航班号
|
||||||
|
var fclose: String = "" // 航班关闭时间
|
||||||
|
var range: String = "" // 航程
|
||||||
|
var dep: String = "" // 始发站
|
||||||
|
var dest: String = "" // 目的站
|
||||||
|
var dest1: String = "" // 目的站1
|
||||||
|
var dest2: String = "" // 目的站2
|
||||||
|
|
||||||
|
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 spCode: String = "" // 特码
|
||||||
|
var goods: String = "" // 品名
|
||||||
|
var goodsCn: String = "" // 品名(中文)
|
||||||
|
var businessType: String = "" // 业务类型
|
||||||
|
|
||||||
|
var location: String = "" // uld
|
||||||
|
var locFlag: String = "" // 位置标识
|
||||||
|
var chargeFlag: String = "" // 收费标识
|
||||||
|
var splitFlag: String = "" // 分单标识
|
||||||
|
var subCode: String = "" // 子代码
|
||||||
|
var unNumber: String = "" // UN编号
|
||||||
|
|
||||||
|
var opId: String = "" // 收运人ID
|
||||||
|
var userName: String = "" // 收运人(查询后返回中文)
|
||||||
|
var opDate: String = "" // 收运时间
|
||||||
|
|
||||||
|
var activeId: Long = 0 // 有效值
|
||||||
|
var by1: String = "" // 备用字段1
|
||||||
|
var by2: String = "" // 备用字段2
|
||||||
|
|
||||||
|
var whIdList: List<Long>? = null // idList(获取收运记录列表)
|
||||||
|
var billsNo: Any? = null // 账单号
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.lukouguoji.module_base.bean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际出港计重-统计数据Bean
|
||||||
|
* 对应API: IntExpCheckIn/checked/pageQueryTotal
|
||||||
|
* 对应API返回类型: ManifestTotalDto
|
||||||
|
*/
|
||||||
|
class GjcWeighingStatisticsBean {
|
||||||
|
var wbNumber: Int = 0 // 运单票数/总票数
|
||||||
|
var totalPc: Long = 0 // 总件数
|
||||||
|
var totalWeight: Double = 0.0 // 总重量
|
||||||
|
var cargoWeight: Double = 0.0 // 总货重
|
||||||
|
}
|
||||||
@@ -236,6 +236,7 @@ interface Constant {
|
|||||||
|
|
||||||
const val GjcAppDomExpCheckin = "AppIntExpCheckIn" //收运
|
const val GjcAppDomExpCheckin = "AppIntExpCheckIn" //收运
|
||||||
const val GjcFuBangActivity = "AppIntExpULDWeighing" //复磅
|
const val GjcFuBangActivity = "AppIntExpULDWeighing" //复磅
|
||||||
|
const val GjcCheckWeighing = "AppIntExpCheckWeighing" //出港计重
|
||||||
const val GjcWareHouseActivity = "AppIntExpWareHouse" //仓库
|
const val GjcWareHouseActivity = "AppIntExpWareHouse" //仓库
|
||||||
const val GjcQueryListActivity = "AppIntExpSearch" //查询
|
const val GjcQueryListActivity = "AppIntExpSearch" //查询
|
||||||
const val GjcYiKuListActivity = "AppIntExpMove" //移库
|
const val GjcYiKuListActivity = "AppIntExpMove" //移库
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ import com.lukouguoji.module_base.bean.GjcGoodsDetailsBean
|
|||||||
import com.lukouguoji.module_base.bean.GjcUldUseBean
|
import com.lukouguoji.module_base.bean.GjcUldUseBean
|
||||||
import com.lukouguoji.module_base.bean.GjcWaybillBean
|
import com.lukouguoji.module_base.bean.GjcWaybillBean
|
||||||
import com.lukouguoji.module_base.bean.GjcWaybillDataBean
|
import com.lukouguoji.module_base.bean.GjcWaybillDataBean
|
||||||
|
import com.lukouguoji.module_base.bean.GjcWeighingBean
|
||||||
|
import com.lukouguoji.module_base.bean.GjcWeighingStatisticsBean
|
||||||
import com.lukouguoji.module_base.bean.GjjGoodsBean
|
import com.lukouguoji.module_base.bean.GjjGoodsBean
|
||||||
import com.lukouguoji.module_base.bean.GjjGoodsDetailsBean
|
import com.lukouguoji.module_base.bean.GjjGoodsDetailsBean
|
||||||
import com.lukouguoji.module_base.bean.GjjGoodsTypeBean
|
import com.lukouguoji.module_base.bean.GjjGoodsTypeBean
|
||||||
@@ -439,6 +441,20 @@ interface Api {
|
|||||||
@POST("IntExpWeighting/weight")
|
@POST("IntExpWeighting/weight")
|
||||||
suspend fun submitGjcBoxWeighing(@Body data: RequestBody): BaseResultBean<SimpleResultBean>
|
suspend fun submitGjcBoxWeighing(@Body data: RequestBody): BaseResultBean<SimpleResultBean>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际出港计重-分页搜索
|
||||||
|
* 接口路径: /IntExpCheckIn/checked/pageQuery
|
||||||
|
*/
|
||||||
|
@POST("IntExpCheckIn/checked/pageQuery")
|
||||||
|
suspend fun getGjcWeighingList(@Body data: RequestBody): BaseListBean<GjcWeighingBean>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际出港计重-条件查询总件数、总重量、运单总数
|
||||||
|
* 接口路径: /IntExpCheckIn/checked/pageQueryTotal
|
||||||
|
*/
|
||||||
|
@POST("IntExpCheckIn/checked/pageQueryTotal")
|
||||||
|
suspend fun getGjcWeighingStatistics(@Body data: RequestBody): BaseResultBean<GjcWeighingStatisticsBean>
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// 国际进-电报解析
|
// 国际进-电报解析
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -119,6 +119,8 @@ object ARouterConstants {
|
|||||||
const val ACTIVITY_URL_GJC_BOX_WEIGHING_DETAILS = "/gjc/GjcBoxWeighingDetailsActivity" //国际出港模块 板箱过磅详情
|
const val ACTIVITY_URL_GJC_BOX_WEIGHING_DETAILS = "/gjc/GjcBoxWeighingDetailsActivity" //国际出港模块 板箱过磅详情
|
||||||
const val ACTIVITY_URL_GJC_BOX_WEIGHING_ADD = "/gjc/GjcBoxWeighingAddActivity" //国际出港模块 添加过磅
|
const val ACTIVITY_URL_GJC_BOX_WEIGHING_ADD = "/gjc/GjcBoxWeighingAddActivity" //国际出港模块 添加过磅
|
||||||
|
|
||||||
|
const val ACTIVITY_URL_GJC_WEIGHING_LIST = "/gjc/GjcWeighingListActivity" //国际出港模块 出港计重
|
||||||
|
|
||||||
const val ACTIVITY_URL_GJC_WARE_HOUSE = "/gjc/GjcWareHouseActivity" //国际出港模块 仓库
|
const val ACTIVITY_URL_GJC_WARE_HOUSE = "/gjc/GjcWareHouseActivity" //国际出港模块 仓库
|
||||||
const val ACTIVITY_URL_GJC_WARE_HOUSE_INFO = "/gjc/GjcWareHouseInfoActivity" //国际出港模块 仓库详情
|
const val ACTIVITY_URL_GJC_WARE_HOUSE_INFO = "/gjc/GjcWareHouseInfoActivity" //国际出港模块 仓库详情
|
||||||
|
|
||||||
|
|||||||
@@ -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.ActivityGjcWeighingListBinding
|
||||||
|
import com.lukouguoji.gjc.viewModel.GjcWeighingViewModel
|
||||||
|
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||||
|
import com.lukouguoji.module_base.common.ConstantEvent
|
||||||
|
import com.lukouguoji.module_base.impl.FlowBus
|
||||||
|
import com.lukouguoji.module_base.impl.observe
|
||||||
|
import com.lukouguoji.module_base.ktx.getLifecycleOwner
|
||||||
|
import com.lukouguoji.module_base.router.ARouterConstants
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际出港计重列表页
|
||||||
|
*/
|
||||||
|
@Route(path = ARouterConstants.ACTIVITY_URL_GJC_WEIGHING_LIST)
|
||||||
|
class GjcWeighingListActivity :
|
||||||
|
BaseBindingActivity<ActivityGjcWeighingListBinding, GjcWeighingViewModel>() {
|
||||||
|
|
||||||
|
override fun layoutId() = R.layout.activity_gjc_weighing_list
|
||||||
|
|
||||||
|
override fun viewModelClass() = GjcWeighingViewModel::class.java
|
||||||
|
|
||||||
|
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||||
|
setBackArrow("出港计重")
|
||||||
|
|
||||||
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
|
// 绑定分页逻辑
|
||||||
|
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, GjcWeighingListActivity::class.java)
|
||||||
|
context.startActivity(starter)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.lukouguoji.gjc.holder
|
||||||
|
|
||||||
|
import android.view.View
|
||||||
|
import com.lukouguoji.gjc.databinding.ItemGjcWeighingBinding
|
||||||
|
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||||
|
import com.lukouguoji.module_base.bean.GjcWeighingBean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际出港计重列表 ViewHolder
|
||||||
|
*/
|
||||||
|
class GjcWeighingViewHolder(view: View) :
|
||||||
|
BaseViewHolder<GjcWeighingBean, ItemGjcWeighingBinding>(view) {
|
||||||
|
|
||||||
|
override fun onBind(item: Any?, position: Int) {
|
||||||
|
val bean = getItemBean(item)!!
|
||||||
|
binding.bean = bean
|
||||||
|
|
||||||
|
// 整行点击跳转到详情页(暂未实现)
|
||||||
|
binding.ll.setOnClickListener {
|
||||||
|
// TODO: 跳转到详情页(待实现)
|
||||||
|
// GjcWeighingDetailsActivity.start(it.context, bean.whId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
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.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.toRequestBody
|
||||||
|
import com.lukouguoji.module_base.model.ScanModel
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 国际出港计重 ViewModel
|
||||||
|
*/
|
||||||
|
class GjcWeighingViewModel : BasePageViewModel() {
|
||||||
|
|
||||||
|
// 搜索条件
|
||||||
|
val flightDate = MutableLiveData("") // 航班日期
|
||||||
|
val flightNo = MutableLiveData("") // 航班号
|
||||||
|
val agentCode = MutableLiveData("") // 代理人
|
||||||
|
val spCode = MutableLiveData("") // 特码
|
||||||
|
val waybillNo = MutableLiveData("") // 运单号
|
||||||
|
|
||||||
|
// 适配器配置
|
||||||
|
val itemViewHolder = GjcWeighingViewHolder::class.java
|
||||||
|
val itemLayoutId = R.layout.item_gjc_weighing
|
||||||
|
|
||||||
|
// 统计数据
|
||||||
|
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 addClick() {
|
||||||
|
// TODO: 跳转到添加页面(待实现)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计重记录按钮点击(暂未实现)
|
||||||
|
*/
|
||||||
|
fun recordClick() {
|
||||||
|
// 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.getGjcWeighingList(listParams)
|
||||||
|
}) {
|
||||||
|
onSuccess = {
|
||||||
|
pageModel.handleListBean(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取统计数据(后台调用,不显示loading)
|
||||||
|
launchCollect({
|
||||||
|
NetApply.api.getGjcWeighingStatistics(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()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
191
module_gjc/src/main/res/layout/activity_gjc_weighing_list.xml
Normal file
191
module_gjc/src/main/res/layout/activity_gjc_weighing_list.xml
Normal file
@@ -0,0 +1,191 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="viewModel"
|
||||||
|
type="com.lukouguoji.gjc.viewModel.GjcWeighingViewModel" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/color_f2"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<include layout="@layout/title_tool_bar" />
|
||||||
|
|
||||||
|
<!-- 搜索区域 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="10dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- 航班日期 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
|
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" />
|
||||||
|
|
||||||
|
<!-- 添加按钮 -->
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_marginLeft="10dp"
|
||||||
|
android:onClick="@{()-> viewModel.addClick()}"
|
||||||
|
android:padding="5dp"
|
||||||
|
android:src="@drawable/img_add" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 列表 -->
|
||||||
|
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||||
|
android:id="@+id/srl"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv"
|
||||||
|
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" />
|
||||||
|
|
||||||
|
</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.recordClick()}"
|
||||||
|
android:text="计重记录" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</layout>
|
||||||
274
module_gjc/src/main/res/layout/item_gjc_weighing.xml
Normal file
274
module_gjc/src/main/res/layout/item_gjc_weighing.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.GjcWeighingBean" />
|
||||||
|
</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.pc)}'
|
||||||
|
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.weight)}'
|
||||||
|
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="@{5}"
|
||||||
|
android:text="业务类型:" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text='@{bean.businessType}'
|
||||||
|
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="@{3}"
|
||||||
|
android:text="品名(中):" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text='@{bean.goodsCn}'
|
||||||
|
tools:text="电子元器件" />
|
||||||
|
|
||||||
|
</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