<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools">

    <data>

        <import type="com.lukouguoji.module_base.ui.weight.data.layout.DataLayoutType" />

        <variable
            name="viewModel"
            type="com.lukouguoji.aerologic.page.gnj.query.details.GnjQueryDetailsViewModel" />
    </data>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/backgroud_gray"
        android:orientation="vertical">

        <include layout="@layout/title_tool_bar" />

        <androidx.core.widget.NestedScrollView
            android:layout_width="match_parent"
            android:layout_weight="1"
            android:layout_height="0dp">

            <LinearLayout
                android:layout_width="match_parent"
                android:orientation="vertical"
                android:layout_height="match_parent">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="10dp">

                    <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
                        enable="@{false}"
                        title='@{"运单号："}'
                        titleLength="@{5}"
                        type="@{DataLayoutType.INPUT}"
                        value='@{viewModel.dataBean.wbNo}'
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1" />

                    <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
                        enable="@{false}"
                        hint='@{" "}'
                        title='@{"代理人："}'
                        titleLength="@{5}"
                        type="@{DataLayoutType.SPINNER}"
                        value='@{viewModel.dataBean.agentCode}'
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1" />

                    <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
                        enable="@{false}"
                        hint='@{" "}'
                        title='@{"特码："}'
                        titleLength="@{5}"
                        type="@{DataLayoutType.SPINNER}"
                        value='@{viewModel.dataBean.spCode}'
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1" />

                </LinearLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="10dp">

                    <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
                        enable="@{false}"
                        title='@{"总件数："}'
                        titleLength="@{5}"
                        type="@{DataLayoutType.INPUT}"
                        value='@{viewModel.dataBean.pc}'
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1" />

                    <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
                        enable="@{false}"
                        title='@{"总重量："}'
                        titleLength="@{5}"
                        type="@{DataLayoutType.INPUT}"
                        value='@{viewModel.dataBean.weight}'
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1" />

                    <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
                        enable="@{false}"
                        title='@{"体积："}'
                        titleLength="@{5}"
                        type="@{DataLayoutType.INPUT}"
                        value='@{viewModel.dataBean.volume}'
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1" />

                </LinearLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="10dp">

                    <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
                        enable="@{false}"
                        hint='@{" "}'
                        title='@{"运单类型："}'
                        titleLength="@{5}"
                        type="@{DataLayoutType.SPINNER}"
                        value='@{viewModel.dataBean.awbType}'
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1" />

                    <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
                        enable="@{false}"
                        hint='@{" "}'
                        title='@{"业务类型："}'
                        titleLength="@{5}"
                        type="@{DataLayoutType.SPINNER}"
                        value='@{viewModel.dataBean.businessType}'
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1" />

                    <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
                        enable="@{false}"
                        hint='@{" "}'
                        title='@{"包装类型："}'
                        titleLength="@{5}"
                        type="@{DataLayoutType.SPINNER}"
                        value='@{viewModel.dataBean.packageType}'
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1" />

                </LinearLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="10dp">

                    <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
                        enable="@{false}"
                        title='@{"品名："}'
                        titleLength="@{5}"
                        type="@{DataLayoutType.INPUT}"
                        value='@{viewModel.dataBean.goods}'
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1" />

                    <com.lukouguoji.module_base.ui.weight.data.layout.PadDataLayout
                        enable="@{false}"
                        hint='@{" "}'
                        title='@{"备注："}'
                        titleLength="@{5}"
                        type="@{DataLayoutType.INPUT}"
                        value='@{viewModel.dataBean.remark}'
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="2" />

                </LinearLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center_vertical">

                    <View
                        android:layout_width="0dp"
                        android:layout_height="0dp"
                        android:layout_weight="1"
                        android:background="@drawable/bg_xuxian" />

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="关联仓库信息"
                        android:textColor="@color/colorPrimary" />

                    <ImageView
                        android:layout_width="20dp"
                        android:layout_height="20dp"
                        android:layout_marginLeft="5dp"
                        android:src="@mipmap/open_show"
                        app:tint="@color/colorPrimary" />

                    <View
                        android:layout_width="0dp"
                        android:layout_height="0dp"
                        android:layout_weight="1"
                        android:background="@drawable/bg_xuxian" />

                </LinearLayout>

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/rv"
                    itemLayoutId="@{viewModel.itemLayoutId}"
                    viewHolder="@{viewModel.viewHolder}"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="10dp"
                    app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
                    tools:listitem="@layout/item_gnc_query_details" />

            </LinearLayout>

        </androidx.core.widget.NestedScrollView>


        <TextView
            style="@style/tv_bottom_btn"
            android:layout_gravity="center_horizontal"
            android:layout_marginVertical="15dp"
            android:onClick="@{()-> viewModel.onFlowChartClick()}"
            android:text="运单流程图" />

    </LinearLayout>
</layout>