feat: 新增综合管理冷库登记功能页面
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -310,6 +310,10 @@
|
|||||||
android:name=".page.transportLog.list.TransportLogActivity"
|
android:name=".page.transportLog.list.TransportLogActivity"
|
||||||
android:configChanges="orientation|keyboardHidden"
|
android:configChanges="orientation|keyboardHidden"
|
||||||
android:screenOrientation="userLandscape" />
|
android:screenOrientation="userLandscape" />
|
||||||
|
<activity
|
||||||
|
android:name=".page.coldStorage.list.ColdStorageActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
android:screenOrientation="userLandscape" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".page.gnj.manifest.list.GnjManifestListActivity"
|
android:name=".page.gnj.manifest.list.GnjManifestListActivity"
|
||||||
android:configChanges="orientation|keyboardHidden"
|
android:configChanges="orientation|keyboardHidden"
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package com.lukouguoji.aerologic.page.coldStorage.list
|
||||||
|
|
||||||
|
import android.app.Activity
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import android.os.Bundle
|
||||||
|
import com.alibaba.android.arouter.facade.annotation.Route
|
||||||
|
import com.lukouguoji.aerologic.R
|
||||||
|
import com.lukouguoji.aerologic.databinding.ActivityColdStorageBinding
|
||||||
|
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||||
|
import com.lukouguoji.module_base.common.Constant
|
||||||
|
import com.lukouguoji.module_base.common.ConstantEvent
|
||||||
|
import com.lukouguoji.module_base.impl.FlowBus
|
||||||
|
import com.lukouguoji.module_base.impl.observe
|
||||||
|
import com.lukouguoji.module_base.router.ARouterConstants
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷库登记页面
|
||||||
|
*/
|
||||||
|
@Route(path = ARouterConstants.ACTIVITY_URL_COLD_STORAGE)
|
||||||
|
class ColdStorageActivity :
|
||||||
|
BaseBindingActivity<ActivityColdStorageBinding, ColdStorageViewModel>() {
|
||||||
|
|
||||||
|
override fun layoutId() = R.layout.activity_cold_storage
|
||||||
|
override fun viewModelClass() = ColdStorageViewModel::class.java
|
||||||
|
|
||||||
|
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||||
|
setBackArrow("冷库登记")
|
||||||
|
binding.viewModel = viewModel
|
||||||
|
|
||||||
|
// 观察全选状态,更新图标透明度
|
||||||
|
viewModel.isAllChecked.observe(this) { isAllChecked ->
|
||||||
|
binding.checkIcon.alpha = if (isAllChecked) 1.0f else 0.5f
|
||||||
|
}
|
||||||
|
|
||||||
|
// 绑定分页
|
||||||
|
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
|
||||||
|
|
||||||
|
// 监听刷新事件
|
||||||
|
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
|
||||||
|
viewModel.refresh()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始加载数据
|
||||||
|
viewModel.refresh()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||||
|
super.onActivityResult(requestCode, resultCode, data)
|
||||||
|
if (requestCode == Constant.RequestCode.WAYBILL && resultCode == Activity.RESULT_OK) {
|
||||||
|
viewModel.wbNo.value = data?.getStringExtra(Constant.Result.CODED_CONTENT)
|
||||||
|
viewModel.searchClick()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
@JvmStatic
|
||||||
|
fun start(context: Context) {
|
||||||
|
context.startActivity(Intent(context, ColdStorageActivity::class.java))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.lukouguoji.aerologic.page.coldStorage.list
|
||||||
|
|
||||||
|
import android.view.View
|
||||||
|
import com.lukouguoji.aerologic.databinding.ItemColdStorageBinding
|
||||||
|
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||||
|
import com.lukouguoji.module_base.bean.ColdStorageBean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷库登记 列表项ViewHolder
|
||||||
|
*/
|
||||||
|
class ColdStorageViewHolder(view: View) :
|
||||||
|
BaseViewHolder<ColdStorageBean, ItemColdStorageBinding>(view) {
|
||||||
|
|
||||||
|
override fun onBind(item: Any?, position: Int) {
|
||||||
|
val bean = getItemBean(item) ?: return
|
||||||
|
binding.bean = bean
|
||||||
|
binding.position = position
|
||||||
|
binding.executePendingBindings()
|
||||||
|
|
||||||
|
// 添加图标点击事件 - 切换选择状态
|
||||||
|
binding.ivIcon.setOnClickListener {
|
||||||
|
bean.checked.set(!bean.checked.get())
|
||||||
|
binding.executePendingBindings()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,175 @@
|
|||||||
|
package com.lukouguoji.aerologic.page.coldStorage.list
|
||||||
|
|
||||||
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import androidx.lifecycle.viewModelScope
|
||||||
|
import com.lukouguoji.aerologic.R
|
||||||
|
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||||
|
import com.lukouguoji.module_base.bean.ColdStorageBean
|
||||||
|
import dev.utils.app.info.KeyValue
|
||||||
|
import com.lukouguoji.module_base.common.Constant
|
||||||
|
import com.lukouguoji.module_base.common.ConstantEvent
|
||||||
|
import com.lukouguoji.module_base.http.net.NetApply
|
||||||
|
import com.lukouguoji.module_base.impl.FlowBus
|
||||||
|
import com.lukouguoji.module_base.ktx.commonAdapter
|
||||||
|
import com.lukouguoji.module_base.ktx.launchCollect
|
||||||
|
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||||
|
import com.lukouguoji.module_base.ktx.showToast
|
||||||
|
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||||
|
import com.lukouguoji.module_base.model.ScanModel
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷库登记 ViewModel
|
||||||
|
*/
|
||||||
|
class ColdStorageViewModel : BasePageViewModel() {
|
||||||
|
|
||||||
|
// ========== 搜索条件 ==========
|
||||||
|
val ieFlag = MutableLiveData("") // 进出港标识
|
||||||
|
val wbNo = MutableLiveData("") // 运单号
|
||||||
|
val status = MutableLiveData("") // 货物状态
|
||||||
|
val outUserName = MutableLiveData("") // 出库人
|
||||||
|
val inUserName = MutableLiveData("") // 入库人
|
||||||
|
|
||||||
|
// ========== 下拉列表数据源 ==========
|
||||||
|
val ieFlagList = MutableLiveData<List<KeyValue>>(
|
||||||
|
listOf(
|
||||||
|
KeyValue("全部", ""),
|
||||||
|
KeyValue("进港", "I"),
|
||||||
|
KeyValue("出港", "E")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
val statusList = MutableLiveData<List<KeyValue>>(
|
||||||
|
listOf(
|
||||||
|
KeyValue("全部", ""),
|
||||||
|
KeyValue("已入库", "已入库"),
|
||||||
|
KeyValue("已出库", "已出库")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
// ========== 统计信息 ==========
|
||||||
|
val totalCount = MutableLiveData("0") // 合计票数
|
||||||
|
val totalPc = MutableLiveData("0") // 总件数
|
||||||
|
val totalWeight = MutableLiveData("0") // 总重量
|
||||||
|
|
||||||
|
// ========== 全选状态 ==========
|
||||||
|
val isAllChecked = MutableLiveData(false)
|
||||||
|
|
||||||
|
init {
|
||||||
|
isAllChecked.observeForever { checked ->
|
||||||
|
val list = pageModel.rv?.commonAdapter()?.items as? List<ColdStorageBean>
|
||||||
|
?: return@observeForever
|
||||||
|
list.forEach { it.checked.set(checked) }
|
||||||
|
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ========== 适配器配置 ==========
|
||||||
|
val itemViewHolder = ColdStorageViewHolder::class.java
|
||||||
|
val itemLayoutId = R.layout.item_cold_storage
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扫码运单号
|
||||||
|
*/
|
||||||
|
fun scanWbNo() {
|
||||||
|
ScanModel.startScan(getTopActivity(), Constant.RequestCode.WAYBILL)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索按钮点击
|
||||||
|
*/
|
||||||
|
fun searchClick() {
|
||||||
|
refresh()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全选按钮点击
|
||||||
|
*/
|
||||||
|
fun checkAllClick() {
|
||||||
|
val list = pageModel.rv?.commonAdapter()?.items as? List<ColdStorageBean> ?: return
|
||||||
|
val shouldCheckAll = !isAllChecked.value!!
|
||||||
|
list.forEach { it.checked.set(shouldCheckAll) }
|
||||||
|
isAllChecked.value = shouldCheckAll
|
||||||
|
pageModel.rv?.commonAdapter()?.notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成入库
|
||||||
|
*/
|
||||||
|
fun completeIn() {
|
||||||
|
val list = pageModel.rv?.commonAdapter()?.items as? List<ColdStorageBean> ?: return
|
||||||
|
val selectedItems = list.filter { it.isSelected }
|
||||||
|
|
||||||
|
if (selectedItems.isEmpty()) {
|
||||||
|
showToast("请选择要入库的数据")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
launchLoadingCollect({ NetApply.api.coldStorageCompleteIn(selectedItems.toRequestBody()) }) {
|
||||||
|
onSuccess = {
|
||||||
|
showToast("入库完成")
|
||||||
|
viewModelScope.launch {
|
||||||
|
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||||
|
}
|
||||||
|
refresh()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 完成出库
|
||||||
|
*/
|
||||||
|
fun completeOut() {
|
||||||
|
val list = pageModel.rv?.commonAdapter()?.items as? List<ColdStorageBean> ?: return
|
||||||
|
val selectedItems = list.filter { it.isSelected }
|
||||||
|
|
||||||
|
if (selectedItems.isEmpty()) {
|
||||||
|
showToast("请选择要出库的数据")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
launchLoadingCollect({ NetApply.api.coldStorageCompleteOut(selectedItems.toRequestBody()) }) {
|
||||||
|
onSuccess = {
|
||||||
|
showToast("出库完成")
|
||||||
|
viewModelScope.launch {
|
||||||
|
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||||
|
}
|
||||||
|
refresh()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取数据
|
||||||
|
*/
|
||||||
|
override fun getData() {
|
||||||
|
val filterParams = mapOf(
|
||||||
|
"ieFlag" to ieFlag.value?.ifEmpty { null },
|
||||||
|
"wbNo" to wbNo.value?.ifEmpty { null },
|
||||||
|
"status" to status.value?.ifEmpty { null },
|
||||||
|
"outUserName" to outUserName.value?.ifEmpty { null },
|
||||||
|
"inUserName" to inUserName.value?.ifEmpty { null }
|
||||||
|
)
|
||||||
|
|
||||||
|
val listParams = (filterParams + mapOf(
|
||||||
|
"pageNum" to pageModel.page,
|
||||||
|
"pageSize" to pageModel.limit
|
||||||
|
)).toRequestBody()
|
||||||
|
|
||||||
|
val totalParams = filterParams.toRequestBody()
|
||||||
|
|
||||||
|
// 获取列表
|
||||||
|
launchLoadingCollect({ NetApply.api.getColdStorageList(listParams) }) {
|
||||||
|
onSuccess = { pageModel.handleListBean(it?.toBaseListBean()) }
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取统计信息
|
||||||
|
launchCollect({ NetApply.api.getColdStorageTotal(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()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -30,6 +30,7 @@ import com.lukouguoji.aerologic.page.telegram.list.TelegramListActivity
|
|||||||
import com.lukouguoji.aerologic.page.test.PrintActivity
|
import com.lukouguoji.aerologic.page.test.PrintActivity
|
||||||
import com.lukouguoji.aerologic.page.transport.GoodsTransportActivity
|
import com.lukouguoji.aerologic.page.transport.GoodsTransportActivity
|
||||||
import com.lukouguoji.aerologic.page.transportLog.list.TransportLogActivity
|
import com.lukouguoji.aerologic.page.transportLog.list.TransportLogActivity
|
||||||
|
import com.lukouguoji.aerologic.page.coldStorage.list.ColdStorageActivity
|
||||||
import com.lukouguoji.aerologic.page.uld.list.UldListActivity
|
import com.lukouguoji.aerologic.page.uld.list.UldListActivity
|
||||||
import com.lukouguoji.gnc.page.deposit.list.GncDepositListActivity
|
import com.lukouguoji.gnc.page.deposit.list.GncDepositListActivity
|
||||||
import com.lukouguoji.gnc.page.distribution.home.GncDistributionHomeActivity
|
import com.lukouguoji.gnc.page.distribution.home.GncDistributionHomeActivity
|
||||||
@@ -553,6 +554,10 @@ class HomeFragment : Fragment() {
|
|||||||
Constant.AuthName.ComprehensiveUld -> {
|
Constant.AuthName.ComprehensiveUld -> {
|
||||||
UldListActivity.start(requireContext())
|
UldListActivity.start(requireContext())
|
||||||
}
|
}
|
||||||
|
// 冷库登记
|
||||||
|
Constant.AuthName.ComprehensiveColdStorage -> {
|
||||||
|
ColdStorageActivity.start(requireContext())
|
||||||
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
@@ -962,6 +967,13 @@ class HomeFragment : Fragment() {
|
|||||||
"ULD管理"
|
"ULD管理"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
list.add(
|
||||||
|
RightMenu(
|
||||||
|
Constant.AuthName.ComprehensiveColdStorage,
|
||||||
|
com.lukouguoji.module_base.R.mipmap.gnc_cangku,
|
||||||
|
"冷库登记"
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
|
|||||||
208
app/src/main/res/layout/activity_cold_storage.xml
Normal file
208
app/src/main/res/layout/activity_cold_storage.xml
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
<?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.aerologic.page.coldStorage.list.ColdStorageViewModel" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/color_f2"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<include layout="@layout/title_tool_bar" />
|
||||||
|
|
||||||
|
<!-- 搜索区域 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="10dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- 选择进港或出港 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
|
hint='@{"选择进港或出港"}'
|
||||||
|
type="@{SearchLayoutType.SPINNER}"
|
||||||
|
list="@{viewModel.ieFlagList}"
|
||||||
|
value="@={viewModel.ieFlag}"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<!-- 运单号 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
|
hint='@{"请输入运单号"}'
|
||||||
|
icon="@{@drawable/img_scan}"
|
||||||
|
setOnIconClickListener="@{(v)-> viewModel.scanWbNo()}"
|
||||||
|
type="@{SearchLayoutType.INPUT}"
|
||||||
|
value="@={viewModel.wbNo}"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<!-- 货物状态 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
|
hint='@{"请选择货物状态"}'
|
||||||
|
type="@{SearchLayoutType.SPINNER}"
|
||||||
|
list="@{viewModel.statusList}"
|
||||||
|
value="@={viewModel.status}"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<!-- 出库人 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
|
hint='@{"请输入出库人"}'
|
||||||
|
type="@{SearchLayoutType.INPUT}"
|
||||||
|
value="@={viewModel.outUserName}"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<!-- 入库人 -->
|
||||||
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
|
hint='@{"请输入入库人"}'
|
||||||
|
type="@{SearchLayoutType.INPUT}"
|
||||||
|
value="@={viewModel.inUserName}"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<!-- 搜索按钮 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical|start"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingHorizontal="12dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="36dp"
|
||||||
|
android:layout_height="36dp"
|
||||||
|
android:onClick="@{()-> viewModel.searchClick()}"
|
||||||
|
android:padding="2dp"
|
||||||
|
android:src="@drawable/img_search" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 列表 -->
|
||||||
|
<com.scwang.smart.refresh.layout.SmartRefreshLayout
|
||||||
|
android:id="@+id/srl"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:layout_marginHorizontal="10dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/rv"
|
||||||
|
itemLayoutId="@{viewModel.itemLayoutId}"
|
||||||
|
viewHolder="@{viewModel.itemViewHolder}"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:overScrollMode="never"
|
||||||
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
|
tools:itemCount="3"
|
||||||
|
tools:listitem="@layout/item_cold_storage" />
|
||||||
|
|
||||||
|
</com.scwang.smart.refresh.layout.SmartRefreshLayout>
|
||||||
|
|
||||||
|
<!-- 底部统计和操作按钮 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:background="@android:color/white"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingHorizontal="15dp">
|
||||||
|
|
||||||
|
<!-- 全选按钮 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:onClick="@{()-> viewModel.checkAllClick()}"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/checkIcon"
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="24dp"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:src="@drawable/img_check_all" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="全选"
|
||||||
|
android:textColor="@color/color_66"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 统计信息 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text='@{"合计:"+viewModel.totalCount+"票"}'
|
||||||
|
android:textColor="@color/bottom_tool_tips_text_color"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:text='@{"总件数:"+viewModel.totalPc}'
|
||||||
|
android:textColor="@color/bottom_tool_tips_text_color"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="20dp"
|
||||||
|
android:text='@{"总重量:"+viewModel.totalWeight}'
|
||||||
|
android:textColor="@color/bottom_tool_tips_text_color"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 完成出库按钮 -->
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_bottom_btn"
|
||||||
|
android:onClick="@{()-> viewModel.completeOut()}"
|
||||||
|
android:text="完成出库" />
|
||||||
|
|
||||||
|
<!-- 完成入库按钮 -->
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_bottom_btn"
|
||||||
|
android:onClick="@{()-> viewModel.completeIn()}"
|
||||||
|
android:text="完成入库" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</layout>
|
||||||
283
app/src/main/res/layout/item_cold_storage.xml
Normal file
283
app/src/main/res/layout/item_cold_storage.xml
Normal file
@@ -0,0 +1,283 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<import type="android.view.View" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="bean"
|
||||||
|
type="com.lukouguoji.module_base.bean.ColdStorageBean" />
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="position"
|
||||||
|
type="Integer" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:background="@drawable/bg_white_radius_8"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="15dp">
|
||||||
|
|
||||||
|
<!-- 选中图标 -->
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_icon"
|
||||||
|
android:layout_width="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
loadImage="@{bean.checked.get() ? @drawable/img_plane_s : @drawable/img_plane}"
|
||||||
|
android:src="@drawable/img_plane" />
|
||||||
|
|
||||||
|
<!-- 信息区域 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="15dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<!-- 第一行:运单号 | 件数 | 入库人 | 入库时间 | 在库状态 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- 运单号 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.2"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{5}"
|
||||||
|
android:text="运单号:"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.wbNo}"
|
||||||
|
android:textColor="@color/colorPrimary"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 件数 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.7"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{5}"
|
||||||
|
android:text="件数:"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{String.valueOf(bean.pc)}"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 入库人 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.8"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{5}"
|
||||||
|
android:text="入库人:"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.inUserName}"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 入库时间 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.2"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{5}"
|
||||||
|
android:text="入库时间:"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.inDate}"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 在库状态 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.8"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{5}"
|
||||||
|
android:text="在库状态:"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.status}"
|
||||||
|
android:textColor='@{bean.status.equals("已出库") ? @color/text_red : bean.status.equals("已入库") ? @color/text_green : @color/text_normal}'
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 第二行:在库时长 | 重量 | 出库人 | 出库时间 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<!-- 在库时长 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.2"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{5}"
|
||||||
|
android:text="在库时长:"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.storageDuration}"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 重量 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.7"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{5}"
|
||||||
|
android:text="重量:"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{String.valueOf((int)bean.wt)}"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 出库人 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.8"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{5}"
|
||||||
|
android:text="出库人:"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.outUserName}"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 出库时间 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.2"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
completeSpace="@{5}"
|
||||||
|
android:text="出库时间:"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{bean.outDate}"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 占位,与第一行在库状态对齐 -->
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0.8"
|
||||||
|
android:orientation="horizontal" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</layout>
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.lukouguoji.module_base.bean
|
||||||
|
|
||||||
|
import androidx.databinding.ObservableBoolean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷库登记 Bean
|
||||||
|
*/
|
||||||
|
class ColdStorageBean {
|
||||||
|
var id: Long = 0
|
||||||
|
var wbNo: String = "" // 运单号
|
||||||
|
var pc: Int = 0 // 件数
|
||||||
|
var wt: Double = 0.0 // 重量
|
||||||
|
var inUserName: String = "" // 入库人
|
||||||
|
var inDate: String = "" // 入库时间
|
||||||
|
var outUserName: String = "" // 出库人
|
||||||
|
var outDate: String = "" // 出库时间
|
||||||
|
var storageDuration: String = "" // 在库时长
|
||||||
|
var status: String = "" // 在库状态
|
||||||
|
var ieFlag: String = "" // 进出港标识
|
||||||
|
|
||||||
|
// 多选状态
|
||||||
|
val checked: ObservableBoolean = ObservableBoolean(false)
|
||||||
|
var isSelected: Boolean
|
||||||
|
get() = checked.get()
|
||||||
|
set(value) = checked.set(value)
|
||||||
|
}
|
||||||
@@ -331,6 +331,9 @@ interface Constant {
|
|||||||
|
|
||||||
// ULD管理
|
// ULD管理
|
||||||
const val ComprehensiveUld = "AppComprehensiveUld"
|
const val ComprehensiveUld = "AppComprehensiveUld"
|
||||||
|
|
||||||
|
// 冷库登记
|
||||||
|
const val ComprehensiveColdStorage = "AppComprehensiveColdStorage"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.lukouguoji.module_base.bean.BaseResultBean
|
|||||||
import com.lukouguoji.module_base.bean.BoxDetailsForCarIdBean
|
import com.lukouguoji.module_base.bean.BoxDetailsForCarIdBean
|
||||||
import com.lukouguoji.module_base.bean.CarBarBean
|
import com.lukouguoji.module_base.bean.CarBarBean
|
||||||
import com.lukouguoji.module_base.bean.CarOrUldBean
|
import com.lukouguoji.module_base.bean.CarOrUldBean
|
||||||
|
import com.lukouguoji.module_base.bean.ColdStorageBean
|
||||||
import com.lukouguoji.module_base.bean.DiBangChannelBean
|
import com.lukouguoji.module_base.bean.DiBangChannelBean
|
||||||
import com.lukouguoji.module_base.bean.DictBean
|
import com.lukouguoji.module_base.bean.DictBean
|
||||||
import com.lukouguoji.module_base.bean.DictIdValueBean
|
import com.lukouguoji.module_base.bean.DictIdValueBean
|
||||||
@@ -1887,4 +1888,32 @@ interface Api {
|
|||||||
*/
|
*/
|
||||||
@POST("eqm/uld/deleteUld")
|
@POST("eqm/uld/deleteUld")
|
||||||
suspend fun deleteUld(@Query("uld") uld: String): BaseResultBean<Any>
|
suspend fun deleteUld(@Query("uld") uld: String): BaseResultBean<Any>
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
// 冷库登记
|
||||||
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷库登记-分页查询
|
||||||
|
*/
|
||||||
|
@POST("ColdStorage/pageQuery")
|
||||||
|
suspend fun getColdStorageList(@Body data: RequestBody): PageInfo<ColdStorageBean>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷库登记-分页合计
|
||||||
|
*/
|
||||||
|
@POST("ColdStorage/pageQueryTotal")
|
||||||
|
suspend fun getColdStorageTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷库登记-完成入库
|
||||||
|
*/
|
||||||
|
@POST("ColdStorage/completeIn")
|
||||||
|
suspend fun coldStorageCompleteIn(@Body data: RequestBody): BaseResultBean<Boolean>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 冷库登记-完成出库
|
||||||
|
*/
|
||||||
|
@POST("ColdStorage/completeOut")
|
||||||
|
suspend fun coldStorageCompleteOut(@Body data: RequestBody): BaseResultBean<Boolean>
|
||||||
}
|
}
|
||||||
@@ -213,4 +213,7 @@ object ARouterConstants {
|
|||||||
|
|
||||||
const val ACTIVITY_URL_PDA_ENTER = "/pda/PDAEnterActivity" //PDA入口
|
const val ACTIVITY_URL_PDA_ENTER = "/pda/PDAEnterActivity" //PDA入口
|
||||||
|
|
||||||
|
///////////////// 综合管理
|
||||||
|
const val ACTIVITY_URL_COLD_STORAGE = "/app/ColdStorageActivity" //冷库登记
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user