|
@@ -127,19 +127,12 @@ $(function () {
|
|
|
userNameChange();
|
|
|
//数据校验
|
|
|
init_validator();
|
|
|
- //时间区间
|
|
|
- initMzWorkTime();
|
|
|
+
|
|
|
//初始门诊收银方式下拉选
|
|
|
initChequeType("payType");
|
|
|
//初始修改收费方式 收银方式下拉选
|
|
|
initChequeType("payTypeEditPayMode");
|
|
|
|
|
|
- /**
|
|
|
- * 清空
|
|
|
- */
|
|
|
- $("#clearRegistration").on("click", function (t) {
|
|
|
- clearRegistration();
|
|
|
- });
|
|
|
/**
|
|
|
* 增加收款方式按钮事件
|
|
|
*/
|
|
@@ -152,46 +145,6 @@ $(function () {
|
|
|
payTypeIndex = payTypeIndex + 1;
|
|
|
$("#payTypeIndex").val(payTypeIndex);
|
|
|
});
|
|
|
- // //当ic卡号输入框失去光标后,重置光标到卡号输入框
|
|
|
- // $("#cardNo").blur(function () {
|
|
|
- // var focus = !($("#userName").is(":focus") || $("#age").is(":focus") || $("#birthDay").is(":focus") || $("#phoneNum").is(":focus") || $("#idCard").is(":focus") || $("#address").is(":focus"));
|
|
|
- // if (focus && $("#cardNo").val() == null || $("#cardNo").val() == "") {
|
|
|
- // //默认光标在卡号输入框
|
|
|
- // $("#cardNo").focus();
|
|
|
- // }
|
|
|
- // });
|
|
|
-
|
|
|
-
|
|
|
- // /**
|
|
|
- // * 设置窗口号
|
|
|
- // */
|
|
|
- // $("#editWindows").on("click", function (t) {
|
|
|
- // $.ajax({
|
|
|
- // type: "GET",
|
|
|
- // url: '/thmz/getLastWindowsByCurrentUser',
|
|
|
- // 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) {
|
|
|
- // $("#windowsNum").val(res.data.windowsNo)
|
|
|
- // } else {
|
|
|
- // new PNotify({
|
|
|
- // title: '错误提示',
|
|
|
- // text: res.message,
|
|
|
- // type: 'error',
|
|
|
- // hide: true,
|
|
|
- // styling: 'bootstrap3'
|
|
|
- // });
|
|
|
- // }
|
|
|
- // }
|
|
|
- // });
|
|
|
- // $("#editWindowsModal").modal();
|
|
|
- // });
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -249,10 +202,6 @@ $(function () {
|
|
|
loadTableCount();
|
|
|
loadRegistrationList(true);
|
|
|
|
|
|
- // $("#editPrint").on("click", function (t) {
|
|
|
- // CreatePrinterList();
|
|
|
- // $("#editPrintModal").modal();
|
|
|
- // });
|
|
|
|
|
|
//初始化页面上面的按钮事件
|
|
|
$("#btn_excel").click(function (t) {
|
|
@@ -261,20 +210,6 @@ $(function () {
|
|
|
});
|
|
|
|
|
|
|
|
|
-// function CreatePageList() {
|
|
|
-// LODOP = getLodop();
|
|
|
-// LODOP.PRINT_INITA(6, 0, "92mm", "120mm", "泰和门诊发票打印");
|
|
|
-// //获取纸张大小数,用于进行遍历
|
|
|
-// var strPageSizeList = LODOP.GET_PAGESIZES_LIST($('#printSelect').val(), "\n");
|
|
|
-// var html = "";
|
|
|
-// var arr = strPageSizeList.split("\n");
|
|
|
-// for (var i = 0; i < arr.length; i++) {
|
|
|
-// html += "<option value='" + arr[i] + "'>" + arr[i] + "</option>";
|
|
|
-// }
|
|
|
-// $('#pageSelect').html(html);
|
|
|
-// $('#pageSelect').selectpicker('refresh');
|
|
|
-// }
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
* 初始化性别下拉选
|
|
@@ -363,156 +298,8 @@ function initDeptPlus() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-/**
|
|
|
- * 初始医生下拉选
|
|
|
- * @param ampm 时间段区间
|
|
|
- */
|
|
|
-function initEmployee() {
|
|
|
- //医生列表
|
|
|
- $.ajax({
|
|
|
- type: "GET",
|
|
|
- url: '/thmz/getDoctorCodeByRequestDay?unitCode=' + $('#deptNo').val() + "&m=" + $("#ampm").val() + "&chargeType=" + $("#chargeType").val(),
|
|
|
- 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;
|
|
|
- }
|
|
|
- var html = '';
|
|
|
- var defaultCode = null;
|
|
|
- $.each(res.data, function (commentIndex, comment) {
|
|
|
- html += '<option value="' + comment.employee.employeeCode + '" data-chargeType="' + comment.chargeType + '" data-checkFee="' + comment.checkFee + '" data-mzyRequestId="' + comment.mzyRequestId + '">' + comment.employee.employeeName + '</option>';
|
|
|
- if (res.data.length == 1) {
|
|
|
- //如果只有一个号别,默认选中
|
|
|
- defaultCode = comment.employee.employeeCode;
|
|
|
- }
|
|
|
- });
|
|
|
- $('#doctor').empty();
|
|
|
- $('#doctor').html(html);
|
|
|
- $('#doctor').selectpicker('refresh');
|
|
|
- validator.checkAll($("#regi_form"));
|
|
|
- if (defaultCode != null) {
|
|
|
- //如果有无需选择医生的选项,默认选择
|
|
|
- $('#doctor').selectpicker('val', defaultCode);
|
|
|
- $('#doctor').selectpicker('refresh');
|
|
|
- fitFee();
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-}
|
|
|
|
|
|
|
|
|
-/**
|
|
|
- * 初始门诊时间区间下拉选
|
|
|
- */
|
|
|
-function initMzWorkTime() {
|
|
|
- $.ajax({
|
|
|
- type: "GET",
|
|
|
- url: '/thmz/getMzWorkTime',
|
|
|
- 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;
|
|
|
- }
|
|
|
- var html = '';
|
|
|
- var ampm = null;
|
|
|
- $.each(res.data, function (commentIndex, comment) {
|
|
|
- html += '<option value="' + comment.code + '">' + comment.name + '</option>';
|
|
|
- if (ampm == null || (ampm != "a" && ampm != "p")) {
|
|
|
- var startTime = paseToFullTime(comment.startTime);
|
|
|
- var endTime = paseToFullTime(comment.endTime);
|
|
|
- if (range(startTime, endTime)) {
|
|
|
- ampm = comment.code;
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- $('#ampm').empty(); //清空resText里面的所有内容
|
|
|
- $('#ampm').html(html);
|
|
|
- $('#ampm').selectpicker('refresh');
|
|
|
- $("#ampm").selectpicker('val', ampm);
|
|
|
- $('#ampm').selectpicker('refresh');
|
|
|
- initDeptPlus();
|
|
|
- }
|
|
|
- });
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-/**
|
|
|
- * 初始门诊号别下拉选
|
|
|
- */
|
|
|
-function initChargeType() {
|
|
|
- $.ajax({
|
|
|
- type: "GET",
|
|
|
- url: '/thmz/getChargeTypeByRequestDay?unitCode=' + $('#deptNo').val() + "&m=" + $("#ampm").val(),
|
|
|
- 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;
|
|
|
- }
|
|
|
- var html = '';
|
|
|
- var defaultCode = null;
|
|
|
- $.each(res.data, function (commentIndex, comment) {
|
|
|
- if (res.data.length == 1) {
|
|
|
- //如果只有一个号别,默认选中
|
|
|
- defaultCode = comment.code;
|
|
|
- }
|
|
|
- html += '<option value="' + comment.code + '">' + comment.name + '</option>';
|
|
|
- });
|
|
|
- $('#chargeType').empty(); //清空resText里面的所有内容
|
|
|
- $('#chargeType').html(html);
|
|
|
- $('#chargeType').selectpicker('refresh');
|
|
|
- if (defaultCode != null) {
|
|
|
- //如果有默认选项,默认选择
|
|
|
- $('#chargeType').selectpicker('val', defaultCode);
|
|
|
- $('#chargeType').selectpicker('refresh');
|
|
|
- initEmployee();
|
|
|
- }
|
|
|
- validator.checkAll($("#regi_form"));
|
|
|
- emptyInput();
|
|
|
- }
|
|
|
- });
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-/**
|
|
|
- * 设置挂号费等费用
|
|
|
- */
|
|
|
-function fitFee() {
|
|
|
- var chargeType = $('#doctor').find("option:selected").attr('data-chargeType');
|
|
|
- var checkFee = $('#doctor').find("option:selected").attr('data-checkFee');
|
|
|
- $("#checkFee").val(checkFee);
|
|
|
- $("#amountMoney").text(checkFee);
|
|
|
- $("#amountMoneyConfirm").text(checkFee);
|
|
|
- $("#realMoney").val(checkFee);
|
|
|
- $("#cash").val(checkFee);
|
|
|
- $("#changeAmount").val(0);
|
|
|
- $.ajax({
|
|
|
- type: "GET",
|
|
|
- url: '/thmz/getMzChargeTypeByCode?code=' + chargeType,
|
|
|
- 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;
|
|
|
- }
|
|
|
- $("#registrationFee").val(res.data.reqFee);
|
|
|
- $("#hospitalFee").val(res.data.clinicFee);
|
|
|
- checkFee = parseFloat(checkFee) + parseFloat(res.data.reqFee) + parseFloat(res.data.clinicFee);
|
|
|
- $("#amountMoney").text(checkFee);
|
|
|
- $("#amountMoneyConfirm").text(checkFee);
|
|
|
- $("#realMoney").val(checkFee);
|
|
|
- $("#cash").val(checkFee);
|
|
|
- validator.checkAll($("#regi_form"));
|
|
|
- }
|
|
|
- });
|
|
|
-}
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
* 初始门诊收银方式下拉选
|
|
@@ -1183,47 +970,6 @@ function setPrint() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-/**
|
|
|
- * 保存病人信息
|
|
|
- */
|
|
|
-function savePatient() {
|
|
|
- $.ajax({
|
|
|
- type: "POST",
|
|
|
- url: '/thmz/savePatient',
|
|
|
- contentType: "application/json;charset=UTF-8",
|
|
|
- dataType: "json",
|
|
|
- data: JSON.stringify({
|
|
|
- "name": $("#userName").val(),
|
|
|
- "age": $("#age").val(),
|
|
|
- "sex": $("#gender").val(),
|
|
|
- "birthDay": $("#birthDay").val(),
|
|
|
- "icCardNo": $("#cardNo").val(),
|
|
|
- "phoneNo": $("#phoneNum").val(),
|
|
|
- "responseType": $("#patientsNature").val(),
|
|
|
- "socialNo": $("#idCard").val(),
|
|
|
- "address": $("#address").val()
|
|
|
- }),
|
|
|
- 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) {
|
|
|
- $("#patientId").val(res.data.patientId);
|
|
|
- saveMzyReqrec();
|
|
|
- } else {
|
|
|
- new PNotify({
|
|
|
- title: '错误提示',
|
|
|
- text: res.message,
|
|
|
- type: 'error',
|
|
|
- hide: true,
|
|
|
- styling: 'bootstrap3'
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-}
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -1272,57 +1018,6 @@ function modifyPatient() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-/**
|
|
|
- * 保存挂号信息
|
|
|
- */
|
|
|
-function saveMzyReqrec() {
|
|
|
- var mzyRequestId = $('#doctor').find("option:selected").attr('data-mzyRequestId');
|
|
|
- var patientId = $("#patientId").val();
|
|
|
- $.ajax({
|
|
|
- type: "POST",
|
|
|
- url: '/thmz/saveMzyReqrec',
|
|
|
- contentType: "application/json;charset=UTF-8",
|
|
|
- dataType: "json",
|
|
|
- data: JSON.stringify({
|
|
|
- "mzyReqrec": {
|
|
|
- "patientId": patientId,
|
|
|
- "ampm": $("#ampm").val(),
|
|
|
- "unitCode": $("#deptNo").val(),
|
|
|
- "chargeType": $("#chargeType").val(),
|
|
|
- "paymode": $("#payType").val()
|
|
|
- }, "responceType": $("#patientsNature").val(), "mzyRequestId": mzyRequestId
|
|
|
- }),
|
|
|
- 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) {
|
|
|
- new PNotify({
|
|
|
- title: '操作提示',
|
|
|
- text: res.message,
|
|
|
- type: 'success',
|
|
|
- hide: true,
|
|
|
- styling: 'bootstrap3'
|
|
|
- });
|
|
|
- $('#confirmFeeModal').modal('hide');
|
|
|
- prn1Print(patientId, -1);
|
|
|
- loadTableCount();
|
|
|
- loadRegistrationList(true);
|
|
|
- clearRegistration();
|
|
|
- } else {
|
|
|
- new PNotify({
|
|
|
- title: '错误提示',
|
|
|
- text: res.message,
|
|
|
- type: 'error',
|
|
|
- hide: true,
|
|
|
- styling: 'bootstrap3'
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-}
|
|
|
|
|
|
/**
|
|
|
* 挂号列表中的科室和医生列表初始化
|
|
@@ -2128,32 +1823,6 @@ function saveBackNo() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-/**
|
|
|
- * 清空挂号信息
|
|
|
- */
|
|
|
-function clearRegistration() {
|
|
|
- $("#cardNo").val(null);
|
|
|
- $("#cardNo").attr("title", null);
|
|
|
- $("#userName").val(null);
|
|
|
- $("#age").val(null);
|
|
|
- $("#gender").selectpicker('val', 1);
|
|
|
- $("#gender").selectpicker('refresh');
|
|
|
- $("#birthDay").val(null);
|
|
|
- $("#birthDay").attr("title", null);
|
|
|
- $("#phoneNum").val(null);
|
|
|
- $("#phoneNum").attr("title", null);
|
|
|
- $("#patientsNature").selectpicker('val', '01');//默认选中
|
|
|
- $('#patientsNature').selectpicker('refresh');
|
|
|
- $("#idCard").val(null);
|
|
|
- $("#idCard").attr("title", null);
|
|
|
- $("#address").val(null);
|
|
|
- $("#patientId").val(null);
|
|
|
- $("#editUser").hide();
|
|
|
- //默认光标在卡号输入框
|
|
|
- $("#cardNo").focus();
|
|
|
- initMzWorkTime();
|
|
|
- readonlyOrNot(false);
|
|
|
-}
|
|
|
|
|
|
|
|
|
/**
|