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
24f6b543
authored
7 years ago
by
罗翻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加寄回备件页面
parent
0338f017
master
…
dev
dev_xx
dev_xx_241116
dev_xx_250108_toast
dev_xx_250224_report
dev_xx_250414_sop
dev_xx_web
test
v2.7.2
v2.7.1
v2.7.0
v2.6.9
v2.6.7
v2.6.6
v2.6.5
v2.6.4
v2.6.3
v2.6.2
v2.6.1
v2.6.0
v2.5.9
v2.5.7
v2.5.5
v2.5.4
v2.5.3
v2.5.2
v2.5.0
v2.4.6
v2.4.5
v2.4.0
v_2.4.0
v2.3.2
v2.3.1
dev20230405
android_v1.6.0
android_v1.3.0
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
559 additions
and
150 deletions
annotation_lib/build/libs/annotation_lib.jar
app/src/main/java/com/dayu/bigfish/Constants.java
app/src/main/java/com/dayu/bigfish/api/APIService.java
app/src/main/java/com/dayu/bigfish/api/Api.java
app/src/main/java/com/dayu/bigfish/bean/OrderDetail.java
app/src/main/java/com/dayu/bigfish/bean/OrderPart.java
app/src/main/java/com/dayu/bigfish/bean/ShipperCompany.java
app/src/main/java/com/dayu/bigfish/presenter/feedback/FeedBackPresenter.java
app/src/main/java/com/dayu/bigfish/presenter/logisticsinfo/LogisticsInfoPresenter.java
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/returnpart/ReturnPartContract.java
app/src/main/java/com/dayu/bigfish/presenter/returnpart/ReturnPartPresenter.java
app/src/main/java/com/dayu/bigfish/presenter/serverinstruction/ServerInstructionPresenter.java
app/src/main/java/com/dayu/bigfish/ui/LogisticsInfoActivity.java
app/src/main/java/com/dayu/bigfish/ui/OrderDetailsActivity.java
app/src/main/java/com/dayu/bigfish/ui/ReturnPartActivity.java
app/src/main/java/com/dayu/bigfish/ui/adapter/OrderPartAdapter.java
app/src/main/java/com/dayu/bigfish/ui/fragment/ApplicationOrderPartFragment.java
app/src/main/java/com/dayu/bigfish/utils/UIUtils.java
app/src/main/res/layout/activity_ka_address_layout.xml
app/src/main/res/layout/activity_order_details.xml
app/src/main/res/layout/activity_return_part.xml
app/src/main/res/layout/fragment_order_application_part.xml
app/src/main/res/layout/item_apply_part_layout.xml
app/src/main/res/values/strings.xml
apt/src/main/java/com/app/apt/processor/ApiFactoryProcessor.java
annotation_lib/build/libs/annotation_lib.jar
View file @
24f6b543
No preview for this file type
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/Constants.java
View file @
24f6b543
...
@@ -139,7 +139,7 @@ public class Constants {
...
@@ -139,7 +139,7 @@ public class Constants {
/**
/**
* 获取厂商收货地址.
* 获取厂商收货地址.
*/
*/
public
final
static
String
KA_ADDRESS
=
"/api-
message/"
+
"hXMessage/count/hxAccount/{hxAccount
}"
;
public
final
static
String
KA_ADDRESS
=
"/api-
ka-user/"
+
"companyAddress/default/companyId/{companyId
}"
;
/**
/**
* 申请备件.
* 申请备件.
...
@@ -181,6 +181,16 @@ public class Constants {
...
@@ -181,6 +181,16 @@ public class Constants {
*/
*/
public
final
static
String
QUERY_LOGISTICS_INFO
=
"/api-base/"
+
"logisticsTraceInfo/queryLogisticsTraceInfo"
;
public
final
static
String
QUERY_LOGISTICS_INFO
=
"/api-base/"
+
"logisticsTraceInfo/queryLogisticsTraceInfo"
;
/**
* 查询物流信息.
*/
public
final
static
String
QUERY_SHIPPER_COMPANY
=
"/api-base/"
+
"shipperCompany/queryShipperList"
;
/**
* 修改备件信息.
*/
public
final
static
String
MODIFY_PART
=
"/api-ka-order/"
+
"kaOrderSpareParts"
;
/***********************其他配置**********************************/
/***********************其他配置**********************************/
public
final
static
int
PAGESIZE
=
10
;
public
final
static
int
PAGESIZE
=
10
;
...
@@ -226,7 +236,12 @@ public class Constants {
...
@@ -226,7 +236,12 @@ public class Constants {
public
final
static
String
ENGINEERINFO
=
"engineer_info"
;
public
final
static
String
ENGINEERINFO
=
"engineer_info"
;
public
final
static
String
TYPE
=
"type"
;
public
final
static
String
TYPE
=
"type"
;
public
final
static
String
DESCRIBE
=
"describe"
;
public
final
static
String
DESCRIBE
=
"describe"
;
public
static
final
String
PART_ID
=
"part_id"
;
public
static
final
String
SHIPPER_CODE
=
"shipper_code"
;
public
static
final
String
COURIER_NUM
=
"courier_num"
;
public
static
final
String
PART
=
"part"
;
/**
/**
* 意见反馈.
* 意见反馈.
...
@@ -262,5 +277,9 @@ public class Constants {
...
@@ -262,5 +277,9 @@ public class Constants {
*/
*/
public
final
static
int
CANCEL
=
5
;
public
final
static
int
CANCEL
=
5
;
public
static
final
String
PART_ID
=
"part_id"
;
public
static
final
int
BYKA
=
0
;
public
static
final
int
BYMYSELF
=
1
;
public
static
final
int
BY_MODIFY_PART
=
2
;
}
}
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/api/APIService.java
View file @
24f6b543
...
@@ -17,6 +17,7 @@ import com.dayu.bigfish.bean.OrderDetail;
...
@@ -17,6 +17,7 @@ import com.dayu.bigfish.bean.OrderDetail;
import
com.dayu.bigfish.bean.OrderPart
;
import
com.dayu.bigfish.bean.OrderPart
;
import
com.dayu.bigfish.bean.OrderRecord
;
import
com.dayu.bigfish.bean.OrderRecord
;
import
com.dayu.bigfish.bean.ServerInstruction
;
import
com.dayu.bigfish.bean.ServerInstruction
;
import
com.dayu.bigfish.bean.ShipperCompany
;
import
com.dayu.bigfish.bean.Tab
;
import
com.dayu.bigfish.bean.Tab
;
import
com.dayu.bigfish.bean.TodayAchievement
;
import
com.dayu.bigfish.bean.TodayAchievement
;
import
com.dayu.bigfish.bean.TodayBalance
;
import
com.dayu.bigfish.bean.TodayBalance
;
...
@@ -416,7 +417,7 @@ public interface APIService {
...
@@ -416,7 +417,7 @@ public interface APIService {
* @param body
* @param body
* @return
* @return
*/
*/
@P
OS
T
(
Constants
.
RETURN_PART_BY_KA
)
@P
U
T
(
Constants
.
RETURN_PART_BY_KA
)
Observable
<
BaseResponse
<
Boolean
>>
returnPartByKA
(
@Body
RequestBody
body
);
Observable
<
BaseResponse
<
Boolean
>>
returnPartByKA
(
@Body
RequestBody
body
);
/**
/**
...
@@ -426,8 +427,8 @@ public interface APIService {
...
@@ -426,8 +427,8 @@ public interface APIService {
* @param modifyBy
* @param modifyBy
* @return
* @return
*/
*/
@P
OS
T
(
Constants
.
RECEIVE_PART
)
@P
U
T
(
Constants
.
RECEIVE_PART
)
Observable
<
BaseResponse
<
Boolean
>>
receivePart
(
@Query
(
"partsId"
)
String
partsId
,
Observable
<
BaseResponse
<
Boolean
>>
receivePart
(
@Query
(
"partsId"
)
int
partsId
,
@Query
(
"modifyBy"
)
String
modifyBy
);
@Query
(
"modifyBy"
)
String
modifyBy
);
/**
/**
...
@@ -438,7 +439,7 @@ public interface APIService {
...
@@ -438,7 +439,7 @@ public interface APIService {
* @return
* @return
*/
*/
@POST
(
Constants
.
REFUSE_ONE_PART
)
@POST
(
Constants
.
REFUSE_ONE_PART
)
Observable
<
BaseResponse
<
Boolean
>>
refusePart
(
@Query
(
"kaOrderSparePartsId"
)
Stri
ng
kaOrderSparePartsId
,
Observable
<
BaseResponse
<
Boolean
>>
refusePart
(
@Query
(
"kaOrderSparePartsId"
)
lo
ng
kaOrderSparePartsId
,
@Query
(
"reason"
)
String
reason
);
@Query
(
"reason"
)
String
reason
);
/**
/**
...
@@ -452,6 +453,15 @@ public interface APIService {
...
@@ -452,6 +453,15 @@ public interface APIService {
Observable
<
BaseResponse
<
List
<
OrderPart
>>>
queryPart
(
@Query
(
"spOrderId"
)
long
spOrderId
,
@Query
(
"sources"
)
int
sources
);
Observable
<
BaseResponse
<
List
<
OrderPart
>>>
queryPart
(
@Query
(
"spOrderId"
)
long
spOrderId
,
@Query
(
"sources"
)
int
sources
);
/**
/**
* 修改备件信息.
*
* @param body
* @return
*/
@PUT
(
Constants
.
MODIFY_PART
)
Observable
<
BaseResponse
<
Boolean
>>
modifyPart
(
@Body
RequestBody
body
);
/**
* 查询物流信息.
* 查询物流信息.
*
*
* @return
* @return
...
@@ -459,6 +469,14 @@ public interface APIService {
...
@@ -459,6 +469,14 @@ public interface APIService {
@GET
(
Constants
.
QUERY_LOGISTICS_INFO
)
@GET
(
Constants
.
QUERY_LOGISTICS_INFO
)
Observable
<
BaseResponse
<
LogsticsInfo
>>
queryLogistics
(
@Query
(
"com"
)
String
com
,
@Query
(
"num"
)
String
num
);
Observable
<
BaseResponse
<
LogsticsInfo
>>
queryLogistics
(
@Query
(
"com"
)
String
com
,
@Query
(
"num"
)
String
num
);
/**
* 查询物流公司.
*
* @return
*/
@GET
(
Constants
.
QUERY_SHIPPER_COMPANY
)
Observable
<
BaseResponse
<
List
<
ShipperCompany
>>>
queryShipperCompany
();
@Streaming
@Streaming
@GET
@GET
Observable
<
ResponseBody
>
download
(
@Url
String
url
);
Observable
<
ResponseBody
>
download
(
@Url
String
url
);
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/api/Api.java
View file @
24f6b543
...
@@ -139,6 +139,7 @@ public class Api {
...
@@ -139,6 +139,7 @@ public class Api {
@Override
@Override
public
Response
intercept
(
Chain
chain
)
throws
IOException
{
public
Response
intercept
(
Chain
chain
)
throws
IOException
{
//TODO token可能会有错.
Request
request
=
chain
.
request
();
Request
request
=
chain
.
request
();
UserInfo
userInfo
=
UserManager
.
getInstance
().
getUser
();
UserInfo
userInfo
=
UserManager
.
getInstance
().
getUser
();
if
(
userInfo
!=
null
)
{
if
(
userInfo
!=
null
)
{
...
@@ -152,7 +153,6 @@ public class Api {
...
@@ -152,7 +153,6 @@ public class Api {
// Log.d("request_header", request.headers().toString());
// Log.d("request_header", request.headers().toString());
return
chain
.
proceed
(
request
);
return
chain
.
proceed
(
request
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/bean/OrderDetail.java
View file @
24f6b543
...
@@ -69,8 +69,17 @@ public class OrderDetail implements Serializable {
...
@@ -69,8 +69,17 @@ public class OrderDetail implements Serializable {
private
String
spuId
;
private
String
spuId
;
private
Integer
anyContacts
;
private
Integer
anyContacts
;
private
Integer
kaCompanyId
;
private
Integer
kaCompanyId
;
private
Integer
createdSource
;
//1.服务商自己填写的工单2.厂商系统派3.ka系统4.小程序添加的工单
private
List
<
accessories
>
accessories
;
private
List
<
accessories
>
accessories
;
public
Integer
getCreatedSource
()
{
return
createdSource
;
}
public
void
setCreatedSource
(
Integer
createdSource
)
{
this
.
createdSource
=
createdSource
;
}
public
int
getId
()
{
public
int
getId
()
{
return
id
;
return
id
;
}
}
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/bean/OrderPart.java
View file @
24f6b543
package
com
.
dayu
.
bigfish
.
bean
;
package
com
.
dayu
.
bigfish
.
bean
;
import
java.io.Serializable
;
/**
/**
* Created by luofan on 2018/1/20.
* Created by luofan on 2018/1/20.
*/
*/
public
class
OrderPart
{
public
class
OrderPart
implements
Serializable
{
private
Integer
id
;
private
Integer
id
;
private
String
partName
;
private
String
partName
;
/**
/**
...
@@ -38,6 +40,10 @@ public class OrderPart {
...
@@ -38,6 +40,10 @@ public class OrderPart {
*/
*/
private
Integer
received
;
private
Integer
received
;
private
int
status
;
private
int
status
;
/**
* 拒绝原因.
*/
private
String
reson
;
/**
/**
* 物流发送方 1表示ka_to_sp 2表示sp_to_ka
* 物流发送方 1表示ka_to_sp 2表示sp_to_ka
...
@@ -172,5 +178,20 @@ public class OrderPart {
...
@@ -172,5 +178,20 @@ public class OrderPart {
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
String
getReason
()
{
return
reson
;
}
public
void
setReason
(
String
reson
)
{
this
.
reson
=
reson
;
}
public
Integer
getSources
()
{
return
sources
;
}
public
void
setSources
(
Integer
sources
)
{
this
.
sources
=
sources
;
}
}
}
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/bean/ShipperCompany.java
0 → 100644
View file @
24f6b543
package
com
.
dayu
.
bigfish
.
bean
;
/**
* Created by luofan on 2018/1/24.
*/
public
class
ShipperCompany
{
private
Integer
id
;
private
String
shipperCode
;
private
String
shipperName
;
private
Integer
status
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getShipperCode
()
{
return
shipperCode
;
}
public
void
setShipperCode
(
String
shipperCode
)
{
this
.
shipperCode
=
shipperCode
;
}
public
String
getShipperName
()
{
return
shipperName
;
}
public
void
setShipperName
(
String
shipperName
)
{
this
.
shipperName
=
shipperName
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
}
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/presenter/feedback/FeedBackPresenter.java
View file @
24f6b543
...
@@ -36,6 +36,7 @@ public class FeedBackPresenter extends FeedBackContract.Presenter {
...
@@ -36,6 +36,7 @@ public class FeedBackPresenter extends FeedBackContract.Presenter {
private
int
mType
;
private
int
mType
;
private
int
mOrderId
;
private
int
mOrderId
;
private
int
mAccountId
;
private
int
mAccountId
;
private
int
mPartId
;
@Override
@Override
public
void
onAttached
()
{
public
void
onAttached
()
{
...
@@ -45,6 +46,7 @@ public class FeedBackPresenter extends FeedBackContract.Presenter {
...
@@ -45,6 +46,7 @@ public class FeedBackPresenter extends FeedBackContract.Presenter {
Bundle
bundle
=
mView
.
getBundle
();
Bundle
bundle
=
mView
.
getBundle
();
mType
=
bundle
.
getInt
(
Constants
.
TYPE
,
0
);
mType
=
bundle
.
getInt
(
Constants
.
TYPE
,
0
);
mOrderId
=
bundle
.
getInt
(
Constants
.
ORDER_ID
,
0
);
mOrderId
=
bundle
.
getInt
(
Constants
.
ORDER_ID
,
0
);
mPartId
=
bundle
.
getInt
(
Constants
.
PART_ID
);
switch
(
mType
)
{
switch
(
mType
)
{
case
Constants
.
FEED_BACK
:
case
Constants
.
FEED_BACK
:
mHint
.
set
(
UIUtils
.
getString
(
R
.
string
.
tv_idea_text_hint
));
mHint
.
set
(
UIUtils
.
getString
(
R
.
string
.
tv_idea_text_hint
));
...
@@ -112,13 +114,17 @@ public class FeedBackPresenter extends FeedBackContract.Presenter {
...
@@ -112,13 +114,17 @@ public class FeedBackPresenter extends FeedBackContract.Presenter {
public
void
applyPart
()
{
public
void
applyPart
()
{
ApiFactory
.
applyPart
(
mOrderId
,
mComment
.
get
(),
mUserName
,
mAccountId
).
subscribe
(
baseObserver
((
Consumer
<
Boolean
>)
ApiFactory
.
applyPart
(
mOrderId
,
mComment
.
get
(),
mUserName
,
mAccountId
).
subscribe
(
baseObserver
((
Consumer
<
Boolean
>)
aBoolean
->
{
aBoolean
->
{
mView
.
dumpBack
(
Constants
.
APPLY_PART
,
null
);
mView
.
dumpBack
();
EventBus
.
getDefault
().
post
(
new
RefreshApplyPart
(
1
));
EventBus
.
getDefault
().
post
(
new
RefreshApplyPart
(
1
));
}));
}));
}
}
@Override
@Override
public
void
refusePart
()
{
public
void
refusePart
()
{
ApiFactory
.
refusePart
(
mPartId
,
mComment
.
get
()).
subscribe
(
baseObserver
((
Consumer
<
Boolean
>)
aBoolean
->
{
mView
.
dumpBack
();
EventBus
.
getDefault
().
post
(
new
RefreshApplyPart
(
1
));
}));
}
}
}
}
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/presenter/logisticsinfo/LogisticsInfoPresenter.java
View file @
24f6b543
package
com
.
dayu
.
bigfish
.
presenter
.
logisticsinfo
;
package
com
.
dayu
.
bigfish
.
presenter
.
logisticsinfo
;
import
android.databinding.ObservableField
;
import
android.databinding.ObservableField
;
import
android.os.Bundle
;
import
com.app.annotation.apt.InstanceFactory
;
import
com.app.annotation.apt.InstanceFactory
;
import
com.apt.ApiFactory
;
import
com.apt.ApiFactory
;
...
@@ -16,12 +17,14 @@ import io.reactivex.functions.Consumer;
...
@@ -16,12 +17,14 @@ import io.reactivex.functions.Consumer;
public
class
LogisticsInfoPresenter
extends
LogisticsInfoContract
.
Presenter
{
public
class
LogisticsInfoPresenter
extends
LogisticsInfoContract
.
Presenter
{
private
ObservableField
<
Object
>
datas
=
new
ObservableField
<>();
private
ObservableField
<
Object
>
datas
=
new
ObservableField
<>();
private
ObservableField
<
Object
>
headData
=
new
ObservableField
<>();
private
ObservableField
<
Object
>
headData
=
new
ObservableField
<>();
private
String
mLogisticsId
;
private
String
mCourierNum
;
private
String
mShipperCode
;
@Override
@Override
public
void
onAttached
()
{
public
void
onAttached
()
{
// Bundle bundle = mView.getBundle();
Bundle
bundle
=
mView
.
getBundle
();
// mLogisticsId = bundle.getString(Constants.PART_ID);
mCourierNum
=
bundle
.
getString
(
Constants
.
COURIER_NUM
);
mShipperCode
=
bundle
.
getString
(
Constants
.
SHIPPER_CODE
);
mView
.
showDialog
();
mView
.
showDialog
();
queryLogisticsInfo
();
queryLogisticsInfo
();
}
}
...
@@ -44,7 +47,7 @@ public class LogisticsInfoPresenter extends LogisticsInfoContract.Presenter {
...
@@ -44,7 +47,7 @@ public class LogisticsInfoPresenter extends LogisticsInfoContract.Presenter {
@Override
@Override
public
void
queryLogisticsInfo
()
{
public
void
queryLogisticsInfo
()
{
ApiFactory
.
queryLogistics
(
"shunfeng"
,
"767281300879"
).
subscribe
(
baseObserver
((
Consumer
<
LogsticsInfo
>)
ApiFactory
.
queryLogistics
(
mShipperCode
,
mCourierNum
).
subscribe
(
baseObserver
((
Consumer
<
LogsticsInfo
>)
logsticsInfo
->
{
logsticsInfo
->
{
datas
.
set
(
logsticsInfo
.
getLogistics
());
datas
.
set
(
logsticsInfo
.
getLogistics
());
headData
.
set
(
logsticsInfo
);
headData
.
set
(
logsticsInfo
);
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/presenter/orderpart/OrderPartContract.java
View file @
24f6b543
...
@@ -3,6 +3,7 @@ package com.dayu.bigfish.presenter.orderpart;
...
@@ -3,6 +3,7 @@ package com.dayu.bigfish.presenter.orderpart;
import
com.dayu.bigfish.base.BaseListPresenter
;
import
com.dayu.bigfish.base.BaseListPresenter
;
import
com.dayu.bigfish.base.BaseView
;
import
com.dayu.bigfish.base.BaseView
;
import
com.dayu.bigfish.bean.OrderPart
;
import
io.reactivex.Observable
;
import
io.reactivex.Observable
;
...
@@ -20,17 +21,22 @@ public interface OrderPartContract {
...
@@ -20,17 +21,22 @@ public interface OrderPartContract {
/**
/**
* 跳转到申请备件或寄回备件页面.
* 跳转到申请备件或寄回备件页面.
*/
*/
public
abstract
void
dumpToapplyPart
();
public
abstract
void
applyOrReturnPart
();
/**
* 跳转到拒绝申请页面.
*/
public
abstract
void
dumpToRefusePart
(
int
partId
);
/**
/**
* 跳转到寄回备件页面.
* 跳转到寄回备件页面.
*/
*/
public
abstract
void
dumpToReturnPart
(
int
type
,
Integer
partId
);
public
abstract
void
dumpToReturnPart
(
int
type
,
OrderPart
part
);
/**
/**
* 查询物流信息.
* 查询物流信息.
*/
*/
public
abstract
void
queryLogistics
();
public
abstract
void
queryLogistics
(
String
courierNum
,
String
shipperCode
);
/**
/**
* 取消申请.
* 取消申请.
...
@@ -40,6 +46,7 @@ public interface OrderPartContract {
...
@@ -40,6 +46,7 @@ public interface OrderPartContract {
/**
/**
* 收到备件.
* 收到备件.
*/
*/
public
abstract
void
receivePart
();
public
abstract
Observable
receivePart
(
int
partId
);
}
}
}
}
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/presenter/orderpart/OrderPartPresenter.java
View file @
24f6b543
...
@@ -65,40 +65,56 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
...
@@ -65,40 +65,56 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
}
}
@Override
@Override
public
void
dumpToapply
Part
()
{
public
void
applyOrReturn
Part
()
{
if
(
mType
==
1
)
{
if
(
mType
==
1
)
{
Bundle
bundle
=
new
Bundle
();
Bundle
bundle
=
new
Bundle
();
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
(
FeedBackActivity
.
class
,
bundle
);
mView
.
startActivity
(
FeedBackActivity
.
class
,
bundle
);
}
else
if
(
mType
==
2
)
{
}
else
if
(
mType
==
2
)
{
dumpToReturnPart
(
0
,
null
);
dumpToReturnPart
(
Constants
.
BYMYSELF
,
null
);
}
}
}
}
@Override
@Override
public
void
dumpToRe
turnPart
(
int
type
,
Integer
partId
)
{
public
void
dumpToRe
fusePart
(
int
partId
)
{
Bundle
bundle
=
new
Bundle
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
Constants
.
ORDER_ID
,
mOrderId
);
bundle
.
putInt
(
Constants
.
ORDER_ID
,
mOrderId
);
bundle
.
putInt
(
Constants
.
PART_ID
,
partId
);
bundle
.
putInt
(
Constants
.
PART_ID
,
partId
);
bundle
.
putInt
(
Constants
.
TYPE
,
Constants
.
REFUSE_PART
);
mView
.
startActivity
(
FeedBackActivity
.
class
,
bundle
);
}
@Override
public
void
dumpToReturnPart
(
int
type
,
OrderPart
part
)
{
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
Constants
.
ORDER_ID
,
mOrderId
);
if
(
mCompanyId
!=
null
)
{
if
(
mCompanyId
!=
null
)
{
bundle
.
putInt
(
Constants
.
ID
,
mCompanyId
);
bundle
.
putInt
(
Constants
.
ID
,
mCompanyId
);
}
}
if
(
part
!=
null
)
{
bundle
.
putSerializable
(
Constants
.
PART
,
part
);
}
bundle
.
putInt
(
Constants
.
TYPE
,
type
);
bundle
.
putInt
(
Constants
.
TYPE
,
type
);
mView
.
startActivity
(
ReturnPartActivity
.
class
,
bundle
);
mView
.
startActivity
(
ReturnPartActivity
.
class
,
bundle
);
}
}
@Override
@Override
public
void
queryLogistics
()
{
public
void
queryLogistics
(
String
courierNum
,
String
shipperCode
)
{
mView
.
startActivity
(
LogisticsInfoActivity
.
class
);
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
Constants
.
COURIER_NUM
,
courierNum
);
bundle
.
putString
(
Constants
.
SHIPPER_CODE
,
shipperCode
);
mView
.
startActivity
(
LogisticsInfoActivity
.
class
,
bundle
);
}
}
public
Observable
<
Boolean
>
cancleApply
(
int
partId
)
{
public
Observable
<
Boolean
>
cancleApply
(
int
partId
)
{
mView
.
showDialog
();
return
ApiFactory
.
cancleApply
(
partId
,
mUserName
);
return
ApiFactory
.
cancleApply
(
partId
,
mUserName
);
}
}
@Override
@Override
public
void
receivePart
()
{
public
Observable
receivePart
(
int
partId
)
{
mView
.
showDialog
();
return
ApiFactory
.
receivePart
(
partId
,
mUserName
);
}
}
}
}
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/presenter/returnpart/ReturnPartContract.java
View file @
24f6b543
package
com
.
dayu
.
bigfish
.
presenter
.
returnpart
;
package
com
.
dayu
.
bigfish
.
presenter
.
returnpart
;
import
com.bigkoo.pickerview.OptionsPickerView
;
import
com.dayu.bigfish.base.BasePresenter
;
import
com.dayu.bigfish.base.BasePresenter
;
import
com.dayu.bigfish.base.BaseView
;
import
com.dayu.bigfish.base.BaseView
;
import
java.util.List
;
/**
/**
* Created by luo on 2016/8/4.
* Created by luo on 2016/8/4.
*/
*/
public
interface
ReturnPartContract
{
public
interface
ReturnPartContract
{
interface
View
extends
BaseView
{
interface
View
extends
BaseView
{
/**
* 展示快递选择框.
* @param cardItem
* @param listener
*/
void
showCouriesDialog
(
List
<
String
>
cardItem
,
OptionsPickerView
.
OnOptionsSelectListener
listener
);
/**
* 关闭输入框.
*/
void
hideInput
();
}
}
abstract
class
Presenter
extends
BasePresenter
<
View
>
{
abstract
class
Presenter
extends
BasePresenter
<
View
>
{
...
@@ -22,5 +36,10 @@ public interface ReturnPartContract {
...
@@ -22,5 +36,10 @@ public interface ReturnPartContract {
* 跳转到厂商收货信息.
* 跳转到厂商收货信息.
*/
*/
public
abstract
void
dumpToKaInfo
();
public
abstract
void
dumpToKaInfo
();
/**
* 获取快递公司.
*/
public
abstract
void
getCourier
();
}
}
}
}
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/presenter/returnpart/ReturnPartPresenter.java
View file @
24f6b543
...
@@ -6,13 +6,20 @@ import android.os.Bundle;
...
@@ -6,13 +6,20 @@ import android.os.Bundle;
import
com.app.annotation.apt.InstanceFactory
;
import
com.app.annotation.apt.InstanceFactory
;
import
com.apt.ApiFactory
;
import
com.apt.ApiFactory
;
import
com.dayu.bigfish.Constants
;
import
com.dayu.bigfish.Constants
;
import
com.dayu.bigfish.bean.OrderPart
;
import
com.dayu.bigfish.bean.ShipperCompany
;
import
com.dayu.bigfish.bean.UserInfo
;
import
com.dayu.bigfish.bean.UserInfo
;
import
com.dayu.bigfish.bean.event.RefreshApplyPart
;
import
com.dayu.bigfish.ui.KaAddressActivity
;
import
com.dayu.bigfish.ui.KaAddressActivity
;
import
com.dayu.bigfish.utils.managers.UserManager
;
import
com.dayu.bigfish.utils.managers.UserManager
;
import
org.greenrobot.eventbus.EventBus
;
import
org.json.JSONException
;
import
org.json.JSONException
;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
import
java.util.ArrayList
;
import
java.util.List
;
import
io.reactivex.functions.Consumer
;
import
io.reactivex.functions.Consumer
;
import
okhttp3.MediaType
;
import
okhttp3.MediaType
;
import
okhttp3.RequestBody
;
import
okhttp3.RequestBody
;
...
@@ -32,43 +39,64 @@ public class ReturnPartPresenter extends ReturnPartContract.Presenter {
...
@@ -32,43 +39,64 @@ public class ReturnPartPresenter extends ReturnPartContract.Presenter {
private
String
mKaComent
;
private
String
mKaComent
;
private
UserInfo
mInfo
;
private
UserInfo
mInfo
;
private
int
mPartId
;
private
int
mPartId
;
private
OrderPart
mPart
;
private
String
mShipperCode
;
@Override
@Override
public
void
onAttached
()
{
public
void
onAttached
()
{
mInfo
=
UserManager
.
getInstance
().
getUser
();
Bundle
bundle
=
mView
.
getBundle
();
Bundle
bundle
=
mView
.
getBundle
();
mKaId
=
bundle
.
getInt
(
Constants
.
ID
);
mKaId
=
bundle
.
getInt
(
Constants
.
ID
);
mOrderId
=
bundle
.
getInt
(
Constants
.
ORDER_ID
);
mOrderId
=
bundle
.
getInt
(
Constants
.
ORDER_ID
);
mType
=
bundle
.
getInt
(
Constants
.
TYPE
);
mType
=
bundle
.
getInt
(
Constants
.
TYPE
);
mKaComent
=
bundle
.
getString
(
Constants
.
DESCRIBE
);
mPart
=
(
OrderPart
)
bundle
.
getSerializable
(
Constants
.
PART
);
mPartId
=
bundle
.
getInt
(
Constants
.
PART_ID
);
if
(
mPart
!=
null
)
{
kaComent
.
set
(
mKaComent
);
mPartId
=
mPart
.
getId
();
mInfo
=
UserManager
.
getInstance
().
getUser
();
mKaComent
=
mPart
.
getKaRemarks
();
kaComent
.
set
(
mKaComent
);
kaComent
.
set
(
mPart
.
getKaRemarks
());
spComent
.
set
(
mPart
.
getSpComment
());
courierCompany
.
set
(
mPart
.
getCourierServicesCompany
());
courierNum
.
set
(
mPart
.
getCourierNumber
());
}
}
}
@Override
@Override
public
void
retrunPart
()
{
public
void
retrunPart
()
{
mView
.
showDialog
();
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
try
{
try
{
jsonObject
.
put
(
"courierNumber"
,
courierNum
.
get
());
jsonObject
.
put
(
"courierNumber"
,
courierNum
.
get
());
jsonObject
.
put
(
"spComment"
,
spComent
.
get
());
jsonObject
.
put
(
"spComment"
,
spComent
.
get
());
jsonObject
.
put
(
"courierServicesCompany"
,
courierCompany
.
get
());
jsonObject
.
put
(
"courierServicesCompany"
,
courierCompany
.
get
());
jsonObject
.
put
(
"shipperCode"
,
""
);
jsonObject
.
put
(
"shipperCode"
,
mShipperCode
);
jsonObject
.
put
(
"kaRemarks"
,
kaComent
);
jsonObject
.
put
(
"kaRemarks"
,
kaComent
.
get
()
);
jsonObject
.
put
(
"operater"
,
mInfo
.
getAccountName
());
jsonObject
.
put
(
"operater"
,
mInfo
.
getAccountName
());
jsonObject
.
put
(
"operaterId"
,
mInfo
.
getAccountId
());
jsonObject
.
put
(
"operaterId"
,
mInfo
.
getAccountId
());
jsonObject
.
put
(
"partsId"
,
mPartId
);
if
(
mType
==
Constants
.
BY_MODIFY_PART
)
{
jsonObject
.
put
(
"id"
,
mPartId
);
}
else
{
jsonObject
.
put
(
"partsId"
,
mPartId
);
}
jsonObject
.
put
(
"spOrderId"
,
mOrderId
);
jsonObject
.
put
(
"spOrderId"
,
mOrderId
);
}
catch
(
JSONException
e
)
{
}
catch
(
JSONException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
RequestBody
requestBody
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
jsonObject
.
toString
());
RequestBody
requestBody
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
jsonObject
.
toString
());
if
(
mType
==
1
)
{
if
(
mType
==
Constants
.
BYKA
)
{
ApiFactory
.
returnPartByKA
(
requestBody
).
subscribe
(
baseObserver
((
Consumer
<
Boolean
>)
aBoolean
->
{
ApiFactory
.
returnPartByKA
(
requestBody
).
subscribe
(
baseObserver
((
Consumer
<
Boolean
>)
aBoolean
->
{
mView
.
dumpBack
();
EventBus
.
getDefault
().
post
(
new
RefreshApplyPart
(
1
));
}));
}));
}
else
if
(
mType
==
0
)
{
}
else
if
(
mType
==
Constants
.
BYMYSELF
)
{
ApiFactory
.
returnPartSelf
(
requestBody
).
subscribe
(
baseObserver
((
Consumer
<
Boolean
>)
aBoolean
->
{
ApiFactory
.
returnPartSelf
(
requestBody
).
subscribe
(
baseObserver
((
Consumer
<
Boolean
>)
aBoolean
->
{
mView
.
dumpBack
();
EventBus
.
getDefault
().
post
(
new
RefreshApplyPart
(
1
));
}));
}
else
if
(
mType
==
Constants
.
BY_MODIFY_PART
)
{
ApiFactory
.
modifyPart
(
requestBody
).
subscribe
(
baseObserver
((
Consumer
<
Boolean
>)
aBoolean
->
{
mView
.
dumpBack
();
EventBus
.
getDefault
().
post
(
new
RefreshApplyPart
(
1
));
}));
}));
}
}
...
@@ -80,4 +108,22 @@ public class ReturnPartPresenter extends ReturnPartContract.Presenter {
...
@@ -80,4 +108,22 @@ public class ReturnPartPresenter extends ReturnPartContract.Presenter {
bundle
.
putInt
(
Constants
.
ID
,
mKaId
);
bundle
.
putInt
(
Constants
.
ID
,
mKaId
);
mView
.
startActivity
(
KaAddressActivity
.
class
,
bundle
);
mView
.
startActivity
(
KaAddressActivity
.
class
,
bundle
);
}
}
@Override
public
void
getCourier
()
{
mView
.
showDialog
();
mView
.
hideInput
();
ApiFactory
.
queryShipperCompany
().
subscribe
(
baseObserver
(
this
::
showCouriesDialog
));
}
private
void
showCouriesDialog
(
List
<
ShipperCompany
>
shipperCompany
)
{
List
<
String
>
list
=
new
ArrayList
<>();
for
(
ShipperCompany
sc
:
shipperCompany
)
{
list
.
add
(
sc
.
getShipperName
());
}
mView
.
showCouriesDialog
(
list
,
(
options1
,
options2
,
options3
,
v
)
->
{
courierCompany
.
set
(
list
.
get
(
options1
));
mShipperCode
=
shipperCompany
.
get
(
options1
).
getShipperCode
();
});
}
}
}
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/presenter/serverinstruction/ServerInstructionPresenter.java
View file @
24f6b543
...
@@ -30,18 +30,6 @@ public class ServerInstructionPresenter extends ServerInstructionContract.Presen
...
@@ -30,18 +30,6 @@ public class ServerInstructionPresenter extends ServerInstructionContract.Presen
@Override
@Override
public
void
onAttached
()
{
public
void
onAttached
()
{
// instructions = new ArrayList<>();
// ServerInstruction instruction = new ServerInstruction();
// instruction.setUrl("https://www.baidu.com");
// instruction.setTitle("OPPOR9手机维修拆机教程字幕详解");
// ServerInstruction instruction1 = new ServerInstruction();
// instruction1.setTitle("iPhone6 手机维修教程字幕详解");
// ServerInstruction instruction2 = new ServerInstruction();
// instruction2.setTitle("2017年-诺基亚A3500型号拆机维修教2017年-诺基亚A3500型号拆机维修教");
// instructions.add(instruction);
// instructions.add(instruction1);
// instructions.add(instruction2);
// mDatas.set(instructions);
Bundle
bundle
=
mView
.
getBundle
();
Bundle
bundle
=
mView
.
getBundle
();
mOrderId
=
bundle
.
getInt
(
Constants
.
ORDER_ID
);
mOrderId
=
bundle
.
getInt
(
Constants
.
ORDER_ID
);
getInstructs
();
getInstructs
();
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/ui/LogisticsInfoActivity.java
View file @
24f6b543
...
@@ -21,11 +21,5 @@ public class LogisticsInfoActivity extends BaseActivity<LogisticsInfoPresenter,
...
@@ -21,11 +21,5 @@ public class LogisticsInfoActivity extends BaseActivity<LogisticsInfoPresenter,
public
void
initView
()
{
public
void
initView
()
{
LogisticsAdapter
adapter
=
new
LogisticsAdapter
(
false
);
LogisticsAdapter
adapter
=
new
LogisticsAdapter
(
false
);
mBind
.
lvPart
.
setAdapter
(
adapter
);
mBind
.
lvPart
.
setAdapter
(
adapter
);
// mPresenter.headData.addOnPropertyChangedCallback(new Observable.OnPropertyChangedCallback() {
// @Override
// public void onPropertyChanged(Observable observable, int i) {
// mBind.lvPart.setHeadData(mPresenter.headData.get());
// }
// });
}
}
}
}
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/ui/OrderDetailsActivity.java
View file @
24f6b543
...
@@ -3,6 +3,7 @@ package com.dayu.bigfish.ui;
...
@@ -3,6 +3,7 @@ package com.dayu.bigfish.ui;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.FragmentManager
;
import
android.support.v4.app.FragmentManager
;
import
android.support.v4.app.FragmentTransaction
;
import
android.support.v4.app.FragmentTransaction
;
import
android.view.View
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.base.BaseActivity
;
import
com.dayu.bigfish.base.BaseActivity
;
...
@@ -51,6 +52,10 @@ public class OrderDetailsActivity extends BaseActivity<OrderDetailPresenter, Act
...
@@ -51,6 +52,10 @@ public class OrderDetailsActivity extends BaseActivity<OrderDetailPresenter, Act
mFragments
.
add
(
orderDatailsServeFragment
);
mFragments
.
add
(
orderDatailsServeFragment
);
mFragments
.
add
(
mOrderPartFragment
);
mFragments
.
add
(
mOrderPartFragment
);
mBind
.
titleBack
.
setOnClickListener
(
v
->
dumpBack
());
mBind
.
titleBack
.
setOnClickListener
(
v
->
dumpBack
());
if
(
detail
.
getCreatedSource
()
!=
3
)
{
mBind
.
btnPart
.
setVisibility
(
View
.
GONE
);
mBind
.
btnServer
.
setBackgroundResource
(
R
.
drawable
.
detail_end_selector
);
}
initBtn
();
initBtn
();
addFragment
();
addFragment
();
}
}
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/ui/ReturnPartActivity.java
View file @
24f6b543
package
com
.
dayu
.
bigfish
.
ui
;
package
com
.
dayu
.
bigfish
.
ui
;
import
com.bigkoo.pickerview.OptionsPickerView
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.base.BaseActivity
;
import
com.dayu.bigfish.base.BaseActivity
;
import
com.dayu.bigfish.databinding.ActivityReturnPartBinding
;
import
com.dayu.bigfish.databinding.ActivityReturnPartBinding
;
import
com.dayu.bigfish.presenter.returnpart.ReturnPartContract
;
import
com.dayu.bigfish.presenter.returnpart.ReturnPartContract
;
import
com.dayu.bigfish.presenter.returnpart.ReturnPartPresenter
;
import
com.dayu.bigfish.presenter.returnpart.ReturnPartPresenter
;
import
com.dayu.bigfish.utils.UIUtils
;
import
java.util.List
;
/**
/**
* Created by luofan on 2018/1/20.
* Created by luofan on 2018/1/20.
*/
*/
public
class
ReturnPartActivity
extends
BaseActivity
<
ReturnPartPresenter
,
ActivityReturnPartBinding
>
implements
ReturnPartContract
.
View
{
public
class
ReturnPartActivity
extends
BaseActivity
<
ReturnPartPresenter
,
ActivityReturnPartBinding
>
implements
ReturnPartContract
.
View
{
@Override
@Override
public
int
getLayoutId
()
{
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_return_part
;
return
R
.
layout
.
activity_return_part
;
...
@@ -20,4 +24,20 @@ public class ReturnPartActivity extends BaseActivity<ReturnPartPresenter,Activit
...
@@ -20,4 +24,20 @@ public class ReturnPartActivity extends BaseActivity<ReturnPartPresenter,Activit
public
void
initView
()
{
public
void
initView
()
{
}
}
@Override
public
void
showCouriesDialog
(
List
<
String
>
cardItem
,
OptionsPickerView
.
OnOptionsSelectListener
listener
)
{
//条件选择器
OptionsPickerView
pvOptions
=
new
OptionsPickerView
.
Builder
(
this
,
listener
)
.
setContentTextSize
(
18
)
.
setLineSpacingMultiplier
(
2.0f
)
.
build
();
pvOptions
.
setPicker
(
cardItem
);
pvOptions
.
show
();
}
@Override
public
void
hideInput
()
{
UIUtils
.
hideInput
(
mActivity
);
}
}
}
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/ui/adapter/OrderPartAdapter.java
View file @
24f6b543
package
com
.
dayu
.
bigfish
.
ui
.
adapter
;
package
com
.
dayu
.
bigfish
.
ui
.
adapter
;
import
android.graphics.Color
;
import
android.graphics.Color
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.view.View
;
import
com.dayu.bigfish.Constants
;
import
com.dayu.bigfish.Constants
;
...
@@ -29,70 +30,118 @@ public class OrderPartAdapter extends CoreAdapter<OrderPart, ItemApplyPartLayout
...
@@ -29,70 +30,118 @@ public class OrderPartAdapter extends CoreAdapter<OrderPart, ItemApplyPartLayout
@Override
@Override
protected
void
onBind
(
ItemApplyPartLayoutBinding
holder
,
OrderPart
item
,
int
position
)
{
protected
void
onBind
(
ItemApplyPartLayoutBinding
holder
,
OrderPart
item
,
int
position
)
{
presenter
=
(
OrderPartPresenter
)
mPresenter
;
presenter
=
(
OrderPartPresenter
)
mPresenter
;
init
(
holder
);
switch
(
item
.
getStatus
())
{
switch
(
item
.
getStatus
())
{
case
Constants
.
APPLY
:
case
Constants
.
APPLY
:
holder
.
tvPartState
.
setText
(
UIUtils
.
getString
(
R
.
string
.
part_apply
));
if
(
item
.
getSource
()
!=
null
&&
item
.
getSource
()
==
1
)
{
if
(
item
.
getSource
()
!=
null
&&
item
.
getSource
()
==
1
)
{
holder
.
tvPartState
.
setText
(
UIUtils
.
getString
(
R
.
string
.
part_apply
));
holder
.
logisticsInfo
.
setText
(
UIUtils
.
getString
(
R
.
string
.
cancle_apply
));
holder
.
logisticsInfo
.
setText
(
UIUtils
.
getString
(
R
.
string
.
cancle_apply
));
holder
.
logisticsInfo
.
setOnClickListener
(
v
->
holder
.
logisticsInfo
.
setOnClickListener
(
v
->
showCancleDialog
(
item
,
holder
));
presenter
.
queryLogistics
()
// showCancleDialog(item.getId(), holder)
);
holder
.
logisticsInfo
.
setVisibility
(
View
.
VISIBLE
);
holder
.
logisticsInfo
.
setVisibility
(
View
.
VISIBLE
);
holder
.
receivePart
.
setVisibility
(
View
.
GONE
);
holder
.
receivePart
.
setVisibility
(
View
.
GONE
);
holder
.
llSendInfo
.
setVisibility
(
View
.
GONE
);
}
else
if
(
item
.
getSource
()
!=
null
&&
item
.
getSource
()
==
2
)
{
}
else
if
(
item
.
getSource
()
!=
null
&&
item
.
getSource
()
==
2
)
{
holder
.
tvPartState
.
setText
(
UIUtils
.
getString
(
R
.
string
.
return_order_part
));
holder
.
logisticsInfo
.
setText
(
UIUtils
.
getString
(
R
.
string
.
cannot_return
));
holder
.
logisticsInfo
.
setText
(
UIUtils
.
getString
(
R
.
string
.
cannot_return
));
holder
.
logisticsInfo
.
setOnClickListener
(
v
->
presenter
.
dumpToRe
turnPart
(
1
,
item
.
getId
()));
holder
.
logisticsInfo
.
setOnClickListener
(
v
->
presenter
.
dumpToRe
fusePart
(
item
.
getId
()));
holder
.
receivePart
.
setText
(
UIUtils
.
getString
(
R
.
string
.
return_order_part
));
holder
.
receivePart
.
setText
(
UIUtils
.
getString
(
R
.
string
.
return_order_part
));
holder
.
receivePart
.
setOnClickListener
(
v
->
presenter
.
dumpToapplyPart
());
holder
.
receivePart
.
setOnClickListener
(
v
->
presenter
.
dumpToReturnPart
(
Constants
.
BYKA
,
item
));
holder
.
lineTwo
.
setVisibility
(
View
.
GONE
);
holder
.
lineOne
.
setVisibility
(
View
.
GONE
);
holder
.
logisticsInfo
.
setVisibility
(
View
.
VISIBLE
);
holder
.
logisticsInfo
.
setVisibility
(
View
.
VISIBLE
);
holder
.
receivePart
.
setVisibility
(
View
.
VISIBLE
);
holder
.
receivePart
.
setVisibility
(
View
.
VISIBLE
);
holder
.
llApplyInfo
.
setVisibility
(
View
.
GONE
);
holder
.
llSender
.
setVisibility
(
View
.
GONE
);
holder
.
llSenderMobile
.
setVisibility
(
View
.
GONE
);
holder
.
llCouriesCompany
.
setVisibility
(
View
.
GONE
);
holder
.
llPartNum
.
setVisibility
(
View
.
GONE
);
}
}
break
;
break
;
case
Constants
.
REFUSE
:
case
Constants
.
REFUSE
:
holder
.
tvPartState
.
setText
(
UIUtils
.
getString
(
R
.
string
.
part_refuse
));
holder
.
tvPartState
.
setText
(
UIUtils
.
getString
(
R
.
string
.
part_refuse
));
holder
.
logisticsInfo
.
setVisibility
(
View
.
GONE
);
holder
.
logisticsInfo
.
setVisibility
(
View
.
GONE
);
holder
.
receivePart
.
setVisibility
(
View
.
GONE
);
holder
.
receivePart
.
setVisibility
(
View
.
GONE
);
holder
.
lineTwo
.
setVisibility
(
View
.
GONE
);
holder
.
lineOne
.
setVisibility
(
View
.
GONE
);
if
(
item
.
getSource
()
!=
null
&&
item
.
getSource
()
==
1
)
{
holder
.
llSendInfo
.
setVisibility
(
View
.
GONE
);
holder
.
llRefuseReason
.
setVisibility
(
View
.
VISIBLE
);
}
else
if
(
item
.
getSource
()
!=
null
&&
item
.
getSource
()
==
2
)
{
holder
.
llApplyInfo
.
setVisibility
(
View
.
GONE
);
holder
.
llSender
.
setVisibility
(
View
.
GONE
);
holder
.
llSenderMobile
.
setVisibility
(
View
.
GONE
);
holder
.
llCouriesCompany
.
setVisibility
(
View
.
GONE
);
holder
.
llPartNum
.
setVisibility
(
View
.
GONE
);
holder
.
llSendRefuseReason
.
setVisibility
(
View
.
VISIBLE
);
}
break
;
break
;
case
Constants
.
TRANSPORTATION
:
case
Constants
.
TRANSPORTATION
:
holder
.
tvPartState
.
setText
(
UIUtils
.
getString
(
R
.
string
.
part_transfortion
));
holder
.
tvPartState
.
setText
(
UIUtils
.
getString
(
R
.
string
.
part_transfortion
));
holder
.
logisticsInfo
.
setText
(
UIUtils
.
getString
(
R
.
string
.
logistics_info
));
holder
.
logisticsInfo
.
setText
(
UIUtils
.
getString
(
R
.
string
.
logistics_info
));
holder
.
receivePart
.
setText
(
UIUtils
.
getString
(
R
.
string
.
receive_part
));
holder
.
logisticsInfo
.
setVisibility
(
View
.
VISIBLE
);
holder
.
logisticsInfo
.
setVisibility
(
View
.
VISIBLE
);
holder
.
receivePart
.
setVisibility
(
View
.
VISIBLE
);
holder
.
receivePart
.
setVisibility
(
View
.
VISIBLE
);
holder
.
logisticsInfo
.
setOnClickListener
(
v
->
presenter
.
queryLogistics
());
holder
.
logisticsInfo
.
setOnClickListener
(
v
->
presenter
.
queryLogistics
(
item
.
getCourierNumber
(),
item
.
getShipperCode
()));
holder
.
receivePart
.
setOnClickListener
(
v
->
presenter
.
receivePart
());
holder
.
receivePart
.
setOnClickListener
(
v
->
presenter
.
receivePart
(
item
.
getId
()).
subscribe
(
presenter
.
baseObserver
((
Consumer
<
Boolean
>)
aBoolean
->
{
item
.
setStatus
(
Constants
.
RECEIVED
);
notifyDataSetChanged
();
})));
if
(
item
.
getSource
()
!=
null
&&
item
.
getSource
()
==
1
)
{
holder
.
receivePart
.
setText
(
UIUtils
.
getString
(
R
.
string
.
receive_part
));
if
(
TextUtils
.
isEmpty
(
item
.
getApplicant
()))
{
holder
.
llApplyInfo
.
setVisibility
(
View
.
GONE
);
}
}
else
if
(
item
.
getSource
()
!=
null
&&
item
.
getSource
()
==
2
)
{
holder
.
receivePart
.
setText
(
UIUtils
.
getString
(
R
.
string
.
modify_part_info
));
holder
.
receivePart
.
setOnClickListener
(
v
->
presenter
.
dumpToReturnPart
(
Constants
.
BY_MODIFY_PART
,
item
));
holder
.
llApplyInfo
.
setVisibility
(
View
.
GONE
);
holder
.
tvPartState
.
setText
(
UIUtils
.
getString
(
R
.
string
.
send_already
));
holder
.
llSpInstruction
.
setVisibility
(
View
.
VISIBLE
);
if
(
item
.
getReceived
()
==
null
||
(
item
.
getReceived
()
!=
null
&&
item
.
getReceived
()
==
0
))
{
holder
.
llNeedReturn
.
setVisibility
(
View
.
GONE
);
}
if
(
TextUtils
.
isEmpty
(
item
.
getKaRemarks
()))
{
holder
.
llKaInstraction
.
setVisibility
(
View
.
GONE
);
}
}
break
;
break
;
case
Constants
.
RECEIVED
:
case
Constants
.
RECEIVED
:
holder
.
tvPartState
.
setText
(
UIUtils
.
getString
(
R
.
string
.
part_received
));
holder
.
tvPartState
.
setText
(
UIUtils
.
getString
(
R
.
string
.
part_received
));
holder
.
logisticsInfo
.
setText
(
UIUtils
.
getString
(
R
.
string
.
logistics_info
));
holder
.
logisticsInfo
.
setText
(
UIUtils
.
getString
(
R
.
string
.
logistics_info
));
holder
.
receivePart
.
setText
(
UIUtils
.
getString
(
R
.
string
.
receive_part
));
holder
.
logisticsInfo
.
setVisibility
(
View
.
VISIBLE
);
holder
.
logisticsInfo
.
setVisibility
(
View
.
VISIBLE
);
holder
.
logisticsInfo
.
setOnClickListener
(
v
->
presenter
.
queryLogistics
());
holder
.
logisticsInfo
.
setOnClickListener
(
v
->
presenter
.
queryLogistics
(
item
.
getCourierNumber
(),
item
.
getShipperCode
()));
if
(
item
.
getSource
()
!=
null
&&
item
.
getSource
()
==
1
)
{
if
(
TextUtils
.
isEmpty
(
item
.
getApplicant
()))
{
holder
.
llApplyInfo
.
setVisibility
(
View
.
GONE
);
}
}
else
if
(
item
.
getSource
()
!=
null
&&
item
.
getSource
()
==
2
)
{
holder
.
llApplyInfo
.
setVisibility
(
View
.
GONE
);
holder
.
llSpInstruction
.
setVisibility
(
View
.
VISIBLE
);
holder
.
llKaInstraction
.
setVisibility
(
View
.
GONE
);
holder
.
llNeedReturn
.
setVisibility
(
View
.
GONE
);
}
break
;
break
;
case
Constants
.
CANCEL
:
case
Constants
.
CANCEL
:
holder
.
tvPartState
.
setText
(
UIUtils
.
getString
(
R
.
string
.
cancle_order
));
holder
.
tvPartState
.
setText
(
UIUtils
.
getString
(
R
.
string
.
cancle_order
));
holder
.
logisticsInfo
.
setVisibility
(
View
.
GONE
);
holder
.
logisticsInfo
.
setVisibility
(
View
.
GONE
);
holder
.
receivePart
.
setVisibility
(
View
.
GONE
);
holder
.
receivePart
.
setVisibility
(
View
.
GONE
);
holder
.
lineTwo
.
setVisibility
(
View
.
GONE
);
holder
.
lineOne
.
setVisibility
(
View
.
GONE
);
holder
.
llSendInfo
.
setVisibility
(
View
.
GONE
);
break
;
break
;
default
:
default
:
break
;
break
;
}
}
holder
.
tvPartName
.
setText
(
mContext
.
getString
(
R
.
string
.
part
)
+
(
position
+
1
));
holder
.
tvApplyInstruction
.
setText
(
item
.
getSpComment
());
holder
.
tvApplyInstruction
.
setText
(
item
.
getSpComment
());
holder
.
tvApplyName
.
setText
(
item
.
getApplicant
());
holder
.
tvApplyName
.
setText
(
item
.
getApplicant
());
holder
.
tvApplyMobile
.
setText
(
item
.
getApplicantMobile
());
holder
.
tvApplyMobile
.
setText
(
item
.
getApplicantMobile
());
holder
.
tvApplyTime
.
setText
(
item
.
getCreateTime
());
holder
.
tvApplyTime
.
setText
(
item
.
getCreateTime
());
if
(
Constants
.
APPLY
==
item
.
getStatus
()
||
Constants
.
REFUSE
==
item
.
getStatus
())
{
holder
.
refuseApplyReason
.
setText
(
item
.
getReason
());
holder
.
llSendInfo
.
setVisibility
(
View
.
GONE
);
holder
.
refuseSendReason
.
setText
(
item
.
getReason
());
holder
.
lineOne
.
setVisibility
(
View
.
GONE
);
}
else
{
holder
.
llSendInfo
.
setVisibility
(
View
.
VISIBLE
);
holder
.
lineOne
.
setVisibility
(
View
.
VISIBLE
);
}
holder
.
kaInstruction
.
setText
(
item
.
getKaRemarks
());
holder
.
kaInstruction
.
setText
(
item
.
getKaRemarks
());
holder
.
spInstruction
.
setText
(
item
.
getSpComment
());
holder
.
sender
.
setText
(
item
.
getConsignor
());
holder
.
sender
.
setText
(
item
.
getConsignor
());
holder
.
senderMobile
.
setText
(
item
.
getCo
urierNumber
());
holder
.
senderMobile
.
setText
(
item
.
getCo
nsignorMoblie
());
if
(
item
.
getReceived
()
!=
null
&&
item
.
getReceived
()
==
1
)
{
if
(
item
.
getReceived
()
!=
null
&&
item
.
getReceived
()
==
1
)
{
holder
.
needReturn
.
setText
(
UIUtils
.
getString
(
R
.
string
.
need
));
holder
.
needReturn
.
setText
(
UIUtils
.
getString
(
R
.
string
.
need
));
}
else
if
(
item
.
getReceived
()
!=
null
&&
item
.
getReceived
()
==
2
)
{
}
else
if
(
item
.
getReceived
()
!=
null
&&
item
.
getReceived
()
==
2
)
{
...
@@ -102,15 +151,32 @@ public class OrderPartAdapter extends CoreAdapter<OrderPart, ItemApplyPartLayout
...
@@ -102,15 +151,32 @@ public class OrderPartAdapter extends CoreAdapter<OrderPart, ItemApplyPartLayout
holder
.
partNum
.
setText
(
item
.
getCourierNumber
());
holder
.
partNum
.
setText
(
item
.
getCourierNumber
());
}
}
public
void
showCancleDialog
(
int
id
,
ItemApplyPartLayoutBinding
holder
)
{
private
void
init
(
ItemApplyPartLayoutBinding
holder
)
{
holder
.
llApplyInfo
.
setVisibility
(
View
.
VISIBLE
);
holder
.
llSendRefuseReason
.
setVisibility
(
View
.
GONE
);
holder
.
lineOne
.
setVisibility
(
View
.
VISIBLE
);
holder
.
llSendInfo
.
setVisibility
(
View
.
VISIBLE
);
holder
.
llSpInstruction
.
setVisibility
(
View
.
GONE
);
holder
.
llKaInstraction
.
setVisibility
(
View
.
VISIBLE
);
holder
.
llSender
.
setVisibility
(
View
.
VISIBLE
);
holder
.
llSenderMobile
.
setVisibility
(
View
.
VISIBLE
);
holder
.
llCouriesCompany
.
setVisibility
(
View
.
VISIBLE
);
holder
.
llPartNum
.
setVisibility
(
View
.
VISIBLE
);
holder
.
llRefuseReason
.
setVisibility
(
View
.
GONE
);
holder
.
lineTwo
.
setVisibility
(
View
.
VISIBLE
);
holder
.
logisticsInfo
.
setVisibility
(
View
.
GONE
);
holder
.
receivePart
.
setVisibility
(
View
.
GONE
);
holder
.
llNeedReturn
.
setVisibility
(
View
.
VISIBLE
);
}
private
void
showCancleDialog
(
OrderPart
part
,
ItemApplyPartLayoutBinding
holder
)
{
CustomDialog
mDialog
=
new
CustomDialog
(
mContext
,
R
.
style
.
CustomDialog
,
UIUtils
.
getString
(
R
.
string
.
part_cancle_reason
)
CustomDialog
mDialog
=
new
CustomDialog
(
mContext
,
R
.
style
.
CustomDialog
,
UIUtils
.
getString
(
R
.
string
.
part_cancle_reason
)
,
(
dialog
,
confirm
)
->
{
,
(
dialog
,
confirm
)
->
{
if
(
confirm
)
{
if
(
confirm
)
{
presenter
.
cancleApply
(
id
).
subscribe
(
presenter
.
cancleApply
(
part
.
getId
()
).
subscribe
(
presenter
.
baseObserver
((
Consumer
<
Boolean
>)
aBoolean
->
{
presenter
.
baseObserver
((
Consumer
<
Boolean
>)
aBoolean
->
{
holder
.
tvPartState
.
setText
(
UIUtils
.
getString
(
R
.
string
.
cancle_order
));
part
.
setStatus
(
Constants
.
CANCEL
);
holder
.
logisticsInfo
.
setVisibility
(
View
.
GONE
);
notifyDataSetChanged
();
holder
.
receivePart
.
setVisibility
(
View
.
GONE
);
}));
}));
}
}
dialog
.
dismiss
();
dialog
.
dismiss
();
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/ui/fragment/ApplicationOrderPartFragment.java
View file @
24f6b543
...
@@ -42,6 +42,7 @@ public class ApplicationOrderPartFragment extends BaseFragment<OrderPartPresente
...
@@ -42,6 +42,7 @@ public class ApplicationOrderPartFragment extends BaseFragment<OrderPartPresente
@Override
@Override
protected
void
lazyLoad
()
{
protected
void
lazyLoad
()
{
super
.
lazyLoad
();
super
.
lazyLoad
();
showDialog
();
mPresenter
.
queryPartList
();
mPresenter
.
queryPartList
();
}
}
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/com/dayu/bigfish/utils/UIUtils.java
View file @
24f6b543
package
com
.
dayu
.
bigfish
.
utils
;
package
com
.
dayu
.
bigfish
.
utils
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.res.Resources
;
import
android.content.res.Resources
;
import
android.graphics.Paint
;
import
android.graphics.Paint
;
import
android.view.inputmethod.InputMethodManager
;
import
android.widget.TextView
;
import
android.widget.TextView
;
import
com.dayu.bigfish.MyApplication
;
import
com.dayu.bigfish.MyApplication
;
...
@@ -89,6 +91,12 @@ public class UIUtils {
...
@@ -89,6 +91,12 @@ public class UIUtils {
return
false
;
return
false
;
}
}
}
}
public
static
void
hideInput
(
Activity
activity
)
{
InputMethodManager
imm
=
(
InputMethodManager
)
activity
.
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
);
imm
.
hideSoftInputFromWindow
(
activity
.
getCurrentFocus
().
getWindowToken
(),
0
);
}
}
}
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/activity_ka_address_layout.xml
View file @
24f6b543
...
@@ -19,7 +19,9 @@
...
@@ -19,7 +19,9 @@
<TextView
<TextView
android:id=
"@+id/text_idea"
android:id=
"@+id/text_idea"
style=
"@style/text_title"
/>
style=
"@style/text_title"
android:text=
"@string/ka_info"
/>
<ImageView
<ImageView
android:id=
"@+id/title_back"
android:id=
"@+id/title_back"
...
@@ -44,15 +46,17 @@
...
@@ -44,15 +46,17 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_10"
android:layout_marginLeft=
"@dimen/dp_10"
android:layout_
weight=
"1
"
android:layout_
marginRight=
"53dp
"
android:text=
"@string/ka_name"
android:text=
"@string/ka_name"
android:textColor=
"@color/default_text_color"
android:textColor=
"@color/default_text_color"
android:textSize=
"15sp"
/>
android:textSize=
"15sp"
/>
<TextView
<TextView
android:id=
"@+id/tv_ka_name"
android:id=
"@+id/tv_ka_name"
android:layout_width=
"wrap_content"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"left"
android:layout_marginRight=
"@dimen/dp_15"
android:layout_marginRight=
"@dimen/dp_15"
android:text=
"@{presenter.data.name}"
android:text=
"@{presenter.data.name}"
android:textColor=
"@color/default_editext_color"
android:textColor=
"@color/default_editext_color"
...
@@ -76,15 +80,17 @@
...
@@ -76,15 +80,17 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_10"
android:layout_marginLeft=
"@dimen/dp_10"
android:layout_
weight=
"1
"
android:layout_
marginRight=
"38dp
"
android:text=
"@string/ka_mobile"
android:text=
"@string/ka_mobile"
android:textColor=
"@color/default_text_color"
android:textColor=
"@color/default_text_color"
android:textSize=
"15sp"
/>
android:textSize=
"15sp"
/>
<TextView
<TextView
android:id=
"@+id/tv_ka_mobile"
android:id=
"@+id/tv_ka_mobile"
android:layout_width=
"
wrap_cont
ent"
android:layout_width=
"
match_par
ent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"left"
android:layout_marginRight=
"15dp"
android:layout_marginRight=
"15dp"
android:text=
"@{presenter.data.mobile}"
android:text=
"@{presenter.data.mobile}"
android:textSize=
"15sp"
/>
android:textSize=
"15sp"
/>
...
@@ -108,15 +114,17 @@
...
@@ -108,15 +114,17 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_10"
android:layout_marginLeft=
"@dimen/dp_10"
android:layout_
weight=
"1
"
android:layout_
marginRight=
"38dp
"
android:text=
"@string/ka_address"
android:text=
"@string/ka_address"
android:textColor=
"@color/default_text_color"
android:textColor=
"@color/default_text_color"
android:textSize=
"15sp"
/>
android:textSize=
"15sp"
/>
<TextView
<TextView
android:id=
"@+id/tv_ka_address"
android:id=
"@+id/tv_ka_address"
android:layout_width=
"
wrap_cont
ent"
android:layout_width=
"
match_par
ent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"left"
android:layout_marginRight=
"15dp"
android:layout_marginRight=
"15dp"
android:text=
'@{presenter.data.provinceName+presenter.data.cityName+presenter.data.districtName+presenter.data.address}'
android:text=
'@{presenter.data.provinceName+presenter.data.cityName+presenter.data.districtName+presenter.data.address}'
android:textSize=
"15sp"
/>
android:textSize=
"15sp"
/>
...
...
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/activity_order_details.xml
View file @
24f6b543
...
@@ -9,9 +9,7 @@
...
@@ -9,9 +9,7 @@
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"12dp"
android:orientation=
"horizontal"
>
android:layout_marginRight=
"50dp"
android:layout_marginTop=
"@dimen/dp_12"
>
<ImageView
<ImageView
android:id=
"@+id/title_back"
android:id=
"@+id/title_back"
...
@@ -22,33 +20,42 @@
...
@@ -22,33 +20,42 @@
android:layout_marginRight=
"25dp"
android:layout_marginRight=
"25dp"
android:src=
"@mipmap/back_btn_normal"
/>
android:src=
"@mipmap/back_btn_normal"
/>
<Button
<LinearLayout
android:id=
"@+id/btn_detail"
android:layout_width=
"match_parent"
android:layout_width=
"90dp"
android:layout_height=
"wrap_content"
android:layout_height=
"28dp"
android:layout_marginBottom=
"12dp"
android:background=
"@drawable/detail_first_selector"
android:layout_marginRight=
"50dp"
android:gravity=
"center"
android:layout_marginTop=
"@dimen/dp_12"
android:text=
"@string/order_detail"
android:gravity=
"center"
>
/>
<Button
<Button
android:id=
"@+id/btn_detail"
android:id=
"@+id/btn_server"
android:layout_width=
"90dp"
android:layout_width=
"90dp"
android:layout_height=
"28dp"
android:layout_height=
"28dp"
android:background=
"@drawable/detail_first_selector"
android:background=
"@drawable/detail_center_selector"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"@string/order_detail"
/>
android:text=
"@string/server_record"
/>
<Button
<Button
android:id=
"@+id/btn_server"
android:id=
"@+id/btn_part"
android:layout_width=
"90dp"
android:layout_width=
"0dp"
android:layout_height=
"28dp"
android:layout_height=
"28dp"
android:background=
"@drawable/detail_center_selector"
android:layout_weight=
"1"
android:gravity=
"center"
android:background=
"@drawable/detail_end_selector"
android:text=
"@string/server_record"
/>
android:gravity=
"center"
android:text=
"@string/order_part"
/>
<Button
android:id=
"@+id/btn_part"
android:layout_width=
"0dp"
android:layout_height=
"28dp"
android:layout_weight=
"1"
android:background=
"@drawable/detail_end_selector"
android:gravity=
"center"
android:text=
"@string/order_part"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<FrameLayout
<FrameLayout
android:id=
"@+id/fl_container"
android:id=
"@+id/fl_container"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
...
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/activity_return_part.xml
View file @
24f6b543
...
@@ -18,8 +18,7 @@
...
@@ -18,8 +18,7 @@
<RelativeLayout
<RelativeLayout
android:id=
"@+id/title_back"
android:id=
"@+id/title_back"
style=
"@style/title"
style=
"@style/title"
>
android:onClick=
"@{()->presenter.dumpBack()}"
>
<TextView
<TextView
android:id=
"@+id/tv_title"
android:id=
"@+id/tv_title"
...
@@ -28,16 +27,20 @@
...
@@ -28,16 +27,20 @@
<ImageView
<ImageView
android:id=
"@+id/receiving_back"
android:id=
"@+id/receiving_back"
style=
"@style/title_image_back"
/>
style=
"@style/title_image_back"
android:onClick=
"@{()->presenter.dumpBack()}"
/>
<TextView
<TextView
android:id=
"@+id/tv_right_title"
android:id=
"@+id/tv_right_title"
style=
"@style/title_right_text"
style=
"@style/title_right_text"
android:onClick=
"@{()->presenter.retrunPart()}"
android:text=
"@string/submit"
android:text=
"@string/submit"
android:textColor=
"@color/cl_home_button"
android:textColor=
"@color/cl_home_button"
android:textSize=
"15sp"
/>
android:textSize=
"15sp"
/>
</RelativeLayout>
</RelativeLayout>
<ImageView
style=
"@style/card_line"
/>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"76dp"
android:layout_height=
"76dp"
...
@@ -73,7 +76,7 @@
...
@@ -73,7 +76,7 @@
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
76
dp"
android:layout_height=
"
105
dp"
android:layout_marginBottom=
"@dimen/dp_10"
android:layout_marginBottom=
"@dimen/dp_10"
android:background=
"@color/cl_white"
android:background=
"@color/cl_white"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
...
@@ -81,20 +84,22 @@
...
@@ -81,20 +84,22 @@
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:paddingLeft=
"@dimen/dp_15"
android:paddingLeft=
"@dimen/dp_15"
android:paddingRight=
"38dp"
android:paddingRight=
"28dp"
android:paddingTop=
"@dimen/dp_20"
android:text=
"@string/sp_beizhu"
android:text=
"@string/sp_beizhu"
android:textColor=
"@color/default_text_color"
android:textColor=
"@color/default_text_color"
android:textSize=
"15sp"
/>
android:textSize=
"15sp"
/>
<
TextView
<
EditText
android:id=
"@+id/sp_beizhu"
android:id=
"@+id/sp_beizhu"
android:layout_width=
"
match_par
ent"
android:layout_width=
"
wrap_cont
ent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"20dp"
android:background=
"@null"
android:gravity=
"top"
android:hint=
"请说明寄回内容,数量和寄回原因"
android:hint=
"请说明寄回内容,数量和寄回原因"
android:paddingRight=
"@dimen/dp_15"
android:paddingRight=
"@dimen/dp_15"
android:paddingTop=
"@dimen/dp_20"
android:text=
"@={presenter.spComent}"
android:text=
"@={presenter.spComent}"
android:textColor=
"@color/default_editext_color"
android:textColor=
"@color/default_editext_color"
android:textSize=
"15sp"
/>
android:textSize=
"15sp"
/>
...
@@ -118,14 +123,23 @@
...
@@ -118,14 +123,23 @@
<TextView
<TextView
android:id=
"@+id/couries_compay"
android:id=
"@+id/couries_compay"
android:layout_width=
"
match_parent
"
android:layout_width=
"
0dp
"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:hint=
"@string/couries_company_hint"
android:hint=
"@string/couries_company_hint"
android:onClick=
"@{()->presenter.getCourier()}"
android:paddingRight=
"@dimen/dp_15"
android:paddingRight=
"@dimen/dp_15"
android:text=
"@={presenter.courierCompany}"
android:text=
"@={presenter.courierCompany}"
android:textColor=
"@color/default_editext_color"
android:textColor=
"@color/default_editext_color"
android:textSize=
"15sp"
/>
android:textSize=
"15sp"
/>
<ImageView
android:layout_width=
"15dp"
android:layout_height=
"15dp"
android:layout_marginLeft=
"15dp"
android:layout_marginRight=
"15dp"
android:src=
"@mipmap/icon_arrow_right"
/>
</LinearLayout>
</LinearLayout>
<View
<View
...
@@ -150,12 +164,14 @@
...
@@ -150,12 +164,14 @@
android:textColor=
"@color/default_text_color"
android:textColor=
"@color/default_text_color"
android:textSize=
"15sp"
/>
android:textSize=
"15sp"
/>
<
TextView
<
EditText
android:id=
"@+id/logistics_num"
android:id=
"@+id/logistics_num"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@null"
android:gravity=
"center_vertical"
android:gravity=
"center_vertical"
android:hint=
"@string/couries_num_hint"
android:hint=
"@string/couries_num_hint"
android:inputType=
"number"
android:paddingRight=
"@dimen/dp_15"
android:paddingRight=
"@dimen/dp_15"
android:text=
"@={presenter.courierNum}"
android:text=
"@={presenter.courierNum}"
android:textColor=
"@color/default_editext_color"
android:textColor=
"@color/default_editext_color"
...
...
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/fragment_order_application_part.xml
View file @
24f6b543
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
android:text=
"@{presenter.title}"
android:text=
"@{presenter.title}"
android:textColor=
"@color/white"
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_16"
android:textSize=
"@dimen/sp_16"
android:onClick=
"@{()->presenter.
dumpToapply
Part()}"
android:onClick=
"@{()->presenter.
applyOrReturn
Part()}"
android:background=
"@color/cl_home_button"
android:background=
"@color/cl_home_button"
/>
/>
</LinearLayout>
</LinearLayout>
...
...
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/item_apply_part_layout.xml
View file @
24f6b543
...
@@ -11,8 +11,8 @@
...
@@ -11,8 +11,8 @@
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@color/cl_white"
android:layout_marginBottom=
"@dimen/dp_10"
android:layout_marginBottom=
"@dimen/dp_10"
android:background=
"@color/cl_white"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<RelativeLayout
<RelativeLayout
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
android:background=
"@color/line_color"
/>
android:background=
"@color/line_color"
/>
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_apply_info"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_15"
android:layout_marginLeft=
"@dimen/dp_15"
...
@@ -146,15 +147,41 @@
...
@@ -146,15 +147,41 @@
android:textColor=
"@color/default_text_color"
android:textColor=
"@color/default_text_color"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<View
<LinearLayout
android:id=
"@+id/line_one"
android:id=
"@+id/ll_refuse_reason"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/dp_15"
android:layout_marginBottom=
"@dimen/dp_15"
android:layout_marginLeft=
"@dimen/dp_15"
android:orientation=
"horizontal"
android:background=
"@color/line_color"
/>
android:visibility=
"gone"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/refuse_apply_reason"
android:textColor=
"@color/default_editext_color"
android:textSize=
"14sp"
/>
<TextView
android:id=
"@+id/refuse_apply_reason"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_12"
android:text=
"显示器坏了,必须要换了!"
android:textColor=
"@color/default_text_color"
android:textSize=
"14sp"
/>
</LinearLayout>
<View
android:id=
"@+id/line_one"
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_marginBottom=
"@dimen/dp_15"
android:layout_marginLeft=
"@dimen/dp_15"
android:background=
"@color/line_color"
/>
</LinearLayout>
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_send_info"
android:id=
"@+id/ll_send_info"
...
@@ -166,6 +193,7 @@
...
@@ -166,6 +193,7 @@
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_ka_instraction"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/dp_12"
android:layout_marginBottom=
"@dimen/dp_12"
...
@@ -189,6 +217,32 @@
...
@@ -189,6 +217,32 @@
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_sp_instruction"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/dp_12"
android:orientation=
"horizontal"
android:visibility=
"gone"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/tv_sp_instruction"
android:textColor=
"@color/default_editext_color"
android:textSize=
"14sp"
/>
<TextView
android:id=
"@+id/sp_instruction"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_12"
android:text=
"显示器坏了,必须要换了!"
android:textColor=
"@color/default_text_color"
android:textSize=
"14sp"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_sender"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/dp_12"
android:layout_marginBottom=
"@dimen/dp_12"
...
@@ -212,6 +266,7 @@
...
@@ -212,6 +266,7 @@
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_sender_mobile"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/dp_12"
android:layout_marginBottom=
"@dimen/dp_12"
...
@@ -235,6 +290,7 @@
...
@@ -235,6 +290,7 @@
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_need_return"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/dp_15"
android:layout_marginBottom=
"@dimen/dp_15"
...
@@ -259,6 +315,7 @@
...
@@ -259,6 +315,7 @@
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_couries_company"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/dp_15"
android:layout_marginBottom=
"@dimen/dp_15"
...
@@ -283,8 +340,10 @@
...
@@ -283,8 +340,10 @@
</LinearLayout>
</LinearLayout>
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_part_num"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/dp_15"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<TextView
<TextView
...
@@ -302,17 +361,41 @@
...
@@ -302,17 +361,41 @@
android:text=
"显示器坏了,必须要换了!"
android:text=
"显示器坏了,必须要换了!"
android:textColor=
"@color/default_text_color"
android:textColor=
"@color/default_text_color"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
</LinearLayout>
<LinearLayout
android:id=
"@+id/ll_send_refuse_reason"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/dp_15"
android:orientation=
"horizontal"
android:visibility=
"gone"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/refuse_apply_reason"
android:textColor=
"@color/default_editext_color"
android:textSize=
"14sp"
/>
<TextView
android:id=
"@+id/refuse_send_reason"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_12"
android:text=
"显示器坏了,必须要换了!"
android:textColor=
"@color/default_text_color"
android:textSize=
"14sp"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<View
<View
android:id=
"@+id/line_two"
android:id=
"@+id/line_two"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_height=
"1dp"
android:layout_marginLeft=
"@dimen/dp_15"
android:layout_marginLeft=
"@dimen/dp_15"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_marginTop=
"@dimen/dp_15"
android:background=
"@color/line_color"
/>
android:background=
"@color/line_color"
/>
</LinearLayout>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -326,10 +409,9 @@
...
@@ -326,10 +409,9 @@
android:id=
"@+id/logistics_info"
android:id=
"@+id/logistics_info"
android:layout_width=
"75dp"
android:layout_width=
"75dp"
android:layout_height=
"27dp"
android:layout_height=
"27dp"
android:layout_marginRight=
"10dp"
android:background=
"@drawable/btn_blue_react"
android:background=
"@drawable/btn_blue_react"
android:gravity=
"center"
android:gravity=
"center"
android:layout_marginRight=
"10dp"
android:onClick=
"@{()->presenter.queryLogistics()}"
android:text=
"物流信息"
android:text=
"物流信息"
android:textColor=
"#FF3A3A3A"
android:textColor=
"#FF3A3A3A"
android:textSize=
"13sp"
android:textSize=
"13sp"
...
...
This diff is collapsed.
Click to expand it.
app/src/main/res/values/strings.xml
View file @
24f6b543
...
@@ -217,7 +217,7 @@
...
@@ -217,7 +217,7 @@
<string
name=
"no_data"
>
暂无数据
</string>
<string
name=
"no_data"
>
暂无数据
</string>
<string
name=
"application_order_part"
>
申请备件
</string>
<string
name=
"application_order_part"
>
申请备件
</string>
<string
name=
"return_order_part"
>
寄回备件
</string>
<string
name=
"return_order_part"
>
寄回备件
</string>
<string
name=
"ka_address"
>
厂商
收货地址
</string>
<string
name=
"ka_address"
>
收货地址
</string>
<string
name=
"ka_name"
>
收货人
</string>
<string
name=
"ka_name"
>
收货人
</string>
<string
name=
"ka_mobile"
>
联系方式
</string>
<string
name=
"ka_mobile"
>
联系方式
</string>
<string
name=
"ka_receive_address"
>
收货地址
</string>
<string
name=
"ka_receive_address"
>
收货地址
</string>
...
@@ -227,7 +227,9 @@
...
@@ -227,7 +227,9 @@
<string
name=
"tv_apply_name"
>
申请人:
    
</string>
<string
name=
"tv_apply_name"
>
申请人:
    
</string>
<string
name=
"tv_apply_mobile"
>
联系方式:
</string>
<string
name=
"tv_apply_mobile"
>
联系方式:
</string>
<string
name=
"tv_apply_time"
>
申请时间:
</string>
<string
name=
"tv_apply_time"
>
申请时间:
</string>
<string
name=
"refuse_apply_reason"
>
拒绝原因:
</string>
<string
name=
"tv_ka_instruction"
>
厂商说明:
</string>
<string
name=
"tv_ka_instruction"
>
厂商说明:
</string>
<string
name=
"tv_sp_instruction"
>
服务商说明:
</string>
<string
name=
"tv_ka_name"
>
发货人:
    
</string>
<string
name=
"tv_ka_name"
>
发货人:
    
</string>
<string
name=
"tv_need_return"
>
需要寄回:
</string>
<string
name=
"tv_need_return"
>
需要寄回:
</string>
<string
name=
"tv_part_num"
>
快递单号:
</string>
<string
name=
"tv_part_num"
>
快递单号:
</string>
...
@@ -251,6 +253,9 @@
...
@@ -251,6 +253,9 @@
<string
name=
"receive_part"
>
收到备件
</string>
<string
name=
"receive_part"
>
收到备件
</string>
<string
name=
"cannot_return"
>
无法寄回?
</string>
<string
name=
"cannot_return"
>
无法寄回?
</string>
<string
name=
"part_cancle_reason"
>
取消之后不可复原,请谨慎操作
</string>
<string
name=
"part_cancle_reason"
>
取消之后不可复原,请谨慎操作
</string>
<string
name=
"part"
>
备件
</string>
<string
name=
"send_already"
>
已发货
</string>
<string
name=
"modify_part_info"
>
修改信息
</string>
<!--消息-->
<!--消息-->
...
...
This diff is collapsed.
Click to expand it.
apt/src/main/java/com/app/apt/processor/ApiFactoryProcessor.java
View file @
24f6b543
...
@@ -10,6 +10,7 @@ import com.squareup.javapoet.TypeName;
...
@@ -10,6 +10,7 @@ import com.squareup.javapoet.TypeName;
import
com.squareup.javapoet.TypeSpec
;
import
com.squareup.javapoet.TypeSpec
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.Objects
;
import
javax.annotation.processing.FilerException
;
import
javax.annotation.processing.FilerException
;
import
javax.annotation.processing.RoundEnvironment
;
import
javax.annotation.processing.RoundEnvironment
;
...
@@ -58,7 +59,7 @@ public class ApiFactoryProcessor implements IProcessor {
...
@@ -58,7 +59,7 @@ public class ApiFactoryProcessor implements IProcessor {
+
".compose($T.applySchedulers())"
+
".compose($T.applySchedulers())"
,
ClassName
.
get
(
"com.dayu.bigfish.api"
,
"Api"
)
,
ClassName
.
get
(
"com.dayu.bigfish.api"
,
"Api"
)
,
e
.
getSimpleName
().
toString
()
,
e
.
getSimpleName
().
toString
()
,
paramsString
.
substring
(
0
,
paramsString
.
length
()
-
1
)
,
Objects
.
equals
(
paramsString
,
""
)
?
""
:
paramsString
.
substring
(
0
,
paramsString
.
length
()
-
1
)
,
ClassName
.
get
(
"com.dayu.bigfish.api"
,
"Api"
));
,
ClassName
.
get
(
"com.dayu.bigfish.api"
,
"Api"
));
}
else
{
}
else
{
methodBuilder
.
addStatement
(
methodBuilder
.
addStatement
(
...
...
This diff is collapsed.
Click to expand it.
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