|
|
@@ -251,6 +251,9 @@ $(function () {
|
|
|
//初始医生工作太配置
|
|
|
initWorkspaceConfigForCurrent();
|
|
|
initExecUnit();
|
|
|
+ $("#rapidAcceptsUserName").change(function (e) {
|
|
|
+ queryUserInfoByName();
|
|
|
+ });
|
|
|
/**
|
|
|
* 西药点击事件
|
|
|
*/
|
|
|
@@ -1146,6 +1149,44 @@ function initDayNum() {
|
|
|
setSelectDefaultVal('medcDays',1)
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 根据病人姓名查询病人信息
|
|
|
+ */
|
|
|
+function queryUserInfoByName() {
|
|
|
+ var userName = $('#rapidAcceptsUserName').val();
|
|
|
+ // var cardNo=$("#cardNo").val();
|
|
|
+ if (userName == null || userName == "") {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (userName.length > 0) {
|
|
|
+ $.ajax({
|
|
|
+ type: "GET",
|
|
|
+ url: '/thmz/getPatientMiByName?name=' + userName,
|
|
|
+ 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) {
|
|
|
+ fitPatient(res,"icCardNo");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * 按照病人id查询病人信息
|
|
|
+ * @param patientId
|
|
|
+ */
|
|
|
+function fillPatinet(value) {
|
|
|
+ $("#rapidAcceptsUserCardNo").val(value);
|
|
|
+ queryUserInfoByCardNo()
|
|
|
+}
|
|
|
/**
|
|
|
* 下拉框设置默认值
|
|
|
* @param id
|
|
|
@@ -7377,13 +7418,13 @@ function initUserList() {
|
|
|
padding: true,
|
|
|
height: 300,
|
|
|
};
|
|
|
- var webuiPopover = $('#rapidAcceptsUserName').webuiPopover('destroy').webuiPopover(settings);
|
|
|
- //用户姓名选中事件
|
|
|
- $("#rapidAcceptsUserName").on("click", function (t) {
|
|
|
- if ($(webuiPopover).css("display") == "block") {
|
|
|
- refeshPatinetList(true);
|
|
|
- }
|
|
|
- });
|
|
|
+// var webuiPopover = $('#rapidAcceptsUserName').webuiPopover('destroy').webuiPopover(settings);
|
|
|
+// //用户姓名选中事件
|
|
|
+// $("#rapidAcceptsUserName").on("click", function (t) {
|
|
|
+// if ($(webuiPopover).css("display") == "block") {
|
|
|
+// refeshPatinetList(true);
|
|
|
+// }
|
|
|
+// });
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -7414,8 +7455,8 @@ function refeshPatinetList(flag) {
|
|
|
}
|
|
|
if (res.code == 0) {
|
|
|
if (res.data != null && res.data.length > 0) {
|
|
|
- $("#webuiPopover0").css("display", "block");
|
|
|
- $("#webuiPopover0 .webui-popover-content").css("max-height", "300px").css("height", "auto");
|
|
|
+// $("#webuiPopover0").css("display", "block");
|
|
|
+// $("#webuiPopover0 .webui-popover-content").css("max-height", "300px").css("height", "auto");
|
|
|
var html = '<div class="list-group">';
|
|
|
for (var i = 0; i < res.data.length; i++) {
|
|
|
var mzPatientMi = res.data[i];
|
|
|
@@ -7435,14 +7476,14 @@ function refeshPatinetList(flag) {
|
|
|
html += '</div></a>';
|
|
|
}
|
|
|
html += '</div>';
|
|
|
- if (flag) {
|
|
|
- $("#webuiPopover0 div.webui-popover-content").html("");
|
|
|
- }
|
|
|
- $("#webuiPopover0 div.webui-popover-content").append(html);
|
|
|
- $("#webuiPopover0 div.arrow").css("left", "23px");
|
|
|
+// if (flag) {
|
|
|
+// $("#webuiPopover0 div.webui-popover-content").html("");
|
|
|
+// }
|
|
|
+// $("#webuiPopover0 div.webui-popover-content").append(html);
|
|
|
+// $("#webuiPopover0 div.arrow").css("left", "23px");
|
|
|
refeshPatinetListScrollEvent();
|
|
|
} else {
|
|
|
- $("#webuiPopover0").css("display", "none");
|
|
|
+// $("#webuiPopover0").css("display", "none");
|
|
|
}
|
|
|
}
|
|
|
//查询完成,设置加载完成
|
|
|
@@ -7475,7 +7516,7 @@ function refeshPatinetListScrollEvent() {
|
|
|
*/
|
|
|
function fillUnClinicPatinet(patientId) {
|
|
|
$("#rapidAcceptsUserCardNo").val(patientId);
|
|
|
- $("#webuiPopover0").css("display", "none");
|
|
|
+// $("#webuiPopover0").css("display", "none");
|
|
|
queryUserInfoByCardNo();
|
|
|
}
|
|
|
|