|
@@ -38,9 +38,13 @@ var setting = {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-createISSonlineDevice(setting);
|
|
|
-//});
|
|
|
-//});
|
|
|
+try {
|
|
|
+ createISSonlineDevice(setting);
|
|
|
+} catch (e) {
|
|
|
+ console.info("不要用读取身份证");
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
|
|
|
function setCertificateData(result) {
|
|
|
//$("#birthDay").val(result.Certificate.Birthday.replace(/\./g,"-").substr(0,10));
|
|
@@ -66,7 +70,7 @@ function setCertificateData(result) {
|
|
|
//$("#nation").val(result.Certificate.Nation);
|
|
|
//$("#address").val(result.Certificate.Address);
|
|
|
//$("#idAddress").val(result.Certificate.Address);
|
|
|
- $("#copyAddress").attr("data-clipboard-text",result.Certificate.Address);
|
|
|
+ $("#copyAddress").attr("data-clipboard-text", result.Certificate.Address);
|
|
|
$("#copyAddress").show();
|
|
|
try {
|
|
|
$("#imageIdCard").val(result.Certificate.Base64Photo);
|
|
@@ -93,8 +97,8 @@ function setCertificateData(result) {
|
|
|
if (res.code == 0) {
|
|
|
$('#provinceCode').selectpicker('val', res.provinceCode);
|
|
|
$('#provinceCode').selectpicker('refresh');
|
|
|
- initCity(1,res.cityCode);
|
|
|
- initDistrict(1,res.cityCode,res.districtCode);
|
|
|
+ initCity(1, res.cityCode);
|
|
|
+ initDistrict(1, res.cityCode, res.districtCode);
|
|
|
$("#detail").val(res.detail);
|
|
|
} else {
|
|
|
errorMesage(res);
|
|
@@ -407,9 +411,9 @@ function queryUserInfoBySocialNo() {
|
|
|
if (res.code == 0) {
|
|
|
if (res.data != null && res.data.length > 0) {
|
|
|
//如果只有一条数据的时候,直接加载当前病人信息
|
|
|
- if(res.data.length==1){
|
|
|
+ if (res.data.length == 1) {
|
|
|
fillPatinet(res.data[0].patientId);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
fitPatient(res);
|
|
|
}
|
|
|
} else {
|
|
@@ -475,11 +479,11 @@ function fitPatient(res) {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 初始化省份
|
|
|
+ * @param type 1 挂号 2 挂号列表 3 医生工作台
|
|
|
*/
|
|
|
-function initProvince() {
|
|
|
+function initProvince(type) {
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
url: '/thmz/getProvince',
|
|
@@ -494,14 +498,51 @@ function initProvince() {
|
|
|
$.each(res.data, function (commentIndex, comment) {
|
|
|
html += '<option value="' + comment.code + '">' + comment.name + '</option>';
|
|
|
});
|
|
|
- $('#provinceCode').empty(); //清空resText里面的所有内容
|
|
|
- $('#provinceCode').html(html);
|
|
|
- $('#provinceCode').selectpicker('refresh');
|
|
|
- $('#editUserProvinceCode').empty(); //清空resText里面的所有内容
|
|
|
- $('#editUserProvinceCode').html(html);
|
|
|
- $('#editUserProvinceCode').selectpicker('refresh');
|
|
|
- initCity(1,null);
|
|
|
- initCity(2,null);
|
|
|
+ if (type == 1) {
|
|
|
+ $('#provinceCode').empty(); //清空resText里面的所有内容
|
|
|
+ $('#provinceCode').html(html);
|
|
|
+ $('#provinceCode').selectpicker('refresh');
|
|
|
+ $('#provinceCode').selectpicker({
|
|
|
+ dropuAuto: false,
|
|
|
+ size: 5
|
|
|
+ });
|
|
|
+ $('#editUserProvinceCode').empty(); //清空resText里面的所有内容
|
|
|
+ $('#editUserProvinceCode').html(html);
|
|
|
+ $('#editUserProvinceCode').selectpicker('refresh');
|
|
|
+ $('#editUserProvinceCode').selectpicker({
|
|
|
+ dropuAuto: false,
|
|
|
+ size: 5
|
|
|
+ });
|
|
|
+ initCity(1, null);
|
|
|
+ initCity(2, null);
|
|
|
+ } else if (type == 2) {
|
|
|
+ $('#editUserProvinceCode').empty(); //清空resText里面的所有内容
|
|
|
+ $('#editUserProvinceCode').html(html);
|
|
|
+ $('#editUserProvinceCode').selectpicker('refresh');
|
|
|
+ $('#editUserProvinceCode').selectpicker({
|
|
|
+ dropuAuto: false,
|
|
|
+ size: 5
|
|
|
+ });
|
|
|
+ initCity(2, null);
|
|
|
+ } else if (type == 3) {
|
|
|
+ $('#editUserProvinceCode').empty(); //清空resText里面的所有内容
|
|
|
+ $('#editUserProvinceCode').html(html);
|
|
|
+ $('#editUserProvinceCode').selectpicker('refresh');
|
|
|
+ $('#editUserProvinceCode').selectpicker({
|
|
|
+ dropuAuto: false,
|
|
|
+ size: 5
|
|
|
+ });
|
|
|
+ initCity(2, null);
|
|
|
+ $('#rapidAcceptsProvinceCode').empty(); //清空resText里面的所有内容
|
|
|
+ $('#rapidAcceptsProvinceCode').html(html);
|
|
|
+ $('#rapidAcceptsProvinceCode').selectpicker('refresh');
|
|
|
+ $('#rapidAcceptsProvinceCode').selectpicker({
|
|
|
+ dropuAuto: false,
|
|
|
+ size: 5
|
|
|
+ });
|
|
|
+ initCity(3, null);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -509,17 +550,19 @@ function initProvince() {
|
|
|
|
|
|
/**
|
|
|
* 初始化市
|
|
|
- * @param type 1 新增模块 2 修改模块
|
|
|
+ * @param type 1 新增模块 2 修改模块 3 快速接诊
|
|
|
* @param defaultCode 默认选中
|
|
|
*/
|
|
|
-function initCity(type,defaultCode) {
|
|
|
- var parentCode=$("#provinceCode").val();
|
|
|
- if(type==2){
|
|
|
- parentCode=$("#editUserProvinceCode").val();
|
|
|
+function initCity(type, defaultCode) {
|
|
|
+ var parentCode = $("#provinceCode").val();
|
|
|
+ if (type == 2) {
|
|
|
+ parentCode = $("#editUserProvinceCode").val();
|
|
|
+ } else if (type == 3) {
|
|
|
+ parentCode = $("#rapidAcceptsProvinceCode").val();
|
|
|
}
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
- url: '/thmz/getRegionByParentCode?parentCode='+parentCode,
|
|
|
+ url: '/thmz/getRegionByParentCode?parentCode=' + parentCode,
|
|
|
dataType: "json",
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
success: function (res) {
|
|
@@ -531,18 +574,24 @@ function initCity(type,defaultCode) {
|
|
|
$.each(res.data, function (commentIndex, comment) {
|
|
|
html += '<option value="' + comment.code + '">' + comment.name + '</option>';
|
|
|
});
|
|
|
- var id='cityCode';
|
|
|
- if(type==2){
|
|
|
- id='editCityCode';
|
|
|
+ var id = 'cityCode';
|
|
|
+ if (type == 2) {
|
|
|
+ id = 'editCityCode';
|
|
|
+ } else if (type == 3) {
|
|
|
+ id = 'rapidAcceptsCityCode';
|
|
|
}
|
|
|
- $('#'+id).empty(); //清空resText里面的所有内容
|
|
|
- $('#'+id).html(html);
|
|
|
- $('#'+id).selectpicker('refresh');
|
|
|
- if(defaultCode!=null && defaultCode!=""){
|
|
|
- $('#'+id).selectpicker('val', defaultCode);
|
|
|
- $('#'+id).selectpicker('refresh');
|
|
|
- }else {
|
|
|
- initDistrict(type,null,null);
|
|
|
+ $('#' + id).empty(); //清空resText里面的所有内容
|
|
|
+ $('#' + id).html(html);
|
|
|
+ $('#' + id).selectpicker('refresh');
|
|
|
+ $('#' + id).selectpicker({
|
|
|
+ dropuAuto: false,
|
|
|
+ size: 5
|
|
|
+ });
|
|
|
+ if (defaultCode != null && defaultCode != "") {
|
|
|
+ $('#' + id).selectpicker('val', defaultCode);
|
|
|
+ $('#' + id).selectpicker('refresh');
|
|
|
+ } else {
|
|
|
+ initDistrict(type, null, null);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -550,20 +599,22 @@ function initCity(type,defaultCode) {
|
|
|
|
|
|
/**
|
|
|
* 初始化区县
|
|
|
- * @param type 1 新增模块 2 修改模块
|
|
|
+ * @param type 1 新增模块 2 修改模块 3 快速接诊
|
|
|
* @param defaultCityCode 因为需要联动加载,市区域的值
|
|
|
* @param defaultCode 默认选中
|
|
|
*/
|
|
|
-function initDistrict(type,defaultCityCode,defaultCode) {
|
|
|
- if(defaultCityCode==null || defaultCityCode==""){
|
|
|
- defaultCityCode=$("#cityCode").val();
|
|
|
- if(type==2){
|
|
|
- defaultCityCode=$("#editCityCode").val();
|
|
|
+function initDistrict(type, defaultCityCode, defaultCode) {
|
|
|
+ if (defaultCityCode == null || defaultCityCode == "") {
|
|
|
+ defaultCityCode = $("#cityCode").val();
|
|
|
+ if (type == 2) {
|
|
|
+ defaultCityCode = $("#editCityCode").val();
|
|
|
+ } else if (type == 3) {
|
|
|
+ defaultCityCode = $("#rapidAcceptsCityCode").val();
|
|
|
}
|
|
|
}
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
- url: '/thmz/getRegionByParentCode?parentCode='+defaultCityCode,
|
|
|
+ url: '/thmz/getRegionByParentCode?parentCode=' + defaultCityCode,
|
|
|
dataType: "json",
|
|
|
headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
|
|
|
success: function (res) {
|
|
@@ -575,16 +626,22 @@ function initDistrict(type,defaultCityCode,defaultCode) {
|
|
|
$.each(res.data, function (commentIndex, comment) {
|
|
|
html += '<option value="' + comment.code + '">' + comment.name + '</option>';
|
|
|
});
|
|
|
- var id='districtCode';
|
|
|
- if(type==2){
|
|
|
- id='editUserDistrictCode';
|
|
|
+ var id = 'districtCode';
|
|
|
+ if (type == 2) {
|
|
|
+ id = 'editUserDistrictCode';
|
|
|
+ } else if (type == 3) {
|
|
|
+ id = 'rapidAcceptsDistrictCode';
|
|
|
}
|
|
|
- $('#'+id).empty(); //清空resText里面的所有内容
|
|
|
- $('#'+id).html(html);
|
|
|
- $('#'+id).selectpicker('refresh');
|
|
|
- if(defaultCode!=null && defaultCode!=""){
|
|
|
- $('#'+id).selectpicker('val', defaultCode);
|
|
|
- $('#'+id).selectpicker('refresh');
|
|
|
+ $('#' + id).empty(); //清空resText里面的所有内容
|
|
|
+ $('#' + id).html(html);
|
|
|
+ $('#' + id).selectpicker('refresh');
|
|
|
+ $('#' + id).selectpicker({
|
|
|
+ dropuAuto: false,
|
|
|
+ size: 5
|
|
|
+ });
|
|
|
+ if (defaultCode != null && defaultCode != "") {
|
|
|
+ $('#' + id).selectpicker('val', defaultCode);
|
|
|
+ $('#' + id).selectpicker('refresh');
|
|
|
}
|
|
|
}
|
|
|
});
|