|
@ -96,9 +96,9 @@
|
|
|
<script type="text/javascript" src="../../../api/rehabilitation-api.js"></script>
|
|
|
<script type="text/javascript" src="../../../api/sign_api.js"></script>
|
|
|
<script type="text/javascript">
|
|
|
var doctorType = (JSON.parse(window.localStorage.getItem('docInfo'))||{}).level
|
|
|
var doctorType = (JSON.parse(window.localStorage.getItem('wlyyAgent'))||{}).level
|
|
|
var httpData=GetRequest()
|
|
|
var docInfo = JSON.parse(window.localStorage.getItem("docInfo"));
|
|
|
var docInfo = JSON.parse(window.localStorage.getItem("wlyyAgent"));
|
|
|
var qrcodeBoxIndex;
|
|
|
console.log(httpData)
|
|
|
function showSuccessMessage(msg) {
|
|
@ -147,7 +147,9 @@
|
|
|
teamListObj: {},
|
|
|
curHealthStatu: '',
|
|
|
emptyText: '暂无数据',
|
|
|
is_sign_specialist: false
|
|
|
is_sign_specialist: false,
|
|
|
is_sign_my: false,
|
|
|
signTeamInfo: {}
|
|
|
},
|
|
|
mounted: function() {
|
|
|
this.getSpecialistTeamList()
|
|
@ -161,15 +163,11 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
signSpecialist: function(is_sign, patientCode){
|
|
|
if(is_sign){ // 已家签
|
|
|
if(patientCode){ // 已签约专科
|
|
|
this.is_sign_specialist = true
|
|
|
this.getPatient(patientCode)
|
|
|
}
|
|
|
} else {
|
|
|
this.patientInfo = undefined
|
|
|
this.emptyText = '患者暂未家签,请先提醒患者完成家庭医生签约'
|
|
|
signSpecialist: function(is_sign_specialist, is_sign_my, patientCode){
|
|
|
this.is_sign_specialist = is_sign_specialist
|
|
|
this.is_sign_my = is_sign_my
|
|
|
if(patientCode){
|
|
|
this.getPatient(patientCode)
|
|
|
}
|
|
|
layer.close(qrcodeBoxIndex)
|
|
|
},
|
|
@ -258,7 +256,7 @@
|
|
|
var vm = this,
|
|
|
loading = layer.load(0, {shade: false})
|
|
|
var params = {
|
|
|
doctor: docInfo.code
|
|
|
doctor: docInfo.uid
|
|
|
}
|
|
|
rehaAPI.getSpecialistTeamList(params).then(function(res){
|
|
|
layer.close(loading)
|
|
@ -359,12 +357,22 @@
|
|
|
$.each(res.data, function(index,item){
|
|
|
if(item.teamCode==vm.curTeamInfo.id){ //签约团队与二维码团队一致
|
|
|
num++
|
|
|
vm.signTeamInfo = item
|
|
|
}
|
|
|
})
|
|
|
if(num>0){
|
|
|
vm.is_sign_specialist = true
|
|
|
if(vm.signTeamInfo&&vm.signTeamInfo.doctor == docInfo.uid){
|
|
|
vm.is_sign_specialist = true
|
|
|
vm.is_sign_my = true
|
|
|
} else {
|
|
|
var text = vm.patientInfo.patientName+"已签约该专科团队【"+vm.signTeamInfo.doctorName+"】医生,请通过原医生创建康复计划"
|
|
|
layer.alert(text, {icon: 5, title: '签约失败'});
|
|
|
vm.is_sign_specialist = true
|
|
|
vm.is_sign_my = false
|
|
|
}
|
|
|
} else {
|
|
|
vm.is_sign_specialist = false
|
|
|
vm.is_sign_my = false
|
|
|
}
|
|
|
} else {
|
|
|
showErrorMessage(res.msg)
|
|
@ -377,7 +385,7 @@
|
|
|
var vm = this,
|
|
|
params = {
|
|
|
patient: data.patient_code,
|
|
|
doctor: docInfo.code,
|
|
|
doctor: docInfo.uid,
|
|
|
patientName: data.patient_name,
|
|
|
doctorName: docInfo.name,
|
|
|
teamCode:data.teamCode
|
|
@ -408,13 +416,20 @@
|
|
|
teamCode: vm.curTeamInfo.id
|
|
|
}).then(function(res){
|
|
|
vm.is_sign_specialist = true
|
|
|
vm.is_sign_my = true
|
|
|
setTimeout(function(){
|
|
|
vm.saveBtn()
|
|
|
}, 500)
|
|
|
})
|
|
|
})
|
|
|
} else {
|
|
|
vm.saveBtn()
|
|
|
if(vm.is_sign_my){
|
|
|
vm.saveBtn()
|
|
|
} else {
|
|
|
var text = vm.patientInfo.patientName+"已签约该专科团队【"+vm.signTeamInfo.doctorName+"】医生,请通过原医生创建康复计划"
|
|
|
layer.alert(text, {icon: 5, title: '签约失败'});
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
saveBtn: function(){
|