提交 731cbfc7 authored 作者: lgd's avatar lgd

1.修改退件新增bug

上级 4e339d02
......@@ -112,9 +112,9 @@ public class ReturnAddActivity extends WorkToolBarActivity {
enterStockType = getIntent().getStringExtra("enterStockType");
isCrucible = getIntent().getStringExtra("isCrucible"); //坩埚销售订单 1 坩埚销售订单
tvAction.setText("退货");
if (TextUtils.equals(orderType, OrderType.SALE.getCode())|| TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
if (TextUtils.equals(orderType, OrderType.SALE.getCode()) || TextUtils.equals(orderType, OrderType.OUT_BUY.getCode())) {
llAction.setVisibility(View.VISIBLE);
} else {
} else {
llAction.setVisibility(View.GONE);
}
// if (TextUtils.equals(orderType, OrderType.SALE.getCode())) {
......@@ -362,7 +362,11 @@ public class ReturnAddActivity extends WorkToolBarActivity {
for (OrderDetail.OrderItemsBean orderItem : dataBean.getOrderItems()) {
if (TextUtils.equals(orderItem.getId(), getIntent().getStringExtra("orderItemId"))) {//匹配订单
if (chooseAction == 1) {//退货
if (!TextUtils.equals(orderType, OrderType.SUPPLIER.getCode())) {// 0805新增 额外判断供应订单 不修改旧逻辑
if (TextUtils.equals(orderType, OrderType.SUPPLIER.getCode())) {// 0805新增 额外判断供应订单 不修改旧逻辑
tvMaxNum.setText(String.format("*退货最大数量(%s)", MathUtils.converData(orderItem.getCanReturnProductSum(), 3)));
} else if (TextUtils.equals(orderType, OrderType.SALE.getCode())) {//销售
tvMaxNum.setText(String.format("*退货最大数量(%s)", MathUtils.converData(orderItem.getCanUseProductSum(), 3)));
} else {//外采购
switch (chooseType) {
case 1:
tvMaxNum.setText(String.format("*退货最大数量(%s)", MathUtils.converData(orderItem.getCanOutReturnSum(), 3)));
......@@ -375,8 +379,6 @@ public class ReturnAddActivity extends WorkToolBarActivity {
break;
}
} else {
tvMaxNum.setText(String.format("*退货最大数量(%s)", MathUtils.converData(orderItem.getCanReturnProductSum(), 3)));
}
} else {//报废
switch (chooseType) {
......@@ -461,7 +463,17 @@ public class ReturnAddActivity extends WorkToolBarActivity {
for (OrderDetail.OrderItemsBean orderItem : orderItems) {
if (TextUtils.equals(orderItem.getId(), getIntent().getStringExtra("orderItemId"))) {
if (chooseAction == 1) {//退货
if (!TextUtils.equals(orderType, OrderType.SUPPLIER.getCode())) {// 0805新增 额外判断供应订单 不修改旧逻辑
if (TextUtils.equals(orderType, OrderType.SUPPLIER.getCode())) {// 0805新增 额外判断供应订单 不修改旧逻辑
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 if (TextUtils.equals(orderType, OrderType.SALE.getCode())) {//销售
if (BigDecimal.valueOf(Double.parseDouble(num)).compareTo(BigDecimal.valueOf(orderItem.getCanUseProductSum())) == 1) {
toast(String.format("可申请退货数量最大为%s", MathUtils.converData(orderItem.getCanUseProductSum(), 3)));
return;
}
} else {//外采购
switch (chooseType) {
case 1:
if (BigDecimal.valueOf(Double.parseDouble(num)).compareTo(new BigDecimal(orderItem.getCanOutReturnSum())) == 1) {
......@@ -482,11 +494,6 @@ public class ReturnAddActivity extends WorkToolBarActivity {
}
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) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论