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
38b1a882
authored
Oct 23, 2023
by
wukun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1023
parent
bf11fbf8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
160 additions
and
52 deletions
baseSDK/src/main/java/com/dayu/common/Constants.java
orderCenter/src/main/java/com/dayu/order/presenter/orderdoing/OrderDoingPresenter.java
orderCenter/src/main/java/com/dayu/order/ui/activity/OrderDetailsClockActivity.java
orderCenter/src/main/java/com/dayu/order/ui/adapter/OrderAdapter.java
orderCenter/src/main/res/layout/activity_order_details_clock.xml
baseSDK/src/main/java/com/dayu/common/Constants.java
View file @
38b1a882
...
...
@@ -172,7 +172,7 @@ public class Constants {
/***********************其他配置**********************************/
public
final
static
int
PAGESIZE
=
20
0
;
public
final
static
int
PAGESIZE
=
20
;
public
final
static
int
NOT_LOGIN
=
-
1
;
/**
* 店长.
...
...
orderCenter/src/main/java/com/dayu/order/presenter/orderdoing/OrderDoingPresenter.java
View file @
38b1a882
...
...
@@ -103,6 +103,9 @@ public class OrderDoingPresenter extends orderDoingContract.Presenter {
if
(
requestPage
>=
page
&&
page
!=
1
)
return
;
requestPage
=
page
;
if
(
mView
instanceof
OrderSecondTabFragment
&&
0
!=
position
){
pageSize
=
200
;
}
OrderApiFactory
.
getOrders
(
state
,
userId
,
siteId
,
page
,
pageSize
).
subscribe
(
baseObserver
(
orderBasePageBean
->
{
datas
.
set
(
orderBasePageBean
);
...
...
orderCenter/src/main/java/com/dayu/order/ui/activity/OrderDetailsClockActivity.java
View file @
38b1a882
...
...
@@ -3,6 +3,7 @@ package com.dayu.order.ui.activity;
import
android.Manifest
;
import
android.app.Activity
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -141,14 +142,25 @@ public class OrderDetailsClockActivity extends BaseActivity<OrderDetailClockPres
mBind
.
ivUser
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
CommonUtils
.
dialPhone
(
OrderDetailsClockActivity
.
this
,
detail
.
getCustomerMobile
());
String
customerMobile
=
detail
.
getCustomerMobile
();
if
(
TextUtils
.
isEmpty
(
customerMobile
)){
ToastUtils
.
showShortToast
(
"号码异常"
);
}
else
{
CommonUtils
.
dialPhone
(
OrderDetailsClockActivity
.
this
,
customerMobile
);
}
}
});
mBind
.
ivServer
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
v
)
{
CommonUtils
.
dialPhone
(
OrderDetailsClockActivity
.
this
,
detail
.
getCustomerTelphome
());
String
customerTelphome
=
detail
.
getCustomerTelphome
();
if
(
TextUtils
.
isEmpty
(
customerTelphome
)){
ToastUtils
.
showShortToast
(
"号码异常"
);
}
else
{
CommonUtils
.
dialPhone
(
OrderDetailsClockActivity
.
this
,
customerTelphome
);
}
}
});
...
...
orderCenter/src/main/java/com/dayu/order/ui/adapter/OrderAdapter.java
View file @
38b1a882
...
...
@@ -208,10 +208,41 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
holder
.
tvItemEnd
.
setText
(
mContext
.
getString
(
R
.
string
.
submit_order
));
}
}
holder
.
tvItemEnd
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemTextPhone
.
setVisibility
(
View
.
GONE
);
holder
.
orderLineOne
.
setVisibility
(
View
.
GONE
);
holder
.
rlItemMid
.
setVisibility
(
View
.
GONE
);
holder
.
orderLineTwo
.
setVisibility
(
View
.
GONE
);
if
(
item
.
getSubStatus
()
==
6
)
{
holder
.
tvErrorState
.
setText
(
mContext
.
getString
(
R
.
string
.
check_upon_delivery
));
holder
.
tvErrorState
.
setTextColor
(
mContext
.
getResources
().
getColor
(
R
.
color
.
cl_tab_line
));
holder
.
tvErrorState
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemUpdataTime
.
setVisibility
(
View
.
VISIBLE
);
holder
.
rlItemEnd
.
setVisibility
(
View
.
GONE
);
holder
.
orderLineOne
.
setVisibility
(
View
.
VISIBLE
);
holder
.
orderLineTwo
.
setVisibility
(
View
.
GONE
);
holder
.
rlItemMid
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemTextPhone
.
setVisibility
(
View
.
VISIBLE
);
// holder.itemUpdataTime.setText(mContext.getString(R.string.customer_acceptance));
if
(
item
.
getIsCheck
()
==
0
)
{
holder
.
itemUpdataTime
.
setText
(
"待自动验收"
);
}
else
if
(
item
.
getIsCheck
()
==
2
)
{
holder
.
itemUpdataTime
.
setText
(
"待商家验收"
);
}
else
{
holder
.
itemUpdataTime
.
setText
(
"客户验收"
);
}
if
(!
haveCustomer
)
{
holder
.
llBottom
.
setVisibility
(
View
.
GONE
);
holder
.
itemBottomLine
.
setVisibility
(
View
.
GONE
);
}
else
{
holder
.
llBottom
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemBottomLine
.
setVisibility
(
View
.
VISIBLE
);
}
}
else
{
holder
.
rlItemEnd
.
setVisibility
(
View
.
VISIBLE
);
// holder.orderLineTwo.setVisibility(View.VISIBLE);
}
}
else
{
holder
.
itemTextPhone
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -225,8 +256,37 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
}
else
if
(
item
.
getSubStatus
()
==
2
)
{
holder
.
tvItemProcess
.
setText
(
mContext
.
getString
(
R
.
string
.
begain_server
));
}
if
(
item
.
getSubStatus
()
==
6
)
{
holder
.
tvErrorState
.
setText
(
mContext
.
getString
(
R
.
string
.
check_upon_delivery
));
holder
.
tvErrorState
.
setTextColor
(
mContext
.
getResources
().
getColor
(
R
.
color
.
cl_tab_line
));
holder
.
tvErrorState
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemUpdataTime
.
setVisibility
(
View
.
VISIBLE
);
holder
.
rlItemEnd
.
setVisibility
(
View
.
GONE
);
holder
.
orderLineOne
.
setVisibility
(
View
.
VISIBLE
);
holder
.
orderLineTwo
.
setVisibility
(
View
.
GONE
);
// holder.itemUpdataTime.setText(mContext.getString(R.string.customer_acceptance));
if
(
item
.
getIsCheck
()
==
0
)
{
holder
.
itemUpdataTime
.
setText
(
"待自动验收"
);
}
else
if
(
item
.
getIsCheck
()
==
2
)
{
holder
.
itemUpdataTime
.
setText
(
"待商家验收"
);
}
else
{
holder
.
itemUpdataTime
.
setText
(
"客户验收"
);
}
if
(!
haveCustomer
)
{
holder
.
llBottom
.
setVisibility
(
View
.
GONE
);
holder
.
itemBottomLine
.
setVisibility
(
View
.
GONE
);
}
else
{
holder
.
llBottom
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemBottomLine
.
setVisibility
(
View
.
VISIBLE
);
}
}
else
{
holder
.
rlItemEnd
.
setVisibility
(
View
.
VISIBLE
);
// holder.orderLineTwo.setVisibility(View.VISIBLE);
}
}
time
=
item
.
getConfirmDoorTime
();
setTimeStatus
(
holder
,
item
,
time
);
break
;
...
...
@@ -234,6 +294,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
holder
.
tvItemProcess
.
setVisibility
(
View
.
GONE
);
holder
.
tvItemEnd
.
setVisibility
(
View
.
VISIBLE
);
int
source1
=
item
.
getSource
();
if
(
7
==
source1
){
if
(
3
==
item
.
getStatus
()){
holder
.
tvItemEnd
.
setText
(
mContext
.
getString
(
R
.
string
.
begain_server
));
...
...
@@ -244,10 +305,42 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
holder
.
tvItemEnd
.
setText
(
mContext
.
getString
(
R
.
string
.
submit_order
));
}
}
holder
.
tvItemEnd
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemTextPhone
.
setVisibility
(
View
.
GONE
);
holder
.
orderLineOne
.
setVisibility
(
View
.
GONE
);
holder
.
rlItemMid
.
setVisibility
(
View
.
GONE
);
holder
.
orderLineTwo
.
setVisibility
(
View
.
GONE
);
if
(
item
.
getSubStatus
()
==
6
)
{
holder
.
tvErrorState
.
setText
(
mContext
.
getString
(
R
.
string
.
check_upon_delivery
));
holder
.
tvErrorState
.
setTextColor
(
mContext
.
getResources
().
getColor
(
R
.
color
.
cl_tab_line
));
holder
.
tvErrorState
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemUpdataTime
.
setVisibility
(
View
.
VISIBLE
);
holder
.
rlItemEnd
.
setVisibility
(
View
.
GONE
);
holder
.
orderLineOne
.
setVisibility
(
View
.
VISIBLE
);
holder
.
orderLineTwo
.
setVisibility
(
View
.
GONE
);
holder
.
rlItemMid
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemTextPhone
.
setVisibility
(
View
.
VISIBLE
);
// holder.itemUpdataTime.setText(mContext.getString(R.string.customer_acceptance));
if
(
item
.
getIsCheck
()
==
0
)
{
holder
.
itemUpdataTime
.
setText
(
"待自动验收"
);
}
else
if
(
item
.
getIsCheck
()
==
2
)
{
holder
.
itemUpdataTime
.
setText
(
"待商家验收"
);
}
else
{
holder
.
itemUpdataTime
.
setText
(
"客户验收"
);
}
if
(!
haveCustomer
)
{
holder
.
llBottom
.
setVisibility
(
View
.
GONE
);
holder
.
itemBottomLine
.
setVisibility
(
View
.
GONE
);
}
else
{
holder
.
llBottom
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemBottomLine
.
setVisibility
(
View
.
VISIBLE
);
}
}
else
{
holder
.
rlItemEnd
.
setVisibility
(
View
.
VISIBLE
);
// holder.orderLineTwo.setVisibility(View.VISIBLE);
}
}
else
{
holder
.
itemTextPhone
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -263,45 +356,45 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
holder
.
tvItemProcess
.
setText
(
mContext
.
getString
(
R
.
string
.
begain_server
));
holder
.
tvItemEnd
.
setText
(
mContext
.
getString
(
R
.
string
.
begain_server
));
}
}
holder
.
itemUpdataTime
.
setText
(
mContext
.
getString
(
R
.
string
.
need_again_door
));
holder
.
tvItemProcess
.
setText
(
mContext
.
getString
(
R
.
string
.
process_order
));
if
(!
haveCustomer
)
{
holder
.
itemTextPhone
.
setVisibility
(
View
.
GONE
);
holder
.
orderLineOne
.
setVisibility
(
View
.
GONE
);
}
else
{
holder
.
itemTextPhone
.
setVisibility
(
View
.
VISIBLE
);
holder
.
orderLineOne
.
setVisibility
(
View
.
VISIBLE
);
}
if
(
item
.
getSubStatus
()
==
6
)
{
holder
.
tvErrorState
.
setText
(
mContext
.
getString
(
R
.
string
.
check_upon_delivery
));
holder
.
tvErrorState
.
setTextColor
(
mContext
.
getResources
().
getColor
(
R
.
color
.
cl_tab_line
));
holder
.
tvErrorState
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemUpdataTime
.
setVisibility
(
View
.
VISIBLE
);
holder
.
rlItemEnd
.
setVisibility
(
View
.
GONE
);
holder
.
orderLineOne
.
setVisibility
(
View
.
VISIBLE
);
holder
.
orderLineTwo
.
setVisibility
(
View
.
GONE
);
// holder.itemUpdataTime.setText(mContext.getString(R.string.customer_acceptance));
if
(
item
.
getIsCheck
()
==
0
)
{
holder
.
itemUpdataTime
.
setText
(
"待自动验收"
);
}
else
if
(
item
.
getIsCheck
()
==
2
)
{
holder
.
itemUpdataTime
.
setText
(
"待商家验收"
);
holder
.
itemUpdataTime
.
setText
(
mContext
.
getString
(
R
.
string
.
need_again_door
));
holder
.
tvItemProcess
.
setText
(
mContext
.
getString
(
R
.
string
.
process_order
));
if
(!
haveCustomer
)
{
holder
.
itemTextPhone
.
setVisibility
(
View
.
GONE
);
holder
.
orderLineOne
.
setVisibility
(
View
.
GONE
);
}
else
{
holder
.
itemUpdataTime
.
setText
(
"客户验收"
);
holder
.
itemTextPhone
.
setVisibility
(
View
.
VISIBLE
);
holder
.
orderLineOne
.
setVisibility
(
View
.
VISIBLE
);
}
if
(
item
.
getSubStatus
()
==
6
)
{
holder
.
tvErrorState
.
setText
(
mContext
.
getString
(
R
.
string
.
check_upon_delivery
));
holder
.
tvErrorState
.
setTextColor
(
mContext
.
getResources
().
getColor
(
R
.
color
.
cl_tab_line
));
holder
.
tvErrorState
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemUpdataTime
.
setVisibility
(
View
.
VISIBLE
);
holder
.
rlItemEnd
.
setVisibility
(
View
.
GONE
);
holder
.
orderLineOne
.
setVisibility
(
View
.
VISIBLE
);
holder
.
orderLineTwo
.
setVisibility
(
View
.
GONE
);
// holder.itemUpdataTime.setText(mContext.getString(R.string.customer_acceptance));
if
(
item
.
getIsCheck
()
==
0
)
{
holder
.
itemUpdataTime
.
setText
(
"待自动验收"
);
}
else
if
(
item
.
getIsCheck
()
==
2
)
{
holder
.
itemUpdataTime
.
setText
(
"待商家验收"
);
}
else
{
holder
.
itemUpdataTime
.
setText
(
"客户验收"
);
}
if
(!
haveCustomer
)
{
holder
.
llBottom
.
setVisibility
(
View
.
GONE
);
holder
.
itemBottomLine
.
setVisibility
(
View
.
GONE
);
if
(!
haveCustomer
)
{
holder
.
llBottom
.
setVisibility
(
View
.
GONE
);
holder
.
itemBottomLine
.
setVisibility
(
View
.
GONE
);
}
else
{
holder
.
llBottom
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemBottomLine
.
setVisibility
(
View
.
VISIBLE
);
}
}
else
{
holder
.
llBottom
.
setVisibility
(
View
.
VISIBLE
);
holder
.
itemBottomLine
.
setVisibility
(
View
.
VISIBLE
);
holder
.
rlItemEnd
.
setVisibility
(
View
.
VISIBLE
);
holder
.
orderLineTwo
.
setVisibility
(
View
.
VISIBLE
);
}
}
else
{
holder
.
rlItemEnd
.
setVisibility
(
View
.
VISIBLE
);
holder
.
orderLineTwo
.
setVisibility
(
View
.
VISIBLE
);
}
time
=
item
.
getConfirmDoorTime
();
setTimeStatus
(
holder
,
item
,
time
);
break
;
...
...
@@ -491,7 +584,7 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
if
(
7
==
it
.
getSource
()){
if
(
3
==
it
.
getStatus
()){
startServer
(
h
,
posi
it
on
);
startServer
(
h
,
posi
ti
on
);
}
else
if
(
4
==
it
.
getStatus
()){
if
(
7
!=
it
.
getSubStatus
()){
mPresenter
.
clockIn
(
it
.
getId
())
...
...
@@ -518,22 +611,22 @@ public class OrderAdapter extends CoreAdapter<Order, FragmentOrderdoingItemBindi
if
((
mItem
.
getCreatedSource
()
==
2
||
mItem
.
getCreatedSource
()
==
3
||
mItem
.
getCreatedSource
()
==
4
)
&&
mItem
.
getStatus
()
==
4
)
{
dumpServerActivity
(
mItem
);
}
else
if
(
mItem
.
getStatus
()
==
4
&&
mItem
.
getSubStatus
()
==
3
)
{
dumpProcessActivity
(
mItem
,
posi
it
on
);
dumpProcessActivity
(
mItem
,
posi
ti
on
);
}
else
if
(
mItem
.
getStatus
()
==
4
&&
mItem
.
getSubStatus
()
==
4
)
{
if
(
mItem
.
getSopStatus
()
==
1
)
{
//sop启用
dumpSOPActivity
(
mItem
,
posi
it
on
);
dumpSOPActivity
(
mItem
,
posi
ti
on
);
}
else
if
(
mItem
.
getSopStatus
()
==
0
)
{
dumpProcessActivity
(
mItem
,
posi
it
on
);
dumpProcessActivity
(
mItem
,
posi
ti
on
);
}
}
else
if
(
mItem
.
getStatus
()
==
4
&&
mItem
.
getSubStatus
()
==
5
)
{
dumpProcessActivity
(
mItem
,
posi
it
on
);
dumpProcessActivity
(
mItem
,
posi
ti
on
);
}
if
(
mItem
.
getStatus
()
==
4
)
{
return
;
}
if
(
mItem
.
getStatus
()
==
3
)
{
startServer
(
h
,
posi
it
on
);
startServer
(
h
,
posi
ti
on
);
}
}
}
...
...
orderCenter/src/main/res/layout/activity_order_details_clock.xml
View file @
38b1a882
...
...
@@ -371,16 +371,6 @@
android:textColor=
"@color/cl_order_text_one"
android:textSize=
"@dimen/sp_14"
/>
<ImageView
android:id=
"@+id/iv_server"
android:layout_width=
"@dimen/dp_60"
android:layout_height=
"@dimen/dp_20"
android:src=
"@drawable/icon_order_phone"
android:layout_toRightOf=
"@id/text_eleven"
android:layout_below=
"@id/tv_nine"
android:layout_marginLeft=
"@dimen/dp_13"
android:layout_marginTop=
"@dimen/dp_13"
/>
<TextView
android:id=
"@+id/tv_pro_num"
android:layout_width=
"wrap_content"
...
...
@@ -391,6 +381,16 @@
android:layout_toRightOf=
"@id/text_eleven"
android:textColor=
"@color/cl_home_title_text_color"
android:textSize=
"@dimen/sp_14"
/>
<ImageView
android:id=
"@+id/iv_server"
android:layout_width=
"@dimen/dp_60"
android:layout_height=
"@dimen/dp_20"
android:layout_below=
"@id/tv_nine"
android:layout_marginLeft=
"@dimen/dp_13"
android:layout_marginTop=
"@dimen/dp_13"
android:layout_toRightOf=
"@id/tv_pro_num"
android:src=
"@drawable/icon_order_phone"
/>
</RelativeLayout>
<RelativeLayout
...
...
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