Compare commits
4 Commits
8b0043d2f5
...
da50aa9794
| Author | SHA1 | Date | |
|---|---|---|---|
| da50aa9794 | |||
| 47cef6ee59 | |||
| baaa9c5615 | |||
| edb1f576b7 |
@@ -508,6 +508,20 @@
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<!-- 国际进港-查询详情 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpQueryDetailsActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<!-- 国际进港-运单修改 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpQueryEditActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
|
||||
<!-- 国际进港-事故签证 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjj.activity.IntImpAccidentVisaActivity"
|
||||
|
||||
@@ -50,7 +50,11 @@ class GjjWarehouse(
|
||||
var volume: String? = "",
|
||||
var wbNo: String? = "",
|
||||
var weight: String? = "",
|
||||
var whid: String? = ""
|
||||
var whid: String? = "",
|
||||
var splitFlag: String? = "",
|
||||
var inDate: String? = "",
|
||||
var clearNormal: String? = "",
|
||||
var range: String? = ""
|
||||
) {
|
||||
|
||||
fun getWaybillCode() = "${prefix}${no}"
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* 国际进港-库位使用记录Bean
|
||||
* 对应接口: /IntImpSearch/detail 返回的 storageUseList 项
|
||||
*/
|
||||
data class GjjStorageUse(
|
||||
var id: Long? = null, // 主键
|
||||
var maWbId: Long? = null, // 运单id
|
||||
var prefix: String? = null, // 运单前缀
|
||||
var no: String? = null, // 运单号
|
||||
var location: String? = null, // 库位号
|
||||
var locationId: Long? = null, // 库位id
|
||||
var inDate: String? = null, // 入库时间
|
||||
var inOpId: String? = null, // 入库人ID
|
||||
var inOpName: String? = null, // 入库人姓名
|
||||
var outDate: String? = null, // 出库时间
|
||||
var outOpId: String? = null, // 出库人ID
|
||||
var outOpName: String? = null, // 出库人姓名
|
||||
var cargoStatus: String? = null // 货物状态
|
||||
) : Serializable
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
/**
|
||||
* 国际进港运单修改-数据模型
|
||||
* 对应接口:/IntImpSearch/modifyMaWb 的请求体 (GjjMaWb)
|
||||
* 详情数据来源:/IntImpSearch/detail 返回的 maWb + maWbM + warehouseList
|
||||
*/
|
||||
data class IntImpQueryEditBean(
|
||||
// ==================== 主键 ====================
|
||||
var maWbId: Long? = null, // 主单主键ID
|
||||
var activeId: Long? = null, // 有效值
|
||||
|
||||
// ==================== 运单号(禁用) ====================
|
||||
var wbNo: String? = null, // 运单号(组合: prefix + no)
|
||||
var prefix: String? = null, // 运单号前缀
|
||||
var no: String? = null, // 运单号主体
|
||||
|
||||
// ==================== 可编辑字段 ====================
|
||||
var agentCode: String? = null, // 代理人code(提交用)
|
||||
var agentName: String? = null, // 代理人名称(显示用)
|
||||
var spCode: String? = null, // 特码
|
||||
var packageType: String? = null, // 包装类型
|
||||
var awbType: String? = null, // 运单类型code
|
||||
var lockState: String? = null, // 锁定状态("0":未锁, "1":锁定)
|
||||
var remark: String? = null, // 备注
|
||||
|
||||
// ==================== 禁用字段(仅显示) ====================
|
||||
var awbPc: Long? = null, // 运单件数(对应API: pc)
|
||||
var awbWeight: Double? = null, // 运单重量(对应API: weight)
|
||||
var businessType: String? = null, // 业务类型code
|
||||
var businessName: String? = null, // 业务类型名称
|
||||
var inPc: Long? = null, // 入库件数
|
||||
var inWeight: Double? = null, // 入库重量
|
||||
var cashWeight: Double? = null, // 计费重量
|
||||
var by1: String? = null, // 承运人
|
||||
var range: String? = null, // 航程
|
||||
var goodsCn: String? = null, // 品名(中)
|
||||
var goods: String? = null, // 品名(英)
|
||||
var unNumber: String? = null, // UN编号
|
||||
|
||||
// ==================== 提交时需要的额外字段 ====================
|
||||
var fno: String? = null, // 航班号
|
||||
var fdate: String? = null, // 航班日期
|
||||
var flight: String? = null, // 航班
|
||||
var pc: Long? = null, // 件数(API用)
|
||||
var weight: Double? = null, // 重量(API用)
|
||||
var volume: Double? = null, // 体积
|
||||
var origin: String? = null, // 货源地
|
||||
var dest: String? = null, // 目的地
|
||||
var cargoType: String? = null, // 货物类型
|
||||
var subCode: String? = null, // 子码
|
||||
var carId: String? = null // 车牌号
|
||||
)
|
||||
@@ -1015,6 +1015,20 @@ interface Api {
|
||||
@POST("IntImpSearch/pageQueryTotal")
|
||||
suspend fun getIntImpQueryTotal(@Body data: RequestBody): BaseResultBean<ManifestTotalDto>
|
||||
|
||||
/**
|
||||
* 国际进港查询-详情
|
||||
* 接口路径: /IntImpSearch/detail
|
||||
*/
|
||||
@POST("IntImpSearch/detail")
|
||||
suspend fun getIntImpQueryDetails(@Body data: RequestBody): BaseResultBean<Map<String, Any>>
|
||||
|
||||
/**
|
||||
* 国际进港查询-修改运单
|
||||
* 接口路径: /IntImpSearch/modifyMaWb
|
||||
*/
|
||||
@POST("IntImpSearch/modifyMaWb")
|
||||
suspend fun modifyIntImpMaWb(@Body data: RequestBody): BaseResultBean<String>
|
||||
|
||||
/**
|
||||
* 国际出港待计重-分页搜索
|
||||
* 接口路径: /IntExpCheckIn/pageQuery
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.lukouguoji.module_base.BaseActivity
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GJJ_QUERY_INFO)
|
||||
// @Route(path = ARouterConstants.ACTIVITY_URL_GJJ_QUERY_INFO) // 已替换为 IntImpQueryDetailsActivity
|
||||
class GjjQueryInfoActivity : BaseActivity(), View.OnClickListener {
|
||||
|
||||
private lateinit var viewModel: GjjQueryInfoViewModel
|
||||
|
||||
@@ -11,6 +11,7 @@ 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.addOnItemClickListener
|
||||
import com.lukouguoji.module_base.ktx.getLifecycleOwner
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
@@ -33,6 +34,9 @@ class IntImpQueryActivity :
|
||||
viewModel.pageModel
|
||||
.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, getLifecycleOwner())
|
||||
|
||||
// 注册列表项点击事件
|
||||
binding.rv.addOnItemClickListener(viewModel)
|
||||
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
|
||||
viewModel.refresh()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.lukouguoji.gjj.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.databinding.ActivityIntImpQueryDetailsBinding
|
||||
import com.lukouguoji.gjj.viewModel.IntImpQueryDetailsViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.base.CustomVP2Adapter
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
/**
|
||||
* 国际进港查询详情页面
|
||||
*/
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_GJJ_QUERY_INFO)
|
||||
class IntImpQueryDetailsActivity :
|
||||
BaseBindingActivity<ActivityIntImpQueryDetailsBinding, IntImpQueryDetailsViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_int_imp_query_details
|
||||
override fun viewModelClass() = IntImpQueryDetailsViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("国际进港查询详情")
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 初始化ViewModel(传入maWbId)
|
||||
viewModel.initOnCreated(intent)
|
||||
|
||||
// 配置ViewPager2
|
||||
binding.vp.adapter = CustomVP2Adapter(
|
||||
viewModel.fragmentList,
|
||||
supportFragmentManager,
|
||||
lifecycle
|
||||
)
|
||||
binding.vp.isUserInputEnabled = false // 禁用滑动
|
||||
binding.vp.offscreenPageLimit = 3 // 预加载3个Fragment
|
||||
|
||||
// 监听Tab索引变化,切换Fragment
|
||||
viewModel.currentTab.observe(this) {
|
||||
binding.vp.setCurrentItem(it, false)
|
||||
}
|
||||
|
||||
// 加载详情数据
|
||||
viewModel.loadDetails()
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context, prefix: String?, no: String?) {
|
||||
val starter = Intent(context, IntImpQueryDetailsActivity::class.java)
|
||||
.putExtra("prefix", prefix ?: "")
|
||||
.putExtra("no", no ?: "")
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.lukouguoji.gjj.activity
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.databinding.ActivityIntImpQueryEditBinding
|
||||
import com.lukouguoji.gjj.viewModel.IntImpQueryEditViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
|
||||
/**
|
||||
* 国际进港运单修改页面
|
||||
*/
|
||||
class IntImpQueryEditActivity :
|
||||
BaseBindingActivity<ActivityIntImpQueryEditBinding, IntImpQueryEditViewModel>() {
|
||||
|
||||
override fun layoutId() = R.layout.activity_int_imp_query_edit
|
||||
|
||||
override fun viewModelClass() = IntImpQueryEditViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("国际进港运单修改")
|
||||
binding.viewModel = viewModel
|
||||
viewModel.initOnCreated(intent)
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context, maWbId: Long?, prefix: String?, no: String?) {
|
||||
val starter = Intent(context, IntImpQueryEditActivity::class.java)
|
||||
.putExtra("maWbId", maWbId ?: 0L)
|
||||
.putExtra("prefix", prefix ?: "")
|
||||
.putExtra("no", no ?: "")
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.lukouguoji.gjj.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.databinding.FragmentIntImpQueryStorageBinding
|
||||
import com.lukouguoji.gjj.holder.IntImpQueryStorageViewHolder
|
||||
import com.lukouguoji.gjj.viewModel.IntImpQueryDetailsViewModel
|
||||
import com.lukouguoji.module_base.base.CommonAdapter
|
||||
import com.lukouguoji.module_base.bean.GjjStorageUse
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
|
||||
/**
|
||||
* 国际进港查询详情 - 库位信息Fragment
|
||||
*/
|
||||
class IntImpQueryStorageFragment : Fragment() {
|
||||
|
||||
private lateinit var binding: FragmentIntImpQueryStorageBinding
|
||||
private lateinit var viewModel: IntImpQueryDetailsViewModel
|
||||
private lateinit var adapter: CommonAdapter
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
binding = DataBindingUtil.inflate(
|
||||
inflater,
|
||||
R.layout.fragment_int_imp_query_storage,
|
||||
container,
|
||||
false
|
||||
)
|
||||
binding.lifecycleOwner = viewLifecycleOwner
|
||||
|
||||
initRecyclerView()
|
||||
observeData()
|
||||
|
||||
return binding.root
|
||||
}
|
||||
|
||||
private fun initRecyclerView() {
|
||||
adapter = CommonAdapter(
|
||||
requireContext(),
|
||||
R.layout.item_int_imp_query_storage,
|
||||
IntImpQueryStorageViewHolder::class.java
|
||||
)
|
||||
|
||||
binding.rvStorageList.apply {
|
||||
layoutManager = LinearLayoutManager(requireContext())
|
||||
adapter = this@IntImpQueryStorageFragment.adapter
|
||||
}
|
||||
}
|
||||
|
||||
private fun observeData() {
|
||||
viewModel.storageUseList.observe(viewLifecycleOwner) { mapList ->
|
||||
if (mapList.isEmpty()) {
|
||||
binding.rvStorageList.visibility = View.GONE
|
||||
binding.llEmpty.visibility = View.VISIBLE
|
||||
} else {
|
||||
val beanList = mapList.map { map ->
|
||||
try {
|
||||
val json = NetApply.gson.toJson(map)
|
||||
NetApply.gson.fromJson(json, GjjStorageUse::class.java)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
GjjStorageUse()
|
||||
}
|
||||
}
|
||||
|
||||
binding.rvStorageList.visibility = View.VISIBLE
|
||||
binding.llEmpty.visibility = View.GONE
|
||||
adapter.refresh(beanList)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun newInstance(vm: IntImpQueryDetailsViewModel) =
|
||||
IntImpQueryStorageFragment().apply {
|
||||
viewModel = vm
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.lukouguoji.gjj.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.databinding.FragmentIntImpQueryWarehouseBinding
|
||||
import com.lukouguoji.gjj.holder.IntImpQueryWarehouseViewHolder
|
||||
import com.lukouguoji.gjj.viewModel.IntImpQueryDetailsViewModel
|
||||
import com.lukouguoji.module_base.base.CommonAdapter
|
||||
import com.lukouguoji.module_base.bean.GjjWarehouse
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
|
||||
/**
|
||||
* 国际进港查询详情 - 仓库信息Fragment
|
||||
*/
|
||||
class IntImpQueryWarehouseFragment : Fragment() {
|
||||
|
||||
private lateinit var binding: FragmentIntImpQueryWarehouseBinding
|
||||
private lateinit var viewModel: IntImpQueryDetailsViewModel
|
||||
private lateinit var adapter: CommonAdapter
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
binding = DataBindingUtil.inflate(
|
||||
inflater,
|
||||
R.layout.fragment_int_imp_query_warehouse,
|
||||
container,
|
||||
false
|
||||
)
|
||||
binding.lifecycleOwner = viewLifecycleOwner
|
||||
|
||||
initRecyclerView()
|
||||
observeData()
|
||||
|
||||
return binding.root
|
||||
}
|
||||
|
||||
private fun initRecyclerView() {
|
||||
adapter = CommonAdapter(
|
||||
requireContext(),
|
||||
R.layout.item_int_imp_query_warehouse,
|
||||
IntImpQueryWarehouseViewHolder::class.java
|
||||
)
|
||||
|
||||
binding.rvWarehouseList.apply {
|
||||
layoutManager = LinearLayoutManager(requireContext())
|
||||
adapter = this@IntImpQueryWarehouseFragment.adapter
|
||||
}
|
||||
}
|
||||
|
||||
private fun observeData() {
|
||||
viewModel.warehouseList.observe(viewLifecycleOwner) { mapList ->
|
||||
if (mapList.isEmpty()) {
|
||||
binding.rvWarehouseList.visibility = View.GONE
|
||||
binding.llEmpty.visibility = View.VISIBLE
|
||||
} else {
|
||||
val beanList = mapList.map { map ->
|
||||
try {
|
||||
val json = NetApply.gson.toJson(map)
|
||||
NetApply.gson.fromJson(json, GjjWarehouse::class.java)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
GjjWarehouse()
|
||||
}
|
||||
}
|
||||
|
||||
binding.rvWarehouseList.visibility = View.VISIBLE
|
||||
binding.llEmpty.visibility = View.GONE
|
||||
adapter.refresh(beanList)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun newInstance(vm: IntImpQueryDetailsViewModel) =
|
||||
IntImpQueryWarehouseFragment().apply {
|
||||
viewModel = vm
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.lukouguoji.gjj.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.databinding.FragmentIntImpQueryWaybillBinding
|
||||
import com.lukouguoji.gjj.viewModel.IntImpQueryDetailsViewModel
|
||||
|
||||
/**
|
||||
* 国际进港查询详情 - 运单信息Fragment
|
||||
*/
|
||||
class IntImpQueryWaybillFragment : Fragment() {
|
||||
|
||||
private lateinit var binding: FragmentIntImpQueryWaybillBinding
|
||||
private lateinit var viewModel: IntImpQueryDetailsViewModel
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
binding = DataBindingUtil.inflate(
|
||||
inflater,
|
||||
R.layout.fragment_int_imp_query_waybill,
|
||||
container,
|
||||
false
|
||||
)
|
||||
binding.lifecycleOwner = viewLifecycleOwner
|
||||
binding.viewModel = viewModel
|
||||
return binding.root
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun newInstance(vm: IntImpQueryDetailsViewModel) =
|
||||
IntImpQueryWaybillFragment().apply {
|
||||
viewModel = vm
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.lukouguoji.gjj.holder
|
||||
|
||||
import android.view.View
|
||||
import com.lukouguoji.gjj.databinding.ItemIntImpQueryStorageBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.bean.GjjStorageUse
|
||||
|
||||
/**
|
||||
* 国际进港查询详情-库位信息ViewHolder
|
||||
*/
|
||||
class IntImpQueryStorageViewHolder(view: View) :
|
||||
BaseViewHolder<GjjStorageUse, ItemIntImpQueryStorageBinding>(view) {
|
||||
|
||||
override fun onBind(item: Any?, position: Int) {
|
||||
val bean = getItemBean(item) ?: return
|
||||
binding.bean = bean
|
||||
binding.position = position
|
||||
binding.executePendingBindings()
|
||||
}
|
||||
}
|
||||
@@ -15,5 +15,14 @@ class IntImpQueryViewHolder(view: View) :
|
||||
val bean = getItemBean(item)!!
|
||||
binding.bean = bean
|
||||
binding.executePendingBindings()
|
||||
|
||||
// 注册整行点击事件
|
||||
notifyItemClick(position, binding.ll)
|
||||
|
||||
// 侧滑菜单 - 修改按钮
|
||||
binding.btnEdit.setOnClickListener {
|
||||
binding.swipeMenu.quickClose()
|
||||
clickListener?.onItemClick(position, 2000) // type=2000表示修改操作
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.lukouguoji.gjj.holder
|
||||
|
||||
import android.view.View
|
||||
import com.lukouguoji.gjj.databinding.ItemIntImpQueryWarehouseBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.bean.GjjWarehouse
|
||||
|
||||
/**
|
||||
* 国际进港查询详情-仓库信息ViewHolder
|
||||
*/
|
||||
class IntImpQueryWarehouseViewHolder(view: View) :
|
||||
BaseViewHolder<GjjWarehouse, ItemIntImpQueryWarehouseBinding>(view) {
|
||||
|
||||
override fun onBind(item: Any?, position: Int) {
|
||||
val bean = getItemBean(item) ?: return
|
||||
binding.bean = bean
|
||||
binding.position = position
|
||||
binding.executePendingBindings()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package com.lukouguoji.gjj.viewModel
|
||||
|
||||
import android.content.Intent
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.lukouguoji.gjj.fragment.IntImpQueryStorageFragment
|
||||
import com.lukouguoji.gjj.fragment.IntImpQueryWarehouseFragment
|
||||
import com.lukouguoji.gjj.fragment.IntImpQueryWaybillFragment
|
||||
import com.lukouguoji.module_base.base.BaseViewModel
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
|
||||
/**
|
||||
* 国际进港查询详情-ViewModel
|
||||
*/
|
||||
class IntImpQueryDetailsViewModel : BaseViewModel() {
|
||||
|
||||
// ==================== 基础数据 ====================
|
||||
var prefix: String = "" // 运单号前缀
|
||||
var no: String = "" // 运单号主体
|
||||
|
||||
// ==================== Tab管理 ====================
|
||||
val currentTab = MutableLiveData(0) // 当前Tab索引 (0/1/2)
|
||||
|
||||
// ==================== 详情数据 ====================
|
||||
val detailData = MutableLiveData<Map<String, Any>>(emptyMap())
|
||||
|
||||
// 运单信息 (maWb)
|
||||
val maWbData = MutableLiveData<Map<String, Any>>(emptyMap())
|
||||
|
||||
// 仓库列表 (warehouseList)
|
||||
val warehouseList = MutableLiveData<List<Map<String, Any>>>(emptyList())
|
||||
|
||||
// 库位列表 (storageUseList)
|
||||
val storageUseList = MutableLiveData<List<Map<String, Any>>>(emptyList())
|
||||
|
||||
// ==================== Fragment列表 ====================
|
||||
val fragmentList by lazy {
|
||||
listOf(
|
||||
IntImpQueryWaybillFragment.newInstance(this), // 运单信息
|
||||
IntImpQueryWarehouseFragment.newInstance(this), // 仓库信息
|
||||
IntImpQueryStorageFragment.newInstance(this) // 库位信息
|
||||
)
|
||||
}
|
||||
|
||||
// ==================== 方法区 ====================
|
||||
|
||||
/**
|
||||
* 初始化(从Intent获取maWbId)
|
||||
*/
|
||||
fun initOnCreated(intent: Intent) {
|
||||
prefix = intent.getStringExtra("prefix") ?: ""
|
||||
no = intent.getStringExtra("no") ?: ""
|
||||
}
|
||||
|
||||
/**
|
||||
* Tab点击事件
|
||||
*/
|
||||
fun onTabClick(index: Int) {
|
||||
currentTab.value = index
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载详情数据
|
||||
*/
|
||||
fun loadDetails() {
|
||||
if (prefix.isEmpty() || no.isEmpty()) {
|
||||
showToast("运单号参数为空")
|
||||
return
|
||||
}
|
||||
|
||||
val params = mapOf("prefix" to prefix, "no" to no).toRequestBody()
|
||||
|
||||
launchLoadingCollect({ NetApply.api.getIntImpQueryDetails(params) }) {
|
||||
onSuccess = { result ->
|
||||
val data = result.data ?: emptyMap()
|
||||
detailData.value = data
|
||||
|
||||
// 解析 maWb 对象
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val maWb = data["maWb"] as? Map<String, Any> ?: emptyMap()
|
||||
|
||||
// 合并数据并添加组合字段
|
||||
val mergedData = mutableMapOf<String, Any>()
|
||||
mergedData.putAll(maWb)
|
||||
|
||||
// 添加组合字段: wbNo = prefix + no
|
||||
val prefix = maWb["prefix"] as? String ?: ""
|
||||
val no = maWb["no"] as? String ?: ""
|
||||
if (prefix.isNotEmpty() || no.isNotEmpty()) {
|
||||
mergedData["wbNo"] = "$prefix$no"
|
||||
}
|
||||
|
||||
// 锁定状态转中文
|
||||
val lockState = maWb["lockState"]
|
||||
if (lockState != null) {
|
||||
val lockStateInt = when (lockState) {
|
||||
is Double -> lockState.toInt()
|
||||
is Int -> lockState
|
||||
else -> null
|
||||
}
|
||||
mergedData["lockStateText"] = when (lockStateInt) {
|
||||
0 -> "未锁定"
|
||||
1 -> "已锁定"
|
||||
else -> ""
|
||||
}
|
||||
}
|
||||
|
||||
maWbData.value = mergedData
|
||||
|
||||
// 解析 warehouseList 列表
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val whList = data["warehouseList"] as? List<Map<String, Any>> ?: emptyList()
|
||||
warehouseList.value = whList
|
||||
|
||||
// 解析 storageUseList 列表
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val suList = data["storageUseList"] as? List<Map<String, Any>> ?: emptyList()
|
||||
storageUseList.value = suList
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,368 @@
|
||||
package com.lukouguoji.gjj.viewModel
|
||||
|
||||
import android.content.Intent
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.google.gson.Gson
|
||||
import com.lukouguoji.module_base.base.BaseViewModel
|
||||
import com.lukouguoji.module_base.bean.IntImpQueryEditBean
|
||||
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.launchCollect
|
||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
||||
import dev.utils.app.info.KeyValue
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
/**
|
||||
* 国际进港运单修改 ViewModel
|
||||
*/
|
||||
class IntImpQueryEditViewModel : BaseViewModel() {
|
||||
|
||||
// 数据Bean
|
||||
val dataBean = MutableLiveData(IntImpQueryEditBean())
|
||||
|
||||
// 运单标识
|
||||
var maWbId: Long = 0
|
||||
var prefix: String = ""
|
||||
var no: String = ""
|
||||
|
||||
// ==================== 下拉列表 ====================
|
||||
val agentList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
val spCodeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
val packageTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
val waybillTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||
val lockStateList = MutableLiveData(
|
||||
listOf(
|
||||
KeyValue("未锁", "0"),
|
||||
KeyValue("锁定", "1")
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* 初始化数据
|
||||
*/
|
||||
fun initOnCreated(intent: Intent) {
|
||||
maWbId = intent.getLongExtra("maWbId", 0L)
|
||||
prefix = intent.getStringExtra("prefix") ?: ""
|
||||
no = intent.getStringExtra("no") ?: ""
|
||||
|
||||
if (prefix.isEmpty() || no.isEmpty()) {
|
||||
showToast("运单号参数为空")
|
||||
getTopActivity().finish()
|
||||
return
|
||||
}
|
||||
|
||||
// 加载下拉列表
|
||||
loadAgentList()
|
||||
loadSpCodeList()
|
||||
loadPackageTypeList()
|
||||
loadWaybillTypeList()
|
||||
|
||||
// 加载详情
|
||||
loadDetails()
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载代理人下拉列表
|
||||
*/
|
||||
private fun loadAgentList() {
|
||||
launchCollect({ NetApply.api.getIntImpAgentList() }) {
|
||||
onSuccess = { result ->
|
||||
val list = result.data?.mapNotNull { bean ->
|
||||
if (bean.name != null && bean.code != null) {
|
||||
KeyValue(bean.name, bean.code)
|
||||
} else null
|
||||
} ?: emptyList()
|
||||
agentList.value = list
|
||||
// 详情已加载时匹配代理人
|
||||
matchAgent()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载特码下拉列表
|
||||
* flag=1(国际), ieFlag=I(进港)
|
||||
*/
|
||||
private fun loadSpCodeList() {
|
||||
launchCollect({ NetApply.api.getSpecialCodeList(1, "I", "") }) {
|
||||
onSuccess = { result ->
|
||||
val list = result.data?.mapNotNull { bean ->
|
||||
if (bean.name != null && bean.code != null) {
|
||||
KeyValue(bean.name, bean.code)
|
||||
} else null
|
||||
} ?: emptyList()
|
||||
spCodeList.value = list
|
||||
matchSpCode()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载包装类型下拉列表(国际进港专用)
|
||||
*/
|
||||
private fun loadPackageTypeList() {
|
||||
launchCollect({ NetApply.api.getGjjPackTypeList() }) {
|
||||
onSuccess = { result ->
|
||||
val list = result.data?.mapNotNull { bean ->
|
||||
if (bean.packageName.isNotEmpty()) {
|
||||
KeyValue(bean.packageName, bean.packageName)
|
||||
} else null
|
||||
} ?: emptyList()
|
||||
packageTypeList.value = list
|
||||
matchPackageType()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载运单类型下拉列表
|
||||
* type=II(国际进港)
|
||||
*/
|
||||
private fun loadWaybillTypeList() {
|
||||
launchCollect({ NetApply.api.getWaybillTypeList("II") }) {
|
||||
onSuccess = { result ->
|
||||
val list = result.data?.mapNotNull { bean ->
|
||||
if (bean.name != null && bean.code != null) {
|
||||
KeyValue(bean.name, bean.code)
|
||||
} else null
|
||||
} ?: emptyList()
|
||||
waybillTypeList.value = list
|
||||
matchWaybillType()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载运单详情数据
|
||||
*/
|
||||
private fun loadDetails() {
|
||||
val params = mapOf("prefix" to prefix, "no" to no).toRequestBody()
|
||||
|
||||
launchLoadingCollect({ NetApply.api.getIntImpQueryDetails(params) }) {
|
||||
onSuccess = { result ->
|
||||
val data = result.data ?: emptyMap()
|
||||
|
||||
// 提取 maWb 对象
|
||||
val maWb = data["maWb"] as? Map<String, Any> ?: emptyMap()
|
||||
// 提取 maWbM 对象
|
||||
val maWbM = data["maWbM"] as? Map<String, Any> ?: emptyMap()
|
||||
// 提取 warehouseList(用于计算入库件数和入库重量)
|
||||
val warehouseList = data["warehouseList"] as? List<Map<String, Any>> ?: emptyList()
|
||||
|
||||
// 合并数据
|
||||
val mergedData = mutableMapOf<String, Any>()
|
||||
mergedData.putAll(maWb)
|
||||
mergedData.putAll(maWbM)
|
||||
|
||||
// 运单号: 组合 prefix + no
|
||||
val prefix = maWb["prefix"] as? String ?: ""
|
||||
val no = maWb["no"] as? String ?: ""
|
||||
if (prefix.isNotEmpty() && no.isNotEmpty()) {
|
||||
mergedData["wbNo"] = "$prefix$no"
|
||||
}
|
||||
|
||||
// 代理人名称
|
||||
if (!mergedData.containsKey("agentName") || (mergedData["agentName"] as? String).isNullOrEmpty()) {
|
||||
maWb["agentCode"]?.let { mergedData["agentName"] = it }
|
||||
}
|
||||
|
||||
// 运单件数/重量映射
|
||||
val pc = maWb["pc"]
|
||||
when (pc) {
|
||||
is Number -> mergedData["awbPc"] = pc.toLong()
|
||||
is String -> mergedData["awbPc"] = pc.toLongOrNull() ?: 0L
|
||||
}
|
||||
val weight = maWb["weight"]
|
||||
when (weight) {
|
||||
is Number -> mergedData["awbWeight"] = weight.toDouble()
|
||||
is String -> mergedData["awbWeight"] = weight.toDoubleOrNull() ?: 0.0
|
||||
}
|
||||
|
||||
// 入库件数和入库重量: 从 warehouseList 计算总和
|
||||
if (warehouseList.isNotEmpty()) {
|
||||
var totalPc = 0L
|
||||
var totalWeight = 0.0
|
||||
warehouseList.forEach { warehouse ->
|
||||
val wPc = warehouse["pc"]
|
||||
when (wPc) {
|
||||
is Number -> totalPc += wPc.toLong()
|
||||
is String -> totalPc += wPc.toLongOrNull() ?: 0L
|
||||
}
|
||||
val wWeight = warehouse["weight"]
|
||||
when (wWeight) {
|
||||
is Number -> totalWeight += wWeight.toDouble()
|
||||
is String -> totalWeight += wWeight.toDoubleOrNull() ?: 0.0
|
||||
}
|
||||
}
|
||||
mergedData["inPc"] = totalPc
|
||||
mergedData["inWeight"] = totalWeight
|
||||
}
|
||||
|
||||
// lockState 转换为 String(SPINNER 绑定用)
|
||||
val lockState = mergedData["lockState"]
|
||||
when (lockState) {
|
||||
is Number -> mergedData["lockState"] = lockState.toInt().toString()
|
||||
is String -> mergedData["lockState"] = lockState
|
||||
}
|
||||
|
||||
// 转换为 Bean
|
||||
val bean = Gson().fromJson(Gson().toJson(mergedData), IntImpQueryEditBean::class.java)
|
||||
|
||||
// 匹配下拉列表
|
||||
matchAgent(bean)
|
||||
matchSpCode(bean)
|
||||
matchPackageType(bean)
|
||||
matchWaybillType(bean)
|
||||
matchLockState(bean)
|
||||
|
||||
dataBean.value = bean
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 匹配代理人
|
||||
*/
|
||||
private fun matchAgent(bean: IntImpQueryEditBean? = dataBean.value) {
|
||||
bean ?: return
|
||||
val currentCode = bean.agentCode
|
||||
if (currentCode.isNullOrEmpty()) return
|
||||
|
||||
val list = agentList.value ?: return
|
||||
if (list.isEmpty()) return
|
||||
|
||||
val match = list.find { it.value == currentCode }
|
||||
if (match != null) {
|
||||
bean.agentName = match.key
|
||||
bean.agentCode = match.value
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 匹配特码
|
||||
*/
|
||||
private fun matchSpCode(bean: IntImpQueryEditBean? = dataBean.value) {
|
||||
bean ?: return
|
||||
val currentCode = bean.spCode
|
||||
if (currentCode.isNullOrEmpty()) return
|
||||
|
||||
val list = spCodeList.value ?: return
|
||||
if (list.isEmpty()) return
|
||||
|
||||
val match = list.find { it.value == currentCode }
|
||||
if (match != null) {
|
||||
bean.spCode = match.value
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 匹配包装类型
|
||||
*/
|
||||
private fun matchPackageType(bean: IntImpQueryEditBean? = dataBean.value) {
|
||||
bean ?: return
|
||||
val currentType = bean.packageType
|
||||
if (currentType.isNullOrEmpty()) return
|
||||
|
||||
val list = packageTypeList.value ?: return
|
||||
if (list.isEmpty()) return
|
||||
|
||||
val match = list.find { it.value?.contains(currentType) == true }
|
||||
if (match != null) {
|
||||
bean.packageType = match.value
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 匹配运单类型
|
||||
*/
|
||||
private fun matchWaybillType(bean: IntImpQueryEditBean? = dataBean.value) {
|
||||
bean ?: return
|
||||
val currentCode = bean.awbType
|
||||
if (currentCode.isNullOrEmpty()) return
|
||||
|
||||
val list = waybillTypeList.value ?: return
|
||||
if (list.isEmpty()) return
|
||||
|
||||
val match = list.find { it.value == currentCode }
|
||||
if (match != null) {
|
||||
bean.awbType = match.value
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 匹配锁定状态
|
||||
*/
|
||||
private fun matchLockState(bean: IntImpQueryEditBean? = dataBean.value) {
|
||||
bean ?: return
|
||||
val currentState = bean.lockState
|
||||
if (currentState.isNullOrEmpty()) return
|
||||
|
||||
val list = lockStateList.value ?: return
|
||||
val match = list.find { it.value == currentState }
|
||||
if (match != null) {
|
||||
bean.lockState = match.value
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存修改
|
||||
*/
|
||||
fun submit() {
|
||||
val bean = dataBean.value ?: return
|
||||
|
||||
// 构建提交数据(只提交需要的字段)
|
||||
val submitData = mutableMapOf<String, Any?>()
|
||||
submitData["maWbId"] = if (maWbId != 0L) maWbId else bean.maWbId
|
||||
submitData["activeId"] = bean.activeId
|
||||
submitData["prefix"] = bean.prefix
|
||||
submitData["no"] = bean.no
|
||||
submitData["wbNo"] = bean.wbNo
|
||||
submitData["agentCode"] = bean.agentCode
|
||||
submitData["spCode"] = bean.spCode
|
||||
submitData["packageType"] = bean.packageType
|
||||
submitData["awbType"] = bean.awbType
|
||||
submitData["lockState"] = bean.lockState?.toIntOrNull()
|
||||
submitData["remark"] = bean.remark
|
||||
submitData["fno"] = bean.fno
|
||||
submitData["fdate"] = bean.fdate
|
||||
submitData["flight"] = bean.flight
|
||||
submitData["pc"] = bean.pc
|
||||
submitData["weight"] = bean.weight
|
||||
submitData["volume"] = bean.volume
|
||||
submitData["origin"] = bean.origin
|
||||
submitData["dest"] = bean.dest
|
||||
submitData["range"] = bean.range
|
||||
submitData["goods"] = bean.goods
|
||||
submitData["goodsCn"] = bean.goodsCn
|
||||
submitData["cargoType"] = bean.cargoType
|
||||
submitData["by1"] = bean.by1
|
||||
submitData["subCode"] = bean.subCode
|
||||
submitData["cashWeight"] = bean.cashWeight
|
||||
submitData["unNumber"] = bean.unNumber
|
||||
submitData["businessType"] = bean.businessType
|
||||
submitData["carId"] = bean.carId
|
||||
|
||||
launchLoadingCollect({
|
||||
NetApply.api.modifyIntImpMaWb(submitData.toRequestBody())
|
||||
}) {
|
||||
onSuccess = {
|
||||
showToast("修改成功")
|
||||
viewModelScope.launch {
|
||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||
}
|
||||
getTopActivity().finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消
|
||||
*/
|
||||
fun cancel() {
|
||||
getTopActivity().finish()
|
||||
}
|
||||
}
|
||||
@@ -4,11 +4,16 @@ import android.app.Activity
|
||||
import android.content.Intent
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.lukouguoji.gjj.R
|
||||
import com.lukouguoji.gjj.activity.IntImpQueryEditActivity
|
||||
import com.lukouguoji.gjj.dialog.IntImpQueryFilterDialogModel
|
||||
import com.lukouguoji.gjj.holder.IntImpQueryViewHolder
|
||||
import com.lukouguoji.gjj.activity.IntImpQueryDetailsActivity
|
||||
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||
import com.lukouguoji.module_base.bean.IntImpQueryBean
|
||||
import com.lukouguoji.module_base.common.Constant
|
||||
import com.lukouguoji.module_base.http.net.NetApply
|
||||
import com.lukouguoji.module_base.interfaces.IOnItemClickListener
|
||||
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
|
||||
@@ -21,7 +26,7 @@ import com.lukouguoji.module_base.ktx.formatDate
|
||||
/**
|
||||
* 国际进港查询ViewModel
|
||||
*/
|
||||
class IntImpQueryViewModel : BasePageViewModel() {
|
||||
class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
|
||||
|
||||
// ==================== 搜索条件 ====================
|
||||
val flightDateStart = MutableLiveData<String>(DateUtils.getCurrentTime().formatDate())
|
||||
@@ -85,8 +90,8 @@ class IntImpQueryViewModel : BasePageViewModel() {
|
||||
|
||||
override fun getData() {
|
||||
val listParams = mapOf(
|
||||
"pageNum" to pageModel.page,
|
||||
"pageSize" to pageModel.limit,
|
||||
"page" to pageModel.page,
|
||||
"limit" to pageModel.limit,
|
||||
"beginDate" to flightDateStart.value!!.ifEmpty { null },
|
||||
"endDate" to flightDateEnd.value!!.ifEmpty { null },
|
||||
"agentCode" to agentId.value!!.ifEmpty { null },
|
||||
@@ -145,6 +150,22 @@ class IntImpQueryViewModel : BasePageViewModel() {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onItemClick(position: Int, type: Int) {
|
||||
val list = pageModel.rv?.commonAdapter()?.items as? List<IntImpQueryBean> ?: return
|
||||
val bean = list.getOrNull(position) ?: return
|
||||
|
||||
when (type) {
|
||||
2000 -> {
|
||||
// 侧滑菜单 - 修改操作
|
||||
IntImpQueryEditActivity.start(getTopActivity(), bean.maWbId, bean.prefix, bean.no)
|
||||
}
|
||||
else -> {
|
||||
// 默认点击 - 进入详情
|
||||
IntImpQueryDetailsActivity.start(getTopActivity(), bean.prefix, bean.no)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun initAgentList() {
|
||||
launchCollect({
|
||||
NetApply.api.getIntImpAgentList()
|
||||
|
||||
@@ -101,16 +101,16 @@
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:padding="2dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:padding="4dp"
|
||||
android:src="@drawable/img_add" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:onClick="@{()-> viewModel.deleteClick()}"
|
||||
android:padding="2dp"
|
||||
android:padding="4dp"
|
||||
android:src="@drawable/img_delete" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -78,7 +78,13 @@
|
||||
icon="@{@drawable/img_scan}"
|
||||
setOnIconClickListener="@{()-> viewModel.waybillScanClick()}"
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.waybillNo}" />
|
||||
value="@={viewModel.waybillNo}"
|
||||
autoQueryEnabled="@{true}"
|
||||
autoQueryUrl="@{`/IntImpSearch/queryWbNoList`}"
|
||||
autoQueryParamKey="@{`wbNo`}"
|
||||
autoQueryMinLength="@{4}"
|
||||
autoQueryMaxLength="@{8}"
|
||||
autoQueryTitle="@{`选择运单号`}" />
|
||||
|
||||
<!-- 搜索和筛选按钮 -->
|
||||
<LinearLayout
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.gjj.viewModel.IntImpQueryDetailsViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<!-- Tab栏 (自定义,文字Tab + 底线) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginHorizontal="15dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:background="@drawable/bg_white_radius_top_8"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- Tab1: 运单信息 -->
|
||||
<LinearLayout
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:onClick="@{()->viewModel.onTabClick(0)}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="运单信息"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@{viewModel.currentTab == 0 ? @color/colorPrimary : @color/text_gray}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="3dp"
|
||||
android:background="@{viewModel.currentTab == 0 ? @color/colorPrimary : @color/transparent}"
|
||||
android:visibility="@{viewModel.currentTab == 0 ? View.VISIBLE : View.INVISIBLE}" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Tab2: 仓库信息 -->
|
||||
<LinearLayout
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:onClick="@{()->viewModel.onTabClick(1)}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="仓库信息"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@{viewModel.currentTab == 1 ? @color/colorPrimary : @color/text_gray}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="3dp"
|
||||
android:background="@{viewModel.currentTab == 1 ? @color/colorPrimary : @color/transparent}"
|
||||
android:visibility="@{viewModel.currentTab == 1 ? View.VISIBLE : View.INVISIBLE}" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Tab3: 库位信息 -->
|
||||
<LinearLayout
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:onClick="@{()->viewModel.onTabClick(2)}"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="库位信息"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@{viewModel.currentTab == 2 ? @color/colorPrimary : @color/text_gray}"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="3dp"
|
||||
android:background="@{viewModel.currentTab == 2 ? @color/colorPrimary : @color/transparent}"
|
||||
android:visibility="@{viewModel.currentTab == 2 ? View.VISIBLE : View.INVISIBLE}" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="23dp"
|
||||
android:background="@color/color_f2" />
|
||||
|
||||
<!-- ViewPager2 -->
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/vp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
326
module_gjj/src/main/res/layout/activity_int_imp_query_edit.xml
Normal file
326
module_gjj/src/main/res/layout/activity_int_imp_query_edit.xml
Normal file
@@ -0,0 +1,326 @@
|
||||
<?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.data.layout.DataLayoutType" />
|
||||
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.gjj.viewModel.IntImpQueryEditViewModel" />
|
||||
</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:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
<!-- 第1行:运单号(禁用)| 代理人(SPINNER)| 特码(SPINNER)-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"运单号"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.wbNo}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{true}"
|
||||
hint='@{"请选择代理人"}'
|
||||
list="@{viewModel.agentList}"
|
||||
title='@{"代理人"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.dataBean.agentCode}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{true}"
|
||||
hint='@{"请选择特码"}'
|
||||
list="@{viewModel.spCodeList}"
|
||||
title='@{"特码"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.dataBean.spCode}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第2行:运单件数(禁用)| 运单重量(禁用)| 业务类型(禁用)-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"运单件数"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.awbPc != null ? String.valueOf(viewModel.dataBean.awbPc) : ``}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"运单重量"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.awbWeight != null ? String.valueOf(viewModel.dataBean.awbWeight) : ``}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"业务类型"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.businessName}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第3行:入库件数(禁用)| 入库重量(禁用)| 计费重量(禁用)-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"入库件数"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.inPc != null ? String.valueOf(viewModel.dataBean.inPc) : ``}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"入库重量"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.inWeight != null ? String.valueOf(viewModel.dataBean.inWeight) : ``}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"计费重量"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.cashWeight != null ? String.valueOf(viewModel.dataBean.cashWeight) : ``}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第4行:承运人(禁用)| 航程(禁用)| 包装类型(SPINNER)-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"承运人"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.by1}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"航程"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.range}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{true}"
|
||||
hint='@{"请选择包装类型"}'
|
||||
list="@{viewModel.packageTypeList}"
|
||||
title='@{"包装类型"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.dataBean.packageType}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第5行:品名(中)(禁用)| 品名(英)(禁用)| UN编号(禁用)-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"品名(中)"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.goodsCn}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"品名(英)"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.goods}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"UN编号"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.dataBean.unNumber}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第6行:运单类型(SPINNER)| 锁定状态(SPINNER)-->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{true}"
|
||||
hint='@{"请选择运单类型"}'
|
||||
list="@{viewModel.waybillTypeList}"
|
||||
title='@{"运单类型"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.dataBean.awbType}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{true}"
|
||||
hint='@{"请选择锁定状态"}'
|
||||
list="@{viewModel.lockStateList}"
|
||||
title='@{"锁定状态"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.SPINNER}"
|
||||
value='@={viewModel.dataBean.lockState}' />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第7行:备注(多行输入) -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
enable="@{true}"
|
||||
hint='@{"请输入备注"}'
|
||||
inputHeight="@{80}"
|
||||
title='@{"备注"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@={viewModel.dataBean.remark}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 底部操作按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:gravity="center"
|
||||
android:paddingHorizontal="15dp">
|
||||
|
||||
<!-- 取消按钮 -->
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:layout_width="120dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:onClick="@{()-> viewModel.cancel()}"
|
||||
android:text="取消" />
|
||||
|
||||
<!-- 保存按钮 -->
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:layout_width="120dp"
|
||||
android:onClick="@{()-> viewModel.submit()}"
|
||||
android:text="保存" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
@@ -0,0 +1,125 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:paddingBottom="15dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_white_radius_bottom_8"
|
||||
android:orientation="vertical"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<!-- 表头 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:background="@color/color_f2"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="center"
|
||||
android:text="序号"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center"
|
||||
android:text="库位号"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="入库人"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center"
|
||||
android:text="入库时间"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="出库人"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center"
|
||||
android:text="出库时间"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_storage_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:nestedScrollingEnabled="true"
|
||||
android:overScrollMode="never"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
<!-- 暂无数据提示 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_empty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="暂无数据"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<data>
|
||||
|
||||
<import type="android.view.View" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:paddingBottom="15dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_white_radius_bottom_8"
|
||||
android:orientation="vertical"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<!-- 表头 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:background="@color/color_f2"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="center"
|
||||
android:text="序号"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center"
|
||||
android:text="件数"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center"
|
||||
android:text="重量"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="航班日期"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="航班号"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.6"
|
||||
android:gravity="center"
|
||||
android:text="分批"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.3"
|
||||
android:gravity="center"
|
||||
android:text="入库时间"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_warehouse_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:nestedScrollingEnabled="true"
|
||||
android:overScrollMode="never"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
<!-- 暂无数据提示 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_empty"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="暂无数据"
|
||||
android:textColor="@color/text_gray"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -0,0 +1,336 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
|
||||
<import type="android.view.View" />
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.gjj.viewModel.IntImpQueryDetailsViewModel" />
|
||||
</data>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/color_f2"
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="15dp"
|
||||
android:paddingBottom="15dp">
|
||||
|
||||
<!-- 运单信息卡片 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_white_radius_bottom_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp">
|
||||
|
||||
<!-- 第1行: 运单号、代理人、特码 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"运单号"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.maWbData.get("wbNo")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"代理人"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.maWbData.get("agentCode")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"特码"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.maWbData.get("spCode")}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第2行: 运单件数、运单重量、业务类型 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"运单件数"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.maWbData.get("pc") != null ? String.valueOf((int)Math.round(((Double)viewModel.maWbData.get("pc")))) : ``}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"运单重量"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.maWbData.get("weight") != null ? String.valueOf(viewModel.maWbData.get("weight")) : ``}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"业务类型"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.maWbData.get("businessName")}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第3行: 入库件数、入库重量、计费重量 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"入库件数"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.maWbData.get("inPc") != null ? String.valueOf((int)Math.round(((Double)viewModel.maWbData.get("inPc")))) : ``}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"入库重量"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.maWbData.get("inWeight") != null ? String.valueOf(viewModel.maWbData.get("inWeight")) : ``}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"计费重量"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{viewModel.maWbData.get("cashWeight") != null ? String.valueOf(viewModel.maWbData.get("cashWeight")) : ``}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第4行: 承运人、航程、包装类型 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"承运人"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.maWbData.get("by1")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"航程"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.maWbData.get("range")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"包装类型"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.maWbData.get("packageType")}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第5行: 运单类型、UN编号 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"运单类型"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.maWbData.get("awbName")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"UN编号"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.maWbData.get("unNumber")}' />
|
||||
|
||||
<Space
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第6行: 品名(中)占2列、锁定状态占1列 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
enable="@{false}"
|
||||
title='@{"品名(中)"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.maWbData.get("goodsCn")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"锁定状态"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.maWbData.get("lockStateText")}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第7行: 品名(英)占2列、出库时间占1列 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
enable="@{false}"
|
||||
title='@{"品名(英)"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.maWbData.get("goods")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"出库时间"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.maWbData.get("dlvTime")}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第8行: 原始舱单、理货报告、海关放行 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"原始舱单"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.maWbData.get("mftStatus")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"理货报告"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.maWbData.get("tallyStatus")}' />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
title='@{"海关放行"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.maWbData.get("command")}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 第9行: 备注 - 多行输入 -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
enable="@{false}"
|
||||
inputHeight="@{80}"
|
||||
title='@{"备注"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value='@{(String)viewModel.maWbData.get("remark")}' />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
||||
</layout>
|
||||
@@ -8,15 +8,28 @@
|
||||
type="com.lukouguoji.module_base.bean.IntImpQueryBean" />
|
||||
</data>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/ll"
|
||||
<!-- 外层容器承载间距 -->
|
||||
<LinearLayout
|
||||
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">
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 侧滑布局 -->
|
||||
<com.mcxtzhang.swipemenulib.SwipeMenuLayout
|
||||
android:id="@+id/swipe_menu"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!-- 主列表项容器 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_item"
|
||||
android:orientation="horizontal"
|
||||
android:padding="10dp">
|
||||
|
||||
<!-- 左侧图标 -->
|
||||
<ImageView
|
||||
@@ -32,7 +45,7 @@
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 第一行:运单号、件数、重量、代理人、入库时间 -->
|
||||
<!-- 第一行:运单号、件数、重量、代理人、航班信息 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
@@ -41,7 +54,7 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.1"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
@@ -63,7 +76,7 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.7"
|
||||
android:layout_weight="0.6"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
@@ -84,20 +97,20 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="运单类型:" />
|
||||
android:text="重量:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{bean.awbName}'
|
||||
tools:text="国际进港" />
|
||||
android:text='@{String.valueOf(bean.awbWeight)}'
|
||||
tools:text="200" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
@@ -105,13 +118,13 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.0"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
completeSpace="@{5}"
|
||||
android:text="代理人:" />
|
||||
|
||||
<TextView
|
||||
@@ -122,61 +135,61 @@
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 入库时间 -->
|
||||
<!-- 航班信息 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="入库时间:" />
|
||||
android:text="航班信息:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{bean.inDate}'
|
||||
tools:text="2024-05-13 17:10:22" />
|
||||
android:text='@{bean.flight}'
|
||||
tools:text="20240216/MU2026" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 第二行:航班、件数(入库)、重量(运单)、航程、出库时间 -->
|
||||
<!-- 第二行:航程、特码、运单类型、入库时间、出库时间 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<!-- 航班 -->
|
||||
<!-- 航程 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.1"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="航班:" />
|
||||
android:text="航程:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.flight}"
|
||||
tools:text="20240513/MU2026" />
|
||||
android:text="@{bean.range}"
|
||||
tools:text="LAX-HFE" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 入库件数 -->
|
||||
<!-- 特码 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.7"
|
||||
android:layout_weight="0.6"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
@@ -193,45 +206,45 @@
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 运单重量 -->
|
||||
<!-- 运单类型 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{5}"
|
||||
android:text="业务类型:" />
|
||||
android:text="运单类型:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text='@{bean.businessName}'
|
||||
tools:text="普货" />
|
||||
android:text='@{bean.awbName}'
|
||||
tools:text="国际进港" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 航程 -->
|
||||
<!-- 入库时间 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.0"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
completeSpace="@{4}"
|
||||
android:text="目的地:" />
|
||||
completeSpace="@{5}"
|
||||
android:text="入库时间:" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.dest}"
|
||||
tools:text="HFE" />
|
||||
android:text='@{bean.inDate}'
|
||||
tools:text="2024-05-13 17:10:22" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
@@ -239,7 +252,7 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.2"
|
||||
android:layout_weight="1.0"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
@@ -260,14 +273,33 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 右侧箭头 -->
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:src="@drawable/img_pda_right" />
|
||||
<!-- 右侧箭头 -->
|
||||
<ImageView
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:src="@drawable/img_pda_right" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 侧滑菜单按钮区 -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 修改按钮 -->
|
||||
<TextView
|
||||
android:id="@+id/btn_edit"
|
||||
style="@style/tv_item_action"
|
||||
android:background="@color/colorPrimary"
|
||||
android:text="修改" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</com.mcxtzhang.swipemenulib.SwipeMenuLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</layout>
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="bean"
|
||||
type="com.lukouguoji.module_base.bean.GjjStorageUse" />
|
||||
|
||||
<variable
|
||||
name="position"
|
||||
type="Integer" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@{position % 2 == 0 ? @color/white : @color/color_f2}"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="40dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:paddingVertical="8dp">
|
||||
|
||||
<!-- 序号 -->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="center"
|
||||
android:text="@{String.valueOf(position + 1)}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- 库位号 -->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center"
|
||||
android:text="@{bean.location ?? `--`}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- 入库人 -->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@{bean.inOpName != null ? bean.inOpName : (bean.inOpId ?? `--`)}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- 入库时间 -->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center"
|
||||
android:text="@{bean.inDate != null && bean.inDate.length() >= 16 ? bean.inDate.substring(0, 16) : (bean.inDate != null && bean.inDate.length() > 0 ? bean.inDate : `--`)}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- 出库人 -->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@{bean.outOpName != null ? bean.outOpName : (bean.outOpId ?? `--`)}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- 出库时间 -->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.5"
|
||||
android:gravity="center"
|
||||
android:text="@{bean.outDate != null && bean.outDate.length() >= 16 ? bean.outDate.substring(0, 16) : (bean.outDate != null && bean.outDate.length() > 0 ? bean.outDate : `--`)}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="bean"
|
||||
type="com.lukouguoji.module_base.bean.GjjWarehouse" />
|
||||
|
||||
<variable
|
||||
name="position"
|
||||
type="Integer" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@{position % 2 == 0 ? @color/white : @color/color_f2}"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="40dp"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="10dp"
|
||||
android:paddingVertical="8dp">
|
||||
|
||||
<!-- 序号 -->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:gravity="center"
|
||||
android:text="@{String.valueOf(position + 1)}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- 件数 -->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center"
|
||||
android:text="@{bean.pc != null ? String.valueOf(bean.pc) : ``}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- 重量 -->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.8"
|
||||
android:gravity="center"
|
||||
android:text="@{bean.weight ?? ``}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- 航班日期 -->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@{bean.fdate ?? ``}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- 航班号 -->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@{bean.fno ?? ``}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- 分批 -->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.6"
|
||||
android:gravity="center"
|
||||
android:text="@{bean.splitFlag != null && bean.splitFlag.length() > 0 ? bean.splitFlag : `1`}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- 入库时间(取 opDate) -->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.3"
|
||||
android:gravity="center"
|
||||
android:text="@{bean.opDate != null && bean.opDate.length() >= 16 ? bean.opDate.substring(0, 16) : (bean.opDate ?? ``)}"
|
||||
android:textColor="@android:color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
Reference in New Issue
Block a user