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
f5d1dccc
authored
Mar 03, 2020
by
mReturn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
销售&搜索&评论
parent
c846a5f6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
1218 additions
and
105 deletions
app/src/main/AndroidManifest.xml
app/src/main/java/com/dayu/bigfish/InitializeActivity.java
baseSDK/src/main/java/com/dayu/utils/CommonUtils.java
baseSDK/src/main/res/values/strings.xml
baseSDK/src/main/res/values/styles.xml
orderCenter/src/main/java/com/dayu/order/api/OrderApiFactory.java
orderCenter/src/main/java/com/dayu/order/api/OrderService.java
orderCenter/src/main/java/com/dayu/order/api/protocol/CommentPostData.java
orderCenter/src/main/java/com/dayu/order/ui/fragment/OperateDetailFragment.java
saleCenter/src/main/AndroidManifest.xml
saleCenter/src/main/java/com/bigfish/salecenter/adapter/CommentAdapter.java
saleCenter/src/main/java/com/bigfish/salecenter/adapter/SaleOrderAdapter.java
saleCenter/src/main/java/com/bigfish/salecenter/api/SaleService.java
saleCenter/src/main/java/com/bigfish/salecenter/model/CommentBean.java
saleCenter/src/main/java/com/bigfish/salecenter/model/CommentPostData.java
saleCenter/src/main/java/com/bigfish/salecenter/model/OrderDetailsBean.java
saleCenter/src/main/java/com/bigfish/salecenter/model/OrdersBean.java
saleCenter/src/main/java/com/bigfish/salecenter/model/ProductDetailBean.java
saleCenter/src/main/java/com/bigfish/salecenter/model/SalTabNumBean.java
saleCenter/src/main/java/com/bigfish/salecenter/model/SaleTab.java
saleCenter/src/main/java/com/bigfish/salecenter/presenter/homesale/HomeSalePresenter.java
saleCenter/src/main/java/com/bigfish/salecenter/presenter/saleorder/SaleOrderPresent.java
saleCenter/src/main/java/com/bigfish/salecenter/presenter/saleproduct/SaleProductPresent.java
saleCenter/src/main/java/com/bigfish/salecenter/ui/activity/ProductSearchActivity.java
saleCenter/src/main/java/com/bigfish/salecenter/ui/activity/SaleOrderDetailActivity.java
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/HomeSaleFragment.java
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/ProductInstructionFragment.java
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/SaleInstructionFragment.java
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/SaleOrderFragment.java
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/SaleProductFragment.java
saleCenter/src/main/res/layout/activity_order_detail.xml
saleCenter/src/main/res/layout/activity_product_search.xml
saleCenter/src/main/res/layout/fragment_common_sale.xml
saleCenter/src/main/res/layout/item_prodcut_comment.xml
saleCenter/src/main/res/layout/item_sale_comment.xml
saleCenter/src/main/res/layout/item_sale_order.xml
saleCenter/src/main/res/layout/item_sale_step.xml
userCenter/src/main/java/com/dayu/usercenter/presenter/pwlogin/PwLoginPresenter.java
userCenter/src/main/java/com/dayu/usercenter/presenter/smslogin/SmsLoginPresenter.java
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/ServiceRecordActivity.java
app/src/main/AndroidManifest.xml
View file @
f5d1dccc
...
...
@@ -86,7 +86,8 @@
android:value=
"599a41697f2c743210000990"
/>
<meta-data
android:name=
"UMENG_CHANNEL"
android:value=
"Channel ID"
/>
android:value=
"dev"
/>
<!--android:value="Channel ID" />-->
<!-- 高德地图 -->
<meta-data
...
...
app/src/main/java/com/dayu/bigfish/InitializeActivity.java
View file @
f5d1dccc
...
...
@@ -87,19 +87,20 @@ public class InitializeActivity extends DataBindingActivity<ActivityInitializeMa
}
break
;
case
Constants
.
ENGINEER
:
case
Constants
.
MANAGER_ENGINEER
:
Intent
intent1
=
new
Intent
(
InitializeActivity
.
this
,
MainActivity
.
class
);
startActivity
(
intent1
);
break
;
case
Constants
.
MANAGER_ENGINEER
:
Intent
intent2
;
if
(
StationManager
.
getInstance
().
haveData
())
{
intent2
=
new
Intent
(
InitializeActivity
.
this
,
MainActivity
.
class
);
startActivity
(
intent2
);
}
else
{
intent2
=
new
Intent
(
InitializeActivity
.
this
,
ServiceStationActivity
.
class
);
}
startActivity
(
intent2
);
break
;
//
case Constants.MANAGER_ENGINEER:
//
Intent intent2;
//
if (StationManager.getInstance().haveData()) {
//
intent2 = new Intent(InitializeActivity.this, MainActivity.class);
//
startActivity(intent2);
//
} else {
//
intent2 = new Intent(InitializeActivity.this, ServiceStationActivity.class);
//
}
//
startActivity(intent2);
//
break;
default
:
break
;
}
...
...
baseSDK/src/main/java/com/dayu/utils/CommonUtils.java
View file @
f5d1dccc
...
...
@@ -3,6 +3,7 @@ package com.dayu.utils;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.graphics.Color
;
import
android.net.Uri
;
import
android.text.TextUtils
;
import
android.view.View
;
...
...
@@ -60,6 +61,7 @@ public class CommonUtils {
Intent
intent
=
new
Intent
(
Intent
.
ACTION_DIAL
);
Uri
data
=
Uri
.
parse
(
"tel:"
+
phoneNum
);
intent
.
setData
(
data
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
context
.
startActivity
(
intent
);
}
...
...
@@ -111,4 +113,31 @@ public class CommonUtils {
}
}
/**
* 获取订单状态描述
* @return
*/
public
static
String
getOrderStauts
(
Context
context
,
int
state
)
{
// 1待付款2待商家确认3取消订单4待发货5待收货6已收货验收7退货申请8换货申请9退货待返货10换货待返货
// 11拒绝退货12拒绝换货13退货已返货14换货已返货15已退货16订单完成
String
[]
status
=
context
.
getResources
().
getStringArray
(
R
.
array
.
sale_order_status
);
if
(
status
.
length
>=
state
){
return
status
[
state
-
1
];
}
else
{
return
"unkonwn"
;
}
}
/**
* 获取订单状态对应的颜色
* @return
*/
public
static
int
getOrderStautsColor
(
Context
context
,
int
state
)
{
if
(
state
>
6
&&
state
<
16
){
return
context
.
getResources
().
getColor
(
R
.
color
.
common_red
);
}
else
{
return
context
.
getResources
().
getColor
(
R
.
color
.
text_common_blue
);
}
}
}
baseSDK/src/main/res/values/strings.xml
View file @
f5d1dccc
...
...
@@ -860,6 +860,28 @@ C) 在甲方使用大鱼平å°æœåŠ¡è¿‡ç¨‹ä¸äº§ç”Ÿçš„业务数æ®ï¼Œå®¢æˆ·æ•°æ
<string
name=
"sale_progress_str"
>
进度
</string>
<string
name=
"sale_record_str"
>
详细记录
</string>
<string
name=
"income_money"
>
收入金额
</string>
<string
name=
"sale_order_state1"
>
待确认
</string>
<string
name=
"sale_order_state2"
>
待发货/交付
</string>
<string
name=
"sale_order_state3"
>
待收货/退换
</string>
<string
name=
"sale_order_state4"
>
已完成
</string>
<array
name=
"sale_order_status"
>
<item>
待付款
</item>
<item>
待商家确认
</item>
<item>
取消订单
</item>
<item>
待发货
</item>
<item>
待收货
</item>
<item>
已收货验收
</item>
<item>
退货申请
</item>
<item>
换货申请
</item>
<item>
退货待返货
</item>
<item>
换货待返货
</item>
<item>
拒绝退货
</item>
<item>
拒绝换货
</item>
<item>
退货已返货
</item>
<item>
换货已返货
</item>
<item>
已退货
</item>
<item>
订单完成
</item>
</array>
<!--sale-->
<!--user-->
...
...
baseSDK/src/main/res/values/styles.xml
View file @
f5d1dccc
...
...
@@ -42,7 +42,7 @@
</style>
<style
name=
"sale_item_text2"
parent=
"sale_item_text"
>
<item
name=
"android:layout_marginLeft"
>
@dimen/size_order_item_tooltext_ml
</item>
<item
name=
"android:layout_marginLeft"
>
3dp
</item>
</style>
<style
name=
"sale_detail_text"
parent=
"sale_item_text"
>
...
...
@@ -53,7 +53,7 @@
<style
name=
"sale_record_text"
parent=
"sale_item_text"
>
<item
name=
"android:layout_width"
>
100dp
</item>
<item
name=
"android:layout_marginRight"
>
@dimen/dp_
20
</item>
<item
name=
"android:layout_marginRight"
>
@dimen/dp_
15
</item>
</style>
<style
name=
"ll_user_edit"
>
...
...
orderCenter/src/main/java/com/dayu/order/api/OrderApiFactory.java
View file @
f5d1dccc
...
...
@@ -177,8 +177,8 @@ public class OrderApiFactory {
return
Api
.
getService
(
OrderService
.
class
).
searchOrder
(
key
,
userAccount
,
status
,
page
,
pageSize
).
compose
(
Api
.
applySchedulers
());
}
public
static
Observable
<
BasePageBean
<
CommentBean
>>
getComment
(
int
targetId
,
int
status
,
int
targetType
,
int
page
,
int
pageSize
)
{
return
Api
.
getService
(
OrderService
.
class
).
getComment
(
targetId
,
status
,
targetType
,
page
,
pageSize
).
compose
(
Api
.
applySchedulers
());
public
static
Observable
<
BasePageBean
<
CommentBean
>>
getComment
(
int
targetId
,
int
status
,
int
targetType
,
int
accountType
,
int
page
,
int
pageSize
)
{
return
Api
.
getService
(
OrderService
.
class
).
getComment
(
targetId
,
status
,
targetType
,
accountType
,
page
,
pageSize
).
compose
(
Api
.
applySchedulers
());
}
public
static
Observable
<
Boolean
>
addComment
(
CommentPostData
data
)
{
return
Api
.
getService
(
OrderService
.
class
).
addComment
(
data
).
compose
(
Api
.
applySchedulers
());
...
...
orderCenter/src/main/java/com/dayu/order/api/OrderService.java
View file @
f5d1dccc
...
...
@@ -407,6 +407,7 @@ interface OrderService {
Observable
<
BaseResponse
<
BasePageBean
<
CommentBean
>>>
getComment
(
@Query
(
"targetId"
)
int
targetId
,
@Query
(
"status"
)
int
status
,
@Query
(
"targetType"
)
int
targetType
,
@Query
(
"accountType "
)
int
accountType
,
@Query
(
"page"
)
int
page
,
@Query
(
"pageSize"
)
int
pageSize
);
/**
...
...
orderCenter/src/main/java/com/dayu/order/api/protocol/CommentPostData.java
View file @
f5d1dccc
...
...
@@ -7,7 +7,7 @@ package com.dayu.order.api.protocol;
public
class
CommentPostData
{
public
int
accountId
;
//留言人或回复人ID
public
String
accountName
;
//账号名称
public
int
accountType
;
public
int
accountType
=
1
;
// 账号类型:1工程师或服务商 2小程序用户 3大鱼公司 ,
public
int
companyId
;
//ka companyId
public
String
content
;
//留言
public
String
messageAvatarUrl
;
//头像
...
...
@@ -15,8 +15,8 @@ public class CommentPostData {
public
String
name
;
//SP名称或KA名称
public
int
status
=
1
;
//状态 1显示 2屏蔽
public
int
targetId
;
//招标、授权、SPM服务ID
public
int
targetName
;
//招标授权名称
public
int
targetType
=
3
;
//类型:1:招标 2:授权 3:SPM服务
public
String
targetName
;
//招标授权名称
public
int
targetType
=
3
;
//类型:1:招标 2:授权 3:SPM服务
4:销售商品
public
String
updated
;
//更新人名称
public
int
beMessageId
;
//被回复的留言ID
...
...
orderCenter/src/main/java/com/dayu/order/ui/fragment/OperateDetailFragment.java
View file @
f5d1dccc
...
...
@@ -128,6 +128,7 @@ public class OperateDetailFragment extends BaseFragment<SImplePresenter, Fragmen
ProgressUtil
.
startLoad
(
mActivity
);
CommentPostData
commentData
=
new
CommentPostData
();
commentData
.
targetId
=
operateInfo
.
getId
();
commentData
.
targetName
=
operateInfo
.
getName
();
commentData
.
accountId
=
Integer
.
parseInt
(
userInfo
.
getAccountId
());
commentData
.
accountName
=
userInfo
.
getAccountName
();
commentData
.
messageAvatarUrl
=
userInfo
.
getHeaderImg
();
...
...
@@ -174,7 +175,7 @@ public class OperateDetailFragment extends BaseFragment<SImplePresenter, Fragmen
private
void
getCommentData
()
{
ProgressUtil
.
startLoad
(
mActivity
);
OrderApiFactory
.
getComment
(
operateInfo
.
getId
(),
1
,
3
,
page
,
pageSize
)
OrderApiFactory
.
getComment
(
operateInfo
.
getId
(),
1
,
3
,
1
,
page
,
pageSize
)
.
subscribe
(
mPresenter
.
baseObserver
(
data
->
{
if
(
page
==
1
)
{
commentList
.
clear
();
...
...
saleCenter/src/main/AndroidManifest.xml
View file @
f5d1dccc
...
...
@@ -11,6 +11,9 @@
<activity
android:name=
".ui.activity.SaleOrderDetailActivity"
android:screenOrientation=
"portrait"
/>
<activity
android:name=
".ui.activity.ProductSearchActivity"
android:screenOrientation=
"portrait"
/>
</application>
</manifest>
\ No newline at end of file
saleCenter/src/main/java/com/bigfish/salecenter/adapter/CommentAdapter.java
0 → 100644
View file @
f5d1dccc
package
com
.
bigfish
.
salecenter
.
adapter
;
import
android.view.View
;
import
com.bigfish.salecenter.R
;
import
com.bigfish.salecenter.databinding.ItemSaleCommentBinding
;
import
com.bigfish.salecenter.model.CommentBean
;
import
com.dayu.base.ui.adapter.CoreAdapter
;
import
com.dayu.utils.CommonUtils
;
import
com.dayu.utils.GlideImageLoader
;
/**
* Created by mReturn
*/
public
class
CommentAdapter
extends
CoreAdapter
<
CommentBean
,
ItemSaleCommentBinding
>
{
public
CommentAdapter
(
boolean
needFoot
)
{
super
(
needFoot
);
}
@Override
protected
void
onBind
(
ItemSaleCommentBinding
holder
,
CommentBean
item
,
int
position
)
{
super
.
onBind
(
holder
,
item
,
position
);
holder
.
rlComponent
.
setVisibility
(
item
.
getMessageType
()
==
1
?
View
.
VISIBLE
:
View
.
GONE
);
holder
.
rlReply
.
setVisibility
(
item
.
getMessageType
()
==
1
?
View
.
GONE
:
View
.
VISIBLE
);
GlideImageLoader
.
load
(
mContext
,
holder
.
ivAvatar
,
item
.
getMessageAvatarUrl
(),
R
.
drawable
.
icon_user_default
);
GlideImageLoader
.
load
(
mContext
,
holder
.
ivAvatar2
,
item
.
getMessageAvatarUrl
(),
R
.
drawable
.
icon_user_default
);
holder
.
tvTime
.
setText
(
CommonUtils
.
getTimeDesc
(
mContext
,
item
.
getCreateTime
()));
holder
.
tvTime2
.
setText
(
CommonUtils
.
getTimeDesc
(
mContext
,
item
.
getCreateTime
()));
}
}
saleCenter/src/main/java/com/bigfish/salecenter/adapter/SaleOrderAdapter.java
View file @
f5d1dccc
...
...
@@ -2,13 +2,15 @@ package com.bigfish.salecenter.adapter;
import
com.bigfish.salecenter.R
;
import
com.bigfish.salecenter.databinding.ItemSaleOrderBinding
;
import
com.bigfish.salecenter.model.OrdersBean
;
import
com.dayu.base.ui.adapter.CoreAdapter
;
import
com.dayu.utils.CommonUtils
;
/**
* Created by mReturn
* on 2020/2/13
**/
public
class
SaleOrderAdapter
extends
CoreAdapter
<
String
,
ItemSaleOrderBinding
>
{
public
class
SaleOrderAdapter
extends
CoreAdapter
<
OrdersBean
,
ItemSaleOrderBinding
>
{
int
type
;
public
SaleOrderAdapter
(
boolean
needFoot
,
int
type
)
{
...
...
@@ -17,9 +19,15 @@ public class SaleOrderAdapter extends CoreAdapter<String,ItemSaleOrderBinding> {
}
@Override
protected
void
onBind
(
ItemSaleOrderBinding
holder
,
String
item
,
int
position
)
{
protected
void
onBind
(
ItemSaleOrderBinding
holder
,
OrdersBean
item
,
int
position
)
{
super
.
onBind
(
holder
,
item
,
position
);
holder
.
tvBrandModel
.
setText
(
item
);
holder
.
tvBrandModel
.
setText
(
item
.
getGoodsModel
());
holder
.
tvPrice
.
setText
(
CommonUtils
.
getMoneyStr
(
mContext
,
item
.
getPrice
()));
holder
.
tvCommision
.
setText
(
CommonUtils
.
getMoneyStr
(
mContext
,
item
.
getSalesPrice
()));
holder
.
tvStatus
.
setText
(
CommonUtils
.
getOrderStauts
(
mContext
,
item
.
getStatus
()));
holder
.
tvStatus
.
setTextColor
(
CommonUtils
.
getOrderStautsColor
(
mContext
,
item
.
getStatus
()));
holder
.
tvDate
.
setText
(
item
.
getCreateTime
());
holder
.
tvCompany
.
setText
(
item
.
getReceiverName
());
holder
.
tvDateDesc
.
setText
(
type
==
1
?
mContext
.
getString
(
R
.
string
.
sale_order_date
):
mContext
.
getString
(
R
.
string
.
sale_order_date2
));
}
}
saleCenter/src/main/java/com/bigfish/salecenter/api/SaleService.java
View file @
f5d1dccc
package
com
.
bigfish
.
salecenter
.
api
;
import
com.bigfish.salecenter.event.SaleTabNumEvent
;
import
com.bigfish.salecenter.model.CollectProductData
;
import
com.bigfish.salecenter.model.CommentBean
;
import
com.bigfish.salecenter.model.CommentPostData
;
import
com.bigfish.salecenter.model.OrdersBean
;
import
com.bigfish.salecenter.model.ProductDetailBean
;
import
com.bigfish.salecenter.model.ProductListBean
;
import
com.bigfish.salecenter.model.SalTabNumBean
;
import
com.dayu.base.api.protocol.BasePageBean
;
import
com.dayu.base.api.protocol.BaseResponse
;
import
com.dayu.common.Constants
;
...
...
@@ -30,6 +35,7 @@ public interface SaleService {
*/
@GET
(
kaApi
+
"/goods/mobileGoods"
)
Observable
<
BaseResponse
<
BasePageBean
<
ProductListBean
>>>
getProducts
(
@Query
(
"engineerId"
)
int
engineerId
,
@Query
(
"key"
)
String
key
,
@Query
(
"page"
)
int
page
,
@Query
(
"pageSize"
)
int
pageSize
);
...
...
@@ -42,6 +48,7 @@ public interface SaleService {
*/
@GET
(
kaApi
+
"/goods/mobileCollectionGoods"
)
Observable
<
BaseResponse
<
BasePageBean
<
ProductListBean
>>>
getCollections
(
@Query
(
"engineerId"
)
int
engineerId
,
@Query
(
"key"
)
String
key
,
@Query
(
"page"
)
int
page
,
@Query
(
"pageSize"
)
int
pageSize
);
...
...
@@ -68,4 +75,49 @@ public interface SaleService {
*/
@POST
(
kaApi
+
"/goodsCollections"
)
Observable
<
BaseResponse
<
Boolean
>>
collectProdcut
(
@Body
CollectProductData
data
);
/**
* 销售列表
* @return
*/
@GET
(
Constants
.
API_8600
+
"/orderGoods/mobile"
)
Observable
<
BaseResponse
<
BasePageBean
<
OrdersBean
>>>
getSaleOrders
(
@Query
(
"engineerId"
)
int
engineerId
,
@Query
(
"state"
)
int
state
,
@Query
(
"key"
)
String
key
,
@Query
(
"page"
)
int
page
,
@Query
(
"pageSize"
)
int
pageSize
);
/**
* 订单详情
* @param id
* @return
*/
@GET
(
Constants
.
API_8600
+
"/orderGoods/{id}"
)
Observable
<
BaseResponse
<
OrdersBean
>>
getOrderDetail
(
@Path
(
"id"
)
int
id
);
/**
* 销售tab数量
* @param engineerId
* @return
*/
@GET
(
Constants
.
API_7900
+
"/goods/engineerCount/{engineerId}"
)
Observable
<
BaseResponse
<
SalTabNumBean
>>
getTabNums
(
@Path
(
"engineerId"
)
int
engineerId
);
/**
* 获取留言
* @return
*/
@GET
(
"/api-message/"
+
"leaveMessage"
)
Observable
<
BaseResponse
<
BasePageBean
<
CommentBean
>>>
getComment
(
@Query
(
"targetId"
)
int
targetId
,
@Query
(
"status"
)
int
status
,
@Query
(
"targetType"
)
int
targetType
,
@Query
(
"accountType "
)
int
accountType
,
@Query
(
"page"
)
int
page
,
@Query
(
"pageSize"
)
int
pageSize
);
/**
* 留言/回复
*/
@POST
(
"/api-message/"
+
"leaveMessage"
)
Observable
<
BaseResponse
<
Boolean
>>
addComment
(
@Body
CommentPostData
data
);
}
saleCenter/src/main/java/com/bigfish/salecenter/model/CommentBean.java
0 → 100644
View file @
f5d1dccc
package
com
.
bigfish
.
salecenter
.
model
;
/**
* Created by mReturn
* on 2020\1\9 0009.
*/
public
class
CommentBean
{
private
int
id
;
private
int
targetId
;
private
int
targetType
;
private
String
targetName
;
private
int
accountId
;
private
String
accountName
;
private
int
accountType
;
private
Object
name
;
private
String
messageAvatarUrl
;
private
int
beAccountId
;
private
Object
beName
;
private
int
beMessageId
;
private
String
content
;
private
Object
reContent
;
private
String
createTime
;
private
int
messageType
;
private
int
parentId
;
private
String
orderNum
;
private
int
status
;
private
int
isRead
;
private
Object
updateTime
;
private
String
updated
;
private
Object
companyId
;
private
Object
keyword
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getTargetId
()
{
return
targetId
;
}
public
void
setTargetId
(
int
targetId
)
{
this
.
targetId
=
targetId
;
}
public
int
getTargetType
()
{
return
targetType
;
}
public
void
setTargetType
(
int
targetType
)
{
this
.
targetType
=
targetType
;
}
public
String
getTargetName
()
{
return
targetName
;
}
public
void
setTargetName
(
String
targetName
)
{
this
.
targetName
=
targetName
;
}
public
int
getAccountId
()
{
return
accountId
;
}
public
void
setAccountId
(
int
accountId
)
{
this
.
accountId
=
accountId
;
}
public
String
getAccountName
()
{
return
accountName
;
}
public
void
setAccountName
(
String
accountName
)
{
this
.
accountName
=
accountName
;
}
public
int
getAccountType
()
{
return
accountType
;
}
public
void
setAccountType
(
int
accountType
)
{
this
.
accountType
=
accountType
;
}
public
Object
getName
()
{
return
name
;
}
public
void
setName
(
Object
name
)
{
this
.
name
=
name
;
}
public
String
getMessageAvatarUrl
()
{
return
messageAvatarUrl
;
}
public
void
setMessageAvatarUrl
(
String
messageAvatarUrl
)
{
this
.
messageAvatarUrl
=
messageAvatarUrl
;
}
public
int
getBeAccountId
()
{
return
beAccountId
;
}
public
void
setBeAccountId
(
int
beAccountId
)
{
this
.
beAccountId
=
beAccountId
;
}
public
Object
getBeName
()
{
return
beName
;
}
public
void
setBeName
(
Object
beName
)
{
this
.
beName
=
beName
;
}
public
int
getBeMessageId
()
{
return
beMessageId
;
}
public
void
setBeMessageId
(
int
beMessageId
)
{
this
.
beMessageId
=
beMessageId
;
}
public
String
getContent
()
{
return
content
;
}
public
void
setContent
(
String
content
)
{
this
.
content
=
content
;
}
public
Object
getReContent
()
{
return
reContent
;
}
public
void
setReContent
(
Object
reContent
)
{
this
.
reContent
=
reContent
;
}
public
String
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
}
public
int
getMessageType
()
{
return
messageType
;
}
public
void
setMessageType
(
int
messageType
)
{
this
.
messageType
=
messageType
;
}
public
int
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
int
parentId
)
{
this
.
parentId
=
parentId
;
}
public
String
getOrderNum
()
{
return
orderNum
;
}
public
void
setOrderNum
(
String
orderNum
)
{
this
.
orderNum
=
orderNum
;
}
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
public
int
getIsRead
()
{
return
isRead
;
}
public
void
setIsRead
(
int
isRead
)
{
this
.
isRead
=
isRead
;
}
public
Object
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Object
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
String
getUpdated
()
{
return
updated
;
}
public
void
setUpdated
(
String
updated
)
{
this
.
updated
=
updated
;
}
public
Object
getCompanyId
()
{
return
companyId
;
}
public
void
setCompanyId
(
Object
companyId
)
{
this
.
companyId
=
companyId
;
}
public
Object
getKeyword
()
{
return
keyword
;
}
public
void
setKeyword
(
Object
keyword
)
{
this
.
keyword
=
keyword
;
}
}
saleCenter/src/main/java/com/bigfish/salecenter/model/CommentPostData.java
0 → 100644
View file @
f5d1dccc
package
com
.
bigfish
.
salecenter
.
model
;
/**
* Created by mReturn
* on 2020\1\9 0009.
*/
public
class
CommentPostData
{
public
int
accountId
;
//留言人或回复人ID
public
String
accountName
;
//账号名称
public
int
accountType
=
1
;
// 账号类型:1工程师或服务商 2小程序用户 3大鱼公司
public
int
companyId
;
//ka companyId
public
String
content
;
//留言
public
String
messageAvatarUrl
;
//头像
public
int
messageType
;
//留言类型 1留言 2回复
public
String
name
;
//SP名称或KA名称
public
int
status
=
1
;
//状态 1显示 2屏蔽
public
int
targetId
;
//招标、授权、SPM服务ID
public
String
targetName
;
//招标授权名称
public
int
targetType
=
4
;
//类型:1:招标 2:授权 3:SPM服务 4:销售商品
public
String
updated
;
//更新人名称
public
int
beMessageId
;
//被回复的留言ID
public
String
beName
;
//被回复人昵称
public
int
parentId
;
//父节点
public
int
beAccountId
;
//被回复人ID
}
saleCenter/src/main/java/com/bigfish/salecenter/model/OrderDetailsBean.java
0 → 100644
View file @
f5d1dccc
This diff is collapsed.
Click to expand it.
saleCenter/src/main/java/com/bigfish/salecenter/model/OrdersBean.java
0 → 100644
View file @
f5d1dccc
This diff is collapsed.
Click to expand it.
saleCenter/src/main/java/com/bigfish/salecenter/model/ProductDetailBean.java
View file @
f5d1dccc
...
...
@@ -293,7 +293,7 @@ public class ProductDetailBean implements Serializable {
this
.
goodsPics
=
goodsPics
;
}
public
static
class
GoodsCategorysBean
{
public
static
class
GoodsCategorysBean
implements
Serializable
{
/**
* id : 1
* goodsId : 1
...
...
@@ -339,7 +339,7 @@ public class ProductDetailBean implements Serializable {
}
}
public
static
class
GoodsPicsBean
{
public
static
class
GoodsPicsBean
implements
Serializable
{
/**
* id : 1
* goodsId : 1
...
...
saleCenter/src/main/java/com/bigfish/salecenter/model/SalTabNumBean.java
0 → 100644
View file @
f5d1dccc
package
com
.
bigfish
.
salecenter
.
model
;
public
class
SalTabNumBean
{
/**
* goodsCount : 52
* selling : 0
* engineerCollecd : 0
* selled : 0
*/
private
int
goodsCount
;
private
int
selling
;
private
int
engineerCollecd
;
private
int
selled
;
public
int
getGoodsCount
()
{
return
goodsCount
;
}
public
void
setGoodsCount
(
int
goodsCount
)
{
this
.
goodsCount
=
goodsCount
;
}
public
int
getSelling
()
{
return
selling
;
}
public
void
setSelling
(
int
selling
)
{
this
.
selling
=
selling
;
}
public
int
getEngineerCollecd
()
{
return
engineerCollecd
;
}
public
void
setEngineerCollecd
(
int
engineerCollecd
)
{
this
.
engineerCollecd
=
engineerCollecd
;
}
public
int
getSelled
()
{
return
selled
;
}
public
void
setSelled
(
int
selled
)
{
this
.
selled
=
selled
;
}
}
saleCenter/src/main/java/com/bigfish/salecenter/model/SaleTab.java
View file @
f5d1dccc
...
...
@@ -9,4 +9,14 @@ public class SaleTab {
public
int
collect
;
public
int
inSale
;
public
int
saleDone
;
public
SaleTab
()
{
}
public
SaleTab
(
int
products
,
int
collect
,
int
inSale
,
int
saleDone
)
{
this
.
products
=
products
;
this
.
collect
=
collect
;
this
.
inSale
=
inSale
;
this
.
saleDone
=
saleDone
;
}
}
saleCenter/src/main/java/com/bigfish/salecenter/presenter/homesale/HomeSalePresenter.java
View file @
f5d1dccc
package
com
.
bigfish
.
salecenter
.
presenter
.
homesale
;
import
com.bigfish.salecenter.api.SaleService
;
import
com.bigfish.salecenter.model.SaleTab
;
import
com.dayu.base.api.Api
;
import
com.dayu.event.UserInfo
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.UserManager
;
...
...
@@ -22,14 +24,17 @@ public class HomeSalePresenter extends HomeSaleContract.Presenter{
@Override
public
void
getTabNum
(
int
userId
)
{
SaleTab
tab
=
new
SaleTab
();
mView
.
setTabNum
(
tab
,
mIndex
);
Api
.
getService
(
SaleService
.
class
).
getTabNums
(
mUserId
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
baseObserver
(
data
->{
SaleTab
tab
=
new
SaleTab
(
data
.
getGoodsCount
(),
data
.
getEngineerCollecd
(),
data
.
getSelling
(),
data
.
getSelled
());
mView
.
setTabNum
(
tab
,
mIndex
);
}));
}
@Override
public
void
onAttached
()
{
UserInfo
userInfo
=
UserManager
.
getInstance
().
getUser
();
mUserId
=
Integer
.
parseInt
(
userInfo
.
getAccountId
());
ToastUtils
.
showShortToast
(
"sale: "
+
mUserId
);
}
}
saleCenter/src/main/java/com/bigfish/salecenter/presenter/saleorder/SaleOrderPresent.java
View file @
f5d1dccc
package
com
.
bigfish
.
salecenter
.
presenter
.
saleorder
;
import
android.databinding.ObservableField
;
import
android.text.TextUtils
;
import
com.bigfish.salecenter.api.SaleService
;
import
com.bigfish.salecenter.event.RefreshSaleTab
;
import
com.bigfish.salecenter.presenter.saleproduct.SaleProductContract
;
import
com.dayu.base.api.Api
;
import
com.dayu.common.Constants
;
import
com.dayu.event.UserInfo
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.UserManager
;
import
org.greenrobot.eventbus.EventBus
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -19,6 +26,7 @@ public class SaleOrderPresent extends SaleOrderContract.Presenter {
private
int
mUserId
;
private
int
type
;
//1.销售中 2.已完成
private
ObservableField
<
Object
>
datas
=
new
ObservableField
<>();
public
String
keyStr
;
//搜索关键字
@Override
public
void
onAttached
()
{
...
...
@@ -39,22 +47,24 @@ public class SaleOrderPresent extends SaleOrderContract.Presenter {
public
void
refresh
()
{
super
.
refresh
();
mPage
=
1
;
// if (type == 1) {
// ToastUtils.showShortToast("in sale");
// } else {
// ToastUtils.showShortToast("sale done");
// }
//test data
List
<
String
>
items
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
10
;
i
++){
items
.
add
(
"order item-"
+
i
+
"-"
+
type
);
getOrders
();
if
(
TextUtils
.
isEmpty
(
keyStr
)){
EventBus
.
getDefault
().
post
(
new
RefreshSaleTab
(-
1
));
}
datas
.
set
(
items
);
}
private
void
getOrders
()
{
Api
.
getService
(
SaleService
.
class
).
getSaleOrders
(
23
,
type
,
keyStr
,
mPage
,
Constants
.
PAGESIZE
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
baseObserver
(
orders
->{
// ToastUtils.showShortToast(products.getData().size() + " ");
datas
.
set
(
orders
);
mPage
++;
},
responeThrowable
->
datas
.
set
(
Constants
.
FAILED
)));
}
@Override
public
void
loadMore
()
{
super
.
loadMore
();
getOrders
();
}
}
saleCenter/src/main/java/com/bigfish/salecenter/presenter/saleproduct/SaleProductPresent.java
View file @
f5d1dccc
package
com
.
bigfish
.
salecenter
.
presenter
.
saleproduct
;
import
android.databinding.ObservableField
;
import
android.text.TextUtils
;
import
com.bigfish.salecenter.api.SaleService
;
import
com.bigfish.salecenter.event.RefreshSaleTab
;
import
com.bigfish.salecenter.model.CollectProductData
;
import
com.bigfish.salecenter.model.ProductListBean
;
import
com.dayu.base.api.Api
;
...
...
@@ -11,6 +13,8 @@ import com.dayu.event.UserInfo;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.UserManager
;
import
org.greenrobot.eventbus.EventBus
;
import
io.reactivex.Observable
;
/**
...
...
@@ -21,6 +25,7 @@ public class SaleProductPresent extends SaleProductContract.Presenter {
private
int
mPage
;
private
int
mUserId
;
public
int
type
;
//1.商品 2.收藏
public
String
keyStr
;
//搜索关键字
private
ObservableField
<
Object
>
datas
=
new
ObservableField
<>();
@Override
...
...
@@ -47,13 +52,15 @@ public class SaleProductPresent extends SaleProductContract.Presenter {
}
else
{
getCollections
();
}
if
(
TextUtils
.
isEmpty
(
keyStr
)){
EventBus
.
getDefault
().
post
(
new
RefreshSaleTab
(-
1
));
}
}
//商品列表
private
void
getProducts
()
{
Api
.
getService
(
SaleService
.
class
).
getProducts
(
mUserId
,
mPage
,
Constants
.
PAGESIZE
).
compose
(
Api
.
applySchedulers
())
Api
.
getService
(
SaleService
.
class
).
getProducts
(
mUserId
,
keyStr
,
mPage
,
Constants
.
PAGESIZE
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
baseObserver
(
products
->
{
// ToastUtils.showShortToast(products.getData().size() + " ");
...
...
@@ -65,7 +72,7 @@ public class SaleProductPresent extends SaleProductContract.Presenter {
//收藏列表
private
void
getCollections
()
{
Api
.
getService
(
SaleService
.
class
).
getCollections
(
mUserId
,
mPage
,
Constants
.
PAGESIZE
).
compose
(
Api
.
applySchedulers
())
Api
.
getService
(
SaleService
.
class
).
getCollections
(
mUserId
,
keyStr
,
mPage
,
Constants
.
PAGESIZE
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
baseObserver
(
products
->
{
// ToastUtils.showShortToast("collections: " + products.getData().size());
...
...
saleCenter/src/main/java/com/bigfish/salecenter/ui/activity/ProductSearchActivity.java
0 → 100644
View file @
f5d1dccc
package
com
.
bigfish
.
salecenter
.
ui
.
activity
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.view.View
;
import
android.view.inputmethod.EditorInfo
;
import
android.view.inputmethod.InputMethodManager
;
import
com.bigfish.salecenter.R
;
import
com.bigfish.salecenter.adapter.SaleProductAdapter
;
import
com.bigfish.salecenter.databinding.ActivityProductSearchBinding
;
import
com.bigfish.salecenter.databinding.ItemSaleProductBinding
;
import
com.bigfish.salecenter.model.ProductListBean
;
import
com.bigfish.salecenter.presenter.saleproduct.SaleProductContract
;
import
com.bigfish.salecenter.presenter.saleproduct.SaleProductPresent
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.widgets.listener.OnItemClickListener
;
import
java.util.ArrayList
;
public
class
ProductSearchActivity
extends
BaseActivity
<
SaleProductPresent
,
ActivityProductSearchBinding
>
implements
SaleProductContract
.
View
{
private
int
mType
;
//1.商品 2.收藏
SaleProductAdapter
mAdapter
;
public
static
void
launch
(
Context
context
,
int
type
)
{
Intent
intent
=
new
Intent
(
context
,
ProductSearchActivity
.
class
);
intent
.
putExtra
(
"type"
,
type
);
context
.
startActivity
(
intent
);
}
@Override
public
void
setPresenter
()
{
mBind
.
setPresenter
(
mPresenter
);
}
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
activity_product_search
;
}
@Override
public
void
initView
()
{
mBind
.
tvCancel
.
setOnClickListener
(
view
->
dumpBack
());
mType
=
getIntent
().
getIntExtra
(
"type"
,
0
);
mPresenter
.
setType
(
mType
);
initSerachView
();
mAdapter
=
new
SaleProductAdapter
(
true
);
mAdapter
.
setViewType
(
R
.
layout
.
item_sale_product
);
mAdapter
.
initPresenter
(
mPresenter
);
mBind
.
recyclerView
.
setAdapter
(
mAdapter
);
mAdapter
.
setData
(
new
ArrayList
<>());
mBind
.
recyclerView
.
setVisibility
(
View
.
GONE
);
mBind
.
recyclerView
.
setOnItemClickListener
(
new
OnItemClickListener
<
ProductListBean
,
ItemSaleProductBinding
>()
{
@Override
public
void
OnItemClick
(
ProductListBean
item
,
ItemSaleProductBinding
bind
)
{
Intent
intent
=
new
Intent
(
mActivity
,
ProductDetailActivity
.
class
);
intent
.
putExtra
(
"id"
,
item
.
getId
());
mActivity
.
startActivity
(
intent
);
}
});
}
private
void
initSerachView
()
{
mBind
.
edtSeacher
.
setOnEditorActionListener
((
v
,
actionId
,
event
)
->
{
if
(
actionId
==
EditorInfo
.
IME_ACTION_SEARCH
)
{
mPresenter
.
refresh
();
InputMethodManager
imm
=
(
InputMethodManager
)
mActivity
.
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
);
imm
.
hideSoftInputFromWindow
(
mActivity
.
getCurrentFocus
().
getWindowToken
(),
0
);
return
true
;
}
return
false
;
});
}
}
saleCenter/src/main/java/com/bigfish/salecenter/ui/activity/SaleOrderDetailActivity.java
View file @
f5d1dccc
package
com
.
bigfish
.
salecenter
.
ui
.
activity
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.widget.CheckBox
;
import
com.bigfish.salecenter.R
;
import
com.bigfish.salecenter.api.SaleService
;
import
com.bigfish.salecenter.databinding.ActivityOrderDetailBinding
;
import
com.bigfish.salecenter.model.OrdersBean
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
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.utils.CommonUtils
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -18,6 +21,8 @@ import java.util.List;
* on 2020/2/14
**/
public
class
SaleOrderDetailActivity
extends
BaseActivity
<
SImplePresenter
,
ActivityOrderDetailBinding
>
{
private
int
mId
;
@Override
public
void
setPresenter
()
{
...
...
@@ -31,23 +36,45 @@ public class SaleOrderDetailActivity extends BaseActivity<SImplePresenter, Activ
@Override
public
void
initView
()
{
mBind
.
toolbar
.
setNavigationOnClickListener
(
v
->
dumpBack
());
setStepAdapter
();
mId
=
getIntent
().
getIntExtra
(
"id"
,
0
);
initData
();
}
private
void
initData
()
{
showDialog
();
Api
.
getService
(
SaleService
.
class
).
getOrderDetail
(
mId
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
mPresenter
.
baseObserver
(
data
->{
setDetailViewData
(
data
);
}
));
}
private
void
setStepAdapter
()
{
private
void
setDetailViewData
(
OrdersBean
data
)
{
mBind
.
tvOrderNumber
.
setText
(
data
.
getOrderGoodsNum
());
mBind
.
tvCompanyName
.
setText
(
data
.
getOrgName
());
mBind
.
tvCustomerName
.
setText
(
data
.
getReceiverName
());
mBind
.
tvCustomerAddr
.
setText
(
data
.
getReceiverAddress
());
mBind
.
tvCustomerPhone
.
setText
(
data
.
getReceiverMobile
());
mBind
.
tvModel
.
setText
(
data
.
getGoodsModel
());
mBind
.
tvSellerCompany
.
setText
(
data
.
getProviderName
());
mBind
.
tvCompanyPn
.
setText
(
data
.
getGoodsPn
());
mBind
.
tvSinglePrice
.
setText
(
CommonUtils
.
getMoneyStr
(
this
,
data
.
getGoodsPrice
()));
mBind
.
tvOrderCount
.
setText
(
data
.
getNum
()+
""
);
mBind
.
tvOrderMoney
.
setText
(
CommonUtils
.
getMoneyStr
(
this
,
data
.
getPrice
()));
mBind
.
tvBonus
.
setText
(
CommonUtils
.
getMoneyStr
(
this
,
data
.
getSalesPrice
()));
setStepAdapter
(
data
.
getOrderGoodsRecordVOS
());
}
List
<
String
>
testList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
testList
.
add
(
"test data"
+
i
);
}
private
void
setStepAdapter
(
List
<
OrdersBean
.
OrderGoodsRecordVOSBean
>
records
)
{
BaseQuickAdapter
<
String
,
BaseViewHolder
>
stepAdapter
=
new
BaseQuickAdapter
<
String
,
BaseViewHolder
>(
R
.
layout
.
item_sale_step
,
testList
)
{
BaseQuickAdapter
<
OrdersBean
.
OrderGoodsRecordVOSBean
,
BaseViewHolder
>
stepAdapter
=
new
BaseQuickAdapter
<
OrdersBean
.
OrderGoodsRecordVOSBean
,
BaseViewHolder
>(
R
.
layout
.
item_sale_step
,
records
)
{
@Override
protected
void
convert
(
BaseViewHolder
helper
,
String
item
)
{
helper
.
setText
(
R
.
id
.
tv_time
,
item
);
helper
.
setText
(
R
.
id
.
tv_progress
,
item
);
helper
.
setText
(
R
.
id
.
tv_detail
,
item
);
protected
void
convert
(
BaseViewHolder
helper
,
OrdersBean
.
OrderGoodsRecordVOSBean
item
)
{
helper
.
setText
(
R
.
id
.
tv_time
,
item
.
getCreateTime
()
);
helper
.
setText
(
R
.
id
.
tv_progress
,
item
.
getProgressTitle
()
);
helper
.
setText
(
R
.
id
.
tv_detail
,
item
.
getRecord
()
);
}
};
mBind
.
rvSellStep
.
setLayoutManager
(
new
LinearLayoutManager
(
this
));
...
...
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/HomeSaleFragment.java
View file @
f5d1dccc
...
...
@@ -120,7 +120,7 @@ public class HomeSaleFragment extends BaseFragment<HomeSalePresenter, FragmentHo
@Override
public
void
setTabNum
(
SaleTab
tab
,
int
myTabIndex
)
{
EventBus
.
getDefault
().
post
(
new
SaleTabNumEvent
(
15
));
EventBus
.
getDefault
().
post
(
new
SaleTabNumEvent
(
tab
.
products
+
tab
.
collect
+
tab
.
inSale
+
tab
.
saleDone
));
String
[]
tabNum
=
new
String
[]{
tab
.
products
+
""
,
tab
.
collect
+
""
,
tab
.
inSale
+
""
,
tab
.
saleDone
+
""
};
if
(
isFirstAddTab
)
{
mBind
.
tbSale
.
removeAllTabs
();
...
...
@@ -165,4 +165,5 @@ public class HomeSaleFragment extends BaseFragment<HomeSalePresenter, FragmentHo
public
void
onRefreshTab
(
RefreshSaleTab
event
)
{
mPresenter
.
chooseTab
(
event
.
getTabNum
());
}
}
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/ProductInstructionFragment.java
View file @
f5d1dccc
...
...
@@ -54,8 +54,14 @@ public class ProductInstructionFragment extends BaseFragment<SImplePresenter, Fr
if
(
mDetail
!=
null
)
{
initDataView
();
mBind
.
btnShare
.
setOnClickListener
(
v
->
onShareClick
());
mBind
.
btnContact
.
setOnClickListener
(
v
->
CommonUtils
.
dialPhone
(
mActivity
,
mDetail
.
getSalesHot
())
mBind
.
btnContact
.
setOnClickListener
(
v
->
{
if
(
TextUtils
.
isEmpty
(
mDetail
.
getSalesHot
()))
{
ToastUtils
.
showShortToast
(
R
.
string
.
no_mobile
);
}
else
{
CommonUtils
.
dialPhone
(
getContext
(),
mDetail
.
getSalesHot
());
}
}
);
}
}
...
...
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/SaleInstructionFragment.java
View file @
f5d1dccc
This diff is collapsed.
Click to expand it.
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/SaleOrderFragment.java
View file @
f5d1dccc
...
...
@@ -2,16 +2,26 @@ package com.bigfish.salecenter.ui.fragment;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.text.Editable
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.view.inputmethod.EditorInfo
;
import
com.bigfish.salecenter.R
;
import
com.bigfish.salecenter.adapter.SaleOrderAdapter
;
import
com.bigfish.salecenter.adapter.SaleProductAdapter
;
import
com.bigfish.salecenter.databinding.FragmentCommonSaleBinding
;
import
com.bigfish.salecenter.databinding.ItemSaleOrderBinding
;
import
com.bigfish.salecenter.databinding.ItemSaleProductBinding
;
import
com.bigfish.salecenter.model.OrdersBean
;
import
com.bigfish.salecenter.model.ProductListBean
;
import
com.bigfish.salecenter.presenter.saleorder.SaleOrderPresent
;
import
com.bigfish.salecenter.presenter.saleproduct.SaleProductPresent
;
import
com.bigfish.salecenter.ui.activity.ProductDetailActivity
;
import
com.bigfish.salecenter.ui.activity.SaleOrderDetailActivity
;
import
com.dayu.base.ui.fragment.BaseFragment
;
import
com.dayu.common.MyTextWatcher
;
import
com.dayu.utils.CommonUtils
;
import
com.dayu.widgets.listener.OnItemClickListener
;
/**
...
...
@@ -38,7 +48,7 @@ public class SaleOrderFragment extends BaseFragment<SaleOrderPresent,FragmentCom
@Override
protected
void
lazyLoad
()
{
super
.
lazyLoad
();
//
mPresenter.refresh();
mPresenter
.
refresh
();
}
...
...
@@ -47,20 +57,57 @@ public class SaleOrderFragment extends BaseFragment<SaleOrderPresent,FragmentCom
Bundle
bundle
=
getArguments
();
type
=
bundle
.
getInt
(
"type"
);
mPresenter
.
setType
(
type
);
mBind
.
edtSeacher
.
setHint
(
mActivity
.
getString
(
R
.
string
.
input_sale_order
)+
type
);
// mBind.edtSeacher.setHint(mActivity.getString(R.string.input_sale_order)+type);
initSearchView
();
mAdapter
=
new
SaleOrderAdapter
(
true
,
type
);
mAdapter
.
setViewType
(
R
.
layout
.
item_sale_order
);
mBind
.
recyclerView
.
setAdapter
(
mAdapter
);
mPresenter
.
refresh
();
mBind
.
recyclerView
.
setOnItemClickListener
(
new
OnItemClickListener
()
{
mBind
.
recyclerView
.
setOnItemClickListener
((
OnItemClickListener
<
OrdersBean
,
ItemSaleOrderBinding
>)
(
item
,
bind
)
->
{
Intent
intent
=
new
Intent
(
mActivity
,
SaleOrderDetailActivity
.
class
);
intent
.
putExtra
(
"id"
,
item
.
getId
());
startActivity
(
intent
);
});
}
private
void
initSearchView
()
{
mBind
.
edtSeacher
.
setHint
(
mActivity
.
getString
(
R
.
string
.
input_sale_order
));
mBind
.
edtSeacher
.
addTextChangedListener
(
new
MyTextWatcher
(){
@Override
public
void
OnItemClick
(
Object
item
,
Object
bind
)
{
startActivity
(
new
Intent
(
mActivity
,
SaleOrderDetailActivity
.
class
));
public
void
afterTextChanged
(
Editable
s
)
{
super
.
afterTextChanged
(
s
);
if
(
s
.
toString
().
trim
().
length
()>
0
)
mBind
.
tvCancel
.
setVisibility
(
View
.
VISIBLE
);
}
});
mBind
.
edtSeacher
.
setOnEditorActionListener
((
v
,
actionId
,
event
)
->
{
String
str
=
mBind
.
edtSeacher
.
getText
().
toString
();
if
(
actionId
==
EditorInfo
.
IME_ACTION_SEARCH
)
{
if
(
str
.
length
()>
0
){
mPresenter
.
keyStr
=
mBind
.
edtSeacher
.
getText
().
toString
();
mPresenter
.
refresh
();
CommonUtils
.
hideSoftInput
(
mActivity
);
return
true
;
}
}
return
false
;
});
mBind
.
tvCancel
.
setOnClickListener
(
view
->
{
mBind
.
edtSeacher
.
setText
(
""
);
mBind
.
tvCancel
.
setVisibility
(
View
.
GONE
);
CommonUtils
.
hideSoftInput
(
mActivity
);
if
(!
TextUtils
.
isEmpty
(
mPresenter
.
keyStr
)){
mPresenter
.
keyStr
=
""
;
mPresenter
.
refresh
();
}
});
}
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_common_sale
;
...
...
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/SaleProductFragment.java
View file @
f5d1dccc
package
com
.
bigfish
.
salecenter
.
ui
.
fragment
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.text.Editable
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.view.inputmethod.EditorInfo
;
import
android.view.inputmethod.InputMethodManager
;
import
com.bigfish.salecenter.R
;
import
com.bigfish.salecenter.adapter.SaleProductAdapter
;
import
com.bigfish.salecenter.databinding.FragmentCommonSaleBinding
;
import
com.bigfish.salecenter.databinding.ItemSaleProductBinding
;
import
com.bigfish.salecenter.event.CollectChangedEvent
;
import
com.bigfish.salecenter.event.RefreshSaleTab
;
import
com.bigfish.salecenter.model.ProductListBean
;
import
com.bigfish.salecenter.presenter.saleproduct.SaleProductContract
;
import
com.bigfish.salecenter.presenter.saleproduct.SaleProductPresent
;
import
com.bigfish.salecenter.ui.activity.ProductDetailActivity
;
import
com.bigfish.salecenter.ui.activity.ProductSearchActivity
;
import
com.dayu.base.ui.fragment.BaseFragment
;
import
com.dayu.common.MyTextWatcher
;
import
com.dayu.utils.CommonUtils
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.widgets.listener.OnItemClickListener
;
...
...
@@ -58,8 +68,9 @@ public class SaleProductFragment extends BaseFragment<SaleProductPresent, Fragme
EventBus
.
getDefault
().
register
(
this
);
Bundle
bundle
=
getArguments
();
type
=
bundle
.
getInt
(
"type"
);
initSearchView
();
mPresenter
.
setType
(
type
);
mBind
.
edtSeacher
.
setHint
(
mActivity
.
getString
(
R
.
string
.
input_sale_product
)
+
type
);
mAdapter
=
new
SaleProductAdapter
(
true
);
mAdapter
.
setViewType
(
R
.
layout
.
item_sale_product
);
...
...
@@ -74,6 +85,49 @@ public class SaleProductFragment extends BaseFragment<SaleProductPresent, Fragme
});
}
private
void
initSearchView
()
{
mBind
.
edtSeacher
.
setHint
(
mActivity
.
getString
(
R
.
string
.
input_sale_product
));
mBind
.
edtSeacher
.
addTextChangedListener
(
new
MyTextWatcher
(){
@Override
public
void
afterTextChanged
(
Editable
s
)
{
super
.
afterTextChanged
(
s
);
if
(
s
.
toString
().
trim
().
length
()>
0
)
mBind
.
tvCancel
.
setVisibility
(
View
.
VISIBLE
);
}
});
mBind
.
edtSeacher
.
setOnEditorActionListener
((
v
,
actionId
,
event
)
->
{
String
str
=
mBind
.
edtSeacher
.
getText
().
toString
();
if
(
actionId
==
EditorInfo
.
IME_ACTION_SEARCH
)
{
if
(
str
.
length
()>
0
){
mPresenter
.
keyStr
=
mBind
.
edtSeacher
.
getText
().
toString
();
mPresenter
.
refresh
();
CommonUtils
.
hideSoftInput
(
mActivity
);
return
true
;
}
}
return
false
;
});
mBind
.
tvCancel
.
setOnClickListener
(
view
->
{
mBind
.
edtSeacher
.
setText
(
""
);
mBind
.
tvCancel
.
setVisibility
(
View
.
GONE
);
CommonUtils
.
hideSoftInput
(
mActivity
);
if
(!
TextUtils
.
isEmpty
(
mPresenter
.
keyStr
)){
mPresenter
.
keyStr
=
""
;
mPresenter
.
refresh
();
}
});
}
private
void
hideBoard
(){
InputMethodManager
imm
=
(
InputMethodManager
)
mActivity
.
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
);
imm
.
hideSoftInputFromWindow
(
mActivity
.
getCurrentFocus
().
getWindowToken
(),
0
);
}
private
void
toDetail
(
ProductListBean
item
)
{
Intent
intent
=
new
Intent
(
mActivity
,
ProductDetailActivity
.
class
);
intent
.
putExtra
(
"id"
,
item
.
getId
());
...
...
@@ -95,6 +149,7 @@ public class SaleProductFragment extends BaseFragment<SaleProductPresent, Fragme
mPresenter
.
refresh
();
}
else
{
updateCollectData
(
event
);
EventBus
.
getDefault
().
post
(
new
RefreshSaleTab
(-
1
));
}
}
}
...
...
saleCenter/src/main/res/layout/activity_order_detail.xml
View file @
f5d1dccc
...
...
@@ -77,22 +77,22 @@
android:text=
""
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_linearlayout_detail"
android:layout_alignParentRight=
"true"
android:layout_width=
"wrap_content"
>
</RelativeLayout>
<LinearLayout
style=
"@style/sale_linearlayout_detail"
android:layout_alignParentRight=
"true"
android:layout_width=
"wrap_content"
>
<TextView
style=
"@style/sale_detail_text"
android:text=
"@string/sale_customer_phone"
/>
<TextView
style=
"@style/sale_detail_text"
android:text=
"@string/sale_customer_phone"
/>
<TextView
android:id=
"@+id/tv_customer_phone"
style=
"@style/sale_item_text2"
android:text=
""
/>
</LinearLayout>
</RelativeLayout>
<TextView
android:id=
"@+id/tv_customer_phone"
style=
"@style/sale_item_text2"
android:text=
""
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_linearlayout_detail"
>
...
...
@@ -155,8 +155,8 @@
<TextView
android:id=
"@+id/tv_single_price"
style=
"@style/sale_item_text2
"
android:text=
"
"
/>
android:textColor=
"@color/text_common_blue
"
style=
"@style/sale_item_text2
"
/>
</LinearLayout>
<LinearLayout
...
...
@@ -172,7 +172,7 @@
<TextView
android:id=
"@+id/tv_order_count"
style=
"@style/sale_item_text2"
android:text=
""
/>
/>
</LinearLayout>
</RelativeLayout>
...
...
@@ -192,25 +192,27 @@
<TextView
android:id=
"@+id/tv_order_money"
style=
"@style/sale_item_text2"
android:text=
""
/>
android:textColor=
"@color/text_common_blue"
/>
</LinearLayout>
<LinearLayout
style=
"@style/sale_linearlayout_detail"
android:layout_alignParentRight=
"true"
android:layout_width=
"wrap_content"
>
</RelativeLayout>
<LinearLayout
style=
"@style/sale_linearlayout_detail"
android:layout_alignParentRight=
"true"
android:layout_width=
"wrap_content"
>
<TextView
style=
"@style/sale_detail_text"
android:text=
"@string/sale_agent_bonus"
/>
<TextView
style=
"@style/sale_detail_text"
android:text=
"@string/sale_agent_bonus"
/>
<TextView
android:id=
"@+id/tv_bonus"
style=
"@style/sale_item_text2"
android:text=
""
/>
</LinearLayout
>
</
Relative
Layout>
<TextView
android:id=
"@+id/tv_bonus"
style=
"@style/sale_item_text2"
android:textColor=
"@color/text_common_green"
/
>
</
Linear
Layout>
<TextView
style=
"@style/sale_detail_text"
...
...
saleCenter/src/main/res/layout/activity_product_search.xml
0 → 100644
View file @
f5d1dccc
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<data>
<variable
name=
"presenter"
type=
"com.bigfish.salecenter.presenter.saleproduct.SaleProductPresent"
/>
</data>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<RelativeLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
>
<RelativeLayout
android:id=
"@+id/rl_seacher"
style=
"@style/title"
android:visibility=
"visible"
>
<EditText
android:id=
"@+id/edt_seacher"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"10dp"
android:layout_toRightOf=
"@+id/iv"
android:background=
"@null"
android:hint=
"@string/input_sale_product"
android:imeOptions=
"actionSearch"
android:inputType=
"text"
android:singleLine=
"true"
android:text=
"@={presenter.keyStr}"
android:textSize=
"16sp"
/>
<ImageView
android:id=
"@+id/iv"
style=
"@style/title_image_back"
android:src=
"@drawable/seacher"
/>
<TextView
android:id=
"@+id/tv_cancel"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"20dp"
android:gravity=
"center"
android:text=
"@string/cancle"
android:textColor=
"@color/cl_black"
android:textSize=
"@dimen/dp_18"
android:textStyle=
"bold"
/>
<ImageView
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/dp_6"
android:layout_alignParentBottom=
"true"
android:src=
"@drawable/line_shape"
/>
</RelativeLayout>
</RelativeLayout>
<com.dayu.widgets.LRecyclerView
android:id=
"@+id/recyclerView"
setPresenter=
"@{presenter}"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#f5f5f5"
/>
</LinearLayout>
</layout>
\ No newline at end of file
saleCenter/src/main/res/layout/fragment_common_sale.xml
View file @
f5d1dccc
...
...
@@ -48,9 +48,10 @@
android:gravity=
"center"
android:text=
"@string/cancle"
android:textColor=
"@color/cl_black"
android:textSize=
"
@dimen/dp_18
"
android:textSize=
"
16sp
"
android:textStyle=
"bold"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
<ImageView
android:layout_width=
"match_parent"
...
...
saleCenter/src/main/res/layout/item_prodcut_comment.xml
0 → 100644
View file @
f5d1dccc
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<data>
<variable
name=
"item"
type=
"com.bigfish.salecenter.model.CommentBean"
/>
</data>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/rl_component"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
>
<ImageView
android:id=
"@+id/iv_avatar"
android:layout_width=
"35dp"
android:layout_height=
"35dp"
android:layout_marginLeft=
"10dp"
/>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:layout_marginTop=
"5dp"
android:layout_toRightOf=
"@id/iv_avatar"
android:text=
"@{item.accountName}"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignBottom=
"@id/tv_name"
android:layout_marginLeft=
"5dp"
android:layout_toRightOf=
"@id/tv_name"
android:text=
"time"
android:textColor=
"@color/tv_cl"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tv_name"
android:layout_alignLeft=
"@id/tv_name"
android:layout_marginTop=
"3dp"
android:layout_marginRight=
"10dp"
android:text=
"@{item.content}"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"13sp"
/>
<ImageView
android:layout_width=
"22dp"
android:layout_height=
"22dp"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"10dp"
android:src=
"@drawable/icon_comment"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_below=
"@id/tv_content"
android:layout_marginTop=
"10dp"
android:background=
"@color/color_ee"
/>
</RelativeLayout>
<RelativeLayout
android:id=
"@+id/rl_reply"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"55dp"
android:layout_marginTop=
"10dp"
>
<ImageView
android:id=
"@+id/iv_avatar2"
android:layout_width=
"35dp"
android:layout_height=
"35dp"
android:src=
"@drawable/icon_user_default"
/>
<TextView
android:id=
"@+id/tv_name2"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:layout_marginTop=
"5dp"
android:layout_toRightOf=
"@id/iv_avatar2"
android:text=
"@{item.accountName}"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_time2"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignBottom=
"@id/tv_name2"
android:layout_marginLeft=
"5dp"
android:layout_toRightOf=
"@id/tv_name2"
android:text=
"time"
android:textColor=
"@color/tv_cl"
android:textSize=
"13sp"
/>
<LinearLayout
android:id=
"@+id/ll_content"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tv_name2"
android:layout_alignLeft=
"@id/tv_name2"
android:layout_marginTop=
"5dp"
android:layout_marginRight=
"10dp"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_reply_"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/reply_str"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_reply_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
'@{"@"+item.beName}'
android:textColor=
"@color/cl_home_button"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_content2"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
'@{": "+item.content}'
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"13sp"
/>
</LinearLayout>
<ImageView
android:layout_width=
"22dp"
android:layout_height=
"22dp"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"10dp"
android:src=
"@drawable/icon_comment"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_below=
"@id/ll_content"
android:layout_marginTop=
"10dp"
android:background=
"@color/color_ee"
/>
</RelativeLayout>
</LinearLayout>
</layout>
\ No newline at end of file
saleCenter/src/main/res/layout/item_sale_comment.xml
0 → 100644
View file @
f5d1dccc
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<data>
<variable
name=
"item"
type=
"com.bigfish.salecenter.model.CommentBean"
/>
</data>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<RelativeLayout
android:id=
"@+id/rl_component"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"10dp"
>
<ImageView
android:id=
"@+id/iv_avatar"
android:layout_width=
"35dp"
android:layout_height=
"35dp"
android:layout_marginLeft=
"10dp"
/>
<TextView
android:id=
"@+id/tv_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:layout_marginTop=
"5dp"
android:layout_toRightOf=
"@id/iv_avatar"
android:text=
"@{item.accountName}"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignBottom=
"@id/tv_name"
android:layout_marginLeft=
"5dp"
android:layout_toRightOf=
"@id/tv_name"
android:text=
"time"
android:textColor=
"@color/tv_cl"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tv_name"
android:layout_alignLeft=
"@id/tv_name"
android:layout_marginTop=
"3dp"
android:layout_marginRight=
"10dp"
android:text=
"@{item.content}"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"13sp"
/>
<ImageView
android:layout_width=
"22dp"
android:layout_height=
"22dp"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"10dp"
android:src=
"@drawable/icon_comment"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_below=
"@id/tv_content"
android:layout_marginTop=
"10dp"
android:background=
"@color/color_ee"
/>
</RelativeLayout>
<RelativeLayout
android:id=
"@+id/rl_reply"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"55dp"
android:layout_marginTop=
"10dp"
>
<ImageView
android:id=
"@+id/iv_avatar2"
android:layout_width=
"35dp"
android:layout_height=
"35dp"
android:src=
"@drawable/icon_user_default"
/>
<TextView
android:id=
"@+id/tv_name2"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10dp"
android:layout_marginTop=
"5dp"
android:layout_toRightOf=
"@id/iv_avatar2"
android:text=
"@{item.accountName}"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_time2"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignBottom=
"@id/tv_name2"
android:layout_marginLeft=
"5dp"
android:layout_toRightOf=
"@id/tv_name2"
android:text=
"time"
android:textColor=
"@color/tv_cl"
android:textSize=
"13sp"
/>
<LinearLayout
android:id=
"@+id/ll_content"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_below=
"@id/tv_name2"
android:layout_alignLeft=
"@id/tv_name2"
android:layout_marginTop=
"5dp"
android:layout_marginRight=
"10dp"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_reply_"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/reply_str"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_reply_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
'@{"@"+item.beName}'
android:textColor=
"@color/cl_home_button"
android:textSize=
"13sp"
/>
<TextView
android:id=
"@+id/tv_content2"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
'@{": "+item.content}'
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"13sp"
/>
</LinearLayout>
<ImageView
android:layout_width=
"22dp"
android:layout_height=
"22dp"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"10dp"
android:src=
"@drawable/icon_comment"
/>
<View
android:layout_width=
"match_parent"
android:layout_height=
"1dp"
android:layout_below=
"@id/ll_content"
android:layout_marginTop=
"10dp"
android:background=
"@color/color_ee"
/>
</RelativeLayout>
</LinearLayout>
</layout>
\ No newline at end of file
saleCenter/src/main/res/layout/item_sale_order.xml
View file @
f5d1dccc
...
...
@@ -75,7 +75,7 @@
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/
sale_commision
"
android:text=
"@string/
commision_str
"
android:textSize=
"12sp"
/>
<TextView
...
...
saleCenter/src/main/res/layout/item_sale_step.xml
View file @
f5d1dccc
<?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=
"
25dp
"
android:layout_height=
"
wrap_content
"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_time"
style=
"@style/sale_item_text"
android:maxLines=
"2"
android:textSize=
"12sp"
android:layout_width=
"95dp"
android:layout_height=
"match_parent"
android:background=
"@drawable/bg_order_step_item1"
...
...
@@ -20,14 +22,17 @@
android:layout_height=
"match_parent"
android:background=
"@drawable/bg_order_step_item2"
android:gravity=
"center"
android:textSize=
"12sp"
android:text=
"@string/sale_progress_str"
/>
<TextView
android:id=
"@+id/tv_detail"
style=
"@style/sale_item_text"
android:textSize=
"12sp"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/bg_order_step_item1"
android:maxLines=
"2"
android:gravity=
"center"
android:text=
"@string/sale_record_str"
/>
</LinearLayout>
...
...
userCenter/src/main/java/com/dayu/usercenter/presenter/pwlogin/PwLoginPresenter.java
View file @
f5d1dccc
...
...
@@ -86,11 +86,13 @@ public class PwLoginPresenter extends PwLoginContract.Presenter {
ARouter
.
getInstance
().
build
(
RouterPath
.
PATH_MAIN
).
navigation
();
}
else
if
(
UserManager
.
getInstance
().
getRole
()
==
Constants
.
MANAGER_NOSITE_ENGINEER
||
UserManager
.
getInstance
().
getRole
()
==
Constants
.
MANAGER
)
{
ARouter
.
getInstance
().
build
(
RouterPath
.
PATH_MANAGER
).
navigation
();
// ARouter.getInstance().build(RouterPath.PATH_MANAGER).navigation();
ARouter
.
getInstance
().
build
(
RouterPath
.
PATH_MAIN
).
navigation
();
}
}
else
{
AppManager
.
getInstance
().
finishAllActivity
();
ARouter
.
getInstance
().
build
(
RouterPath
.
PATH_SERVICESTATION
).
navigation
();
// ARouter.getInstance().build(RouterPath.PATH_SERVICESTATION).navigation();
ARouter
.
getInstance
().
build
(
RouterPath
.
PATH_MAIN
).
navigation
();
}
}));
}
...
...
userCenter/src/main/java/com/dayu/usercenter/presenter/smslogin/SmsLoginPresenter.java
View file @
f5d1dccc
...
...
@@ -153,11 +153,13 @@ public class SmsLoginPresenter extends SmsLoginContract.Presenter {
ARouter
.
getInstance
().
build
(
RouterPath
.
PATH_MAIN
).
navigation
();
}
else
if
(
UserManager
.
getInstance
().
getRole
()
==
Constants
.
MANAGER_NOSITE_ENGINEER
||
UserManager
.
getInstance
().
getRole
()
==
Constants
.
MANAGER
)
{
ARouter
.
getInstance
().
build
(
RouterPath
.
PATH_MANAGER
).
navigation
();
// ARouter.getInstance().build(RouterPath.PATH_MANAGER).navigation();
ARouter
.
getInstance
().
build
(
RouterPath
.
PATH_MAIN
).
navigation
();
}
}
else
{
AppManager
.
getInstance
().
finishAllActivity
();
ARouter
.
getInstance
().
build
(
RouterPath
.
PATH_SERVICESTATION
).
navigation
();
// ARouter.getInstance().build(RouterPath.PATH_SERVICESTATION).navigation();
ARouter
.
getInstance
().
build
(
RouterPath
.
PATH_MAIN
).
navigation
();
}
}));
}
...
...
userCenter/src/main/java/com/dayu/usercenter/ui/activity2/ServiceRecordActivity.java
View file @
f5d1dccc
...
...
@@ -36,7 +36,7 @@ public class ServiceRecordActivity extends BaseActivity<SImplePresenter,Activity
private
void
setAdapter
()
{
List
<
String
>
testList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
1
3
;
i
++)
{
for
(
int
i
=
0
;
i
<
1
5
;
i
++)
{
testList
.
add
(
"test data"
+
i
);
}
...
...
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