feat: io
This commit is contained in:
@@ -22,7 +22,9 @@
|
||||
"Bash(xargs cat:*)",
|
||||
"mcp__chrome-devtools__evaluate_script",
|
||||
"WebSearch",
|
||||
"Bash(chmod:*)"
|
||||
"Bash(chmod:*)",
|
||||
"Bash(xargs ls:*)",
|
||||
"Bash(xargs rm -rf)"
|
||||
],
|
||||
"deny": [],
|
||||
"ask": []
|
||||
|
||||
2
.idea/deploymentTargetSelector.xml
generated
2
.idea/deploymentTargetSelector.xml
generated
@@ -4,7 +4,7 @@
|
||||
<selectionStates>
|
||||
<SelectionState runConfigName="app">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
<DropdownSelection timestamp="2025-11-27T05:04:50.474591Z">
|
||||
<DropdownSelection timestamp="2025-11-27T08:04:42.915090Z">
|
||||
<Target type="DEFAULT_BOOT">
|
||||
<handle>
|
||||
<DeviceId pluginId="PhysicalDevice" identifier="serial=80STHZCHDLL4311422" />
|
||||
|
||||
@@ -151,6 +151,12 @@
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<!-- 国际出港-开始组装 -->
|
||||
<activity
|
||||
android:name="com.lukouguoji.gjc.page.assemble.IntExpAssembleStartActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:exported="false"
|
||||
android:screenOrientation="userLandscape" />
|
||||
<activity
|
||||
android:name=".MineActivity"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
/**
|
||||
* 组装信息Bean(左侧列表)
|
||||
*/
|
||||
class AssembleInfoBean {
|
||||
var waybillNo: String = "" // 运单号
|
||||
var pieces: String = "" // 件数
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
/**
|
||||
* 组装位置Bean
|
||||
*/
|
||||
class AssemblePositionBean {
|
||||
var positionName: String = "" // 位置名称
|
||||
var isSelected: Boolean = false // 是否选中
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
/**
|
||||
* 运单列表Bean(右侧运单列表)
|
||||
*/
|
||||
class AssembleWaybillBean {
|
||||
var waybillNo: String = "" // 运单号
|
||||
var pieces: String = "" // 件数
|
||||
var weight: String = "" // 重量
|
||||
var isMarked: Boolean = false // 是否标记(红色显示)
|
||||
}
|
||||
@@ -54,5 +54,6 @@ class GjcUldUseBean {
|
||||
|
||||
// ========== 出港组装页面扩展字段 ==========
|
||||
var isExpanded: Boolean = false // 展开状态
|
||||
var isSelected: Boolean = false // 选中状态
|
||||
var waybillDetails: MutableList<GjcWarehouse>? = null // 运单明细缓存
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
/**
|
||||
* ULD信息Bean
|
||||
*/
|
||||
class UldInfoBean {
|
||||
var uldNo: String = "" // ULD编号
|
||||
var planeType: String = "" // 机型
|
||||
var weightLimit: String = "" // 限重
|
||||
var totalPieces: String = "" // 总件数
|
||||
var totalWeight: String = "" // 总重量
|
||||
var status: String = "" // 状态
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.lukouguoji.module_base.bean
|
||||
|
||||
/**
|
||||
* 运单信息Bean
|
||||
*/
|
||||
class WaybillInfoBean {
|
||||
var waybillNo: String = "" // 运单号
|
||||
var pieces: String = "" // 件数
|
||||
var weight: String = "" // 重量
|
||||
var destination: String = "" // 目的港
|
||||
var specialCode: String = "" // 特码
|
||||
var goodsName: String = "" // 品名
|
||||
}
|
||||
@@ -468,6 +468,22 @@ interface Api {
|
||||
@POST("IntExpAssemble/queryAssembled")
|
||||
suspend fun getIntExpAssembleWaybillDetails(@Body data: RequestBody): BaseResultBean<MutableList<GjcWarehouse>>
|
||||
|
||||
/**
|
||||
* 国际出港组装-删除记录
|
||||
* 接口路径: /IntExpAssemble/delete
|
||||
* @param ids ULD使用记录ID,多个用逗号分隔
|
||||
*/
|
||||
@POST("IntExpAssemble/delete")
|
||||
suspend fun deleteIntExpAssemble(@Query("ids") ids: String): BaseResultBean<SimpleResultBean>
|
||||
|
||||
/**
|
||||
* 国际出港组装-回填重量
|
||||
* 接口路径: /IntExpAssemble/backfillWeight
|
||||
* @param data 请求参数:ids(ULD使用记录ID,逗号分隔)、weight(重量)
|
||||
*/
|
||||
@POST("IntExpAssemble/backfillWeight")
|
||||
suspend fun backfillIntExpAssembleWeight(@Body data: RequestBody): BaseResultBean<SimpleResultBean>
|
||||
|
||||
/**
|
||||
* 国际出港待计重-分页搜索
|
||||
* 接口路径: /IntExpCheckIn/pageQuery
|
||||
|
||||
@@ -137,6 +137,7 @@ object ARouterConstants {
|
||||
const val ACTIVITY_URL_GJC_INSPECTION_DETAILS = "/gjc/GjcInspectionDetailsActivity" //国际出港 收运检查详情
|
||||
const val ACTIVITY_URL_GJC_HANDOVER = "/gjc/GjcHandoverActivity" //国际出港 货物交接单
|
||||
const val ACTIVITY_URL_INT_EXP_ASSEMBLE = "/gjc/IntExpAssembleActivity" //国际出港 出港组装
|
||||
const val ACTIVITY_URL_INT_EXP_ASSEMBLE_START = "/gjc/IntExpAssembleStartActivity" //国际出港 开始组装
|
||||
|
||||
///////////////// 国际进港模块
|
||||
/**
|
||||
|
||||
8
module_base/src/main/res/drawable/bg_blue_radius_4.xml
Normal file
8
module_base/src/main/res/drawable/bg_blue_radius_4.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="#1C8CF5" />
|
||||
<corners android:radius="4dp" />
|
||||
|
||||
</shape>
|
||||
7
module_base/src/main/res/drawable/bg_circle_yellow.xml
Normal file
7
module_base/src/main/res/drawable/bg_circle_yellow.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
|
||||
<solid android:color="#FFC107" />
|
||||
|
||||
</shape>
|
||||
8
module_base/src/main/res/drawable/bg_green_light.xml
Normal file
8
module_base/src/main/res/drawable/bg_green_light.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="#E8F5E9" />
|
||||
<corners android:radius="4dp" />
|
||||
|
||||
</shape>
|
||||
8
module_base/src/main/res/drawable/bg_red_radius_4.xml
Normal file
8
module_base/src/main/res/drawable/bg_red_radius_4.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="#EA0553" />
|
||||
<corners android:radius="4dp" />
|
||||
|
||||
</shape>
|
||||
9
module_base/src/main/res/drawable/ic_check_green.xml
Normal file
9
module_base/src/main/res/drawable/ic_check_green.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp"
|
||||
android:height="20dp"
|
||||
android:viewportWidth="20"
|
||||
android:viewportHeight="20">
|
||||
<path
|
||||
android:fillColor="#4CAF50"
|
||||
android:pathData="M7.5,14.5L3,10L4.4,8.6L7.5,11.7L15.6,3.6L17,5L7.5,14.5Z"/>
|
||||
</vector>
|
||||
10
module_base/src/main/res/drawable/img_add.xml
Normal file
10
module_base/src/main/res/drawable/img_add.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#1C8CF5"
|
||||
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
|
||||
</vector>
|
||||
@@ -35,5 +35,6 @@
|
||||
|
||||
<color name="color_bottom_layout">#5c6890</color>
|
||||
<color name="color_f2">#F2F2F2</color>
|
||||
<color name="line">#EEEEEE</color>
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.lukouguoji.gjc.holder
|
||||
|
||||
import android.view.View
|
||||
import com.lukouguoji.gjc.databinding.ItemAssembleInfoBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.bean.AssembleInfoBean
|
||||
|
||||
/**
|
||||
* 组装信息ViewHolder
|
||||
*/
|
||||
class AssembleInfoViewHolder(view: View) :
|
||||
BaseViewHolder<AssembleInfoBean, ItemAssembleInfoBinding>(view) {
|
||||
|
||||
override fun onBind(item: Any?, position: Int) {
|
||||
val bean = getItemBean(item) ?: return
|
||||
binding.bean = bean
|
||||
binding.position = position
|
||||
binding.executePendingBindings()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.lukouguoji.gjc.holder
|
||||
|
||||
import android.view.View
|
||||
import com.lukouguoji.gjc.databinding.ItemAssemblePositionBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.bean.AssemblePositionBean
|
||||
|
||||
/**
|
||||
* 组装位置ViewHolder
|
||||
*/
|
||||
class AssemblePositionViewHolder(view: View) :
|
||||
BaseViewHolder<AssemblePositionBean, ItemAssemblePositionBinding>(view) {
|
||||
|
||||
override fun onBind(item: Any?, position: Int) {
|
||||
val bean = getItemBean(item) ?: return
|
||||
binding.bean = bean
|
||||
binding.position = position
|
||||
|
||||
// 点击选择位置
|
||||
itemView.setOnClickListener {
|
||||
clickListener?.onItemClick(position, 0)
|
||||
}
|
||||
|
||||
binding.executePendingBindings()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.lukouguoji.gjc.holder
|
||||
|
||||
import android.view.View
|
||||
import com.lukouguoji.gjc.databinding.ItemAssembleWaybillBinding
|
||||
import com.lukouguoji.module_base.base.BaseViewHolder
|
||||
import com.lukouguoji.module_base.bean.AssembleWaybillBean
|
||||
|
||||
/**
|
||||
* 运单列表ViewHolder
|
||||
*/
|
||||
class AssembleWaybillViewHolder(view: View) :
|
||||
BaseViewHolder<AssembleWaybillBean, ItemAssembleWaybillBinding>(view) {
|
||||
|
||||
override fun onBind(item: Any?, position: Int) {
|
||||
val bean = getItemBean(item) ?: return
|
||||
binding.bean = bean
|
||||
binding.position = position
|
||||
|
||||
// 点击运单
|
||||
itemView.setOnClickListener {
|
||||
clickListener?.onItemClick(position, 0)
|
||||
}
|
||||
|
||||
binding.executePendingBindings()
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,12 @@ class IntExpAssembleViewHolder(view: View) :
|
||||
// 更新展开状态(初次绑定不需要动画)
|
||||
updateExpandState(bean, animate = false)
|
||||
|
||||
// 点击整个item切换选中状态
|
||||
binding.root.setOnClickListener {
|
||||
bean.isSelected = !bean.isSelected
|
||||
binding.bean = bean // 触发DataBinding更新
|
||||
}
|
||||
|
||||
// 展开按钮点击事件
|
||||
binding.btnExpand.setOnClickListener {
|
||||
clickListener?.onItemClick(position, 1000) // type=1000表示展开操作
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
package com.lukouguoji.gjc.page.assemble
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.databinding.ActivityIntExpAssembleStartBinding
|
||||
import com.lukouguoji.gjc.viewModel.IntExpAssembleStartViewModel
|
||||
import com.lukouguoji.module_base.base.BaseBindingActivity
|
||||
import com.lukouguoji.module_base.base.CommonAdapter
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
|
||||
/**
|
||||
* 国际出港-开始组装页面
|
||||
*/
|
||||
@Route(path = ARouterConstants.ACTIVITY_URL_INT_EXP_ASSEMBLE_START)
|
||||
class IntExpAssembleStartActivity :
|
||||
BaseBindingActivity<ActivityIntExpAssembleStartBinding, IntExpAssembleStartViewModel>() {
|
||||
|
||||
private var assembleInfoAdapter: CommonAdapter? = null
|
||||
private var assemblePositionAdapter: CommonAdapter? = null
|
||||
private var waybillAdapter: CommonAdapter? = null
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context) {
|
||||
val starter = Intent(context, IntExpAssembleStartActivity::class.java)
|
||||
context.startActivity(starter)
|
||||
}
|
||||
}
|
||||
|
||||
override fun layoutId() = R.layout.activity_int_exp_assemble_start
|
||||
|
||||
override fun viewModelClass() = IntExpAssembleStartViewModel::class.java
|
||||
|
||||
override fun initOnCreate(savedInstanceState: Bundle?) {
|
||||
setBackArrow("开始组装")
|
||||
binding.viewModel = viewModel
|
||||
|
||||
// 初始化列表
|
||||
initRecyclerViews()
|
||||
|
||||
// 加载模拟数据
|
||||
viewModel.initMockData()
|
||||
|
||||
// 观察数据变化
|
||||
observeData()
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化RecyclerView
|
||||
*/
|
||||
private fun initRecyclerViews() {
|
||||
// 左侧组装信息列表
|
||||
assembleInfoAdapter = CommonAdapter(
|
||||
this,
|
||||
viewModel.assembleInfoLayoutId,
|
||||
viewModel.assembleInfoViewHolder
|
||||
)
|
||||
binding.rvAssembleInfo.layoutManager = LinearLayoutManager(this)
|
||||
binding.rvAssembleInfo.adapter = assembleInfoAdapter
|
||||
|
||||
// 左侧组装位置列表
|
||||
assemblePositionAdapter = CommonAdapter(
|
||||
this,
|
||||
viewModel.assemblePositionLayoutId,
|
||||
viewModel.assemblePositionViewHolder
|
||||
)
|
||||
binding.rvAssemblePosition.layoutManager = LinearLayoutManager(this)
|
||||
binding.rvAssemblePosition.adapter = assemblePositionAdapter
|
||||
|
||||
// 右侧运单列表
|
||||
waybillAdapter = CommonAdapter(
|
||||
this,
|
||||
viewModel.waybillLayoutId,
|
||||
viewModel.waybillViewHolder
|
||||
)
|
||||
binding.rvWaybillList.layoutManager = LinearLayoutManager(this)
|
||||
binding.rvWaybillList.adapter = waybillAdapter
|
||||
}
|
||||
|
||||
/**
|
||||
* 观察数据变化
|
||||
*/
|
||||
private fun observeData() {
|
||||
viewModel.assembleInfoList.observe(this) { list ->
|
||||
assembleInfoAdapter?.refresh(list)
|
||||
}
|
||||
|
||||
viewModel.assemblePositionList.observe(this) { list ->
|
||||
assemblePositionAdapter?.refresh(list)
|
||||
}
|
||||
|
||||
viewModel.waybillList.observe(this) { list ->
|
||||
waybillAdapter?.refresh(list)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
package com.lukouguoji.gjc.viewModel
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.holder.AssembleInfoViewHolder
|
||||
import com.lukouguoji.gjc.holder.AssemblePositionViewHolder
|
||||
import com.lukouguoji.gjc.holder.AssembleWaybillViewHolder
|
||||
import com.lukouguoji.module_base.base.BaseViewModel
|
||||
import com.lukouguoji.module_base.bean.*
|
||||
import com.lukouguoji.module_base.ktx.showToast
|
||||
|
||||
/**
|
||||
* 国际出港-开始组装ViewModel(静态数据)
|
||||
*/
|
||||
class IntExpAssembleStartViewModel : BaseViewModel() {
|
||||
|
||||
// ========== 搜索条件 ==========
|
||||
val searchWaybillNo = MutableLiveData("")
|
||||
|
||||
// ========== 左侧组装信息列表 ==========
|
||||
val assembleInfoList = MutableLiveData<MutableList<AssembleInfoBean>>()
|
||||
val assembleInfoLayoutId = R.layout.item_assemble_info
|
||||
val assembleInfoViewHolder = AssembleInfoViewHolder::class.java
|
||||
|
||||
// ========== 左侧组装位置列表 ==========
|
||||
val assemblePositionList = MutableLiveData<MutableList<AssemblePositionBean>>()
|
||||
val assemblePositionLayoutId = R.layout.item_assemble_position
|
||||
val assemblePositionViewHolder = AssemblePositionViewHolder::class.java
|
||||
|
||||
// ========== 右侧运单列表 ==========
|
||||
val waybillList = MutableLiveData<MutableList<AssembleWaybillBean>>()
|
||||
val waybillLayoutId = R.layout.item_assemble_waybill
|
||||
val waybillViewHolder = AssembleWaybillViewHolder::class.java
|
||||
|
||||
// ========== ULD信息 ==========
|
||||
val uldInfo = MutableLiveData(UldInfoBean().apply {
|
||||
uldNo = "AKE12345HK"
|
||||
planeType = "B777"
|
||||
weightLimit = "1500"
|
||||
totalPieces = "120"
|
||||
totalWeight = "2450.5"
|
||||
status = "进行中"
|
||||
})
|
||||
|
||||
// ========== 运单信息 ==========
|
||||
val waybillInfo = MutableLiveData(WaybillInfoBean().apply {
|
||||
waybillNo = "99912345678"
|
||||
pieces = "25"
|
||||
weight = "350.5"
|
||||
destination = "LAX"
|
||||
specialCode = "GEN"
|
||||
goodsName = "ELECTRONICS"
|
||||
})
|
||||
|
||||
/**
|
||||
* 初始化模拟数据
|
||||
*/
|
||||
fun initMockData() {
|
||||
// 组装信息列表(左侧)
|
||||
assembleInfoList.value = mutableListOf(
|
||||
AssembleInfoBean().apply {
|
||||
waybillNo = "99912345678"
|
||||
pieces = "25"
|
||||
},
|
||||
AssembleInfoBean().apply {
|
||||
waybillNo = "99912345679"
|
||||
pieces = "18"
|
||||
},
|
||||
AssembleInfoBean().apply {
|
||||
waybillNo = "99912345680"
|
||||
pieces = "32"
|
||||
},
|
||||
AssembleInfoBean().apply {
|
||||
waybillNo = "99912345681"
|
||||
pieces = "15"
|
||||
}
|
||||
)
|
||||
|
||||
// 组装位置列表(左侧)
|
||||
assemblePositionList.value = mutableListOf(
|
||||
AssemblePositionBean().apply {
|
||||
positionName = "A区-01号位"
|
||||
isSelected = true
|
||||
},
|
||||
AssemblePositionBean().apply {
|
||||
positionName = "A区-02号位"
|
||||
isSelected = false
|
||||
},
|
||||
AssemblePositionBean().apply {
|
||||
positionName = "B区-01号位"
|
||||
isSelected = false
|
||||
}
|
||||
)
|
||||
|
||||
// 运单列表(右侧)
|
||||
waybillList.value = mutableListOf(
|
||||
AssembleWaybillBean().apply {
|
||||
waybillNo = "99912345678"
|
||||
pieces = "25"
|
||||
weight = "350.5"
|
||||
isMarked = false
|
||||
},
|
||||
AssembleWaybillBean().apply {
|
||||
waybillNo = "99912345679"
|
||||
pieces = "18"
|
||||
weight = "280.0"
|
||||
isMarked = true // 标记为红色
|
||||
},
|
||||
AssembleWaybillBean().apply {
|
||||
waybillNo = "99912345680"
|
||||
pieces = "32"
|
||||
weight = "520.8"
|
||||
isMarked = false
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫码运单
|
||||
*/
|
||||
fun scanWaybill() {
|
||||
showToast("扫码功能(静态页面暂不实现)")
|
||||
}
|
||||
|
||||
/**
|
||||
* 卸货按钮点击
|
||||
*/
|
||||
fun onUnloadClick() {
|
||||
showToast("卸货操作(静态页面暂不实现)")
|
||||
}
|
||||
|
||||
/**
|
||||
* 装货按钮点击
|
||||
*/
|
||||
fun onLoadClick() {
|
||||
showToast("装货操作(静态页面暂不实现)")
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,11 @@
|
||||
package com.lukouguoji.gjc.viewModel
|
||||
|
||||
import android.text.InputType
|
||||
import android.widget.EditText
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.lukouguoji.gjc.R
|
||||
import com.lukouguoji.gjc.holder.IntExpAssembleViewHolder
|
||||
import com.lukouguoji.module_base.base.BasePageViewModel
|
||||
@@ -12,6 +16,8 @@ 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.ktx.verifyNullOrEmpty
|
||||
import com.lukouguoji.module_base.router.ARouterConstants
|
||||
import dev.utils.app.info.KeyValue
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@@ -129,4 +135,119 @@ class IntExpAssembleViewModel : BasePageViewModel() {
|
||||
toggleExpand(position)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 加号按钮点击 - 跳转到开始组装页面
|
||||
*/
|
||||
fun onAddClick() {
|
||||
ARouter.getInstance()
|
||||
.build(ARouterConstants.ACTIVITY_URL_INT_EXP_ASSEMBLE_START)
|
||||
.navigation()
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除按钮点击
|
||||
*/
|
||||
fun onDeleteClick() {
|
||||
// 获取选中的数据
|
||||
val adapter = pageModel.rv?.commonAdapter() ?: return
|
||||
val allItems = adapter.items
|
||||
val selectedItems = allItems
|
||||
.filterIsInstance<GjcUldUseBean>()
|
||||
.filter { it.isSelected }
|
||||
|
||||
if (selectedItems.isEmpty()) {
|
||||
showToast("请选择要删除的记录")
|
||||
return
|
||||
}
|
||||
|
||||
// 显示确认对话框
|
||||
val activity = getTopActivity()
|
||||
AlertDialog.Builder(activity)
|
||||
.setTitle("删除确认")
|
||||
.setMessage("确定要删除选中的 ${selectedItems.size} 条记录吗?")
|
||||
.setPositiveButton("删除") { _, _ ->
|
||||
deleteSelectedItems(selectedItems)
|
||||
}
|
||||
.setNegativeButton("取消", null)
|
||||
.show()
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除选中项
|
||||
*/
|
||||
private fun deleteSelectedItems(items: List<GjcUldUseBean>) {
|
||||
val ids = items.mapNotNull { it.useId }.joinToString(",")
|
||||
|
||||
launchLoadingCollect({ NetApply.api.deleteIntExpAssemble(ids) }) {
|
||||
onSuccess = {
|
||||
showToast("删除成功")
|
||||
refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 回填重量按钮点击
|
||||
*/
|
||||
fun onBackfillWeightClick() {
|
||||
// 获取选中的数据
|
||||
val adapter = pageModel.rv?.commonAdapter() ?: return
|
||||
val allItems = adapter.items
|
||||
val selectedItems = allItems
|
||||
.filterIsInstance<GjcUldUseBean>()
|
||||
.filter { it.isSelected }
|
||||
|
||||
if (selectedItems.isEmpty()) {
|
||||
showToast("请选择要回填重量的记录")
|
||||
return
|
||||
}
|
||||
|
||||
// 显示输入对话框
|
||||
showBackfillWeightDialog(selectedItems)
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示回填重量对话框
|
||||
*/
|
||||
private fun showBackfillWeightDialog(items: List<GjcUldUseBean>) {
|
||||
val activity = getTopActivity()
|
||||
|
||||
// 创建输入框
|
||||
val input = EditText(activity).apply {
|
||||
hint = "请输入重量(KG)"
|
||||
inputType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL
|
||||
setPadding(40, 40, 40, 40)
|
||||
}
|
||||
|
||||
AlertDialog.Builder(activity)
|
||||
.setTitle("回填重量")
|
||||
.setMessage("共选中 ${items.size} 条记录")
|
||||
.setView(input)
|
||||
.setPositiveButton("确定") { _, _ ->
|
||||
val weight = input.text.toString()
|
||||
if (weight.verifyNullOrEmpty("请输入重量")) return@setPositiveButton
|
||||
backfillWeight(items, weight)
|
||||
}
|
||||
.setNegativeButton("取消", null)
|
||||
.show()
|
||||
}
|
||||
|
||||
/**
|
||||
* 回填重量API调用
|
||||
*/
|
||||
private fun backfillWeight(items: List<GjcUldUseBean>, weight: String) {
|
||||
val ids = items.mapNotNull { it.useId }.joinToString(",")
|
||||
val params = mapOf(
|
||||
"ids" to ids,
|
||||
"weight" to weight
|
||||
).toRequestBody()
|
||||
|
||||
launchLoadingCollect({ NetApply.api.backfillIntExpAssembleWeight(params) }) {
|
||||
onSuccess = {
|
||||
showToast("回填重量成功")
|
||||
refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
5
module_gjc/src/main/res/drawable/bg_white.xml
Normal file
5
module_gjc/src/main/res/drawable/bg_white.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white"/>
|
||||
<corners android:radius="4dp"/>
|
||||
</shape>
|
||||
@@ -82,13 +82,28 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center">
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
style="@style/iv_search_action"
|
||||
android:onClick="@{()-> viewModel.searchClick()}"
|
||||
android:src="@drawable/img_search" />
|
||||
|
||||
<!-- 加号按钮 -->
|
||||
<ImageView
|
||||
style="@style/iv_search_action"
|
||||
android:onClick="@{()-> viewModel.onAddClick()}"
|
||||
android:src="@drawable/img_add"
|
||||
android:layout_marginLeft="10dp" />
|
||||
|
||||
<!-- 删除按钮 -->
|
||||
<ImageView
|
||||
style="@style/iv_search_action"
|
||||
android:onClick="@{()-> viewModel.onDeleteClick()}"
|
||||
android:src="@drawable/img_delete"
|
||||
android:layout_marginLeft="10dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -170,10 +185,12 @@
|
||||
android:text="删除"
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- 回填重量按钮 -->
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:onClick="@{()-> viewModel.onBackfillWeightClick()}"
|
||||
android:text="回填重量"
|
||||
android:visibility="gone" />
|
||||
android:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
@@ -0,0 +1,395 @@
|
||||
<?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" />
|
||||
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
|
||||
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
|
||||
<variable
|
||||
name="viewModel"
|
||||
type="com.lukouguoji.gjc.viewModel.IntExpAssembleStartViewModel" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/list_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<include layout="@layout/title_tool_bar" />
|
||||
|
||||
<!-- 主体区域:左右分栏 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- ========== 左侧区域(30%)========== -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.3"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 组装信息列表 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="组装信息"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:dividerColor="@color/line" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_assemble_info"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 组装位置选择 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="组装位置"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:dividerColor="@color/line" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_assemble_position"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- ========== 右侧区域(70%)========== -->
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.7"
|
||||
android:layout_marginStart="8dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 搜索框 -->
|
||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
hint='@{"请输入运单号"}'
|
||||
icon="@{@drawable/scan_code}"
|
||||
setOnIconClickListener="@{(v) -> viewModel.scanWaybill()}"
|
||||
type="@{SearchLayoutType.INPUT}"
|
||||
value="@={viewModel.searchWaybillNo}" />
|
||||
|
||||
<!-- 运单列表 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="0.4"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单列表"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:dividerColor="@color/line" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_waybill_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- ULD信息卡片 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="ULD信息"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:dividerColor="@color/line" />
|
||||
|
||||
<!-- ULD信息字段 - 使用PadDataLayoutNew横向排列 -->
|
||||
<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}"
|
||||
required="@{false}"
|
||||
title='@{"ULD编号:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value="@={viewModel.uldInfo.uldNo}" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
required="@{false}"
|
||||
title='@{"机型:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value="@={viewModel.uldInfo.planeType}" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
required="@{false}"
|
||||
title='@{"限重:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value="@={viewModel.uldInfo.weightLimit}" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
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}"
|
||||
required="@{false}"
|
||||
title='@{"总件数:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value="@={viewModel.uldInfo.totalPieces}" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
required="@{false}"
|
||||
title='@{"总重量:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value="@={viewModel.uldInfo.totalWeight}" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
required="@{false}"
|
||||
title='@{"状态:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value="@={viewModel.uldInfo.status}" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 运单信息卡片 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_white_radius_8"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="运单信息"
|
||||
android:textColor="@color/text_normal"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
app:dividerColor="@color/line" />
|
||||
|
||||
<!-- 运单信息字段 -->
|
||||
<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}"
|
||||
required="@{false}"
|
||||
title='@{"运单号:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value="@={viewModel.waybillInfo.waybillNo}" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
required="@{false}"
|
||||
title='@{"件数:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value="@={viewModel.waybillInfo.pieces}" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
required="@{false}"
|
||||
title='@{"重量:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value="@={viewModel.waybillInfo.weight}" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
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}"
|
||||
required="@{false}"
|
||||
title='@{"目的港:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value="@={viewModel.waybillInfo.destination}" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
required="@{false}"
|
||||
title='@{"特码:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value="@={viewModel.waybillInfo.specialCode}" />
|
||||
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
enable="@{false}"
|
||||
required="@{false}"
|
||||
title='@{"品名:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value="@={viewModel.waybillInfo.goodsName}" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 底部操作按钮 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp"
|
||||
android:background="@color/white"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_blue_radius_4"
|
||||
android:onClick="@{() -> viewModel.onUnloadClick()}"
|
||||
android:text="卸货"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<TextView
|
||||
style="@style/tv_bottom_btn"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/bg_red_radius_4"
|
||||
android:onClick="@{() -> viewModel.onLoadClick()}"
|
||||
android:text="装货"
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
59
module_gjc/src/main/res/layout/item_assemble_info.xml
Normal file
59
module_gjc/src/main/res/layout/item_assemble_info.xml
Normal file
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View" />
|
||||
<import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />
|
||||
<variable
|
||||
name="bean"
|
||||
type="com.lukouguoji.module_base.bean.AssembleInfoBean" />
|
||||
<variable
|
||||
name="position"
|
||||
type="Integer" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingVertical="8dp">
|
||||
|
||||
<!-- 编号圆圈 -->
|
||||
<TextView
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@drawable/bg_circle_yellow"
|
||||
android:gravity="center"
|
||||
android:text="@{String.valueOf(position + 1)}"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- 运单号 -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginEnd="8dp"
|
||||
enable="@{false}"
|
||||
required="@{false}"
|
||||
title='@{"运单号:"}'
|
||||
titleLength="@{5}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value="@={bean.waybillNo}" />
|
||||
|
||||
<!-- 件数 -->
|
||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.6"
|
||||
enable="@{false}"
|
||||
required="@{false}"
|
||||
title='@{"件数:"}'
|
||||
titleLength="@{3}"
|
||||
type="@{DataLayoutType.INPUT}"
|
||||
value="@={bean.pieces}" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
39
module_gjc/src/main/res/layout/item_assemble_position.xml
Normal file
39
module_gjc/src/main/res/layout/item_assemble_position.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?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.AssemblePositionBean" />
|
||||
<variable
|
||||
name="position"
|
||||
type="Integer" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingVertical="12dp"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:background="@{bean.isSelected ? @drawable/bg_green_light : @drawable/bg_white}">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@{bean.positionName}"
|
||||
android:textColor="@{bean.isSelected ? @color/colorPrimary : @color/text_normal}"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="normal" />
|
||||
|
||||
<!-- 选中图标 -->
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_check_green"
|
||||
android:visibility="@{bean.isSelected ? View.VISIBLE : View.GONE}" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
59
module_gjc/src/main/res/layout/item_assemble_waybill.xml
Normal file
59
module_gjc/src/main/res/layout/item_assemble_waybill.xml
Normal file
@@ -0,0 +1,59 @@
|
||||
<?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.AssembleWaybillBean" />
|
||||
<variable
|
||||
name="position"
|
||||
type="Integer" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingVertical="12dp"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:background="@color/white">
|
||||
|
||||
<!-- 序号 -->
|
||||
<TextView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{String.valueOf(position + 1)}"
|
||||
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
|
||||
android:textSize="14sp"
|
||||
android:gravity="center" />
|
||||
|
||||
<!-- 运单号 -->
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@{bean.waybillNo}"
|
||||
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<!-- 件数 -->
|
||||
<TextView
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.pieces}"
|
||||
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
|
||||
android:textSize="14sp"
|
||||
android:gravity="center" />
|
||||
|
||||
<!-- 重量 -->
|
||||
<TextView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{bean.weight}"
|
||||
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
|
||||
android:textSize="14sp"
|
||||
android:gravity="end" />
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -30,6 +30,15 @@
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<!-- 选择框 -->
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:checked="@{bean.isSelected}"
|
||||
android:clickable="false"
|
||||
android:focusable="false" />
|
||||
|
||||
<!-- 飞机图标 -->
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
|
||||
Reference in New Issue
Block a user