Browse Source

1.已取消的货源也要再来一单按钮。

石慧云 4 years ago
parent
commit
f62d7de611

+ 6 - 0
app/src/main/java/com/quansu/heifengwuliu/vmodel/SourceDetailsVModel.kt

@@ -61,6 +61,10 @@ open class SourceDetailsVModel(application: Application) : BViewModel<BRepositor
     var isPayShow: MutableLiveData<Boolean> = MutableLiveData<Boolean>()
 
 
+    var isPayCancel: MutableLiveData<Boolean> = MutableLiveData<Boolean>()
+
+
+
     @Bindable
     var number: String? = null
         set(value) {
@@ -78,6 +82,8 @@ open class SourceDetailsVModel(application: Application) : BViewModel<BRepositor
 
                         isPayShow.value=info.value!!.order.info_state == 10
 
+                        isPayCancel.value=info.value!!.order.info_state == 100
+
                     }
                 }
                 .subscribe()

+ 3 - 0
app/src/main/res/layout/activity_grabdetails.xml

@@ -372,6 +372,7 @@
                                 android:layout_width="50dp"
                                 android:layout_height="wrap_content"
                                 android:layout_marginTop="4dp"
+                                android:gravity="center"
                                 android:text="@{vm.info.company.name}"
                                 android:textColor="@color/text_title"
                                 android:textSize="13sp"
@@ -667,6 +668,8 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_gravity="bottom"
+                android:layout_marginStart="16dp"
+                android:layout_marginEnd="15dp"
                 android:onClick="@{v->vm.toGrab(vm.info.order.info_id)}">
 
                 <ImageView

+ 16 - 0
app/src/main/res/layout/activity_sourcedetails.xml

@@ -483,6 +483,22 @@
 
 
 
+            <com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton
+                android:id="@+id/but_cancel"
+                android:layout_width="match_parent"
+                android:layout_height="47dp"
+                android:onClick="@{v->vm.anotherOne()}"
+                android:text="再来一单"
+                android:textColor="@color/white"
+                android:textSize="16sp"
+                android:visibility="@{vm.isPayCancel?View.VISIBLE:View.GONE}"
+                app:qmui_backgroundColor="#FF6029"
+                app:qmui_borderColor="#FF6029"
+                app:qmui_radius="25dp">
+
+            </com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButton>
+
+
 
         </LinearLayout>