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