Commit 4ad0cf15 by jason

新增供應商閃退bug

parent 679817da
...@@ -140,20 +140,24 @@ public class NewSupplierPresenter extends BasePresenter<NewSupplierContract.Mode ...@@ -140,20 +140,24 @@ public class NewSupplierPresenter extends BasePresenter<NewSupplierContract.Mode
MultiInputBean price= new MultiInputBean(InfoMultiBean.ITEM_TYPE_INPUT, "最低採購金額", false, "請輸入最低金額", new InputFilter[]{InputFilterUtils.getLengthFilter(mContext, 9)}, EditorInfo.TYPE_CLASS_NUMBER | EditorInfo.TYPE_NUMBER_FLAG_DECIMAL); MultiInputBean price= new MultiInputBean(InfoMultiBean.ITEM_TYPE_INPUT, "最低採購金額", false, "請輸入最低金額", new InputFilter[]{InputFilterUtils.getLengthFilter(mContext, 9)}, EditorInfo.TYPE_CLASS_NUMBER | EditorInfo.TYPE_NUMBER_FLAG_DECIMAL);
con.setOnFocusChangeListener((v, hasFocus) -> { con.setOnFocusChangeListener((v, hasFocus) -> {
if (supplierBean != null) {
if (hasFocus && TextUtil.isNotEmptyOrNullOrUndefined(supplierBean.getContactInformation())) { if (hasFocus && TextUtil.isNotEmptyOrNullOrUndefined(supplierBean.getContactInformation())) {
supplierBean.setContactInformation(""); supplierBean.setContactInformation("");
infoMultiBeans.get(telephoneIndex).setShowValue(""); infoMultiBeans.get(telephoneIndex).setShowValue("");
infoMultiAdapter.notifyItemChanged(telephoneIndex); infoMultiAdapter.notifyItemChanged(telephoneIndex);
} }
}
}); });
price.setOnFocusChangeListener((v, hasFocus) -> { price.setOnFocusChangeListener((v, hasFocus) -> {
if (supplierBean != null) {
String minimumAmount = infoMultiBeans.get(lowPurchaseAmount).getShowValue(); String minimumAmount = infoMultiBeans.get(lowPurchaseAmount).getShowValue();
if (hasFocus && TextUtil.isNotEmptyOrNullOrUndefined(minimumAmount)) { if (hasFocus && TextUtil.isNotEmptyOrNullOrUndefined(minimumAmount)) {
supplierBean.setMinimumAmount(0d); supplierBean.setMinimumAmount(0d);
infoMultiBeans.get(lowPurchaseAmount).setShowValue(""); infoMultiBeans.get(lowPurchaseAmount).setShowValue("");
infoMultiAdapter.notifyItemChanged(lowPurchaseAmount); infoMultiAdapter.notifyItemChanged(lowPurchaseAmount);
} }
}
}); });
infoMultiBeans.add(con); infoMultiBeans.add(con);
infoMultiBeans.add(price); infoMultiBeans.add(price);
......
...@@ -55,7 +55,7 @@ public class InputProvider<T extends InfoMultiBean> extends MyBaseItemProvider<T ...@@ -55,7 +55,7 @@ public class InputProvider<T extends InfoMultiBean> extends MyBaseItemProvider<T
baseViewHolder.setVisible(R.id.tv_expect,true); baseViewHolder.setVisible(R.id.tv_expect,true);
baseViewHolder.setText(R.id.tv_expect,infoMultiBean.getHint()); baseViewHolder.setText(R.id.tv_expect,infoMultiBean.getHint());
}else { }else {
baseViewHolder.setGone(R.id.tv_expect,false); baseViewHolder.setGone(R.id.tv_expect,true);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment