feat:首页、新建工单、工单列表
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="WizardSettings">
|
||||
<option name="children">
|
||||
<map>
|
||||
<entry key="vectorWizard">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="children">
|
||||
<map>
|
||||
<entry key="vectorAssetStep">
|
||||
<value>
|
||||
<PersistentState>
|
||||
<option name="values">
|
||||
<map>
|
||||
<entry key="outputName" value="ic_sanjiao" />
|
||||
<entry key="sourceFile" value="D:\下 拉.svg" />
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,16 @@
|
||||
package com.example.tyre.maintenance;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import java.text.Format;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
public class BaseActivity extends AppCompatActivity {
|
||||
public SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
public void onBackClick(View view) {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.example.tyre.maintenance;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import com.example.tyre.R;
|
||||
import com.example.tyre.maintenance.dialog.TipResultDialog;
|
||||
|
||||
public class CreateWorkOrderActivity extends BaseActivity {
|
||||
TipResultDialog dialog;
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
DataBindingUtil.setContentView(this,R.layout.activity_create_work_order);
|
||||
dialog = new TipResultDialog(this, this);
|
||||
|
||||
}
|
||||
|
||||
public void openSelectCarDialog(View view) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void generateWorkOrder(View view) {
|
||||
dialog.show(true, "工单生成成功", true);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package com.example.tyre.maintenance;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.example.tyre.R;
|
||||
import com.example.tyre.databinding.ActivityNewHomePageBinding;
|
||||
|
||||
public class NewHomePageActivity extends BaseActivity {
|
||||
private ActivityNewHomePageBinding binding;
|
||||
private Intent intent;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = DataBindingUtil.setContentView(this, R.layout.activity_new_home_page);
|
||||
intent = new Intent(this, WorkOrderActivity.class);
|
||||
}
|
||||
|
||||
public void goActivity1(View view) {
|
||||
intent.putExtra("title", "二级保养");
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void goActivity2(View view) {
|
||||
intent.putExtra("title", "小修");
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void goActivity3(View view) {
|
||||
intent.putExtra("title", "抢碎修");
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void goActivity4(View view) {
|
||||
intent.putExtra("title", "月检");
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void goActivity5(View view) {
|
||||
intent.putExtra("title", "拆报废车");
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void goActivity6(View view) {
|
||||
intent.putExtra("title", "轮胎修补");
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void goActivity7(View view) {
|
||||
intent.putExtra("title", "轮胎报废");
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
public void goAllWorkOrder(View view) {
|
||||
intent.putExtra("title", "总工单列表");
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package com.example.tyre.maintenance;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.DatePickerDialog;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ListPopupWindow;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableBoolean;
|
||||
|
||||
import com.example.tyre.R;
|
||||
import com.example.tyre.databinding.ActivityWorkOrderBinding;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
public class WorkOrderActivity extends BaseActivity {
|
||||
private ActivityWorkOrderBinding binding;
|
||||
private ObservableBoolean status;
|
||||
private DatePickerDialog datePickerDialog;
|
||||
private ListPopupWindow listPopupWindow;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
binding = DataBindingUtil.setContentView(this, R.layout.activity_work_order);
|
||||
status = new ObservableBoolean(false);
|
||||
binding.setStatus(status);
|
||||
|
||||
// 获取当前日期
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
int month = calendar.get(Calendar.MONTH);
|
||||
int day = calendar.get(Calendar.DAY_OF_MONTH);
|
||||
binding.workOrderDate.setText(dateFormat.format(calendar.getTime()));
|
||||
datePickerDialog = new DatePickerDialog(this,
|
||||
(view1, year1, monthOfYear, dayOfMonth) -> {
|
||||
@SuppressLint("DefaultLocale")
|
||||
String selectedDate =
|
||||
year1 + "-" + String.format("%02d", (monthOfYear + 1)) + "-" + String.format("%02d", dayOfMonth);
|
||||
binding.workOrderDate.setText(selectedDate);
|
||||
}, year, month, day);
|
||||
// 初始化选择框
|
||||
listPopupWindow = new ListPopupWindow(this);
|
||||
listPopupWindow.setAnchorView(binding.workOrderSite);
|
||||
String[] stringArray = getResources().getStringArray(R.array.zxzd);
|
||||
listPopupWindow.setAdapter(new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, stringArray));
|
||||
listPopupWindow.setOnItemClickListener((parent, view, position, id) -> {
|
||||
binding.workOrderSite.setText(stringArray[position]);
|
||||
listPopupWindow.dismiss();`
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 选日期
|
||||
public void selectDate(View view) {
|
||||
datePickerDialog.show();
|
||||
}
|
||||
// 选站点
|
||||
public void selectOrderSite(View view) {
|
||||
listPopupWindow.show();
|
||||
}
|
||||
|
||||
public void goCreateWorkOrder(View view) {
|
||||
startActivity(new Intent(this, CreateWorkOrderActivity.class));
|
||||
}
|
||||
|
||||
public void switchStatus(View view) {
|
||||
status.set(!status.get());
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#4B84FE"/>
|
||||
<corners android:radius="10dp"/>
|
||||
</shape>
|
||||
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:bottom="0dp"
|
||||
android:left="0dp"
|
||||
android:right="0dp"
|
||||
android:top="0dp">
|
||||
<shape>
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#4B84FE" />
|
||||
<corners android:radius="8dp" />
|
||||
<solid android:color="@color/white" />
|
||||
</shape>
|
||||
</item>
|
||||
<item
|
||||
android:width="12dp"
|
||||
android:height="8dp"
|
||||
android:gravity="center|right"
|
||||
android:right="16dp">
|
||||
|
||||
<bitmap android:src="@drawable/ic_png_sl" />
|
||||
|
||||
</item>
|
||||
|
||||
</layer-list>
|
||||
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:bottom="0dp"
|
||||
android:left="0dp"
|
||||
android:right="0dp"
|
||||
android:top="0dp">
|
||||
<shape>
|
||||
|
||||
<corners android:radius="8dp" />
|
||||
<solid android:color="#F7F8F9" />
|
||||
</shape>
|
||||
</item>
|
||||
<item
|
||||
android:width="12dp"
|
||||
android:height="8dp"
|
||||
android:gravity="center|right"
|
||||
android:right="16dp">
|
||||
|
||||
<bitmap android:src="@drawable/ic_png_sl" />
|
||||
|
||||
</item>
|
||||
|
||||
</layer-list>
|
||||
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/buttonColor" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="12dp" />
|
||||
<solid android:color="@color/white"/>
|
||||
</shape>
|
||||
@ -1,7 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/white"
|
||||
/>
|
||||
|
||||
<corners android:radius="20dp"/>
|
||||
<solid android:color="@color/white" />
|
||||
<corners android:radius="20dp" />
|
||||
</shape>
|
||||
|
After Width: | Height: | Size: 597 B |
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="12dp"
|
||||
android:height="8dp"
|
||||
android:viewportWidth="12"
|
||||
android:viewportHeight="8">
|
||||
<path
|
||||
android:fillColor="#4B84FE"
|
||||
android:pathData="M0,0 L12,0 L6,8 Z"/>
|
||||
</vector>
|
||||
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M558.3,756.5c-13.7,13.7 -32.2,26.4 -49.8,22.5 -17.6,2.9 -34.2,-10.7 -47.8,-22.5L38,331.8c-21.5,-21.5 -21.5,-56.6 0,-78.1s56.6,-21.5 78.1,0l393.4,404.2 394.4,-404.2c21.5,-21.5 56.6,-21.5 78.1,0s21.5,56.6 0,78.1L558.3,756.5z" />
|
||||
</vector>
|
||||
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="20dp" />
|
||||
<solid android:color="#ECF2FE"/>
|
||||
</shape>
|
||||
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#F4F6F9"/>
|
||||
<corners android:radius="10dp"/>
|
||||
</shape>
|
||||
@ -0,0 +1,92 @@
|
||||
<?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:orientation="vertical"
|
||||
tools:context=".maintenance.CreateWorkOrderActivity">
|
||||
|
||||
<include
|
||||
layout="@layout/layout_activity_title"
|
||||
app:title='@{"发起新工单"}' />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:background="@drawable/card_bg"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp">
|
||||
|
||||
<TextView
|
||||
style="@style/text_title_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:letterSpacing="0.1"
|
||||
android:text="* 车牌" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:text="点击选择"
|
||||
android:gravity="center|left"
|
||||
android:letterSpacing="0.1"
|
||||
android:paddingStart="12dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@drawable/bg_select_blue"
|
||||
android:onClick="openSelectCarDialog"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
style="@style/text_title_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:letterSpacing="0.1"
|
||||
android:text="* 工单类型" />
|
||||
|
||||
<Spinner
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:entries="@array/work_type"
|
||||
android:background="@drawable/bg_select_grey"
|
||||
android:paddingStart="12dp"/>
|
||||
|
||||
<TextView
|
||||
style="@style/text_title_2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:letterSpacing="0.1"
|
||||
android:text="* 执行站点" />
|
||||
<Spinner
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:paddingStart="12dp"
|
||||
android:entries="@array/zxzd"
|
||||
android:background="@drawable/bg_select_grey"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<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:text="生成工单"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:onClick="generateWorkOrder"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
@ -1,128 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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/xuebai"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:background="@mipmap/bg"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="60dp"
|
||||
android:src="@mipmap/tyre" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="80dp"
|
||||
|
||||
android:src="@mipmap/title" />
|
||||
|
||||
|
||||
<EditText
|
||||
android:id="@+id/login_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@mipmap/bg"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="23sp" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
<EditText
|
||||
android:id="@+id/login_pass"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="23sp"
|
||||
android:inputType="textPassword"
|
||||
android:layout_marginTop="12dp"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageView"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@mipmap/tyre"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.492"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@mipmap/title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.492"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="380dp"
|
||||
android:layout_marginTop="80dp"
|
||||
android:layout_marginStart="18dp"
|
||||
android:layout_marginEnd="18dp"
|
||||
android:backgroundTint="@color/white"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:orientation="horizontal">
|
||||
<!--android:drawableRight="@mipmap/xia"-->
|
||||
<EditText
|
||||
android:id="@+id/login_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:ems="10"
|
||||
android:layout_weight="3"
|
||||
android:textSize="23sp"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/login_log"
|
||||
style="@style/buttonStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="登 陆" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:orientation="horizontal">
|
||||
<CheckBox
|
||||
android:id="@+id/checkbox_remember"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="记住用户名和密码"
|
||||
android:textSize="18sp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_gravity="left"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/login_pass"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:ems="10"
|
||||
android:layout_weight="3"
|
||||
android:textSize="23sp"
|
||||
android:inputType="textPassword"
|
||||
/>
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/login_log"
|
||||
style="@style/buttonStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginRight="20dp"
|
||||
android:text="登 陆" />
|
||||
<!-- 新增:记住密码复选框 -->
|
||||
<CheckBox
|
||||
android:id="@+id/checkbox_remember"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text="记住用户名和密码"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/login_log" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/version"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:textColor="@color/blue"
|
||||
android:textSize="18sp"
|
||||
android:gravity="center"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
<TextView
|
||||
android:id="@+id/version"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/blue"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@ -0,0 +1,155 @@
|
||||
<?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="text1"
|
||||
type="String" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".maintenance.NewHomePageActivity">
|
||||
|
||||
<include
|
||||
layout="@layout/layout_activity_title"
|
||||
app:title='@{"车队维保系统"}' />
|
||||
|
||||
<TextView
|
||||
style="@style/text_title_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="工单发起与处理" />
|
||||
|
||||
<androidx.gridlayout.widget.GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:background="@drawable/card_bg"
|
||||
android:padding="12dp"
|
||||
app:columnCount="4"
|
||||
app:rowCount="2"
|
||||
tools:ignore="MissingClass">
|
||||
|
||||
<!-- <include
|
||||
layout="@layout/layout_home_icon"
|
||||
app:layout_columnWeight="1"
|
||||
app:text1='@{"⚙️"}'
|
||||
app:text2='@{"二级保养"}' />-->
|
||||
<RadioButton
|
||||
style="@style/home_page_radio_button"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@mipmap/icon_1"
|
||||
android:onClick="goActivity1"
|
||||
android:text="二级保养"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<RadioButton
|
||||
style="@style/home_page_radio_button"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@mipmap/icon_2"
|
||||
android:onClick="goActivity2"
|
||||
android:text="小修"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<RadioButton
|
||||
style="@style/home_page_radio_button"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@mipmap/icon_3"
|
||||
android:onClick="goActivity3"
|
||||
android:text="抢碎修"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<RadioButton
|
||||
style="@style/home_page_radio_button"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@mipmap/icon_4"
|
||||
android:onClick="goActivity4"
|
||||
android:text="月检"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<RadioButton
|
||||
style="@style/home_page_radio_button"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:drawableTop="@mipmap/icon_5"
|
||||
android:onClick="goActivity5"
|
||||
android:text="拆报废车"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<RadioButton
|
||||
style="@style/home_page_radio_button"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:drawableTop="@mipmap/icon_6"
|
||||
android:onClick="goActivity6"
|
||||
android:text="轮胎修补"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<RadioButton
|
||||
style="@style/home_page_radio_button"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:drawableTop="@mipmap/icon_7"
|
||||
android:onClick="goActivity7"
|
||||
android:text="轮胎报废"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
</androidx.gridlayout.widget.GridLayout>
|
||||
|
||||
<TextView
|
||||
style="@style/text_title_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="全局中心" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="12dp"
|
||||
android:background="@drawable/card_bg"
|
||||
android:padding="12dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:src="@mipmap/icon_8" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="goAllWorkOrder"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="总工单列表"
|
||||
android:textColor="@color/textColor1"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="查看车队所有已建工单"
|
||||
android:textColor="@color/textColor2"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,157 @@
|
||||
<?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="title"
|
||||
type="String" />
|
||||
|
||||
<variable
|
||||
name="status"
|
||||
type="androidx.databinding.ObservableBoolean" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".maintenance.WorkOrderActivity">
|
||||
|
||||
<include
|
||||
layout="@layout/layout_activity_title"
|
||||
app:title='@{title??"总工单列表"}' />
|
||||
|
||||
|
||||
<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="3"
|
||||
app:rowCount="5">
|
||||
|
||||
<TextView
|
||||
android:layout_height="45dp"
|
||||
android:gravity="left|center"
|
||||
android:text="保养日期"
|
||||
android:textColor="@color/textColor1"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/work_order_date"
|
||||
android:layout_height="45dp"
|
||||
android:gravity="right|center"
|
||||
android:onClick="selectDate"
|
||||
android:paddingEnd="10dp"
|
||||
android:text="保养日期"
|
||||
android:textColor="@color/textColor2"
|
||||
android:textStyle="bold"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="45dp"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/ic_sanjiao"
|
||||
tools:ignore="UseAppTint" />
|
||||
|
||||
<View
|
||||
android:layout_height="1dp"
|
||||
android:background="#F1F1F1"
|
||||
app:layout_columnSpan="3" />
|
||||
|
||||
<TextView
|
||||
android:layout_height="45dp"
|
||||
android:gravity="left|center"
|
||||
android:text="站点"
|
||||
android:textColor="@color/textColor1"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/work_order_site"
|
||||
android:layout_height="45dp"
|
||||
android:gravity="right|center"
|
||||
android:paddingEnd="10dp"
|
||||
android:textColor="@color/textColor2"
|
||||
android:textStyle="bold"
|
||||
app:layout_columnWeight="1"
|
||||
android:onClick="selectOrderSite"
|
||||
tools:ignore="RtlHardcoded,RtlSymmetry" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="45dp"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/ic_sanjiao"
|
||||
tools:ignore="UseAppTint" />
|
||||
|
||||
<View
|
||||
android:layout_height="1dp"
|
||||
android:background="#F1F1F1"
|
||||
app:layout_columnSpan="3" />
|
||||
|
||||
<TextView
|
||||
android:layout_height="45dp"
|
||||
android:gravity="left|center"
|
||||
android:text="维保状态"
|
||||
|
||||
android:textColor="@color/textColor1"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<TextView
|
||||
android:layout_height="45dp"
|
||||
android:gravity="right|center"
|
||||
android:onClick="switchStatus"
|
||||
android:paddingEnd="10dp"
|
||||
android:text='@{status?"已完成(点击切换)":"未完成(点击切换)"}'
|
||||
android:textColor='@{status? @color/buttonColor2:@color/buttonColor}'
|
||||
android:textStyle="bold"
|
||||
app:layout_columnWeight="1" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="45dp"
|
||||
android:padding="5dp"
|
||||
android:src="@drawable/ic_sanjiao"
|
||||
android:tint='@{status? @color/buttonColor2:@color/buttonColor}'
|
||||
tools:ignore="UseAppTint" />
|
||||
|
||||
|
||||
</androidx.gridlayout.widget.GridLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:text="点击下表的车辆,进行处理" />
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
||||
android:padding="12dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|right"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:backgroundTint="#4B84FE"
|
||||
android:onClick="goCreateWorkOrder"
|
||||
android:src="@mipmap/plus"
|
||||
android:tint="@android:color/white" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/card_bg"
|
||||
android:gravity="center|top"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:letterSpacing="0.5"
|
||||
android:text="系统提示"
|
||||
android:textColor="@color/textColor1"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/dialog_state"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="35dp"
|
||||
android:gravity="center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@mipmap/huojian" />
|
||||
|
||||
<TextView
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="35dp"
|
||||
android:gravity="center"
|
||||
|
||||
android:text="发起成功!"
|
||||
android:textColor="@color/textColor2"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dialog_tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="选择车辆或者车票!"
|
||||
android:textColor="@color/textColor2"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/dialog_confirm"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="55dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="@drawable/bg_button_blue"
|
||||
android:letterSpacing="0.2"
|
||||
android:text="确定"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,66 @@
|
||||
<?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="118dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:background="@drawable/card_bg">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:gravity="center"
|
||||
android:text="玲珑-B37060D"
|
||||
android:textColor="@color/textColor1"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView3"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:gravity="center|left"
|
||||
android:text="轮胎报废"
|
||||
android:textColor="@color/textColor2"
|
||||
android:textSize="16sp"
|
||||
|
||||
app:layout_constraintBottom_toBottomOf="@+id/textView"
|
||||
app:layout_constraintStart_toEndOf="@+id/textView" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/item_bg_1"
|
||||
android:gravity="center"
|
||||
android:paddingStart="12dp"
|
||||
android:paddingEnd="12dp"
|
||||
android:text="操作人 深圳西部公司"
|
||||
android:textColor="@color/textColor2"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="@drawable/bg_state_1"
|
||||
android:gravity="center"
|
||||
android:letterSpacing="0.1"
|
||||
android:text="未完成"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="title"
|
||||
type="String" />
|
||||
</data>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="55dp"
|
||||
android:background="@color/white">
|
||||
<TextView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="match_parent"
|
||||
android:text="〈"
|
||||
android:textColor="@color/textColor1"
|
||||
android:paddingEnd="20dp"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:textSize="25sp"
|
||||
android:onClick="onBackClick"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{title}"
|
||||
android:gravity="center"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/textColor1"
|
||||
android:letterSpacing="0.2" />
|
||||
|
||||
|
||||
</FrameLayout>
|
||||
</layout>
|
||||
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
<variable
|
||||
name="text1"
|
||||
type="String" />
|
||||
<variable
|
||||
name="text2"
|
||||
type="String" />
|
||||
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:text="@{text1}"
|
||||
android:background="@drawable/icon_bg"
|
||||
android:gravity="center"
|
||||
android:textSize="18dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{text2}"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="8dp"
|
||||
android:textColor="@color/textColor1"
|
||||
android:textSize="15sp" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 27 KiB |
@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="news" parent="Theme.Design.Light.NoActionBar">
|
||||
|
||||
<item name="colorOnPrimary">@color/white</item>
|
||||
<item name="colorPrimary">@color/buttonColor</item>
|
||||
<item name="android:statusBarColor">@color/white</item>
|
||||
<item name="android:windowLightStatusBar">true</item>
|
||||
<item name="android:windowBackground">@color/allbg</item>
|
||||
</style>
|
||||
|
||||
<style name="text_title_style">
|
||||
<item name="android:layout_marginTop">16dp</item>
|
||||
<item name="android:layout_marginStart">12dp</item>
|
||||
<item name="android:textSize">18sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/textColor2</item>
|
||||
</style>
|
||||
<style name="text_title_2">
|
||||
|
||||
<item name="android:textSize">18sp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textColor">@color/textColor1</item>
|
||||
</style>
|
||||
|
||||
<style name="home_page_radio_button">
|
||||
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:button">@null</item>
|
||||
<item name="android:drawablePadding">12dp</item>
|
||||
</style>
|
||||
|
||||
<style name="layout_card_style">
|
||||
<item name="android:background">@drawable/card_bg</item>
|
||||
<item name="android:padding">12dp</item>
|
||||
</style>
|
||||
<style name="MyMiddleDialogStyle" parent="@android:style/Theme.Holo.Light.Dialog">
|
||||
<!-- 窗口背景色 -->
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<!--是否有覆盖-->
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<!-- 浮于Activity之上 -->
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
<!-- 边框 -->
|
||||
<item name="android:windowFrame">@null</item>
|
||||
<!-- Dialog以外的区域模糊效果 -->
|
||||
<item name="android:backgroundDimEnabled">true</item>
|
||||
<!-- 无标题 -->
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<!-- 半透明 -->
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<!--进出动画-->
|
||||
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
|
||||
</style>
|
||||
</resources>
|
||||