Forráskód Böngészése

Merge remote-tracking branch 'origin/master'

user5 4 éve
szülő
commit
06d98518dd

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1971 - 0
src/main/java/com/jeeplus/modules/workinvoice/service/WorkInvoiceAllService.java


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1201 - 0
src/main/java/com/jeeplus/modules/workinvoice/web/WorkInvoiceAllController.java


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1409 - 0
src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementAllService.java


+ 811 - 0
src/main/java/com/jeeplus/modules/workreimbursement/web/WorkReimbursementAllController.java

@@ -0,0 +1,811 @@
+/**
+ * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
+ */
+package com.jeeplus.modules.workreimbursement.web;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.jeeplus.common.config.Global;
+import com.jeeplus.common.mapper.JsonMapper;
+import com.jeeplus.common.persistence.Page;
+import com.jeeplus.common.utils.DateUtils;
+import com.jeeplus.common.utils.MyBeanUtils;
+import com.jeeplus.common.utils.StringUtils;
+import com.jeeplus.common.utils.excel.ExportExcel;
+import com.jeeplus.common.utils.excel.ImportExcel;
+import com.jeeplus.common.web.BaseController;
+import com.jeeplus.modules.act.entity.Act;
+import com.jeeplus.modules.act.service.ActTaskService;
+import com.jeeplus.modules.act.utils.ActUtils;
+import com.jeeplus.modules.projectrecord.dao.WorkProjectUserDao;
+import com.jeeplus.modules.projectrecord.entity.ProjectRecords;
+import com.jeeplus.modules.projectrecord.enums.ProjectStatusEnum;
+import com.jeeplus.modules.projectrecord.service.ProjectRecordsService;
+import com.jeeplus.modules.sys.entity.Office;
+import com.jeeplus.modules.sys.entity.Role;
+import com.jeeplus.modules.sys.entity.User;
+import com.jeeplus.modules.sys.service.OfficeService;
+import com.jeeplus.modules.sys.utils.UserUtils;
+import com.jeeplus.modules.sysmtree.entity.SysMtree;
+import com.jeeplus.modules.sysmtree.service.SysMtreeService;
+import com.jeeplus.modules.workactivity.entity.Activity;
+import com.jeeplus.modules.workactivity.service.ActivityService;
+import com.jeeplus.modules.workbidproject.service.WorkBidProjectService;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientAttachment;
+import com.jeeplus.modules.workclientinfo.entity.WorkClientInfo;
+import com.jeeplus.modules.workclientinfo.service.WorkClientInfoService;
+import com.jeeplus.modules.workcontractinfo.service.WorkContractInfoService;
+import com.jeeplus.modules.workfullmanage.service.WorkFullManageService;
+import com.jeeplus.modules.workreimbursement.entity.WorkReimbursement;
+import com.jeeplus.modules.workreimbursement.entity.WorkReimbursementTypeInfo;
+import com.jeeplus.modules.workreimbursement.service.WorkReimbursementAllService;
+import com.jeeplus.modules.workreimbursement.service.WorkReimbursementService;
+import com.jeeplus.modules.workreimbursement.service.WorkReimbursementTypeService;
+import com.jeeplus.modules.workreimbursement.utils.VarStr;
+import com.jeeplus.modules.workreimbursementback.entity.WorkReimbursementBack;
+import com.jeeplus.modules.workreimbursementback.service.WorkReimbursementBackService;
+import com.jeeplus.modules.worksupplier.entity.WorkSupplier;
+import com.jeeplus.modules.worksupplier.service.WorkSupplierService;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.TaskService;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.activiti.engine.task.Task;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.commons.CommonsMultipartFile;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.validation.ConstraintViolationException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 财务报销Controller
+ * @author 孟祥越
+ * @version 2017-05-02
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/workreimbursement/workReimbursementAll")
+public class WorkReimbursementAllController extends BaseController {
+
+	@Autowired
+	private WorkReimbursementAllService workReimbursementService;
+	@Autowired
+	private WorkSupplierService workSupplierService;
+	@Autowired
+	private WorkContractInfoService workContractInfoService;
+
+	@Autowired
+	protected RuntimeService runtimeService;
+
+	@Autowired
+	protected TaskService taskService;
+
+	@Autowired
+	private ActTaskService actTaskService;
+
+	@Autowired
+	private HttpServletRequest request;
+
+	@Autowired
+	private WorkClientInfoService workClientInfoService;
+	@Autowired
+	private WorkFullManageService workFullManageService;
+
+	@Autowired
+	private WorkBidProjectService workBidProjectService;
+
+	@Autowired
+	private SysMtreeService sysMtreeService;
+	@Autowired
+	private ActivityService activityService;
+	@Autowired
+	private ProjectRecordsService projectRecordsService;
+	@Autowired
+	private OfficeService officeService;
+	@Autowired
+	private WorkProjectUserDao workProjectUserDao;
+	@Autowired
+	private WorkReimbursementBackService workReimbursementBackService;
+	@Autowired
+	private WorkReimbursementTypeService workReimbursementTypeService;
+
+	@ModelAttribute
+	public WorkReimbursement get(@RequestParam(required=false) String id) {
+
+		WorkReimbursement entity = null;
+		if (StringUtils.isNotBlank(id)){
+			entity = workReimbursementService.get(id);
+		}
+		if (entity == null){
+			entity = new WorkReimbursement();
+		}
+		return entity;
+	}
+
+	/**
+	 * 报销单列表页面
+	 */
+	@RequiresPermissions("workreimbursement:workReimbursementAll:list")
+	@RequestMapping(value = {"list", ""})
+	public String list(WorkReimbursement workReimbursement, HttpServletRequest request, HttpServletResponse response, Model model) {
+		//workReimbursement.setOfficeId(UserUtils.getSelectOffice().getId());
+		Page<WorkReimbursement> page = workReimbursementService.findPage(new Page<WorkReimbursement>(request, response), workReimbursement);
+		model.addAttribute("page", page);
+		return "modules/workreimbursement/workReimbursementAllList";
+	}
+
+
+
+	/**
+	 * 获取报销是否存在判定
+	 * @param id
+	 * @return
+	 */
+	@RequestMapping(value = "getExist")
+	@ResponseBody
+	public Map<String,String> getExist(String id){
+		Map map = new HashMap();
+		WorkReimbursement workReimbursement = null;
+		if (StringUtils.isNotBlank(id)){
+			workReimbursement = workReimbursementService.get(id);
+		}
+		if(null != workReimbursement){
+			map.put("success",true);
+		}else{
+			map.put("success",false);
+		}
+		return map;
+	}
+
+	/**
+	 * 查看,增加,编辑报销单表单页面
+	 */
+//	@RequiresPermissions(value={"workreimbursement:workReimbursement:view","workreimbursement:workReimbursement:add","workreimbursement:workReimbursement:edit"},logical=Logical.OR)
+	@RequiresPermissions(value={"workreimbursement:workReimbursementAll:add","workreimbursement:workReimbursementAll:edit"})
+	@RequestMapping(value = "form")
+	public String form(WorkReimbursement workReimbursement,Model model) {
+		String view = "workReimbursementFormAdd";
+		Office office = UserUtils.getSelectOffice();
+		String tabId = request.getParameter("tabId");
+		//判断报销类型状态并添加报销类型信息数据
+		if(StringUtils.isNotBlank(workReimbursement.getType())){
+			WorkReimbursementTypeInfo workReimbursementTypeInfo = workReimbursementTypeService.get(workReimbursement.getType());
+			workReimbursement.setWorkReimbursementTypeInfo(workReimbursementTypeInfo);
+			if(StringUtils.isNotBlank(workReimbursementTypeInfo.getStandardDetail())){
+				workReimbursement.setTypeName(workReimbursementTypeInfo.getStandardDetail());
+			}
+		}
+		if("1".equals(tabId)){
+			view = "workReimbursementFormDetail";
+		}else if("3".equals(tabId)){
+			ProcessInstance processInstance = actTaskService.getProcIns(workReimbursement.getProcessInstanceId());
+			if (processInstance!=null) {
+				Task taskInfok = actTaskService.getCurrentTaskInfo(processInstance);
+				Act act = new Act();
+				act.setTaskId(taskInfok.getId());
+				act.setTaskName(taskInfok.getName());
+				act.setTaskDefKey(taskInfok.getTaskDefinitionKey());
+				act.setProcDefId(taskInfok.getProcessDefinitionId());
+				act.setProcInsId(taskInfok.getProcessInstanceId());
+				act.setTask(taskInfok);
+				workReimbursement.setAct(act);
+				view = "workReimbursementModifyApply";
+			}
+		}
+		// 环节编号
+		String taskDefKey = workReimbursement.getAct().getTaskDefKey();
+		if (StringUtils.isNotBlank(taskDefKey) && ("bmzr".equals(taskDefKey) ||
+				"fgld".equals(taskDefKey)
+				 || "zjl".equals(taskDefKey)
+				|| taskDefKey.contains("cwzj")|| taskDefKey.contains("cn") || taskDefKey.contains("task"))){
+			view = "workReimbursementAudit";
+		}else  if (StringUtils.isNotBlank(taskDefKey) && "cw".equals(taskDefKey)){
+			view = "workReimbursementCWAudit";
+		}else if (StringUtils.isNotBlank(taskDefKey) && !taskDefKey.equals("modifyApply")){
+			view = "workReimbursementAudit";
+		}
+		String param=UserUtils.getSysParam("check_subjects",UserUtils.getUser());
+		if("是".equals(param)){
+			model.addAttribute("isShow", '1');
+		}else{
+			model.addAttribute("isShow", '0');
+		}
+		if (workReimbursement!=null && StringUtils.isBlank(workReimbursement.getSubmitterId())){
+			workReimbursement.setSubmitterId(UserUtils.getUser().getId());
+			workReimbursement.setSubmitterName(UserUtils.getUser().getName());
+			if(UserUtils.getBasicInfo()!=null){
+				workReimbursement.setBankCard(UserUtils.getBasicInfo().getBankCard());
+			}
+		}
+		if (workReimbursement!=null && workReimbursement.getCreateBy()==null){
+			workReimbursement.setCreateBy(UserUtils.getUser());
+			workReimbursement.setUserName(UserUtils.getUser().getName());
+		}
+		if (workReimbursement!=null && StringUtils.isBlank(workReimbursement.getOfficeId())){
+			workReimbursement.setOfficeId(office.getId());
+			workReimbursement.setOfficeName(office.getTopCompany());
+		}
+		if ("workReimbursementFormAdd".equals(view)&&"0".equals(tabId)){
+			if(UserUtils.getBasicInfo()!=null && StringUtils.isNotBlank(UserUtils.getBasicInfo().getId())) {
+				List<WorkReimbursementBack> backList = workReimbursementBackService.findLoanList(UserUtils.getBasicInfo().getId());
+				workReimbursement.setReimbursementBackList(backList);
+				workReimbursement.setAchivesId(UserUtils.getBasicInfo().getId());
+			}
+		}
+		model.addAttribute("workReimbursement", workReimbursement);
+		return "modules/workreimbursement/"+view;
+	}
+
+	/**
+	 * 暂存报销单
+	 */
+	@RequestMapping(value = "store")
+	public String store(WorkReimbursement workReimbursement,
+						Model model,
+//						@RequestParam(value = "upload_files",required = false) MultipartFile[] upload_files,
+						RedirectAttributes redirectAttributes) throws Exception{
+		if (!beanValidator(model, workReimbursement)){
+			return form(workReimbursement, model);
+		}
+
+		workReimbursement.setStatus("1"); //暂存状态
+		workReimbursement.setCompanyId(UserUtils.getSelectCompany().getId());
+		workReimbursement.setCreateOffice(UserUtils.getSelectOffice().getId());
+		if (StringUtils.isNotBlank(workReimbursement.getProcessInstanceId()) && workReimbursement.getProcessInstanceId().equals("NULL")){
+			workReimbursement.setProcessInstanceId("");
+		}
+		if(!workReimbursement.getIsNewRecord()){//编辑表单保存
+			WorkReimbursement t = workReimbursementService.get(workReimbursement.getId());//从数据库取出记录的值
+			MyBeanUtils.copyBeanNotNull2Bean(workReimbursement, t);//将编辑表单中的非NULL值覆盖数据库记录中的值
+			workReimbursementService.save(t);//保存
+		}else{//新增表单保存
+			workReimbursementService.save(workReimbursement);//保存
+		}
+		addMessage(redirectAttributes, "保存报销单成功");
+		return "redirect:" + adminPath +"/workreimbursement/workReimbursement/?repage";
+	}
+
+	/**
+	 * 保存提交报销单
+	 * 启动流程
+	 */
+	@RequestMapping(value = "save")
+	public String save(WorkReimbursement workReimbursement,
+					   Model model,
+//					   @RequestParam(value = "upload_files",required = false) MultipartFile[] upload_files,
+					   RedirectAttributes redirectAttributes) throws Exception{
+		if (!beanValidator(model, workReimbursement)){
+			return form(workReimbursement, model);
+		}
+		User user = workReimbursement.getCreateBy();
+		String sta = workReimbursement.getStatus();
+		//状态设置为审核中
+		workReimbursement.setStatus("2");
+		String processInstanceId ="";
+		if (user!=null && StringUtils.isNotBlank(user.getId()) && StringUtils.isNotBlank(sta) && "3".equals(sta)){
+			processInstanceId = workReimbursementService.get(workReimbursement.getId()).getProcessInstanceId();
+		}
+		try {
+			Map<String, Object> variables = Maps.newHashMap();
+			workReimbursement.setCompanyId(UserUtils.getSelectCompany().getId());
+			workReimbursement.setCreateOffice(UserUtils.getSelectOffice().getId());
+			String str = workReimbursementService.save(workReimbursement, variables,processInstanceId);
+			if (StringUtils.isNotBlank(str)){
+				addMessage(redirectAttributes, "报销申请提交失败:"+str);
+			}else {
+				addMessage(redirectAttributes, "报销申请已经提交");
+			}
+
+		} catch (Exception e) {
+			logger.info("Exception e:"+e);
+			addMessage(redirectAttributes, "报销申请提交失败!");
+			addMessage(redirectAttributes, "系统内部错误");
+		}
+		return "redirect:" + adminPath +"/workreimbursement/workReimbursement/?repage";
+//		return "modules/workreimbursement/reimbursementTodoList";
+	}
+
+	/**
+	 * 工单执行(完成任务)
+	 * @param model
+	 * @return
+	 */
+	@RequestMapping(value = "saveAudit")
+	public String saveAudit(WorkReimbursement workReimbursement, Model model,
+							RedirectAttributes redirectAttributes) {
+//		try {
+			// 对不同环节的业务逻辑进行操作
+			String taskDefKey = workReimbursement.getAct().getTaskDefKey();
+			List<User> users = null;
+			if ("bmzr".equals(taskDefKey)){
+				users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),2);
+				if (users==null )
+					//users = UserUtils.getByRoleActivityEnname("fgld",2,workReimbursement.getOfficeId(),"8",workReimbursement.getCreateBy());
+					users = UserUtils.getByRoleActivityEnname("cwzg", 3, workReimbursement.getOfficeId(), "8", workReimbursement.getCreateBy());
+			}/*else  if ("fgld".equals(taskDefKey)){
+				users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),3);
+				if (users==null )
+					users = UserUtils.getByRoleActivityEnname("cwzg", 3, workReimbursement.getOfficeId(), "8", workReimbursement.getCreateBy());
+			}*/else  if ("cw".equals(taskDefKey)){
+				users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),3);
+				if (users==null )
+					users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),1);
+				//users = UserUtils.getByRoleActivityEnname("zjl",3,workReimbursement.getOfficeId(),"8",workReimbursement.getCreateBy());
+			}/*else  if ("zjl".equals(taskDefKey)){
+				*//*users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),5);
+				if (users==null )
+					users = UserUtils.getByRoleActivityEnname("cwfgld",3,workReimbursement.getOfficeId(),"8",workReimbursement.getCreateBy());*//*
+				users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),1);
+			}*//*else if ("cwzj".equals(taskDefKey)){
+				users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),6);
+				if (users==null )
+					users = UserUtils.getByRoleActivityEnname("cn",3,workReimbursement.getOfficeId(),"8",workReimbursement.getCreateBy());
+			}else if ("cn".equals(taskDefKey)){
+				users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),1);
+			}*/else if ("modifyApply".equals(taskDefKey)){
+				users = UserUtils.getByProssType(workReimbursement.getProcessInstanceId(),1);
+			}
+            String flag = workReimbursement.getAct().getFlag();
+            if ("yes".equals(flag) &&(users==null || users.size()==0)){
+				addMessage(redirectAttributes, "审批失败,审批人为空,请联系管理员!");
+			}else {
+				String str = workReimbursementService.auditSave(workReimbursement,users);
+				addMessage(redirectAttributes, str);
+			}
+//		}catch (Exception e){
+//			logger.info("Exception e:"+e);
+//			addMessage(redirectAttributes, "审批失败");
+//		}
+		if (StringUtils.isNotBlank(workReimbursement.getHome()) && "home".equals(workReimbursement.getHome())) {
+			return "redirect:" + Global.getAdminPath() + "/home/?repage";
+		} else {
+			return "redirect:" + Global.getAdminPath() + "/workreimbursement/workReimbursement/?repage";
+		}
+	}
+
+
+	/**
+	 * 删除报销单
+	 */
+	@RequiresPermissions("workreimbursement:workReimbursementAll:del")
+	@RequestMapping(value = "delete")
+	public String delete(WorkReimbursement workReimbursement, RedirectAttributes redirectAttributes) {
+		String sta = workReimbursement.getStatus();
+		if("5".equals(sta) || "2".equals(sta) ){
+			if("5".equals(sta)){
+				addMessage(redirectAttributes, "报销单已报销,无法删除");
+				return "redirect:"+Global.getAdminPath()+"/workreimbursement/workReimbursement/?repage";
+			}else{
+				addMessage(redirectAttributes, "报销单正在审核中,无法删除");
+				return "redirect:"+Global.getAdminPath()+"/workreimbursement/workReimbursement/?repage";
+			}
+		}
+		workReimbursementService.delete(workReimbursement);
+		addMessage(redirectAttributes, "删除报销单成功");
+		return "redirect:"+Global.getAdminPath()+"/workreimbursement/workReimbursement/?repage";
+	}
+
+	/**
+	 * 批量删除报销单
+	 */
+	@RequiresPermissions("workreimbursement:workReimbursementAll:del")
+	@RequestMapping(value = "deleteAll")
+	public String deleteAll(String ids, RedirectAttributes redirectAttributes) {
+		String idArray[] =ids.split(",");
+		for(String id : idArray){
+			workReimbursementService.delete(workReimbursementService.get(id));
+		}
+		addMessage(redirectAttributes, "删除报销单成功");
+		return "redirect:"+Global.getAdminPath()+"/workreimbursement/workReimbursement/?repage";
+	}
+
+	/**
+	 * 导出excel文件
+	 */
+	@RequiresPermissions("workreimbursement:workReimbursementAll:export")
+	@RequestMapping(value = "export", method=RequestMethod.POST)
+	public String exportFile(WorkReimbursement workReimbursement, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes) {
+		try {
+			String fileName = "报销单"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx";
+			Page<WorkReimbursement> page = workReimbursementService.findPage(new Page<WorkReimbursement>(request, response, -1), workReimbursement);
+			String agent = request.getHeader("USER-AGENT");
+			new ExportExcel("报销单", WorkReimbursement.class).setDataList(page.getList()).write(response, fileName,agent).dispose();
+			return null;
+		} catch (Exception e) {
+			addMessage(redirectAttributes, "导出报销单记录失败!失败信息:"+e.getMessage());
+		}
+		return "redirect:"+Global.getAdminPath()+"/workreimbursement/workReimbursement/?repage";
+	}
+
+	/**
+	 * 导入Excel数据
+
+	 */
+	@RequiresPermissions("workreimbursement:workReimbursementAll:import")
+	@RequestMapping(value = "import", method=RequestMethod.POST)
+	public String importFile(MultipartFile file, RedirectAttributes redirectAttributes) {
+		try {
+			int successNum = 0;
+			int failureNum = 0;
+			StringBuilder failureMsg = new StringBuilder();
+			ImportExcel ei = new ImportExcel(file, 1, 0);
+			List<WorkReimbursement> list = ei.getDataList(WorkReimbursement.class);
+			for (WorkReimbursement workReimbursement : list){
+				try{
+					workReimbursementService.save(workReimbursement);
+					successNum++;
+				}catch(ConstraintViolationException ex){
+					failureNum++;
+				}catch (Exception ex) {
+					failureNum++;
+				}
+			}
+			if (failureNum>0){
+				failureMsg.insert(0, ",失败 "+failureNum+" 条报销单记录。");
+			}
+			addMessage(redirectAttributes, "已成功导入 "+successNum+" 条报销单记录"+failureMsg);
+		} catch (Exception e) {
+			addMessage(redirectAttributes, "导入报销单失败!失败信息:"+e.getMessage());
+		}
+		return "redirect:"+Global.getAdminPath()+"/workreimbursement/workReimbursement/?repage";
+	}
+
+	/**
+	 * 下载导入报销单数据模板
+	 */
+	@RequiresPermissions("workreimbursement:workReimbursementAll:import")
+	@RequestMapping(value = "import/template")
+	public String importFileTemplate(HttpServletResponse response, RedirectAttributes redirectAttributes) {
+		try {
+			String fileName = "报销单数据导入模板.xlsx";
+			List<WorkReimbursement> list = Lists.newArrayList();
+			String agent = request.getHeader("USER-AGENT");
+			new ExportExcel("报销单数据", WorkReimbursement.class, 1).setDataList(list).write(response, fileName,agent).dispose();
+			return null;
+		} catch (Exception e) {
+			addMessage(redirectAttributes, "导入模板下载失败!失败信息:"+e.getMessage());
+		}
+		return "redirect:"+Global.getAdminPath()+"/workreimbursement/workReimbursement/?repage";
+	}
+
+	/**
+	 * 选择报销项目
+	 */
+	@RequestMapping(value = "selectproject")
+	public String selectproject(ProjectRecords projectId, String url, String fieldLabels, String fieldKeys, String searchLabel, String searchKey, HttpServletRequest request, HttpServletResponse response, Model model) {
+		projectId.setCompany(UserUtils.getSelectCompany());
+		Page<ProjectRecords> page = projectRecordsService.findPageByStatus(new Page<ProjectRecords>(request, response), projectId);
+		try {
+			searchLabel = URLDecoder.decode(searchLabel, "UTF-8");
+			fieldLabels = URLDecoder.decode(fieldLabels, "UTF-8");
+			searchKey = URLDecoder.decode(searchKey, "UTF-8");
+			fieldKeys = URLDecoder.decode(fieldKeys, "UTF-8");
+		} catch (UnsupportedEncodingException e) {
+			e.printStackTrace();
+		}
+		model.addAttribute("labelNames", fieldLabels.split("\\|"));
+		model.addAttribute("labelValues", fieldKeys.split("\\|"));
+		model.addAttribute("fieldLabels", fieldLabels);
+		model.addAttribute("fieldKeys", fieldKeys);
+		model.addAttribute("url", url);
+		model.addAttribute("searchLabel", searchLabel);
+		model.addAttribute("searchKey", searchKey);
+		model.addAttribute("obj", projectId);
+		model.addAttribute("allowInput", true);
+		model.addAttribute("page", page);
+		return "modules/sys/gridselectcallproject";
+		//return "modules/sys/gridselect";
+	}
+
+	/**
+	 * 查询待办列表
+	 * @return
+	 */
+
+	@RequestMapping("/queryToList")
+	public String queryToList(Act act,Model model){
+    	/*之前的写法*/
+//        act.setProcDefKey("reimbursement");
+//        List<WorkReimbursement> todoTasks = workReimbursementService.findTodoTasks(act,UserUtils.getUser().getId());
+//        model.addAttribute("list",todoTasks);
+//        return "modules/workreimbursement/reimbursementTodoList";
+		/* 新写法 */
+		/*act.setProcDefKey("reimbursement");
+		List<Act> list = actTaskService.todoList(act);
+		Office office = UserUtils.getSelectCompany();
+		String companyId = office==null?"":office.getId();*/
+		act.setProcDefKey("reimbursement");
+		List<Act> list = actTaskService.todoList(act);
+		Office office = UserUtils.getSelectCompany();
+		String companyId = office==null?"":office.getId();
+		List<Activity> activities = activityService.groupByActivityMenu("ggh3125f1f194c82bdea93555c750906",companyId);
+		for (Activity activity:activities){
+			act.setProcDefKey(activity.getProcessKey());
+			list.addAll(actTaskService.todoList(act));
+		}
+		Role role = UserUtils.getSelectRole().get(0);
+		List<WorkReimbursement> lists = new ArrayList<WorkReimbursement>();
+		for (Act a : list) {
+			if(a.getTask().getTaskDefinitionKey()!=null && !"modifyApply".equals(a.getTask().getTaskDefinitionKey()) && !a.getTask().getTaskDefinitionKey().contains("audit")) {
+				WorkReimbursement workReimbursement = workReimbursementService.getByProcessInstanceId(a.getProcInsId());
+				if (workReimbursement != null && workReimbursement.getCompanyId().equals(companyId)) {
+					workReimbursement.setCreateBy(UserUtils.get(workReimbursement.getCreateBy().getId()));
+					if (a.getVars().getMap().get("applyUserId") != null) {
+						User user = UserUtils.get(a.getVars().getMap().get("applyUserId").toString());
+						if (user != null) {
+							a.getVars().getMap().put("applyUserId", UserUtils.get(a.getVars().getMap().get("applyUserId").toString()).getName());
+						}
+					}
+					workReimbursement.setAct(a);
+					lists.add(workReimbursement);
+				}
+			}
+		}
+		model.addAttribute("list", lists);
+		return "modules/workreimbursement/reimbursementTodoList";
+	}
+	/**
+	 * 查询已办列表
+	 * @return
+	 */
+	@RequestMapping("/queryCompleteList")
+	public String queryCompleteList(Act act,HttpServletRequest request,HttpServletResponse response,Model model){
+		act.setProcDefKey("reimbursement");
+		List<WorkReimbursement> list = workReimbursementService.historicList(act);
+		Office office = UserUtils.getSelectCompany();
+		String companyId = office==null?"":office.getId();
+		List<Activity> activities = activityService.groupByActivityMenu("ggh3125f1f194c82bdea93555c750906",companyId);
+		for (Activity activity:activities){
+			act.setProcDefKey(activity.getProcessKey());
+			list.addAll(workReimbursementService.historicList(act));
+		}
+		model.addAttribute("list",list);
+		return "modules/workreimbursement/reimbursementHistoricList";
+	}
+
+	/**
+	 * 审核信息
+	 * @param response
+	 * @param model
+	 * @return
+	 */
+	@RequestMapping(value = "applyOnLeave")
+	public String applyOnCompany(Act act, HttpServletResponse response, Model model) {
+		// 获取流程XML上的表单KEY
+		String formKey = "/workreimbursement/workReimbursement/form";
+//        String formKey = actTaskService.getFormKey(act.getProcDefId(), act.getTaskDefKey());
+		// 获取流程实例对象
+		if (act.getProcInsId() != null){
+			if(actTaskService.getProcIns(act.getProcInsId())!=null){
+				act.setProcIns(actTaskService.getProcIns(act.getProcInsId()));
+			}else{
+				act.setFinishedProcIns(actTaskService.getFinishedProcIns(act.getProcInsId()));
+			}
+		}
+		return "redirect:" + ActUtils.getFormUrl(formKey, act);
+	}
+
+	/**
+	 * 读取所有流程
+	 * @return
+	 */
+	@RequestMapping(value = "getProcess")
+	public String getProcess(WorkReimbursement workReimbursement, HttpServletRequest request, HttpServletResponse response, Model model) {
+//        admin 可以查看所有流程  展示注释
+//        User user = UserUtils.getUser();
+//        if (!user.isAdmin()){
+////            leave.setCompanyId(user.getComId());
+//            if (!UserUtils.isManager()){
+//                workReimbursement.setCreateBy(user);
+//            }
+//        }
+		Page<WorkReimbursement> page = workReimbursementService.find(new Page<WorkReimbursement>(request, response), workReimbursement);
+		model.addAttribute("processInstanceId", page.getList().get(0).getProcessInstanceId());
+		return "modules/workreimbursement/workReimbursementTrack";
+	}
+
+	/**
+	 * 读取单个实体流程
+	 * @return
+	 */
+	@RequestMapping(value = "getProcessOne")
+	public String getProcessOne(WorkReimbursement workReimbursement,Model model) {
+		model.addAttribute("processInstanceId", workReimbursement.getProcessInstanceId());
+		return "modules/workreimbursement/workReimbursementTrack";
+	}
+
+	/**
+	 * 获取项目信息
+	 * @return
+	 */
+	@RequestMapping(value = "getProjectInfo")
+	@ResponseBody
+	public String getProjectInfo() {
+		HashMap<Object, Object> map = Maps.newHashMap();
+		String obj = request.getParameter("obj");
+		ProjectRecords projectRecords = projectRecordsService.get(obj);
+		if(projectRecords != null){
+			List<User> users = workProjectUserDao.queryProjectUsers(projectRecords.getId(), "1");
+			String projectMaster = "";
+			String projectMasterName = "";
+			if(users!=null && users.size()!=0){
+				for (int i = 0; i < users.size(); i++) {
+					if(i == users.size() -1){
+						projectMasterName += UserUtils.get(users.get(i).getId()).getName();
+						projectMaster += UserUtils.get(users.get(i).getId());
+					}else{
+						projectMaster += UserUtils.get(users.get(i).getId())+",";
+						projectMasterName += UserUtils.get(users.get(i).getId()).getName()+",";
+					}
+				}
+				map.put("projectMaster",projectMaster);
+				map.put("projectMasterName",projectMasterName);
+			}else{
+				map.put("projectMaster","projectMaster");
+				map.put("projectMasterName","projectMasterName");
+			}
+			map.put("submitterId",projectRecords.getCreateBy().getId());
+			map.put("submitterName",UserUtils.get(projectRecords.getCreateBy().getId()).getName());
+			if (projectRecords.getOffice()!=null && StringUtils.isNotBlank(projectRecords.getOffice().getId())){
+				map.put("officeId",projectRecords.getOffice().getId());
+				map.put("officeName",officeService.get(projectRecords.getOffice().getId()).getName());
+			}else {
+				map.put("officeId",UserUtils.getSelectOffice().getId());
+				map.put("officeName",UserUtils.getSelectOffice().getName());
+			}
+
+			map.put("projectType",projectRecords.getScaleType()==null?"":projectRecords.getScaleType());
+			map.put("projectTypeName",projectRecords.getScaleType()==null?"":projectRecords.getScaleType());
+			map.put("projectId",projectRecords.getId());
+		}
+		return JsonMapper.toJsonString(map);
+	}
+
+	@ResponseBody
+	@RequestMapping(value = "treeData")
+	public List<Map<String, Object>> treeData(@RequestParam(required=false) String extId, @RequestParam(required=false) String type,
+											  @RequestParam(required=false) Long grade, @RequestParam(required=false) Boolean isAll, HttpServletResponse response) {
+		List<Map<String, Object>> mapList = Lists.newArrayList();
+		List<SysMtree> list = sysMtreeService.findList(new SysMtree());
+		for (int i=0; i<list.size(); i++){
+			SysMtree e = list.get(i);
+			if ((StringUtils.isBlank(extId) || (extId!=null && !extId.equals(e.getId()) && e.getParentIds().indexOf(","+extId+",")==-1))
+					&& (type == null || (type != null && (type.equals("1") ? type.equals(e.getType()) : true)))){
+				Map<String, Object> map = Maps.newHashMap();
+				map.put("id", e.getId());
+				map.put("pId", e.getParentId());
+				map.put("pIds", e.getParentIds());
+				map.put("name", e.getName());
+				if (type != null && "3".equals(type)){
+					map.put("isParent", true);
+				}
+				mapList.add(map);
+			}
+		}
+		return mapList;
+	}
+
+	/**
+	 * 异步上传文件
+	 * @return
+	 */
+	@RequestMapping("/uploadFile")
+	@ResponseBody
+	public Map<String,Object> uploadFile(WorkReimbursement workReimbursement,
+										 Model model, RedirectAttributes redirectAttributes,
+										 HttpServletRequest request,
+										 @RequestParam(value = "myFile") CommonsMultipartFile myFile){
+		String attchmentId = request.getParameter("attchmentId");
+		WorkClientAttachment workClientAttachment = workClientInfoService.uploadFileSingle(request, myFile, workReimbursement.getId(), VarStr.attachmentFlag[1]);
+		workClientAttachment.setId(attchmentId);
+		String s = workClientInfoService.save(workClientAttachment);
+		Map map = new HashMap();
+		map.put("msg","success");
+		return map;
+	}
+
+	/**
+	 * 合同作废:强制撤回
+	 */
+	@RequestMapping("cancelInvalidate")
+	public String cancelInvalidate(WorkReimbursement workReimbursement,RedirectAttributes redirectAttributes){
+		try {
+			WorkReimbursement reportData = workReimbursementService.get(workReimbursement.getId());
+			if(reportData.getStatus().equals("5")){
+				addMessage(redirectAttributes, "报销申请已审批通过,无法撤回");
+			}else{
+				workReimbursementService.cancelInvalidate(workReimbursement);
+				addMessage(redirectAttributes, "报销申请撤回成功");
+			}
+		}catch (Exception e){
+			logger.error("Exception e"+e);
+			addMessage(redirectAttributes, "报销申请撤回失败");
+		}
+		return "redirect:"+Global.getAdminPath()+"/workreimbursement/workReimbursement/?repage";
+	}
+	/**
+	 * 合同管理列表页面
+	 */
+	@RequestMapping(value = {"gridSelectComname"})
+	public String list(WorkSupplier workSupplier, HttpServletRequest request, HttpServletResponse response, Model model) {
+		if("1".equals(workSupplier.getFalt())){
+			workSupplier.setRemoveSign("1");//正常
+			Page<WorkSupplier> page = workSupplierService.findPage(new Page<WorkSupplier>(request, response), workSupplier);
+			model.addAttribute("page", page);
+		}else{
+			WorkClientInfo client=new WorkClientInfo();
+			Page<WorkSupplier> page = workSupplierService.findPageClientInfo(new Page<WorkSupplier>(request, response), workSupplier);
+			model.addAttribute("page", page);
+		}
+		return  "modules/sys/gridworkSupplier";
+	}
+	/**
+	 * 选择报销项目
+	 */
+	@RequestMapping(value = "selectReproject")
+	public String selectReproject(String userId,ProjectRecords projectId, String url, String fieldLabels, String fieldKeys, String searchLabel, String searchKey, HttpServletRequest request, HttpServletResponse response, Model model) {
+		projectId.setCompany(UserUtils.getSelectCompany());
+		Page<ProjectRecords> page = projectRecordsService.ruralFindPageByReimbur(new Page<ProjectRecords>(request, response), projectId,userId);
+		try {
+			searchLabel = URLDecoder.decode(searchLabel, "UTF-8");
+			fieldLabels = URLDecoder.decode(fieldLabels, "UTF-8");
+			searchKey = URLDecoder.decode(searchKey, "UTF-8");
+			fieldKeys = URLDecoder.decode(fieldKeys, "UTF-8");
+		} catch (UnsupportedEncodingException e) {
+			e.printStackTrace();
+		}
+		model.addAttribute("labelNames", fieldLabels.split("\\|"));
+		model.addAttribute("labelValues", fieldKeys.split("\\|"));
+		model.addAttribute("fieldLabels", fieldLabels);
+		model.addAttribute("fieldKeys", fieldKeys);
+		model.addAttribute("url", url);
+		model.addAttribute("searchLabel", searchLabel);
+		model.addAttribute("searchKey", searchKey);
+		model.addAttribute("obj", projectId);
+		model.addAttribute("allowInput", true);
+		model.addAttribute("page", page);
+		return "modules/sys/gridselectcallprojectOnReimbur";
+		//return "modules/sys/gridselect";
+	}
+
+
+	/**
+	 * 报销list页面查询框
+	 */
+	@RequestMapping(value = "selectprojectOnList")
+	public String selectprojectOnList(ProjectRecords project, String url, String fieldLabels, String fieldKeys, String searchLabel, String searchKey, String ids, HttpServletRequest request, HttpServletResponse response, Model model) {
+		project.setCompany(UserUtils.getSelectCompany());
+		project.setProjectStatus(ProjectStatusEnum.SIGNED.getValue());//已签状态
+		project.setLeaderNameStr(UserUtils.getUser().getName());
+		Page<ProjectRecords> page = projectRecordsService.ruralFindPageByReimbur(new Page<ProjectRecords>(request, response), project,"");
+		try {
+			fieldLabels = URLDecoder.decode(fieldLabels, "UTF-8");
+			fieldKeys = URLDecoder.decode(fieldKeys, "UTF-8");
+			searchLabel = URLDecoder.decode(searchLabel, "UTF-8");
+			searchKey = URLDecoder.decode(searchKey, "UTF-8");
+		} catch (UnsupportedEncodingException e) {
+			e.printStackTrace();
+		}
+		model.addAttribute("labelNames", fieldLabels.split("\\|"));
+		model.addAttribute("labelValues", fieldKeys.split("\\|"));
+		model.addAttribute("fieldLabels", fieldLabels);
+		model.addAttribute("fieldKeys", fieldKeys);
+		model.addAttribute("url", url);
+		model.addAttribute("searchLabel", searchLabel);
+		model.addAttribute("searchKey", searchKey);
+		model.addAttribute("obj", project);
+		model.addAttribute("page",page);
+		return "modules/sys/gridReimburProjectList";
+	}
+}

