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
3e0b61f3
authored
Mar 20, 2020
by
mReturn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工单优化
parent
470d1508
Show whitespace changes
Inline
Side-by-side
Showing
50 changed files
with
1247 additions
and
359 deletions
app/src/main/java/com/dayu/bigfish/presenter/main/MainContract.java
app/src/main/java/com/dayu/bigfish/presenter/main/MainPresenter.java
app/src/main/java/com/dayu/bigfish/ui/MainActivity.java
baseSDK/build.gradle
baseSDK/src/main/AndroidManifest.xml
baseSDK/src/main/java/com/dayu/base/api/APIService.java
userCenter/src/main/java/com/dayu/usercenter/model/bean/TreeAddressBean.java → baseSDK/src/main/java/com/dayu/base/api/protocol/TreeAddressBean.java
baseSDK/src/main/java/com/dayu/base/ui/activity/ImgGalleryActivty.java
baseSDK/src/main/java/com/dayu/common/Constants.java
baseSDK/src/main/res/drawable-xxhdpi/icon_arrow_down_gray32.png
baseSDK/src/main/res/drawable-xxhdpi/icon_arrow_right_gray32.png
baseSDK/src/main/res/drawable-xxhdpi/icon_star_necessary.png
baseSDK/src/main/res/drawable/bg_input_gray_react.xml
baseSDK/src/main/res/drawable/top_tab_selector.xml
baseSDK/src/main/res/layout/activity_img_gallery.xml
baseSDK/src/main/res/values/colors.xml
baseSDK/src/main/res/values/strings.xml
baseSDK/src/main/res/values/styles.xml
build.gradle
orderCenter/src/main/debug/AndroidManifest.xml
orderCenter/src/main/java/com/dayu/order/presenter/orderdoing/OrderDoingPresenter.java
orderCenter/src/main/java/com/dayu/order/presenter/orderpart/OrderPartPresenter.java
orderCenter/src/main/java/com/dayu/order/ui/activity/ApplyAndRefuseActivity.java
orderCenter/src/main/java/com/dayu/order/ui/activity/PdfWebViewActivity.java
orderCenter/src/main/java/com/dayu/order/ui/activity/ReturnPartActivity.java
orderCenter/src/main/java/com/dayu/order/ui/activity/applyAndRefuseActivity.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/fragment/HomeOrderFragment.java
orderCenter/src/main/java/com/dayu/order/ui/fragment/MultiOrderDetailFragment.java
orderCenter/src/main/java/com/dayu/order/ui/fragment/OrderDoneFragment.java
orderCenter/src/main/release/AndroidManifest.xml
orderCenter/src/main/res/layout/activity_apply_refuse_layout.xml
orderCenter/src/main/res/layout/activity_return_part.xml
orderCenter/src/main/res/layout/fragment_multi_detail.xml
orderCenter/src/main/res/layout/fragment_order_application_part.xml
orderCenter/src/main/res/layout/fragment_order_home.xml
orderCenter/src/main/res/layout/fragment_order_part.xml
orderCenter/src/main/res/layout/fragment_orderdoing_item.xml
orderCenter/src/main/res/layout/item_apply_part_layout.xml
orderCenter/src/main/res/layout/item_detail_server_info.xml
orderCenter/src/main/res/layout/serve_datails_item.xml
orderCenter/src/main/res/values/strings.xml
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/ProductInstructionFragment.java
saleCenter/src/main/res/layout/fragment_home_sale.xml
userCenter/src/main/java/com/dayu/usercenter/api/UserService2.java
userCenter/src/main/java/com/dayu/usercenter/common/UserConstant.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/BusinessTypeActivity.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/EditAddressActivity.java
userCenter/src/main/res/layout/activity_business_type.xml
app/src/main/java/com/dayu/bigfish/presenter/main/MainContract.java
View file @
3e0b61f3
...
...
@@ -24,6 +24,11 @@ public interface MainContract {
void
initNotification
();
void
startLocationService
();
/**
* 跳转到服务场景设置页面
*/
void
toServiceSence
();
}
abstract
class
Presenter
extends
BasePresenter
<
View
>
{
...
...
app/src/main/java/com/dayu/bigfish/presenter/main/MainPresenter.java
View file @
3e0b61f3
...
...
@@ -2,12 +2,14 @@ package com.dayu.bigfish.presenter.main;
import
android.databinding.ObservableField
;
import
com.dayu.base.api.Api
;
import
com.dayu.bigfish.MyApplication
;
import
com.dayu.bigfish.api.ApiFactory
;
import
com.dayu.common.Constants
;
import
com.dayu.event.UserInfo
;
import
com.dayu.order.api.OrderApiFactory
;
import
com.dayu.usercenter.api.UserApiFactory
;
import
com.dayu.usercenter.api.UserService2
;
import
com.dayu.utils.AppUtils
;
import
com.dayu.utils.SPUtils
;
import
com.dayu.utils.UserManager
;
...
...
@@ -40,6 +42,7 @@ public class MainPresenter extends MainContract.Presenter {
}
private
void
request
()
{
getServiceData
();
commitVersionInfo
(
mAccountId
,
AppUtils
.
getIMEI
(),
"2"
,
AppUtils
.
getPackageNum
());
getNewVersion
(
AppUtils
.
getPackageNum
());
getReceiveOrder
(
Constants
.
WATING_ORDER
,
mAccountId
,
mSiteId
,
1
,
20
);
...
...
@@ -47,6 +50,14 @@ public class MainPresenter extends MainContract.Presenter {
getUserInfo
(
Integer
.
parseInt
(
mUser
.
getAccountId
()));
}
private
void
getServiceData
()
{
Api
.
getService
(
UserService2
.
class
).
getSavedServiceType
(
mAccountId
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
baseObserver
(
datas
->
{
if
(
datas
==
null
||
datas
.
size
()
==
0
)
mView
.
toServiceSence
();
}));
}
@Override
public
void
getNewVersion
(
String
version
)
{
...
...
app/src/main/java/com/dayu/bigfish/ui/MainActivity.java
View file @
3e0b61f3
...
...
@@ -45,6 +45,7 @@ import com.dayu.provider.event.RefreshHxNum;
import
com.dayu.provider.event.RefreshReceivingNum
;
import
com.dayu.provider.event.SwtichFragment
;
import
com.dayu.provider.router.RouterPath
;
import
com.dayu.usercenter.ui.activity2.BusinessTypeActivity
;
import
com.dayu.usercenter.ui.fragment.HomePersonFragment
;
import
com.dayu.usercenter.ui.fragment.HomeUserFragment
;
import
com.dayu.utils.SPUtils
;
...
...
@@ -110,7 +111,7 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
// managerFragment = ManagerFragment.newInstance();
// mFragments = new Fragment[]{managerFragment, secondFragment, thirdFragment, fourFragment};
mFragments
=
new
Fragment
[]{
saleFragment
,
secondFragment
,
fourFragment
};
mFirstPositon
=
0
;
mFirstPositon
=
1
;
mBind
.
tabFirst
.
setText
(
getString
(
R
.
string
.
send_order
));
}
// mTabs = new TextView[]{mBind.tabFirst, mBind.tabSecond, mBind.tabThird, mBind.tabFour};
...
...
@@ -335,6 +336,13 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
mActivity
.
startService
(
intent
);
}
@Override
public
void
toServiceSence
()
{
Intent
intent
=
new
Intent
(
this
,
BusinessTypeActivity
.
class
);
intent
.
putExtra
(
Constants
.
IS_FORCE
,
true
);
startActivity
(
intent
);
}
/**
* 处理intent传来的信息.
*
...
...
baseSDK/build.gradle
View file @
3e0b61f3
...
...
@@ -79,6 +79,7 @@ dependencies {
api
'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0'
api
'com.scwang.smartrefresh:SmartRefreshHeader:1.1.0'
api
'com.google.android:flexbox:1.0.0'
api
'com.github.chrisbanes:PhotoView:2.0.0'
// api 'tv.danmaku.ijk.media:ijkplayer-java:0.8.4'
// api 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.4'
...
...
baseSDK/src/main/AndroidManifest.xml
View file @
3e0b61f3
...
...
@@ -15,6 +15,8 @@
</intent-filter>
</receiver>
<activity
android:name=
"com.dayu.base.ui.activity.PreviewActivty"
/>
<activity
android:name=
"com.dayu.base.ui.activity.ImgGalleryActivty"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
"com.dayu.wxapi.WXEntryActivity"
android:configChanges=
"keyboardHidden|orientation|screenSize"
...
...
baseSDK/src/main/java/com/dayu/base/api/APIService.java
View file @
3e0b61f3
...
...
@@ -2,6 +2,7 @@ package com.dayu.base.api;
import
com.dayu.base.api.protocol.BaseResponse
;
import
com.dayu.base.api.protocol.TreeAddressBean
;
import
com.dayu.common.Constants
;
import
java.util.List
;
...
...
@@ -13,6 +14,7 @@ import retrofit2.http.GET;
import
retrofit2.http.Multipart
;
import
retrofit2.http.POST
;
import
retrofit2.http.Part
;
import
retrofit2.http.Path
;
import
retrofit2.http.Query
;
import
retrofit2.http.Streaming
;
import
retrofit2.http.Url
;
...
...
@@ -57,4 +59,12 @@ public interface APIService {
@POST
(
Constants
.
UP_PHOTO
)
Observable
<
BaseResponse
<
List
<
String
>>>
uploadPhoto
(
@Part
MultipartBody
.
Part
[]
partMap
,
@Query
(
"style"
)
String
style
);
/**
* 地址(省市区)信息
* @param parednId -1.查询省份数据
* @return
*/
@GET
(
Constants
.
API_7300
+
"/geography/tree/{parentId}"
)
Observable
<
BaseResponse
<
List
<
TreeAddressBean
>>>
getTreeAddress
(
@Path
(
"parentId"
)
int
parednId
);
}
userCenter/src/main/java/com/dayu/usercenter/model/bean
/TreeAddressBean.java
→
baseSDK/src/main/java/com/dayu/base/api/protocol
/TreeAddressBean.java
View file @
3e0b61f3
package
com
.
dayu
.
usercenter
.
model
.
bean
;
package
com
.
dayu
.
base
.
api
.
protocol
;
import
java.util.List
;
...
...
baseSDK/src/main/java/com/dayu/base/ui/activity/ImgGalleryActivty.java
0 → 100644
View file @
3e0b61f3
package
com
.
dayu
.
base
.
ui
.
activity
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.support.v4.view.PagerAdapter
;
import
android.support.v4.view.ViewPager
;
import
android.support.v7.app.AppCompatActivity
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.widget.TextView
;
import
com.bumptech.glide.Glide
;
import
com.bumptech.glide.load.engine.DiskCacheStrategy
;
import
com.bumptech.glide.request.RequestOptions
;
import
com.dayu.baselibrary.R
;
import
com.github.chrisbanes.photoview.PhotoView
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
ImgGalleryActivty
extends
AppCompatActivity
{
ArrayList
<
String
>
imgList
;
int
selectIndex
;
String
currentImgUrl
;
ViewPager
vpImg
;
TextView
tvPage
;
public
static
void
launch
(
Context
context
,
String
imgUrl
)
{
ArrayList
<
String
>
imgs
=
new
ArrayList
<>();
imgs
.
add
(
imgUrl
);
launch
(
context
,
imgs
,
0
);
}
public
static
void
launch
(
Context
context
,
ArrayList
<
String
>
imgList
,
int
index
)
{
Intent
intent
=
new
Intent
(
context
,
ImgGalleryActivty
.
class
);
intent
.
putStringArrayListExtra
(
"images"
,
imgList
);
intent
.
putExtra
(
"pos"
,
index
);
context
.
startActivity
(
intent
);
}
@Override
protected
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_img_gallery
);
initView
();
}
public
void
initView
()
{
vpImg
=
findViewById
(
R
.
id
.
vp_img
);
tvPage
=
findViewById
(
R
.
id
.
tv_page
);
imgList
=
getIntent
().
getStringArrayListExtra
(
"images"
);
selectIndex
=
getIntent
().
getIntExtra
(
"pos"
,
0
);
vpImg
.
setAdapter
(
new
ImgGalleryPageAdapter
(
imgList
));
vpImg
.
setCurrentItem
(
selectIndex
);
tvPage
.
setText
(
String
.
format
(
"%s/"
+
imgList
.
size
(),
selectIndex
+
1
));
setListener
();
}
public
void
back
(
View
v
){
finish
();
}
protected
void
setListener
()
{
vpImg
.
addOnPageChangeListener
(
new
ViewPager
.
OnPageChangeListener
()
{
@Override
public
void
onPageScrolled
(
int
position
,
float
positionOffset
,
int
positionOffsetPixels
)
{
}
@Override
public
void
onPageSelected
(
int
position
)
{
tvPage
.
setText
(
String
.
format
(
"%s/"
+
imgList
.
size
(),
position
+
1
));
currentImgUrl
=
imgList
.
get
(
position
);
}
@Override
public
void
onPageScrollStateChanged
(
int
state
)
{
}
});
}
public
class
ImgGalleryPageAdapter
extends
PagerAdapter
{
List
<
String
>
imgList
;
public
ImgGalleryPageAdapter
(
List
<
String
>
imgList
)
{
this
.
imgList
=
imgList
;
}
@Override
public
int
getCount
()
{
return
imgList
.
size
();
}
@Override
public
Object
instantiateItem
(
final
ViewGroup
container
,
final
int
position
)
{
PhotoView
photoView
=
new
PhotoView
(
container
.
getContext
());
Glide
.
with
(
container
.
getContext
())
.
load
(
imgList
.
get
(
position
))
.
apply
(
new
RequestOptions
()
.
diskCacheStrategy
(
DiskCacheStrategy
.
ALL
)
.
dontAnimate
()
.
fitCenter
()
.
error
(
R
.
drawable
.
icon_img_default
)
)
.
into
(
photoView
);
photoView
.
setZoomable
(
true
);
container
.
addView
(
photoView
,
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
MATCH_PARENT
);
return
photoView
;
}
@Override
public
boolean
isViewFromObject
(
View
view
,
Object
object
)
{
return
view
==
object
;
}
@Override
public
void
destroyItem
(
ViewGroup
container
,
int
position
,
Object
object
)
{
container
.
removeView
((
View
)
object
);
}
}
}
baseSDK/src/main/java/com/dayu/common/Constants.java
View file @
3e0b61f3
package
com
.
dayu
.
common
;
import
com.dayu.base.api.protocol.TreeAddressBean
;
import
com.dayu.utils.LogUtils
;
import
java.util.HashMap
;
import
java.util.List
;
/**
* Created by MrWang
* on 2017/8/20.
...
...
@@ -30,16 +34,16 @@ public class Constants {
/**
* 测试环境配置.
*/
//
public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
//
public static final String ENVIROMENT = "debug";
//
public static final String BASE_URL = "http://47.94.101.239:3112";
//
public final static String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
//
public final static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
//
public final static String CHECK_MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manyServiceResult";
//
public final static String MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manySop";
//
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 static final boolean IS_DEBUG = true;
public
static
final
int
LOG_LEVEL
=
LogUtils
.
LEVEL_ALL
;
public
static
final
String
ENVIROMENT
=
"debug"
;
public
static
final
String
BASE_URL
=
"http://47.94.101.239:3112"
;
public
final
static
String
UP_PHOTO
=
"/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply"
;
public
final
static
String
WEB_SOP
=
"http://47.94.101.239:9004/#/sop"
;
public
final
static
String
CHECK_MULTI_WEB_SOP
=
"http://47.94.101.239:9004/#/manyServiceResult"
;
public
final
static
String
MULTI_WEB_SOP
=
"http://47.94.101.239:9004/#/manySop"
;
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
static
final
boolean
IS_DEBUG
=
true
;
/**
* uat环境配置.
...
...
@@ -58,16 +62,16 @@ public class Constants {
/**
* 正式环境.
*/
public
static
final
String
ENVIROMENT
=
"release"
;
public
static
final
int
LOG_LEVEL
=
LogUtils
.
LEVEL_OFF
;
public
static
final
String
BASE_URL
=
"https://mobile.kf.ai"
;
public
final
static
String
UP_PHOTO
=
"/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply"
;
public
final
static
String
WEB_SOP
=
"https://sop.kf.ai/#/sop"
;
public
final
static
String
WEB_SOP_DETAIL
=
"https://sop.kf.ai/#/sopdetail"
;
public
final
static
String
WEB_ZHI_SHI
=
"https://sop.kf.ai/#/detail"
;
public
final
static
String
CHECK_MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manyServiceResult"
;
public
final
static
String
MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manySop"
;
public
static
final
boolean
IS_DEBUG
=
false
;
//
public static final String ENVIROMENT = "release";
//
public static final int LOG_LEVEL = LogUtils.LEVEL_OFF;
//
public static final String BASE_URL = "https://mobile.kf.ai";
//
public final static String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
//
public final static String WEB_SOP = "https://sop.kf.ai/#/sop";
//
public final static String WEB_SOP_DETAIL = "https://sop.kf.ai/#/sopdetail";
//
public final static String WEB_ZHI_SHI = "https://sop.kf.ai/#/detail";
//
public final static String CHECK_MULTI_WEB_SOP = "https://sop.kf.ai/#/manyServiceResult";
//
public final static String MULTI_WEB_SOP = "https://sop.kf.ai/#/manySop";
//
public static final boolean IS_DEBUG = false;
/**
* 统一配置.
...
...
@@ -216,6 +220,8 @@ public class Constants {
public
static
final
String
CETIFICATION_STATE
=
"cetificaiton_state"
;
//1:接单跳转、待预约 0:登录页,个人中心跳转
public
static
final
String
IS_FORCE
=
"is_force"
;
public
static
final
HashMap
<
Integer
,
List
<
TreeAddressBean
>>
treeAddressMap
=
new
HashMap
<>();
//地址数据
/**
* 主动申请备件.
...
...
baseSDK/src/main/res/drawable-xxhdpi/icon_arrow_down_gray32.png
0 → 100644
View file @
3e0b61f3
727 Bytes
baseSDK/src/main/res/drawable-xxhdpi/icon_arrow_right_gray32.png
0 → 100644
View file @
3e0b61f3
720 Bytes
baseSDK/src/main/res/drawable-xxhdpi/icon_star_necessary.png
0 → 100644
View file @
3e0b61f3
549 Bytes
baseSDK/src/main/res/drawable/bg_input_gray_react.xml
0 → 100644
View file @
3e0b61f3
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<stroke
android:width=
"1dp"
android:color=
"#999"
/>
<corners
android:radius=
"0.5dp"
/>
</shape>
\ No newline at end of file
baseSDK/src/main/res/drawable/top_tab_selector.xml
0 → 100644
View file @
3e0b61f3
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@color/top_tab_selected_bg"
android:state_selected=
"true"
/>
<item
android:drawable=
"@color/cl_white"
/>
</selector>
\ No newline at end of file
baseSDK/src/main/res/layout/activity_img_gallery.xml
0 → 100644
View file @
3e0b61f3
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/title_finish"
style=
"@style/title"
>
<TextView
android:visibility=
"gone"
style=
"@style/text_title"
android:text=
"@string/pre_look"
/>
<TextView
android:id=
"@+id/tv_page"
style=
"@style/text_title"
/>
<ImageView
android:id=
"@+id/titile_back"
style=
"@style/title_image_back"
android:onClick=
"back"
/>
<TextView
android:visibility=
"gone"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"15dp"
android:text=
"1/1"
android:textSize=
"16sp"
/>
</RelativeLayout>
<android.support.v4.view.ViewPager
android:id=
"@+id/vp_img"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
</LinearLayout>
\ No newline at end of file
baseSDK/src/main/res/values/colors.xml
View file @
3e0b61f3
...
...
@@ -14,6 +14,7 @@
<color
name=
"text_common_green"
>
#00c45d
</color>
<color
name=
"cl_receiving_order_item_data"
>
#3faafc
</color>
<color
name=
"cl_tab_yellow"
>
#ffbe2d
</color>
<color
name=
"cl_tab_gray"
>
#7f7f7f
</color>
<color
name=
"cl_tab_read"
>
#ff5a4b
</color>
<color
name=
"cl_tab_init"
>
#585858
</color>
<color
name=
"cl_tab_line"
>
#8a8a8a
</color>
...
...
@@ -46,6 +47,7 @@
<color
name=
"table_border"
>
#666666
</color>
<color
name=
"table_title_bg"
>
#d5d5d5
</color>
<color
name=
"table_record_title_bg"
>
#78d3f6
</color>
<color
name=
"top_tab_selected_bg"
>
#d7d7d7
</color>
...
...
baseSDK/src/main/res/values/strings.xml
View file @
3e0b61f3
...
...
@@ -46,10 +46,12 @@
<string
name=
"max_text_500"
>
最多输入500字
</string>
<string
name=
"tv_home_loading_text"
>
暂无工单
</string>
<string
name=
"tv_home_tab_one_phone"
>
拨打电话
</string>
<string
name=
"phone_back_customer"
>
电话回访客户
</string>
<string
name=
"tv_home_tab_one_subscribe_time"
>
预约时间
</string>
<string
name=
"tv_home_tab_updata_subscribe_time"
>
修改预约时间
</string>
<string
name=
"tv_home_tab_updata_subscribe_data"
>
请输入预约日期
</string>
<string
name=
"tv_home_tab_updata_subscribe_time_two"
>
请输入预约时间
</string>
<string
name=
"confirm_serve_time"
>
确认上门时间
</string>
<string
name=
"tv_home_tab_start"
>
我已出发
</string>
<string
name=
"tv_home_updata_cause"
>
修改原因
</string>
<string
name=
"tv_order_list_num"
>
待接单列表(
</string>
...
...
@@ -91,7 +93,7 @@
<string
name=
"tv_save_back"
>
保存
</string>
<string
name=
"tv_idea"
>
反馈意见
</string>
<string
name=
"tv_idea_text_hint"
>
请输入您的宝贵意见
</string>
<string
name=
"tv_apply_reson_hint"
>
请填写
申请内容,数量和申请原因
</string>
<string
name=
"tv_apply_reson_hint"
>
请详细
说明申请事由和用途
</string>
<string
name=
"tv_refuse_hint"
>
请填写拒绝理由
</string>
<string
name=
"tv_message"
>
系统通知
</string>
<string
name=
"title_account_balance"
>
账户余额
</string>
...
...
@@ -228,6 +230,7 @@
<string
name=
"waite_appointemnt"
>
待预约
</string>
<string
name=
"waite_server"
>
待服务
</string>
<string
name=
"order_exception"
>
异常单
</string>
<string
name=
"order_already_done"
>
已完工
</string>
<string
name=
"cancle_order"
>
已取消
</string>
<string
name=
"appointment_already"
>
已预约
</string>
<string
name=
"not_appointment_already"
>
未预约
</string>
...
...
@@ -252,8 +255,8 @@
<string
name=
"server_record"
>
服务记录
</string>
<!--<string name="order_part">备件信息</string>-->
<string
name=
"order_part"
>
备件物流
</string>
<string
name=
"return_one_order_part"
>
寄
回一个备件
</string>
<string
name=
"apply_one_order_part"
>
申请一个备件
</stri
ng>
<string
name=
"return_one_order_part"
>
备
件寄回商家
</string>
<string
name=
"apply_one_order_part"
>
向商家申请备件
</strin
g>
<string
name=
"order_instruction"
>
视频操作指南
</string>
<string
name=
"open_webview"
>
浏览器打开
</string>
<string
name=
"select_webview"
>
请选择浏览器
</string>
...
...
@@ -274,11 +277,13 @@
<string
name=
"order_subsidy"
>
工单补贴
</string>
<string
name=
"order_save_success"
>
数据保存成功
</string>
<string
name=
"no_data"
>
暂无数据
</string>
<string
name=
"application_order_part"
>
申请备件
</string>
<string
name=
"return_order_part"
>
寄回备件
</string>
<string
name=
"application_order_part"
>
申请/收货
</string>
<string
name=
"return_order_part"
>
返厂/发货
</string>
<string
name=
"return_order_part_title"
>
寄回备件
</string>
<string
name=
"ka_address"
>
收货地址
</string>
<string
name=
"ka_name"
>
收货人
</string>
<string
name=
"ka_name"
>
收货人名
</str
i
ng>
<string
name=
"ka_mobile"
>
联系方式
</string>
<string
name=
"ka_address_mobile"
>
收货人手机号
</string>
<string
name=
"ka_receive_address"
>
收货地址
</string>
<string
name=
"tv_refuse_order_title"
>
拒绝申请
</string>
<string
name=
"tv_apply_order_title"
>
申请备件
</string>
...
...
@@ -299,6 +304,7 @@
<string
name=
"couries_num"
>
快递单号
</string>
<string
name=
"ka_info"
>
厂商收货信息
</string>
<string
name=
"sp_beizhu_hint"
>
请说明寄回内容,数量和寄回原因
</string>
<string
name=
"count_str"
>
数量
</string>
<string
name=
"couries_company_hint"
>
请选择快递公司
</string>
<string
name=
"couries_num_hint"
>
请输入单号
</string>
<string
name=
"part_apply"
>
申请中
</string>
...
...
@@ -326,6 +332,7 @@
<string
name=
"photo"
>
照
        
片
</string>
<string
name=
"prodcut_type"
>
类
        
型
</string>
<string
name=
"door_time"
>
上门时间
</string>
<string
name=
"device_count"
>
设备数量
</string>
<string
name=
"order_remark"
>
工单备注
</string>
<string
name=
"server_desc"
>
任务描述
</string>
<string
name=
"server_content"
>
服务内容
</string>
...
...
@@ -605,6 +612,7 @@
<string
name=
"error_connect_time"
>
连接超时
</string>
<string
name=
"error_unknow"
>
未知错误
</string>
<string
name=
"error_pdf"
>
上传文件格式错误,请重新上传此文件。
</string>
<string
name=
"error_service_file"
>
无法识别该文件
</string>
<string
name=
"engineer_identity_auditing"
>
您的身份认证正在审核中,请耐心等待
</string>
<string
name=
"engineer_identity_not_audite"
>
您还没有进行身份认证
</string>
...
...
@@ -930,6 +938,7 @@ C) 在甲方使用大鱼平å°æœåŠ¡è¿‡ç¨‹ä¸äº§ç”Ÿçš„业务数æ®ï¼Œå®¢æˆ·æ•°æ
<string
name=
"user_rule_star5"
>
五星
</string>
<string
name=
"business_choose_scene"
>
请选择自己可开展销售的业务场景:
</string>
<string
name=
"business_choose_type"
>
请选择自己能提供服务的产品类型:
</string>
<string
name=
"pls_set_business_choose_type"
>
请设置自己能提供服务的产品类型
</string>
<string
name=
"licence_haved"
>
已获认证资质
</string>
<string
name=
"licence_all"
>
全部认证资质
</string>
<string
name=
"licence_apply_str"
>
申请
</string>
...
...
@@ -955,5 +964,9 @@ C) 在甲方使用大鱼平å°æœåŠ¡è¿‡ç¨‹ä¸äº§ç”Ÿçš„业务数æ®ï¼Œå®¢æˆ·æ•°æ
<string
name=
"record_done_service"
>
完成服务工单
</string>
<string
name=
"record_done_sale"
>
完成销售工单
</string>
<string
name=
"province_str"
>
省
</string>
<string
name=
"city_str"
>
市
</string>
<string
name=
"zone_str"
>
区/县
</string>
</resources>
baseSDK/src/main/res/values/styles.xml
View file @
3e0b61f3
...
...
@@ -45,16 +45,52 @@
<item
name=
"android:layout_marginRight"
>
0dp
</item>
</style>
<style
name=
"
sale_item_text
"
>
<style
name=
"
common_text_style
"
>
<item
name=
"android:layout_width"
>
wrap_content
</item>
<item
name=
"android:layout_height"
>
wrap_content
</item>
<item
name=
"android:maxLines"
>
1
</item>
<item
name=
"android:ellipsize"
>
end
</item>
<item
name=
"android:textColor"
>
@color/cl_home_title_text_color
</item>
<item
name=
"android:textSize"
>
@dimen/size_login_hint_text
</item>
</style>
<style
name=
"sale_item_text2"
parent=
"sale_item_text"
>
<style
name=
"part_left_text"
parent=
"common_text_style"
>
<item
name=
"android:layout_width"
>
80dp
</item>
</style>
<style
name=
"ll_part_bottom"
parent=
"common_text_style"
>
<item
name=
"android:layout_width"
>
match_parent
</item>
<item
name=
"android:layout_height"
>
wrap_content
</item>
<item
name=
"android:orientation"
>
horizontal
</item>
<item
name=
"android:gravity"
>
center_vertical
</item>
<item
name=
"android:layout_marginTop"
>
15dp
</item>
</style>
<style
name=
"part_select_addr"
parent=
"common_text_style"
>
<item
name=
"android:layout_width"
>
0dp
</item>
<item
name=
"android:layout_weight"
>
1
</item>
<item
name=
"android:maxLines"
>
1
</item>
<item
name=
"android:gravity"
>
center
</item>
<item
name=
"android:height"
>
25dp
</item>
<item
name=
"android:paddingRight"
>
5dp
</item>
<item
name=
"android:drawableRight"
>
@drawable/icon_arrow_down_gray32
</item>
<item
name=
"android:background"
>
@drawable/btn_gray_commom
</item>
</style>
<style
name=
"part_addr_edit"
parent=
"common_text_style"
>
<item
name=
"android:maxLines"
>
1
</item>
<item
name=
"android:layout_width"
>
match_parent
</item>
<item
name=
"android:layout_height"
>
35dp
</item>
<item
name=
"android:padding"
>
2dp
</item>
<item
name=
"android:gravity"
>
center
</item>
<item
name=
"android:background"
>
@drawable/bg_input_gray_react
</item>
</style>
<style
name=
"sale_item_text"
parent=
"common_text_style"
>
<item
name=
"android:maxLines"
>
1
</item>
</style>
<style
name=
"sale_item_text2"
parent=
"common_text_style"
>
<item
name=
"android:maxLines"
>
1
</item>
<item
name=
"android:layout_marginLeft"
>
3dp
</item>
</style>
...
...
@@ -64,12 +100,12 @@
<item
name=
"android:layout_marginRight"
>
@dimen/dp_20
</item>
</style>
<style
name=
"sale_detail_text2"
parent=
"
sale_item_text
"
>
<style
name=
"sale_detail_text2"
parent=
"
common_text_style
"
>
<item
name=
"android:layout_marginLeft"
>
3dp
</item>
<item
name=
"android:maxLines"
>
10
</item>
</style>
<style
name=
"sale_record_text"
parent=
"sale_item_text"
>
<style
name=
"sale_record_text"
parent=
"common_text_style"
>
<item
name=
"android:maxLines"
>
1
</item>
<item
name=
"android:layout_width"
>
100dp
</item>
<item
name=
"android:layout_marginRight"
>
@dimen/dp_15
</item>
</style>
...
...
@@ -83,12 +119,12 @@
<item
name=
"android:background"
>
@color/cl_white
</item>
</style>
<style
name=
"tv_user_edit"
parent=
"
sale_item_text
"
>
<style
name=
"tv_user_edit"
parent=
"
common_text_style
"
>
<item
name=
"android:textSize"
>
16sp
</item>
<item
name=
"android:layout_width"
>
90dp
</item>
</style>
<style
name=
"tv_user_edit2"
parent=
"
sale_item_text
"
>
<style
name=
"tv_user_edit2"
parent=
"
common_text_style
"
>
<item
name=
"android:textSize"
>
16sp
</item>
<item
name=
"android:layout_width"
>
80dp
</item>
</style>
...
...
build.gradle
View file @
3e0b61f3
...
...
@@ -6,7 +6,7 @@ buildscript {
ext
.
min_sdk_version
=
16
ext
.
target_sdk_version
=
26
ext
.
version_code
=
240
ext
.
verson_name
=
"2.4.0"
ext
.
verson_name
=
"
dev_
2.4.0"
ext
.
gradle_version
=
'3.1.4'
ext
.
isReleaseMinify
=
true
ext
.
isDebugMinify
=
false
...
...
orderCenter/src/main/debug/AndroidManifest.xml
View file @
3e0b61f3
...
...
@@ -17,7 +17,7 @@
</intent-filter>
</activity>
<activity
android:name=
".ui.activity.
a
pplyAndRefuseActivity"
android:name=
".ui.activity.
A
pplyAndRefuseActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activity.SopWebViewActivity"
...
...
orderCenter/src/main/java/com/dayu/order/presenter/orderdoing/OrderDoingPresenter.java
View file @
3e0b61f3
...
...
@@ -17,6 +17,7 @@ import com.dayu.order.ui.activity.MultiProcessOrderActivity;
import
com.dayu.order.ui.activity.OrderDetailsActivity
;
import
com.dayu.order.ui.activity.OrderLivenessActivity
;
import
com.dayu.order.ui.activity.SopWebViewActivity
;
import
com.dayu.order.ui.fragment.OrderDoneFragment
;
import
com.dayu.order.ui.fragment.OrderThreeTabFragment
;
import
com.dayu.provider.event.RefreshTab
;
import
com.dayu.utils.AppManager
;
...
...
@@ -65,7 +66,10 @@ public class OrderDoingPresenter extends orderDoingContract.Presenter {
if
(
mView
instanceof
OrderThreeTabFragment
)
{
mView
.
showDialog
();
getErrorOrder
();
}
else
{
}
else
if
(
mView
instanceof
OrderDoneFragment
){
mPage
=
1
;
getDoneOrders
();
}
else
{
mPage
=
1
;
getOrders
(
mState
,
mUserId
,
mSiteId
,
mPage
,
Constants
.
PAGESIZE
);
}
...
...
@@ -73,8 +77,12 @@ public class OrderDoingPresenter extends orderDoingContract.Presenter {
@Override
public
void
loadMore
()
{
if
(
mView
instanceof
OrderDoneFragment
){
getDoneOrders
();
}
else
{
getOrders
(
mState
,
mUserId
,
mSiteId
,
mPage
,
Constants
.
PAGESIZE
);
}
}
@Override
public
ObservableField
<
Object
>
getSourceDatas
()
{
...
...
@@ -91,6 +99,16 @@ public class OrderDoingPresenter extends orderDoingContract.Presenter {
},
responeThrowable
->
datas
.
set
(
Constants
.
FAILED
)));
}
//已完成订单
public
void
getDoneOrders
()
{
mView
.
showDialog
();
OrderApiFactory
.
searchOrder
(
null
,
mSiteId
,
mUserId
,
Constants
.
FINISH_ORDER
,
mPage
,
Constants
.
PAGESIZE
)
.
subscribe
(
baseObserver
(
orderBasePageBean
->
{
datas
.
set
(
orderBasePageBean
);
mPage
++;
},
throwable
->
datas
.
set
(
Constants
.
FAILED
)));
}
@Override
public
void
getErrorOrder
()
{
OrderApiFactory
.
getErrorOrders
(
mUserId
,
mSiteId
).
subscribe
(
...
...
orderCenter/src/main/java/com/dayu/order/presenter/orderpart/OrderPartPresenter.java
View file @
3e0b61f3
...
...
@@ -9,7 +9,7 @@ import com.dayu.order.R;
import
com.dayu.order.api.OrderApiFactory
;
import
com.dayu.order.api.protocol.OrderDetail
;
import
com.dayu.order.api.protocol.OrderPart
;
import
com.dayu.order.ui.activity.
a
pplyAndRefuseActivity
;
import
com.dayu.order.ui.activity.
A
pplyAndRefuseActivity
;
import
com.dayu.order.ui.activity.LogisticsInfoActivity
;
import
com.dayu.order.ui.activity.ReturnPartActivity
;
import
com.dayu.utils.UIUtils
;
...
...
@@ -68,7 +68,7 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
Constants
.
ORDER_ID
,
mOrderId
);
bundle
.
putInt
(
Constants
.
TYPE
,
Constants
.
APPLY_PART
);
mView
.
startActivity
(
a
pplyAndRefuseActivity
.
class
,
bundle
);
mView
.
startActivity
(
A
pplyAndRefuseActivity
.
class
,
bundle
);
MobclickAgent
.
onEvent
(
BaseApplication
.
getContext
(),
"applyApply"
);
}
else
if
(
mType
==
2
)
{
dumpToReturnPart
(
Constants
.
BYMYSELF
,
null
);
...
...
@@ -81,7 +81,7 @@ public class OrderPartPresenter extends OrderPartContract.Presenter {
bundle
.
putInt
(
Constants
.
ORDER_ID
,
mOrderId
);
bundle
.
putInt
(
Constants
.
PART_ID
,
partId
);
bundle
.
putInt
(
Constants
.
TYPE
,
Constants
.
REFUSE_PART
);
mView
.
startActivity
(
a
pplyAndRefuseActivity
.
class
,
bundle
);
mView
.
startActivity
(
A
pplyAndRefuseActivity
.
class
,
bundle
);
MobclickAgent
.
onEvent
(
BaseApplication
.
getContext
(),
"refuseApply"
);
}
...
...
orderCenter/src/main/java/com/dayu/order/ui/activity/ApplyAndRefuseActivity.java
0 → 100755
View file @
3e0b61f3
package
com
.
dayu
.
order
.
ui
.
activity
;
import
android.text.TextUtils
;
import
android.view.View
;
import
com.dayu.base.api.APIService
;
import
com.dayu.base.api.Api
;
import
com.dayu.base.api.protocol.TreeAddressBean
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.common.Constants
;
import
com.dayu.order.R
;
import
com.dayu.order.databinding.ActivityApplyRefuseLayoutBinding
;
import
com.dayu.order.presenter.commonSubmite.ApplayAndRefusePresenter
;
import
com.dayu.order.presenter.commonSubmite.ApplyAndRefuseContract
;
import
com.dayu.widgets.WheelDialog
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* Created by luofan
* on 2017/11/8.
* 申请备件
*/
public
class
ApplyAndRefuseActivity
extends
BaseActivity
<
ApplayAndRefusePresenter
,
ActivityApplyRefuseLayoutBinding
>
implements
ApplyAndRefuseContract
.
View
{
private
String
name
;
private
String
phone
;
private
String
provinceName
;
private
String
cityName
;
private
String
areaName
;
private
String
detailAddr
;
private
int
provinceId
;
private
int
cityId
;
private
int
areaId
;
private
List
<
TreeAddressBean
>
provinceList
=
new
ArrayList
<>();
private
List
<
TreeAddressBean
>
cityList
=
new
ArrayList
<>();
private
List
<
TreeAddressBean
>
areaList
=
new
ArrayList
<>();
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_apply_refuse_layout
;
}
@Override
public
void
initView
()
{
getTreeAddrData
(-
1
,
1
,
false
);
setListener
();
}
private
void
setListener
()
{
mBind
.
tvArea
.
setOnClickListener
(
v
->
{
if
(
TextUtils
.
isEmpty
(
provinceName
))
{
getTreeAddrData
(-
1
,
1
,
true
);
}
else
if
(
TextUtils
.
isEmpty
(
cityName
))
{
getTreeAddrData
(
provinceId
,
2
,
true
);
}
else
{
getTreeAddrData
(
cityId
,
3
,
true
);
}
});
mBind
.
tvCity
.
setOnClickListener
(
v
->
{
if
(
TextUtils
.
isEmpty
(
provinceName
))
{
getTreeAddrData
(-
1
,
1
,
true
);
}
else
{
getTreeAddrData
(
provinceId
,
2
,
true
);
}
});
mBind
.
tvProvince
.
setOnClickListener
(
v
->
{
getTreeAddrData
(-
1
,
1
,
true
);
});
}
@Override
public
void
setPresenter
()
{
mBind
.
setPresenter
(
mPresenter
);
}
/**
* 获取地址信息
*
* @param pId
* @param type 1.省 2.市 3.区
* @param showDialog 是否显示选择框
*/
private
void
getTreeAddrData
(
int
pId
,
int
type
,
boolean
showDialog
)
{
if
(
Constants
.
treeAddressMap
.
containsKey
(
pId
)
&&
Constants
.
treeAddressMap
.
get
(
pId
).
size
()
>
0
)
{
dealAddrData
(
type
,
showDialog
,
Constants
.
treeAddressMap
.
get
(
pId
));
}
else
{
if
(
showDialog
)
showDialog
();
Api
.
getService
(
APIService
.
class
).
getTreeAddress
(
pId
).
compose
(
Api
.
applySchedulers
())
.
safeSubscribe
(
mPresenter
.
baseObserver
(
datas
->
{
dealAddrData
(
type
,
showDialog
,
datas
);
Constants
.
treeAddressMap
.
put
(
pId
,
datas
);
}));
}
}
//处理获取到地址信息数据
private
void
dealAddrData
(
int
type
,
boolean
showDialog
,
List
<
TreeAddressBean
>
datas
)
{
switch
(
type
)
{
case
1
:
provinceList
=
datas
;
break
;
case
2
:
cityList
=
datas
;
break
;
case
3
:
areaList
=
datas
;
break
;
}
if
(
showDialog
)
showAddrDialog
(
type
,
datas
);
}
/**
* 地址选择弹框
*
* @param type
* @param addressList
*/
private
void
showAddrDialog
(
int
type
,
List
<
TreeAddressBean
>
addressList
)
{
List
<
String
>
addrs
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
addressList
.
size
();
i
++)
{
addrs
.
add
(
addressList
.
get
(
i
).
getText
());
}
WheelDialog
.
getInstance
().
show
(
this
,
addrs
,
pos
->
{
onAddrChoosed
(
type
,
pos
);
});
}
//选择弹框内的地址后
private
void
onAddrChoosed
(
int
type
,
int
index
)
{
switch
(
type
)
{
case
1
:
if
(
provinceList
.
get
(
index
).
getText
().
equals
(
provinceName
))
return
;
provinceId
=
Integer
.
parseInt
(
provinceList
.
get
(
index
).
getId
());
provinceName
=
provinceList
.
get
(
index
).
getText
();
getTreeAddrData
(
provinceId
,
2
,
false
);
cityList
.
clear
();
areaList
.
clear
();
updateAddressView
();
break
;
case
2
:
if
(
cityList
.
get
(
index
).
getText
().
equals
(
cityName
))
return
;
cityId
=
Integer
.
parseInt
(
cityList
.
get
(
index
).
getId
());
cityName
=
cityList
.
get
(
index
).
getText
();
getTreeAddrData
(
cityId
,
3
,
false
);
areaList
.
clear
();
updateAddressView
();
break
;
case
3
:
if
(
areaList
.
get
(
index
).
getText
().
equals
(
areaName
))
return
;
areaId
=
Integer
.
parseInt
(
areaList
.
get
(
index
).
getId
());
areaName
=
areaList
.
get
(
index
).
getText
();
mBind
.
tvArea
.
setText
(
areaName
);
// updateSubmitState();
break
;
}
}
//更新选择地址布局显示
private
void
updateAddressView
()
{
cityId
=
cityList
.
size
()
>
0
?
cityId
:
0
;
cityName
=
cityList
.
size
()
>
0
?
cityName
:
""
;
areaId
=
areaList
.
size
()
>
0
?
areaId
:
0
;
areaName
=
areaList
.
size
()
>
0
?
areaName
:
""
;
mBind
.
tvProvince
.
setText
(
provinceName
);
mBind
.
tvCity
.
setText
(
cityName
);
mBind
.
tvArea
.
setText
(
areaName
);
// updateSubmitState();
}
}
orderCenter/src/main/java/com/dayu/order/ui/activity/PdfWebViewActivity.java
View file @
3e0b61f3
package
com
.
dayu
.
order
.
ui
.
activity
;
import
android.app.DownloadManager
;
import
android.net.Uri
;
import
android.os.Build
;
import
android.os.Environment
;
import
android.text.TextUtils
;
import
android.webkit.DownloadListener
;
import
android.webkit.URLUtil
;
import
android.webkit.WebChromeClient
;
import
android.webkit.WebSettings
;
import
android.webkit.WebView
;
...
...
@@ -14,6 +19,7 @@ import com.dayu.common.Constants;
import
com.dayu.order.R
;
import
com.dayu.order.common.OrderConstant
;
import
com.dayu.utils.Base64Encoder
;
import
com.dayu.utils.ToastUtils
;
import
java.io.File
;
import
java.io.UnsupportedEncodingException
;
...
...
@@ -51,6 +57,7 @@ public class PdfWebViewActivity extends DataBindingActivity<ActivityWebviewBindi
settings
.
setAllowFileAccessFromFileURLs
(
true
);
settings
.
setAllowUniversalAccessFromFileURLs
(
true
);
settings
.
setBuiltInZoomControls
(
true
);
settings
.
setSupportZoom
(
true
);
mPdfWebView
.
setWebViewClient
(
new
WebViewClient
()
{
@Override
...
...
@@ -80,6 +87,14 @@ public class PdfWebViewActivity extends DataBindingActivity<ActivityWebviewBindi
}
mPdfWebView
.
loadUrl
(
"file:///android_asset/pdfjs_compatibility/web/viewer.html?file="
+
docPath
);
}
mPdfWebView
.
setDownloadListener
(
new
DownloadListener
()
{
@Override
public
void
onDownloadStart
(
String
url
,
String
userAgent
,
String
contentDisposition
,
String
mimeType
,
long
contentLength
)
{
ToastUtils
.
showShortToast
(
"download "
+
docPath
);
downloadBySystem
(
docPath
,
contentDisposition
,
mimeType
);
}
});
}
@Override
...
...
@@ -129,4 +144,35 @@ public class PdfWebViewActivity extends DataBindingActivity<ActivityWebviewBindi
file
.
delete
();
}
}
private
void
downloadBySystem
(
String
url
,
String
contentDisposition
,
String
mimeType
)
{
// 指定下载地址
DownloadManager
.
Request
request
=
new
DownloadManager
.
Request
(
Uri
.
parse
(
url
));
// 允许媒体扫描,根据下载的文件类型被加入相册、音乐等媒体库
request
.
allowScanningByMediaScanner
();
// 设置通知的显示类型,下载进行时和完成后显示通知
request
.
setNotificationVisibility
(
DownloadManager
.
Request
.
VISIBILITY_VISIBLE_NOTIFY_COMPLETED
);
// 设置通知栏的标题,如果不设置,默认使用文件名
// request.setTitle("This is title");
// 设置通知栏的描述
// request.setDescription("This is description");
// 允许在计费流量下下载
request
.
setAllowedOverMetered
(
false
);
// 允许该记录在下载管理界面可见
request
.
setVisibleInDownloadsUi
(
false
);
// 允许漫游时下载
request
.
setAllowedOverRoaming
(
true
);
// 允许下载的网路类型
request
.
setAllowedNetworkTypes
(
DownloadManager
.
Request
.
NETWORK_WIFI
);
// 设置下载文件保存的路径和文件名
String
fileName
=
URLUtil
.
guessFileName
(
url
,
contentDisposition
,
mimeType
);
request
.
setDestinationInExternalPublicDir
(
Environment
.
DIRECTORY_DOWNLOADS
,
fileName
);
// 另外可选一下方法,自定义下载路径
// request.setDestinationUri()
// request.setDestinationInExternalFilesDir()
final
DownloadManager
downloadManager
=
(
DownloadManager
)
getSystemService
(
DOWNLOAD_SERVICE
);
// 添加一个下载任务
long
downloadId
=
downloadManager
.
enqueue
(
request
);
}
}
orderCenter/src/main/java/com/dayu/order/ui/activity/ReturnPartActivity.java
View file @
3e0b61f3
...
...
@@ -14,6 +14,7 @@ import java.util.List;
/**
* Created by luofan on 2018/1/20.
* 寄回备件
*/
public
class
ReturnPartActivity
extends
BaseActivity
<
ReturnPartPresenter
,
ActivityReturnPartBinding
>
implements
ReturnPartContract
.
View
{
...
...
orderCenter/src/main/java/com/dayu/order/ui/activity/applyAndRefuseActivity.java
deleted
100755 → 0
View file @
470d1508
package
com
.
dayu
.
order
.
ui
.
activity
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.order.R
;
import
com.dayu.order.databinding.ActivityApplyRefuseLayoutBinding
;
import
com.dayu.order.presenter.commonSubmite.ApplayAndRefusePresenter
;
import
com.dayu.order.presenter.commonSubmite.ApplyAndRefuseContract
;
/**
* Created by luofan
* on 2017/11/8.
*/
public
class
applyAndRefuseActivity
extends
BaseActivity
<
ApplayAndRefusePresenter
,
ActivityApplyRefuseLayoutBinding
>
implements
ApplyAndRefuseContract
.
View
{
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_apply_refuse_layout
;
}
@Override
public
void
initView
()
{
}
@Override
public
void
setPresenter
()
{
mBind
.
setPresenter
(
mPresenter
);
}
}
orderCenter/src/main/java/com/dayu/order/ui/adapter/OrderAdapter.java
View file @
3e0b61f3
...
...
@@ -112,7 +112,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
String
time
=
""
;
switch
(
item
.
getStatus
())
{
case
1
:
//待接单
holder
.
tvItemProcess
.
setVisibility
(
View
.
GONE
);
holder
.
rlItemEnd
.
setVisibility
(
View
.
GONE
);
holder
.
itemUpdataTime
.
setVisibility
(
View
.
GONE
);
holder
.
orderLineOne
.
setVisibility
(
View
.
GONE
);
holder
.
orderLineTwo
.
setVisibility
(
View
.
GONE
);
...
...
@@ -134,12 +134,18 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
holder
.
orderLineOne
.
setVisibility
(
View
.
VISIBLE
);
}
holder
.
tvItemProcess
.
setVisibility
(
View
.
GONE
);
holder
.
rlItemEnd
.
setVisibility
(
View
.
GONE
);
holder
.
orderLineTwo
.
setVisibility
(
View
.
GONE
);
holder
.
itemUpdataTime
.
setText
(
mContext
.
getString
(
R
.
string
.
appointment_time
));
holder
.
itemUpdataTime
.
setVisibility
(
View
.
GONE
);
holder
.
tvItemMid
.
setVisibility
(
View
.
VISIBLE
);
holder
.
tvOrderTime
.
setText
(
mContext
.
getString
(
R
.
string
.
have_appointment
));
time
=
item
.
getAppointmentTime
();
break
;
case
3
:
//待服务
holder
.
tvItemProcess
.
setVisibility
(
View
.
GONE
);
holder
.
tvItemEnd
.
setVisibility
(
View
.
VISIBLE
);
if
(!
haveCustomer
)
{
holder
.
itemTextPhone
.
setVisibility
(
View
.
GONE
);
holder
.
orderLineOne
.
setVisibility
(
View
.
GONE
);
...
...
@@ -156,6 +162,8 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
time
=
item
.
getConfirmDoorTime
();
break
;
case
4
:
//待处理
holder
.
tvItemProcess
.
setVisibility
(
View
.
GONE
);
holder
.
tvItemEnd
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemUpdataTime
.
setText
(
mContext
.
getString
(
R
.
string
.
need_again_door
));
holder
.
tvItemProcess
.
setText
(
mContext
.
getString
(
R
.
string
.
process_order
));
if
(!
haveCustomer
)
{
...
...
@@ -170,7 +178,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
holder
.
tvErrorState
.
setTextColor
(
mContext
.
getResources
().
getColor
(
R
.
color
.
cl_tab_line
));
holder
.
tvErrorState
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemUpdataTime
.
setVisibility
(
View
.
VISIBLE
);
holder
.
tvItemProcess
.
setVisibility
(
View
.
GONE
);
holder
.
rlItemEnd
.
setVisibility
(
View
.
GONE
);
holder
.
orderLineOne
.
setVisibility
(
View
.
VISIBLE
);
holder
.
orderLineTwo
.
setVisibility
(
View
.
GONE
);
holder
.
itemUpdataTime
.
setText
(
mContext
.
getString
(
R
.
string
.
customer_acceptance
));
...
...
@@ -189,8 +197,8 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
holder
.
tvErrorState
.
setText
(
mContext
.
getString
(
R
.
string
.
order_finish
));
holder
.
tvErrorState
.
setTextColor
(
mContext
.
getResources
().
getColor
(
R
.
color
.
cl_tab_line
));
holder
.
tvErrorState
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemUpdataTime
.
setVisibility
(
View
.
GONE
);
holder
.
tvItemProcess
.
setVisibility
(
View
.
GONE
);
holder
.
rlItemMid
.
setVisibility
(
View
.
GONE
);
holder
.
rlItemEnd
.
setVisibility
(
View
.
GONE
);
holder
.
orderLineOne
.
setVisibility
(
View
.
GONE
);
holder
.
orderLineTwo
.
setVisibility
(
View
.
GONE
);
if
(!
haveCustomer
)
{
...
...
@@ -199,6 +207,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
}
else
{
holder
.
llBottom
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemBottomLine
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemTextPhone
.
setText
(
R
.
string
.
phone_back_customer
);
}
time
=
item
.
getConfirmDoorTime
();
break
;
...
...
@@ -235,10 +244,10 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
holder
.
tvErrorState
.
setVisibility
(
View
.
VISIBLE
);
}
holder
.
tvItemProcess
.
setOnClickListener
(
holder
.
rlItemEnd
.
setOnClickListener
(
v
->
processClick
(
item
,
holder
,
position
));
String
temp
=
time
;
holder
.
itemUpdataTime
.
setOnClickListener
(
v
->
{
holder
.
rlItemMid
.
setOnClickListener
(
v
->
{
if
(
item
.
getStatus
()
==
4
&&
item
.
getSubStatus
()
==
6
)
{
Bundle
bundle
=
new
Bundle
();
bundle
.
putInt
(
Constants
.
ORDER_ID
,
item
.
getId
());
...
...
@@ -260,9 +269,11 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
});
if
(
item
.
getStatus
()
!=
1
)
{
holder
.
itemTextPhone
.
setOnClickListener
(
v
->
{
if
(!
TextUtils
.
isEmpty
(
item
.
getCustomerTelphome
()))
{
if
(!
TextUtils
.
isEmpty
(
item
.
getCustomerTelphome
())
&&
!
TextUtils
.
isEmpty
(
item
.
getCustomerMobile
())
)
{
showMoblieDialog
(
item
.
getCustomerMobile
(),
item
.
getCustomerTelphome
());
}
else
{
}
else
if
(!
TextUtils
.
isEmpty
(
item
.
getCustomerTelphome
())){
takePhone
(
item
.
getCustomerTelphome
());
}
else
if
(!
TextUtils
.
isEmpty
(
item
.
getCustomerMobile
())){
takePhone
(
item
.
getCustomerMobile
());
}
Map
<
String
,
String
>
map_ekv
=
new
HashMap
<>();
...
...
@@ -285,23 +296,27 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
}
holder
.
itemTextWeixiu
.
setText
(
item
.
getSpus
().
get
(
0
).
getProviderTypeName
());
holder
.
itemTextWeixiuLeixing
.
setText
(
item
.
getSpus
().
get
(
0
).
getCategoryThreeName
());
Spu
spu
=
item
.
getSpus
().
get
(
0
);
holder
.
tvServerType
.
setVisibility
(
View
.
VISIBLE
);
if
(
item
.
getSpus
().
size
()
>
1
)
{
String
str
=
UIUtils
.
getString
(
R
.
string
.
server_num
);
String
result
=
String
.
format
(
str
,
item
.
getSpus
().
size
());
holder
.
tvServerType
.
setText
(
result
);
}
else
{
String
str
=
UIUtils
.
getString
(
R
.
string
.
single_server_num
);
String
result
=
String
.
format
(
str
,
spu
.
getFinNum
(),
spu
.
getGoodNum
());
holder
.
tvServerType
.
setText
(
result
);
}
//
Spu spu = item.getSpus().get(0);
//
holder.tvServerType.setVisibility(View.VISIBLE);
//
if (item.getSpus().size() > 1) {
//
String str = UIUtils.getString(R.string.server_num);
//
String result = String.format(str, item.getSpus().size());
//
holder.tvServerType.setText(result);
//
} else {
//
String str = UIUtils.getString(R.string.single_server_num);
//
String result = String.format(str, spu.getFinNum(), spu.getGoodNum());
//
holder.tvServerType.setText(result);
//
}
}
else
{
holder
.
tvServerType
.
setVisibility
(
View
.
GONE
);
}
}
private
void
processClickNew
(
Order
it
,
FragmentOrderdoingItemBinding
h
,
int
posiiton
)
{
mItem
=
it
;
dumpProcessActivity
(
mItem
,
posiiton
);
}
private
void
processClick
(
Order
it
,
FragmentOrderdoingItemBinding
h
,
int
posiiton
)
{
mItem
=
it
;
mBind
=
h
;
...
...
orderCenter/src/main/java/com/dayu/order/ui/adapter/OrderServerAdapter.java
View file @
3e0b61f3
...
...
@@ -33,18 +33,18 @@ public class OrderServerAdapter extends CoreAdapter<OrderDetail.RecordBean, Serv
OrderServerPresenter
presenter
=
(
OrderServerPresenter
)
mPresenter
;
if
(
position
==
0
)
{
holder
.
ivCircle
.
setImageResource
(
R
.
drawable
.
icon_circle_blue
);
holder
.
serverCheck
.
setBackgroundResource
(
R
.
drawable
.
tab_blue_react
);
holder
.
serverCheck
.
setGravity
(
Gravity
.
CENTER
);
holder
.
serverCheck
.
setTextColor
(
UIUtils
.
getColor
(
R
.
color
.
white
));
//
holder.serverCheck.setBackgroundResource(R.drawable.tab_blue_react);
//
holder.serverCheck.setGravity(Gravity.CENTER);
//
holder.serverCheck.setTextColor(UIUtils.getColor(R.color.white));
holder
.
serverTimeComment
.
setTextColor
(
UIUtils
.
getColor
(
R
.
color
.
default_text_color
));
holder
.
serverTime
.
setTextColor
(
UIUtils
.
getColor
(
R
.
color
.
default_text_color
));
holder
.
serverComment
.
setTextColor
(
UIUtils
.
getColor
(
R
.
color
.
default_text_color
));
holder
.
serverState
.
setTextColor
(
UIUtils
.
getColor
(
R
.
color
.
default_text_color
));
}
else
{
holder
.
ivCircle
.
setImageResource
(
R
.
drawable
.
icon_circle_gray
);
holder
.
serverCheck
.
setBackground
(
null
);
holder
.
serverCheck
.
setGravity
(
Gravity
.
LEFT
);
holder
.
serverCheck
.
setTextColor
(
UIUtils
.
getColor
(
R
.
color
.
cl_receiving_order_item_data
));
//
holder.serverCheck.setBackground(null);
//
holder.serverCheck.setGravity(Gravity.LEFT);
//
holder.serverCheck.setTextColor(UIUtils.getColor(R.color.cl_receiving_order_item_data));
holder
.
serverTimeComment
.
setTextColor
(
UIUtils
.
getColor
(
R
.
color
.
cl_order_text_one
));
holder
.
serverTime
.
setTextColor
(
UIUtils
.
getColor
(
R
.
color
.
cl_order_text_one
));
holder
.
serverComment
.
setTextColor
(
UIUtils
.
getColor
(
R
.
color
.
cl_order_text_one
));
...
...
orderCenter/src/main/java/com/dayu/order/ui/fragment/HomeOrderFragment.java
View file @
3e0b61f3
...
...
@@ -63,7 +63,7 @@ public class HomeOrderFragment extends BaseFragment<HomeOrderPresenter, Fragment
@Override
public
void
initView
()
{
// tabDesc = new String[]{mActivity.getString(R.string.waite_appointemnt), mActivity.getString(R.string.waite_server), mActivity.getString(R.string.order_exception), mActivity.getString(R.string.cancle_order)};
tabDesc
=
new
String
[]{
mActivity
.
getString
(
R
.
string
.
to_be_receive
),
mActivity
.
getString
(
R
.
string
.
waite_appointemnt
),
mActivity
.
getString
(
R
.
string
.
waite_server
),
mActivity
.
getString
(
R
.
string
.
order_
exception
)};
tabDesc
=
new
String
[]{
mActivity
.
getString
(
R
.
string
.
to_be_receive
),
mActivity
.
getString
(
R
.
string
.
waite_appointemnt
),
mActivity
.
getString
(
R
.
string
.
waite_server
),
mActivity
.
getString
(
R
.
string
.
order_
already_done
)};
// 新建工单
// if (UserManager.getInstance().getRole() == Constants.ENGINEER) {
// mBind.createOrder.setVisibility(View.VISIBLE);
...
...
@@ -94,7 +94,8 @@ public class HomeOrderFragment extends BaseFragment<HomeOrderPresenter, Fragment
list_fragments
.
add
(
new
OrderReceivingFragment
());
list_fragments
.
add
(
new
OrderFirstTabFragment
());
list_fragments
.
add
(
new
OrderSecondTabFragment
());
list_fragments
.
add
(
new
OrderThreeTabFragment
());
list_fragments
.
add
(
new
OrderDoneFragment
());
// list_fragments.add(new OrderThreeTabFragment());
// list_fragments.add(new OrderFourTabFragment());
adapter
=
new
FragmentAdapter
(
getFragmentManager
(),
list_fragments
);
mBind
.
vpHome
.
setAdapter
(
adapter
);
...
...
@@ -102,7 +103,7 @@ public class HomeOrderFragment extends BaseFragment<HomeOrderPresenter, Fragment
mBind
.
tbHome
.
setTabMode
(
TabLayout
.
MODE_FIXED
);
mBind
.
vpHome
.
setOffscreenPageLimit
(
4
);
mBind
.
tbHome
.
post
(()
->
TabLayoutUtils
.
setIndicator
(
mBind
.
tbHome
,
15
,
15
,
R
.
color
.
cl_order_item_line_bg
,
mActivity
));
TabLayoutUtils
.
setIndicator
(
mBind
.
tbHome
,
0
,
0
,
R
.
color
.
cl_order_item_line_bg
,
mActivity
));
mBind
.
tbHome
.
addOnTabSelectedListener
(
new
TabLayout
.
OnTabSelectedListener
()
{
@Override
public
void
onTabSelected
(
TabLayout
.
Tab
tab
)
{
...
...
@@ -110,41 +111,12 @@ public class HomeOrderFragment extends BaseFragment<HomeOrderPresenter, Fragment
if
(
tab
.
getCustomView
()
==
null
)
{
return
;
}
mTabNumTv
=
tab
.
getCustomView
().
findViewById
(
R
.
id
.
tabtext
);
mTabTextTv
=
tab
.
getCustomView
().
findViewById
(
R
.
id
.
tabicon
);
switch
(
temp
)
{
case
0
:
mTabNumTv
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
bg_button
));
mTabTextTv
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
bg_button
));
mBind
.
vpHome
.
setCurrentItem
(
0
);
MobclickAgent
.
onPageStart
(
"OrderFirstTabFragment"
);
mUmTag
=
"OrderFirstTabFragment"
;
break
;
case
1
:
mTabNumTv
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
cl_order_item_date
));
mTabTextTv
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
cl_order_item_date
));
mBind
.
vpHome
.
setCurrentItem
(
1
);
mUmTag
=
"OrderSecondTabFragment"
;
MobclickAgent
.
onPageStart
(
"OrderSecondTabFragment"
);
break
;
case
2
:
mTabNumTv
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
cl_tab_yellow
));
mTabTextTv
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
cl_tab_yellow
));
mBind
.
vpHome
.
setCurrentItem
(
2
);
mUmTag
=
"OrderThreeTabFragment"
;
MobclickAgent
.
onPageStart
(
"OrderThreeTabFragment"
);
break
;
case
3
:
mTabNumTv
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
cl_tab_read
));
mTabTextTv
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
cl_tab_read
));
mBind
.
vpHome
.
setCurrentItem
(
3
);
mUmTag
=
"OrderFourTabFragment"
;
MobclickAgent
.
onPageStart
(
"OrderFourTabFragment"
);
break
;
// case 3:
// mBind.vpHome.setCurrentItem(3);
// break;
}
mBind
.
vpHome
.
setCurrentItem
(
temp
);
MobclickAgent
.
onPageStart
(
"HomeOrederFragment_tab"
+
temp
);
}
@Override
...
...
@@ -152,26 +124,8 @@ public class HomeOrderFragment extends BaseFragment<HomeOrderPresenter, Fragment
if
(
mTabNumTv
==
null
||
mTabTextTv
==
null
)
{
return
;
}
switch
(
tab
.
getPosition
())
{
case
0
:
mTabNumTv
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
cl_tab_init
));
mTabTextTv
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
cl_tab_init
));
MobclickAgent
.
onPageEnd
(
"OrderFirstTabFragment"
);
break
;
case
1
:
mTabNumTv
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
cl_tab_init
));
mTabTextTv
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
cl_tab_init
));
MobclickAgent
.
onPageEnd
(
"OrderSecondTabFragment"
);
break
;
case
2
:
mTabNumTv
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
cl_tab_init
));
mTabTextTv
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
cl_tab_init
));
MobclickAgent
.
onPageEnd
(
"OrderThreeTabFragment"
);
break
;
case
3
:
MobclickAgent
.
onPageEnd
(
"OrderFourTabFragment"
);
break
;
}
MobclickAgent
.
onPageEnd
(
"HomeOrederFragment_tab"
+
tab
.
getPosition
());
}
@Override
...
...
@@ -193,13 +147,13 @@ public class HomeOrderFragment extends BaseFragment<HomeOrderPresenter, Fragment
// tab.getError() + "", tab.getCanceled() + ""};
String
[]
tabNum
=
new
String
[]{
tab
.
getWaits
()
+
""
,
tab
.
getReservation
()
+
""
,
tab
.
getPendingservice
()
+
""
,
tab
.
getError
()
+
""
};
EventBus
.
getDefault
().
post
(
new
TabNumEvent
(
tab
.
getPendingservice
()+
tab
.
getWaits
()+
tab
.
getReservation
()
+
tab
.
getError
()
));
EventBus
.
getDefault
().
post
(
new
TabNumEvent
(
tab
.
getPendingservice
()+
tab
.
getWaits
()+
tab
.
getReservation
()));
if
(
isFirstAddTab
)
{
mBind
.
tbHome
.
removeAllTabs
();
mBind
.
tbHome
.
addTab
(
mBind
.
tbHome
.
newTab
().
setCustomView
(
CreatTab
(
tabNum
[
0
],
tabDesc
[
0
])));
mBind
.
tbHome
.
addTab
(
mBind
.
tbHome
.
newTab
().
setCustomView
(
CreatTab
(
tabNum
[
1
],
tabDesc
[
1
])));
mBind
.
tbHome
.
addTab
(
mBind
.
tbHome
.
newTab
().
setCustomView
(
CreatTab
(
tabNum
[
2
],
tabDesc
[
2
])));
mBind
.
tbHome
.
addTab
(
mBind
.
tbHome
.
newTab
().
setCustomView
(
CreatTab
(
tabNum
[
3
],
tabDesc
[
3
])));
mBind
.
tbHome
.
addTab
(
mBind
.
tbHome
.
newTab
().
setCustomView
(
CreatTab
(
0
,
tabNum
[
0
],
tabDesc
[
0
])));
mBind
.
tbHome
.
addTab
(
mBind
.
tbHome
.
newTab
().
setCustomView
(
CreatTab
(
1
,
tabNum
[
1
],
tabDesc
[
1
])));
mBind
.
tbHome
.
addTab
(
mBind
.
tbHome
.
newTab
().
setCustomView
(
CreatTab
(
2
,
tabNum
[
2
],
tabDesc
[
2
])));
mBind
.
tbHome
.
addTab
(
mBind
.
tbHome
.
newTab
().
setCustomView
(
CreatTab
(
3
,
tabNum
[
3
],
tabDesc
[
3
])));
isFirstAddTab
=
false
;
}
else
{
for
(
int
i
=
0
;
i
<
mBind
.
tbHome
.
getTabCount
();
i
++)
{
...
...
@@ -221,11 +175,16 @@ public class HomeOrderFragment extends BaseFragment<HomeOrderPresenter, Fragment
* @param number tab标签上的数字(更新频繁)
* @param iconID tab标签数字下的状态说明(1.0版本默认4种状态)
*/
private
View
CreatTab
(
String
number
,
String
iconID
)
{
private
View
CreatTab
(
int
index
,
String
number
,
String
iconID
)
{
View
newtab
=
LayoutInflater
.
from
(
mActivity
).
inflate
(
R
.
layout
.
activity_home_tab
,
null
);
TextView
textView_number
=
newtab
.
findViewById
(
R
.
id
.
tabtext
);
AssetManager
mgr
=
mActivity
.
getAssets
();
Typeface
tf
=
Typeface
.
createFromAsset
(
mgr
,
"fonts/DIN Alternate Bold.ttf"
);
if
(
index
==
3
){
textView_number
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
cl_tab_gray
));
}
else
{
textView_number
.
setTextColor
(
getResources
().
getColor
(
R
.
color
.
cl_tab_read
));
}
textView_number
.
setTypeface
(
tf
);
textView_number
.
setText
(
number
);
TextView
textView
=
newtab
.
findViewById
(
R
.
id
.
tabicon
);
...
...
orderCenter/src/main/java/com/dayu/order/ui/fragment/MultiOrderDetailFragment.java
View file @
3e0b61f3
...
...
@@ -47,7 +47,6 @@ import java.util.List;
public
class
MultiOrderDetailFragment
extends
DataBindingFragment
<
FragmentMultiDetailBinding
>
{
private
CoreAdapter
<
Spu
,
ItemDetailServerInfoBinding
>
mServerAdapter
;
private
CoreAdapter
mFujianAdapter
;
private
boolean
mFlag
=
true
;
...
...
@@ -103,7 +102,7 @@ public class MultiOrderDetailFragment extends DataBindingFragment<FragmentMultiD
intent
.
putExtra
(
OrderConstant
.
TITLE
,
item
.
getName
());
startActivity
(
intent
);
}
else
{
ToastUtils
.
showShortToast
(
R
.
string
.
error_
pdf
);
ToastUtils
.
showShortToast
(
R
.
string
.
error_
service_file
);
}
}
});
...
...
orderCenter/src/main/java/com/dayu/order/ui/fragment/OrderDoneFragment.java
0 → 100644
View file @
3e0b61f3
package
com
.
dayu
.
order
.
ui
.
fragment
;
import
com.dayu.base.ui.fragment.BaseFragment
;
import
com.dayu.common.Constants
;
import
com.dayu.order.R
;
import
com.dayu.order.api.protocol.Order
;
import
com.dayu.order.databinding.FragmentCommomRecycleBinding
;
import
com.dayu.order.databinding.FragmentOrderdoingItemBinding
;
import
com.dayu.order.presenter.orderdoing.OrderDoingPresenter
;
import
com.dayu.order.presenter.orderdoing.orderDoingContract
;
import
com.dayu.order.ui.adapter.OrderAdapter
;
import
com.dayu.provider.event.OrderState
;
import
com.dayu.provider.event.RefreshServe
;
import
com.dayu.utils.ProgressUtil
;
import
com.dayu.widgets.listener.OnItemClickListener
;
import
org.greenrobot.eventbus.EventBus
;
import
org.greenrobot.eventbus.Subscribe
;
import
org.greenrobot.eventbus.ThreadMode
;
import
java.util.List
;
import
static
com
.
dayu
.
order
.
common
.
OrderConstant
.
ORDER_FINISH
;
import
static
com
.
dayu
.
order
.
common
.
OrderConstant
.
ORDER_NOCONTACT_FINISH
;
import
static
com
.
dayu
.
order
.
common
.
OrderConstant
.
ORDER_SOP_FINISH
;
import
static
com
.
dayu
.
order
.
common
.
OrderConstant
.
ORDER_YUYUE
;
/**
* 已完成的Fragment
*/
public
class
OrderDoneFragment
extends
BaseFragment
<
OrderDoingPresenter
,
FragmentCommomRecycleBinding
>
implements
orderDoingContract
.
View
{
private
static
final
String
TAG
=
"OrderDoneFragment"
;
private
OrderAdapter
mAdapter
;
private
List
<
Order
>
mDatas
;
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_commom_recycle
;
}
@Override
protected
void
lazyLoad
()
{
super
.
lazyLoad
();
mPresenter
.
refresh
();
}
@Override
public
void
initView
()
{
EventBus
.
getDefault
().
register
(
this
);
mAdapter
=
new
OrderAdapter
(
true
);
mAdapter
.
setViewType
(
R
.
layout
.
fragment_orderdoing_item
);
mAdapter
.
initPresenter
(
mPresenter
);
mBind
.
recyclerView
.
setAdapter
(
mAdapter
);
mBind
.
recyclerView
.
setOnItemClickListener
(
new
OnItemClickListener
<
Order
,
FragmentOrderdoingItemBinding
>()
{
@Override
public
void
OnItemClick
(
Order
item
,
FragmentOrderdoingItemBinding
bind
)
{
mPresenter
.
dumpDetail
(
item
.
getId
());
}
});
}
@Override
public
void
setPresenter
()
{
mBind
.
setPresenter
(
mPresenter
);
}
@Override
public
int
getState
()
{
return
Constants
.
WATING_SERVER
;
}
@Override
public
void
onDestroy
()
{
super
.
onDestroy
();
EventBus
.
getDefault
().
unregister
(
this
);
}
@Subscribe
(
threadMode
=
ThreadMode
.
MAIN
)
public
void
RefreshServe
(
RefreshServe
event
)
{
ProgressUtil
.
startLoad
(
mActivity
);
mBind
.
recyclerView
.
Refresh
();
}
@Subscribe
(
threadMode
=
ThreadMode
.
MAIN
)
public
void
OrderState
(
OrderState
event
)
{
mDatas
=
mAdapter
.
getDatas
();
Order
order
=
mDatas
.
get
(
event
.
getPosition
());
if
(
event
.
getState
()
==
ORDER_YUYUE
)
{
order
.
setSubStatus
(
1
);
order
.
setStatus
(
3
);
order
.
setConfirmDoorTime
(
event
.
getTime
());
}
else
if
(
event
.
getState
()
==
ORDER_FINISH
)
{
order
.
setSubStatus
(
6
);
order
.
setStatus
(
4
);
}
else
if
(
event
.
getState
()
==
ORDER_SOP_FINISH
)
{
order
.
setSubStatus
(
5
);
order
.
setStatus
(
4
);
}
else
if
(
event
.
getState
()
==
ORDER_NOCONTACT_FINISH
)
{
mDatas
.
remove
(
order
);
}
mBind
.
recyclerView
.
setData
(
mDatas
);
mAdapter
.
setLoadMore
(
true
);
}
}
orderCenter/src/main/release/AndroidManifest.xml
View file @
3e0b61f3
...
...
@@ -9,7 +9,7 @@
android:name=
".ui.activity.TestActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activity.
a
pplyAndRefuseActivity"
android:name=
".ui.activity.
A
pplyAndRefuseActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activity.SopWebViewActivity"
...
...
orderCenter/src/main/res/layout/activity_apply_refuse_layout.xml
View file @
3e0b61f3
...
...
@@ -12,8 +12,9 @@
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/cl_home_listview_bg"
android:orientation=
"vertical"
>
android:background=
"@color/cl_white"
android:orientation=
"vertical"
android:padding=
"1dp"
>
<RelativeLayout
android:id=
"@+id/title_idea"
...
...
@@ -27,8 +28,7 @@
<ImageView
android:id=
"@+id/title_back"
style=
"@style/title_image_back"
android:onClick=
"@{()->presenter.dumpBack()}"
/>
android:onClick=
"@{()->presenter.dumpBack()}"
/>
<TextView
android:id=
"@+id/tv_right_title"
...
...
@@ -36,26 +36,167 @@
android:onClick=
"@{()->presenter.commite()}"
android:text=
"@string/submit"
android:textColor=
"@color/cl_home_button"
android:textSize=
"15sp"
/>
android:textSize=
"15sp"
android:visibility=
"gone"
/>
</RelativeLayout>
<ImageView
style=
"@style/card_line"
/>
<android.support.v4.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"5dp"
android:layout_marginRight=
"5dp"
android:orientation=
"vertical"
>
<TextView
style=
"@style/common_text_style"
android:layout_marginTop=
"5dp"
android:drawableLeft=
"@drawable/icon_star_necessary"
android:text=
"@string/part_material_list"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
android:layout_marginTop=
"5dp"
android:orientation=
"horizontal"
>
<TextView
style=
"@style/sale_item_text"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"3"
android:background=
"@drawable/bg_order_step_title1"
android:gravity=
"center"
android:text=
"@string/part_model_config"
/>
<TextView
style=
"@style/sale_item_text"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:background=
"@drawable/bg_order_step_title3"
android:gravity=
"center"
android:text=
"@string/count_str"
/>
</LinearLayout>
<TextView
android:id=
"@+id/apply_part"
android:layout_width=
"50dp"
android:layout_height=
"40dp"
android:layout_marginTop=
"5dp"
android:background=
"@drawable/btn_blue_commom"
android:gravity=
"center"
android:text=
"+"
android:textColor=
"@color/white"
android:textSize=
"26sp"
/>
<TextView
style=
"@style/common_text_style"
android:layout_marginTop=
"15dp"
android:layout_marginBottom=
"5dp"
android:text=
"@string/part_apply_reason"
/>
<EditText
android:id=
"@+id/et_content"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_163
"
android:layout_height=
"80dp
"
android:layout_gravity=
"center"
android:background=
"@color/white
"
android:background=
"@drawable/bg_input_gray_react
"
android:gravity=
"top"
android:hint=
"@{presenter.mHint}"
android:paddingLeft=
"@dimen/dp_13"
android:paddingTop=
"@dimen/dp_17"
android:padding=
"10dp"
android:text=
"@={presenter.mComment}"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_13.3"
/>
<LinearLayout
style=
"@style/ll_part_bottom"
>
<TextView
style=
"@style/part_left_text"
android:drawableLeft=
"@drawable/icon_star_necessary"
android:text=
"@string/part_receiver_addr"
/>
<TextView
android:id=
"@+id/tv_province"
style=
"@style/part_select_addr"
android:hint=
"@string/province_str"
/>
<TextView
android:id=
"@+id/tv_city"
style=
"@style/part_select_addr"
android:layout_marginLeft=
"5dp"
android:layout_marginRight=
"5dp"
android:hint=
"@string/city_str"
/>
<TextView
android:id=
"@+id/tv_area"
style=
"@style/part_select_addr"
android:hint=
"@string/zone_str"
/>
</LinearLayout>
<EditText
android:id=
"@+id/edt_detail_addr"
style=
"@style/part_addr_edit"
android:layout_marginLeft=
"80dp"
android:layout_marginTop=
"10dp"
android:hint=
"@string/customer_detail_address"
/>
<LinearLayout
style=
"@style/ll_part_bottom"
>
<TextView
style=
"@style/part_left_text"
android:drawableLeft=
"@drawable/icon_star_necessary"
android:text=
"@string/part_receiver_addr"
/>
<EditText
android:id=
"@+id/edt_name"
style=
"@style/part_addr_edit"
android:hint=
"@string/str_name"
/>
</LinearLayout>
<LinearLayout
style=
"@style/ll_part_bottom"
>
<TextView
style=
"@style/part_left_text"
android:drawableLeft=
"@drawable/icon_star_necessary"
android:text=
"@string/part_receiver_addr"
/>
<EditText
android:id=
"@+id/edt_phone"
style=
"@style/part_addr_edit"
android:hint=
"@string/ka_address_mobile"
/>
</LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<TextView
android:id=
"@+id/tv_submit"
android:layout_width=
"match_parent"
android:layout_height=
"45dp"
android:gravity=
"center"
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_16"
android:background=
"@drawable/btn_blue_commom"
android:text=
"@string/submit_part_apply"
android:layout_marginLeft=
"40dp"
android:layout_marginRight=
"40dp"
android:layout_marginBottom=
"20dp"
android:layout_marginTop=
"15dp"
/>
</LinearLayout>
</layout>
\ No newline at end of file
orderCenter/src/main/res/layout/activity_return_part.xml
View file @
3e0b61f3
...
...
@@ -14,6 +14,7 @@
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/cl_white"
android:orientation=
"vertical"
>
<RelativeLayout
...
...
@@ -23,7 +24,7 @@
<TextView
android:id=
"@+id/tv_title"
style=
"@style/text_title"
android:text=
"@string/return_order_part"
/>
android:text=
"@string/return_order_part
_title
"
/>
<ImageView
android:id=
"@+id/receiving_back"
...
...
@@ -36,149 +37,190 @@
android:onClick=
"@{()->presenter.retrunPart()}"
android:text=
"@string/submit"
android:textColor=
"@color/cl_home_button"
android:textSize=
"15sp"
/>
android:textSize=
"15sp"
android:visibility=
"gone"
/>
</RelativeLayout>
<ImageView
style=
"@style/card_line"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"38dp"
android:background=
"@color/cl_white"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingLeft=
"@dimen/dp_15"
android:paddingRight=
"43dp"
android:text=
"@string/ka_beizhu"
android:textColor=
"@color/default_text_color"
android:textSize=
"15sp"
/>
<android.support.v4.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
>
<TextView
android:id=
"@+id/ka_beizhu"
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingRight=
"@dimen/dp_15"
android:maxLines=
"2"
android:ellipsize=
"end"
android:text=
"@{TextUtils.isEmpty(presenter.kaComent)?@string/no_data:presenter.kaComent}"
android:textColor=
"@color/default_text_color"
android:textSize=
"15sp"
/>
</LinearLayout>
android:layout_marginLeft=
"5dp"
android:layout_marginRight=
"5dp"
android:orientation=
"vertical"
>
<
View
android:layout_width=
"match_parent
"
android:layout_height=
"1
dp"
android:layout_marginLeft=
"@dimen/dp_15
"
android:background=
"@color/cl_line
"
/>
<Text
View
style=
"@style/common_text_style
"
android:layout_marginTop=
"5
dp"
android:drawableLeft=
"@drawable/icon_star_necessary
"
android:text=
"@string/part_material_list
"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"105dp"
android:layout_marginBottom=
"@dimen/dp_10"
android:background=
"@color/cl_white"
android:layout_height=
"40dp"
android:layout_marginTop=
"5dp"
android:orientation=
"horizontal"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"20dp"
android:paddingLeft=
"@dimen/dp_15"
android:paddingRight=
"28dp"
android:text=
"@string/sp_beizhu"
android:textColor=
"@color/default_text_color"
android:textSize=
"15sp"
/>
style=
"@style/sale_item_text"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"3"
android:background=
"@drawable/bg_order_step_title1"
android:gravity=
"center"
android:text=
"@string/part_model_config"
/>
<TextView
style=
"@style/sale_item_text"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:background=
"@drawable/bg_order_step_title3"
android:gravity=
"center"
android:text=
"@string/count_str"
/>
</LinearLayout>
<TextView
android:id=
"@+id/apply_part"
android:layout_width=
"50dp"
android:layout_height=
"40dp"
android:layout_marginTop=
"5dp"
android:background=
"@drawable/btn_blue_commom"
android:gravity=
"center"
android:text=
"+"
android:textColor=
"@color/white"
android:textSize=
"26sp"
/>
<TextView
style=
"@style/common_text_style"
android:layout_marginTop=
"15dp"
android:layout_marginBottom=
"5dp"
android:text=
"@string/remark_order"
/>
<EditText
android:id=
"@+id/sp_beizhu
"
android:id=
"@+id/et_content
"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent
"
android:layout_marginTop=
"20dp
"
android:background=
"@null
"
android:layout_height=
"80dp
"
android:layout_gravity=
"center
"
android:background=
"@drawable/bg_input_gray_react
"
android:gravity=
"top"
android:hint=
"请说明寄回内容,数量和寄回原因"
android:paddingRight=
"@dimen/dp_15"
android:text=
"@={presenter.spComent}"
android:maxEms=
"500"
android:textColor=
"@color/default_editext_color"
android:textSize=
"15sp"
/>
android:hint=
"@string/part_remart_hint"
android:padding=
"10dp"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
android:textSize=
"@dimen/sp_13.3"
/>
<LinearLayout
style=
"@style/ll_part_bottom"
>
<TextView
style=
"@style/part_left_text"
android:text=
"@string/part_comany_name"
/>
<TextView
android:id=
"@+id/tv_company_name"
style=
"@style/common_text_style"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"55dp"
android:background=
"@color/cl_white"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<LinearLayout
style=
"@style/ll_part_bottom"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingLeft=
"@dimen/dp_15"
android:paddingRight=
"38dp"
android:text=
"@string/couries_company"
android:textColor=
"@color/default_text_color"
android:textSize=
"15sp"
/>
style=
"@style/part_left_text"
android:text=
"@string/part_comany_addr"
/>
<TextView
android:id=
"@+id/couries_compay"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:gravity=
"center_vertical"
android:hint=
"@string/couries_company_hint"
android:onClick=
"@{()->presenter.getCourier()}"
android:paddingRight=
"@dimen/dp_15"
android:text=
"@={presenter.courierCompany}"
android:textColor=
"@color/default_editext_color"
android:textSize=
"15sp"
/>
android:id=
"@+id/tv_company_addr"
style=
"@style/common_text_style"
/>
<ImageView
android:layout_width=
"15dp"
android:layout_height=
"15dp"
android:layout_marginLeft=
"15dp"
android:layout_marginRight=
"15dp"
android:src=
"@drawable/icon_arrow_right"
/>
</LinearLayout>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_marginLeft=
"@dimen/dp_15"
android:background=
"#FFE5E5E5"
/>
<LinearLayout
style=
"@style/ll_part_bottom"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"55dp"
android:background=
"@color/cl_white"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<TextView
style=
"@style/part_left_text"
android:text=
"@string/part_comany_contacter"
/>
<TextView
android:id=
"@+id/tv_company_contacter"
style=
"@style/common_text_style"
/>
</LinearLayout>
<LinearLayout
style=
"@style/ll_part_bottom"
>
<TextView
style=
"@style/part_left_text"
android:drawableLeft=
"@drawable/icon_star_necessary"
android:text=
"@string/part_trans_code"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<EditText
android:id=
"@+id/edt_trans_code"
style=
"@style/part_addr_edit"
android:text=
"@={presenter.courierNum}"
/>
<ImageView
android:id=
"@+id/scan"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingLeft=
"@dimen/dp_15
"
android:paddingRight=
"38dp
"
android:text=
"快递单号
"
android:textColor=
"@color/default_text_color"
android:textSize=
"15sp"
/
>
android:layout_alignParentRight=
"true
"
android:layout_centerVertical=
"true
"
android:layout_marginRight=
"15dp
"
android:src=
"@drawable/icon_scan"
/>
</RelativeLayout
>
<EditText
android:id=
"@+id/logistics_num"
</LinearLayout>
<LinearLayout
style=
"@style/ll_part_bottom"
>
<TextView
style=
"@style/part_left_text"
android:drawableLeft=
"@drawable/icon_star_necessary"
android:text=
"@string/part_trans_company"
/>
<TextView
android:id=
"@+id/tv_trans_company"
style=
"@style/common_text_style"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent
"
android:background=
"@null
"
android:gravity=
"center_vertical
"
android:hint=
"@string/couries_num_hint
"
android:inputType=
"number
"
android:paddingRight=
"@dimen/dp_15
"
android:text=
"@={presenter.courierNum}
"
android:textColor=
"@color/default_editext_color"
android:textSize=
"15sp"
/>
android:layout_height=
"35dp
"
android:background=
"@drawable/btn_gray_commom
"
android:drawableRight=
"@drawable/icon_arrow_right_gray32
"
android:gravity=
"center
"
android:hint=
"@string/setlect_trans_company_hint
"
android:onClick=
"@{()->presenter.getCourier()}
"
android:paddingRight=
"5dp
"
android:text=
"@={presenter.courierCompany}"
/>
</LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
<TextView
android:id=
"@+id/tv_submit"
android:layout_width=
"match_parent"
android:layout_height=
"45dp"
android:layout_marginLeft=
"40dp"
android:layout_marginTop=
"15dp"
android:layout_marginRight=
"40dp"
android:layout_marginBottom=
"20dp"
android:background=
"@drawable/btn_blue_commom"
android:gravity=
"center"
android:text=
"@string/notify_comany_receive"
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_16"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
@@ -186,10 +228,11 @@
android:drawableLeft=
"@drawable/icon_ka_address"
android:drawablePadding=
"4dp"
android:onClick=
"@{()->presenter.dumpToKaInfo()}"
android:paddingRight=
"@dimen/dp_15"
android:paddingTop=
"@dimen/dp_20"
android:paddingRight=
"@dimen/dp_15"
android:text=
"厂商收货信息"
android:textColor=
"#FF3FAAFC"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
android:visibility=
"gone"
/>
</LinearLayout>
</layout>
\ No newline at end of file
orderCenter/src/main/res/layout/fragment_multi_detail.xml
View file @
3e0b61f3
...
...
@@ -117,7 +117,8 @@
android:layout_below=
"@+id/ll_server_content"
android:text=
"@string/door_time"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
android:textSize=
"14sp"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/order_time"
...
...
@@ -128,13 +129,36 @@
android:layout_toRightOf=
"@+id/tv_time"
android:text=
'@{!TextUtils.isEmpty(item.confirmDoorTime)?item.confirmDoorTime:@string/no_data}'
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"14sp"
android:visibility=
"gone"
/>
<TextView
android:id=
"@+id/tv_device_count_"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/ll_server_content"
android:layout_marginTop=
"15dp"
android:text=
"@string/device_count"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
<TextView
android:id=
"@+id/tv_device_count"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/ll_server_content"
android:layout_marginLeft=
"19dp"
android:layout_marginTop=
"15dp"
android:layout_toRightOf=
"@+id/tv_device_count_"
android:text=
'@{!TextUtils.isEmpty(item.productModel)?item.productModel:@string/no_data}'
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"14sp"
/>
<TextView
android:id=
"@+id/tv_remark"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_
time
"
android:layout_below=
"@+id/tv_
device_count
"
android:layout_marginTop=
"15dp"
android:text=
"@string/order_remark"
android:textColor=
"@color/tv_cl"
...
...
@@ -145,7 +169,7 @@
android:id=
"@+id/rl_info_detail"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_
time
"
android:layout_below=
"@+id/tv_
device_count
"
android:layout_marginLeft=
"19dp"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_toRightOf=
"@+id/tv_remark"
>
...
...
@@ -180,8 +204,8 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/rl_info_detail"
android:layout_marginBottom=
"10dp"
android:layout_marginTop=
"15dp"
android:layout_marginBottom=
"10dp"
android:text=
"@string/order_attachment"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
...
...
@@ -191,9 +215,9 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/rl_info_detail"
android:layout_marginBottom=
"10dp"
android:layout_marginLeft=
"19dp"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_marginBottom=
"10dp"
android:layout_toRightOf=
"@+id/tv_remark"
>
<android.support.v7.widget.RecyclerView
...
...
@@ -265,11 +289,11 @@
android:id=
"@+id/tv_customer_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_company_name"
android:layout_alignBaseline=
"@+id/customer_name"
android:layout_alignBottom=
"@+id/customer_name"
android:layout_alignParentLeft=
"true"
android:layout_alignParentStart=
"true"
android:layout_
below=
"@+id/tv_company_nam
e"
android:layout_
alignParentLeft=
"tru
e"
android:text=
"@string/customer_name"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
...
...
@@ -290,11 +314,11 @@
android:id=
"@+id/customer_signature"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_below=
"@+id/tv_customer_type"
android:layout_alignParentRight=
"true"
android:layout_marginLeft=
"19dp"
android:layout_marginRight=
"@dimen/dp_15"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_marginRight=
"@dimen/dp_15"
android:layout_toRightOf=
"@+id/customer_name"
android:gravity=
"right"
android:text=
"@string/check_signature"
...
...
@@ -384,8 +408,8 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_address"
android:layout_marginBottom=
"10dp"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_marginBottom=
"10dp"
android:text=
"@string/lookforword_time"
android:textColor=
"@color/tv_cl"
android:textSize=
"14sp"
/>
...
...
@@ -395,9 +419,9 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/tv_address"
android:layout_marginBottom=
"10dp"
android:layout_marginLeft=
"19dp"
android:layout_marginTop=
"@dimen/dp_15"
android:layout_marginBottom=
"10dp"
android:layout_toRightOf=
"@+id/tv_end_time"
android:text=
'@{!TextUtils.isEmpty(item.appointmentTime)?item.appointmentTime:@string/no_data}'
android:textColor=
"@color/cl_home_title_text_color"
...
...
@@ -499,6 +523,7 @@
android:textColor=
"@color/cl_order_item_date"
android:textSize=
"14sp"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_contact_seller"
android:layout_width=
"match_parent"
...
...
orderCenter/src/main/res/layout/fragment_order_application_part.xml
View file @
3e0b61f3
...
...
@@ -11,6 +11,7 @@
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/cl_bg"
android:orientation=
"vertical"
>
<com.dayu.widgets.LRecyclerView
...
...
@@ -19,7 +20,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"1"
android:
background=
"@color/cl_bg
"
android:
paddingBottom=
"10dp
"
app:itemType=
"@layout/item_apply_part_layout"
/>
<TextView
...
...
@@ -31,7 +32,10 @@
android:textColor=
"@color/white"
android:textSize=
"@dimen/sp_16"
android:onClick=
"@{()->presenter.applyOrReturnPart()}"
android:background=
"@color/cl_home_button"
android:background=
"@drawable/btn_blue_commom"
android:layout_marginLeft=
"20dp"
android:layout_marginRight=
"20dp"
android:layout_marginBottom=
"20dp"
/>
</LinearLayout>
...
...
orderCenter/src/main/res/layout/fragment_order_home.xml
View file @
3e0b61f3
...
...
@@ -41,6 +41,8 @@
android:layout_height=
"78dp"
app:tabIndicatorColor=
"@color/cl_tab_line"
app:tabMaxWidth=
"0dp"
app:tabIndicatorHeight=
"0dp"
app:tabBackground=
"@drawable/top_tab_selector"
app:tabMode=
"fixed"
/>
<ImageView
style=
"@style/card_line"
/>
...
...
orderCenter/src/main/res/layout/fragment_order_part.xml
View file @
3e0b61f3
...
...
@@ -15,6 +15,7 @@
app:tabMaxWidth=
"0dp"
app:tabSelectedTextColor=
"@color/cl_receiving_order_item_data"
app:tabTextAppearance=
"@style/TabLayoutTextStyle"
android:textSize=
"14sp"
app:tabTextColor=
"@color/cl_tab_line"
/>
...
...
orderCenter/src/main/res/layout/fragment_orderdoing_item.xml
View file @
3e0b61f3
...
...
@@ -13,8 +13,8 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_13.3"
android:layout_marginRight=
"@dimen/dp_13.3"
android:layout_marginTop=
"5dp"
android:layout_marginRight=
"@dimen/dp_13.3"
android:background=
"@drawable/item_shape"
android:orientation=
"vertical"
>
...
...
@@ -67,7 +67,7 @@
android:layout_gravity=
"right"
android:layout_marginTop=
"3dp"
android:textColor=
"@color/cl_tab_read"
android:textSize=
"
@dimen/size_login_hint_text
"
android:textSize=
"
14sp
"
android:visibility=
"gone"
/>
</LinearLayout>
...
...
@@ -75,14 +75,15 @@
android:id=
"@+id/item_line"
android:layout_width=
"@dimen/size_order_item_line_width"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"10dp"
android:layout_marginLeft=
"10dp"
android:layout_marginTop=
"@dimen/dp_21.3"
android:layout_marginBottom=
"10dp"
android:background=
"@color/cl_order_item_line_bg"
/>
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
@@ -121,27 +122,12 @@
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_16.7"
android:ellipsize=
"end"
android:maxEms=
"7"
android:maxLines=
"1"
android:text=
"无"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/size_login_hint_text"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_price"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_16.7"
android:ellipsize=
"end"
android:maxEms=
"7"
android:maxLines=
"1"
android:text=
"0元"
android:layout_marginLeft=
"5dp"
android:layout_marginRight=
"10dp"
android:gravity=
"right"
android:textColor=
"@color/cl_order_item_date"
android:textSize=
"@dimen/size_login_hint_text"
android:textStyle=
"bold"
/>
</LinearLayout>
<LinearLayout
...
...
@@ -150,11 +136,11 @@
android:orientation=
"horizontal"
>
<LinearLayout
android:visibility=
"gone"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
android:visibility=
"gone"
>
<TextView
android:id=
"@+id/item_text_weixiu"
...
...
@@ -192,14 +178,18 @@
android:textStyle=
"bold"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginTop=
"5dp"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_order_detail"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"@dimen/dp_14"
android:layout_marginRight=
"40dp"
android:layout_marginTop=
"5dp"
android:layout_weight=
"1"
android:ellipsize=
"end"
android:maxLines=
"1"
android:textColor=
"@color/cl_home_title_text_color"
...
...
@@ -207,16 +197,31 @@
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_server_typ
e"
android:id=
"@+id/tv_pric
e"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"5dp"
android:layout_marginRight=
"10dp"
android:ellipsize=
"end"
android:gravity=
"right"
android:maxEms=
"7"
android:maxLines=
"1"
android:text=
"0元"
android:textColor=
"@color/common_red"
android:textSize=
"@dimen/size_login_hint_text"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/tv_server_type"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/dp_6"
android:layout_marginRight=
"10dp"
android:textColor=
"@color/cl_tab_init"
android:textSize=
"@dimen/size_login_hint_text"
android:visibility=
"gone"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
...
...
@@ -273,9 +278,9 @@
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_vertical"
android:paddingBottom=
"5dp"
android:paddingLeft=
"15dp"
android:paddingRight=
"15dp"
android:paddingBottom=
"5dp"
android:src=
"@drawable/icon_navigation"
/>
</LinearLayout>
</LinearLayout>
...
...
@@ -312,40 +317,81 @@
android:id=
"@+id/order_line_one"
android:layout_width=
"@dimen/dp_0.7"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"11.7dp"
android:layout_marginTop=
"11.7dp"
android:layout_marginBottom=
"11.7dp"
android:background=
"@color/cl_receiving_order_item_data"
/>
<RelativeLayout
android:id=
"@+id/rl_item_mid"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
>
<TextView
android:id=
"@+id/item_updata_time"
android:layout_width=
"0dp
"
android:layout_width=
"match_parent
"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"@string/tv_home_tab_updata_subscribe_time"
android:textColor=
"@color/cl_receiving_order_item_data"
android:textSize=
"@dimen/sp_15"
/>
<TextView
android:visibility=
"gone"
android:id=
"@+id/tv_item_mid"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:text=
"@string/confirm_serve_time"
android:textColor=
"@color/cl_white"
android:background=
"@drawable/btn_blue_commom"
android:layout_marginLeft=
"25dp"
android:layout_marginRight=
"15dp"
android:layout_marginTop=
"5dp"
android:layout_marginBottom=
"5dp"
android:textSize=
"@dimen/sp_15"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/order_line_two"
android:layout_width=
"@dimen/dp_0.7"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"11.7dp"
android:layout_marginTop=
"11.7dp"
android:layout_marginBottom=
"11.7dp"
android:background=
"@color/cl_receiving_order_item_data"
/>
<RelativeLayout
android:id=
"@+id/rl_item_end"
android:layout_width=
"0dp"
android:layout_weight=
"1"
android:layout_height=
"match_parent"
>
<TextView
android:id=
"@+id/tv_item_process"
android:layout_width=
"0dp
"
android:layout_width=
"match_parent
"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:gravity=
"center"
android:text=
"@string/tv_home_tab_start"
android:textColor=
"@color/cl_receiving_order_item_data"
android:textSize=
"@dimen/sp_15"
/>
<TextView
android:visibility=
"gone"
android:id=
"@+id/tv_item_end"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:gravity=
"center"
android:text=
"@string/tv_work_order_four"
android:textColor=
"@color/cl_white"
android:background=
"@drawable/btn_blue_commom"
android:layout_marginLeft=
"10dp"
android:layout_marginRight=
"10dp"
android:layout_marginTop=
"5dp"
android:layout_marginBottom=
"5dp"
android:textSize=
"@dimen/sp_15"
/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
...
...
orderCenter/src/main/res/layout/item_apply_part_layout.xml
View file @
3e0b61f3
...
...
@@ -4,7 +4,6 @@
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"@dimen/dp_10"
android:background=
"@color/cl_white"
android:orientation=
"vertical"
>
...
...
orderCenter/src/main/res/layout/item_detail_server_info.xml
View file @
3e0b61f3
...
...
@@ -32,6 +32,7 @@
android:textSize=
"14sp"
/>
<TextView
android:visibility=
"gone"
android:id=
"@+id/tv_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
orderCenter/src/main/res/layout/serve_datails_item.xml
View file @
3e0b61f3
...
...
@@ -74,12 +74,12 @@
<TextView
android:layout_gravity=
"right"
android:id=
"@+id/server_check"
android:layout_width=
"84dp"
android:layout_height=
"22dp"
android:gravity=
"center"
android:layout_marginLeft=
"@dimen/dp_20"
android:textColor=
"@color/default_text_color"
android:textColor=
"@color/cl_receiving_order_item_data"
android:textSize=
"@dimen/sp_12"
/>
</LinearLayout>
</LinearLayout>
...
...
orderCenter/src/main/res/values/strings.xml
View file @
3e0b61f3
<resources>
<string
name=
"app_name"
>
orderCenter
</string>
<string
name=
"order_payer_prove_notice"
>
上传发票,订单信息,或者机器sn码,生产日期等信息证明
</string>
<string
name=
"part_material_list"
>
物料清单:
</string>
<string
name=
"part_apply_reason"
>
申请事由:
</string>
<string
name=
"part_model_config"
>
品牌/品名/型号/配置
</string>
<string
name=
"submit_part_apply"
>
向商家提交申请
</string>
<string
name=
"part_receiver_addr"
>
收货地址:
</string>
<string
name=
"part_receiver_name"
>
收货人名:
</string>
<string
name=
"part_receiver_phone"
>
手机号码:
</string>
<string
name=
"part_remart_hint"
>
请详细说明
</string>
<string
name=
"part_comany_name"
>
商家名称:
</string>
<string
name=
"part_comany_addr"
>
商家地址:
</string>
<string
name=
"part_comany_contacter"
>
联系人:
</string>
<string
name=
"notify_comany_receive"
>
通知商家收货
</string>
<string
name=
"part_trans_code"
>
快递单号:
</string>
<string
name=
"part_trans_company"
>
物流公司:
</string>
<string
name=
"setlect_trans_company_hint"
>
请选择物流公司名称
</string>
</resources>
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/ProductInstructionFragment.java
View file @
3e0b61f3
package
com
.
bigfish
.
salecenter
.
ui
.
fragment
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.view.View
;
...
...
@@ -10,6 +11,8 @@ import com.bigfish.salecenter.databinding.FragmentProductInstructionBinding;
import
com.bigfish.salecenter.model.ProductDetailBean
;
import
com.bigfish.salecenter.model.ProductListBean
;
import
com.dayu.base.api.Api
;
import
com.dayu.base.ui.activity.ImgGalleryActivty
;
import
com.dayu.base.ui.activity.PreviewActivty
;
import
com.dayu.base.ui.fragment.BaseFragment
;
import
com.dayu.base.ui.presenter.SImplePresenter
;
import
com.dayu.common.Constants
;
...
...
@@ -92,7 +95,7 @@ public class ProductInstructionFragment extends BaseFragment<SImplePresenter, Fr
}
private
void
setBannerView
()
{
List
<
String
>
bannerImgs
=
new
ArrayList
<>();
Array
List
<
String
>
bannerImgs
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
mDetail
.
getGoodsPics
().
size
();
i
++)
{
bannerImgs
.
add
(
mDetail
.
getGoodsPics
().
get
(
i
).
getGoodsUrl
());
}
...
...
@@ -101,6 +104,7 @@ public class ProductInstructionFragment extends BaseFragment<SImplePresenter, Fr
.
setBannerStyle
(
BannerConfig
.
CIRCLE_INDICATOR
)
.
setIndicatorGravity
(
BannerConfig
.
CENTER
)
.
setOnBannerListener
(
position
->
{
ImgGalleryActivty
.
launch
(
mActivity
,
bannerImgs
,
position
);
}).
start
();
}
...
...
saleCenter/src/main/res/layout/fragment_home_sale.xml
View file @
3e0b61f3
...
...
@@ -24,6 +24,8 @@
android:layout_height=
"78dp"
app:tabIndicatorColor=
"@color/cl_tab_line"
app:tabMaxWidth=
"0dp"
app:tabIndicatorHeight=
"0dp"
app:tabBackground=
"@drawable/top_tab_selector"
app:tabMode=
"fixed"
/>
<ImageView
style=
"@style/card_line"
/>
...
...
userCenter/src/main/java/com/dayu/usercenter/api/UserService2.java
View file @
3e0b61f3
...
...
@@ -14,7 +14,7 @@ import com.dayu.usercenter.model.bean.SaleRecordBean;
import
com.dayu.usercenter.model.bean.SaleRecordListBean
;
import
com.dayu.usercenter.model.bean.ServiceTypeBean
;
import
com.dayu.usercenter.model.bean.StarRatioBean
;
import
com.dayu.
usercenter.model.bean
.TreeAddressBean
;
import
com.dayu.
base.api.protocol
.TreeAddressBean
;
import
com.dayu.usercenter.model.bean.UserBankInfoBean
;
import
com.dayu.usercenter.model.bean.UserInfoBean
;
import
com.dayu.usercenter.model.bean.UserLicenceBean
;
...
...
@@ -22,7 +22,6 @@ import com.dayu.usercenter.model.bean.UserLicenceBean;
import
java.util.List
;
import
io.reactivex.Observable
;
import
okhttp3.RequestBody
;
import
retrofit2.http.Body
;
import
retrofit2.http.GET
;
import
retrofit2.http.POST
;
...
...
@@ -172,13 +171,7 @@ public interface UserService2 {
@GET
(
Constants
.
API_7800
+
"/globelRateConfig?page=1&pageSize=10"
)
Observable
<
BaseResponse
<
BasePageBean
<
GlobelRateBean
>>>
getGlobelRateAll
();
/**
* 地址(省市区)信息
* @param parednId -1.查询省份数据
* @return
*/
@GET
(
Constants
.
API_7300
+
"/geography/tree/{parentId}"
)
Observable
<
BaseResponse
<
List
<
TreeAddressBean
>>>
getTreeAddress
(
@Path
(
"parentId"
)
int
parednId
);
/**
* 销售业绩-完成销售订单量&奖金总额
...
...
userCenter/src/main/java/com/dayu/usercenter/common/UserConstant.java
View file @
3e0b61f3
package
com
.
dayu
.
usercenter
.
common
;
import
com.dayu.usercenter.model.bean.TreeAddressBean
;
import
java.util.HashMap
;
import
java.util.List
;
/**
* Created by luofan
* on 2018/2/9.
...
...
@@ -16,7 +11,7 @@ public class UserConstant {
public
static
final
String
DETECT_STATE
=
"detect_state"
;
public
static
final
String
PHONE
=
"phone"
;
public
static
final
String
CODE
=
"code"
;
public
static
final
HashMap
<
Integer
,
List
<
TreeAddressBean
>>
treeAddressMap
=
new
HashMap
<>();
/**
* 注册
...
...
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/BusinessTypeActivity.java
View file @
3e0b61f3
package
com
.
dayu
.
usercenter
.
ui
.
activity2
;
import
android.support.annotation.NonNull
;
import
android.support.v7.widget.GridLayoutManager
;
import
android.widget.CheckBox
;
...
...
@@ -8,6 +9,7 @@ import com.chad.library.adapter.base.BaseViewHolder;
import
com.dayu.base.api.Api
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.base.ui.presenter.SImplePresenter
;
import
com.dayu.common.Constants
;
import
com.dayu.usercenter.R
;
import
com.dayu.usercenter.api.UserService2
;
import
com.dayu.usercenter.databinding.ActivityBusinessTypeBinding
;
...
...
@@ -16,6 +18,8 @@ import com.dayu.usercenter.model.SaveSceneData;
import
com.dayu.usercenter.model.bean.BusinessSceneBean
;
import
com.dayu.usercenter.model.bean.ServiceTypeBean
;
import
com.dayu.utils.ToastUtils
;
import
com.scwang.smartrefresh.layout.api.RefreshLayout
;
import
com.scwang.smartrefresh.layout.listener.OnRefreshListener
;
import
org.greenrobot.eventbus.EventBus
;
...
...
@@ -34,6 +38,8 @@ public class BusinessTypeActivity extends BaseActivity<SImplePresenter, Activity
BaseQuickAdapter
<
BusinessSceneBean
,
BaseViewHolder
>
sceneAdapter
;
BaseQuickAdapter
<
ServiceTypeBean
,
BaseViewHolder
>
typeAdapter
;
boolean
isForce
;
//是否强制用户选择服务场景
@Override
public
void
setPresenter
()
{
}
...
...
@@ -45,10 +51,21 @@ public class BusinessTypeActivity extends BaseActivity<SImplePresenter, Activity
@Override
public
void
initView
()
{
if
(
getIntent
().
hasExtra
(
Constants
.
IS_FORCE
))
{
isForce
=
getIntent
().
getBooleanExtra
(
Constants
.
IS_FORCE
,
false
);
}
initUser
();
mBind
.
receivingBack
.
setOnClickListener
(
v
->
dumpBack
());
mBind
.
receivingBack
.
setOnClickListener
(
v
->
onBackPressed
());
mBind
.
tvSubmit
.
setOnClickListener
(
v
->
saveData
());
initData
();
initRefresh
();
}
private
void
initRefresh
()
{
mBind
.
refreshLayout
.
setEnableLoadMore
(
false
);
mBind
.
refreshLayout
.
setOnRefreshListener
(
refreshLayout
->
{
initData
();
});
}
...
...
@@ -65,8 +82,11 @@ public class BusinessTypeActivity extends BaseActivity<SImplePresenter, Activity
//服务类型数据
Api
.
getService
(
UserService2
.
class
).
getServiceType
().
compose
(
Api
.
applySchedulers
())
.
subscribe
(
mPresenter
.
baseObserver
(
datas
->
{
mBind
.
refreshLayout
.
finishRefresh
();
typeDatas
=
datas
;
setTypeAdapter
();
},
responeThrowable
->
{
mBind
.
refreshLayout
.
finishRefresh
();
}));
}
...
...
@@ -193,4 +213,14 @@ public class BusinessTypeActivity extends BaseActivity<SImplePresenter, Activity
}
}));
}
@Override
public
void
onBackPressed
()
{
if
(!
isForce
){
super
.
onBackPressed
();
}
else
{
ToastUtils
.
showShortToast
(
R
.
string
.
pls_set_business_choose_type
);
}
}
}
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/EditAddressActivity.java
View file @
3e0b61f3
...
...
@@ -5,18 +5,19 @@ import android.text.TextUtils;
import
android.view.View
;
import
android.widget.EditText
;
import
com.dayu.base.api.APIService
;
import
com.dayu.base.api.Api
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.base.ui.presenter.SImplePresenter
;
import
com.dayu.common.Constants
;
import
com.dayu.common.MyTextWatcher
;
import
com.dayu.usercenter.R
;
import
com.dayu.usercenter.api.UserService2
;
import
com.dayu.usercenter.common.UserConstant
;
import
com.dayu.usercenter.databinding.ActivityEditAddressBinding
;
import
com.dayu.usercenter.event.EditAddressEvent
;
import
com.dayu.usercenter.event.EditBankEvent
;
import
com.dayu.usercenter.model.bean.AddressInfoBean
;
import
com.dayu.
usercenter.model.bean
.TreeAddressBean
;
import
com.dayu.
base.api.protocol
.TreeAddressBean
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.UtilsUserAccountMatcher
;
import
com.dayu.widgets.WheelDialog
;
...
...
@@ -124,15 +125,15 @@ public class EditAddressActivity extends BaseActivity<SImplePresenter, ActivityE
* @param showDialog 是否显示选择框
*/
private
void
getTreeAddrData
(
int
pId
,
int
type
,
boolean
showDialog
)
{
if
(
UserConstant
.
treeAddressMap
.
containsKey
(
pId
)
&&
UserConstant
.
treeAddressMap
.
get
(
pId
).
size
()>
0
)
{
dealAddrData
(
type
,
showDialog
,
UserConstant
.
treeAddressMap
.
get
(
pId
));
if
(
Constants
.
treeAddressMap
.
containsKey
(
pId
)
&&
Constants
.
treeAddressMap
.
get
(
pId
).
size
()>
0
)
{
dealAddrData
(
type
,
showDialog
,
Constants
.
treeAddressMap
.
get
(
pId
));
}
else
{
if
(
showDialog
)
showDialog
();
Api
.
getService
(
UserService2
.
class
).
getTreeAddress
(
pId
).
compose
(
Api
.
applySchedulers
())
Api
.
getService
(
APIService
.
class
).
getTreeAddress
(
pId
).
compose
(
Api
.
applySchedulers
())
.
safeSubscribe
(
mPresenter
.
baseObserver
(
datas
->
{
dealAddrData
(
type
,
showDialog
,
datas
);
UserConstant
.
treeAddressMap
.
put
(
pId
,
datas
);
Constants
.
treeAddressMap
.
put
(
pId
,
datas
);
}));
}
}
...
...
userCenter/src/main/res/layout/activity_business_type.xml
View file @
3e0b61f3
...
...
@@ -29,31 +29,36 @@
<ImageView
style=
"@style/card_line"
/>
<android.support.v4.widget.NestedScrollView
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id=
"@+id/refresh_layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"65dp"
android:paddingLeft=
"15dp"
android:paddingRight=
"15dp"
android:layout_marginBottom=
"65dp"
>
android:paddingRight=
"15dp"
>
<android.support.v4.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:paddingTop=
"10dp
"
android:orientation=
"vertical
"
>
android:orientation=
"vertical
"
android:paddingTop=
"10dp
"
>
<TextView
android:visibility=
"gone"
style=
"@style/sale_item_text"
android:text=
"@string/business_choose_scene"
/>
android:text=
"@string/business_choose_scene"
android:visibility=
"gone"
/>
<android.support.v7.widget.RecyclerView
android:visibility=
"gone"
android:id=
"@+id/rv_scene"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"15dp"
android:overScrollMode=
"never"
/>
android:overScrollMode=
"never"
android:visibility=
"gone"
/>
<TextView
style=
"@style/sale_item_text"
...
...
@@ -68,7 +73,9 @@
android:overScrollMode=
"never"
/>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
</LinearLayout>
<TextView
android:id=
"@+id/tv_submit"
style=
"@style/btn_bottom_common"
...
...
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