Compare commits

...

11 Commits

Author SHA1 Message Date
6c4e97945b feat: fix form 2026-03-20 15:30:12 +08:00
a663609eeb feat: input required check 2026-03-20 15:18:56 +08:00
74e9f5a827 feat: reset status dialog 2026-03-20 15:09:27 +08:00
d6f72186a3 feat: opt views 2026-03-20 12:46:52 +08:00
b2ea79512c feat: fix issues 2026-03-19 18:31:40 +08:00
8b666364ae feat: opt form 2026-03-18 22:36:05 +08:00
aac2c860c6 feat: opt ui 2026-03-18 20:54:13 +08:00
c2b5e74156 feat: opt uld mgr 2026-03-18 16:18:57 +08:00
093314d601 feat: ii visa add/edit 2026-03-17 11:38:15 +08:00
9b089d51b1 feat: 国际事故签证新增/编辑页面及列表侧滑菜单
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 11:37:26 +08:00
8ced5be7a9 feat: fix issues 2026-03-16 18:29:02 +08:00
52 changed files with 1581 additions and 469 deletions

View File

@@ -83,7 +83,24 @@
"mcp__apifox__read_project_oas_2s2uhx",
"mcp__apifox__read_project_oas_ref_resources_2s2uhx",
"mcp__apifox__refresh_project_oas_2s2uhx",
"Bash(find /Users/kid/Development/Fusion/Projects/aerologic-app -path \"*/build\" -prune -o -type f \\\\\\( -name \"*manifest*\" -o -name \"*bean*\" \\\\\\) | grep -i \"gjj\\\\|tally\" | grep -E \"\\\\.\\(kt\\)$\" | sort)"
"Bash(find /Users/kid/Development/Fusion/Projects/aerologic-app -path \"*/build\" -prune -o -type f \\\\\\( -name \"*manifest*\" -o -name \"*bean*\" \\\\\\) | grep -i \"gjj\\\\|tally\" | grep -E \"\\\\.\\(kt\\)$\" | sort)",
"mcp__apifox__read_project_oas_9otrai",
"mcp__apifox__read_project_oas_ref_resources_9otrai",
"Bash(cd:*)",
"mcp__apifox__read_project_oas_tua249",
"mcp__apifox__read_project_oas_ref_resources_tua249",
"mcp__apifox__read_project_oas_heib77",
"mcp__apifox__read_project_oas_ref_resources_heib77",
"Bash(export JAVA_HOME=\"/Applications/Android Studio.app/Contents/jbr/Contents/Home\")",
"Bash(export PATH=\"$JAVA_HOME/bin:$PATH\")",
"Read(//Library/Java/JavaVirtualMachines/**)",
"Read(//usr/local/**)",
"Read(//opt/homebrew/opt/**)",
"Bash(/Users/kid/.vfox/sdks/java/bin/java -version 2>&1)",
"Bash(export JAVA_HOME=/Users/kid/.vfox/sdks/java)",
"mcp__apifox__read_project_oas_kcl8s7",
"mcp__apifox__refresh_project_oas_kcl8s7",
"mcp__apifox__read_project_oas_ref_resources_kcl8s7"
],
"deny": [],
"ask": []

View File

@@ -1,2 +1,2 @@
[tools]
java = "17.0.17+10-amzn"
java = "17+35-amzn"

View File

@@ -1 +1 @@
/Users/kid/.version-fox/cache/java/v-17.0.17+10-amzn/java-17.0.17+10-amzn
/Users/kid/.vfox/cache/java/v-17+35-amzn/java-17+35-amzn

View File

@@ -124,11 +124,12 @@ class XxxViewModel : BasePageViewModel() {
<LinearLayout orientation="vertical">
<include layout="@layout/title_tool_bar" />
<!-- 搜索区PadSearchLayout 横排 -->
<!-- 搜索区PadSearchLayout 横排 + 操作按钮(如有) -->
<LinearLayout orientation="horizontal">
<PadSearchLayout type="@{SearchLayoutType.DATE}" value="@={viewModel.flightDate}" />
<PadSearchLayout type="@{SearchLayoutType.INPUT}" value="@={viewModel.flightNo}" />
<ImageView style="@style/iv_search_action" android:onClick="@{()-> viewModel.searchClick()}" />
<!-- 如需新增/删除按钮,尺寸规范见「开发原则」工具栏图标尺寸规范 -->
</LinearLayout>
<!-- 分页列表 -->
@@ -842,6 +843,7 @@ companion object {
- 标题栏统一用 `title_tool_bar` — 禁止手动编写 Toolbar
- 优先使用 PadDataLayoutNew 和 PadSearchLayout 组件
- 在每个页面布局时,如有截图,务必尽可能还原图片上的页面设计,而不是推测假想。如有困难一律要询问,禁止自己想象
- 工具栏图标尺寸规范: `img_search` 36dp + padding 2dp`img_add` 40dp 无 padding使用 `drawable/img_add.xml` 矢量图,`drawable-xhdpi/img_add.png` 已废弃删除)
- 常用资源: `bg_white_radius_8``colorPrimary``text_normal``text_gray``color_bottom_layout`
### 环境配置

View File

@@ -529,6 +529,12 @@
android:exported="false"
android:screenOrientation="userLandscape" />
<activity
android:name="com.lukouguoji.gjj.activity.IntImpAccidentVisaEditActivity"
android:configChanges="orientation|keyboardHidden"
android:exported="false"
android:screenOrientation="userLandscape" />
<service android:name="com.huitao.printer.service.PrinterService" />
<service android:name="com.lukouguoji.gnc.bluetooth.service.AncillaryService" />
<service android:name="com.lukouguoji.gnc.bluetooth.service.MyService" />

View File

@@ -32,7 +32,7 @@
value="@={viewModel.status}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_weight="0.33" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"选择所属航司"}'
@@ -41,7 +41,7 @@
value="@={viewModel.uldSuffix}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_weight="0.33" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入ULD编号"}'
@@ -51,7 +51,7 @@
value="@={viewModel.uldNo}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_weight="0.33" />
<LinearLayout
android:layout_width="0dp"
@@ -69,11 +69,10 @@
android:src="@drawable/img_search" />
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginLeft="16dp"
android:onClick="@{()-> viewModel.onAddClick()}"
android:padding="4dp"
android:src="@drawable/img_add" />
</LinearLayout>

View File

@@ -6,7 +6,17 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 \
--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
kapt.use.worker.api=false
kapt.include.compile.classpath=false
# When configured, Gradle will run in incubating parallel mode.

View File

@@ -0,0 +1,26 @@
package com.lukouguoji.module_base.bean
class GjAccidentVisaEditBean {
var id: Long = 0
var fdate: String = "" // 航班日期
var fno: String = "" // 航班号
var dep: String = "" // 始发站
var dest: String = "" // 目的站
var wbNo: String = "" // 运单号
var dpc: String = "" // 不正常件数
var pc: String = "" // 运单总件数
var weight: String = "" // 运单总重量
var reweight: String = "" // 复称重量
var goods: String = "" // 品名
var opacking: String = "" // 外包装
var damage: String = "" // 包装破损情况
var condition: String = "" // 内容物情况
var problem: String = "" // 不正常类型
var seachDate: String = "" // 发现时间
var photo: String = "" // 图片是否留底
var remarks: String = "" // 备注
var pic: String = "" // 缩略图
var originalPic: String = "" // 原图
var picNumber: String = "" // 图片数量
var idFlag: String = "1" // 国际标志固定为1=国际)
}

View File