+ 11 - 6
src/main/resources/mappings/modules/workinvoice/WorkInvoiceDao.xml

@@ -193,12 +193,13 @@
 	<select id="queryCount" resultType="int" >
 		SELECT count(1)
 		FROM work_invoice a
-		<if test="client != null and client.name != null and client.name != ''">
-			LEFT JOIN work_client_info w ON  w.id = a.client_id
-		</if>
-		LEFT JOIN rural_project_records p ON  p.id = a.project_id
-		LEFT join sys_office so on so.id = a.office_id
-		left join project_report_data prd on p.id = prd.project_id
+		<include refid="workInvoiceJoins"/>
+<!--		<if test="client != null and client.name != null and client.name != ''">-->
+<!--			LEFT JOIN work_client_info w ON  w.id = a.client_id-->
+<!--		</if>-->
+<!--		LEFT JOIN rural_project_records p ON  p.id = a.project_id-->
+<!--		LEFT join sys_office so on so.id = a.office_id-->
+<!--		left join project_report_data prd on p.id = prd.project_id-->
 		<where>
 			a.del_flag = #{DEL_FLAG_NORMAL}
 			<if test="number != null and number != ''">
@@ -299,6 +300,10 @@
 			</otherwise>
 		</choose>
 	</select>
+
+	
+	
+	
 	
 	<select id="findAllList" resultType="WorkInvoice" >
 		SELECT 

