<?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>

        <variable
            name="site"
            type="String" />

        <variable
            name="carNo"
            type="String" />

        <variable
            name="date"
            type="String" />

        <variable
            name="line"
            type="String" />

        <variable
            name="tire1"
            type="com.example.tyre.maintenance.been.BaseTyre" />

        <variable
            name="tire2"
            type="com.example.tyre.maintenance.been.BaseTyre" />

        <variable
            name="tire3"
            type="com.example.tyre.maintenance.been.BaseTyre" />

        <variable
            name="tire4"
            type="com.example.tyre.maintenance.been.BaseTyre" />

        <variable
            name="tire5"
            type="com.example.tyre.maintenance.been.BaseTyre" />

        <variable
            name="tire6"
            type="com.example.tyre.maintenance.been.BaseTyre" />

    </data>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center|top"
        android:orientation="vertical"
        tools:context=".maintenance.WorkExecuteActivity">

        <include
            layout="@layout/layout_activity_title"
            app:title='@{"执行工单"}' />

        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:gravity="center|top"
                android:orientation="vertical">


                <TextView
                    style="@style/text_title_2"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="16dp"
                    android:letterSpacing="0.1"
                    android:text='@{"车牌\t"+carNo}' />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    android:letterSpacing="0.1"
                    android:text='@{"◎"+site}'
                    android:textColor="@color/textColor1" />

                <androidx.gridlayout.widget.GridLayout
                    style="@style/layout_card_style"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="12dp"
                    app:columnCount="2"
                    app:rowCount="5">

                    <TextView
                        android:layout_height="40dp"
                        android:gravity="start|center"
                        android:letterSpacing="0.1"
                        android:text="*仪表盘里程(km)"
                        android:textColor="@color/textColor1"
                        android:textStyle="bold"
                        app:layout_columnWeight="1" />

                    <EditText
                        android:id="@+id/work_licheng"
                        android:layout_height="40dp"
                        android:gravity="right|center"
                        android:hint="必填"
                        android:inputType="numberDecimal"
                        android:paddingEnd="10dp"
                        android:textColor="@color/textColor2"
                        android:textSize="15sp"
                        android:textStyle="bold"
                        app:layout_columnWeight="1"
                        tools:ignore="RtlHardcoded,RtlSymmetry" />


                    <!--            <View-->
                    <!--                android:layout_height="1dp"-->
                    <!--                android:background="#F1F1F1"-->
                    <!--                app:layout_columnSpan="2" />-->

                    <!--            <TextView-->
                    <!--                android:layout_height="40dp"-->
                    <!--                android:gravity="start|center"-->
                    <!--                android:text="上次里程"-->
                    <!--                android:textColor="@color/textColor2"-->
                    <!--                app:layout_columnSpan="2" />-->


                </androidx.gridlayout.widget.GridLayout>

                <androidx.gridlayout.widget.GridLayout
                    style="@style/layout_card_style"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="12dp"
                    android:layout_marginEnd="12dp"
                    app:columnCount="2"
                    app:rowCount="5">

                    <TextView
                        android:layout_height="40dp"
                        android:gravity="left|center"
                        android:text="线路"
                        android:textColor="@color/textColor1"
                        app:layout_columnWeight="1" />

                    <TextView
                        android:layout_height="40dp"
                        android:gravity="right|center"
                        android:paddingEnd="10dp"
                        android:text="@{line}"
                        android:textColor="@color/textColor1"
                        app:layout_columnWeight="1" />


                    <View
                        android:layout_height="1dp"
                        android:background="#F1F1F1"
                        app:layout_columnSpan="2" />

                    <TextView
                        android:layout_height="40dp"
                        android:gravity="left|center"
                        android:text="补充说明"
                        android:textColor="@color/textColor1"
                        app:layout_columnWeight="1" />

                    <EditText
                        android:id="@+id/work_buchong"
                        android:layout_height="40dp"
                        android:background="@color/white"
                        android:gravity="end|center"
                        android:hint="选填"
                        android:paddingEnd="10dp"
                        android:textColor="@color/textColor1"
                        android:textSize="14sp"
                        app:layout_columnWeight="1" />


                    <View
                        android:layout_height="1dp"
                        android:background="#F1F1F1"
                        app:layout_columnSpan="2" />

                    <TextView
                        android:layout_height="40dp"
                        android:gravity="left|center"
                        android:text="保养日期"

                        android:textColor="@color/textColor1"
                        app:layout_columnWeight="1" />

                    <TextView
                        android:layout_height="40dp"
                        android:gravity="end|center"
                        android:paddingEnd="10dp"
                        android:text="@{date}"
                        android:textColor="@color/textColor1"
                        app:layout_columnWeight="1" />

                </androidx.gridlayout.widget.GridLayout>

                <LinearLayout
                    style="@style/layout_card_style"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="12dp"
                    android:orientation="vertical">

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

                        <include
                            android:id="@+id/tireClick1"
                            layout="@layout/layout_trae_info"
                            android:layout_width="80dp"
                            android:layout_height="wrap_content"
                            app:data="@{tire1}"
                            app:locationOld='@{"左前轮"}' />

                        <View
                            android:layout_width="match_parent"
                            android:layout_height="3dp"
                            android:layout_weight="1"
                            android:background="#E3E6EC" />

                        <TextView
                            android:layout_width="30dp"
                            android:layout_height="30dp"
                            android:background="@drawable/bg_grey"
                            android:gravity="center"
                            android:text="1"
                            android:textStyle="bold" />

                        <View
                            android:layout_width="match_parent"
                            android:layout_height="3dp"
                            android:layout_weight="1"
                            android:background="#E3E6EC" />


                        <include
                            android:id="@+id/tireClick2"
                            layout="@layout/layout_trae_info"
                            android:layout_width="80dp"
                            android:layout_height="wrap_content"
                            app:data="@{tire2}"
                            app:locationOld='@{"右前轮"}' />
                    </LinearLayout>

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="8dp"
                        android:gravity="center">

                        <include
                            android:id="@+id/tireClick3"
                            layout="@layout/layout_trae_info"
                            android:layout_width="80dp"
                            android:layout_height="wrap_content"
                            app:data="@{tire3}"
                            app:locationOld='@{"左外轮"}' />

                        <include
                            android:id="@+id/tireClick4"
                            layout="@layout/layout_trae_info"
                            android:layout_width="80dp"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="4dp"
                            app:data="@{tire4}"
                            app:locationOld='@{"左内轮"}' />

                        <View
                            android:layout_width="match_parent"
                            android:layout_height="3dp"
                            android:layout_weight="1"
                            android:background="#E3E6EC" />

                        <TextView
                            android:layout_width="30dp"
                            android:layout_height="30dp"
                            android:background="@drawable/bg_grey"
                            android:gravity="center"
                            android:text="2"
                            android:textStyle="bold" />

                        <View
                            android:layout_width="match_parent"
                            android:layout_height="3dp"
                            android:layout_weight="1"
                            android:background="#E3E6EC" />


                        <include
                            android:id="@+id/tireClick5"
                            layout="@layout/layout_trae_info"
                            android:layout_width="80dp"
                            android:layout_height="wrap_content"
                            app:data="@{tire5}"
                            app:locationOld='@{"右内轮"}' />

                        <include
                            android:id="@+id/tireClick6"
                            layout="@layout/layout_trae_info"
                            android:layout_width="80dp"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="4dp"
                            app:data="@{tire6}"
                            app:locationOld='@{"右外轮"}' />
                    </LinearLayout>

                </LinearLayout>


                <Button
                    android:layout_width="match_parent"
                    android:layout_height="55dp"
                    android:layout_margin="16dp"
                    android:background="@drawable/bg_button_blue"
                    android:letterSpacing="0.3"
                    android:onClick="submitWorkExecute"
                    android:text="完成处理"
                    android:textColor="@color/white"
                    android:textSize="18sp"
                    android:textStyle="bold" />

            </LinearLayout>
        </ScrollView>
    </LinearLayout>
</layout>