Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RvApp
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
1
Merge Requests
1
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
lify
RvApp
Commits
1632103a
Commit
1632103a
authored
Jul 13, 2019
by
linfeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-member-john' of
http://113.105.137.151:22280/lify/rvapp
parents
43112fbb
f02312c2
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
150 additions
and
136 deletions
+150
-136
TravelerListAdapter.java
.../main/java/com/rv/rvmine/adapter/TravelerListAdapter.java
+5
-25
ChooseAVisitorActivity.java
...n/java/com/rv/rvmine/traveler/ChooseAVisitorActivity.java
+127
-99
common_icon_select.png
...e_mine/src/main/res/drawable-xhdpi/common_icon_select.png
+0
-0
common_icon_unselect.png
...mine/src/main/res/drawable-xhdpi/common_icon_unselect.png
+0
-0
rv_item_traveler_list.xml
module_mine/src/main/res/layout/rv_item_traveler_list.xml
+3
-6
TravelerConfirmOrderActivity.java
...va/com/rv/tourism/other/TravelerConfirmOrderActivity.java
+13
-6
MemberCenterActivity.java
...ber/src/main/java/com/rv.member/MemberCenterActivity.java
+2
-0
No files found.
module_mine/src/main/java/com/rv/rvmine/adapter/TravelerListAdapter.java
View file @
1632103a
...
@@ -3,7 +3,6 @@ package com.rv.rvmine.adapter;
...
@@ -3,7 +3,6 @@ package com.rv.rvmine.adapter;
import
android.view.View
;
import
android.view.View
;
import
android.widget.CheckBox
;
import
android.widget.CheckBox
;
import
android.widget.CompoundButton
;
import
android.widget.CompoundButton
;
import
android.widget.Toast
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.chad.library.adapter.base.BaseViewHolder
;
...
@@ -39,14 +38,14 @@ public class TravelerListAdapter extends BaseQuickAdapter<TravelerListBean.DataB
...
@@ -39,14 +38,14 @@ public class TravelerListAdapter extends BaseQuickAdapter<TravelerListBean.DataB
helper
.
itemView
.
findViewById
(
R
.
id
.
cb_draveler
).
setVisibility
(
View
.
GONE
);
helper
.
itemView
.
findViewById
(
R
.
id
.
cb_draveler
).
setVisibility
(
View
.
GONE
);
}
else
{
}
else
{
if
(
item
.
getStatus
())
{
if
(
item
.
getStatus
())
{
helper
.
set
Checked
(
R
.
id
.
cb_draveler
,
true
);
helper
.
set
ImageResource
(
R
.
id
.
cb_draveler
,
R
.
drawable
.
common_icon_select
);
}
else
{
}
else
{
helper
.
set
Checked
(
R
.
id
.
cb_draveler
,
false
);
helper
.
set
ImageResource
(
R
.
id
.
cb_draveler
,
R
.
drawable
.
common_icon_unselect
);
}
}
helper
.
setOnCheckedChangeListener
(
R
.
id
.
cb_draveler
,
new
CompoundButton
.
OnCheckedChange
Listener
()
{
helper
.
itemView
.
setOnClickListener
(
new
View
.
OnClick
Listener
()
{
@Override
@Override
public
void
onC
heckedChanged
(
CompoundButton
buttonView
,
boolean
isChecked
)
{
public
void
onC
lick
(
View
view
)
{
boolean
status
=
item
.
getStatus
();
boolean
status
=
item
.
getStatus
();
boolean
result
=
false
;
boolean
result
=
false
;
if
(
mListener
!=
null
)
{
if
(
mListener
!=
null
)
{
...
@@ -58,26 +57,7 @@ public class TravelerListAdapter extends BaseQuickAdapter<TravelerListBean.DataB
...
@@ -58,26 +57,7 @@ public class TravelerListAdapter extends BaseQuickAdapter<TravelerListBean.DataB
}
else
{
}
else
{
mListener
.
showError
();
mListener
.
showError
();
}
}
((
CheckBox
)
helper
.
itemView
.
findViewById
(
R
.
id
.
cb_draveler
)).
setChecked
(
status
);
helper
.
setImageResource
(
R
.
id
.
cb_draveler
,
status
?
R
.
drawable
.
common_icon_select
:
R
.
drawable
.
common_icon_unselect
);
}
});
helper
.
itemView
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
// ((CheckBox)helper.itemView.findViewById(R.id.cb_draveler)).setChecked(item.getStatus());
// boolean status = item.getStatus();
// boolean result = false;
// if (mListener != null) {
// result = mListener.select(item, status ? 0 : 1);
// }
// if (result) { // 动作成功
// status = !status;
// item.setStatus(status);
// } else {
// mListener.showError();
// }
((
CheckBox
)
helper
.
itemView
.
findViewById
(
R
.
id
.
cb_draveler
)).
setChecked
(!
item
.
getStatus
());
}
}
});
});
}
}
...
...
module_mine/src/main/java/com/rv/rvmine/traveler/ChooseAVisitorActivity.java
View file @
1632103a
This diff is collapsed.
Click to expand it.
module_mine/src/main/res/drawable-xhdpi/common_icon_select.png
0 → 100644
View file @
1632103a
541 Bytes
module_mine/src/main/res/drawable-xhdpi/common_icon_unselect.png
0 → 100644
View file @
1632103a
466 Bytes
module_mine/src/main/res/layout/rv_item_traveler_list.xml
View file @
1632103a
...
@@ -17,13 +17,10 @@
...
@@ -17,13 +17,10 @@
android:layout_marginBottom=
"@dimen/size_15"
android:layout_marginBottom=
"@dimen/size_15"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<CheckBox
<ImageView
android:checked=
"false"
android:focusable=
"false"
android:focusableInTouchMode=
"false"
android:id=
"@+id/cb_draveler"
android:id=
"@+id/cb_draveler"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
@dimen/size_15
"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
@dimen/size_15
"
android:layout_gravity=
"center_vertical"
/>
android:layout_gravity=
"center_vertical"
/>
<LinearLayout
<LinearLayout
...
...
module_tourism/src/main/java/com/rv/tourism/other/TravelerConfirmOrderActivity.java
View file @
1632103a
...
@@ -8,6 +8,7 @@ import android.support.annotation.Nullable;
...
@@ -8,6 +8,7 @@ import android.support.annotation.Nullable;
import
android.support.v4.widget.PopupWindowCompat
;
import
android.support.v4.widget.PopupWindowCompat
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.RecyclerView
;
import
android.text.TextUtils
;
import
android.view.Gravity
;
import
android.view.Gravity
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
...
@@ -150,7 +151,7 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
...
@@ -150,7 +151,7 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
double
childPrice
=
dataBean
.
getChildPrice
();
double
childPrice
=
dataBean
.
getChildPrice
();
double
adultPrice
=
dataBean
.
getPrice
();
double
adultPrice
=
dataBean
.
getPrice
();
price
=
Arith
.
mul
(
Double
.
valueOf
(
childNum
),
Double
.
valueOf
(
childPrice
))
+
Arith
.
mul
(
Double
.
valueOf
(
adultNum
),
Double
.
valueOf
(
adultPrice
));
price
=
Arith
.
mul
(
Double
.
valueOf
(
childNum
),
Double
.
valueOf
(
childPrice
))
+
Arith
.
mul
(
Double
.
valueOf
(
adultNum
),
Double
.
valueOf
(
adultPrice
));
tvPaymentAmount
.
setText
(
String
.
format
(
"¥%1$s"
,
new
BigDecimal
(
price
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
()));
tvPaymentAmount
.
setText
(
String
.
format
(
"¥%1$s"
,
new
BigDecimal
(
price
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
()));
for
(
int
i
=
0
;
i
<
Integer
.
valueOf
(
dataBean
.
getAdultNum
());
i
++)
{
for
(
int
i
=
0
;
i
<
Integer
.
valueOf
(
dataBean
.
getAdultNum
());
i
++)
{
BeanVisitorInformation
travelMember
=
new
BeanVisitorInformation
();
BeanVisitorInformation
travelMember
=
new
BeanVisitorInformation
();
...
@@ -175,18 +176,24 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
...
@@ -175,18 +176,24 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
public
void
onItemClick
(
BaseQuickAdapter
adapter
,
View
view
,
int
position
)
{
mPosition
=
position
;
mPosition
=
position
;
tourist
=
(
BeanVisitorInformation
)
adapter
.
getItem
(
position
);
tourist
=
(
BeanVisitorInformation
)
adapter
.
getItem
(
position
);
StringBuffer
buffer
=
new
StringBuffer
();
StringBuffer
bufferAdults
=
new
StringBuffer
();
StringBuffer
bufferChilds
=
new
StringBuffer
();
for
(
BeanVisitorInformation
information
:
mVisitorInformationAdapter
.
getData
())
{
for
(
BeanVisitorInformation
information
:
mVisitorInformationAdapter
.
getData
())
{
if
(
information
!=
null
)
{
if
(
information
!=
null
)
{
buffer
.
append
(
information
.
getIdCard
())
if
(
"0"
.
equals
(
information
.
getIsChild
())
&&
!
TextUtils
.
isEmpty
(
information
.
getId
()))
{
.
append
(
";"
);
bufferAdults
.
append
(
information
.
getId
()).
append
(
";"
);
}
else
if
(
"1"
.
equals
(
information
.
getIsChild
())
&&
!
TextUtils
.
isEmpty
(
information
.
getId
()))
{
bufferChilds
.
append
(
information
.
getId
()).
append
(
";"
);
}
}
}
}
}
ARouter
.
getInstance
().
build
(
Constance
.
ACTIVITY_URL_CHOOSEAVISITOR
)
ARouter
.
getInstance
().
build
(
Constance
.
ACTIVITY_URL_CHOOSEAVISITOR
)
.
withInt
(
"adult_number"
,
Integer
.
valueOf
(
dataBean
.
getAdultNum
()))
.
withInt
(
"adult_number"
,
Integer
.
valueOf
(
dataBean
.
getAdultNum
()))
.
withInt
(
"child_number"
,
Integer
.
valueOf
(
dataBean
.
getChildNum
()))
.
withInt
(
"child_number"
,
Integer
.
valueOf
(
dataBean
.
getChildNum
()))
.
withString
(
"hasChoiceAdults"
,
bufferAdults
.
length
()
==
0
?
""
:
bufferAdults
.
substring
(
0
,
bufferAdults
.
length
()
-
1
))
.
withString
(
"hasChoiceChilds"
,
bufferChilds
.
length
()
==
0
?
""
:
bufferChilds
.
substring
(
0
,
bufferChilds
.
length
()
-
1
))
.
withInt
(
"openType"
,
1
)
.
withInt
(
"openType"
,
1
)
.
withString
(
"hasChoice"
,
buffer
.
toString
())
.
navigation
(
mActivity
,
104
);
.
navigation
(
mActivity
,
104
);
}
}
});
});
...
@@ -296,7 +303,7 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
...
@@ -296,7 +303,7 @@ public class TravelerConfirmOrderActivity extends BaseStatusActivity<TourismPres
childrenBean3
.
setVal
(
"¥"
+
info
.
getData
().
getInsurePrice
()
*
(
adultNum
+
childNum
)
*
day
);
childrenBean3
.
setVal
(
"¥"
+
info
.
getData
().
getInsurePrice
()
*
(
adultNum
+
childNum
)
*
day
);
childrenBeanList
.
add
(
childrenBean3
);
childrenBeanList
.
add
(
childrenBean3
);
tvPaymentAmount
.
setText
(
String
.
format
(
"¥%1$s"
,
new
BigDecimal
(
price
+
(
info
.
getData
().
getInsurePrice
()
*
(
adultNum
+
childNum
)
*
day
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
()));
tvPaymentAmount
.
setText
(
String
.
format
(
"¥%1$s"
,
new
BigDecimal
(
price
+
(
info
.
getData
().
getInsurePrice
()
*
(
adultNum
+
childNum
)
*
day
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
()));
}
else
{
}
else
{
tvPaymentAmount
.
setText
(
String
.
format
(
"¥%1$s"
,
new
BigDecimal
(
price
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
()));
tvPaymentAmount
.
setText
(
String
.
format
(
"¥%1$s"
,
new
BigDecimal
(
price
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
doubleValue
()));
}
}
...
...
plugin_member/src/main/java/com/rv.member/MemberCenterActivity.java
View file @
1632103a
...
@@ -130,6 +130,8 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
...
@@ -130,6 +130,8 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
.
subscribe
(
new
Consumer
<
PaymentSuccessfulEvent
>()
{
.
subscribe
(
new
Consumer
<
PaymentSuccessfulEvent
>()
{
@Override
@Override
public
void
accept
(
PaymentSuccessfulEvent
payEvent
)
throws
Exception
{
public
void
accept
(
PaymentSuccessfulEvent
payEvent
)
throws
Exception
{
Class
aClass
=
Class
.
forName
(
"com.rv.rvmine.rxbusevent.UserInfoEvent"
);
RxBus
.
post
(
aClass
.
newInstance
());
startActivityForResult
(
OrderListActivity
.
getIntent
(
MemberCenterActivity
.
this
,
3
),
REQUEST_PAY
);
startActivityForResult
(
OrderListActivity
.
getIntent
(
MemberCenterActivity
.
this
,
3
),
REQUEST_PAY
);
}
}
});
});
...
...
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