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
9289a83a
Commit
9289a83a
authored
Oct 16, 2023
by
小费同学阿
💬
Committed by
杨秀秀
Nov 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
67027 【企业app-android】诉求管理的处理中的界面问题见标注
parent
b8a30fec
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
122 additions
and
107 deletions
+122
-107
StaticData.kt
...ain/java/com/xx/hbhbcompany/data/staticdata/StaticData.kt
+5
-0
AppealDetailManageActivity.java
.../xx/hbhbcompany/ui/appeal/AppealDetailManageActivity.java
+5
-0
AppealListActivity.kt
...va/com/xx/hbhbcompany/ui/appeallist/AppealListActivity.kt
+112
-107
No files found.
hbhbcompany/src/main/java/com/xx/hbhbcompany/data/staticdata/StaticData.kt
View file @
9289a83a
...
@@ -9,6 +9,11 @@ object StaticData {
...
@@ -9,6 +9,11 @@ object StaticData {
*/
*/
@JvmField
@JvmField
var
sUserRole
:
Int
=
0
var
sUserRole
:
Int
=
0
/**
* 诉求状态:0-待提交,1-待分配,2-已驳回,3-处理中,4-已完成
*/
@JvmField
var
appealStatu
:
Int
=
0
@JvmField
@JvmField
var
statusCode
:
String
=
""
var
statusCode
:
String
=
""
/**
/**
...
...
hbhbcompany/src/main/java/com/xx/hbhbcompany/ui/appeal/AppealDetailManageActivity.java
View file @
9289a83a
...
@@ -2,6 +2,7 @@ package com.xx.hbhbcompany.ui.appeal;
...
@@ -2,6 +2,7 @@ package com.xx.hbhbcompany.ui.appeal;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.view.KeyEvent
;
import
android.view.KeyEvent
;
import
android.view.View
;
import
androidx.fragment.app.FragmentTransaction
;
import
androidx.fragment.app.FragmentTransaction
;
import
androidx.navigation.Navigation
;
import
androidx.navigation.Navigation
;
...
@@ -11,6 +12,7 @@ import com.xx.hbhbcompany.BR;
...
@@ -11,6 +12,7 @@ import com.xx.hbhbcompany.BR;
import
com.xx.hbhbcompany.R
;
import
com.xx.hbhbcompany.R
;
import
com.xx.hbhbcompany.data.http.requst.AppealRequest
;
import
com.xx.hbhbcompany.data.http.requst.AppealRequest
;
import
com.xx.hbhbcompany.data.http.requst.OrderRequest
;
import
com.xx.hbhbcompany.data.http.requst.OrderRequest
;
import
com.xx.hbhbcompany.data.staticdata.StaticData
;
import
com.xx.hbhbcompany.databinding.ActivityAppealDetailManagementBinding
;
import
com.xx.hbhbcompany.databinding.ActivityAppealDetailManagementBinding
;
import
com.xx.hbhbcompany.ui.order.OrderViewModel
;
import
com.xx.hbhbcompany.ui.order.OrderViewModel
;
import
com.xx.hbhbcompany.ui.order.PointOrderFragment
;
import
com.xx.hbhbcompany.ui.order.PointOrderFragment
;
...
@@ -32,6 +34,9 @@ public class AppealDetailManageActivity extends BaseActivity<ActivityAppealDetai
...
@@ -32,6 +34,9 @@ public class AppealDetailManageActivity extends BaseActivity<ActivityAppealDetai
// 重写初始方法调用参数
// 重写初始方法调用参数
@Override
@Override
public
void
initData
()
{
public
void
initData
()
{
if
(
StaticData
.
appealStatu
==
3
){
binding
.
tabs
.
setVisibility
(
View
.
GONE
);
}
super
.
initData
();
super
.
initData
();
viewModel
.
businessId
=
getIntent
().
getStringExtra
(
"businessId"
);
viewModel
.
businessId
=
getIntent
().
getStringExtra
(
"businessId"
);
/*切换状态Tab*/
/*切换状态Tab*/
...
...
hbhbcompany/src/main/java/com/xx/hbhbcompany/ui/appeallist/AppealListActivity.kt
View file @
9289a83a
...
@@ -17,7 +17,8 @@ import com.xx.hbhbcompany.ui.appeal.AppealDetailManageActivity
...
@@ -17,7 +17,8 @@ import com.xx.hbhbcompany.ui.appeal.AppealDetailManageActivity
import
com.xx.xxviewlibrary.base.xxBaseRecyclerViewAdapter.OnItemClick
import
com.xx.xxviewlibrary.base.xxBaseRecyclerViewAdapter.OnItemClick
import
me.goldze.mvvmhabit.base.BaseActivity
import
me.goldze.mvvmhabit.base.BaseActivity
class
AppealListActivity
:
BaseActivity
<
ActivityAppealListBinding
,
AppealListViewModel
>(),
OnRefreshListener
,
OnLoadMoreListener
{
class
AppealListActivity
:
BaseActivity
<
ActivityAppealListBinding
,
AppealListViewModel
>(),
OnRefreshListener
,
OnLoadMoreListener
{
override
fun
initContentView
(
savedInstanceState
:
Bundle
?):
Int
{
override
fun
initContentView
(
savedInstanceState
:
Bundle
?):
Int
{
return
R
.
layout
.
activity_appeal_list
return
R
.
layout
.
activity_appeal_list
}
}
...
@@ -30,28 +31,37 @@ class AppealListActivity: BaseActivity<ActivityAppealListBinding, AppealListView
...
@@ -30,28 +31,37 @@ class AppealListActivity: BaseActivity<ActivityAppealListBinding, AppealListView
super
.
initData
()
super
.
initData
()
binding
.
refresh
.
setOnRefreshListener
(
this
)
binding
.
refresh
.
setOnRefreshListener
(
this
)
binding
.
refresh
.
setOnLoadMoreListener
(
this
)
binding
.
refresh
.
setOnLoadMoreListener
(
this
)
if
(
StaticData
.
sUserRole
==
0
||
StaticData
.
sUserRole
==
3
)
if
(
StaticData
.
sUserRole
==
0
||
StaticData
.
sUserRole
==
3
)
{
{
// 设置初始选中的Tab
// 设置初始选中的Tab
binding
.
tabs
.
getTabAt
(
0
)
?.
select
()
binding
.
tabs
.
getTabAt
(
0
)
?.
select
()
binding
.
tabs
.
addOnTabSelectedListener
(
object
:
TabLayout
.
OnTabSelectedListener
binding
.
tabs
.
addOnTabSelectedListener
(
object
:
TabLayout
.
OnTabSelectedListener
{
{
/**
/**
* 诉求状态:0-待提交,1-待分配,2-已驳回,3-处理中,4-已完成
* 诉求状态:0-待提交,1-待分配,2-已驳回,3-处理中,4-已完成
*/
*/
override
fun
onTabSelected
(
tab
:
TabLayout
.
Tab
?)
{
override
fun
onTabSelected
(
tab
:
TabLayout
.
Tab
?)
{
viewModel
.
page
=
1
viewModel
.
page
=
1
viewModel
.
adapter
.
mList
.
clear
()
viewModel
.
adapter
.
mList
.
clear
()
when
(
tab
?.
position
)
when
(
tab
?.
position
)
{
{
//待分配
//待分配
0
->
viewModel
.
appealStatus
=
arrayOf
(
"1"
)
0
->
{
viewModel
.
appealStatus
=
arrayOf
(
"1"
)
StaticData
.
appealStatu
=
1
}
//待提交
//待提交
1
->
viewModel
.
appealStatus
=
arrayOf
(
"0"
)
1
->
{
viewModel
.
appealStatus
=
arrayOf
(
"0"
)
StaticData
.
appealStatu
=
0
}
//处理中
//处理中
2
->
viewModel
.
appealStatus
=
arrayOf
(
"3"
)
2
->
{
viewModel
.
appealStatus
=
arrayOf
(
"3"
)
StaticData
.
appealStatu
=
3
}
//已完成
//已完成
3
->
viewModel
.
appealStatus
=
arrayOf
(
"4"
)
3
->
{
viewModel
.
appealStatus
=
arrayOf
(
"4"
)
StaticData
.
appealStatu
=
4
}
}
}
viewModel
.
getAppealList
()
viewModel
.
getAppealList
()
}
}
...
@@ -63,12 +73,11 @@ class AppealListActivity: BaseActivity<ActivityAppealListBinding, AppealListView
...
@@ -63,12 +73,11 @@ class AppealListActivity: BaseActivity<ActivityAppealListBinding, AppealListView
}
}
})
})
binding
.
tabs
.
visibility
=
View
.
VISIBLE
binding
.
tabs
.
visibility
=
View
.
VISIBLE
binding
.
tabsOrder
.
visibility
=
View
.
GONE
binding
.
tabsOrder
.
visibility
=
View
.
GONE
viewModel
.
adapter
=
AppealListAdapter
(
this
,
viewModel
)
viewModel
.
adapter
=
AppealListAdapter
(
this
,
viewModel
)
binding
.
rvAppealList
.
adapter
=
viewModel
.
adapter
binding
.
rvAppealList
.
adapter
=
viewModel
.
adapter
viewModel
.
adapter
.
setOnItemClick
(
object
:
OnItemClick
<
AppealListBean
>
viewModel
.
adapter
.
setOnItemClick
(
object
:
OnItemClick
<
AppealListBean
>
{
{
override
fun
itemClickCalBack
(
position
:
Int
,
data
:
AppealListBean
?)
{
override
fun
itemClickCalBack
(
position
:
Int
,
data
:
AppealListBean
?)
{
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
/*将要传的businessId传过去*/
/*将要传的businessId传过去*/
...
@@ -89,28 +98,26 @@ class AppealListActivity: BaseActivity<ActivityAppealListBinding, AppealListView
...
@@ -89,28 +98,26 @@ class AppealListActivity: BaseActivity<ActivityAppealListBinding, AppealListView
viewModel
.
getAppealList
()
viewModel
.
getAppealList
()
}
else
{
}
else
{
binding
.
tabs
.
visibility
=
View
.
GONE
binding
.
tabs
.
visibility
=
View
.
GONE
binding
.
tabsOrder
.
visibility
=
View
.
VISIBLE
binding
.
tabsOrder
.
visibility
=
View
.
VISIBLE
viewModel
.
orderAdapter
=
OrderAppealListAdapter
(
this
)
viewModel
.
orderAdapter
=
OrderAppealListAdapter
(
this
)
binding
.
rvAppealList
.
adapter
=
viewModel
.
orderAdapter
binding
.
rvAppealList
.
adapter
=
viewModel
.
orderAdapter
viewModel
.
otherGetAppealList
()
viewModel
.
otherGetAppealList
()
binding
.
tabsOrder
.
addOnTabSelectedListener
(
object
:
TabLayout
.
OnTabSelectedListener
binding
.
tabsOrder
.
addOnTabSelectedListener
(
object
:
TabLayout
.
OnTabSelectedListener
{
{
/**
/**
* 诉求状态:0-待提交,1-待分配,2-已驳回,3-处理中,4-已完成
* 诉求状态:0-待提交,1-待分配,2-已驳回,3-处理中,4-已完成
*/
*/
override
fun
onTabSelected
(
tab
:
TabLayout
.
Tab
?)
{
override
fun
onTabSelected
(
tab
:
TabLayout
.
Tab
?)
{
viewModel
.
page
=
1
viewModel
.
page
=
1
viewModel
.
orderAdapter
.
mList
.
clear
()
viewModel
.
orderAdapter
.
mList
.
clear
()
when
(
tab
?.
position
)
when
(
tab
?.
position
)
{
{
//待分配
//待分配
0
->
viewModel
.
appealStatus
=
arrayOf
(
"3"
)
0
->
viewModel
.
appealStatus
=
arrayOf
(
"3"
)
//待提交
//待提交
1
->
viewModel
.
appealStatus
=
arrayOf
(
"4"
)
1
->
viewModel
.
appealStatus
=
arrayOf
(
"4"
)
}
}
viewModel
.
otherGetAppealList
()
viewModel
.
otherGetAppealList
()
}
}
...
@@ -129,18 +136,17 @@ class AppealListActivity: BaseActivity<ActivityAppealListBinding, AppealListView
...
@@ -129,18 +136,17 @@ class AppealListActivity: BaseActivity<ActivityAppealListBinding, AppealListView
this
this
)
{
)
{
if
(
it
==
1
)
{
if
(
it
==
1
)
{
binding
.
rvAppealList
.
visibility
=
View
.
VISIBLE
binding
.
rvAppealList
.
visibility
=
View
.
VISIBLE
binding
.
llNoData
.
visibility
=
View
.
GONE
binding
.
llNoData
.
visibility
=
View
.
GONE
binding
.
refresh
.
finishLoadMore
();
binding
.
refresh
.
finishLoadMore
();
}
else
if
(
it
==
2
)
{
}
else
if
(
it
==
2
)
{
binding
.
rvAppealList
.
visibility
=
View
.
VISIBLE
binding
.
rvAppealList
.
visibility
=
View
.
VISIBLE
binding
.
llNoData
.
visibility
=
View
.
GONE
binding
.
llNoData
.
visibility
=
View
.
GONE
binding
.
refresh
.
finishLoadMore
();
binding
.
refresh
.
finishLoadMore
();
binding
.
refresh
.
setEnableLoadMore
(
false
);
binding
.
refresh
.
setEnableLoadMore
(
false
);
}
else
if
(
it
==
3
)
}
else
if
(
it
==
3
)
{
{
binding
.
rvAppealList
.
visibility
=
View
.
GONE
binding
.
rvAppealList
.
visibility
=
View
.
GONE
binding
.
llNoData
.
visibility
=
View
.
VISIBLE
binding
.
llNoData
.
visibility
=
View
.
VISIBLE
binding
.
refresh
.
setEnableLoadMore
(
false
);
binding
.
refresh
.
setEnableLoadMore
(
false
);
}
}
binding
.
refresh
.
finishRefresh
()
binding
.
refresh
.
finishRefresh
()
...
@@ -151,7 +157,7 @@ class AppealListActivity: BaseActivity<ActivityAppealListBinding, AppealListView
...
@@ -151,7 +157,7 @@ class AppealListActivity: BaseActivity<ActivityAppealListBinding, AppealListView
override
fun
initViewModel
():
AppealListViewModel
{
override
fun
initViewModel
():
AppealListViewModel
{
val
lm
:
AppealListRequest
=
AppealListRequest
()
val
lm
:
AppealListRequest
=
AppealListRequest
()
return
AppealListViewModel
(
application
,
lm
)
return
AppealListViewModel
(
application
,
lm
)
}
}
...
@@ -161,10 +167,9 @@ class AppealListActivity: BaseActivity<ActivityAppealListBinding, AppealListView
...
@@ -161,10 +167,9 @@ class AppealListActivity: BaseActivity<ActivityAppealListBinding, AppealListView
}
}
override
fun
onRefresh
(
refreshLayout
:
RefreshLayout
)
{
override
fun
onRefresh
(
refreshLayout
:
RefreshLayout
)
{
viewModel
.
page
=
1
;
viewModel
.
page
=
1
;
viewModel
.
getAppealList
();
viewModel
.
getAppealList
();
binding
.
refresh
.
setEnableLoadMore
(
true
)
binding
.
refresh
.
setEnableLoadMore
(
true
)
}
}
...
...
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