feat: 删除原因
This commit is contained in:
@@ -12,6 +12,7 @@ import com.lukouguoji.module_base.bean.BoxDetailsForCarIdBean
|
|||||||
import com.lukouguoji.module_base.bean.CarBarBean
|
import com.lukouguoji.module_base.bean.CarBarBean
|
||||||
import com.lukouguoji.module_base.bean.CarOrUldBean
|
import com.lukouguoji.module_base.bean.CarOrUldBean
|
||||||
import com.lukouguoji.module_base.bean.DiBangChannelBean
|
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.DictIdValueBean
|
||||||
import com.lukouguoji.module_base.bean.DictListBean
|
import com.lukouguoji.module_base.bean.DictListBean
|
||||||
import com.lukouguoji.module_base.bean.DictLocationBean
|
import com.lukouguoji.module_base.bean.DictLocationBean
|
||||||
@@ -1448,6 +1449,11 @@ interface Api {
|
|||||||
@POST("flt/searchHandoverPage")
|
@POST("flt/searchHandoverPage")
|
||||||
suspend fun getDocumentHandoverList(@Body data: RequestBody): BaseListBean<DocumentHandoverBean>
|
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")
|
@GET("file/verifyVersion")
|
||||||
suspend fun getAppUpdate(@Query("versionCode") versionCode: Int): AppUpdateResponse<AppUpdateResponseInfo>
|
suspend fun getAppUpdate(@Query("versionCode") versionCode: Int): AppUpdateResponse<AppUpdateResponseInfo>
|
||||||
|
|||||||
@@ -125,40 +125,38 @@ class IntExpArriveViewModel : BasePageViewModel() {
|
|||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// 准备变更原因列表(示例数据,可根据实际需求调整)
|
// 从接口获取删除原因列表
|
||||||
val changeReasonList = listOf(
|
launchLoadingCollect({ NetApply.api.getDelReasonList() }) {
|
||||||
KeyValue("01", "运单号错误"),
|
onSuccess = { result ->
|
||||||
KeyValue("02", "件数或重量错误"),
|
val changeReasonList = result.data?.map { it.toKeyValue() } ?: emptyList()
|
||||||
KeyValue("03", "货物信息错误"),
|
|
||||||
KeyValue("04", "航班信息错误"),
|
|
||||||
KeyValue("99", "其他原因")
|
|
||||||
)
|
|
||||||
|
|
||||||
// 创建并显示弹框
|
// 创建并显示弹框
|
||||||
val dialog = IntExpArriveDeleteDialogModel(changeReasonList) { dialogModel ->
|
val dialog = IntExpArriveDeleteDialogModel(changeReasonList) { dialogModel ->
|
||||||
// 弹框确认后的回调
|
// 弹框确认后的回调
|
||||||
val param = GjcDeclareParam(
|
val param = GjcDeclareParam(
|
||||||
dcode = dialogModel.changeReason.value,
|
dcode = dialogModel.changeReason.value,
|
||||||
dcontactsName = dialogModel.contactName.value,
|
dcontactsName = dialogModel.contactName.value,
|
||||||
dcontactsTel = dialogModel.contactPhone.value,
|
dcontactsTel = dialogModel.contactPhone.value,
|
||||||
maWbList = selectedItems
|
maWbList = selectedItems
|
||||||
)
|
)
|
||||||
|
|
||||||
val requestData = param.toRequestBody()
|
val requestData = param.toRequestBody()
|
||||||
|
|
||||||
// 调用删除接口
|
// 调用删除接口
|
||||||
launchLoadingCollect({ NetApply.api.deleteArriveDeclare(requestData) }) {
|
launchLoadingCollect({ NetApply.api.deleteArriveDeclare(requestData) }) {
|
||||||
onSuccess = {
|
onSuccess = {
|
||||||
showToast("删除申报成功")
|
showToast("删除申报成功")
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||||
|
}
|
||||||
|
refresh()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
refresh()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dialog.show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog.show()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -153,40 +153,38 @@ class IntExpLoadViewModel : BasePageViewModel() {
|
|||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// 准备变更原因列表(示例数据,可根据实际需求调整)
|
// 从接口获取删除原因列表
|
||||||
val changeReasonList = listOf(
|
launchLoadingCollect({ NetApply.api.getDelReasonList() }) {
|
||||||
KeyValue("01", "运单号错误"),
|
onSuccess = { result ->
|
||||||
KeyValue("02", "件数或重量错误"),
|
val changeReasonList = result.data?.map { it.toKeyValue() } ?: emptyList()
|
||||||
KeyValue("03", "货物信息错误"),
|
|
||||||
KeyValue("04", "航班信息错误"),
|
|
||||||
KeyValue("99", "其他原因")
|
|
||||||
)
|
|
||||||
|
|
||||||
// 创建并显示弹框
|
// 创建并显示弹框
|
||||||
val dialog = IntExpLoadDeleteDialogModel(changeReasonList) { dialogModel ->
|
val dialog = IntExpLoadDeleteDialogModel(changeReasonList) { dialogModel ->
|
||||||
// 弹框确认后的回调
|
// 弹框确认后的回调
|
||||||
val param = GjcDeclareParam(
|
val param = GjcDeclareParam(
|
||||||
dcode = dialogModel.changeReason.value,
|
dcode = dialogModel.changeReason.value,
|
||||||
dcontactsName = dialogModel.contactName.value,
|
dcontactsName = dialogModel.contactName.value,
|
||||||
dcontactsTel = dialogModel.contactPhone.value,
|
dcontactsTel = dialogModel.contactPhone.value,
|
||||||
loadList = selectedItems
|
loadList = selectedItems
|
||||||
)
|
)
|
||||||
|
|
||||||
val requestData = param.toRequestBody()
|
val requestData = param.toRequestBody()
|
||||||
|
|
||||||
// 调用删除接口
|
// 调用删除接口
|
||||||
launchLoadingCollect({ NetApply.api.deleteLoadDeclare(requestData) }) {
|
launchLoadingCollect({ NetApply.api.deleteLoadDeclare(requestData) }) {
|
||||||
onSuccess = {
|
onSuccess = {
|
||||||
showToast("删除申报成功")
|
showToast("删除申报成功")
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||||
|
}
|
||||||
|
refresh()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
refresh()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dialog.show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog.show()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -151,40 +151,38 @@ class IntExpTallyViewModel : BasePageViewModel() {
|
|||||||
// return
|
// return
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// 准备变更原因列表(示例数据,可根据实际需求调整)
|
// 从接口获取删除原因列表
|
||||||
val changeReasonList = listOf(
|
launchLoadingCollect({ NetApply.api.getDelReasonList() }) {
|
||||||
KeyValue("01", "运单号错误"),
|
onSuccess = { result ->
|
||||||
KeyValue("02", "件数或重量错误"),
|
val changeReasonList = result.data?.map { it.toKeyValue() } ?: emptyList()
|
||||||
KeyValue("03", "货物信息错误"),
|
|
||||||
KeyValue("04", "航班信息错误"),
|
|
||||||
KeyValue("99", "其他原因")
|
|
||||||
)
|
|
||||||
|
|
||||||
// 创建并显示弹框
|
// 创建并显示弹框
|
||||||
val dialog = IntExpTallyDeleteDialogModel(changeReasonList) { dialogModel ->
|
val dialog = IntExpTallyDeleteDialogModel(changeReasonList) { dialogModel ->
|
||||||
// 弹框确认后的回调
|
// 弹框确认后的回调
|
||||||
val param = GjcDeclareParam(
|
val param = GjcDeclareParam(
|
||||||
dcode = dialogModel.changeReason.value,
|
dcode = dialogModel.changeReason.value,
|
||||||
dcontactsName = dialogModel.contactName.value,
|
dcontactsName = dialogModel.contactName.value,
|
||||||
dcontactsTel = dialogModel.contactPhone.value,
|
dcontactsTel = dialogModel.contactPhone.value,
|
||||||
maWbList = selectedItems
|
maWbList = selectedItems
|
||||||
)
|
)
|
||||||
|
|
||||||
val requestData = param.toRequestBody()
|
val requestData = param.toRequestBody()
|
||||||
|
|
||||||
// 调用删除接口
|
// 调用删除接口
|
||||||
launchLoadingCollect({ NetApply.api.deleteTallyDeclare(requestData) }) {
|
launchLoadingCollect({ NetApply.api.deleteTallyDeclare(requestData) }) {
|
||||||
onSuccess = {
|
onSuccess = {
|
||||||
showToast("删除申报成功")
|
showToast("删除申报成功")
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
FlowBus.with<String>(ConstantEvent.EVENT_REFRESH).emit("refresh")
|
||||||
|
}
|
||||||
|
refresh()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
refresh()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dialog.show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dialog.show()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
android:layout_weight="2"
|
android:layout_weight="2"
|
||||||
android:background="@drawable/bg_table_cell"
|
android:background="@drawable/bg_table_cell"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="2025 年 12月 20 日"
|
tools:text="2025年12月20日"
|
||||||
android:textColor="@color/color_33"
|
android:textColor="@color/color_33"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="计划班期(航班号/日期/目的地)"
|
android:text="计划班期(航班号/日期/目的地)"
|
||||||
android:textColor="@color/color_33"
|
android:textColor="@color/color_33"
|
||||||
android:textSize="14sp" />
|
android:textSize="13sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
|||||||
Reference in New Issue
Block a user