<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/color_f0"
    android:orientation="vertical">

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

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/white"
        android:orientation="vertical"
        android:paddingLeft="@dimen/dp_18"
        android:paddingRight="@dimen/dp_18"
        android:paddingBottom="@dimen/dp_6"
        app:layout_collapseMode="parallax">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dp_11"
            android:orientation="horizontal">

            <TextView
                android:id="@+id/tv_order_details_supplier_name"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:textColor="@color/color_3c"
                android:textSize="@dimen/dp_16"
                android:textStyle="bold"
                tools:text="海鮮天地" />

            <TextView
                android:id="@+id/tv_order_details_create_time"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:gravity="end"
                android:textColor="@color/color_3c"
                android:textSize="@dimen/dp_14"
                tools:text="2020-11-20 12:00" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:orientation="vertical">

                <TextView
                    android:id="@+id/tv_order_details_order_no"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/dp_9"
                    tools:text="採購單號："
                    android:textColor="@color/color_3c"
                    android:textSize="@dimen/dp_14" />

                <TextView
                    android:id="@+id/tv_warehouse_order_no"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/dp_10"
                    tools:text="入庫單號："
                    android:textColor="@color/color_3c"
                    android:visibility="gone"
                    android:textSize="@dimen/dp_14" />

                <LinearLayout
                    android:id="@+id/layout_ed_remark"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:visibility="gone">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="備註："
                        android:textColor="@color/color_3c"
                        android:textSize="@dimen/dp_14" />

                    <com.google.android.material.textfield.TextInputLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        app:counterEnabled="true"
                        app:counterMaxLength="50">

                        <com.google.android.material.textfield.TextInputEditText
                            android:id="@+id/ed_warehouse_order_remark"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:textColor="@color/color_3c"
                            android:textSize="@dimen/dp_14" />
                    </com.google.android.material.textfield.TextInputLayout>
                </LinearLayout>
            </LinearLayout>

            <LinearLayout
                android:id="@+id/layout_remarks"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom"
                android:background="@drawable/shape_oval_border_bg_c8"
                android:gravity="center"
                android:orientation="horizontal"
                android:paddingLeft="@dimen/dp_7"
                android:paddingTop="@dimen/dp_5"
                android:paddingRight="@dimen/dp_7"
                android:paddingBottom="@dimen/dp_5">

                <ImageView
                    android:layout_width="@dimen/dp_19"
                    android:layout_height="@dimen/dp_19"
                    android:src="@drawable/ic_dialogue" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="@dimen/dp_3"
                    android:text="@string/str_remark"
                    android:textColor="@color/color_3c"
                    android:textSize="@dimen/dp_12" />
            </LinearLayout>

            <ImageView
                android:id="@+id/iv_order_state"
                android:layout_width="@dimen/dp_52"
                android:layout_height="@dimen/dp_46"
                android:layout_gravity="bottom"
                android:layout_marginLeft="@dimen/dp_25" />
        </LinearLayout>

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rv_order_details_pictures"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/dp_10" />
    </LinearLayout>

    <HorizontalScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:visibility="gone"
        android:layout_marginTop="@dimen/dp_10">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rv_order_details_food_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />

    </HorizontalScrollView>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/rv_order_details_food_list"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_marginTop="@dimen/dp_10"
        android:layout_weight="1"
        app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/white"
        android:elevation="@dimen/dp_10"
        android:orientation="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:orientation="horizontal"
            android:paddingRight="@dimen/dp_25">

            <com.google.android.material.checkbox.MaterialCheckBox
                android:id="@+id/cb_order_details_all_selected"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="@dimen/dp_25"
                android:layout_marginTop="@dimen/dp_5"
                android:layout_marginBottom="@dimen/dp_5"
                android:text="全選"
                android:textColor="@color/color_3c"
                android:textSize="@dimen/dp_14" />

            <TextView
                style="@style/supplier_chain_222_16"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="@dimen/dp_24"
                android:text="食材種類："
                android:textStyle="bold" />

            <TextView
                android:id="@+id/tv_order_details_food_type_total"
                style="@style/Text_Bold_amount_style"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                tools:text="3" />

            <View
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1" />

            <TextView
                style="@style/supplier_chain_222_16"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="@dimen/dp_20"
                android:text="總計："
                android:textStyle="bold" />

            <TextView
                android:id="@+id/tv_order_details_total_amount"
                style="@style/Text_Bold_amount_style"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                tools:text="$300.00" />
        </LinearLayout>


        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_horizontal"
            android:orientation="horizontal">


            <com.qmuiteam.qmui.alpha.QMUIAlphaTextView
                android:id="@+id/tv_order_details_partial_receipt"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="@color/other_order_details_print_btn_color"
                android:gravity="center"
                android:paddingTop="@dimen/dp_12"
                android:paddingBottom="@dimen/dp_12"
                android:text="部分收貨"
                android:textColor="@color/white"
                android:textSize="@dimen/sp_16" />

            <com.qmuiteam.qmui.alpha.QMUIAlphaTextView
                android:id="@+id/tv_order_details_receipt"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="@color/brick_red"
                android:gravity="center"
                android:paddingTop="@dimen/dp_12"
                android:paddingBottom="@dimen/dp_12"
                android:text="收貨"
                android:textColor="@color/white"
                android:textSize="@dimen/sp_16" />
        </LinearLayout>

    </LinearLayout>
</LinearLayout>