|
@@ -11,6 +11,7 @@ import android.os.Message;
|
|
|
import android.text.Editable;
|
|
|
import android.text.TextUtils;
|
|
|
import android.text.TextWatcher;
|
|
|
+import android.util.Log;
|
|
|
import android.view.View;
|
|
|
import android.widget.CheckBox;
|
|
|
import android.widget.EditText;
|
|
@@ -327,9 +328,14 @@ public class MeterInputActivity extends TakePhotoActivity implements TextWatcher
|
|
|
}
|
|
|
|
|
|
if (!TextUtils.isEmpty(cbyhEntity.getIsEstimate())) {
|
|
|
- cbIsEstimate.setChecked(true);
|
|
|
+ boolean checked = cbyhEntity.getIsEstimate() == "1";
|
|
|
+ if (checked)
|
|
|
+ llEstimate.setVisibility(View.VISIBLE);
|
|
|
+ else
|
|
|
+ llEstimate.setVisibility(View.GONE);
|
|
|
+ cbIsEstimate.setChecked(checked);
|
|
|
+
|
|
|
|
|
|
- llEstimate.setVisibility(View.VISIBLE);
|
|
|
} else {
|
|
|
cbIsEstimate.setChecked(false);
|
|
|
llEstimate.setVisibility(View.GONE);
|
|
@@ -586,27 +592,27 @@ public class MeterInputActivity extends TakePhotoActivity implements TextWatcher
|
|
|
|
|
|
|
|
|
|
|
|
- tvCurrentWaterNum.addTextChangedListener(new TextWatcher() {
|
|
|
- @Override
|
|
|
- public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onTextChanged(CharSequence s, int start, int before, int count) {
|
|
|
-
|
|
|
- mCurrentNum.setText(s.toString() + "");
|
|
|
- mCurrentNum.setTextColor(getResources().getColor(R.color.color_2194FF));
|
|
|
- tv_slss.setText("方");
|
|
|
- tvMainException.setText("");
|
|
|
- tv_slss.setTextColor(getResources().getColor(R.color.color_2194FF));
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void afterTextChanged(Editable s) {
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
@@ -676,18 +682,18 @@ public class MeterInputActivity extends TakePhotoActivity implements TextWatcher
|
|
|
if (isOverTime()) {
|
|
|
if (!isUpload) {
|
|
|
|
|
|
- if (isSign) {
|
|
|
- if (checkData()) {
|
|
|
- if (cbyhEntity.getIsupload() != 1) {
|
|
|
- cbyhEntityDbUtils.update(cbyhEntity);
|
|
|
- ToastUtil.showToast("保存成功");
|
|
|
- } else {
|
|
|
- ToastUtil.showToast("当前数据已上传,禁止修改");
|
|
|
- }
|
|
|
+
|
|
|
+ if (checkData()) {
|
|
|
+ if (cbyhEntity.getIsupload() != 1) {
|
|
|
+ cbyhEntityDbUtils.update(cbyhEntity);
|
|
|
+ ToastUtil.showToast("保存成功");
|
|
|
+ } else {
|
|
|
+ ToastUtil.showToast("当前数据已上传,禁止修改");
|
|
|
}
|
|
|
- } else {
|
|
|
- forwardToUiSign();
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1057,7 +1063,8 @@ public class MeterInputActivity extends TakePhotoActivity implements TextWatcher
|
|
|
mCurrentNum.setTextColor(getResources().getColor(R.color.qmui_config_color_red));
|
|
|
tv_slss.setText("方(异常)");
|
|
|
tv_slss.setTextColor(getResources().getColor(R.color.qmui_config_color_red));
|
|
|
- tvMainException.setText(sbException.get("exceptionStr").toString());
|
|
|
+ String exceptionStr = sbException.get("exceptionStr").toString();
|
|
|
+ tvMainException.setText(exceptionStr + "");
|
|
|
|
|
|
} else {
|
|
|
mCurrentNum.setTextColor(getResources().getColor(R.color.color_2194FF));
|
|
@@ -1075,6 +1082,7 @@ public class MeterInputActivity extends TakePhotoActivity implements TextWatcher
|
|
|
}
|
|
|
}
|
|
|
} catch (NumberFormatException ignored) {
|
|
|
+ Log.e("TAG", "afterTextChanged: ------------------" + ignored);
|
|
|
}
|
|
|
}
|
|
|
}
|