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
4e50aaed
提交
4e50aaed
authored
9月 29, 2020
作者:
lgd
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.退货添加报废逻辑
上级
a35c4fa7
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
332 行增加
和
79 行删除
+332
-79
OrderDetail.java
app/src/main/java/com/wd/workoffice/bean/OrderDetail.java
+36
-0
ReturnAddActivity.java
...d/workoffice/ui/activity/bat/order/ReturnAddActivity.java
+261
-79
ReturnApplyActivity.java
...workoffice/ui/activity/bat/order/ReturnApplyActivity.java
+1
-0
SaleOrderDetailActivity.java
...office/ui/activity/bat/order/SaleOrderDetailActivity.java
+1
-0
activity_return_add.xml
app/src/main/res/layout/activity_return_add.xml
+33
-0
没有找到文件。
app/src/main/java/com/wd/workoffice/bean/OrderDetail.java
浏览文件 @
4e50aaed
...
@@ -983,6 +983,42 @@ public class OrderDetail {
...
@@ -983,6 +983,42 @@ public class OrderDetail {
String
count
;
// backList的数量
String
count
;
// backList的数量
String
lot
;
// 产品批号
String
lot
;
// 产品批号
private
String
provideMethod
;
private
String
provideMethod
;
private
String
canScrapInProductSum
;
private
String
canScrapOutProductSum
;
private
String
canScrapUseProductSum
;
private
String
canScrapReturnProductSum
;
public
String
getCanScrapInProductSum
()
{
return
canScrapInProductSum
;
}
public
void
setCanScrapInProductSum
(
String
canScrapInProductSum
)
{
this
.
canScrapInProductSum
=
canScrapInProductSum
;
}
public
String
getCanScrapOutProductSum
()
{
return
canScrapOutProductSum
;
}
public
void
setCanScrapOutProductSum
(
String
canScrapOutProductSum
)
{
this
.
canScrapOutProductSum
=
canScrapOutProductSum
;
}
public
String
getCanScrapUseProductSum
()
{
return
canScrapUseProductSum
;
}
public
void
setCanScrapUseProductSum
(
String
canScrapUseProductSum
)
{
this
.
canScrapUseProductSum
=
canScrapUseProductSum
;
}
public
String
getCanScrapReturnProductSum
()
{
return
canScrapReturnProductSum
;
}
public
void
setCanScrapReturnProductSum
(
String
canScrapReturnProductSum
)
{
this
.
canScrapReturnProductSum
=
canScrapReturnProductSum
;
}
public
String
getProvideMethod
()
{
public
String
getProvideMethod
()
{
return
provideMethod
;
return
provideMethod
;
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/ReturnAddActivity.java
浏览文件 @
4e50aaed
...
@@ -77,85 +77,218 @@ public class ReturnAddActivity extends WorkToolBarActivity {
...
@@ -77,85 +77,218 @@ public class ReturnAddActivity extends WorkToolBarActivity {
EditText
etLot
;
EditText
etLot
;
@BindView
(
R
.
id
.
ll_lot
)
@BindView
(
R
.
id
.
ll_lot
)
LinearLayout
llLot
;
LinearLayout
llLot
;
@BindView
(
R
.
id
.
tv_action
)
TextView
tvAction
;
@BindView
(
R
.
id
.
ll_action
)
LinearLayout
llAction
;
@BindView
(
R
.
id
.
tv_return_type_desc
)
TextView
tvReturnTypeDesc
;
@BindView
(
R
.
id
.
tv_stock_desc
)
TextView
tvStockDesc
;
@BindView
(
R
.
id
.
tv_remark_desc
)
TextView
tvRemarkDesc
;
private
Map
<
String
,
Object
>
param
;
private
Map
<
String
,
Object
>
param
;
private
String
orderType
;
private
String
orderType
;
private
List
<
String
>
typeList
=
new
ArrayList
<>();
private
List
<
String
>
typeList
=
new
ArrayList
<>();
private
List
<
String
>
scrappedList
=
new
ArrayList
<>();
private
String
enterStockType
;
private
String
enterStockType
;
private
QMUIDialog
.
MenuDialogBuilder
typeDialog
;
private
QMUIDialog
.
MenuDialogBuilder
typeDialog
;
private
QMUIDialog
.
MenuDialogBuilder
deptDialog
;
private
QMUIDialog
.
MenuDialogBuilder
deptDialog
;
private
QMUIDialog
.
MenuDialogBuilder
actionDialog
;
String
[]
actionArray
=
new
String
[]{
"退货"
,
"报废"
};
private
int
chooseType
=
0
;
//1 从现场库退到内库 3 未结算库核 4 现场库退给供应商 (6)从内库退到供应商
private
int
chooseType
=
0
;
//1 从现场库退到内库 3 未结算库核 4 现场库退给供应商 (6)从内库退到供应商
private
int
chooseAction
=
1
;
//action: 1退货 2报废
private
JSONArray
deptList
;
private
JSONArray
deptList
;
private
List
<
String
>
deptNameList
;
private
List
<
String
>
deptNameList
;
private
Integer
chooseDep
;
private
Integer
chooseDep
;
private
OrderDetail
dataBean
;
private
OrderDetail
dataBean
;
private
String
isCrucible
;
@Override
@Override
protected
void
initView
()
{
protected
void
initView
()
{
ButterKnife
.
bind
(
this
);
ButterKnife
.
bind
(
this
);
orderType
=
getIntent
().
getStringExtra
(
"orderType"
);
orderType
=
getIntent
().
getStringExtra
(
"orderType"
);
enterStockType
=
getIntent
().
getStringExtra
(
"enterStockType"
);
enterStockType
=
getIntent
().
getStringExtra
(
"enterStockType"
);
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SALE
.
getCode
()))
{
isCrucible
=
getIntent
().
getStringExtra
(
"isCrucible"
);
//坩埚销售订单 1 坩埚销售订单
typeList
.
add
(
"从现场库退到内库"
);
tvAction
.
setText
(
"退货"
);
tvReturnType
.
setText
(
"从现场库退到内库"
);
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SALE
.
getCode
())||
TextUtils
.
equals
(
orderType
,
OrderType
.
OUT_BUY
.
getCode
()))
{
}
else
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SUPPLIER
.
getCode
()))
{
llAction
.
setVisibility
(
View
.
VISIBLE
);
tvReturnType
.
setText
(
"从内库退给供应商"
);
}
else
{
}
else
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
OUT_BUY
.
getCode
()))
{
llAction
.
setVisibility
(
View
.
GONE
);
switch
(
enterStockType
)
{
case
"1"
:
typeList
.
add
(
"从现场库退到内库"
);
typeList
.
add
(
"未结算库核销"
);
typeList
.
add
(
"现场库退给供应商"
);
break
;
case
"2"
:
typeList
.
add
(
"未结算库核销"
);
typeList
.
add
(
"现场库退给供应商"
);
break
;
}
}
}
// if (TextUtils.equals(orderType, OrderType.SALE.getCode())) {
// typeList.add("从现场库退到内库");
// tvReturnType.setText("从现场库退到内库");
// } else if (TextUtils.equals(orderType, OrderType.SUPPLIER.getCode())) {
// tvReturnType.setText("从内库退给供应商");
// } else if (TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
// switch (enterStockType) {
// case "1":
// typeList.add("从现场库退到内库");
// typeList.add("未结算库核销");
// typeList.add("现场库退给供应商");
// break;
// case "2":
// typeList.add("未结算库核销");
// typeList.add("现场库退给供应商");
// break;
// }
// }
typeDialog
=
DialogUtils
.
listDialog
(
this
);
typeDialog
=
DialogUtils
.
listDialog
(
this
);
typeDialog
.
addItems
(
typeList
.
toArray
(
new
String
[
typeList
.
size
()]),
new
DialogInterface
.
OnClickListener
()
{
actionDialog
=
DialogUtils
.
listDialog
(
this
);
actionDialog
.
addItems
(
actionArray
,
new
DialogInterface
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
tvReturnType
.
setText
(
typeList
.
get
(
which
));
tvAction
.
setText
(
actionArray
[
which
]);
changeView
();
chooseAction
=
which
+
1
;
changeDialogData
();
dialog
.
dismiss
();
dialog
.
dismiss
();
}
}
});
});
deptDialog
=
DialogUtils
.
listDialog
(
this
);
deptDialog
=
DialogUtils
.
listDialog
(
this
);
WorkUtils
.
addDecimalsListener
(
etNum
);
WorkUtils
.
addDecimalsListener
(
etNum
);
WorkUtils
.
addNumListener
(
etRemark
,
tvRemarkNum
);
WorkUtils
.
addNumListener
(
etRemark
,
tvRemarkNum
);
changeDialogData
();
}
private
void
changeDialogData
()
{
typeList
.
clear
();
typeDialog
.
clear
();
tvReturnType
.
setText
(
""
);
chooseType
=
0
;
chooseDep
=
null
;
if
(
chooseAction
==
1
)
{
//退货
tvBottom
.
setText
(
"提交退货申请"
);
tvNum
.
setText
(
"退货数量"
);
tvReturnTypeDesc
.
setText
(
"退货类别"
);
tvStockDesc
.
setText
(
"退货到仓库"
);
tvRemarkDesc
.
setText
(
"退货原因"
);
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SALE
.
getCode
()))
{
typeList
.
add
(
"从现场库退到内库"
);
tvReturnType
.
setText
(
"从现场库退到内库"
);
}
else
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SUPPLIER
.
getCode
()))
{
tvReturnType
.
setText
(
"从内库退给供应商"
);
}
else
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
OUT_BUY
.
getCode
()))
{
switch
(
enterStockType
)
{
case
"1"
:
typeList
.
add
(
"从现场库退到内库"
);
typeList
.
add
(
"未结算库核销"
);
typeList
.
add
(
"现场库退给供应商"
);
break
;
case
"2"
:
typeList
.
add
(
"未结算库核销"
);
typeList
.
add
(
"现场库退给供应商"
);
break
;
}
tvReturnType
.
setText
(
typeList
.
get
(
0
));
}
}
else
{
tvBottom
.
setText
(
"提交报废申请"
);
tvNum
.
setText
(
"报废数量"
);
tvReturnTypeDesc
.
setText
(
"报废类别"
);
tvStockDesc
.
setText
(
"报废到仓库"
);
tvRemarkDesc
.
setText
(
"报废原因"
);
/**
* 销售的报废,要区分是否是坩埚,是坩埚销售的话分2种@[@"现场库报废",@"退货库报废"];
* 不是坩埚销售的话分4种@[@"从内库报废",@"现场库报废",@"未结算库报废",@"退货库报废"];
* 外采购的报废分4种 @[@"从内库报废",@"现场库报废",@"未结算库报废",@"退货库报废"];
*/
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
SALE
.
getCode
()))
{
// typeList.add("从现场库退到内库");
// tvReturnType.setText("从现场库退到内库");
switch
(
isCrucible
)
{
case
"1"
:
typeList
.
add
(
"从现场库报废"
);
typeList
.
add
(
"从退货库报废"
);
break
;
default
:
typeList
.
add
(
"从内库报废"
);
typeList
.
add
(
"从现场库报废"
);
typeList
.
add
(
"从结算库报废"
);
typeList
.
add
(
"从退货库报废"
);
break
;
}
}
else
if
(
TextUtils
.
equals
(
orderType
,
OrderType
.
OUT_BUY
.
getCode
()))
{
typeList
.
add
(
"从内库报废"
);
typeList
.
add
(
"从现场库报废"
);
typeList
.
add
(
"从未结算库报废"
);
typeList
.
add
(
"从退货库报废"
);
}
tvReturnType
.
setText
(
typeList
.
get
(
0
));
}
typeDialog
.
addItems
(
typeList
.
toArray
(
new
String
[
typeList
.
size
()]),
new
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialog
,
int
which
)
{
tvReturnType
.
setText
(
typeList
.
get
(
which
));
changeView
();
dialog
.
dismiss
();
}
});
}
}
private
void
changeView
()
{
private
void
changeView
()
{
//1 从现场库退到内库 3 未结算库核 4 现场库退给供应商
if
(
chooseAction
==
1
)
{
//退货
String
returnType
=
tvReturnType
.
getText
().
toString
();
String
returnType
=
tvReturnType
.
getText
().
toString
();
switch
(
returnType
)
{
switch
(
returnType
)
{
case
"从现场库退到内库"
:
case
"从现场库退到内库"
:
chooseType
=
1
;
chooseType
=
1
;
llChooseStock
.
setVisibility
(
View
.
VISIBLE
);
llChooseStock
.
setVisibility
(
View
.
VISIBLE
);
llMoney
.
setVisibility
(
View
.
GONE
);
llMoney
.
setVisibility
(
View
.
GONE
);
break
;
break
;
case
"未结算库核销"
:
case
"未结算库核销"
:
chooseType
=
3
;
chooseType
=
3
;
llChooseStock
.
setVisibility
(
View
.
GONE
);
llChooseStock
.
setVisibility
(
View
.
GONE
);
llMoney
.
setVisibility
(
View
.
VISIBLE
);
llMoney
.
setVisibility
(
View
.
VISIBLE
);
break
;
break
;
case
"现场库退给供应商"
:
case
"现场库退给供应商"
:
chooseType
=
4
;
chooseType
=
4
;
llChooseStock
.
setVisibility
(
View
.
GONE
);
llChooseStock
.
setVisibility
(
View
.
GONE
);
llMoney
.
setVisibility
(
View
.
GONE
);
llMoney
.
setVisibility
(
View
.
GONE
);
break
;
break
;
case
"从内库退给供应商"
:
case
"从内库退给供应商"
:
chooseType
=
6
;
chooseType
=
6
;
llMoney
.
setVisibility
(
View
.
GONE
);
llMoney
.
setVisibility
(
View
.
GONE
);
llChooseStock
.
setVisibility
(
View
.
GONE
);
llChooseStock
.
setVisibility
(
View
.
GONE
);
ivChooseType
.
setVisibility
(
View
.
GONE
);
ivChooseType
.
setVisibility
(
View
.
GONE
);
llType
.
setClickable
(
false
);
llType
.
setClickable
(
false
);
break
;
break
;
default
:
default
:
llChooseStock
.
setVisibility
(
View
.
GONE
);
llChooseStock
.
setVisibility
(
View
.
GONE
);
llMoney
.
setVisibility
(
View
.
GONE
);
llMoney
.
setVisibility
(
View
.
GONE
);
break
;
break
;
}
}
else
{
//7 @[@"从内库报废" 8 "从现场库报废", 9@"从未结算库报废", 10 @"从退货库报废"];
String
returnType
=
tvReturnType
.
getText
().
toString
();
switch
(
returnType
)
{
case
"从内库报废"
:
chooseType
=
7
;
llChooseStock
.
setVisibility
(
View
.
VISIBLE
);
llMoney
.
setVisibility
(
View
.
GONE
);
break
;
case
"从现场库报废"
:
chooseType
=
8
;
llChooseStock
.
setVisibility
(
View
.
GONE
);
llMoney
.
setVisibility
(
View
.
GONE
);
break
;
case
"从未结算库报废"
:
chooseType
=
9
;
llChooseStock
.
setVisibility
(
View
.
GONE
);
llMoney
.
setVisibility
(
View
.
GONE
);
break
;
case
"从退货库报废"
:
chooseType
=
10
;
llMoney
.
setVisibility
(
View
.
GONE
);
llChooseStock
.
setVisibility
(
View
.
GONE
);
break
;
default
:
llChooseStock
.
setVisibility
(
View
.
GONE
);
llMoney
.
setVisibility
(
View
.
GONE
);
break
;
}
}
}
param
.
put
(
"returnType"
,
chooseType
);
param
.
put
(
"returnType"
,
chooseType
);
changeNum
();
changeNum
();
...
@@ -227,24 +360,40 @@ public class ReturnAddActivity extends WorkToolBarActivity {
...
@@ -227,24 +360,40 @@ public class ReturnAddActivity extends WorkToolBarActivity {
return
;
return
;
}
}
for
(
OrderDetail
.
OrderItemsBean
orderItem
:
dataBean
.
getOrderItems
())
{
for
(
OrderDetail
.
OrderItemsBean
orderItem
:
dataBean
.
getOrderItems
())
{
if
(
TextUtils
.
equals
(
orderItem
.
getId
(),
getIntent
().
getStringExtra
(
"orderItemId"
)))
{
if
(
TextUtils
.
equals
(
orderItem
.
getId
(),
getIntent
().
getStringExtra
(
"orderItemId"
)))
{
//匹配订单
if
(!
TextUtils
.
equals
(
orderType
,
OrderType
.
SUPPLIER
.
getCode
()))
{
// 0805新增 额外判断供应订单 不修改旧逻辑
if
(
chooseAction
==
1
)
{
//退货
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
)));
}
}
else
{
//报废
switch
(
chooseType
)
{
switch
(
chooseType
)
{
case
1
:
case
7
:
tvMaxNum
.
setText
(
String
.
format
(
"*
退货最大数量(%s)"
,
MathUtils
.
converData
(
orderItem
.
getCanOutReturn
Sum
(),
3
)));
tvMaxNum
.
setText
(
String
.
format
(
"*
报废最大数量(%s)"
,
MathUtils
.
converData
(
orderItem
.
getCanScrapInProduct
Sum
(),
3
)));
break
;
break
;
case
3
:
case
8
:
tvMaxNum
.
setText
(
String
.
format
(
"*
退货最大数量(%s)"
,
MathUtils
.
converData
(
orderItem
.
getCanUsedReturn
Sum
(),
3
)));
tvMaxNum
.
setText
(
String
.
format
(
"*
报废最大数量(%s)"
,
MathUtils
.
converData
(
orderItem
.
getCanScrapOutProduct
Sum
(),
3
)));
break
;
break
;
case
4
:
case
9
:
tvMaxNum
.
setText
(
String
.
format
(
"*退货最大数量(%s)"
,
MathUtils
.
converData
(
orderItem
.
getCanOutReturnSum
(),
3
)));
tvMaxNum
.
setText
(
String
.
format
(
"*报废最大数量(%s)"
,
MathUtils
.
converData
(
orderItem
.
getCanScrapUseProductSum
(),
3
)));
break
;
case
10
:
tvMaxNum
.
setText
(
String
.
format
(
"*报废最大数量(%s)"
,
MathUtils
.
converData
(
orderItem
.
getCanScrapReturnProductSum
(),
3
)));
break
;
break
;
}
}
}
else
{
tvMaxNum
.
setText
(
String
.
format
(
"*退货最大数量(%s)"
,
MathUtils
.
converData
(
orderItem
.
getCanReturnProductSum
(),
3
)));
}
}
}
}
}
}
}
}
...
@@ -311,34 +460,63 @@ public class ReturnAddActivity extends WorkToolBarActivity {
...
@@ -311,34 +460,63 @@ public class ReturnAddActivity extends WorkToolBarActivity {
List
<
OrderDetail
.
OrderItemsBean
>
orderItems
=
dataBean
.
getOrderItems
();
List
<
OrderDetail
.
OrderItemsBean
>
orderItems
=
dataBean
.
getOrderItems
();
for
(
OrderDetail
.
OrderItemsBean
orderItem
:
orderItems
)
{
for
(
OrderDetail
.
OrderItemsBean
orderItem
:
orderItems
)
{
if
(
TextUtils
.
equals
(
orderItem
.
getId
(),
getIntent
().
getStringExtra
(
"orderItemId"
)))
{
if
(
TextUtils
.
equals
(
orderItem
.
getId
(),
getIntent
().
getStringExtra
(
"orderItemId"
)))
{
if
(!
TextUtils
.
equals
(
orderType
,
OrderType
.
SUPPLIER
.
getCode
()))
{
// 0805新增 额外判断供应订单 不修改旧逻辑
if
(
chooseAction
==
1
)
{
//退货
if
(!
TextUtils
.
equals
(
orderType
,
OrderType
.
SUPPLIER
.
getCode
()))
{
// 0805新增 额外判断供应订单 不修改旧逻辑
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
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
num
)).
compareTo
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
orderItem
.
getCanReturnProductSum
())))
==
1
)
{
toast
(
String
.
format
(
"可申请退货数量最大为%s"
,
MathUtils
.
converData
(
orderItem
.
getCanReturnProductSum
(),
3
)));
return
;
}
}
}
else
{
switch
(
chooseType
)
{
switch
(
chooseType
)
{
case
1
:
case
7
:
if
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
num
)).
compareTo
(
new
BigDecimal
(
orderItem
.
getCanOutReturnSum
(
)))
==
1
)
{
if
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
num
)).
compareTo
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
orderItem
.
getCanScrapInProductSum
()
)))
==
1
)
{
toast
(
String
.
format
(
"
可申请退货数量最大为%s"
,
MathUtils
.
converData
(
orderItem
.
getCanOutReturn
Sum
(),
3
)));
toast
(
String
.
format
(
"
报废最大数量%s"
,
MathUtils
.
converData
(
orderItem
.
getCanScrapInProduct
Sum
(),
3
)));
return
;
return
;
}
}
break
;
break
;
case
3
:
case
8
:
if
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
num
)).
compareTo
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
orderItem
.
getCan
UsedReturn
Sum
())))
==
1
)
{
if
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
num
)).
compareTo
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
orderItem
.
getCan
ScrapOutProduct
Sum
())))
==
1
)
{
toast
(
String
.
format
(
"
可申请退货数量最大为%s"
,
MathUtils
.
converData
(
Double
.
parseDouble
(
orderItem
.
getCanUsedReturnSum
()
),
3
)));
toast
(
String
.
format
(
"
报废最大数量%s"
,
MathUtils
.
converData
(
orderItem
.
getCanScrapOutProductSum
(
),
3
)));
return
;
return
;
}
}
break
;
break
;
case
4
:
case
9
:
if
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
num
)).
compareTo
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
orderItem
.
getCanOutReturnSum
())))
==
1
)
{
if
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
num
)).
compareTo
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
orderItem
.
getCanScrapUseProductSum
())))
==
1
)
{
toast
(
String
.
format
(
"可申请退货数量最大为%s"
,
MathUtils
.
converData
(
Double
.
parseDouble
(
orderItem
.
getCanOutReturnSum
()),
3
)));
toast
(
String
.
format
(
"报废最大数量%s"
,
MathUtils
.
converData
(
orderItem
.
getCanScrapUseProductSum
(),
3
)));
return
;
}
break
;
case
10
:
tvMaxNum
.
setText
(
String
.
format
(
"*报废最大数量(%s)"
,
MathUtils
.
converData
(
orderItem
.
getCanScrapReturnProductSum
(),
3
)));
if
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
num
)).
compareTo
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
orderItem
.
getCanScrapReturnProductSum
())))
==
1
)
{
toast
(
String
.
format
(
"报废最大数量%s"
,
MathUtils
.
converData
(
orderItem
.
getCanScrapReturnProductSum
(),
3
)));
return
;
return
;
}
}
break
;
break
;
}
}
else
{
if
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
num
)).
compareTo
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
orderItem
.
getCanReturnProductSum
())))
==
1
)
{
toast
(
String
.
format
(
"可申请退货数量最大为%s"
,
MathUtils
.
converData
(
orderItem
.
getCanReturnProductSum
(),
3
)));
return
;
}
}
}
}
}
}
}
}
}
}
...
@@ -350,11 +528,12 @@ public class ReturnAddActivity extends WorkToolBarActivity {
...
@@ -350,11 +528,12 @@ public class ReturnAddActivity extends WorkToolBarActivity {
toast
(
"请输入核销金额"
);
toast
(
"请输入核销金额"
);
return
;
return
;
}
}
param
.
put
(
"action"
,
chooseAction
);
param
.
put
(
"productAmount"
,
num
);
param
.
put
(
"productAmount"
,
num
);
param
.
put
(
"writeOff"
,
price
);
param
.
put
(
"writeOff"
,
price
);
param
.
put
(
"applyRemark"
,
remark
);
param
.
put
(
"applyRemark"
,
remark
);
param
.
put
(
"lot"
,
lot
);
param
.
put
(
"lot"
,
lot
);
if
(
chooseType
==
1
)
{
if
(
chooseType
==
1
||
chooseType
==
7
)
{
if
(
chooseDep
==
null
)
{
if
(
chooseDep
==
null
)
{
toast
(
"请选择退货仓库"
);
toast
(
"请选择退货仓库"
);
return
;
return
;
...
@@ -397,12 +576,15 @@ public class ReturnAddActivity extends WorkToolBarActivity {
...
@@ -397,12 +576,15 @@ public class ReturnAddActivity extends WorkToolBarActivity {
}
}
@OnClick
({
R
.
id
.
tv_bottom
,
R
.
id
.
ll_type
,
R
.
id
.
ll_choose_stock
})
@OnClick
({
R
.
id
.
ll_action
,
R
.
id
.
tv_bottom
,
R
.
id
.
ll_type
,
R
.
id
.
ll_choose_stock
})
public
void
onViewClicked
(
View
view
)
{
public
void
onViewClicked
(
View
view
)
{
switch
(
view
.
getId
())
{
switch
(
view
.
getId
())
{
case
R
.
id
.
tv_bottom
:
case
R
.
id
.
tv_bottom
:
submit
();
submit
();
break
;
break
;
case
R
.
id
.
ll_action
:
actionDialog
.
show
();
break
;
case
R
.
id
.
ll_type
:
case
R
.
id
.
ll_type
:
typeDialog
.
show
();
typeDialog
.
show
();
break
;
break
;
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/ReturnApplyActivity.java
浏览文件 @
4e50aaed
...
@@ -218,6 +218,7 @@ public class ReturnApplyActivity extends WorkToolBarActivity {
...
@@ -218,6 +218,7 @@ public class ReturnApplyActivity extends WorkToolBarActivity {
"orderItemId"
,
getIntent
().
getStringExtra
(
"orderItemId"
),
"orderItemId"
,
getIntent
().
getStringExtra
(
"orderItemId"
),
"enterStockType"
,
getIntent
().
getStringExtra
(
"enterStockType"
),
"enterStockType"
,
getIntent
().
getStringExtra
(
"enterStockType"
),
"deptId"
,
getIntent
().
getStringExtra
(
"deptId"
),
"deptId"
,
getIntent
().
getStringExtra
(
"deptId"
),
"isCrucible"
,
getIntent
().
getStringExtra
(
"isCrucible"
),
"id"
,
getIntent
().
getStringExtra
(
"orderId"
));
"id"
,
getIntent
().
getStringExtra
(
"orderId"
));
break
;
break
;
}
}
...
...
app/src/main/java/com/wd/workoffice/ui/activity/bat/order/SaleOrderDetailActivity.java
浏览文件 @
4e50aaed
...
@@ -358,6 +358,7 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity {
...
@@ -358,6 +358,7 @@ public class SaleOrderDetailActivity extends WorkToolBarActivity {
"orderId"
,
getIntent
().
getStringExtra
(
"id"
),
"orderId"
,
getIntent
().
getStringExtra
(
"id"
),
"orderItemId"
,
proList
.
get
(
position
).
getId
(),
"orderItemId"
,
proList
.
get
(
position
).
getId
(),
"productId"
,
proList
.
get
(
position
).
getProductId
()
+
""
,
"productId"
,
proList
.
get
(
position
).
getProductId
()
+
""
,
"isCrucible"
,
dataBean
.
getIsCrucible
(),
_TITLE
,
"退货/报废申请列表"
);
_TITLE
,
"退货/报废申请列表"
);
break
;
break
;
case
R
.
id
.
tv_flow
:
case
R
.
id
.
tv_flow
:
...
...
app/src/main/res/layout/activity_return_add.xml
浏览文件 @
4e50aaed
...
@@ -29,7 +29,37 @@
...
@@ -29,7 +29,37 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<LinearLayout
android:id=
"@+id/ll_action"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:paddingHorizontal=
"20mm"
android:paddingVertical=
"9mm"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"动作"
android:textSize=
"14sp"
/>
<TextView
android:id=
"@+id/tv_action"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"10mm"
android:layout_weight=
"1"
android:background=
"@null"
android:gravity=
"right"
android:padding=
"3mm"
android:textColor=
"@color/flexible_text_gray"
android:textSize=
"14sp"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/arrow_right_gray"
/>
</LinearLayout>
<LinearLayout
<LinearLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
...
@@ -116,6 +146,7 @@
...
@@ -116,6 +146,7 @@
android:paddingVertical=
"9mm"
>
android:paddingVertical=
"9mm"
>
<TextView
<TextView
android:id=
"@+id/tv_return_type_desc"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"退货类别"
android:text=
"退货类别"
...
@@ -149,6 +180,7 @@
...
@@ -149,6 +180,7 @@
android:paddingVertical=
"9mm"
>
android:paddingVertical=
"9mm"
>
<TextView
<TextView
android:id=
"@+id/tv_stock_desc"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"退货到仓库"
android:text=
"退货到仓库"
...
@@ -204,6 +236,7 @@
...
@@ -204,6 +236,7 @@
</LinearLayout>
</LinearLayout>
<TextView
<TextView
android:id=
"@+id/tv_remark_desc"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingHorizontal=
"20mm"
android:paddingHorizontal=
"20mm"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论