feat: 国际出港-出港仓库
This commit is contained in:
@@ -753,7 +753,7 @@ class HomeFragment : Fragment() {
|
|||||||
RightMenu(
|
RightMenu(
|
||||||
Constant.AuthName.GjcIntExpStorageUse,
|
Constant.AuthName.GjcIntExpStorageUse,
|
||||||
R.mipmap.gjc_cang_ku_icon,
|
R.mipmap.gjc_cang_ku_icon,
|
||||||
"仓库"
|
"出港仓库"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package com.lukouguoji.module_base.bean
|
package com.lukouguoji.module_base.bean
|
||||||
|
|
||||||
import androidx.databinding.ObservableBoolean
|
import androidx.databinding.ObservableBoolean
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Date
|
import java.util.Date
|
||||||
|
import java.util.Locale
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 国际出港主单数据模型
|
* 国际出港主单数据模型
|
||||||
@@ -78,6 +80,7 @@ data class GjcMaWb(
|
|||||||
var declareStatus: String? = null, // 申报状态
|
var declareStatus: String? = null, // 申报状态
|
||||||
var reviewStatus: String? = null, // 审核状态(0:未审核;1:通过;2:退回)
|
var reviewStatus: String? = null, // 审核状态(0:未审核;1:通过;2:退回)
|
||||||
var tranFlag: String? = null, // 转运标志
|
var tranFlag: String? = null, // 转运标志
|
||||||
|
var clearNormal: String? = null, // 清仓正常(0:否,1:是)
|
||||||
|
|
||||||
// ==================== 操作信息 ====================
|
// ==================== 操作信息 ====================
|
||||||
var opDate: String? = null, // 操作时间(入库时间)
|
var opDate: String? = null, // 操作时间(入库时间)
|
||||||
@@ -145,6 +148,34 @@ data class GjcMaWb(
|
|||||||
"1" -> "提前运抵"
|
"1" -> "提前运抵"
|
||||||
else -> arriveFlag ?: ""
|
else -> arriveFlag ?: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 航班信息(格式化后)
|
||||||
|
* 格式: yyyyMMdd/航班号
|
||||||
|
* 示例: 20260108/MU2025
|
||||||
|
*/
|
||||||
|
val flightInfo: String
|
||||||
|
get() {
|
||||||
|
val dateFormat = SimpleDateFormat("yyyyMMdd", Locale.getDefault())
|
||||||
|
val formattedDate = fdate?.let { dateFormat.format(it) } ?: ""
|
||||||
|
val flightNo = fno ?: ""
|
||||||
|
return if (formattedDate.isNotEmpty() && flightNo.isNotEmpty()) {
|
||||||
|
"$formattedDate/$flightNo"
|
||||||
|
} else {
|
||||||
|
flight ?: "" // 如果无法格式化,回退到原始flight字段
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清仓正常状态中文
|
||||||
|
* 0-否,1-是
|
||||||
|
*/
|
||||||
|
val clearNormalText: String
|
||||||
|
get() = when (clearNormal) {
|
||||||
|
"0" -> "否"
|
||||||
|
"1" -> "是"
|
||||||
|
else -> clearNormal ?: ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ import com.lukouguoji.module_base.ktx.toRequestBody
|
|||||||
import com.lukouguoji.module_base.model.ScanModel
|
import com.lukouguoji.module_base.model.ScanModel
|
||||||
import dev.utils.app.info.KeyValue
|
import dev.utils.app.info.KeyValue
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
import java.util.Date
|
||||||
|
import com.lukouguoji.module_base.ktx.formatDate
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 国际出港-仓库 ViewModel
|
* 国际出港-仓库 ViewModel
|
||||||
@@ -25,7 +27,7 @@ import kotlinx.coroutines.launch
|
|||||||
class IntExpStorageUseViewModel : BasePageViewModel() {
|
class IntExpStorageUseViewModel : BasePageViewModel() {
|
||||||
|
|
||||||
// ========== 筛选条件 ==========
|
// ========== 筛选条件 ==========
|
||||||
val flightDate = MutableLiveData("") // 航班日期
|
val flightDate = MutableLiveData(Date().formatDate()) // 航班日期,默认今天
|
||||||
val flightNo = MutableLiveData("") // 航班号
|
val flightNo = MutableLiveData("") // 航班号
|
||||||
val clearResult = MutableLiveData("") // 清仓综合结果
|
val clearResult = MutableLiveData("") // 清仓综合结果
|
||||||
val clearResultList = MutableLiveData<List<KeyValue>>() // 清仓综合结果列表
|
val clearResultList = MutableLiveData<List<KeyValue>>() // 清仓综合结果列表
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
<!-- 清仓综合结果 -->
|
<!-- 清仓综合结果 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
hint='@{"请选择清仓综合结果"}'
|
hint='@{"请选择清仓结果"}'
|
||||||
list="@{viewModel.clearResultList}"
|
list="@{viewModel.clearResultList}"
|
||||||
type="@{SearchLayoutType.SPINNER}"
|
type="@{SearchLayoutType.SPINNER}"
|
||||||
value="@={viewModel.clearResult}"
|
value="@={viewModel.clearResult}"
|
||||||
@@ -66,6 +66,12 @@
|
|||||||
setOnIconClickListener="@{(v)-> viewModel.scanWbNo()}"
|
setOnIconClickListener="@{(v)-> viewModel.scanWbNo()}"
|
||||||
type="@{SearchLayoutType.INPUT}"
|
type="@{SearchLayoutType.INPUT}"
|
||||||
value="@={viewModel.wbNo}"
|
value="@={viewModel.wbNo}"
|
||||||
|
autoQueryEnabled="@{true}"
|
||||||
|
autoQueryUrl="@{`/IntExpStorageUse/queryWbNoList`}"
|
||||||
|
autoQueryParamKey="@{`wbNo`}"
|
||||||
|
autoQueryMinLength="@{4}"
|
||||||
|
autoQueryMaxLength="@{8}"
|
||||||
|
autoQueryTitle="@{`选择运单号`}"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
@@ -199,21 +205,18 @@
|
|||||||
<!-- 清仓按钮 -->
|
<!-- 清仓按钮 -->
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/tv_bottom_btn"
|
style="@style/tv_bottom_btn"
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:onClick="@{()-> viewModel.clearStorage()}"
|
android:onClick="@{()-> viewModel.clearStorage()}"
|
||||||
android:text="清 仓" />
|
android:text="清 仓" />
|
||||||
|
|
||||||
<!-- 修改库位按钮 -->
|
<!-- 修改库位按钮 -->
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/tv_bottom_btn"
|
style="@style/tv_bottom_btn"
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:onClick="@{()-> viewModel.modifyStorage()}"
|
android:onClick="@{()-> viewModel.modifyStorage()}"
|
||||||
android:text="修改库位" />
|
android:text="修改库位" />
|
||||||
|
|
||||||
<!-- 出库按钮 -->
|
<!-- 出库按钮 -->
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/tv_bottom_btn"
|
style="@style/tv_bottom_btn"
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:onClick="@{()-> viewModel.outStorage()}"
|
android:onClick="@{()-> viewModel.outStorage()}"
|
||||||
android:text="出 库" />
|
android:text="出 库" />
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1.0"
|
android:layout_weight="0.9"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -73,7 +73,6 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="运单号:"
|
android:text="运单号:"
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -81,8 +80,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{bean.wbNo}"
|
android:text="@{bean.wbNo}"
|
||||||
android:textColor="@color/colorPrimary"
|
android:textColor="@color/colorPrimary"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp" />
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
@@ -90,7 +88,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.2"
|
android:layout_weight="1.1"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -98,14 +96,12 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{5}"
|
completeSpace="@{5}"
|
||||||
android:text="航班信息:"
|
android:text="航班信息:"
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{bean.flight}"
|
android:text="@{bean.flightInfo}"
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -120,16 +116,14 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{3}"
|
completeSpace="@{5}"
|
||||||
android:text="航程:"
|
android:text="航程:"
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{bean.range}"
|
android:text="@{bean.range}"
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -138,7 +132,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.2"
|
android:layout_weight="1.1"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -146,7 +140,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{5}"
|
completeSpace="@{5}"
|
||||||
android:text="品名(英):"
|
android:text="品名(英):"
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -155,7 +148,6 @@
|
|||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:text="@{bean.goods}"
|
android:text="@{bean.goods}"
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -164,22 +156,20 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0.8"
|
android:layout_weight="0.7"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{3}"
|
completeSpace="@{4}"
|
||||||
android:text="重量:"
|
android:text="重量:"
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{String.valueOf((int)bean.weight)}"
|
android:text="@{String.valueOf((int)bean.weight)}"
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -197,7 +187,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.0"
|
android:layout_weight="0.9"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -205,14 +195,12 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{4}"
|
completeSpace="@{4}"
|
||||||
android:text="代理人:"
|
android:text="代理人:"
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{bean.agentName}"
|
android:text="@{bean.agentCode}"
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -221,7 +209,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.2"
|
android:layout_weight="1.1"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -229,14 +217,12 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{5}"
|
completeSpace="@{5}"
|
||||||
android:text="件数:"
|
android:text="件数:"
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{String.valueOf(bean.pc)}"
|
android:text="@{String.valueOf(bean.pc)}"
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -251,16 +237,14 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{3}"
|
completeSpace="@{5}"
|
||||||
android:text="清仓正常否:"
|
android:text="清仓正常:"
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="是"
|
android:text="@{bean.clearNormalText}"
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -269,7 +253,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.2"
|
android:layout_weight="1.1"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -277,14 +261,12 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{5}"
|
completeSpace="@{5}"
|
||||||
android:text="入库时间:"
|
android:text="入库时间:"
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{bean.opDate}"
|
android:text="@{bean.opDate}"
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -293,22 +275,20 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0.8"
|
android:layout_weight="0.7"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
completeSpace="@{3}"
|
completeSpace="@{4}"
|
||||||
android:text="库位数:"
|
android:text="库位数:"
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@{String.valueOf(bean.storageUseNumber)}"
|
android:text="@{String.valueOf(bean.storageUseNumber)}"
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="16sp" />
|
android:textSize="16sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user