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
fb23e913
提交
fb23e913
authored
9月 02, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.修改退单问题
上级
7f135542
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
51 行增加
和
29 行删除
+51
-29
PagePermissionType.java
...a/com/wd/workoffice/bean/workEnum/PagePermissionType.java
+1
-1
ReturnAddActivity.java
...d/workoffice/ui/activity/bat/order/ReturnAddActivity.java
+50
-28
没有找到文件。
app/src/main/java/com/wd/workoffice/bean/workEnum/PagePermissionType.java
浏览文件 @
fb23e913
...
...
@@ -95,7 +95,7 @@ public enum PagePermissionType {
PO_ADVANCE_SAVE
(
"order:po:advance-finish-apply:apply:save"
,
"发起提前结束申请"
),
PO_ADVANCE_LIST
(
"order:po:advance-finish-apply:page:list"
,
"-提前结束申请列表"
),
PO_ADVANCE_AUDIT
(
"order:po:advance-finish-apply:audit"
,
"提前结束申请审核"
),
PO_RETURN_APPLY_LIST
(
"order:po:return-apply:
apply:save"
,
"发起退货申请
"
),
PO_RETURN_APPLY_LIST
(
"order:po:return-apply:
page:list"
,
"退货申请列表
"
),
PO_RETURN_EDIT
(
"order:po:return-apply:edit"
,
"退货审核(集团审核)"
),
PO_USE_APPLY_LIST
(
"order:po:use-apply:page:list"
,
"领用申请列表"
),
PO_USE_APPLY_SAVE
(
"order:po:use-apply:apply:save"
,
"发起领用申请"
),
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/ReturnAddActivity.java
浏览文件 @
fb23e913
...
...
@@ -158,6 +158,7 @@ public class ReturnAddActivity extends WorkToolBarActivity {
break
;
}
param
.
put
(
"returnType"
,
chooseType
);
changeNum
();
}
@Override
...
...
@@ -213,24 +214,39 @@ public class ReturnAddActivity extends WorkToolBarActivity {
}
dataBean
=
JSON
.
parseObject
(
data
.
getData
().
toString
(),
OrderDetail
.
class
);
List
<
OrderDetail
.
OrderItemsBean
>
orderItems
=
dataBean
.
getOrderItems
();
for
(
OrderDetail
.
OrderItemsBean
orderItem
:
orderItems
)
{
if
(
TextUtils
.
equals
(
orderItem
.
getId
(),
getIntent
().
getStringExtra
(
"orderItemId"
)))
{
if
(!
TextUtils
.
equals
(
orderType
,
OrderType
.
SUPPLIER
.
getCode
()))
{
// 0805新增 额外判断供应订单 不修改旧逻辑
if
(
TextUtils
.
isEmpty
(
enterStockType
))
{
tvMaxNum
.
setText
(
String
.
format
(
"*退货最大数量(%s)"
,
MathUtils
.
converData
(
orderItem
.
getCanUseProductSum
(),
3
)));
}
else
{
String
returnNum
=
TextUtils
.
equals
(
enterStockType
,
"1"
)
?
orderItem
.
getCanOutReturnSum
()
:
orderItem
.
getCanUsedReturnSum
();
tvMaxNum
.
setText
(
String
.
format
(
"*退货最大数量(%s)"
,
MathUtils
.
converData
(
returnNum
,
3
)));
}
}
else
{
tvMaxNum
.
setText
(
String
.
format
(
"*退货最大数量(%s)"
,
MathUtils
.
converData
(
orderItem
.
getCanReturnProductSum
(),
3
)));
}
changeNum
();
}
});
}
/**
* 修改退货数量
*/
private
void
changeNum
()
{
if
(
null
==
dataBean
)
{
return
;
}
for
(
OrderDetail
.
OrderItemsBean
orderItem
:
dataBean
.
getOrderItems
())
{
if
(
TextUtils
.
equals
(
orderItem
.
getId
(),
getIntent
().
getStringExtra
(
"orderItemId"
)))
{
if
(!
TextUtils
.
equals
(
orderType
,
OrderType
.
SUPPLIER
.
getCode
()))
{
// 0805新增 额外判断供应订单 不修改旧逻辑
switch
(
chooseType
)
{
case
1
:
tvMaxNum
.
setText
(
String
.
format
(
"*退货最大数量(%s)"
,
MathUtils
.
converData
(
orderItem
.
getCanOutReturnSum
(),
3
)));
break
;
case
3
:
tvMaxNum
.
setText
(
String
.
format
(
"*退货最大数量(%s)"
,
MathUtils
.
converData
(
orderItem
.
getCanUsedReturnSum
(),
3
)));
break
;
case
4
:
tvMaxNum
.
setText
(
String
.
format
(
"*退货最大数量(%s)"
,
MathUtils
.
converData
(
orderItem
.
getCanOutReturnSum
(),
3
)));
break
;
}
}
else
{
tvMaxNum
.
setText
(
String
.
format
(
"*退货最大数量(%s)"
,
MathUtils
.
converData
(
orderItem
.
getCanReturnProductSum
(),
3
)));
}
}
}
);
}
}
...
...
@@ -296,22 +312,28 @@ public class ReturnAddActivity extends WorkToolBarActivity {
for
(
OrderDetail
.
OrderItemsBean
orderItem
:
orderItems
)
{
if
(
TextUtils
.
equals
(
orderItem
.
getId
(),
getIntent
().
getStringExtra
(
"orderItemId"
)))
{
if
(!
TextUtils
.
equals
(
orderType
,
OrderType
.
SUPPLIER
.
getCode
()))
{
// 0805新增 额外判断供应订单 不修改旧逻辑
if
(
TextUtils
.
isEmpty
(
enterStockType
))
{
if
(
new
BigDecimal
(
Double
.
valueOf
(
num
)).
compareTo
(
new
BigDecimal
(
orderItem
.
getCanUseProductSum
()))
==
1
)
{
toast
(
String
.
format
(
"可申请退货数量最大为%s"
,
MathUtils
.
converData
(
orderItem
.
getCanUseProductSum
(),
3
)));
return
;
}
}
else
{
String
returnNum
=
TextUtils
.
equals
(
enterStockType
,
"1"
)
?
orderItem
.
getCanOutReturnSum
()
:
orderItem
.
getCanUsedReturnSum
();
if
(
new
BigDecimal
(
Double
.
valueOf
(
num
)).
compareTo
(
new
BigDecimal
(
Double
.
valueOf
(
returnNum
)))
==
1
)
{
toast
(
String
.
format
(
"可申请退货数量最大为%s"
,
MathUtils
.
converData
(
Double
.
valueOf
(
returnNum
),
3
)));
return
;
}
switch
(
chooseType
)
{
case
1
:
if
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
num
)).
compareTo
(
new
BigDecimal
(
orderItem
.
getCanOutReturnSum
()))
==
1
)
{
toast
(
String
.
format
(
"可申请退货数量最大为%s"
,
MathUtils
.
converData
(
orderItem
.
getCanOutReturnSum
(),
3
)));
return
;
}
break
;
case
3
:
if
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
num
)).
compareTo
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
orderItem
.
getCanUsedReturnSum
())))
==
1
)
{
toast
(
String
.
format
(
"可申请退货数量最大为%s"
,
MathUtils
.
converData
(
Double
.
parseDouble
(
orderItem
.
getCanUsedReturnSum
()),
3
)));
return
;
}
break
;
case
4
:
if
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
num
)).
compareTo
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
orderItem
.
getCanOutReturnSum
())))
==
1
)
{
toast
(
String
.
format
(
"可申请退货数量最大为%s"
,
MathUtils
.
converData
(
Double
.
parseDouble
(
orderItem
.
getCanOutReturnSum
()),
3
)));
return
;
}
break
;
}
}
else
{
if
(
new
BigDecimal
(
Double
.
valueOf
(
num
)).
compareTo
(
new
BigDecimal
(
Double
.
valueOf
(
orderItem
.
getCanReturnProductSum
())))
==
1
)
{
if
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
num
)).
compareTo
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
orderItem
.
getCanReturnProductSum
())))
==
1
)
{
toast
(
String
.
format
(
"可申请退货数量最大为%s"
,
MathUtils
.
converData
(
orderItem
.
getCanReturnProductSum
(),
3
)));
return
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论