提交 85487daa authored 作者: lgd's avatar lgd

1.修改数量控件

2.//TODO 坩埚下单,mes其他页面,mes用户反馈空也展示,编辑任务担当无法修改
上级 29a75968
...@@ -50,8 +50,15 @@ public class AddAndReduceView extends LinearLayout implements View.OnClickListen ...@@ -50,8 +50,15 @@ public class AddAndReduceView extends LinearLayout implements View.OnClickListen
public void afterTextChanged(Editable s) { public void afterTextChanged(Editable s) {
try { try {
Double.valueOf(s.toString()); Double.valueOf(s.toString());
if (new BigDecimal(Double.valueOf(s.toString())).compareTo(new BigDecimal(maxNum)) == -1) {
num = MathUtils.converData(s.toString(), 3);
if (mOnNumberChangedListener != null)
mOnNumberChangedListener.OnNumberChanged(num);
return;
}
if (new BigDecimal(Double.valueOf(s.toString())).compareTo(new BigDecimal(maxNum)) == 1) { if (new BigDecimal(Double.valueOf(s.toString())).compareTo(new BigDecimal(maxNum)) == 1) {
ToastUtil.showShort("目前已选择最大数量"); ToastUtil.showShort("目前已选择最大数量");
num = MathUtils.converData(maxNum, 3);
tvNum.setText(MathUtils.converData(maxNum, 3)); tvNum.setText(MathUtils.converData(maxNum, 3));
return; return;
} }
...@@ -68,9 +75,6 @@ public class AddAndReduceView extends LinearLayout implements View.OnClickListen ...@@ -68,9 +75,6 @@ public class AddAndReduceView extends LinearLayout implements View.OnClickListen
ToastUtil.showShort("目前已选择最大数量"); ToastUtil.showShort("目前已选择最大数量");
return; return;
} }
num = MathUtils.converData(s.toString(), 3);
if (mOnNumberChangedListener != null)
mOnNumberChangedListener.OnNumberChanged(num);
} catch (Exception e) { } catch (Exception e) {
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论