Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
ShenghuoquanBusiness
Commits
7dc6fd67
Commit
7dc6fd67
authored
Sep 01, 2021
by
yinjiacheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 订单详情部分退款UI
parent
1796babc
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
12 deletions
+16
-12
OrderStatusViewModel.kt
...shenghuoquan/buserorder/viewmodel/OrderStatusViewModel.kt
+2
-2
border_view_order_info.xml
...BUserOrder/src/main/res/layout/border_view_order_info.xml
+6
-6
border_view_order_pickup_point_info.xml
...c/main/res/layout/border_view_order_pickup_point_info.xml
+6
-2
border_view_order_status.xml
...serOrder/src/main/res/layout/border_view_order_status.xml
+2
-2
No files found.
Components/BUserOrder/src/main/java/com/yidian/shenghuoquan/buserorder/viewmodel/OrderStatusViewModel.kt
View file @
7dc6fd67
...
@@ -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
->
""
}
}
...
...
Components/BUserOrder/src/main/res/layout/border_view_order_info.xml
View file @
7dc6fd67
...
@@ -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"
/>
...
...
Components/BUserOrder/src/main/res/layout/border_view_order_pickup_point_info.xml
View file @
7dc6fd67
...
@@ -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=
"提货点联系人:面团儿"
/>
...
...
Components/BUserOrder/src/main/res/layout/border_view_order_status.xml
View file @
7dc6fd67
...
@@ -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.t
ext}"
android:text=
"@{
data.orderStatusT
ext}"
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}"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment