标签:姓名 mon pass pow ddl sync hellip cts alert
<%@page import="com.xy.cc.util.CUtil" %>
<%@page import="com.xy.cc.bean.UserPowerBean" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
+ path + "/";
UserPowerBean uPow = (UserPowerBean) request.getSession().getAttribute(CUtil.USER_POW);
String company_id = (String) request.getSession().getAttribute("company_id");
String role_id = (String) request.getSession().getAttribute("role_id");
String usr_no = (String) request.getSession().getAttribute("usr_no");
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link href="<%=basePath %>css/css/crud.css" rel="stylesheet" type="text/css"/>
<script src="<%=basePath %>js/HydUtil.js" type="text/javascript"></script>
<script src="<%=basePath %>js/ajaxfileupload.js" type="text/javascript"></script>
<style>
#crud .crud-content-info tr td:nth-child(2n) {
width: 24%;
}
#crud .crud-content-info tr td {
height: 50px;
line-height: 50px;
}
#crud .crud-content-info tr.btnStyle td div {
width: 50px;
height: 30px;
text-align: center;
line-height: 30px;
border: 1px solid #000;
float: left;
margin-right: 20px;
cursor: pointer;
}
#crud div:nth-child(3) div.panel-noscroll div div div.datagrid-view div.datagrid-view2 div.datagrid-body {
height: 400px !important;
}
</style>
</head>
<body>
<!-- 表格 -->
<table id="filter_products_reactions">
</table>
<div id="level_dialog">
<table id="level_datagrid">
</table>
</div>
<div id="user_dialog">
<table id="user_datagrid">
</table>
</div>
<!-- 不良调查信息=================================================================================================== -->
<!-- 添加不良调查Form -->
<div id="ProductBadSurveyadd">
<form id="ProductBadSurveyaddform" class="easyui-form" method="post"
modelAttribute="power">
<div id="crud">
<!-- 病例信息-->
<div>
<div class="crud-small-title">
<ul>
<li class="accordion left"><img class="down left"
src="<%=basePath %>css/images/crud-icon02.png" >
<p class="left">病历信息</p></li>
</ul>
</div>
<table class="crud-content-info">
<tr>
<td align="right">医院名称:</td>
<td><input id="hospital_name" type="text" name="hospital_name" maxlength="30"/></td>
<td align="right">医院地址:</td>
<td><input id="hospital_address" type="text" name="hospital_address" maxlength="150"/></td>
</tr>
<tr>
<td align="right">病例上传:</td>
<td><input id="case_report_upload" type="file" onchange="upload()" name="test_file"/>
<input id="file_id" type="text" name="case_report_upload" style="display:none"/></td>
</td>
<td align="right">病历号/门诊号:</td>
<td><input id="case_report_no" type="text" name="case_report_no" maxlength="12"/></td>
</tr>
<tr>
<td align="right">相关信息:</td>
<td>
<select id="relevant_information" name="relevant_information" class="easyui-combotree">
</select>
</td>
<td align="right">过敏源:</td>
<td><input id="allergen" type="text" type="text" name="allergen" maxlength="20"/></td>
</tr>
<tr>
<td align="right">既往药品不良反应/事件:</td>
<td>
<select id="passing_bad_reaction" name="passing_bad_reaction">
<option value="" selected="selected">请选择</option>
<option value="01">有</option>
<option value="02">无</option>
<option value="03">不明</option>
</select>
</td>
<td align="right">反应/事件描述:</td>
<td>
<textarea cols="24" rows="3" name="reaction_expressions" maxlength="150"></textarea>
</td>
</tr>
<tr>
<td align="right">家族药品不良反应/事件:</td>
<td>
<select id="family_passing_bad_reaction" name="family_passing_bad_reaction">
<option value="" selected="selected">请选择</option>
<option value="01">有</option>
<option value="02">无</option>
<option value="03">不明</option>
</select>
</td>
<td align="right">家族反应/事件描述:</td>
<td>
<textarea cols="24" rows="3" name="family_reaction_expressions" maxlength="150"></textarea>
</td>
</tr>
</table>
</div>
<!-- 不良调查 -->
<div>
<div class="crud-small-title">
<ul>
<li class="accordion left"><img class="down left"
src="<%=basePath %>css/images/crud-icon02.png" >
<p class="left">不良调查</p></li>
</ul>
</div>
<table class="crud-content-info">
<tr>
<td align="right">不良反应/事件结果及处理:</td>
<td>
<select id="result_handling" name="result_handling" onchange="resultHandling()">
<option value="" selected="selected">请选择</option>
<option value="01">痊愈</option>
<option value="02">好转</option>
<option value="03">未好转</option>
<option value="04">不详</option>
<option value="05">有后遗症</option>
<option value="06">死亡</option>
</select>
</td>
<td align="right">表现:</td>
<td>
<textarea cols="24" rows="3" name="handling_expressions" maxlength="150"></textarea>
</td>
</tr>
<tr id="dethmessage">
<td align="right">直接死因:</td>
<td><input id="cause_death" type="text" name="cause_death" maxlength="30"/></td>
<td align="right">死亡时间:</td>
<td><input id="death_time" type="text" name="death_time"/></td>
</tr>
<tr>
<td align="right">原患疾病:</td>
<td><input id="original_disease" type="text" name="original_disease" maxlength="150"/></td>
<td align="right">对原患疾病的影响:</td>
<td>
<select id="sickness_influence" name="sickness_influence">
<option value="" selected="selected">请选择</option>
<option value="01">不明显</option>
<option value="02">病程延长</option>
<option value="03">病程加重</option>
<option value="04">导致后遗症</option>
<option value="05">导致死亡</option>
<option value="06">其他</option>
</select>
</td>
</tr>
<!-- <tr>
<td align="right">导致后遗症表现:</td>
<td><input id="influence_expressions" type="text" name="influence_expressions" maxlength="150"/>
</td>
<td align="right">直接死因:</td>
<td><input id="influence_cause_death" type="text" name="influence_cause_death" maxlength="30"/>
</td>
</tr> -->
<tr>
<td align="right">信息来源:</td>
<td>
<select id="message_source" name="message_source">
<option value="" selected="selected">请选择</option>
<option value="0">医疗机构</option>
<option value="1">经营企业</option>
<option value="2">个人</option>
<option value="3">文献报道</option>
<option value="4">上市后研究</option>
<option value="5">其他</option>
</select>
<td align="right">调查时间:</td>
<td><input id="survey_time" type="text" name="survey_time"/></td>
</td>
</tr>
<tr>
<td align="right">备注:</td>
<td>
<textarea cols="24" rows="3" name="remarks" maxlength="150"></textarea>
</td>
<td align="right">产品名称:</td>
<td><input id="mProductName" type="text" name="ProductName" readonly="readonly"/></td>
</tr>
<tr>
<td align="right">停药或减量后,反应/事件是否消失或减轻:</td>
<td>
<select id="trace" name="trace">
<option value="" selected="selected">请选择</option>
<option value="1">是</option>
<option value="2">否</option>
<option value="3">不明</option>
<option value="4">未停药或减量</option>
</select>
</td>
<td align="right">再次使用后,不良反应/事件是否再次出现:</td>
<td>
<select id="reuse" name="reuse">
<option value="" selected="selected">请选择</option>
<option value="1">是</option>
<option value="2">否</option>
<option value="3">不明</option>
<option value="4">未再次使用</option>
</select>
</td>
</tr>
<tr>
<td align="right">患者名称:</td>
<td><input id="name1" type="text" name="name" maxlength="20" readonly="readonly"/></td>
<td align="right">患者身份证:</td>
<td><input id="id_card_num" type="text" name="id_card_num" maxlength="20" readonly="readonly"/>
</td>
</tr>
<tr>
<td align="right">产品编号:</td>
<td><input id="SerialNum" type="text" name="SerialNum" maxlength="30" readonly="readonly"/></td>
<td align="right">监测唯一标识:</td>
<td><input id="sur_id" type="text" name="sur_id" maxlength="30" readonly="readonly"/>
</td>
</tr>
<tr>
<td align="right">单位名称:</td>
<td><input id="company_nm" type="text" name="company_nm" maxlength="30" readonly="readonly"/>
</td>
<td align="right">公司id:</td>
<td><input id="company_id" type="text" name="company_id" readonly="readonly"/></td>
</tr>
</table>
</div>
<!-- 并用药品 -->
<div>
<div class="crud-small-title">
<ul>
<li class="accordion left"><img class="down left"
src="<%=basePath %>css/images/crud-icon02.png" >
<p class="left">并用药品</p></li>
</ul>
</div>
<div style="height: 500px;">
<table class="crud-content-info" id="addusingprodcetheal">
</table>
</div>
</div>
</div>
</form>
</div>
<!-- 添加病用药品div====================== -->
<div id="xyccproductUsingProductadddiv">
<form id="xyccproductUsingProductaddform" class="easyui-form" method="post"
modelAttribute="power">
<div id="crud">
<!-- 并用药品信息-->
<div>
<div class="crud-small-title">
<ul>
<li class="accordion left"><img class="down left"
src="<%=basePath %>css/images/crud-icon02.png" >
<p class="left">并用药信息</p></li>
</ul>
</div>
<table class="crud-content-info">
<tr>
<td align="right">添加并用药品:</td>
<td><input id="xuanze" type="button" onclick="selectuseing()" value="请选择并用药品"/></td>
<td align="right">商品名称:</td>
<td><input id="ProductName" type="text" name="ProductName" maxlength="30" readonly="readonly"/>
</td>
</tr>
<tr>
<td align="right">生产企业:</td>
<td><input id="UnitName" type="text" name="UnitName" maxlength="30" readonly="readonly"/></td>
<td align="right">批准文号:</td>
<td><input id="Symbol" type="text" name="Symbol" maxlength="30" readonly="readonly"/></td>
</tr>
<tr>
<td align="right">生产企业id:</td>
<td><input id="usingcompany_id" type="text" name="company_id" maxlength="30"
readonly="readonly"/></td>
<td align="right">产品编号:</td>
<td><input id="usingSerialNum" type="text" name="SerialNum" maxlength="30" readonly="readonly"/>
</td>
</tr>
<tr>
<td align="right">用药开始时间:</td>
<td><input id="time_frame" type="text" name="starttime_frame"/></td>
<td align="right">用药结束时间:</td>
<td><input id="time_frame1" type="text" name="endtime_frame"/></td>
</tr>
<tr>
<td align="right">产品批号:</td>
<td><input id="lot_num" type="text" name="lot_num" maxlength="30"
onkeyup="value=value.replace(/[^\w\.\/]/ig,‘‘)"/></td>
<td align="right">通用名称:</td>
<td><input id="common_name" type="text" name="common_name" maxlength="30"/></td>
</tr>
<tr>
<td align="right">用药原因:</td>
<td><input id="medical_reason" type="text" name="medical_reason" maxlength="30"/></td>
<td align="right">用法用量:</td>
<td><input id="usage" type="text" name="usage" maxlength="30"/></td>
</tr>
</table>
</div>
</div>
</form>
</div>
<!-- 并用药品列表 table=======================================================-->
<div id="xyccproductUsingProductdiv">
<table id="xyccproductUsingProducttable"></table>
</div>
<!-- 不良调查列表 ====================-->
<div id="ProductBadSurveytablelistdiv">
<table id="ProductBadSurveytable">
</table>
</div>
<script type="text/javascript">
//选择死亡时死亡时间必填设置
function resultHandling() {
var result_handling = $("#result_handling").val();
if (06 == result_handling) {
$(‘#death_time‘).datebox({
required: true,
editable: false
});
//死亡时间只能选择今天以前的时间
$("#death_time").datebox(‘calendar‘).calendar({
validator: function (beginDate) {
var date = new Date();
return beginDate <= date;
}
});
document.getElementById(‘dethmessage‘).style.display = "table-row";
} else {
document.getElementById(‘dethmessage‘).style.display = "none";
}
}
/**
* 操作下拉框改变survey_trigger表flag字段
* @param id 报告id
*/
function changeTriggerFlag(id){
var confirmStr = $("#"+id).val();
$.messager.confirm(‘请确认!‘,‘您确定要设为‘+(confirmStr=="0"?"无效":"有效")+‘吗?‘,function(r){
if (r){
$.ajax({
url:‘<%=basePath%>xyData/health/changeTrigger.do?id=‘+id+‘&&flag=‘+$("#"+id).val(),
type: ‘get‘,
dataType:"json"
});
}else{
if($("#"+id).val()=="0"){
$("#"+id).val("1");
}else{
$("#"+id).val("0");
}
}
});
}
//文件上传
function upload() {
var url = ‘<%=basePath%>‘ + ‘file/upload.do‘;
HydUtilUpLoad(url, "test_file", "case_report_upload", "file_id");
}
$(‘#level_dialog‘).dialog({
title: ‘查询结果‘,
width: ‘80%‘,
height: 800,
iconCls: ‘icon-add‘,
closed: true,
closable: true,
draggable: false,
modal: true,
buttons: [{
text: ‘关闭‘,
iconCls: ‘icon-cancel‘,
handler: function () {
$(‘#level_dialog‘).dialog(‘close‘);
}
}]
});
$(‘#user_dialog‘).dialog({
title: ‘查询结果‘,
width: ‘80%‘,
height: 800,
iconCls: ‘icon-add‘,
closed: true,
closable: true,
draggable: false,
modal: true,
buttons: [{
text: ‘关闭‘,
iconCls: ‘icon-cancel‘,
handler: function () {
$(‘#user_dialog‘).dialog(‘close‘);
}
}]
});
$("#filter_products_reactions").datagrid({
width: ‘auto‘,
height: ‘auto‘,
striped: true,
fit: true,
pagination: true,
scrollbarSize: 0,
singleSelect: true,
url: ‘<%=basePath%>xyData/health/getProductByCompanyId.do‘,
loadMsg: ‘数据加载中请稍后……‘,
columns: [[
{
field: ‘SerialNum‘,
title: ‘药品id‘,
align: ‘center‘,
resizable: false,
hidden: true
},
{
field: ‘company_id‘,
title: ‘公司id‘,
align: ‘center‘,
resizable: false,
hidden: true
},
{
field: ‘sur_id‘,
title: ‘监测的唯一标识‘,
align: ‘center‘,
resizable: false,
hidden: true
},
{
field: ‘name‘,
title: ‘患者姓名‘,
align: ‘center‘,
resizable: false,
width: ‘15%‘,
formatter: function (value, row) {
return row.userInfo.name
}
},
{
field: ‘gender‘,
title: ‘性别‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value, row) {
return row.userInfo.gender == "0" ? "男" : "女";
}
},
{
field: ‘birthday‘,
title: ‘出生年月‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value, row) {
return row.userInfo.birthday;
}
},
{
field: ‘productInfo‘,
title: ‘药品名称‘,
align: ‘center‘,
resizable: false,
width: ‘20%‘,
formatter: function (value, row) {
return value.productName;
}
},
{
field: ‘contact_way‘,
title: ‘联系方式‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value, row) {
return row.userInfo.contact_way;
}
},
{
field: ‘contact_num‘,
title: ‘联系号码‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value, row) {
return row.userInfo.contact_num;
}
}, {
field: ‘remark‘,
title: ‘评价结果‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value, row) {
if (row.remark == null) {
return "无";
}
return value;
}
}, {
field: ‘flag‘,
title: ‘操作‘,
align: ‘center‘,
resizable: false,
width: ‘15%‘,
formatter: function (value, row) {
var html;
if(value==‘0‘)
html = "<select id=‘"+row.sur_id+"‘ onchange=‘changeTriggerFlag(`"+row.sur_id+"`)‘>" +
"<option value=‘0‘ selected=‘selected‘>无效</option>" +
"<option value=‘1‘>有效</option>" +
"</select>";
else
html = "<select id=‘"+row.sur_id+"‘ onchange=‘changeTriggerFlag(`"+row.sur_id+"`)‘>" +
"<option value=‘0‘>无效</option>" +
"<option value=‘1‘ selected=‘selected‘>有效</option>" +
"</select>";
return html;
}
}
]],/*
onLoadSuccess: function (json) {
var data = {};
for (var i = 0; i < json.rows.length; i++) {
if (undefined == data[json.rows[i].SerialNum]) {
data[json.rows[i].SerialNum] = 1;
} else {
data[json.rows[i].SerialNum] += 1;
}
}
for (var i = 0; i < json.rows.length; i++) {
for (var key in data) {
if (key == json.rows[i].SerialNum) {
$(this).datagrid(‘mergeCells‘, {
index: i,
field: ‘ProductName‘,
rowspan: data[key]
});
i += (data[key] - 1);
}
}
}
},*/
method: ‘post‘,
toolbar: [{
text: ‘查看异常指标‘,
iconCls: ‘icon-add‘,
handler: function () {
var row = $(‘#filter_products_reactions‘).datagrid(‘getSelected‘);
if (row) {
$(‘#user_datagrid‘).datagrid({
width: ‘auto‘,
height: ‘auto‘,
striped: true,
fit: true,
scrollbarSize: 0,
singleSelect: true,
url: ‘<%=basePath%>xyData/badSurvey/findByCondition.do?id=‘ + row.sur_id + ‘&&SerialNum=‘ + row.SerialNum,
loadMsg: ‘数据加载中请稍后……‘,
columns: [[
{
field: ‘id‘,
title: ‘报告号‘,
align: ‘center‘,
resizable: false,
width: ‘25%‘
},
{
field: ‘time‘,
title: ‘上传时间‘,
align: ‘center‘,
resizable: false,
width: ‘25%‘
},
{
field: ‘untoward_reaction_name‘,
title: ‘不良名称‘,
align: ‘center‘,
resizable: false,
width: ‘25%‘
},
{
field: ‘index‘,
title: ‘不良程度‘,
align: ‘center‘,
resizable: false,
width: ‘25%‘
}
]],
onLoadSuccess: function (data) {
for (var i = 0; i < data.total; i++) {
var rowspan = 1;
for (var j = i + 1; j < data.total; j++) {
if (data.rows[i].id == data.rows[j].id) {
rowspan++;
}
}
$(this).datagrid(‘mergeCells‘, {
index: i,
field: ‘id‘,
rowspan: rowspan
});
i += rowspan - 1;
}
},
method: ‘get‘
});
$(‘#user_dialog‘).dialog(‘open‘);
} else {
$.messager.show({
title: ‘提示‘,
msg: ‘请选择一条!‘,
showType: ‘show‘
});
}
}
}, ‘-‘,
{
text: ‘不良调查列表‘,
iconCls: ‘icon-add‘,
handler: function () {
//不良调查列表
badSurveylist();
}
}, ‘-‘,
{
text: ‘不良调查‘,
iconCls: ‘icon-add‘,
handler: function () {
var row = $(‘#filter_products_reactions‘).datagrid(‘getSelected‘);
if (row) {
//打开弹框钱先查询这条数据是否有效
var htmlobj=$.ajax({url:"<%=basePath%>xyData/badSurvey/findSurveyTrigger.do?sur_id="+row.sur_id,async:false});
//object 转string htmlobj.responseText
//string转json
var str=JSON.parse(htmlobj.responseText)
//alert(str.row.flag)
//$("#myDiv").html(htmlobj.responseText);
if(1!=str.row.flag){
$.messager.show({
title: ‘提示‘,
msg: ‘数据为无效状态,无法进行不良调查!‘,
showType: ‘show‘
});
return;
}
$(‘#ProductBadSurveyaddform‘).form(‘clear‘);
badfindusingproduct();
$(‘#ProductBadSurveyadd‘).dialog(‘open‘).dialog(‘setTitle‘, ‘添加‘);
//从列表中获取公司id
$("#company_id").val(row.company_id);
$("#SerialNum").val(row.SerialNum);
$("#id_card_num").val(row.id_card_num);
$("#name1").val(row.userInfo.name);
//alert("row.name===="+patient_info.name+"--id_card_num==="+row.id_card_num);
//产品名称
var productName=row.productInfo.productName;
$("#mProductName").val(productName);
//获取单位名称
var text = $(‘#company‘).find("option:selected").text();
$("#company_nm").val(text);
//监测唯一标识
$(‘#sur_id‘).val(row.sur_id);
$(‘#addusingprodcetheal‘).datagrid(‘loadData‘, {total: 0, rows: []});
//添加不良调查必输项====================
$(‘#company_id‘).validatebox({
required: true
});
$(‘#hospital_name‘).validatebox({
required: true
});
$(‘#hospital_address‘).validatebox({
required: true
});
/* $(‘#case_report_upload‘).validatebox({
required: true
}); */
$(‘#case_report_no‘).validatebox({
required: true
});
/* $(‘#allergen‘).validatebox({
required: true
}); */
$(‘#original_disease‘).validatebox({
required: true
});
$(‘#survey_time‘).datebox({
required: true,
editable: false
});
//下拉框设置默认项
$(function () {
document.getElementById("allergen").setAttribute("readonly",true);
$(‘#relevant_information‘).combotree({
valueField: "id", //Value字段
textField: "text", //Text字段
multiple: true,
data: [{"id": ‘01‘, "text": "吸烟史"}, {
"id": ‘02‘,
"text": "饮酒史"
}, {"id": ‘03‘, "text": "妊娠期"}, {
"id": ‘04‘,
"text": "肝病史"
}, {"id": ‘05‘, "text": "肾病史"}, {
"id": ‘06‘,
"text": "过敏史"
}, {"id": ‘07‘, "text": "其他"}],
// url: "tree_data2.json", //数据源
onCheck: function (node, checked) {
if(node.id==‘06‘ && checked){
$(‘#allergen‘).validatebox({
required: true
});
$("#allergen").removeAttr("readonly");
}
if(node.id==‘06‘ && !checked){
document.getElementById("allergen").setAttribute("readonly",true);
$(‘#allergen‘).validatebox({
required: false
});
}
//让全选不显示
/* $("#ddlLine").combotree("setText", $("#ddlLine").combobox("getText").toString().replace("全选,", "")); */
},
onClick: function (node, checked) {
//让全选不显示
/* $("#ddlLine").combotree("setText", $("#ddlLine").combobox("getText").toString().replace("全选,", "")); */
}
});
});
$("#passing_bad_reaction").val(Array(‘‘));
$("#family_passing_bad_reaction").val(Array(‘‘));
$("#result_handling").val(Array(‘‘));
$("#sickness_influence").val(Array(‘‘));
$("#message_source").val(Array(‘‘));
$("#trace").val(Array(‘‘));
$("#reuse").val(Array(‘‘));
} else {
$.messager.show({
title: ‘提示‘,
msg: ‘请选择一条!‘,
showType: ‘show‘
});
}
}
}
]
});
/* var p = $(‘#filter_products_reactions‘).datagrid(‘getPager‘);
$(p).pagination({
pageSize: 40,//每页显示的记录条数,默认为10
pageList: [40],//可以设置每页记录条数的列表
beforePageText: ‘第‘,//页数文本框前显示的汉字
afterPageText: ‘页 共 {pages} 页‘,
displayMsg: ‘当前显示 {from} - {to} 条记录 共 {total} 条记录‘
});*/
//======================================================================不良调查=============================================
//不良调查列表====
function badSurveylist() {
//不良调查列表弹框
$(‘#ProductBadSurveytablelistdiv‘).dialog({
title: ‘不良调查列表‘,
width: "60%",
height: "75%",
iconCls: ‘icon-add‘,
closed: true,
closable: true,
draggable: false,
modal: true,
buttons: []
});
$(‘#ProductBadSurveytablelistdiv‘).dialog(‘open‘).dialog(‘setTitle‘, ‘不良调查列表‘);
//不良调查列表
$(‘#ProductBadSurveytable‘).datagrid({
width: ‘auto‘,
height: ‘auto‘,
striped: true,
fit: true,
pagination: true, scrollbarSize: 0,
singleSelect: true,
url: ‘<%=basePath%>xyData/badSurvey/findproductBadSurvey.do?company_id=‘ + ‘<%=company_id%>‘,
loadMsg: ‘数据加载中请稍后……‘,
columns: [[
{
field: ‘id_card_num‘,
title: ‘患者身份证号‘,
align: ‘center‘,
resizable: false,
width: ‘15%‘,
formatter: function (value) {
var id=value.substring(0,1)+‘*****************‘;
return "<span title=‘" + id + "‘>" + id + "</span>";
}
}, {
field: ‘name‘,
title: ‘患者名称‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘creation_time‘,
title: ‘不良调查上传时间‘,
align: ‘center‘,
resizable: false,
width: ‘13%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘survey_time‘,
title: ‘调查时间‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘result_handling‘,
title: ‘事件结果及处理‘,
align: ‘center‘,
resizable: false,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘handling_expressions‘,
title: ‘表现‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘cause_death‘,
title: ‘直接死因‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘death_time‘,
title: ‘死亡时间‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘sickness_influence‘,
title: ‘对原患疾病的影响‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘influence_expressions‘,
title: ‘导致后遗症表现‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
hidden: true,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘influence_cause_death‘,
title: ‘原患疾病直接死因‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
hidden: true,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘message_source‘,
title: ‘信息来源‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘remarks‘,
title: ‘备注‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘hospital_name‘,
title: ‘医院名称‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘hospital_address‘,
title: ‘医院地址‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘case_report_upload‘,
title: ‘病例上传‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘
}, {
field: ‘case_report_no‘,
title: ‘病历号/门诊号‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘original_disease‘,
title: ‘原患疾病‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘relevant_information‘,
title: ‘相关信息‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘allergen‘,
title: ‘过敏源‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘bad_survey_no‘,
title: ‘不良调查编号‘,
align: ‘center‘,
resizable: false,
width: ‘15%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘flag‘,
title: ‘是否处理‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘
}, {
field: ‘passing_bad_reaction‘,
title: ‘既往药品不良反应‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
hidden: true
}, {
field: ‘reaction_expressions‘,
title: ‘反应/事件描述‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘company_id‘,
title: ‘生产企业id‘,
align: ‘center‘,
resizable: false,
width: ‘15%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘family_passing_bad_reaction‘,
title: ‘家族药品不良反应/事件‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘serialNum‘,
title: ‘产品编号‘,
align: ‘center‘,
resizable: false,
width: ‘21%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘productName‘,
title: ‘产品名称‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘company_nm‘,
title: ‘单位名称‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘trace‘,
title: ‘反应/事件是否消失或减轻‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘reuse‘,
title: ‘不良反应/事件是否再次出现‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}
]],
method: ‘post‘,
toolbar: [
{
text: ‘删除‘,
iconCls: ‘icon-delete3‘,
handler: function () {
var row = $(‘#ProductBadSurveytable‘).datagrid(‘getSelected‘);
if (row) {
$.messager.confirm(‘删除数据‘, ‘您确定删除此数据吗?‘, function (r) {
if (r) {
$.post(‘<%=basePath%>xyData/badSurvey/deleteProductBadSurvey.do?bad_survey_no=‘ + row.bad_survey_no,
function (result) {
//$.messager.alert(‘提示‘,‘删除成功‘);
$.messager.show({
title: ‘提示‘,
msg: result.msg,
showType: ‘show‘
});
$(‘#ProductBadSurveytable‘).datagrid(‘reload‘); // reload the user data
}, ‘json‘);
}
});
} else {
$.messager.show({
title: ‘提示‘,
msg: ‘请至少选择一条记录‘,
showType: ‘show‘
});
}
}
}
]
});
}
//添加不良调查弹框
$(‘#ProductBadSurveyadd‘).dialog({
title: ‘添加权限‘,
width: ‘60%‘,
height: ‘90%‘,
iconCls: ‘icon-add‘,
closed: true,
closable: false,
draggable: false,
modal: true,
buttons: [{
text: ‘保存‘,
iconCls: ‘icon-ok‘,
handler: function () {
$(‘#ProductBadSurveyaddform‘).form(‘submit‘, {
onSubmit: function () {
return $(this).form(‘enableValidation‘).form(‘validate‘);
},
url: ‘<%=basePath%>xyData/badSurvey/addProductBadSurvey.do‘,
success: function (data) {
data = eval("(" + data + ")");//JSON字符串转对象
var rows = $("#addusingprodcetheal").datagrid("getRows"); //这段代码是获取当前页的所有行。
//alert("rows==================="+rows);
//alert("bad_survey_no==="+data.bad_survey_no);
//alert(rows.length==0);
if (rows.length != 0) {
for (var i = 0; i < rows.length; i++) {
//获取每一行的数据
//alert(rows[i].ProductName);//假设有ProductName这个字段
$.ajax({
url: "<%=basePath%>xyData/badSurvey/addUsingProduct.do?bad_survey_no=" + data.bad_survey_no,
type: ‘POST‘,
dataType: ‘json‘,
async:false,
data: rows[i],
success: function (data) {
if (i == rows.length - 1) {
//alert("jinlaikankan=============");
$.messager.show({
title: ‘提示‘,
msg: data.msg,
showType: ‘show‘
});
}
},
error: function (data) {
$.messager.show({
title: ‘提示‘,
msg: data.msg,
showType: ‘show‘
});
}
});
}
} else {
//alert("data.msg=="+data.msg);
$.messager.show({
title: ‘提示‘,
msg: data.msg,
showType: ‘show‘
});
}
$(‘#ProductBadSurveyadd‘).dialog(‘close‘);
$(‘#filter_products_reactions‘).datagrid(‘reload‘);
},
error: function () {
//$.messager.alert(‘提示‘, ‘添加失败‘);
$.messager.show({
title: ‘提示‘,
msg: data.msg,
showType: ‘show‘
});
}
});
}
}, {
text: ‘取消‘,
iconCls: ‘icon-cancel‘,
handler: function () {
$(‘#ProductBadSurveyadd‘).dialog(‘close‘);
}
}]
});
//=====================================================添加并用药品===================================================
//不良调查添加并用药===============
function badfindusingproduct() {
$(‘#ProductName‘).validatebox({
required: true
});
$(‘#usingSerialNum‘).validatebox({
required: true
});
$(‘#UnitName‘).validatebox({
required: true
});
$(‘#Symbol‘).validatebox({
required: true
});
$(‘#usingcompany_id‘).validatebox({
required: true
});
$(‘#time_frame‘).datebox({
required: true,
editable: false
});
$(‘#time_frame1‘).datebox({
required: true,
editable: false
});
//开始日期小于结束日期
/* //日期控制扩展选择日期小于等于当前日期,开始日期小于等于结束日期
$("#time_frame").datebox(‘calendar‘).calendar({
validator:function(beginDate){
var date = new Date();
return beginDate <= date;
}
}); */
$("#time_frame").datebox({
onSelect: function (beginDate) {
$(‘#time_frame1‘).datebox().datebox(‘calendar‘).calendar({
validator: function (endDate) {
var date = new Date();
return beginDate <= endDate;
}
});
}
});
//survey_time death_time
$(‘#survey_time‘).datebox({
required: true,
editable: false
});
$(‘#death_time‘).datebox({
editable: false
});
//没有选择死亡前隐藏时间框
//document.getElementById(‘dethmessage‘).style.visibility = "hidden ";
$(‘#common_name‘).validatebox({
required: true
});
$(‘#medical_reason‘).validatebox({
required: true
});
$(‘#usage‘).validatebox({
required: true
});
$(‘#lot_num‘).validatebox({
required: true
});
$(‘#addusingprodcetheal‘).datagrid({
width: ‘auto‘,
height: ‘auto‘,
striped: true,
fit: true,
singleSelect: false,
loadMsg: ‘数据加载中请稍后……‘,
columns: [[{
field: ‘ProductName‘,
title: ‘商品名称‘,
align: ‘center‘,
resizable: false,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘SerialNum‘,
title: ‘产品编号‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘UnitName‘,
title: ‘生产企业‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘lot_num‘,
title: ‘产品批号‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘usage‘,
title: ‘用法用量‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘medical_reason‘,
title: ‘用药原因‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘common_name‘,
title: ‘通用名称‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘Symbol‘,
title: ‘批准文号‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘company_id‘,
title: ‘生产企业id‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘starttime_frame‘,
title: ‘用药开始时间‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘endtime_frame‘,
title: ‘用药结束时间‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}
]],
method: ‘post‘,
toolbar: [
{
text: ‘添加‘,
iconCls: ‘icon-add‘,
handler: function () {
$(‘#xyccproductUsingProductaddform‘).form(‘clear‘);
$(‘#xyccproductUsingProductadddiv‘).dialog(‘open‘).dialog(‘setTitle‘, ‘添加并用药品‘);
}
},
{
text: ‘清空‘,
iconCls: ‘icon-delete3‘,
handler: function () {
$(‘#addusingprodcetheal‘).datagrid(‘loadData‘, {total: 0, rows: []});
}
}
]
});
}
//添加并用药信息弹框
$(‘#xyccproductUsingProductadddiv‘).dialog({
title: ‘添加并用药品‘,
width: "60%",
height: "75%",
iconCls: ‘icon-add‘,
closed: true,
closable: true,
draggable: false,
modal: true,
buttons: [
{
text: ‘保存‘,
iconCls: ‘icon-ok‘,
handler: function () {
$(‘#xyccproductUsingProductaddform‘).form(‘submit‘, {
onSubmit: function () {
//必输项进行验证======================
if (!$(this).form(‘enableValidation‘).form(‘validate‘)) {
$.messager.show({
title: ‘提示‘,
msg: ‘请将必输项填写完整‘,
showType: ‘show‘
});
}
return $(this).form(‘enableValidation‘).form(‘validate‘);
},
url: ‘‘,
success: function (data) {
//var data = $("#xyccproductUsingProductaddform").serialize();
var data = $(‘#xyccproductUsingProductaddform‘).serializeArray();
var json = {};
for (var i = 0; i < data.length; i++) {
json[data[i]["name"]] = data[i]["value"];
}
//alert(JSON.stringify(json));
$(‘#addusingprodcetheal‘).datagrid(‘appendRow‘, json);
$(‘#xyccproductUsingProductadddiv‘).dialog(‘close‘);
},
error: function () {
}
});
}
}, {
text: ‘取消‘,
iconCls: ‘icon-cancel‘,
handler: function () {
$(‘#xyccproductUsingProductadddiv‘).dialog(‘close‘);
}
}
]
});
function selectuseing() {
/* 查询全部并用药品==================================================================== */
/* 全部病用药 */
$(‘#xyccproductUsingProductdiv‘).dialog({
title: ‘添加并用药品‘,
width: "60%",
height: "75%",
iconCls: ‘icon-add‘,
closed: true,
closable: true,
draggable: false,
modal: true,
buttons: []
});
//全部并用药品列表让添加并用药品进行选择
$(‘#xyccproductUsingProductdiv‘).dialog(‘open‘).dialog(‘setTitle‘, ‘添加并用药品‘);
$(‘#xyccproductUsingProducttable‘).datagrid({
width: ‘auto‘,
height: ‘auto‘,
striped: true,
fit: true,
pagination: true, scrollbarSize: 0,
singleSelect: true,
url: ‘<%=basePath%>xyData/badSurvey/findAllUsingProduct.do‘,
loadMsg: ‘数据加载中请稍后……‘,
columns: [[{
field: ‘ProductName‘,
title: ‘商品名称‘,
align: ‘center‘,
resizable: false,
width: ‘15%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘SerialNum‘,
title: ‘产品编号‘,
align: ‘center‘,
resizable: false,
width: ‘23%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘UnitName‘,
title: ‘生产企业‘,
align: ‘center‘,
resizable: false,
width: ‘15%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘common_name‘,
title: ‘通用名称‘,
align: ‘center‘,
resizable: false,
width: ‘15%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘Symbol‘,
title: ‘批准文号‘,
align: ‘center‘,
resizable: false,
width: ‘15%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘company_id‘,
title: ‘生产企业id‘,
align: ‘center‘,
resizable: false,
width: ‘18%‘,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘lot_num‘,
title: ‘产品批号‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
hidden: true,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘usage‘,
title: ‘用法用量‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
hidden: true,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘time_frame‘,
title: ‘用药时间‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
hidden: true,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘medical_reason‘,
title: ‘用药原因‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
hidden: true,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}, {
field: ‘bad_survey_no‘,
title: ‘不良调查编号‘,
align: ‘center‘,
resizable: false,
width: ‘10%‘,
hidden: true,
formatter: function (value) {
return "<span title=‘" + value + "‘>" + value + "</span>";
}
}
]],
method: ‘post‘,
toolbar: [
{
text: ‘保存‘,
iconCls: ‘icon-edit‘,
handler: function () {
var row = $(‘#xyccproductUsingProducttable‘).datagrid(‘getSelected‘);
if (row) {
//$(‘#addusingprodcetheal‘).datagrid(‘reload‘);
$(‘#xyccproductUsingProductdiv‘).dialog(‘close‘);
$(‘#xyccproductUsingProductaddform‘).form(‘load‘, row);
} else {
$.messager.show({
title: ‘提示‘,
msg: ‘请至少选择一条记录‘,
showType: ‘show‘
});
}
}
}, ‘-‘,
]
});
}
var p = $(‘#filter_products_reactions‘).datagrid(‘getPager‘);
$(p).pagination({
pageSize: 10,//每页显示的记录条数,默认为10
pageList: [<%=CUtil.numPerPage_1 %>, <%=CUtil.numPerPage_2 %>, <%=CUtil.numPerPage_3 %>],//可以设置每页记录条数的列表
beforePageText: ‘第‘,//页数文本框前显示的汉字
afterPageText: ‘页 共 {pages} 页‘,
displayMsg: ‘当前显示 {from} - {to} 条记录 共 {total} 条记录‘,
});
</script>
</body>
</html>
标签:姓名 mon pass pow ddl sync hellip cts alert
原文地址:https://www.cnblogs.com/xianz666/p/12027594.html