Commit 16f67552 by 罗鑫

功能

parent 06c3b738
......@@ -15,4 +15,6 @@ import com.spk.zyse.key.entity.*;
public interface KeyDisciplinesDao extends BaseMapper<KeyDisciplines>{
public PageQuery<KeyDisciplines> queryByCondition(PageQuery query);
public void batchDelKeyDisciplinesByIds( List<Long> ids);
public PageQuery<KeyDisciplines> synList(PageQuery page);
public void deleteKeyDisciplinesEdit(String id, String processinstId);
}
\ No newline at end of file
package com.spk.zyse.key.dao;
import java.util.List;
import org.beetl.sql.core.annotatoin.SqlResource;
import org.beetl.sql.core.mapper.BaseMapper;
import org.beetl.sql.core.engine.PageQuery;
import com.spk.zyse.key.entity.*;
/**
* KeyDisciplinesPersonnel Dao
*/
@SqlResource("key.keyDisciplinesPersonnel")
public interface KeyDisciplinesPersonnelDao extends BaseMapper<KeyDisciplinesPersonnel>{
public PageQuery<KeyDisciplinesPersonnel> queryByCondition(PageQuery query);
public void batchDelKeyDisciplinesPersonnelByIds( List<Long> ids);
}
\ No newline at end of file
......@@ -15,4 +15,6 @@ import com.spk.zyse.key.entity.*;
public interface KeyResearchOfficeDao extends BaseMapper<KeyResearchOffice>{
public PageQuery<KeyResearchOffice> queryByCondition(PageQuery query);
public void batchDelKeyResearchOfficeByIds( List<Long> ids);
public PageQuery<KeyResearchOffice> synList(PageQuery page);
public void deleteKeyResearchOfficeEdit(String id, String processinstId);
}
\ No newline at end of file
package com.spk.zyse.key.entity;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import org.beetl.sql.core.annotatoin.AutoID;
import org.beetl.sql.core.annotatoin.SeqID;
import com.spk.admin.core.util.ValidateConfig;
import org.beetl.sql.core.TailBean;
import java.math.*;
import com.spk.admin.core.annotation.Dict;
import com.spk.admin.core.entity.BaseEntity;
import org.beetl.sql.core.annotatoin.InsertIgnore;
import org.beetl.sql.core.annotatoin.Version;
import org.beetl.sql.core.annotatoin.LogicDelete;
/*
*
* gen by Spring Boot2 Admin 2022-12-28
*/
public class KeyDisciplinesPersonnel extends BaseEntity{
//主键
@NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
@SeqID(name = ORACLE_CORE_SEQ_NAME)
@AutoID
private Integer id ;
//姓名
private String name ;
//学科名称
private String subjectName ;
//类别
@Dict(type="key_disciplines_personnel_type")
private String type ;
//出生日期
private Date birthday ;
//职称
private String title ;
//创建时间
private Date createTime ;
//修改时间
private Date updateTime ;
public KeyDisciplinesPersonnel()
{
}
/**主键
*@return
*/
public Integer getId(){
return id;
}
/**主键
*@param id
*/
public void setId(Integer id){
this.id = id;
}
/**姓名
*@return
*/
public String getName(){
return name;
}
/**姓名
*@param name
*/
public void setName(String name){
this.name = name;
}
/**学科名称
*@return
*/
public String getSubjectName(){
return subjectName;
}
/**学科名称
*@param subjectName
*/
public void setSubjectName(String subjectName){
this.subjectName = subjectName;
}
/**类别
*@return
*/
public String getType(){
return type;
}
/**类别
*@param type
*/
public void setType(String type){
this.type = type;
}
/**出生日期
*@return
*/
public Date getBirthday(){
return birthday;
}
/**出生日期
*@param birthday
*/
public void setBirthday(Date birthday){
this.birthday = birthday;
}
/**职称
*@return
*/
public String getTitle(){
return title;
}
/**职称
*@param title
*/
public void setTitle(String title){
this.title = title;
}
/**创建时间
*@return
*/
public Date getCreateTime(){
return createTime;
}
/**创建时间
*@param createTime
*/
public void setCreateTime(Date createTime){
this.createTime = createTime;
}
/**修改时间
*@return
*/
public Date getUpdateTime(){
return updateTime;
}
/**修改时间
*@param updateTime
*/
public void setUpdateTime(Date updateTime){
this.updateTime = updateTime;
}
}
package com.spk.zyse.key.service;
import java.util.List;
import org.beetl.sql.core.engine.PageQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.spk.admin.core.util.PlatformException;
import com.spk.zyse.key.dao.KeyDisciplinesPersonnelDao;
import com.spk.zyse.key.entity.KeyDisciplinesPersonnel;
import com.spk.admin.core.service.BaseService;
/**
* KeyDisciplinesPersonnel Service
*/
@Service
@Transactional
public class KeyDisciplinesPersonnelService extends BaseService<KeyDisciplinesPersonnel>{
@Autowired private KeyDisciplinesPersonnelDao keyDisciplinesPersonnelDao;
public PageQuery<KeyDisciplinesPersonnel>queryByCondition(PageQuery query){
PageQuery ret = keyDisciplinesPersonnelDao.queryByCondition(query);
queryListAfter(ret.getList());
return ret;
}
public void batchDelKeyDisciplinesPersonnel(List<Long> ids){
try {
keyDisciplinesPersonnelDao.batchDelKeyDisciplinesPersonnelByIds(ids);
} catch (Exception e) {
throw new PlatformException("批量删除失败", e);
}
}
}
\ No newline at end of file
......@@ -12,6 +12,7 @@ import com.spk.admin.core.util.PlatformException;
import com.spk.zyse.key.dao.KeyDisciplinesDao;
import com.spk.zyse.key.entity.KeyDisciplines;
import com.spk.zyse.result.entity.ResultKeepOnRecord;
import com.spk.zyse.result.entity.ResultWork;
import com.spk.zyse.uwf.entity.ProUwfActivitydef;
import com.spk.zyse.uwf.service.ProUwfActivityInstService;
import com.spk.zyse.uwf.service.ProUwfProcessInstService;
......@@ -40,6 +41,13 @@ public class KeyDisciplinesService extends BaseService<KeyDisciplines>{
return ret;
}
//重点学科综合查询
public PageQuery<KeyDisciplines> synList(PageQuery page) {
PageQuery ret = keyDisciplinesDao.synList(page);
queryListAfter(ret.getList());
return ret;
}
public void submit(KeyDisciplines keyDisciplines) {
sqlManager.insert(KeyDisciplines.class, keyDisciplines);
String result = proUwfProcessInstService.saveOrUpdatePorcessInst(21L, keyDisciplines.getProcessinstId());
......@@ -135,11 +143,17 @@ public class KeyDisciplinesService extends BaseService<KeyDisciplines>{
}
public void deleteKeyDisciplinesEdit(String id,String processinstId) {
proUwfActivityInstService.deleteProUwfActivityInst(processinstId);
proUwfProcessInstService.deleteProUwfProcessInst(processinstId);
keyDisciplinesDao.deleteKeyDisciplinesEdit(id,processinstId);
}
public void batchDelKeyDisciplines(List<Long> ids){
try {
keyDisciplinesDao.batchDelKeyDisciplinesByIds(ids);
} catch (Exception e) {
throw new PlatformException("批量删除KeyDisciplines失败", e);
throw new PlatformException("批量删除失败", e);
}
}
}
\ No newline at end of file
......@@ -10,8 +10,14 @@ import org.springframework.transaction.annotation.Transactional;
import com.spk.admin.core.util.PlatformException;
import com.spk.zyse.key.dao.KeyResearchOfficeDao;
import com.spk.zyse.key.entity.KeyDisciplines;
import com.spk.zyse.key.entity.KeyResearchOffice;
import com.spk.zyse.uwf.entity.ProUwfActivitydef;
import com.spk.zyse.uwf.service.ProUwfActivityInstService;
import com.spk.zyse.uwf.service.ProUwfProcessInstService;
import com.spk.admin.core.entity.CoreUser;
import com.spk.admin.core.service.BaseService;
import com.spk.admin.core.service.CorePlatformService;
/**
* KeyResearchOffice Service
......@@ -22,18 +28,131 @@ import com.spk.admin.core.service.BaseService;
public class KeyResearchOfficeService extends BaseService<KeyResearchOffice>{
@Autowired private KeyResearchOfficeDao keyResearchOfficeDao;
@Autowired
private ProUwfProcessInstService proUwfProcessInstService;
@Autowired
private ProUwfActivityInstService proUwfActivityInstService;
@Autowired
private CorePlatformService platformService;
public PageQuery<KeyResearchOffice>queryByCondition(PageQuery query){
PageQuery ret = keyResearchOfficeDao.queryByCondition(query);
queryListAfter(ret.getList());
return ret;
}
public PageQuery<KeyResearchOffice> synList(PageQuery page) {
PageQuery ret = keyResearchOfficeDao.synList(page);
queryListAfter(ret.getList());
return ret;
}
public void submit(KeyResearchOffice keyResearchOffice) {
sqlManager.insert(KeyResearchOffice.class, keyResearchOffice);
String result = proUwfProcessInstService.saveOrUpdatePorcessInst(22L, keyResearchOffice.getProcessinstId());
if(!"success".equals(result)) {
Exception e=new Exception(result);
throw new PlatformException(e.getMessage(), e);
}
List<ProUwfActivitydef> def = proUwfActivityInstService.getNextActivityDef(22L, keyResearchOffice.getProcessinstId(), true);
String result1 = proUwfActivityInstService.gotoNextActivityDef(22L, keyResearchOffice.getProcessinstId(), def.get(0).getActivitydefId(), platformService.getCurrentUser().getId(), true,false);
if(!"success".equals(result1)) {
Exception e=new Exception(result1);
throw new PlatformException(e.getMessage(), e);
}
}
public void saveEntity(KeyResearchOffice keyResearchOffice) {
sqlManager.insert(KeyResearchOffice.class, keyResearchOffice);
String result = proUwfProcessInstService.saveOrUpdatePorcessInst(22L, keyResearchOffice.getProcessinstId());
if(!"success".equals(result)) {
Exception e=new Exception(result);
throw new PlatformException(e.getMessage(), e);
}
String result1 = proUwfActivityInstService.gotoNextActivityDef(22L, keyResearchOffice.getProcessinstId(), null, platformService.getCurrentUser().getId(), true,true);
if(!"success".equals(result1)) {
Exception e=new Exception(result1);
throw new PlatformException(e.getMessage(), e);
}
}
public void updateAndSubmit(KeyResearchOffice keyResearchOffice) {
sqlManager.updateTemplateById(keyResearchOffice);
String result = proUwfProcessInstService.saveOrUpdatePorcessInst(22L, keyResearchOffice.getProcessinstId());
if(!"success".equals(result)) {
Exception e=new Exception(result);
throw new PlatformException(e.getMessage(), e);
}
List<ProUwfActivitydef> def = proUwfActivityInstService.getNextActivityDef(22L, keyResearchOffice.getProcessinstId(), true);
String result1 = proUwfActivityInstService.gotoNextActivityDef(22L, keyResearchOffice.getProcessinstId(), def.get(0).getActivitydefId(), platformService.getCurrentUser().getId(), true,false);
if(!"success".equals(result1)) {
Exception e=new Exception(result1);
throw new PlatformException(e.getMessage(), e);
}
}
public void updateEntity(KeyResearchOffice keyResearchOffice) {
sqlManager.updateTemplateById(keyResearchOffice);
String result = proUwfProcessInstService.saveOrUpdatePorcessInst(22L, keyResearchOffice.getProcessinstId());
if(!"success".equals(result)) {
Exception e=new Exception(result);
throw new PlatformException(e.getMessage(), e);
}
String result1 = proUwfActivityInstService.gotoNextActivityDef(22L, keyResearchOffice.getProcessinstId(), null, platformService.getCurrentUser().getId(), true,true);
if(!"success".equals(result1)) {
Exception e=new Exception(result1);
throw new PlatformException(e.getMessage(), e);
}
}
public void handleSubmit(KeyResearchOffice work) {
sqlManager.updateTemplateById(work);
CoreUser coreUser = platformService.getCurrentUser();
String result = proUwfActivityInstService.updateActivityInst(work.getProcessinstId(), coreUser.getId(), true);
if(!"success".equals(result)) {
Exception e=new Exception(result);
throw new PlatformException(e.getMessage(), e);
}
List<ProUwfActivitydef> def = proUwfActivityInstService.getNextActivityDef(22L, work.getProcessinstId(), false);
String result2 = proUwfActivityInstService.gotoNextActivityDef(22L, work.getProcessinstId(), def.get(0).getActivitydefId(), coreUser.getId(), false, false);
if(!"success".equals(result2)) {
Exception e=new Exception(result2);
throw new PlatformException(e.getMessage(), e);
}
}
public void back(KeyResearchOffice work, String returnReason) {
CoreUser coreUser = platformService.getCurrentUser();
String result = proUwfActivityInstService.updateActivityInst(work.getProcessinstId(), coreUser.getId(), true);
if(!"success".equals(result)) {
Exception e=new Exception(result);
throw new PlatformException(e.getMessage(), e);
}
ProUwfActivitydef beginDef = proUwfActivityInstService.getBeginDef(22L);
String goBack = proUwfActivityInstService.goBack(22L, work.getProcessinstId(), beginDef.getActivitydefId(), coreUser.getId(), returnReason);
if(!"success".equals(goBack)) {
Exception e=new Exception(goBack);
throw new PlatformException(e.getMessage(), e);
}
}
public void batchDelKeyResearchOffice(List<Long> ids){
try {
keyResearchOfficeDao.batchDelKeyResearchOfficeByIds(ids);
} catch (Exception e) {
throw new PlatformException("批量删除KeyResearchOffice失败", e);
throw new PlatformException("批量删除失败", e);
}
}
public void deleteKeyResearchOfficeEdit(String id, String processinstId) {
proUwfActivityInstService.deleteProUwfActivityInst(processinstId);
proUwfProcessInstService.deleteProUwfProcessInst(processinstId);
keyResearchOfficeDao.deleteKeyResearchOfficeEdit(id,processinstId);
}
}
\ No newline at end of file
......@@ -39,6 +39,8 @@ import com.spk.admin.console.web.query.UserQuery;
import com.spk.admin.core.annotation.Function;
import com.spk.admin.core.annotation.Query;
import com.spk.admin.core.entity.CoreDict;
import com.spk.admin.core.entity.CoreOrg;
import com.spk.admin.core.entity.CoreRole;
import com.spk.admin.core.entity.CoreUser;
import com.spk.admin.core.file.FileItem;
import com.spk.admin.core.file.FileService;
......@@ -49,7 +51,9 @@ import com.spk.zyse.key.entity.*;
import com.spk.zyse.key.service.*;
import com.spk.zyse.key.web.query.*;
import com.spk.zyse.result.entity.ResultKeepOnRecord;
import com.spk.zyse.result.entity.ResultWork;
import com.spk.zyse.result.web.query.ResultKeepOnRecordQuery;
import com.spk.zyse.result.web.query.ResultWorkQuery;
import com.spk.zyse.uwf.entity.ProUwfActivityInst;
import com.spk.zyse.uwf.service.ProUwfActivityInstService;
......@@ -106,6 +110,35 @@ public class KeyDisciplinesController{
return view;
}
//重点学科综合查询页面
@GetMapping(MODEL + "/synIndex.do")
@Function("keyDisciplines.query")
@ResponseBody
public ModelAndView synIndex() {
ModelAndView view = new ModelAndView("/key/keyDisciplines/synIndex.html");
CoreRole coreRole = platformService.getCurrentRole(platformService.getCurrentUser().getId());
view.addObject("coreRole", coreRole);
view.addObject("search", KeyDisciplinesQuery.class.getName());
return view;
}
//重点学科综合查询修改页面
@GetMapping(MODEL + "/passEdit.do")
@Function("keyDisciplines.edit")
@ResponseBody
public ModelAndView passEdit(Integer id,String status,String approvalstate) {
ModelAndView view = new ModelAndView("/key/keyDisciplines/passEdit.html");
KeyDisciplines keyDisciplines = keyDisciplinesService.queryById(id);
view.addObject("keyDisciplines", keyDisciplines);
ProUwfActivityInst history = proUwfActivityInstService.getNewActivity(keyDisciplines.getProcessinstId());
view.addObject("status", status);
if(history!=null && !"0".equals(approvalstate)) {
view.addObject("returnReason", history.getReturnReason());
}else {
view.addObject("returnReason", "");
}
return view;
}
@GetMapping(MODEL + "/edit.do")
@Function("keyDisciplines.edit")
@ResponseBody
......@@ -148,6 +181,9 @@ public class KeyDisciplinesController{
if (!StringUtils.isEmpty(condtion.getImportantSubjectName())) {
keyUpperCase.append("and servicetable.IMPORTANT_SUBJECT_NAME like '%").append(condtion.getImportantSubjectName()).append("%'");
}
if (!StringUtils.isEmpty(condtion.getReportPerson())) {
keyUpperCase.append("and servicetable.REPORT_PERSON like '%").append(condtion.getReportPerson()).append("%'");
}
condtion.setQuerysql(keyUpperCase.toString());
PageQuery page = proUwfActivityInstService.waitinglist(condtion, coreUser);
return JsonResult.success(page);
......@@ -180,7 +216,6 @@ public class KeyDisciplinesController{
keyDisciplines.setProcessinstId(work.getProcessinstId());
keyDisciplines.setCreateTime(work.getCreateTime());
keyDisciplines.setUpdateTime(new Date());
keyDisciplines.setCreateTime(new Date());
keyDisciplines.setUserId(work.getUserId());
if("0".equals(flag)) {
keyDisciplinesService.updateAndSubmit(keyDisciplines);
......@@ -198,13 +233,31 @@ public class KeyDisciplinesController{
return JsonResult.success(keyDisciplines);
}
/**
* <p>Title: synList</p>
* <p>Description:综合查询接口</p>
* @param condtion
* @return
* @author MJF
*/
@PostMapping(MODEL + "/synList.json")
@Function("keyDisciplines.query")
@ResponseBody
public JsonResult<PageQuery> synList(KeyDisciplinesQuery condtion){
PageQuery page = null;
page = condtion.getPageQuery();
keyDisciplinesService.synList(page);
return JsonResult.success(page);
}
@PostMapping(MODEL + "/handle.json")
@Function("resultWork.query")
@Function("keyDisciplines.query")
@ResponseBody
public JsonResult handle(@Validated(ValidateConfig.ADD.class)KeyDisciplines keyDisciplines,String flag,String returnReason) {
KeyDisciplines work = keyDisciplinesService.queryById(keyDisciplines.getId());
if("0".equals(flag)) {
work.setState("1");
work.setCheckTime(new Date());
keyDisciplinesService.handleSubmit(work);
}else if("1".equals(flag)){
keyDisciplinesService.back(work,returnReason);
......@@ -212,8 +265,21 @@ public class KeyDisciplinesController{
return new JsonResult().success();
}
//重点学科综合查询修改保存功能
@PostMapping(MODEL + "/passUpdate.json")
@Function("keyDisciplines.update")
@ResponseBody
public JsonResult<String> passUpdate(@Validated(ValidateConfig.UPDATE.class) KeyDisciplines keyDisciplines) {
KeyDisciplines paper = keyDisciplinesService.queryById(keyDisciplines.getId());
keyDisciplines.setProcessinstId(paper.getProcessinstId());
keyDisciplines.setUserId(paper.getUserId());
keyDisciplines.setUpdateTime(new Date());
keyDisciplinesService.updateTemplate(keyDisciplines);
return new JsonResult().success();
}
@PostMapping(MODEL + "/batchBack.json")
@Function("resultWork.add")
@Function("keyDisciplines.add")
@ResponseBody
public JsonResult batchBack(String ids, String returnReason) {
if (ids.endsWith(",")) {
......@@ -226,6 +292,45 @@ public class KeyDisciplinesController{
}
return new JsonResult().success();
}
//重点科学综合查询
@PostMapping(MODEL + "/passExport.json")
@Function("keyDisciplines.export")
@ResponseBody
public JsonResult<String> passExport(HttpServletResponse response,KeyDisciplinesQuery condtion) {
/**
* 1)需要用你自己编写一个的excel模板
* 2)通常excel导出需要关联更多数据,因此operationInformationService.queryByCondition方法经常不符合需求,需要重写一个为模板导出的查询
* 3)参考ConsoleDictController来实现模板导入导出
*/
String excelTemplate ="excelTemplates/key/key_disciplines.xls";
condtion.setPage(1);
condtion.setLimit(Integer.MAX_VALUE);
PageQuery<KeyDisciplines> page = condtion.getPageQuery();
//取出全部符合条件的
/* page.setPageSize(Integer.MAX_VALUE);
page.setPageNumber(1);
page.setTotalRow(Integer.MAX_VALUE);*/
//本次导出需要的数据
List<KeyDisciplines> list =keyDisciplinesService.synList(page).getList();
for(int i=0;i<list.size();i++) {
list.get(i).set("serialNumber", i+1);
}
try(InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(excelTemplate)) {
if(is==null) {
throw new PlatformException("模板资源不存在:"+excelTemplate);
}
FileItem item = fileService.createFileTemp("重点学科"+DateUtil.now("yyyyMMddHHmmss")+".xls");
OutputStream os = item.openOutpuStream();
Context context = new Context();
context.putVar("list", list);
JxlsHelper.getInstance().processTemplate(is, os, context);
os.close();
//下载参考FileSystemContorller
return JsonResult.success(item.getPath());
} catch (IOException e) {
throw new PlatformException(e.getMessage());
}
}
@PostMapping(MODEL + "/delete.json")
@Function("keyDisciplines.delete")
......@@ -239,5 +344,11 @@ public class KeyDisciplinesController{
return new JsonResult().success();
}
@PostMapping(MODEL + "/deleteKeyDisciplinesEdit.json")
@Function("keyDisciplines.delete")
@ResponseBody
public JsonResult deleteKeyDisciplinesEdit(String id,String processinstId) {
keyDisciplinesService.deleteKeyDisciplinesEdit(id,processinstId);
return new JsonResult().success();
}
}
package com.spk.zyse.key.web;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.beetl.sql.core.engine.PageQuery;
import org.jxls.common.Context;
import org.jxls.reader.ReaderBuilder;
import org.jxls.reader.ReaderConfig;
import org.jxls.reader.XLSReadMessage;
import org.jxls.reader.XLSReadStatus;
import org.jxls.reader.XLSReader;
import org.jxls.util.JxlsHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import com.spk.admin.console.web.dto.DictExcelImportData;
import com.spk.admin.console.web.query.UserQuery;
import com.spk.admin.core.annotation.Function;
import com.spk.admin.core.annotation.Query;
import com.spk.admin.core.entity.CoreDict;
import com.spk.admin.core.entity.CoreUser;
import com.spk.admin.core.file.FileItem;
import com.spk.admin.core.file.FileService;
import com.spk.admin.core.web.JsonResult;
import com.spk.admin.core.util.*;
import com.spk.zyse.key.entity.*;
import com.spk.zyse.key.service.*;
import com.spk.zyse.key.web.query.*;
/**
* KeyDisciplinesPersonnel 接口
*/
@Controller
public class KeyDisciplinesPersonnelController{
private final Log log = LogFactory.getLog(this.getClass());
private static final String MODEL = "/key/keyDisciplinesPersonnel";
@Autowired private KeyDisciplinesPersonnelService keyDisciplinesPersonnelService;
@Autowired
FileService fileService;
/* 页面 */
@GetMapping(MODEL + "/index.do")
@Function("keyDisciplinesPersonnel.query")
@ResponseBody
public ModelAndView index() {
ModelAndView view = new ModelAndView("/key/keyDisciplinesPersonnel/index.html") ;
view.addObject("search", KeyDisciplinesPersonnelQuery.class.getName());
return view;
}
@GetMapping(MODEL + "/indexKemi.do")
@Function("keyDisciplinesPersonnel.query")
@ResponseBody
public ModelAndView indexKemi() {
ModelAndView view = new ModelAndView("/key/keyDisciplinesPersonnel/indexKemi.html") ;
view.addObject("search", KeyDisciplinesPersonnelQuery.class.getName());
return view;
}
@GetMapping(MODEL + "/edit.do")
@Function("keyDisciplinesPersonnel.edit")
@ResponseBody
public ModelAndView edit(Integer id,String status) {
ModelAndView view = new ModelAndView("/key/keyDisciplinesPersonnel/edit.html");
KeyDisciplinesPersonnel keyDisciplinesPersonnel = keyDisciplinesPersonnelService.queryById(id);
view.addObject("keyDisciplinesPersonnel", keyDisciplinesPersonnel);
view.addObject("status", status);
return view;
}
@GetMapping(MODEL + "/add.do")
@Function("keyDisciplinesPersonnel.add")
@ResponseBody
public ModelAndView add() {
ModelAndView view = new ModelAndView("/key/keyDisciplinesPersonnel/add.html");
return view;
}
/* ajax json */
@PostMapping(MODEL + "/list.json")
@Function("keyDisciplinesPersonnel.query")
@ResponseBody
public JsonResult<PageQuery> list(KeyDisciplinesPersonnelQuery condtion)
{
PageQuery page = condtion.getPageQuery();
keyDisciplinesPersonnelService.queryByCondition(page);
return JsonResult.success(page);
}
@PostMapping(MODEL + "/add.json")
@Function("keyDisciplinesPersonnel.add")
@ResponseBody
public JsonResult add(@Validated(ValidateConfig.ADD.class)KeyDisciplinesPersonnel keyDisciplinesPersonnel)
{
keyDisciplinesPersonnel.setCreateTime(new Date());
keyDisciplinesPersonnelService.save(keyDisciplinesPersonnel);
return new JsonResult().success();
}
@PostMapping(MODEL + "/update.json")
@Function("keyDisciplinesPersonnel.update")
@ResponseBody
public JsonResult<String> update(@Validated(ValidateConfig.UPDATE.class) KeyDisciplinesPersonnel keyDisciplinesPersonnel) {
keyDisciplinesPersonnel.setUpdateTime(new Date());
boolean success = keyDisciplinesPersonnelService.update(keyDisciplinesPersonnel);
if (success) {
return new JsonResult().success();
} else {
return JsonResult.failMessage("保存失败");
}
}
@GetMapping(MODEL + "/view.json")
@Function("keyDisciplinesPersonnel.query")
@ResponseBody
public JsonResult<KeyDisciplinesPersonnel>queryInfo(Integer id) {
KeyDisciplinesPersonnel keyDisciplinesPersonnel = keyDisciplinesPersonnelService.queryById( id);
return JsonResult.success(keyDisciplinesPersonnel);
}
@PostMapping(MODEL + "/delete.json")
@Function("keyDisciplinesPersonnel.delete")
@ResponseBody
public JsonResult delete(String ids) {
if (ids.endsWith(",")) {
ids = StringUtils.substringBeforeLast(ids, ",");
}
List<Long> idList = ConvertUtil.str2longs(ids);
keyDisciplinesPersonnelService.batchDelKeyDisciplinesPersonnel(idList);
return new JsonResult().success();
}
}
package com.spk.zyse.key.web.query;
import com.spk.admin.core.annotation.Query;
import com.spk.admin.core.util.enums.CoreDictType;
import com.spk.admin.core.web.query.PageParam;
import java.util.Date;
/**
*KeyDisciplinesPersonnel查询
*/
public class KeyDisciplinesPersonnelQuery extends PageParam {
@Query(name = "主键", display = true)
private Integer id;
public Integer getId(){
return id;
}
public void setId(Integer id ){
this.id = id;
}
}
......@@ -13,6 +13,10 @@ public class KeyDisciplinesQuery extends ProUwfActivityInstQuery {
@Query(name = "重点学科名称", display = true)
private String importantSubjectName ;
@Query(name = "上报人", display = true)
private String reportPerson;
private Long administrative;
public Integer getId(){
return id;
}
......@@ -31,5 +35,17 @@ public class KeyDisciplinesQuery extends ProUwfActivityInstQuery {
public void setImportantSubjectName(String importantSubjectName) {
this.importantSubjectName = importantSubjectName;
}
public Long getAdministrative() {
return administrative;
}
public void setAdministrative(Long administrative) {
this.administrative = administrative;
}
public String getReportPerson() {
return reportPerson;
}
public void setReportPerson(String reportPerson) {
this.reportPerson = reportPerson;
}
}
......@@ -16,6 +16,8 @@ public class KeyResearchOfficeQuery extends ProUwfActivityInstQuery {
private String reportName ;
@Query(name = "重点研究室名称", display = true)
private String researchOfficeName;
@Query(name = "上报人", display = true)
private String reportPerson;
public Integer getId(){
return id;
}
......@@ -34,5 +36,11 @@ public class KeyResearchOfficeQuery extends ProUwfActivityInstQuery {
public void setResearchOfficeName(String researchOfficeName) {
this.researchOfficeName = researchOfficeName;
}
public String getReportPerson() {
return reportPerson;
}
public void setReportPerson(String reportPerson) {
this.reportPerson = reportPerson;
}
}
package com.spk.zyse.result.web;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.beetl.sql.core.engine.PageQuery;
import org.jxls.common.Context;
import org.jxls.util.JxlsHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
......@@ -19,9 +26,12 @@ import org.springframework.web.servlet.ModelAndView;
import com.spk.admin.core.annotation.Function;
import com.spk.admin.core.entity.CoreOrg;
import com.spk.admin.core.entity.CoreUser;
import com.spk.admin.core.file.FileItem;
import com.spk.admin.core.file.FileService;
import com.spk.admin.core.service.CorePlatformService;
import com.spk.admin.core.util.ConvertUtil;
import com.spk.admin.core.util.DateUtil;
import com.spk.admin.core.util.PlatformException;
import com.spk.admin.core.util.ValidateConfig;
import com.spk.admin.core.web.JsonResult;
import com.spk.zyse.proResearcher.service.ProResearcherService;
......@@ -168,7 +178,6 @@ public class ResultKeepOnRecordController{
resultKeepOnRecord.setProcessinstId(work.getProcessinstId());
resultKeepOnRecord.setCreateTime(work.getCreateTime());
resultKeepOnRecord.setUpdateTime(new Date());
resultKeepOnRecord.setCreateTime(new Date());
resultKeepOnRecord.setUserId(work.getUserId());
if("0".equals(flag)) {
resultKeepOnRecordService.updateAndSubmit(resultKeepOnRecord);
......@@ -185,6 +194,7 @@ public class ResultKeepOnRecordController{
ResultKeepOnRecord work = resultKeepOnRecordService.queryById(resultKeepOnRecord.getId());
if("0".equals(flag)) {
work.setState("1");
work.setCheckTime(new Date());
resultKeepOnRecordService.handleSubmit(work);
}else if("1".equals(flag)){
resultKeepOnRecordService.back(work,returnReason);
......@@ -207,6 +217,58 @@ public class ResultKeepOnRecordController{
return new JsonResult().success();
}
@PostMapping(MODEL + "/export.json")
@Function("resultWork.export")
@ResponseBody
public JsonResult<String> export(HttpServletResponse response,ResultKeepOnRecordQuery condtion) {
/**
* 1)需要用你自己编写一个的excel模板
* 2)通常excel导出需要关联更多数据,因此resultPaperService.queryByCondition方法经常不符合需求,需要重写一个为模板导出的查询
* 3)参考ConsoleDictController来实现模板导入导出
*/
String excelTemplate ="excelTemplates/result/result_keep_on_record.xls";
condtion.setProcessdefId(20L);
CoreUser coreUser = platformService.getCurrentUser();
condtion.setActUserId(coreUser.getId());
condtion.setPage(1);
condtion.setLimit(Integer.MAX_VALUE);
StringBuilder keyUpperCase = new StringBuilder();
// 此处拼接自己所需的查询sql
if (!StringUtils.isEmpty(condtion.getName())) {
keyUpperCase.append("and servicetable.NAME like '%").append(condtion.getName()).append("%'");
}
if (!StringUtils.isEmpty(condtion.getMagazineName())) {
keyUpperCase.append("and servicetable.MAGAZINE_NAME like '%").append(condtion.getMagazineName()).append("%'");
}
condtion.setQuerysql(keyUpperCase.toString());
PageQuery page = proUwfActivityInstService.waitinglist(condtion, coreUser);
//取出全部符合条件的
/*age.setPageSize(Integer.MAX_VALUE);
page.setPageNumber(1);
page.setTotalRow(Integer.MAX_VALUE);*/
//本次导出需要的数据
List<ProUwfActivityInst> list =page.getList();
for(int i=0;i<list.size();i++) {
list.get(i).set("serialNumber", i+1);
}
try(InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(excelTemplate)) {
if(is==null) {
throw new PlatformException("模板资源不存在:"+excelTemplate);
}
FileItem item = fileService.createFileTemp("成果备案_"+DateUtil.now("yyyyMMddHHmmss")+".xls");
OutputStream os = item.openOutpuStream();
Context context = new Context();
context.putVar("list", list);
JxlsHelper.getInstance().processTemplate(is, os, context);
os.close();
//下载参考FileSystemContorller
return JsonResult.success(item.getPath());
} catch (IOException e) {
throw new PlatformException(e.getMessage());
}
}
@GetMapping(MODEL + "/view.json")
@Function("resultKeepOnRecord.query")
......
......@@ -21,3 +21,29 @@ batchDelKeyDisciplinesByIds
delete from key_disciplines where ID in( #join(ids)#)
synList
===
SELECT
@pageTag(){
a.*,i.user_name as username
@}
FROM
key_disciplines a
LEFT JOIN pro_uwf_process_inst i ON a.PROCESSINST_ID = i.PROCESSINST_ID
WHERE i.PROCESS_STATE="end" and i.APPROVAL_STATE="0"
@if(!isEmpty(reportName)){
and a.REPORT_NAME like #"%"+reportName+"%"#
@}
@if(!isEmpty(importantSubjectName)){
and a.IMPORTANT_SUBJECT_NAME like #"%"+importantSubjectName+"%"#
@}
@if(!isEmpty(reportPerson)){
and a.REPORT_PERSON like #"%"+reportPerson+"%"#
@}
deleteKeyDisciplinesEdit
===
* 批量逻辑删除
delete from key_disciplines where ID=#id#
\ No newline at end of file
queryByCondition
===
select
@pageTag(){
t.*
@}
from key_disciplines_personnel t
where 1=1
@//数据权限,该sql语句功能点
and #function("keyDisciplinesPersonnel.query")#
batchDelKeyDisciplinesPersonnelByIds
===
* 批量逻辑删除
delete from key_disciplines_personnel where ID in( #join(ids)#)
......@@ -19,5 +19,30 @@ batchDelKeyResearchOfficeByIds
* 批量逻辑删除
update key_research_office set del_flag = 1 where ID in( #join(ids)#)
delete from key_research_office where ID in( #join(ids)#)
synList
===
SELECT
@pageTag(){
a.*,i.user_name as username
@}
FROM
key_research_office a
LEFT JOIN pro_uwf_process_inst i ON a.PROCESSINST_ID = i.PROCESSINST_ID
WHERE i.PROCESS_STATE="end" and i.APPROVAL_STATE="0"
@if(!isEmpty(reportName)){
and a.REPORT_NAME like #"%"+reportName+"%"#
@}
@if(!isEmpty(researchOfficeName)){
and a.RESEARCH_OFFICE_NAME like #"%"+researchOfficeName+"%"#
@}
@if(!isEmpty(reportPerson)){
and a.REPORT_PERSON like #"%"+reportPerson+"%"#
@}
deleteKeyResearchOfficeEdit
===
delete from key_research_office where ID=#id#
\ No newline at end of file
......@@ -13,12 +13,12 @@ layui.define([ 'form', 'laydate', 'table','keyDisciplinesApi'], function(exports
$("input[name=flag]").val("0");
var trList = $("#attachmentIdDataList").children('tr');
if (trList.length == "0") {
Common.info("请上传著作成果附件");
Common.info("请上传重点学科附件");
return false;
} else {
for (var i = 0; i < trList.length; i++) {
if (trList.eq(i).children('td').eq(4).text() == "等待上传") {
Common.info("请上传著作成果附件");
Common.info("请上传重点学科附件");
return false;
}
}
......@@ -70,6 +70,18 @@ layui.define([ 'form', 'laydate', 'table','keyDisciplinesApi'], function(exports
})
});
});
$("#passSave").click(function(){
var loading=layer.msg('正在操作,请稍候...', {icon: 16, shade: 0.3, time:0});
$("input[name=flag]").val("0");
form.on('submit(passSave)', function(){
keyDisciplinesApi.passUpdate($('#updateForm'),function(){
parent.window.dataReload();
layer.close(loading);
Common.info("更新成功");
Lib.closeFrame();
});
});
});
$("#zanSave").click(function(){
$("input[name=flag]").val("1");
form.on('submit(zanSave)', function(){
......
......@@ -14,6 +14,20 @@ layui.define([], function(exports) {
Common.post("/key/keyDisciplines/delete.json",{"ids":ids},function(){
callback();
})
},
exportExcelPass:function(form,callback){
var formPara = form.serializeJson();
Common.post("/key/keyDisciplines/passExport.json", formPara, function(fileId) {
callback(fileId);
})
},
passUpdate:function(form,callback){
Lib.submitForm("/key/keyDisciplines/passUpdate.json",form,{},callback)
},
passDel:function(data,callback){
Common.post("/key/keyDisciplines/deleteKeyDisciplinesEdit.json?id="+data.id+"","processinstId="+data.processinstId ,function(){
callback();
})
}
};
......
layui.define([ 'form', 'laydate', 'table','keyDisciplinesApi' ], function(exports) {
var form = layui.form;
var laydate = layui.laydate;
var table = layui.table;
var keyDisciplinesApi = layui.keyDisciplinesApi;
var keyDisciplinesTable = null;
var view ={
init:function(){
this.initTable();
this.initSearchForm();
this.initToolBar();
window.dataReload = function(){
Lib.doSearchForm($("#searchForm"),keyDisciplinesTable)
}
},
initTable:function(){
keyDisciplinesTable = table.render({
elem : '#keyDisciplinesTable',
height : Lib.getTableHeight(1),
cellMinWidth: 100,
method : 'post',
url : Common.ctxPath + '/key/keyDisciplines/synList.json' // 数据接口
,page : Lib.tablePage // 开启分页
,limit : 10,
cols : [ [ // 表头
{
type : 'checkbox',
},
{
field : 'reportName',
title : '报告名称',
},
{
field : 'importantSubjectName',
title : '重点学科名称',
},
{
field : 'reportPerson',
title : '上报人',
},
{
field : 'username',
title : '提交人',
},
{
field : 'checkTime',
title : '提交时间',
templet:function(d){
if(d.checkTime!=null && d.checkTime!=""){
return d.checkTime.substring(0,11);
}
}
},
{
toolbar : '#bar',
title : '操作',
}
] ]
});
table.on('tool(keyDisciplinesTable)', function(obj){
var data = obj.data;
if(obj.event=== 'edit'){
var url = "/key/keyDisciplines/passEdit.do?id="+data.id;
Common.openDlg(url,"重点学科>编辑");
}else if(obj.event=== 'view'){
var url = "/key/keyDisciplines/edit.do?id="+data.id+"&status=view&approvalstate="+data.approvalstate;
Common.openDlg(url,"重点学科>查看");
}else if(obj.event=== 'passDel'){
layui.use(['keyDisciplinesApi'], function() {
Common.openConfirm("确认要删除吗?", function() {
keyDisciplinesApi.passDel(data, function() {
Common.info("删除成功");
dataReload();
})
})
});
}
})
},
initSearchForm:function(){
Lib.initSearchForm( $("#searchForm"),keyDisciplinesTable,form);
},
initToolBar:function(){
toolbar = {
add : function() { // 获取选中数据
var url = "/key/keyDisciplines/add.do";
Common.openDlg(url,"重点学科>新增");
},
edit : function() { // 获取选中数目
var data = Common.getOneFromTable(table,"keyDisciplinesTable");
if(data==null){
return ;
}
var url = "/key/keyDisciplines/edit.do?id="+data.id;
Common.openDlg(url,"重点学科>"+data.workName+">编辑");
},
del : function() {
layui.use(['del'], function(){
var delView = layui.del
delView.delBatch();
});
},
exportDocument : function() {
layui.use([ 'keyDisciplinesApi' ], function() {
var keyDisciplinesApi = layui.keyDisciplinesApi
Common.openConfirm("确认导出?", function() {
keyDisciplinesApi.exportExcelPass($("#searchForm"), function(fileId) {
Lib.download(fileId);
})
})
});
}
};
$('.ext-toolbar').on('click', function() {
var type = $(this).data('type');
toolbar[type] ? toolbar[type].call(this) : '';
});
}
}
exports('synIndex',view);
});
\ No newline at end of file
layui.define(['form', 'laydate', 'table', 'keyDisciplinesPersonnelApi'], function(exports) {
var form = layui.form;
var keyDisciplinesPersonnelApi = layui.keyDisciplinesPersonnelApi;
var index = layui.index;
var view = {
init: function() {
Lib.initGenrealForm($("#addForm"), form);
this.initSubmit();
},
initSubmit: function() {
$("#addButton").click(function() {
if ($("#name").val().length > 0) {
if ($("#subjectName").val().length > 0) {
if ($("#type").val().length > 0) {
if ($("#birthday").val().length > 0) {
if ($("#title").val().length > 0) {
var loading = layer.msg('正在操作,请稍候...', { icon: 16, shade: 0.3, time: 0 });
form.on('submit(form)', function() {
keyDisciplinesPersonnelApi.addKeyDisciplinesPersonnel($('#addForm'), function() {
parent.window.dataReload();
Common.info("添加成功");
Lib.closeFrame();
});
});
} else {
Common.info("请填职称");
}
} else {
Common.info("请填出生日期");
}
} else {
Common.info("请填类别");
}
} else {
Common.info("请填写学科名称");
}
} else {
Common.info("请填写姓名");
}
});
$("#addButton-cancel").click(function() {
Lib.closeFrame();
});
}
}
exports('add', view);
});
\ No newline at end of file
layui.define(['table', 'keyDisciplinesPersonnelApi'], function(exports) {
var keyDisciplinesPersonnelApi = layui.keyDisciplinesPersonnelApi;
var table=layui.table;
var view = {
init:function(){
},
delBatch:function(){
var data = Common.getMoreDataFromTable(table,"keyDisciplinesPersonnelTable");
if(data==null){
return ;
}
Common.openConfirm("确认要删除?",function(){
var ids =Common.concatBatchId(data,"id");
keyDisciplinesPersonnelApi.del(ids,function(){
Common.info("删除成功");
dataReload();
})
})
}
}
exports('del',view);
});
\ No newline at end of file
layui.define([ 'form', 'laydate', 'table','keyDisciplinesPersonnelApi'], function(exports) {
var form = layui.form;
var keyDisciplinesPersonnelApi = layui.keyDisciplinesPersonnelApi;
var index = layui.index;
var view = {
init:function(){
Lib.initGenrealForm($("#updateForm"),form);
this.initSubmit();
},
initSubmit:function(){
$("#submit").click(function(){
form.on('submit(submit)', function(){
keyDisciplinesPersonnelApi.updateKeyDisciplinesPersonnel($('#updateForm'),function(){
parent.window.dataReload();
Common.info("更新成功");
Lib.closeFrame();
});
});
});
$("#closeButton").click(function(){
Lib.closeFrame();
});
}
}
exports('edit',view);
});
\ No newline at end of file
layui.define([ 'form', 'laydate', 'table' ], function(exports) {
var form = layui.form;
var laydate = layui.laydate;
var table = layui.table;
var keyDisciplinesPersonnelTable = null;
var view ={
init:function(){
this.initTable();
this.initSearchForm();
this.initToolBar();
window.dataReload = function(){
Lib.doSearchForm($("#searchForm"),keyDisciplinesPersonnelTable)
}
},
initTable:function(){
keyDisciplinesPersonnelTable = table.render({
elem : '#keyDisciplinesPersonnelTable',
height : Lib.getTableHeight(1),
cellMinWidth: 100,
method : 'post',
url : Common.ctxPath + '/key/keyDisciplinesPersonnel/list.json' // 数据接口
,page : Lib.tablePage // 开启分页
,limit : 10,
cols : [ [ // 表头
{
type : 'checkbox'
},
{
field : 'name',
title : '姓名',
},
{
field : 'subjectName',
title : '学科名称',
},
{
field : 'typeText',
title : '类别',
},
{
field : 'birthday',
title : '出生日期',
},
{
field : 'title',
title : '职称',
},
{
toolbar : '#bar',
title : '操作',
}
] ]
});
table.on('checkbox(keyDisciplinesPersonnelTable)', function(obj){
var keyDisciplinesPersonnel = obj.data;
if(obj.checked){
//按钮逻辑Lib.buttonEnable()
}else{
}
})
table.on('tool(keyDisciplinesPersonnelTable)', function(obj){
var data = obj.data;
if(obj.event=== 'edit'){
var url = "/key/keyDisciplinesPersonnel/edit.do?id="+data.id;
Common.openDlg(url,"重点学科人才管理>编辑");
}else if(obj.event=== 'view'){
var url = "/key/keyDisciplinesPersonnel/edit.do?id="+data.id+"&status=view";
Common.openDlg(url,"重点学科人才管理>查看");
}
})
},
initSearchForm:function(){
Lib.initSearchForm( $("#searchForm"),keyDisciplinesPersonnelTable,form);
},
initToolBar:function(){
toolbar = {
add : function() { // 获取选中数据
var url = "/key/keyDisciplinesPersonnel/add.do";
Common.openDlg(url,"重点学科人才管理>新增");
},
edit : function() { // 获取选中数目
var data = Common.getOneFromTable(table,"keyDisciplinesPersonnelTable");
if(data==null){
return ;
}
var url = "/key/keyDisciplinesPersonnel/edit.do?id="+data.id;
Common.openDlg(url,"重点学科人才管理>"+data.id+">编辑");
},
del : function() {
layui.use(['del'], function(){
var delView = layui.del
delView.delBatch();
});
}
};
$('.ext-toolbar').on('click', function() {
var type = $(this).data('type');
toolbar[type] ? toolbar[type].call(this) : '';
});
}
}
exports('index',view);
});
\ No newline at end of file
layui.define([ 'form', 'laydate', 'table' ], function(exports) {
var form = layui.form;
var laydate = layui.laydate;
var table = layui.table;
var keyDisciplinesPersonnelTable = null;
var view ={
init:function(){
this.initTable();
this.initSearchForm();
this.initToolBar();
window.dataReload = function(){
Lib.doSearchForm($("#searchForm"),keyDisciplinesPersonnelTable)
}
},
initTable:function(){
keyDisciplinesPersonnelTable = table.render({
elem : '#keyDisciplinesPersonnelTable',
height : Lib.getTableHeight(1),
cellMinWidth: 100,
method : 'post',
url : Common.ctxPath + '/key/keyDisciplinesPersonnel/list.json' // 数据接口
,page : Lib.tablePage // 开启分页
,limit : 10,
cols : [ [ // 表头
{
type : 'checkbox'
},
{
field : 'name',
title : '姓名',
},
{
field : 'subjectName',
title : '学科名称',
},
{
field : 'typeText',
title : '类别',
},
{
field : 'birthday',
title : '出生日期',
},
{
field : 'title',
title : '职称',
},
{
toolbar : '#bar',
title : '操作',
}
] ]
});
table.on('checkbox(keyDisciplinesPersonnelTable)', function(obj){
var keyDisciplinesPersonnel = obj.data;
if(obj.checked){
//按钮逻辑Lib.buttonEnable()
}else{
}
})
table.on('tool(keyDisciplinesPersonnelTable)', function(obj){
var data = obj.data;
if(obj.event=== 'edit'){
var url = "/key/keyDisciplinesPersonnel/edit.do?id="+data.id;
Common.openDlg(url,"重点学科人才管理>编辑");
}else if(obj.event=== 'view'){
var url = "/key/keyDisciplinesPersonnel/edit.do?id="+data.id+"&status=view";
Common.openDlg(url,"重点学科人才管理>查看");
}
})
},
initSearchForm:function(){
Lib.initSearchForm( $("#searchForm"),keyDisciplinesPersonnelTable,form);
},
initToolBar:function(){
toolbar = {
add : function() { // 获取选中数据
var url = "/key/keyDisciplinesPersonnel/add.do";
Common.openDlg(url,"重点学科人才管理>新增");
},
edit : function() { // 获取选中数目
var data = Common.getOneFromTable(table,"keyDisciplinesPersonnelTable");
if(data==null){
return ;
}
var url = "/key/keyDisciplinesPersonnel/edit.do?id="+data.id;
Common.openDlg(url,"重点学科人才管理>"+data.id+">编辑");
},
del : function() {
layui.use(['del'], function(){
var delView = layui.del
delView.delBatch();
});
}
};
$('.ext-toolbar').on('click', function() {
var type = $(this).data('type');
toolbar[type] ? toolbar[type].call(this) : '';
});
}
}
exports('indexKemi',view);
});
\ No newline at end of file
/*访问后台的代码*/
layui.define([], function(exports) {
var api={
updateKeyDisciplinesPersonnel:function(form,callback){
Lib.submitForm("/key/keyDisciplinesPersonnel/update.json",form,{},callback)
},
addKeyDisciplinesPersonnel:function(form,callback){
Lib.submitForm("/key/keyDisciplinesPersonnel/add.json",form,{},callback)
},
del:function(ids,callback){
Common.post("/key/keyDisciplinesPersonnel/delete.json",{"ids":ids},function(){
callback();
})
}
};
exports('keyDisciplinesPersonnelApi',api);
});
\ No newline at end of file
......@@ -12,12 +12,12 @@ layui.define([ 'form', 'laydate', 'table','keyResearchOfficeApi'], function(expo
$("input[name=flag]").val("0");
var trList = $("#attachmentIdDataList").children('tr');
if (trList.length == "0") {
Common.info("请上传重点学科附件");
Common.info("请上传重点研究室附件");
return false;
} else {
for (var i = 0; i < trList.length; i++) {
if (trList.eq(i).children('td').eq(4).text() == "等待上传") {
Common.info("请上传重点学科附件");
Common.info("请上传重点研究室附件");
return false;
}
}
......
......@@ -9,7 +9,7 @@ layui.define(['table', 'keyResearchOfficeApi'], function(exports) {
if(data==null){
return ;
}
Common.openConfirm("确认要删除这些KeyResearchOffice?",function(){
Common.openConfirm("确认要删除?",function(){
var ids =Common.concatBatchId(data,"id");
keyResearchOfficeApi.del(ids,function(){
Common.info("删除成功");
......
......@@ -8,16 +8,91 @@ layui.define([ 'form', 'laydate', 'table','keyResearchOfficeApi'], function(expo
this.initSubmit();
},
initSubmit:function(){
$("#updateButton").click(function(){
form.on('submit(form)', function(){
keyResearchOfficeApi.updateKeyResearchOffice($('#updateForm'),function(){
$("#save").click(function() {
$("input[name=flag]").val("0");
var trList = $("#attachmentIdDataList").children('tr');
if (trList.length == "0") {
Common.info("请上传重点研究室附件");
return false;
} else {
for (var i = 0; i < trList.length; i++) {
if (trList.eq(i).children('td').eq(4).text() == "等待上传") {
Common.info("请上传重点研究室附件");
return false;
}
}
}
var loading = layer.msg('正在操作,请稍候...', { icon: 16, shade: 0.3, time: 0 });
form.on('submit(save)', function() {
keyResearchOfficeApi.updateKeyResearchOffice($('#updateForm'), function() {
parent.window.dataReload();
layer.close(loading);
Common.info("提交成功");
Lib.closeFrame();
});
});
});
$("#submit").click(function(){
var loading=layer.msg('正在操作,请稍候...', {icon: 16, shade: 0.3, time:0});
$("input[name=flag]").val("0");
form.on('submit(submit)', function(){
keyResearchOfficeApi.handleSubmit($('#updateForm'),function(){
parent.window.dataReload();
layer.close(loading);
Common.info("提交成功");
Lib.closeFrame();
});
});
});
$("#back").click(function(){
layer.prompt({title: '请输入退回原因:', formType: 2}, function(text, index){
$("input[name=returnReason]").val(text);
$("input[name=flag]").val("1");
var formData = $("#updateForm").serialize();
formData=decodeURIComponent(formData);
$.ajax({
url:Common.ctxPath+ '/key/keyResearchOffice/handle.json',
method:'post',
data:formData,
dataType:'JSON',
success:function(res){
parent.window.dataReload();
Common.info("退回成功");
layer.close(index);
Lib.closeFrame();
},
error:function (data) {
}
})
});
});
$("#passSave").click(function(){
var loading=layer.msg('正在操作,请稍候...', {icon: 16, shade: 0.3, time:0});
$("input[name=flag]").val("0");
form.on('submit(passSave)', function(){
keyResearchOfficeApi.passUpdate($('#updateForm'),function(){
parent.window.dataReload();
layer.close(loading);
Common.info("更新成功");
Lib.closeFrame();
});
});
});
$("#updateButton-cancel").click(function(){
$("#zanSave").click(function(){
$("input[name=flag]").val("1");
form.on('submit(zanSave)', function(){
keyResearchOfficeApi.updateKeyResearchOffice($('#updateForm'),function(){
parent.window.dataReload();
Common.info("暂存成功");
Lib.closeFrame();
});
});
});
$("#closeButton").click(function(){
Lib.closeFrame();
});
}
......
......@@ -2,13 +2,30 @@
layui.define([], function(exports) {
var api={
updateKeyResearchOffice:function(form,callback){
Lib.submitForm("//key/keyResearchOffice/update.json",form,{},callback)
Lib.submitForm("/key/keyResearchOffice/update.json",form,{},callback)
},
addKeyResearchOffice:function(form,callback){
Lib.submitForm("//key/keyResearchOffice/add.json",form,{},callback)
Lib.submitForm("/key/keyResearchOffice/add.json",form,{},callback)
},
handleSubmit:function(form,callback){
Lib.submitForm("/key/keyResearchOffice/handle.json",form,{},callback)
},
del:function(ids,callback){
Common.post("//key/keyResearchOffice/delete.json",{"ids":ids},function(){
Common.post("/key/keyResearchOffice/delete.json",{"ids":ids},function(){
callback();
})
},
exportExcelPass:function(form,callback){
var formPara = form.serializeJson();
Common.post("/key/keyResearchOffice/passExport.json", formPara, function(fileId) {
callback(fileId);
})
},
passUpdate:function(form,callback){
Lib.submitForm("/key/keyResearchOffice/passUpdate.json",form,{},callback)
},
passDel:function(data,callback){
Common.post("/key/keyResearchOffice/deleteKeyResearchOfficeEdit.json?id="+data.id+"","processinstId="+data.processinstId ,function(){
callback();
})
}
......
layui.define([ 'form', 'laydate', 'table','keyResearchOfficeApi' ], function(exports) {
var form = layui.form;
var laydate = layui.laydate;
var table = layui.table;
var keyResearchOfficeApi = layui.keyResearchOfficeApi;
var keyResearchOfficeTable = null;
var view ={
init:function(){
this.initTable();
this.initSearchForm();
this.initToolBar();
window.dataReload = function(){
Lib.doSearchForm($("#searchForm"),keyResearchOfficeTable)
}
},
initTable:function(){
keyResearchOfficeTable = table.render({
elem : '#keyResearchOfficeTable',
height : Lib.getTableHeight(1),
cellMinWidth: 100,
method : 'post',
url : Common.ctxPath + '/key/keyResearchOffice/synList.json' // 数据接口
,page : Lib.tablePage // 开启分页
,limit : 10,
cols : [ [ // 表头
{
type : 'checkbox',
},
{
field : 'reportName',
title : '报告名称',
},
{
field : 'researchOfficeName',
title : '重点研究室名称',
},
{
field : 'reportPerson',
title : '上报人',
},
{
field : 'username',
title : '提交人',
},
{
field : 'checkTime',
title : '提交时间',
templet:function(d){
if(d.checkTime!=null && d.checkTime!=""){
return d.checkTime.substring(0,11);
}
}
},
{
toolbar : '#bar',
title : '操作',
}
] ]
});
table.on('tool(keyResearchOfficeTable)', function(obj){
var data = obj.data;
if(obj.event=== 'edit'){
var url = "/key/keyResearchOffice/passEdit.do?id="+data.id;
Common.openDlg(url,"重点研究室>编辑");
}else if(obj.event=== 'view'){
var url = "/key/keyResearchOffice/edit.do?id="+data.id+"&status=view&approvalstate="+data.approvalstate;
Common.openDlg(url,"重点研究室>查看");
}else if(obj.event=== 'passDel'){
layui.use(['keyResearchOfficeApi'], function() {
Common.openConfirm("确认要删除吗?", function() {
keyResearchOfficeApi.passDel(data, function() {
Common.info("删除成功");
dataReload();
})
})
});
}
})
},
initSearchForm:function(){
Lib.initSearchForm( $("#searchForm"),keyResearchOfficeTable,form);
},
initToolBar:function(){
toolbar = {
add : function() { // 获取选中数据
var url = "/key/keyResearchOffice/add.do";
Common.openDlg(url,"重点研究室>新增");
},
edit : function() { // 获取选中数目
var data = Common.getOneFromTable(table,"keyResearchOfficeTable");
if(data==null){
return ;
}
var url = "/key/keyResearchOffice/edit.do?id="+data.id;
Common.openDlg(url,"重点研究室>"+data.workName+">编辑");
},
del : function() {
layui.use(['del'], function(){
var delView = layui.del
delView.delBatch();
});
},
exportDocument : function() {
layui.use([ 'keyResearchOfficeApi' ], function() {
var keyResearchOfficeApi = layui.keyResearchOfficeApi
Common.openConfirm("确认导出?", function() {
keyResearchOfficeApi.exportExcelPass($("#searchForm"), function(fileId) {
Lib.download(fileId);
})
})
});
}
};
$('.ext-toolbar').on('click', function() {
var type = $(this).data('type');
toolbar[type] ? toolbar[type].call(this) : '';
});
}
}
exports('synIndex',view);
});
\ No newline at end of file
......@@ -129,6 +129,16 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
})
});
},
exportDocument : function() {
layui.use([ 'resultKeepOnRecordApi' ], function() {
var resultKeepOnRecordApi = layui.resultKeepOnRecordApi
Common.openConfirm("确认导出?", function() {
resultKeepOnRecordApi.exportExcel($("#searchForm"), function(fileId) {
Lib.download(fileId);
})
})
});
}
};
$('.ext-toolbar').on('click', function() {
var type = $(this).data('type');
......
......@@ -14,7 +14,13 @@ layui.define([], function(exports) {
Common.post("/result/resultKeepOnRecord/delete.json",{"ids":ids},function(){
callback();
})
}
},
exportExcel:function(form,callback){
var formPara = form.serializeJson();
Common.post("/result/resultKeepOnRecord/export.json?type="+$("#type").val(), formPara, function(fileId) {
callback(fileId);
})
},
};
exports('resultKeepOnRecordApi',api);
......
<!--# layout("/common/layout.html",{"jsBase":"/js/key/keyDisciplines/"}){ -->
<style>
.layui-form-item .layui-input-inline {
width: 250px
}
.layui-form-item .label-size{
width: 240px;
}
.carousel-item{
height : auto;
padding: 10px;
padding-bottom: 50px;
position:relative;
}
</style>
<div class="carousel-item">
<form class="layui-form layui-form-pane" id="updateForm">
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
<legend>重点学科</legend>
</fieldset>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">报告名称</label>
<div class="layui-input-inline">
<input type="text" id="reportName" name="reportName" value="${keyDisciplines.reportName}" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 150px">重点学科名称</label>
<div class="layui-input-inline">
<input type="text" id="importantSubjectName" name="importantSubjectName" value="${keyDisciplines.importantSubjectName}" class="layui-input" >
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">上报人</label>
<div class="layui-input-inline">
<input type="text" id="reportPerson" name="reportPerson" value="${keyDisciplines.reportPerson}" class="layui-input" >
</div>
</div>
</div>
</div>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
<legend>上传附件<font color="red">(请上传封面、作者页、版权页)</font></legend>
</fieldset>
<div class="layui-row">
<!--#if(isNotEmpty(status)){ -->
<layui:attachment name="attachmentId" batchFileUUID="${keyDisciplines.attachmentId}" bizType="workAtt" isNew="false" isView="true" />
<!--#}else{ -->
<layui:attachment name="attachmentId" batchFileUUID="${keyDisciplines.attachmentId}" bizType="workAtt" isNew="false" isView="false" />
<!--#} -->
</div>
<!--#if(isNotEmpty(returnReason)){ -->
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label label-size">退回原因</label>
<div class="layui-input-inline">
<textarea class="layui-textarea" style="width:763px" readonly="readonly">${returnReason}</textarea>
</div>
</div>
</div>
<!--#} -->
<input type="hidden" name="flag"/>
<input type="hidden" id="status" value="${status}"/>
<input type="hidden" name="returnReason"/>
<input type="hidden" name="id" class="layui-input" value="${keyDisciplines.id}">
<div class="layui-form-item" align="center" style="width: 95%; bottom:0; ">
<button class="layui-btn layui-btn-warm" type="button" id="passSave" lay-submit lay-filter="passSave">提交</button>
<button class="layui-btn" type="button" id="closeButton">取消</button>
</div>
</form>
</div>
<!--#} -->
<script>
layui.use(['edit'], function(){
var keyDisciplinesEdit = layui.edit;
if($("#status").val()!=null && $("#status").val()!=""){
$("input").attr("readonly",true);
$("textarea").attr("readonly",true);
}
keyDisciplinesEdit.init();
form.verify({
required1:function(value,item){
if(value===''){
return "不可为空";
}
}
})
});
</script>
<!--#layout("/common/layout.html",{"jsBase":"/js/key/keyDisciplines/"}){ -->
<layui:searchForm formId="searchForm" condition="${search}">
</layui:searchForm>
<div class="layui-btn-group">
<layui:accessButton function="keyDisciplines.exportDocument" action="exportDocument">导出</layui:accessButton>
</div>
<table id="keyDisciplinesTable" lay-filter="keyDisciplinesTable"></table>
<!--#} -->
<script type="text/html" id="bar">
<a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="edit">编辑</a>
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="passDel">删除</a>
<a class="layui-btn layui-btn-xs" lay-event="view">查看</a>
</script>
<script>
layui.use(['synIndex'], function(){
var synIndex = layui.synIndex
synIndex.init();
});
</script>
<!--# layout("/common/layout.html",{"jsBase":"/js/key/keyDisciplinesPersonnel/"}){ -->
<style>
.layui-form-item .layui-input-inline {
width: 250px
}
.layui-form-item .label-size {
width: 240px;
}
.carousel-item {
height: auto;
padding: 10px;
padding-bottom: 50px;
position: relative;
}
</style>
<div class="carousel-item">
<form class="layui-form layui-form-pane" id="addForm">
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
<legend>重点学科人才管理</legend>
</fieldset>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">姓名</label>
<div class="layui-input-inline">
<input type="text" name="name" id="name" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">学科名称</label>
<div class="layui-input-inline">
<input type="text" name="subjectName" id="subjectName" class="layui-input" >
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">类别</label>
<div class="layui-input-inline">
<layui:simpleDictSelect type="key_disciplines_personnel_type" id="type" name="type" />
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">出生日期</label>
<div class="layui-input-inline">
<input type="text" name="birthday" id="birthday" class="layui-input input-date" >
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">职称</label>
<div class="layui-input-inline">
<input type="text" name="title" id="title" class="layui-input" >
</div>
</div>
</div>
</div>
<layui:submitButtons id="addButton" />
</form>
</div>
<!--#} -->
<script>
layui.use(['add'], function(){
var keyDisciplinesPersonnelAdd = layui.add
keyDisciplinesPersonnelAdd.init();
});
</script>
<!--# layout("/common/layout.html",{"jsBase":"/js/key/keyDisciplinesPersonnel/"}){ -->
<style>
.layui-form-item .layui-input-inline {
width: 250px
}
.layui-form-item .label-size {
width: 240px;
}
.carousel-item {
height: auto;
padding: 10px;
padding-bottom: 50px;
position: relative;
}
</style>
<div class="carousel-item">
<form class="layui-form layui-form-pane" id="updateForm">
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
<legend>重点学科人才管理</legend>
</fieldset>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">姓名</label>
<div class="layui-input-inline">
<input type="text" id="name" name="name" value="${keyDisciplinesPersonnel.name}" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">学科名称</label>
<div class="layui-input-inline">
<input type="text" id="subjectName" name="subjectName" value="${keyDisciplinesPersonnel.subjectName}" class="layui-input" >
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">类别</label>
<div class="layui-input-inline">
<layui:simpleDictSelect type="key_disciplines_personnel_type" id="type" name="type" value="${keyDisciplinesPersonnel.type}"/>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">出生日期</label>
<div class="layui-input-inline">
<input type="text" id="birthday" name="birthday" value="${keyDisciplinesPersonnel.birthday,"yyyy-MM-dd"}" class="layui-input input-date" >
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">职称</label>
<div class="layui-input-inline">
<input type="text" id="title" name="title" value="${keyDisciplinesPersonnel.title}" class="layui-input" >
</div>
</div>
</div>
</div>
<!-- 业务对象须有hidden字段,保存delFlag和version字段-->
<input type="hidden" id="status" value="${status}"/>
<input type="hidden" name="id" value=${keyDisciplinesPersonnel.id} />
<div class="layui-form-item" align="center" style="width: 95%; bottom:0; ">
<!--#if(isNotEmpty(status) && status=="view"){ -->
<button class="layui-btn" type="button" id="closeButton">关闭</button>
<!--#}else{ -->
<button class="layui-btn layui-btn-warm" type="button" id="submit" lay-submit lay-filter="submit">保存</button>
<button class="layui-btn" type="button" id="closeButton">取消</button>
<!--#} -->
</div>
</form>
</div>
<!--#} -->
<script>
layui.use(['edit'], function(){
var keyDisciplinesPersonnelEdit = layui.edit
keyDisciplinesPersonnelEdit.init();
if($("#status").val()!=null && $("#status").val()!=""){
$("input").attr("readonly",true);
$("textarea").attr("readonly",true);
}
});
</script>
<!--#layout("/common/layout.html",{"jsBase":"/js/key/keyDisciplinesPersonnel/"}){ -->
<layui:searchForm formId="searchForm" condition="${search}">
</layui:searchForm>
<div class="layui-btn-group">
<layui:accessButton function="keyDisciplinesPersonnel.add" action="add">增加</layui:accessButton>
<!-- <layui:accessButton function="keyDisciplinesPersonnel.edit" action="edit">编辑</layui:accessButton> -->
<layui:accessButton function="keyDisciplinesPersonnel.del" action="del">删除</layui:accessButton>
</div>
<table id="keyDisciplinesPersonnelTable" lay-filter="keyDisciplinesPersonnelTable"></table>
<!--#} -->
<script type="text/html" id="bar">
<a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="edit">编辑</a>
<a class="layui-btn layui-btn-xs" lay-event="view">查看</a>
</script>
<script>
layui.use(['index'], function(){
var index = layui.index
index.init();
});
</script>
<!--#layout("/common/layout.html",{"jsBase":"/js/key/keyDisciplinesPersonnel/"}){ -->
<layui:searchForm formId="searchForm" condition="${search}">
</layui:searchForm>
<div class="layui-btn-group">
<!-- <layui:accessButton function="keyDisciplinesPersonnel.add" action="add">增加</layui:accessButton>
<layui:accessButton function="keyDisciplinesPersonnel.edit" action="edit">编辑</layui:accessButton>
<layui:accessButton function="keyDisciplinesPersonnel.del" action="del">删除</layui:accessButton> -->
</div>
<table id="keyDisciplinesPersonnelTable" lay-filter="keyDisciplinesPersonnelTable"></table>
<!--#} -->
<script type="text/html" id="bar">
<a class="layui-btn layui-btn-xs" lay-event="view">查看</a>
</script>
<script>
layui.use(['indexKemi'], function(){
var indexKemi = layui.indexKemi
indexKemi.init();
});
</script>
<!--#layout("/common/layout.html",{"jsBase":"/js/key/keyResearchOffice/"}){ -->
<layui:searchForm formId="searchForm" condition="${search}">
</layui:searchForm>
<div class="layui-tab layui-tab-brief">
<ul class="layui-tab-title ">
<li class="layui-this"><a href="${ctxPath}/key/keyResearchOffice/checkIndex.do?type=hjzt_01">待办理</a></li>
<li><a href="${ctxPath}/key/keyResearchOffice/checkIndex.do?type=hjzt_02">已办理</a></li>
</ul>
</div>
<div class="layui-btn-group">
<layui:accessButton function="keyDisciplines.back" action="back">退回</layui:accessButton>
</div>
<input type="hidden" id="type" value="${type}"/>
<input type="hidden" id="isCheck" value="${isCheck}">
<table id="keyResearchOfficeTable" lay-filter="keyResearchOfficeTable"></table>
<!--#} -->
<script type="text/html" id="bar">
<a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="handle">审核</a>
<a class="layui-btn layui-btn-xs" lay-event="view">查看</a>
</script>
<script>
layui.use(['index'], function(){
var index = layui.index
index.init();
});
</script>
<!--#layout("/common/layout.html",{"jsBase":"/js/key/keyResearchOffice/"}){ -->
<layui:searchForm formId="searchForm" condition="${search}">
</layui:searchForm>
<div class="layui-tab layui-tab-brief">
<ul class="layui-tab-title ">
<li><a href="${ctxPath}/key/keyResearchOffice/checkIndex.do?type=hjzt_01">待办理</a></li>
<li class="layui-this"><a href="${ctxPath}/key/keyResearchOffice/checkIndex.do?type=hjzt_02">已办理</a></li>
</ul>
</div>
<!-- <div class="layui-btn-group">
<layui:accessButton function="resultKeepOnRecord.exportDocument" action="exportDocument">导出</layui:accessButton>
</div> -->
<input type="hidden" id="type" value="${type}"/>
<input type="hidden" id="isCheck" value="${isCheck}">
<table id="keyResearchOfficeTable" lay-filter="keyResearchOfficeTable"></table>
<!--#} -->
<script type="text/html" id="bar">
<a class="layui-btn layui-btn-xs" lay-event="view">查看</a>
</script>
<script>
layui.use(['index'], function(){
var index = layui.index
index.init();
});
</script>
<!--# layout("/common/layout.html",{"jsBase":"/js/key/keyResearchOffice/"}){ -->
<style>
.layui-form-item .layui-input-inline {
width: 250px
}
.layui-form-item .label-size {
width: 240px;
}
.carousel-item {
height: auto;
padding: 10px;
padding-bottom: 50px;
position: relative;
}
</style>
<div class="carousel-item">
<form class="layui-form layui-form-pane" id="updateForm">
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
<legend>重点研究室</legend>
</fieldset>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">流程主键</label>
<div class="layui-input-inline">
<input type="text" id="processinstId" name="processinstId" value="${keyResearchOffice.processinstId}" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">报告名称</label>
<div class="layui-input-inline">
<input type="text" id="reportName" name="reportName" value="${keyResearchOffice.reportName}" class="layui-input" >
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">重点研究室名称</label>
<label class="layui-form-label" style="width: 150px">重点研究室名称</label>
<div class="layui-input-inline">
<input type="text" id="researchOfficeName" name="researchOfficeName" value="${keyResearchOffice.researchOfficeName}" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">上报人</label>
<div class="layui-input-inline">
<input type="text" id="reportPerson" name="reportPerson" value="${keyResearchOffice.reportPerson}" class="layui-input" >
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">创建时间</label>
<div class="layui-input-inline">
<input type="text" id="createTime" name="createTime" value="${keyResearchOffice.createTime,"yyyy-MM-dd"}" class="layui-input input-date" >
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">修改时间</label>
<div class="layui-input-inline">
<input type="text" id="updateTime" name="updateTime" value="${keyResearchOffice.updateTime,"yyyy-MM-dd"}" class="layui-input input-date" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">审核时间</label>
<label class="layui-form-label">上报人</label>
<div class="layui-input-inline">
<input type="text" id="checkTime" name="checkTime" value="${keyResearchOffice.checkTime,"yyyy-MM-dd"}" class="layui-input input-date" >
<input type="text" id="reportPerson" name="reportPerson" value="${keyResearchOffice.reportPerson}" class="layui-input" >
</div>
</div>
</div>
</div>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
<legend>上传附件<font color="red">(请上传封面、作者页、版权页)</font></legend>
</fieldset>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">用户id</label>
<div class="layui-input-inline">
<input type="text" id="userId" name="userId" value="${keyResearchOffice.userId}" class="layui-input" >
</div>
<!--#if(isNotEmpty(status)){ -->
<layui:attachment name="attachmentId" batchFileUUID="${keyResearchOffice.attachmentId}" bizType="workAtt" isNew="false" isView="true" />
<!--#}else{ -->
<layui:attachment name="attachmentId" batchFileUUID="${keyResearchOffice.attachmentId}" bizType="workAtt" isNew="false" isView="false" />
<!--#} -->
</div>
<div class="layui-inline">
<label class="layui-form-label">科室id</label>
<div class="layui-input-inline">
<input type="text" id="deptId" name="deptId" value="${keyResearchOffice.deptId}" class="layui-input" >
</div>
</div>
</div>
</div>
<div class="layui-row">
<!--#if(isNotEmpty(returnReason)){ -->
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">审核状态</label>
<label class="layui-form-label label-size">退回原因</label>
<div class="layui-input-inline">
<input type="text" id="state" name="state" value="${keyResearchOffice.state}" class="layui-input" >
</div>
<textarea class="layui-textarea" style="width:763px" readonly="readonly">${returnReason}</textarea>
</div>
</div>
</div>
<!--#} -->
<input type="hidden" name="flag"/>
<input type="hidden" id="status" value="${status}"/>
<input type="hidden" name="returnReason"/>
<!-- 业务对象须有hidden字段,保存delFlag和version字段-->
<input type="hidden" name="id" value=${keyResearchOffice.id} />
<layui:submitButtons id="updateButton" />
<div class="layui-form-item" align="center" style="width: 95%; bottom:0; ">
<!--#if(isNotEmpty(status) && status=="view"){ -->
<button class="layui-btn" type="button" id="closeButton">关闭</button>
<!--#}else if(isNotEmpty(status) && status=="handle"){ -->
<button class="layui-btn layui-btn-warm" type="button" id="submit" lay-submit lay-filter="submit">通过</button>
<button class="layui-btn layui-btn-danger" type="button" id="back" lay-submit lay-filter="back">退回</button>
<button class="layui-btn" type="button" id="closeButton">取消</button>
<!--#}else{ -->
<button class="layui-btn layui-btn-warm" type="button" id="save" lay-submit lay-filter="save">提交</button>
<button class="layui-btn layui-btn-danger" type="button" id="zanSave" lay-submit lay-filter="zanSave">暂存</button>
<button class="layui-btn" type="button" id="closeButton">取消</button>
<!--#} -->
</div>
</form>
</div>
<!--#} -->
<script>
layui.use(['edit'], function(){
var keyResearchOfficeEdit = layui.edit
keyResearchOfficeEdit.init();
if($("#status").val()!=null && $("#status").val()!=""){
$("input").attr("readonly",true);
$("textarea").attr("readonly",true);
}
});
</script>
<!--# layout("/common/layout.html",{"jsBase":"/js/key/keyResearchOffice/"}){ -->
<style>
.layui-form-item .layui-input-inline {
width: 250px
}
.layui-form-item .label-size{
width: 240px;
}
.carousel-item{
height : auto;
padding: 10px;
padding-bottom: 50px;
position:relative;
}
</style>
<div class="carousel-item">
<form class="layui-form layui-form-pane" id="updateForm">
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
<legend>重点研究室</legend>
</fieldset>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">报告名称</label>
<div class="layui-input-inline">
<input type="text" id="reportName" name="reportName" value="${keyResearchOffice.reportName}" class="layui-input" >
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 150px">重点研究室名称</label>
<div class="layui-input-inline">
<input type="text" id="researchOfficeName" name="researchOfficeName" value="${keyResearchOffice.researchOfficeName}" class="layui-input" >
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">上报人</label>
<div class="layui-input-inline">
<input type="text" id="reportPerson" name="reportPerson" value="${keyResearchOffice.reportPerson}" class="layui-input" >
</div>
</div>
</div>
</div>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
<legend>上传附件<font color="red">(请上传封面、作者页、版权页)</font></legend>
</fieldset>
<div class="layui-row">
<!--#if(isNotEmpty(status)){ -->
<layui:attachment name="attachmentId" batchFileUUID="${keyResearchOffice.attachmentId}" bizType="workAtt" isNew="false" isView="true" />
<!--#}else{ -->
<layui:attachment name="attachmentId" batchFileUUID="${keyResearchOffice.attachmentId}" bizType="workAtt" isNew="false" isView="false" />
<!--#} -->
</div>
<!--#if(isNotEmpty(returnReason)){ -->
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label label-size">退回原因</label>
<div class="layui-input-inline">
<textarea class="layui-textarea" style="width:763px" readonly="readonly">${returnReason}</textarea>
</div>
</div>
</div>
<!--#} -->
<input type="hidden" name="flag"/>
<input type="hidden" id="status" value="${status}"/>
<input type="hidden" name="returnReason"/>
<input type="hidden" name="id" class="layui-input" value="${keyResearchOffice.id}">
<div class="layui-form-item" align="center" style="width: 95%; bottom:0; ">
<button class="layui-btn layui-btn-warm" type="button" id="passSave" lay-submit lay-filter="passSave">提交</button>
<button class="layui-btn" type="button" id="closeButton">取消</button>
</div>
</form>
</div>
<!--#} -->
<script>
layui.use(['edit'], function(){
var keyResearchOfficeEdit = layui.edit;
if($("#status").val()!=null && $("#status").val()!=""){
$("input").attr("readonly",true);
$("textarea").attr("readonly",true);
}
keyResearchOfficeEdit.init();
form.verify({
required1:function(value,item){
if(value===''){
return "不可为空";
}
}
})
});
</script>
<!--#layout("/common/layout.html",{"jsBase":"/js/key/keyResearchOffice/"}){ -->
<layui:searchForm formId="searchForm" condition="${search}">
</layui:searchForm>
<div class="layui-btn-group">
<layui:accessButton function="keyResearchOffice.exportDocument" action="exportDocument">导出</layui:accessButton>
</div>
<table id="keyResearchOfficeTable" lay-filter="keyResearchOfficeTable"></table>
<!--#} -->
<script type="text/html" id="bar">
<a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="edit">编辑</a>
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="passDel">删除</a>
<a class="layui-btn layui-btn-xs" lay-event="view">查看</a>
</script>
<script>
layui.use(['synIndex'], function(){
var synIndex = layui.synIndex
synIndex.init();
});
</script>
......@@ -26,7 +26,7 @@
<div class="layui-inline">
<label class="layui-form-label">姓名</label>
<div class="layui-input-inline">
<input type="text" name="name" class="layui-input">
<input type="text" name="name" lay-verify="required" class="layui-input">
</div>
</div>
<div class="layui-inline">
......@@ -50,13 +50,13 @@
<div class="layui-inline">
<label class="layui-form-label">成果名称</label>
<div class="layui-input-inline">
<input type="text" name="magazineName" class="layui-input">
<input type="text" name="magazineName" lay-verify="required" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">论文题目</label>
<div class="layui-input-inline">
<input type="text" name="thesisTitle" class="layui-input">
<input type="text" name="thesisTitle" lay-verify="required" class="layui-input">
</div>
</div>
</div>
......@@ -66,7 +66,7 @@
<div class="layui-inline">
<label class="layui-form-label">成果类型</label>
<div class="layui-input-inline">
<layui:simpleDictSelect type="achievements_keep_on_record" id="type" name="type" />
<layui:simpleDictSelect type="achievements_keep_on_record" id="type" name="type" lay-verify="required" />
</div>
</div>
......@@ -95,5 +95,13 @@
layui.use([ 'add' ], function() {
var resultKeepOnRecordAdd = layui.add
resultKeepOnRecordAdd.init();
form.verify({
required1:function(value,item){
if(value===''){
return "不可为空";
}
}
})
});
</script>
......@@ -8,9 +8,9 @@
<li class="layui-this"><a href="${ctxPath}/result/resultKeepOnRecord/checkIndex.do?type=hjzt_02">已办理</a></li>
</ul>
</div>
<!-- <div class="layui-btn-group">
<div class="layui-btn-group">
<layui:accessButton function="resultKeepOnRecord.exportDocument" action="exportDocument">导出</layui:accessButton>
</div> -->
</div>
<input type="hidden" id="type" value="${type}"/>
<input type="hidden" id="isCheck" value="${isCheck}">
<table id="resultKeepOnRecordTable" lay-filter="resultKeepOnRecordTable"></table>
......
......@@ -26,7 +26,7 @@
<div class="layui-inline">
<label class="layui-form-label">姓名</label>
<div class="layui-input-inline">
<input type="text" id="name" name="name"
<input type="text" id="name" name="name" lay-verify="required"
value="${resultKeepOnRecord.name}" class="layui-input">
</div>
</div>
......@@ -51,14 +51,14 @@
<div class="layui-inline">
<label class="layui-form-label">成果名称</label>
<div class="layui-input-inline">
<input type="text" id="magazineName" name="magazineName"
<input type="text" id="magazineName" name="magazineName" lay-verify="required"
value="${resultKeepOnRecord.magazineName}" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">论文题目</label>
<div class="layui-input-inline">
<input type="text" id="thesisTitle" name="thesisTitle"
<input type="text" id="thesisTitle" name="thesisTitle" lay-verify="required"
value="${resultKeepOnRecord.thesisTitle}" class="layui-input">
</div>
</div>
......@@ -69,7 +69,7 @@
<div class="layui-inline">
<label class="layui-form-label">成果类型</label>
<div class="layui-input-inline">
<layui:simpleDictSelect type="achievements_keep_on_record" value="${resultKeepOnRecord.type}" id="type" name="type" />
<layui:simpleDictSelect type="achievements_keep_on_record" value="${resultKeepOnRecord.type}" lay-verify="required" id="type" name="type" />
</div>
</div>
......@@ -125,5 +125,13 @@
$("input").attr("readonly",true);
$("textarea").attr("readonly",true);
}
form.verify({
required1:function(value,item){
if(value===''){
return "不可为空";
}
}
})
});
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment