Compare commits
2 Commits
d5631930c4
...
f41d4186ea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f41d4186ea | ||
|
|
d9dc927525 |
@@ -65,6 +65,9 @@ curl -s -X POST "$URL" -H "$AUTH" -H "Content-Type: application/json" \
|
|||||||
- `IntExpMove`:出参无航班字段(缺口 #1)、无操作人姓名(缺口 #2);`opId`/`opdate`/`businessType`
|
- `IntExpMove`:出参无航班字段(缺口 #1)、无操作人姓名(缺口 #2);`opId`/`opdate`/`businessType`
|
||||||
文档有定义但实测恒 null(缺口 #3);`pageQueryTotal` 正常(与 pageQuery 口径一致,`moveState` 过滤生效)
|
文档有定义但实测恒 null(缺口 #3);`pageQueryTotal` 正常(与 pageQuery 口径一致,`moveState` 过滤生效)
|
||||||
- `typeCode/getSpecialCodeByParam`:`flag=1` 国际,`ieFlag` 必须传空串(传 `"E"` 返回空数组)
|
- `typeCode/getSpecialCodeByParam`:`flag=1` 国际,`ieFlag` 必须传空串(传 `"E"` 返回空数组)
|
||||||
|
- `typeCode/searchDateType`:**同一路径两个接口**——`GET ?code=xxx` 是通用字典(`Api.getDictList`),
|
||||||
|
`POST` 无参是「发现时间类型」(`Api.getSearchDateTypeList`,出参 `code` 1~8 + `name` 中英文时机);
|
||||||
|
国际事故签证 `seachDate` 与 Web 端一致存 **name**(历史数据另有 `2026-09-24` 日期值与带 `\r\n` 的 name)
|
||||||
- `eqm/uld`(ULD信息,6 个端点):查询入参仅 `uld`/`status`/`uldSuffix`(uldSuffix 名义是
|
- `eqm/uld`(ULD信息,6 个端点):查询入参仅 `uld`/`status`/`uldSuffix`(uldSuffix 名义是
|
||||||
"uld后两位",实际就是**按所属航司筛选**,配 `DictUtils.getIntCarrierList`);`status` 仅两态
|
"uld后两位",实际就是**按所属航司筛选**,配 `DictUtils.getIntCarrierList`);`status` 仅两态
|
||||||
0 正常/1 故障(三态需求=缺口 #7);无「来源」字段(#8)、无 `checkInDate`/`ifNo` 筛选入参(#9)、
|
0 正常/1 故障(三态需求=缺口 #7);无「来源」字段(#8)、无 `checkInDate`/`ifNo` 筛选入参(#9)、
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.lukouguoji.module_base.adapter
|
|||||||
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.EditText
|
import android.widget.EditText
|
||||||
|
import android.widget.LinearLayout
|
||||||
import androidx.databinding.BindingAdapter
|
import androidx.databinding.BindingAdapter
|
||||||
import com.lukouguoji.module_base.interfaces.IOnFocusChangeListener
|
import com.lukouguoji.module_base.interfaces.IOnFocusChangeListener
|
||||||
|
|
||||||
@@ -27,6 +28,18 @@ fun visible(view: View, visible: Any?) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动态设置 LinearLayout 子 View 的 layout_weight(如按状态切换列宽)
|
||||||
|
*/
|
||||||
|
@BindingAdapter("layoutWeight")
|
||||||
|
fun setLayoutWeight(view: View, weight: Float) {
|
||||||
|
val lp = view.layoutParams as? LinearLayout.LayoutParams ?: return
|
||||||
|
if (lp.weight != weight) {
|
||||||
|
lp.weight = weight
|
||||||
|
view.layoutParams = lp
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@BindingAdapter("setFocusChangedListener")
|
@BindingAdapter("setFocusChangedListener")
|
||||||
fun setOnFocusChangeListener(et: EditText, listener: IOnFocusChangeListener) {
|
fun setOnFocusChangeListener(et: EditText, listener: IOnFocusChangeListener) {
|
||||||
et.onFocusChangeListener = View.OnFocusChangeListener { v, hasFocus ->
|
et.onFocusChangeListener = View.OnFocusChangeListener { v, hasFocus ->
|
||||||
|
|||||||
@@ -2168,6 +2168,12 @@ interface Api {
|
|||||||
@POST("typeCode/unusualType")
|
@POST("typeCode/unusualType")
|
||||||
suspend fun getUnusualTypeList(): DictListBean
|
suspend fun getUnusualTypeList(): DictListBean
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典-发现时间类型(接收时 / 分拣理货时 / 提货时 …)
|
||||||
|
*/
|
||||||
|
@POST("typeCode/searchDateType")
|
||||||
|
suspend fun getSearchDateTypeList(): DictListBean
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// ULD管理
|
// ULD管理
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package com.lukouguoji.gjc.page.assemble
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始组装页「运单列表」列宽权重,表头与 item_assemble_waybill 共用以保证列对齐
|
||||||
|
*
|
||||||
|
* 首次装货成功前后,件数/重量列表头文字长短差异很大(「件数」↔「剩余件数/总件数」),
|
||||||
|
* 一套列宽无法让两种状态下 5 列文字间距都均匀,故按状态各取一套。
|
||||||
|
* 数值即平板(AutoSize 1152dp 基准)上各列的 dp 宽度;「选择」列固定 64dp 不在其中。
|
||||||
|
*/
|
||||||
|
object AssembleWaybillColumns {
|
||||||
|
|
||||||
|
const val WB_NO = 0
|
||||||
|
const val PIECES = 1
|
||||||
|
const val GAP = 2 // 件数与重量之间的间隔
|
||||||
|
const val WEIGHT = 3
|
||||||
|
const val FLIGHT = 4
|
||||||
|
|
||||||
|
/** 表头「件数 / 重量」 */
|
||||||
|
private val TOTAL = floatArrayOf(237f, 72f, 76f, 72f, 250f)
|
||||||
|
|
||||||
|
/** 表头「剩余件数/总件数 / 剩余重量/总重量」;重量列放宽到 140,容纳"120856.0/123456.0"不换行 */
|
||||||
|
private val REMAINING = floatArrayOf(199f, 120f, 57f, 140f, 192f)
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
fun weight(column: Int, showRemaining: Boolean): Float =
|
||||||
|
(if (showRemaining) REMAINING else TOTAL)[column]
|
||||||
|
}
|
||||||
@@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
|
<import type="com.lukouguoji.module_base.ui.weight.search.layout.SearchLayoutType" />
|
||||||
|
|
||||||
|
<import type="com.lukouguoji.gjc.page.assemble.AssembleWaybillColumns" />
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="viewModel"
|
name="viewModel"
|
||||||
type="com.lukouguoji.gjc.viewModel.IntExpAssembleStartViewModel" />
|
type="com.lukouguoji.gjc.viewModel.IntExpAssembleStartViewModel" />
|
||||||
@@ -179,7 +181,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.WB_NO, viewModel.hasLoadedOnce)}"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="运单号"
|
android:text="运单号"
|
||||||
android:textColor="@color/text_normal"
|
android:textColor="@color/text_normal"
|
||||||
@@ -187,17 +189,25 @@
|
|||||||
|
|
||||||
<!-- 件数 -->
|
<!-- 件数 -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="120dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.PIECES, viewModel.hasLoadedOnce)}"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text='@{viewModel.hasLoadedOnce ? "剩余件数/总件数" : "件数"}'
|
android:text='@{viewModel.hasLoadedOnce ? "剩余件数/总件数" : "件数"}'
|
||||||
android:textColor="@color/text_normal"
|
android:textColor="@color/text_normal"
|
||||||
android:textSize="13sp" />
|
android:textSize="13sp" />
|
||||||
|
|
||||||
|
<!-- 件数与重量列间距(列宽见 AssembleWaybillColumns) -->
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.GAP, viewModel.hasLoadedOnce)}" />
|
||||||
|
|
||||||
<!-- 重量 -->
|
<!-- 重量 -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="120dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.WEIGHT, viewModel.hasLoadedOnce)}"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text='@{viewModel.hasLoadedOnce ? "剩余重量/总重量" : "重量"}'
|
android:text='@{viewModel.hasLoadedOnce ? "剩余重量/总重量" : "重量"}'
|
||||||
android:textColor="@color/text_normal"
|
android:textColor="@color/text_normal"
|
||||||
@@ -207,7 +217,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.2"
|
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.FLIGHT, viewModel.hasLoadedOnce)}"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="配载航班"
|
android:text="配载航班"
|
||||||
android:textColor="@color/text_normal"
|
android:textColor="@color/text_normal"
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
<import type="android.view.View" />
|
<import type="android.view.View" />
|
||||||
|
|
||||||
|
<import type="com.lukouguoji.gjc.page.assemble.AssembleWaybillColumns" />
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="bean"
|
name="bean"
|
||||||
type="com.lukouguoji.module_base.bean.AssembleWaybillBean" />
|
type="com.lukouguoji.module_base.bean.AssembleWaybillBean" />
|
||||||
@@ -44,7 +46,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.WB_NO, bean.showRemaining)}"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@{bean.waybillNo}"
|
android:text="@{bean.waybillNo}"
|
||||||
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
|
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
|
||||||
@@ -52,17 +54,25 @@
|
|||||||
|
|
||||||
<!-- 件数 -->
|
<!-- 件数 -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="120dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.PIECES, bean.showRemaining)}"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@{bean.piecesDisplay}"
|
android:text="@{bean.piecesDisplay}"
|
||||||
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
|
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<!-- 件数与重量列间距(列宽见 AssembleWaybillColumns) -->
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.GAP, bean.showRemaining)}" />
|
||||||
|
|
||||||
<!-- 重量 -->
|
<!-- 重量 -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="120dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.WEIGHT, bean.showRemaining)}"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@{bean.weightDisplay}"
|
android:text="@{bean.weightDisplay}"
|
||||||
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
|
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
|
||||||
@@ -72,7 +82,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.2"
|
layoutWeight="@{AssembleWaybillColumns.weight(AssembleWaybillColumns.FLIGHT, bean.showRemaining)}"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@{bean.fLightInfo}"
|
android:text="@{bean.fLightInfo}"
|
||||||
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
|
android:textColor="@{bean.isMarked ? @color/text_red : @color/text_normal}"
|
||||||
|
|||||||
@@ -60,6 +60,8 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
|
|||||||
val damageTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
val damageTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||||
val contentTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
val contentTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||||
val unusualTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
val unusualTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||||
|
val searchDateTypeList = MutableLiveData<List<KeyValue>>(emptyList())
|
||||||
|
private var searchDateTypeDict = emptyList<KeyValue>()
|
||||||
val photoList = MutableLiveData(
|
val photoList = MutableLiveData(
|
||||||
listOf(KeyValue("是", "是"), KeyValue("否", "否"))
|
listOf(KeyValue("是", "是"), KeyValue("否", "否"))
|
||||||
)
|
)
|
||||||
@@ -137,12 +139,33 @@ class IntImpAccidentVisaEditViewModel : BaseViewModel(), IOnItemClickListener {
|
|||||||
} ?: emptyList()
|
} ?: emptyList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 发现时间:与 Web 端一致提交字典 name(如"接收时 Cargo Acceptation")
|
||||||
|
launchCollect({ NetApply.api.getSearchDateTypeList() }) {
|
||||||
|
onSuccess = { result ->
|
||||||
|
searchDateTypeDict = result.data?.mapNotNull { bean ->
|
||||||
|
bean.name?.let { name -> KeyValue(name, name) }
|
||||||
|
} ?: emptyList()
|
||||||
|
refreshSearchDateTypeList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 历史数据的发现时间不一定在字典内(早期按日期录入如"2026-09-24",Web 端存值可能带尾随换行),
|
||||||
|
* 编辑/详情时把原值补进下拉列表,避免回显为空、保存时被下拉清掉
|
||||||
|
*/
|
||||||
|
private fun refreshSearchDateTypeList() {
|
||||||
|
val current = dataBean.value?.seachDate.orEmpty()
|
||||||
|
searchDateTypeList.value =
|
||||||
|
if (current.isEmpty() || searchDateTypeDict.any { it.value == current }) searchDateTypeDict
|
||||||
|
else searchDateTypeDict + KeyValue(current.trim(), current)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun loadDetail() {
|
private fun loadDetail() {
|
||||||
launchLoadingCollect({ NetApply.api.getGjAccidentVisaDetail(id) }) {
|
launchLoadingCollect({ NetApply.api.getGjAccidentVisaDetail(id) }) {
|
||||||
onSuccess = {
|
onSuccess = {
|
||||||
dataBean.value = it.data ?: GjAccidentVisaEditBean()
|
dataBean.value = it.data ?: GjAccidentVisaEditBean()
|
||||||
|
refreshSearchDateTypeList()
|
||||||
|
|
||||||
// 渲染图片:path 取原图 URL 确保预览清晰,url 取缩略图用于提交
|
// 渲染图片:path 取原图 URL 确保预览清晰,url 取缩略图用于提交
|
||||||
val bean = dataBean.value!!
|
val bean = dataBean.value!!
|
||||||
|
|||||||
@@ -285,9 +285,10 @@
|
|||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
enable="@{!viewModel.isDetailMode}"
|
enable="@{!viewModel.isDetailMode}"
|
||||||
hint='@{"请选择发现时间"}'
|
hint='@{"请选择发现时间"}'
|
||||||
|
list="@{viewModel.searchDateTypeList}"
|
||||||
title='@{"发现时间"}'
|
title='@{"发现时间"}'
|
||||||
titleLength="@{6}"
|
titleLength="@{6}"
|
||||||
type="@{DataLayoutType.DATE}"
|
type="@{DataLayoutType.SPINNER}"
|
||||||
value='@={viewModel.dataBean.seachDate}' />
|
value='@={viewModel.dataBean.seachDate}' />
|
||||||
|
|
||||||
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
<com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayoutNew
|
||||||
|
|||||||
Reference in New Issue
Block a user