feat: 删除原因

This commit is contained in:
2025-12-15 12:34:00 +08:00
parent 5c7284e617
commit 23185616d1
5 changed files with 83 additions and 83 deletions

View File

@@ -12,6 +12,7 @@ import com.lukouguoji.module_base.bean.BoxDetailsForCarIdBean
import com.lukouguoji.module_base.bean.CarBarBean
import com.lukouguoji.module_base.bean.CarOrUldBean
import com.lukouguoji.module_base.bean.DiBangChannelBean
import com.lukouguoji.module_base.bean.DictBean
import com.lukouguoji.module_base.bean.DictIdValueBean
import com.lukouguoji.module_base.bean.DictListBean
import com.lukouguoji.module_base.bean.DictLocationBean
@@ -1448,6 +1449,11 @@ interface Api {
@POST("flt/searchHandoverPage")
suspend fun getDocumentHandoverList(@Body data: RequestBody): BaseListBean<DocumentHandoverBean>
/**
* 获取删除原因列表
*/
@GET("typeCode/delReason")
suspend fun getDelReasonList(@Query("needFormat") needFormat: Boolean = true): BaseResultBean<List<DictBean>>
@GET("file/verifyVersion")
suspend fun getAppUpdate(@Query("versionCode") versionCode: Int): AppUpdateResponse<AppUpdateResponseInfo>

View File

@@ -125,14 +125,10 @@ class IntExpArriveViewModel : BasePageViewModel() {
// return
// }
// 准备变更原因列表(示例数据,可根据实际需求调整)
val changeReasonList = listOf(
KeyValue("01", "运单号错误"),
KeyValue("02", "件数或重量错误"),
KeyValue("03", "货物信息错误"),
KeyValue("04", "航班信息错误"),
KeyValue("99", "其他原因")
)
// 从接口获取删除原因列表
launchLoadingCollect({ NetApply.api.getDelReasonList() }) {
onSuccess = { result ->
val changeReasonList = result.data?.map { it.toKeyValue() } ?: emptyList()
// 创建并显示弹框
val dialog = IntExpArriveDeleteDialogModel(changeReasonList) { dialogModel ->
@@ -160,6 +156,8 @@ class IntExpArriveViewModel : BasePageViewModel() {
dialog.show()
}
}
}
/**
* 运抵申报

View File

@@ -153,14 +153,10 @@ class IntExpLoadViewModel : BasePageViewModel() {
// return
// }
// 准备变更原因列表(示例数据,可根据实际需求调整)
val changeReasonList = listOf(
KeyValue("01", "运单号错误"),
KeyValue("02", "件数或重量错误"),
KeyValue("03", "货物信息错误"),
KeyValue("04", "航班信息错误"),
KeyValue("99", "其他原因")
)
// 从接口获取删除原因列表
launchLoadingCollect({ NetApply.api.getDelReasonList() }) {
onSuccess = { result ->
val changeReasonList = result.data?.map { it.toKeyValue() } ?: emptyList()
// 创建并显示弹框
val dialog = IntExpLoadDeleteDialogModel(changeReasonList) { dialogModel ->
@@ -188,6 +184,8 @@ class IntExpLoadViewModel : BasePageViewModel() {
dialog.show()
}
}
}
/**
* 获取数据 (重写BasePageViewModel)

View File

@@ -151,14 +151,10 @@ class IntExpTallyViewModel : BasePageViewModel() {
// return
// }
// 准备变更原因列表(示例数据,可根据实际需求调整)
val changeReasonList = listOf(
KeyValue("01", "运单号错误"),
KeyValue("02", "件数或重量错误"),
KeyValue("03", "货物信息错误"),
KeyValue("04", "航班信息错误"),
KeyValue("99", "其他原因")
)
// 从接口获取删除原因列表
launchLoadingCollect({ NetApply.api.getDelReasonList() }) {
onSuccess = { result ->
val changeReasonList = result.data?.map { it.toKeyValue() } ?: emptyList()
// 创建并显示弹框
val dialog = IntExpTallyDeleteDialogModel(changeReasonList) { dialogModel ->
@@ -186,6 +182,8 @@ class IntExpTallyViewModel : BasePageViewModel() {
dialog.show()
}
}
}
/**
* 获取数据 (重写BasePageViewModel)

View File

@@ -97,7 +97,7 @@
android:layout_weight="2"
android:background="@drawable/bg_table_cell"
android:gravity="center"
android:text="202512月 20 日"
tools:text="202512月20日"
android:textColor="@color/color_33"
android:textSize="14sp" />
</LinearLayout>
@@ -136,7 +136,7 @@
android:gravity="center"
android:text="计划班期(航班号/日期/目的地)"
android:textColor="@color/color_33"
android:textSize="14sp" />
android:textSize="13sp" />
<TextView
android:layout_width="0dp"