Commit 9d5299df by zujiaozhang

'修改医保类型单独请求更新'

parent 5fcce77e
...@@ -50,9 +50,9 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { ...@@ -50,9 +50,9 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) {
"adminId":index.adminId "adminId":index.adminId
}, },
success: function(res) { success: function(res) {
if(res.content.followUpUser.status=='1' && index.adminId==''){ // if(res.content.followUpUser.status=='1' && index.adminId==''){
medtap.pushWindow('pages/questionnaireDetails.html?followUpId='+index.followUpId) // medtap.pushWindow('pages/questionnaireDetails.html?followUpId='+index.followUpId)
} // }
index.followUpId =res.content.followUpUser.id index.followUpId =res.content.followUpUser.id
var mm = res.content.followUpUser.answerTime var mm = res.content.followUpUser.answerTime
$('.mouth_title span').text(mm.split("-")[1]) $('.mouth_title span').text(mm.split("-")[1])
......
...@@ -44,6 +44,23 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) {  ...@@ -44,6 +44,23 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
isNextVal: '', isNextVal: '',
// 描述方案 // 描述方案
programme:'', programme:'',
// 省id
provinceId:'',
// 城市id
cityId: '',
// 医保类型数据
healthInsuranceType:{
HT1: '城镇职工基本医疗保险',
HT2: '城镇居民基本医疗保险',
HT3: '新型农村合作医疗',
HT4: '商业医疗保险',
HT5: '全自费',
HT6: '全公费',
HT7: '贫困救助',
HT8: '其他社会保险',
},
// 医保类型
healthVla:'',
init: function(){ init: function(){
// 解决键盘收起页面不恢复问题 // 解决键盘收起页面不恢复问题
$('textarea').on('blur',function(){ $('textarea').on('blur',function(){
...@@ -62,7 +79,6 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) {  ...@@ -62,7 +79,6 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
// 用户点击了有 // 用户点击了有
$('.has').on('tap',function(){ $('.has').on('tap',function(){
targetedTherapy.flag=true targetedTherapy.flag=true
console.log(targetedTherapy.flag)
}) })
// 点击下一题 // 点击下一题
...@@ -115,6 +131,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) {  ...@@ -115,6 +131,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
"followUpId": targetedTherapy.followUpId "followUpId": targetedTherapy.followUpId
} }
targetedTherapy.getNextQuestion(dataHas,hasUrl) targetedTherapy.getNextQuestion(dataHas,hasUrl)
targetedTherapy.updatePatientInfo()
// else 为选择 ‘无’ 时判断必填项 // else 为选择 ‘无’ 时判断必填项
}else{ }else{
targetedTherapy.stopTimeVal = $.trim($('.input_item_stopTime').val()) targetedTherapy.stopTimeVal = $.trim($('.input_item_stopTime').val())
...@@ -177,7 +194,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) {  ...@@ -177,7 +194,7 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
targetedTherapy.initstopCausepicker(); targetedTherapy.initstopCausepicker();
targetedTherapy.initisNextpicker(); targetedTherapy.initisNextpicker();
targetedTherapy.selectItems(); targetedTherapy.selectItems();
targetedTherapy.getPatientInfo();
}, },
// ---------- 有 --------- // ---------- 有 ---------
// 初始化drugTypesPicker // 初始化drugTypesPicker
...@@ -241,7 +258,6 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) {  ...@@ -241,7 +258,6 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
return obj[param] || ''; return obj[param] || '';
}; };
//----------------------------------------- //-----------------------------------------
// //级联示例
targetedTherapy.cityPicker = new mui.PopPicker({ targetedTherapy.cityPicker = new mui.PopPicker({
layer: 2 layer: 2
}); });
...@@ -335,12 +351,15 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) {  ...@@ -335,12 +351,15 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
// 点击医保所在城市选择 // 点击医保所在城市选择
$('.input_item_city').click(function(){ $('.input_item_city').click(function(){
targetedTherapy.cityPicker.show(function (Items) { targetedTherapy.cityPicker.show(function (Items) {
targetedTherapy.provinceId=Items[0].value
targetedTherapy.cityId=Items[1].value
$('.input_item_city').val(Items[0].text+Items[1].text) $('.input_item_city').val(Items[0].text+Items[1].text)
}) })
}) })
// 点击医保类型 // 点击医保类型
$('.content_body_medicalType').click(function(){ $('.content_body_medicalType').click(function(){
targetedTherapy.medicalTypePicker.show(function (Items) { targetedTherapy.medicalTypePicker.show(function (Items) {
targetedTherapy.healthVla = Items[0].value
$('.input_item_medicalType').val(Items[0].text) $('.input_item_medicalType').val(Items[0].text)
}) })
}) })
...@@ -372,6 +391,44 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) {  ...@@ -372,6 +391,44 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
}) })
}) })
}, },
// 获取医保信息
getPatientInfo: function(){
medtap.submitAjax({
url: 'https://testdevgw.medtap.cn/user/patientEMR/getPatientInfo',
type: 'post',
async: false,
contentType: 'application/json',
data: {
},
success: function(res) {
console.log(res)
if(!res.success) return medtap.winPop('获取数据失败')
targetedTherapy.provinceId=res.content.patientEMRResult.areaItem.pid
targetedTherapy.cityId=res.content.patientEMRResult.areaItem.cityId
$('.input_item_city').val(res.content.patientEMRResult.areaItem.fullName||'')
var medicalT = targetedTherapy.healthInsuranceType[res.content.patientEMRResult.healthInsuranceType]
$('.input_item_medicalType').val(medicalT||'')
}
})
},
// 更新医保信息
updatePatientInfo: function(){
medtap.submitAjax({
url: 'https://testdevgw.medtap.cn/user/patientEMR/updatePatientInfo',
type: 'post',
async: false,
contentType: 'application/json',
data: {
"provinceId":targetedTherapy.provinceId||'',
"cityId": targetedTherapy.cityId||'',
"healthInsuranceType":targetedTherapy.healthVla||''
},
success: function(res) {
console.log(res)
}
})
},
// 获取问题答案 // 获取问题答案
getQuestionAnswer: function(){ getQuestionAnswer: function(){
var crm = targetedTherapy.adminId==''? '':'/crm' var crm = targetedTherapy.adminId==''? '':'/crm'
...@@ -401,13 +458,9 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) {  ...@@ -401,13 +458,9 @@ define(['zepto', 'medtap', 'mui', 'mui.picker'], function($, medtap, mui) { 
$('.content_body_reimbursement').show() $('.content_body_reimbursement').show()
} }
$('.input_item_drugTypes').val(res.content.followAnswer.answer.drugTypesVal||'') $('.input_item_drugTypes').val(res.content.followAnswer.answer.drugTypesVal||'')
$('.input_item_reimbursement').val(res.content.followAnswer.answer.reimbursementVal||'') $('.input_item_reimbursement').val(res.content.followAnswer.answer.reimbursementVal||'')
$('.input_item_drugCost').val(res.content.followAnswer.answer.drugCostVal||'') $('.input_item_drugCost').val(res.content.followAnswer.answer.drugCostVal||'')
$('.input_item_city').val(res.content.followAnswer.answer.cityVal||'')
$('.input_item_medicalType').val(res.content.followAnswer.answer.medicalType||'')
}else if(status=='0'){ }else if(status=='0'){
// 无 // 无
targetedTherapy.flag=false targetedTherapy.flag=false
$('.noHas').addClass('active').siblings('.has').removeClass('active') $('.noHas').addClass('active').siblings('.has').removeClass('active')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment