feat: opt 出港计重 完成计重
This commit is contained in:
@@ -190,7 +190,10 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
||||
* 航班日期点击
|
||||
*/
|
||||
fun flightDateClick(view: View) {
|
||||
Common.onYearMonthDay(view.context.getActivity(), maWbBean.value?.fdate?.formatDate()) { year, month, day ->
|
||||
Common.onYearMonthDay(
|
||||
view.context.getActivity(),
|
||||
maWbBean.value?.fdate?.formatDate()
|
||||
) { year, month, day ->
|
||||
val calendar = Calendar.getInstance()
|
||||
calendar.set(year, month - 1, day)
|
||||
val date = calendar.time
|
||||
@@ -260,8 +263,10 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
||||
bean.apply {
|
||||
// 更新运抵数据(如果用户已编辑)
|
||||
arrivePc = this@GjcWeighingStartViewModel.arrivePc.value?.toLongOrNull() ?: arrivePc
|
||||
arriveWeight = this@GjcWeighingStartViewModel.arriveWeight.value?.toDoubleOrNull() ?: arriveWeight
|
||||
arriveVolume = this@GjcWeighingStartViewModel.arriveVolume.value?.toDoubleOrNull() ?: arriveVolume
|
||||
arriveWeight =
|
||||
this@GjcWeighingStartViewModel.arriveWeight.value?.toDoubleOrNull() ?: arriveWeight
|
||||
arriveVolume =
|
||||
this@GjcWeighingStartViewModel.arriveVolume.value?.toDoubleOrNull() ?: arriveVolume
|
||||
// 添加通道号
|
||||
passageWay = this@GjcWeighingStartViewModel.channel.value
|
||||
}
|
||||
@@ -313,9 +318,6 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
||||
if (channel.value.verifyNullOrEmpty("请选择通道号")) return
|
||||
|
||||
// 从编辑字段获取数值
|
||||
val pc = realTimePc.value?.toLongOrNull() ?: bean.pc
|
||||
val weight = realTimeWeight.value?.toDoubleOrNull() ?: bean.weight
|
||||
val volume = realTimeVolume.value?.toDoubleOrNull() ?: bean.volume
|
||||
val arrivePcVal = arrivePc.value?.toLongOrNull() ?: bean.arrivePc
|
||||
val arriveWeightVal = arriveWeight.value?.toDoubleOrNull() ?: bean.arriveWeight
|
||||
val arriveVolumeVal = arriveVolume.value?.toDoubleOrNull() ?: bean.arriveVolume
|
||||
@@ -337,9 +339,9 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
||||
"dest" to bean.dest,
|
||||
"dest1" to bean.dest1,
|
||||
"dest2" to bean.dest2,
|
||||
"pc" to pc,
|
||||
"weight" to weight,
|
||||
"volume" to volume,
|
||||
"pc" to bean.pc,
|
||||
"weight" to bean.weight,
|
||||
"volume" to bean.volume,
|
||||
"arrivePc" to arrivePcVal,
|
||||
"arriveWeight" to arriveWeightVal,
|
||||
"arriveVolume" to arriveVolumeVal,
|
||||
@@ -385,9 +387,11 @@ class GjcWeighingStartViewModel : BaseViewModel() {
|
||||
Constant.RequestCode.WAYBILL -> {
|
||||
maWbBean.value = maWbBean.value?.apply { no = content }
|
||||
}
|
||||
|
||||
Constant.RequestCode.FLIGHT_NO -> {
|
||||
maWbBean.value = maWbBean.value?.apply { fno = content }
|
||||
}
|
||||
|
||||
Constant.RequestCode.CAR -> {
|
||||
maWbBean.value = maWbBean.value?.apply { carId = content }
|
||||
// 查询托盘车自重
|
||||
|
||||
Reference in New Issue
Block a user