@@ -47,10 +47,14 @@ data class GjjImportManifest(
var dgrContactMame: String = "",
// 危险品收货人通讯方式
var dgrContactNumber: String = "",
// 航班日期
var fdate: String = "",
// 航班起始站
var fdep: String = "",
// 航班目的站
var fdest: String = "",
// 航班号
var fno: String = "",
// 航班id
var fid: Long = 0,
// 运费支付方式
@@ -114,6 +118,15 @@ data class GjjImportManifest(
// 重量
var weight: Double = 0.0
) : Serializable {
// 获取航班信息(日期去横杠/航班号)
fun getFlightSplit(): String {
if (fdate != "" && fno != "") {
val (year, mon, day) = fdate.split("-")
return "${year}${mon}${day}/${fno}"
}
return ""
}
// ========== UI扩展字段 ==========
// 选中状态
@Transient

View File

@@ -79,12 +79,20 @@ data class GjjImportTally(
var goodsCn: String = "",
// 品名(英文)
var goodsEn: String = "",
// 放行模式
// 放行模式(代码)
var relMode: String = "",
// 放行模式(名称)
var releaseMode: String = "",
// 放行时间(perDate)
var perDate: String = "",
// 放行时间
var releaseTime: String = "",
// 指令类型(comType)
var comType: String = "",
// 指令类型
var instructionType: String = "",
// 放行备注
var relRemark: String = "",
// 备注
var remark: String = ""
) : Serializable {
@@ -107,5 +115,14 @@ data class GjjImportTally(
// 获取完整运单号
fun getWaybillNo() = "$prefix$no"
// 获取航班信息(日期去横杠/航班号)
fun getFlightSplit(): String {
if (fdate != "" && fno != "") {
val (year, mon, day) = fdate.split("-")
return "${year}${mon}${day}/${fno}"
}
return ""
}
}

View File

@@ -38,6 +38,8 @@ class IntImpPickUpDLVBean : Serializable {
var efrCharge: Double = 0.0 // 冷藏费
var svlCharge: Double = 0.0 // 铲车费
var tallyCharge: Double = 0.0 // 理货费
var pipFee: Double = 0.0 // 精密仪器处理费
var lapFee: Double = 0.0 // 活体动物处理费
var chargeId: String = "" // 收费员
var chargeName: String = "" // 收费员名称
var dlvId: String = ""

View File

@@ -29,6 +29,8 @@ class IntImpPickUpRecordBean : Serializable {
var efrCharge: Double = 0.0 // 冷藏费
var svlCharge: Double = 0.0 // 铲车费
var tallyCharge: Double = 0.0 // 理货费
var pipFee: Double = 0.0 // 精密仪器处理费
var lapFee: Double = 0.0 // 活体动物处理费
var chargeName: String = "" // 办理人名称
var chargeId: String = "" // 收费员ID
var dlvTime: String = "" // 出库时间

View File

@@ -51,6 +51,7 @@ import com.lukouguoji.module_base.bean.GjjGoodsDetailsBean
import com.lukouguoji.module_base.bean.GjjGoodsTypeBean
import com.lukouguoji.module_base.bean.GjjHandoverRecordBean
import com.lukouguoji.module_base.bean.GjjImportTally
import com.lukouguoji.module_base.bean.GjAccidentVisaEditBean
import com.lukouguoji.module_base.bean.IntImpAccidentVisaBean
import com.lukouguoji.module_base.bean.IntImpPickUpDLVBean
import com.lukouguoji.module_base.bean.IntImpPickUpRecordBean
@@ -301,6 +302,12 @@ interface Api {
@POST("typeCode/countryType")
suspend fun getAreaTypeList(): DictListBean
/**
* 获取国家代码
*/
@POST("typeCode/countryCode")
suspend fun getCountryCodeList(): DictListBean
/**
* 获取通讯方式类型
*/
@@ -1962,6 +1969,42 @@ interface Api {
@POST("GjAccidentVisa/delete")
suspend fun deleteIntImpAccidentVisa(@Body data: RequestBody): BaseResultBean<String>
/**
* 国际事故签证-新增
*/
@POST("GjAccidentVisa/saveVisa")
suspend fun saveGjAccidentVisa(@Body data: RequestBody): BaseResultBean<String>
/**
* 国际事故签证-修改
*/
@POST("GjAccidentVisa/modifyVisa")
suspend fun modifyGjAccidentVisa(@Body data: RequestBody): BaseResultBean<String>
/**
* 国际事故签证-详情
*/
@POST("GjAccidentVisa/detail")
suspend fun getGjAccidentVisaDetail(@Query("id") id: Long): BaseResultBean<GjAccidentVisaEditBean>
/**
* 字典-破损情况
*/
@POST("typeCode/damageType")
suspend fun getDamageTypeList(): DictListBean
/**
* 字典-内容物情况
*/
@POST("typeCode/contentType")
suspend fun getContentTypeList(): DictListBean
/**
* 字典-不正常类型
*/
@POST("typeCode/unusualType")
suspend fun getUnusualTypeList(): DictListBean
///////////////////////////////////////////////////////////////////////////
// ULD管理
///////////////////////////////////////////////////////////////////////////

View File

@@ -102,6 +102,24 @@ object DictUtils {
}
}
/**
* 获取国际进港代理列表
*/
fun getIntImpAgentList(
addAll: Boolean = true,
checkedValue: String? = null,
callBack: (List<KeyValue>) -> Unit
) {
launchCollect({
NetApply.api
.getIntImpAgentList()
}) {
onSuccess = {
handleCallBack(it, checkedValue, addAll, callBack)
}
}
}
/**
* 获取仓管列表
*/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 775 B

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:width="200dp"
android:height="200dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path

View File

@@ -100,11 +100,10 @@
<!-- 添加按钮 -->
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginLeft="16dp"
android:onClick="@{()-> viewModel.addClick()}"
android:padding="4dp"
android:src="@drawable/img_add" />
</LinearLayout>

View File

@@ -104,11 +104,10 @@
<!-- 添加按钮 -->
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginLeft="16dp"
android:onClick="@{()-> viewModel.addClick()}"
android:padding="4dp"
android:src="@drawable/img_add" />
</LinearLayout>

View File

@@ -97,11 +97,10 @@
<!--<><E696B0><EFBFBD>按钮 -->
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginLeft="16dp"
android:onClick="@{()-> viewModel.onAddClick()}"
android:padding="4dp"
android:src="@drawable/img_add" />
<!-- 删除按钮 -->

View File

@@ -8,10 +8,14 @@ import com.lukouguoji.gjj.R
import com.lukouguoji.gjj.databinding.ActivityIntImpAccidentVisaBinding
import com.lukouguoji.gjj.viewModel.IntImpAccidentVisaViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.bean.IntImpAccidentVisaBean
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.impl.observe
import com.lukouguoji.module_base.interfaces.IOnItemClickListener
import com.lukouguoji.module_base.ktx.addOnItemClickListener
import com.lukouguoji.module_base.ktx.commonAdapter
import com.lukouguoji.module_base.router.ARouterConstants
/**
@@ -19,7 +23,8 @@ import com.lukouguoji.module_base.router.ARouterConstants
*/
@Route(path = ARouterConstants.ACTIVITY_URL_INT_IMP_ACCIDENT_VISA)
class IntImpAccidentVisaActivity :
BaseBindingActivity<ActivityIntImpAccidentVisaBinding, IntImpAccidentVisaViewModel>() {
BaseBindingActivity<ActivityIntImpAccidentVisaBinding, IntImpAccidentVisaViewModel>(),
IOnItemClickListener {
override fun layoutId() = R.layout.activity_int_imp_accident_visa
override fun viewModelClass() = IntImpAccidentVisaViewModel::class.java
@@ -34,6 +39,8 @@ class IntImpAccidentVisaActivity :
viewModel.pageModel.bindSmartRefreshLayout(binding.srl, binding.rv, viewModel, this)
binding.rv.addOnItemClickListener(this)
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).observe(this) {
viewModel.refresh()
}
@@ -48,4 +55,15 @@ class IntImpAccidentVisaActivity :
viewModel.searchClick()
}
}
override fun onItemClick(position: Int, type: Int) {
when (type) {
2000 -> {
// 侧滑菜单 - 修改
val bean = binding.rv.commonAdapter()?.getItem(position) as? IntImpAccidentVisaBean
?: return
IntImpAccidentVisaEditActivity.start(this, bean.id)
}
}
}
}

View File

@@ -0,0 +1,45 @@
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.ActivityIntImpAccidentVisaEditBinding
import com.lukouguoji.gjj.viewModel.IntImpAccidentVisaEditViewModel
import com.lukouguoji.module_base.base.BaseBindingActivity
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.DetailsPageType
import com.lukouguoji.module_base.ktx.addOnItemClickListener
/**
* 国际进港-事故签证新增/编辑
*/
class IntImpAccidentVisaEditActivity :
BaseBindingActivity<ActivityIntImpAccidentVisaEditBinding, IntImpAccidentVisaEditViewModel>() {
override fun layoutId() = R.layout.activity_int_imp_accident_visa_edit
override fun viewModelClass() = IntImpAccidentVisaEditViewModel::class.java
override fun initOnCreate(savedInstanceState: Bundle?) {
binding.viewModel = viewModel
viewModel.rv = binding.rv
binding.rv.addOnItemClickListener(viewModel)
viewModel.initOnCreate(intent)
viewModel.pageType.observe(this) {
val title = if (it == DetailsPageType.Add) "国际事故签证新增" else "国际事故签证修改"
setBackArrow(title)
}
}
companion object {
@JvmStatic
fun start(context: Context, id: Long = 0) {
context.startActivity(
Intent(context, IntImpAccidentVisaEditActivity::class.java)
.putExtra(Constant.Key.ID, id)
)
}
}
}

View File

@@ -42,6 +42,7 @@ class IntImpQueryActivity :
}
viewModel.initAgentList()
viewModel.initSpecialCodeList()
viewModel.refresh()
}

View File

@@ -20,6 +20,7 @@ import dev.utils.app.info.KeyValue
*/
class IntImpQueryFilterDialogModel(
val spCode: MutableLiveData<String>,
val spCodeList: MutableLiveData<List<KeyValue>>,
val flightNo: MutableLiveData<String>,
val dest: MutableLiveData<String>,
val awbType: MutableLiveData<String>,

View File

@@ -21,5 +21,11 @@ class IntImpAccidentVisaViewHolder(view: View) :
bean.checked.set(!bean.checked.get())
binding.executePendingBindings()
}
// 侧滑菜单 - 修改按钮
binding.btnEdit.setOnClickListener {
binding.swipeMenu.quickClose()
clickListener?.onItemClick(position, 2000) // type=2000表示修改操作
}
}
}

