Skip to content
项目
Groups
代码片段
帮助
正在加载...
Sign in / Register
Toggle navigation
W
workoffice
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图表
统计图
Create a new issue
作业
提交
议题看板
Open sidebar
冷广德
workoffice
Commits
e4d33191
提交
e4d33191
authored
6月 25, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.订单按钮红点
2.修改接单和审核操作之后的显示
上级
d40f99b3
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
539 行增加
和
25 行删除
+539
-25
OrderCheckStatusBean.java
...ain/java/com/wd/workoffice/bean/OrderCheckStatusBean.java
+113
-0
ApiService.java
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
+9
-0
CrucibleOrderDetailActivity.java
...ce/ui/activity/bat/order/CrucibleOrderDetailActivity.java
+49
-4
InsideOrderDetailActivity.java
...fice/ui/activity/bat/order/InsideOrderDetailActivity.java
+53
-4
OutOrderDetailActivity.java
...koffice/ui/activity/bat/order/OutOrderDetailActivity.java
+45
-4
ProductOrderDetailActivity.java
...ice/ui/activity/bat/order/ProductOrderDetailActivity.java
+1
-1
SaleOrderDetailActivity.java
...office/ui/activity/bat/order/SaleOrderDetailActivity.java
+47
-2
SupplierOrderDetailActivity.java
...ce/ui/activity/bat/order/SupplierOrderDetailActivity.java
+53
-3
CruibleOrderDetailProductAdapter.java
...rkoffice/ui/adapter/CruibleOrderDetailProductAdapter.java
+25
-1
InsideOrderDetailProductAdapter.java
...orkoffice/ui/adapter/InsideOrderDetailProductAdapter.java
+25
-1
OrderDetailProductAdapter.java
...m/wd/workoffice/ui/adapter/OrderDetailProductAdapter.java
+30
-3
OutOrderDetailProductAdapter.java
...d/workoffice/ui/adapter/OutOrderDetailProductAdapter.java
+26
-0
ProductOrderDetailProductAdapter.java
...rkoffice/ui/adapter/ProductOrderDetailProductAdapter.java
+25
-0
SupplierOrderDetailProductAdapter.java
...koffice/ui/adapter/SupplierOrderDetailProductAdapter.java
+32
-0
fg_home.xml
app/src/main/res/layout/fg_home.xml
+2
-2
item_order_product.xml
app/src/main/res/layout/item_order_product.xml
+4
-0
没有找到文件。
app/src/main/java/com/wd/workoffice/bean/OrderCheckStatusBean.java
0 → 100644
浏览文件 @
e4d33191
package
com
.
wd
.
workoffice
.
bean
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
java.util.List
;
/**
* author : flexible
* email : lgd19940421@163.com
* github: https://github.com/FlexibleXd
**/
public
class
OrderCheckStatusBean
{
/**
* orderId : SO10812
* items : [{"productId":10,"inStore":false,"outStore":true,"return":true,"used":"false "}]
* outStore : true
* advance : false
*/
private
String
orderId
;
private
boolean
outStore
;
private
boolean
advance
;
private
List
<
ItemsBean
>
items
;
public
String
getOrderId
()
{
return
orderId
;
}
public
void
setOrderId
(
String
orderId
)
{
this
.
orderId
=
orderId
;
}
public
boolean
isOutStore
()
{
return
outStore
;
}
public
void
setOutStore
(
boolean
outStore
)
{
this
.
outStore
=
outStore
;
}
public
boolean
getAdvance
()
{
return
advance
;
}
public
void
setAdvance
(
boolean
advance
)
{
this
.
advance
=
advance
;
}
public
List
<
ItemsBean
>
getItems
()
{
return
items
;
}
public
void
setItems
(
List
<
ItemsBean
>
items
)
{
this
.
items
=
items
;
}
public
static
class
ItemsBean
{
/**
* productId : 10
* inStore : false
* outStore : true
* return : true
* used : false
*/
private
int
productId
;
private
boolean
inStore
;
private
boolean
outStore
;
@JSONField
(
name
=
"return"
)
private
boolean
returnX
;
private
boolean
used
;
public
int
getProductId
()
{
return
productId
;
}
public
void
setProductId
(
int
productId
)
{
this
.
productId
=
productId
;
}
public
boolean
isInStore
()
{
return
inStore
;
}
public
void
setInStore
(
boolean
inStore
)
{
this
.
inStore
=
inStore
;
}
public
boolean
isOutStore
()
{
return
outStore
;
}
public
void
setOutStore
(
boolean
outStore
)
{
this
.
outStore
=
outStore
;
}
public
boolean
isReturnX
()
{
return
returnX
;
}
public
void
setReturnX
(
boolean
returnX
)
{
this
.
returnX
=
returnX
;
}
public
boolean
isUsed
()
{
return
used
;
}
public
void
setUsed
(
boolean
used
)
{
this
.
used
=
used
;
}
}
}
app/src/main/java/com/wd/workoffice/retrofit/ApiService.java
浏览文件 @
e4d33191
...
...
@@ -2008,4 +2008,13 @@ public interface ApiService {
@GET
(
"/receive-order/info"
)
Observable
<
BaseBean
>
receiveOrderInfo
(
@QueryMap
Map
<
String
,
Object
>
param
);
/**
* 订单详情,产品按钮红点,是否可以审核
*
* @return
*/
@GET
(
"order/wait-approval-status"
)
Observable
<
BaseBean
>
orderProCheckStatus
(
@Query
(
"orderId"
)
String
orderId
);
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/CrucibleOrderDetailActivity.java
浏览文件 @
e4d33191
...
...
@@ -17,6 +17,7 @@ import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.OrderCheckStatusBean
;
import
com.wd.workoffice.bean.OrderDetail
;
import
com.wd.workoffice.bean.event.CheckOrderEvent
;
import
com.wd.workoffice.retrofit.RtfUtils
;
...
...
@@ -172,12 +173,23 @@ public class CrucibleOrderDetailActivity extends WorkToolBarActivity {
llCheck
.
setVisibility
(
View
.
VISIBLE
);
tvAgree
.
setText
(
"接单"
);
tvRefuse
.
setText
(
"拒单"
);
}
else
{
llBottom
.
setVisibility
(
View
.
GONE
);
llCheck
.
setVisibility
(
View
.
GONE
);
}
break
;
case
220
:
llBottom
.
setVisibility
(
View
.
GONE
);
llCheck
.
setVisibility
(
View
.
GONE
);
break
;
case
300
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llApply
.
setVisibility
(
View
.
VISIBLE
);
flSendApply
.
setVisibility
(
View
.
GONE
);
llCheck
.
setVisibility
(
View
.
GONE
);
break
;
case
320
:
llBottom
.
setVisibility
(
View
.
GONE
);
break
;
case
410
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -253,6 +265,9 @@ public class CrucibleOrderDetailActivity extends WorkToolBarActivity {
dataBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderDetail
.
class
);
status
=
dataBean
.
getStatus
();
changeView
();
flowSheetList
.
clear
();
flowList
.
clear
();
proList
.
clear
();
flowSheetList
.
addAll
(
dataBean
.
getOrderFlows
());
flowSheetAdapter
.
notifyDataSetChanged
();
if
(
dataBean
.
getOrderFlows
().
size
()
<=
3
)
{
...
...
@@ -289,7 +304,7 @@ public class CrucibleOrderDetailActivity extends WorkToolBarActivity {
tvDesc
.
setText
(
dataBean
.
getAttrName
());
tvStatus
.
setText
(
dataBean
.
getStatusName
());
getProCheckStatus
(
dataBean
.
getId
());
}
});
}
...
...
@@ -499,7 +514,7 @@ public class CrucibleOrderDetailActivity extends WorkToolBarActivity {
return
;
}
toast
(
"操作成功"
);
llBottom
.
setVisibility
(
View
.
GONE
);
getData
(
);
EventBus
.
getDefault
().
post
(
new
CheckOrderEvent
());
}
});
...
...
@@ -563,9 +578,39 @@ public class CrucibleOrderDetailActivity extends WorkToolBarActivity {
}
toast
(
"操作成功"
);
EventBus
.
getDefault
().
post
(
new
CheckOrderEvent
());
llBottom
.
setVisibility
(
View
.
GONE
);
finish
();
getData
();
}
});
}
/**
* 获取按钮红点显示
* @param id
*/
private
void
getProCheckStatus
(
String
id
)
{
RtfUtils
.
getRtf
().
orderProCheckStatus
(
id
).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
@Override
public
void
onFail
(
String
errorMsg
)
{
hideLoading
();
toast
(
errorMsg
);
}
@Override
public
void
onSuccess
(
BaseBean
data
)
{
hideLoading
();
if
(
data
.
getCode
()
!=
0
)
{
toast
(
data
.
getMessage
());
return
;
}
OrderCheckStatusBean
orderCheckStatusBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderCheckStatusBean
.
class
);
viewSendApply
.
setVisibility
(
orderCheckStatusBean
.
isOutStore
()
?
View
.
VISIBLE
:
View
.
GONE
);
proAdapter
.
setProStatusList
(
orderCheckStatusBean
.
getItems
());
}
});
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/InsideOrderDetailActivity.java
浏览文件 @
e4d33191
...
...
@@ -15,6 +15,7 @@ import com.qmuiteam.qmui.widget.dialog.QMUIBottomSheet;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.OrderCheckStatusBean
;
import
com.wd.workoffice.bean.OrderDetail
;
import
com.wd.workoffice.bean.event.CheckOrderEvent
;
import
com.wd.workoffice.retrofit.RtfUtils
;
...
...
@@ -156,9 +157,21 @@ public class InsideOrderDetailActivity extends WorkToolBarActivity {
llCheck
.
setVisibility
(
View
.
VISIBLE
);
tvAgree
.
setText
(
"接单"
);
tvRefuse
.
setText
(
"拒单"
);
}
else
{
llBottom
.
setVisibility
(
View
.
GONE
);
llCheck
.
setVisibility
(
View
.
GONE
);
}
break
;
case
220
:
llBottom
.
setVisibility
(
View
.
GONE
);
llCheck
.
setVisibility
(
View
.
GONE
);
break
;
case
300
:
llBottom
.
setVisibility
(
View
.
GONE
);
llCheck
.
setVisibility
(
View
.
GONE
);
break
;
case
320
:
llBottom
.
setVisibility
(
View
.
GONE
);
break
;
case
410
:
break
;
...
...
@@ -209,6 +222,9 @@ public class InsideOrderDetailActivity extends WorkToolBarActivity {
}
dataBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderDetail
.
class
);
status
=
dataBean
.
getStatus
();
flowSheetList
.
clear
();
flowList
.
clear
();
proList
.
clear
();
changeView
();
flowSheetList
.
addAll
(
dataBean
.
getOrderFlows
());
flowSheetAdapter
.
notifyDataSetChanged
();
...
...
@@ -245,7 +261,7 @@ public class InsideOrderDetailActivity extends WorkToolBarActivity {
tvDesc
.
setText
(
dataBean
.
getAttrName
());
tvStatus
.
setText
(
dataBean
.
getStatusName
());
getProCheckStatus
(
dataBean
.
getId
());
}
});
}
...
...
@@ -428,7 +444,7 @@ public class InsideOrderDetailActivity extends WorkToolBarActivity {
return
;
}
toast
(
"操作成功"
);
llBottom
.
setVisibility
(
View
.
GONE
);
getData
(
);
EventBus
.
getDefault
().
post
(
new
CheckOrderEvent
());
}
});
...
...
@@ -492,9 +508,42 @@ public class InsideOrderDetailActivity extends WorkToolBarActivity {
}
toast
(
"操作成功"
);
EventBus
.
getDefault
().
post
(
new
CheckOrderEvent
());
llBottom
.
setVisibility
(
View
.
GONE
);
finish
();
getData
();
}
});
}
/**
* 获取按钮红点显示
*
* @param id
*/
private
void
getProCheckStatus
(
String
id
)
{
RtfUtils
.
getRtf
().
orderProCheckStatus
(
id
).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
@Override
public
void
onFail
(
String
errorMsg
)
{
hideLoading
();
toast
(
errorMsg
);
}
@Override
public
void
onSuccess
(
BaseBean
data
)
{
hideLoading
();
if
(
data
.
getCode
()
!=
0
)
{
toast
(
data
.
getMessage
());
return
;
}
OrderCheckStatusBean
orderCheckStatusBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderCheckStatusBean
.
class
);
viewFinishApply
.
setVisibility
(
orderCheckStatusBean
.
getAdvance
()
?
View
.
VISIBLE
:
View
.
GONE
);
viewSendApply
.
setVisibility
(
orderCheckStatusBean
.
isOutStore
()
?
View
.
VISIBLE
:
View
.
GONE
);
proAdapter
.
setProStatusList
(
orderCheckStatusBean
.
getItems
());
}
});
}
}
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/OutOrderDetailActivity.java
浏览文件 @
e4d33191
...
...
@@ -18,6 +18,7 @@ import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.OrderCheckStatusBean
;
import
com.wd.workoffice.bean.OrderDetail
;
import
com.wd.workoffice.bean.event.CheckOrderEvent
;
import
com.wd.workoffice.bean.event.CheckSendEvent
;
...
...
@@ -249,7 +250,7 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
tvDesc
.
setText
(
dataBean
.
getAttrName
());
tvStatus
.
setText
(
dataBean
.
getStatusName
());
getProCheckStatus
(
dataBean
.
getId
());
changEnterStockType
(
dataBean
.
getEnterStockType
());
}
});
...
...
@@ -271,13 +272,24 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
llCheck
.
setVisibility
(
View
.
VISIBLE
);
tvAgree
.
setText
(
"接单"
);
tvRefuse
.
setText
(
"拒单"
);
}
else
{
llBottom
.
setVisibility
(
View
.
GONE
);
llCheck
.
setVisibility
(
View
.
GONE
);
}
break
;
case
220
:
llBottom
.
setVisibility
(
View
.
GONE
);
llCheck
.
setVisibility
(
View
.
GONE
);
break
;
case
300
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llApply
.
setVisibility
(
View
.
VISIBLE
);
flSendApply
.
setVisibility
(
View
.
GONE
);
rlSet
.
setVisibility
(
View
.
VISIBLE
);
llCheck
.
setVisibility
(
View
.
GONE
);
break
;
case
320
:
llBottom
.
setVisibility
(
View
.
GONE
);
break
;
case
410
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -510,7 +522,7 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
return
;
}
toast
(
"操作成功"
);
llBottom
.
setVisibility
(
View
.
GONE
);
getData
(
);
EventBus
.
getDefault
().
post
(
new
CheckOrderEvent
());
}
});
...
...
@@ -612,8 +624,37 @@ public class OutOrderDetailActivity extends WorkToolBarActivity {
}
toast
(
"操作成功"
);
EventBus
.
getDefault
().
post
(
new
CheckOrderEvent
());
llBottom
.
setVisibility
(
View
.
GONE
);
finish
();
getData
();
}
});
}
/**
* 获取按钮红点显示
* @param id
*/
private
void
getProCheckStatus
(
String
id
)
{
RtfUtils
.
getRtf
().
orderProCheckStatus
(
id
).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
@Override
public
void
onFail
(
String
errorMsg
)
{
hideLoading
();
toast
(
errorMsg
);
}
@Override
public
void
onSuccess
(
BaseBean
data
)
{
hideLoading
();
if
(
data
.
getCode
()
!=
0
)
{
toast
(
data
.
getMessage
());
return
;
}
OrderCheckStatusBean
orderCheckStatusBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderCheckStatusBean
.
class
);
viewFinishApply
.
setVisibility
(
orderCheckStatusBean
.
getAdvance
()
?
View
.
VISIBLE
:
View
.
GONE
);
viewSendApply
.
setVisibility
(
orderCheckStatusBean
.
isOutStore
()
?
View
.
VISIBLE
:
View
.
GONE
);
proAdapter
.
setProStatusList
(
orderCheckStatusBean
.
getItems
());
}
});
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/ProductOrderDetailActivity.java
浏览文件 @
e4d33191
package
com
.
wd
.
workoffice
.
ui
.
activity
.
bat
.
order
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.widget.LinearLayout
;
...
...
@@ -95,6 +94,7 @@ public class ProductOrderDetailActivity extends WorkToolBarActivity {
return
;
}
dataBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderDetail
.
class
);
proList
.
clear
();
proList
.
addAll
(
dataBean
.
getOrderItems
());
proAdapter
.
setStatus
(
dataBean
.
getStatus
());
proAdapter
.
notifyDataSetChanged
();
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/SaleOrderDetailActivity.java
浏览文件 @
e4d33191
...
...
@@ -18,6 +18,7 @@ import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.OrderCheckStatusBean
;
import
com.wd.workoffice.bean.OrderDetail
;
import
com.wd.workoffice.bean.event.CheckOrderEvent
;
import
com.wd.workoffice.bean.event.CheckSendEvent
;
...
...
@@ -175,11 +176,22 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity {
llCheck
.
setVisibility
(
View
.
VISIBLE
);
tvAgree
.
setText
(
"接单"
);
tvRefuse
.
setText
(
"拒单"
);
}
else
{
llBottom
.
setVisibility
(
View
.
GONE
);
llCheck
.
setVisibility
(
View
.
GONE
);
}
break
;
case
220
:
llBottom
.
setVisibility
(
View
.
GONE
);
llCheck
.
setVisibility
(
View
.
GONE
);
break
;
case
300
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
llApply
.
setVisibility
(
View
.
VISIBLE
);
llCheck
.
setVisibility
(
View
.
GONE
);
break
;
case
320
:
llBottom
.
setVisibility
(
View
.
GONE
);
break
;
case
410
:
llBottom
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -281,6 +293,7 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity {
tvStatus
.
setText
(
dataBean
.
getStatusName
());
status
=
dataBean
.
getStatus
();
changView
(
dataBean
.
getStatus
());
getProCheckStatus
(
dataBean
.
getId
());
}
});
}
...
...
@@ -472,8 +485,8 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity {
return
;
}
toast
(
"操作成功"
);
llBottom
.
setVisibility
(
View
.
GONE
);
EventBus
.
getDefault
().
post
(
new
CheckOrderEvent
());
getData
();
}
});
}
...
...
@@ -536,11 +549,43 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity {
}
toast
(
"操作成功"
);
EventBus
.
getDefault
().
post
(
new
CheckOrderEvent
());
llBottom
.
setVisibility
(
View
.
GONE
);
getData
(
);
}
});
}
/**
* 获取按钮红点显示
* @param id
*/
private
void
getProCheckStatus
(
String
id
)
{
RtfUtils
.
getRtf
().
orderProCheckStatus
(
id
).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
@Override
public
void
onFail
(
String
errorMsg
)
{
hideLoading
();
toast
(
errorMsg
);
}
@Override
public
void
onSuccess
(
BaseBean
data
)
{
hideLoading
();
if
(
data
.
getCode
()
!=
0
)
{
toast
(
data
.
getMessage
());
return
;
}
OrderCheckStatusBean
orderCheckStatusBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderCheckStatusBean
.
class
);
viewFinishApply
.
setVisibility
(
orderCheckStatusBean
.
getAdvance
()
?
View
.
VISIBLE
:
View
.
GONE
);
viewSendApply
.
setVisibility
(
orderCheckStatusBean
.
isOutStore
()
?
View
.
VISIBLE
:
View
.
GONE
);
proAdapter
.
setProStatusList
(
orderCheckStatusBean
.
getItems
());
}
});
}
@Override
public
void
onStart
()
{
super
.
onStart
();
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/SupplierOrderDetailActivity.java
浏览文件 @
e4d33191
...
...
@@ -17,6 +17,7 @@ import com.qmuiteam.qmui.widget.dialog.QMUIDialogAction;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.app.BaseBean
;
import
com.wd.workoffice.app.WorkToolBarActivity
;
import
com.wd.workoffice.bean.OrderCheckStatusBean
;
import
com.wd.workoffice.bean.OrderDetail
;
import
com.wd.workoffice.bean.event.CheckOrderEvent
;
import
com.wd.workoffice.retrofit.RtfUtils
;
...
...
@@ -171,9 +172,21 @@ public class SupplierOrderDetailActivity extends WorkToolBarActivity {
llCheck
.
setVisibility
(
View
.
VISIBLE
);
tvAgree
.
setText
(
"接单"
);
tvRefuse
.
setText
(
"拒单"
);
}
else
{
llBottom
.
setVisibility
(
View
.
GONE
);
llCheck
.
setVisibility
(
View
.
GONE
);
}
break
;
case
220
:
llBottom
.
setVisibility
(
View
.
GONE
);
llCheck
.
setVisibility
(
View
.
GONE
);
break
;
case
300
:
llBottom
.
setVisibility
(
View
.
GONE
);
llCheck
.
setVisibility
(
View
.
GONE
);
break
;
case
320
:
llBottom
.
setVisibility
(
View
.
GONE
);
break
;
case
410
:
break
;
...
...
@@ -226,6 +239,9 @@ public class SupplierOrderDetailActivity extends WorkToolBarActivity {
dataBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderDetail
.
class
);
status
=
dataBean
.
getStatus
();
changeView
();
proList
.
clear
();
flowSheetList
.
clear
();
flowList
.
clear
();
flowSheetList
.
addAll
(
dataBean
.
getOrderFlows
());
flowSheetAdapter
.
notifyDataSetChanged
();
if
(
dataBean
.
getOrderFlows
().
size
()
<=
3
)
{
...
...
@@ -236,6 +252,7 @@ public class SupplierOrderDetailActivity extends WorkToolBarActivity {
}
flowAdapter
.
notifyDataSetChanged
();
proList
.
addAll
(
dataBean
.
getOrderItems
());
proAdapter
.
setStatus
(
dataBean
.
getStatus
());
proAdapter
.
notifyDataSetChanged
();
tvName
.
setText
(
dataBean
.
getSupplierName
());
...
...
@@ -260,7 +277,7 @@ public class SupplierOrderDetailActivity extends WorkToolBarActivity {
tvDesc
.
setText
(
dataBean
.
getAttrName
());
tvStatus
.
setText
(
dataBean
.
getStatusName
());
getProCheckStatus
(
dataBean
.
getId
());
}
});
}
...
...
@@ -470,7 +487,7 @@ public class SupplierOrderDetailActivity extends WorkToolBarActivity {
return
;
}
toast
(
"操作成功"
);
llBottom
.
setVisibility
(
View
.
GONE
);
getData
(
);
EventBus
.
getDefault
().
post
(
new
CheckOrderEvent
());
}
});
...
...
@@ -534,9 +551,42 @@ public class SupplierOrderDetailActivity extends WorkToolBarActivity {
}
toast
(
"操作成功"
);
EventBus
.
getDefault
().
post
(
new
CheckOrderEvent
());
llBottom
.
setVisibility
(
View
.
GONE
);
getData
(
);
}
});
}
/**
* 获取按钮红点显示
*
* @param id
*/
private
void
getProCheckStatus
(
String
id
)
{
RtfUtils
.
getRtf
().
orderProCheckStatus
(
id
).
compose
(
Transformer
.
schedule
()).
subscribe
(
new
WorkObserver
<
BaseBean
>()
{
@Override
public
void
doOnSubscribe
(
Disposable
d
)
{
}
@Override
public
void
onFail
(
String
errorMsg
)
{
hideLoading
();
toast
(
errorMsg
);
}
@Override
public
void
onSuccess
(
BaseBean
data
)
{
hideLoading
();
if
(
data
.
getCode
()
!=
0
)
{
toast
(
data
.
getMessage
());
return
;
}
OrderCheckStatusBean
orderCheckStatusBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderCheckStatusBean
.
class
);
viewFinishApply
.
setVisibility
(
orderCheckStatusBean
.
getAdvance
()
?
View
.
VISIBLE
:
View
.
GONE
);
viewSendApply
.
setVisibility
(
orderCheckStatusBean
.
isOutStore
()
?
View
.
VISIBLE
:
View
.
GONE
);
proAdapter
.
setProStatusList
(
orderCheckStatusBean
.
getItems
());
}
});
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/CruibleOrderDetailProductAdapter.java
浏览文件 @
e4d33191
...
...
@@ -4,6 +4,7 @@ package com.wd.workoffice.ui.adapter;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.bean.OrderCheckStatusBean
;
import
com.wd.workoffice.bean.OrderDetail
;
import
com.wd.workoffice.bean.workEnum.PagePermissionType
;
import
com.wd.workoffice.util.MathUtils
;
...
...
@@ -17,7 +18,7 @@ import java.util.List;
public
class
CruibleOrderDetailProductAdapter
extends
BaseQuickAdapter
<
OrderDetail
.
OrderItemsBean
,
BaseViewHolder
>
{
int
status
;
List
<
OrderCheckStatusBean
.
ItemsBean
>
proStatusList
;
public
CruibleOrderDetailProductAdapter
(
int
layoutResId
,
List
data
,
Integer
status
)
{
super
(
layoutResId
,
data
);
this
.
status
=
status
;
...
...
@@ -83,6 +84,7 @@ public class CruibleOrderDetailProductAdapter extends BaseQuickAdapter<OrderDeta
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
CO_ENTER_PAGE
.
getPermission
()))
{
helper
.
setGone
(
R
.
id
.
fl_add
,
false
);
}
changeStats
(
helper
,
item
.
getProductId
());
}
public
int
getStatus
()
{
...
...
@@ -92,5 +94,27 @@ public class CruibleOrderDetailProductAdapter extends BaseQuickAdapter<OrderDeta
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
private
void
changeStats
(
BaseViewHolder
helper
,
int
productId
)
{
if
(
getProStatusList
()
!=
null
)
{
for
(
OrderCheckStatusBean
.
ItemsBean
itemsBean
:
getProStatusList
())
{
if
(
productId
==
itemsBean
.
getProductId
()){
helper
.
setGone
(
R
.
id
.
view_add
,
itemsBean
.
isInStore
());
helper
.
setGone
(
R
.
id
.
view_get
,
itemsBean
.
isUsed
());
// helper.setGone(R.id.view_quality, itemsBean.);
helper
.
setGone
(
R
.
id
.
view_return
,
itemsBean
.
isReturnX
());
}
}
}
}
public
List
<
OrderCheckStatusBean
.
ItemsBean
>
getProStatusList
()
{
return
proStatusList
;
}
public
void
setProStatusList
(
List
<
OrderCheckStatusBean
.
ItemsBean
>
proStatusList
)
{
this
.
proStatusList
=
proStatusList
;
notifyDataSetChanged
();
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/InsideOrderDetailProductAdapter.java
浏览文件 @
e4d33191
...
...
@@ -4,6 +4,7 @@ package com.wd.workoffice.ui.adapter;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.bean.OrderCheckStatusBean
;
import
com.wd.workoffice.bean.OrderDetail
;
import
com.wd.workoffice.bean.workEnum.PagePermissionType
;
import
com.wd.workoffice.util.MathUtils
;
...
...
@@ -17,7 +18,7 @@ import java.util.List;
public
class
InsideOrderDetailProductAdapter
extends
BaseQuickAdapter
<
OrderDetail
.
OrderItemsBean
,
BaseViewHolder
>
{
int
status
;
List
<
OrderCheckStatusBean
.
ItemsBean
>
proStatusList
;
public
InsideOrderDetailProductAdapter
(
int
layoutResId
,
List
data
,
Integer
status
)
{
super
(
layoutResId
,
data
);
this
.
status
=
status
;
...
...
@@ -83,6 +84,7 @@ public class InsideOrderDetailProductAdapter extends BaseQuickAdapter<OrderDetai
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
IO_ENTER_PAGE
.
getPermission
()))
{
helper
.
setGone
(
R
.
id
.
fl_add
,
false
);
}
changeStats
(
helper
,
item
.
getProductId
());
}
public
int
getStatus
()
{
...
...
@@ -92,5 +94,27 @@ public class InsideOrderDetailProductAdapter extends BaseQuickAdapter<OrderDetai
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
private
void
changeStats
(
BaseViewHolder
helper
,
int
productId
)
{
if
(
getProStatusList
()
!=
null
)
{
for
(
OrderCheckStatusBean
.
ItemsBean
itemsBean
:
getProStatusList
())
{
if
(
productId
==
itemsBean
.
getProductId
()){
helper
.
setGone
(
R
.
id
.
view_add
,
itemsBean
.
isInStore
());
helper
.
setGone
(
R
.
id
.
view_get
,
itemsBean
.
isUsed
());
// helper.setGone(R.id.view_quality, itemsBean.);
helper
.
setGone
(
R
.
id
.
view_return
,
itemsBean
.
isReturnX
());
}
}
}
}
public
List
<
OrderCheckStatusBean
.
ItemsBean
>
getProStatusList
()
{
return
proStatusList
;
}
public
void
setProStatusList
(
List
<
OrderCheckStatusBean
.
ItemsBean
>
proStatusList
)
{
this
.
proStatusList
=
proStatusList
;
notifyDataSetChanged
();
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/OrderDetailProductAdapter.java
浏览文件 @
e4d33191
...
...
@@ -4,6 +4,7 @@ package com.wd.workoffice.ui.adapter;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.bean.OrderCheckStatusBean
;
import
com.wd.workoffice.bean.OrderDetail
;
import
com.wd.workoffice.bean.workEnum.PagePermissionType
;
import
com.wd.workoffice.util.MathUtils
;
...
...
@@ -18,6 +19,8 @@ import java.util.List;
public
class
OrderDetailProductAdapter
extends
BaseQuickAdapter
<
OrderDetail
.
OrderItemsBean
,
BaseViewHolder
>
{
int
status
;
int
attr
;
List
<
OrderCheckStatusBean
.
ItemsBean
>
proStatusList
;
public
OrderDetailProductAdapter
(
int
layoutResId
,
List
data
,
Integer
status
)
{
super
(
layoutResId
,
data
);
...
...
@@ -58,7 +61,7 @@ public class OrderDetailProductAdapter extends BaseQuickAdapter<OrderDetail.Orde
case
100
:
if
(
item
.
getProductBeyondCount
()
==
0
d
)
{
helper
.
setVisible
(
R
.
id
.
tv_stock_desc
,
false
);
}
else
{
}
else
{
helper
.
setVisible
(
R
.
id
.
tv_stock_desc
,
true
);
}
break
;
...
...
@@ -84,9 +87,9 @@ public class OrderDetailProductAdapter extends BaseQuickAdapter<OrderDetail.Orde
break
;
}
if
(
WorkUtils
.
hasPermission
(
PagePermissionType
.
SO_ENTER_PAGE
.
getPermission
()))
{
helper
.
setGone
(
R
.
id
.
tv
_add
,
true
);
helper
.
setGone
(
R
.
id
.
fl
_add
,
true
);
}
else
{
helper
.
setGone
(
R
.
id
.
tv
_add
,
false
);
helper
.
setGone
(
R
.
id
.
fl
_add
,
false
);
}
if
(
WorkUtils
.
hasPermission
(
PagePermissionType
.
SO_RETURN_APPLY_LIST
.
getPermission
()))
{
helper
.
setGone
(
R
.
id
.
fl_return
,
true
);
...
...
@@ -98,8 +101,23 @@ public class OrderDetailProductAdapter extends BaseQuickAdapter<OrderDetail.Orde
}
else
{
helper
.
setGone
(
R
.
id
.
fl_get
,
false
);
}
changeStats
(
helper
,
item
.
getProductId
());
}
private
void
changeStats
(
BaseViewHolder
helper
,
int
productId
)
{
if
(
getProStatusList
()
!=
null
)
{
for
(
OrderCheckStatusBean
.
ItemsBean
itemsBean
:
getProStatusList
())
{
if
(
productId
==
itemsBean
.
getProductId
()){
helper
.
setGone
(
R
.
id
.
view_add
,
itemsBean
.
isInStore
());
helper
.
setGone
(
R
.
id
.
view_get
,
itemsBean
.
isUsed
());
// helper.setGone(R.id.view_quality, itemsBean.);
helper
.
setGone
(
R
.
id
.
view_return
,
itemsBean
.
isReturnX
());
}
}
}
}
public
int
getAttr
()
{
return
attr
;
}
...
...
@@ -107,5 +125,14 @@ public class OrderDetailProductAdapter extends BaseQuickAdapter<OrderDetail.Orde
public
void
setAttr
(
int
attr
)
{
this
.
attr
=
attr
;
}
public
List
<
OrderCheckStatusBean
.
ItemsBean
>
getProStatusList
()
{
return
proStatusList
;
}
public
void
setProStatusList
(
List
<
OrderCheckStatusBean
.
ItemsBean
>
proStatusList
)
{
this
.
proStatusList
=
proStatusList
;
notifyDataSetChanged
();
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/OutOrderDetailProductAdapter.java
浏览文件 @
e4d33191
...
...
@@ -4,6 +4,7 @@ package com.wd.workoffice.ui.adapter;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.bean.OrderCheckStatusBean
;
import
com.wd.workoffice.bean.OrderDetail
;
import
com.wd.workoffice.bean.workEnum.PagePermissionType
;
import
com.wd.workoffice.util.MathUtils
;
...
...
@@ -18,6 +19,8 @@ import java.util.List;
public
class
OutOrderDetailProductAdapter
extends
BaseQuickAdapter
<
OrderDetail
.
OrderItemsBean
,
BaseViewHolder
>
{
int
status
;
int
attr
;
List
<
OrderCheckStatusBean
.
ItemsBean
>
proStatusList
;
public
OutOrderDetailProductAdapter
(
int
layoutResId
,
List
data
,
Integer
status
)
{
super
(
layoutResId
,
data
);
this
.
status
=
status
;
...
...
@@ -85,6 +88,7 @@ public class OutOrderDetailProductAdapter extends BaseQuickAdapter<OrderDetail.O
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
PO_ENTER_PAGE
.
getPermission
()))
{
helper
.
setGone
(
R
.
id
.
fl_add
,
false
);
}
changeStats
(
helper
,
item
.
getProductId
());
}
public
int
getStatus
()
{
...
...
@@ -102,5 +106,27 @@ public class OutOrderDetailProductAdapter extends BaseQuickAdapter<OrderDetail.O
public
void
setAttr
(
int
attr
)
{
this
.
attr
=
attr
;
}
private
void
changeStats
(
BaseViewHolder
helper
,
int
productId
)
{
if
(
getProStatusList
()
!=
null
)
{
for
(
OrderCheckStatusBean
.
ItemsBean
itemsBean
:
getProStatusList
())
{
if
(
productId
==
itemsBean
.
getProductId
()){
helper
.
setGone
(
R
.
id
.
view_add
,
itemsBean
.
isInStore
());
helper
.
setGone
(
R
.
id
.
view_get
,
itemsBean
.
isUsed
());
// helper.setGone(R.id.view_quality, itemsBean.);
helper
.
setGone
(
R
.
id
.
view_return
,
itemsBean
.
isReturnX
());
}
}
}
}
public
List
<
OrderCheckStatusBean
.
ItemsBean
>
getProStatusList
()
{
return
proStatusList
;
}
public
void
setProStatusList
(
List
<
OrderCheckStatusBean
.
ItemsBean
>
proStatusList
)
{
this
.
proStatusList
=
proStatusList
;
notifyDataSetChanged
();
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/ProductOrderDetailProductAdapter.java
浏览文件 @
e4d33191
...
...
@@ -4,6 +4,7 @@ package com.wd.workoffice.ui.adapter;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.bean.OrderCheckStatusBean
;
import
com.wd.workoffice.bean.OrderDetail
;
import
com.wd.workoffice.bean.workEnum.PagePermissionType
;
import
com.wd.workoffice.util.MathUtils
;
...
...
@@ -17,6 +18,7 @@ import java.util.List;
public
class
ProductOrderDetailProductAdapter
extends
BaseQuickAdapter
<
OrderDetail
.
OrderItemsBean
,
BaseViewHolder
>
{
int
status
;
List
<
OrderCheckStatusBean
.
ItemsBean
>
proStatusList
;
public
ProductOrderDetailProductAdapter
(
int
layoutResId
,
List
data
,
Integer
status
)
{
super
(
layoutResId
,
data
);
...
...
@@ -53,6 +55,7 @@ public class ProductOrderDetailProductAdapter extends BaseQuickAdapter<OrderDeta
}
else
{
helper
.
setGone
(
R
.
id
.
fl_get
,
false
);
}
changeStats
(
helper
,
item
.
getProductId
());
}
public
int
getStatus
()
{
...
...
@@ -62,5 +65,27 @@ public class ProductOrderDetailProductAdapter extends BaseQuickAdapter<OrderDeta
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
private
void
changeStats
(
BaseViewHolder
helper
,
int
productId
)
{
if
(
getProStatusList
()
!=
null
)
{
for
(
OrderCheckStatusBean
.
ItemsBean
itemsBean
:
getProStatusList
())
{
if
(
productId
==
itemsBean
.
getProductId
()){
helper
.
setGone
(
R
.
id
.
view_add
,
itemsBean
.
isInStore
());
helper
.
setGone
(
R
.
id
.
view_get
,
itemsBean
.
isUsed
());
// helper.setGone(R.id.view_quality, itemsBean.);
helper
.
setGone
(
R
.
id
.
view_return
,
itemsBean
.
isReturnX
());
}
}
}
}
public
List
<
OrderCheckStatusBean
.
ItemsBean
>
getProStatusList
()
{
return
proStatusList
;
}
public
void
setProStatusList
(
List
<
OrderCheckStatusBean
.
ItemsBean
>
proStatusList
)
{
this
.
proStatusList
=
proStatusList
;
notifyDataSetChanged
();
}
}
app/src/main/java/com/wd/workoffice/ui/adapter/SupplierOrderDetailProductAdapter.java
浏览文件 @
e4d33191
...
...
@@ -4,6 +4,7 @@ package com.wd.workoffice.ui.adapter;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.wd.workoffice.R
;
import
com.wd.workoffice.bean.OrderCheckStatusBean
;
import
com.wd.workoffice.bean.OrderDetail
;
import
com.wd.workoffice.bean.workEnum.PagePermissionType
;
import
com.wd.workoffice.util.MathUtils
;
...
...
@@ -17,6 +18,7 @@ import java.util.List;
public
class
SupplierOrderDetailProductAdapter
extends
BaseQuickAdapter
<
OrderDetail
.
OrderItemsBean
,
BaseViewHolder
>
{
int
status
;
List
<
OrderCheckStatusBean
.
ItemsBean
>
proStatusList
;
public
SupplierOrderDetailProductAdapter
(
int
layoutResId
,
List
data
,
Integer
status
)
{
super
(
layoutResId
,
data
);
...
...
@@ -80,6 +82,36 @@ public class SupplierOrderDetailProductAdapter extends BaseQuickAdapter<OrderDet
if
(!
WorkUtils
.
hasPermission
(
PagePermissionType
.
FO_ENTER_PAGE
.
getPermission
()))
{
helper
.
setGone
(
R
.
id
.
fl_add
,
false
);
}
changeStats
(
helper
,
item
.
getProductId
());
}
private
void
changeStats
(
BaseViewHolder
helper
,
int
productId
)
{
if
(
getProStatusList
()
!=
null
)
{
for
(
OrderCheckStatusBean
.
ItemsBean
itemsBean
:
getProStatusList
())
{
if
(
productId
==
itemsBean
.
getProductId
()){
helper
.
setGone
(
R
.
id
.
view_add
,
itemsBean
.
isInStore
());
helper
.
setGone
(
R
.
id
.
view_get
,
itemsBean
.
isUsed
());
// helper.setGone(R.id.view_quality, itemsBean.);
helper
.
setGone
(
R
.
id
.
view_return
,
itemsBean
.
isReturnX
());
}
}
}
}
public
List
<
OrderCheckStatusBean
.
ItemsBean
>
getProStatusList
()
{
return
proStatusList
;
}
public
void
setProStatusList
(
List
<
OrderCheckStatusBean
.
ItemsBean
>
proStatusList
)
{
this
.
proStatusList
=
proStatusList
;
notifyDataSetChanged
();
}
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
}
app/src/main/res/layout/fg_home.xml
浏览文件 @
e4d33191
...
...
@@ -24,8 +24,8 @@
android:layout_height=
"match_parent"
android:layout_marginTop=
"10mm"
android:orientation=
"vertical"
app:layout_scrollFlags=
"scroll|
snap
|enterAlways"
>
app:layout_scrollFlags=
"scroll|
enterAlwaysCollapsed
|enterAlways"
>
<!--scroll | snap |enterAlways-->
<androidx.cardview.widget.CardView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
app/src/main/res/layout/item_order_product.xml
浏览文件 @
e4d33191
...
...
@@ -274,6 +274,7 @@
android:id=
"@+id/view_get"
android:layout_width=
"8mm"
android:layout_height=
"8mm"
android:visibility=
"gone"
android:layout_gravity=
"right"
android:background=
"@drawable/shape_red_circle"
/>
</FrameLayout>
...
...
@@ -299,6 +300,7 @@
android:id=
"@+id/view_return"
android:layout_width=
"8mm"
android:layout_height=
"8mm"
android:visibility=
"gone"
android:layout_gravity=
"right"
android:background=
"@drawable/shape_red_circle"
/>
</FrameLayout>
...
...
@@ -325,6 +327,7 @@
android:id=
"@+id/view_quality"
android:layout_width=
"8mm"
android:layout_height=
"8mm"
android:visibility=
"gone"
android:layout_gravity=
"right"
android:background=
"@drawable/shape_red_circle"
/>
</FrameLayout>
...
...
@@ -350,6 +353,7 @@
android:id=
"@+id/view_add"
android:layout_width=
"8mm"
android:layout_height=
"8mm"
android:visibility=
"gone"
android:layout_gravity=
"right"
android:background=
"@drawable/shape_red_circle"
/>
</FrameLayout>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论