修改医生和护士提交等

master
hujl 4 years ago
parent 599454e957
commit 5752e245cb

@ -402,6 +402,7 @@ public class beHospitaledController {
@ResponseBody
@RequestMapping(value = "/withdrawDoctorOrNurs")
public String withdrawDoctorOrNurs(HttpServletRequest request, HttpServletResponse response,Archive_Master_Vo archiveMasterVo) {
response.setCharacterEncoding("utf-8");
Archive_Master archiveMaster=new Archive_Master();
archiveMaster.setId(archiveMasterVo.getId());
archiveMaster.setCmtDoctor(archiveMasterVo.getCmtDoctor());
@ -410,24 +411,23 @@ public class beHospitaledController {
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String username = user.getUserName();//工号
String handleName = user.getUserPosition();//姓名
Archive_Master_Following archive_master_following = new Archive_Master_Following();
archive_master_following.setMasterId(archiveMasterVo.getId());
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
String result="";
int bol =0;
//判断id 不为空
if(!archiveMaster.getId().equals("")&&!archiveMaster.getId().equals(null)) {
if(!archiveMaster.getId().equals("") && !archiveMaster.getId().equals(null)) {
Archive_Master obj = archiveMasterService.selectById(archiveMaster.getId());
if (obj!=null){
if (archiveMasterVo.getCmtDoctor()==0&&archiveMasterVo.getCmtNurse()==-1){
Archive_Master_Following archive_master_following = new Archive_Master_Following();
archive_master_following.setMasterId(archiveMasterVo.getId());
if (archiveMasterVo.getCmtDoctor()==0){
//医生撤回操作
archiveMaster.setCmtDoctorDate("");
archiveMaster.setDoctorName("");
//following表中添加归档医生撤回操作记录
archive_master_following.setFollowingType("2");
archive_master_following.setFollowingContent("主管医生撤回提交");
@ -435,8 +435,9 @@ public class beHospitaledController {
archive_master_following.setHandleId(username);
archive_master_following.setHandleName(handleName);
bol = archive_master_followingService.insertSelective(archive_master_following);
result="归档医生撤回成功!";
}
if (archiveMasterVo.getCmtNurse()==0&&archiveMasterVo.getCmtDoctor()==-1){
if (archiveMasterVo.getCmtNurse()==0){
//护士撤回操作
archiveMaster.setCmtNurseDate("");
archiveMaster.setNurseName("");
@ -448,13 +449,17 @@ public class beHospitaledController {
archive_master_following.setHandleId(username);
archive_master_following.setHandleName(handleName);
bol = archive_master_followingService.insertSelective(archive_master_following);
result="归档护士撤回成功!";
}
archiveMaster.setIsscaned(archiveMasterVo.getIsscaned());
bol=archiveMasterService.updateByClo(archiveMaster);
if (bol==1){
result = "成功";
}else{
result = "撤回失败";
if (bol!=1){
if (archiveMasterVo.getCmtDoctor()==0){
result="归档医生撤回失败!";
}
if (archiveMasterVo.getCmtNurse()==0){
result="归档护士撤回失败!";
}
}
}else{
result = "病案不存在!";

@ -760,7 +760,6 @@ public class inHospitalController {
if (picList.getAssortId() != entity.getAssortId() || picList.getRelationId() != entity.getRelationId()) {
//if(img[img.length-1]!= obj.get("fileSrc")){
//将之前文件删除
// File file1 = new File(realPath + "/static" + picList.getMaxPicture().split("static")[1]);
@ -821,7 +820,6 @@ public class inHospitalController {
//file.delete();
boolean b = file.delete();
if (!b) {
FileWriter fw = new FileWriter(file);
fw.close();
@ -841,9 +839,7 @@ public class inHospitalController {
result = "批量上传失败!";
}
}
} else {
//得到图片名
String oldName = imgs[t].getOriginalFilename();// 如apple1.jpg
String lasName = oldName.substring(oldName.lastIndexOf(".") + 1);
@ -867,37 +863,29 @@ public class inHospitalController {
t++;
}
} else {
//得到图片名
String oldName = imgs[t].getOriginalFilename();// 如apple1.jpg
String lasName = oldName.substring(oldName.lastIndexOf(".") + 1);
if ("GIF".equals(lasName.toUpperCase()) || "JPEG".equals(lasName.toUpperCase()) || "PNG".equals(lasName.toUpperCase()) || "JPG".equals(lasName.toUpperCase())) {
// 自定义的文件名称String.valueOf(System.currentTimeMillis())
trueFileName = firstFile + idTime + oldName;
//上传图片
imgs[t].transferTo(new File(realPath + path2 + pathType + trueFileName));
//新的图片地址
entity.setMaxPicture(realPath + path2 + pathType + trueFileName);
entity.setId(idTime);
entity.setCreater(username);
entity.setCreateTime(nowTime);
entity.setEffective(1);
//插入记录
bol = emrPictureService.insertSel(entity);
}
t = t + 1;
}
if (bol == 1) {
//根据类别生成pdf:pathType(String.valueOf(System.currentTimeMillis()) )
String pdfFile = pathType.replace("\\", "") + ".pdf";
//根据病案号和类别查询是否存在
Archive_Detail detail = new Archive_Detail();
detail.setMasterid(masterID);
@ -911,15 +899,13 @@ public class inHospitalController {
detail.setFlag("0");//显示
detail.setSource("后台");
detail.setSys("emr_medical_record");
detail.setTitle("自动生成分段类PDF");
detail.setTitle("自动生成"+obj.get("selectName")+"PDF");
detail.setUploaddatetime(nowTime);
detail.setPdfPath(realPath + masterID + "\\" + pathType + pdfFile);
//类名
int b = archiveDetailService.insertSel(detail);
}
//判断pdf是否存在将之前文件删除
File file1 = new File(realPath + masterID + "\\" + pathType + pdfFile);
if (file1.exists() && file1.isFile()) {
@ -928,25 +914,30 @@ public class inHospitalController {
}
//读取指定路径下的文件名和目录名
/* List arr = new ArrayList();
arr.add(pathType.replace("\\", ""));
//图片转PDF(病案号文件夹+类别文件夹)
// String str = PrintToPdfUtil.toPdf(realPath + path2 + pathType, realPath + masterID + "\\" + pathType + pdfFile, arr);
File file=new File(realPath + path2 + pathType);*/
//读取指定路径下的文件名和目录名
String pdfPathFile=realPath + path2+pathType.replace("\\", "")+"\\"+pathType.replace("\\", "")+".pdf";
//获取图片的绝对路径根据路径合成一份pdf文件
entity = new Emr_Picture();
entity.setRelationId(masterID);
entity.setAssortId(obj.get("selectVal").toString());
List<Emr_Picture> imgsList=emrPictureService.selectByClo(entity);
result=PrintToPdfUtil.imgsListTopdf(pdfPathFile,imgsList);
if(result.equals("合成pdf成功")){
result = "批量上传成功!";
}else{
result=result;
}
/*
List dirList = new ArrayList();
dirList.add(pathType.replace("\\", ""));
try {
PrintToPdfUtil.image2pdf(realPath + path2, dirList);
} catch (DocumentException e) {
e.printStackTrace();
}
result = "批量上传成功!";
}*/
} else {
result = "批量上传失败!";
}
} else {
result = "没有找到相对应的文件!";
}

@ -122,111 +122,85 @@ public class lastVerifyController {
Emr_Fault_Detail entityFault=new Emr_Fault_Detail();
entityFault.setArchiveDetailId(emrFaultDetail.getArchiveDetailId());
List<Emr_Fault_Detail> list=emrFaultDetailService.selectByArchiveId(entityFault);
int doctorFlagNum=0;
int nurseFlagNum=0;
if(list.size()>0){
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
//2021-01-30
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
Archive_Master_Following archive_master_following = new Archive_Master_Following();
archive_master_following.setMasterId(emrFaultDetail.getArchiveDetailId());
if (emrFaultDetail.getState().equals("主任退回")) {
//1医生 2护士
for (int k = 0; k < list.size(); k++) {
if ("1".equals(list.get(k).getBackFlag()) || "5".equals(list.get(k).getBackFlag())) {
archiveMaster.setCmtDoctor(0);
archiveMaster.setDoctorName("");
archiveMaster.setCmtDoctorDate("");
doctorFlagNum+=1;
}
if ("2".equals(list.get(k).getBackFlag()) || "6".equals(list.get(k).getBackFlag())) {
archiveMaster.setCmtNurse(0);
archiveMaster.setNurseName("");
archiveMaster.setCmtNurseDate("");
nurseFlagNum+=1;
}
}
}
bol = archiveMasterService.updateByClo(archiveMaster);
//修改复审内容
if (bol == 1) {
// 从session获取用户名
Subject currentUser = SecurityUtils.getSubject();
Session session = currentUser.getSession();
String username = (String) session.getAttribute("userSession");//获取前面登录的用户名
SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String nowTime = format1.format(new Date());
//判断缺陷记录是否有医生或护士有则退回状态改1
//参数输入
emrFaultDetail.setCreater(username);
emrFaultDetail.setCreateTime(nowTime);
//插入缺陷记录
bol = emrFaultDetailService.insertSel(emrFaultDetail);
if(doctorFlagNum>0){
archiveMaster.setCmtDoctor(0);
archiveMaster.setDoctorName("");
archiveMaster.setCmtDoctorDate("");
//2021-01-30 following表中添加科主任退回主管医生操作记录
archive_master_following.setFollowingType("7");
archive_master_following.setFollowingContent("科主任退回主管医生");
archive_master_following.setHandleTime(nowTime);
archive_master_following.setHandleId(username);
archive_master_following.setHandleName(handleName);
archive_master_followingService.insertSelective(archive_master_following);
//2021-01-30
Power_User user = (Power_User) request.getSession().getAttribute("CURRENT_USER");
String handleName = user.getUserPosition();//姓名
Archive_Master_Following archive_master_following = new Archive_Master_Following();
archive_master_following.setMasterId(emrFaultDetail.getArchiveDetailId());
if (emrFaultDetail.getState().equals("主任退回")){
for (int k = 0; k < list.size(); k++) {
if ("1".equals(list.get(k).getBackFlag()) || "5".equals(list.get(k).getBackFlag())) {
//following表中添加科主任退回主管医生操作记录
archive_master_following.setFollowingType("7");
archive_master_following.setFollowingContent("科主任退回主管医生");
archive_master_following.setHandleTime(nowTime);
archive_master_following.setHandleId(username);
archive_master_following.setHandleName(handleName);
archive_master_followingService.insertSelective(archive_master_following);
}
if ("2".equals(list.get(k).getBackFlag()) || "6".equals(list.get(k).getBackFlag())) {
//following表中添加科主任退回护士长操作记录
archive_master_following.setFollowingType("6");
archive_master_following.setFollowingContent("科主任退回护士长");
archive_master_following.setHandleTime(nowTime);
archive_master_following.setHandleId(username);
archive_master_following.setHandleName(handleName);
archive_master_followingService.insertSelective(archive_master_following);
}
}
}
if (emrFaultDetail.getState().equals("复审退回")){
//following表中添加病案室退回操作记录
archive_master_following.setFollowingType("9");
archive_master_following.setFollowingContent("病案室退回科主任");
if(nurseFlagNum>0){
archiveMaster.setCmtNurse(0);
archiveMaster.setNurseName("");
archiveMaster.setCmtNurseDate("");
//2021-01-30 following表中添加科主任退回护士长操作记录
archive_master_following.setFollowingType("6");
archive_master_following.setFollowingContent("科主任退回护士长");
archive_master_following.setHandleTime(nowTime);
archive_master_following.setHandleId(username);
archive_master_following.setHandleName(handleName);
archive_master_followingService.insertSelective(archive_master_following);
}
//通过病案号和标识判断是否存在记录
// Emr_Fault_Detail entity = emrFaultDetailService.selectByArchiveDetailId(emrFaultDetail);
// if (entity != null) {
// //参数输入
// entity.setUpdater(username);
// emrFaultDetail.setUpdater(username);
// entity.setUpdateTime(nowTime);
// entity.setScore(emrFaultDetail.getScore());
// entity.setBackContent(emrFaultDetail.getBackContent());
// entity.setBackFlag(emrFaultDetail.getBackFlag());
// //2、修改缺陷记录
// bol = emrFaultDetailService.updateCloByPrimaryKey(entity);
// } else {
// //参数输入
// emrFaultDetail.setCreater(username);
// emrFaultDetail.setCreateTime(nowTime);
// //插入缺陷记录
// bol = emrFaultDetailService.insertSel(emrFaultDetail);
// }
}
//修改复审内容
if (bol == 1) {
//判断缺陷记录是否有医生或护士有则退回状态改1
//参数输入
emrFaultDetail.setCreater(username);
emrFaultDetail.setCreateTime(nowTime);
//插入缺陷记录
bol = emrFaultDetailService.insertSel(emrFaultDetail);
}
}
bol = archiveMasterService.updateByClo(archiveMaster);
if (emrFaultDetail.getState().equals("复审退回")){
//2021-01-30 following表中添加病案室退回操作记录
archive_master_following.setFollowingType("9");
archive_master_following.setFollowingContent("病案室退回科主任");
archive_master_following.setHandleTime(nowTime);
archive_master_following.setHandleId(username);
archive_master_following.setHandleName(handleName);
archive_master_followingService.insertSelective(archive_master_following);
}
}else{
bol=2;
}
// archiveMaster.setCmtDoctor(0);
// archiveMaster.setCmtNurse(0);
// archiveMaster.setDoctorName("");
// archiveMaster.setNurseName("");
// archiveMaster.setCmtNurseDate("");
// archiveMaster.setCmtDoctorDate("");
}
return bol;
}

@ -84,7 +84,6 @@ public class storageController {
}
}
}
//文件名
String fileName = "召回信息数据" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + ".xls";
//ExportExcelUtil
@ -143,8 +142,6 @@ public class storageController {
archiveMasterFollowing.setRemark(emrFaultDetail.getRecallReason());
bol = archiveMasterFollowingService.insertSelective(archiveMasterFollowing);
}
}
return bol;
}

@ -17,8 +17,6 @@ public interface Emr_Fault_DetailMapper {
int insertSel(Emr_Fault_Detail record);
Emr_Fault_Detail selectByPrimaryKey(Integer id);
int updateCloByPrimaryKey(Emr_Fault_Detail record);
int updateByPrimaryKey(Emr_Fault_Detail record);

@ -121,6 +121,8 @@ public class Archive_Master_Vo {
private String overdueDays;
private String score;
private int numb;
public String getOverdueDays() {
@ -552,6 +554,14 @@ public class Archive_Master_Vo {
this.bedNumber = bedNumber;
}
public String getScore() {
return score;
}
public void setScore(String score) {
this.score = score;
}
public int getNumb() {
return numb;
}

@ -7,6 +7,7 @@
package com.emr.util;
import com.emr.entity.Archive_Detail;
import com.emr.entity.Emr_Picture;
import com.emr.entity.MergePDFItem;
import com.itextpdf.text.Element;
import com.itextpdf.text.Phrase;
@ -128,9 +129,75 @@ public class PrintToPdfUtil {
}
}
}
}
public static String imgsListTopdf(String pdfPath,List<Emr_Picture> imgsList) throws DocumentException, IOException {
String result="合成pdf成功";
File file=new File(pdfPath);
if(file.exists()){
file.delete();
}
//循环类别
if(pdfPath.length()>0){
file=new File(pdfPath);
Document document = new Document();
OutputStream os = new FileOutputStream(file);
PdfWriter.getInstance(document, os);
document.open();
if(imgsList.size()>0){
Image img =null;
File file1=null;
String info="";
for(int j=0;j<imgsList.size();j++){
file1=new File(imgsList.get(j).getMaxPicture());
if(file1!=null && file1.isFile()) {
if (file1.getName().endsWith(".png") || file1.getName().endsWith(".jpg") || file1.getName().endsWith(".gif")
|| file1.getName().endsWith(".jpeg") || file1.getName().endsWith(".tif")) {
// 实例化图片
img = Image.getInstance(file1.getPath());
/*处理图片缩放比例*/
float w = img.getWidth();
float h = img.getHeight();
float percent = 0;
if ((w > A4_weight) && (h < A4_height)) {
percent = (A4_weight * 100) / w;
} else if ((w < A4_weight) && (h > A4_height)) {
percent = (A4_height * 100) / h;
} else if ((w > A4_weight) && (h > A4_height)) {
percent = (A4_weight * 100) / w;
h = (h * percent) / 100;
if (h > A4_height) {
percent = (A4_height * 100) / h;
}
}
// 读取图片流
img.setAlignment(com.lowagie.text.Image.ALIGN_CENTER);
if (percent != 100) {
img.scaleAbsolute(A4_weight, A4_height);
} else {
img.scalePercent(percent);
}
document.add(img);
}else{
//图片格式后缀不对!
info+=file1.getName().toString()+",";
result="文件:"+info+",图片格式后缀不对!";
}
}else{
//图片不存在!
result="图片不存在!";
}
}
document.close();
}
}else{
result="图片记录不存在!";
}
return result;
}
static Document doc =null;
@ -868,7 +935,7 @@ public class PrintToPdfUtil {
public static void main(String[] args) throws IOException {
public static void main(String[] args) throws IOException, DocumentException {
String pdfFile = String.valueOf(System.currentTimeMillis());
//读取指定路径下的文件名和目录名
List list = new ArrayList();
@ -920,11 +987,21 @@ public class PrintToPdfUtil {
//复制pdf文件
/*File file=new File("C:\\Users\\Administrator\\Desktop\\images\\报表工具v2.4操作手册文档.pdf");
save(file, "cc.pdf", "C:\\Users\\Administrator\\Desktop\\images");*/
String fileName="C:\\Users\\HIPAA\\Desktop\\测试\\sss7.pdf";
fileName = fileName.substring(fileName.lastIndexOf("\\")+1).replace(".pdf","");
System.out.println("方法二fileName = " + fileName);
//String fileName="C:\\Users\\HIPAA\\Desktop\\测试\\sss7.pdf";
// fileName = fileName.substring(fileName.lastIndexOf("\\")+1).replace(".pdf","");
// System.out.println("方法二fileName = " + fileName);
List<Emr_Picture> list2 = new ArrayList();
Emr_Picture pic=new Emr_Picture();
pic.setMaxPicture("D:\\test\\uploadImage\\a490ca0b-879f-4ae4-9238-33c44e5fda99\\3\\202012931178716189095653488.jpg");
list2.add(pic);
pic=new Emr_Picture();
pic.setMaxPicture("D:\\test\\uploadImage\\a490ca0b-879f-4ae4-9238-33c44e5fda99\\3\\2020129311787161890956595411.jpg");
list2.add(pic);
String pdfPath="D:\\test\\uploadImage\\a490ca0b-879f-4ae4-9238-33c44e5fda99\\3\\3.pdf";
String fileName=imgsListTopdf(pdfPath,list2);
System.out.println("合成pdf: " + fileName);
}

@ -96,6 +96,9 @@
<if test="flag != null and flag != ''">
and t.flag = #{flag,jdbcType=NVARCHAR}
</if>
<if test="title != null and title != ''">
and t.title like '%'+#{title,jdbcType=VARCHAR}+'%'
</if>
ORDER BY z.assort_sort,t.Title,t.page_number,t.UpLoadDateTime
</select>
<select id="selectByid" parameterType="java.lang.String" resultMap="BaseResultMap">

@ -962,10 +962,10 @@
<if test="isScanning != null and isScanning != ''">
is_scanning = #{isScanning,jdbcType=NVARCHAR},
</if>
<if test="cmtDoctor >-1">
<if test="cmtDoctor != null">
cmt_doctor = #{cmtDoctor,jdbcType=INTEGER},
</if>
<if test="cmtNurse >-1">
<if test="cmtNurse != null">
cmt_nurse = #{cmtNurse,jdbcType=INTEGER},
</if>
<if test="doctorName != null " >

@ -105,6 +105,9 @@
<if test="backFlag==2">
and d.back_flag in(5,6)
</if>
<if test="dealFlag!= null and dealFlag!=''">
and d.deal_flag = #{dealFlag,jdbcType=NVARCHAR}
</if>
<if test="id != null">
and d.id = #{id,jdbcType=INTEGER}
</if>
@ -114,6 +117,9 @@
<if test="assortId != null">
and d.assort_id = #{assortId,jdbcType=NVARCHAR}
</if>
<if test="backContent != null and backContent!=''">
and t.type_name like '%'+#{backContent,jdbcType=NVARCHAR}+'%'
</if>
<if test="content != null">
and d.content = #{content,jdbcType=NVARCHAR}
</if>
@ -134,7 +140,6 @@
</if>
<!--<if test="backFlag != null and backFlag!=''">-->
<!--and d.back_flag= #{backFlag,jdbcType=NCHAR}-->
<!--</if>order by d.update_time,d.create_time desc-->
ORDER BY case WHEN( d.update_time is not null) THEN d.update_time ELSE d.create_time END desc
</select>

@ -384,8 +384,8 @@
color: red;
}
#upLoadImgBtn{
width:35%;
#upLoadImgBtn {
width: 35%;
text-align: left;
}
@ -417,11 +417,10 @@
width: calc(200%); /*margin-left:-15%;*/
height: calc(100vh - 100px);
overflow-x: hidden;
overflow-y:auto;
overflow-y: auto;
!important;
}
#wzContent {
margin-left: 30px;
margin-right: 30px;
@ -430,7 +429,27 @@
overflow-y: hidden;
}
#titleSearch{
align:left;
margin-left: 5px;
height: 34px;
width:600px;
!important;
}
#tableQX{
text-overflow: ellipsis;
white-space: nowrap;
width:100%;
overflow:auto;
!important;
}
#assortNameQX{
width:600px;
!important;
}
</style>
</head>
@ -660,27 +679,35 @@
</div>
</div>
<div class="col-sm-8 divCss5">
<div class="row btnGroupCss">
<button type="button" class="btn btn-danger btn-sm" id="addPdfBtn">添加pdf</button>
<button type="button" class="btn btn-default btn-sm" id="uploadBtn">上传文件</button>
<button type="button" class="btn btn-info btn-sm" id="pdfBtn">查看分段PDF</button>
<button type="button" class="btn btn-success btn-sm" id="pdfBtn2">查看PDF</button>
<%--<button type="button" class="btn btn-primary btn-sm" id="addBtn">添加清单</button>--%>
<button type="button" class="btn btn-warning btn-sm" id="updateStateBtn">选中作废</button>
<button type="button" class="btn btn-primary btn-sm" id="updateStateBtn2">选中使用</button>
<div class="row ">
<div class="col-sm-3 " style="margin-top: 5px;">
<input type="checkbox" id="flag" value="1">只显示作废</input>
</div>
<div class="col-sm-9 btnGroupCss">
<button type="button" class="btn btn-danger btn-sm" id="addPdfBtn">添加pdf</button>
<button type="button" class="btn btn-default btn-sm" id="uploadBtn">上传文件</button>
<button type="button" class="btn btn-info btn-sm" id="pdfBtn">查看分段PDF</button>
<button type="button" class="btn btn-success btn-sm" id="pdfBtn2">查看PDF</button>
<%--<button type="button" class="btn btn-primary btn-sm" id="addBtn">添加清单</button>--%>
<button type="button" class="btn btn-warning btn-sm" id="updateStateBtn">选中作废
</button>
<button type="button" class="btn btn-primary btn-sm" id="updateStateBtn2">选中使用
</button>
</div>
</div>
<div class="row">
<!--数据表格-->
<table id="table2" class="table text-nowrap table-striped"></table>
<div id="toolbar2" class="btn-group pull-left">
<div class="columns columns-left btn-group pull-left" style="margin-top:0px;">
<input type="checkbox" id="flag" value="1"
style="margin-left: 20px;">只显示作废</input>
<%--<button class=" btn btn-success btn-sm" style="height: 34px" type="button"--%>
<%--id="refreshBtn2" name="refresh" aria-label="Refresh"--%>
<%--title="Refresh">--%>
<%--<i class="glyphicon glyphicon-refresh icon-refresh"></i>--%>
<%--</button>--%>
<table id="table2" class="table text-nowrap table-striped"></table>
<div id="toolbar2" class="btn-group pull-left toolbarCss">
<div class=" row columns btn-group pull-right " style="margin-top:0px;">
<div class="row form-inline" style="margin-left: 10px">标题:
<input class="input-sm form-control form-inline" type="text"
id="titleSearch" name="titleSearch" aria-label="Refresh"
title="Refresh" placeholder="请输入pdf相关标题"/>
<button type="button" class="btn btn-primary btn-sm" id="titleSearchBtn">
查询
</button>
</div>
</div>
</div>
</div>
@ -986,12 +1013,30 @@
<input id="archIdQX" type="text" hidden/>
</div>
<div class="modal-content" style="height:80%;">
<div class="modal-body" style="height:100%;width:100%;overflow:auto;">
<!--数据表格-->
<table id="tableQX" class="table text-nowrap table-striped"
style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"></table>
<div class="modal-body" style="height:100%;width:100%;overflow:hidden;">
<div class="form-inline">
<div class="form-group divCss8">
<label for="inpNo">缺陷类型:</label>
<input type="text" class="input-sm form-control" id="assortNameQX" placeholder="请输入缺陷类型">
</div>
<div class="form-group ">
<label>处理否:</label>
<select class="input-sm form-control" id="dealFlagQX">
<option value="">全部</option>
<option value="1">已处理</option>
<option value="0">未处理</option>
</select>
</div>
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtnQX">查询</button>
</div>
<div style="height:80%;">
<!--数据表格-->
<table id="tableQX" class="table text-nowrap table-striped"></table>
</div>
</div>
</div>
<!-- <div class="modal-footer">
<button type="button" class="btn btn-default btn-sm" data-dismiss="modal">返回</button>
</div>-->
@ -1316,16 +1361,20 @@
</div>
<div class="row" style="margin-left:5px; ">
页码:
<input type="number" id="pagePdf" style="max-width:20%"/>-<input type="number" id="pagePdf2" style="max-width:20%"/>
<input type="number" id="pagePdf" style="max-width:20%"/>-<input type="number"
id="pagePdf2"
style="max-width:20%"/>
<button type="button" class="btn btn-primary btn-sm" id="delPageBtn">确认</button>
</div>
</form>
<div class="row" style="margin-left:15px; ">
<div class="row" id="addDelDiv">---不可恢复--</div>
<div class="row" style="margin-bottom: 5px;">
<button type="button" class="btn btn-primary btn-sm" id="returnPdfBtn2" onclick="bfPdfFun()">重新备份PDF
<button type="button" class="btn btn-primary btn-sm" id="returnPdfBtn2"
onclick="bfPdfFun()">重新备份PDF
</button>
<button type="button" class="btn btn-default btn-sm" id="upLoadImgBtn" onclick="upLoadImgFun()">上传额外图片
<button type="button" class="btn btn-default btn-sm" id="upLoadImgBtn"
onclick="upLoadImgFun()">上传额外图片
</button>
</div>
<div class="row">
@ -1399,7 +1448,7 @@
</div>
<%--确认框提示清空所有图片--%>
<%--护士撤回--%>
<div class="modal fade" id="returnCmtModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content ">
@ -1409,7 +1458,7 @@
<h4 class="modal-title">确认</h4>
</div>
<div class="modal-body">
<form><input id="idCmt" hidden/><input id="flagCmt" hidden/>
<form><input id="idCmt" hidden/><input id="flagNurseCmt" hidden/><input id="flagDoctorCmt" hidden/>
<div class="form-group">
<label class="control-label">您确定要撤回提交吗?</label>
</div>
@ -1437,6 +1486,7 @@
<form id="filesUpload2" method="POST" enctype="multipart/form-data">
<div class="imgDivCss" id="divImg2">
<div class="form-inline">
<button type="button" class="btn btn-primary btn-sm divCss" id="imgsClearBtn2">清空图片</button>
<button type="button" class="btn btn-warning btn-sm divCss" id="imgsSaveBtn2">保存</button>
<a href="javascript:;" class="a-upload btn btn-info btn-sm">
<input type="file" name="myFile2" id="myFile2" multiple="multiple" accept="image/*"
@ -1544,39 +1594,30 @@
//获取所有图片
var fileALL = this.files;
for (var i = 0; i < fileALL.length; i++) {
//把图片存到数组中
files[id] = fileALL[i];
id++;
//获取图片路径
objUrl = getObjectURL(fileALL[i]);
var extStart = filepath.lastIndexOf(".");
var ext = filepath.substring(extStart, filepath.length).toUpperCase();
/**
*描述:鉴定每个图片上传尾椎限制
*/
if (ext != ".PNG" && ext != ".GIF" && ext != ".JPG" && ext != ".JPEG") {
//$(".shade").fadeIn(500000000);//500
toastr.warning("图片限于png,gif,jpeg,jpg格式");
//$(".text_span").text("图片限于bmp,png,gif,jpeg,jpg格式");
//this.value = "";
//$(".img_div").html("");
return false;
} else {
/**
*若规则全部通过则在此提交url到后台数据库
*/
// if (objUrl.indexOf(".") != -1) {
// img_html = "<div class='isImg' id='-1'><img src='require(" + objUrl + ")' id='" + fileALL[i].name + "' onclick='javascript:lookBigImg(this)' style='height: 100%; width: 100%;' />"
// } else {
// img_html = "<div class='isImg' id='-1'><img src='" + objUrl + "' id='" + fileALL[i].name + "' onclick='javascript:lookBigImg(this)' style='height: 100%; width: 100%;' />"
// }
img_html = "<div class='isImg' id='-1'><img src='" + objUrl + "' id='" + fileALL[i].name + "' onclick='javascript:lookBigImg(this)' style='height: 100%; width: 100%;' />"
img_html += selectStr
+ " <button class='removeBtn' onclick='javascript:removeImg(this)'>x</button></div>";
img_div.append(img_html);
if(fileALL[i]!=undefined && fileALL[i]!=null && fileALL[i]!=""){
if(fileALL[i].name!=undefined && fileALL[i].name!=null && fileALL[i].name!=""){
var extStart = fileALL[i].name.lastIndexOf(".");
var ext = fileALL[i].name.substring(extStart, fileALL[i].name.length).toUpperCase();
/**
*描述:鉴定每个图片上传尾椎限制
*/
if (ext != ".PNG" && ext != ".GIF" && ext != ".JPG" && ext != ".JPEG") {
toastr.warning("图片:"+fileALL[i].name+"不符限于png,gif,jpeg,jpg格式");
return false;
}else{
files.push(fileALL[i]);
/**
*若规则全部通过则在此提交url到后台数据库
*/
img_html = "<div class='isImg' id='-1'><img src='" + objUrl + "' id='" + fileALL[i].name + "' onclick='javascript:lookBigImg(this)' style='height: 100%; width: 100%;' />"
img_html += selectStr+ " <button class='removeBtn' onclick='javascript:removeImg(this)'>x</button></div>";
img_div.append(img_html);
}
}
}
}
/**
*描述:鉴定每个图片大小总和
@ -1614,28 +1655,33 @@
$("#myFile2").change(function () {
var img_div = $(".img_div2");
var filepath = $("input[name='myFile2']").val();
// var filepath = $("input[name='myFile2']").val();
//获取所有图片
var fileALL = this.files;
for (var i = 0; i < fileALL.length; i++) {
//把图片存到数组中
files[id] = fileALL[i];
id++;
//获取图片路径
objUrl = getObjectURL(fileALL[i]);
var extStart = filepath.lastIndexOf(".");
var ext = filepath.substring(extStart, filepath.length).toUpperCase();
/**
*描述:鉴定每个图片上传尾椎限制
*/
if (ext != ".PNG" && ext != ".GIF" && ext != ".JPG" && ext != ".JPEG") {
toastr.warning("图片限于png,gif,jpeg,jpg格式");
return false;
} else {
img_html = "<div class='isImg' id='-1'><img src='" + objUrl + "' id='" + fileALL[i].name + "' onclick='javascript:lookBigImg(this)' style='height: 100%; width: 100%;' />"
img_html +=
" <button class='removeBtn' onclick='javascript:removeImg2(this)'>x</button></div>";
img_div.append(img_html);
if(fileALL[i]!=undefined && fileALL[i]!=null && fileALL[i]!=""){
if(fileALL[i].name!=undefined && fileALL[i].name!=null && fileALL[i].name!=""){
var extStart = fileALL[i].name.lastIndexOf(".");
var ext = fileALL[i].name.substring(extStart, fileALL[i].name.length).toUpperCase();
/**
*描述:鉴定每个图片上传尾椎限制
*/
if (ext != ".PNG" && ext != ".GIF" && ext != ".JPG" && ext != ".JPEG") {
toastr.warning("图片:"+fileALL[i].name+"不符限于png,gif,jpeg,jpg格式");
return false;
}else{
files.push(fileALL[i]);
/**
*若规则全部通过则在此提交url到后台数据库
*/
img_html = "<div class='isImg' id='-1'><img src='" + objUrl + "' id='" + fileALL[i].name + "' onclick='javascript:lookBigImg(this)' style='height: 100%; width: 100%;' />"
img_html +=" <button class='removeBtn' onclick='javascript:removeImg2(this)'>x</button></div>";
img_div.append(img_html);
}
}
}
}
@ -1648,9 +1694,7 @@
file_size = fileALL[j].size;
all_size = all_size + fileALL[j].size;
var size = all_size / 1024;
if (size > 500000000) {//500
//$(".shade").fadeIn(500);
//$(".text_span").text("上传的图片大小不能超过100k");
if (size > 500000000) {
toastr.warning("上传的图片大小不能超过10000000k");
this.value = "";
$(".img_div2").html("");
@ -1700,8 +1744,10 @@
for (var j = 0; j < fileList.length; j++) {
//通过图片名判断图片在数组中的位置然后删除
// console.log(fileList[j].name + "111");
if(fileList[j].name!=undefined)
if (fileList[j].name == filename) {
fileList.splice(j, 1);
files = fileList;
id--;
break;
}
@ -1743,16 +1789,19 @@
//删除父节点
$(r).parent().remove();
var fileList = Array.from(files);
//遍历数组
for (var j = 0; j < fileList.length; j++) {
//通过图片名判断图片在数组中的位置然后删除
if(fileList[j].name!=undefined)
if (fileList[j].name == filename) {
fileList.splice(j, 1);
id--;
files = fileList;
id--;
break;
}
}
}
/**
@ -1798,7 +1847,7 @@
if (result != null) {
selectStr = "<select class='selectB'>";
for (i = 0; i < result.length; i++) {
selectStr += "<option value=" + result[i].assortId + ">" + result[i].assortName + "</option>";
selectStr += "<option value='" + result[i].assortId + "' title='"+result[i].assortName+"'>" + result[i].assortName + "</option>";
$("#inpGl").append("<option value=" + result[i].assortId + ">" + result[i].assortName + "</option>");
$("#inpType").append("<option value=" + result[i].assortId + ">" + result[i].assortName + "</option>");
}
@ -1995,9 +2044,8 @@
$("#imgsSaveBtn").click(function () {
//console.log("===保存图片===");
var spinner1 = new Spinner(opts);
var target = document.getElementById('divImg');
spinner1.spin(target);//给id为foo的div 中绑上spinner
spinner.spin(target);//给id为foo的div 中绑上spinner
var fileArr = [];
var b = 0;
@ -2006,30 +2054,19 @@
var div_data = div_p.children();
if (div_data != null)
for (var i = 0; i < div_data.length; i++) {
if (div_data[i].getAttribute('src') != null && div_data[i].getAttribute('src') != "") {
// console.log("第" + (i + 1) + "个的src=" + div_data[i].getAttribute('src'));
//obj.fileSrc= div_data[i].getAttribute('src');
//obj.fileSrc = obj.fileSrc;
//var s=new File([obj.fileSrc], "a"+i+".jpg");
//files.push(s);
//console.log(obj.fileSrc);
}
if (div_data[i].value != null && div_data[i].value != "") {
var obj = {};
//console.log("第select" + (i + 1) + "个的value=" + div_data[i].value);
var selectedIndex=div_data[i].selectedIndex;
//console.log(div_data[i].options[index].getAttribute("title"));
obj.selectName=div_data[i].options[selectedIndex].getAttribute("title");
obj.selectVal = div_data[i].value;
if (b < div_data.length / 2) {
obj.id = div_p[b].id;
b++;
}
fileArr.push(obj);
}
// if (div_data[i].id.indexOf("oldSel")!=-1) {
// console.log("第Lable" + (i + 1) + "html=" + div_data[i].getAttribute('value'));
// }
}
if (fileArr.length > 0) {
@ -2044,8 +2081,6 @@
uploadFile.append("imgs", files[i]);
}
if ("undefined" != typeof (uploadFile) && uploadFile != null && uploadFile != "") {
var target = document.getElementById('filesUpload');
spinner.spin(target);//给id为foo的div 中绑上spinner
//通过ajax上传
$.ajax({
url: "${path}/inHosp/uploadImgS",
@ -2065,25 +2100,21 @@
} else {
toastr.warning(data);
}
spinner1.spin();
}, 2000);
spinner.spin();
}, 1000);
files = new Array();
},
error: function () {
spinner1.spin();
spinner.spin();
toastr.error("批量上传失败!");
}
});
spinner.spin();
}
} else {
spinner.spin();
toastr.warning("请选择上传的图片!");
}
});
@ -2138,6 +2169,9 @@
}
});
$("#titleSearchBtn").click(function () {
$('#table2').bootstrapTable('refreshOptions', {limit: 1, offset: 10});
});
$("#pdfBtn2").click(function () {
var idStr = "";
@ -2161,7 +2195,7 @@
if (result != "") {
//绝对路径
var pdfPath = result;
//console.log(result);
//console.log(result);
newWindow.location.href = "${path}/static/pdfjs/web/viewer.html?file=" + encodeURIComponent("${path}/inHosp/pdfStreamHandeler?url=" + pdfPath);
<%--var pdfUrl = "${path}/static/pdfjs/web/viewer.html?file=../../../static/img/pdfFiles/typesPdf/" + result;//+ result;--%>
@ -2907,9 +2941,13 @@
}
});
}
getDoctorInCharge();
});
$("#imgsClearBtn2").click(function () {
//console.log("===清空删除页的图片===");
$(".img_div2").empty();
files = new Array();
});
$("#imgsSaveBtn2").click(function () {
@ -3376,13 +3414,21 @@
url: "${path}/fault/getFaultList", // 获取表格数据的url
queryParams: function (params) {
//console.log($("#archIdQX").val());
var backFlag=1;
//(1,2,5,6)
/* if($("#backFlagQX").val()!=null && $("#backFlagQX").val()!=null){
backFlag=$("#backFlagQX").val();
}*/
var temp = {
///limit: limit, //页面大小
// offset: offset, //页码
//order: params.order, //排位命令descasc
//id: $("#id").val(),
archiveDetailId: $("#archIdQX").val(),
backFlag: 1
backContent:$("#assortNameQX").val(),
dealFlag:$("#dealFlagQX").val(),
backFlag:backFlag,
//backFlag: 1
};
return temp;
},
@ -4079,25 +4125,24 @@
}
}
if (index.indexOf("hcmit") != -1) {
if (row.archivestate != '初审' && row.archivestate != '提交' && row.cmtDoctor != 1) {
html = html + '<button type="button" class="btn btn-sm btn-success doctorInfo">归档医生提交</button>';
}
}
if (index.indexOf("ncmit") != -1) {
if (row.archivestate != '初审' && row.archivestate != '提交' && row.cmtNurse != 1) {
html = html + '<button type="button" class="btn btn-sm btn-warning nursInfo">归档护士提交</button>';
}
}
if (index.indexOf("hcmit") != -1) {
if (row.archivestate != '初审' && row.archivestate != '提交' && row.cmtDoctor == 1) {
html = html + '<button type="button" class="btn btn-sm btn-primary doctorInfoBack">归档医生撤回</button>';
if (row.archivestate != '初审' && row.archivestate != '提交' ) {
if(row.cmtDoctor != 1) {
html = html + '<button type="button" class="btn btn-sm btn-success doctorInfo">归档医生提交</button>';
}else if(row.cmtDoctor == 1){
html = html + '<button type="button" class="btn btn-sm btn-primary doctorInfoBack">归档医生撤回</button>';
}
}
}
if (index.indexOf("ncmit") != -1) {
if (row.archivestate != '初审' && row.archivestate != '提交' && row.cmtNurse == 1) {
html = html + '<button type="button" class="btn btn-sm btn-primary nursInfoBack">归档护士撤回</button>';
if (row.archivestate != '初审' && row.archivestate != '提交' ) {
if( row.cmtNurse != 1) {
html = html + '<button type="button" class="btn btn-sm btn-warning nursInfo">归档护士提交</button>';
}else if(row.cmtNurse == 1){
html = html + '<button type="button" class="btn btn-sm btn-warning nursInfoBack">归档护士撤回</button>';
}
}
}
var redFlag = row.numb;
if (redFlag != 0) {
//有缺陷
@ -4176,12 +4221,17 @@
},
'click .doctorInfoBack': function (e, value, row, index) {
$("#idCmt").val(row.id);
$("#flagCmt").val(1);
$('#returnCmtModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
show: true//弹出对话框
});
$("#flagNurseCmt").val(row.cmtNurse);
$("#flagDoctorCmt").val(0);
if(row.cmtDoctor==1) {
$('#returnCmtModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
show: true//弹出对话框
});
}else{
toastr.warning("归档医生已经撤回!");
}
},
'click .nursInfo': function (e, value, row, index) {
@ -4236,13 +4286,19 @@
}
},
'click .nursInfoBack': function (e, value, row, index) {
//console.log(row.cmtNurse);
$("#idCmt").val(row.id);
$("#flagCmt").val(0);
$('#returnCmtModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
show: true//弹出对话框
});
$("#flagNurseCmt").val(0);
$("#flagDoctorCmt").val(row.cmtDoctor);
if(row.cmtNurse==1){
$('#returnCmtModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
show: true//弹出对话框
});
}else{
toastr.warning("归档护士已经撤回!");
}
},
'click .selInfo': function (e, value, row, index) {
@ -4319,48 +4375,44 @@
}
function returnDoctorFun(idCmt) {
var doctorFlag = 0;
var nurseFlag = -1;
var flagCmt = $("#flagCmt").val();
if (flagCmt == 1) {
doctorFlag = 0;
nurseFlag = -1;
var idCmt = $("#idCmt").val();
if (idCmt == "" || idCmt == null || idCmt == undefined) {
toastr.error("撤回记录不存在!");
return;
} else {
nurseFlag = 0;
doctorFlag = -1;
}
$.ajax({
url: "${path}/beHosp/withdrawDoctorOrNurs",
type: "POST",
data: {cmtDoctor: doctorFlag, id: idCmt, cmtNurse: nurseFlag},
success: function (result) {
if (result == "成功") {
$("#table").bootstrapTable("refresh");
if (flagCmt == 1) {
toastr.success("归档医生撤回成功!");
} else {
toastr.success("归档护士撤回成功!");
}
} else {
if (flagCmt == 1) {
toastr.error("归档医生撤回失败!");
} else {
toastr.error("归档护士撤回失败!");
var doctorFlag = $("#flagDoctorCmt").val();
var nurseFlag = $("#flagNurseCmt").val();
if(doctorFlag==null ||doctorFlag=="" ||doctorFlag==undefined){
doctorFlag=0;
}
if(nurseFlag==null ||nurseFlag=="" ||nurseFlag==undefined){
nurseFlag=0;
}
$.ajax({
url: "${path}/beHosp/withdrawDoctorOrNurs",
type: "POST",
data: {id: idCmt,cmtDoctor: doctorFlag, cmtNurse: nurseFlag},
success: function (result) {
if(result.indexOf("成功")!=-1){
$("#table").bootstrapTable("refresh");
toastr.success(result);
}else{
toastr.error(result);
}
}
});
}
});
$("#returnCmtModal").modal('hide'); //手动关闭
$("#returnCmtModal").modal('hide'); //手动关闭
}
}
$("#searchBtnQX").click(function () {
$('#tableQX').bootstrapTable('refresh');
});
$("#returnCmtBtn").click(function () {
var idCmt = $("#idCmt").val();
if (idCmt != "" && idCmt != null && idCmt != undefined) {
returnDoctorFun(idCmt)
} else {
toastr.error("归档医生撤回失败!");
}
returnDoctorFun(idCmt);
});
@ -4436,6 +4488,11 @@
assortId: assortId,
flag: flag
};
var title=$("#titleSearch").val();
if(title!=null && title!=""){
temp.title=title;
}
return temp;
},
sortName: 'assortSort', // 要排序的字段

File diff suppressed because it is too large Load Diff

@ -1,4 +1,4 @@


<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set value="${pageContext.request.contextPath}" var="path" scope="page"/>
@ -167,7 +167,7 @@
#delPdfPageModal .modal-content {
width: calc(210%); /*margin-left:-15%;*/
height: calc(100vh - 100px);
height: calc(100vh - 90px);
overflow: hidden;
!important;
}
@ -247,7 +247,7 @@
#imglist {
overflow-x: hidden;
overflow-y: auto;
height: calc(100vh - 250px);
height: calc(100vh - 37%);
}
#pdf_page {
@ -282,6 +282,7 @@
}
.toolbarCss {
width:100%;
margin-right: 20px;
margin-bottom: 0px;
!important;
@ -345,7 +346,6 @@
margin-bottom: 5px;
}
.showImg2 {
margin-left: 2%;
margin-bottom: 2px;
@ -386,8 +386,15 @@
width: 70%;
margin-left: 30%;
!important;
}
*/
} */
#titleSearch{
align:left;
margin-left: 5px;
height: 34px;
width:600px;
!important;
}
</style>
</head>
@ -456,10 +463,8 @@
<div class="columns columns-right btn-group pull-right">
<div class="btn-group btn-info">
<select id="sel_exportoption" class="form-control">                
<option value="">导出当前页面数据</option>
               
