提交 cc08d32d authored 作者: lgd's avatar lgd

1.限制三位小数

2.//TODO 坩埚下单,mes其他页面,mes用户反馈空也展示,编辑任务担当无法修改
上级 1f774d92
...@@ -199,7 +199,7 @@ public class DeviceBuyConfirmActivity extends WorkToolBarActivity { ...@@ -199,7 +199,7 @@ public class DeviceBuyConfirmActivity extends WorkToolBarActivity {
tvNum.setText("共 ".concat(proList.size() + "").concat(" 件")); tvNum.setText("共 ".concat(proList.size() + "").concat(" 件"));
String allPrice = ""; String allPrice = "";
for (DeviceBean.RecordsBean recordsBean : proList) { for (DeviceBean.RecordsBean recordsBean : proList) {
allPrice = MathUtils.add(allPrice, MathUtils.multiply(recordsBean.getCarNum() , recordsBean.getCarPrice() , 3), 3); allPrice = MathUtils.add(allPrice, MathUtils.multiply(recordsBean.getCarNum() ,MathUtils.converData( recordsBean.getCarPrice(),3) , 3), 3);
} }
tvPrice.setText("总计: ¥ ".concat(allPrice)); tvPrice.setText("总计: ¥ ".concat(allPrice));
} }
......
...@@ -113,8 +113,8 @@ public class WorkFinancialLogisticsSubmitActivity extends WorkToolBarActivity { ...@@ -113,8 +113,8 @@ public class WorkFinancialLogisticsSubmitActivity extends WorkToolBarActivity {
String totalWeight = ""; String totalWeight = "";
String applyAmount = ""; String applyAmount = "";
for (LogisticDetailBean.RecordsBean recordsBean : dataList) { for (LogisticDetailBean.RecordsBean recordsBean : dataList) {
totalWeight = MathUtils.add(totalWeight, String.valueOf(recordsBean.getWeight()), 3); totalWeight = MathUtils.add(totalWeight, MathUtils.converData(recordsBean.getWeight(),3), 3);
applyAmount = MathUtils.add(applyAmount, String.valueOf(recordsBean.getFareMoney()), 3); applyAmount = MathUtils.add(applyAmount, MathUtils.converData(recordsBean.getFareMoney(),3), 3);
} }
param.put("totalWeight", totalWeight); param.put("totalWeight", totalWeight);
param.put("applyAmount", applyAmount); param.put("applyAmount", applyAmount);
......
...@@ -117,7 +117,8 @@ public class WorkFinancialReceiveTicketSubmitActivity extends WorkToolBarActivit ...@@ -117,7 +117,8 @@ public class WorkFinancialReceiveTicketSubmitActivity extends WorkToolBarActivit
private void changeNumAndPrice() { private void changeNumAndPrice() {
String allPrice = ""; String allPrice = "";
for (TicketAddBean.RecordsBean recordsBean : dataList) { for (TicketAddBean.RecordsBean recordsBean : dataList) {
allPrice = MathUtils.add(allPrice, MathUtils.multiply(recordsBean.getCarNum() + "", recordsBean.getCarPrice(), 2), 2); allPrice = MathUtils.add(allPrice, MathUtils.multiply(recordsBean.getCarNum(),
recordsBean.getCarPrice(), 3), 3);
} }
tvPrice.setText(" ¥ ".concat(allPrice)); tvPrice.setText(" ¥ ".concat(allPrice));
} }
......
...@@ -121,7 +121,7 @@ public class WorkFinancialTicketSubmitActivity extends WorkToolBarActivity { ...@@ -121,7 +121,7 @@ public class WorkFinancialTicketSubmitActivity extends WorkToolBarActivity {
private void changeNumAndPrice() { private void changeNumAndPrice() {
String allPrice = ""; String allPrice = "";
for (TicketAddBean.RecordsBean recordsBean : dataList) { for (TicketAddBean.RecordsBean recordsBean : dataList) {
allPrice = MathUtils.add(allPrice, MathUtils.multiply(recordsBean.getCarNum() + "", recordsBean.getCarPrice(), 2), 2); allPrice = MathUtils.add(allPrice, MathUtils.multiply(recordsBean.getCarNum(), recordsBean.getCarPrice(), 3), 3);
} }
tvPrice.setText(" ¥ ".concat(allPrice)); tvPrice.setText(" ¥ ".concat(allPrice));
} }
......
...@@ -44,7 +44,7 @@ public class DeviceCarAdapter extends BaseQuickAdapter<DeviceBean.RecordsBean, B ...@@ -44,7 +44,7 @@ public class DeviceCarAdapter extends BaseQuickAdapter<DeviceBean.RecordsBean, B
@Override @Override
public void OnNumberChanged(String vs) { public void OnNumberChanged(String vs) {
item.setCarNum(vs); item.setCarNum(vs);
helper.setText(R.id.tv_all_price, MathUtils.multiply(vs + "", item.getCarPrice(), 3)); helper.setText(R.id.tv_all_price, MathUtils.multiply(vs , item.getCarPrice(), 3));
EventBus.getDefault().post(new ModifyCarEvent(JSON.toJSONString(getData()))); EventBus.getDefault().post(new ModifyCarEvent(JSON.toJSONString(getData())));
} }
...@@ -70,7 +70,7 @@ public class DeviceCarAdapter extends BaseQuickAdapter<DeviceBean.RecordsBean, B ...@@ -70,7 +70,7 @@ public class DeviceCarAdapter extends BaseQuickAdapter<DeviceBean.RecordsBean, B
return; return;
} }
item.setCarPrice(s.toString()); item.setCarPrice(s.toString());
helper.setText(R.id.tv_all_price, MathUtils.multiply(item.getCarNum() + "", item.getCarPrice(), 2)); helper.setText(R.id.tv_all_price, MathUtils.multiply(item.getCarNum() , item.getCarPrice(), 3));
EventBus.getDefault().post(new ModifyCarEvent(JSON.toJSONString(getData()))); EventBus.getDefault().post(new ModifyCarEvent(JSON.toJSONString(getData())));
} }
}); });
......
...@@ -37,8 +37,8 @@ public class DeviceConfirmAdapter extends BaseQuickAdapter<DeviceBean.RecordsBea ...@@ -37,8 +37,8 @@ public class DeviceConfirmAdapter extends BaseQuickAdapter<DeviceBean.RecordsBea
helper.setText(R.id.tv_name, item.getTitle()); helper.setText(R.id.tv_name, item.getTitle());
helper.setText(R.id.tv_spec, item.getSpecification()); helper.setText(R.id.tv_spec, item.getSpecification());
helper.setText(R.id.tv_price, item.getCarPrice()); helper.setText(R.id.tv_price, item.getCarPrice());
helper.setText(R.id.tv_num, item.getCarNum() + ""); helper.setText(R.id.tv_num, item.getCarNum());
helper.setText(R.id.tv_all_price, MathUtils.multiply(item.getCarNum() + "", item.getCarPrice() + "", 2)); helper.setText(R.id.tv_all_price, MathUtils.multiply(item.getCarNum(), item.getCarPrice() , 3));
} }
} }
...@@ -78,7 +78,7 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B ...@@ -78,7 +78,7 @@ public class StoreCarAdapter extends BaseQuickAdapter<ProductBean.RecordsBean, B
@Override @Override
public void OnNumberChanged(String vs) { public void OnNumberChanged(String vs) {
item.setCarNum(vs); item.setCarNum(vs);
helper.setText(R.id.tv_all_price, MathUtils.multiply(vs, String.valueOf(item.getInternalPrice()), 3)); helper.setText(R.id.tv_all_price, MathUtils.multiply(vs, MathUtils.converData(item.getInternalPrice(),3), 3));
EventBus.getDefault().post(new ModifyCarEvent(JSON.toJSONString(getData()))); EventBus.getDefault().post(new ModifyCarEvent(JSON.toJSONString(getData())));
} }
}); });
......
...@@ -34,9 +34,9 @@ public class WorkAddTicketOrderAdapter extends BaseQuickAdapter<TicketAddBean.Re ...@@ -34,9 +34,9 @@ public class WorkAddTicketOrderAdapter extends BaseQuickAdapter<TicketAddBean.Re
helper.setText(R.id.tv_order, item.getOrderId()); helper.setText(R.id.tv_order, item.getOrderId());
helper.setText(R.id.tv_spec, item.getProductSpec()); helper.setText(R.id.tv_spec, item.getProductSpec());
helper.setText(R.id.tv_unit, item.getProductUnit()); helper.setText(R.id.tv_unit, item.getProductUnit());
helper.setText(R.id.tv_apply_num, item.getProductCount() + ""); helper.setText(R.id.tv_apply_num, MathUtils.converData(item.getProductCount(),3) );
helper.setText(R.id.tv_price, item.getCarPrice()); helper.setText(R.id.tv_price, item.getCarPrice());
helper.setText(R.id.tv_num, item.getCarNum() + ""); helper.setText(R.id.tv_num, item.getCarNum());
if (type == 1) { if (type == 1) {
helper.setVisible(R.id.iv_cart, false); helper.setVisible(R.id.iv_cart, false);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论