|
@@ -111,7 +111,7 @@ $(function () {
|
|
|
$("#seeIdCard").on("click", function (t) {
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
- url: '/thmz/getPatientMiSfzByPatientId?patientId='+$("#patientId").val(),
|
|
|
+ url: '/thmz/getPatientMiSfzByPatientId?patientId=' + $("#patientId").val(),
|
|
|
contentType: "application/json;charset=UTF-8",
|
|
|
dataType: "json",
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
@@ -121,8 +121,8 @@ $(function () {
|
|
|
return;
|
|
|
}
|
|
|
if (res.code == 0) {
|
|
|
- $("#seeIdCardModal").modal("show");
|
|
|
- $("#idCardImage").attr("src","data:image/jpeg;base64,"+res.data.sfzImage);
|
|
|
+ $("#seeIdCardModal").modal("show");
|
|
|
+ $("#idCardImage").attr("src", "data:image/jpeg;base64," + res.data.sfzImage);
|
|
|
} else {
|
|
|
errorMesage(res);
|
|
|
}
|
|
@@ -419,8 +419,8 @@ function queryUserInfoByCardNo() {
|
|
|
$("#saveUser").show();
|
|
|
$("#clearRegistration").show();
|
|
|
}
|
|
|
- $('#provinceUpdateHome').selectpicker('val', res.data.provinceCode);
|
|
|
- $('#provinceUpdateHome').selectpicker('refresh');
|
|
|
+ $('#provinceCode').selectpicker('val', res.data.provinceCode);
|
|
|
+ $('#provinceCode').selectpicker('refresh');
|
|
|
initCity(4, res.data.cityCode);
|
|
|
initDistrict(4, res.data.cityCode, res.data.districtCode);
|
|
|
|
|
@@ -469,13 +469,13 @@ function queryUserInfoByCardNo() {
|
|
|
window.location.href = '/thmz/login/view'
|
|
|
return;
|
|
|
}
|
|
|
- if (resAp.code == 0) {
|
|
|
- var birthPlace=resAp.data.birthPlace;
|
|
|
- if(birthPlace!=null){
|
|
|
- var provinceCode=birthPlace.slice(0,2)+"0000";
|
|
|
- $("#provinceCode").selectpicker('val',provinceCode);
|
|
|
+ if (resAp.code == 0 && resAp.data != null) {
|
|
|
+ var birthPlace = resAp.data.birthPlace;
|
|
|
+ if (birthPlace != null) {
|
|
|
+ var provinceCode = birthPlace.slice(0, 2) + "0000";
|
|
|
+ $("#provinceCode").selectpicker('val', provinceCode);
|
|
|
$("#provinceCode").selectpicker('refresh');
|
|
|
- var cityCode=birthPlace.slice(0,4)+"00";
|
|
|
+ var cityCode = birthPlace.slice(0, 4) + "00";
|
|
|
initCity(1, cityCode);
|
|
|
initDistrict(1, cityCode, birthPlace);
|
|
|
}
|
|
@@ -500,13 +500,16 @@ function queryUserInfoByCardNo() {
|
|
|
$("#idCard").blur();
|
|
|
$("#admissionNumber").val(resAp.data.inpatientNo);
|
|
|
//验证当前病人是不是在院病人
|
|
|
- if(resAp.data.inpatientNo!=null && resAp.data.inpatientNo!=""){
|
|
|
+ if (resAp.data.inpatientNo != null && resAp.data.inpatientNo != "") {
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
url: '/thmz/getCountByInpatientNo?inpatientNo=' + resAp.data.inpatientNo,
|
|
|
contentType: "application/json;charset=UTF-8",
|
|
|
dataType: "json",
|
|
|
- headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
+ headers: {
|
|
|
+ 'Accept': 'application/json',
|
|
|
+ 'Authorization': 'Bearer ' + localStorage.getItem("token")
|
|
|
+ },
|
|
|
success: function (res) {
|
|
|
if (res == '401' || res == 401) {
|
|
|
window.location.href = '/thmz/login/view'
|
|
@@ -668,7 +671,7 @@ function initListSelect() {
|
|
|
initReqDoctorSelect()
|
|
|
initCountrySelect();
|
|
|
initNationSelect();
|
|
|
- // initDistrictSelect();
|
|
|
+ // initDistrictSelect();
|
|
|
initRelationSelect();
|
|
|
initOccupationSelect();
|
|
|
iniAdmissStatus();
|
|
@@ -993,6 +996,20 @@ function clearInput() {
|
|
|
$("#admissStatus").val(null);
|
|
|
$('#certificateType').selectpicker('val', '01');
|
|
|
$('#certificateType').selectpicker('refresh');
|
|
|
+
|
|
|
+ $("#provinceCode").selectpicker('val', -1);
|
|
|
+ $('#provinceCode').selectpicker('destroy').selectpicker('refresh');
|
|
|
+ $("#cityCode").selectpicker('val', -1);
|
|
|
+ $('#cityCode').selectpicker('destroy').selectpicker('refresh');
|
|
|
+ $("#districtCode").selectpicker('val', -1);
|
|
|
+ $('#districtCode').selectpicker('destroy').selectpicker('refresh');
|
|
|
+
|
|
|
+ $("#provinceCodeBorn").selectpicker('val', -1);
|
|
|
+ $('#provinceCodeBorn').selectpicker('destroy').selectpicker('refresh');
|
|
|
+ $("#cityCodeBorn").selectpicker('val', -1);
|
|
|
+ $('#cityCodeBorn').selectpicker('destroy').selectpicker('refresh');
|
|
|
+ $("#districtCodeBorn").selectpicker('val', -1);
|
|
|
+ $('#districtCodeBorn').selectpicker('destroy').selectpicker('refresh');
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1102,7 +1119,7 @@ function saveZyPatient(flag) {
|
|
|
"occupationCode": $("#profession").val(),
|
|
|
"country": $("#nationality").val(),
|
|
|
"nationCode": $("#nation").val(),
|
|
|
- "birthPlace": $("#districtCode").val(),
|
|
|
+ "birthPlace": $("#districtCodeBorn").val(),
|
|
|
"accountStreet": $("#permanentAddress").val(),
|
|
|
"psnCertType": $("#certificateType").val(),
|
|
|
"socialNo": $("#idCard").val(),
|
|
@@ -1114,9 +1131,9 @@ function saveZyPatient(flag) {
|
|
|
"relationTel": $("#contractPhone").val(),
|
|
|
"relationStreet": $("#contractAddress").val(),
|
|
|
"inpatientNoType": getIndex("regi_List_btn_group"),
|
|
|
- "provinceCode": $("#provinceUpdateHome").val(),
|
|
|
- "cityCode": $("#cityUpdateHome").val(),
|
|
|
- "districtCode": $("#countyUpdateHome").val()
|
|
|
+ "provinceCode": $("#provinceCode").val(),
|
|
|
+ "cityCode": $("#cityCode").val(),
|
|
|
+ "districtCode": $("#districtCode").val()
|
|
|
}),
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
success: function (res) {
|
|
@@ -1250,8 +1267,8 @@ function fillPatinet(patientId) {
|
|
|
$("#address").val(res.data.detail);
|
|
|
$("#address").blur();
|
|
|
$("#patientId").val(res.data.patientId);
|
|
|
- $('#provinceUpdateHome').selectpicker('val', res.data.provinceCode);
|
|
|
- $('#provinceUpdateHome').selectpicker('refresh');
|
|
|
+ $('#provinceCode').selectpicker('val', res.data.provinceCode);
|
|
|
+ $('#provinceCode').selectpicker('refresh');
|
|
|
initCity(4, res.data.cityCode);
|
|
|
initDistrict(4, res.data.cityCode, res.data.districtCode);
|
|
|
if (res.data.name != null && res.data.name != "") {
|
|
@@ -1413,3 +1430,19 @@ function siReadCard() {
|
|
|
});
|
|
|
// window.open('ReadCard://'+prm, '_self')
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 复制地址
|
|
|
+ */
|
|
|
+function copyAddress() {
|
|
|
+ if (clipboard != null) {
|
|
|
+ clipboard.destroy();
|
|
|
+ }
|
|
|
+ clipboard = new ClipboardJS('#copyAddress', {
|
|
|
+ text: function (trigger) {
|
|
|
+ alert("复制成功!");
|
|
|
+ return trigger.getAttribute('data-clipboard-text');
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|