feat: 国际出港 出港组装 开始组装
This commit is contained in:
@@ -417,7 +417,10 @@ interface Api {
|
|||||||
* 接口路径: /IntExpCheckInCheck/back
|
* 接口路径: /IntExpCheckInCheck/back
|
||||||
*/
|
*/
|
||||||
@POST("IntExpCheckInCheck/back")
|
@POST("IntExpCheckInCheck/back")
|
||||||
suspend fun backGjcInspection(@Query("reason") reason: String, @Body data: RequestBody): BaseResultBean<Boolean>
|
suspend fun backGjcInspection(
|
||||||
|
@Query("reason") reason: String,
|
||||||
|
@Body data: RequestBody
|
||||||
|
): BaseResultBean<Boolean>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 条件查询-国际出港-收运审核-统计数据(总件数、总重量、运单总数)
|
* 条件查询-国际出港-收运审核-统计数据(总件数、总重量、运单总数)
|
||||||
@@ -572,8 +575,8 @@ interface Api {
|
|||||||
* 国际出港组装 - 查询待组装运单列表
|
* 国际出港组装 - 查询待组装运单列表
|
||||||
* 接口路径: /IntExpAssemble/queryWaitingAssemble
|
* 接口路径: /IntExpAssemble/queryWaitingAssemble
|
||||||
*/
|
*/
|
||||||
@POST("IntExpAssemble/queryWaitingAssemble")
|
@GET("IntExpAssemble/queryWaitingAssemble")
|
||||||
suspend fun queryWaitingAssemble(@Body data: RequestBody): BaseResultBean<MutableList<GjcWarehouse>>
|
suspend fun queryWaitingAssemble(@Query("wbNo") wbNo: String): BaseResultBean<MutableList<GjcWarehouse>>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 国际出港出库交接-分页查询
|
* 国际出港出库交接-分页查询
|
||||||
@@ -1215,6 +1218,7 @@ interface Api {
|
|||||||
*/
|
*/
|
||||||
@POST
|
@POST
|
||||||
suspend fun getWbNoList(@Url url: String, @Body data: RequestBody): BaseResultBean<List<String>>
|
suspend fun getWbNoList(@Url url: String, @Body data: RequestBody): BaseResultBean<List<String>>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取-国内出港-分配-列表
|
* 获取-国内出港-分配-列表
|
||||||
*/
|
*/
|
||||||
@@ -1233,6 +1237,7 @@ interface Api {
|
|||||||
*/
|
*/
|
||||||
@POST("flt/searchHandoverByFid")
|
@POST("flt/searchHandoverByFid")
|
||||||
suspend fun getHandover(@Query("fid") fid: String): BaseResultBean<FlightBean>
|
suspend fun getHandover(@Query("fid") fid: String): BaseResultBean<FlightBean>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取-国内出港-存放-列表
|
* 获取-国内出港-存放-列表
|
||||||
*/
|
*/
|
||||||
@@ -1289,7 +1294,6 @@ interface Api {
|
|||||||
fun queryWbDetailById(@Query("wbId") wbId: Int): BaseResultBean<GncShouYunBean>
|
fun queryWbDetailById(@Query("wbId") wbId: Int): BaseResultBean<GncShouYunBean>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取-货物转运-列表
|
* 获取-货物转运-列表
|
||||||
*/
|
*/
|
||||||
@@ -1337,6 +1341,7 @@ interface Api {
|
|||||||
*/
|
*/
|
||||||
@POST("DomTransportLog/search")
|
@POST("DomTransportLog/search")
|
||||||
suspend fun getTransportLogList(@Body data: RequestBody): BaseListBean<TransportLogBean>
|
suspend fun getTransportLogList(@Body data: RequestBody): BaseListBean<TransportLogBean>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 国内 单证交接 列表
|
* 国内 单证交接 列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ class IntExpAssembleStartActivity :
|
|||||||
// 初始化列表
|
// 初始化列表
|
||||||
initRecyclerViews()
|
initRecyclerViews()
|
||||||
|
|
||||||
// 加载模拟数据
|
// 初始化加载待组装运单数据
|
||||||
viewModel.initMockData()
|
viewModel.loadInitialWaitingAssemble()
|
||||||
|
|
||||||
// 加载组装位置数据(从API)
|
// 加载组装位置数据(从API)
|
||||||
viewModel.loadAssemblePosition()
|
viewModel.loadAssemblePosition()
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import com.lukouguoji.module_base.common.Constant
|
|||||||
import com.lukouguoji.module_base.http.net.NetApply
|
import com.lukouguoji.module_base.http.net.NetApply
|
||||||
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
import com.lukouguoji.module_base.ktx.launchLoadingCollect
|
||||||
import com.lukouguoji.module_base.ktx.showToast
|
import com.lukouguoji.module_base.ktx.showToast
|
||||||
import com.lukouguoji.module_base.ktx.toRequestBody
|
|
||||||
import com.lukouguoji.module_base.model.ScanModel
|
import com.lukouguoji.module_base.model.ScanModel
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -41,113 +40,16 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
|||||||
val waybillViewHolder = AssembleWaybillViewHolder::class.java
|
val waybillViewHolder = AssembleWaybillViewHolder::class.java
|
||||||
|
|
||||||
// ========== ULD信息 ==========
|
// ========== ULD信息 ==========
|
||||||
val uldInfo = MutableLiveData(UldInfoBean().apply {
|
val uldInfo = MutableLiveData(UldInfoBean())
|
||||||
uldNo = "PMC12345MU"
|
|
||||||
materialWeight = ""
|
|
||||||
uldStatus = "正常"
|
|
||||||
})
|
|
||||||
|
|
||||||
// ========== 运单信息 ==========
|
// ========== 运单信息 ==========
|
||||||
val waybillInfo = MutableLiveData(WaybillInfoBean().apply {
|
val waybillInfo = MutableLiveData(WaybillInfoBean())
|
||||||
waybillNo = "78112345678"
|
|
||||||
waybillPieces = "100"
|
|
||||||
waybillWeight = "200"
|
|
||||||
assembleCount = ""
|
|
||||||
assembleWeight = ""
|
|
||||||
operator = "张三"
|
|
||||||
})
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化模拟数据
|
* 初始化模拟数据(已废弃)
|
||||||
*/
|
*/
|
||||||
fun initMockData() {
|
fun initMockData() {
|
||||||
// 组装信息列表(左侧)
|
// 不再加载mock数据
|
||||||
assembleInfoList.value = mutableListOf(
|
|
||||||
AssembleInfoBean().apply {
|
|
||||||
uldNo = "PMC12345MU"
|
|
||||||
weightInfo = "100/290kg"
|
|
||||||
hasArrow = true
|
|
||||||
isOrange = false
|
|
||||||
showIndex = true
|
|
||||||
},
|
|
||||||
AssembleInfoBean().apply {
|
|
||||||
uldNo = "AKE453654CZ"
|
|
||||||
weightInfo = "100/290kg"
|
|
||||||
hasArrow = true
|
|
||||||
isOrange = false
|
|
||||||
showIndex = true
|
|
||||||
},
|
|
||||||
AssembleInfoBean().apply {
|
|
||||||
uldNo = "AKE598190CZ"
|
|
||||||
weightInfo = "100/290kg"
|
|
||||||
hasArrow = true
|
|
||||||
isOrange = false
|
|
||||||
showIndex = true
|
|
||||||
},
|
|
||||||
AssembleInfoBean().apply {
|
|
||||||
uldNo = "78112345678"
|
|
||||||
weightInfo = "100/100kg"
|
|
||||||
hasArrow = false
|
|
||||||
isOrange = true
|
|
||||||
showIndex = false
|
|
||||||
},
|
|
||||||
AssembleInfoBean().apply {
|
|
||||||
uldNo = "78112345999"
|
|
||||||
weightInfo = "150/200kg"
|
|
||||||
hasArrow = false
|
|
||||||
isOrange = true
|
|
||||||
showIndex = false
|
|
||||||
},
|
|
||||||
AssembleInfoBean().apply {
|
|
||||||
uldNo = "78112345454"
|
|
||||||
weightInfo = "120/300kg"
|
|
||||||
hasArrow = false
|
|
||||||
isOrange = true
|
|
||||||
showIndex = false
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
// 组装位置列表(左侧)- 已改为从API加载,不再使用模拟数据
|
|
||||||
// assemblePositionList.value = mutableListOf(
|
|
||||||
// AssemblePositionBean().apply {
|
|
||||||
// positionName = "组装区001"
|
|
||||||
// isSelected = true
|
|
||||||
// },
|
|
||||||
// AssemblePositionBean().apply {
|
|
||||||
// positionName = "组装区002"
|
|
||||||
// isSelected = false
|
|
||||||
// },
|
|
||||||
// AssemblePositionBean().apply {
|
|
||||||
// positionName = "组装区003"
|
|
||||||
// isSelected = false
|
|
||||||
// },
|
|
||||||
// AssemblePositionBean().apply {
|
|
||||||
// positionName = "组装区004"
|
|
||||||
// isSelected = false
|
|
||||||
// }
|
|
||||||
// )
|
|
||||||
|
|
||||||
// 运单列表(右侧)
|
|
||||||
waybillList.value = mutableListOf(
|
|
||||||
AssembleWaybillBean().apply {
|
|
||||||
waybillNo = "99912345678"
|
|
||||||
pieces = "25"
|
|
||||||
weight = "350.5"
|
|
||||||
isMarked = false
|
|
||||||
},
|
|
||||||
AssembleWaybillBean().apply {
|
|
||||||
waybillNo = "99912345679"
|
|
||||||
pieces = "18"
|
|
||||||
weight = "280.0"
|
|
||||||
isMarked = true // 标记为红色
|
|
||||||
},
|
|
||||||
AssembleWaybillBean().apply {
|
|
||||||
waybillNo = "99912345680"
|
|
||||||
pieces = "32"
|
|
||||||
weight = "520.8"
|
|
||||||
isMarked = false
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -211,11 +113,8 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 构建请求参数
|
|
||||||
val params = mapOf("wbNo" to wbNo).toRequestBody()
|
|
||||||
|
|
||||||
// 发起网络请求
|
// 发起网络请求
|
||||||
launchLoadingCollect({ NetApply.api.queryWaitingAssemble(params) }) {
|
launchLoadingCollect({ NetApply.api.queryWaitingAssemble(wbNo) }) {
|
||||||
onSuccess = { result ->
|
onSuccess = { result ->
|
||||||
// 数据转换: GjcWarehouse -> AssembleWaybillBean
|
// 数据转换: GjcWarehouse -> AssembleWaybillBean
|
||||||
val warehouseList = result.data ?: mutableListOf()
|
val warehouseList = result.data ?: mutableListOf()
|
||||||
@@ -246,6 +145,36 @@ class IntExpAssembleStartViewModel : BaseViewModel() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化加载待组装运单列表(页面打开时调用)
|
||||||
|
*/
|
||||||
|
fun loadInitialWaitingAssemble() {
|
||||||
|
launchLoadingCollect({ NetApply.api.queryWaitingAssemble("") }) {
|
||||||
|
onSuccess = { result ->
|
||||||
|
val warehouseList = result.data ?: mutableListOf()
|
||||||
|
val waybillBeanList = warehouseList.map { warehouse ->
|
||||||
|
AssembleWaybillBean().apply {
|
||||||
|
waybillNo = warehouse.no
|
||||||
|
pieces = warehouse.pc.toString()
|
||||||
|
weight = String.format("%.1f", warehouse.weight)
|
||||||
|
flight = warehouse.flight
|
||||||
|
isMarked = false
|
||||||
|
}
|
||||||
|
}.toMutableList()
|
||||||
|
|
||||||
|
waybillList.value = waybillBeanList
|
||||||
|
|
||||||
|
if (waybillBeanList.isEmpty()) {
|
||||||
|
showToast("暂无待组装运单")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onFailed = { code, message ->
|
||||||
|
showToast("加载失败: $message")
|
||||||
|
waybillList.value = mutableListOf()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 卸货按钮点击
|
* 卸货按钮点击
|
||||||
|
|||||||
@@ -137,27 +137,22 @@
|
|||||||
<com.google.android.material.divider.MaterialDivider
|
<com.google.android.material.divider.MaterialDivider
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
app:dividerColor="@color/line" />
|
app:dividerColor="@color/line" />
|
||||||
|
|
||||||
<!-- 运单列表表头 -->
|
<!-- 运单列表表头 -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="40dp"
|
android:layout_height="28dp"
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:background="@color/color_f2"
|
android:background="@color/color_f2"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:paddingHorizontal="8dp">
|
android:paddingHorizontal="8dp">
|
||||||
|
|
||||||
<!-- 序号 -->
|
<!-- 序号 -->
|
||||||
<TextView
|
|
||||||
android:layout_width="40dp"
|
<Space
|
||||||
|
android:layout_width="64dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="序号"
|
|
||||||
android:textColor="@color/text_normal"
|
|
||||||
android:textSize="14sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:gravity="center" />
|
android:gravity="center" />
|
||||||
|
|
||||||
<!-- 运单号 -->
|
<!-- 运单号 -->
|
||||||
@@ -166,29 +161,27 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="运单号"
|
android:text="运单号"
|
||||||
|
android:gravity="center"
|
||||||
android:textColor="@color/text_normal"
|
android:textColor="@color/text_normal"
|
||||||
android:textSize="14sp"
|
android:textSize="13sp"/>
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<!-- 件数 -->
|
<!-- 件数 -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="60dp"
|
android:layout_width="120dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="件数"
|
android:text="件数"
|
||||||
android:textColor="@color/text_normal"
|
android:textColor="@color/text_normal"
|
||||||
android:textSize="14sp"
|
android:textSize="13sp"
|
||||||
android:textStyle="bold"
|
|
||||||
android:gravity="center" />
|
android:gravity="center" />
|
||||||
|
|
||||||
<!-- 重量 -->
|
<!-- 重量 -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="80dp"
|
android:layout_width="120dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="重量"
|
android:text="重量"
|
||||||
android:textColor="@color/text_normal"
|
android:textColor="@color/text_normal"
|
||||||
android:textSize="14sp"
|
android:textSize="13sp"
|
||||||
android:textStyle="bold"
|
android:gravity="center" />
|
||||||
android:gravity="end" />
|
|
||||||
|
|
||||||
<!-- 配载航班 -->
|
<!-- 配载航班 -->
|
||||||
<TextView
|
<TextView
|
||||||
@@ -197,8 +190,7 @@
|
|||||||
android:layout_weight="1.2"
|
android:layout_weight="1.2"
|
||||||
android:text="配载航班"
|
android:text="配载航班"
|
||||||
android:textColor="@color/text_normal"
|
android:textColor="@color/text_normal"
|
||||||
android:textSize="14sp"
|
android:textSize="13sp"
|
||||||
android:textStyle="bold"
|
|
||||||
android:gravity="center" />
|
android:gravity="center" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,13 @@
|
|||||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<data>
|
<data>
|
||||||
|
|
||||||
<import type="android.view.View" />
|
<import type="android.view.View" />
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="bean"
|
name="bean"
|
||||||
type="com.lukouguoji.module_base.bean.AssembleWaybillBean" />
|
type="com.lukouguoji.module_base.bean.AssembleWaybillBean" />
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="position"
|
name="position"
|
||||||
type="Integer" />
|
type="Integer" />
|
||||||
@@ -14,56 +17,57 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:background="@color/white"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:paddingVertical="12dp"
|
android:orientation="horizontal"
|
||||||
android:paddingHorizontal="8dp"
|
android:paddingHorizontal="8dp"
|
||||||
android:background="@color/white">
|
android:paddingVertical="12dp">
|
||||||
|
|
||||||
<!-- 序号 -->
|
<!-- 序号 -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="40dp"
|
android:layout_width="64dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
android:text="@{String.valueOf(position + 1)}"
|
android:text="@{String.valueOf(position + 1)}"
|
||||||
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" />
|
||||||
android:gravity="center" />
|
|
||||||
|
|
||||||
<!-- 运单号 -->
|
<!-- 运单号 -->
|
||||||
<TextView
|
<TextView
|
||||||
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"
|
||||||
|
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}"
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
<!-- 件数 -->
|
<!-- 件数 -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="60dp"
|
android:layout_width="120dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
android:text="@{bean.pieces}"
|
android:text="@{bean.pieces}"
|
||||||
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" />
|
||||||
android:gravity="center" />
|
|
||||||
|
|
||||||
<!-- 重量 -->
|
<!-- 重量 -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="80dp"
|
android:layout_width="120dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
android:text="@{bean.weight}"
|
android:text="@{bean.weight}"
|
||||||
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" />
|
||||||
android:gravity="end" />
|
|
||||||
|
|
||||||
<!-- 配载航班 -->
|
<!-- 配载航班 -->
|
||||||
<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"
|
android:layout_weight="1.2"
|
||||||
|
android:gravity="center"
|
||||||
android:text="@{bean.flight}"
|
android:text="@{bean.flight}"
|
||||||
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" />
|
||||||
android:gravity="center" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
Reference in New Issue
Block a user