<option value="all">导出全部数据</option>
             
<option value="">导出当前页面数据</option>                
<option value="all">导出全部数据</option>              
<option value="selected">导出选中数据</option>
</select>
</div>
@ -559,26 +564,29 @@
</div>
</div>
<div class="col-sm-8 divCss5">
<div class="row btnGroupCss">
<button type="button" class="btn btn-danger btn-sm" id="addPdfBtn">添加pdf</button>
<button type="button" class="btn btn-default btn-sm" id="uploadBtn">上传文件</button>
<button type="button" class="btn btn-info btn-sm" id="pdfBtn">查看分段PDF</button>
<button type="button" class="btn btn-success btn-sm" id="pdfBtn2">查看PDF</button>
<%--<button type="button" class="btn btn-primary btn-sm" id="addBtn">添加清单</button>--%>
<button type="button" class="btn btn-warning btn-sm" id="updateStateBtn">选中作废</button>
<button type="button" class="btn btn-primary btn-sm" id="updateStateBtn2">选中使用</button>
<div class="row ">
<div class="col-sm-3 " style="margin-top: 5px;margin-left: -20px">
<input type="checkbox" id="flag" value="1">只显示作废</input>
</div>
<div class="col-sm-9 btnGroupCss" >
<button type="button" class="btn btn-danger btn-sm" id="addPdfBtn">添加pdf</button>
<button type="button" class="btn btn-default btn-sm" id="uploadBtn">上传文件</button>
<button type="button" class="btn btn-info btn-sm" id="pdfBtn">查看分段PDF</button>
<button type="button" class="btn btn-success btn-sm" id="pdfBtn2">查看PDF</button>
<%--<button type="button" class="btn btn-primary btn-sm" id="addBtn">添加清单</button>--%>
<button type="button" class="btn btn-warning btn-sm" id="updateStateBtn">选中作废</button>
<button type="button" class="btn btn-primary btn-sm" id="updateStateBtn2">选中使用</button>
</div>
</div>
<div class="row">
<!--数据表格-->
<table id="table2" class="table text-nowrap table-striped"></table>
<div id="toolbar2" class="btn-group pull-left toolbarCss">
<div class="columns columns-left btn-group pull-left" style="margin-top:0px;">
<input type="checkbox" id="flag" value="1">只显示作废</input>
<%--<button class=" btn btn-success btn-sm" style="height: 34px" type="button"--%>
<%--id="refreshBtn2" name="refresh" aria-label="Refresh"--%>
<%--title="Refresh">--%>
<%--<i class="glyphicon glyphicon-refresh icon-refresh"></i>--%>
<%--</button>--%>
<div class=" row columns btn-group pull-right " style="margin-top:0px;">
<div class="row form-inline" >标题:
<input class="input-sm form-control form-inline" type="text" id="titleSearch" name="titleSearch" aria-label="Refresh"
title="Refresh" placeholder="请输入pdf相关标题"/><button type="button" class="btn btn-primary btn-sm" id="titleSearchBtn">查询</button>
</div>
</div>
</div>
</div>
@ -694,6 +702,7 @@
</div>
<div class="modal-body">
<form id="filesUpload" method="POST" enctype="multipart/form-data">
<div class="imgDivCss" id="divImg">
<%--<form>--%>
<%--<p class="form-group">--%>
@ -736,6 +745,7 @@
<%--</div>--%>
</div>
</form>
<%--<div id="handout_wrap_inner"><input id="tsInfo" type="text" style="border:none" size="100" readonly/></div>--%>
<%--<iframe id="pdf_page" name="pdf_page" data-target="_bank" style="width:100%;height:100%"></iframe>--%>
</div>
@ -972,12 +982,14 @@
<form id="filesUpload2" method="POST" enctype="multipart/form-data">
<div class="imgDivCss" id="divImg2">
<div class="form-inline">
<button type="button" class="btn btn-primary btn-sm divCss" id="imgsClearBtn2">清空图片</button>
<button type="button" class="btn btn-warning btn-sm divCss" id="imgsSaveBtn2">保存</button>
<a href="javascript:;" class="a-upload btn btn-info btn-sm">
<input type="file" name="myFile2" id="myFile2" multiple="multiple" accept="image/*"
hidden/>选择文件
</a>
</div>
<div class="img_div2"></div>
<div class="shade" onclick="javascript:closeShade()">
<div class=""><span class="text_span"></span>
@ -997,8 +1009,7 @@
var tipLoad = 1;
//创建数组保存图片
var files = new Array();
//创建数组保存图片
var files = new Array();
var id = 0;
//初始化类别
var selectStr = "";
@ -1086,38 +1097,30 @@
//获取所有图片
var fileALL = this.files;
for (var i = 0; i < fileALL.length; i++) {
//把图片存到数组中
files[id] = fileALL[i];
id++;
//获取图片路径
objUrl = getObjectURL(fileALL[i]);
var extStart = filepath.lastIndexOf(".");
var ext = filepath.substring(extStart, filepath.length).toUpperCase();
/**
*描述:鉴定每个图片上传尾椎限制
*/
if (ext != ".PNG" && ext != ".GIF" && ext != ".JPG" && ext != ".JPEG") {
toastr.warning("图片限于png,gif,jpeg,jpg格式");
//$(".shade").fadeIn(500000000);//500
//$(".text_span").text("图片限于png,gif,jpeg,jpg格式");
//this.value = "";
//$(".img_div").html("");
return false;
} else {
//console.log(objUrl);
/**
*若规则全部通过则在此提交url到后台数据库
*/
// if(objUrl.indexOf(".")!=-1){
// img_html = "<div class='isImg' id='-1'><img src='require(" + objUrl + ")' id='" + fileALL[i].name + "' onclick='javascript:lookBigImg(this)' style='height: 100%; width: 100%;' />"
// }else{
img_html = "<div class='isImg' id='-1'><img src='" + objUrl + "' id='" + fileALL[i].name + "' onclick='javascript:lookBigImg(this)' style='height: 100%; width: 100%;' />"
// }
img_html += selectStr
+ " <button class='removeBtn' onclick='javascript:removeImg(this)'>x</button></div>";
img_div.append(img_html);
if(fileALL[i]!=undefined && fileALL[i]!=null && fileALL[i]!=""){
if(fileALL[i].name!=undefined && fileALL[i].name!=null && fileALL[i].name!=""){
var extStart = fileALL[i].name.lastIndexOf(".");
var ext = fileALL[i].name.substring(extStart, fileALL[i].name.length).toUpperCase();
/**
*描述:鉴定每个图片上传尾椎限制
*/
if (ext != ".PNG" && ext != ".GIF" && ext != ".JPG" && ext != ".JPEG") {
toastr.warning("图片:"+fileALL[i].name+"不符限于png,gif,jpeg,jpg格式");
return false;
}else{
files.push(fileALL[i]);
/**
*若规则全部通过则在此提交url到后台数据库
*/
img_html = "<div class='isImg' id='-1'><img src='" + objUrl + "' id='" + fileALL[i].name + "' onclick='javascript:lookBigImg(this)' style='height: 100%; width: 100%;' />"
img_html += selectStr+ " <button class='removeBtn' onclick='javascript:removeImg(this)'>x</button></div>";
img_div.append(img_html);
}
}
}
}
/**
*描述:鉴定每个图片大小总和
@ -1154,33 +1157,34 @@
});
$("#myFile2").change(function () {
console.log("===========change==========myFile2=====");
var img_div = $(".img_div2");
var filepath = $("input[name='myFile2']").val();
console.log(filepath);
// var filepath = $("input[name='myFile2']").val();
//获取所有图片
var fileALL = this.files;
for (var i = 0; i < fileALL.length; i++) {
//把图片存到数组中
files[id] = fileALL[i];
id++;
//获取图片路径
objUrl = getObjectURL(fileALL[i]);
var extStart = filepath.lastIndexOf(".");
var ext = filepath.substring(extStart, filepath.length).toUpperCase();
console.log("ext====="+ext);
/**
*描述:鉴定每个图片上传尾椎限制
*/
if (ext != ".PNG" && ext != ".GIF" && ext != ".JPG" && ext != ".JPEG") {
toastr.warning("图片限于png,gif,jpeg,jpg格式");
return false;
} else {
img_html = "<div class='isImg' id='-1'><img src='" + objUrl + "' id='" + fileALL[i].name + "' onclick='javascript:lookBigImg(this)' style='height: 100%; width: 100%;' />"
img_html +=
" <button class='removeBtn' onclick='javascript:removeImg2(this)'>x</button></div>";
img_div.append(img_html);
if(fileALL[i]!=undefined && fileALL[i]!=null && fileALL[i]!=""){
if(fileALL[i].name!=undefined && fileALL[i].name!=null && fileALL[i].name!=""){
var extStart = fileALL[i].name.lastIndexOf(".");
var ext = fileALL[i].name.substring(extStart, fileALL[i].name.length).toUpperCase();
/**
*描述:鉴定每个图片上传尾椎限制
*/
if (ext != ".PNG" && ext != ".GIF" && ext != ".JPG" && ext != ".JPEG") {
toastr.warning("图片:"+fileALL[i].name+"不符限于png,gif,jpeg,jpg格式");
return false;
}else{
files.push(fileALL[i]);
/**
*若规则全部通过则在此提交url到后台数据库
*/
img_html = "<div class='isImg' id='-1'><img src='" + objUrl + "' id='" + fileALL[i].name + "' onclick='javascript:lookBigImg(this)' style='height: 100%; width: 100%;' />"
img_html +=" <button class='removeBtn' onclick='javascript:removeImg2(this)'>x</button></div>";
img_div.append(img_html);
}
}
}
}
@ -1324,13 +1328,19 @@
$(r).parent().remove();
var fileList = Array.from(files);
//遍历数组
//console.log(fileList);
for (var j = 0; j < fileList.length; j++) {
//通过图片名判断图片在数组中的位置然后删除
// console.log(fileList[j].name + "111");
if (fileList[j].name == filename) {
fileList.splice(j, 1);
id--;
break;
if(fileList[j]!= undefined){
//通过图片名判断图片在数组中的位置然后删除
// console.log(fileList[j].name != undefined);
if (fileList[j].name != undefined) {
if (fileList[j].name == filename) {
fileList.splice(j, 1);
files = fileList;
id--;
break;
}
}
}
}
files = fileList;
@ -1374,13 +1384,15 @@
//遍历数组
for (var j = 0; j < fileList.length; j++) {
//通过图片名判断图片在数组中的位置然后删除
if(fileList[j].name!=undefined)
if (fileList[j].name == filename) {
fileList.splice(j, 1);
files = fileList;
id--;
break;
}
files = fileList;
}
files = fileList;
}
/**
@ -1423,10 +1435,10 @@
if (result != null) {
selectStr = "<select class='selectB'>";
for (i = 0; i < result.length; i++) {
selectStr += "<option value=" + result[i].assortId + ">" + result[i].assortName + "</option>";
$("#inpGl").append("<option value=" + result[i].assortId + ">" + result[i].assortName + "</option>");
selectStr += "<option value='" + result[i].assortId + "' title='"+result[i].assortName+"'>" + result[i].assortName + "</option>";
$("#inpGl").append("<option value='" + result[i].assortId + "' title='"+result[i].assortName+"'>" + result[i].assortName + "</option>");
//下拉类别
$("#inpType").append("<option value=" + result[i].assortId + ">" + result[i].assortName + "</option>");
$("#inpType").append("<option value='" + result[i].assortId + "' title='"+result[i].assortName+"'>" + result[i].assortName + "</option>");
}
selectStr += " </select>";
}
@ -1578,7 +1590,7 @@
//console.log(result[i].maxPicture);
var fileName = result[i].maxPicture.split("\\");
var parentdiv = $("<div class='isImg' id='" + result[i].id + "'></div>");
var imgTig = $("<img onclick='javascript:lookBigImg(this)' style='height: 150%; width: 100%;'/>");
var imgTig = $("<img onclick='javascript:lookBigImg(this)' style='height: 100%; width: 100%;'/>");
//创建一个img
imgTig.attr('id', fileName[fileName.length - 1]);
@ -1627,11 +1639,8 @@
});
$("#imgsSaveBtn").click(function () {
//console.log("===保存图片===");
var spinner1 = new Spinner(opts);
var target = document.getElementById('divImg');
spinner.spin(target);//给id为foo的div 中绑上spinner
var fileArr = [];
var b = 0;
//获取图片src和下拉框值
@ -1649,7 +1658,10 @@
//}
if (div_data[i].value != null && div_data[i].value != "") {
var obj = {};
//console.log("第select" + (i + 1) + "个的value=" + div_data[i].value);
// console.log("第select" + (i + 1) + "个的value=" + div_data[i].value);
var selectedIndex=div_data[i].selectedIndex;
//console.log(div_data[i].options[index].getAttribute("title"));
obj.selectName=div_data[i].options[selectedIndex].getAttribute("title");
obj.selectVal = div_data[i].value;
if (b < div_data.length / 2) {
obj.id = div_p[b].id;
@ -1657,14 +1669,9 @@
}
fileArr.push(obj);
}
// if (div_data[i].id.indexOf("oldSel")!=-1) {
// console.log("第Lable" + (i + 1) + "html=" + div_data[i].getAttribute('value'));
// }
}
if (fileArr.length > 0) {
spinner1.spin(target);//给id为foo的div 中绑上spinner
//创建FormData根据form
//console.log($("#outDateLab").val());
var uploadFile = new FormData($("#filesUpload")[0]);
@ -1677,7 +1684,6 @@
for (var i = 0; i < files.length; i++) {
uploadFile.append("imgs", files[i]);
}
if ("undefined" != typeof (uploadFile) && uploadFile != null && uploadFile != "") {
//通过ajax上传
$.ajax({
@ -1697,20 +1703,19 @@
} else {
toastr.warning(data);
}
spinner1.spin();
spinner.spin();
}, 2000);
files = new Array();
},
error: function () {
spinner1.spin();
spinner.spin();
toastr.error("批量上传失败!");
}
});
}
} else {
spinner.spin();
toastr.warning("请选择上传的图片!");
}
});
@ -1786,6 +1791,10 @@
}
});
$("#titleSearchBtn").click(function () {
$('#table2').bootstrapTable('refreshOptions', {limit: 1, offset: 10});
});
$("#pdfBtn2").click(function () {
//选中批量使用
var idStr = "";
@ -1810,7 +1819,7 @@
if (result != "") {
var pdfPath = result;
console.log(result);
//console.log(result);
//本机E盘下PDF
//var pdfPath = "C:/Users/Administrator/Desktop/测试/123.pdf";
//encodeURIComponent()处理http请求进行转化
@ -1883,6 +1892,12 @@
}
});
$("#imgsClearBtn2").click(function () {
//console.log("===清空删除页的图片===");
$(".img_div2").empty();
files = new Array();
});
$("#imgsSaveBtn2").click(function () {
//console.log("===保存删除页的图片===");
var parentId = $("#pdfId").val();
@ -2345,7 +2360,7 @@
if (len > 0) {
for (var m = 0; m < value.length; m++) {
if (value[m] != "") {
console.log("m:" + value[m]);
//console.log("m:" + value[m]);
deptStr += value[m] + ",";
} else {
bol = 1
@ -2660,6 +2675,11 @@
assortId: assortId,
flag: flag
};
var title=$("#titleSearch").val();
if(title!=null && title!=""){
temp.title=title;
}
return temp;
},
sortName: 'assortSort', // 要排序的字段

@ -12,8 +12,11 @@
<%@include file="../../jspf/comm.jspf" %>
<%@ include file="../../jspf/ztreeCommom.jsp" %>
<%@include file="../../jspf/floatWin.jspf" %>
<script type="text/javascript" src="${path}/static/bootstrap-3.3.7/plugins/bootstrap-multiselect-master/dist/js/bootstrap-multiselect.js"></script>
<link rel="stylesheet" href="${path}/static/bootstrap-3.3.7/plugins/bootstrap-multiselect-master/dist/css/bootstrap-multiselect.css" type="text/css"/>
<script type="text/javascript"
src="${path}/static/bootstrap-3.3.7/plugins/bootstrap-multiselect-master/dist/js/bootstrap-multiselect.js"></script>
<link rel="stylesheet"
href="${path}/static/bootstrap-3.3.7/plugins/bootstrap-multiselect-master/dist/css/bootstrap-multiselect.css"
type="text/css"/>
<style type="text/css">
.modal-header2 {
text-align: center !important;
@ -31,12 +34,13 @@
margin-left: 2px;
}
.divCss5{
.divCss5 {
color: black;
margin-top: 0px;
margin-left: 1px;
}
.fixed-table-container {
border-top: 1px solid #ddd;
border-left: 0px solid #ddd;
@ -46,7 +50,7 @@
.divCss7 {
margin-top: 5px;
margin-left:0px;
margin-left: 0px;
color: blue;
}
@ -58,12 +62,12 @@
margin-bottom: 5px;
}
label,span,textarea,input{
label, span, textarea, input {
color: black;
font-weight: normal;
}
body{
body {
background-color: #fff;
overflow: hidden;
}
@ -95,7 +99,8 @@
font-weight: bold;
float: left;
}
.panel{
.panel {
width: 98%;
}
@ -108,7 +113,7 @@
color: #000
}
.table th{
.table th {
text-align: center;
}
@ -119,8 +124,8 @@
}
#verifyModal .modal-content {
margin-left: 50%;
margin-top: 35%;
margin-left: 30%;
margin-top: 20%;
width: 100%;
}
@ -131,14 +136,14 @@
}
#returnModal .modal-content {
margin-left: 30%;
margin-top: 35%;
margin-left: 15%;
margin-top: 20%;
width: 120%;
}
#firstModal .modal-content {
margin-left: 50%;
margin-top: 35%;
margin-left: 10%;
margin-top: 20%;
width: 100%;
}
@ -154,12 +159,17 @@
width: 120%;
}
.bs-searchbox{
width:190px;
}
.bs-searchbox input.form-control{
height: 25px;
}
#assortNameQX {
width: 200px
}
.bs-searchbox {
width: 190px;
}
.bs-searchbox input.form-control {
height: 25px;
}
</style>
</head>
<body>
@ -176,13 +186,14 @@
<h3 class="panel-title">缺陷信息</h3>
</div>
<div class="panel-body" >
<div class="panel-body">
<form class="form-horizontal" id="form">
<div class="row divCss2 ">
<span style="vertical-align:center;float: left">退回:</span>
<div id="flagDiv" style="float: left;margin-left:5px" hidden>
<select style="width:100px;" class="selectpicker bla bla bli" multiple name="flag" id="flag" title="请输入角色">
<select style="width:100px;" class="selectpicker bla bla bli" multiple name="flag" id="flag"
title="请输入角色">
<option value="1" selected>医生</option>
<option value="2">护士</option>
</select>
@ -190,54 +201,67 @@
<input class="form-control" style="margin-left: 3px;" id="roleVal" readonly hidden/>
</div>
<div class="row divCss2">
<%-- <span class="divCss7">缺陷信息:</span>--%>
<%-- <span class="divCss7">缺陷信息:</span>--%>
<div id="typFlagDiv">
<div class="row">
<div class="col-xs-2" >选项:</div>
<div class="col-xs-2">选项:</div>
<div class="col-xs-8" id="mulDiv" style="margin-left: -30px;">
</div>
</div>
<%-- <div class="divCss4" id="faultTypeDiv2">
</div>--%>
</div>
<%-- <div class="divCss4" id="faultTypeDiv2">
</div>--%>
</div>
<div class="row divCss2">
<span style="vertical-align:top;">内容:</span>
<textarea id="content" rows="6" style="width:80%;"></textarea>
</div>
<div class="row divCss2">
<div class="col-sm-6" style="text-align: center;">
<button type="button" class="btn btn-primary btn-sm" id="saveBtn">保存</button>
<div class="row divCss2">
<span style="vertical-align:top;">内容:</span>
<textarea id="content" rows="6" style="width:80%;"></textarea>
</div>
<div class="col-sm-6">
<button type="button" class="btn btn-default btn-sm" id="clearBtn">清空</button>
<div class="row divCss2">
<div class="col-sm-6" style="text-align: center;">
<button type="button" class="btn btn-primary btn-sm" id="saveBtn">保存</button>
</div>
<div class="col-sm-6">
<button type="button" class="btn btn-default btn-sm" id="clearBtn">清空</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<%--<div class="divCss4" id="faultTypeDiv3"></div>--%>
<div class="row divCss2 panel panel-primary ">
<!--数据表格-->
<table id="table" class="table text-nowrap table-striped" style="table-layout:fixed"></table>
<div id="toolbar" class="btn-group pull-right" style="margin-right: 20px;">
<div class="columns columns-right btn-group pull-right">
<button type="button" class="btn btn-warning btn-sm" id="addBtn" hidden>添加</button>
<button type="button" class="btn btn-danger btn-sm" id="delBtn" hidden>删除</button>
<button type="button" class="btn btn-primary btn-sm" id="dealBtn" hidden>处理</button>
<button type="button" class="btn btn-success btn-sm" id="dealCancelBtn" hidden>取消处理</button>
<%--<button class=" btn btn-success" style="height: 34px" type="button" id="refreshBtn" name="refresh"--%>
<%--aria-label="Refresh"--%>
<%--title="Refresh">--%>
<%--<i class="glyphicon glyphicon-refresh icon-refresh"></i>--%>
<%--</button>--%>
</div>
<%--<div class="divCss4" id="faultTypeDiv3"></div>--%>
<div class="row divCss2 panel panel-primary ">
<div class="row" style="margin-right: 5px;margin-bottom: 5px;">
<div class="columns columns-right btn-group pull-right">
<button type="button" class="btn btn-warning btn-sm" id="addBtn" hidden>添加</button>
<button type="button" class="btn btn-danger btn-sm" id="delBtn" hidden>删除</button>
<button type="button" class="btn btn-primary btn-sm" id="dealBtn" hidden>处理</button>
<button type="button" class="btn btn-success btn-sm" id="dealCancelBtn" hidden>取消处理</button>
</div>
</div>
<div class="row divCss2">
<button type="button" class="btn btn-primary btn-large" id="backBtn">主任退回</button>
<button type="button" class="btn btn-success btn-large" id="firstBtn">初审</button>
<div class="form-inline " style="margin-bottom: -15px;font-size: 14px;">
<div class="form-group ">
<label>类型:</label>
<input type="text" class="input-sm form-control" id="assortNameQX" placeholder="请输入缺陷类型">
</div>
<div class="form-group divCss2" style="margin-left: 10px">
<label>处理否:</label>
<select class="input-sm form-control" id="dealFlagQX">
<option value="">全部</option>
<option value="1">已处理</option>
<option value="0">未处理</option>
</select>
</div>
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtnQX">查询</button>
</div>
<!--数据表格-->
<table id="table" class="table text-nowrap table-striped" style="table-layout:fixed"></table>
<%--<div id="toolbar" class="btn-group pull-left" style="text-align: left">
</div>--%>
</div>
<div class="row divCss2">
<button type="button" class="btn btn-primary btn-large" id="backBtn">主任退回</button>
<button type="button" class="btn btn-success btn-large" id="firstBtn">初审</button>
</div>
</div>
@ -259,11 +283,11 @@
<span style="vertical-align:top;">初审内容:</span>
<textarea rows="6" style="width:80%;" id="verifyText"></textarea>
</div>
<div class="form-group " >
<div class="form-group ">
<span style="vertical-align:top;">护士备注:</span>
<textarea id="nuresText2" rows="6" style="width:80%;" disabled></textarea>
</div>
<div class="form-group " >
<div class="form-group ">
<span style="vertical-align:top;">医生备注:</span>
<textarea id="doctorText2" rows="6" style="width:80%;" disabled></textarea>
</div>
@ -327,11 +351,11 @@
<span style="vertical-align:top;">退回内容:</span>
<textarea id="backContent" rows="6" style="width:80%;"></textarea>
</div>
<div class="row divCss2" >
<div class="row divCss2">
<span style="vertical-align:top;">护士备注:</span>
<textarea id="nuresText" rows="6" style="width:80%;" disabled></textarea>
</div>
<div class="row divCss2" >
<div class="row divCss2">
<span style="vertical-align:top;">医生备注:</span>
<textarea id="doctorText" rows="6" style="width:80%;" disabled></textarea>
</div>
@ -415,11 +439,11 @@
<script>
//1、添加或者是2、编辑
var btnFlag=1;
var btnFlag = 1;
//编辑id
var editId;
//保存table選中的記錄
var selectNodeId=0;
var selectNodeId = 0;
//病案号
//var archiveDetailId="1333ad3c4d6448c89372835dbad3c364";
var archiveDetailId = GetQueryString("archiveDetailId");
@ -431,7 +455,7 @@
//自定义id
var definedId;
//判断归档状态
var stateA=null;
var stateA = null;
function GetQueryString(name) {
@ -446,26 +470,26 @@
}
$(function () {
$("#mb").css("display", "block");
var oMoveBox = $("#arrow"), infoDiv = $("#infoDiv"), maxL =0;
var oMoveBox = $("#arrow"), infoDiv = $("#infoDiv"), maxL = 0;
oMoveBox.click(function () {
if(maxL>0){
if (maxL > 0) {
maxL = 0;
$("#pdfDiv").css("width", '70%');
$("#arrow").html(">");
$("#infoDiv").show();
}else{
} else {
maxL = 1;
$("#pdfDiv").css("width", '97%');
$("#arrow").html("<" );
$("#arrow").html("<");
$("#infoDiv").hide();
}
});
var max = 0;
var selectId=0;
var selectId = 0;
function initTable() {
$('#table').bootstrapTable({
url: "${path}/fault/getFaultList", // 获取表格数据的url
@ -475,7 +499,9 @@
// offset: offset, //页码
//order: params.order, //排位命令descasc
//id: $("#id").val(),
backFlag:roleVal,
backContent: $("#assortNameQX").val(),
dealFlag: $("#dealFlagQX").val(),
backFlag: roleVal,
archiveDetailId: archiveDetailId
};
return temp;
@ -485,7 +511,7 @@
toolbar: '#toolbar',//指定工具栏
toolbarAlign: 'right',// 指定 toolbar 水平方向的位置。'left' 或 'right'
//height:'300',
width:'100%',
width: '100%',
height: $(window).height() / 2,//自定义高度
columns: [{
title: '全选',
@ -517,7 +543,7 @@
width: 80,
visible: false,
formatter: function (value, row, index) {
var result = '<span style="color:blue;"><i class="fa fa-times-circle-o" aria-hidden="true"></i>'+value+'分</span>';
var result = '<span style="color:blue;"><i class="fa fa-times-circle-o" aria-hidden="true"></i>' + value + '分</span>';
return result
}
}, {
@ -537,8 +563,8 @@
selectNodeId = editId;
}
if (row.archivestate == "主任退回" || row.archivestate == "初审" ) {
// console.log("==================================");
if (row.archivestate == "主任退回" || row.archivestate == "初审") {
// console.log("==================================");
$("#firstBtn").hide();
$("#backBtn").hide();
$("#addBtn").hide();
@ -580,7 +606,7 @@
$("#content").attr("disabled", true);
}else{
} else {
//console.log("==================================");
$("#addBtn").show();
}
@ -588,7 +614,7 @@
var result = "";
if (value == 1) {
result = '<span style="color:green;"><i class="fa fa-times-circle-o" aria-hidden="true"></i>科主任退回医生</span>';
} else if(value == 2) {
} else if (value == 2) {
result = '<span style="color:red;"><i class="fa fa-times-circle-o" aria-hidden="true"></i>科主任退回护士</span>';
} else if (value == 5) {
result = '<span style="color:orange;"><i class="fa fa-times-circle-o" aria-hidden="true"></i>病案室退回医生</span>';
@ -597,31 +623,31 @@
}
return result
}
},{
}, {
field: 'dealFlag',
title: '处理否',
align: 'center',
width: 80,
formatter: function (value, row, index) {
var result = "";
if (value =="1") {
if (value == "1") {
result = '<span style="color:green;"><i class="fa fa-times-circle-o" aria-hidden="true"></i>已处理</span>';
} else {
result = '<span style="color:blue;"><i class="fa fa-times-circle-o" aria-hidden="true"></i>未处理</span>';
}
return result
}
},{
}, {
field: 'dealPerson',
title: '处理人',
width: 80
},{
}, {
field: 'dealTime',
title: '处理时间',
width: 80
},{
}, {
field: 'content',
title: '内容',
width: 200
@ -629,7 +655,7 @@
onClickRow: function (row) {
editId = row.id;
btnFlag = 2;
if(row!=null) {
if (row != null) {
$("#content").val(row.content);
if (row.assortId == definedId) {
$("#defined").val(row.price);
@ -648,7 +674,7 @@
// $("#typeFlag").selectpicker('val', row.assortId);
// $("#typeFlag").prop("disabled", true);
// $("#typeFlag").selectpicker('refresh');
$("#typeFlag").multiselect('clearSelection',true);
$("#typeFlag").multiselect('clearSelection', true);
$('#typeFlag').multiselect('select', [row.assortId]);
//$("#typeFlag").multiselect('disable');
@ -761,7 +787,7 @@
//selectNode=row.id;
}, onUncheck: function (rowsAfter, rowsBefore) {
editId=null;
editId = null;
//console.log("====取消选中");
},
//如果想双击获取row把onlClickRow改为onDbClickRow如下
@ -769,9 +795,9 @@
// if (template.defaults.imports.hasPermission('/payment_manager/payment_detail')) {
// EditBook(row.id);
// }
},onRefresh: function (result) {
}, onRefresh: function (result) {
},onLoadSuccess: function (result) { //加载成功时执行
}, onLoadSuccess: function (result) { //加载成功时执行
// if (editId != null) {
// //对刷新表格的数据选中之前选的id行
// $('#table').bootstrapTable("checkBy", {field: 'id', values: [editId]});
@ -780,8 +806,8 @@
// //选中第一行
// $('#table').bootstrapTable("checkBy", {field: 'id', values: [selectNodeId]});
// }
if(selectNodeId!=0) {
// $("#typeFlag").selectpicker('val', selectNodeId).trigger("change");
if (selectNodeId != 0) {
// $("#typeFlag").selectpicker('val', selectNodeId).trigger("change");
$('#table').bootstrapTable("checkBy", {field: 'id', values: [selectNodeId]});
@ -789,11 +815,11 @@
//获取表格选中行
var row = $('#table').bootstrapTable('getSelections')[0];
if(row!=null) {
if(row.id!=null && row.id!="") {
if (row != null) {
if (row.id != null && row.id != "") {
selectId=row.assortId;
$("#typeFlag").multiselect('clearSelection',true);
selectId = row.assortId;
$("#typeFlag").multiselect('clearSelection', true);
$('#typeFlag').multiselect('select', [row.assortId]);
editId = row.id;
@ -802,7 +828,6 @@
$('#flag').selectpicker('val', row.backFlag);
$('input[name="Fruit"]').each(function () {//遍历每一个名字为interest的复选框其中选中的执行函数
if ($(this).val() == row.assortId) {
$(this)[0].checked = true;
@ -930,7 +955,7 @@
$("#addBtn").show();
}
}else{
} else {
if (archiveDetailId != null && archiveDetailId != "") {
$.ajax({
url: "${path}/beHosp/getMaster",
@ -976,10 +1001,11 @@
}
});
}
function getFaultType() {
$("#faultTypeDiv2").empty();
priceAllArr=null;
priceAllArr = null;
//获取科室列表
$.ajax({
url: "${path}/lastVerify/getFaultType",
@ -987,41 +1013,41 @@
data: {effective: 1},
success: function (result) {
if (result != null) {
var htmlVal="";
var typeArr=[];
var htmlVal = "";
var typeArr = [];
for (var k = 0; k < result.length; k++) {
if(result[k].typeName.indexOf(")")!=-1) {
if (result[k].typeName.indexOf(")") != -1) {
var parentVal = (result[k].typeName).split(")");
if(typeArr.indexOf(parentVal[0]+")")==-1) {
if (typeArr.indexOf(parentVal[0] + ")") == -1) {
typeArr.push(parentVal[0] + ")");
}
}
}
var htmls='<select id="typeFlag" multiple="multiple" title="请输入选项" name="typeFlag" >';
if(typeArr!=[]){
var htmls = '<select id="typeFlag" multiple="multiple" title="请输入选项" name="typeFlag" >';
if (typeArr != []) {
//console.log(typeArr);
for (var x = 0; x < typeArr.length; x++) {
var pVal=typeArr[x];
var pVal = typeArr[x];
//console.log(pVal);
if(pVal!=null && pVal!=''){
htmlVal='<optgroup label="'+pVal.substr(1,pVal.length-2)+'" class="group-'+x+'">';
if (pVal != null && pVal != '') {
htmlVal = '<optgroup label="' + pVal.substr(1, pVal.length - 2) + '" class="group-' + x + '">';
//$("#typeFlag").append('<optgroup label="'+pVal.substr(1,pVal.length-1)+'" class="group-'+x+'">');
for (var y = 0; y < result.length; y++) {
// var text = (result[y].typeName).split(")");
var str=result[y].typeName;
var pos=str.indexOf(")");
var str = result[y].typeName;
var pos = str.indexOf(")");
//console.log(result[y].typeName.substr(pos+1,str.length));
if(result[y].typeName.indexOf(pVal)!=-1){
htmlVal+='<option value="'+result[y].id+'">'+result[y].typeName.substr(pos+1,str.length)+'</option>';
if (result[y].typeName.indexOf(pVal) != -1) {
htmlVal += '<option value="' + result[y].id + '">' + result[y].typeName.substr(pos + 1, str.length) + '</option>';
//$("#typeFlag").append('<option value="'+result[y].id+'">'+text[1]+'</option>');
}
}
htmlVal+='</optgroup>';
htmlVal += '</optgroup>';
// $("#typeFlag").append('</optgroup>');
//$("#typeFlag").append(htmlVal);htmls
htmls+=htmlVal;
htmls += htmlVal;
}
}
@ -1029,22 +1055,22 @@
// console.log($("#typeFlag").html());
$("#mulDiv").append(htmls);
$('#typeFlag').multiselect({
nonSelectedText : '--请选择--',
nonSelectedText: '--请选择--',
enableCollapsibleOptGroups: true,
collapseOptGroupsByDefault: true,
enableFiltering: true,
includeSelectAllOption: true,
buttonWidth:300, //选择框的大小
buttonWidth: 300, //选择框的大小
});
var html = '';
for (var i = 0; i < result.length; i++) {
//multSelect
priceAllArr= result;
priceAllArr = result;
if (result[i].typeFlag == 'defined') {
definedId= result[i].id;
definedId = result[i].id;
//html += '<div class="row" style="width:600px"><label class="col-xs-6"><input name="Fruit" type="checkbox" value="' + result[i].id + '">' + result[i].typeName + "(<input type='text' style='width:50px;' id='defined' value='0'/>)" + '</label></div>';
html += '<div class="row" style="width:600px"><label class="col-xs-6"><input name="Fruit" type="checkbox" value="' + result[i].id + '">' + result[i].typeName + '</label></div>'
html += '<div class="row" style="width:600px"><label class="col-xs-6"><input name="Fruit" type="checkbox" value="' + result[i].id + '">' + result[i].typeName + '</label></div>'
} else {
//html += '<div class="row" style="width:600px"><label class="col-xs-6"><input name="Fruit" type="checkbox" value="' + result[i].id + '">' + result[i].typeName + "(" + result[i].price + ")" + '</label></div>'
//$("#typeFlag").append("<option value=" + result[i].id + ">" + result[i].typeName+"("+result[i].price+"分)" + "</option>");
@ -1055,10 +1081,10 @@
$("#faultTypeDiv2").append(html);
// $("#typeFlag").selectpicker('refresh'); //
//查看PDF
if(pdfPath!=""){
if (pdfPath != "") {
$('#pdf_page').attr('src', "${path}/static/pdfjs/web/viewer.html?file=" + encodeURIComponent("${path}/inHosp/pdfStreamHandeler?url=" + pdfPath));
//病案号 45e9b098f9da49ffba1843bfc6930cb8
}else{
} else {
toastr.warning("勾选的PDF文件不存在或破损");
}
initTable();
@ -1068,13 +1094,17 @@
}
}
});
if(selectId!=0) {
if (selectId != 0) {
$('#typeFlag').multiselect('select', [selectId]);
}
}
getFaultType();
$("#searchBtnQX").click(function () {
$('#table').bootstrapTable('refresh');
});
//初审
$("#firstBtn").click(function () {
if (archiveDetailId != null && archiveDetailId != "") {
@ -1086,7 +1116,7 @@
if (result != null) {
if (result.archivestate != null) {
if (result.archivestate == '复审退回' || result.archivestate == '提交') {
getStaffFun(archiveDetailId,2);
getStaffFun(archiveDetailId, 2);
$('#verifyModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
@ -1135,7 +1165,7 @@
$("#table").bootstrapTable("refresh");
toastr.success("初审操作成功!");
} else {
$("#WzRsult").html(result );
$("#WzRsult").html(result);
$('#WZModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
@ -1176,26 +1206,27 @@
}
});
});
function getStaffFun(masterId,flag){
function getStaffFun(masterId, flag) {
$.ajax({
url: "${path}/staffRemark/staffRemarkList",
type: "POST",
data: {masterId: masterId,effective:1},
data: {masterId: masterId, effective: 1},
success: function (result) {
if(result!=null){
for(var i=0;i<result.length;i++){
if(result[i].typeFlag==1){
if (result != null) {
for (var i = 0; i < result.length; i++) {
if (result[i].typeFlag == 1) {
//1护士
if(flag==1) {
if (flag == 1) {
$("#nuresText").val(result[i].content);
}else if(flag==2) {
} else if (flag == 2) {
$("#nuresText2").val(result[i].content);
}
}else if(result[i].typeFlag==0){
} else if (result[i].typeFlag == 0) {
//0医生
if(flag==1) {
if (flag == 1) {
$("#doctorText").val(result[i].content);
}else if(flag==2) {
} else if (flag == 2) {
$("#doctorText2").val(result[i].content);
}
}
@ -1215,7 +1246,7 @@
success: function (result) {
if (result != null) {
if (result.archivestate != null) {
if (result.archivestate == '复审退回'|| result.archivestate == '提交') {
if (result.archivestate == '复审退回' || result.archivestate == '提交') {
//清空标签的内容
$('#backContent').val("");
//分值只读
@ -1232,7 +1263,7 @@
}
}
});
getStaffFun(archiveDetailId,1);
getStaffFun(archiveDetailId, 1);
$('#returnModal').modal({
backdrop: 'static',//backdrop 为 static 时,点击模态对话框的外部区域不会将其关闭。
keyboard: false,//keyboard 为 false 时,按下 Esc 键不会关闭 Modal。
@ -1298,14 +1329,13 @@
}
});
});
$("#addBtn").click(function () {
$(".multiselect-clear-filter").click();
$(".checkbox").parent().parent('li').addClass("multiselect-collapsible-hidden");
$(".checkbox").parent().parent('li').css("display","none");
$(".multiselect-clear-filter").click();
$(".checkbox").parent().parent('li').addClass("multiselect-collapsible-hidden");
$(".checkbox").parent().parent('li').css("display", "none");
if (archiveDetailId != null && archiveDetailId != "") {
$.ajax({
url: "${path}/beHosp/getMaster",
@ -1314,7 +1344,7 @@
success: function (result) {
if (result != null) {
if (result.id != null) {
if (result.archivestate == '复审退回'|| result.archivestate == '提交') {
if (result.archivestate == '复审退回' || result.archivestate == '提交') {
editId = null;
//1添加和2编辑
btnFlag = 1;
@ -1329,8 +1359,8 @@
// $('#typeFlag').selectpicker('val', "");
// $("#typeFlag").selectpicker('refresh');
$("#typeFlag").multiselect('enable');
$("#typeFlag").multiselect('clearSelection',true);
$("#typeFlag").multiselect('refresh');
$("#typeFlag").multiselect('clearSelection', true);
$("#typeFlag").multiselect('refresh');
$("#roleVal").hide();
$("#defined").val(0);
$('input[name="Fruit"]').each(function () {//遍历每一个名字为interest的复选框其中选中的执行函数
@ -1352,8 +1382,8 @@
}
} else {
toastr.warning("病案不存在!");
}
}
}, error: function () {
toastr.error("操作失败!");
@ -1367,19 +1397,19 @@
$("#clearBtn").click(function () {
//默认选中医生
$(".multiselect-clear-filter").click();
$(".multiselect-clear-filter").click();
$('#flag').selectpicker('val', 1);
$("#content").val("");
$('input[name="Fruit"]').each(function () {//遍历每一个名字为interest的复选框其中选中的执行函数
$(this)[0].checked=false;
$(this)[0].checked = false;
});
// $("#typeFlag").selectpicker('val',"");
// $("#typeFlag").prop("disabled", false);
// $("#typeFlag").selectpicker('refresh');
$("#typeFlag").multiselect('clearSelection',true);
$("#typeFlag").multiselect('clearSelection', true);
$("#typeFlag").multiselect('enable');
$(".checkbox").parent().parent('li').addClass("multiselect-collapsible-hidden");
$(".checkbox").parent().parent('li').css("display","none");
$(".checkbox").parent().parent('li').addClass("multiselect-collapsible-hidden");
$(".checkbox").parent().parent('li').css("display", "none");
});
@ -1394,9 +1424,9 @@
}
$("#saveBtn").click(function () {
$(".multiselect-clear-filter").click();
$(".checkbox").parent().parent('li').addClass("multiselect-collapsible-hidden");
$(".checkbox").parent().parent('li').css("display","none");
$(".multiselect-clear-filter").click();
$(".checkbox").parent().parent('li').addClass("multiselect-collapsible-hidden");
$(".checkbox").parent().parent('li').css("display", "none");
if (archiveDetailId != null && archiveDetailId != "") {
$.ajax({
url: "${path}/beHosp/getMaster",
@ -1405,7 +1435,7 @@
success: function (result) {
if (result != null) {
if (result.id != null) {
if (result.archivestate == '提交'|| result.archivestate == '复审退回') {
if (result.archivestate == '提交' || result.archivestate == '复审退回') {
// if (!validateNum($("#defined").val())) {
// toastr.warning("评分范围0-100");
// return;
@ -1431,10 +1461,10 @@
}
});
var ss=$("#typeFlag").val();
if(ss!=null){
for(var k=0;k<ss.length;k++){
if(ss[k]!=null && ss[k]!=""){
var ss = $("#typeFlag").val();
if (ss != null) {
for (var k = 0; k < ss.length; k++) {
if (ss[k] != null && ss[k] != "") {
arr.push(ss[k]);
//分值
arrText.push(0);
@ -1448,8 +1478,8 @@
} else if (arr.length <= 0) {
toastr.warning("缺陷选项至少选一个!");
return;
}else if (arr.length ==1) {
if(arr[0]==""){
} else if (arr.length == 1) {
if (arr[0] == "") {
toastr.warning("缺陷选项至少选一个!");
return;
}
@ -1466,7 +1496,7 @@
data.content = $("#content").val();
data.assortId = arr.toString();
data.backContent = arrText.toString()+"";
data.backContent = arrText.toString() + "";
//data.recallReason= btnFlag;
@ -1583,7 +1613,7 @@
success: function (result) {
if (result.indexOf("成功") != -1) {
toastr.success(result);
}else if (result.indexOf("失败") != -1) {
} else if (result.indexOf("失败") != -1) {
toastr.error(result);
} else {
toastr.warning(result);

@ -102,6 +102,10 @@
width: 120%;
}
#assortNameQX {
width: 200px
}
.bs-searchbox{
width:190px;
}
@ -184,22 +188,36 @@
</div>
</div>
<div class="row divCss2 panel panel-primary">
<!--数据表格-->
<table id="table" class="table text-nowrap table-striped"></table>
<div id="toolbar" class="btn-group pull-right" style="margin-right: 20px;">
<div class="columns columns-right btn-group pull-right">
<button type="button" class="btn btn-warning btn-sm" id="addBtn">添加</button>
<button type="button" class="btn btn-danger btn-sm" id="delBtn">删除</button>
<button type="button" class="btn btn-primary btn-sm" id="dealBtn" hidden>处理</button>
<button type="button" class="btn btn-success btn-sm" id="dealCancelBtn" hidden>取消处理</button>
<%--<button class=" btn btn-success" style="height: 34px" type="button" id="refreshBtn" name="refresh"--%>
<%--aria-label="Refresh"--%>
<%--title="Refresh">--%>
<%--<i class="glyphicon glyphicon-refresh icon-refresh"></i>--%>
<%--</button>--%>
<div class="row divCss2 panel panel-primary" >
<div class="row" style="margin-right: 5px;margin-bottom: 5px;">
<div class="columns columns-right btn-group pull-right" >
<button type="button" class="btn btn-warning btn-sm" id="addBtn">添加</button>
<button type="button" class="btn btn-danger btn-sm" id="delBtn">删除</button>
<button type="button" class="btn btn-primary btn-sm" id="dealBtn" hidden>处理</button>
<button type="button" class="btn btn-success btn-sm" id="dealCancelBtn" hidden>取消处理</button>
</div>
</div>
<div class="form-inline " style="margin-bottom: -15px;font-size: 14px;">
<div class="form-group ">
<label>类型:</label>
<input type="text" class="input-sm form-control" id="assortNameQX" placeholder="请输入缺陷类型">
</div>
<div class="form-group divCss2" style="margin-left: 10px">
<label>处理否:</label>
<select class="input-sm form-control" id="dealFlagQX">
<option value="">全部</option>
<option value="1">已处理</option>
<option value="0">未处理</option>
</select>
</div>
<button type="button" class="btn btn-primary btn-sm divCss" id="searchBtnQX">查询</button>
</div>
<!--数据表格-->
<table id="table" class="table text-nowrap table-striped"></table>
<%--<div id="toolbar" class="btn-group pull-right" style="margin-right: 20px;">
</div>--%>
</div>
<div class="row divCss2">
<button type="button" class="btn btn-primary btn-large" id="back2Btn" >病案室退回</button>
@ -352,6 +370,8 @@
// offset: offset, //页码
//order: params.order, //排位命令descasc
//id: $("#id").val(),
backContent: $("#assortNameQX").val(),
dealFlag: $("#dealFlagQX").val(),
backFlag:roleVal,
archiveDetailId: archiveDetailId
};
@ -919,6 +939,10 @@
}
getFaultType();
$("#searchBtnQX").click(function () {
$('#table').bootstrapTable('refresh');
});
//终审
$("#lastBtn").click(function () {
if (archiveDetailId != null && archiveDetailId != "") {

@ -144,7 +144,7 @@
!important;
}
.fixed-table-toolbar .bs-bars .pull-right{
.fixed-table-toolbar .bs-bars .pull-right {
height: 20px;
!important;
}
@ -173,7 +173,7 @@
width: calc(200%); /*margin-left:-15%;*/
height: calc(100vh - 100px);
overflow-x: hidden;
overflow-y:auto;
overflow-y: auto;
!important;
}
@ -268,7 +268,8 @@
margin-top: 10%;
width: 160%;
}
#qxModal >div >div{
#qxModal > div > div {
margin-left: 20%;
}
@ -296,12 +297,12 @@
color: blue;
}
#selModal{
#selModal {
width: calc(200%);
!important;
}
#selModal > div > div{
#selModal > div > div {
width: calc(200%);
!important;
}
@ -388,8 +389,8 @@
color: red;
}
#upLoadImgBtn{
width:35%;
#upLoadImgBtn {
width: 35%;
text-align: left;
}
@ -407,6 +408,14 @@
margin-left: 60%;
margin-top: 20%;
}
#titleSearch {
align: left;
margin-left: 5px;
height: 34px;
width: 600px;
!important;
}
</style>
</head>
@ -547,7 +556,7 @@
<!-- 模态框3Modal查看档案 -->
<div class="modal fade" id="selModal" tabindex="1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog" style="left:10%;top:5px;">
<div class="modal-header2" >
<div class="modal-header2">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
@ -617,7 +626,8 @@
<div class="col-sm-3 divCss2">
<div class="row titleCss"></div>
<div class="row form-inline">
<input type="text" id="key" value="" class="input-sm form-control empty" placeholder="分段名称"/>
<input type="text" id="key" value="" class="input-sm form-control empty"
placeholder="分段名称"/>
<button type="button" class="btn btn-primary btn-sm" id="searchBtn1">查询</button>
</div>
<div class="row">
@ -636,27 +646,35 @@
</div>
</div>
<div class="col-sm-8 divCss5">
<div class="row btnGroupCss">
<button type="button" class="btn btn-danger btn-sm" id="addPdfBtn">添加pdf</button>
<button type="button" class="btn btn-default btn-sm" id="uploadBtn">上传文件</button>
<button type="button" class="btn btn-info btn-sm" id="pdfBtn">查看分段PDF</button>
<button type="button" class="btn btn-success btn-sm" id="pdfBtn2">查看PDF</button>
<%--<button type="button" class="btn btn-primary btn-sm" id="addBtn">添加清单</button>--%>
<button type="button" class="btn btn-warning btn-sm" id="updateStateBtn">选中作废</button>
<button type="button" class="btn btn-primary btn-sm" id="updateStateBtn2">选中使用</button>
<div class="row ">
<div class="col-sm-3 " style="margin-top: 5px;">
<input type="checkbox" id="flag" value="1">只显示作废</input>
</div>
<div class="col-sm-9 btnGroupCss">
<button type="button" class="btn btn-danger btn-sm" id="addPdfBtn">添加pdf</button>
<button type="button" class="btn btn-default btn-sm" id="uploadBtn">上传文件</button>
<button type="button" class="btn btn-info btn-sm" id="pdfBtn">查看分段PDF</button>
<button type="button" class="btn btn-success btn-sm" id="pdfBtn2">查看PDF</button>
<%--<button type="button" class="btn btn-primary btn-sm" id="addBtn">添加清单</button>--%>
<button type="button" class="btn btn-warning btn-sm" id="updateStateBtn">选中作废
</button>
<button type="button" class="btn btn-primary btn-sm" id="updateStateBtn2">选中使用
</button>
</div>
</div>
<div class="row">
<!--数据表格-->
<table id="table2" class="table text-nowrap table-striped"></table>
<div id="toolbar2" class="btn-group pull-left" style="margin-right: 20px;">
<div class="columns columns-left btn-group pull-left" style="margin-top:0px;">
<input type="checkbox" id="flag" value="1"
style="margin-left: 20px;">只显示作废</input>
<%--<button class=" btn btn-success btn-sm" style="height: 34px" type="button"--%>
<%--id="refreshBtn2" name="refresh" aria-label="Refresh"--%>
<%--title="Refresh">--%>
<%--<i class="glyphicon glyphicon-refresh icon-refresh"></i>--%>
<%--</button>--%>
<div id="toolbar2" class="btn-group pull-left toolbarCss">
<div class=" row columns btn-group pull-right " style="margin-top:0px;">
<div class="row form-inline" style="margin-left: 10px">标题:
<input class="input-sm form-control form-inline" type="text"
id="titleSearch" name="titleSearch" aria-label="Refresh"
title="Refresh" placeholder="请输入pdf相关标题"/>
<button type="button" class="btn btn-primary btn-sm" id="titleSearchBtn">
查询
</button>
</div>
</div>
</div>
</div>
@ -909,7 +927,7 @@
</div>
</div>
<%--多图片框--%>
<div class="modal fade" id="pdfModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" >
<div class="modal fade" id="pdfModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content enterCss" style="margin-left: 30%">
<div class="modal-header2">
@ -980,7 +998,7 @@
<%--发大弹窗--%>
<div class="modal fade" id="maxImg" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-header2" >
<div class="modal-header2">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
</div>
@ -1125,7 +1143,7 @@
<iframe id="pdf_page" name="pdf_page"></iframe>
</div>
<div id="arrow">&gt;</div>
<div id="infoDiv">
<div id="infoDiv">
<form>
<div class="row " hidden>
<input id="pdfId" hidden/>
@ -1143,12 +1161,18 @@
<div class="row" style="margin-left:15px; ">
<div class="row" id="addDelDiv">---不可恢复--</div>
<div class="row" style="margin-bottom: 5px;">
<button type="button" class="btn btn-primary btn-sm" id="returnPdfBtn2" onclick="bfPdfFun()">重新备份PDF</button>
<button type="button" class="btn btn-default btn-sm" id="upLoadImgBtn" onclick="upLoadImgFun()">上传额外图片</button>
<button type="button" class="btn btn-primary btn-sm" id="returnPdfBtn2"
onclick="bfPdfFun()">重新备份PDF
</button>
<button type="button" class="btn btn-default btn-sm" id="upLoadImgBtn"
onclick="upLoadImgFun()">上传额外图片
</button>
</div>
<div class="row">
<%--<button type="button" class="btn btn-warning btn-sm" id="addPdfPageBtn" onclick="addPdfPageFun()">PDF添加页码</button>--%>
<button type="button" class="btn btn-warning btn-sm" id="returnPdfBtn" onclick="returnPdfFun()">还原最初PDF</button>
<button type="button" class="btn btn-warning btn-sm" id="returnPdfBtn"
onclick="returnPdfFun()">还原最初PDF
</button>
<button type="button" class="btn btn-danger btn-sm" id="delAllImgBtn">删除全部图片</button>
</div>
</div>
@ -1192,7 +1216,7 @@
<%--确认框提示清空所有图片--%>
<div class="modal fade" id="delImgPageModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content " >
<div class="modal-content ">
<div class="modal-header2">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">×</span></button>
@ -1227,11 +1251,13 @@
<form id="filesUpload2" method="POST" enctype="multipart/form-data">
<div class="imgDivCss" id="divImg2">
<div class="form-inline">
<button type="button" class="btn btn-primary btn-sm divCss" id="imgsClearBtn2">清空图片</button>
<button type="button" class="btn btn-warning btn-sm divCss" id="imgsSaveBtn2">保存</button>
<a href="javascript:;" class="a-upload btn btn-info btn-sm">
<input type="file" name="myFile2" id="myFile2" multiple="multiple" accept="image/*"
hidden/>选择文件
</a>
</div>
<div class="img_div2"></div>
<div class="shade" onclick="javascript:closeShade()">
@ -1333,41 +1359,30 @@
//获取所有图片
var fileALL = this.files;
for (var i = 0; i < fileALL.length; i++) {
//把图片存到数组中
files[id] = fileALL[i];
id++;
//获取图片路径
objUrl = getObjectURL(fileALL[i]);
var extStart = filepath.lastIndexOf(".");
var ext = filepath.substring(extStart, filepath.length).toUpperCase();
/**
*描述:鉴定每个图片上传尾椎限制
*/
if (ext != ".BMP" && ext != ".PNG" && ext != ".GIF" && ext != ".JPG" && ext != ".JPEG") {
toastr.warning("图片限于png,gif,jpeg,jpg格式");
//$(".shade").fadeIn(500000000);//500
//$(".text_span").text("图片限于bmp,png,gif,jpeg,jpg格式");
// this.value = "";
//$(".img_div").html("");
return false;
} else {
/**
*若规则全部通过则在此提交url到后台数据库
*/
// if (objUrl.indexOf(".") != -1) {
// img_html = "<div class='isImg' id='-1'><img src='require(" + objUrl + ")' id='" + fileALL[i].name + "' onclick='javascript:lookBigImg(this)' style='height: 100%; width: 100%;' />"
// } else {
img_html = "<div class='isImg' id='-1'><img src='" + objUrl + "' id='" + fileALL[i].name + "' onclick='javascript:lookBigImg(this)' style='height: 100%; width: 100%;' />"
//}
img_html += selectStr
+ " <button class='removeBtn' onclick='javascript:removeImg(this)'>x</button></div>";
img_div.append(img_html);
// img_html = "<div class='isImg' id='-1'><img src='" + objUrl + "' id='" + fileALL[i].name + "' onclick='javascript:lookBigImg(this)' style='height: 100%; width: 100%;' />"
// + selectStr
// + " <button class='removeBtn' onclick='javascript:removeImg(this)'>x</button></div>";
// img_div.append(img_html);
if(fileALL[i]!=undefined && fileALL[i]!=null && fileALL[i]!=""){
if(fileALL[i].name!=undefined && fileALL[i].name!=null && fileALL[i].name!=""){
var extStart = fileALL[i].name.lastIndexOf(".");
var ext = fileALL[i].name.substring(extStart, fileALL[i].name.length).toUpperCase();
/**
*描述:鉴定每个图片上传尾椎限制
*/
if (ext != ".PNG" && ext != ".GIF" && ext != ".JPG" && ext != ".JPEG") {
toastr.warning("图片:"+fileALL[i].name+"不符限于png,gif,jpeg,jpg格式");
return false;
}else{
files.push(fileALL[i]);
/**
*若规则全部通过则在此提交url到后台数据库
*/
img_html = "<div class='isImg' id='-1'><img src='" + objUrl + "' id='" + fileALL[i].name + "' onclick='javascript:lookBigImg(this)' style='height: 100%; width: 100%;' />"
img_html += selectStr+ " <button class='removeBtn' onclick='javascript:removeImg(this)'>x</button></div>";
img_div.append(img_html);
}
}
}
}
/**
*描述:鉴定每个图片大小总和
@ -1405,28 +1420,33 @@
$("#myFile2").change(function () {
var img_div = $(".img_div2");
var filepath = $("input[name='myFile2']").val();
// var filepath = $("input[name='myFile2']").val();
//获取所有图片
var fileALL = this.files;
for (var i = 0; i < fileALL.length; i++) {
//把图片存到数组中
files[id] = fileALL[i];
id++;
//获取图片路径
objUrl = getObjectURL(fileALL[i]);
var extStart = filepath.lastIndexOf(".");
var ext = filepath.substring(extStart, filepath.length).toUpperCase();
/**
*描述:鉴定每个图片上传尾椎限制
*/
if (ext != ".PNG" && ext != ".GIF" && ext != ".JPG" && ext != ".JPEG") {
toastr.warning("图片限于png,gif,jpeg,jpg格式");
return false;
} else {
img_html = "<div class='isImg' id='-1'><img src='" + objUrl + "' id='" + fileALL[i].name + "' onclick='javascript:lookBigImg(this)' style='height: 100%; width: 100%;' />"
img_html +=
" <button class='removeBtn' onclick='javascript:removeImg2(this)'>x</button></div>";
img_div.append(img_html);
if(fileALL[i]!=undefined && fileALL[i]!=null && fileALL[i]!=""){
if(fileALL[i].name!=undefined && fileALL[i].name!=null && fileALL[i].name!=""){
var extStart = fileALL[i].name.lastIndexOf(".");
var ext = fileALL[i].name.substring(extStart, fileALL[i].name.length).toUpperCase();
/**
*描述:鉴定每个图片上传尾椎限制
*/
if (ext != ".PNG" && ext != ".GIF" && ext != ".JPG" && ext != ".JPEG") {
toastr.warning("图片:"+fileALL[i].name+"不符限于png,gif,jpeg,jpg格式");
return false;
}else{
files.push(fileALL[i]);
/**
*若规则全部通过则在此提交url到后台数据库
*/
img_html = "<div class='isImg' id='-1'><img src='" + objUrl + "' id='" + fileALL[i].name + "' onclick='javascript:lookBigImg(this)' style='height: 100%; width: 100%;' />"
img_html +=" <button class='removeBtn' onclick='javascript:removeImg2(this)'>x</button></div>";
img_div.append(img_html);
}
}
}
}
@ -1490,6 +1510,7 @@
for (var j = 0; j < fileList.length; j++) {
//通过图片名判断图片在数组中的位置然后删除
// console.log(fileList[j].name + "111");
if(fileList[j].name!=undefined)
if (fileList[j].name == filename) {
fileList.splice(j, 1);
id--;
@ -1537,6 +1558,7 @@
//遍历数组
for (var j = 0; j < fileList.length; j++) {
//通过图片名判断图片在数组中的位置然后删除
if(fileList[j].name!=undefined)
if (fileList[j].name == filename) {
fileList.splice(j, 1);
id--;
@ -1589,7 +1611,7 @@
if (result != null) {
selectStr = "<select class='selectB'>";
for (i = 0; i < result.length; i++) {
selectStr += "<option value=" + result[i].assortId + ">" + result[i].assortName + "</option>";
selectStr += "<option value='" + result[i].assortId + "' title='"+result[i].assortName+"'>" + result[i].assortName + "</option>";
$("#inpGl").append("<option value=" + result[i].assortId + ">" + result[i].assortName + "</option>");
$("#inpType").append("<option value=" + result[i].assortId + ">" + result[i].assortName + "</option>");
}
@ -1786,30 +1808,19 @@
var div_data = div_p.children();
if (div_data != null)
for (var i = 0; i < div_data.length; i++) {
if (div_data[i].getAttribute('src') != null && div_data[i].getAttribute('src') != "") {
// console.log("第" + (i + 1) + "个的src=" + div_data[i].getAttribute('src'));
//obj.fileSrc= div_data[i].getAttribute('src');
//obj.fileSrc = obj.fileSrc;
//var s=new File([obj.fileSrc], "a"+i+".jpg");
//files.push(s);
//console.log(obj.fileSrc);
}
if (div_data[i].value != null && div_data[i].value != "") {
var obj = {};
//console.log("第select" + (i + 1) + "个的value=" + div_data[i].value);
var selectedIndex=div_data[i].selectedIndex;
//console.log(div_data[i].options[index].getAttribute("title"));
obj.selectName=div_data[i].options[selectedIndex].getAttribute("title");
obj.selectVal = div_data[i].value;
if (b < div_data.length / 2) {
obj.id = div_p[b].id;
b++;
}
fileArr.push(obj);
}
// if (div_data[i].id.indexOf("oldSel")!=-1) {
// console.log("第Lable" + (i + 1) + "html=" + div_data[i].getAttribute('value'));
// }
}
if (fileArr.length > 0) {
@ -1834,32 +1845,31 @@
contentType: false, //不设置内容类型
processData: false, //不处理数据
success: function (data) {
//刷新当前类别
imgSelectFun();
initTree($("#idLab").html());
if (data.indexOf("成功") != -1) {
toastr.success(data);
} else if (data.indexOf("成功") != -1) {
toastr.error(data);
} else {
toastr.warning(data);
}
setTimeout(function () {
//刷新当前类别
imgSelectFun();
if (data.indexOf("成功") != -1) {
toastr.success(data);
} else if (data.indexOf("成功") != -1) {
toastr.error(data);
} else {
toastr.warning(data);
}
spinner.spin();
}, 1000);
files = new Array();
},
error: function () {
spinner.spin();
toastr.error("批量上传失败!");
}
});
spinner.spin();
}
} else {
spinner.spin();
toastr.warning("请选择上传的图片!");
}
});
$("#pdfBtn").click(function () {
@ -1913,6 +1923,9 @@
}
});
$("#titleSearchBtn").click(function () {
$('#table2').bootstrapTable('refreshOptions', {limit: 1, offset: 10});
});
$("#pdfBtn2").click(function () {
//选中批量使用
@ -2058,9 +2071,20 @@
}
});
}
getDept();
$("#imgsClearBtn2").click(function () {
//console.log("===清空删除页的图片===");
$(".img_div2").empty();
files = new Array();
});
$("#imgsClearBtn2").click(function () {
//console.log("===清空删除页的图片===");
$(".img_div2").empty();
files = new Array();
});
$("#imgsSaveBtn2").click(function () {
//console.log("===保存删除页的图片===");
var parentId = $("#pdfId").val();
@ -2106,12 +2130,10 @@
}
});
$("#mb").css("display", "none");
}
} else {
toastr.warning("请选择上传的图片!");
}
} else {
toastr.warning("记录不存在!");
}
@ -2293,7 +2315,7 @@
spinner.spin();
if (result == 1) {
toastr.success("删除所有图片成功!");
}else{
} else {
toastr.warning("没图片可删除!");
}
}
@ -2953,6 +2975,11 @@
assortId: assortId,
flag: flag
};
var title = $("#titleSearch").val();
if (title != null && title != "") {
temp.title = title;
}
return temp;
},
sortName: 'assortSort', // 要排序的字段

Loading…
Cancel
Save