Commit 7dc6fd67 authored by yinjiacheng's avatar yinjiacheng

update 订单详情部分退款UI

parent 1796babc
...@@ -28,7 +28,7 @@ class OrderStatusViewModel : BaseViewModel() { ...@@ -28,7 +28,7 @@ class OrderStatusViewModel : BaseViewModel() {
OrderStatus.ORDER_STATUS_PAID -> R.drawable.icon_order_status_paid OrderStatus.ORDER_STATUS_PAID -> R.drawable.icon_order_status_paid
OrderStatus.ORDER_STATUS_WAIT_REFUND -> R.drawable.icon_order_status_wait_refund OrderStatus.ORDER_STATUS_WAIT_REFUND -> R.drawable.icon_order_status_wait_refund
OrderStatus.ORDER_STATUS_ON_REFUND -> R.drawable.icon_order_status_on_refund OrderStatus.ORDER_STATUS_ON_REFUND -> R.drawable.icon_order_status_on_refund
OrderStatus.ORDER_STATUS_REFUNDED -> R.drawable.icon_order_status_refunded OrderStatus.ORDER_STATUS_REFUNDED, OrderStatus.ORDER_STATUS_PART_REFUND -> R.drawable.icon_order_status_refunded
OrderStatus.ORDER_STATUS_REFUSE_REFUND -> R.drawable.icon_order_status_refuse_refund OrderStatus.ORDER_STATUS_REFUSE_REFUND -> R.drawable.icon_order_status_refuse_refund
else -> R.drawable.icon_order_status_paid else -> R.drawable.icon_order_status_paid
} }
...@@ -46,7 +46,7 @@ class OrderStatusViewModel : BaseViewModel() { ...@@ -46,7 +46,7 @@ class OrderStatusViewModel : BaseViewModel() {
fun setOrderStatusText(target: TextView, status: OrderStatus?, refundAmount: Double?) { fun setOrderStatusText(target: TextView, status: OrderStatus?, refundAmount: Double?) {
target.text = when (status) { target.text = when (status) {
OrderStatus.ORDER_STATUS_WAIT_REFUND -> "待商家确认" OrderStatus.ORDER_STATUS_WAIT_REFUND -> "待商家确认"
OrderStatus.ORDER_STATUS_REFUNDED -> "退款金额: ¥$refundAmount" OrderStatus.ORDER_STATUS_REFUNDED, OrderStatus.ORDER_STATUS_PART_REFUND -> "退款金额: ¥$refundAmount"
OrderStatus.ORDER_STATUS_REFUSE_REFUND -> "如有疑问请联系卖家" OrderStatus.ORDER_STATUS_REFUSE_REFUND -> "如有疑问请联系卖家"
else -> "" else -> ""
} }
......
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
android:text="@string/refund_apply" android:text="@string/refund_apply"
android:textColor="@color/color_999999" android:textColor="@color/color_999999"
android:textSize="@dimen/sp14" android:textSize="@dimen/sp14"
android:visibility="@{status == OrderStatus.ORDER_STATUS_WAIT_REFUND || status == OrderStatus.ORDER_STATUS_REFUNDED || status == OrderStatus.ORDER_STATUS_ON_REFUND || status == OrderStatus.ORDER_STATUS_REFUSE_REFUND ? View.VISIBLE : View.GONE}" android:visibility="@{status == OrderStatus.ORDER_STATUS_WAIT_REFUND || status == OrderStatus.ORDER_STATUS_REFUNDED || status == OrderStatus.ORDER_STATUS_ON_REFUND || status == OrderStatus.ORDER_STATUS_REFUSE_REFUND || status == OrderStatus.ORDER_STATUS_PART_REFUND ? View.VISIBLE : View.GONE}"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_order_payment_time_text" /> app:layout_constraintTop_toBottomOf="@id/tv_order_payment_time_text" />
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
android:text="@{data.refundApplyTime}" android:text="@{data.refundApplyTime}"
android:textColor="@color/color_333333" android:textColor="@color/color_333333"
android:textSize="@dimen/sp14" android:textSize="@dimen/sp14"
android:visibility="@{status == OrderStatus.ORDER_STATUS_WAIT_REFUND || status == OrderStatus.ORDER_STATUS_REFUNDED || status == OrderStatus.ORDER_STATUS_ON_REFUND || status == OrderStatus.ORDER_STATUS_REFUSE_REFUND ? View.VISIBLE : View.GONE}" android:visibility="@{status == OrderStatus.ORDER_STATUS_WAIT_REFUND || status == OrderStatus.ORDER_STATUS_REFUNDED || status == OrderStatus.ORDER_STATUS_ON_REFUND || status == OrderStatus.ORDER_STATUS_REFUSE_REFUND || status == OrderStatus.ORDER_STATUS_PART_REFUND? View.VISIBLE : View.GONE}"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_order_refund_apply_text" app:layout_constraintTop_toTopOf="@id/tv_order_refund_apply_text"
tools:text="2021-5-10 10:23" /> tools:text="2021-5-10 10:23" />
...@@ -133,10 +133,10 @@ ...@@ -133,10 +133,10 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp20" android:layout_marginTop="@dimen/dp20"
android:text="@{status == OrderStatus.ORDER_STATUS_REFUNDED ? @string/refund_time : @string/refuse_time}" android:text="@{status == OrderStatus.ORDER_STATUS_REFUNDED || status == OrderStatus.ORDER_STATUS_PART_REFUND ? @string/refund_time : @string/refuse_time}"
android:textColor="@color/color_999999" android:textColor="@color/color_999999"
android:textSize="@dimen/sp14" android:textSize="@dimen/sp14"
android:visibility="@{status == OrderStatus.ORDER_STATUS_REFUNDED || status == OrderStatus.ORDER_STATUS_REFUSE_REFUND ? View.VISIBLE : View.GONE}" android:visibility="@{status == OrderStatus.ORDER_STATUS_REFUNDED || status == OrderStatus.ORDER_STATUS_REFUSE_REFUND || status == OrderStatus.ORDER_STATUS_PART_REFUND ? View.VISIBLE : View.GONE}"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tv_order_refund_apply_text" /> app:layout_constraintTop_toBottomOf="@id/tv_order_refund_apply_text" />
...@@ -144,10 +144,10 @@ ...@@ -144,10 +144,10 @@
android:id="@+id/tv_order_refund_time" android:id="@+id/tv_order_refund_time"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@{status == OrderStatus.ORDER_STATUS_REFUNDED ? data.refundFinishTime : data.auditTime}" android:text="@{status == OrderStatus.ORDER_STATUS_REFUNDED || status == OrderStatus.ORDER_STATUS_PART_REFUND ? data.refundFinishTime : data.auditTime}"
android:textColor="@color/color_333333" android:textColor="@color/color_333333"
android:textSize="@dimen/sp14" android:textSize="@dimen/sp14"
android:visibility="@{status == OrderStatus.ORDER_STATUS_REFUNDED || status == OrderStatus.ORDER_STATUS_REFUSE_REFUND ? View.VISIBLE : View.GONE}" android:visibility="@{status == OrderStatus.ORDER_STATUS_REFUNDED || status == OrderStatus.ORDER_STATUS_REFUSE_REFUND || status == OrderStatus.ORDER_STATUS_PART_REFUND ? View.VISIBLE : View.GONE}"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/tv_order_refund_time_text" app:layout_constraintTop_toTopOf="@id/tv_order_refund_time_text"
tools:text="2021-5-10 10:23" /> tools:text="2021-5-10 10:23" />
......
...@@ -39,13 +39,16 @@ ...@@ -39,13 +39,16 @@
<TextView <TextView
android:id="@+id/tv_pickup_point_name" android:id="@+id/tv_pickup_point_name"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp12" android:layout_marginStart="@dimen/dp12"
android:ellipsize="end"
android:maxLines="1"
android:text="@{data == null ? @string/please_select_pickup_point : data.takePlaceName}" android:text="@{data == null ? @string/please_select_pickup_point : data.takePlaceName}"
android:textColor="@color/color_333333" android:textColor="@color/color_333333"
android:textSize="@dimen/sp16" android:textSize="@dimen/sp16"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/tv_pickup_point" app:layout_constraintStart_toEndOf="@id/tv_pickup_point"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
tools:text="维多利亚3层" /> tools:text="维多利亚3层" />
...@@ -78,7 +81,7 @@ ...@@ -78,7 +81,7 @@
<TextView <TextView
android:id="@+id/tv_pickup_point_contact" android:id="@+id/tv_pickup_point_contact"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp4" android:layout_marginTop="@dimen/dp4"
android:onClick="@{() -> vm.contractPickupPoint(data.phone)}" android:onClick="@{() -> vm.contractPickupPoint(data.phone)}"
...@@ -86,6 +89,7 @@ ...@@ -86,6 +89,7 @@
android:textColor="@color/color_999999" android:textColor="@color/color_999999"
android:textSize="@dimen/sp14" android:textSize="@dimen/sp14"
android:visibility="@{data != null ? View.VISIBLE : View.GONE}" android:visibility="@{data != null ? View.VISIBLE : View.GONE}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@id/tv_pickup_point_name" app:layout_constraintStart_toStartOf="@id/tv_pickup_point_name"
app:layout_constraintTop_toBottomOf="@id/tv_pickup_point_address" app:layout_constraintTop_toBottomOf="@id/tv_pickup_point_address"
tools:text="提货点联系人:面团儿" /> tools:text="提货点联系人:面团儿" />
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp8" android:layout_marginStart="@dimen/dp8"
android:text="@{status.text}" android:text="@{data.orderStatusText}"
android:textColor="@color/color_333333" android:textColor="@color/color_333333"
android:textSize="@dimen/sp22" android:textSize="@dimen/sp22"
android:textStyle="bold" android:textStyle="bold"
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
android:layout_marginTop="@dimen/dp8" android:layout_marginTop="@dimen/dp8"
android:textColor="@color/color_666666" android:textColor="@color/color_666666"
android:textSize="@dimen/sp14" android:textSize="@dimen/sp14"
android:visibility="@{status == OrderStatus.ORDER_STATUS_WAIT_REFUND || status == OrderStatus.ORDER_STATUS_REFUNDED || status == OrderStatus.ORDER_STATUS_REFUSE_REFUND ? View.VISIBLE : View.GONE}" android:visibility="@{status == OrderStatus.ORDER_STATUS_WAIT_REFUND || status == OrderStatus.ORDER_STATUS_REFUNDED || status == OrderStatus.ORDER_STATUS_REFUSE_REFUND || status == OrderStatus.ORDER_STATUS_PART_REFUND ? View.VISIBLE : View.GONE}"
app:layout_constraintStart_toEndOf="@id/iv_order_status" app:layout_constraintStart_toEndOf="@id/iv_order_status"
app:layout_constraintTop_toBottomOf="@id/tv_order_status" app:layout_constraintTop_toBottomOf="@id/tv_order_status"
app:orderRefundAmount="@{data.refundAmount}" app:orderRefundAmount="@{data.refundAmount}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment