feat: 出港计重 ui
This commit is contained in:
@@ -36,7 +36,6 @@ class GjcWeighingViewModel : BasePageViewModel() {
|
|||||||
val totalCount = MutableLiveData("0") // 合计票数
|
val totalCount = MutableLiveData("0") // 合计票数
|
||||||
val totalPc = MutableLiveData("0") // 总件数
|
val totalPc = MutableLiveData("0") // 总件数
|
||||||
val totalWeight = MutableLiveData("0") // 总重量
|
val totalWeight = MutableLiveData("0") // 总重量
|
||||||
val cargoWeight = MutableLiveData("0") // 总货重
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// 方法区
|
// 方法区
|
||||||
@@ -79,6 +78,13 @@ class GjcWeighingViewModel : BasePageViewModel() {
|
|||||||
GjcWeighingRecordListActivity.start(getTopActivity())
|
GjcWeighingRecordListActivity.start(getTopActivity())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提前运抵
|
||||||
|
*/
|
||||||
|
fun arrivedAhead() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取列表数据
|
* 获取列表数据
|
||||||
*/
|
*/
|
||||||
@@ -121,7 +127,6 @@ class GjcWeighingViewModel : BasePageViewModel() {
|
|||||||
totalCount.value = (data?.wbNumber ?: 0).toString()
|
totalCount.value = (data?.wbNumber ?: 0).toString()
|
||||||
totalPc.value = (data?.totalPc ?: 0).toString()
|
totalPc.value = (data?.totalPc ?: 0).toString()
|
||||||
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
|
totalWeight.value = (data?.totalWeight ?: 0.0).toString()
|
||||||
cargoWeight.value = (data?.cargoWeight ?: 0.0).toString()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,73 +31,77 @@
|
|||||||
|
|
||||||
<!-- 航班日期 -->
|
<!-- 航班日期 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
hint='@{"请选择航班日期"}'
|
hint='@{"请选择航班日期"}'
|
||||||
icon="@{@drawable/img_date}"
|
icon="@{@drawable/img_date}"
|
||||||
type="@{SearchLayoutType.DATE}"
|
type="@{SearchLayoutType.DATE}"
|
||||||
value="@={viewModel.flightDate}" />
|
value="@={viewModel.flightDate}"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<!-- 航班号 -->
|
<!-- 航班号 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
hint='@{"请输入航班号"}'
|
hint='@{"请输入航班号"}'
|
||||||
icon="@{@drawable/img_scan}"
|
icon="@{@drawable/img_scan}"
|
||||||
setOnIconClickListener="@{()-> viewModel.flightNoScanClick()}"
|
setOnIconClickListener="@{()-> viewModel.flightNoScanClick()}"
|
||||||
type="@{SearchLayoutType.INPUT}"
|
type="@{SearchLayoutType.INPUT}"
|
||||||
value="@={viewModel.flightNo}" />
|
value="@={viewModel.flightNo}"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<!-- 择代理 -->
|
<!-- 择代理 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
hint='@{"请选择代理"}'
|
hint='@{"请选择代理"}'
|
||||||
type="@{SearchLayoutType.SPINNER}"
|
type="@{SearchLayoutType.SPINNER}"
|
||||||
value="@={viewModel.agentCode}" />
|
value="@={viewModel.agentCode}"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<!-- 择特码 -->
|
<!-- 择特码 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
hint='@{"请选择特码"}'
|
hint='@{"请选择特码"}'
|
||||||
type="@{SearchLayoutType.SPINNER}"
|
type="@{SearchLayoutType.SPINNER}"
|
||||||
value="@={viewModel.spCode}" />
|
value="@={viewModel.spCode}"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<!-- 运单号 -->
|
<!-- 运单号 -->
|
||||||
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
<com.lukouguoji.module_base.ui.weight.search.layout.PadSearchLayout
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
hint='@{"请输入运单号"}'
|
hint='@{"请输入运单号"}'
|
||||||
icon="@{@drawable/img_scan}"
|
icon="@{@drawable/img_scan}"
|
||||||
setOnIconClickListener="@{()-> viewModel.waybillNoScanClick()}"
|
setOnIconClickListener="@{()-> viewModel.waybillNoScanClick()}"
|
||||||
type="@{SearchLayoutType.INPUT}"
|
type="@{SearchLayoutType.INPUT}"
|
||||||
value="@={viewModel.waybillNo}" />
|
value="@={viewModel.waybillNo}"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<!-- 搜索和添加按钮 -->
|
<!-- 搜索和添加按钮 -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
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:gravity="center_vertical|start"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingHorizontal="24dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="32dp"
|
android:layout_width="36dp"
|
||||||
android:layout_height="32dp"
|
android:layout_height="36dp"
|
||||||
android:onClick="@{()-> viewModel.searchClick()}"
|
android:onClick="@{()-> viewModel.searchClick()}"
|
||||||
|
android:padding="2dp"
|
||||||
android:src="@drawable/img_search" />
|
android:src="@drawable/img_search" />
|
||||||
|
|
||||||
<!-- 添加按钮 -->
|
<!-- 添加按钮 -->
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="28dp"
|
android:layout_width="36dp"
|
||||||
android:layout_height="28dp"
|
android:layout_height="36dp"
|
||||||
android:layout_marginLeft="15dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:onClick="@{()-> viewModel.addClick()}"
|
android:onClick="@{()-> viewModel.addClick()}"
|
||||||
|
android:padding="4dp"
|
||||||
android:src="@drawable/img_add" />
|
android:src="@drawable/img_add" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@@ -113,10 +117,10 @@
|
|||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/rv"
|
android:id="@+id/rv"
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
itemLayoutId="@{viewModel.itemLayoutId}"
|
itemLayoutId="@{viewModel.itemLayoutId}"
|
||||||
viewHolder="@{viewModel.itemViewHolder}"
|
viewHolder="@{viewModel.itemViewHolder}"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||||
tools:listitem="@layout/item_gjc_weighing" />
|
tools:listitem="@layout/item_gjc_weighing" />
|
||||||
|
|
||||||
@@ -167,18 +171,15 @@
|
|||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
tools:text="总重量:100" />
|
tools:text="总重量:100" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:text='@{"总货重:"+viewModel.cargoWeight}'
|
|
||||||
android:textColor="@color/bottom_tool_tips_text_color"
|
|
||||||
android:textSize="18sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
tools:text="总货重:100" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<!-- 提前运抵按钮 -->
|
||||||
|
<TextView
|
||||||
|
style="@style/tv_bottom_btn"
|
||||||
|
android:onClick="@{()-> viewModel.arrivedAhead()}"
|
||||||
|
android:text="提前运抵" />
|
||||||
|
|
||||||
<!-- 计重记录按钮 -->
|
<!-- 计重记录按钮 -->
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/tv_bottom_btn"
|
style="@style/tv_bottom_btn"
|
||||||
|
|||||||
Reference in New Issue
Block a user