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
493772ab
authored
May 25, 2018
by
罗翻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增多任务
parent
baa74de1
Show whitespace changes
Inline
Side-by-side
Showing
70 changed files
with
2728 additions
and
388 deletions
baseSDK/src/main/java/com/dayu/base/ui/adapter/CoreAdapter.java
baseSDK/src/main/java/com/dayu/base/ui/presenter/BaseListPresenter.java
baseSDK/src/main/java/com/dayu/common/Constants.java
baseSDK/src/main/java/com/dayu/utils/BindingUtils.java
baseSDK/src/main/java/com/dayu/widgets/LRecyclerView.java
baseSDK/src/main/java/com/dayu/widgets/SwitchImage.java
baseSDK/src/main/java/com/dayu/widgets/listener/OnItemClickListener.java
baseSDK/src/main/java/com/dayu/widgets/listener/onEndListener.java
orderCenter/src/main/res/layout/activity_webview.xml → baseSDK/src/main/res/layout/activity_webview.xml
baseSDK/src/main/res/layout/lrecycle_layout.xml
baseSDK/src/main/res/values/strings.xml
baseSDK/src/main/res/values/styles.xml
orderCenter/src/main/java/com/dayu/order/api/OrderApiFactory.java
orderCenter/src/main/java/com/dayu/order/api/OrderService.java
orderCenter/src/main/java/com/dayu/order/api/protocol/Order.java
orderCenter/src/main/java/com/dayu/order/api/protocol/OrderPart.java
orderCenter/src/main/java/com/dayu/order/api/protocol/ProcessOrder.java
orderCenter/src/main/java/com/dayu/order/api/protocol/Spu.java
orderCenter/src/main/java/com/dayu/order/common/OrderConstant.java
orderCenter/src/main/java/com/dayu/order/presenter/kaaddress/KaAddressPresenter.java
orderCenter/src/main/java/com/dayu/order/presenter/multipleprocess/MultipleProcessContract.java
orderCenter/src/main/java/com/dayu/order/presenter/multipleprocess/MultipleProcessPresenter.java
orderCenter/src/main/java/com/dayu/order/presenter/multiprocessorder/MultiProcessOrderContract.java
orderCenter/src/main/java/com/dayu/order/presenter/multiprocessorder/MultiProcessOrderPresenter.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/presenter/returnpart/ReturnPartPresenter.java
orderCenter/src/main/java/com/dayu/order/presenter/serverinfo/ServerInfoContract.java
orderCenter/src/main/java/com/dayu/order/presenter/serverinfo/ServerInfoPresenter.java
orderCenter/src/main/java/com/dayu/order/presenter/serverlist/ServerListContract.java
orderCenter/src/main/java/com/dayu/order/presenter/serverlist/ServerListPresenter.java
orderCenter/src/main/java/com/dayu/order/ui/activity/MultiProcessOrderActivity.java
orderCenter/src/main/java/com/dayu/order/ui/activity/MultipleProcessActivity.java
orderCenter/src/main/java/com/dayu/order/ui/activity/OrderDetailsActivity.java
orderCenter/src/main/java/com/dayu/order/ui/activity/OrderRecordActivity.java
orderCenter/src/main/java/com/dayu/order/ui/activity/PdfWebViewActivity.java
orderCenter/src/main/java/com/dayu/order/ui/activity/ReceivingActivity.java
orderCenter/src/main/java/com/dayu/order/ui/activity/ServerInfoActivity.java
orderCenter/src/main/java/com/dayu/order/ui/activity/ServerListActivity.java
orderCenter/src/main/java/com/dayu/order/ui/activity/SopWebViewActivity.java
orderCenter/src/main/java/com/dayu/order/ui/activity/WebViewActivity.java
orderCenter/src/main/java/com/dayu/order/ui/adapter/OrderAdapter.java
orderCenter/src/main/java/com/dayu/order/ui/adapter/OrderServerAdapter.java
orderCenter/src/main/java/com/dayu/order/ui/adapter/ServerInfoAdapter.java
orderCenter/src/main/java/com/dayu/order/ui/fragment/MultiOrderDetailFragment.java
orderCenter/src/main/java/com/dayu/order/ui/fragment/OrderDetailsServeFragment.java
orderCenter/src/main/java/com/dayu/order/ui/fragment/OrderFirstTabFragment.java
orderCenter/src/main/java/com/dayu/order/ui/fragment/OrderSecondTabFragment.java
orderCenter/src/main/release/AndroidManifest.xml
orderCenter/src/main/res/layout/activity_check_content.xml
orderCenter/src/main/res/layout/activity_multi_process_order.xml
orderCenter/src/main/res/layout/activity_multiple_process.xml
orderCenter/src/main/res/layout/activity_process_order.xml
orderCenter/src/main/res/layout/activity_server_info.xml
orderCenter/src/main/res/layout/activity_server_list.xml
orderCenter/src/main/res/layout/activity_server_list_recycle.xml
orderCenter/src/main/res/layout/fragment_multi_detail.xml
orderCenter/src/main/res/layout/item_accessories_layout.xml
orderCenter/src/main/res/layout/item_detail_server_info.xml
orderCenter/src/main/res/layout/item_multi_process_foot.xml
orderCenter/src/main/res/layout/item_multi_process_order.xml
orderCenter/src/main/res/layout/item_server_info.xml
orderCenter/src/main/res/layout/recycler_server_info_header.xml
userCenter/src/main/java/com/dayu/usercenter/presenter/homefourtab/HomeFourContract.java
userCenter/src/main/java/com/dayu/usercenter/presenter/homefourtab/HomePersonPresenter.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity/CommeWebViewActivity.java
userCenter/src/main/java/com/dayu/usercenter/ui/fragment/HomePersonFragment.java
userCenter/src/main/release/AndroidManifest.xml
userCenter/src/main/res/layout/fragment_personal_center.xml
baseSDK/src/main/java/com/dayu/base/ui/adapter/CoreAdapter.java
View file @
493772ab
...
@@ -5,6 +5,7 @@ import android.databinding.DataBindingUtil;
...
@@ -5,6 +5,7 @@ import android.databinding.DataBindingUtil;
import
android.support.annotation.LayoutRes
;
import
android.support.annotation.LayoutRes
;
import
android.support.v7.widget.RecyclerView
;
import
android.support.v7.widget.RecyclerView
;
import
android.view.LayoutInflater
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
import
com.dayu.base.api.protocol.BasePageBean
;
import
com.dayu.base.api.protocol.BasePageBean
;
...
@@ -29,6 +30,8 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
...
@@ -29,6 +30,8 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
public
boolean
isHasMore
=
true
;
public
boolean
isHasMore
=
true
;
private
List
<
Item
>
mHeadTypeDatas
=
new
ArrayList
<>();
private
List
<
Item
>
mHeadTypeDatas
=
new
ArrayList
<>();
private
List
<
Item
>
mFootTypeDatas
=
new
ArrayList
<>();
private
List
<
Item
>
mFootTypeDatas
=
new
ArrayList
<>();
private
List
<
View
>
mFootViews
=
new
ArrayList
<>();
private
List
<
View
>
mHeadViews
=
new
ArrayList
<>();
private
int
viewType
;
private
int
viewType
;
private
int
mFooterViewType
=
R
.
layout
.
lrecycler_foot
;
private
int
mFooterViewType
=
R
.
layout
.
lrecycler_foot
;
protected
Context
mContext
;
protected
Context
mContext
;
...
@@ -39,14 +42,28 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
...
@@ -39,14 +42,28 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
protected
BaseListPresenter
mPresenter
;
protected
BaseListPresenter
mPresenter
;
protected
OnChildClickListener
mOnChildClickListener
;
protected
OnChildClickListener
mOnChildClickListener
;
private
List
<
M
>
mOldDatas
=
new
ArrayList
<>();
private
List
<
M
>
mOldDatas
=
new
ArrayList
<>();
private
boolean
isNeedFoot
=
false
;
@Override
@Override
public
BaseViewHolder
onCreateViewHolder
(
ViewGroup
parent
,
int
viewType
)
{
public
BaseViewHolder
onCreateViewHolder
(
ViewGroup
parent
,
int
viewType
)
{
this
.
mContext
=
parent
.
getContext
();
this
.
mContext
=
parent
.
getContext
();
for
(
Item
item
:
mFootTypeDatas
)
{
if
(
item
.
type
==
viewType
)
{
View
view
=
LayoutInflater
.
from
(
parent
.
getContext
()).
inflate
(
viewType
,
parent
,
false
);
mFootViews
.
add
(
view
);
}
}
for
(
Item
item
:
mHeadTypeDatas
)
{
if
(
item
.
type
==
viewType
)
{
View
view
=
DataBindingUtil
.
inflate
(
LayoutInflater
.
from
(
parent
.
getContext
()),
viewType
,
parent
,
false
).
getRoot
();
mHeadViews
.
add
(
view
);
}
}
return
new
BaseViewHolder
(
DataBindingUtil
.
inflate
(
LayoutInflater
.
from
(
parent
.
getContext
()),
viewType
,
parent
,
false
));
return
new
BaseViewHolder
(
DataBindingUtil
.
inflate
(
LayoutInflater
.
from
(
parent
.
getContext
()),
viewType
,
parent
,
false
));
}
}
public
CoreAdapter
(
boolean
needFoot
)
{
public
CoreAdapter
(
boolean
needFoot
)
{
isNeedFoot
=
needFoot
;
if
(
needFoot
)
{
if
(
needFoot
)
{
mFootTypeDatas
.
add
(
new
Item
(
mFooterViewType
,
true
));
mFootTypeDatas
.
add
(
new
Item
(
mFooterViewType
,
true
));
}
}
...
@@ -54,7 +71,7 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
...
@@ -54,7 +71,7 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
public
CoreAdapter
(
boolean
needFoot
,
int
viewType
)
{
public
CoreAdapter
(
boolean
needFoot
,
int
viewType
)
{
if
(
needFoot
)
{
if
(
needFoot
)
{
mFootTypeDatas
.
add
(
new
Item
(
mFooterViewType
,
tru
e
));
mFootTypeDatas
.
add
(
new
Item
(
mFooterViewType
,
viewTyp
e
));
}
}
this
.
viewType
=
viewType
;
this
.
viewType
=
viewType
;
}
}
...
@@ -95,7 +112,17 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
...
@@ -95,7 +112,17 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
}
}
public
void
addFooterViewType
(
@LayoutRes
int
i
,
Object
data
)
{
public
void
addFooterViewType
(
@LayoutRes
int
i
,
Object
data
)
{
for
(
Item
a
:
mFootTypeDatas
)
{
if
(
a
.
type
==
i
)
{
return
;
}
}
if
(
isNeedFoot
)
{
mFootTypeDatas
.
add
(
mFootTypeDatas
.
size
()
-
1
,
new
Item
(
i
,
data
));
mFootTypeDatas
.
add
(
mFootTypeDatas
.
size
()
-
1
,
new
Item
(
i
,
data
));
}
else
{
mFootTypeDatas
.
add
(
mFootTypeDatas
.
size
(),
new
Item
(
i
,
data
));
}
}
}
public
Object
getItem
(
int
position
)
{
public
Object
getItem
(
int
position
)
{
...
@@ -234,4 +261,20 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
...
@@ -234,4 +261,20 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
return
mContext
;
return
mContext
;
}
}
public
List
<
View
>
getmFootViews
()
{
return
mFootViews
;
}
public
void
setmFootViews
(
List
<
View
>
mFootViews
)
{
this
.
mFootViews
=
mFootViews
;
}
public
List
<
View
>
getmHeadViews
()
{
return
mHeadViews
;
}
public
void
setmHeadViews
(
List
<
View
>
mHeadViews
)
{
this
.
mHeadViews
=
mHeadViews
;
}
}
}
\ No newline at end of file
baseSDK/src/main/java/com/dayu/base/ui/presenter/BaseListPresenter.java
View file @
493772ab
...
@@ -30,6 +30,16 @@ public abstract class BaseListPresenter<V> extends BasePresenter<V> {
...
@@ -30,6 +30,16 @@ public abstract class BaseListPresenter<V> extends BasePresenter<V> {
return
null
;
return
null
;
}
}
/**
* 如果有脚布局,子类重写此方法.
*
* @return 头布局数据源.
*/
public
ObservableField
<
Object
>
getFootDatas
()
{
return
null
;
}
/**
/**
*
*
* @return recy数据源.
* @return recy数据源.
...
...
baseSDK/src/main/java/com/dayu/common/Constants.java
View file @
493772ab
...
@@ -17,6 +17,8 @@ public class Constants {
...
@@ -17,6 +17,8 @@ public class Constants {
public
static
final
String
BASE_URL
=
"http://47.94.101.239:3112"
;
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
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_SOP
=
"http://47.94.101.239:9004/#/sop"
;
public
final
static
String
CHECK_MULTI_WEB_SOP
=
"http://192.168.2.181:8080/#/manyServiceResult"
;
public
final
static
String
MULTI_WEB_SOP
=
"http://192.168.2.181:8080/#/manySop"
;
public
final
static
String
WEB_SOP_DETAIL
=
"http://47.94.101.239:9004/#/sopdetail"
;
public
final
static
String
WEB_SOP_DETAIL
=
"http://47.94.101.239:9004/#/sopdetail"
;
public
final
static
String
WEB_ZHI_SHI
=
"http://47.94.101.239:9004/#/detail"
;
public
final
static
String
WEB_ZHI_SHI
=
"http://47.94.101.239:9004/#/detail"
;
public
static
final
boolean
IS_DEBUG
=
true
;
public
static
final
boolean
IS_DEBUG
=
true
;
...
@@ -138,6 +140,7 @@ public class Constants {
...
@@ -138,6 +140,7 @@ public class Constants {
public
static
final
String
LONGITUDE
=
"longitude"
;
public
static
final
String
LONGITUDE
=
"longitude"
;
public
static
final
String
LATITUDE
=
"latitude"
;
public
static
final
String
LATITUDE
=
"latitude"
;
public
static
final
String
URL
=
"url"
;
/**
/**
...
...
baseSDK/src/main/java/com/dayu/utils/BindingUtils.java
View file @
493772ab
...
@@ -106,13 +106,22 @@ public class BindingUtils {
...
@@ -106,13 +106,22 @@ public class BindingUtils {
return
;
return
;
}
}
view
.
setPresenter
(
presenter
);
view
.
setPresenter
(
presenter
);
setData
(
view
,
presenter
);
setData
(
view
,
presenter
);
presenter
.
getSourceDatas
().
addOnPropertyChangedCallback
(
new
Observable
.
OnPropertyChangedCallback
()
{
presenter
.
getSourceDatas
().
addOnPropertyChangedCallback
(
new
Observable
.
OnPropertyChangedCallback
()
{
@Override
@Override
public
void
onPropertyChanged
(
Observable
observable
,
int
i
)
{
public
void
onPropertyChanged
(
Observable
observable
,
int
i
)
{
setData
(
view
,
presenter
);
setData
(
view
,
presenter
);
}
}
});
});
if
(
presenter
.
getFootDatas
()
!=
null
)
{
presenter
.
getFootDatas
().
addOnPropertyChangedCallback
(
new
Observable
.
OnPropertyChangedCallback
()
{
@Override
public
void
onPropertyChanged
(
Observable
observable
,
int
i
)
{
Object
object
=
presenter
.
getFootDatas
().
get
();
view
.
setFootData
(
object
);
}
});
}
if
(
presenter
.
getHeaderDatas
()
!=
null
)
{
if
(
presenter
.
getHeaderDatas
()
!=
null
)
{
presenter
.
getHeaderDatas
().
addOnPropertyChangedCallback
(
new
Observable
.
OnPropertyChangedCallback
()
{
presenter
.
getHeaderDatas
().
addOnPropertyChangedCallback
(
new
Observable
.
OnPropertyChangedCallback
()
{
@Override
@Override
...
@@ -121,6 +130,7 @@ public class BindingUtils {
...
@@ -121,6 +130,7 @@ public class BindingUtils {
view
.
setHeadData
(
object
);
view
.
setHeadData
(
object
);
}
}
});
});
}
}
}
}
...
...
baseSDK/src/main/java/com/dayu/widgets/LRecyclerView.java
View file @
493772ab
...
@@ -22,6 +22,7 @@ import com.dayu.common.BaseApplication;
...
@@ -22,6 +22,7 @@ import com.dayu.common.BaseApplication;
import
com.dayu.utils.ProgressUtil
;
import
com.dayu.utils.ProgressUtil
;
import
com.dayu.widgets.listener.OnItemClickListener
;
import
com.dayu.widgets.listener.OnItemClickListener
;
import
com.dayu.widgets.listener.OnRefreshListener
;
import
com.dayu.widgets.listener.OnRefreshListener
;
import
com.dayu.widgets.listener.onEndListener
;
import
com.dayu.widgets.listener.onLoadMoreListener
;
import
com.dayu.widgets.listener.onLoadMoreListener
;
import
java.util.List
;
import
java.util.List
;
...
@@ -61,12 +62,14 @@ public class LRecyclerView<M, B> extends FrameLayout {
...
@@ -61,12 +62,14 @@ public class LRecyclerView<M, B> extends FrameLayout {
private
LinearLayout
ll_emptyView
;
private
LinearLayout
ll_emptyView
;
private
OnRefreshListener
mRefreshListener
;
private
OnRefreshListener
mRefreshListener
;
private
onLoadMoreListener
mLoadMoreListener
;
private
onLoadMoreListener
mLoadMoreListener
;
private
onEndListener
onEndListener
;
private
LinearLayoutManager
mLayoutManager
;
private
LinearLayoutManager
mLayoutManager
;
public
CoreAdapter
<
M
,
B
>
mCoreAdapter
;
public
CoreAdapter
<
M
,
B
>
mCoreAdapter
;
private
int
itemType
;
private
int
itemType
;
private
LinearLayout
ll_faileView
;
private
LinearLayout
ll_faileView
;
private
BaseListPresenter
mPresenter
;
private
BaseListPresenter
mPresenter
;
private
boolean
isRefreshable
;
private
boolean
isRefreshable
;
private
boolean
mIsEnd
;
public
LRecyclerView
(
@NonNull
Context
context
)
{
public
LRecyclerView
(
@NonNull
Context
context
)
{
...
@@ -151,6 +154,9 @@ public class LRecyclerView<M, B> extends FrameLayout {
...
@@ -151,6 +154,9 @@ public class LRecyclerView<M, B> extends FrameLayout {
isRefresh
=
false
;
isRefresh
=
false
;
}
}
}
}
if
(
onEndListener
!=
null
&&
lastVisibleItem
+
1
==
recyclerview
.
getAdapter
().
getItemCount
())
{
onEndListener
.
onEnd
();
}
}
}
@Override
@Override
...
@@ -293,7 +299,7 @@ public class LRecyclerView<M, B> extends FrameLayout {
...
@@ -293,7 +299,7 @@ public class LRecyclerView<M, B> extends FrameLayout {
mLoadMoreListener
=
listener
;
mLoadMoreListener
=
listener
;
}
}
public
void
setOnItemClickListener
(
OnItemClickListener
<
M
,
B
>
listener
)
{
public
void
setOnItemClickListener
(
OnItemClickListener
<
M
,
B
>
listener
)
{
mCoreAdapter
.
setOnItemClickListener
(
listener
);
mCoreAdapter
.
setOnItemClickListener
(
listener
);
}
}
...
@@ -317,4 +323,8 @@ public class LRecyclerView<M, B> extends FrameLayout {
...
@@ -317,4 +323,8 @@ public class LRecyclerView<M, B> extends FrameLayout {
public
void
scrollBottom
()
{
public
void
scrollBottom
()
{
recyclerview
.
smoothScrollToPosition
(
mCoreAdapter
.
getItemCount
()
-
1
);
recyclerview
.
smoothScrollToPosition
(
mCoreAdapter
.
getItemCount
()
-
1
);
}
}
public
void
setOnEndListener
(
onEndListener
listener
)
{
onEndListener
=
listener
;
}
}
}
baseSDK/src/main/java/com/dayu/widgets/SwitchImage.java
View file @
493772ab
...
@@ -12,7 +12,7 @@ import com.dayu.baselibrary.R;
...
@@ -12,7 +12,7 @@ import com.dayu.baselibrary.R;
*/
*/
public
class
SwitchImage
extends
android
.
support
.
v7
.
widget
.
AppCompatImageView
{
public
class
SwitchImage
extends
android
.
support
.
v7
.
widget
.
AppCompatImageView
{
public
boolean
switchButton
=
tru
e
;
public
boolean
switchButton
=
fals
e
;
public
boolean
getSwitchButton
()
{
public
boolean
getSwitchButton
()
{
return
switchButton
;
return
switchButton
;
...
...
baseSDK/src/main/java/com/dayu/widgets/listener/OnItemClickListener.java
View file @
493772ab
...
@@ -6,4 +6,5 @@ package com.dayu.widgets.listener;
...
@@ -6,4 +6,5 @@ package com.dayu.widgets.listener;
public
interface
OnItemClickListener
<
M
,
B
>
{
public
interface
OnItemClickListener
<
M
,
B
>
{
void
OnItemClick
(
M
item
,
B
bind
);
void
OnItemClick
(
M
item
,
B
bind
);
// void OnItemClick(M item,B bind,int position);
}
}
baseSDK/src/main/java/com/dayu/widgets/listener/onEndListener.java
0 → 100644
View file @
493772ab
package
com
.
dayu
.
widgets
.
listener
;
/**
* Created by luofan on 2017/12/8.
*/
public
interface
onEndListener
{
void
onEnd
();
}
orderCenter
/src/main/res/layout/activity_webview.xml
→
baseSDK
/src/main/res/layout/activity_webview.xml
View file @
493772ab
...
@@ -7,7 +7,9 @@
...
@@ -7,7 +7,9 @@
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<RelativeLayout
style=
"@style/title"
>
<RelativeLayout
android:id=
"@+id/rl_title"
style=
"@style/title"
>
<TextView
<TextView
android:id=
"@+id/tv_title"
android:id=
"@+id/tv_title"
...
...
baseSDK/src/main/res/layout/lrecycle_layout.xml
View file @
493772ab
...
@@ -38,7 +38,6 @@
...
@@ -38,7 +38,6 @@
android:id=
"@+id/tv_empty"
android:id=
"@+id/tv_empty"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/iv_empty"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"@dimen/dp_13"
android:layout_marginTop=
"@dimen/dp_13"
android:text=
"@string/no_data_press_refresh"
android:text=
"@string/no_data_press_refresh"
...
...
baseSDK/src/main/res/values/strings.xml
View file @
493772ab
...
@@ -158,6 +158,8 @@
...
@@ -158,6 +158,8 @@
<string
name=
"personal"
>
我的
</string>
<string
name=
"personal"
>
我的
</string>
<string
name=
"on_develop"
>
此功能正在紧张的开发中…
</string>
<string
name=
"on_develop"
>
此功能正在紧张的开发中…
</string>
<string
name=
"coming_soon"
>
敬请期待!
</string>
<string
name=
"coming_soon"
>
敬请期待!
</string>
<string
name=
"open"
>
打开
</string>
<string
name=
"is_open_dayu_bb"
>
是否打开大鱼帮app?
</string>
<!--工单-->
<!--工单-->
...
@@ -322,13 +324,14 @@
...
@@ -322,13 +324,14 @@
<string
name=
"check_reason"
>
查看结果
</string>
<string
name=
"check_reason"
>
查看结果
</string>
<string
name=
"check_accept"
>
查看验收申请
</string>
<string
name=
"check_accept"
>
查看验收申请
</string>
<string
name=
"check_location"
>
查看位置
</string>
<string
name=
"check_location"
>
查看位置
</string>
<string
name=
"part_record"
>
备件记录
</string>
<string
name=
"no_remark"
>
备注:暂无
</string>
<string
name=
"no_remark"
>
备注:暂无
</string>
<string
name=
"remark_order"
>
备注:
</string>
<string
name=
"remark_order"
>
备注:
</string>
<string
name=
"no_reassignment"
>
改派原因:暂无
</string>
<string
name=
"no_reassignment"
>
改派原因:暂无
</string>
<string
name=
"no_cancle"
>
取消原因:暂无
</string>
<string
name=
"no_cancle"
>
取消原因:暂无
</string>
<string
name=
"check_content"
>
验收内容
</string>
<string
name=
"check_content"
>
验收内容
</string>
<string
name=
"system_chcek"
>
系统验收
</string>
<string
name=
"system_chcek"
>
系统验收
</string>
<string
name=
"single_server_num"
>
已完成%1$d/
%2$d共
</string>
<string
name=
"single_server_num"
>
已完成%1$d/
共%2$d
</string>
<string
name=
"server_num"
>
共%1$d项服务
</string>
<string
name=
"server_num"
>
共%1$d项服务
</string>
...
@@ -390,6 +393,7 @@
...
@@ -390,6 +393,7 @@
<string
name=
"submission_of_audit"
>
提交审核
</string>
<string
name=
"submission_of_audit"
>
提交审核
</string>
<string
name=
"title_my_header"
>
我的头像
</string>
<string
name=
"title_my_header"
>
我的头像
</string>
<string
name=
"modify_header_iv"
>
修改头像
</string>
<string
name=
"modify_header_iv"
>
修改头像
</string>
<string
name=
"dayu_bang"
>
大鱼帮帮
</string>
<string
name=
"header_pic"
>
头像
</string>
<string
name=
"header_pic"
>
头像
</string>
<string
name=
"person_mobile"
>
手机号码
</string>
<string
name=
"person_mobile"
>
手机号码
</string>
...
...
baseSDK/src/main/res/values/styles.xml
View file @
493772ab
...
@@ -38,6 +38,16 @@
...
@@ -38,6 +38,16 @@
<item
name=
"android:scaleType"
>
centerInside
</item>
<item
name=
"android:scaleType"
>
centerInside
</item>
</style>
</style>
<style
name=
"title_left"
>
<item
name=
"android:layout_width"
>
wrap_content
</item>
<item
name=
"android:layout_height"
>
@dimen/dp_40
</item>
<item
name=
"android:src"
>
@drawable/back_btn_normal
</item>
<item
name=
"android:layout_centerVertical"
>
true
</item>
<item
name=
"android:gravity"
>
center
</item>
<item
name=
"android:layout_marginLeft"
>
@dimen/size_title_ml
</item>
<item
name=
"android:scaleType"
>
centerInside
</item>
</style>
<style
name=
"title_right_image"
>
<style
name=
"title_right_image"
>
<item
name=
"android:layout_width"
>
@dimen/dp_30
</item>
<item
name=
"android:layout_width"
>
@dimen/dp_30
</item>
<item
name=
"android:layout_height"
>
@dimen/dp_30
</item>
<item
name=
"android:layout_height"
>
@dimen/dp_30
</item>
...
...
orderCenter/src/main/java/com/dayu/order/api/OrderApiFactory.java
View file @
493772ab
...
@@ -10,6 +10,7 @@ import com.dayu.order.api.protocol.OrderDetail;
...
@@ -10,6 +10,7 @@ import com.dayu.order.api.protocol.OrderDetail;
import
com.dayu.order.api.protocol.OrderPart
;
import
com.dayu.order.api.protocol.OrderPart
;
import
com.dayu.order.api.protocol.ServerInstruction
;
import
com.dayu.order.api.protocol.ServerInstruction
;
import
com.dayu.order.api.protocol.ShipperCompany
;
import
com.dayu.order.api.protocol.ShipperCompany
;
import
com.dayu.order.api.protocol.Spu
;
import
com.dayu.order.api.protocol.Tab
;
import
com.dayu.order.api.protocol.Tab
;
import
java.util.List
;
import
java.util.List
;
...
@@ -72,6 +73,10 @@ public class OrderApiFactory {
...
@@ -72,6 +73,10 @@ public class OrderApiFactory {
return
Api
.
getService
(
OrderService
.
class
).
getKaAddress
(
companyId
).
compose
(
Api
.
applySchedulers
());
return
Api
.
getService
(
OrderService
.
class
).
getKaAddress
(
companyId
).
compose
(
Api
.
applySchedulers
());
}
}
public
static
Observable
<
KaAddress
>
getKaSelectAddress
(
int
addressId
)
{
return
Api
.
getService
(
OrderService
.
class
).
getKaSelectAddress
(
addressId
).
compose
(
Api
.
applySchedulers
());
}
public
static
Observable
<
Boolean
>
applyPart
(
long
spOrderId
,
String
spComment
,
String
createBy
,
long
accountId
)
{
public
static
Observable
<
Boolean
>
applyPart
(
long
spOrderId
,
String
spComment
,
String
createBy
,
long
accountId
)
{
return
Api
.
getService
(
OrderService
.
class
).
applyPart
(
spOrderId
,
spComment
,
createBy
,
accountId
).
compose
(
Api
.
applySchedulers
());
return
Api
.
getService
(
OrderService
.
class
).
applyPart
(
spOrderId
,
spComment
,
createBy
,
accountId
).
compose
(
Api
.
applySchedulers
());
}
}
...
@@ -115,4 +120,16 @@ public class OrderApiFactory {
...
@@ -115,4 +120,16 @@ public class OrderApiFactory {
public
static
Observable
<
Order
>
getServerInfo
(
int
orderId
)
{
public
static
Observable
<
Order
>
getServerInfo
(
int
orderId
)
{
return
Api
.
getService
(
OrderService
.
class
).
getServerInfo
(
orderId
).
compose
(
Api
.
applySchedulers
());
return
Api
.
getService
(
OrderService
.
class
).
getServerInfo
(
orderId
).
compose
(
Api
.
applySchedulers
());
}
}
public
static
Observable
<
List
<
Spu
>>
getServerList
(
int
id
)
{
return
Api
.
getService
(
OrderService
.
class
).
getServerList
(
id
).
compose
(
Api
.
applySchedulers
());
}
public
static
Observable
<
Boolean
>
processMultiOrder
(
RequestBody
body
)
{
return
Api
.
getService
(
OrderService
.
class
).
processMultiOrder
(
body
).
compose
(
Api
.
applySchedulers
());
}
public
static
Observable
<
Spu
>
getMultiProcessInfo
(
int
id
)
{
return
Api
.
getService
(
OrderService
.
class
).
getMultiProcessInfo
(
id
).
compose
(
Api
.
applySchedulers
());
}
}
}
orderCenter/src/main/java/com/dayu/order/api/OrderService.java
View file @
493772ab
...
@@ -10,6 +10,7 @@ import com.dayu.order.api.protocol.OrderDetail;
...
@@ -10,6 +10,7 @@ import com.dayu.order.api.protocol.OrderDetail;
import
com.dayu.order.api.protocol.OrderPart
;
import
com.dayu.order.api.protocol.OrderPart
;
import
com.dayu.order.api.protocol.ServerInstruction
;
import
com.dayu.order.api.protocol.ServerInstruction
;
import
com.dayu.order.api.protocol.ShipperCompany
;
import
com.dayu.order.api.protocol.ShipperCompany
;
import
com.dayu.order.api.protocol.Spu
;
import
com.dayu.order.api.protocol.Tab
;
import
com.dayu.order.api.protocol.Tab
;
import
com.dayu.order.common.OrderConstant
;
import
com.dayu.order.common.OrderConstant
;
...
@@ -29,7 +30,7 @@ import retrofit2.http.Query;
...
@@ -29,7 +30,7 @@ import retrofit2.http.Query;
* on 2018/2/8.
* on 2018/2/8.
*/
*/
interface
OrderService
{
interface
OrderService
{
/**
/**
* 我已出发.
* 我已出发.
*
*
...
@@ -145,7 +146,7 @@ import retrofit2.http.Query;
...
@@ -145,7 +146,7 @@ import retrofit2.http.Query;
@Query
(
"pageSize"
)
int
pageSize
);
@Query
(
"pageSize"
)
int
pageSize
);
/**
/**
* 获取厂商收货地址.
* 获取厂商
默认
收货地址.
*
*
* @param companyId
* @param companyId
* @return
* @return
...
@@ -153,6 +154,15 @@ import retrofit2.http.Query;
...
@@ -153,6 +154,15 @@ import retrofit2.http.Query;
@GET
(
OrderConstant
.
KA_ADDRESS
)
@GET
(
OrderConstant
.
KA_ADDRESS
)
Observable
<
BaseResponse
<
KaAddress
>>
getKaAddress
(
@Path
(
"companyId"
)
int
companyId
);
Observable
<
BaseResponse
<
KaAddress
>>
getKaAddress
(
@Path
(
"companyId"
)
int
companyId
);
/**
* 获取厂商选择的收货地址.
*
* @return
*/
@GET
(
OrderConstant
.
KA_SELECT_ADDRESS
)
Observable
<
BaseResponse
<
KaAddress
>>
getKaSelectAddress
(
@Query
(
"addressId"
)
int
addressId
);
/**
/**
* 申请备件.
* 申请备件.
*
*
...
@@ -256,9 +266,34 @@ import retrofit2.http.Query;
...
@@ -256,9 +266,34 @@ import retrofit2.http.Query;
/**
/**
* 获取多任务列表
* 获取多任务列表
*
* @return
* @return
*/
*/
@GET
(
OrderConstant
.
SERVER_INFO
)
@GET
(
OrderConstant
.
SERVER_INFO
)
Observable
<
BaseResponse
<
Order
>>
getServerInfo
(
@Path
(
"orderId"
)
int
orderId
);
Observable
<
BaseResponse
<
Order
>>
getServerInfo
(
@Path
(
"orderId"
)
int
orderId
);
/**
* 获取多数量.
*
* @param id
* @return
*/
@GET
(
OrderConstant
.
SERVER_LIST
)
Observable
<
BaseResponse
<
List
<
Spu
>>>
getServerList
(
@Path
(
"ordersRelationSpuId"
)
int
id
);
/**
* 单任务多数量提交工单.
* @param body
* @return
*/
@PUT
(
OrderConstant
.
PROCESS_MULTI_ORDER
)
Observable
<
BaseResponse
<
Boolean
>>
processMultiOrder
(
@Body
RequestBody
body
);
/**
* 查看多任务处理工单信息.
* @param id
* @return
*/
@GET
(
OrderConstant
.
CHECK_PROCESS_MULTI_ORDER
)
Observable
<
BaseResponse
<
Spu
>>
getMultiProcessInfo
(
@Path
(
"id"
)
int
id
);
}
}
orderCenter/src/main/java/com/dayu/order/api/protocol/Order.java
View file @
493772ab
...
@@ -51,6 +51,15 @@ public class Order {
...
@@ -51,6 +51,15 @@ public class Order {
private
int
sopStatus
;
private
int
sopStatus
;
private
int
createdSource
;
private
int
createdSource
;
private
List
<
Spu
>
spus
;
private
List
<
Spu
>
spus
;
private
Integer
commited
;
public
Integer
getCommited
()
{
return
commited
;
}
public
void
setCommited
(
Integer
commited
)
{
this
.
commited
=
commited
;
}
public
List
<
Spu
>
getSpus
()
{
public
List
<
Spu
>
getSpus
()
{
return
spus
;
return
spus
;
...
...
orderCenter/src/main/java/com/dayu/order/api/protocol/OrderPart.java
View file @
493772ab
...
@@ -49,6 +49,16 @@ public class OrderPart implements Serializable {
...
@@ -49,6 +49,16 @@ public class OrderPart implements Serializable {
*/
*/
private
Integer
sources
;
private
Integer
sources
;
private
int
recoveryCompanyAddressId
;
public
int
getRecoveryCompanyAddressID
()
{
return
recoveryCompanyAddressId
;
}
public
void
setRecoveryCompanyAddressID
(
int
recoveryCompanyAddressId
)
{
this
.
recoveryCompanyAddressId
=
recoveryCompanyAddressId
;
}
public
String
getPartName
()
{
public
String
getPartName
()
{
return
partName
;
return
partName
;
}
}
...
...
orderCenter/src/main/java/com/dayu/order/api/protocol/ProcessOrder.java
0 → 100644
View file @
493772ab
package
com
.
dayu
.
order
.
api
.
protocol
;
import
java.util.List
;
/**
* Created by luofan
* on 2018/5/24.
*/
public
class
ProcessOrder
{
private
String
brandName
;
private
String
categoryThreeName
;
private
String
customerCheckComment
;
private
String
kaSpuName
;
private
String
productModel
;
private
String
providerTypeName
;
private
String
spuProductNum
;
private
String
sn
;
private
int
id
;
private
int
kaSpuId
;
private
int
status
;
private
int
sopStatus
;
private
List
<
Pic
>
listPic
;
public
int
getSopStatus
()
{
return
sopStatus
;
}
public
void
setSopStatus
(
int
sopStatus
)
{
this
.
sopStatus
=
sopStatus
;
}
public
String
getBrandName
()
{
return
brandName
;
}
public
void
setBrandName
(
String
brandName
)
{
this
.
brandName
=
brandName
;
}
public
String
getCategoryThreeName
()
{
return
categoryThreeName
;
}
public
void
setCategoryThreeName
(
String
categoryThreeName
)
{
this
.
categoryThreeName
=
categoryThreeName
;
}
public
String
getCustomerCheckComment
()
{
return
customerCheckComment
;
}
public
void
setCustomerCheckComment
(
String
customerCheckComment
)
{
this
.
customerCheckComment
=
customerCheckComment
;
}
public
String
getKaSpuName
()
{
return
kaSpuName
;
}
public
void
setKaSpuName
(
String
kaSpuName
)
{
this
.
kaSpuName
=
kaSpuName
;
}
public
String
getProductModel
()
{
return
productModel
;
}
public
void
setProductModel
(
String
productModel
)
{
this
.
productModel
=
productModel
;
}
public
String
getProviderTypeName
()
{
return
providerTypeName
;
}
public
void
setProviderTypeName
(
String
providerTypeName
)
{
this
.
providerTypeName
=
providerTypeName
;
}
public
String
getSpuProductNum
()
{
return
spuProductNum
;
}
public
void
setSpuProductNum
(
String
spuProductNum
)
{
this
.
spuProductNum
=
spuProductNum
;
}
public
String
getSn
()
{
return
sn
;
}
public
void
setSn
(
String
sn
)
{
this
.
sn
=
sn
;
}
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getKaSpuId
()
{
return
kaSpuId
;
}
public
void
setKaSpuId
(
int
kaSpuId
)
{
this
.
kaSpuId
=
kaSpuId
;
}
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
public
List
<
Pic
>
getListPic
()
{
return
listPic
;
}
public
void
setListPic
(
List
<
Pic
>
listPic
)
{
this
.
listPic
=
listPic
;
}
public
class
Pic
{
private
int
id
;
private
int
ordersRelationSpuItemId
;
private
String
pictureUrl
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getOrdersRelationSpuItemId
()
{
return
ordersRelationSpuItemId
;
}
public
void
setOrdersRelationSpuItemId
(
int
ordersRelationSpuItemId
)
{
this
.
ordersRelationSpuItemId
=
ordersRelationSpuItemId
;
}
public
String
getPictureUrl
()
{
return
pictureUrl
;
}
public
void
setPictureUrl
(
String
pictureUrl
)
{
this
.
pictureUrl
=
pictureUrl
;
}
}
}
orderCenter/src/main/java/com/dayu/order/api/protocol/Spu.java
View file @
493772ab
package
com
.
dayu
.
order
.
api
.
protocol
;
package
com
.
dayu
.
order
.
api
.
protocol
;
import
android.os.Parcel
;
import
android.os.Parcelable
;
import
java.io.Serializable
;
import
java.util.List
;
/**
/**
* Created by luofan
* Created by luofan
* on 2018/5/22.
* on 2018/5/22.
*/
*/
public
class
Spu
{
public
class
Spu
implements
Serializable
,
Parcelable
{
private
int
accreditPrice
;
private
int
accreditPrice
;
private
int
categoryThreeId
;
private
int
categoryThreeId
;
private
int
finNum
;
private
int
finNum
;
...
@@ -21,6 +27,58 @@ public class Spu {
...
@@ -21,6 +27,58 @@ public class Spu {
private
String
productModel
;
private
String
productModel
;
private
String
providerTypeName
;
private
String
providerTypeName
;
private
String
time
;
private
String
time
;
private
int
status
;
private
String
brandName
;
private
String
sn
;
/**
* 处理工单获取信息使用.
*/
private
String
customerCheckComment
;
private
List
<
Pic
>
listPic
;
public
String
getCustomerCheckComment
()
{
return
customerCheckComment
;
}
public
void
setCustomerCheckComment
(
String
customerCheckComment
)
{
this
.
customerCheckComment
=
customerCheckComment
;
}
public
List
<
Pic
>
getListPic
()
{
return
listPic
;
}
public
void
setListPic
(
List
<
Pic
>
listPic
)
{
this
.
listPic
=
listPic
;
}
public
static
Creator
<
Spu
>
getCREATOR
()
{
return
CREATOR
;
}
public
String
getSn
()
{
return
sn
;
}
public
void
setSn
(
String
sn
)
{
this
.
sn
=
sn
;
}
public
String
getBrandName
()
{
return
brandName
;
}
public
void
setBrandName
(
String
brandName
)
{
this
.
brandName
=
brandName
;
}
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
public
String
getTime
()
{
public
String
getTime
()
{
return
time
;
return
time
;
...
@@ -141,4 +199,98 @@ public class Spu {
...
@@ -141,4 +199,98 @@ public class Spu {
public
void
setProviderTypeName
(
String
providerTypeName
)
{
public
void
setProviderTypeName
(
String
providerTypeName
)
{
this
.
providerTypeName
=
providerTypeName
;
this
.
providerTypeName
=
providerTypeName
;
}
}
@Override
public
int
describeContents
()
{
return
0
;
}
@Override
public
void
writeToParcel
(
Parcel
dest
,
int
flags
)
{
dest
.
writeInt
(
this
.
accreditPrice
);
dest
.
writeInt
(
this
.
categoryThreeId
);
dest
.
writeInt
(
this
.
finNum
);
dest
.
writeInt
(
this
.
goodNum
);
dest
.
writeInt
(
this
.
id
);
dest
.
writeInt
(
this
.
kaSpuId
);
dest
.
writeInt
(
this
.
orderId
);
dest
.
writeInt
(
this
.
providerTypeId
);
dest
.
writeInt
(
this
.
serviceType
);
dest
.
writeInt
(
this
.
sopStatus
);
dest
.
writeString
(
this
.
categoryThreeName
);
dest
.
writeString
(
this
.
kaSpuName
);
dest
.
writeString
(
this
.
productModel
);
dest
.
writeString
(
this
.
providerTypeName
);
dest
.
writeString
(
this
.
time
);
dest
.
writeInt
(
this
.
status
);
dest
.
writeString
(
this
.
brandName
);
dest
.
writeString
(
this
.
sn
);
}
public
Spu
()
{
}
protected
Spu
(
Parcel
in
)
{
this
.
accreditPrice
=
in
.
readInt
();
this
.
categoryThreeId
=
in
.
readInt
();
this
.
finNum
=
in
.
readInt
();
this
.
goodNum
=
in
.
readInt
();
this
.
id
=
in
.
readInt
();
this
.
kaSpuId
=
in
.
readInt
();
this
.
orderId
=
in
.
readInt
();
this
.
providerTypeId
=
in
.
readInt
();
this
.
serviceType
=
in
.
readInt
();
this
.
sopStatus
=
in
.
readInt
();
this
.
categoryThreeName
=
in
.
readString
();
this
.
kaSpuName
=
in
.
readString
();
this
.
productModel
=
in
.
readString
();
this
.
providerTypeName
=
in
.
readString
();
this
.
time
=
in
.
readString
();
this
.
status
=
in
.
readInt
();
this
.
brandName
=
in
.
readString
();
this
.
sn
=
in
.
readString
();
}
public
static
final
Creator
<
Spu
>
CREATOR
=
new
Creator
<
Spu
>()
{
@Override
public
Spu
createFromParcel
(
Parcel
source
)
{
return
new
Spu
(
source
);
}
@Override
public
Spu
[]
newArray
(
int
size
)
{
return
new
Spu
[
size
];
}
};
public
class
Pic
{
private
int
id
;
private
int
ordersRelationSpuItemId
;
private
String
pictureUrl
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getOrdersRelationSpuItemId
()
{
return
ordersRelationSpuItemId
;
}
public
void
setOrdersRelationSpuItemId
(
int
ordersRelationSpuItemId
)
{
this
.
ordersRelationSpuItemId
=
ordersRelationSpuItemId
;
}
public
String
getPictureUrl
()
{
return
pictureUrl
;
}
public
void
setPictureUrl
(
String
pictureUrl
)
{
this
.
pictureUrl
=
pictureUrl
;
}
}
}
}
\ No newline at end of file
orderCenter/src/main/java/com/dayu/order/common/OrderConstant.java
View file @
493772ab
...
@@ -14,6 +14,10 @@ public class OrderConstant {
...
@@ -14,6 +14,10 @@ public class OrderConstant {
public
final
static
int
ORDER_NOCONTACT_FINISH
=
7
;
//无联系人已完成
public
final
static
int
ORDER_NOCONTACT_FINISH
=
7
;
//无联系人已完成
public
final
static
String
TITLE
=
"title"
;
public
final
static
String
TITLE
=
"title"
;
public
final
static
String
SPUS
=
"spus"
;
public
final
static
String
SPU
=
"spu"
;
public
final
static
String
CREATEDSOURCE
=
"created_source"
;
public
final
static
String
KAADDRESSID
=
"ka_address_id"
;
/**
/**
* 异常单获取.
* 异常单获取.
...
@@ -63,11 +67,16 @@ public class OrderConstant {
...
@@ -63,11 +67,16 @@ public class OrderConstant {
*/
*/
public
final
static
String
ORDER_INSTRUCTION
=
"/api-ka-base/"
+
"spuServiceDetail"
;
public
final
static
String
ORDER_INSTRUCTION
=
"/api-ka-base/"
+
"spuServiceDetail"
;
/**
/**
* 获取厂商收货地址.
* 获取厂商
默认
收货地址.
*/
*/
public
final
static
String
KA_ADDRESS
=
"/api-ka-user/"
+
"companyAddress/default/companyId/{companyId}"
;
public
final
static
String
KA_ADDRESS
=
"/api-ka-user/"
+
"companyAddress/default/companyId/{companyId}"
;
/**
/**
* 获取厂商选择的收货地址.
*/
public
final
static
String
KA_SELECT_ADDRESS
=
"/api-ka-user/"
+
"/companyAddress/sendAddress"
;
/**
* 申请备件.
* 申请备件.
*/
*/
public
final
static
String
APPLY_ONE_PART
=
"/api-ka-order/"
+
"kaOrderSpareParts/saveSpApplyParts"
;
public
final
static
String
APPLY_ONE_PART
=
"/api-ka-order/"
+
"kaOrderSpareParts/saveSpApplyParts"
;
...
@@ -117,7 +126,24 @@ public class OrderConstant {
...
@@ -117,7 +126,24 @@ public class OrderConstant {
*/
*/
public
final
static
String
MODIFY_PART
=
"/api-ka-order/"
+
"kaOrderSpareParts"
;
public
final
static
String
MODIFY_PART
=
"/api-ka-order/"
+
"kaOrderSpareParts"
;
/**
* 多任务列表.
*/
public
final
static
String
SERVER_INFO
=
"/api-order/"
+
"/orders/findSimpleOrderVOById/{orderId}"
;
public
final
static
String
SERVER_INFO
=
"/api-order/"
+
"/orders/findSimpleOrderVOById/{orderId}"
;
/**
* 多数量列表.
*/
public
final
static
String
SERVER_LIST
=
"/api-order/"
+
"ordersRelationSpuItem/findOrdersRelationSpuItemBySpuId/{ordersRelationSpuId}"
;
/**
* 单任务多数量提交工单.
*/
public
final
static
String
PROCESS_MULTI_ORDER
=
"/api-order/"
+
"/ordersRelationSpuItem/spuItemCheck"
;
/**
* 查看多任务提交工单页面.
*/
public
final
static
String
CHECK_PROCESS_MULTI_ORDER
=
"/api-order/"
+
"/ordersRelationSpuItem/detail/{id}"
;
}
}
orderCenter/src/main/java/com/dayu/order/presenter/kaaddress/KaAddressPresenter.java
View file @
493772ab
...
@@ -6,6 +6,7 @@ import android.os.Bundle;
...
@@ -6,6 +6,7 @@ import android.os.Bundle;
import
com.dayu.common.Constants
;
import
com.dayu.common.Constants
;
import
com.dayu.order.api.OrderApiFactory
;
import
com.dayu.order.api.OrderApiFactory
;
import
com.dayu.order.api.protocol.KaAddress
;
import
com.dayu.order.api.protocol.KaAddress
;
import
com.dayu.order.common.OrderConstant
;
/**
/**
* Created by luofan
* Created by luofan
...
@@ -14,17 +15,26 @@ import com.dayu.order.api.protocol.KaAddress;
...
@@ -14,17 +15,26 @@ import com.dayu.order.api.protocol.KaAddress;
public
class
KaAddressPresenter
extends
KaAddressContract
.
Presenter
{
public
class
KaAddressPresenter
extends
KaAddressContract
.
Presenter
{
public
ObservableField
<
KaAddress
>
data
=
new
ObservableField
<>();
public
ObservableField
<
KaAddress
>
data
=
new
ObservableField
<>();
private
int
mId
;
private
int
mId
;
private
int
mType
;
private
int
mKaAddressId
;
@Override
@Override
public
void
onAttached
()
{
public
void
onAttached
()
{
Bundle
bundle
=
mView
.
getBundle
();
Bundle
bundle
=
mView
.
getBundle
();
mId
=
bundle
.
getInt
(
Constants
.
ID
,
0
);
mId
=
bundle
.
getInt
(
Constants
.
ID
,
0
);
mKaAddressId
=
bundle
.
getInt
(
OrderConstant
.
KAADDRESSID
,
-
1
);
getKaAddress
();
getKaAddress
();
}
}
@Override
@Override
public
void
getKaAddress
()
{
public
void
getKaAddress
()
{
mView
.
showDialog
();
if
(
mKaAddressId
!=
-
1
)
{
OrderApiFactory
.
getKaSelectAddress
(
mKaAddressId
).
subscribe
(
baseObserver
(
kaAddress
->
data
.
set
(
kaAddress
)));
}
else
{
OrderApiFactory
.
getKaAddress
(
mId
).
subscribe
(
baseObserver
(
kaAddress
->
data
.
set
(
kaAddress
)));
OrderApiFactory
.
getKaAddress
(
mId
).
subscribe
(
baseObserver
(
kaAddress
->
data
.
set
(
kaAddress
)));
}
}
}
}
}
orderCenter/src/main/java/com/dayu/order/presenter/multipleprocess/MultipleProcessContract.java
View file @
493772ab
...
@@ -4,6 +4,8 @@ package com.dayu.order.presenter.multipleprocess;
...
@@ -4,6 +4,8 @@ package com.dayu.order.presenter.multipleprocess;
import
com.dayu.base.ui.presenter.BaseListPresenter
;
import
com.dayu.base.ui.presenter.BaseListPresenter
;
import
com.dayu.common.BaseView
;
import
com.dayu.common.BaseView
;
import
java.util.HashMap
;
/**
/**
* Created by luo
* Created by luo
* on 2016/8/4.
* on 2016/8/4.
...
@@ -11,8 +13,10 @@ import com.dayu.common.BaseView;
...
@@ -11,8 +13,10 @@ import com.dayu.common.BaseView;
public
interface
MultipleProcessContract
{
public
interface
MultipleProcessContract
{
interface
View
extends
BaseView
{
interface
View
extends
BaseView
{
HashMap
<
String
,
Object
>
getParams
();
}
}
abstract
class
Presenter
extends
BaseListPresenter
<
View
>
{
abstract
class
Presenter
extends
BaseListPresenter
<
View
>
{
public
abstract
void
processOrder
();
}
}
}
}
orderCenter/src/main/java/com/dayu/order/presenter/multipleprocess/MultipleProcessPresenter.java
View file @
493772ab
...
@@ -2,19 +2,63 @@ package com.dayu.order.presenter.multipleprocess;
...
@@ -2,19 +2,63 @@ package com.dayu.order.presenter.multipleprocess;
import
android.databinding.ObservableField
;
import
android.databinding.ObservableField
;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.dayu.order.api.OrderApiFactory
;
import
com.dayu.order.api.protocol.Spu
;
import
com.dayu.order.common.OrderConstant
;
import
com.dayu.provider.event.RefreshServe
;
import
com.dayu.provider.router.RouterPath
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.UserManager
;
import
org.greenrobot.eventbus.EventBus
;
import
org.json.JSONObject
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
okhttp3.MediaType
;
import
okhttp3.RequestBody
;
/**
/**
* Created by luofan
* Created by luofan
* on 2017/11/8.
* on 2017/11/8.
*/
*/
public
class
MultipleProcessPresenter
extends
MultipleProcessContract
.
Presenter
{
public
class
MultipleProcessPresenter
extends
MultipleProcessContract
.
Presenter
{
public
ObservableField
<
Object
>
mDatas
=
new
ObservableField
<>();
public
ObservableField
<
Object
>
mFootDatas
=
new
ObservableField
<>();
private
ArrayList
<
Spu
>
mSpus
;
private
int
mAccountId
;
@Override
public
void
onAttached
()
{
mAccountId
=
Integer
.
parseInt
(
UserManager
.
getInstance
().
getUser
().
getAccountId
());
mSpus
=
mView
.
getBundle
().
getParcelableArrayList
(
OrderConstant
.
SPUS
);
mDatas
.
set
(
mSpus
);
}
@Override
@Override
public
ObservableField
<
Object
>
getSourceDatas
()
{
public
ObservableField
<
Object
>
getSourceDatas
()
{
return
null
;
return
mDatas
;
}
}
@Override
@Override
public
void
onAttached
()
{
public
ObservableField
<
Object
>
getFootDatas
()
{
return
mFootDatas
;
}
@Override
public
void
processOrder
()
{
mView
.
showDialog
();
HashMap
<
String
,
Object
>
params
=
mView
.
getParams
();
params
.
put
(
"engineerId"
,
mAccountId
);
params
.
put
(
"id"
,
mSpus
.
get
(
0
).
getOrderId
());
JSONObject
jsonObject
=
new
JSONObject
(
params
);
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
jsonObject
.
toString
());
OrderApiFactory
.
commitOrder
(
body
).
subscribe
(
baseObserver
(
integer
->
{
ToastUtils
.
showShortToast
(
"提交验收成功"
);
ARouter
.
getInstance
().
build
(
RouterPath
.
PATH_MAIN
).
navigation
();
EventBus
.
getDefault
().
post
(
new
RefreshServe
(
1
));
}));
}
}
}
}
orderCenter/src/main/java/com/dayu/order/presenter/multiprocessorder/MultiProcessOrderContract.java
0 → 100755
View file @
493772ab
package
com
.
dayu
.
order
.
presenter
.
multiprocessorder
;
import
com.dayu.base.ui.presenter.BasePresenter
;
import
com.dayu.common.BaseView
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* Created by luofan
* on 2016/11/04.
*/
public
interface
MultiProcessOrderContract
{
interface
View
extends
BaseView
{
/**
* 初始化+图片
*/
void
initAddIv
();
/**
* 初始化图片.
*
* @param list
*/
void
initPhotoView
(
ArrayList
<
String
>
list
);
List
<
String
>
getImages
();
}
abstract
class
Presenter
extends
BasePresenter
<
View
>
{
public
abstract
void
commitOrder
(
List
<
String
>
imageUrl
,
int
id
,
String
info
);
public
abstract
void
commitPhoto
();
/**
* 跳转sop.
*/
public
abstract
void
dumpToSop
();
/**
* 跳转到服务说明.
*/
public
abstract
void
dumpToServerInstruction
();
public
abstract
void
getInfo
();
}
}
orderCenter/src/main/java/com/dayu/order/presenter/multiprocessorder/MultiProcessOrderPresenter.java
0 → 100644
View file @
493772ab
package
com
.
dayu
.
order
.
presenter
.
multiprocessorder
;
import
android.databinding.ObservableField
;
import
android.os.Bundle
;
import
com.dayu.base.api.BaseApiFactory
;
import
com.dayu.common.BaseApplication
;
import
com.dayu.common.Constants
;
import
com.dayu.order.R
;
import
com.dayu.order.api.OrderApiFactory
;
import
com.dayu.order.api.protocol.Spu
;
import
com.dayu.order.common.OrderConstant
;
import
com.dayu.order.ui.activity.MultiProcessOrderActivity
;
import
com.dayu.order.ui.activity.ServerInstructionActivity
;
import
com.dayu.order.ui.activity.SopWebViewActivity
;
import
com.luck.picture.lib.tools.PictureFileUtils
;
import
com.umeng.analytics.MobclickAgent
;
import
org.json.JSONObject
;
import
java.io.File
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
okhttp3.MediaType
;
import
okhttp3.MultipartBody
;
import
okhttp3.RequestBody
;
/**
* Created by luofan
* on 2017/11/8.
*/
public
class
MultiProcessOrderPresenter
extends
MultiProcessOrderContract
.
Presenter
{
private
Spu
mSpu
;
private
ArrayList
<
String
>
mImages
=
new
ArrayList
<>();
private
ArrayList
<
String
>
mHttpUrl
=
new
ArrayList
<>();
public
ObservableField
<
Spu
>
mDetail
=
new
ObservableField
<>();
public
ObservableField
<
String
>
mInfo
=
new
ObservableField
<>();
public
ObservableField
<
String
>
mBrandName
=
new
ObservableField
<>();
public
ObservableField
<
String
>
mSn
=
new
ObservableField
<>();
public
ObservableField
<
Boolean
>
mSpuState
=
new
ObservableField
<>();
private
ArrayList
<
Spu
>
mSpus
;
private
int
mId
;
@Override
public
void
onAttached
()
{
Bundle
bundle
=
mView
.
getBundle
();
mSpu
=
(
Spu
)
bundle
.
getSerializable
(
OrderConstant
.
SPU
);
mSpus
=
bundle
.
getParcelableArrayList
(
OrderConstant
.
SPUS
);
mId
=
mSpu
.
getId
();
mDetail
.
set
(
mSpu
);
mBrandName
.
set
(
mSpu
.
getBrandName
());
mSn
.
set
(
mSpu
.
getSn
());
mView
.
initAddIv
();
mView
.
initPhotoView
(
mImages
);
if
(
mSpus
.
size
()
>=
2
||
(
mSpus
.
size
()
==
1
&&
mSpu
.
getStatus
()
==
2
))
{
mSpuState
.
set
(
true
);
}
else
{
mSpuState
.
set
(
false
);
}
if
(
mSpu
.
getStatus
()
==
2
)
{
getInfo
();
}
}
private
void
commitOrder
(
List
<
String
>
list
)
{
commitOrder
(
list
,
mSpu
.
getId
(),
mInfo
.
get
());
PictureFileUtils
.
deleteCacheDirFile
(
BaseApplication
.
getContext
());
}
private
MultipartBody
.
Part
[]
packPhoto
(
List
<
String
>
imageUrl
)
{
ArrayList
<
File
>
files
=
new
ArrayList
<>();
if
(
imageUrl
!=
null
&&
imageUrl
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
imageUrl
.
size
();
i
++)
{
if
(
imageUrl
.
get
(
i
).
contains
(
"http"
))
{
mHttpUrl
.
add
(
imageUrl
.
get
(
i
));
}
else
{
files
.
add
(
new
File
(
imageUrl
.
get
(
i
)));
}
}
}
MultipartBody
.
Part
[]
part
=
new
MultipartBody
.
Part
[
files
.
size
()];
for
(
int
i
=
0
;
i
<
files
.
size
();
i
++)
{
RequestBody
requestFile
=
RequestBody
.
create
(
MediaType
.
parse
(
"multipart/form-data"
),
files
.
get
(
i
));
MultipartBody
.
Part
body
=
MultipartBody
.
Part
.
createFormData
(
"fileUpload"
,
files
.
get
(
i
).
getName
(),
requestFile
);
part
[
i
]
=
body
;
}
return
part
;
}
@Override
public
void
commitOrder
(
List
<
String
>
imageUrl
,
int
id
,
String
info
)
{
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"customerCheckComment"
,
info
);
params
.
put
(
"id"
,
id
);
params
.
put
(
"brandName"
,
mBrandName
.
get
());
params
.
put
(
"sn"
,
mSn
.
get
());
//照片上传
if
(
imageUrl
!=
null
)
{
StringBuilder
str
=
new
StringBuilder
();
for
(
int
a
=
0
;
a
<
imageUrl
.
size
();
a
++)
{
if
(
a
==
imageUrl
.
size
()
-
1
)
{
str
.
append
(
imageUrl
.
get
(
a
));
}
else
{
str
.
append
(
imageUrl
.
get
(
a
));
str
.
append
(
","
);
}
params
.
put
(
"pics"
,
str
);
}
}
else
{
params
.
put
(
"pics"
,
null
);
}
JSONObject
jsonObject
=
new
JSONObject
(
params
);
RequestBody
body
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
jsonObject
.
toString
());
OrderApiFactory
.
processMultiOrder
(
body
).
subscribe
(
baseObserver
(
integer
->
doNext
()));
}
private
void
doNext
()
{
mView
.
showToast
(
R
.
string
.
order_commite_success
);
List
<
Spu
>
spus
=
new
ArrayList
<>();
spus
.
addAll
(
mSpus
);
for
(
Spu
spu
:
spus
)
{
if
(
spu
.
getId
()
==
mSpu
.
getId
())
{
mSpus
.
remove
(
spu
);
}
}
if
(
mSpus
.
size
()
>=
1
)
{
Spu
spu
=
mSpus
.
get
(
0
);
if
(
spu
.
getSopStatus
()
==
1
)
{
mSpu
=
spu
;
dumpToSop
();
}
else
{
doNextOrder
(
spu
);
}
}
else
{
mView
.
dumpBack
();
}
PictureFileUtils
.
deleteCacheDirFile
(
BaseApplication
.
getContext
());
}
private
void
doNextOrder
(
Spu
spu
)
{
Bundle
bundle
=
new
Bundle
();
bundle
.
putSerializable
(
OrderConstant
.
SPU
,
spu
);
bundle
.
putParcelableArrayList
(
OrderConstant
.
SPUS
,
mSpus
);
bundle
.
putInt
(
Constants
.
ORDER_POSTION
,
0
);
mView
.
startActivityAndFinish
(
MultiProcessOrderActivity
.
class
,
bundle
);
}
@Override
public
void
commitPhoto
()
{
mView
.
showDialog
();
MultipartBody
.
Part
[]
parts
;
List
<
String
>
imageUrl
=
mView
.
getImages
();
if
(
imageUrl
!=
null
&&
imageUrl
.
size
()
>
0
)
{
parts
=
packPhoto
(
imageUrl
);
if
(
parts
.
length
==
0
)
{
commitOrder
(
mHttpUrl
);
}
else
{
BaseApiFactory
.
uploadPhoto
(
parts
).
subscribe
(
baseObserver
(
list
->
{
list
.
addAll
(
0
,
mHttpUrl
);
commitOrder
(
list
);
}));
}
}
}
@Override
public
void
dumpToSop
()
{
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
Constants
.
ORDER_ID
,
mSpu
.
getId
());
bundle
.
putSerializable
(
OrderConstant
.
SPU
,
mSpu
);
bundle
.
putParcelableArrayList
(
OrderConstant
.
SPUS
,
mSpus
);
mView
.
startActivityAndFinish
(
SopWebViewActivity
.
class
,
bundle
);
MobclickAgent
.
onEvent
(
BaseApplication
.
getContext
(),
"modify_sop"
);
}
@Override
public
void
dumpToServerInstruction
()
{
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
Constants
.
ID
,
mSpu
.
getKaSpuId
());
mView
.
startActivity
(
ServerInstructionActivity
.
class
,
bundle
);
MobclickAgent
.
onEvent
(
BaseApplication
.
getContext
(),
"check_serverInstruction"
);
}
@Override
public
void
getInfo
()
{
mView
.
showDialog
();
OrderApiFactory
.
getMultiProcessInfo
(
mId
).
subscribe
(
baseObserver
(
spu
->
{
mDetail
.
set
(
spu
);
mBrandName
.
set
(
spu
.
getBrandName
());
mSn
.
set
(
spu
.
getSn
());
mInfo
.
set
(
spu
.
getCustomerCheckComment
());
List
<
Spu
.
Pic
>
pics
=
spu
.
getListPic
();
ArrayList
<
String
>
imges
=
new
ArrayList
<>();
for
(
Spu
.
Pic
pic
:
pics
)
{
imges
.
add
(
pic
.
getPictureUrl
());
}
mView
.
initPhotoView
(
imges
);
}));
}
}
orderCenter/src/main/java/com/dayu/order/presenter/orderserver/OrderServerContract.java
View file @
493772ab
...
@@ -14,11 +14,13 @@ public interface OrderServerContract {
...
@@ -14,11 +14,13 @@ public interface OrderServerContract {
}
}
abstract
class
Presenter
extends
BaseListPresenter
<
View
>
{
abstract
class
Presenter
extends
BaseListPresenter
<
View
>
{
public
abstract
void
dumpToSop
();
public
abstract
void
dumpToSop
(
int
id
);
public
abstract
void
dumpCheckContent
(
int
postion
);
public
abstract
void
dumpCheckContent
(
int
postion
);
public
abstract
void
dumpMap
(
double
latitude
,
double
longitude
,
String
address
);
public
abstract
void
dumpMap
(
double
latitude
,
double
longitude
,
String
address
);
public
abstract
void
dumpLogistics
(
String
courierNum
,
String
shipperCode
);
}
}
}
}
orderCenter/src/main/java/com/dayu/order/presenter/orderserver/OrderServerPresenter.java
View file @
493772ab
...
@@ -7,7 +7,9 @@ import com.dayu.common.Constants;
...
@@ -7,7 +7,9 @@ import com.dayu.common.Constants;
import
com.dayu.location.base.BaseMapActivity
;
import
com.dayu.location.base.BaseMapActivity
;
import
com.dayu.order.R
;
import
com.dayu.order.R
;
import
com.dayu.order.api.protocol.OrderDetail
;
import
com.dayu.order.api.protocol.OrderDetail
;
import
com.dayu.order.common.OrderConstant
;
import
com.dayu.order.ui.activity.CheckContentActivity
;
import
com.dayu.order.ui.activity.CheckContentActivity
;
import
com.dayu.order.ui.activity.LogisticsInfoActivity
;
import
com.dayu.order.ui.activity.SopWebViewActivity
;
import
com.dayu.order.ui.activity.SopWebViewActivity
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.UIUtils
;
import
com.dayu.utils.UIUtils
;
...
@@ -52,9 +54,14 @@ public class OrderServerPresenter extends OrderServerContract.Presenter {
...
@@ -52,9 +54,14 @@ public class OrderServerPresenter extends OrderServerContract.Presenter {
}
}
@Override
@Override
public
void
dumpToSop
()
{
public
void
dumpToSop
(
int
id
)
{
Bundle
bundle
=
new
Bundle
();
Bundle
bundle
=
new
Bundle
();
if
(
mDetails
.
getCreatedSource
()
==
4
)
{
bundle
.
putInt
(
ORDER_ID
,
id
);
}
else
{
bundle
.
putInt
(
ORDER_ID
,
mDetails
.
getId
());
bundle
.
putInt
(
ORDER_ID
,
mDetails
.
getId
());
}
bundle
.
putInt
(
OrderConstant
.
CREATEDSOURCE
,
mDetails
.
getCreatedSource
());
bundle
.
putInt
(
ORDER_STATE
,
ORDER_SOP_FINISH
);
bundle
.
putInt
(
ORDER_STATE
,
ORDER_SOP_FINISH
);
mView
.
startActivity
(
SopWebViewActivity
.
class
,
bundle
);
mView
.
startActivity
(
SopWebViewActivity
.
class
,
bundle
);
}
}
...
@@ -79,4 +86,16 @@ public class OrderServerPresenter extends OrderServerContract.Presenter {
...
@@ -79,4 +86,16 @@ public class OrderServerPresenter extends OrderServerContract.Presenter {
}
}
mView
.
startActivity
(
BaseMapActivity
.
class
,
bundle
);
mView
.
startActivity
(
BaseMapActivity
.
class
,
bundle
);
}
}
@Override
public
void
dumpLogistics
(
String
courierNum
,
String
shipperCode
)
{
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
Constants
.
COURIER_NUM
,
courierNum
);
bundle
.
putString
(
Constants
.
SHIPPER_CODE
,
shipperCode
);
mView
.
startActivity
(
LogisticsInfoActivity
.
class
,
bundle
);
}
public
OrderDetail
getDetail
()
{
return
mDetails
;
}
}
}
orderCenter/src/main/java/com/dayu/order/presenter/processorder/ProcessOrderPresenter.java
View file @
493772ab
...
@@ -341,7 +341,6 @@ public class ProcessOrderPresenter extends ProcessOrderContract.Presenter {
...
@@ -341,7 +341,6 @@ public class ProcessOrderPresenter extends ProcessOrderContract.Presenter {
bundle
.
putInt
(
Constants
.
ID
,
mDetail
.
get
().
getSpuId
());
bundle
.
putInt
(
Constants
.
ID
,
mDetail
.
get
().
getSpuId
());
mView
.
startActivity
(
ServerInstructionActivity
.
class
,
bundle
);
mView
.
startActivity
(
ServerInstructionActivity
.
class
,
bundle
);
MobclickAgent
.
onEvent
(
BaseApplication
.
getContext
(),
"check_serverInstruction"
);
MobclickAgent
.
onEvent
(
BaseApplication
.
getContext
(),
"check_serverInstruction"
);
}
}
@Override
@Override
...
...
orderCenter/src/main/java/com/dayu/order/presenter/returnpart/ReturnPartPresenter.java
View file @
493772ab
...
@@ -8,8 +8,9 @@ import com.dayu.event.UserInfo;
...
@@ -8,8 +8,9 @@ import com.dayu.event.UserInfo;
import
com.dayu.order.api.OrderApiFactory
;
import
com.dayu.order.api.OrderApiFactory
;
import
com.dayu.order.api.protocol.OrderPart
;
import
com.dayu.order.api.protocol.OrderPart
;
import
com.dayu.order.api.protocol.ShipperCompany
;
import
com.dayu.order.api.protocol.ShipperCompany
;
import
com.dayu.
provider.event.RefreshApplyPar
t
;
import
com.dayu.
order.common.OrderConstan
t
;
import
com.dayu.order.ui.activity.KaAddressActivity
;
import
com.dayu.order.ui.activity.KaAddressActivity
;
import
com.dayu.provider.event.RefreshApplyPart
;
import
com.dayu.utils.UserManager
;
import
com.dayu.utils.UserManager
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.EventBus
;
...
@@ -105,6 +106,9 @@ public class ReturnPartPresenter extends ReturnPartContract.Presenter {
...
@@ -105,6 +106,9 @@ public class ReturnPartPresenter extends ReturnPartContract.Presenter {
public
void
dumpToKaInfo
()
{
public
void
dumpToKaInfo
()
{
Bundle
bundle
=
new
Bundle
();
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
Constants
.
ID
,
mKaId
);
bundle
.
putInt
(
Constants
.
ID
,
mKaId
);
if
(
mPart
!=
null
){
bundle
.
putInt
(
OrderConstant
.
KAADDRESSID
,
mPart
.
getRecoveryCompanyAddressID
());
}
mView
.
startActivity
(
KaAddressActivity
.
class
,
bundle
);
mView
.
startActivity
(
KaAddressActivity
.
class
,
bundle
);
}
}
...
...
orderCenter/src/main/java/com/dayu/order/presenter/serverinfo/ServerInfoContract.java
View file @
493772ab
...
@@ -15,5 +15,7 @@ public interface ServerInfoContract {
...
@@ -15,5 +15,7 @@ public interface ServerInfoContract {
abstract
class
Presenter
extends
BaseListPresenter
<
View
>
{
abstract
class
Presenter
extends
BaseListPresenter
<
View
>
{
public
abstract
void
getServerInfo
();
public
abstract
void
getServerInfo
();
public
abstract
void
dumpServerList
(
int
id
);
}
}
}
}
orderCenter/src/main/java/com/dayu/order/presenter/serverinfo/ServerInfoPresenter.java
View file @
493772ab
package
com
.
dayu
.
order
.
presenter
.
serverinfo
;
package
com
.
dayu
.
order
.
presenter
.
serverinfo
;
import
android.databinding.ObservableField
;
import
android.databinding.ObservableField
;
import
android.os.Bundle
;
import
com.dayu.common.Constants
;
import
com.dayu.common.Constants
;
import
com.dayu.order.api.OrderApiFactory
;
import
com.dayu.order.api.OrderApiFactory
;
import
com.dayu.order.api.protocol.Spu
;
import
com.dayu.order.api.protocol.Spu
;
import
com.dayu.order.common.OrderConstant
;
import
com.dayu.order.ui.activity.ServerListActivity
;
import
java.util.List
;
import
java.util.List
;
...
@@ -15,12 +18,12 @@ import java.util.List;
...
@@ -15,12 +18,12 @@ import java.util.List;
public
class
ServerInfoPresenter
extends
ServerInfoContract
.
Presenter
{
public
class
ServerInfoPresenter
extends
ServerInfoContract
.
Presenter
{
public
ObservableField
<
Object
>
mDatas
=
new
ObservableField
<>();
public
ObservableField
<
Object
>
mDatas
=
new
ObservableField
<>();
public
ObservableField
<
Object
>
mHeadDatas
=
new
ObservableField
<>();
public
ObservableField
<
Object
>
mHeadDatas
=
new
ObservableField
<>();
public
ObservableField
<
Integer
>
mCanProcess
=
new
ObservableField
();
private
int
mId
;
private
int
mId
;
@Override
@Override
public
void
onAttached
()
{
public
void
onAttached
()
{
mId
=
mView
.
getBundle
().
getInt
(
Constants
.
ORDER_ID
);
mId
=
mView
.
getBundle
().
getInt
(
Constants
.
ID
);
mId
=
1885
;
}
}
@Override
@Override
...
@@ -35,11 +38,27 @@ public class ServerInfoPresenter extends ServerInfoContract.Presenter {
...
@@ -35,11 +38,27 @@ public class ServerInfoPresenter extends ServerInfoContract.Presenter {
@Override
@Override
public
void
getServerInfo
()
{
public
void
getServerInfo
()
{
mView
.
showDialog
();
OrderApiFactory
.
getServerInfo
(
mId
).
subscribe
(
baseObserver
(
order
->
{
OrderApiFactory
.
getServerInfo
(
mId
).
subscribe
(
baseObserver
(
order
->
{
mHeadDatas
.
set
(
order
);
mHeadDatas
.
set
(
order
);
List
<
Spu
>
spus
=
order
.
getSpus
();
List
<
Spu
>
spus
=
order
.
getSpus
();
spus
.
get
(
0
).
setTime
(
order
.
getConfirmDoorTime
());
spus
.
get
(
0
).
setTime
(
order
.
getConfirmDoorTime
());
mDatas
.
set
(
spus
);
mDatas
.
set
(
spus
);
mCanProcess
.
set
(
order
.
getCommited
());
}));
}));
}
}
@Override
public
void
dumpServerList
(
int
id
)
{
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
Constants
.
ID
,
id
);
bundle
.
putString
(
OrderConstant
.
SPUS
,
"spus"
);
mView
.
startActivity
(
ServerListActivity
.
class
,
bundle
);
}
@Override
public
void
refresh
()
{
getServerInfo
();
}
}
}
orderCenter/src/main/java/com/dayu/order/presenter/serverlist/ServerListContract.java
View file @
493772ab
...
@@ -14,5 +14,6 @@ public interface ServerListContract {
...
@@ -14,5 +14,6 @@ public interface ServerListContract {
}
}
abstract
class
Presenter
extends
BaseListPresenter
<
View
>
{
abstract
class
Presenter
extends
BaseListPresenter
<
View
>
{
public
abstract
void
getServerList
();
}
}
}
}
orderCenter/src/main/java/com/dayu/order/presenter/serverlist/ServerListPresenter.java
View file @
493772ab
...
@@ -2,19 +2,54 @@ package com.dayu.order.presenter.serverlist;
...
@@ -2,19 +2,54 @@ package com.dayu.order.presenter.serverlist;
import
android.databinding.ObservableField
;
import
android.databinding.ObservableField
;
import
com.dayu.common.Constants
;
import
com.dayu.order.api.OrderApiFactory
;
import
com.dayu.order.api.protocol.Spu
;
import
com.dayu.order.common.OrderConstant
;
/**
/**
* Created by luofan
* Created by luofan
* on 2017/11/8.
* on 2017/11/8.
*/
*/
public
class
ServerListPresenter
extends
ServerListContract
.
Presenter
{
public
class
ServerListPresenter
extends
ServerListContract
.
Presenter
{
public
ObservableField
<
Object
>
mDatas
=
new
ObservableField
<>();
public
ObservableField
<
Boolean
>
mCanProcess
=
new
ObservableField
<>();
public
ObservableField
<
Boolean
>
mIsShowProcess
=
new
ObservableField
<>();
private
int
mId
;
@Override
@Override
public
ObservableField
<
Object
>
getSourceDatas
()
{
public
ObservableField
<
Object
>
getSourceDatas
()
{
return
null
;
return
mDatas
;
}
}
@Override
@Override
public
void
onAttached
()
{
public
void
onAttached
()
{
mId
=
mView
.
getBundle
().
getInt
(
Constants
.
ID
);
String
type
=
mView
.
getBundle
().
getString
(
OrderConstant
.
SPUS
);
if
(
OrderConstant
.
SPUS
.
equals
(
type
))
{
mIsShowProcess
.
set
(
false
);
}
else
{
mIsShowProcess
.
set
(
true
);
}
mView
.
showDialog
();
}
@Override
public
void
getServerList
()
{
OrderApiFactory
.
getServerList
(
mId
).
subscribe
(
baseObserver
(
spus
->
{
mDatas
.
set
(
spus
);
boolean
flag
=
true
;
for
(
Spu
spu
:
spus
)
{
if
(
spu
.
getStatus
()
==
1
)
{
flag
=
false
;
}
}
mCanProcess
.
set
(
flag
);
}));
}
@Override
public
void
refresh
()
{
getServerList
();
}
}
}
}
orderCenter/src/main/java/com/dayu/order/ui/activity/MultiProcessOrderActivity.java
0 → 100644
View file @
493772ab
package
com
.
dayu
.
order
.
ui
.
activity
;
import
android.content.Intent
;
import
android.os.Environment
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.RelativeLayout
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.common.Constants
;
import
com.dayu.order.R
;
import
com.dayu.order.databinding.ActivityMultiProcessOrderBinding
;
import
com.dayu.order.presenter.multiprocessorder.MultiProcessOrderContract
;
import
com.dayu.order.presenter.multiprocessorder.MultiProcessOrderPresenter
;
import
com.dayu.utils.GlideImageLoader
;
import
com.dayu.utils.UtilsScreen
;
import
com.luck.picture.lib.PictureSelectionModel
;
import
com.luck.picture.lib.PictureSelector
;
import
com.luck.picture.lib.config.PictureConfig
;
import
com.luck.picture.lib.config.PictureMimeType
;
import
com.luck.picture.lib.entity.LocalMedia
;
import
com.umeng.analytics.MobclickAgent
;
import
java.io.File
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* Created by luofan
* on 2018/5/23.
*/
public
class
MultiProcessOrderActivity
extends
BaseActivity
<
MultiProcessOrderPresenter
,
ActivityMultiProcessOrderBinding
>
implements
MultiProcessOrderContract
.
View
{
private
int
mIvWeight
;
private
ImageView
mAddIV
;
private
List
<
LocalMedia
>
mSelectList
;
private
ArrayList
<
String
>
mImages
=
new
ArrayList
<>();
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_multi_process_order
;
}
@Override
public
void
initView
()
{
mSelectList
=
new
ArrayList
<>();
mAddIV
.
setOnClickListener
(
v
->
showPicDialog
());
}
@Override
public
void
setPresenter
()
{
mBind
.
setPresenter
(
mPresenter
);
}
@Override
public
void
initAddIv
()
{
mIvWeight
=
(
UtilsScreen
.
getScreenWidth
(
mActivity
)
-
UtilsScreen
.
dip2px
(
mActivity
,
20
))
/
5
;
mAddIV
=
new
ImageView
(
mActivity
);
mAddIV
.
setLayoutParams
(
new
ViewGroup
.
LayoutParams
(
mIvWeight
,
mIvWeight
));
mAddIV
.
setImageResource
(
R
.
drawable
.
icon_submit_photo
);
}
public
void
showPicDialog
()
{
PictureSelectionModel
selector
=
PictureSelector
.
create
(
mActivity
)
.
openGallery
(
PictureMimeType
.
ofImage
())
//全部.PictureMimeType.ofAll()、图片.ofImage()、视频.ofVideo()
.
maxSelectNum
(
5
-
mImages
.
size
())
// 最大图片选择数量 int
.
imageSpanCount
(
4
)
// 每行显示个数 int
.
selectionMode
(
PictureConfig
.
MULTIPLE
)
// 多选 or 单选 PictureConfig.MULTIPLE or PictureConfig.SINGLE
.
previewImage
(
true
)
// 是否可预览图片 true or false
.
isCamera
(
true
)
// 是否显示拍照按钮 true or false
.
isZoomAnim
(
true
)
// 图片列表点击 缩放效果 默认true
.
sizeMultiplier
(
0.1f
)
// glide 加载图片大小 0~1之间 如设置 .glideOverride()无效
.
setOutputCameraPath
(
"/CustomPath"
)
// 自定义拍、照保存路径,可不填
.
compress
(
true
)
// 是否压缩 true or false
.
glideOverride
(
300
,
500
)
// int glide 加载宽高,越小图片列表越流畅,但会影响列表图片浏览的清晰度
.
hideBottomControls
(
true
)
// 是否显示uCrop工具栏,默认不显示 true or false
.
compressSavePath
(
getPath
())
//压缩图片保存地址
.
previewEggs
(
true
)
// 预览图片时 是否增强左右滑动图片体验(图片滑动一半即可看到上一张是否选中) true or false
// .minimumCompressSize(100)// 小于100kb的图片不压缩
.
synOrAsy
(
true
);
//同步true或异步false 压缩 默认同步、
// .enableCrop(true)//是否裁剪
// .freeStyleCropEnabled(true)
selector
.
forResult
(
PictureConfig
.
CHOOSE_REQUEST
);
MobclickAgent
.
onEvent
(
mActivity
,
"add_server_pic"
);
}
private
String
getPath
()
{
String
path
=
Environment
.
getExternalStorageDirectory
()
+
"/dayu/image/"
;
File
file
=
new
File
(
path
);
if
(
file
.
mkdirs
())
{
return
path
;
}
return
path
;
}
/**
* 图片列表显示.
*/
@Override
public
void
initPhotoView
(
ArrayList
<
String
>
list
)
{
mImages
=
list
;
initPhoto
(
list
,
mBind
.
llImage
,
mAddIV
);
}
public
void
initPhoto
(
ArrayList
<
String
>
list
,
LinearLayout
layout
,
ImageView
mAdd
)
{
layout
.
removeAllViews
();
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
View
view
=
LayoutInflater
.
from
(
mActivity
).
inflate
(
R
.
layout
.
item_picture_select
,
null
);
view
.
setLayoutParams
(
new
RelativeLayout
.
LayoutParams
(
mIvWeight
,
mIvWeight
));
view
.
setPadding
(
0
,
0
,
10
,
0
);
ImageView
ivDelete
=
view
.
findViewById
(
R
.
id
.
iv_picture_delete
);
ImageView
imageView
=
view
.
findViewById
(
R
.
id
.
iv_picture
);
String
path
=
list
.
get
(
i
);
GlideImageLoader
.
load
(
mActivity
,
path
,
imageView
);
imageView
.
setOnClickListener
(
v
->
dumpPic
(
list
));
ivDelete
.
setOnClickListener
(
v
->
{
if
(
list
.
size
()
==
5
)
{
layout
.
addView
(
mAdd
);
}
layout
.
removeView
(
view
);
list
.
remove
(
path
);
});
layout
.
addView
(
view
);
}
if
(
list
.
size
()
<
5
)
{
layout
.
addView
(
mAdd
);
}
}
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
);
}
@Override
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
data
)
{
super
.
onActivityResult
(
requestCode
,
resultCode
,
data
);
if
(
resultCode
==
RESULT_OK
)
{
switch
(
requestCode
)
{
case
PictureConfig
.
CHOOSE_REQUEST
:
mSelectList
=
PictureSelector
.
obtainMultipleResult
(
data
);
if
(
mSelectList
!=
null
)
{
for
(
int
a
=
0
;
a
<
mSelectList
.
size
();
a
++)
{
mImages
.
add
(
mSelectList
.
get
(
a
).
getCompressPath
());
}
initPhotoView
(
mImages
);
}
break
;
}
}
}
@Override
public
List
<
String
>
getImages
()
{
return
mImages
;
}
}
orderCenter/src/main/java/com/dayu/order/ui/activity/MultipleProcessActivity.java
View file @
493772ab
package
com
.
dayu
.
order
.
ui
.
activity
;
package
com
.
dayu
.
order
.
ui
.
activity
;
import
android.view.View
;
import
android.widget.EditText
;
import
android.widget.RelativeLayout
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.order.R
;
import
com.dayu.order.R
;
import
com.dayu.order.databinding.ActivityMultipleProcessBinding
;
import
com.dayu.order.databinding.ActivityMultipleProcessBinding
;
import
com.dayu.order.presenter.multipleprocess.MultipleProcessContract
;
import
com.dayu.order.presenter.multipleprocess.MultipleProcessPresenter
;
import
com.dayu.order.presenter.multipleprocess.MultipleProcessPresenter
;
import
com.dayu.widgets.SwitchImage
;
import
java.util.HashMap
;
/**
/**
* Created by luofan
* Created by luofan
* on 2018/5/21.
* on 2018/5/21.
*/
*/
public
class
MultipleProcessActivity
extends
BaseActivity
<
MultipleProcessPresenter
,
ActivityMultipleProcessBinding
>{
public
class
MultipleProcessActivity
extends
BaseActivity
<
MultipleProcessPresenter
,
ActivityMultipleProcessBinding
>
implements
MultipleProcessContract
.
View
{
private
EditText
mDoorPrice
;
private
EditText
mServerPrice
;
private
EditText
mMaterialsPrice
;
private
EditText
mOtherPrice
;
private
EditText
mDoorInfo
;
private
int
isPay
;
@Override
@Override
public
void
setPresenter
()
{
public
void
setPresenter
()
{
mBind
.
setPresenter
(
mPresenter
);
}
}
@Override
@Override
...
@@ -23,6 +38,56 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent
...
@@ -23,6 +38,56 @@ public class MultipleProcessActivity extends BaseActivity<MultipleProcessPresent
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
mBind
.
tvTitle
.
setText
(
"提交验收"
);
mBind
.
recyclerView
.
mCoreAdapter
.
addFooterViewType
(
R
.
layout
.
item_multi_process_foot
,
null
);
mBind
.
recyclerView
.
postDelayed
(
this
::
setOnclick
,
500
);
mBind
.
recyclerView
.
setOnEndListener
(
this
::
setOnclick
);
}
public
void
setOnclick
()
{
View
view
=
mBind
.
recyclerView
.
getChildAt
(
0
);
SwitchImage
swtich
=
view
.
findViewById
(
R
.
id
.
iv_switch
);
RelativeLayout
rlPay
=
view
.
findViewById
(
R
.
id
.
rl_pay
);
if
(
swtich
==
null
)
{
return
;
}
mDoorPrice
=
view
.
findViewById
(
R
.
id
.
et_door_price
);
mServerPrice
=
view
.
findViewById
(
R
.
id
.
et_serve_price
);
mMaterialsPrice
=
view
.
findViewById
(
R
.
id
.
et_materials_price
);
mOtherPrice
=
view
.
findViewById
(
R
.
id
.
et_other_price
);
mDoorInfo
=
view
.
findViewById
(
R
.
id
.
et_door_info
);
swtich
.
setOnClickListener
(
v
->
{
if
(
swtich
.
getSwitchButton
())
{
swtich
.
setSwitchButton
(
false
);
rlPay
.
setVisibility
(
View
.
GONE
);
clearData
();
isPay
=
1
;
}
else
{
swtich
.
setSwitchButton
(
true
);
rlPay
.
setVisibility
(
View
.
VISIBLE
);
mBind
.
recyclerView
.
scrollBottom
();
isPay
=
2
;
}
});
}
public
void
clearData
()
{
mDoorPrice
.
setText
(
""
);
mServerPrice
.
setText
(
""
);
mMaterialsPrice
.
setText
(
""
);
mOtherPrice
.
setText
(
""
);
mDoorInfo
.
setText
(
""
);
}
@Override
public
HashMap
<
String
,
Object
>
getParams
()
{
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"doorPrice"
,
mDoorPrice
.
getText
().
toString
().
trim
());
params
.
put
(
"servicePrice"
,
mServerPrice
.
getText
().
toString
().
trim
());
params
.
put
(
"materialCost"
,
mMaterialsPrice
.
getText
().
toString
().
trim
());
params
.
put
(
"otherPrice"
,
mOtherPrice
.
getText
().
toString
().
trim
());
params
.
put
(
"doorPriceComment"
,
mDoorInfo
.
getText
().
toString
().
trim
());
params
.
put
(
"isPay"
,
isPay
);
return
params
;
}
}
}
}
orderCenter/src/main/java/com/dayu/order/ui/activity/OrderDetailsActivity.java
View file @
493772ab
...
@@ -57,15 +57,15 @@ public class OrderDetailsActivity extends BaseActivity<OrderDetailPresenter, Act
...
@@ -57,15 +57,15 @@ public class OrderDetailsActivity extends BaseActivity<OrderDetailPresenter, Act
mMultiDetailFragment
=
MultiOrderDetailFragment
.
newInstance
(
detail
);
mMultiDetailFragment
=
MultiOrderDetailFragment
.
newInstance
(
detail
);
orderDatailsServeFragment
=
OrderDetailsServeFragment
.
newInstance
(
detail
);
orderDatailsServeFragment
=
OrderDetailsServeFragment
.
newInstance
(
detail
);
mOrderPartFragment
=
OrderPartFragment
.
newInstance
(
detail
);
mOrderPartFragment
=
OrderPartFragment
.
newInstance
(
detail
);
if
(
detail
.
getCreatedSource
()
==
4
)
{
if
(
detail
.
getCreatedSource
()
==
4
)
{
mFragments
.
add
(
mMultiDetailFragment
);
mFragments
.
add
(
mMultiDetailFragment
);
}
else
{
}
else
{
mFragments
.
add
(
orderDatailsFragment
);
mFragments
.
add
(
orderDatailsFragment
);
}
}
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
)
{
if
(
detail
.
getCreatedSource
()
!=
3
&&
detail
.
getCreatedSource
()
!=
4
)
{
mBind
.
btnPart
.
setVisibility
(
View
.
GONE
);
mBind
.
btnPart
.
setVisibility
(
View
.
GONE
);
mBind
.
btnServer
.
setBackgroundResource
(
R
.
drawable
.
detail_end_selector
);
mBind
.
btnServer
.
setBackgroundResource
(
R
.
drawable
.
detail_end_selector
);
}
}
...
...
orderCenter/src/main/java/com/dayu/order/ui/activity/OrderRecordActivity.java
View file @
493772ab
...
@@ -36,9 +36,10 @@ public class OrderRecordActivity extends BaseActivity<OrderRecordPresenter, Acti
...
@@ -36,9 +36,10 @@ public class OrderRecordActivity extends BaseActivity<OrderRecordPresenter, Acti
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
mBind
.
tvTitle
.
setText
(
getString
(
R
.
string
.
history_order
));
mBind
.
tvTitle
.
setText
(
getString
(
R
.
string
.
history_order
));
mAdapter
=
new
OrderAdapter
(
true
,
R
.
layout
.
fragment_orderdoing_item
);
mAdapter
=
new
OrderAdapter
(
true
);
mAdapter
.
setViewType
(
R
.
layout
.
fragment_orderdoing_item
);
mBind
.
recyclerView
.
setAdapter
(
mAdapter
);
mBind
.
recyclerView
.
setAdapter
(
mAdapter
);
mBind
.
recyclerView
.
setOnItemClickListener
(
new
OnItemClickListener
<
Order
,
FragmentOrderdoingItemBinding
>()
{
mBind
.
recyclerView
.
setOnItemClickListener
(
new
OnItemClickListener
<
Order
,
FragmentOrderdoingItemBinding
>()
{
@Override
@Override
public
void
OnItemClick
(
Order
item
,
FragmentOrderdoingItemBinding
bind
)
{
public
void
OnItemClick
(
Order
item
,
FragmentOrderdoingItemBinding
bind
)
{
mPresenter
.
dumpDetail
(
item
.
getId
());
mPresenter
.
dumpDetail
(
item
.
getId
());
...
...
orderCenter/src/main/java/com/dayu/order/ui/activity/PdfWebViewActivity.java
View file @
493772ab
...
@@ -9,10 +9,10 @@ import android.webkit.WebViewClient;
...
@@ -9,10 +9,10 @@ import android.webkit.WebViewClient;
import
android.widget.LinearLayout
;
import
android.widget.LinearLayout
;
import
com.dayu.base.ui.activity.DataBindingActivity
;
import
com.dayu.base.ui.activity.DataBindingActivity
;
import
com.dayu.baselibrary.databinding.ActivityWebviewBinding
;
import
com.dayu.common.Constants
;
import
com.dayu.common.Constants
;
import
com.dayu.order.R
;
import
com.dayu.order.R
;
import
com.dayu.order.common.OrderConstant
;
import
com.dayu.order.common.OrderConstant
;
import
com.dayu.order.databinding.ActivityWebviewBinding
;
import
com.dayu.utils.Base64Encoder
;
import
com.dayu.utils.Base64Encoder
;
import
java.io.File
;
import
java.io.File
;
...
...
orderCenter/src/main/java/com/dayu/order/ui/activity/ReceivingActivity.java
View file @
493772ab
...
@@ -31,7 +31,8 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter, Activity
...
@@ -31,7 +31,8 @@ public class ReceivingActivity extends BaseActivity<ReceivingPresenter, Activity
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
mBind
.
tvTitle
.
setText
(
getString
(
R
.
string
.
receive_list
));
mBind
.
tvTitle
.
setText
(
getString
(
R
.
string
.
receive_list
));
mAdapter
=
new
OrderAdapter
(
true
,
R
.
layout
.
fragment_orderdoing_item
);
mAdapter
=
new
OrderAdapter
(
true
);
mAdapter
.
setViewType
(
R
.
layout
.
fragment_orderdoing_item
);
mBind
.
recyclerView
.
setAdapter
(
mAdapter
);
mBind
.
recyclerView
.
setAdapter
(
mAdapter
);
initListener
();
initListener
();
mBind
.
recyclerView
.
setOnItemClickListener
(
new
OnItemClickListener
<
Order
,
FragmentOrderdoingItemBinding
>()
{
mBind
.
recyclerView
.
setOnItemClickListener
(
new
OnItemClickListener
<
Order
,
FragmentOrderdoingItemBinding
>()
{
...
...
orderCenter/src/main/java/com/dayu/order/ui/activity/ServerInfoActivity.java
View file @
493772ab
package
com
.
dayu
.
order
.
ui
.
activity
;
package
com
.
dayu
.
order
.
ui
.
activity
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.common.Constants
;
import
com.dayu.order.R
;
import
com.dayu.order.R
;
import
com.dayu.order.api.protocol.Spu
;
import
com.dayu.order.common.OrderConstant
;
import
com.dayu.order.databinding.ActivityServerInfoBinding
;
import
com.dayu.order.databinding.ActivityServerInfoBinding
;
import
com.dayu.order.presenter.serverinfo.ServerInfoContract
;
import
com.dayu.order.presenter.serverinfo.ServerInfoContract
;
import
com.dayu.order.presenter.serverinfo.ServerInfoPresenter
;
import
com.dayu.order.presenter.serverinfo.ServerInfoPresenter
;
import
com.dayu.order.ui.adapter.ServerInfoAdapter
;
import
com.dayu.order.ui.adapter.ServerInfoAdapter
;
import
java.util.ArrayList
;
/**
/**
* Created by luofan
* Created by luofan
* on 2018/5/21.
* on 2018/5/21.
...
@@ -26,7 +34,21 @@ public class ServerInfoActivity extends BaseActivity<ServerInfoPresenter, Activi
...
@@ -26,7 +34,21 @@ public class ServerInfoActivity extends BaseActivity<ServerInfoPresenter, Activi
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
mBind
.
tvTitle
.
setText
(
"任务列表"
);
ServerInfoAdapter
adapter
=
new
ServerInfoAdapter
(
false
);
ServerInfoAdapter
adapter
=
new
ServerInfoAdapter
(
false
);
mBind
.
recyclerView
.
setAdapter
(
adapter
);
mBind
.
recyclerView
.
setAdapter
(
adapter
);
mBind
.
tvProcess
.
setOnClickListener
(
v
->
{
Intent
intent
=
new
Intent
(
mActivity
,
MultipleProcessActivity
.
class
);
Bundle
bundle
=
new
Bundle
();
bundle
.
putParcelableArrayList
(
OrderConstant
.
SPUS
,
(
ArrayList
<
Spu
>)
mBind
.
recyclerView
.
getDatas
());
intent
.
putExtra
(
Constants
.
BUNDLE
,
bundle
);
startActivity
(
intent
);
});
}
@Override
public
void
onResume
()
{
super
.
onResume
();
mPresenter
.
getServerInfo
();
}
}
}
}
orderCenter/src/main/java/com/dayu/order/ui/activity/ServerListActivity.java
View file @
493772ab
package
com
.
dayu
.
order
.
ui
.
activity
;
package
com
.
dayu
.
order
.
ui
.
activity
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.common.Constants
;
import
com.dayu.order.R
;
import
com.dayu.order.R
;
import
com.dayu.order.api.protocol.Spu
;
import
com.dayu.order.common.OrderConstant
;
import
com.dayu.order.databinding.ActivityServerListBinding
;
import
com.dayu.order.databinding.ActivityServerListBinding
;
import
com.dayu.order.databinding.ActivityServerListRecycleBinding
;
import
com.dayu.order.presenter.serverlist.ServerListContract
;
import
com.dayu.order.presenter.serverlist.ServerListContract
;
import
com.dayu.order.presenter.serverlist.ServerListPresenter
;
import
com.dayu.order.presenter.serverlist.ServerListPresenter
;
import
com.dayu.widgets.listener.OnItemClickListener
;
import
java.util.ArrayList
;
/**
/**
* Created by luofan
* Created by luofan
* on 2018/5/21.
* on 2018/5/21.
*/
*/
public
class
ServerListActivity
extends
BaseActivity
<
ServerListPresenter
,
ActivityServerListBinding
>
public
class
ServerListActivity
extends
BaseActivity
<
ServerListPresenter
,
ActivityServerList
Recycle
Binding
>
implements
ServerListContract
.
View
{
implements
ServerListContract
.
View
{
@Override
@Override
public
void
setPresenter
()
{
public
void
setPresenter
()
{
mBind
.
setPresenter
(
mPresenter
);
}
}
@Override
@Override
public
int
getLayoutId
()
{
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_server_list
;
return
R
.
layout
.
activity_server_list
_recycle
;
}
}
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
mBind
.
tvTitle
.
setText
(
"任务列表"
);
mBind
.
tvProcess
.
setOnClickListener
(
o
->
{
});
mBind
.
recyclerView
.
setOnItemClickListener
(
new
OnItemClickListener
<
Spu
,
ActivityServerListBinding
>()
{
@Override
public
void
OnItemClick
(
Spu
item
,
ActivityServerListBinding
bind
)
{
ArrayList
<
Spu
>
spus
=
(
ArrayList
<
Spu
>)
mBind
.
recyclerView
.
getDatas
();
ArrayList
<
Spu
>
mUnFinishSpus
=
new
ArrayList
<>();
for
(
Spu
spu
:
spus
)
{
if
(
spu
.
getStatus
()
==
1
)
{
mUnFinishSpus
.
add
(
spu
);
}
}
Intent
intent
;
if
(
item
.
getSopStatus
()
==
1
&&
item
.
getStatus
()==
1
)
{
intent
=
new
Intent
(
mActivity
,
SopWebViewActivity
.
class
);
}
else
{
intent
=
new
Intent
(
mActivity
,
MultiProcessOrderActivity
.
class
);
}
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
Constants
.
ORDER_ID
,
item
.
getId
());
bundle
.
putSerializable
(
OrderConstant
.
SPU
,
item
);
bundle
.
putParcelableArrayList
(
OrderConstant
.
SPUS
,
mUnFinishSpus
);
bundle
.
putInt
(
Constants
.
ORDER_POSTION
,
0
);
intent
.
putExtra
(
Constants
.
BUNDLE
,
bundle
);
startActivity
(
intent
);
}
});
}
@Override
public
void
onResume
()
{
super
.
onResume
();
mPresenter
.
getServerList
();
}
}
}
}
orderCenter/src/main/java/com/dayu/order/ui/activity/SopWebViewActivity.java
View file @
493772ab
...
@@ -13,11 +13,12 @@ import android.webkit.WebView;
...
@@ -13,11 +13,12 @@ import android.webkit.WebView;
import
android.widget.LinearLayout
;
import
android.widget.LinearLayout
;
import
com.dayu.base.ui.activity.DataBindingActivity
;
import
com.dayu.base.ui.activity.DataBindingActivity
;
import
com.dayu.baselibrary.databinding.ActivityWebviewBinding
;
import
com.dayu.common.Constants
;
import
com.dayu.common.Constants
;
import
com.dayu.event.UserInfo
;
import
com.dayu.event.UserInfo
;
import
com.dayu.order.R
;
import
com.dayu.order.R
;
import
com.dayu.order.api.protocol.Spu
;
import
com.dayu.order.common.OrderConstant
;
import
com.dayu.order.common.OrderConstant
;
import
com.dayu.order.databinding.ActivityWebviewBinding
;
import
com.dayu.provider.event.OrderState
;
import
com.dayu.provider.event.OrderState
;
import
com.dayu.utils.ProgressUtil
;
import
com.dayu.utils.ProgressUtil
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.ToastUtils
;
...
@@ -31,6 +32,7 @@ import org.json.JSONException;
...
@@ -31,6 +32,7 @@ import org.json.JSONException;
import
org.json.JSONObject
;
import
org.json.JSONObject
;
import
java.io.File
;
import
java.io.File
;
import
java.util.ArrayList
;
import
static
com
.
dayu
.
order
.
common
.
OrderConstant
.
ORDER_SOP_FINISH
;
import
static
com
.
dayu
.
order
.
common
.
OrderConstant
.
ORDER_SOP_FINISH
;
...
@@ -50,6 +52,9 @@ public class SopWebViewActivity extends DataBindingActivity<ActivityWebviewBindi
...
@@ -50,6 +52,9 @@ public class SopWebViewActivity extends DataBindingActivity<ActivityWebviewBindi
int
RESULT_CODE_FOR_Lollipop
=
1
;
int
RESULT_CODE_FOR_Lollipop
=
1
;
private
BridgeWebView
mWebView
;
private
BridgeWebView
mWebView
;
private
int
mState
;
private
int
mState
;
private
Spu
mSpu
;
private
ArrayList
<
Spu
>
mSpus
;
private
int
mCreatedSource
;
@Override
@Override
public
int
getLayoutId
()
{
public
int
getLayoutId
()
{
...
@@ -64,6 +69,9 @@ public class SopWebViewActivity extends DataBindingActivity<ActivityWebviewBindi
...
@@ -64,6 +69,9 @@ public class SopWebViewActivity extends DataBindingActivity<ActivityWebviewBindi
mOrderId
=
bundle
.
getInt
(
Constants
.
ORDER_ID
,
0
);
mOrderId
=
bundle
.
getInt
(
Constants
.
ORDER_ID
,
0
);
mPositon
=
bundle
.
getInt
(
Constants
.
ORDER_POSTION
,
0
);
mPositon
=
bundle
.
getInt
(
Constants
.
ORDER_POSTION
,
0
);
mState
=
bundle
.
getInt
(
Constants
.
ORDER_STATE
,
0
);
mState
=
bundle
.
getInt
(
Constants
.
ORDER_STATE
,
0
);
mCreatedSource
=
bundle
.
getInt
(
OrderConstant
.
CREATEDSOURCE
,
0
);
mSpu
=
(
Spu
)
bundle
.
getSerializable
(
OrderConstant
.
SPU
);
mSpus
=
bundle
.
getParcelableArrayList
(
OrderConstant
.
SPUS
);
mBind
.
titleBack
.
setOnClickListener
(
o
->
finish
());
mBind
.
titleBack
.
setOnClickListener
(
o
->
finish
());
mWebView
=
new
BridgeWebView
(
mActivity
);
mWebView
=
new
BridgeWebView
(
mActivity
);
mWebView
.
setLayoutParams
(
new
LinearLayout
.
LayoutParams
(
mWebView
.
setLayoutParams
(
new
LinearLayout
.
LayoutParams
(
...
@@ -137,8 +145,15 @@ public class SopWebViewActivity extends DataBindingActivity<ActivityWebviewBindi
...
@@ -137,8 +145,15 @@ public class SopWebViewActivity extends DataBindingActivity<ActivityWebviewBindi
}
}
});
});
ProgressUtil
.
startLoad
(
mActivity
);
ProgressUtil
.
startLoad
(
mActivity
);
if
(
mState
==
OrderConstant
.
ORDER_SOP_FINISH
)
{
if
(
mSpu
!=
null
)
{
mWebView
.
loadUrl
(
Constants
.
MULTI_WEB_SOP
);
}
else
if
(
mState
==
OrderConstant
.
ORDER_SOP_FINISH
)
{
if
(
mCreatedSource
==
4
)
{
mWebView
.
loadUrl
(
Constants
.
CHECK_MULTI_WEB_SOP
);
}
else
{
mWebView
.
loadUrl
(
Constants
.
WEB_SOP_DETAIL
);
mWebView
.
loadUrl
(
Constants
.
WEB_SOP_DETAIL
);
}
}
else
{
}
else
{
mWebView
.
loadUrl
(
Constants
.
WEB_SOP
);
mWebView
.
loadUrl
(
Constants
.
WEB_SOP
);
}
}
...
@@ -158,6 +173,16 @@ public class SopWebViewActivity extends DataBindingActivity<ActivityWebviewBindi
...
@@ -158,6 +173,16 @@ public class SopWebViewActivity extends DataBindingActivity<ActivityWebviewBindi
@Override
@Override
public
void
handler
(
String
data
,
CallBackFunction
function
)
{
public
void
handler
(
String
data
,
CallBackFunction
function
)
{
if
(
"1"
.
equals
(
data
))
{
if
(
"1"
.
equals
(
data
))
{
if
(
mSpu
!=
null
)
{
Intent
intent
=
new
Intent
(
mActivity
,
MultiProcessOrderActivity
.
class
);
Bundle
bundle
=
new
Bundle
();
bundle
.
putSerializable
(
OrderConstant
.
SPU
,
mSpu
);
bundle
.
putParcelableArrayList
(
OrderConstant
.
SPUS
,
mSpus
);
bundle
.
putInt
(
Constants
.
ORDER_POSTION
,
0
);
intent
.
putExtra
(
Constants
.
BUNDLE
,
bundle
);
startActivity
(
intent
);
finish
();
}
else
{
EventBus
.
getDefault
().
post
(
new
OrderState
(
ORDER_SOP_FINISH
,
mPositon
));
EventBus
.
getDefault
().
post
(
new
OrderState
(
ORDER_SOP_FINISH
,
mPositon
));
Intent
intent
=
new
Intent
(
mActivity
,
ProcessOrderActivity
.
class
);
Intent
intent
=
new
Intent
(
mActivity
,
ProcessOrderActivity
.
class
);
Bundle
bundle
=
new
Bundle
();
Bundle
bundle
=
new
Bundle
();
...
@@ -168,6 +193,7 @@ public class SopWebViewActivity extends DataBindingActivity<ActivityWebviewBindi
...
@@ -168,6 +193,7 @@ public class SopWebViewActivity extends DataBindingActivity<ActivityWebviewBindi
finish
();
finish
();
}
}
}
}
}
});
});
...
...
orderCenter/src/main/java/com/dayu/order/ui/activity/WebViewActivity.java
View file @
493772ab
...
@@ -14,10 +14,10 @@ import android.webkit.WebView;
...
@@ -14,10 +14,10 @@ import android.webkit.WebView;
import
android.widget.LinearLayout
;
import
android.widget.LinearLayout
;
import
com.dayu.base.ui.activity.DataBindingActivity
;
import
com.dayu.base.ui.activity.DataBindingActivity
;
import
com.dayu.baselibrary.databinding.ActivityWebviewBinding
;
import
com.dayu.common.Constants
;
import
com.dayu.common.Constants
;
import
com.dayu.event.UserInfo
;
import
com.dayu.event.UserInfo
;
import
com.dayu.order.R
;
import
com.dayu.order.R
;
import
com.dayu.order.databinding.ActivityWebviewBinding
;
import
com.dayu.utils.ProgressUtil
;
import
com.dayu.utils.ProgressUtil
;
import
com.dayu.utils.UserManager
;
import
com.dayu.utils.UserManager
;
import
com.github.lzyzsd.jsbridge.BridgeHandler
;
import
com.github.lzyzsd.jsbridge.BridgeHandler
;
...
...
orderCenter/src/main/java/com/dayu/order/ui/adapter/OrderAdapter.java
View file @
493772ab
...
@@ -48,8 +48,8 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
...
@@ -48,8 +48,8 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
private
Order
mItem
;
private
Order
mItem
;
private
FragmentOrderdoingItemBinding
mBind
;
private
FragmentOrderdoingItemBinding
mBind
;
public
OrderAdapter
(
boolean
needFoot
,
int
viewType
)
{
public
OrderAdapter
(
boolean
needFoot
)
{
super
(
needFoot
,
viewType
);
super
(
needFoot
);
}
}
...
@@ -244,6 +244,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
...
@@ -244,6 +244,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
});
});
}
}
if
(
item
.
getCreatedSource
()
==
4
)
{
if
(
item
.
getCreatedSource
()
==
4
)
{
holder
.
itemTextWeixiu
.
setText
(
item
.
getSpus
().
get
(
0
).
getProviderTypeName
());
holder
.
itemTextWeixiu
.
setText
(
item
.
getSpus
().
get
(
0
).
getProviderTypeName
());
holder
.
itemTextWeixiuLeixing
.
setText
(
item
.
getSpus
().
get
(
0
).
getKaSpuName
());
holder
.
itemTextWeixiuLeixing
.
setText
(
item
.
getSpus
().
get
(
0
).
getKaSpuName
());
Spu
spu
=
item
.
getSpus
().
get
(
0
);
Spu
spu
=
item
.
getSpus
().
get
(
0
);
...
@@ -254,7 +255,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
...
@@ -254,7 +255,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
holder
.
tvServerType
.
setText
(
result
);
holder
.
tvServerType
.
setText
(
result
);
}
else
{
}
else
{
String
str
=
UIUtils
.
getString
(
R
.
string
.
single_server_num
);
String
str
=
UIUtils
.
getString
(
R
.
string
.
single_server_num
);
String
result
=
String
.
format
(
str
,
spu
.
getFinNum
(),
spu
.
get
Fin
Num
());
String
result
=
String
.
format
(
str
,
spu
.
getFinNum
(),
spu
.
get
Good
Num
());
holder
.
tvServerType
.
setText
(
result
);
holder
.
tvServerType
.
setText
(
result
);
}
}
}
else
{
}
else
{
...
@@ -354,13 +355,15 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
...
@@ -354,13 +355,15 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
private
void
dumpServerActivity
(
Order
order
,
int
adapterPosition
)
{
private
void
dumpServerActivity
(
Order
order
,
int
adapterPosition
)
{
Intent
intent
;
Intent
intent
;
Bundle
bundle
=
new
Bundle
();
if
(
order
.
getSpus
().
size
()
>
1
)
{
if
(
order
.
getSpus
().
size
()
>
1
)
{
intent
=
new
Intent
(
mContext
,
ServerInfoActivity
.
class
);
intent
=
new
Intent
(
mContext
,
ServerInfoActivity
.
class
);
intent
.
putExtra
(
Constants
.
ORDER_
ID
,
order
.
getId
());
bundle
.
putInt
(
Constants
.
ID
,
order
.
getId
());
}
else
{
}
else
{
intent
=
new
Intent
(
mContext
,
ServerListActivity
.
class
);
intent
=
new
Intent
(
mContext
,
ServerListActivity
.
class
);
intent
.
putExtra
(
Constants
.
ORDER_ID
,
order
.
getId
());
bundle
.
putInt
(
Constants
.
ID
,
order
.
getSpus
().
get
(
0
)
.
getId
());
}
}
intent
.
putExtra
(
Constants
.
BUNDLE
,
bundle
);
mContext
.
startActivity
(
intent
);
mContext
.
startActivity
(
intent
);
}
}
...
...
orderCenter/src/main/java/com/dayu/order/ui/adapter/OrderServerAdapter.java
View file @
493772ab
...
@@ -17,10 +17,16 @@ import com.dayu.utils.UIUtils;
...
@@ -17,10 +17,16 @@ import com.dayu.utils.UIUtils;
*/
*/
public
class
OrderServerAdapter
extends
CoreAdapter
<
OrderDetail
.
RecordBean
,
ServeDatailsItemBinding
>
{
public
class
OrderServerAdapter
extends
CoreAdapter
<
OrderDetail
.
RecordBean
,
ServeDatailsItemBinding
>
{
private
OrderDetail
mDetail
;
public
OrderServerAdapter
(
boolean
needFoot
)
{
public
OrderServerAdapter
(
boolean
needFoot
)
{
super
(
needFoot
);
super
(
needFoot
);
}
}
public
void
setOrderDetail
(
OrderDetail
detail
)
{
mDetail
=
detail
;
}
@Override
@Override
protected
void
onBind
(
ServeDatailsItemBinding
holder
,
OrderDetail
.
RecordBean
item
,
int
position
)
{
protected
void
onBind
(
ServeDatailsItemBinding
holder
,
OrderDetail
.
RecordBean
item
,
int
position
)
{
super
.
onBind
(
holder
,
item
,
position
);
super
.
onBind
(
holder
,
item
,
position
);
...
@@ -82,10 +88,12 @@ public class OrderServerAdapter extends CoreAdapter<OrderDetail.RecordBean, Serv
...
@@ -82,10 +88,12 @@ public class OrderServerAdapter extends CoreAdapter<OrderDetail.RecordBean, Serv
holder
.
serverCheck
.
setText
(
item
.
getCommentName
());
holder
.
serverCheck
.
setText
(
item
.
getCommentName
());
}
}
}
}
if
(
UIUtils
.
getString
(
R
.
string
.
check_reason
).
equals
(
item
.
getCommentName
()))
{
holder
.
serverCheck
.
setOnClickListener
(
v
->
presenter
.
dumpToSop
());
}
if
(
UIUtils
.
getString
(
R
.
string
.
check_accept
).
equals
(
item
.
getCommentName
())
||
UIUtils
.
getString
(
R
.
string
.
system_chcek
).
equals
(
item
.
getOperation
()))
{
if
(
UIUtils
.
getString
(
R
.
string
.
check_accept
).
equals
(
item
.
getCommentName
())
||
UIUtils
.
getString
(
R
.
string
.
system_chcek
).
equals
(
item
.
getOperation
()))
{
if
(
mDetail
.
getCreatedSource
()
==
4
)
{
holder
.
serverCheck
.
setVisibility
(
View
.
GONE
);
}
else
{
holder
.
serverCheck
.
setVisibility
(
View
.
VISIBLE
);
}
holder
.
serverCheck
.
setOnClickListener
(
v
->
presenter
.
dumpCheckContent
(
position
));
holder
.
serverCheck
.
setOnClickListener
(
v
->
presenter
.
dumpCheckContent
(
position
));
}
}
if
(
UIUtils
.
getString
(
R
.
string
.
order_remark
).
equals
(
item
.
getCommentName
()))
{
if
(
UIUtils
.
getString
(
R
.
string
.
order_remark
).
equals
(
item
.
getCommentName
()))
{
...
@@ -95,7 +103,16 @@ public class OrderServerAdapter extends CoreAdapter<OrderDetail.RecordBean, Serv
...
@@ -95,7 +103,16 @@ public class OrderServerAdapter extends CoreAdapter<OrderDetail.RecordBean, Serv
holder
.
serverCheck
.
setOnClickListener
(
v
->
presenter
.
dumpMap
(
item
.
getLatitude
(),
item
.
getLongitude
(),
item
.
getAddress
()));
holder
.
serverCheck
.
setOnClickListener
(
v
->
presenter
.
dumpMap
(
item
.
getLatitude
(),
item
.
getLongitude
(),
item
.
getAddress
()));
}
}
if
(
UIUtils
.
getString
(
R
.
string
.
check_reason
).
equals
(
item
.
getCommentName
()))
{
if
(
UIUtils
.
getString
(
R
.
string
.
check_reason
).
equals
(
item
.
getCommentName
()))
{
holder
.
serverCheck
.
setOnClickListener
(
v
->
presenter
.
dumpToSop
());
if
(
mDetail
.
getCreatedSource
()
==
4
)
{
if
(
item
.
getCommentInfo
()
!=
null
)
{
holder
.
serverCheck
.
setOnClickListener
(
v
->
presenter
.
dumpToSop
(
Integer
.
parseInt
(
item
.
getCommentInfo
())));
}
}
else
{
holder
.
serverCheck
.
setOnClickListener
(
v
->
presenter
.
dumpToSop
(
0
));
}
}
if
(
UIUtils
.
getString
(
R
.
string
.
part_record
).
equals
(
item
.
getOperation
()))
{
holder
.
serverCheck
.
setOnClickListener
(
v
->
presenter
.
dumpLogistics
(
item
.
getCommentName
(),
item
.
getCommentInfo
()));
}
}
}
}
}
}
orderCenter/src/main/java/com/dayu/order/ui/adapter/ServerInfoAdapter.java
View file @
493772ab
...
@@ -7,6 +7,7 @@ import com.dayu.base.ui.adapter.CoreAdapter;
...
@@ -7,6 +7,7 @@ import com.dayu.base.ui.adapter.CoreAdapter;
import
com.dayu.order.R
;
import
com.dayu.order.R
;
import
com.dayu.order.api.protocol.Spu
;
import
com.dayu.order.api.protocol.Spu
;
import
com.dayu.order.databinding.ItemServerInfoBinding
;
import
com.dayu.order.databinding.ItemServerInfoBinding
;
import
com.dayu.order.presenter.serverinfo.ServerInfoPresenter
;
import
com.dayu.utils.UIUtils
;
import
com.dayu.utils.UIUtils
;
import
com.dayu.utils.UtilsDate
;
import
com.dayu.utils.UtilsDate
;
...
@@ -21,6 +22,7 @@ import static com.dayu.utils.UtilsDate.LONG_TIME_FORMAT_TWO;
...
@@ -21,6 +22,7 @@ import static com.dayu.utils.UtilsDate.LONG_TIME_FORMAT_TWO;
*/
*/
public
class
ServerInfoAdapter
extends
CoreAdapter
<
Spu
,
ItemServerInfoBinding
>
{
public
class
ServerInfoAdapter
extends
CoreAdapter
<
Spu
,
ItemServerInfoBinding
>
{
private
ServerInfoPresenter
mServerPresenter
;
public
ServerInfoAdapter
(
boolean
needFoot
)
{
public
ServerInfoAdapter
(
boolean
needFoot
)
{
super
(
needFoot
);
super
(
needFoot
);
}
}
...
@@ -28,14 +30,19 @@ public class ServerInfoAdapter extends CoreAdapter<Spu, ItemServerInfoBinding> {
...
@@ -28,14 +30,19 @@ public class ServerInfoAdapter extends CoreAdapter<Spu, ItemServerInfoBinding> {
@Override
@Override
protected
void
onBind
(
ItemServerInfoBinding
holder
,
Spu
item
,
int
position
)
{
protected
void
onBind
(
ItemServerInfoBinding
holder
,
Spu
item
,
int
position
)
{
super
.
onBind
(
holder
,
item
,
position
);
super
.
onBind
(
holder
,
item
,
position
);
holder
.
tvRepairType
.
setText
(
item
.
getServiceType
());
mServerPresenter
=
(
ServerInfoPresenter
)
mPresenter
;
holder
.
tvRepairName
.
setText
(
"-"
+
item
.
getProviderTypeName
());
holder
.
tvRepairType
.
setText
(
item
.
getProviderTypeName
());
holder
.
tvRepairName
.
setText
(
"-"
+
item
.
getCategoryThreeName
());
if
(
item
.
getServiceType
()
==
1
)
{
if
(
item
.
getServiceType
()
==
1
)
{
holder
.
tvServerType
.
setText
(
"上门服务"
);
holder
.
tvServerType
.
setText
(
"上门服务"
);
}
}
if
(
TextUtils
.
isEmpty
(
item
.
getKaSpuName
())){
holder
.
tvServerRequest
.
setText
(
"无服务要求"
);
}
else
{
holder
.
tvServerRequest
.
setText
(
item
.
getKaSpuName
());
holder
.
tvServerRequest
.
setText
(
item
.
getKaSpuName
());
}
String
str
=
UIUtils
.
getString
(
R
.
string
.
single_server_num
);
String
str
=
UIUtils
.
getString
(
R
.
string
.
single_server_num
);
String
result
=
String
.
format
(
str
,
item
.
getFinNum
(),
item
.
get
Fin
Num
());
String
result
=
String
.
format
(
str
,
item
.
getFinNum
(),
item
.
get
Good
Num
());
holder
.
tvFinishNum
.
setText
(
result
);
holder
.
tvFinishNum
.
setText
(
result
);
String
time
=
getDatas
().
get
(
0
).
getTime
();
String
time
=
getDatas
().
get
(
0
).
getTime
();
if
(
TextUtils
.
isEmpty
(
time
))
{
if
(
TextUtils
.
isEmpty
(
time
))
{
...
@@ -52,5 +59,11 @@ public class ServerInfoAdapter extends CoreAdapter<Spu, ItemServerInfoBinding> {
...
@@ -52,5 +59,11 @@ public class ServerInfoAdapter extends CoreAdapter<Spu, ItemServerInfoBinding> {
holder
.
itemTime
.
setText
(
dateTime
);
holder
.
itemTime
.
setText
(
dateTime
);
holder
.
itemTime
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemTime
.
setVisibility
(
View
.
VISIBLE
);
}
}
holder
.
processOrder
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
mServerPresenter
.
dumpServerList
(
item
.
getId
());
}
});
}
}
}
}
orderCenter/src/main/java/com/dayu/order/ui/fragment/MultiOrderDetailFragment.java
View file @
493772ab
package
com
.
dayu
.
order
.
ui
.
fragment
;
package
com
.
dayu
.
order
.
ui
.
fragment
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.v7.widget.LinearLayoutManager
;
import
com.dayu.base.ui.adapter.CoreAdapter
;
import
com.dayu.base.ui.fragment.DataBindingFragment
;
import
com.dayu.base.ui.fragment.DataBindingFragment
;
import
com.dayu.common.Constants
;
import
com.dayu.common.Constants
;
import
com.dayu.order.R
;
import
com.dayu.order.R
;
import
com.dayu.order.api.protocol.OrderDetail
;
import
com.dayu.order.api.protocol.OrderDetail
;
import
com.dayu.order.api.protocol.Spu
;
import
com.dayu.order.common.OrderConstant
;
import
com.dayu.order.databinding.FragmentMultiDetailBinding
;
import
com.dayu.order.databinding.FragmentMultiDetailBinding
;
import
com.dayu.order.databinding.FragmentOrderDatailsBinding
;
import
com.dayu.order.databinding.ItemAccessoriesLayoutBinding
;
import
com.dayu.order.databinding.ItemDetailServerInfoBinding
;
import
com.dayu.order.ui.activity.PdfWebViewActivity
;
import
com.dayu.order.ui.activity.ServerInstructionActivity
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.widgets.listener.OnItemClickListener
;
/**
/**
* Created by luofan
* Created by luofan
...
@@ -15,6 +27,11 @@ import com.dayu.order.databinding.FragmentMultiDetailBinding;
...
@@ -15,6 +27,11 @@ import com.dayu.order.databinding.FragmentMultiDetailBinding;
public
class
MultiOrderDetailFragment
extends
DataBindingFragment
<
FragmentMultiDetailBinding
>
{
public
class
MultiOrderDetailFragment
extends
DataBindingFragment
<
FragmentMultiDetailBinding
>
{
private
CoreAdapter
<
Spu
,
ItemDetailServerInfoBinding
>
mServerAdapter
;
private
CoreAdapter
mFujianAdapter
;
private
boolean
mFlag
=
true
;
public
static
MultiOrderDetailFragment
newInstance
(
OrderDetail
detail
)
{
public
static
MultiOrderDetailFragment
newInstance
(
OrderDetail
detail
)
{
Bundle
args
=
new
Bundle
();
Bundle
args
=
new
Bundle
();
args
.
putSerializable
(
Constants
.
ORDER_DETAIL
,
detail
);
args
.
putSerializable
(
Constants
.
ORDER_DETAIL
,
detail
);
...
@@ -26,6 +43,76 @@ public class MultiOrderDetailFragment extends DataBindingFragment<FragmentMultiD
...
@@ -26,6 +43,76 @@ public class MultiOrderDetailFragment extends DataBindingFragment<FragmentMultiD
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
OrderDetail
detail
=
(
OrderDetail
)
getArguments
().
getSerializable
(
Constants
.
ORDER_DETAIL
);
OrderDetail
detail
=
(
OrderDetail
)
getArguments
().
getSerializable
(
Constants
.
ORDER_DETAIL
);
mBind
.
setItem
(
detail
);
mServerAdapter
=
new
CoreAdapter
<>(
false
);
mBind
.
rlServerContent
.
setLayoutManager
(
new
LinearLayoutManager
(
mActivity
));
mServerAdapter
.
setViewType
(
R
.
layout
.
item_detail_server_info
);
mBind
.
rlServerContent
.
setAdapter
(
mServerAdapter
);
mServerAdapter
.
setData
(
detail
.
getSpus
());
mServerAdapter
.
setOnItemClickListener
(
new
OnItemClickListener
<
Spu
,
ItemDetailServerInfoBinding
>()
{
@Override
public
void
OnItemClick
(
Spu
item
,
ItemDetailServerInfoBinding
bind
)
{
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
Constants
.
ID
,
item
.
getKaSpuId
());
Intent
intent
=
new
Intent
(
mActivity
,
ServerInstructionActivity
.
class
);
intent
.
putExtra
(
Constants
.
BUNDLE
,
bundle
);
startActivity
(
intent
);
}
});
mFujianAdapter
=
new
CoreAdapter
<
String
,
FragmentOrderDatailsBinding
>(
false
);
mBind
.
rlFujian
.
setLayoutManager
(
new
LinearLayoutManager
(
mActivity
));
mFujianAdapter
.
setViewType
(
R
.
layout
.
item_accessories_layout
);
mBind
.
rlFujian
.
setAdapter
(
mFujianAdapter
);
mFujianAdapter
.
setData
(
detail
.
getAccessories
());
mFujianAdapter
.
setOnItemClickListener
(
new
OnItemClickListener
<
OrderDetail
.
accessories
,
ItemAccessoriesLayoutBinding
>()
{
@Override
public
void
OnItemClick
(
OrderDetail
.
accessories
item
,
ItemAccessoriesLayoutBinding
bind
)
{
Intent
intent
=
new
Intent
(
mActivity
,
PdfWebViewActivity
.
class
);
intent
.
putExtra
(
Constants
.
PICURL
,
item
.
getUrl
());
intent
.
putExtra
(
OrderConstant
.
TITLE
,
item
.
getName
());
if
(!
item
.
getUrl
().
contains
(
".pdf"
))
{
ToastUtils
.
showShortToast
(
R
.
string
.
error_pdf
);
}
else
{
startActivity
(
intent
);
}
}
});
mBind
.
tvOrderState
.
setText
(
getStaus
(
detail
.
getStatus
()));
mBind
.
tvLookMore
.
setOnClickListener
(
o
->
lookMore
());
}
public
String
getStaus
(
int
staus
)
{
if
(
staus
==
1
)
{
return
mActivity
.
getString
(
R
.
string
.
not_receive_order
);
}
else
if
(
staus
==
2
)
{
return
mActivity
.
getString
(
R
.
string
.
not_appointment_already
);
}
else
if
(
staus
==
3
)
{
return
mActivity
.
getString
(
R
.
string
.
appointment_already
);
}
else
if
(
staus
==
4
)
{
return
mActivity
.
getString
(
R
.
string
.
order_doing
);
}
else
if
(
staus
==
5
)
{
return
mActivity
.
getString
(
R
.
string
.
finish_order
);
}
else
if
(
staus
==
6
)
{
return
mActivity
.
getString
(
R
.
string
.
cancle_order
);
}
else
if
(
staus
==
7
)
{
return
mActivity
.
getString
(
R
.
string
.
order_close
);
}
else
{
return
mActivity
.
getString
(
R
.
string
.
no_data
);
}
}
public
void
lookMore
()
{
if
(
mFlag
)
{
mFlag
=
false
;
mBind
.
tvLookMore
.
setText
(
mActivity
.
getString
(
R
.
string
.
stop
));
mBind
.
orderRemark
.
setMaxLines
(
30
);
}
else
{
mFlag
=
true
;
mBind
.
tvLookMore
.
setText
(
mActivity
.
getString
(
R
.
string
.
look_more
));
mBind
.
orderRemark
.
setMaxLines
(
2
);
}
}
}
@Override
@Override
...
...
orderCenter/src/main/java/com/dayu/order/ui/fragment/OrderDetailsServeFragment.java
View file @
493772ab
...
@@ -17,7 +17,7 @@ import com.umeng.analytics.MobclickAgent;
...
@@ -17,7 +17,7 @@ import com.umeng.analytics.MobclickAgent;
* on 2017/9/13.
* on 2017/9/13.
*/
*/
public
class
OrderDetailsServeFragment
extends
BaseFragment
<
OrderServerPresenter
,
FragmentOrderServeBinding
>
implements
OrderServerContract
.
View
{
public
class
OrderDetailsServeFragment
extends
BaseFragment
<
OrderServerPresenter
,
FragmentOrderServeBinding
>
implements
OrderServerContract
.
View
{
private
static
final
String
TAG
=
"OrderDetailsServeFragme"
;
private
static
final
String
TAG
=
"OrderDetailsServeFragme"
;
public
static
OrderDetailsServeFragment
newInstance
(
OrderDetail
detail
)
{
public
static
OrderDetailsServeFragment
newInstance
(
OrderDetail
detail
)
{
...
@@ -41,6 +41,7 @@ public class OrderDetailsServeFragment extends BaseFragment<OrderServerPresenter
...
@@ -41,6 +41,7 @@ public class OrderDetailsServeFragment extends BaseFragment<OrderServerPresenter
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
OrderServerAdapter
adapter
=
new
OrderServerAdapter
(
false
);
OrderServerAdapter
adapter
=
new
OrderServerAdapter
(
false
);
adapter
.
setOrderDetail
(
mPresenter
.
getDetail
());
mBind
.
recyclerView
.
setAdapter
(
adapter
);
mBind
.
recyclerView
.
setAdapter
(
adapter
);
}
}
...
...
orderCenter/src/main/java/com/dayu/order/ui/fragment/OrderFirstTabFragment.java
View file @
493772ab
...
@@ -33,7 +33,8 @@ public class OrderFirstTabFragment extends BaseFragment<OrderDoingPresenter, Fra
...
@@ -33,7 +33,8 @@ public class OrderFirstTabFragment extends BaseFragment<OrderDoingPresenter, Fra
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
mAdapter
=
new
OrderAdapter
(
true
,
R
.
layout
.
fragment_orderdoing_item
);
mAdapter
=
new
OrderAdapter
(
true
);
mAdapter
.
setViewType
(
R
.
layout
.
fragment_orderdoing_item
);
mBind
.
recyclerView
.
setAdapter
(
mAdapter
);
mBind
.
recyclerView
.
setAdapter
(
mAdapter
);
mPresenter
.
refresh
();
mPresenter
.
refresh
();
EventBus
.
getDefault
().
register
(
this
);
EventBus
.
getDefault
().
register
(
this
);
...
...
orderCenter/src/main/java/com/dayu/order/ui/fragment/OrderSecondTabFragment.java
View file @
493772ab
...
@@ -51,7 +51,8 @@ public class OrderSecondTabFragment extends BaseFragment<OrderDoingPresenter, Fr
...
@@ -51,7 +51,8 @@ public class OrderSecondTabFragment extends BaseFragment<OrderDoingPresenter, Fr
@Override
@Override
public
void
initView
()
{
public
void
initView
()
{
EventBus
.
getDefault
().
register
(
this
);
EventBus
.
getDefault
().
register
(
this
);
mAdapter
=
new
OrderAdapter
(
true
,
R
.
layout
.
fragment_orderdoing_item
);
mAdapter
=
new
OrderAdapter
(
true
);
mAdapter
.
setViewType
(
R
.
layout
.
fragment_orderdoing_item
);
mAdapter
.
initPresenter
(
mPresenter
);
mAdapter
.
initPresenter
(
mPresenter
);
mBind
.
recyclerView
.
setAdapter
(
mAdapter
);
mBind
.
recyclerView
.
setAdapter
(
mAdapter
);
mBind
.
recyclerView
.
setOnItemClickListener
(
new
OnItemClickListener
<
Order
,
FragmentOrderdoingItemBinding
>()
{
mBind
.
recyclerView
.
setOnItemClickListener
(
new
OnItemClickListener
<
Order
,
FragmentOrderdoingItemBinding
>()
{
...
...
orderCenter/src/main/release/AndroidManifest.xml
View file @
493772ab
...
@@ -67,5 +67,9 @@
...
@@ -67,5 +67,9 @@
<activity
<activity
android:name=
".ui.activity.MultipleProcessActivity"
android:name=
".ui.activity.MultipleProcessActivity"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activity.MultiProcessOrderActivity"
android:windowSoftInputMode=
"stateVisible|adjustResize"
android:screenOrientation=
"portrait"
/>
</application>
</application>
</manifest>
</manifest>
orderCenter/src/main/res/layout/activity_check_content.xml
View file @
493772ab
...
@@ -18,8 +18,7 @@
...
@@ -18,8 +18,7 @@
<ImageView
<ImageView
android:id=
"@+id/tv_back"
android:id=
"@+id/tv_back"
style=
"@style/title_image_back"
style=
"@style/title_image_back"
/>
/>
<ImageView
<ImageView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -66,7 +65,7 @@
...
@@ -66,7 +65,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_product_title"
android:layout_below=
"@+id/tv_product_title"
android:layout_marginBottom=
"
@dimen/dp_162
"
>
android:layout_marginBottom=
"
10dp
"
>
<RelativeLayout
<RelativeLayout
android:id=
"@+id/rl_product"
android:id=
"@+id/rl_product"
...
@@ -278,8 +277,8 @@
...
@@ -278,8 +277,8 @@
android:layout_marginRight=
"@dimen/dp_15"
android:layout_marginRight=
"@dimen/dp_15"
android:layout_marginTop=
"@dimen/dp_8"
android:layout_marginTop=
"@dimen/dp_8"
android:text=
"@string/order_select_payer_notice"
android:text=
"@string/order_select_payer_notice"
android:
visibility=
"gone
"
android:
textColor=
"#F74848
"
android:
textColor=
"#F74848
"
/>
android:
visibility=
"gone
"
/>
<ImageView
<ImageView
android:id=
"@+id/line_notice"
android:id=
"@+id/line_notice"
...
@@ -291,25 +290,25 @@
...
@@ -291,25 +290,25 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/line_notice"
android:layout_below=
"@id/line_notice"
android:layout_marginTop=
"@dimen/dp_27"
android:layout_marginBottom=
"@dimen/dp_18"
android:layout_marginBottom=
"@dimen/dp_18"
android:layout_marginTop=
"@dimen/dp_27"
android:background=
"@color/cl_white"
android:background=
"@color/cl_white"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<TextView
<TextView
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_15"
android:text=
"@string/order_payer_prove"
android:text=
"@string/order_payer_prove"
android:textColor=
"@color/default_text_color"
android:textColor=
"@color/default_text_color"
android:layout_marginLeft=
"@dimen/dp_15"
android:textSize=
"15sp"
/>
android:textSize=
"15sp"
/>
<TextView
<TextView
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_15"
android:layout_marginTop=
"8dp"
android:layout_marginTop=
"8dp"
android:text=
"@string/order_payer_prove_notice"
android:text=
"@string/order_payer_prove_notice"
android:layout_marginLeft=
"@dimen/dp_15"
android:textColor=
"@color/default_text_color"
android:textColor=
"@color/default_text_color"
android:textSize=
"12sp"
/>
android:textSize=
"12sp"
/>
...
@@ -465,8 +464,8 @@
...
@@ -465,8 +464,8 @@
android:layout_alignParentRight=
"true"
android:layout_alignParentRight=
"true"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:background=
"@null"
android:background=
"@null"
android:text=
"暂无"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"暂无"
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
android:textColorHint=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_13.3"
/>
android:textSize=
"@dimen/sp_13.3"
/>
...
@@ -509,8 +508,8 @@
...
@@ -509,8 +508,8 @@
android:layout_alignParentRight=
"true"
android:layout_alignParentRight=
"true"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:background=
"@null"
android:background=
"@null"
android:text=
"暂无数据"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"暂无数据"
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
android:textColorHint=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_13.3"
/>
android:textSize=
"@dimen/sp_13.3"
/>
...
@@ -553,8 +552,8 @@
...
@@ -553,8 +552,8 @@
android:layout_alignParentRight=
"true"
android:layout_alignParentRight=
"true"
android:layout_centerHorizontal=
"true"
android:layout_centerHorizontal=
"true"
android:background=
"@null"
android:background=
"@null"
android:text=
"暂无"
android:gravity=
"center"
android:gravity=
"center"
android:text=
"暂无"
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
android:textColorHint=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_13.3"
/>
android:textSize=
"@dimen/sp_13.3"
/>
...
...
orderCenter/src/main/res/layout/activity_multi_process_order.xml
0 → 100755
View file @
493772ab
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<data>
<import
type=
"android.view.View"
/>
<variable
name=
"presenter"
type=
"com.dayu.order.presenter.multiprocessorder.MultiProcessOrderPresenter"
/>
</data>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/cl_home_listview_bg"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/title_finish"
style=
"@style/title"
>
<TextView
style=
"@style/text_title"
android:text=
"@string/process_order"
/>
<ImageView
android:id=
"@+id/tv_back"
style=
"@style/title_image_back"
android:onClick=
"@{()->presenter.dumpBack()}"
/>
<ImageView
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_6"
android:layout_alignParentBottom=
"true"
android:src=
"@drawable/line_shape"
/>
</RelativeLayout>
<TextView
android:id=
"@+id/tv_modify_sop"
android:layout_width=
"match_parent"
android:layout_height=
"26.7dp"
android:layout_below=
"@id/title_finish"
android:background=
"@color/cl_receiving_order_item_data"
android:gravity=
"center"
android:onClick=
"@{()->presenter.dumpToSop()}"
android:text=
"@string/sop_finish"
android:textColor=
"@color/cl_white"
android:textSize=
"13.3sp"
android:visibility=
"@{presenter.mDetail.sopStatus == 1?View.VISIBLE:View.GONE}"
/>
<ScrollView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tv_modify_sop"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/cl_white"
android:layout_marginBottom=
"@dimen/dp_15"
>
<TextView
android:id=
"@+id/tv_product_title"
android:layout_width=
"match_parent"
android:layout_height=
"43dp"
android:background=
"@color/tv_bg"
android:paddingLeft=
"@dimen/dp_15"
android:paddingTop=
"18dp"
android:text=
"产品信息"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_product_title"
>
<RelativeLayout
android:id=
"@+id/rl_product"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_54"
android:layout_alignParentLeft=
"true"
android:layout_alignParentStart=
"true"
android:layout_alignParentTop=
"true"
android:background=
"@color/cl_white"
>
<TextView
android:id=
"@+id/text_one_text"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/dp_13"
android:text=
"@string/order_pm"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/sp_15"
/>
<TextView
android:id=
"@+id/tv_product"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_alignBaseline=
"@+id/text_one_text"
android:layout_alignBottom=
"@+id/text_one_text"
android:layout_marginLeft=
"90dp"
android:layout_toEndOf=
"@+id/text_one_text"
android:layout_toRightOf=
"@+id/text_one_text"
android:hint=
"请输入产品名称"
android:text=
"@{presenter.mDetail.categoryThreeName??@string/now_no}"
android:textColor=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_15"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/image_lin"
style=
"@style/line"
android:layout_below=
"@id/rl_product"
/>
<RelativeLayout
android:id=
"@+id/text_two"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_54"
android:layout_below=
"@id/image_lin"
android:background=
"@color/cl_white"
>
<TextView
android:id=
"@+id/text_two_text"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/dp_13"
android:text=
"@string/order_pinpai"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/sp_15"
/>
<EditText
android:id=
"@+id/tv_brand"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"90dp"
android:layout_toRightOf=
"@id/text_two_text"
android:hint=
"@string/order_brand_name"
android:text=
"@={presenter.mBrandName}"
android:background=
"@null"
android:textColor=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_15"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/line_brand"
style=
"@style/line"
android:layout_below=
"@id/text_two"
/>
<RelativeLayout
android:id=
"@+id/rl_verion"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_54"
android:layout_below=
"@id/line_brand"
android:background=
"@color/cl_white"
>
<TextView
android:id=
"@+id/tv_version"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/dp_13"
android:text=
"@string/order_product_model"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/sp_15"
/>
<TextView
android:id=
"@+id/et_version"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"90dp"
android:layout_toRightOf=
"@id/tv_version"
android:hint=
"@string/order_product_model_hint"
android:text=
"@{presenter.mDetail.productModel??@string/now_no}"
android:textColor=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_15"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/line_version"
style=
"@style/line"
android:layout_below=
"@id/rl_verion"
/>
<RelativeLayout
android:id=
"@+id/rl_serial_num"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_54"
android:layout_below=
"@id/line_version"
android:background=
"@color/cl_white"
>
<TextView
android:id=
"@+id/tv_serial_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/dp_13"
android:text=
"@string/order_serail"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/sp_15"
/>
<EditText
android:id=
"@+id/et_serial_num"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"75dp"
android:layout_toRightOf=
"@id/tv_serial_num"
android:hint=
"@string/order_serail_hint"
android:text=
"@={presenter.mSn}"
android:background=
"@null"
android:textColor=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_15"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/line_serial"
style=
"@style/line"
android:layout_below=
"@id/rl_serial_num"
/>
<TextView
android:id=
"@+id/tv_server_info"
android:layout_width=
"match_parent"
android:layout_height=
"43dp"
android:layout_below=
"@+id/line_serial"
android:background=
"@color/tv_bg"
android:paddingLeft=
"@dimen/dp_15"
android:paddingTop=
"18dp"
android:text=
"@string/server_info"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
<RelativeLayout
android:id=
"@+id/time_Three"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_183"
android:layout_alignParentLeft=
"true"
android:layout_alignParentStart=
"true"
android:layout_below=
"@+id/tv_server_info"
android:background=
"@color/cl_white"
>
<TextView
android:id=
"@+id/time_subscribe_remark"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_13.3"
android:layout_marginTop=
"@dimen/dp_27"
android:text=
"@string/tv_work_order_five"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/sp_15"
/>
<EditText
android:id=
"@+id/et_serve_info"
android:layout_width=
"@dimen/dp_267"
android:layout_height=
"@dimen/dp_147"
android:layout_marginLeft=
"@dimen/dp_8"
android:layout_marginTop=
"@dimen/dp_17"
android:layout_toRightOf=
"@id/time_subscribe_remark"
android:background=
"@drawable/subscribe_time_shape"
android:gravity=
"top"
android:hint=
"@string/order_hint"
android:paddingLeft=
"@dimen/dp_13"
android:paddingTop=
"@dimen/dp_11"
android:text=
"@={presenter.mInfo}"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_13.3"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/image_seven_lin"
style=
"@style/line"
android:layout_below=
"@id/time_Three"
/>
<RelativeLayout
android:id=
"@+id/photo_view"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_125"
android:layout_below=
"@id/time_Three"
android:layout_marginTop=
"@dimen/dp_20"
>
<TextView
android:id=
"@+id/photo_text_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_13"
android:layout_marginTop=
"@dimen/dp_17"
android:text=
"@string/order_photo_text"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/sp_15"
/>
<LinearLayout
android:id=
"@+id/ll_image"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@id/photo_text_title"
android:layout_marginLeft=
"@dimen/dp_13"
android:layout_marginTop=
"@dimen/dp_10"
android:orientation=
"horizontal"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/image_eight_lin"
style=
"@style/line"
android:layout_below=
"@id/photo_view"
/>
<TextView
android:id=
"@+id/tv_process"
android:layout_width=
"match_parent"
android:layout_height=
"47dp"
android:layout_alignParentBottom=
"true"
android:layout_alignParentRight=
"true"
android:layout_below=
"@id/image_eight_lin"
android:layout_marginLeft=
"@dimen/dp_15"
android:layout_marginRight=
"@dimen/dp_15"
android:layout_marginTop=
"@dimen/dp_10"
android:background=
'@drawable/icon_next_button'
android:gravity=
"center"
android:onClick=
"@{()->presenter.commitPhoto()}"
android:text=
'@{presenter.mSpuState?"提交验收并处理下一个":"提交验收"}'
android:textColor=
"@color/white"
/>
</RelativeLayout>
</RelativeLayout>
</ScrollView>
<LinearLayout
android:id=
"@+id/ll_server_instruction"
android:layout_width=
"60dp"
android:layout_height=
"60dp"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"10dp"
android:background=
"@drawable/tab_blue_react"
android:gravity=
"center"
android:onClick=
"@{()->presenter.dumpToServerInstruction()}"
android:orientation=
"vertical"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/icon_order_server"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"4dp"
android:text=
"@string/order_instruction"
android:textColor=
"@color/white"
android:textSize=
"12sp"
/>
</LinearLayout>
</RelativeLayout>
</layout>
\ No newline at end of file
orderCenter/src/main/res/layout/activity_multiple_process.xml
View file @
493772ab
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<data>
<data>
<variable
name=
"presenter"
type=
"com.dayu.order.presenter.multipleprocess.MultipleProcessPresenter"
/>
</data>
</data>
<LinearLayout
<LinearLayout
...
@@ -10,298 +14,48 @@
...
@@ -10,298 +14,48 @@
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<LinearLayout
<RelativeLayout
android:layout_width=
"match_parent"
android:id=
"@+id/title_back"
android:layout_height=
"0dp"
style=
"@style/title"
>
android:layout_weight=
"1"
android:orientation=
"vertical"
>
<TextView
<TextView
android:layout_width=
"match_parent"
android:id=
"@+id/tv_title"
android:layout_height=
"43dp"
style=
"@style/text_title"
/>
android:paddingTop=
"@dimen/dp_17"
android:text=
"工单概况"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
<com.dayu.widgets.LRecyclerView
android:id=
"@+id/recyclerView"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<TextView
<ImageView
android:layout_width=
"match_parent"
android:id=
"@+id/receiving_back"
android:layout_height=
"43dp"
style=
"@style/title_image_back"
android:paddingLeft=
"@dimen/dp_15"
android:onClick=
"@{()->presenter.dumpBack()}"
android:paddingTop=
"@dimen/dp_17"
android:text=
"费用承担方"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
<LinearLayout
/>
android:layout_width=
"match_parent"
</RelativeLayout>
android:layout_height=
"51dp"
android:background=
"@color/white"
android:orientation=
"horizontal"
>
<TextView
<ImageView
style=
"@style/card_line"
/>
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_weight=
"1"
android:paddingLeft=
"@dimen/dp_15"
android:text=
"费用承担方"
android:textColor=
"@color/default_text_color"
android:textSize=
"@dimen/sp_15"
/>
<TextView
android:id=
"@+id/tv_repair_type"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:paddingRight=
"@dimen/dp_15"
android:text=
"保内"
android:textColor=
"@color/default_text_color"
android:textSize=
"@dimen/sp_15"
/>
</LinearLayout>
<TextView
<TextView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"43dp"
android:layout_height=
"43dp"
android:paddingLeft=
"@dimen/dp_15
"
android:layout_marginLeft=
"15dp
"
android:paddingTop=
"@dimen/dp_17"
android:paddingTop=
"@dimen/dp_17"
android:text=
"收取费用
"
android:text=
"工单概况
"
android:textColor=
"@color/tv_cl"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"51dp"
android:background=
"@color/white"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_weight=
"1"
android:paddingLeft=
"@dimen/dp_15"
android:text=
"收取客户费用"
android:textColor=
"@color/default_text_color"
android:textSize=
"@dimen/sp_15"
/>
<com.dayu.widgets.SwitchImage
android:id=
"@+id/iv_switch"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:paddingRight=
"@dimen/dp_15"
android:src=
"@drawable/set_switch_off"
/>
</LinearLayout>
<ImageView
android:id=
"@+id/image_nine_lin"
style=
"@style/line"
/>
<RelativeLayout
<RelativeLayout
android:id=
"@+id/rl_pay"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
>
android:visibility=
"gone"
>
<RelativeLayout
<com.dayu.widgets.LRecyclerView
android:id=
"@+id/up_door"
android:id=
"@+id/recyclerView"
android:layout_width=
"match_parent"
setPresenter=
"@{presenter}"
android:layout_height=
"@dimen/dp_54"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/dp_13"
android:text=
"@string/tv_order_updoor_feiyong"
android:textColor=
"@color/cl_tab_line"
android:textSize=
"@dimen/sp_13.3"
/>
<EditText
android:id=
"@+id/et_door_price"
android:layout_width=
"@dimen/dp_205"
android:layout_height=
"match_parent"
android:layout_alignParentRight=
"true"
android:layout_centerHorizontal=
"true"
android:background=
"@null"
android:hint=
"@string/input_up_door_money"
android:inputType=
"number"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_13.3"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"@dimen/dp_13"
android:text=
"@string/tv_order_yuan"
android:textColor=
"@color/cl_tab_line"
android:textSize=
"@dimen/sp_13.3"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/image_two_one_lin"
style=
"@style/line"
android:layout_below=
"@id/up_door"
/>
<RelativeLayout
android:id=
"@+id/up_serve"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_54"
android:layout_below=
"@id/up_door"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/dp_13"
android:text=
"@string/tv_order_serve_feiyong"
android:textColor=
"@color/cl_tab_line"
android:textSize=
"@dimen/sp_13.3"
/>
<EditText
android:id=
"@+id/et_serve_price"
android:layout_width=
"@dimen/dp_205"
android:layout_height=
"match_parent"
android:layout_alignParentRight=
"true"
android:layout_centerHorizontal=
"true"
android:background=
"@null"
android:hint=
"@string/input_up_money"
android:inputType=
"number"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_13.3"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"@dimen/dp_13"
android:text=
"@string/tv_order_yuan"
android:textColor=
"@color/cl_tab_line"
android:textSize=
"@dimen/sp_13.3"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/image_two_two_lin"
style=
"@style/line"
android:layout_below=
"@id/up_serve"
/>
<RelativeLayout
android:id=
"@+id/up_materials"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_54"
android:layout_below=
"@id/up_serve"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/dp_13"
android:text=
"@string/tv_order_cailiao_feiyong"
android:textColor=
"@color/cl_tab_line"
android:textSize=
"@dimen/sp_13.3"
/>
<EditText
android:id=
"@+id/et_materials_price"
android:layout_width=
"@dimen/dp_205"
android:layout_height=
"match_parent"
android:layout_alignParentRight=
"true"
android:layout_centerHorizontal=
"true"
android:background=
"@null"
android:hint=
"@string/input_cailiao_money"
android:inputType=
"number"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_13.3"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"@dimen/dp_13"
android:text=
"@string/tv_order_yuan"
android:textColor=
"@color/cl_tab_line"
android:textSize=
"@dimen/sp_13.3"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/image_two_three_lin"
style=
"@style/line"
android:layout_below=
"@id/up_materials"
/>
<RelativeLayout
android:id=
"@+id/up_other"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_54"
android:layout_below=
"@id/up_materials"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/dp_13"
android:text=
"@string/tv_order_other_feiyong"
android:textColor=
"@color/cl_tab_line"
android:textSize=
"@dimen/sp_13.3"
/>
<EditText
android:id=
"@+id/et_other_price"
android:layout_width=
"@dimen/dp_205"
android:layout_height=
"match_parent"
android:layout_alignParentRight=
"true"
android:layout_centerHorizontal=
"true"
android:background=
"@null"
android:hint=
"@string/input_other_money"
android:inputType=
"number"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_13.3"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_marginBottom=
"50dp"
android:layout_centerVertical=
"true"
app:footType=
"@layout/item_multi_process_foot"
android:layout_marginRight=
"@dimen/dp_13"
app:isRefreshable=
"false"
android:text=
"@string/tv_order_yuan"
app:itemType=
"@layout/item_multi_process_order"
android:textColor=
"@color/cl_tab_line"
app:needCoreAdapter=
"true"
android:textSize=
"@dimen/sp_13.3"
/>
app:needFoot=
"false"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/image_two_four_lin"
style=
"@style/line"
android:layout_below=
"@id/up_other"
/>
<EditText
android:id=
"@+id/et_door_info"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_163"
android:layout_below=
"@id/up_other"
android:layout_centerHorizontal=
"true"
android:layout_marginLeft=
"@dimen/dp_13.3"
android:layout_marginRight=
"@dimen/dp_13.3"
android:layout_marginTop=
"@dimen/dp_17"
android:background=
"@drawable/subscribe_time_shape"
android:gravity=
"top"
android:hint=
"@string/tv_order_other"
android:paddingTop=
"@dimen/dp_11"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_13.3"
/>
</RelativeLayout>
</LinearLayout>
<TextView
<TextView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -309,7 +63,11 @@
...
@@ -309,7 +63,11 @@
android:layout_alignParentBottom=
"true"
android:layout_alignParentBottom=
"true"
android:background=
"@color/bg_button"
android:background=
"@color/bg_button"
android:gravity=
"center"
android:gravity=
"center"
android:onClick=
"@{()->presenter.processOrder()}"
android:text=
"提交验收"
android:text=
"提交验收"
android:textColor=
"@color/white"
/>
android:textColor=
"@color/white"
/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</layout>
</layout>
\ No newline at end of file
orderCenter/src/main/res/layout/activity_process_order.xml
View file @
493772ab
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_product_title"
android:layout_below=
"@+id/tv_product_title"
android:layout_marginBottom=
"
@dimen/dp_162
"
>
android:layout_marginBottom=
"
10dp
"
>
<RelativeLayout
<RelativeLayout
android:id=
"@+id/rl_product"
android:id=
"@+id/rl_product"
...
@@ -275,8 +275,8 @@
...
@@ -275,8 +275,8 @@
android:layout_toRightOf=
"@id/tv_player"
android:layout_toRightOf=
"@id/tv_player"
android:background=
"@null"
android:background=
"@null"
android:hint=
"@string/order_select_payer"
android:hint=
"@string/order_select_payer"
android:text=
"@{presenter.mPayer}"
android:onClick=
"@{()->presenter.showPayerDialog()}"
android:onClick=
"@{()->presenter.showPayerDialog()}"
android:text=
"@{presenter.mPayer}"
android:textColor=
"@color/cl_selector_hui"
android:textColor=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_15"
/>
android:textSize=
"@dimen/sp_15"
/>
...
@@ -317,25 +317,25 @@
...
@@ -317,25 +317,25 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/line_notice"
android:layout_below=
"@id/line_notice"
android:layout_marginTop=
"@dimen/dp_27"
android:layout_marginBottom=
"@dimen/dp_18"
android:layout_marginBottom=
"@dimen/dp_18"
android:layout_marginTop=
"@dimen/dp_27"
android:background=
"@color/cl_white"
android:background=
"@color/cl_white"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<TextView
<TextView
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_15"
android:text=
"@string/order_payer_prove"
android:text=
"@string/order_payer_prove"
android:textColor=
"@color/default_text_color"
android:textColor=
"@color/default_text_color"
android:layout_marginLeft=
"@dimen/dp_15"
android:textSize=
"15sp"
/>
android:textSize=
"15sp"
/>
<TextView
<TextView
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_15"
android:layout_marginTop=
"8dp"
android:layout_marginTop=
"8dp"
android:text=
"@string/order_payer_prove_notice"
android:text=
"@string/order_payer_prove_notice"
android:layout_marginLeft=
"@dimen/dp_15"
android:textColor=
"@color/default_text_color"
android:textColor=
"@color/default_text_color"
android:textSize=
"12sp"
/>
android:textSize=
"12sp"
/>
...
...
orderCenter/src/main/res/layout/activity_server_info.xml
View file @
493772ab
...
@@ -13,21 +13,46 @@
...
@@ -13,21 +13,46 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
>
<RelativeLayout
android:id=
"@+id/title_back"
style=
"@style/title"
>
<TextView
android:id=
"@+id/tv_title"
style=
"@style/text_title"
/>
<ImageView
android:id=
"@+id/receiving_back"
style=
"@style/title_image_back"
android:onClick=
"@{()->presenter.dumpBack()}"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/line"
style=
"@style/card_line"
android:layout_below=
"@+id/title_back"
/>
<com.dayu.widgets.LRecyclerView
<com.dayu.widgets.LRecyclerView
android:id=
"@+id/recyclerView"
android:id=
"@+id/recyclerView"
setPresenter=
"@{presenter}"
setPresenter=
"@{presenter}"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@+id/line"
android:layout_marginBottom=
"@dimen/dp_50"
android:layout_marginLeft=
"@dimen/dp_15"
android:layout_marginLeft=
"@dimen/dp_15"
android:layout_marginRight=
"@dimen/dp_15"
android:layout_marginRight=
"@dimen/dp_15"
app:headType=
"@layout/recycler_server_info_header"
app:headType=
"@layout/recycler_server_info_header"
app:itemType=
"@layout/item_server_info"
/>
app:itemType=
"@layout/item_server_info"
/>
<TextView
<TextView
android:id=
"@+id/tv_process"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"49dp"
android:layout_height=
"49dp"
android:layout_alignParentBottom=
"true"
android:layout_alignParentBottom=
"true"
android:background=
"@color/bg_button"
android:background=
'@{presenter.mCanProcess==2?@color/bg_button:@color/cl_selector_hui}'
android:clickable=
'@{presenter.mCanProcess==2?true:false}'
android:gravity=
"center"
android:gravity=
"center"
android:text=
"提交验收"
android:text=
"提交验收"
android:textColor=
"@color/white"
/>
android:textColor=
"@color/white"
/>
...
...
orderCenter/src/main/res/layout/activity_server_list.xml
View file @
493772ab
...
@@ -2,9 +2,10 @@
...
@@ -2,9 +2,10 @@
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<data>
<data>
<variable
<variable
name=
"item"
name=
"item"
type=
"com.dayu.order.api.protocol.Spu"
/>
type=
"com.dayu.order.api.protocol.Spu"
/>
</data>
</data>
...
@@ -14,6 +15,7 @@
...
@@ -14,6 +15,7 @@
android:layout_marginLeft=
"10dp"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_marginRight=
"10dp"
android:background=
"@color/white"
android:background=
"@color/white"
android:layout_marginBottom=
"10dp"
android:paddingLeft=
"@dimen/dp_15"
>
android:paddingLeft=
"@dimen/dp_15"
>
<TextView
<TextView
...
@@ -24,7 +26,7 @@
...
@@ -24,7 +26,7 @@
android:layout_alignParentStart=
"true"
android:layout_alignParentStart=
"true"
android:layout_alignParentTop=
"true"
android:layout_alignParentTop=
"true"
android:layout_marginTop=
"@dimen/dp_20"
android:layout_marginTop=
"@dimen/dp_20"
android:text=
"@{item.serviceType}"
android:text=
'@{item.providerTypeName}'
android:textColor=
"@color/default_text_color"
android:textColor=
"@color/default_text_color"
android:textSize=
"16sp"
/>
android:textSize=
"16sp"
/>
...
@@ -34,7 +36,7 @@
...
@@ -34,7 +36,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_20"
android:layout_marginTop=
"@dimen/dp_20"
android:layout_toRightOf=
"@+id/tv_repair_type"
android:layout_toRightOf=
"@+id/tv_repair_type"
android:text=
'@{"-"+item.
providerTyp
eName}'
android:text=
'@{"-"+item.
categoryThre
eName}'
android:textColor=
"@color/default_text_color"
android:textColor=
"@color/default_text_color"
android:textSize=
"16sp"
/>
android:textSize=
"16sp"
/>
...
@@ -52,7 +54,7 @@
...
@@ -52,7 +54,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_centerVertical=
"true"
android:layout_toLeftOf=
"@+id/iv_arrow"
android:layout_toLeftOf=
"@+id/iv_arrow"
android:text=
"已完成"
android:text=
'@{item.status==1?"处理":"已完成"}'
android:textColor=
"@color/bg_button"
android:textColor=
"@color/bg_button"
android:textSize=
"@dimen/sp_14"
/>
android:textSize=
"@dimen/sp_14"
/>
...
...
orderCenter/src/main/res/layout/activity_server_list_recycle.xml
0 → 100755
View file @
493772ab
<?xml version="1.0" encoding="utf-8"?>
<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.serverlist.ServerListPresenter"
/>
<import
type=
"android.view.View"
/>
</data>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/title_back"
style=
"@style/title"
>
<TextView
android:id=
"@+id/tv_title"
style=
"@style/text_title"
/>
<ImageView
android:id=
"@+id/receiving_back"
style=
"@style/title_image_back"
android:onClick=
"@{()->presenter.dumpBack()}"
/>
</RelativeLayout>
<ImageView
style=
"@style/card_line"
/>
<com.dayu.widgets.LRecyclerView
android:id=
"@+id/recyclerView"
setPresenter=
"@{presenter}"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#f5f5f5"
app:itemType=
"@layout/activity_server_list"
app:needCoreAdapter=
"true"
app:needFoot=
"false"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_process"
android:layout_width=
"match_parent"
android:layout_height=
"49dp"
android:layout_alignParentBottom=
"true"
android:background=
'@{presenter.mCanProcess?@color/bg_button:@color/cl_selector_hui}'
android:clickable=
'@{presenter.mCanProcess?true:true}'
android:gravity=
"center"
android:text=
"提交验收"
android:textColor=
"@color/white"
android:visibility=
"@{presenter.mIsShowProcess?View.VISIBLE:View.GONE}"
/>
</RelativeLayout>
</layout>
\ No newline at end of file
orderCenter/src/main/res/layout/fragment_multi_detail.xml
View file @
493772ab
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<data>
<data>
</data>
<import
type=
"android.view.View"
/>
<import
type=
"android.text.TextUtils"
/>
<variable
name=
"item"
type=
"com.dayu.order.api.protocol.OrderDetail"
/>
</data>
<android.support.v4.widget.NestedScrollView
<android.support.v4.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -34,6 +41,7 @@
...
@@ -34,6 +41,7 @@
android:id=
"@+id/tv_num"
android:id=
"@+id/tv_num"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_15"
android:text=
"工单编号:"
android:text=
"工单编号:"
android:textColor=
"@color/tv_cl"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
...
@@ -43,8 +51,9 @@
...
@@ -43,8 +51,9 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"19dp"
android:layout_marginLeft=
"19dp"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_toRightOf=
"@+id/tv_num"
android:layout_toRightOf=
"@+id/tv_num"
android:text=
"123456789"
android:text=
'@{!TextUtils.isEmpty(item.orderNum)?item.orderNum:@string/no_data,default = @string/no_data}'
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
...
@@ -65,9 +74,9 @@
...
@@ -65,9 +74,9 @@
android:layout_below=
"@+id/tv_num"
android:layout_below=
"@+id/tv_num"
android:layout_marginLeft=
"19dp"
android:layout_marginLeft=
"19dp"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_toRightOf=
"@+id/tv_
num
"
android:layout_toRightOf=
"@+id/tv_
state
"
android:text=
"进行中"
android:text=
"进行中"
android:textColor=
"@color/cl_
home_title_text_color
"
android:textColor=
"@color/cl_
tab_read
"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
<TextView
<TextView
...
@@ -80,21 +89,26 @@
...
@@ -80,21 +89,26 @@
android:textColor=
"@color/tv_cl"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
<
com.dayu.widgets.LRecyclerView
<
LinearLayout
android:id=
"@+id/
r
l_server_content"
android:id=
"@+id/
l
l_server_content"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tv_state"
android:layout_below=
"@id/tv_state"
android:layout_marginLeft=
"19dp"
android:layout_marginLeft=
"19dp"
android:layout_marginTop=
"15dp"
android:layout_marginTop=
"15dp"
android:layout_toRightOf=
"@+id/tv_content"
/>
android:layout_toRightOf=
"@+id/tv_content"
>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rl_server_content"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
<TextView
<TextView
android:id=
"@+id/tv_time"
android:id=
"@+id/tv_time"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/rl_server_content"
android:layout_below=
"@+id/ll_server_content"
android:layout_marginTop=
"15dp"
android:text=
"上门时间:"
android:text=
"上门时间:"
android:textColor=
"@color/tv_cl"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
...
@@ -103,11 +117,10 @@
...
@@ -103,11 +117,10 @@
android:id=
"@+id/order_time"
android:id=
"@+id/order_time"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/
r
l_server_content"
android:layout_below=
"@+id/
l
l_server_content"
android:layout_marginLeft=
"19dp"
android:layout_marginLeft=
"19dp"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_toRightOf=
"@+id/tv_time"
android:layout_toRightOf=
"@+id/tv_time"
android:text=
"2018-09-30"
android:text=
'@{!TextUtils.isEmpty(item.confirmDoorTime)?item.confirmDoorTime:@string/no_data}'
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
...
@@ -121,17 +134,40 @@
...
@@ -121,17 +134,40 @@
android:textColor=
"@color/tv_cl"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
<TextView
android:id=
"@+id/order_remark"
<RelativeLayout
android:layout_width=
"wrap_content"
android:id=
"@+id/rl_info_detail"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_time"
android:layout_below=
"@+id/tv_time"
android:layout_marginLeft=
"19dp"
android:layout_marginLeft=
"19dp"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_toRightOf=
"@+id/tv_remark"
android:layout_toRightOf=
"@+id/tv_remark"
>
android:text=
"安装点时代工具箱"
<TextView
android:id=
"@+id/order_remark"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:maxEms=
"500"
android:maxLines=
"2"
android:text=
'@{TextUtils.isEmpty(item.comment)?@string/no_data:item.comment}'
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"14sp"
/>
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_look_more"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/order_remark"
android:gravity=
"center_horizontal"
android:text=
"@string/look_more"
android:textColor=
"@color/cl_receiving_order_item_data"
android:textSize=
"13.3sp"
android:visibility=
"gone"
/>
</RelativeLayout>
<TextView
<TextView
android:id=
"@+id/tv_fujian"
android:id=
"@+id/tv_fujian"
...
@@ -143,14 +179,20 @@
...
@@ -143,14 +179,20 @@
android:textColor=
"@color/tv_cl"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
<
com.dayu.widgets.LRecyclerView
<
LinearLayout
android:id=
"@+id/
order
_fujian"
android:id=
"@+id/
ll
_fujian"
android:layout_width=
"
wrap_cont
ent"
android:layout_width=
"
match_par
ent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_remark"
android:layout_below=
"@+id/tv_remark"
android:layout_marginLeft=
"19dp"
android:layout_marginLeft=
"19dp"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_toRightOf=
"@+id/tv_remark"
/>
android:layout_toRightOf=
"@+id/tv_remark"
>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/rl_fujian"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
...
@@ -173,6 +215,7 @@
...
@@ -173,6 +215,7 @@
android:id=
"@+id/tv_customer_type"
android:id=
"@+id/tv_customer_type"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_15"
android:text=
"客户类型:"
android:text=
"客户类型:"
android:textColor=
"@color/tv_cl"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
...
@@ -182,8 +225,9 @@
...
@@ -182,8 +225,9 @@
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"19dp"
android:layout_marginLeft=
"19dp"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_toRightOf=
"@+id/tv_customer_type"
android:layout_toRightOf=
"@+id/tv_customer_type"
android:text=
"
123456789
"
android:text=
"
@{item.customerType == 1?@string/personal_customer:@string/enterprise_customer}
"
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
...
@@ -207,7 +251,7 @@
...
@@ -207,7 +251,7 @@
android:layout_marginLeft=
"19dp"
android:layout_marginLeft=
"19dp"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_toRightOf=
"@+id/tv_customer_type"
android:layout_toRightOf=
"@+id/tv_customer_type"
android:text=
"123456789"
android:text=
'@{!TextUtils.isEmpty(item.customerName)?item.customerName:@string/no_data}'
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
...
@@ -229,7 +273,7 @@
...
@@ -229,7 +273,7 @@
android:layout_marginLeft=
"19dp"
android:layout_marginLeft=
"19dp"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_toRightOf=
"@+id/tv_customer_mobile"
android:layout_toRightOf=
"@+id/tv_customer_mobile"
android:text=
"123456789"
android:text=
'@{!TextUtils.isEmpty(item.customerMobile)?item.customerMobile:@string/no_data}'
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
...
@@ -251,7 +295,7 @@
...
@@ -251,7 +295,7 @@
android:layout_marginLeft=
"19dp"
android:layout_marginLeft=
"19dp"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_toRightOf=
"@+id/tv_address"
android:layout_toRightOf=
"@+id/tv_address"
android:text=
"北京市海淀区"
android:text=
'@{item.provinceName+item.cityName+item.districtName+item.address}'
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
...
@@ -261,7 +305,7 @@
...
@@ -261,7 +305,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_address"
android:layout_below=
"@+id/tv_address"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_marginTop=
"@dimen/dp_15"
android:text=
"
到期
时间:"
android:text=
"
期望
时间:"
android:textColor=
"@color/tv_cl"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
...
@@ -273,7 +317,7 @@
...
@@ -273,7 +317,7 @@
android:layout_marginLeft=
"19dp"
android:layout_marginLeft=
"19dp"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_toRightOf=
"@+id/tv_end_time"
android:layout_toRightOf=
"@+id/tv_end_time"
android:text=
"北京市海淀区"
android:text=
'@{!TextUtils.isEmpty(item.appointmentTime)?item.appointmentTime:@string/no_data}'
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
</RelativeLayout>
</RelativeLayout>
...
@@ -283,7 +327,7 @@
...
@@ -283,7 +327,7 @@
android:layout_height=
"43dp"
android:layout_height=
"43dp"
android:paddingLeft=
"15dp"
android:paddingLeft=
"15dp"
android:paddingTop=
"@dimen/dp_15"
android:paddingTop=
"@dimen/dp_15"
android:text=
"
客户
信息"
android:text=
"
费用
信息"
android:textColor=
"@color/tv_cl"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
...
@@ -291,9 +335,9 @@
...
@@ -291,9 +335,9 @@
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"
android:paddingBottom=
"10dp"
android:background=
"@color/white"
android:background=
"@color/white"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
android:paddingBottom=
"10dp"
>
<TextView
<TextView
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
...
@@ -308,7 +352,7 @@
...
@@ -308,7 +352,7 @@
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_10"
android:layout_marginLeft=
"@dimen/dp_10"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_marginTop=
"@dimen/dp_15"
android:text=
"
陈丹啊:
"
android:text=
"
@{item.repairType == 1?@string/honai:@string/warranty}
"
android:textColor=
"@color/cl_home_title_text_color"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
</LinearLayout>
</LinearLayout>
...
...
orderCenter/src/main/res/layout/item_accessories_layout.xml
View file @
493772ab
...
@@ -5,12 +5,13 @@
...
@@ -5,12 +5,13 @@
<variable
<variable
name=
"item"
name=
"item"
type=
"com.dayu.order.api.protocol.OrderDetail.accessories"
/>
type=
"com.dayu.order.api.protocol.OrderDetail.accessories"
/>
</data>
</data>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"8dp"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<TextView
<TextView
...
@@ -20,7 +21,6 @@
...
@@ -20,7 +21,6 @@
android:layout_marginBottom=
"5dp"
android:layout_marginBottom=
"5dp"
android:text=
"@{item.name}"
android:text=
"@{item.name}"
android:textColor=
"@color/cl_receiving_order_item_data"
android:textColor=
"@color/cl_receiving_order_item_data"
android:textSize=
"@dimen/sp_13.3"
android:textSize=
"@dimen/sp_13.3"
/>
/>
</LinearLayout>
</LinearLayout>
</layout>
</layout>
\ No newline at end of file
orderCenter/src/main/res/layout/item_detail_server_info.xml
0 → 100644
View file @
493772ab
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<data>
<variable
name=
"item"
type=
"com.dayu.order.api.protocol.Spu"
/>
</data>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"15dp"
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:text=
'@{item.kaSpuName}'
android:maxLines=
"1"
android:maxEms=
"12"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"14sp"
/>
<TextView
android:id=
"@+id/tv_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:text=
'@{"x"+item.goodNum}'
android:paddingLeft=
"3dp"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"14sp"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_server"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"18dp"
android:text=
"服务说明"
android:textColor=
"@color/bg_button"
android:textSize=
"14sp"
/>
</LinearLayout>
</layout>
\ No newline at end of file
orderCenter/src/main/res/layout/item_multi_process_foot.xml
0 → 100644
View file @
493772ab
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<data>
<import
type=
"android.view.View"
/>
</data>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"43dp"
android:paddingLeft=
"@dimen/dp_15"
android:paddingTop=
"@dimen/dp_17"
android:text=
"费用承担方"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"51dp"
android:background=
"@color/white"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_weight=
"1"
android:paddingLeft=
"@dimen/dp_15"
android:text=
"费用承担方"
android:textColor=
"@color/default_text_color"
android:textSize=
"@dimen/sp_15"
/>
<TextView
android:id=
"@+id/tv_repair_type"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:paddingRight=
"@dimen/dp_15"
android:text=
"保内"
android:textColor=
"@color/default_text_color"
android:textSize=
"@dimen/sp_15"
/>
</LinearLayout>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"43dp"
android:paddingLeft=
"@dimen/dp_15"
android:paddingTop=
"@dimen/dp_17"
android:text=
"收取费用"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"51dp"
android:background=
"@color/white"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:layout_weight=
"1"
android:paddingLeft=
"@dimen/dp_15"
android:text=
"收取客户费用"
android:textColor=
"@color/default_text_color"
android:textSize=
"@dimen/sp_15"
/>
<com.dayu.widgets.SwitchImage
android:id=
"@+id/iv_switch"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:paddingRight=
"@dimen/dp_15"
android:src=
"@drawable/set_switch_off"
/>
</LinearLayout>
<ImageView
android:id=
"@+id/image_nine_lin"
style=
"@style/line"
/>
<RelativeLayout
android:id=
"@+id/rl_pay"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
>
<RelativeLayout
android:id=
"@+id/up_door"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_54"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/dp_13"
android:text=
"@string/tv_order_updoor_feiyong"
android:textColor=
"@color/cl_tab_line"
android:textSize=
"@dimen/sp_13.3"
/>
<EditText
android:id=
"@+id/et_door_price"
android:layout_width=
"@dimen/dp_205"
android:layout_height=
"match_parent"
android:layout_alignParentRight=
"true"
android:layout_centerHorizontal=
"true"
android:background=
"@null"
android:hint=
"@string/input_up_door_money"
android:inputType=
"number"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_13.3"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"@dimen/dp_13"
android:text=
"@string/tv_order_yuan"
android:textColor=
"@color/cl_tab_line"
android:textSize=
"@dimen/sp_13.3"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/image_two_one_lin"
style=
"@style/line"
android:layout_below=
"@id/up_door"
/>
<RelativeLayout
android:id=
"@+id/up_serve"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_54"
android:layout_below=
"@id/up_door"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/dp_13"
android:text=
"@string/tv_order_serve_feiyong"
android:textColor=
"@color/cl_tab_line"
android:textSize=
"@dimen/sp_13.3"
/>
<EditText
android:id=
"@+id/et_serve_price"
android:layout_width=
"@dimen/dp_205"
android:layout_height=
"match_parent"
android:layout_alignParentRight=
"true"
android:layout_centerHorizontal=
"true"
android:background=
"@null"
android:hint=
"@string/input_up_money"
android:inputType=
"number"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_13.3"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"@dimen/dp_13"
android:text=
"@string/tv_order_yuan"
android:textColor=
"@color/cl_tab_line"
android:textSize=
"@dimen/sp_13.3"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/image_two_two_lin"
style=
"@style/line"
android:layout_below=
"@id/up_serve"
/>
<RelativeLayout
android:id=
"@+id/up_materials"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_54"
android:layout_below=
"@id/up_serve"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/dp_13"
android:text=
"@string/tv_order_cailiao_feiyong"
android:textColor=
"@color/cl_tab_line"
android:textSize=
"@dimen/sp_13.3"
/>
<EditText
android:id=
"@+id/et_materials_price"
android:layout_width=
"@dimen/dp_205"
android:layout_height=
"match_parent"
android:layout_alignParentRight=
"true"
android:layout_centerHorizontal=
"true"
android:background=
"@null"
android:hint=
"@string/input_cailiao_money"
android:inputType=
"number"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_13.3"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"@dimen/dp_13"
android:text=
"@string/tv_order_yuan"
android:textColor=
"@color/cl_tab_line"
android:textSize=
"@dimen/sp_13.3"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/image_two_three_lin"
style=
"@style/line"
android:layout_below=
"@id/up_materials"
/>
<RelativeLayout
android:id=
"@+id/up_other"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_54"
android:layout_below=
"@id/up_materials"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/dp_13"
android:text=
"@string/tv_order_other_feiyong"
android:textColor=
"@color/cl_tab_line"
android:textSize=
"@dimen/sp_13.3"
/>
<EditText
android:id=
"@+id/et_other_price"
android:layout_width=
"@dimen/dp_205"
android:layout_height=
"match_parent"
android:layout_alignParentRight=
"true"
android:layout_centerHorizontal=
"true"
android:background=
"@null"
android:hint=
"@string/input_other_money"
android:inputType=
"number"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_13.3"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"@dimen/dp_13"
android:text=
"@string/tv_order_yuan"
android:textColor=
"@color/cl_tab_line"
android:textSize=
"@dimen/sp_13.3"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/image_two_four_lin"
style=
"@style/line"
android:layout_below=
"@id/up_other"
/>
<EditText
android:id=
"@+id/et_door_info"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_163"
android:layout_below=
"@id/up_other"
android:layout_centerHorizontal=
"true"
android:layout_marginLeft=
"@dimen/dp_13.3"
android:layout_marginRight=
"@dimen/dp_13.3"
android:layout_marginTop=
"@dimen/dp_17"
android:background=
"@drawable/subscribe_time_shape"
android:gravity=
"top"
android:hint=
"@string/tv_order_other"
android:paddingTop=
"@dimen/dp_11"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_13.3"
/>
</RelativeLayout>
</LinearLayout>
</layout>
\ No newline at end of file
orderCenter/src/main/res/layout/item_multi_process_order.xml
0 → 100644
View file @
493772ab
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<data>
<variable
name=
"item"
type=
"com.dayu.order.api.protocol.Spu"
/>
</data>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"82dp"
android:layout_marginBottom=
"10dp"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:background=
"@color/white"
android:paddingLeft=
"@dimen/dp_15"
>
<TextView
android:id=
"@+id/tv_repair_type"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentLeft=
"true"
android:layout_alignParentStart=
"true"
android:layout_alignParentTop=
"true"
android:layout_marginTop=
"@dimen/dp_20"
android:text=
'@{item.providerTypeName}'
android:textColor=
"@color/default_text_color"
android:textSize=
"16sp"
/>
<TextView
android:id=
"@+id/tv_repair_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_20"
android:layout_toRightOf=
"@+id/tv_repair_type"
android:text=
'@{"-"+item.categoryThreeName}'
android:textColor=
"@color/default_text_color"
android:textSize=
"16sp"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_repair_type"
android:layout_marginTop=
"6dp"
android:text=
"@{item.kaSpuName}"
android:textColor=
"@color/default_editext_color"
/>
<TextView
android:id=
"@+id/tv_state"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"15sp"
android:text=
'@{item.status==1?"处理":"已完成"}'
android:textColor=
"@color/bg_button"
android:textSize=
"@dimen/sp_14"
/>
</RelativeLayout>
</layout>
\ No newline at end of file
orderCenter/src/main/res/layout/item_server_info.xml
View file @
493772ab
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<data>
<data>
<variable
<variable
name=
"item"
name=
"item"
type=
"com.dayu.order.api.protocol.
Order.
Spu"
/>
type=
"com.dayu.order.api.protocol.Spu"
/>
</data>
</data>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
...
@@ -126,6 +126,7 @@
...
@@ -126,6 +126,7 @@
android:background=
"@color/cl_order_item_line_bg"
/>
android:background=
"@color/cl_order_item_line_bg"
/>
<TextView
<TextView
android:id=
"@+id/process_order"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"39dp"
android:layout_height=
"39dp"
android:gravity=
"center"
android:gravity=
"center"
...
...
orderCenter/src/main/res/layout/recycler_server_info_header.xml
View file @
493772ab
...
@@ -10,11 +10,13 @@
...
@@ -10,11 +10,13 @@
<LinearLayout
<LinearLayout
android:id=
"@+id/ll_test"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"
match_par
ent"
android:layout_height=
"
wrap_cont
ent"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<TextView
<TextView
android:id=
"@+id/tv_test"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"43dp"
android:layout_height=
"43dp"
android:paddingLeft=
"15dp"
android:paddingLeft=
"15dp"
...
@@ -125,7 +127,7 @@
...
@@ -125,7 +127,7 @@
android:layout_alignParentRight=
"true"
android:layout_alignParentRight=
"true"
android:layout_below=
"@+id/tv_phone"
android:layout_below=
"@+id/tv_phone"
android:layout_marginTop=
"14dp"
android:layout_marginTop=
"14dp"
android:text=
"@{item.getProvinceName()}"
android:text=
"@{item.getProvinceName()
+item.cityName+item.address
}"
android:textColor=
"@color/tv_cl"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
/>
...
...
userCenter/src/main/java/com/dayu/usercenter/presenter/homefourtab/HomeFourContract.java
View file @
493772ab
...
@@ -42,6 +42,8 @@ public interface HomeFourContract {
...
@@ -42,6 +42,8 @@ public interface HomeFourContract {
*/
*/
void
dumpToOrderRecord
();
void
dumpToOrderRecord
();
void
dumpToDaYuB
();
}
}
abstract
class
Presenter
extends
BasePresenter
<
View
>
{
abstract
class
Presenter
extends
BasePresenter
<
View
>
{
...
@@ -74,5 +76,10 @@ public interface HomeFourContract {
...
@@ -74,5 +76,10 @@ public interface HomeFourContract {
* 跳转到资质列表.
* 跳转到资质列表.
*/
*/
public
abstract
void
dumpToLicence
();
public
abstract
void
dumpToLicence
();
/**
* 跳转到大鱼帮帮.
*/
public
abstract
void
dumpToDayuBB
();
}
}
}
}
userCenter/src/main/java/com/dayu/usercenter/presenter/homefourtab/HomePersonPresenter.java
View file @
493772ab
...
@@ -73,6 +73,11 @@ public class HomePersonPresenter extends HomeFourContract.Presenter {
...
@@ -73,6 +73,11 @@ public class HomePersonPresenter extends HomeFourContract.Presenter {
}
}
@Override
@Override
public
void
dumpToDayuBB
()
{
mView
.
dumpToDaYuB
();
}
@Override
public
void
dumpToPersonalInfo
()
{
public
void
dumpToPersonalInfo
()
{
mView
.
startActivity
(
PersonInfoActivity
.
class
);
mView
.
startActivity
(
PersonInfoActivity
.
class
);
MobclickAgent
.
onEvent
(
BaseApplication
.
getContext
(),
"check_personInfo"
);
MobclickAgent
.
onEvent
(
BaseApplication
.
getContext
(),
"check_personInfo"
);
...
...
userCenter/src/main/java/com/dayu/usercenter/ui/activity/CommeWebViewActivity.java
0 → 100644
View file @
493772ab
package
com
.
dayu
.
usercenter
.
ui
.
activity
;
import
android.annotation.SuppressLint
;
import
android.content.Intent
;
import
android.net.Uri
;
import
android.os.Build
;
import
android.os.Bundle
;
import
android.view.KeyEvent
;
import
android.view.View
;
import
android.webkit.ValueCallback
;
import
android.webkit.WebChromeClient
;
import
android.webkit.WebSettings
;
import
android.webkit.WebView
;
import
android.widget.LinearLayout
;
import
com.dayu.base.ui.activity.DataBindingActivity
;
import
com.dayu.baselibrary.databinding.ActivityWebviewBinding
;
import
com.dayu.common.Constants
;
import
com.dayu.usercenter.R
;
import
com.dayu.utils.ProgressUtil
;
import
com.github.lzyzsd.jsbridge.BridgeHandler
;
import
com.github.lzyzsd.jsbridge.BridgeWebView
;
import
com.github.lzyzsd.jsbridge.CallBackFunction
;
import
java.io.File
;
/**
* Created by luofan
* on 2018/5/25.
*/
public
class
CommeWebViewActivity
extends
DataBindingActivity
<
ActivityWebviewBinding
>
{
ValueCallback
<
Uri
>
mUploadMessage
;
ValueCallback
<
Uri
[]>
uploadMessageAboveL
;
int
RESULT_CODE
=
0
;
int
RESULT_CODE_FOR_Lollipop
=
1
;
private
BridgeWebView
mWebView
;
private
String
mUrl
;
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_webview
;
}
@Override
public
void
initView
()
{
Bundle
bundle
=
getIntent
().
getBundleExtra
(
Constants
.
BUNDLE
);
mUrl
=
bundle
.
getString
(
Constants
.
URL
);
mBind
.
rlTitle
.
setVisibility
(
View
.
GONE
);
mWebView
=
new
BridgeWebView
(
mActivity
);
mWebView
.
setLayoutParams
(
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
LinearLayout
.
LayoutParams
.
MATCH_PARENT
));
mBind
.
llWeb
.
addView
(
mWebView
);
initWebView
();
}
@SuppressLint
(
"SetJavaScriptEnabled"
)
private
void
initWebView
()
{
WebSettings
settings
=
mWebView
.
getSettings
();
// >= 19(SDK4.4)启动硬件加速,否则启动软件加速
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
KITKAT
)
{
mWebView
.
setLayerType
(
View
.
LAYER_TYPE_HARDWARE
,
null
);
settings
.
setLoadsImagesAutomatically
(
true
);
//支持自动加载图片
}
else
{
mWebView
.
setLayerType
(
View
.
LAYER_TYPE_SOFTWARE
,
null
);
settings
.
setLoadsImagesAutomatically
(
false
);
}
settings
.
setUseWideViewPort
(
true
);
//设定支持viewport
settings
.
setLoadWithOverviewMode
(
true
);
//自适应屏幕
settings
.
setDomStorageEnabled
(
true
);
settings
.
setSaveFormData
(
true
);
settings
.
setAppCacheEnabled
(
false
);
settings
.
setCacheMode
(
WebSettings
.
LOAD_NO_CACHE
);
settings
.
setAppCachePath
(
getFilesDir
().
getAbsolutePath
()
+
"/Android/data/com.dayu.bigfish/cache"
);
settings
.
setJavaScriptEnabled
(
true
);
//启用支持javascript
settings
.
setJavaScriptCanOpenWindowsAutomatically
(
true
);
settings
.
setSupportZoom
(
true
);
//设定支持缩放
settings
.
setBuiltInZoomControls
(
true
);
//make sure your pinch zoom is enabled
settings
.
setDisplayZoomControls
(
false
);
//don't show the zoom controls
//5.0 以上 webView图片不显示 以下没问题
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
settings
.
setMixedContentMode
(
WebSettings
.
MIXED_CONTENT_ALWAYS_ALLOW
);
}
mWebView
.
setVerticalScrollbarOverlay
(
false
);
//指定的垂直滚动条有叠加样式
mWebView
.
setVerticalScrollBarEnabled
(
true
);
mWebView
.
setOverScrollMode
(
View
.
OVER_SCROLL_NEVER
);
// 取消WebView中滚动或拖动到顶部、底部时的阴影
mWebView
.
setScrollBarStyle
(
View
.
SCROLLBARS_INSIDE_OVERLAY
);
// 取消滚动条白边效果
mWebView
.
requestFocus
();
mWebView
.
setDefaultHandler
(
new
MyHandler
());
mWebView
.
setWebChromeClient
(
new
WebChromeClient
()
{
public
void
openFileChooser
(
ValueCallback
<
Uri
>
uploadMsg
,
String
AcceptType
,
String
capture
)
{
this
.
openFileChooser
(
uploadMsg
);
}
public
void
openFileChooser
(
ValueCallback
<
Uri
>
uploadMsg
,
String
AcceptType
)
{
this
.
openFileChooser
(
uploadMsg
);
}
public
void
openFileChooser
(
ValueCallback
<
Uri
>
uploadMsg
)
{
openFileChooserImpl
(
uploadMsg
);
}
@Override
public
boolean
onShowFileChooser
(
WebView
webView
,
ValueCallback
<
Uri
[]>
uploadMsg
,
FileChooserParams
fileChooserParams
)
{
openFileChooserImplForAndroid5
(
uploadMsg
);
return
true
;
}
@Override
public
void
onProgressChanged
(
WebView
view
,
int
newProgress
)
{
if
(
newProgress
==
100
)
{
ProgressUtil
.
stopLoad
();
}
}
});
ProgressUtil
.
startLoad
(
mActivity
);
mWebView
.
loadUrl
(
mUrl
);
}
private
void
openFileChooserImpl
(
ValueCallback
<
Uri
>
uploadMsg
)
{
mUploadMessage
=
uploadMsg
;
Intent
i
=
new
Intent
(
Intent
.
ACTION_GET_CONTENT
);
i
.
addCategory
(
Intent
.
CATEGORY_OPENABLE
);
i
.
setType
(
"image/*"
);
startActivityForResult
(
Intent
.
createChooser
(
i
,
getString
(
R
.
string
.
choose_file
)),
RESULT_CODE
);
}
/*android 5.0*/
private
void
openFileChooserImplForAndroid5
(
ValueCallback
<
Uri
[]>
uploadMsg
)
{
uploadMessageAboveL
=
uploadMsg
;
Intent
contentSelectionIntent
=
new
Intent
(
Intent
.
ACTION_GET_CONTENT
);
contentSelectionIntent
.
addCategory
(
Intent
.
CATEGORY_OPENABLE
);
contentSelectionIntent
.
setType
(
"image/*"
);
Intent
chooserIntent
=
new
Intent
(
Intent
.
ACTION_CHOOSER
);
chooserIntent
.
putExtra
(
Intent
.
EXTRA_INTENT
,
contentSelectionIntent
);
chooserIntent
.
putExtra
(
Intent
.
EXTRA_TITLE
,
getString
(
R
.
string
.
choose_pic
));
startActivityForResult
(
chooserIntent
,
RESULT_CODE_FOR_Lollipop
);
}
/**
* 上传文件回调
*/
@Override
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
intent
)
{
if
(
requestCode
==
RESULT_CODE
)
{
onActivityResultBelowL
(
intent
,
resultCode
);
}
else
if
(
requestCode
==
RESULT_CODE_FOR_Lollipop
)
{
onActivityResultAboveL
(
intent
,
resultCode
);
}
}
/**
* 5.0 L 以下 上传图片成功后的回调
*/
public
void
onActivityResultBelowL
(
Intent
intent
,
int
resultCode
)
{
if
(
null
==
mUploadMessage
)
return
;
Uri
result
=
intent
==
null
||
resultCode
!=
RESULT_OK
?
null
:
intent
.
getData
();
mUploadMessage
.
onReceiveValue
(
result
);
mUploadMessage
=
null
;
}
/**
* 5.0 L以上 上传图片成功后的回调
*/
public
void
onActivityResultAboveL
(
Intent
intent
,
int
resultCode
)
{
if
(
null
==
uploadMessageAboveL
)
return
;
Uri
result
=
(
intent
==
null
||
resultCode
!=
RESULT_OK
)
?
null
:
intent
.
getData
();
if
(
result
!=
null
)
{
uploadMessageAboveL
.
onReceiveValue
(
new
Uri
[]{
result
});
}
else
{
uploadMessageAboveL
.
onReceiveValue
(
new
Uri
[]{});
}
uploadMessageAboveL
=
null
;
}
private
class
MyHandler
implements
BridgeHandler
{
@Override
public
void
handler
(
String
data
,
CallBackFunction
function
)
{
if
(
function
!=
null
)
{
function
.
onCallBack
(
"DefaultHandler response data"
);
}
}
}
//返回
@Override
public
boolean
onKeyDown
(
int
keyCode
,
KeyEvent
event
)
{
if
((
keyCode
==
KeyEvent
.
KEYCODE_BACK
)
&&
mWebView
.
canGoBack
())
{
clearCach
();
return
true
;
}
return
super
.
onKeyDown
(
keyCode
,
event
);
}
public
void
onResume
()
{
super
.
onResume
();
mWebView
.
onResume
();
}
@Override
protected
void
onDestroy
()
{
super
.
onDestroy
();
clearCach
();
}
public
void
clearCach
()
{
try
{
deleteDatabase
(
"webview.db"
);
deleteDatabase
(
"webviewCache.db"
);
File
appCacheDir
=
new
File
(
getFilesDir
().
getAbsolutePath
()
+
"/Android/data/com.dayu.bigfish/cache"
);
File
webviewCacheDir
=
new
File
(
getCacheDir
().
getAbsolutePath
()
+
"/webviewCache"
);
if
(
webviewCacheDir
.
exists
())
{
deleteFile
(
webviewCacheDir
);
}
if
(
appCacheDir
.
exists
())
{
deleteFile
(
appCacheDir
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
mWebView
.
clearHistory
();
mWebView
.
clearFormData
();
mWebView
.
goBack
();
mWebView
.
removeAllViews
();
mWebView
.
destroy
();
mBind
.
llWeb
.
removeAllViews
();
}
/**
* 递归删除 文件/文件夹
*
* @param file
*/
public
void
deleteFile
(
File
file
)
{
if
(
file
.
exists
())
{
if
(
file
.
isFile
())
{
file
.
delete
();
}
else
if
(
file
.
isDirectory
())
{
File
files
[]
=
file
.
listFiles
();
for
(
int
i
=
0
;
i
<
files
.
length
;
i
++)
{
deleteFile
(
files
[
i
]);
}
}
file
.
delete
();
}
else
{
}
}
}
userCenter/src/main/java/com/dayu/usercenter/ui/fragment/HomePersonFragment.java
View file @
493772ab
package
com
.
dayu
.
usercenter
.
ui
.
fragment
;
package
com
.
dayu
.
usercenter
.
ui
.
fragment
;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.content.pm.PackageManager
;
import
android.graphics.Bitmap
;
import
android.graphics.Bitmap
;
import
android.graphics.BitmapFactory
;
import
android.graphics.BitmapFactory
;
import
android.os.Bundle
;
import
android.os.Bundle
;
...
@@ -24,6 +25,7 @@ import com.dayu.usercenter.databinding.FragmentPersonalCenterBinding;
...
@@ -24,6 +25,7 @@ import com.dayu.usercenter.databinding.FragmentPersonalCenterBinding;
import
com.dayu.usercenter.presenter.homefourtab.HomeFourContract
;
import
com.dayu.usercenter.presenter.homefourtab.HomeFourContract
;
import
com.dayu.usercenter.presenter.homefourtab.HomePersonPresenter
;
import
com.dayu.usercenter.presenter.homefourtab.HomePersonPresenter
;
import
com.dayu.usercenter.ui.activity.AccountBalanceActivity
;
import
com.dayu.usercenter.ui.activity.AccountBalanceActivity
;
import
com.dayu.usercenter.ui.activity.CommeWebViewActivity
;
import
com.dayu.usercenter.ui.activity.WithdrawalsActivity
;
import
com.dayu.usercenter.ui.activity.WithdrawalsActivity
;
import
com.dayu.utils.ProgressUtil
;
import
com.dayu.utils.ProgressUtil
;
import
com.dayu.utils.SPUtils
;
import
com.dayu.utils.SPUtils
;
...
@@ -164,6 +166,38 @@ public class HomePersonFragment extends BaseFragment<HomePersonPresenter, Fragme
...
@@ -164,6 +166,38 @@ public class HomePersonFragment extends BaseFragment<HomePersonPresenter, Fragme
MobclickAgent
.
onEvent
(
mActivity
,
"order_record"
);
MobclickAgent
.
onEvent
(
mActivity
,
"order_record"
);
}
}
@Override
public
void
dumpToDaYuB
()
{
String
packageName
=
"com.gikoomps.phone.dayu"
;
Intent
intent
;
PackageManager
packageManager
=
mActivity
.
getPackageManager
();
intent
=
packageManager
.
getLaunchIntentForPackage
(
packageName
);
if
(
intent
!=
null
)
{
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
|
Intent
.
FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
|
Intent
.
FLAG_ACTIVITY_CLEAR_TOP
);
showDayuBbActivity
(
intent
);
}
else
{
Bundle
bundle
=
new
Bundle
();
bundle
.
putString
(
Constants
.
URL
,
"http://shouji.baidu.com/software/23610629.html"
);
Intent
intent1
=
new
Intent
(
mActivity
,
CommeWebViewActivity
.
class
);
intent1
.
putExtra
(
Constants
.
BUNDLE
,
bundle
);
mActivity
.
startActivity
(
intent1
,
bundle
);
}
}
private
void
showDayuBbActivity
(
Intent
intent
)
{
CustomDialog
dialog
=
new
CustomDialog
(
mActivity
,
R
.
style
.
CustomDialog
,
mActivity
.
getString
(
R
.
string
.
is_open_dayu_bb
)
,
(
dialog1
,
confirm
)
->
{
if
(
confirm
)
{
this
.
startActivity
(
intent
);
}
dialog1
.
dismiss
();
});
dialog
.
setTitle
(
mActivity
.
getString
(
R
.
string
.
notice
))
.
setNegativeButton
(
mActivity
.
getString
(
R
.
string
.
cancle
))
.
setPositiveButton
(
mActivity
.
getString
(
R
.
string
.
open
));
dialog
.
show
();
}
private
void
showAlertDialog
()
{
private
void
showAlertDialog
()
{
CustomDialog
dialog
=
new
CustomDialog
(
mActivity
,
R
.
style
.
CustomDialog
,
mActivity
.
getString
(
R
.
string
.
not_set_account
)
CustomDialog
dialog
=
new
CustomDialog
(
mActivity
,
R
.
style
.
CustomDialog
,
mActivity
.
getString
(
R
.
string
.
not_set_account
)
,
(
dialog1
,
confirm
)
->
{
,
(
dialog1
,
confirm
)
->
{
...
...
userCenter/src/main/release/AndroidManifest.xml
View file @
493772ab
...
@@ -44,6 +44,8 @@
...
@@ -44,6 +44,8 @@
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
/>
<activity
<activity
android:name=
".ui.activity.CertificationResultActivity"
android:name=
".ui.activity.CertificationResultActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activity.CommeWebViewActivity"
android:screenOrientation=
"portrait"
/>
android:screenOrientation=
"portrait"
/>
</application>
</application>
...
...
userCenter/src/main/res/layout/fragment_personal_center.xml
View file @
493772ab
...
@@ -21,7 +21,13 @@
...
@@ -21,7 +21,13 @@
android:layout_alignParentLeft=
"true"
android:layout_alignParentLeft=
"true"
android:layout_alignParentStart=
"true"
android:layout_alignParentStart=
"true"
android:layout_alignParentTop=
"true"
>
android:layout_alignParentTop=
"true"
>
<TextView
android:id=
"@+id/tv_left"
style=
"@style/title_left"
android:text=
"@string/dayu_bang"
android:textSize=
"14sp"
android:onClick=
"@{()->presenter.dumpToDayuBB()}"
/>
<TextView
<TextView
style=
"@style/text_title"
style=
"@style/text_title"
android:text=
"@string/personal_center"
/>
android:text=
"@string/personal_center"
/>
...
...
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