|
|
@@ -19,7 +19,7 @@ var gropuIdAndOrderNoMap = null;
|
|
|
//上一个药品大类
|
|
|
//var prevCategoriesFlag = null;
|
|
|
//处方回调和修改的时候处方号与处方tab的关系
|
|
|
-var orderNoAndTableIdMap=null;
|
|
|
+var orderNoAndTableIdMap = null;
|
|
|
$(function () {
|
|
|
initGenderSelect();
|
|
|
iniAdmissStatus();
|
|
|
@@ -614,7 +614,7 @@ $(function () {
|
|
|
$("#zlExecUnit").selectpicker('refresh');
|
|
|
//诊疗
|
|
|
if ($("#zlTab").find("li") == null || $("#zlTab").find("li").length == 0) {
|
|
|
- initNavTabs(3,null,null);
|
|
|
+ initNavTabs(3, null, null);
|
|
|
}
|
|
|
$("#zlItem").val(trData.name);
|
|
|
$("#zlItem").blur();
|
|
|
@@ -788,8 +788,31 @@ $(function () {
|
|
|
* 快速接诊页面 -未挂号患者信息查询处编辑患者信息
|
|
|
*/
|
|
|
$("#rapidAcceptsEditUser").on("click", function (t) {
|
|
|
- editUserModal($("#rapidAcceptsUserCode").val(),2);
|
|
|
+ editUserModal($("#rapidAcceptsUserCode").val(), 2);
|
|
|
});
|
|
|
+
|
|
|
+
|
|
|
+ //监听滚动停止处理逻辑开始
|
|
|
+ let t1 = 0;
|
|
|
+ let t2 = 0;
|
|
|
+ let timer = null; // 定时器
|
|
|
+ $("#scroll-wrap").on("scroll", function () {
|
|
|
+ // 滚动
|
|
|
+ clearTimeout(timer)
|
|
|
+ timer = setTimeout(isScrollEnd, 100)
|
|
|
+ t1 = $("#scroll-wrap").scrollTop();
|
|
|
+ })
|
|
|
+ function isScrollEnd() {
|
|
|
+ t2 = $("#scroll-wrap").scrollTop();
|
|
|
+ if (t2 == t1) {
|
|
|
+ clearTimeout(timer)
|
|
|
+ closeObjectWebui(true);
|
|
|
+ console.log("滚动停止", t2) // 这里处理
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //监听滚动停止处理逻辑结束
|
|
|
+
|
|
|
+
|
|
|
});
|
|
|
|
|
|
|
|
|
@@ -916,11 +939,38 @@ function closePopover() {
|
|
|
$("#box-arrow-left").click();
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 关闭项目选择框
|
|
|
+ * ReOpen 是否重新打开 true 打开 false 不打开
|
|
|
+ */
|
|
|
+function closeObjectWebui(ReOpen) {
|
|
|
+ var index = getIndex("bill_item_group");
|
|
|
+ var currentCode = "western_medicine_name";
|
|
|
+ if (index == 1) {
|
|
|
+ currentCode = "chinese_medicine_name";
|
|
|
+ } else if (index == 2) {
|
|
|
+ currentCode = "jcJyItem";
|
|
|
+ } else if (index == 3) {
|
|
|
+ currentCode = "zlItem";
|
|
|
+ }
|
|
|
+ var webuiID = $("#" + currentCode).attr("data-target");
|
|
|
+ if (webuiID != null && webuiID != "null" && webuiID != "") {
|
|
|
+ //选择框打开
|
|
|
+ if ($("#" + webuiID).hasClass("in") || $("#" + webuiID).css("display") == "block") {
|
|
|
+ $("#" + currentCode).click();
|
|
|
+ if (ReOpen) {
|
|
|
+ $("#" + currentCode).click();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
/**
|
|
|
* 加载智能问诊弹框内容
|
|
|
*/
|
|
|
function contentMethod() {
|
|
|
setTimeout(function () {
|
|
|
+ closeObjectWebui(false);
|
|
|
$(".popover div.arrow").css("display", "none");
|
|
|
var popoverId = $("#box-arrow-left").attr("aria-describedby");
|
|
|
if (popoverId == undefined) {
|
|
|
@@ -1751,7 +1801,7 @@ function setMzPatientInfo(mzPatientMi) {
|
|
|
}
|
|
|
if (res.code == 0) {
|
|
|
//当前患者就诊科室编码
|
|
|
- localStorage.setItem("currentDeptNo",res.data);
|
|
|
+ localStorage.setItem("currentDeptNo", res.data);
|
|
|
} else if (res.code == -1) {
|
|
|
errorMesage(res);
|
|
|
}
|
|
|
@@ -2412,6 +2462,7 @@ function prescriptionJmblChosice(obj) {
|
|
|
* @param id
|
|
|
*/
|
|
|
function medicalModelModal(id) {
|
|
|
+ closeObjectWebui(false);
|
|
|
//是否默认勾选处方回调
|
|
|
var checkboxFlag = localStorage.getItem("checkboxFlag");
|
|
|
if (checkboxFlag != null && (checkboxFlag == "0" || checkboxFlag == 0)) {
|
|
|
@@ -2556,7 +2607,7 @@ function callBackZlDetail(code, mzChargeDetail) {
|
|
|
if (res.code == 0) {
|
|
|
//如果
|
|
|
if ($("#zlTab").find("li") == null || $("#zlTab").find("li").length == 0) {
|
|
|
- initNavTabs(3,null,null);
|
|
|
+ initNavTabs(3, null, null);
|
|
|
}
|
|
|
$("#zlItem").val(res.data.name);
|
|
|
$("#zlItem").blur();
|
|
|
@@ -2859,7 +2910,7 @@ function editPrescription(jsonData, type) {
|
|
|
calculateTotalAmount();
|
|
|
}, 1000);
|
|
|
//清空映射map
|
|
|
- orderNoAndTableIdMap=null;
|
|
|
+ orderNoAndTableIdMap = null;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -3888,7 +3939,7 @@ function editWesternMedicine(obj) {
|
|
|
$("#categoriesFlag").val($(parentObject).find("input.temporary_items_categoriesFlag").val());
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
- url: '/thmz/getYpZdDictByCodeAndSerial?code=' + code + "&serial=" + serial+"&deptNo="+localStorage.getItem("currentDeptNo"),
|
|
|
+ url: '/thmz/getYpZdDictByCodeAndSerial?code=' + code + "&serial=" + serial + "&deptNo=" + localStorage.getItem("currentDeptNo"),
|
|
|
contentType: "application/json;charset=UTF-8",
|
|
|
dataType: "json",
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
@@ -4458,7 +4509,7 @@ function saveZlItemReal(calculateTotalAmountFlag) {
|
|
|
function saveZyReq(messageFlag) {
|
|
|
//如果
|
|
|
if ($("#zyReqTab").find("li") == null || $("#zyReqTab").find("li").length == 0) {
|
|
|
- initNavTabs(4,null,null);
|
|
|
+ initNavTabs(4, null, null);
|
|
|
}
|
|
|
var tableId = $("#zyReqTab li.active").find("a").attr("href");
|
|
|
//病区编码
|
|
|
@@ -4924,11 +4975,11 @@ function calculateTotalAmount() {
|
|
|
* @param data
|
|
|
* @param type 1 患者详情处编辑 2 快速接诊处编辑 3 就诊详情预览
|
|
|
*/
|
|
|
-function editUserModal(patientId,type) {
|
|
|
- if(type==3){
|
|
|
+function editUserModal(patientId, type) {
|
|
|
+ if (type == 3) {
|
|
|
$("#editUserModalTitle").html("患者档案【预览】");
|
|
|
$("#saveEditUser").removeClass("in").addClass("hide");
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
$("#editUserModalTitle").html("患者档案【修改】");
|
|
|
$("#saveEditUser").removeClass("hide").addClass("in");
|
|
|
}
|
|
|
@@ -5079,8 +5130,8 @@ function queryUserInfoByCardNo() {
|
|
|
$("#rapidAcceptsUserPhoneNum").attr("title", res.data.phoneNo);
|
|
|
$('#rapidAcceptsProvinceCode').selectpicker('val', res.data.provinceCode);
|
|
|
$('#rapidAcceptsProvinceCode').selectpicker('refresh');
|
|
|
- initCity(3,res.data.cityCode);
|
|
|
- initDistrict(3,res.data.cityCode,res.data.districtCode);
|
|
|
+ initCity(3, res.data.cityCode);
|
|
|
+ initDistrict(3, res.data.cityCode, res.data.districtCode);
|
|
|
$("#rapidAcceptsDetail").val(res.data.detail);
|
|
|
$("#rapidAcceptsUserAddress").attr("title", res.data.address);
|
|
|
$("#rapidAcceptsUserAddress").val(res.data.address);
|
|
|
@@ -5983,7 +6034,7 @@ function checkYpInfo(code, serial, groupNo, needNotice, orderNo) {
|
|
|
//$("#treeButton").webuiPopover('hide');
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
- url: '/thmz/getYpZdDictByCodeAndSerial?code=' + code + "&serial=" + serial+"&deptNo="+localStorage.getItem("currentDeptNo"),
|
|
|
+ url: '/thmz/getYpZdDictByCodeAndSerial?code=' + code + "&serial=" + serial + "&deptNo=" + localStorage.getItem("currentDeptNo"),
|
|
|
contentType: "application/json;charset=UTF-8",
|
|
|
dataType: "json",
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
@@ -5997,7 +6048,7 @@ function checkYpInfo(code, serial, groupNo, needNotice, orderNo) {
|
|
|
if (res.data != null) {
|
|
|
//如果
|
|
|
if ($("#xyTab").find("li") == null || $("#xyTab").find("li").length == 0) {
|
|
|
- initNavTabs(0,groupNo,orderNo);
|
|
|
+ initNavTabs(0, groupNo, orderNo);
|
|
|
}
|
|
|
var cfdesc = '普药';
|
|
|
if (groupNo == '91') {
|
|
|
@@ -6020,14 +6071,14 @@ function checkYpInfo(code, serial, groupNo, needNotice, orderNo) {
|
|
|
$("#messageContent").html("单张处方最多只能开具5个药品,是否需要新增处方?");
|
|
|
$("#messageButton").off("click").on("click", function (t) {
|
|
|
$("#messageModal").modal("hide");
|
|
|
- refreshNavTabs(0, groupNo,null);
|
|
|
+ refreshNavTabs(0, groupNo, null);
|
|
|
fitWesternMedicine(res, groupNo);
|
|
|
// //选中药品后,光标默认到用法
|
|
|
// $("#supplyType").next().click();
|
|
|
});
|
|
|
$("#cancelButton").off("click");
|
|
|
} else {
|
|
|
- refreshNavTabs(0, groupNo,null);
|
|
|
+ refreshNavTabs(0, groupNo, null);
|
|
|
fitWesternMedicine(res, groupNo);
|
|
|
}
|
|
|
} else if (currentGroupNo != null && currentGroupNo != '' && groupNo != currentGroupNo) {
|
|
|
@@ -6063,14 +6114,14 @@ function checkYpInfo(code, serial, groupNo, needNotice, orderNo) {
|
|
|
$("#messageContent").html(message);
|
|
|
$("#messageButton").off("click").on("click", function (t) {
|
|
|
$("#messageModal").modal("hide");
|
|
|
- refreshNavTabs(0, groupNo,null);
|
|
|
+ refreshNavTabs(0, groupNo, null);
|
|
|
fitWesternMedicine(res, groupNo);
|
|
|
// //选中药品后,光标默认到用法
|
|
|
// $("#supplyType").next().click();
|
|
|
});
|
|
|
$("#cancelButton").off("click");
|
|
|
} else {
|
|
|
- refreshNavTabs(0, groupNo,null);
|
|
|
+ refreshNavTabs(0, groupNo, null);
|
|
|
fitWesternMedicine(res, groupNo);
|
|
|
}
|
|
|
}
|
|
|
@@ -6081,13 +6132,13 @@ function checkYpInfo(code, serial, groupNo, needNotice, orderNo) {
|
|
|
//西药处方数量
|
|
|
var xyTabLiLength = $("#xyTab li").length;
|
|
|
if (xyTabLiLength < orderNo) {
|
|
|
- var tableId=orderNoAndTableIdMap.get(orderNo);
|
|
|
- if(tableId!=null && tableId!=""){
|
|
|
- //切换处方
|
|
|
- $("#xyTab").find("a[href='#" + tableId + "']").off("click").tab('show');
|
|
|
- }else {
|
|
|
- refreshNavTabs(0, groupNo,orderNo);
|
|
|
- }
|
|
|
+ var tableId = orderNoAndTableIdMap.get(orderNo);
|
|
|
+ if (tableId != null && tableId != "") {
|
|
|
+ //切换处方
|
|
|
+ $("#xyTab").find("a[href='#" + tableId + "']").off("click").tab('show');
|
|
|
+ } else {
|
|
|
+ refreshNavTabs(0, groupNo, orderNo);
|
|
|
+ }
|
|
|
} else {
|
|
|
$("#xyTab li.active").find("a").find("small.cfdesc").text("(" + cfdesc + ")");
|
|
|
}
|
|
|
@@ -6142,7 +6193,7 @@ function checkZyInfo(code, serial, async) {
|
|
|
}
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
- url: '/thmz/getYpZdDictByCodeAndSerial?code=' + code + "&serial=" + serial+"&deptNo="+localStorage.getItem("currentDeptNo"),
|
|
|
+ url: '/thmz/getYpZdDictByCodeAndSerial?code=' + code + "&serial=" + serial + "&deptNo=" + localStorage.getItem("currentDeptNo"),
|
|
|
contentType: "application/json;charset=UTF-8",
|
|
|
dataType: "json",
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
@@ -6157,7 +6208,7 @@ function checkZyInfo(code, serial, async) {
|
|
|
hintProjectSelfPayInfo(res.data.selfpayProp, "药品");
|
|
|
//如果
|
|
|
if ($("#zyTab").find("li") == null || $("#zyTab").find("li").length == 0) {
|
|
|
- initNavTabs(1,null,null);
|
|
|
+ initNavTabs(1, null, null);
|
|
|
//$("input.zyfs").val(1);
|
|
|
}
|
|
|
$("#chinese_medicine_name").val(res.data.name);
|
|
|
@@ -6436,7 +6487,7 @@ function loadZlItemList(event) {
|
|
|
$("#zlExecUnit").selectpicker('refresh');
|
|
|
//诊疗
|
|
|
if ($("#zlTab").find("li") == null || $("#zlTab").find("li").length == 0) {
|
|
|
- initNavTabs(3,null,null);
|
|
|
+ initNavTabs(3, null, null);
|
|
|
}
|
|
|
$("#zlItem").val(row.name);
|
|
|
$("#zlItem").blur();
|
|
|
@@ -6490,7 +6541,7 @@ function checkJcJyItemInfo(code, name, type, async) {
|
|
|
hintProjectSelfPayInfo(res.selfpayProp, type == 1 ? "检验" : "辅助检查");
|
|
|
//如果
|
|
|
if ($("#jcjyTab").find("li") == null || $("#jcjyTab").find("li").length == 0) {
|
|
|
- initNavTabs(2,null,null);
|
|
|
+ initNavTabs(2, null, null);
|
|
|
}
|
|
|
if (name == null) {
|
|
|
name = res.name;
|
|
|
@@ -6747,7 +6798,7 @@ function verifyRepeat(code, serial, chargeUnitCode, index) {
|
|
|
* @param groupNo 初始化时候的药房分类
|
|
|
* @param orderNo 初始化时候的处方组号
|
|
|
*/
|
|
|
-function initNavTabs(index,groupNo,orderNo) {
|
|
|
+function initNavTabs(index, groupNo, orderNo) {
|
|
|
var tabId = null;
|
|
|
var tabContentId = null;
|
|
|
var paneId = null;
|
|
|
@@ -6840,12 +6891,12 @@ function initNavTabs(index,groupNo,orderNo) {
|
|
|
initZySupplyTypes("zy_supplyType_1", false);
|
|
|
|
|
|
}
|
|
|
- if(groupNo!=null && groupNo!=""){
|
|
|
+ if (groupNo != null && groupNo != "") {
|
|
|
//设置当前药品的品类
|
|
|
- $("#"+paneId).find("input.current_groupNo").val(groupNo);
|
|
|
+ $("#" + paneId).find("input.current_groupNo").val(groupNo);
|
|
|
}
|
|
|
- if(orderNo!=null && orderNo!="" && orderNoAndTableIdMap!=null){
|
|
|
- orderNoAndTableIdMap.put(orderNo,paneId);
|
|
|
+ if (orderNo != null && orderNo != "" && orderNoAndTableIdMap != null) {
|
|
|
+ orderNoAndTableIdMap.put(orderNo, paneId);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -6899,7 +6950,7 @@ function clearNavTabs(index) {
|
|
|
* @param groupNo 71 普通西药 91 医材 111 麻、精一 131 精二 151 诊疗
|
|
|
* @param orderNo 处方号
|
|
|
*/
|
|
|
-function refreshNavTabs(index, groupNo,orderNo) {
|
|
|
+function refreshNavTabs(index, groupNo, orderNo) {
|
|
|
var tabId = null;
|
|
|
var tabContentId = null;
|
|
|
var paneIdPrfix = null;
|
|
|
@@ -6975,12 +7026,12 @@ function refreshNavTabs(index, groupNo,orderNo) {
|
|
|
$("#" + tabContentId).append(html);
|
|
|
//切换处方
|
|
|
$("#" + tabId).find("a[href='#" + paneId + "']").off("click").tab('show');
|
|
|
- if(groupNo!=null && groupNo!=""){
|
|
|
+ if (groupNo != null && groupNo != "") {
|
|
|
//设置当前药品的品类
|
|
|
- $("#"+paneId).find("input.current_groupNo").val(groupNo);
|
|
|
+ $("#" + paneId).find("input.current_groupNo").val(groupNo);
|
|
|
}
|
|
|
- if(orderNo!=null && orderNo!="" && orderNoAndTableIdMap!=null){
|
|
|
- orderNoAndTableIdMap.put(orderNo,paneId);
|
|
|
+ if (orderNo != null && orderNo != "" && orderNoAndTableIdMap != null) {
|
|
|
+ orderNoAndTableIdMap.put(orderNo, paneId);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -7068,7 +7119,7 @@ function fitWesternMedicine(res, groupNo) {
|
|
|
$("#dayNum").selectpicker('val', 1);
|
|
|
$('#dayNum').selectpicker('refresh');
|
|
|
}
|
|
|
- if (($("#supplyType").val() == null || $("#supplyType").val()=="") && res.data.supplyType != null) {
|
|
|
+ if (($("#supplyType").val() == null || $("#supplyType").val() == "") && res.data.supplyType != null) {
|
|
|
// 给药方式 同组药品给药方式相同
|
|
|
$("#supplyType").selectpicker('val', res.data.supplyType);
|
|
|
$('#supplyType').selectpicker('refresh');
|
|
|
@@ -7227,8 +7278,8 @@ function fillPlusPatinet(patinet) {
|
|
|
$("#editUserIdCard").blur();
|
|
|
$('#editUserProvinceCode').selectpicker('val', patinet.provinceCode);
|
|
|
$('#editUserProvinceCode').selectpicker('refresh');
|
|
|
- initCity(2,patinet.cityCode);
|
|
|
- initDistrict(2,patinet.cityCode,patinet.districtCode);
|
|
|
+ initCity(2, patinet.cityCode);
|
|
|
+ initDistrict(2, patinet.cityCode, patinet.districtCode);
|
|
|
$("#editUserDetail").val(patinet.detail);
|
|
|
$("#editUserDetail").blur();
|
|
|
$("#editUserContact").val(patinet.relName);
|
|
|
@@ -7315,10 +7366,10 @@ function clearPlusPatinet() {
|
|
|
$("#editUserDetail").val(null);
|
|
|
$("#editUserContact").val(null);
|
|
|
$("#editUserContactPhone").val(null);
|
|
|
- var openSource=$("#openSource").val();
|
|
|
- if(openSource==2 || openSource=='2'){
|
|
|
+ var openSource = $("#openSource").val();
|
|
|
+ if (openSource == 2 || openSource == '2') {
|
|
|
$("#rapidAcceptsModal").modal();
|
|
|
- }else if(openSource==3 || openSource=='3'){
|
|
|
+ } else if (openSource == 3 || openSource == '3') {
|
|
|
$("#visitingDetailModal").modal();
|
|
|
}
|
|
|
$("#openSource").val(null);
|
|
|
@@ -8031,10 +8082,10 @@ function saveapidAccepts() {
|
|
|
$("#messageButton").off("click").on("click", function (t) {
|
|
|
$("#messageModal").modal("hide");
|
|
|
var jsonData = getParamsForpPrescription(2);
|
|
|
- var operationType=$("#operationType").val();
|
|
|
- var templateId=$("#templateId").val();
|
|
|
- if(operationType==0 || operationType=='0'){
|
|
|
- templateId=null;
|
|
|
+ var operationType = $("#operationType").val();
|
|
|
+ var templateId = $("#templateId").val();
|
|
|
+ if (operationType == 0 || operationType == '0') {
|
|
|
+ templateId = null;
|
|
|
}
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
@@ -8402,6 +8453,7 @@ function prescriptionDetail(patientId, times, clnicId, payMark) {
|
|
|
* @param clinicStatus
|
|
|
*/
|
|
|
function visitingDetailModal(patientId, times, clnicId, clinicStatus) {
|
|
|
+ closeObjectWebui(false);
|
|
|
var payMark = null;
|
|
|
if (clinicStatus == 5) {
|
|
|
payMark = 5;
|
|
|
@@ -9086,10 +9138,10 @@ function printPrescription(patientId, times, clnicId, payMark, printType) {
|
|
|
var cyDj = prescriptionDetailJson.zyPrescription[0].cyDj;
|
|
|
if (cyDj == null || cyDj == "null") {
|
|
|
cyDj = "";
|
|
|
- }else {
|
|
|
- cyDj="("+cyDj+")";
|
|
|
+ } else {
|
|
|
+ cyDj = "(" + cyDj + ")";
|
|
|
}
|
|
|
- html += "<tr><td colspan='3'>每天" + cyMtjs + "剂," + cyJssm + cyJsl + "ml,煮取量" + cyZql + "ml,复煎" + cyFj + "次。分" + cyFfcs + "次" + cyFysm +" "+cyDj+ "。</td></tr>";
|
|
|
+ html += "<tr><td colspan='3'>每天" + cyMtjs + "剂," + cyJssm + cyJsl + "ml,煮取量" + cyZql + "ml,复煎" + cyFj + "次。分" + cyFfcs + "次" + cyFysm + " " + cyDj + "。</td></tr>";
|
|
|
html += "<tr><td colspan='3'> ------(以下空白)------</td></tr>";
|
|
|
if (index > 0) {
|
|
|
LODOP.NewPageA();
|