|
|
@@ -260,33 +260,7 @@ $(function () {
|
|
|
// });
|
|
|
|
|
|
$("#birthDay").change(function (e) {
|
|
|
- var birthDay = $("#birthDay").val();
|
|
|
- if (birthDay.length == 8 && birthDay.indexOf("-") <= 0) {
|
|
|
- birthDay = birthDay.substring(0, 4) + "-" + birthDay.substring(4, 6) + "-" + birthDay.substring(6);
|
|
|
- $("#birthDay").val(birthDay);
|
|
|
- }
|
|
|
- var dateFormat = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
|
- if (!dateFormat.test(birthDay)) {
|
|
|
- new PNotify({
|
|
|
- title: '错误提示',
|
|
|
- text: '生日日期错误',
|
|
|
- type: 'error',
|
|
|
- hide: true,
|
|
|
- styling: 'bootstrap3'
|
|
|
- });
|
|
|
- }
|
|
|
- var arr = birthDay.split("-");
|
|
|
- if (!checkDate(arr[0], arr[1], arr[2])) {
|
|
|
- new PNotify({
|
|
|
- title: '错误提示',
|
|
|
- text: '生日日期错误',
|
|
|
- type: 'error',
|
|
|
- hide: true,
|
|
|
- styling: 'bootstrap3'
|
|
|
- });
|
|
|
- }
|
|
|
- var returnAge = jsGetAge(birthDay);
|
|
|
- $("#age").val(returnAge);
|
|
|
+ setAge();
|
|
|
$("#age").blur();
|
|
|
});
|
|
|
|
|
|
@@ -586,7 +560,7 @@ function initChargeType() {
|
|
|
* 设置挂号费等费用
|
|
|
*/
|
|
|
function fitFee() {
|
|
|
- var chargeType = $('#doctor').find("option:selected").attr('data-chargeType');
|
|
|
+ var mzyRequestId = $('#doctor').find("option:selected").attr('data-mzyRequestId');
|
|
|
var checkFee = $('#doctor').find("option:selected").attr('data-checkFee');
|
|
|
$("#checkFee").val(checkFee);
|
|
|
$("#amountMoney").text(checkFee);
|
|
|
@@ -596,7 +570,7 @@ function fitFee() {
|
|
|
$("#changeAmount").val(0);
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
- url: '/thmz/getMzChargeTypeByCode?code=' + chargeType,
|
|
|
+ url: '/thmz/getMzChargeTypeByMzyRequestId?mzyRequestId=' + mzyRequestId+"&birthDay="+ $("#birthDay").val(),
|
|
|
dataType: "json",
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
success: function (res) {
|
|
|
@@ -606,7 +580,8 @@ function fitFee() {
|
|
|
}
|
|
|
$("#registrationFee").val(res.data.reqFee);
|
|
|
$("#hospitalFee").val(res.data.clinicFee);
|
|
|
- checkFee = parseFloat(checkFee) + parseFloat(res.data.reqFee) + parseFloat(res.data.clinicFee);
|
|
|
+ $("#othFee").val(res.data.othFee);
|
|
|
+ checkFee = parseFloat(checkFee) + parseFloat(res.data.reqFee) + parseFloat(res.data.clinicFee)+ parseFloat(res.data.othFee);
|
|
|
$("#amountMoney").text(checkFee);
|
|
|
$("#amountMoneyConfirm").text(checkFee);
|
|
|
$("#realMoney").val(checkFee);
|
|
|
@@ -823,6 +798,7 @@ function queryUserInfoByCardNo() {
|
|
|
$("#address").val(res.data.address);
|
|
|
$("#address").blur();
|
|
|
$("#patientId").val(res.data.patientId);
|
|
|
+ setAge();
|
|
|
if (res.data.name != null && res.data.name != "") {
|
|
|
$("#editUser").show();
|
|
|
$("#clearIcCardNo").show();
|
|
|
@@ -1095,6 +1071,7 @@ function fillPatinet(patientId) {
|
|
|
$("#address").val(res.data.address);
|
|
|
$("#address").blur();
|
|
|
$("#patientId").val(res.data.patientId);
|
|
|
+ setAge();
|
|
|
if (res.data.name != null && res.data.name != "") {
|
|
|
$("#editUser").show();
|
|
|
}
|
|
|
@@ -1482,7 +1459,7 @@ function saveMzyReqrec() {
|
|
|
"ampm": $("#ampm").val(),
|
|
|
"unitCode": $("#deptNo").val(),
|
|
|
"chargeType": $("#chargeType").val(),
|
|
|
- "paymode": $("#payType").val()
|
|
|
+ "paymode": $("#payType").val(),
|
|
|
}, "responceType": $("#patientsNature").val(), "mzyRequestId": mzyRequestId
|
|
|
}),
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
@@ -1839,3 +1816,37 @@ function queryUserInfoByName() {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 设置年龄
|
|
|
+ */
|
|
|
+function setAge() {
|
|
|
+ var birthDay = $("#birthDay").val();
|
|
|
+ if (birthDay.length == 8 && birthDay.indexOf("-") <= 0) {
|
|
|
+ birthDay = birthDay.substring(0, 4) + "-" + birthDay.substring(4, 6) + "-" + birthDay.substring(6);
|
|
|
+ $("#birthDay").val(birthDay);
|
|
|
+ }
|
|
|
+ var dateFormat = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
|
+ if (!dateFormat.test(birthDay)) {
|
|
|
+ new PNotify({
|
|
|
+ title: '错误提示',
|
|
|
+ text: '生日日期错误',
|
|
|
+ type: 'error',
|
|
|
+ hide: true,
|
|
|
+ styling: 'bootstrap3'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ var arr = birthDay.split("-");
|
|
|
+ if (!checkDate(arr[0], arr[1], arr[2])) {
|
|
|
+ new PNotify({
|
|
|
+ title: '错误提示',
|
|
|
+ text: '生日日期错误',
|
|
|
+ type: 'error',
|
|
|
+ hide: true,
|
|
|
+ styling: 'bootstrap3'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ var returnAge = jsGetAge(birthDay);
|
|
|
+ $("#age").val(returnAge);
|
|
|
+}
|