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
bd931238
authored
Aug 14, 2018
by
罗翻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部分功能优化,增加条形码扫描,处理工单提示,获取地址时间间隔改为5分钟
parent
88db9469
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
181 additions
and
94 deletions
app/src/main/java/com/dayu/bigfish/presenter/main/MainContract.java
app/src/main/java/com/dayu/bigfish/ui/MainActivity.java
app/src/main/java/com/dayu/bigfish/ui/service/LocationService.java
baseSDK/src/main/java/com/dayu/base/ui/adapter/CoreAdapter.java
baseSDK/src/main/java/com/dayu/utils/SelectPicUtils.java
baseSDK/src/main/java/com/dayu/widgets/LRecyclerView.java
baseSDK/src/main/res/values/strings.xml
locationComponent/src/main/java/com/dayu/location/base/LocationUtils.java
orderCenter/src/main/java/com/dayu/order/presenter/worksRecord/OrderRecordPresenter.java
orderCenter/src/main/java/com/dayu/order/ui/activity/MultiProcessOrderActivity.java
orderCenter/src/main/java/com/dayu/order/ui/activity/ProcessOrderActivity.java
orderCenter/src/main/java/com/dayu/order/ui/activity/ServerInfoActivity.java
orderCenter/src/main/java/com/dayu/order/ui/activity/ServerListActivity.java
orderCenter/src/main/java/com/dayu/order/ui/activity/SopWebViewActivity.java
orderCenter/src/main/res/drawable-hdpi/icon_scan.png
orderCenter/src/main/res/drawable-xhdpi/icon_scan.png
orderCenter/src/main/res/drawable-xxhdpi/icon_scan.png
orderCenter/src/main/res/drawable-xxxhdpi/icon_scan.png
orderCenter/src/main/res/layout/activity_multi_process_order.xml
orderCenter/src/main/res/layout/activity_server_info.xml
orderCenter/src/main/res/layout/activity_server_list_recycle.xml
orderCenter/src/main/res/layout/fragment_order_datails.xml
orderCenter/src/main/res/layout/qr_code_layout.xml
userCenter/src/main/java/com/dayu/usercenter/presenter/pwlogin/PwLoginPresenter.java
userCenter/src/main/java/com/dayu/usercenter/presenter/smslogin/SmsLoginPresenter.java
app/src/main/java/com/dayu/bigfish/presenter/main/MainContract.java
View file @
bd931238
...
...
@@ -28,7 +28,7 @@ public interface MainContract {
void
initNotification
();
void
startLoca
it
onService
();
void
startLoca
ti
onService
();
}
abstract
class
Presenter
extends
BasePresenter
<
View
>
{
...
...
app/src/main/java/com/dayu/bigfish/ui/MainActivity.java
View file @
bd931238
...
...
@@ -87,7 +87,7 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
addFragment
();
initListener
();
doAction
(
getIntent
());
startLoca
it
onService
();
startLoca
ti
onService
();
EventBus
.
getDefault
().
register
(
this
);
}
...
...
@@ -113,11 +113,15 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
mFragmentManger
=
getSupportFragmentManager
();
FragmentTransaction
transaction
=
mFragmentManger
.
beginTransaction
()
.
setTransition
(
FragmentTransaction
.
TRANSIT_FRAGMENT_OPEN
);
for
(
Fragment
fragment
:
mFragments
)
{
for
(
int
i
=
0
;
i
<
mFragments
.
length
;
i
++)
{
Fragment
fragment
=
mFragments
[
i
];
transaction
.
add
(
R
.
id
.
fl_container
,
fragment
);
transaction
.
hide
(
fragment
);
if
(
i
==
mFirstPositon
)
{
transaction
.
show
(
fragment
);
}
else
{
transaction
.
hide
(
fragment
);
}
}
transaction
.
show
(
mFragments
[
mFirstPositon
]);
transaction
.
commit
();
resetSelected
(
mFirstPositon
);
}
...
...
@@ -131,8 +135,8 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
private
void
showHideFragment
(
int
showPosition
,
int
hidePosition
)
{
if
(
showPosition
==
hidePosition
)
return
;
mFragmentManger
.
beginTransaction
()
.
show
(
mFragments
[
showPosition
])
.
hide
(
mFragments
[
hidePosition
])
.
show
(
mFragments
[
showPosition
])
.
commit
();
resetSelected
(
showPosition
);
mPosition
=
showPosition
;
...
...
@@ -234,7 +238,7 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
}
@Override
public
void
startLoca
it
onService
()
{
public
void
startLoca
ti
onService
()
{
UserInfo
userInfo
=
UserManager
.
getInstance
().
getUser
();
Intent
intent
=
new
Intent
(
mActivity
,
LocationService
.
class
);
intent
.
putExtra
(
Constants
.
ACCOUNT_ID
,
userInfo
.
getAccountId
());
...
...
app/src/main/java/com/dayu/bigfish/ui/service/LocationService.java
View file @
bd931238
...
...
@@ -57,7 +57,6 @@ public class LocationService extends Service {
RequestBody
requestBody
=
RequestBody
.
create
(
MediaType
.
parse
(
"application/json"
),
jsonObject
.
toString
());
ApiFactory
.
commiteLocation
(
requestBody
).
subscribe
(
aBoolean
->
{
},
throwable
->
{
});
}
}));
...
...
@@ -71,7 +70,7 @@ public class LocationService extends Service {
sendMessage
();
}
};
mTimer
.
schedule
(
mTask
,
2000
,
6
00000
);
mTimer
.
schedule
(
mTask
,
2000
,
3
00000
);
}
public
void
sendMessage
()
{
...
...
baseSDK/src/main/java/com/dayu/base/ui/adapter/CoreAdapter.java
View file @
bd931238
...
...
@@ -4,7 +4,6 @@ import android.animation.ObjectAnimator;
import
android.content.Context
;
import
android.databinding.DataBindingUtil
;
import
android.support.annotation.LayoutRes
;
import
android.support.annotation.NonNull
;
import
android.support.v7.widget.RecyclerView
;
import
android.view.LayoutInflater
;
import
android.view.View
;
...
...
@@ -237,13 +236,13 @@ public class CoreAdapter<M, B> extends RecyclerView.Adapter<BaseViewHolder> {
}
}
@Override
public
void
onViewAttachedToWindow
(
@NonNull
BaseViewHolder
holder
)
{
if
(
holder
.
getLayoutPosition
()
>
oldPosition
)
{
addItemAnimation
(
holder
.
itemView
);
oldPosition
=
holder
.
getLayoutPosition
();
}
}
//
@Override
//
public void onViewAttachedToWindow(@NonNull BaseViewHolder holder) {
//
if (holder.getLayoutPosition() > oldPosition) {
//
addItemAnimation(holder.itemView);
//
oldPosition = holder.getLayoutPosition();
//
}
//
}
private
void
addItemAnimation
(
View
itemView
)
{
ObjectAnimator
.
ofFloat
(
itemView
,
"translationY"
,
500
f
,
0
f
).
setDuration
(
500
).
start
();
...
...
baseSDK/src/main/java/com/dayu/utils/SelectPicUtils.java
0 → 100644
View file @
bd931238
package
com
.
dayu
.
utils
;
import
android.app.Activity
;
import
android.os.Environment
;
import
com.luck.picture.lib.PictureSelectionModel
;
import
com.luck.picture.lib.PictureSelector
;
import
com.luck.picture.lib.config.PictureConfig
;
import
com.luck.picture.lib.config.PictureMimeType
;
import
java.io.File
;
/**
* Created by luofan
* on 2018/8/7.
*/
public
class
SelectPicUtils
{
public
static
void
selectPic
(
Activity
activity
,
int
size
)
{
PictureSelectionModel
selector
=
PictureSelector
.
create
(
activity
)
.
openGallery
(
PictureMimeType
.
ofImage
())
//全部.PictureMimeType.ofAll()、图片.ofImage()、视频.ofVideo()
.
maxSelectNum
(
size
)
// 最大图片选择数量 int
.
imageSpanCount
(
4
)
// 每行显示个数 int
.
selectionMode
(
PictureConfig
.
MULTIPLE
)
// 多选 or 单选 PictureConfig.MULTIPLE or PictureConfig.SINGLE
.
previewImage
(
true
)
// 是否可预览图片 true or false
.
isCamera
(
true
)
// 是否显示拍照按钮 true or false
.
isZoomAnim
(
true
)
// 图片列表点击 缩放效果 默认true
.
sizeMultiplier
(
0.1f
)
// glide 加载图片大小 0~1之间 如设置 .glideOverride()无效
.
setOutputCameraPath
(
"/CustomPath"
)
// 自定义拍、照保存路径,可不填
.
compress
(
true
)
// 是否压缩 true or false
.
glideOverride
(
300
,
500
)
// int glide 加载宽高,越小图片列表越流畅,但会影响列表图片浏览的清晰度
.
hideBottomControls
(
true
)
// 是否显示uCrop工具栏,默认不显示 true or false
.
compressSavePath
(
getPath
())
//压缩图片保存地址
.
previewEggs
(
true
)
// 预览图片时 是否增强左右滑动图片体验(图片滑动一半即可看到上一张是否选中) true or false
// .minimumCompressSize(100)// 小于100kb的图片不压缩
.
synOrAsy
(
true
);
//同步true或异步false 压缩 默认同步、
// .enableCrop(true)//是否裁剪
// .freeStyleCropEnabled(true)
selector
.
forResult
(
PictureConfig
.
CHOOSE_REQUEST
);
}
private
static
String
getPath
()
{
String
path
=
Environment
.
getExternalStorageDirectory
()
+
"/dayu/image/"
;
File
file
=
new
File
(
path
);
if
(
file
.
mkdirs
())
{
return
path
;
}
return
path
;
}
}
baseSDK/src/main/java/com/dayu/widgets/LRecyclerView.java
View file @
bd931238
...
...
@@ -85,7 +85,6 @@ public class LRecyclerView<M, B> extends FrameLayout {
public
LRecyclerView
(
@NonNull
Context
context
,
@Nullable
AttributeSet
attrs
,
int
defStyleAttr
)
{
super
(
context
,
attrs
,
defStyleAttr
);
init
(
context
,
attrs
);
}
private
void
init
(
Context
context
,
AttributeSet
attrs
)
{
...
...
baseSDK/src/main/res/values/strings.xml
View file @
bd931238
...
...
@@ -361,6 +361,8 @@
<string
name=
"signature_name"
>
请先签名!
</string>
<string
name=
"click_and_signature"
>
点击此处让客户去签名
</string>
<string
name=
"download_gaode_notice"
>
您还未安装高德地图~
</string>
<string
name=
"sop_title"
>
标准操作规范SOP~
</string>
<string
name=
"process_notice"
>
温馨提示:点击屏幕底部“提交验收”按钮,申请费用。
</string>
<!--消息-->
<string
name=
"message_system"
>
系统通知
</string>
...
...
locationComponent/src/main/java/com/dayu/location/base/LocationUtils.java
View file @
bd931238
package
com
.
dayu
.
location
.
base
;
import
android.annotation.SuppressLint
;
import
android.content.ActivityNotFoundException
;
import
android.content.Context
;
import
android.content.Intent
;
...
...
@@ -25,6 +24,7 @@ public class LocationUtils {
private
static
AMapLocationClient
mlocationClient
;
private
static
AMapLocation
sLocation
=
null
;
private
static
boolean
flag
=
true
;
private
static
MyLocationListener
mListener
;
private
static
Handler
mHandler
;
/**
...
...
@@ -75,7 +75,8 @@ public class LocationUtils {
* @Title: getCurrentLocation
* @Description: 获取位置,重新发起获取位置请求
*/
public
static
void
getCurrentLocation
(
final
MyLocationListener
listener
)
{
public
static
void
getCurrentLocation
(
MyLocationListener
listener
)
{
mListener
=
listener
;
if
(
mlocationClient
==
null
)
{
return
;
}
...
...
@@ -86,7 +87,7 @@ public class LocationUtils {
@Override
public
void
run
()
{
if
(
flag
)
{
l
istener
.
result
(
sLocation
);
mL
istener
.
result
(
sLocation
);
flag
=
false
;
mlocationClient
.
stopLocation
();
}
...
...
@@ -101,7 +102,7 @@ public class LocationUtils {
flag
=
false
;
mlocationClient
.
stopLocation
();
sLocation
=
location
;
l
istener
.
result
(
location
);
mL
istener
.
result
(
location
);
mHandler
=
null
;
}
}
...
...
@@ -119,6 +120,7 @@ public class LocationUtils {
if
(
mlocationClient
!=
null
)
{
mlocationClient
.
onDestroy
();
}
mListener
=
null
;
}
/**
...
...
orderCenter/src/main/java/com/dayu/order/presenter/worksRecord/OrderRecordPresenter.java
View file @
bd931238
...
...
@@ -22,8 +22,8 @@ import java.util.List;
* on 2017/11/8.
*/
public
class
OrderRecordPresenter
extends
OrderRecordContract
.
Presenter
{
p
ublic
ObservableField
datas
=
new
ObservableField
();
public
ObservableField
<
String
>
serchStr
=
new
ObservableField
();
p
rivate
ObservableField
<
Object
>
datas
=
new
ObservableField
<>
();
public
ObservableField
<
String
>
serchStr
=
new
ObservableField
<>
();
private
int
mPage
;
private
int
mUserId
;
private
int
mSiteId
;
...
...
@@ -88,7 +88,7 @@ public class OrderRecordPresenter extends OrderRecordContract.Presenter {
MobclickAgent
.
onEvent
(
BaseApplication
.
getContext
(),
"check_order_detail"
);
}
p
ublic
void
doSearch
(
String
str
)
{
p
rivate
void
doSearch
(
String
str
)
{
if
(
mList
==
null
||
TextUtils
.
isEmpty
(
str
))
{
return
;
}
...
...
orderCenter/src/main/java/com/dayu/order/ui/activity/MultiProcessOrderActivity.java
View file @
bd931238
...
...
@@ -71,9 +71,8 @@ public class MultiProcessOrderActivity extends BaseActivity<MultiProcessOrderPre
mBind
.
ivDelete
.
setVisibility
(
View
.
GONE
);
mSnImages
.
clear
();
});
// mBind.scan.setOnClickListener(v -> {
// new IntentIntegrator(this).setOrientationLocked(false).setCaptureActivity(CustomScannerActivity.class).initiateScan();
// });
mBind
.
scan
.
setOnClickListener
(
v
->
new
IntentIntegrator
(
this
).
setOrientationLocked
(
false
).
setCaptureActivity
(
CustomScannerActivity
.
class
).
initiateScan
());
}
@Override
...
...
orderCenter/src/main/java/com/dayu/order/ui/activity/ProcessOrderActivity.java
View file @
bd931238
...
...
@@ -115,7 +115,10 @@ public class ProcessOrderActivity extends BaseActivity<ProcessOrderPresenter, Ac
}
public
String
getSum
()
{
return
new
DecimalFormat
(
"0.00"
).
format
(
parseDb
(
mBind
.
etDoorPrice
.
getText
().
toString
())
+
parseDb
(
mBind
.
etServePrice
.
getText
().
toString
())
+
parseDb
(
mBind
.
etMaterialsPrice
.
getText
().
toString
())
+
parseDb
(
mBind
.
etOtherPrice
.
getText
().
toString
()));
return
new
DecimalFormat
(
"0.00"
).
format
(
parseDb
(
mBind
.
etDoorPrice
.
getText
().
toString
())
+
parseDb
(
mBind
.
etServePrice
.
getText
().
toString
())
+
parseDb
(
mBind
.
etMaterialsPrice
.
getText
().
toString
())
+
parseDb
(
mBind
.
etOtherPrice
.
getText
().
toString
()));
}
public
Double
parseDb
(
String
str
)
{
...
...
@@ -250,10 +253,8 @@ public class ProcessOrderActivity extends BaseActivity<ProcessOrderPresenter, Ac
info
.
setProductModel
(
mBind
.
etVersion
.
getText
().
toString
());
info
.
setSn
(
mBind
.
etSerialNum
.
getText
().
toString
());
mPresenter
.
mOrderField
.
set
(
info
);
}
private
void
dumpPic
(
ArrayList
<
String
>
list
)
{
Intent
intent
=
new
Intent
(
this
,
PreviewActivty
.
class
);
intent
.
putStringArrayListExtra
(
Constants
.
BUNDLE_KEY_ID
,
list
);
...
...
orderCenter/src/main/java/com/dayu/order/ui/activity/ServerInfoActivity.java
View file @
bd931238
...
...
@@ -2,6 +2,9 @@ package com.dayu.order.ui.activity;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.text.SpannableString
;
import
android.text.Spanned
;
import
android.text.style.ForegroundColorSpan
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.common.Constants
;
...
...
@@ -35,6 +38,9 @@ public class ServerInfoActivity extends BaseActivity<ServerInfoPresenter, Activi
@Override
public
void
initView
()
{
mBind
.
tvTitle
.
setText
(
getString
(
R
.
string
.
task_list
));
SpannableString
spannableString
=
new
SpannableString
(
getString
(
R
.
string
.
process_notice
));
spannableString
.
setSpan
(
new
ForegroundColorSpan
(
getResources
().
getColor
(
R
.
color
.
bg_button
)),
0
,
5
,
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
mBind
.
notice
.
setText
(
spannableString
);
ServerInfoAdapter
adapter
=
new
ServerInfoAdapter
(
false
);
mBind
.
recyclerView
.
setAdapter
(
adapter
);
mBind
.
tvProcess
.
setOnClickListener
(
v
->
{
...
...
orderCenter/src/main/java/com/dayu/order/ui/activity/ServerListActivity.java
View file @
bd931238
...
...
@@ -2,6 +2,9 @@ package com.dayu.order.ui.activity;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.text.SpannableString
;
import
android.text.Spanned
;
import
android.text.style.ForegroundColorSpan
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.common.Constants
;
...
...
@@ -36,8 +39,9 @@ public class ServerListActivity extends BaseActivity<ServerListPresenter, Activi
@Override
public
void
initView
()
{
mBind
.
tvTitle
.
setText
(
getString
(
R
.
string
.
task_list
));
mBind
.
tvProcess
.
setOnClickListener
(
o
->
{
});
SpannableString
spannableString
=
new
SpannableString
(
getString
(
R
.
string
.
process_notice
));
spannableString
.
setSpan
(
new
ForegroundColorSpan
(
getResources
().
getColor
(
R
.
color
.
bg_button
)),
0
,
5
,
Spanned
.
SPAN_EXCLUSIVE_EXCLUSIVE
);
mBind
.
notice
.
setText
(
spannableString
);
mBind
.
recyclerView
.
setOnItemClickListener
(
new
OnItemClickListener
<
Spu
,
ActivityServerListBinding
>()
{
@Override
public
void
OnItemClick
(
Spu
item
,
ActivityServerListBinding
bind
)
{
...
...
orderCenter/src/main/java/com/dayu/order/ui/activity/SopWebViewActivity.java
View file @
bd931238
...
...
@@ -21,11 +21,15 @@ import com.dayu.order.api.protocol.Spu;
import
com.dayu.order.common.OrderConstant
;
import
com.dayu.provider.event.OrderState
;
import
com.dayu.utils.ProgressUtil
;
import
com.dayu.utils.SelectPicUtils
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.UserManager
;
import
com.github.lzyzsd.jsbridge.BridgeHandler
;
import
com.github.lzyzsd.jsbridge.BridgeWebView
;
import
com.github.lzyzsd.jsbridge.CallBackFunction
;
import
com.luck.picture.lib.PictureSelector
;
import
com.luck.picture.lib.config.PictureConfig
;
import
com.luck.picture.lib.entity.LocalMedia
;
import
org.greenrobot.eventbus.EventBus
;
import
org.json.JSONException
;
...
...
@@ -33,6 +37,7 @@ import org.json.JSONObject;
import
java.io.File
;
import
java.util.ArrayList
;
import
java.util.List
;
import
static
com
.
dayu
.
order
.
common
.
OrderConstant
.
ORDER_SOP_FINISH
;
...
...
@@ -77,7 +82,7 @@ public class SopWebViewActivity extends DataBindingActivity<ActivityWebviewBindi
mWebView
.
setLayoutParams
(
new
LinearLayout
.
LayoutParams
(
LinearLayout
.
LayoutParams
.
MATCH_PARENT
,
LinearLayout
.
LayoutParams
.
MATCH_PARENT
));
mBind
.
llWeb
.
addView
(
mWebView
);
mBind
.
tvTitle
.
setText
(
"SOP"
);
mBind
.
tvTitle
.
setText
(
getString
(
R
.
string
.
sop_title
)
);
initWebView
();
}
...
...
@@ -128,12 +133,14 @@ public class SopWebViewActivity extends DataBindingActivity<ActivityWebviewBindi
}
public
void
openFileChooser
(
ValueCallback
<
Uri
>
uploadMsg
)
{
openFileChooserImpl
(
uploadMsg
);
mUploadMessage
=
uploadMsg
;
SelectPicUtils
.
selectPic
(
mActivity
,
1
);
}
@Override
public
boolean
onShowFileChooser
(
WebView
webView
,
ValueCallback
<
Uri
[]>
uploadMsg
,
FileChooserParams
fileChooserParams
)
{
openFileChooserImplForAndroid5
(
uploadMsg
);
uploadMessageAboveL
=
uploadMsg
;
SelectPicUtils
.
selectPic
(
mActivity
,
1
);
return
true
;
}
...
...
@@ -153,12 +160,10 @@ public class SopWebViewActivity extends DataBindingActivity<ActivityWebviewBindi
}
else
{
mWebView
.
loadUrl
(
Constants
.
WEB_SOP_DETAIL
);
}
}
else
{
mWebView
.
loadUrl
(
Constants
.
WEB_SOP
);
}
JSONObject
jsonObject
=
new
JSONObject
();
try
{
jsonObject
.
put
(
"id"
,
mOrderId
);
...
...
@@ -240,16 +245,29 @@ public class SopWebViewActivity extends DataBindingActivity<ActivityWebviewBindi
*/
@Override
protected
void
onActivityResult
(
int
requestCode
,
int
resultCode
,
Intent
intent
)
{
if
(
requestCode
==
RESULT_CODE
)
{
onActivityResultBelowL
(
intent
,
resultCode
);
}
else
if
(
requestCode
==
RESULT_CODE_FOR_Lollipop
)
{
onActivityResultAboveL
(
intent
,
resultCode
);
// if (requestCode == RESULT_CODE) {
// onActivityResultBelowL(intent, resultCode);
// } else if (requestCode == RESULT_CODE_FOR_Lollipop) {
// onActivityResultAboveL(intent, resultCode);
// }
if
(
resultCode
==
RESULT_OK
&&
requestCode
==
PictureConfig
.
CHOOSE_REQUEST
)
{
List
<
LocalMedia
>
list
=
PictureSelector
.
obtainMultipleResult
(
intent
);
Uri
uri
=
null
;
if
(
list
!=
null
)
{
uri
=
Uri
.
fromFile
(
new
File
(
list
.
get
(
0
).
getCompressPath
()));
}
if
(
uploadMessageAboveL
!=
null
)
{
uploadMessageAboveL
.
onReceiveValue
(
new
Uri
[]{
uri
});
}
else
if
(
mUploadMessage
!=
null
)
{
mUploadMessage
.
onReceiveValue
(
uri
);
}
}
}
/**
* 5.0 L 以下 上传图片成功后的回调
*/
public
void
onActivityResultBelowL
(
Intent
intent
,
int
resultCode
)
{
if
(
null
==
mUploadMessage
)
return
;
...
...
orderCenter/src/main/res/drawable-hdpi/icon_scan.png
0 → 100644
View file @
bd931238
638 Bytes
orderCenter/src/main/res/drawable-xhdpi/icon_scan.png
0 → 100644
View file @
bd931238
759 Bytes
orderCenter/src/main/res/drawable-xxhdpi/icon_scan.png
0 → 100644
View file @
bd931238
1.1 KB
orderCenter/src/main/res/drawable-xxxhdpi/icon_scan.png
0 → 100644
View file @
bd931238
1.49 KB
orderCenter/src/main/res/layout/activity_multi_process_order.xml
View file @
bd931238
...
...
@@ -145,8 +145,8 @@
android:layout_marginLeft=
"90dp"
android:layout_toRightOf=
"@id/text_two_text"
android:background=
"@null"
android:maxEms=
"50"
android:hint=
"@string/order_brand_name"
android:maxEms=
"50"
android:text=
"@={presenter.mBrandName}"
android:textColor=
"@color/default_text_color"
android:textSize=
"@dimen/sp_15"
/>
...
...
@@ -192,18 +192,19 @@
style=
"@style/line"
android:layout_below=
"@id/rl_verion"
/>
<
Relative
Layout
<
Linear
Layout
android:id=
"@+id/rl_serial_num"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_54"
android:layout_below=
"@id/line_version"
android:background=
"@color/cl_white"
>
android:background=
"@color/cl_white"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_serial_num"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/dp_13"
android:text=
"@string/order_serail"
android:textColor=
"@color/cl_home_title_text_color"
...
...
@@ -212,8 +213,6 @@
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_toRightOf=
"@id/tv_serial_num"
android:text=
"*"
android:textColor=
"#F74848"
android:textSize=
"@dimen/sp_15"
...
...
@@ -221,18 +220,24 @@
<EditText
android:id=
"@+id/et_serial_num"
android:layout_width=
"
match_parent
"
android:layout_width=
"
0dp
"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"75dp"
android:layout_toRightOf=
"@id/tv_serial_num"
android:layout_marginLeft=
"76dp"
android:layout_weight=
"1"
android:background=
"@null"
android:maxEms=
"50"
android:hint=
"@string/order_serail_hint"
android:maxEms=
"50"
android:text=
"@={presenter.mSn}"
android:textColor=
"@color/default_text_color"
android:textSize=
"@dimen/sp_15"
/>
</RelativeLayout>
<ImageView
android:id=
"@+id/scan"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"15dp"
android:src=
"@drawable/icon_scan"
/>
</LinearLayout>
<ImageView
android:id=
"@+id/line_serial"
...
...
@@ -307,9 +312,9 @@
android:background=
"@drawable/subscribe_time_shape"
android:gravity=
"top"
android:hint=
"@string/order_hint"
android:maxEms=
"200"
android:paddingLeft=
"@dimen/dp_13"
android:paddingTop=
"@dimen/dp_11"
android:maxEms=
"200"
android:text=
"@={presenter.mInfo}"
android:textColor=
"@color/cl_home_title_text_color"
android:textColorHint=
"@color/cl_selector_hui"
...
...
@@ -372,8 +377,8 @@
android:layout_width=
"60dp"
android:layout_height=
"60dp"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"10dp"
android:layout_marginTop=
"350dp"
android:background=
"@drawable/tab_blue_react"
android:gravity=
"center"
android:onClick=
"@{()->presenter.dumpToServerInstruction()}"
...
...
orderCenter/src/main/res/layout/activity_server_info.xml
View file @
bd931238
...
...
@@ -43,12 +43,24 @@
style=
"@style/card_line"
android:layout_below=
"@+id/title_back"
/>
<TextView
android:id=
"@+id/notice"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@+id/line"
android:layout_marginBottom=
"13dp"
android:layout_marginLeft=
"@dimen/dp_15"
android:layout_marginTop=
"13dp"
android:textColor=
"@color/default_text_color"
android:textSize=
"12sp"
android:visibility=
"@{presenter.mCanProcess==2?View.VISIBLE:View.GONE}"
/>
<com.dayu.widgets.LRecyclerView
android:id=
"@+id/recyclerView"
setPresenter=
"@{presenter}"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_below=
"@+id/
lin
e"
android:layout_below=
"@+id/
notic
e"
android:layout_marginBottom=
"@dimen/dp_50"
app:headType=
"@layout/recycler_server_info_header"
app:itemType=
"@layout/item_server_info"
/>
...
...
orderCenter/src/main/res/layout/activity_server_list_recycle.xml
View file @
bd931238
...
...
@@ -39,21 +39,32 @@
android:onClick=
"@{()->presenter.callPhone()}"
android:text=
"@string/company_mobile"
android:textColor=
"#3faafc"
android:
visibility=
"@{presenter.mIsShowPhone?View.VISIBLE:View.GONE}
"
android:
textSize=
"@dimen/dp_13.3
"
/>
android:
textSize=
"@dimen/dp_13.3
"
android:
visibility=
"@{presenter.mIsShowPhone?View.VISIBLE:View.GONE}
"
/>
</RelativeLayout>
<ImageView
style=
"@style/card_line"
/>
<TextView
android:id=
"@+id/notice"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"13dp"
android:layout_marginLeft=
"@dimen/dp_15"
android:layout_marginTop=
"13dp"
android:textColor=
"@color/default_text_color"
android:textSize=
"12sp"
android:visibility=
'@{(presenter.mCanProcess && presenter.mIsShowProcess)?View.VISIBLE:View.GONE}'
/>
<com.dayu.widgets.LRecyclerView
android:id=
"@+id/recyclerView"
setPresenter=
"@{presenter}"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginBottom=
"50dp"
android:background=
"#f5f5f5"
app:itemType=
"@layout/activity_server_list"
app:needCoreAdapter=
"true"
android:layout_marginBottom=
"50dp"
app:needFoot=
"false"
/>
</LinearLayout>
...
...
@@ -64,8 +75,8 @@
android:layout_alignParentBottom=
"true"
android:background=
'@{presenter.mCanProcess?@color/bg_button:@color/cl_selector_hui}'
android:clickable=
'@{presenter.mCanProcess?true:false}'
android:onClick=
"@{()->presenter.dumpToProcess()}"
android:gravity=
"center"
android:onClick=
"@{()->presenter.dumpToProcess()}"
android:text=
"@string/submit_order"
android:textColor=
"@color/white"
android:visibility=
"@{presenter.mIsShowProcess?View.VISIBLE:View.GONE}"
/>
...
...
orderCenter/src/main/res/layout/fragment_order_datails.xml
View file @
bd931238
...
...
@@ -493,36 +493,13 @@
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/sp_13.3"
/>
<TextView
android:id=
"@+id/t
hree_four_four
"
android:id=
"@+id/t
v_sn
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/three_two_two"
android:layout_marginLeft=
"@dimen/dp_13"
android:layout_marginTop=
"@dimen/dp_13"
android:text=
"@string/quality_assurance_info"
android:textColor=
"@color/cl_order_text_one"
android:textSize=
"@dimen/sp_13.3"
/>
<TextView
android:id=
"@+id/tv_warranty_info"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tv_model"
android:layout_marginLeft=
"@dimen/dp_10"
android:layout_marginTop=
"@dimen/dp_13"
android:layout_toRightOf=
"@id/three_four_four"
android:text=
"@{item.repairType == 1?@string/honai:@string/warranty}"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/sp_13.3"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/three_four_four"
android:layout_marginLeft=
"@dimen/dp_13"
android:layout_marginTop=
"@dimen/dp_13"
android:text=
"@string/sn_num"
android:textColor=
"@color/cl_order_text_one"
android:textSize=
"@dimen/sp_13.3"
/>
...
...
@@ -531,10 +508,10 @@
android:id=
"@+id/tv_sn_code"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/three_
four_four
"
android:layout_below=
"@id/three_
two_two
"
android:layout_marginLeft=
"@dimen/dp_10"
android:layout_marginTop=
"@dimen/dp_13"
android:layout_toRightOf=
"@id/t
hree_four_four
"
android:layout_toRightOf=
"@id/t
v_sn
"
android:text=
'@{!TextUtils.isEmpty(item.sn)?item.sn:@string/no_data}'
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/sp_13.3"
/>
...
...
orderCenter/src/main/res/layout/qr_code_layout.xml
View file @
bd931238
...
...
@@ -40,7 +40,7 @@
android:layout_gravity=
"center"
android:layout_marginTop=
"@dimen/dp_15"
android:text=
"@string/scan_code_for_appointment"
android:textSize=
"1
4
sp"
/>
android:textSize=
"1
5
sp"
/>
<TextView
android:id=
"@+id/notice"
...
...
@@ -49,7 +49,7 @@
android:layout_gravity=
"center"
android:layout_marginTop=
"@dimen/dp_15"
android:text=
"@string/scan_code_for_appointment_two"
android:textSize=
"1
4
sp"
/>
android:textSize=
"1
5
sp"
/>
</LinearLayout>
</LinearLayout>
...
...
userCenter/src/main/java/com/dayu/usercenter/presenter/pwlogin/PwLoginPresenter.java
View file @
bd931238
...
...
@@ -26,15 +26,14 @@ import com.hyphenate.chat.EMClient;
* on 2017/11/8.
*/
public
class
PwLoginPresenter
extends
PwLoginContract
.
Presenter
{
private
String
mPhone
;
public
ObservableField
<
String
>
phoneNume
=
new
ObservableField
<>();
public
ObservableField
<
String
>
code
=
new
ObservableField
<>();
@Override
public
void
onAttached
()
{
Bundle
bundle
=
mView
.
getBundle
();
mP
hone
=
bundle
.
getString
(
UserConstant
.
PHONE
);
phoneNume
.
set
(
mP
hone
);
String
p
hone
=
bundle
.
getString
(
UserConstant
.
PHONE
);
phoneNume
.
set
(
p
hone
);
}
@Override
...
...
@@ -49,8 +48,8 @@ public class PwLoginPresenter extends PwLoginContract.Presenter {
loginHx
(
userInfo
.
getHxAccount
(),
userInfo
.
getHxPwd
());
dumpAndSave
(
userInfo
);
}
else
if
(
userInfo
.
getDetectStatus
()
==
2
||
userInfo
.
getDetectStatus
()
==
3
)
{
showLoginDialog
(
userInfo
);
UserManager
.
getInstance
().
saveUser
(
userInfo
);
showLoginDialog
(
userInfo
);
}
else
{
ToastUtils
.
showShortToast
(
UIUtils
.
getString
(
R
.
string
.
login_faile
));
}
...
...
userCenter/src/main/java/com/dayu/usercenter/presenter/smslogin/SmsLoginPresenter.java
View file @
bd931238
...
...
@@ -59,8 +59,8 @@ public class SmsLoginPresenter extends SmsLoginContract.Presenter {
loginHx
(
userInfo
.
getHxAccount
(),
userInfo
.
getHxPwd
());
dumpAndSave
(
userInfo
);
}
else
if
(
userInfo
.
getDetectStatus
()
==
2
||
userInfo
.
getDetectStatus
()
==
3
)
{
showLoginDialog
(
userInfo
);
UserManager
.
getInstance
().
saveUser
(
userInfo
);
showLoginDialog
(
userInfo
);
}
else
{
ToastUtils
.
showShortToast
(
UIUtils
.
getString
(
R
.
string
.
login_faile
));
}
...
...
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