View File

@@ -2,6 +2,7 @@ package com.lukouguoji.gjj.viewModel
import android.content.Intent
import android.view.View
import androidx.lifecycle.MediatorLiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.lukouguoji.module_base.base.BaseViewModel
@@ -38,9 +39,6 @@ class GjjManifestAddViewModel : BaseViewModel() {
// 航班号
val flightNo = MutableLiveData("")
// 航程
val range = MutableLiveData("")
// 运单号
val waybillNo = MutableLiveData("")
@@ -80,12 +78,10 @@ class GjjManifestAddViewModel : BaseViewModel() {
fid = flight.fid.noNull()
departure.value = flight.fdep.noNull()
destination.value = flight.fdest.noNull()
range.value = flight.range.noNull()
} else {
fid = ""
departure.value = ""
destination.value = ""
range.value = ""
showToast(it.msg.noNull("获取航班信息失败"))
}
}
@@ -93,7 +89,6 @@ class GjjManifestAddViewModel : BaseViewModel() {
fid = ""
departure.value = ""
destination.value = ""
range.value = ""
}
}
}
@@ -119,6 +114,17 @@ class GjjManifestAddViewModel : BaseViewModel() {
// 目的港
val destination = MutableLiveData("")
// 航程(自动拼接:始发站-目的站)
val range = MediatorLiveData<String>().apply {
val update = {
val dep = departure.value ?: ""
val dest = destination.value ?: ""
value = if (dep.isNotEmpty() || dest.isNotEmpty()) "$dep-$dest" else ""
}
addSource(departure) { update() }
addSource(destination) { update() }
}
// 品名(中)
val goodsNameCn = MutableLiveData("")
@@ -154,10 +160,10 @@ class GjjManifestAddViewModel : BaseViewModel() {
val waybillType = MutableLiveData("")
init {
DictUtils.getAgentList(addAll = false) {
DictUtils.getIntImpAgentList(addAll = false) {
agentList.postValue(listOf(KeyValue("", "")) + it)
}
DictUtils.getSpecialCodeList(addAll = false, flag = 1, ieFlag = "I") {
DictUtils.getSpecialCodeList(addAll = false, flag = 1, ieFlag = "") {
val list = arrayListOf<KeyValue>()
it.find { b -> b.key.contains("普通货物") }?.let { b ->
list.add(b)
@@ -168,7 +174,7 @@ class GjjManifestAddViewModel : BaseViewModel() {
DictUtils.getBusinessTypeList(addAll = false) {
businessTypeList.postValue(it)
}
DictUtils.getGjjPackageTypeList(addAll = false) {
DictUtils.getShouYunPackageTypeList {
packageTypeList.postValue(listOf(KeyValue("", "")) + it)
}
DictUtils.getGjjGoodsTypeList(addAll = false) {

View File

@@ -110,7 +110,7 @@ class GjjManifestDetailsViewModel : BaseViewModel(), IGetData {
DictUtils.getAgentList(addAll = false, checkedValue = data.agent) {
agentList.postValue(it)
}
DictUtils.getSpecialCodeList(addAll = false, flag = 1, ieFlag = "I", checkedValue = data.spCode) {
DictUtils.getSpecialCodeList(addAll = false, flag = 1, ieFlag = "", checkedValue = data.spCode) {
specialCodeList.postValue(it)
}
DictUtils.getBusinessTypeList(

View File

@@ -12,6 +12,7 @@ import com.lukouguoji.module_base.bean.GjjDeclareParam
import com.lukouguoji.module_base.bean.GjjImportManifest
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.gjj.dialog.IntImpTallyResetDialogModel
import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.ktx.commonAdapter
@@ -134,11 +135,11 @@ class IntArrAirManifestViewModel : BasePageViewModel() {
fun resetStatusClick() {
val (maWbList, haWbList) = getSelectedItems("请选择要重置的舱单") ?: return
val dialog = IntImpTallyResetDialogModel { dialogModel ->
val param = GjjDeclareParam(
maWbList = maWbList,
haWbList = haWbList,
restStatus = null,
resetReason = "状态重置"
restStatus = dialogModel.resetStatusCode
)
launchLoadingCollect({ NetApply.api.resetIntArrManifestStatus(param.toRequestBody()) }) {
@@ -152,6 +153,9 @@ class IntArrAirManifestViewModel : BasePageViewModel() {
}
}
dialog.show()
}
/**
* 补充信息按钮点击(只针对主单)
*/
@@ -250,6 +254,19 @@ class IntArrAirManifestViewModel : BasePageViewModel() {
launchLoadingCollect({ NetApply.api.getIntArrAirManifestList(listParams) }) {
onSuccess = { result ->
isAllExpanded.value = false
// 如果接口未返回航班日期/航班号,用筛选条件填充
val fd = flightDate.value ?: ""
val fn = flightNo.value ?: ""
result.list?.forEach { airManifest ->
airManifest.maWb?.let {
if (it.fdate.isEmpty()) it.fdate = fd
if (it.fno.isEmpty()) it.fno = fn
}
airManifest.haWbList?.forEach {
if (it.fdate.isEmpty()) it.fdate = fd
if (it.fno.isEmpty()) it.fno = fn
}
}
pageModel.handleListBean(result.toBaseListBean())
}
}

View File

@@ -13,6 +13,7 @@ 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 dev.utils.app.info.KeyValue
import kotlinx.coroutines.launch
@@ -56,7 +57,7 @@ class IntArrSupplementInfoViewModel : BaseViewModel() {
* 加载国家代码下拉列表
*/
private fun loadCountryCodeList() {
launchCollect({ NetApply.api.getAreaTypeList() }) {
launchCollect({ NetApply.api.getCountryCodeList() }) {
onSuccess = { result ->
val keyValueList = result.data?.mapNotNull { bean ->
if (bean.code != null && bean.name != null) {
@@ -96,6 +97,17 @@ class IntArrSupplementInfoViewModel : BaseViewModel() {
fun save() {
val formBean = dataBean.value ?: return
// 收货人必填校验
if (formBean.consigneeName.verifyNullOrEmpty("收货人名称不能为空")) return
if (formBean.consigneeCountryCode.verifyNullOrEmpty("收货人国家代码不能为空")) return
if (formBean.consigneeComType.verifyNullOrEmpty("收货人通讯方式不能为空")) return
if (formBean.consigneePNum.verifyNullOrEmpty("收货人联系号码不能为空")) return
// 发货人必填校验
if (formBean.consignorName.verifyNullOrEmpty("发货人名称不能为空")) return
if (formBean.consignorCountryCode.verifyNullOrEmpty("发货人国家代码不能为空")) return
if (formBean.consignorComType.verifyNullOrEmpty("发货人通讯方式不能为空")) return
if (formBean.consignorPNum.verifyNullOrEmpty("发货人联系号码不能为空")) return
if (manifestList.isEmpty()) {
showToast("无可保存的数据")
return

View File

@@ -0,0 +1,271 @@
package com.lukouguoji.gjj.viewModel
import android.content.Intent
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import androidx.recyclerview.widget.RecyclerView
import com.lukouguoji.gjj.R
import com.lukouguoji.module_base.base.BaseViewModel
import com.lukouguoji.module_base.bean.FileBean
import com.lukouguoji.module_base.bean.GjAccidentVisaEditBean
import com.lukouguoji.module_base.common.Constant
import com.lukouguoji.module_base.common.ConstantEvent
import com.lukouguoji.module_base.common.DetailsPageType
import com.lukouguoji.module_base.http.net.NetApply
import com.lukouguoji.module_base.impl.FlowBus
import com.lukouguoji.module_base.impl.ImageSelectViewHolder
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.noNull
import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.ktx.toRequestBody
import com.lukouguoji.module_base.ktx.verifyNullOrEmpty
import com.lukouguoji.module_base.util.MediaUtil
import com.lukouguoji.module_base.util.UploadUtil
import dev.utils.app.info.KeyValue
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.asFlow
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.onCompletion
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.flow.onStart
import kotlinx.coroutines.launch
class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
var id: Long = 0
val pageType = MutableLiveData(DetailsPageType.Add)
val dataBean = MutableLiveData(GjAccidentVisaEditBean())
// 图片列表
val itemLayoutId = R.layout.item_image_select
val itemViewHolder = ImageSelectViewHolder::class.java
var rv: RecyclerView? = null
// 下拉列表
val outerPackageList = MutableLiveData<List<KeyValue>>(emptyList())
val damageTypeList = MutableLiveData<List<KeyValue>>(emptyList())
val contentTypeList = MutableLiveData<List<KeyValue>>(emptyList())
val unusualTypeList = MutableLiveData<List<KeyValue>>(emptyList())
val photoList = MutableLiveData(
listOf(KeyValue("", ""), KeyValue("", ""))
)
// 航班级联查询
private var lastQueriedFlight = ""
///////////////////////////////////////////////////////////////////////////
// 初始化
///////////////////////////////////////////////////////////////////////////
fun initOnCreate(intent: Intent) {
id = intent.getLongExtra(Constant.Key.ID, 0)
pageType.value = if (id == 0L) DetailsPageType.Add else DetailsPageType.Modify
loadDropdownLists()
if (id != 0L) {
loadDetail()
}
rv?.post {
rv?.commonAdapter()?.addItem(FileBean())
}
}
private fun loadDropdownLists() {
launchCollect({ NetApply.api.getPackTypeList() }) {
onSuccess = { result ->
outerPackageList.value = result.data?.mapNotNull { bean ->
bean.name?.let { name -> KeyValue(name, name) }
} ?: emptyList()
}
}
launchCollect({ NetApply.api.getDamageTypeList() }) {
onSuccess = { result ->
damageTypeList.value = result.data?.mapNotNull { bean ->
bean.name?.let { name -> KeyValue(name, name) }
} ?: emptyList()
}
}
launchCollect({ NetApply.api.getContentTypeList() }) {
onSuccess = { result ->
contentTypeList.value = result.data?.mapNotNull { bean ->
bean.name?.let { name -> KeyValue(name, name) }
} ?: emptyList()
}
}
launchCollect({ NetApply.api.getUnusualTypeList() }) {
onSuccess = { result ->
unusualTypeList.value = result.data?.mapNotNull { bean ->
bean.name?.let { name -> KeyValue(name, name) }
} ?: emptyList()
}
}
}
private fun loadDetail() {
launchLoadingCollect({ NetApply.api.getGjAccidentVisaDetail(id) }) {
onSuccess = {
dataBean.value = it.data ?: GjAccidentVisaEditBean()
// 渲染图片
val bean = dataBean.value!!
val picList = bean.pic.split(",")
.filter { url -> url.isNotEmpty() }
.map { url -> FileBean(MediaUtil.fillUrl(url), url) }
val originalList = bean.originalPic.split(",")
.filter { url -> url.isNotEmpty() }
.map { url -> FileBean(MediaUtil.fillUrl(url)) }
for ((index, fileBean) in picList.withIndex()) {
if (index < originalList.size) {
picList[index].originalPic = originalList[index].path
}
}
rv?.commonAdapter()?.loadMore(picList)
}
}
}
///////////////////////////////////////////////////////////////////////////
// 航班级联查询
///////////////////////////////////////////////////////////////////////////
fun onFlightDateInputComplete() {
lastQueriedFlight = ""
queryFlightIfReady()
}
fun onFlightNoInputComplete() {
queryFlightIfReady()
}
private fun queryFlightIfReady() {
val bean = dataBean.value ?: return
val fdate = bean.fdate
val fno = bean.fno
if (fdate.isEmpty() || fno.isEmpty()) return
val key = "$fdate-$fno"
if (key == lastQueriedFlight) return
lastQueriedFlight = key
launchCollect({
NetApply.api.getGjFlightBean(
mapOf(
"fdate" to fdate,
"fno" to fno,
"ieFlag" to "I",
).toRequestBody()
)
}) {
onSuccess = {
if (it.verifySuccess() && it.data != null) {
val flight = it.data!!
val b = dataBean.value ?: GjAccidentVisaEditBean()
b.dep = flight.fdep.noNull()
b.dest = flight.fdest.noNull()
dataBean.value = b
} else {
val b = dataBean.value ?: GjAccidentVisaEditBean()
b.dep = ""
b.dest = ""
dataBean.value = b
showToast(it.msg.noNull("获取航班信息失败"))
}
}
onFailed = { _, _ ->
val b = dataBean.value ?: GjAccidentVisaEditBean()
b.dep = ""
b.dest = ""
dataBean.value = b
}
}
}
///////////////////////////////////////////////////////////////////////////
// 保存
///////////////////////////////////////////////////////////////////////////
fun onSaveClick() {
val bean = dataBean.value ?: return
if (bean.fdate.verifyNullOrEmpty("请输入航班日期")) return
if (bean.fno.verifyNullOrEmpty("请输入航班号")) return
if (bean.wbNo.verifyNullOrEmpty("请输入运单号")) return
(rv?.commonAdapter()?.items ?: emptyList())
.asFlow()
.map { it as FileBean }
.filter { it.path.isNotEmpty() && it.url.isEmpty() }
.onEach {
val data = UploadUtil.upload(it.path).data
it.url = data?.newName ?: ""
it.originalPic = data?.zipFileName ?: ""
}
.flowOn(Dispatchers.IO)
.onStart { showLoading() }
.catch {
showToast(it.message.noNull("上传图片失败"))
dismissLoading()
}
.onCompletion {
launchLoadingCollect({
val list = (rv?.commonAdapter()?.items as List<FileBean>)
.filter { it.path.isNotEmpty() }
bean.picNumber = list.size.toString()
bean.originalPic = list.joinToString(separator = ",") { MediaUtil.removeUrl(it.url) }
bean.pic = list.joinToString(separator = ",") { MediaUtil.removeUrl(it.originalPic) }
bean.idFlag = "1"
if (pageType.value == DetailsPageType.Add) {
NetApply.api.saveGjAccidentVisa(bean.toRequestBody())
} else {
NetApply.api.modifyGjAccidentVisa(bean.toRequestBody())
}
}) {
onSuccess = {
showToast(it.msg.noNull("${pageType.value!!.title}成功"))
viewModelScope.launch {
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
}
getTopActivity().finish()
}
}
}
.launchIn(viewModelScope)
}
fun onCancelClick() {
getTopActivity().finish()
}
///////////////////////////////////////////////////////////////////////////
// 图片操作
///////////////////////////////////////////////////////////////////////////
override fun onItemClick(position: Int, type: Int) {
val adapter = rv!!.commonAdapter()!!
val bean = adapter.getItem(position) as FileBean
when (type) {
R.id.rl -> {
bean.canDelete.set(!bean.canDelete.get())
}
R.id.iv_delete -> {
adapter.removeItem(position)
}
else -> {}
}
}
}

View File

@@ -123,6 +123,10 @@ class IntImpAccidentVisaViewModel : BasePageViewModel() {
ScanModel.startScan(getTopActivity(), Constant.RequestCode.WAYBILL)
}
fun addClick() {
com.lukouguoji.gjj.activity.IntImpAccidentVisaEditActivity.start(getTopActivity())
}
fun searchClick() {
refresh()
}

View File

@@ -2,6 +2,7 @@ package com.lukouguoji.gjj.viewModel
import android.content.Intent
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Observer
import androidx.lifecycle.viewModelScope
import com.google.gson.Gson
import com.lukouguoji.module_base.base.BaseViewModel
@@ -25,10 +26,27 @@ class IntImpPickUpChargeEditViewModel : BaseViewModel() {
// 可编辑费用字段String 用于双向绑定)
val tranChargeStr = MutableLiveData("") // 信息费
val whsChargeStr = MutableLiveData("") // 仓储费
val drawBillChargeStr = MutableLiveData("") // 抽单
val efrChargeStr = MutableLiveData("") // 冷藏
val svlChargeStr = MutableLiveData("") // 铲车费
val drawBillChargeStr = MutableLiveData("") // 文件处理
val svlChargeStr = MutableLiveData("") // 叉车
val tallyChargeStr = MutableLiveData("") // 理货费
val pipFeeStr = MutableLiveData("") // 精密仪器处理费
val lapFeeStr = MutableLiveData("") // 活体动物处理费
val totalAmountStr = MutableLiveData("") // 总费用(实时计算)
// 总费用计算观察者
private val totalCalculator = Observer<String> { calculateTotal() }
private fun calculateTotal() {
val total = (tranChargeStr.value?.toDoubleOrNull() ?: 0.0) +
(whsChargeStr.value?.toDoubleOrNull() ?: 0.0) +
(drawBillChargeStr.value?.toDoubleOrNull() ?: 0.0) +
(svlChargeStr.value?.toDoubleOrNull() ?: 0.0) +
(tallyChargeStr.value?.toDoubleOrNull() ?: 0.0) +
(dataBean.value?.optCharge ?: 0.0) +
(pipFeeStr.value?.toDoubleOrNull() ?: 0.0) +
(lapFeeStr.value?.toDoubleOrNull() ?: 0.0)
totalAmountStr.value = if (total != 0.0) total.toString() else ""
}
fun initOnCreated(intent: Intent) {
val jsonData = intent.getStringExtra(Constant.Key.DATA) ?: ""
@@ -40,9 +58,22 @@ class IntImpPickUpChargeEditViewModel : BaseViewModel() {
tranChargeStr.value = if (bean.tranCharge != 0.0) bean.tranCharge.toString() else ""
whsChargeStr.value = if (bean.whsCharge != 0.0) bean.whsCharge.toString() else ""
drawBillChargeStr.value = if (bean.drawBillCharge != 0.0) bean.drawBillCharge.toString() else ""
efrChargeStr.value = if (bean.efrCharge != 0.0) bean.efrCharge.toString() else ""
svlChargeStr.value = if (bean.svlCharge != 0.0) bean.svlCharge.toString() else ""
tallyChargeStr.value = if (bean.tallyCharge != 0.0) bean.tallyCharge.toString() else ""
pipFeeStr.value = if (bean.pipFee != 0.0) bean.pipFee.toString() else ""
lapFeeStr.value = if (bean.lapFee != 0.0) bean.lapFee.toString() else ""
// 注册总费用实时计算
tranChargeStr.observeForever(totalCalculator)
whsChargeStr.observeForever(totalCalculator)
drawBillChargeStr.observeForever(totalCalculator)
svlChargeStr.observeForever(totalCalculator)
tallyChargeStr.observeForever(totalCalculator)
pipFeeStr.observeForever(totalCalculator)
lapFeeStr.observeForever(totalCalculator)
// 初始计算一次
calculateTotal()
} catch (e: Exception) {
showToast("数据解析失败")
getTopActivity().finish()
@@ -63,9 +94,11 @@ class IntImpPickUpChargeEditViewModel : BaseViewModel() {
bean.tranCharge = tranChargeStr.value?.toDoubleOrNull() ?: 0.0
bean.whsCharge = whsChargeStr.value?.toDoubleOrNull() ?: 0.0
bean.drawBillCharge = drawBillChargeStr.value?.toDoubleOrNull() ?: 0.0
bean.efrCharge = efrChargeStr.value?.toDoubleOrNull() ?: 0.0
bean.svlCharge = svlChargeStr.value?.toDoubleOrNull() ?: 0.0
bean.tallyCharge = tallyChargeStr.value?.toDoubleOrNull() ?: 0.0
bean.pipFee = pipFeeStr.value?.toDoubleOrNull() ?: 0.0
bean.lapFee = lapFeeStr.value?.toDoubleOrNull() ?: 0.0
bean.amount = totalAmountStr.value?.toDoubleOrNull() ?: 0.0
launchLoadingCollect({
NetApply.api.modifyIntImpPickUpCharge(bean.toRequestBody())
@@ -86,4 +119,15 @@ class IntImpPickUpChargeEditViewModel : BaseViewModel() {
fun cancel() {
getTopActivity().finish()
}
override fun onCleared() {
super.onCleared()
tranChargeStr.removeObserver(totalCalculator)
whsChargeStr.removeObserver(totalCalculator)
drawBillChargeStr.removeObserver(totalCalculator)
svlChargeStr.removeObserver(totalCalculator)
tallyChargeStr.removeObserver(totalCalculator)
pipFeeStr.removeObserver(totalCalculator)
lapFeeStr.removeObserver(totalCalculator)
}
}

View File

@@ -83,7 +83,7 @@ class IntImpPickUpRecordViewModel : BasePageViewModel() {
fun initSpecialCodeList() {
DictUtils.getSpecialCodeList(
flag = 1, // 国际
ieFlag = "I", // 进港
ieFlag = "",
parentcode = ""
) {
spCodeList.value = it

View File

@@ -88,7 +88,7 @@ class IntImpQueryEditViewModel : BaseViewModel() {
* flag=1国际, ieFlag=I进港
*/
private fun loadSpCodeList() {
launchCollect({ NetApply.api.getSpecialCodeList(1, "I", "") }) {
launchCollect({ NetApply.api.getSpecialCodeList(1, "", "") }) {
onSuccess = { result ->
val list = result.data?.mapNotNull { bean ->
if (bean.name != null && bean.code != null) {

View File

@@ -19,6 +19,7 @@ import com.lukouguoji.module_base.ktx.launchLoadingCollect
import com.lukouguoji.module_base.ktx.showToast
import com.lukouguoji.module_base.ktx.toRequestBody
import com.lukouguoji.module_base.model.ScanModel
import com.lukouguoji.module_base.util.DictUtils
import dev.utils.app.info.KeyValue
import dev.utils.common.DateUtils
import com.lukouguoji.module_base.ktx.formatDate
@@ -55,6 +56,9 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
val totalPc = MutableLiveData("0")
val totalWeight = MutableLiveData("0")
// ==================== 特码下拉 ====================
val spCodeList = MutableLiveData<List<KeyValue>>(emptyList())
// ==================== 筛选条件 ====================
val spCode = MutableLiveData("")
val flightNo = MutableLiveData("")
@@ -78,6 +82,7 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
fun filterClick() {
val filterDialog = IntImpQueryFilterDialogModel(
spCode = spCode,
spCodeList = spCodeList,
flightNo = flightNo,
dest = dest,
awbType = awbType,
@@ -166,6 +171,16 @@ class IntImpQueryViewModel : BasePageViewModel(), IOnItemClickListener {
}
}
fun initSpecialCodeList() {
DictUtils.getSpecialCodeList(
flag = 1,
ieFlag = "",
parentcode = ""
) {
spCodeList.value = it
}
}
fun initAgentList() {
launchCollect({
NetApply.api.getIntImpAgentList()

View File

@@ -182,6 +182,18 @@ class IntImpTallyViewModel : BasePageViewModel() {
return
}
// 校验所选单据状态是否为 01已申报
val invalidMaWb = selectedMaWb.firstOrNull { it.status != "01" }
if (invalidMaWb != null) {
showToast("运单 ${invalidMaWb.getWaybillNo()} 理货未申报,不允许删除理货")
return
}
val invalidHaWb = selectedHaWb.firstOrNull { it.status != "01" }
if (invalidHaWb != null) {
showToast("运单 ${invalidHaWb.getWaybillNo()} 理货未申报,不允许删除理货")
return
}
// 从接口获取删除原因列表
launchLoadingCollect({ NetApply.api.getDelReasonList() }) {
onSuccess = { result ->

View File

@@ -79,13 +79,13 @@
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{viewModel.pageType == DetailsPageType.Add}"
hint='@{"请输入航程"}'
enable="@{false}"
hint='@{"自动填充"}'
required="@{false}"
title='@{"航 程"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.range}'
value='@{viewModel.range}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="15dp"

View File

@@ -61,10 +61,10 @@
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"特码"}'
title='@{"航班信息"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.spCode}'
value='@{viewModel.dataBean.getFlightSplit()}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />

View File

@@ -59,6 +59,7 @@
android:layout_weight="1"
enable="@{true}"
hint='@{"请输入名称"}'
required="@{true}"
title='@{"名称"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
@@ -71,6 +72,7 @@
enable="@{true}"
hint='@{"请选择国家代码"}'
list="@{viewModel.countryCodeList}"
required="@{true}"
title='@{"国家代码"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
@@ -83,6 +85,7 @@
enable="@{true}"
hint='@{"请选择通讯方式"}'
list="@{viewModel.comTypeList}"
required="@{true}"
title='@{"通讯方式"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
@@ -103,6 +106,7 @@
android:layout_weight="1"
enable="@{true}"
hint='@{"请输入联系号码"}'
required="@{true}"
title='@{"联系号码"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
@@ -154,6 +158,7 @@
android:layout_weight="1"
enable="@{true}"
hint='@{"请输入名称"}'
required="@{true}"
title='@{"名称"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
@@ -166,6 +171,7 @@
enable="@{true}"
hint='@{"请选择国家代码"}'
list="@{viewModel.countryCodeList}"
required="@{true}"
title='@{"国家代码"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
@@ -178,6 +184,7 @@
enable="@{true}"
hint='@{"请选择通讯方式"}'
list="@{viewModel.comTypeList}"
required="@{true}"
title='@{"通讯方式"}'
titleLength="@{5}"
type="@{DataLayoutType.SPINNER}"
@@ -198,6 +205,7 @@
android:layout_weight="1"
enable="@{true}"
hint='@{"请输入联系号码"}'
required="@{true}"
title='@{"联系号码"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"

View File

@@ -99,10 +99,10 @@
android:src="@drawable/img_search" />
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginLeft="16dp"
android:padding="4dp"
android:onClick="@{()-> viewModel.addClick()}"
android:src="@drawable/img_add" />
<ImageView

View File

@@ -0,0 +1,363 @@
<?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" />
<import type="com.lukouguoji.module_base.common.DetailsPageType" />
<variable
name="viewModel"
type="com.lukouguoji.gjj.viewModel.IntImpAccidentVisaEditViewModel" />
</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" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<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">
<!-- Row 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="@{true}"
hint='@{"请选择航班日期"}'
setRefreshCallBack="@{viewModel::onFlightDateInputComplete}"
title='@{"航班日期"}'
titleLength="@{6}"
type="@{DataLayoutType.DATE}"
value='@={viewModel.dataBean.fdate}' />
<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='@{"请输入航班号"}'
setRefreshCallBack="@{viewModel::onFlightNoInputComplete}"
title='@{"航班号"}'
titleLength="@{6}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.fno}' />
</LinearLayout>
<!-- Row 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="@{6}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.dep}' />
<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="@{6}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.dest}' />
</LinearLayout>
<!-- Row 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="@{true}"
hint='@{"请输入运单号"}'
title='@{"运单号"}'
titleLength="@{6}"
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='@{"请输入不正常件数"}'
title='@{"不正常件数"}'
titleLength="@{6}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.dpc}' />
</LinearLayout>
<!-- Row 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="@{true}"
hint='@{"请输入运单总件数"}'
title='@{"运单总件数"}'
titleLength="@{6}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.pc}' />
<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='@{"请输入运单总重量"}'
title='@{"运单总重量"}'
titleLength="@{6}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.weight}' />
</LinearLayout>
<!-- Row 5: 复称重量 | 品名 -->
<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='@{"请输入复称重量"}'
title='@{"复称重量"}'
titleLength="@{6}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.reweight}' />
<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='@{"请输入品名"}'
title='@{"品名"}'
titleLength="@{6}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.goods}' />
</LinearLayout>
<!-- Row 6: 外包装 | 包装破损情况 -->
<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"
hint='@{"请选择外包装"}'
list="@{viewModel.outerPackageList}"
title='@{"外包装"}'
titleLength="@{6}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.dataBean.opacking}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
hint='@{"请选择破损情况"}'
list="@{viewModel.damageTypeList}"
title='@{"包装破损情况"}'
titleLength="@{6}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.dataBean.damage}' />
</LinearLayout>
<!-- Row 7: 内容物情况 | 不正常类型 -->
<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"
hint='@{"请选择内容物情况"}'
list="@{viewModel.contentTypeList}"
title='@{"内容物情况"}'
titleLength="@{6}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.dataBean.condition}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
hint='@{"请选择不正常类型"}'
list="@{viewModel.unusualTypeList}"
title='@{"不正常类型"}'
titleLength="@{6}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.dataBean.problem}' />
</LinearLayout>
<!-- Row 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="@{true}"
hint='@{"请选择发现时间"}'
title='@{"发现时间"}'
titleLength="@{6}"
type="@{DataLayoutType.DATE}"
value='@={viewModel.dataBean.seachDate}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
hint='@{"请选择"}'
list="@{viewModel.photoList}"
title='@{"图片是否留底"}'
titleLength="@{6}"
type="@{DataLayoutType.SPINNER}"
value='@={viewModel.dataBean.photo}' />
</LinearLayout>
<!-- Row 9: 备注(整行) -->
<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="match_parent"
android:layout_height="wrap_content"
enable="@{true}"
hint='@{"请输入备注"}'
inputHeight="@{80}"
title='@{"备注"}'
titleLength="@{6}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.dataBean.remarks}' />
</LinearLayout>
</LinearLayout>
<!-- 上传图像区域 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:text="上传图像"
android:textColor="@color/text_normal"
android:textSize="16sp"
android:textStyle="bold" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv"
itemLayoutId="@{viewModel.itemLayoutId}"
viewHolder="@{viewModel.itemViewHolder}"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="4"
tools:listitem="@layout/item_image_select" />
<!-- 底部按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_marginBottom="15dp"
android:gravity="center"
android:orientation="horizontal">
<TextView
style="@style/tv_bottom_btn"
android:layout_width="120dp"
android:onClick="@{()-> viewModel.onCancelClick()}"
android:text="取消" />
<TextView
style="@style/tv_bottom_btn"
android:layout_width="120dp"
android:layout_marginLeft="20dp"
android:onClick="@{()-> viewModel.onSaveClick()}"
android:text="保存" />
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
</layout>

View File

@@ -109,11 +109,10 @@
<!-- 新增按钮 -->
<ImageView
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_marginLeft="16dp"
android:onClick="@{()-> viewModel.onAddClick()}"
android:padding="4dp"
android:src="@drawable/img_add" />
<!-- 删除按钮 -->

View File

@@ -50,7 +50,7 @@
android:layout_weight="1"
enable="@{false}"
title='@{"运 单 号"}'
titleLength="@{5}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.wbNo}' />
@@ -60,7 +60,7 @@
android:layout_weight="1"
enable="@{false}"
title='@{"代 理 人"}'
titleLength="@{5}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.agentCode}' />
@@ -70,7 +70,7 @@
android:layout_weight="1"
enable="@{false}"
title='@{"特 码"}'
titleLength="@{5}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.spCode}' />
@@ -89,7 +89,7 @@
android:layout_weight="1"
enable="@{false}"
title='@{"提货编号"}'
titleLength="@{5}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.pkId}' />
@@ -99,7 +99,7 @@
android:layout_weight="1"
enable="@{false}"
title='@{"件数"}'
titleLength="@{5}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.pc)}' />
@@ -109,7 +109,7 @@
android:layout_weight="1"
enable="@{false}"
title='@{"重量"}'
titleLength="@{5}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.weight)}' />
@@ -128,7 +128,7 @@
android:layout_weight="1"
enable="@{false}"
title='@{"计费重量"}'
titleLength="@{5}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.cashWeight)}' />
@@ -139,7 +139,7 @@
enable="@{true}"
hint='@{"请输入信息费"}'
title='@{"信息费"}'
titleLength="@{5}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.tranChargeStr}' />
@@ -149,13 +149,13 @@
android:layout_weight="1"
enable="@{false}"
title='@{"服务费"}'
titleLength="@{5}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.optCharge)}' />
</LinearLayout>
<!-- 第4行仓储费、抽单费、冷藏费(可编辑) -->
<!-- 第4行仓储费、文件处理费、叉车费(可编辑) -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -169,7 +169,7 @@
enable="@{true}"
hint='@{"请输入仓储费"}'
title='@{"仓储费"}'
titleLength="@{5}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.whsChargeStr}' />
@@ -178,9 +178,9 @@
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{true}"
hint='@{"请输入抽单费"}'
title='@{"抽单费"}'
titleLength="@{5}"
hint='@{"请输入文件处理费"}'
title='@{"文件处理费"}'
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.drawBillChargeStr}' />
@@ -189,32 +189,21 @@
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{true}"
hint='@{"请输入冷藏费"}'
title='@{"冷藏费"}'
titleLength="@{5}"
hint='@{"请输入叉车费"}'
title='@{"叉车费"}'
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.efrChargeStr}' />
value='@={viewModel.svlChargeStr}' />
</LinearLayout>
<!-- 第5行铲车费、理货费(可编辑)、总金额(只读 -->
<!-- 第5行理货费、精密仪器处理费、活体动物处理费(可编辑 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
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='@{"请输入铲车费"}'
title='@{"铲车费"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.svlChargeStr}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
@@ -222,7 +211,7 @@
enable="@{true}"
hint='@{"请输入理货费"}'
title='@{"理货费"}'
titleLength="@{5}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.tallyChargeStr}' />
@@ -230,11 +219,64 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
enable="@{false}"
title='@{"总金额"}'
titleLength="@{5}"
enable="@{true}"
hint='@{"请输入精密仪器处理费"}'
title='@{"精密仪器处理费"}'
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.amount)}' />
value='@={viewModel.pipFeeStr}' />
<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='@{"请输入活体动物处理费"}'
title='@{"活体动物处理费"}'
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@={viewModel.lapFeeStr}' />
</LinearLayout>
<!-- 第6行总费用只读实时计算 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
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="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.totalAmountStr}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:visibility="invisible"
enable="@{false}"
title='@{""}'
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{""}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:visibility="invisible"
enable="@{false}"
title='@{""}'
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{""}' />
</LinearLayout>

View File

@@ -41,34 +41,34 @@
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}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.wbNo}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
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="@{false}"
title='@{"代理人"}'
titleLength="@{5}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.agentCode}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
value='@{viewModel.dataBean.agentCode}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"特码"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.spCode}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_weight="1"
enable="@{false}"
title='@{"特码"}'
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.spCode}' />
</LinearLayout>
@@ -80,34 +80,34 @@
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}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.pkId}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
value='@{viewModel.dataBean.pkId}' />
<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}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.pc)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
value='@{String.valueOf(viewModel.dataBean.pc)}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"重量"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.weight)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_weight="1"
enable="@{false}"
title='@{"重量"}'
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.weight)}' />
</LinearLayout>
@@ -119,38 +119,38 @@
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}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.cashWeight)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
value='@{String.valueOf(viewModel.dataBean.cashWeight)}' />
<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}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.tranCharge)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
value='@{String.valueOf(viewModel.dataBean.tranCharge)}' />
<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}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.optCharge)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
value='@{String.valueOf(viewModel.dataBean.optCharge)}' />
</LinearLayout>
<!-- 第4行仓储费、抽单费、冷藏-->
<!-- 第4行仓储费、文件处理费、叉车-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -158,38 +158,38 @@
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}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.whsCharge)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
value='@{String.valueOf(viewModel.dataBean.whsCharge)}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"抽单费"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.drawBillCharge)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_weight="1"
enable="@{false}"
title='@{"文件处理费"}'
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.drawBillCharge)}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"冷藏费"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.efrCharge)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_weight="1"
enable="@{false}"
title='@{"叉车费"}'
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.svlCharge)}' />
</LinearLayout>
<!-- 第5行铲车费、理货费、总金额 -->
<!-- 第5行理货费、精密仪器处理费、活体动物处理费 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -197,38 +197,38 @@
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"铲车费"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.svlCharge)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_weight="1"
enable="@{false}"
title='@{"理货费"}'
titleLength="@{5}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.tallyCharge)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
value='@{String.valueOf(viewModel.dataBean.tallyCharge)}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"总金额"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.amount)}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_weight="1"
enable="@{false}"
title='@{"精密仪器处理费"}'
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.pipFee)}' />
<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="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.lapFee)}' />
</LinearLayout>
<!-- 第6行提取时间、办理人、出库时间 -->
<!-- 第6行总费用、提取时间、办理人 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -236,34 +236,75 @@
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="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{String.valueOf(viewModel.dataBean.amount)}' />
<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}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.chargeTime}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
value='@{viewModel.dataBean.chargeTime}' />
<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}"
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.chargeName}'
android:layout_width="0dp"
value='@{viewModel.dataBean.chargeName}' />
</LinearLayout>
<!-- 第7行出库时间 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_marginTop="10dp"
android:orientation="horizontal">
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"出库时间"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.dlvTime}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_weight="1"
enable="@{false}"
title='@{"出库时间"}'
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.dlvTime}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:visibility="invisible"
enable="@{false}"
title='@{""}'
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{""}' />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:visibility="invisible"
enable="@{false}"
title='@{""}'
titleLength="@{7}"
type="@{DataLayoutType.INPUT}"
value='@{""}' />
</LinearLayout>

View File

@@ -39,11 +39,11 @@
android:orientation="vertical"
android:padding="15dp">
<!-- 段落标题:收货人信息 -->
<!-- 段落标题:基础信息 -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="收货人信息"
android:text="基础信息"
android:textColor="@color/text_normal"
android:textSize="16sp"
android:textStyle="bold" />
@@ -77,10 +77,10 @@
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"特码"}'
title='@{"航班信息"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.spCode}'
value='@{viewModel.dataBean.getFlightSplit()}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
@@ -312,7 +312,7 @@
title='@{"放行模式"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.releaseMode}'
value='@{viewModel.dataBean.relMode}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
@@ -322,7 +322,7 @@
title='@{"放行时间"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.releaseTime}'
value='@{viewModel.dataBean.perDate}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
@@ -332,17 +332,17 @@
title='@{"指令类型"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.instructionType}'
value='@{viewModel.dataBean.comType}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
enable="@{false}"
title='@{"备注"}'
title='@{"放行备注"}'
titleLength="@{5}"
type="@{DataLayoutType.INPUT}"
value='@{viewModel.dataBean.remark}'
value='@{viewModel.dataBean.relRemark}'
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />

View File

@@ -42,10 +42,11 @@
<!-- 特码 -->
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
hint='@{"请输入特码"}'
hint='@{"请选择特码"}'
list="@{model.spCodeList}"
title='@{"特码"}'
titleLength="@{4}"
type="@{DataLayoutType.INPUT}"
type="@{DataLayoutType.SPINNER}"
value='@={model.spCode}'
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@@ -18,14 +18,13 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_white_radius_bottom_8"
android:orientation="vertical"
android:paddingEnd="8dp">
android:orientation="vertical">
<!-- 表头 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/color_f2"
android:background="@color/color_f5"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="10dp">

View File

@@ -18,14 +18,13 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_white_radius_bottom_8"
android:orientation="vertical"
android:paddingEnd="8dp">
android:orientation="vertical">
<!-- 表头 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@color/color_f2"
android:background="@color/color_f5"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="10dp">

View File

@@ -174,7 +174,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="10dp">
<!-- 特码 -->
<!-- 航班信息 -->
<androidx.appcompat.widget.LinearLayoutCompat
android:layout_width="0dp"
android:layout_height="wrap_content"
@@ -184,13 +184,13 @@
<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="@{manifest.spCode ?? ``}" />
android:text="@{manifest.getFlightSplit()}" />
</androidx.appcompat.widget.LinearLayoutCompat>

View File

@@ -12,12 +12,25 @@
type="Integer" />
</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: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:gravity="center_vertical"
android:orientation="horizontal"
@@ -291,4 +304,23 @@
</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>

View File

@@ -181,7 +181,7 @@
android:gravity="center_vertical"
android:orientation="horizontal">
<!-- 特码 -->
<!-- 航班信息 -->
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
@@ -192,13 +192,13 @@
<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.spCode}" />
android:text="@{bean.getFlightSplit()}" />
</LinearLayout>

View File

@@ -20,7 +20,8 @@ class HbQueryListViewModel : BasePageViewModel() {
val date = MutableLiveData(DateUtils.getCurrentTime().formatDate())
val fNo = MutableLiveData("")
val range = MutableLiveData("")
val dep = MutableLiveData("") // 始发站
val dest = MutableLiveData("") // 目的站
val addressType = MutableLiveData("")
val serviceType = MutableLiveData("")
@@ -59,7 +60,7 @@ class HbQueryListViewModel : BasePageViewModel() {
"limit" to pageModel.limit,
"fdate" to date.value,
"fno" to fNo.value,
"range" to range.value,
"range" to buildRange(),
"countryType" to addressType.value,
"serviceType" to serviceType.value,
).toRequestBody()
@@ -72,6 +73,13 @@ class HbQueryListViewModel : BasePageViewModel() {
}
}
private fun buildRange(): String? {
val d = dep.value?.trim()
val a = dest.value?.trim()
if (d.isNullOrEmpty() && a.isNullOrEmpty()) return null
return "${d ?: ""}-${a ?: ""}"
}
override fun onItemClick(position: Int, type: Int) {
val bean = pageModel.rv!!.commonAdapter()!!.getItem(position) as FlightBean
ARouter.getInstance().build(ARouterConstants.ACTIVITY_URL_FLIGHT_QUERY_DETAILS)

View File

@@ -46,13 +46,29 @@
android:layout_weight="1" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请输入航程"}'
hint='@{"始发站"}'
setTextAllCaps="@{true}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.range}"
value="@={viewModel.dep}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1" />
android:layout_weight="0.6" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:text="-"
android:textSize="16sp" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"目的站"}'
setTextAllCaps="@{true}"
type="@{SearchLayoutType.INPUT}"
value="@={viewModel.dest}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.6" />
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
hint='@{"请选择地区类型"}'
@@ -127,7 +143,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{"合计:"+viewModel.count+"条"}'
android:text='@{"合计"+viewModel.count+"条"}'
android:textColor="@color/bottom_tool_tips_text_color"
android:textSize="18sp"
android:textStyle="bold"