Jelajahi Sumber

添加作业票步骤页基础

Frankensteinly 10 bulan lalu
induk
melakukan
a8b6f709f7

+ 23 - 0
app/src/main/java/com/grkj/iscs/view/fragment/StepFragment.kt

@@ -0,0 +1,23 @@
+package com.grkj.iscs.view.fragment
+
+import com.grkj.iscs.databinding.FragmentStepBinding
+import com.grkj.iscs.view.base.BaseMvpFragment
+import com.grkj.iscs.view.iview.IStepView
+import com.grkj.iscs.view.presenter.StepPresenter
+
+/**
+ * 作业票执行步骤页 - 八大步骤
+ */
+class StepFragment : BaseMvpFragment<IStepView, StepPresenter, FragmentStepBinding>() {
+
+    override val viewBinding: FragmentStepBinding
+        get() = FragmentStepBinding.inflate(layoutInflater)
+
+    override fun initView() {
+
+    }
+
+    override fun initPresenter(): StepPresenter {
+        return StepPresenter()
+    }
+}

+ 6 - 0
app/src/main/java/com/grkj/iscs/view/iview/IStepView.kt

@@ -0,0 +1,6 @@
+package com.grkj.iscs.view.iview
+
+import com.grkj.iscs.view.base.IView
+
+interface IStepView : IView {
+}

+ 1 - 1
app/src/main/java/com/grkj/iscs/view/iview/ITechnologySopView.kt

@@ -2,5 +2,5 @@ package com.grkj.iscs.view.iview
 
 import com.grkj.iscs.view.base.IView
 
-class ITechnologySopView : IView {
+interface ITechnologySopView : IView {
 }

+ 1 - 1
app/src/main/java/com/grkj/iscs/view/iview/IWorkshopView.kt

@@ -2,5 +2,5 @@ package com.grkj.iscs.view.iview
 
 import com.grkj.iscs.view.base.IView
 
-class IWorkshopView : IView {
+interface IWorkshopView : IView {
 }

+ 7 - 0
app/src/main/java/com/grkj/iscs/view/presenter/StepPresenter.kt

@@ -0,0 +1,7 @@
+package com.grkj.iscs.view.presenter
+
+import com.grkj.iscs.view.base.BasePresenter
+import com.grkj.iscs.view.iview.IStepView
+
+class StepPresenter : BasePresenter<IStepView>() {
+}

+ 79 - 0
app/src/main/res/layout/fragment_step.xml

@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout 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"
+    tools:context=".view.fragment.StepFragment">
+
+    <TextView
+        android:id="@+id/tv_title"
+        style="@style/CommonTextView" />
+
+    <TextView
+        android:id="@+id/tv_worker"
+        style="@style/CommonTextView"
+        android:layout_alignParentRight="true" />
+
+    <ImageView
+        android:id="@+id/iv_worker"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_toLeftOf="@id/tv_worker" />
+
+    <TextView
+        android:id="@+id/tv_lock"
+        style="@style/CommonTextView"
+        android:layout_toLeftOf="@id/iv_worker" />
+
+    <ImageView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_toLeftOf="@id/tv_lock" />
+
+    <LinearLayout
+        android:id="@+id/ll_container"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_below="@id/tv_title"
+        android:orientation="vertical">
+
+        <!-- 工艺图 -->
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="1">
+
+        </RelativeLayout>
+
+        <!-- 锁定站 -->
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="2">
+
+        </RelativeLayout>
+    </LinearLayout>
+
+    <TextView
+        android:id="@+id/tv_back"
+        style="@style/CommonBtn"
+        android:layout_alignParentRight="true"
+        android:layout_alignParentBottom="true"
+        android:text="@string/back" />
+
+    <TextView
+        android:id="@+id/tv_cancel"
+        style="@style/CommonBtn"
+        android:layout_alignParentBottom="true"
+        android:layout_toLeftOf="@id/tv_back"
+        android:text="@string/cancel_the_job" />
+
+    <androidx.recyclerview.widget.RecyclerView
+        style="@style/CommonRecyclerView"
+        android:layout_above="@id/tv_cancel"
+        android:layout_below="@id/tv_title"
+        android:layout_toRightOf="@id/ll_container"
+        app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
+        app:spanCount="4" />
+</RelativeLayout>

+ 25 - 0
app/src/main/res/layout/item_rv_step.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/root"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical">
+
+    <TextView
+        android:id="@+id/tv_status"
+        style="@style/CommonTextView" />
+
+    <ImageView
+        android:id="@+id/iv_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content" />
+
+    <TextView
+        android:id="@+id/tv_name"
+        style="@style/CommonTextView" />
+
+    <TextView
+        android:id="@+id/tv_index"
+        style="@style/CommonTextView" />
+
+</LinearLayout>