|
@@ -7,6 +7,8 @@ $(function () {
|
|
|
initGenderSelect();
|
|
|
initResponceTypeSelect();
|
|
|
initZyClassTypeSelect();
|
|
|
+ initInstructionSelect();
|
|
|
+ setSelectSize();
|
|
|
$('#editUserBirthDayGroup').datetimepicker({
|
|
|
format: 'yyyy-mm-dd',
|
|
|
language: 'zh-CN',
|
|
@@ -22,7 +24,7 @@ $(function () {
|
|
|
//时间区间
|
|
|
initMzWorkTime();
|
|
|
//初始频次下拉选
|
|
|
- initOrderFrequencys();
|
|
|
+ initOrderFrequencys("orderFrequency");
|
|
|
//初始用药方式下拉选
|
|
|
initSupplyTypes();
|
|
|
|
|
@@ -122,39 +124,10 @@ $(function () {
|
|
|
initDayNum();
|
|
|
//页面加载完成初始化西药处方
|
|
|
initNavTabs(0);
|
|
|
- /**
|
|
|
- * 西药给药方式设置最高的下拉选高度
|
|
|
- */
|
|
|
- setSelectHeight("supplyType","360px");
|
|
|
- /**
|
|
|
- * 中药给药方式设置最高的下拉选高度
|
|
|
- */
|
|
|
- setSelectHeight("zy_supplyType","360px");
|
|
|
- /**
|
|
|
- * 西药用药频率设置最高的下拉选高度
|
|
|
- */
|
|
|
- setSelectHeight("orderFrequency","360px");
|
|
|
- /**
|
|
|
- * 中药用药频率设置最高的下拉选高度
|
|
|
- */
|
|
|
- setSelectHeight("zy_orderFrequency","360px");
|
|
|
-
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
-/**
|
|
|
- * 设置下拉选的高度
|
|
|
- * @param id
|
|
|
- */
|
|
|
-function setSelectHeight(id,height) {
|
|
|
- $("#" + id).on('shown.bs.select', function (e) {
|
|
|
- $("#" + id).siblings('.dropdown-menu').css("max-height",height);
|
|
|
- $('#' + id).parent().find("input").keydown(function () {
|
|
|
- $("#" + id).siblings('.dropdown-menu').css("max-height", height);
|
|
|
- })
|
|
|
- });
|
|
|
-}
|
|
|
|
|
|
/**
|
|
|
* 初始化用药天数下拉选
|
|
@@ -1012,14 +985,48 @@ function fitAppeal(appeal, paramsType) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 初始嘱托下拉选
|
|
|
+ */
|
|
|
+function initInstructionSelect() {
|
|
|
+ $.ajax({
|
|
|
+ type: "GET",
|
|
|
+ url: '/thmz/getMzZdInstructionByType?instructionType=1',
|
|
|
+ contentType: "application/json;charset=UTF-8",
|
|
|
+ dataType: "json",
|
|
|
+ headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ success: function (res) {
|
|
|
+ if (res == '401' || res == 401) {
|
|
|
+ window.location.href = '/thmz/login/view'
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (res.code == 0) {
|
|
|
+ res.data.forEach(function (item, index) {
|
|
|
+ var html = '<option value="' + item.code + '">' + item.instructionText + '</option>';
|
|
|
+ $('#zyInstruction').append(html);
|
|
|
+ });
|
|
|
+ $('#zyInstruction').selectpicker('refresh');
|
|
|
+ } else {
|
|
|
+ errorMesage(res);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
|
|
|
/**
|
|
|
- * 初始化性别下拉选
|
|
|
+ * 设置下拉选的尺寸
|
|
|
*/
|
|
|
-function initGenderSelect() {
|
|
|
+function setSelectSize() {
|
|
|
$(".selectpicker").selectpicker({
|
|
|
- dropuAuto: false
|
|
|
+ dropuAuto: false,
|
|
|
+ size: 10
|
|
|
});
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 初始化性别下拉选
|
|
|
+ */
|
|
|
+function initGenderSelect() {
|
|
|
var gender = '<option value="1">男</option><option value="2">女</option><option value="0">未知</option>';
|
|
|
$('#rapidAcceptsUserGender').html(gender);
|
|
|
$('#rapidAcceptsUserGender').selectpicker('refresh');
|
|
@@ -1031,23 +1038,17 @@ function initGenderSelect() {
|
|
|
* 初始化中药类型下拉选
|
|
|
*/
|
|
|
function initZyClassTypeSelect() {
|
|
|
- $(".selectpicker").selectpicker({
|
|
|
- dropuAuto: false
|
|
|
- });
|
|
|
var gender = '<option value="81">普通</option><option value="82">颗粒剂</option>';
|
|
|
$('#zyClassType').html(gender);
|
|
|
$('#zyClassType').selectpicker('refresh');
|
|
|
//$('#zyClassType').selectpicker('val', "81");
|
|
|
- // $('#zyClassType').selectpicker('refresh');
|
|
|
+ // $('#zyClassType').selectpicker('refresh');
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 初始化病人身份类别下拉选
|
|
|
*/
|
|
|
function initResponceTypeSelect() {
|
|
|
- $(".selectpicker").selectpicker({
|
|
|
- dropuAuto: false
|
|
|
- });
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
url: '/thmz/getMzResponceType',
|
|
@@ -1254,7 +1255,7 @@ function fitFee() {
|
|
|
/**
|
|
|
* 初始频次下拉选
|
|
|
*/
|
|
|
-function initOrderFrequencys() {
|
|
|
+function initOrderFrequencys(id) {
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
url: '/thmz/getOrderFrequencys',
|
|
@@ -1269,12 +1270,9 @@ function initOrderFrequencys() {
|
|
|
$.each(res.data, function (commentIndex, comment) {
|
|
|
html += '<option value="' + comment.code + '" desc="' + comment.times + '">' + comment.name + '(' + comment.code + ')' + '</option>';
|
|
|
});
|
|
|
- $('#orderFrequency').empty();
|
|
|
- $('#orderFrequency').html(html);
|
|
|
- $('#orderFrequency').selectpicker('refresh');
|
|
|
- $('.zy_orderFrequency').empty();
|
|
|
- $('.zy_orderFrequency').html(html);
|
|
|
- $('.zy_orderFrequency').selectpicker('refresh');
|
|
|
+ $('#'+id).empty();
|
|
|
+ $('#'+id).html(html);
|
|
|
+ $('#'+id).selectpicker('refresh');
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -1296,7 +1294,7 @@ function initSupplyTypes() {
|
|
|
}
|
|
|
var html = '';
|
|
|
$.each(res.data, function (commentIndex, comment) {
|
|
|
- if(comment.groupNo==="71"){
|
|
|
+ if (comment.groupNo === "71") {
|
|
|
html += '<option value="' + comment.code + '">' + comment.name + '</option>';
|
|
|
}
|
|
|
});
|
|
@@ -1310,7 +1308,8 @@ function initSupplyTypes() {
|
|
|
/**
|
|
|
* 初始煎药方式下拉选
|
|
|
*/
|
|
|
-function initSupplyTypes() {
|
|
|
+function initZySupplyTypes(id) {
|
|
|
+ setSelectSize();
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
url: '/thmz/getSupplyTypes',
|
|
@@ -1323,13 +1322,13 @@ function initSupplyTypes() {
|
|
|
}
|
|
|
var html = '';
|
|
|
$.each(res.data, function (commentIndex, comment) {
|
|
|
- if(comment.groupNo==="81"){
|
|
|
+ if (comment.groupNo === "81") {
|
|
|
html += '<option value="' + comment.code + '">' + comment.name + '</option>';
|
|
|
}
|
|
|
});
|
|
|
- $('.zy_supplyType').empty();
|
|
|
- $('.zy_supplyType').html(html);
|
|
|
- $('.zy_supplyType').selectpicker('refresh');
|
|
|
+ $('#'+id).empty();
|
|
|
+ $('#'+id).html(html);
|
|
|
+ $('#'+id).selectpicker('refresh');
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -2345,28 +2344,30 @@ function fitValue(value, id) {
|
|
|
* @param index
|
|
|
*/
|
|
|
function loadYpList(index) {
|
|
|
- var medicinePopoverContent=null;
|
|
|
- var tableMedicine=null;
|
|
|
- var MedicineName=null;
|
|
|
+ var medicinePopoverContent = null;
|
|
|
+ var tableMedicine = null;
|
|
|
+ var MedicineName = null;
|
|
|
//var groupNo=null;
|
|
|
- if(index==0){
|
|
|
- medicinePopoverContent="westernMedicinePopoverContent";
|
|
|
- tableMedicine="tb_table_western_medicine";
|
|
|
- MedicineName="western_medicine_name";
|
|
|
- // groupNo=71;
|
|
|
- }if(index==1){
|
|
|
- medicinePopoverContent="chineseMedicinePopoverContent";
|
|
|
- tableMedicine="tb_table_chinese_medicine";
|
|
|
- MedicineName="chinese_medicine_name";
|
|
|
- // groupNo=$("#zyClassType").val();
|
|
|
- }if(index==2){
|
|
|
+ if (index == 0) {
|
|
|
+ medicinePopoverContent = "westernMedicinePopoverContent";
|
|
|
+ tableMedicine = "tb_table_western_medicine";
|
|
|
+ MedicineName = "western_medicine_name";
|
|
|
+ // groupNo=71;
|
|
|
+ }
|
|
|
+ if (index == 1) {
|
|
|
+ medicinePopoverContent = "chineseMedicinePopoverContent";
|
|
|
+ tableMedicine = "tb_table_chinese_medicine";
|
|
|
+ MedicineName = "chinese_medicine_name";
|
|
|
+ // groupNo=$("#zyClassType").val();
|
|
|
+ }
|
|
|
+ if (index == 2) {
|
|
|
|
|
|
}
|
|
|
- if (!$("#"+medicinePopoverContent).parent().parent().parent().hasClass("in")) {
|
|
|
+ if (!$("#" + medicinePopoverContent).parent().parent().parent().hasClass("in")) {
|
|
|
return;
|
|
|
}
|
|
|
- $('#'+tableMedicine).bootstrapTable('refresh');
|
|
|
- $('#'+tableMedicine).bootstrapTable({
|
|
|
+ $('#' + tableMedicine).bootstrapTable('refresh');
|
|
|
+ $('#' + tableMedicine).bootstrapTable({
|
|
|
url: '/thmz/getYpListByCommonParams', //请求后台的URL(*)
|
|
|
method: 'GET', //请求方式(*)
|
|
|
toolbar: '#toolbar', //工具按钮用哪个容器
|
|
@@ -2376,17 +2377,19 @@ function loadYpList(index) {
|
|
|
sortable: true, //是否启用排序
|
|
|
sortOrder: "asc", //排序方式
|
|
|
queryParams: function (params) {
|
|
|
- var groupNo=null;
|
|
|
- if(index==0){
|
|
|
- groupNo=71;
|
|
|
- }if(index==1){
|
|
|
- groupNo=$("#zyClassType").val();
|
|
|
- }if(index==2){
|
|
|
+ var groupNo = null;
|
|
|
+ if (index == 0) {
|
|
|
+ groupNo = 71;
|
|
|
+ }
|
|
|
+ if (index == 1) {
|
|
|
+ groupNo = $("#zyClassType").val();
|
|
|
+ }
|
|
|
+ if (index == 2) {
|
|
|
|
|
|
}
|
|
|
var temp = {
|
|
|
groupNo: groupNo,
|
|
|
- commonParams: $("#"+MedicineName).val()
|
|
|
+ commonParams: $("#" + MedicineName).val()
|
|
|
};
|
|
|
return temp;
|
|
|
}, //传递参数(*)
|
|
@@ -2489,12 +2492,14 @@ function loadYpList(index) {
|
|
|
};
|
|
|
},
|
|
|
onClickRow: function (row, $element) {
|
|
|
- $('#'+MedicineName).webuiPopover('hide');
|
|
|
- if(index==0){
|
|
|
+ $('#' + MedicineName).webuiPopover('hide');
|
|
|
+ if (index == 0) {
|
|
|
checkYpInfo(row.code, row.serial);
|
|
|
- }if(index==1){
|
|
|
+ }
|
|
|
+ if (index == 1) {
|
|
|
|
|
|
- }if(index==2){
|
|
|
+ }
|
|
|
+ if (index == 2) {
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -2568,17 +2573,17 @@ function initNavTabs(index) {
|
|
|
}
|
|
|
if ($("#" + tabId).children().length == 0) {
|
|
|
$("#" + tabId).append('<li class="active"><a href="#' + paneId + '" role="tab" data-toggle="tab">处方一</a></li>');
|
|
|
- var html='<div class="tab-pane fade in active" id="' + paneId + '" style="height: 100%;min-height: 285px;position: relative;">' +
|
|
|
+ var html = '<div class="tab-pane fade in active" id="' + paneId + '" style="height: 100%;min-height: 285px;position: relative;">' +
|
|
|
' <div class="cf_content rb_item" style="height: 250px;padding-top: 5px;"></div>' +
|
|
|
' <div style="height: 30px;border-top: 1px solid #ddd;width: 100%;position: absolute;bottom:0;padding-top: 10px;">';
|
|
|
-
|
|
|
- if(index==1){
|
|
|
- html+= ' <div style="width: 130px;float: left;">' +
|
|
|
- ' <label class="my_label_2">付数:</label>' +
|
|
|
- ' <input type="text" class="form-control my_label_input_2 zyfs"' +
|
|
|
- ' placeholder="请输入" style="padding-left: 10px;">' +
|
|
|
- ' </div>';
|
|
|
- html+='<div style="width: 130px;float: left;">' +
|
|
|
+ html += '<div style="width: 460px;">'
|
|
|
+ if (index == 1) {
|
|
|
+ html += ' <div style="width: 130px;float: left;">' +
|
|
|
+ ' <label class="my_label_2">付数:</label>' +
|
|
|
+ ' <input type="text" class="form-control my_label_input_2 zyfs"' +
|
|
|
+ ' placeholder="请输入" style="padding-left: 10px;">' +
|
|
|
+ ' </div>';
|
|
|
+ html += '<div style="width: 130px;float: left;">' +
|
|
|
' <label class="my_label_2">频次:</label>' +
|
|
|
' <div style="width: 85px;float: right;">' +
|
|
|
' <select class="form-control selectpicker show-tick zy_orderFrequency"' +
|
|
@@ -2586,7 +2591,7 @@ function initNavTabs(index) {
|
|
|
' </select>' +
|
|
|
' </div>' +
|
|
|
' </div>';
|
|
|
- html+='<div style="width: 180px;float: left;">' +
|
|
|
+ html += '<div style="width: 180px;float: left;">' +
|
|
|
' <label class="my_label_2">用法:</label>' +
|
|
|
' <div style="width: 135px;float: left;">' +
|
|
|
' <select class="form-control selectpicker show-tick useType"' +
|
|
@@ -2594,37 +2599,39 @@ function initNavTabs(index) {
|
|
|
' </select>' +
|
|
|
' </div>' +
|
|
|
' </div>';
|
|
|
+ html += '</div><div style="width: 460px;">'
|
|
|
}
|
|
|
- html+= '<div style="width: 130px;float: left;padding-left: 7px;padding-top: 8px;">金额:<span class="cf_amount">0.0</span><span>元</span></div>';
|
|
|
- if(index==1){
|
|
|
- html+='<div style="width: 130px;float: left;">' +
|
|
|
+ html += '<div style="width: 130px;float: left;padding-left: 7px;padding-top: 8px;">金额:<span class="cf_amount">0.0</span><span>元</span></div>';
|
|
|
+ if (index == 1) {
|
|
|
+ html += '<div style="width: 130px;float: left;">' +
|
|
|
' <label class="my_label_2">液型:</label>' +
|
|
|
' <div style="width: 85px;float: right;">' +
|
|
|
' <select class="form-control selectpicker show-tick water" >' +
|
|
|
' </select>' +
|
|
|
' </div>' +
|
|
|
' </div>';
|
|
|
- html+=' <div style="width: 180px;float: left;">' +
|
|
|
+ html += ' <div style="width: 180px;float: left;">' +
|
|
|
' <label class="my_label_2">煎法:</label>' +
|
|
|
' <div style="width: 135px;float: left;">' +
|
|
|
' <select class="form-control selectpicker show-tick zy_supplyType"' +
|
|
|
- ' title="请选择" >' +
|
|
|
+ ' title="请选择" id="zy_supplyType_1">' +
|
|
|
' </select>' +
|
|
|
' </div>' +
|
|
|
' </div>';
|
|
|
}
|
|
|
- html+= '</div></div>'
|
|
|
+ html += '</div></div></div>'
|
|
|
$("#" + tabContentId).append(html);
|
|
|
- var useType = '<option value="饭前温服">饭前温服</option><option value="饭后温服">饭后温服</option><option value="饭前凉服">饭前凉服</option><option value="饭后凉服">饭后凉服</option><option value="顿服">顿服</option><option value="冲服">冲服</option><option value="外用">外用</option>';
|
|
|
- $('.useType').html(useType);
|
|
|
- $('.useType').selectpicker('refresh');
|
|
|
- var water = '<option value="加凉水">加凉水</option><option value="加温水">加温水</option><option value="加开水">加开水</option><option value="加冰水">加冰水</option><option value="加糖水">加糖水</option>';
|
|
|
- $('.water').html(water);
|
|
|
- $('.water').selectpicker('refresh');
|
|
|
- initOrderFrequencys();
|
|
|
- initSupplyTypes();
|
|
|
- setSelectHeight("useType_1","320px");
|
|
|
- setSelectHeight("zy_orderFrequency_1","320px");
|
|
|
+ if (index == 1) {
|
|
|
+ var useType = '<option value="饭前温服">饭前温服</option><option value="饭后温服">饭后温服</option><option value="饭前凉服">饭前凉服</option><option value="饭后凉服">饭后凉服</option><option value="顿服">顿服</option><option value="冲服">冲服</option><option value="外用">外用</option>';
|
|
|
+ $('.useType').html(useType);
|
|
|
+ $('.useType').selectpicker('refresh');
|
|
|
+ var water = '<option value="加凉水">加凉水</option><option value="加温水">加温水</option><option value="加开水">加开水</option><option value="加冰水">加冰水</option><option value="加糖水">加糖水</option>';
|
|
|
+ $('.water').html(water);
|
|
|
+ $('.water').selectpicker('refresh');
|
|
|
+ initOrderFrequencys("zy_orderFrequency_1");
|
|
|
+ initZySupplyTypes("zy_supplyType_1");
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|