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
2c6a1183
authored
Apr 24, 2018
by
罗翻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务详情修改
parent
af566e4e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
683 additions
and
84 deletions
baseSDK/src/main/java/com/dayu/common/Constants.java
baseSDK/src/main/java/com/dayu/utils/BindingUtils.java
build.gradle
orderCenter/src/main/debug/AndroidManifest.xml
orderCenter/src/main/java/com/dayu/order/api/protocol/OrderDetail.java
orderCenter/src/main/java/com/dayu/order/presenter/BaseOrderPresenter.java
orderCenter/src/main/java/com/dayu/order/presenter/orderserver/OrderServerContract.java
orderCenter/src/main/java/com/dayu/order/presenter/orderserver/OrderServerPresenter.java
orderCenter/src/main/java/com/dayu/order/presenter/processorder/ProcessOrderPresenter.java
orderCenter/src/main/java/com/dayu/order/sqlbean/CheckContentOrder.java
orderCenter/src/main/java/com/dayu/order/sqlbean/OrderInfo.java
orderCenter/src/main/java/com/dayu/order/ui/activity/CheckContentActivity.java
orderCenter/src/main/java/com/dayu/order/ui/activity/ProcessOrderActivity.java
orderCenter/src/main/java/com/dayu/order/ui/adapter/LogisticsAdapter.java
orderCenter/src/main/java/com/dayu/order/ui/adapter/OrderServerAdapter.java
orderCenter/src/main/java/com/dayu/order/ui/fragment/OrderDetailsServeFragment.java
orderCenter/src/main/release/AndroidManifest.xml
orderCenter/src/main/res/layout/activity_check_content.xml
orderCenter/src/main/res/layout/fragment_order_serve.xml
orderCenter/src/main/res/layout/serve_datails_item.xml
baseSDK/src/main/java/com/dayu/common/Constants.java
View file @
2c6a1183
...
...
@@ -12,24 +12,24 @@ public class Constants {
/**
* 测试环境配置.
*/
//
public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
//
public static final String ENVIROMENT = "debug";
//
public static final String BASE_URL = "http://47.94.101.239:3112";
//
public final static String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
//
public final static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
//
public final static String WEB_ZHI_SHI = "http://47.94.101.239:9004/#/detail";
//
public static final boolean IS_DEBUG = true;
public
static
final
int
LOG_LEVEL
=
LogUtils
.
LEVEL_ALL
;
public
static
final
String
ENVIROMENT
=
"debug"
;
public
static
final
String
BASE_URL
=
"http://47.94.101.239:3112"
;
public
final
static
String
UP_PHOTO
=
"/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply"
;
public
final
static
String
WEB_SOP
=
"http://47.94.101.239:9004/#/sop"
;
public
final
static
String
WEB_ZHI_SHI
=
"http://47.94.101.239:9004/#/detail"
;
public
static
final
boolean
IS_DEBUG
=
true
;
/**
* uat环境配置.
*/
public
static
final
String
ENVIROMENT
=
"uat"
;
public
static
final
int
LOG_LEVEL
=
LogUtils
.
LEVEL_ALL
;
public
static
final
String
BASE_URL
=
"http://47.95.223.6:3112"
;
public
final
static
String
UP_PHOTO
=
"/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply"
;
public
final
static
String
WEB_SOP
=
"http://47.95.223.6:9004/#/sop"
;
public
final
static
String
WEB_ZHI_SHI
=
"http://47.95.223.6:9004/#/detail"
;
public
static
final
boolean
IS_DEBUG
=
true
;
//
public static final String ENVIROMENT = "uat";
//
public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
//
public static final String BASE_URL = "http://47.95.223.6:3112";
//
public final static String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
//
public final static String WEB_SOP = "http://47.95.223.6:9004/#/sop";
//
public final static String WEB_ZHI_SHI = "http://47.95.223.6:9004/#/detail";
//
public static final boolean IS_DEBUG = true;
/**
* 正式环境.
...
...
baseSDK/src/main/java/com/dayu/utils/BindingUtils.java
View file @
2c6a1183
...
...
@@ -106,19 +106,11 @@ public class BindingUtils {
return
;
}
view
.
setPresenter
(
presenter
);
setData
(
view
,
presenter
);
presenter
.
getSourceDatas
().
addOnPropertyChangedCallback
(
new
Observable
.
OnPropertyChangedCallback
()
{
@Override
public
void
onPropertyChanged
(
Observable
observable
,
int
i
)
{
Object
obj
=
presenter
.
getSourceDatas
().
get
();
if
(
obj
instanceof
BasePageBean
)
{
view
.
setPageData
((
BasePageBean
)
obj
);
}
else
if
(
obj
instanceof
List
)
{
view
.
setData
((
List
)
obj
);
}
else
if
(
obj
instanceof
Integer
)
{
if
((
int
)
obj
==
Constants
.
FAILED
)
{
view
.
setDataFail
();
}
}
setData
(
view
,
presenter
);
}
});
if
(
presenter
.
getHeaderDatas
()
!=
null
)
{
...
...
@@ -132,6 +124,19 @@ public class BindingUtils {
}
}
private
static
void
setData
(
LRecyclerView
view
,
BaseListPresenter
presenter
)
{
Object
obj
=
presenter
.
getSourceDatas
().
get
();
if
(
obj
instanceof
BasePageBean
)
{
view
.
setPageData
((
BasePageBean
)
obj
);
}
else
if
(
obj
instanceof
List
)
{
view
.
setData
((
List
)
obj
);
}
else
if
(
obj
instanceof
Integer
)
{
if
((
int
)
obj
==
Constants
.
FAILED
)
{
view
.
setDataFail
();
}
}
}
/**
* Lrecycleview设置数据源.
*
...
...
build.gradle
View file @
2c6a1183
...
...
@@ -9,7 +9,7 @@ buildscript {
ext
.
verson_name
=
"1.4.0"
ext
.
gradle_version
=
'3.0.1'
ext
.
isReleaseMinify
=
true
ext
.
isDebugMinify
=
tru
e
ext
.
isDebugMinify
=
fals
e
ext
.
arouter_api_version
=
'1.3.1'
ext
.
arouter_compiler_version
=
'1.1.4'
...
...
orderCenter/src/main/debug/AndroidManifest.xml
View file @
2c6a1183
...
...
@@ -61,5 +61,8 @@
<activity
android:name=
".ui.activity.PdfWebViewActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activity.CheckContentActivity"
android:screenOrientation=
"portrait"
/>
</application>
</manifest>
orderCenter/src/main/java/com/dayu/order/api/protocol/OrderDetail.java
View file @
2c6a1183
...
...
@@ -63,7 +63,7 @@ public class OrderDetail implements Serializable {
private
Object
feedback
;
private
Object
complait
;
private
List
<
RecordBean
>
record
;
private
List
<
?
>
pic
;
private
List
<
Pics
>
pic
;
private
String
sn
;
private
String
spuName
;
private
int
spuId
;
...
...
@@ -520,11 +520,11 @@ public class OrderDetail implements Serializable {
this
.
record
=
record
;
}
public
List
<
?
>
getPic
()
{
public
List
<
Pics
>
getPic
()
{
return
pic
;
}
public
void
setPic
(
List
<
?
>
pic
)
{
public
void
setPic
(
List
<
Pics
>
pic
)
{
this
.
pic
=
pic
;
}
...
...
@@ -576,6 +576,45 @@ public class OrderDetail implements Serializable {
this
.
kaCompanyId
=
kaCompanyId
;
}
public
static
class
Pics
implements
Serializable
{
private
int
id
;
private
int
orderId
;
private
int
pictureType
;
private
String
pictureUrl
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getOrderId
()
{
return
orderId
;
}
public
void
setOrderId
(
int
orderId
)
{
this
.
orderId
=
orderId
;
}
public
int
getPictureType
()
{
return
pictureType
;
}
public
void
setPictureType
(
int
pictureType
)
{
this
.
pictureType
=
pictureType
;
}
public
String
getPictureUrl
()
{
return
pictureUrl
;
}
public
void
setPictureUrl
(
String
pictureUrl
)
{
this
.
pictureUrl
=
pictureUrl
;
}
}
public
static
class
RecordBean
implements
Serializable
{
/**
* id : 174
...
...
@@ -598,6 +637,9 @@ public class OrderDetail implements Serializable {
private
int
serviceProgessTimeNum
;
private
String
commentName
;
private
String
commentInfo
;
private
String
orderObj
;
private
double
latitude
;
private
double
longitude
;
public
int
getId
()
{
return
id
;
...
...
@@ -670,9 +712,33 @@ public class OrderDetail implements Serializable {
public
void
setCommentInfo
(
String
commentInfo
)
{
this
.
commentInfo
=
commentInfo
;
}
public
String
getOrderObj
()
{
return
orderObj
;
}
public
void
setOrderObj
(
String
orderObj
)
{
this
.
orderObj
=
orderObj
;
}
public
double
getLatitude
()
{
return
latitude
;
}
public
void
setLatitude
(
double
latitude
)
{
this
.
latitude
=
latitude
;
}
public
double
getLongitude
()
{
return
longitude
;
}
public
void
setLongitude
(
double
longitude
)
{
this
.
longitude
=
longitude
;
}
}
public
class
accessories
implements
Serializable
{
public
class
accessories
implements
Serializable
{
private
int
id
;
private
String
name
;
private
int
orderId
;
...
...
orderCenter/src/main/java/com/dayu/order/presenter/BaseOrderPresenter.java
View file @
2c6a1183
...
...
@@ -3,7 +3,8 @@ package com.dayu.order.presenter;
import
com.dayu.base.ui.presenter.BaseListPresenter
;
/**
* Created by luofan on 2017/12/22.
* Created by luofan
* on 2017/12/22.
*/
public
abstract
class
BaseOrderPresenter
<
V
>
extends
BaseListPresenter
<
V
>
{
...
...
orderCenter/src/main/java/com/dayu/order/presenter/orderserver/OrderServerContract.java
0 → 100755
View file @
2c6a1183
package
com
.
dayu
.
order
.
presenter
.
orderserver
;
import
com.dayu.base.ui.presenter.BaseListPresenter
;
import
com.dayu.common.BaseView
;
/**
* Created by luo
* on 2016/8/4.
*/
public
interface
OrderServerContract
{
interface
View
extends
BaseView
{
}
abstract
class
Presenter
extends
BaseListPresenter
<
View
>
{
public
abstract
void
dumpToSop
();
public
abstract
void
dumpCheckContent
(
int
postion
);
}
}
orderCenter/src/main/java/com/dayu/order/presenter/orderserver/OrderServerPresenter.java
0 → 100644
View file @
2c6a1183
package
com
.
dayu
.
order
.
presenter
.
orderserver
;
import
android.databinding.ObservableField
;
import
android.os.Bundle
;
import
com.dayu.common.Constants
;
import
com.dayu.order.api.protocol.OrderDetail
;
import
com.dayu.order.ui.activity.CheckContentActivity
;
import
com.dayu.order.ui.activity.SopWebViewActivity
;
import
java.util.Collections
;
import
java.util.List
;
import
static
com
.
dayu
.
common
.
Constants
.
ORDER_ID
;
/**
* Created by luofan
* on 2017/11/8.
*/
public
class
OrderServerPresenter
extends
OrderServerContract
.
Presenter
{
public
ObservableField
<
Object
>
mDatas
=
new
ObservableField
<>();
public
ObservableField
<
Boolean
>
isShowLine
=
new
ObservableField
<>();
private
OrderDetail
mDetails
;
@Override
public
void
onAttached
()
{
mDetails
=
(
OrderDetail
)
mView
.
getBundle
().
getSerializable
(
Constants
.
ORDER_DETAIL
);
if
(
mDetails
!=
null
)
{
List
list
=
mDetails
.
getRecord
();
Collections
.
reverse
(
list
);
mDatas
.
set
(
list
);
if
(
list
.
size
()
==
0
)
{
isShowLine
.
set
(
false
);
}
else
{
isShowLine
.
set
(
true
);
}
}
else
{
isShowLine
.
set
(
false
);
}
}
@Override
public
ObservableField
<
Object
>
getSourceDatas
()
{
return
mDatas
;
}
@Override
public
void
dumpToSop
()
{
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
ORDER_ID
,
mDetails
.
getId
());
mView
.
startActivity
(
SopWebViewActivity
.
class
,
bundle
);
}
@Override
public
void
dumpCheckContent
(
int
postion
)
{
Bundle
bundle
=
new
Bundle
();
bundle
.
putSerializable
(
Constants
.
ORDER_DETAIL
,
mDetails
);
bundle
.
putInt
(
Constants
.
ORDER_POSTION
,
postion
);
mView
.
startActivity
(
CheckContentActivity
.
class
,
bundle
);
}
}
orderCenter/src/main/java/com/dayu/order/presenter/processorder/ProcessOrderPresenter.java
View file @
2c6a1183
...
...
@@ -129,7 +129,6 @@ public class ProcessOrderPresenter extends ProcessOrderContract.Presenter {
@Override
public
void
getOrderInfo
(
int
orderId
)
{
OrderApiFactory
.
queryOrderInfo
(
orderId
).
subscribe
(
baseObserver
(
detail
->
{
detail
.
setCreatedSource
(
3
);
mOrderDetail
=
detail
;
if
(
detail
.
getCreatedSource
()
!=
3
)
{
mView
.
setFoucesable
();
...
...
@@ -168,6 +167,7 @@ public class ProcessOrderPresenter extends ProcessOrderContract.Presenter {
params
.
put
(
"servicePrice"
,
servicePrice
);
params
.
put
(
"servicePriceComment"
,
""
);
// params.put("categoryName")
params
.
put
(
"brandName"
,
brandName
);
params
.
put
(
"productModel"
,
productModel
);
params
.
put
(
"sn"
,
sn
);
...
...
@@ -296,17 +296,27 @@ public class ProcessOrderPresenter extends ProcessOrderContract.Presenter {
}
mView
.
getData
();
OrderInfo
info
=
mOrderField
.
get
();
if
(
TextUtils
.
isEmpty
(
info
.
getPayer
()))
{
mView
.
showNoPayerDialog
();
return
;
}
if
(
"1"
.
equals
(
mOrderInfo
.
getPayer
()))
{
mPayer
.
set
(
UIUtils
.
getString
(
R
.
string
.
payer_baonei
));
}
else
if
(
"2"
.
equals
(
mOrderInfo
.
getPayer
()))
{
mPayer
.
set
(
UIUtils
.
getString
(
R
.
string
.
payer_baowai
));
}
if
(
mOrderDetail
.
getCreatedSource
()
==
3
)
{
if
(
TextUtils
.
isEmpty
(
info
.
getPayer
()))
{
mView
.
showNoPayerDialog
();
return
;
}
mView
.
showSelectPayerDialog
((
dialog
,
confirm
)
->
{
if
(
confirm
)
{
commite
(
info
);
}
});
}
else
{
commite
(
info
);
}
}
private
void
commite
(
OrderInfo
info
)
{
mView
.
showDialog
();
if
(
mImages
.
size
()
!=
0
&&
mPayerImages
.
size
()
!=
0
)
{
mView
.
showDialog
();
...
...
@@ -318,8 +328,6 @@ public class ProcessOrderPresenter extends ProcessOrderContract.Presenter {
}
MobclickAgent
.
onEvent
(
BaseApplication
.
getContext
(),
"commite_order"
);
}
});
}
@Override
public
void
dumpToSop
()
{
...
...
orderCenter/src/main/java/com/dayu/order/sqlbean/CheckContentOrder.java
0 → 100644
View file @
2c6a1183
package
com
.
dayu
.
order
.
sqlbean
;
/**
* Created by luofan
* on 2018/4/23.
*/
public
class
CheckContentOrder
{
private
String
categoryName
;
private
String
customerCheckComment
;
private
String
doorPrice
;
private
String
servicePrice
;
private
String
materialCost
;
private
String
otherPrice
;
private
String
doorPriceComment
;
private
String
brandName
;
private
String
productModel
;
private
String
sn
;
private
int
repairType
;
public
String
getCustomerCheckComment
()
{
return
customerCheckComment
;
}
public
void
setCustomerCheckComment
(
String
customerCheckComment
)
{
this
.
customerCheckComment
=
customerCheckComment
;
}
public
String
getDoorPrice
()
{
return
doorPrice
;
}
public
void
setDoorPrice
(
String
doorPrice
)
{
this
.
doorPrice
=
doorPrice
;
}
public
String
getServicePrice
()
{
return
servicePrice
;
}
public
void
setServicePrice
(
String
serverPrice
)
{
this
.
servicePrice
=
servicePrice
;
}
public
String
getMaterialCost
()
{
return
materialCost
;
}
public
void
setMaterialCost
(
String
materialCost
)
{
this
.
materialCost
=
materialCost
;
}
public
String
getOtherPrice
()
{
return
otherPrice
;
}
public
void
setOtherPrice
(
String
otherPrice
)
{
this
.
otherPrice
=
otherPrice
;
}
public
String
getDoorPriceComment
()
{
return
doorPriceComment
;
}
public
void
setDoorPriceComment
(
String
otherPriceComment
)
{
this
.
doorPriceComment
=
otherPriceComment
;
}
public
String
getBrandName
()
{
return
brandName
;
}
public
void
setBrandName
(
String
brandName
)
{
this
.
brandName
=
brandName
;
}
public
String
getProductModel
()
{
return
productModel
;
}
public
void
setProductModel
(
String
productModel
)
{
this
.
productModel
=
productModel
;
}
public
String
getSn
()
{
return
sn
;
}
public
void
setSn
(
String
sn
)
{
this
.
sn
=
sn
;
}
public
int
getRepairType
()
{
return
repairType
;
}
public
void
setRepairType
(
int
payer
)
{
this
.
repairType
=
payer
;
}
public
String
getCategoryName
()
{
return
this
.
categoryName
;
}
public
void
setCategoryName
(
String
categoryName
)
{
this
.
categoryName
=
categoryName
;
}
}
orderCenter/src/main/java/com/dayu/order/sqlbean/OrderInfo.java
View file @
2c6a1183
...
...
@@ -46,6 +46,7 @@ public class OrderInfo extends BaseObservable {
@Convert
(
columnType
=
String
.
class
,
converter
=
StringConverter
.
class
)
private
List
<
String
>
imgPayerPath
;
@Generated
(
hash
=
1265702630
)
public
OrderInfo
(
long
id
,
int
engineerId
,
String
serverRecord
,
String
doorPrice
,
String
serverPrice
,
String
materialCost
,
String
otherPrice
,
...
...
@@ -184,5 +185,4 @@ public class OrderInfo extends BaseObservable {
public
void
setImgPayerPath
(
List
<
String
>
imgPayerPath
)
{
this
.
imgPayerPath
=
imgPayerPath
;
}
}
orderCenter/src/main/java/com/dayu/order/ui/activity/CheckContentActivity.java
0 → 100644
View file @
2c6a1183
package
com
.
dayu
.
order
.
ui
.
activity
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.ImageView
;
import
com.dayu.base.ui.activity.DataBindingActivity
;
import
com.dayu.common.Constants
;
import
com.dayu.order.R
;
import
com.dayu.order.api.protocol.OrderDetail
;
import
com.dayu.order.databinding.ActivityCheckContentBinding
;
import
com.dayu.order.sqlbean.CheckContentOrder
;
import
com.dayu.utils.GlideImageLoader
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.UIUtils
;
import
com.dayu.utils.UtilsScreen
;
import
com.google.gson.Gson
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* Created by luofan
* on 2018/4/23.
*/
public
class
CheckContentActivity
extends
DataBindingActivity
<
ActivityCheckContentBinding
>
{
private
ArrayList
<
String
>
payerUrl
;
private
ArrayList
<
String
>
serverUrl
;
private
int
mdimension
;
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_check_content
;
}
@Override
public
void
initView
()
{
payerUrl
=
new
ArrayList
<>();
serverUrl
=
new
ArrayList
<>();
mdimension
=
(
UtilsScreen
.
getScreenWidth
(
mActivity
)
-
UtilsScreen
.
dip2px
(
mActivity
,
20
))
/
5
;
Bundle
bundle
=
getIntent
().
getBundleExtra
(
Constants
.
BUNDLE
);
OrderDetail
detail
=
(
OrderDetail
)
bundle
.
getSerializable
(
Constants
.
ORDER_DETAIL
);
int
position
=
bundle
.
getInt
(
Constants
.
ORDER_POSTION
);
String
obj
=
detail
.
getRecord
().
get
(
position
).
getOrderObj
();
if
(
obj
==
null
)
{
ToastUtils
.
showShortToast
(
"没有数据"
);
return
;
}
List
<
OrderDetail
.
Pics
>
pics
=
detail
.
getPic
();
if
(
pics
!=
null
&&
pics
.
size
()
>
0
)
{
for
(
OrderDetail
.
Pics
pic
:
pics
)
{
if
(
pic
.
getPictureType
()
==
1
)
{
payerUrl
.
add
(
pic
.
getPictureUrl
());
}
else
{
serverUrl
.
add
(
pic
.
getPictureUrl
());
}
}
}
Gson
gson
=
new
Gson
();
CheckContentOrder
info
=
gson
.
fromJson
(
obj
,
CheckContentOrder
.
class
);
mBind
.
title
.
setText
(
"验收内容"
);
mBind
.
tvBack
.
setOnClickListener
(
v
->
finish
());
if
(!
TextUtils
.
isEmpty
(
info
.
getCategoryName
()))
{
mBind
.
tvProduct
.
setText
(
info
.
getCategoryName
());
}
else
{
mBind
.
tvProduct
.
setText
(
mActivity
.
getString
(
R
.
string
.
no_data
));
}
if
(!
TextUtils
.
isEmpty
(
info
.
getBrandName
()))
{
mBind
.
tvBrand
.
setText
(
info
.
getBrandName
());
}
else
{
mBind
.
tvBrand
.
setText
(
mActivity
.
getString
(
R
.
string
.
no_data
));
}
if
(!
TextUtils
.
isEmpty
(
info
.
getProductModel
()))
{
mBind
.
etVersion
.
setText
(
info
.
getProductModel
());
}
else
{
mBind
.
etVersion
.
setText
(
mActivity
.
getString
(
R
.
string
.
no_data
));
}
if
(!
TextUtils
.
isEmpty
(
info
.
getSn
()))
{
mBind
.
etSerialNum
.
setText
(
info
.
getSn
());
}
else
{
mBind
.
etSerialNum
.
setText
(
mActivity
.
getString
(
R
.
string
.
no_data
));
}
if
(!
TextUtils
.
isEmpty
(
info
.
getCustomerCheckComment
()))
{
mBind
.
etServeInfo
.
setText
(
info
.
getCustomerCheckComment
());
}
else
{
mBind
.
etServeInfo
.
setText
(
mActivity
.
getString
(
R
.
string
.
no_data
));
}
if
(!
TextUtils
.
isEmpty
(
info
.
getDoorPrice
()))
{
mBind
.
etDoorPrice
.
setText
(
info
.
getDoorPrice
());
}
else
{
mBind
.
etDoorPrice
.
setText
(
mActivity
.
getString
(
R
.
string
.
no_data
));
}
if
(!
TextUtils
.
isEmpty
(
info
.
getServicePrice
()))
{
mBind
.
etServePrice
.
setText
(
info
.
getServicePrice
());
}
else
{
mBind
.
etServePrice
.
setText
(
mActivity
.
getString
(
R
.
string
.
no_data
));
}
if
(!
TextUtils
.
isEmpty
(
info
.
getMaterialCost
()))
{
mBind
.
etMaterialsPrice
.
setText
(
info
.
getMaterialCost
());
}
else
{
mBind
.
etMaterialsPrice
.
setText
(
mActivity
.
getString
(
R
.
string
.
no_data
));
}
if
(!
TextUtils
.
isEmpty
(
info
.
getOtherPrice
()))
{
mBind
.
etOtherPrice
.
setText
(
info
.
getOtherPrice
());
}
else
{
mBind
.
etOtherPrice
.
setText
(
mActivity
.
getString
(
R
.
string
.
no_data
));
}
if
(!
TextUtils
.
isEmpty
(
info
.
getDoorPriceComment
()))
{
mBind
.
etDoorInfo
.
setText
(
info
.
getDoorPriceComment
());
}
else
{
mBind
.
etDoorInfo
.
setText
(
mActivity
.
getString
(
R
.
string
.
no_data
));
}
if
(
TextUtils
.
isEmpty
(
info
.
getDoorPrice
())
&&
TextUtils
.
isEmpty
(
info
.
getDoorPriceComment
())
&&
TextUtils
.
isEmpty
(
info
.
getMaterialCost
())
&&
TextUtils
.
isEmpty
(
info
.
getOtherPrice
()))
{
mBind
.
ivSwitch
.
setSwitchButton
(
false
);
mBind
.
rlPay
.
setVisibility
(
View
.
GONE
);
}
else
{
mBind
.
ivSwitch
.
setSwitchButton
(
true
);
}
if
(
1
==
info
.
getRepairType
())
{
mBind
.
tvPayer
.
setText
(
UIUtils
.
getString
(
R
.
string
.
payer_baonei
));
}
else
if
(
2
==
info
.
getRepairType
())
{
mBind
.
tvPayer
.
setText
(
UIUtils
.
getString
(
R
.
string
.
payer_baowai
));
}
if
(
payerUrl
.
size
()
==
0
)
{
mBind
.
rlPalyerProve
.
setVisibility
(
View
.
GONE
);
}
else
{
for
(
String
url
:
payerUrl
)
{
ImageView
iv
=
new
ImageView
(
mActivity
);
iv
.
setLayoutParams
(
new
ViewGroup
.
LayoutParams
(
mdimension
,
mdimension
));
iv
.
setPadding
(
0
,
0
,
10
,
0
);
iv
.
setOnClickListener
(
v
->
dumpPic
(
payerUrl
));
GlideImageLoader
.
load
(
mActivity
,
url
,
iv
);
mBind
.
llPlayerImage
.
addView
(
iv
);
}
}
if
(
serverUrl
.
size
()
==
0
)
{
mBind
.
photoView
.
setVisibility
(
View
.
GONE
);
}
else
{
for
(
String
url
:
serverUrl
)
{
ImageView
iv
=
new
ImageView
(
mActivity
);
iv
.
setLayoutParams
(
new
ViewGroup
.
LayoutParams
(
mdimension
,
mdimension
));
iv
.
setPadding
(
0
,
0
,
10
,
0
);
iv
.
setOnClickListener
(
v
->
dumpPic
(
serverUrl
));
GlideImageLoader
.
load
(
mActivity
,
url
,
iv
);
mBind
.
llImage
.
addView
(
iv
);
}
}
}
private
void
dumpPic
(
ArrayList
<
String
>
list
)
{
Intent
intent
=
new
Intent
(
this
,
PreviewActivty
.
class
);
intent
.
putStringArrayListExtra
(
Constants
.
BUNDLE_KEY_ID
,
list
);
int
DELETECODE
=
0
;
startActivityForResult
(
intent
,
DELETECODE
);
}
}
orderCenter/src/main/java/com/dayu/order/ui/activity/ProcessOrderActivity.java
View file @
2c6a1183
...
...
@@ -211,11 +211,11 @@ public class ProcessOrderActivity extends BaseActivity<ProcessOrderPresenter, Ac
@Override
public
void
setFoucesable
()
{
mBind
.
tvBrand
.
setFocusable
(
false
);
mBind
.
tvBrand
.
setFocusable
(
false
);
mBind
.
etVersion
.
setFocusable
(
false
);
mBind
.
etSerialNum
.
setFocusable
(
false
);
mBind
.
ivPayer
.
setVisibility
(
View
.
GONE
);
mBind
.
tvPayer
.
setClickable
(
false
);
mBind
.
rlPalyerProve
.
setVisibility
(
View
.
GONE
);
}
@Override
...
...
orderCenter/src/main/java/com/dayu/order/ui/adapter/LogisticsAdapter.java
View file @
2c6a1183
...
...
@@ -7,7 +7,8 @@ import com.dayu.order.databinding.ItemLogisticsLayoutBinding;
import
com.dayu.utils.UIUtils
;
/**
* Created by luofan on 2018/1/23.
* Created by luofan
* on 2018/1/23.
*/
public
class
LogisticsAdapter
extends
CoreAdapter
<
LogsticsInfo
.
Logistics
,
ItemLogisticsLayoutBinding
>
{
...
...
orderCenter/src/main/java/com/dayu/order/ui/adapter/OrderServerAdapter.java
0 → 100644
View file @
2c6a1183
package
com
.
dayu
.
order
.
ui
.
adapter
;
import
android.text.TextUtils
;
import
android.view.View
;
import
com.dayu.base.ui.adapter.CoreAdapter
;
import
com.dayu.order.R
;
import
com.dayu.order.api.protocol.OrderDetail
;
import
com.dayu.order.databinding.ServeDatailsItemBinding
;
import
com.dayu.order.presenter.orderserver.OrderServerPresenter
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.UIUtils
;
/**
* Created by luofan
* on 2018/4/23.
*/
public
class
OrderServerAdapter
extends
CoreAdapter
<
OrderDetail
.
RecordBean
,
ServeDatailsItemBinding
>
{
public
OrderServerAdapter
(
boolean
needFoot
)
{
super
(
needFoot
);
}
@Override
protected
void
onBind
(
ServeDatailsItemBinding
holder
,
OrderDetail
.
RecordBean
item
,
int
position
)
{
super
.
onBind
(
holder
,
item
,
position
);
OrderServerPresenter
presenter
=
(
OrderServerPresenter
)
mPresenter
;
if
(
position
==
0
)
{
holder
.
ivCircle
.
setImageResource
(
R
.
drawable
.
icon_circle_blue
);
holder
.
serverCheck
.
setBackgroundResource
(
R
.
drawable
.
tab_blue_react
);
holder
.
serverCheck
.
setTextColor
(
UIUtils
.
getColor
(
R
.
color
.
white
));
}
else
{
holder
.
ivCircle
.
setImageResource
(
R
.
drawable
.
icon_circle_gray
);
holder
.
serverCheck
.
setBackground
(
null
);
holder
.
serverCheck
.
setPadding
(
0
,
0
,
0
,
0
);
holder
.
serverCheck
.
setTextColor
(
UIUtils
.
getColor
(
R
.
color
.
cl_receiving_order_item_data
));
}
holder
.
serverState
.
setText
(
"【"
+
item
.
getOperation
()
+
"】"
);
holder
.
serverComment
.
setText
(
item
.
getOperationComment
());
if
((
item
.
getCommentInfo
()
!=
null
&&
item
.
getCommentInfo
().
contains
(
"预约时间"
)))
{
holder
.
serverTimeComment
.
setText
(
item
.
getCommentInfo
());
holder
.
serverCheck
.
setVisibility
(
View
.
GONE
);
}
else
if
(
"工单备注"
.
equals
(
item
.
getCommentName
()))
{
if
(
TextUtils
.
isEmpty
(
item
.
getCommentInfo
()))
{
holder
.
serverTimeComment
.
setText
(
"备注:暂无"
);
}
else
{
holder
.
serverTimeComment
.
setText
(
"备注:"
+
item
.
getCommentInfo
());
}
holder
.
serverCheck
.
setText
(
"查看初始状态"
);
}
else
if
(
"改派原因"
.
equals
(
item
.
getCommentName
()))
{
if
(
TextUtils
.
isEmpty
(
item
.
getCommentInfo
()))
{
holder
.
serverTimeComment
.
setText
(
"改派原因:暂无"
);
}
else
{
holder
.
serverTimeComment
.
setText
(
"改派原因:"
+
item
.
getCommentInfo
());
}
holder
.
serverCheck
.
setVisibility
(
View
.
GONE
);
}
else
if
(
"取消原因"
.
equals
(
item
.
getCommentName
()))
{
if
(
TextUtils
.
isEmpty
(
item
.
getCommentInfo
()))
{
holder
.
serverTimeComment
.
setText
(
"取消原因:暂无"
);
}
else
{
holder
.
serverTimeComment
.
setText
(
"取消原因:"
+
item
.
getCommentInfo
());
}
}
else
{
holder
.
serverTimeComment
.
setVisibility
(
View
.
GONE
);
if
(
TextUtils
.
isEmpty
(
item
.
getCommentName
()))
{
holder
.
serverCheck
.
setVisibility
(
View
.
GONE
);
}
else
{
holder
.
serverCheck
.
setText
(
item
.
getCommentName
());
}
}
if
(
"查看结果"
.
equals
(
item
.
getCommentName
()))
{
holder
.
serverCheck
.
setOnClickListener
(
v
->
presenter
.
dumpToSop
());
}
if
(
"查看验收申请"
.
equals
(
item
.
getCommentName
())
||
"工单备注"
.
equals
(
item
.
getCommentName
()))
{
holder
.
serverCheck
.
setOnClickListener
(
v
->
presenter
.
dumpCheckContent
(
position
));
}
if
(
"查看位置"
.
equals
(
item
.
getCommentName
()))
{
holder
.
serverCheck
.
setOnClickListener
(
v
->
ToastUtils
.
showShortToast
(
"longtitude"
+
item
.
getLongitude
()
+
"latitude"
+
item
.
getLatitude
()));
}
if
(
"查看结果"
.
equals
(
item
.
getCommentName
()))
{
holder
.
serverCheck
.
setOnClickListener
(
v
->
ToastUtils
.
showShortToast
(
"查看结果"
));
}
}
}
orderCenter/src/main/java/com/dayu/order/ui/fragment/OrderDetailsServeFragment.java
View file @
2c6a1183
...
...
@@ -2,22 +2,22 @@ package com.dayu.order.ui.fragment;
import
android.os.Bundle
;
import
com.dayu.base.ui.fragment.
DataBinding
Fragment
;
import
com.dayu.base.ui.fragment.
Base
Fragment
;
import
com.dayu.common.Constants
;
import
com.dayu.order.R
;
import
com.dayu.order.api.protocol.OrderDetail
;
import
com.dayu.order.databinding.FragmentOrderServeBinding
;
import
com.dayu.utils.UtilsDate
;
import
com.dayu.order.presenter.orderserver.OrderServerContract
;
import
com.dayu.order.presenter.orderserver.OrderServerPresenter
;
import
com.dayu.order.ui.adapter.OrderServerAdapter
;
import
com.umeng.analytics.MobclickAgent
;
import
java.text.ParseException
;
/**
* 服务记录的Fragment
* on 2017/9/13.
*/
public
class
OrderDetailsServeFragment
extends
DataBindingFragment
<
FragmentOrderServeBinding
>
{
public
class
OrderDetailsServeFragment
extends
BaseFragment
<
OrderServerPresenter
,
FragmentOrderServeBinding
>
implements
OrderServerContract
.
View
{
private
static
final
String
TAG
=
"OrderDetailsServeFragme"
;
public
static
OrderDetailsServeFragment
newInstance
(
OrderDetail
detail
)
{
...
...
@@ -29,24 +29,19 @@ public class OrderDetailsServeFragment extends DataBindingFragment<FragmentOrder
}
@Override
public
void
setPresenter
()
{
mBind
.
setPresenter
(
mPresenter
);
}
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_order_serve
;
}
@Override
public
void
initView
()
{
OrderDetail
details
=
(
OrderDetail
)
getArguments
().
getSerializable
(
Constants
.
ORDER_DETAIL
);
if
(
details
==
null
)
{
return
;
}
for
(
OrderDetail
.
RecordBean
item
:
details
.
getRecord
())
{
try
{
item
.
setCreateTime
(
UtilsDate
.
changeFormat
(
item
.
getCreateTime
(),
UtilsDate
.
FORMAT_ONE
,
UtilsDate
.
FORMAT_FOURTH
));
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
}
mBind
.
recyclerView
.
setData
(
details
.
getRecord
());
OrderServerAdapter
adapter
=
new
OrderServerAdapter
(
false
);
mBind
.
recyclerView
.
setAdapter
(
adapter
);
}
@Override
...
...
orderCenter/src/main/release/AndroidManifest.xml
View file @
2c6a1183
...
...
@@ -55,5 +55,8 @@
<activity
android:name=
".ui.activity.PdfWebViewActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activity.CheckContentActivity"
android:screenOrientation=
"portrait"
/>
</application>
</manifest>
orderCenter/src/main/res/layout/activity_check_content.xml
0 → 100755
View file @
2c6a1183
This diff is collapsed.
Click to expand it.
orderCenter/src/main/res/layout/fragment_order_serve.xml
View file @
2c6a1183
...
...
@@ -2,13 +2,37 @@
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<data>
<variable
name=
"presenter"
type=
"com.dayu.order.presenter.orderserver.OrderServerPresenter"
/>
<import
type=
"android.view.View"
/>
</data>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<com.dayu.widgets.DottdeLineView
android:id=
"@+id/dl_line"
android:layout_width=
"1dp"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"24dp"
android:layerType=
"software"
android:visibility=
"@{presenter.isShowLine?View.VISIBLE:View.GONE}"
/>
<com.dayu.widgets.LRecyclerView
android:id=
"@+id/recyclerView"
setPresenter=
"@{presenter}"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/cl_home_listview_bg
"
android:background=
"@color/transparent
"
app:isRefreshable=
"false"
app:itemType=
"@layout/serve_datails_item"
app:needCoreAdapter=
"true"
app:needFoot=
"false"
/>
android:layout_marginBottom=
"@dimen/dp_10"
/>
</RelativeLayout>
</layout>
\ No newline at end of file
orderCenter/src/main/res/layout/serve_datails_item.xml
View file @
2c6a1183
<?xml version="1.0" encoding="utf-8"?>
<layout>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<data>
...
...
@@ -9,37 +9,89 @@
</data>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_54"
android:layout_marginLeft=
"@dimen/dp_13.3"
android:layout_marginRight=
"@dimen/dp_13.3"
android:layout_marginTop=
"5dp"
android:background=
"@drawable/item_shape"
android:gravity=
"center"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"17dp"
android:layout_marginRight=
"10dp"
android:orientation=
"horizontal"
>
<ImageView
android:id=
"@+id/iv_circle"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"32dp"
android:src=
"@drawable/icon_circle_blue"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"30dp"
android:orientation=
"vertical"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_tim
e"
android:id=
"@+id/server_stat
e"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:layout_weight=
"1"
android:text=
"@{item.createTime}"
android:textColor=
"@color/cl_order_text_title"
android:textSize=
"@dimen/sp_13.3"
/>
android:layout_height=
"wrap_content"
android:textSize=
"@dimen/sp_14"
android:textColor=
"@color/default_text_color"
android:layout_marginLeft=
"@dimen/dp_12"
android:text=
"【系统验收】"
/>
<TextView
android:id=
"@+id/item_text
"
android:layout_width=
"0dp
"
android:id=
"@+id/server_time
"
android:layout_width=
"wrap_content
"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_marginRight=
"5dp"
android:layout_weight=
"1"
android:ellipsize=
"end"
android:maxLines=
"2"
android:text=
"@{item.operationComment}"
android:textColor=
"@color/cl_tab_init"
android:textSize=
"@dimen/sp_10"
/>
android:textSize=
"@dimen/sp_12"
android:textColor=
"@color/default_text_color"
android:text=
"2017-08-04 14:47"
android:layout_marginRight=
"@dimen/dp_10"
/>
</LinearLayout>
<TextView
android:id=
"@+id/server_comment"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"10dp"
android:text=
"系统进行了验收费"
android:textColor=
"@color/default_text_color"
android:layout_marginTop=
"@dimen/dp_12"
android:layout_marginLeft=
"@dimen/dp_20"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/server_time_comment"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"预约时间:2017-12-11 18:30:00"
android:textColor=
"@color/default_text_color"
android:layout_marginLeft=
"@dimen/dp_20"
android:layout_marginBottom=
"@dimen/dp_10"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/server_check"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"@dimen/sp_12"
android:layout_marginLeft=
"@dimen/dp_20"
android:textColor=
"@color/default_text_color"
android:paddingTop=
"5dp"
android:paddingBottom=
"5dp"
android:paddingRight=
"6dp"
android:paddingLeft=
"6dp"
/>
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
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