feat: 国际出港理货列表项改航程/航班日期/航班号
始发站和目的站合并为航程(range 为空时回退为始发站-目的站拼接), 新增航班日期、航班号栏位,去掉特码。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -167,6 +167,25 @@ data class GjcMaWb(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 航程
|
||||
* 优先取 range;为空时用 始发站-目的站 拼接
|
||||
*/
|
||||
val rangeText: String
|
||||
get() {
|
||||
if (!range.isNullOrBlank()) return range!!
|
||||
val d1 = dep?.takeIf { it.isNotBlank() } ?: ""
|
||||
val d2 = dest?.takeIf { it.isNotBlank() } ?: ""
|
||||
return if (d1.isNotEmpty() && d2.isNotEmpty()) "$d1-$d2" else d1 + d2
|
||||
}
|
||||
|
||||
/**
|
||||
* 航班日期(格式化)
|
||||
* 格式: yyyy-MM-dd
|
||||
*/
|
||||
val flightDateText: String
|
||||
get() = fdate?.let { SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).format(it) } ?: ""
|
||||
|
||||
/**
|
||||
* 清仓正常状态中文
|
||||
* 0-否,1-是
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal">
|
||||
<!-- 运单号 (weight=1.5) -->
|
||||
<LinearLayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1.0" android:orientation="horizontal">
|
||||
<TextView completeSpace="@{4}" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="运单号:" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||
<TextView completeSpace="@{5}" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="运单号:" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.wbNo}" android:textColor="@color/colorPrimary" android:textSize="15sp" android:textStyle="bold"/>
|
||||
</LinearLayout>
|
||||
<!-- 状态 (weight=1) -->
|
||||
@@ -43,29 +43,29 @@
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{String.valueOf((int)bean.weight)}" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<!-- 第二行:特码、始发站、目的站、运单类型、分单数 -->
|
||||
<!-- 第二行:航班日期、航班号、航程、运单类型、分单数 -->
|
||||
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:orientation="horizontal">
|
||||
<!-- 特码 (weight=1.5) -->
|
||||
<!-- 航班日期 (weight=1.0) -->
|
||||
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1.0" android:orientation="horizontal">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="特码:" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.spCode}" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{5}" android:text="航班日期:" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.flightDateText}" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||
</LinearLayout>
|
||||
<!-- 始发站 (weight=1) -->
|
||||
<!-- 航班号 (weight=0.8) -->
|
||||
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="始发站:" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.dep}" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="航班号:" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.fno}" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||
</LinearLayout>
|
||||
<!-- 目的站 (weight=1) -->
|
||||
<!-- 航程 (weight=0.8) -->
|
||||
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="目的站:" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.dest}" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="航程:" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.rangeText}" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||
</LinearLayout>
|
||||
<!-- 运单类型 (weight=1) -->
|
||||
<!-- 运单类型 (weight=1.2) -->
|
||||
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1.2" android:orientation="horizontal">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{5}" android:text="运单类型:" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{bean.awbName}" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||
</LinearLayout>
|
||||
<!-- 分单数 (weight=1) -->
|
||||
<!-- 分单数 (weight=0.8) -->
|
||||
<LinearLayout android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="0.8" android:orientation="horizontal">
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" completeSpace="@{4}" android:text="分单数:" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{String.valueOf(bean.haWbNumber)}" android:textColor="@color/text_normal" android:textSize="15sp"/>
|
||||
|
||||
Reference in New Issue
Block a user