Example #1
0
  public void onClick$passAll() {
    if (qklwListbox.getSelectedItems() == null || qklwListbox.getSelectedItems().size() <= 0) {
      try {
        Messagebox.show("请选择要审核的期刊论文!", "提示", Messagebox.OK, Messagebox.INFORMATION);
      } catch (InterruptedException e) {
        e.printStackTrace();
      }
      return;
    }
    Iterator<Listitem> items = qklwListbox.getSelectedItems().iterator();
    List<JXKH_QKLW> meetingList = new ArrayList<JXKH_QKLW>();
    JXKH_QKLW meeting = new JXKH_QKLW();
    while (items.hasNext()) {
      meeting = (JXKH_QKLW) items.next().getValue();
      int rank = 0, index = 0;
      List<JXKH_QKLWDept> meetingDepList = meeting.getLwDep();
      for (int t = 0; t < meetingDepList.size(); t++) {
        JXKH_QKLWDept dep = meetingDepList.get(t);
        if (dep.getDepId().equals(user.getDept().getKdNumber())) {
          rank = dep.getRank();
          index = t;
        }
      }
      if ((rank == 1 || meeting.getLwState() == JXKH_MEETING.First_Dept_Pass)
          && meeting.getTempState().charAt(index) == '0') {
        meetingList.add(meeting);
      }
    }
    BatchAuditWindow win =
        (BatchAuditWindow)
            Executions.createComponents(
                "/admin/jxkh/audit/article/journal/batchAudit.zul", null, null);
    try {
      win.setMeetingList(meetingList);
      win.doModal();

    } catch (SuspendNotAllowedException e) {
      e.printStackTrace();
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
    initWindow();
  }
Example #2
0
    @Override
    public void render(Listitem item, Object data) throws Exception {

      if (data == null) return;
      final JXKH_QKLW meeting = (JXKH_QKLW) data;
      item.setValue(meeting);
      Listcell c0 = new Listcell();
      Listcell c1 = new Listcell(item.getIndex() + 1 + "");
      Listcell c2 =
          new Listcell(
              meeting.getLwName().length() <= 14
                  ? meeting.getLwName()
                  : meeting.getLwName().substring(0, 14) + "...");
      c2.setTooltiptext(meeting.getLwName());
      c2.setStyle("color:blue");
      c2.addEventListener(
          Events.ON_CLICK,
          new EventListener() {
            public void onEvent(Event event) throws Exception {
              Listitem item = (Listitem) event.getTarget().getParent();
              JXKH_QKLW meeting = (JXKH_QKLW) item.getValue();
              AddJournalWindow w =
                  (AddJournalWindow)
                      Executions.createComponents(
                          "/admin/personal/deptbusinessdata/artical/journal/addJournal.zul",
                          null,
                          null);
              try {
                w.setMeeting(meeting);
                w.setAudit("AUDIT");
                w.initWindow();
                w.doModal();
              } catch (SuspendNotAllowedException e) {
                e.printStackTrace();
              } catch (InterruptedException e) {
                e.printStackTrace();
              }
              if (isQuery) {
                onClick$query();
              } else {
                initWindow();
              }
            }
          });
      // 期刊类别
      Listcell c3 = new Listcell();
      if (meeting.getQkGrade() == null) c3.setLabel("");
      else c3.setLabel(meeting.getQkGrade().getKbName());
      // 积分年度
      Listcell c4 = new Listcell(meeting.getjxYear());
      // 该项得分
      Listcell c5 = new Listcell(meeting.getScore() == null ? "" : meeting.getScore().toString());
      // 填写人
      Listcell c6 = new Listcell();
      c6.setLabel(meeting.getLwWriter());
      // 审核状态
      Listcell c7 = new Listcell();
      c7.setTooltiptext("点击填写审核意见");
      if (meeting.getLwState() == null) {
        c7.setLabel("待审核");
        c7.setStyle("color:red");
      } else {
        switch (meeting.getLwState()) {
          case 0:
            c7.setLabel("待审核");
            c7.setStyle("color:red");
            break;
          case 1:
            c7.setLabel("部门通过");
            c7.setStyle("color:red");
            break;
          case 2:
            c7.setLabel("部门审核中");
            c7.setStyle("color:red");
            break;
          case 3:
            c7.setLabel("部门不通过");
            c7.setStyle("color:red");
            break;
          case 4:
            c7.setLabel("业务办通过");
            c7.setStyle("color:red");
            break;
          case 5:
            c7.setLabel("业务办不通过");
            c7.setStyle("color:red");
            break;
          case 6:
            c7.setLabel("归档");
            c7.setStyle("color:red");
            break;
          case 7:
            c7.setLabel("业务办暂缓通过");
            c7.setStyle("color:red");
            break;
        }
      }
      // 弹出审核意见事件
      c7.addEventListener(
          Events.ON_CLICK,
          new EventListener() {
            public void onEvent(Event event) throws Exception {
              AdviceWindow w =
                  (AdviceWindow)
                      Executions.createComponents(
                          "/admin/jxkh/audit/article/journal/advice.zul", null, null);
              try {
                w.setMeeting(meeting);
                w.initWindow();
                w.doModal();
              } catch (SuspendNotAllowedException e) {
                e.printStackTrace();
              } catch (InterruptedException e) {
                e.printStackTrace();
              }
              initWindow();
            }
          });
      item.appendChild(c0);
      item.appendChild(c1);
      item.appendChild(c2);
      item.appendChild(c3);
      item.appendChild(c4);
      item.appendChild(c5);
      item.appendChild(c6);
      item.appendChild(c7);
    }