فهرست منبع

工作汇报列表bug

raomeng 8 سال پیش
والد
کامیت
e6ad5eb5f7

+ 1 - 1
app_modular/applogin/src/main/java/com/modular/login/activity/AdminRegisterActivity.java

@@ -425,7 +425,7 @@ public class AdminRegisterActivity extends BaseActivity implements View.OnClickL
                     progressDialog.show();
 
                     String url = "https://account.ubtob.com/sso/mobile/userspace/setAdmin";
-//                String url = "http://192.168.253.66:8082/sso/mobile/userspace/setAdmin";
+//                    String url = "http://192.168.253.66:8082/sso/mobile/userspace/setAdmin";
 
                     Map<String, Object> params = new HashMap<>();
                     params.put("adminName", mAdminNameEt.getText().toString());

+ 1 - 1
app_modular/applogin/src/main/res/layout/activity_enterprise_register.xml

@@ -338,7 +338,7 @@
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     android:layout_marginLeft="10dp"
-                    android:text="上传营业执照时,请上面拍照,并保证件照清晰可见,方便我们审核,谢谢!"
+                    android:text="上传营业执照时,请拍照上传,并保证件照清晰可见,方便我们审核,谢谢!"
                     android:textColor="#999999"
                     android:textSize="12sp" />
             </LinearLayout>

+ 26 - 18
app_modular/appworks/src/main/java/com/uas/appworks/OA/erp/activity/WorkDailyShowActivity.java

@@ -324,7 +324,8 @@ public class WorkDailyShowActivity extends BaseActivity {
                     int filterPosition = (int) msg.arg1;
                     int realPosition = (int) msg.arg2;
                     mWorkReportList.remove(realPosition);
-                    if (mWorkReportAdapter.filterWorkReportList != null) {
+                    if (mWorkReportAdapter.filterWorkReportList != null
+                            && mWorkReportAdapter.filterWorkReportList.size() > filterPosition) {
                         mWorkReportAdapter.filterWorkReportList.remove(filterPosition);
                     }
                     mWorkReportAdapter.notifyDataSetChanged();
@@ -508,22 +509,10 @@ public class WorkDailyShowActivity extends BaseActivity {
             } else {
                 viewHolder = (ViewHolder) convertView.getTag();
             }
-            if (mReportType == Constants.WORK_REPORT_DAY) {
-                String dailyTimeStr = getDailyTimeStr(workReportList.get(position).getDate(), workReportList.get(position).getWeekDays());
-                viewHolder.WorkDailyDate
-                        .setText(dailyTimeStr
-                                == null ? workReportList.get(position).getDate() : dailyTimeStr);
-            } else if (mReportType == Constants.WORK_REPORT_WEEK) {
-                String weeklyTimeStr = getWeeklyTimeStr(workReportList.get(position).getStartTime(), workReportList.get(position).getEndTime(), workReportList.get(position).getSerial());
-                viewHolder.WorkDailyDate
-                        .setText(weeklyTimeStr == null ? ((TextUtils.isEmpty(workReportList.get(position).getSerial()) ? "" : "第" + workReportList.get(position).getSerial() + "周  ")
-                                + workReportList.get(position).getDate()) : weeklyTimeStr);
-            } else if (mReportType == Constants.WORK_REPORT_MONTH) {
-                String monthlyTimeStr = getMonthlyTimeStr(workReportList.get(position).getDate());
-                viewHolder.WorkDailyDate
-                        .setText(monthlyTimeStr == null ? ((TextUtils.isEmpty(workReportList.get(position).getSerial()) ? "" : workReportList.get(position).getSerial() + "月  ")
-                                + workReportList.get(position).getDate()) : monthlyTimeStr);
-            }
+
+            String dateText = getDateText(workReportList, position);
+            viewHolder.WorkDailyDate.setText(dateText);
+
             //为日报列表界面赋值(状态,总结),注意已审批和待审批的字体颜色
             if (!TextUtils.isEmpty(workReportList.get(position).getReportStatus()) &&
                     workReportList.get(position).getReportStatus().equals("已审核")) {
@@ -591,6 +580,23 @@ public class WorkDailyShowActivity extends BaseActivity {
             ViewUtil.httpSendRequest(mContext, url, params, handler, headers, DELETE_DOC_REQUEST_SUCCESSFULLY, null, null, "get");
         }
 
+        private String getDateText(List<WorkReportBean> workReportList, int position) {
+            String dateText = null;
+            if (mReportType == Constants.WORK_REPORT_DAY) {
+                dateText = getDailyTimeStr(workReportList.get(position).getDate(), workReportList.get(position).getWeekDays());
+                dateText = (dateText == null ? workReportList.get(position).getDate() : dateText);
+            } else if (mReportType == Constants.WORK_REPORT_WEEK) {
+                dateText = getWeeklyTimeStr(workReportList.get(position).getStartTime(), workReportList.get(position).getEndTime(), workReportList.get(position).getSerial());
+                dateText = (dateText == null ? ((TextUtils.isEmpty(workReportList.get(position).getSerial()) ? "" : "第" + workReportList.get(position).getSerial() + "周  ")
+                        + workReportList.get(position).getDate()) : dateText);
+            } else if (mReportType == Constants.WORK_REPORT_MONTH) {
+                dateText = getMonthlyTimeStr(workReportList.get(position).getStartTime());
+                dateText = (dateText == null ? ((TextUtils.isEmpty(workReportList.get(position).getSerial()) ? "" : workReportList.get(position).getSerial() + "月  ")
+                        + workReportList.get(position).getDate()) : dateText);
+            }
+            return dateText;
+        }
+
         private String getDailyTimeStr(String dailyDate, String dailyWeek) {
             try {
                 String[] daily = dailyDate.split("-");
@@ -685,10 +691,12 @@ public class WorkDailyShowActivity extends BaseActivity {
                     if (constraint == null || constraint.length() == 0) {
                         filterResults.values = mWorkReportList;
                         filterResults.count = mWorkReportList.size();
+                        filterWorkReportList = null;
                     } else {
                         filterWorkReportList = new ArrayList<>();
                         for (int i = 0; i < mWorkReportList.size(); i++) {
-                            String date = mWorkReportList.get(i).getDate();
+//                            String date = mWorkReportList.get(i).getDate();
+                            String date = getDateText(mWorkReportList, i);
                             String comment = mWorkReportList.get(i).getComment();
                             String approvalStatus = "";
                             if (!TextUtils.isEmpty(mWorkReportList.get(i).getReportStatus()) &&