Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
HBHAndroid
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
杨秀秀
HBHAndroid
Commits
400731da
Commit
400731da
authored
Oct 29, 2023
by
小费同学阿
💬
Committed by
杨秀秀
Nov 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
诉求编辑备注
parent
0fc8d6fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
+16
-13
AppealEditActivity.java
...java/com/xx/merchanthbh/ui/appeal/AppealEditActivity.java
+12
-10
AppealEditViewModel.java
...ava/com/xx/merchanthbh/ui/appeal/AppealEditViewModel.java
+4
-3
No files found.
app/src/main/java/com/xx/merchanthbh/ui/appeal/AppealEditActivity.java
View file @
400731da
...
...
@@ -40,16 +40,18 @@ public class AppealEditActivity extends BaseActivity<ActivityAppealEditBinding,
viewModel
.
getAppealDetailById
(
getIntent
().
getStringExtra
(
"appealId"
));
// 调用ViewModel的方法来刷新昵称
viewModel
.
refreshNickName
();
if
(
viewModel
.
remark
!=
null
)
{
binding
.
rejectReasonTip
.
setVisibility
(
View
.
VISIBLE
);
viewModel
.
showRejectionDialog
.
observe
(
this
,
show
->
{
String
rejectionReason
=
StringUtils
.
isEmpty
(
viewModel
.
remark
)
?
""
:
viewModel
.
remark
;
RejectionDialog
rejectionDialog
=
new
RejectionDialog
(
this
,
rejectionReason
);
rejectionDialog
.
show
();
});
}
else
{
binding
.
rejectReasonTip
.
setVisibility
(
View
.
GONE
);
}
viewModel
.
showRejectionDialog
.
observe
(
this
,
show
->
{
String
rejectionReason
=
StringUtils
.
isEmpty
(
viewModel
.
remark
.
getValue
())
?
""
:
viewModel
.
remark
.
getValue
();
RejectionDialog
rejectionDialog
=
new
RejectionDialog
(
this
,
rejectionReason
);
rejectionDialog
.
show
();
});
// 如果有驳回原因则显示控件
viewModel
.
remark
.
observe
(
this
,
remark
->
{
if
(
remark
!=
null
)
{
binding
.
rejectReasonTip
.
setVisibility
(
View
.
VISIBLE
);
}
});
/*上传图片*/
...
...
app/src/main/java/com/xx/merchanthbh/ui/appeal/AppealEditViewModel.java
View file @
400731da
...
...
@@ -69,7 +69,7 @@ public class AppealEditViewModel extends BaseViewModel<AppealRequest> {
List
<
FileBean
>
fList
=
new
ArrayList
<>();
/*驳回原因*/
public
String
remark
=
""
;
public
MutableLiveData
<
String
>
remark
=
new
MutableLiveData
<>(
null
)
;
public
AppealEditViewModel
(
@NonNull
Application
application
)
{
super
(
application
);
...
...
@@ -115,8 +115,9 @@ public class AppealEditViewModel extends BaseViewModel<AppealRequest> {
dictSort
=
String
.
valueOf
(
resultBean
.
getAppAppealType
());
/*驳回原因赋值*/
if
(!
resultBean
.
getOperations
().
isEmpty
())
{
Log
.
v
(
"resultBean.getOperations().size()"
,
String
.
valueOf
(
resultBean
.
getOperations
().
size
()));
/*取操作日志最新的一条的remark*/
remark
=
resultBean
.
getOperations
().
get
(
resultBean
.
getOperations
().
size
()
-
1
).
getRemark
(
);
remark
.
setValue
(
resultBean
.
getOperations
().
get
(
resultBean
.
getOperations
().
size
()
-
1
).
getRemark
()
);
}
/*上传图片*/
appealPicsAdapter
.
mList
.
clear
();
...
...
@@ -192,7 +193,7 @@ public class AppealEditViewModel extends BaseViewModel<AppealRequest> {
/*查看原因的弹窗*/
public
void
openReason
(
View
view
)
{
boolean
deFlag
=
true
;
RejectionBean
rejectionBean
=
new
RejectionBean
(
deFlag
,
StringUtils
.
isEmpty
(
remark
)
?
""
:
remark
);
RejectionBean
rejectionBean
=
new
RejectionBean
(
deFlag
,
StringUtils
.
isEmpty
(
remark
.
getValue
())
?
""
:
remark
.
getValue
()
);
showRejectionDialog
.
postValue
(
rejectionBean
);
}
/*上传图片*/
public
void
openPhoto
(
AddImgAdapter
type
,
int
position
)
{
...
...
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