This commit is contained in:
wangziqi
2026-01-09 11:03:54 +08:00
parent abe03cbfef
commit 6295efc386
458 changed files with 63962 additions and 55 deletions

View File

@@ -0,0 +1,4 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="@color/purple_500" />
<corners android:radius="8dp" />
</shape>

View File

@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/appointment_title"
android:textSize="20sp"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/appointment_form_title"
android:textStyle="bold" />
<Spinner
android:id="@+id/vehicleSpinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp" />
<Spinner
android:id="@+id/serviceTypeSpinner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp" />
<EditText
android:id="@+id/appointmentTimeInput"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint="@string/appointment_time_hint"
android:inputType="none"
android:focusable="false"
android:clickable="true" />
<EditText
android:id="@+id/contactPhoneInput"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint="@string/contact_phone"
android:inputType="phone" />
<EditText
android:id="@+id/descriptionInput"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint="@string/appointment_description"
android:minLines="2"
android:inputType="textMultiLine" />
<Button
android:id="@+id/submitAppointmentButton"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/submit_appointment" />
<ProgressBar
android:id="@+id/appointmentProgress"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="12dp"
android:visibility="gone" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/appointment_list_title"
android:textStyle="bold" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/appointmentRecycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</LinearLayout>
</ScrollView>

View File

@@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="24dp">
<TextView
android:id="@+id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/login_title"
android:textSize="24sp"
android:textStyle="bold"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/usernameLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
app:layout_constraintTop_toBottomOf="@id/title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/usernameInput"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/username"
android:inputType="text" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/passwordLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
app:layout_constraintTop_toBottomOf="@id/usernameLayout"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/passwordInput"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/password"
android:inputType="textPassword" />
</com.google.android.material.textfield.TextInputLayout>
<Button
android:id="@+id/loginButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="@string/login"
app:layout_constraintTop_toBottomOf="@id/passwordLayout"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<ProgressBar
android:id="@+id/loginProgress"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@id/loginButton"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/loginError"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:textColor="@android:color/holo_red_dark"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@id/loginProgress"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="24dp">
<TextView
android:id="@+id/welcomeTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/welcome_title"
android:textSize="22sp"
android:textStyle="bold"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/userInfo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:textSize="16sp"
app:layout_constraintTop_toBottomOf="@id/welcomeTitle"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<Button
android:id="@+id/primaryAction"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="@string/primary_action"
app:layout_constraintTop_toBottomOf="@id/userInfo"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<Button
android:id="@+id/secondaryAction"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/secondary_action"
app:layout_constraintTop_toBottomOf="@id/primaryAction"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<Button
android:id="@+id/logoutButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:text="@string/logout"
app:layout_constraintTop_toBottomOf="@id/secondaryAction"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
app:cardElevation="2dp"
app:cardUseCompatPadding="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="12dp">
<TextView
android:id="@+id/appointmentSummary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textStyle="bold" />
<TextView
android:id="@+id/appointmentDetail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" />
<TextView
android:id="@+id/appointmentStatus"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" />
<Button
android:id="@+id/cancelAppointmentButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/cancel_appointment" />
</LinearLayout>
</androidx.cardview.widget.CardView>

View File

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_500">#6200EE</color>
<color name="purple_700">#3700B3</color>
<color name="teal_200">#03DAC5</color>
<color name="white">#FFFFFF</color>
<string name="app_name">车管家</string>
<string name="appointment_description">预约说明</string>
<string name="appointment_form_title">提交预约</string>
<string name="appointment_list_title">我的预约</string>
<string name="appointment_time_hint">请选择预约时间</string>
<string name="appointment_time_label">预约时间:%1$s</string>
<string name="appointment_title">在线预约</string>
<string name="cancel_appointment">取消预约</string>
<string name="contact_phone">联系电话</string>
<string name="error_cancel_appointment">取消预约失败</string>
<string name="error_contact_phone">请输入联系电话</string>
<string name="error_load_appointments">加载预约失败</string>
<string name="error_load_customer">获取客户信息失败</string>
<string name="error_login_failed">登录失败,请重试</string>
<string name="error_missing_user">用户信息缺失,请重新登录</string>
<string name="error_network">网络错误:</string>
<string name="error_required">请输入用户名和密码</string>
<string name="error_select_time">请选择预约时间</string>
<string name="error_select_vehicle">请选择车辆</string>
<string name="error_submit_appointment">预约提交失败</string>
<string name="login">登录</string>
<string name="login_title">车管家</string>
<string name="logout">退出登录</string>
<string name="password">密码</string>
<string name="primary_action">主要功能</string>
<string name="role_admin_primary">用户管理</string>
<string name="role_admin_secondary">工单管理</string>
<string name="role_customer_primary">我的车辆</string>
<string name="role_customer_secondary">在线预约</string>
<string name="role_home">角色主页</string>
<string name="role_staff_primary">车辆查询</string>
<string name="role_staff_secondary">配件查询</string>
<string name="secondary_action">次要功能</string>
<string name="select_vehicle">请选择车辆</string>
<string name="submit_appointment">提交预约</string>
<string name="success_cancel_appointment">预约已取消</string>
<string name="success_submit_appointment">预约成功</string>
<string name="username">用户名</string>
<string name="welcome_format">欢迎 %1$s%2$s</string>
<string name="welcome_title">角色主页</string>
<style name="Theme.CarMaintenance" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/white</item>
<item name="colorSecondary">@color/teal_200</item>
<item name="colorOnSecondary">@color/white</item>
</style>
</resources>