+ 705 - 0
src/main/webapp/webpage/modules/workinvoice/workInvoiceAllList.jsp

@@ -0,0 +1,705 @@
+<%@ page import="com.jeeplus.modules.sys.utils.UserUtils" %>
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+
+	<title>发票管理</title>
+	<meta name="decorator" content="default"/>
+	<script type="text/javascript">
+        <%--var Srole = "<%= UserUtils.getSelectRole().getName()%>";--%>
+
+        $(document).ready(function() {
+            // laydate.render({
+            //     elem: '#invoiceDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            //     event: 'focus' //响应事件。如果没有传入event,则按照默认的click
+				// ,type:'datetime'
+            // });
+            //搜索框收放
+            $('#moresee').click(function(){
+                if($('#moresees').is(':visible'))
+                {
+                    $('#moresees').slideUp(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+                }else{
+                    $('#moresees').slideDown(0,resizeListWindow2);
+                    $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+                }
+            });
+            laydate.render({
+                elem: '#beginContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+, trigger: 'click'
+            });
+            laydate.render({
+                elem: '#endContractDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+                event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+                type : 'date'
+, trigger: 'click'
+            });
+        });
+        function openDialogre(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url ,
+                skin:"three-btns",
+                btn: ['送审','暂存','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                    return false;
+                },
+                btn3: function(index){
+                }
+            });
+
+        }
+
+        function openDialogreplay(title,url,width,height,target){
+
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: true, //开启最大化最小化按钮
+                content: url ,
+                skin:"two-btns",
+                btn: ['送审','关闭'],
+                yes: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                    if(iframeWin.contentWindow.doSubmit() ){
+                        top.layer.close(index);//关闭对话框。
+                        //setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+
+                },
+                cancel: function(index){
+                }
+            });
+        }
+
+        function receiptInvoice(title,url,width,height,target){
+
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+			top.layer.open({
+				type: 2,
+				area: [width, height],
+				title: title,
+				maxmin: true, //开启最大化最小化按钮
+				content: url ,
+				skin:"three-btns",
+				btn: ['保留','确认收款','关闭'],
+				btn1: function(index, layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(1) ){
+						// top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+				},
+				btn2:function(index,layero){
+					var body = top.layer.getChildFrame('body', index);
+					var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+					var inputForm = body.find('#inputForm');
+					var top_iframe;
+					if(target){
+						top_iframe = target;//如果指定了iframe,则在改frame中跳转
+					}else{
+						top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+					}
+					inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+					if(iframeWin.contentWindow.doSubmit(2) ){
+						// top.layer.close(index);//关闭对话框。
+						setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+					}
+					return false;
+				},
+				btn3: function(index){
+				}
+			});
+        }
+
+        function contractOpenDialogre(title,url,width,height,target){
+            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+                width='auto';
+                height='auto';
+            }else{//如果是PC端,根据用户设置的width和height显示。
+
+            }
+            top.layer.open({
+                type: 2,
+                area: [width, height],
+                title: title,
+                maxmin: false, //开启最大化最小化按钮
+                skin:"three-btns",
+                content: url ,
+                btn: ['送审','暂存','关闭'],
+                btn1: function(index, layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(1) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                },
+                btn2:function(index,layero){
+                    var body = top.layer.getChildFrame('body', index);
+                    var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                    var inputForm = body.find('#inputForm');
+                    var top_iframe;
+                    if(target){
+                        top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                    }else{
+                        top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                    }
+                    inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                    if(iframeWin.contentWindow.doSubmit(2) ){
+                        // top.layer.close(index);//关闭对话框。
+                        setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                    }
+                    return false;
+                },
+                btn3: function(index){
+                }
+            });
+
+        }
+
+		function openDialogreModify(title,url,id,width,height,target) {
+
+			if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+				width = 'auto';
+				height = 'auto';
+			} else {//如果是PC端,根据用户设置的width和height显示。
+
+			}
+
+			$.ajax({
+				async: false,
+				url: "${ctx}/workinvoiceAll/workInvoiceAll/getInvoiceExist?id="+id,
+				dataType: "json",
+				success: function (data) {
+					if(data.success){
+                        top.layer.open({
+                            type: 2,
+                            area: [width, height],
+                            title: title,
+                            maxmin: true, //开启最大化最小化按钮
+                            content: url ,
+                            skin:"two-btns",
+                            btn: ['送审','关闭'],
+                            yes: function(index, layero){
+                                var body = top.layer.getChildFrame('body', index);
+                                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                                var inputForm = body.find('#inputForm');
+                                var top_iframe;
+                                if(target){
+                                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                                }else{
+                                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                                }
+                                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                                if(iframeWin.contentWindow.doSubmit() ){
+                                    top.layer.close(index);//关闭对话框。
+                                    //setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                                }
+
+                            },
+                            cancel: function(index){
+                            }
+                        });
+					}else{
+						top.layer.msg("该发票信息已删除!", {icon: 0});
+						window.location.reload();
+					}
+				}
+			});
+
+
+		}
+
+
+		//打开对话框(查看)
+		function openDialogListView(title,url,id,width,height){
+
+
+			if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+				width='auto';
+				height='auto';
+			}else{//如果是PC端,根据用户设置的width和height显示。
+
+			}
+			$.ajax({
+				async: false,
+				url: "${ctx}/workinvoiceAll/workInvoiceAll/getInvoiceExist?id="+id,
+				dataType: "json",
+				success: function (data) {
+					if(data.success){
+						top.layer.open({
+							type: 2,
+							skin: 'one-btn',
+							area: [width, height],
+							title: title,
+							maxmin: true, //开启最大化最小化按钮
+							content: url ,
+							btn: ['关闭'],
+							cancel: function(index){
+							}
+						});
+					}else{
+						top.layer.msg("该发票信息已删除!", {icon: 0});
+						window.location.reload();
+					}
+				}
+			});
+
+		}
+
+	</script>
+	<style>
+		body{
+			background-color:transparent;
+			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+			color:#ffffff;
+			background-color:rgba(255,255,255,0);
+			height:100%;
+		}
+	</style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+	<sys:message content="${message}"/>
+	<div class="layui-row ">
+		<%--<div class="full-width fl">
+			<div class=" contentShadow shadowLTR list-form-tab" id="tabDiv">
+				<ul class="list-tabs" >
+					<li class="active"><a href="${ctx}/workinvoiceAll/workInvoiceAll/list">发票管理</a></li>
+					<li><a href="${ctx}/workinvoicealter/workInvoiceAlter/list">发票变更</a></li>
+				</ul>
+			</div>
+		</div>--%>
+		<div class="full-width fl">
+			<div class=" layui-row contentShadow shadowLR" id="queryDiv">
+				<form:form id="searchForm" modelAttribute="workInvoice" action="${ctx}/workinvoiceAll/workInvoiceAll/" method="post" class="form-inline">
+				<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+				<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+				<%--<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->--%>
+
+					<div class="commonQuery lw9">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">项目编号:</label>
+							<div class="layui-input-block">
+								<form:input path="project.projectId" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">项目名称:</label>
+							<div class="layui-input-block with-icon">
+								<form:input path="project.projectName" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item athird">
+							<div class="input-group">
+								<a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+								<button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
+								<button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+							</div>
+						</div>
+						<div style="    clear:both;"></div>
+					</div>
+					<div id="moresees" class="lw9" style="clear:both;display:none;">
+						<div class="layui-item query athird">
+							<label class="layui-form-label">报告号名称:</label>
+							<div class="layui-input-block with-icon">
+								<form:input path="project.reportData.number" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">开票日期:</label>
+							<div class="layui-input-block">
+								<input id="beginContractDate" name="beginContractDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${workInvoice.beginContractDate}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+								<span class="group-sep">-</span>
+								<input id="endContractDate" name="endContractDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+									   value="<fmt:formatDate value="${workInvoice.endContractDate}" pattern="yyyy-MM-dd"/>"/>
+								</input>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">发票申请编号:</label>
+							<div class="layui-input-block">
+								<form:input path="number" htmlEscape="false" maxlength="64"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">经办人部门:</label>
+							<div class="layui-input-block with-icon">
+								<sys:treeselect id="officeId" name="officeId" value="${workInvoice.officeId}" labelName="officeName" labelValue="${workInvoice.officeName}"
+												title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">经办人:</label>
+							<div class="layui-input-block with-icon">
+								<sys:inquireselectUser id="submitterId" name="submitterId" value="${workInvoice.submitterId}" labelName="submitterName" labelValue="${workInvoice.submitterName}"
+												title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">开票单位:</label>
+							<div class="layui-input-block with-icon">
+								<form:input path="client.name" htmlEscape="false"  class=" form-control layui-input"/>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">是否收款:</label>
+							<div class="layui-input-block with-icon">
+								<select id="receiptMoney" name="receiptMoney" class="form-control simple-select">
+									<option value=""></option>
+									<option value="0" <c:if test="${workInvoiceShow.receiptMoney=='0'}">selected</c:if>>否</option>
+									<option value="1" <c:if test="${workInvoiceShow.receiptMoney=='1'}">selected</c:if>>是</option>
+								</select>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">发票类型:</label>
+							<div class="layui-input-block with-icon">
+								<form:select path="invoiceType" class="form-control simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getMainDictList('invoice_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">状态:</label>
+							<div class="layui-input-block with-icon">
+								<form:select path="invoiceState" class="form-control simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getDictList('invoice_audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">收款类型:</label>
+							<div class="layui-input-block with-icon">
+								<form:select path="chargeType" class="form-control simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getMainDictList('receipt_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+						</div>
+						<div class="layui-item query athird">
+							<label class="layui-form-label">开票内容:</label>
+							<div class="layui-input-block with-icon">
+								<form:select path="billingContent" class="form-control simple-select">
+									<form:option value="" label=""/>
+									<form:options items="${fns:getMainDictList('billing_content')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+								</form:select>
+							</div>
+						</div>
+					</div>
+				</form:form>
+			</div>
+		</div>
+		<div class="full-width fl">
+			<div class=" contentShadow shadowLBR layui-form contentDetails">
+				<div class="nav-btns">
+					<shiro:hasPermission name="workinvoice:workInvoice:add">
+						<button class="nav-btn nav-btn-add" title="发票管理" onclick="openDialogre('发票管理','${ctx}//workinvoiceAll/workInvoiceAll/form','95%','95%')"><i class="fa fa-plus"></i>&nbsp;添加</button>
+					</shiro:hasPermission>
+
+					<button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
+					<%--<shiro:hasPermission name="workinvoice:workInvoice:del">
+						<table:delRow url="${ctx}/workinvoiceAll/workInvoiceAll/deleteAll" id="contentTable"></table:delRow><!-- 删除按钮 -->
+					</shiro:hasPermission>--%>
+					<div style="clear: both;"></div>
+				</div>
+				<table class="oa-table layui-table" id="contentTable"></table>
+
+				<!-- 分页代码 -->
+				<table:page page="${page}"></table:page>
+				<div style="clear: both;"></div>
+			</div>
+		</div>
+	</div>
+    <div id="changewidth"></div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${ page.pageSize }
+            ,elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+				//{checkbox: true, fixed: true},
+                {field:'index',align:'center', title: '序号',width:40}
+				,{field:'projName',align:'center', title: '项目名称', minWidth:160,templet:function(d){
+						return "<a class=\"attention-info\" title=\"" + d.projName + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看项目', '${ctx}/ruralProject/ruralProjectRecords/view?id=" + d.projectId +"','95%', '95%')\">" + d.projName + "</a>";
+					}}
+                ,{field:'invoiceNum',align:'center', sort:true,title: '发票申请编号', minWidth:130,templet:function(d){
+                        return "<a class=\"attention-info\" title=\""+ d.invoiceNum +"\"href=\"javascript:void(0);\" onclick=\"openDialogListView('查看发票管理', '${ctx}/workinvoiceAll/workInvoiceAll/form?id=" + d.id + "&tabId=1','"+ d.id +"','95%', '95%')\">" + d.invoiceNum + "</a>";
+                    }}
+				,{field:'clientName', align:'center',title: '开票单位', minWidth:160,templet:function(d){
+						return "<span title='"+ d.clientName +"'>" + d.clientName + "</span>";
+					}}
+				,{field:'responsibleName', align:'center',title: '经办人', minWidth:80,templet:function(d){
+						return "<span title='"+ d.responsibleName +"'>" + d.responsibleName + "</span>";
+					}}
+				,{field:'officeName', align:'center',title: '经办单位',width:80,templet:function(d){
+						return "<span title='"+ d.officeName +"'>" + d.officeName + "</span>";
+					}}
+				,{field:'money',align:'center', title: '开票金额(元)',  width:110,templet:function(d){
+						return "<span title='"+ d.money +"'>" + d.money + "</span>";
+					}}
+				,{field:'billingContent',align:'center', title: '开票内容',  width:90,templet:function(d){
+						return "<span title='"+ d.billingContent +"'>" + d.billingContent + "</span>";
+					}}
+				,{field:'chargeType',align:'center', title: '收款类型',  width:90,templet:function(d){
+						return "<span title='"+ d.chargeType +"'>" + d.chargeType + "</span>";
+					}}
+				,{field:'invoiceType',align:'center', title: '发票类型',  width:90,templet:function(d){
+						return "<span title='"+ d.invoiceType +"'>" + d.invoiceType + "</span>";
+					}}
+                ,{field:'reportNumber',align:'center', title: '报告号', minWidth:150,templet:function(d){
+						return "<a class=\"attention-info\" title=\"" + d.reportNumber + "\" href=\"javascript:void(0);\" onclick=\"openDialogView('查看报告信息', '${ctx}/ruralProject/ruralProjectMessage/modify?projectId=" + d.projectId + "&view=view','95%', '95%')\">" + d.reportNumber + "</a>";
+                    }}
+                ,{field:'areaName',align:'center', title: '项目所在地', minWidth:80,templet:function(d){
+                        return "<span title='"+ d.areaName +"'>" + d.areaName + "</span>";
+                    }}
+				,{field:'createDate',align:'center', sort:true,title: '开票日期',  width:80}
+				,{field:'receiptMoneyDate',align:'center', sort:true,title: '收款日期',  width:80}
+				,{field:'receiptMoney',align:'center', title: '是否收款',  width:80}
+				,{field:'cancellation',align:'center', title: '是否作废',  width:80}
+                ,{align:'center', title: '状态', fixed: 'right', width:70,templet:function(d){
+                        <%--var st = getAuditState(d.status);--%>
+
+                        <%--var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workinvoiceAll/workInvoiceAll/getProcessOne?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";--%>
+                        <%--return xml;--%>
+                        var st = getAuditState(d.status);
+                        if(st.action)
+                            var xml = "<span onclick=\"openDialogListView('流程追踪', '${ctx}/workinvoiceAll/workInvoiceAll/getProcessOne?id=" + d.id + "','"+ d.id +"','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+                        else
+                            var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+                        return xml;
+                    }}
+                ,{field:'op',align:'center',title:"操作",fixed: 'right',width:130,templet:function(d){
+                        ////对操作进行初始化
+                        var xml="";
+                        if(d.canedit1 != undefined && d.canedit1 =="1")
+                        {
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogre('修改发票', '${ctx}/workinvoiceAll/workInvoiceAll/form?id=" + d.id + "','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                        }
+                        if(d.canedit2 != undefined && d.canedit2 =="1")
+                        {
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreModify('修改发票', '${ctx}/workinvoiceAll/workInvoiceAll/form?id=" + d.id + "&tabId=3','"+ d.id +"','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                        }
+                        if(d.canedit3 != undefined && d.canedit3 =="1")
+                        {
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('重新申请发票', '${ctx}/workinvoiceAll/workInvoiceAll/form?id=" + d.id + "&tabId=4','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                        }
+                        if(d.candelete != undefined && d.candelete =="1")
+                        {
+                            xml += "<a href=\"${ctx}/workinvoiceAll/workInvoiceAll/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该发票记录吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
+                        }
+                        if(d.cancancel != undefined && d.cancancel =="1")
+                        {
+                            xml += "<a href=\"${ctx}/workinvoiceAll/workInvoiceAll/cancelInvalidate?id="+ d.id +"\" onclick=\"return confirmx('确认要强制撤回?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
+                        }
+                        /*if(d.canalter != undefined && d.canalter =="1")
+                        {
+                            xml += "<a href=\"javascript:void(0)\" onclick=\"contractOpenDialogre('变更发票管理', '${ctx}/workinvoiceAll/workInvoiceAll/alterForm?id="+ d.id +"','95%','95%')\" class=\"op-btn op-btn-revert\" ><i class=\"fa fa-edit\"></i> 变更</a>";
+                        }*/
+
+						if(d.financeFlag != undefined && d.financeFlag =="1")
+						{
+							xml +="<a href=\"javascript:void(0)\" onclick=\"receiptInvoice('发票收款', '${ctx}/workinvoiceAll/workInvoiceAll/receiptForm?id=" + d.id + "','95%','95%')\" class=\"op-btn layui-btn\" ><i class=\"fa fa-edit\"></i> 收款</a>";
+						}
+						if(d.cancellationFlag != undefined && d.cancellationFlag =="1")
+						{
+							xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('作废发票', '${ctx}/workinvoiceAll/workInvoiceAll/cancellationForm?id=" + d.id + "&tabId=3','95%','95%')\" class=\"op-btn op-btn-invalid\" ><i class=\"fa fa-trash-o\"></i> 作废</a>";
+						}
+						if(d.conditionCanedit != undefined && d.conditionCanedit =="1")
+						{
+							xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('作废修改发票', '${ctx}/workinvoiceAll/workInvoiceAll/cancellationForm?id=" + d.id + "&tabId=3','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+						}
+						if(d.conditionCanedit3 != undefined && d.conditionCanedit3 =="1")
+						{
+							xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('重新申请发票', '${ctx}/workinvoiceAll/workInvoiceAll/cancellationForm?id=" + d.id + "&tabId=4','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+						}
+						if(d.conditionCandelete != undefined && d.conditionCandelete =="1")
+						{
+							xml += "<a href=\"${ctx}/workinvoiceAll/workInvoiceAll/cancellationDelete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该发票作废记录吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
+						}
+						if(d.conditionCancancel != undefined && d.conditionCancancel =="1")
+						{
+							xml += "<a href=\"${ctx}/workinvoiceAll/workInvoiceAll/conditionCancelInvalidate?id="+ d.id +"\" onclick=\"return confirmx('确认要强制撤回?', this.href)\" class=\"op-btn op-btn-cancel\" ><i class=\"glyphicon glyphicon-share-alt\"></i> 作废撤回</a>";
+						}
+
+						if(d.adminFlag != undefined && d.adminFlag =="1")
+						{
+							xml += "<a href=\"${ctx}/workinvoiceAll/workInvoiceAll/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该发票记录吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
+						}
+                        return xml;
+
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="workInvoice" varStatus="index"><c:set var="Srole" scope="session" value="<%= UserUtils.getSelectRole().get(0).getEnname()%>"/>
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workInvoice.id}"
+                    ,"invoiceNum":"${workInvoice.number}"
+                    ,"chargeType":"${fns:getMainDictLabels(workInvoice.chargeType,',','receipt_type', '')}"
+                    ,"billingContent":"${fns:getMainDictLabels(workInvoice.billingContent,',','billing_content', '')}"
+                    ,"invoiceType":"${workInvoice.invoiceTypeStr}"
+                    ,"projNum":"${workInvoice.project.projectId}"
+                    ,"projectId":"${workInvoice.project.id}"
+                    ,"areaName":"${workInvoice.project.county}"
+                    ,"reportNumber":"${workInvoice.project.reportData.number}"
+                    ,"projName":"${workInvoice.project.projectName}"
+                    ,"clientName":"${workInvoice.client.name}"
+                    ,"officeName":"${workInvoice.office.name}"
+                    ,"responsibleName":"${workInvoice.createBy.name}"
+                    ,"receiptMoney":"${workInvoice.receiptMoney}"
+                    ,"status":"${workInvoice.invoiceState}"
+                    ,"money":"<fmt:formatNumber value="${workInvoice.money}" pattern="#,#0.00"/>"
+                    ,"createDate":"<fmt:formatDate value="${workInvoice.createDate}" pattern="yyyy-MM-dd"/>"
+                    ,"receiptMoneyDate":"<fmt:formatDate value="${workInvoice.receiptMoneyDate}" pattern="yyyy-MM-dd"/>"
+                    <c:if test="${workInvoice.invoiceState == 1 && fns:getUser().id == workInvoice.createBy.id}"><shiro:hasPermission name="workinvoice:workInvoice:edit">,"canedit1":"1"</shiro:hasPermission></c:if><%--暂存-修改--%>
+                    <c:if test="${workInvoice.invoiceState == '4' && fns:getUser().id == workInvoice.createBy.id}">,"canedit2":"1"</c:if><%--驳回--修改--%>
+                    <c:if test="${workInvoice.invoiceState == '9' && fns:getUser().id == workInvoice.createBy.id}">,"conditionCanedit":"1"</c:if><%--驳回--修改--%>
+                    <c:if test="${workInvoice.invoiceState == '11' && fns:getUser().id == workInvoice.createBy.id}">,"conditionCanedit3":"1"</c:if><%--作废撤回--修改--%>
+                    <c:if test="${workInvoice.invoiceState == '3' && fns:getUser().id == workInvoice.createBy.id}">,"canedit3":"1"</c:if><%--撤回--修改--%>
+                    <c:if test="${fns:getUser().id == workInvoice.createBy.id}"><c:if test="${workInvoice.invoiceState == '1' or workInvoice.invoiceState == '3' or workInvoice.invoiceState == '4'}"><shiro:hasPermission name="workinvoice:workInvoice:del">,"candelete":"1"</shiro:hasPermission></c:if></c:if>
+                    <c:if test="${fns:getUser().id == workInvoice.createBy.id}"><c:if test="${workInvoice.invoiceState == '9' || workInvoice.invoiceState == '11' }">,"conditionCandelete":"1"</c:if></c:if>
+                    <c:if test="${workInvoice.invoiceState == '2' && fns:getUser().id == workInvoice.createBy.id}">,"cancancel":"1"</c:if>
+                    <c:if test="${workInvoice.invoiceState == '6' && fns:getUser().id == workInvoice.createBy.id}">,"conditionCancancel":"1"</c:if>
+					<shiro:hasPermission name="workinvoice:workInvoice:alteredit">
+                    <c:if test="${workInvoice.invoiceState == '5'}">,"canalter":"1"</c:if>
+                    </shiro:hasPermission>
+					,"cancellation":<c:choose>
+							<c:when test="${workInvoice.invoiceState == '7'}">"是"</c:when>
+					<c:otherwise>"否"</c:otherwise>
+					</c:choose>
+					<shiro:hasPermission name="workinvoice:workInvoice:receipt">
+						,"financeFlag":
+							<c:choose>
+								<c:when test="${workInvoice.invoiceState == 5 && workInvoice.receiptMoney == '否'}">"1"</c:when>
+								<c:otherwise>"0"</c:otherwise>
+						</c:choose>
+					</shiro:hasPermission>
+					<shiro:hasPermission name="workinvoice:workInvoice:invalid">
+						,"cancellationFlag":
+							<c:choose>
+								<c:when test="${workInvoice.invoiceState == 5}">"1"</c:when>
+								<c:otherwise>"0"</c:otherwise>
+						</c:choose>
+					</shiro:hasPermission>
+					<shiro:hasPermission name="workinvoice:workInvoice:adminDel">
+						,"adminFlag":
+							<c:choose>
+								<c:when test="${workInvoice.invoiceState == 5}">"1"</c:when>
+								<c:otherwise>"0"</c:otherwise>
+						</c:choose>
+					</shiro:hasPermission>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+
+    })
+
+    resizeListTable();/*消除由于有竖向滚动条造成table出现横向滚动条*/
+</script>
+<script>
+    resizeListWindow2();
+    $(window).resize(function(){
+        resizeListWindow2();
+    });
+</script>
+
+</body>
+</html>

+ 21 - 21
src/main/webapp/webpage/modules/workinvoice/workInvoiceList.jsp

@@ -661,27 +661,27 @@
 							<c:when test="${workInvoice.invoiceState == '7'}">"是"</c:when>
 					<c:otherwise>"否"</c:otherwise>
 					</c:choose>
-					<shiro:hasPermission name="workinvoice:workInvoice:receipt">
-						,"financeFlag":
-							<c:choose>
-								<c:when test="${workInvoice.invoiceState == 5 && workInvoice.receiptMoney == '否'}">"1"</c:when>
-								<c:otherwise>"0"</c:otherwise>
-						</c:choose>
-					</shiro:hasPermission>
-					<shiro:hasPermission name="workinvoice:workInvoice:invalid">
-						,"cancellationFlag":
-							<c:choose>
-								<c:when test="${workInvoice.invoiceState == 5}">"1"</c:when>
-								<c:otherwise>"0"</c:otherwise>
-						</c:choose>
-					</shiro:hasPermission>
-					<shiro:hasPermission name="workinvoice:workInvoice:adminDel">
-						,"adminFlag":
-							<c:choose>
-								<c:when test="${workInvoice.invoiceState == 5}">"1"</c:when>
-								<c:otherwise>"0"</c:otherwise>
-						</c:choose>
-					</shiro:hasPermission>
+<%--					<shiro:hasPermission name="workinvoice:workInvoice:receipt">--%>
+<%--						,"financeFlag":--%>
+<%--							<c:choose>--%>
+<%--								<c:when test="${workInvoice.invoiceState == 5 && workInvoice.receiptMoney == '否'}">"1"</c:when>--%>
+<%--								<c:otherwise>"0"</c:otherwise>--%>
+<%--						</c:choose>--%>
+<%--					</shiro:hasPermission>--%>
+<%--					<shiro:hasPermission name="workinvoice:workInvoice:invalid">--%>
+<%--						,"cancellationFlag":--%>
+<%--							<c:choose>--%>
+<%--								<c:when test="${workInvoice.invoiceState == 5}">"1"</c:when>--%>
+<%--								<c:otherwise>"0"</c:otherwise>--%>
+<%--						</c:choose>--%>
+<%--					</shiro:hasPermission>--%>
+<%--					<shiro:hasPermission name="workinvoice:workInvoice:adminDel">--%>
+<%--						,"adminFlag":--%>
+<%--							<c:choose>--%>
+<%--								<c:when test="${workInvoice.invoiceState == 5}">"1"</c:when>--%>
+<%--								<c:otherwise>"0"</c:otherwise>--%>
+<%--						</c:choose>--%>
+<%--					</shiro:hasPermission>--%>
                 }
                 </c:forEach>
                 </c:if>

+ 492 - 0
src/main/webapp/webpage/modules/workreimbursement/workReimbursementAllList.jsp

@@ -0,0 +1,492 @@
+<%@ page import="com.jeeplus.modules.sys.utils.UserUtils" %>
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+    <title>报销单管理</title>
+    <meta name="decorator" content="default"/>
+
+
+    <style>
+        .widthClass{
+            display: inline-block;
+        }
+        .shows .input-group{
+            width: 48%!important;
+        }
+    </style>
+    <style>
+        body{
+            background-color:transparent;
+            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#26FFFFFF, endColorstr=#26FFFFFF);
+            color:#ffffff;
+            background-color:rgba(255,255,255,0);
+            height:100%;
+        }
+    </style>
+</head>
+<body>
+<div class="wrapper wrapper-content">
+    <sys:message content="${message}"/>
+    <div class="layui-row">
+        <div class="full-width fl">
+            <div class="contentShadow layui-row" id="queryDiv">
+                <form:form id="searchForm" modelAttribute="workReimbursement" action="${ctx}/workreimbursement/workReimbursementAll/list" method="post" class="form-inline">
+                    <%--以下三行照抄--%>
+                    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
+                    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
+                    <table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
+                    <div class="commonQuery">
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">报销项目:</label>
+                            <div class="layui-input-block with-icon">
+                                <sys:gridselectcallprojectt url="${ctx}/workreimbursement/workReimbursementAll/selectprojectOnList" id="project" name="project.id"  value="${workReimbursement.project.id}"  title="选择报销项目" labelName="project.projectName"
+                                                            labelValue="${workReimbursement.project.projectName}" cssClass="form-control required layui-input" fieldLabels="项目" fieldKeys="projectName" searchLabel="项目名称" searchKey="projectName" ></sys:gridselectcallprojectt>
+                            </div>
+                        </div>
+                        <%--<div class="layui-item query athird">
+                            <label class="layui-form-label">报销时间:</label>
+                            <div class="layui-input-block">
+                                <input id="startDate" name="startDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+                                       value="<fmt:formatDate value="${workReimbursement.startDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">——&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
+                            <div class="layui-input-block">
+                                <input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon"
+                                       value="<fmt:formatDate value="${workReimbursement.endDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                            </div>
+                        </div>--%>
+
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">报销时间:</label>
+                            <div class="layui-input-block">
+                                <input id="startDate" placeholder="开始时间" name="startDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                       value="<fmt:formatDate value="${workReimbursement.startDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                                <span class="group-sep">-</span>
+                                <input id="endDate" placeholder="结束时间" name="endDate" type="text" readonly="readonly" maxlength="20" class="laydate-icondate form-control layer-date layui-input laydate-icon query-group"
+                                       value="<fmt:formatDate value="${workReimbursement.endDate}" pattern="yyyy-MM-dd"/>"/>
+                                </input>
+                            </div>
+                        </div>
+
+                        <div class="layui-item athird">
+                            <div class="input-group">
+                                <a href="#" id="moresee"><i class="glyphicon glyphicon-menu-down"></i></a>
+                                <button id="searchReset" class="fixed-btn searchReset fr" onclick="resetSearch()">重置</button>
+                                <button id="searchQuery" class="fixed-btn searchQuery fr" onclick="search()">查询</button>
+                            </div>
+                        </div>
+                        <div style="    clear:both;"></div>
+                    </div>
+                    <div id="moresees" style="clear:both;display:none;">
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">经办人:</label>
+                            <div class="layui-input-block with-icon">
+                                <sys:inquireselectUser id="handleId" name="handleId" value="${workReimbursement.handleId}" labelName="handleName" labelValue="${workReimbursement.handleName}"
+                                                title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">报销人:</label>
+                            <div class="layui-input-block with-icon">
+                                <sys:inquireselectUser id="submitterId" name="submitterId" value="${workReimbursement.submitterId}" labelName="submitterName" labelValue="${workReimbursement.submitterName}"
+                                                title="用户" url="/sys/office/treeDataAll?type=3" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">报销状态:</label>
+                            <div class="layui-input-block">
+                                <form:select path="status" class="form-control simple-select">
+                                    <form:option value="" label=""/>
+                                    <form:options items="${fns:getDictList('reimburse_audit_state')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
+                                </form:select>
+                            </div>
+                        </div>
+                        <div class="layui-item query athird">
+                            <label class="layui-form-label">报销部门:</label>
+                            <div class="layui-input-block with-icon">
+                                <sys:treeselect id="officeId" name="officeId" value="${workReimbursement.officeId}" labelName="officeName" labelValue="${workReimbursement.officeName}"
+                                                title="部门" url="/sys/office/treeDataAll?type=2" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="true"/>
+                            </div>
+                        </div>
+                        <div style="clear:both;"></div>
+                    </div>
+                </form:form>
+            </div>
+        </div>
+
+        <div class="full-width fl">
+            <div class="contentShadow layui-form contentDetails">
+                <div class="nav-btns">
+                    <%--此处按钮样式包括 nav-btn-add nav-btn-refresh nav-btn-import nav-btn-export nav-btn-query nav-btn-reset--%>
+                    <shiro:hasPermission name="workreimbursement:workReimbursementAll:add">
+                        <a href="javascript:void(0)" onclick="openDialogre('新增报销单', '${ctx}/workreimbursement/workReimbursementAll/form?tabId=0','95%','95%')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i>&nbsp;添加</a>
+                    </shiro:hasPermission>
+                    <button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i>&nbsp;刷新</button>
+                    <div style="clear: both;"></div>
+                </div>
+                <table class="oa-table layui-table" id="contentTable"></table>
+
+                <!-- 分页代码 -->
+                <table:page page="${page}"></table:page>
+                <div style="clear: both;"></div>
+            </div>
+        </div>
+    </div>
+    <div id="changewidth"></div>
+</div>
+<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
+<script>
+    layui.use('table', function(){
+        layui.table.render({
+            limit:${ page.pageSize }
+            ,elem: '#contentTable'
+            ,page: false
+            ,cols: [[
+                // {checkbox: true, fixed: true},
+                {field:'submitterId',align:'center',  width:40,title: '序号'}
+                ,{field:'number',align:'center', title: '报销编号', width:150,templet:function(d){
+                        var xml = "<a class=\"attention-info\" href=\"javascript:void(0)\" onclick=\"openDialogListView('查看报销单', '${ctx}/workreimbursement/workReimbursementAll/form?id=" + d.id + "&tabId=1','"+ d.id +"','95%','95%')\">" +
+                            "<span title=" + d.realnumber + ">" + d.number + "</span></a>";
+                        return xml;
+                    }}
+                ,{field:'projectId', align:'center',title: '报销项目', minWidth:150,templet:function(d){
+                        return "<span title='"+ d.projectId +"'>" + d.projectId + "</span>";
+                    }}
+                ,{field:'handleName',align:'center', title: '经办人', width:100,templet:function(d){
+                        return "<span title='"+ d.handleName +"'>" + d.handleName + "</span>";
+                    }}
+                ,{field:'submitterName',align:'center', title: '报销人', width:100,templet:function(d){
+                        return "<span title='"+ d.submitterName +"'>" + d.submitterName + "</span>";
+                    }}
+                ,{field:'officeId',align:'center', title: '报销部门', width:130,templet:function(d){
+                        return "<span title='"+ d.officeId +"'>" + d.officeId + "</span>";
+                    }}
+                ,/*{field:'projectLeader', align:'center',title: '项目负责人', width:80,templet:function(d){
+                        return "<span title='"+ d.projectLeader +"'>" + d.projectLeader + "</span>";
+                    }}
+                ,*/{field:'submitterDate', align:'center',title: '报销日期',width:80}
+                ,{field:'money',align:'center', title: '报销金额(元)', width:150,templet:function(d){
+                        return "<span title='"+ d.money +"'>" + d.money + "</span>";
+                    }}
+                /*,{field:'taskName', align:'center',title: '审批状态',width:120}*/
+                ,{ title: '状态', align:'center',width:70,templet:function(d){
+                        <%--var st = getAuditState(d.status);--%>
+                        <%--var xml = "<span onclick=\"openDialogView('流程追踪', '${ctx}/workreimbursement/workReimbursementAll/getProcessOne?id=" + d.id + "','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";--%>
+                        <%--return xml;--%>
+                        var st = getAuditState(d.status);
+                        if(st.action)
+                            var xml = "<span onclick=\"openDialogListView('流程追踪', '${ctx}/workreimbursement/workReimbursementAll/getProcessOne?id=" + d.id + "','"+ d.id +"','95%','95%')\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+                        else
+                            var xml = "<span style=\"cursor:default;\" class=\"status-label status-label-" + st.label + "\" >" + st.status + "</span>";
+                        return xml;
+                    }}
+                // ,{fixed: 'right',align:'center', toolbar: '#op',title:"操作"}
+                ,{align:'center',title:"操作",width:130,templet:function(d){
+                        ////对操作进行初始化
+                        var xml = "";
+                        if(d.cancancel != undefined && d.cancancel == "1")
+                            xml += "<a href=\"${ctx}/workreimbursement/workReimbursementAll/cancelInvalidate?id=" + d.id + "\" onclick=\"return confirmx('确认要强制撤回?', this.href)\"   class=\"op-btn op-btn-cancel\"><i class=\"glyphicon glyphicon-share-alt\"></i> 撤回</a>";
+                        if(d.canedit1 != undefined && d.canedit1 == "1")
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogre('修改报销单', '${ctx}/workreimbursement/workReimbursementAll/form?id="+ d.id + "','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                        if(d.canedit2 != undefined && d.canedit2 == "1")
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreModify('修改报销单', '${ctx}/workreimbursement/workReimbursementAll/form?id="+ d.id + "&tabId=3','"+ d.id +"','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                        if(d.canedit3 != undefined && d.canedit3 == "1")
+                            xml +="<a href=\"javascript:void(0)\" onclick=\"openDialogreplay('重新申请报销单', '${ctx}/workreimbursement/workReimbursementAll/form?id=" + d.id + "&tabId=4','95%','95%')\" class=\"op-btn op-btn-edit\" ><i class=\"fa fa-edit\"></i> 修改</a>";
+                        if(d.candelete != undefined && d.candelete == "1")
+                            xml +="<a href=\"${ctx}/workreimbursement/workReimbursementAll/delete?id=" + d.id + "\" onclick=\"return confirmx('确认要删除该报销单吗?', this.href)\"   class=\"op-btn op-btn-delete\"><i class=\"fa fa-trash\"></i> 删除</a>";
+
+                        return xml;
+                    }}
+            ]]
+            ,data: [
+                <c:if test="${ not empty page.list}">
+                <c:forEach items="${page.list}" var="workReimbursement" varStatus="index">
+                <c:if test="${index.index != 0}">,</c:if>
+                {
+                    "index":"${index.index+1}"
+                    ,"id":"${workReimbursement.id}"
+                    ,"submitterId":"${index.index+1}"
+                    ,"realnumber":"${workReimbursement.number}"
+                    ,"number":"${workReimbursement.number}"
+                    ,"taskName":"${workReimbursement.taskName}"
+                    ,"submitterName":"<c:out value="${fns:getUserById(workReimbursement.submitterId).name}" escapeXml="true"/>"
+                    ,"handleName":"<c:out value="${fns:getUserById(workReimbursement.handleId).name}" escapeXml="true"/>"
+                    ,"officeId":"${fns:getOfficeById(workReimbursement.officeId).name}"
+                    ,"projectId":
+                        <c:if test="${workReimbursement.ext == 1}">
+                            "<c:out value="${workReimbursement.projectName}" escapeXml="true"/>"
+                        </c:if>
+                        <c:if test="${workReimbursement.ext != 1}">
+                            "<c:out value="${workReimbursement.project.projectName}" escapeXml="true"/>"
+                        </c:if>
+                    ,"projectLeader":
+                        <c:if test="${not empty workReimbursement.project && not empty workReimbursement.project.leaderNameStr}">
+                            "<c:out value="${workReimbursement.project.leaderNameStr}" escapeXml="true"/>"
+                    </c:if>
+                    <c:if test="${empty workReimbursement.project || empty workReimbursement.project.leaderNameStr}">
+                    ""
+                    </c:if>
+                    ,"submitterDate":"<fmt:formatDate value="${workReimbursement.submitterDate}" pattern="yyyy-MM-dd"/>"
+                    ,"money":"<fmt:formatNumber value="${workReimbursement.money}" pattern="#,#0.00"/>"
+                    ,"status":"${workReimbursement.status}"
+<%--                    <shiro:hasPermission name="workreimbursement:workReimbursement:del">--%>
+<%--                    ,"candelete":--%>
+<%--                        <c:if test="${fns:getUser().id == workReimbursement.createBy.id && (workReimbursement.status == '1' or workReimbursement.status == '3' or workReimbursement.status == '4')}">"1"</c:if>--%>
+<%--                    <c:if test="${fns:getUser().id != workReimbursement.createBy.id || (workReimbursement.status != '1' and workReimbursement.status != '3' and workReimbursement.status != '4')}">"0"</c:if>--%>
+<%--                    </shiro:hasPermission>--%>
+<%--                    ,"cancancel":--%>
+<%--                        <c:if test="${workReimbursement.status == '2' && fns:getUser().id == workReimbursement.createBy.id}">"1"</c:if>--%>
+<%--                    <c:if test="${workReimbursement.status != '2' || fns:getUser().id != workReimbursement.createBy.id}">"0"</c:if>--%>
+<%--                    <shiro:hasPermission name="workreimbursement:workReimbursement:edit">--%>
+<%--                    ,"canedit1":--%>
+<%--                        <c:if test="${fns:getUser().id == workReimbursement.createBy.id && workReimbursement.status == '1' }">"1"</c:if>--%>
+<%--                    <c:if test="${fns:getUser().id != workReimbursement.createBy.id || workReimbursement.status != '1' }">"0"</c:if>--%>
+<%--                    ,"canedit2":--%>
+<%--                        <c:if test="${fns:getUser().id == workReimbursement.createBy.id && workReimbursement.status == '4' && fns:getUser().id == workReimbursement.createBy.id}">"1"</c:if>--%>
+<%--                    <c:if test="${fns:getUser().id != workReimbursement.createBy.id || workReimbursement.status != '4' || fns:getUser().id != workReimbursement.createBy.id}">"0"</c:if>--%>
+<%--                    ,"canedit3":--%>
+<%--                        <c:if test="${workReimbursement.status == '3' && fns:getUser().id == workReimbursement.createBy.id}">"1"</c:if>--%>
+<%--                    <c:if test="${workReimbursement.status != '3' || fns:getUser().id != workReimbursement.createBy.id}">"0"</c:if>--%>
+<%--                    </shiro:hasPermission>--%>
+                }
+                </c:forEach>
+                </c:if>
+            ]
+            // ,even: true
+            // ,height: 315
+        });
+    })
+    resizeListTable();
+    $("a").on("click",addLinkVisied);
+</script>
+<script>
+    resizeListWindow1();
+    $(window).resize(function(){
+        resizeListWindow1();
+    });
+</script>
+<script type="text/javascript">
+    $(document).ready(function() {
+        $("#cus_name").show();
+        $("#cus_name").siblings().hide();
+        //搜索框收放
+        $('#moresee').click(function(){
+            if($('#moresees').is(':visible'))
+            {
+                $('#moresees').slideUp(0,resizeListWindow1);
+                $('#moresee i').removeClass("glyphicon glyphicon-menu-up").addClass("glyphicon glyphicon-menu-down");
+            }else{
+                $('#moresees').slideDown(0,resizeListWindow1);
+                $('#moresee i').removeClass("glyphicon glyphicon-menu-down").addClass("glyphicon glyphicon-menu-up");
+            }
+        });
+
+        laydate.render({
+            elem: '#startDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'date'
+, trigger: 'click'
+        });
+        laydate.render({
+            elem: '#endDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎,因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
+            event: 'focus', //响应事件。如果没有传入event,则按照默认的click
+            type : 'date'
+, trigger: 'click'
+        });
+    });
+    function switchInput(obj){
+        $("#"+obj).show();
+        $("#"+obj).siblings().hide();
+    }
+    function openDialogre(title,url,width,height,target){
+
+        if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+            width='auto';
+            height='auto';
+        }else{//如果是PC端,根据用户设置的width和height显示。
+
+        }
+        top.layer.open({
+            type: 2,
+            area: [width, height],
+            title: title,
+            skin: 'three-btns',
+            maxmin: true, //开启最大化最小化按钮
+            content: url ,
+            btn: ['送审','暂存','关闭'],
+            btn1: function(index, layero){
+                var body = top.layer.getChildFrame('body', index);
+                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                var inputForm = body.find('#inputForm');
+                var top_iframe;
+                if(target){
+                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                }else{
+                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                }
+                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                if(iframeWin.contentWindow.doSubmit(1) ){
+                    //top.layer.close(index);//关闭对话框。
+                    setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                }
+            },
+            btn2:function(index,layero){
+                var body = top.layer.getChildFrame('body', index);
+                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                var inputForm = body.find('#inputForm');
+                var top_iframe;
+                if(target){
+                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                }else{
+                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                }
+                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+                if(iframeWin.contentWindow.doSubmit(2) ){
+                   // top.layer.close(index);//关闭对话框。
+                       setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                }
+                return false;
+            },
+            btn3: function(index){
+            }
+        });
+    }
+    function openDialogreplay(title,url,width,height,target){
+
+        if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+            width='auto';
+            height='auto';
+        }else{//如果是PC端,根据用户设置的width和height显示。
+
+        }
+        top.layer.open({
+            type: 2,
+            area: [width, height],
+            title: title,
+            skin: 'two-btns',
+            maxmin: true, //开启最大化最小化按钮
+            content: url ,
+            btn: ['重新申请','关闭'],
+            yes: function(index, layero){
+                var body = top.layer.getChildFrame('body', index);
+                var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                var inputForm = body.find('#inputForm');
+                var top_iframe;
+                if(target){
+                    top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                }else{
+                    top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                }
+                inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                if(iframeWin.contentWindow.doSubmit() ){
+                    top.layer.close(index);//关闭对话框。
+                    //setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                }
+
+            },
+            cancel: function(index){
+            }
+        });
+    }
+
+
+    function openDialogreModify(title,url,id,width,height,target) {
+
+        if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {//如果是移动端,就使用自适应大小弹窗
+            width = 'auto';
+            height = 'auto';
+        } else {//如果是PC端,根据用户设置的width和height显示。
+
+        }
+
+        $.ajax({
+            async: false,
+            url: "${ctx}/workreimbursement/workReimbursementAll/getExist?id="+id,
+            dataType: "json",
+            success: function (data) {
+                if(data.success){
+                    top.layer.open({
+                        type: 2,
+                        area: [width, height],
+                        title: title,
+                        skin: 'two-btns',
+                        maxmin: true, //开启最大化最小化按钮
+                        content: url ,
+                        btn: ['重新申请','关闭'],
+                        yes: function(index, layero){
+                            var body = top.layer.getChildFrame('body', index);
+                            var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                            var inputForm = body.find('#inputForm');
+                            var top_iframe;
+                            if(target){
+                                top_iframe = target;//如果指定了iframe,则在改frame中跳转
+                            }else{
+                                top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
+                            }
+                            inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
+
+                            if(iframeWin.contentWindow.doSubmit() ){
+                                top.layer.close(index);//关闭对话框。
+                                //setTimeout(function(){top.layer.close(index)}, 100);//延时0.1秒,对应360 7.1版本bug
+                            }
+
+                        },
+                        cancel: function(index){
+                        }
+                    });
+                }else{
+                    top.layer.msg("该报销信息已删除!", {icon: 0});
+                    window.location.reload();
+                }
+            }
+        });
+
+
+    }
+
+
+    //打开对话框(查看)
+    function openDialogListView(title,url,id,width,height){
+
+
+        if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端,就使用自适应大小弹窗
+            width='auto';
+            height='auto';
+        }else{//如果是PC端,根据用户设置的width和height显示。
+
+        }
+        $.ajax({
+            async: false,
+            url: "${ctx}/workreimbursement/workReimbursementAll/getExist?id="+id,
+            dataType: "json",
+            success: function (data) {
+                if(data.success){
+                    top.layer.open({
+                        type: 2,
+                        skin: 'one-btn',
+                        area: [width, height],
+                        title: title,
+                        maxmin: true, //开启最大化最小化按钮
+                        content: url ,
+                        btn: ['关闭'],
+                        cancel: function(index){
+                        }
+                    });
+                }else{
+                    top.layer.msg("该报销信息已删除!", {icon: 0});
+                    window.location.reload();
+                }
+            }
+        });
+
+    }
+</script>
+</body>
+</html>