feat: 航班表单三个枚举下拉对接字典接口并补全字段
新增页补上飞行状态输入项;飞行状态、航班服务种类、航班状态三个 下拉改为调用 typeCode 字典接口,替换原有的硬编码选项(旧的航班 状态码值与服务端实际码值完全不同)。详情页加载同一批字典,按值 反查并显示 label。新增页与详情页字段对齐为同一套。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -312,6 +312,24 @@ interface Api {
|
||||
@POST("typeCode/countryType")
|
||||
suspend fun getCountryTypeList(): DictListBean
|
||||
|
||||
/**
|
||||
* 获取飞行状态
|
||||
*/
|
||||
@POST("typeCode/flightPortCode")
|
||||
suspend fun getFlightPortCodeList(): DictListBean
|
||||
|
||||
/**
|
||||
* 获取航班服务种类
|
||||
*/
|
||||
@POST("typeCode/flightServiceType")
|
||||
suspend fun getFlightServiceTypeList(): DictListBean
|
||||
|
||||
/**
|
||||
* 获取航班状态
|
||||
*/
|
||||
@POST("typeCode/flightStatus")
|
||||
suspend fun getFlightStatusList(): DictListBean
|
||||
|
||||
/**
|
||||
* 获取国家代码
|
||||
*/
|
||||
|
||||
@@ -490,6 +490,60 @@ object DictUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 飞行状态(0:前方起飞 1:过站登机 2:登机结束 6:到达 7:登机 9:正在值机 …)
|
||||
*/
|
||||
fun getFlightPortCodeList(
|
||||
addAll: Boolean = true,
|
||||
checkedValue: String? = null,
|
||||
callBack: (List<KeyValue>) -> Unit
|
||||
) {
|
||||
launchCollect({
|
||||
NetApply.api
|
||||
.getFlightPortCodeList()
|
||||
}) {
|
||||
onSuccess = {
|
||||
handleCallBack(it, checkedValue, addAll, callBack)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 航班服务种类(0:客机 1:货机 2:卡车)
|
||||
*/
|
||||
fun getFlightServiceTypeList(
|
||||
addAll: Boolean = true,
|
||||
checkedValue: String? = null,
|
||||
callBack: (List<KeyValue>) -> Unit
|
||||
) {
|
||||
launchCollect({
|
||||
NetApply.api
|
||||
.getFlightServiceTypeList()
|
||||
}) {
|
||||
onSuccess = {
|
||||
handleCallBack(it, checkedValue, addAll, callBack)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 航班状态(3:返航 4:地面滑回 5:备降 8:取消 12:延误 15:删除 16:未知)
|
||||
*/
|
||||
fun getFlightStatusList(
|
||||
addAll: Boolean = true,
|
||||
checkedValue: String? = null,
|
||||
callBack: (List<KeyValue>) -> Unit
|
||||
) {
|
||||
launchCollect({
|
||||
NetApply.api
|
||||
.getFlightStatusList()
|
||||
}) {
|
||||
onSuccess = {
|
||||
handleCallBack(it, checkedValue, addAll, callBack)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色列表
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user