From ff1c69f1dd20bc1ee6bf5fb6c536330d8d92dd9a Mon Sep 17 00:00:00 2001 From: YANG JIANKUAN Date: Mon, 5 Jan 2026 16:23:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20opt=20=E5=9B=BD=E9=99=85=E5=87=BA?= =?UTF-8?q?=E6=B8=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/lukouguoji/module_base/LoginActivity.kt | 2 +- .../gjc/viewModel/GjcWeighingStartViewModel.kt | 10 +++++++++- .../lukouguoji/gjc/viewModel/GjcWeighingViewModel.kt | 4 ++-- .../main/res/layout/activity_gjc_weighing_start.xml | 4 ++-- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/module_base/src/main/java/com/lukouguoji/module_base/LoginActivity.kt b/module_base/src/main/java/com/lukouguoji/module_base/LoginActivity.kt index 0d6b880..bb22afa 100644 --- a/module_base/src/main/java/com/lukouguoji/module_base/LoginActivity.kt +++ b/module_base/src/main/java/com/lukouguoji/module_base/LoginActivity.kt @@ -41,7 +41,7 @@ import me.jessyan.autosize.internal.CustomAdapt * ========== 开发调试开关 ========== * TODO: 正式发布前务必设置为 false */ -private const val DEV_AUTO_LOGIN = true // 自动登录开关 +private const val DEV_AUTO_LOGIN = false // 自动登录开关 @Route(path = ARouterConstants.ACTIVITY_URL_LOGIN) class LoginActivity : BaseActivity(), diff --git a/module_gjc/src/main/java/com/lukouguoji/gjc/viewModel/GjcWeighingStartViewModel.kt b/module_gjc/src/main/java/com/lukouguoji/gjc/viewModel/GjcWeighingStartViewModel.kt index 02a2c96..f73e207 100644 --- a/module_gjc/src/main/java/com/lukouguoji/gjc/viewModel/GjcWeighingStartViewModel.kt +++ b/module_gjc/src/main/java/com/lukouguoji/gjc/viewModel/GjcWeighingStartViewModel.kt @@ -60,6 +60,8 @@ class GjcWeighingStartViewModel : BaseViewModel() { val arriveWeight = MutableLiveData("") // 运抵重量 val arriveVolume = MutableLiveData("") // 运抵体积 + val pageRemark = MutableLiveData("") // 备注 + // 下拉选择数据源 val channelList = MutableLiveData>() // 通道号列表 val agentList = MutableLiveData>() // 代理人列表 @@ -167,6 +169,7 @@ class GjcWeighingStartViewModel : BaseViewModel() { launchLoadingCollect({ NetApply.api.getIntExpCheckInWbById(maWbId) }) { onSuccess = { result -> maWbBean.value = result.data ?: GjcMaWb() + pageRemark.value = maWbBean.value?.remark // 更新航班日期字符串 flightDate.value = result.data?.fdate?.formatDate() ?: "" } @@ -270,6 +273,8 @@ class GjcWeighingStartViewModel : BaseViewModel() { this@GjcWeighingStartViewModel.arriveVolume.value?.toDoubleOrNull() ?: arriveVolume // 添加通道号 passageWay = this@GjcWeighingStartViewModel.channel.value + + remark = pageRemark.value } // 3. 构建请求数据(GjcMaWb转RequestBody,包含通道号) @@ -295,6 +300,9 @@ class GjcWeighingStartViewModel : BaseViewModel() { arrivePc.value = "" arriveWeight.value = "" arriveVolume.value = "" + + pageRemark.value = "" + maWbBean.value = maWbBean.value?.apply { carId = null remark = null @@ -351,7 +359,7 @@ class GjcWeighingStartViewModel : BaseViewModel() { "goodsCn" to bean.goodsCn, "businessType" to bean.businessType, "carId" to bean.carId, - "remark" to bean.remark, + "remark" to pageRemark.value, "checkIn" to "1", // 收运状态设置为已收运 "passageWay" to channel.value // 通道号参数 ).toRequestBody(removeEmptyOrNull = true) diff --git a/module_gjc/src/main/java/com/lukouguoji/gjc/viewModel/GjcWeighingViewModel.kt b/module_gjc/src/main/java/com/lukouguoji/gjc/viewModel/GjcWeighingViewModel.kt index 9fd5212..26bf801 100644 --- a/module_gjc/src/main/java/com/lukouguoji/gjc/viewModel/GjcWeighingViewModel.kt +++ b/module_gjc/src/main/java/com/lukouguoji/gjc/viewModel/GjcWeighingViewModel.kt @@ -128,7 +128,7 @@ class GjcWeighingViewModel : BasePageViewModel() { "fno" to flightNo.value!!.ifEmpty { null }, "agentCode" to agentCode.value!!.ifEmpty { null }, "spCode" to spCode.value!!.ifEmpty { null }, - "likeNo" to waybillNo.value!!.ifEmpty { null }, + "wbNo" to waybillNo.value!!.ifEmpty { null }, ).toRequestBody() // 构建查询参数(统计接口 - 使用相同的搜索条件) @@ -137,7 +137,7 @@ class GjcWeighingViewModel : BasePageViewModel() { "fno" to flightNo.value!!.ifEmpty { null }, "agentCode" to agentCode.value!!.ifEmpty { null }, "spCode" to spCode.value!!.ifEmpty { null }, - "likeNo" to waybillNo.value!!.ifEmpty { null }, + "wbNo" to waybillNo.value!!.ifEmpty { null }, ).toRequestBody() // 获取列表数据(显示loading) diff --git a/module_gjc/src/main/res/layout/activity_gjc_weighing_start.xml b/module_gjc/src/main/res/layout/activity_gjc_weighing_start.xml index 004c647..4100c5f 100644 --- a/module_gjc/src/main/res/layout/activity_gjc_weighing_start.xml +++ b/module_gjc/src/main/res/layout/activity_gjc_weighing_start.xml @@ -69,7 +69,7 @@ type="@{DataLayoutType.INPUT}" value='@={viewModel.maWbBean.wbNo}' autoQueryEnabled="@{true}" - autoQueryUrl="@{`/IntExpCheckIn/checked/queryWbNoList`}" + autoQueryUrl="@{`/IntExpCheckIn/queryWbNoList`}" autoQueryParamKey="@{`wbNo`}" autoQueryMinLength="@{4}" autoQueryMaxLength="@{8}" @@ -397,7 +397,7 @@ title='@{"备 注"}' titleLength="@{5}" type="@{DataLayoutType.INPUT}" - value='@={viewModel.maWbBean.remark}' + value='@={viewModel.pageRemark}' android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" />