Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
android
/
dayu
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
320deecd
authored
Feb 01, 2018
by
罗翻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加备件列表,物流信息等页面
parent
1619ccba
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
8 deletions
annotation_lib/build/libs/annotation_lib.jar
app/src/main/java/com/dayu/bigfish/presenter/orderpart/OrderPartContract.java
app/src/main/java/com/dayu/bigfish/presenter/orderpart/OrderPartPresenter.java
app/src/main/java/com/dayu/bigfish/presenter/receivingorder/ReceivingPresenter.java
app/src/main/java/com/dayu/bigfish/ui/views/LRecyclerView.java
app/src/main/res/layout/item_apply_part_layout.xml
annotation_lib/build/libs/annotation_lib.jar
View file @
320deecd
No preview for this file type
app/src/main/java/com/dayu/bigfish/presenter/orderpart/OrderPartContract.java
View file @
320deecd
...
@@ -17,6 +17,9 @@ public interface OrderPartContract {
...
@@ -17,6 +17,9 @@ public interface OrderPartContract {
}
}
abstract
class
Presenter
extends
BaseListPresenter
<
View
>
{
abstract
class
Presenter
extends
BaseListPresenter
<
View
>
{
/**
* 查询备件列表
*/
public
abstract
void
queryPartList
();
public
abstract
void
queryPartList
();
/**
/**
...
...
app/src/main/java/com/dayu/bigfish/presenter/orderpart/OrderPartPresenter.java
View file @
320deecd
...
@@ -63,7 +63,9 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
...
@@ -63,7 +63,9 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
@Override
@Override
public
void
queryPartList
()
{
public
void
queryPartList
()
{
ApiFactory
.
queryPart
(
mOrderId
,
mType
).
subscribe
(
baseObserver
(
ApiFactory
.
queryPart
(
mOrderId
,
mType
).
subscribe
(
baseObserver
(
(
Consumer
<
List
<
OrderPart
>>)
orderPart
->
datas
.
set
(
orderPart
)
(
Consumer
<
List
<
OrderPart
>>)
orderPart
->
{
datas
.
set
(
orderPart
);
}
,
responeThrowable
->
datas
.
set
(
Constants
.
FAILED
)));
,
responeThrowable
->
datas
.
set
(
Constants
.
FAILED
)));
}
}
...
@@ -74,7 +76,7 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
...
@@ -74,7 +76,7 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
bundle
.
putInt
(
Constants
.
ORDER_ID
,
mOrderId
);
bundle
.
putInt
(
Constants
.
ORDER_ID
,
mOrderId
);
bundle
.
putInt
(
Constants
.
TYPE
,
Constants
.
APPLY_PART
);
bundle
.
putInt
(
Constants
.
TYPE
,
Constants
.
APPLY_PART
);
mView
.
startActivity
(
CommonSubmiteActivity
.
class
,
bundle
);
mView
.
startActivity
(
CommonSubmiteActivity
.
class
,
bundle
);
MobclickAgent
.
onEvent
(
MyApplication
.
getContext
(),
"applyApply"
);
MobclickAgent
.
onEvent
(
MyApplication
.
getContext
(),
"applyApply"
);
}
else
if
(
mType
==
2
)
{
}
else
if
(
mType
==
2
)
{
dumpToReturnPart
(
Constants
.
BYMYSELF
,
null
);
dumpToReturnPart
(
Constants
.
BYMYSELF
,
null
);
}
}
...
@@ -87,7 +89,7 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
...
@@ -87,7 +89,7 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
bundle
.
putInt
(
Constants
.
PART_ID
,
partId
);
bundle
.
putInt
(
Constants
.
PART_ID
,
partId
);
bundle
.
putInt
(
Constants
.
TYPE
,
Constants
.
REFUSE_PART
);
bundle
.
putInt
(
Constants
.
TYPE
,
Constants
.
REFUSE_PART
);
mView
.
startActivity
(
CommonSubmiteActivity
.
class
,
bundle
);
mView
.
startActivity
(
CommonSubmiteActivity
.
class
,
bundle
);
MobclickAgent
.
onEvent
(
MyApplication
.
getContext
(),
"refuseApply"
);
MobclickAgent
.
onEvent
(
MyApplication
.
getContext
(),
"refuseApply"
);
}
}
@Override
@Override
...
@@ -102,7 +104,7 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
...
@@ -102,7 +104,7 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
}
}
bundle
.
putInt
(
Constants
.
TYPE
,
type
);
bundle
.
putInt
(
Constants
.
TYPE
,
type
);
mView
.
startActivity
(
ReturnPartActivity
.
class
,
bundle
);
mView
.
startActivity
(
ReturnPartActivity
.
class
,
bundle
);
MobclickAgent
.
onEvent
(
MyApplication
.
getContext
(),
"returnApply"
);
MobclickAgent
.
onEvent
(
MyApplication
.
getContext
(),
"returnApply"
);
}
}
@Override
@Override
...
@@ -111,19 +113,19 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
...
@@ -111,19 +113,19 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
bundle
.
putString
(
Constants
.
COURIER_NUM
,
courierNum
);
bundle
.
putString
(
Constants
.
COURIER_NUM
,
courierNum
);
bundle
.
putString
(
Constants
.
SHIPPER_CODE
,
shipperCode
);
bundle
.
putString
(
Constants
.
SHIPPER_CODE
,
shipperCode
);
mView
.
startActivity
(
LogisticsInfoActivity
.
class
,
bundle
);
mView
.
startActivity
(
LogisticsInfoActivity
.
class
,
bundle
);
MobclickAgent
.
onEvent
(
MyApplication
.
getContext
(),
"queryLogistics"
);
MobclickAgent
.
onEvent
(
MyApplication
.
getContext
(),
"queryLogistics"
);
}
}
public
Observable
<
Boolean
>
cancleApply
(
int
partId
)
{
public
Observable
<
Boolean
>
cancleApply
(
int
partId
)
{
mView
.
showDialog
();
mView
.
showDialog
();
MobclickAgent
.
onEvent
(
MyApplication
.
getContext
(),
"cancleApply"
);
MobclickAgent
.
onEvent
(
MyApplication
.
getContext
(),
"cancleApply"
);
return
ApiFactory
.
cancleApply
(
partId
,
mUserName
);
return
ApiFactory
.
cancleApply
(
partId
,
mUserName
);
}
}
@Override
@Override
public
Observable
receivePart
(
int
partId
)
{
public
Observable
receivePart
(
int
partId
)
{
mView
.
showDialog
();
mView
.
showDialog
();
MobclickAgent
.
onEvent
(
MyApplication
.
getContext
(),
"receiveApply"
);
MobclickAgent
.
onEvent
(
MyApplication
.
getContext
(),
"receiveApply"
);
return
ApiFactory
.
receivePart
(
partId
,
mUserName
);
return
ApiFactory
.
receivePart
(
partId
,
mUserName
);
}
}
}
}
app/src/main/java/com/dayu/bigfish/presenter/receivingorder/ReceivingPresenter.java
View file @
320deecd
...
@@ -82,9 +82,9 @@ public class ReceivingPresenter extends ReceivingContract.Presenter {
...
@@ -82,9 +82,9 @@ public class ReceivingPresenter extends ReceivingContract.Presenter {
public
void
receiveOrderSuccess
()
{
public
void
receiveOrderSuccess
()
{
int
num
=
mTotalRows
-
1
;
int
num
=
mTotalRows
-
1
;
mView
.
showToast
(
R
.
string
.
receive_order_success
);
mView
.
showToast
(
R
.
string
.
receive_order_success
);
EventBus
.
getDefault
().
post
(
new
SwtichFragment
(
1
));
mView
.
dumpBack
();
mView
.
dumpBack
();
mDisPosable
=
Observable
.
timer
(
300
,
TimeUnit
.
MILLISECONDS
).
subscribe
(
aLong
->
{
mDisPosable
=
Observable
.
timer
(
300
,
TimeUnit
.
MILLISECONDS
).
subscribe
(
aLong
->
{
EventBus
.
getDefault
().
post
(
new
SwtichFragment
(
1
));
EventBus
.
getDefault
().
post
(
new
RefreshTab
(
0
));
EventBus
.
getDefault
().
post
(
new
RefreshTab
(
0
));
EventBus
.
getDefault
().
post
(
new
RefreshReceivingNum
(
num
<
0
?
0
:
num
));
EventBus
.
getDefault
().
post
(
new
RefreshReceivingNum
(
num
<
0
?
0
:
num
));
EventBus
.
getDefault
().
post
(
new
RefreshApoiment
(-
1
));
EventBus
.
getDefault
().
post
(
new
RefreshApoiment
(-
1
));
...
...
app/src/main/java/com/dayu/bigfish/ui/views/LRecyclerView.java
View file @
320deecd
...
@@ -308,4 +308,11 @@ public class LRecyclerView<M, B> extends FrameLayout {
...
@@ -308,4 +308,11 @@ public class LRecyclerView<M, B> extends FrameLayout {
public
List
<
M
>
getDatas
()
{
public
List
<
M
>
getDatas
()
{
return
mCoreAdapter
.
getDatas
();
return
mCoreAdapter
.
getDatas
();
}
}
/**
* 滑动到底部.
*/
public
void
scrollBottom
()
{
recyclerview
.
smoothScrollToPosition
(
mCoreAdapter
.
getItemCount
()
-
1
);
}
}
}
app/src/main/res/layout/item_apply_part_layout.xml
View file @
320deecd
...
@@ -73,6 +73,8 @@
...
@@ -73,6 +73,8 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"5dp"
android:layout_marginLeft=
"5dp"
android:textColor=
"@color/default_text_color"
android:textColor=
"@color/default_text_color"
android:ellipsize=
"end"
android:maxLines=
"5"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
</LinearLayout>
</LinearLayout>
...
@@ -163,6 +165,8 @@
...
@@ -163,6 +165,8 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"5dp"
android:layout_marginLeft=
"5dp"
android:textColor=
"@color/default_text_color"
android:textColor=
"@color/default_text_color"
android:ellipsize=
"end"
android:maxLines=
"5"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
</LinearLayout>
</LinearLayout>
...
...
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