|
@@ -8,8 +8,8 @@ var groupIdMap = null;
|
|
|
var LODOP; //声明为全局变量
|
|
|
//默认打印机下标
|
|
|
var printIndex = -1;
|
|
|
-//当前光标点击的元素ID
|
|
|
-var currentEleId = null;
|
|
|
+// //当前光标点击的元素ID
|
|
|
+// var currentEleId = null;
|
|
|
$(function () {
|
|
|
initGenderSelect();
|
|
|
iniAdmissStatus();
|
|
@@ -248,87 +248,92 @@ $(function () {
|
|
|
//键盘监听回车键
|
|
|
$(document).keyup(function (event) {
|
|
|
if (event.keyCode == 13) { //是否是回车
|
|
|
- //var el = event.srcElement || event.target;
|
|
|
- if (currentEleId == 'zy_drugWin') {
|
|
|
+ var el = event.srcElement || event.target;
|
|
|
+ var id = el.getAttribute("id");
|
|
|
+ if (id == null || id == "") {
|
|
|
+ id = el.getAttribute("data-id");
|
|
|
+ }
|
|
|
+ if (id == null || id == "") {
|
|
|
+ var search = el.getAttribute("aria-label");
|
|
|
+ if (search == "Search") {
|
|
|
+ id = $(el).parent().parent().prev().attr("data-id");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (id == 'zy_drugWin') {
|
|
|
$("#zyInstruction").next().click();
|
|
|
- currentEleId = 'zyInstruction';
|
|
|
- } else if (currentEleId == 'zyInstruction') {
|
|
|
- saveMedicine(1);
|
|
|
- currentEleId = 'saveChineseMedicine';
|
|
|
- } else if (currentEleId == 'saveChineseMedicine') {
|
|
|
- $("input.zyfs").focus();
|
|
|
- currentEleId = 'zyfs';
|
|
|
- } else if (currentEleId == 'zyfs') {
|
|
|
+ } else if (id == 'zyInstruction') {
|
|
|
+ var ariaExpanded=$("#zyInstruction").next().attr("aria-expanded");
|
|
|
+ if(ariaExpanded==true || ariaExpanded=="true"){
|
|
|
+ $("#zyInstruction").next().click();
|
|
|
+ }
|
|
|
+ $("#saveChineseMedicine").click();
|
|
|
+ $("#zyfs").focus();
|
|
|
+ // saveMedicine(1);
|
|
|
+ }
|
|
|
+ // else if (id == 'saveChineseMedicine') {
|
|
|
+ // $("input.zyfs").focus();
|
|
|
+ // }
|
|
|
+ else if (id == 'zyfs') {
|
|
|
$("#zy_orderFrequency_1").next().click();
|
|
|
- currentEleId = 'zy_orderFrequency_1';
|
|
|
- } else if (currentEleId == 'zy_orderFrequency_1') {
|
|
|
+ } else if (id == 'zy_orderFrequency_1') {
|
|
|
$("#useType_1").next().click();
|
|
|
- currentEleId = 'useType_1';
|
|
|
- } else if (currentEleId == 'useType_1') {
|
|
|
+ } else if (id == 'useType_1') {
|
|
|
$("#cyJssm").next().click();
|
|
|
- currentEleId = 'cyJssm';
|
|
|
- } else if (currentEleId == 'cyJssm') {
|
|
|
+ } else if (id == 'cyJssm') {
|
|
|
$("#zy_supplyType_1").next().click();
|
|
|
- currentEleId = 'zy_supplyType_1';
|
|
|
- } else if (currentEleId == 'zy_supplyType_1') {
|
|
|
+ } else if (id == 'zy_supplyType_1') {
|
|
|
$("#chinese_medicine_name").focus();
|
|
|
$("#chinese_medicine_name").click();
|
|
|
- currentEleId = 'chinese_medicine_name';
|
|
|
- } else if (currentEleId == 'supplyType') {
|
|
|
+ } else if (id == 'supplyType') {
|
|
|
$("#drugWinUnit").next().click();
|
|
|
- currentEleId = 'drugWinUnit';
|
|
|
- } else if (currentEleId == 'drugWinUnit') {
|
|
|
+ } else if (id == 'drugWinUnit') {
|
|
|
$("#drugWin").focus();
|
|
|
- currentEleId = 'drugWin';
|
|
|
- } else if (currentEleId == 'drugWin') {
|
|
|
+ } else if (id == 'drugWin') {
|
|
|
$("#dayNum").next().click();
|
|
|
- currentEleId = 'dayNum';
|
|
|
- } else if (currentEleId == 'dayNum') {
|
|
|
+ } else if (id == 'dayNum') {
|
|
|
$("#orderFrequency").next().click();
|
|
|
- currentEleId = 'orderFrequency';
|
|
|
- } else if (currentEleId == 'orderFrequency') {
|
|
|
+ } else if (id == 'orderFrequency') {
|
|
|
+ $("#gross").focus();
|
|
|
+ } else if (id == 'gross') {
|
|
|
$("#packUnit").next().click();
|
|
|
- currentEleId = 'packUnit';
|
|
|
- } else if (currentEleId == 'packUnit') {
|
|
|
+ } else if (id == 'packUnit') {
|
|
|
$("#medicalAdvice").next().click();
|
|
|
- currentEleId = 'medicalAdvice';
|
|
|
- } else if (currentEleId == 'medicalAdvice') {
|
|
|
+ } else if (id == 'medicalAdvice') {
|
|
|
+ var ariaExpanded=$("#medicalAdvice").next().attr("aria-expanded");
|
|
|
+ if(ariaExpanded==true || ariaExpanded=="true"){
|
|
|
+ $("#medicalAdvice").next().click();
|
|
|
+ }
|
|
|
saveMedicine(0);
|
|
|
- currentEleId = 'saveWesternMedicine';
|
|
|
- } else if (currentEleId == 'saveWesternMedicine') {
|
|
|
+ $("#western_medicine_name").focus();
|
|
|
+ } else if (id == 'saveWesternMedicine') {
|
|
|
$("#western_medicine_name").focus();
|
|
|
$("#western_medicine_name").click();
|
|
|
- currentEleId = 'western_medicine_name';
|
|
|
}
|
|
|
- else if (currentEleId == 'chargeUnit') {
|
|
|
+ else if (id == 'chargeUnit') {
|
|
|
$("#itemQuantity").focus();
|
|
|
- currentEleId = 'itemQuantity';
|
|
|
- } else if (currentEleId == 'itemQuantity' || currentEleId == 'jyZdSample' || currentEleId == 'yshPart') {
|
|
|
+ } else if (id == 'itemQuantity' || id == 'jyZdSample' || id == 'yshPart') {
|
|
|
$("#execUnit").next().click();
|
|
|
- currentEleId = 'execUnit';
|
|
|
- } else if (currentEleId == 'execUnit') {
|
|
|
+ } else if (id == 'execUnit') {
|
|
|
$("#remark").focus();
|
|
|
- currentEleId = 'remark';
|
|
|
- } else if (currentEleId == 'remark') {
|
|
|
+ } else if (id == 'remark') {
|
|
|
saveJyJcItem(true);
|
|
|
- currentEleId = 'saveJyJcItem';
|
|
|
- } else if (currentEleId == 'saveJyJcItem') {
|
|
|
+ } else if (id == 'saveJyJcItem') {
|
|
|
$("#jcJyItem").focus();
|
|
|
$("#jcJyItem").click();
|
|
|
- currentEleId = 'jcJyItem';
|
|
|
- }
|
|
|
- else if (currentEleId == 'freeBedNum') {
|
|
|
+ }else if (id == 'freeBedNum') {
|
|
|
$("#inpatientWardBeHospitalized").next().click();
|
|
|
- currentEleId = 'inpatientWardBeHospitalized';
|
|
|
- } else if (currentEleId == 'inpatientWardBeHospitalized') {
|
|
|
+ } else if (id == 'inpatientWardBeHospitalized') {
|
|
|
$("#smallWardBeHospitalized").next().click();
|
|
|
- currentEleId = 'smallWardBeHospitalized';
|
|
|
- } else if (currentEleId == 'smallWardBeHospitalized') {
|
|
|
+ } else if (id == 'smallWardBeHospitalized') {
|
|
|
$("#admissStatus").next().click();
|
|
|
- currentEleId = 'admissStatus';
|
|
|
- } else if (currentEleId == 'admissStatus') {
|
|
|
+ } else if (id == 'admissStatus') {
|
|
|
saveZyReq(true);
|
|
|
- currentEleId = "freeBedNum";
|
|
|
+ }else if (id == 'western_medicine_name') {
|
|
|
+ $("#western_medicine_name").click();
|
|
|
+ }else if (id == 'chinese_medicine_name') {
|
|
|
+ $("#chinese_medicine_name").click();
|
|
|
+ }else if (id == 'jcJyItem') {
|
|
|
+ $("#jcJyItem").click();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -3354,18 +3359,18 @@ function billItemButtonChange(object, objectIndex) {
|
|
|
$("#jcJyItem").webuiPopover('hide');
|
|
|
if (objectIndex == 0) {
|
|
|
$("#western_medicine_name").focus();
|
|
|
- $("#western_medicine_name").click();
|
|
|
- currentEleId = 'western_medicine_name';
|
|
|
+ // $("#western_medicine_name").click();
|
|
|
+ // currentEleId = 'western_medicine_name';
|
|
|
} else if (objectIndex == 1) {
|
|
|
$("#chinese_medicine_name").focus();
|
|
|
- $("#chinese_medicine_name").click();
|
|
|
- currentEleId = 'chinese_medicine_name';
|
|
|
+ // $("#chinese_medicine_name").click();
|
|
|
+ // currentEleId = 'chinese_medicine_name';
|
|
|
} else if (objectIndex == 2) {
|
|
|
$("#jcJyItem").focus();
|
|
|
- $("#jcJyItem").click();
|
|
|
- currentEleId = 'jcJyItem';
|
|
|
+ // $("#jcJyItem").click();
|
|
|
+ // currentEleId = 'jcJyItem';
|
|
|
} else if (objectIndex == 3) {
|
|
|
- currentEleId = 'freeBedNum';
|
|
|
+ // currentEleId = 'freeBedNum';
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -4322,7 +4327,6 @@ function checkYpInfo(code, serial, groupNo, needNotice) {
|
|
|
// else if(groupNo=='151'){
|
|
|
// cfdesc='诊疗';
|
|
|
// }
|
|
|
- $("#xyTab li.active").find("a").find("small.cfdesc").text("(" + cfdesc + ")");
|
|
|
//每个处方不能超过5个药品
|
|
|
var tableId = $("#xyTab li.active").find("a").attr("href");
|
|
|
var childrens = $(tableId).find("div:eq(0)").children().length;
|
|
@@ -4383,12 +4387,13 @@ function checkYpInfo(code, serial, groupNo, needNotice) {
|
|
|
}
|
|
|
//当前编辑的处方非普通西药处方
|
|
|
} else {
|
|
|
+ $("#xyTab li.active").find("a").find("small.cfdesc").text("(" + cfdesc + ")");
|
|
|
fitWesternMedicine(res, groupNo);
|
|
|
}
|
|
|
if (needNotice) {
|
|
|
//选中药品后,光标默认到用法
|
|
|
$("#supplyType").next().click();
|
|
|
- currentEleId = 'supplyType';
|
|
|
+ // currentEleId = 'supplyType';
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
@@ -4438,7 +4443,7 @@ function checkZyInfo(code, serial, async) {
|
|
|
if (async) {
|
|
|
//选中药品后,光标默认到数量输入框
|
|
|
$("#zy_drugWin").focus();
|
|
|
- currentEleId = 'zy_drugWin';
|
|
|
+ // currentEleId = 'zy_drugWin';
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
@@ -4557,7 +4562,7 @@ function loadjcJyItemList() {
|
|
|
$("#itemQuantityDiv").removeClass("hide").addClass("in");
|
|
|
$("#itemQuantity").val(1);
|
|
|
$("#chargeUnit").focus();
|
|
|
- currentEleId = 'chargeUnit';
|
|
|
+ // currentEleId = 'chargeUnit';
|
|
|
return;
|
|
|
}
|
|
|
if (row.type == 1) {
|
|
@@ -4632,10 +4637,10 @@ function checkJcJyItemInfo(code, name, type, async) {
|
|
|
if (type == 1) {
|
|
|
//选中项目后,光标默认到数量输入框
|
|
|
$("#jyZdSample").next().click();
|
|
|
- currentEleId = 'jyZdSample';
|
|
|
+ // currentEleId = 'jyZdSample';
|
|
|
} else if (type == 2) {
|
|
|
$("#yshPart").next().click();
|
|
|
- currentEleId = 'yshPart';
|
|
|
+ // currentEleId = 'yshPart';
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -4902,7 +4907,7 @@ function initNavTabs(index) {
|
|
|
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"' +
|
|
|
+ ' <input type="text" class="form-control my_label_input_2 zyfs" id="zyfs"' +
|
|
|
' placeholder="请输入" style="padding-left: 10px;" onchange="calculateZyAmount()">' +
|
|
|
' </div>';
|
|
|
html += '<div style="width: 130px;float: left;">' +
|