|
|
@@ -128,12 +128,12 @@ public class DataFormDetailActivity extends BaseActivity implements View.OnClick
|
|
|
|
|
|
private int va_id;//订单ID
|
|
|
private int formid;//主表ID
|
|
|
- private final Comparator<Object> mComparator=new Comparator<Object>() {
|
|
|
+ private final Comparator<Object> mComparator = new Comparator<Object>() {
|
|
|
@Override
|
|
|
public int compare(Object t0, Object t1) {
|
|
|
- float detno0=JSONUtil.getFloat((JSONObject) t0,"fd_detno");
|
|
|
- float detno1=JSONUtil.getFloat((JSONObject) t1,"fd_detno");
|
|
|
- return detno0>detno1?1:-1;
|
|
|
+ float detno0 = JSONUtil.getFloat((JSONObject) t0, "fd_detno");
|
|
|
+ float detno1 = JSONUtil.getFloat((JSONObject) t1, "fd_detno");
|
|
|
+ return detno0 > detno1 ? 1 : -1;
|
|
|
}
|
|
|
};
|
|
|
private Handler mHandler = new Handler() {
|
|
|
@@ -154,7 +154,7 @@ public class DataFormDetailActivity extends BaseActivity implements View.OnClick
|
|
|
if (!ListUtils.isEmpty(mDatasNet)) mDatasNet.clear();
|
|
|
if (StringUtil.isEmpty(result)) return;
|
|
|
JSONArray forms = JSON.parseObject(result).getJSONObject("data").getJSONArray("formdetail");
|
|
|
- Collections.sort(forms,mComparator);
|
|
|
+ Collections.sort(forms, mComparator);
|
|
|
grids = JSON.parseObject(result).getJSONObject("data").getJSONArray("gridetail");
|
|
|
try {
|
|
|
JSONObject config = JSON.parseObject(result).getJSONObject("config");
|
|
|
@@ -1097,6 +1097,11 @@ public class DataFormDetailActivity extends BaseActivity implements View.OnClick
|
|
|
|
|
|
@Override
|
|
|
public View getView(final int position, View convertView, ViewGroup parent) {
|
|
|
+ View currentFocus = ((Activity) mContext).getCurrentFocus();
|
|
|
+ if (currentFocus != null) {
|
|
|
+ currentFocus.clearFocus();
|
|
|
+ }
|
|
|
+
|
|
|
final int itemViewType = getItemViewType(position);
|
|
|
switch (itemViewType) {
|
|
|
case TYPE_CATEGORY_ITEM:
|
|
|
@@ -1157,7 +1162,7 @@ public class DataFormDetailActivity extends BaseActivity implements View.OnClick
|
|
|
// model= (ViewModel) convertView.getTag();
|
|
|
}
|
|
|
final Data data = (Data) getItem(position);
|
|
|
-
|
|
|
+
|
|
|
HashMap<String, Object> results = isLastItem(position);
|
|
|
final Integer categoryIndex = (Integer) results.get("categoryIndex");
|
|
|
model.text.setText(data.getName());
|
|
|
@@ -1192,7 +1197,7 @@ public class DataFormDetailActivity extends BaseActivity implements View.OnClick
|
|
|
ToastUtil.showToast(ct, R.string.networks_out);
|
|
|
return;
|
|
|
}
|
|
|
- if (data.getType().equals("D") || data.getType().equals("DT") ) {
|
|
|
+ if (data.getType().equals("D") || data.getType().equals("DT")) {
|
|
|
boolean hasMenu = false;
|
|
|
if ("Ask4Leave".equals(caller)) hasMenu = true;
|
|
|
Log.d("date:", startDate_v + "," + endDate_v);
|
|
|
@@ -1595,10 +1600,10 @@ public class DataFormDetailActivity extends BaseActivity implements View.OnClick
|
|
|
sa_custaddress = i + 1;
|
|
|
}
|
|
|
}
|
|
|
- if (sa_custname>0){
|
|
|
+ if (sa_custname > 0) {
|
|
|
mAdapter.getmListData().get(currentGroupId).getDatas().get(sa_custname - 1).setValue(cu_name);
|
|
|
}
|
|
|
- if (sa_custaddress>0){
|
|
|
+ if (sa_custaddress > 0) {
|
|
|
mAdapter.getmListData().get(currentGroupId).getDatas().get(sa_custaddress - 1).setValue(cu_address);
|
|
|
}
|
|
|
mAdapter.notifyDataSetChanged();
|