|
@ -57,6 +57,39 @@ $(function(){
|
|
|
}
|
|
|
})
|
|
|
|
|
|
// 判断是否有体征设备
|
|
|
function judgeDeviceFn() {
|
|
|
var recordDevice = {patient: patiCode, page: 1, pagesize: 1};
|
|
|
bodyRecordApis.getPatientDevice({data: recordDevice}).then(function(res){
|
|
|
if(res.status == 200){
|
|
|
if(res.data.length == 0){
|
|
|
//没有绑定设备
|
|
|
links[3].class="hidden";
|
|
|
initPage();
|
|
|
} else {
|
|
|
judgeRecordFn()
|
|
|
}
|
|
|
}else{
|
|
|
showWarningMsg(res.msg)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
// 判断是否有体征记录
|
|
|
function judgeRecordFn() {
|
|
|
var recordData = {patient: patiCode};
|
|
|
bodyRecordApis.getBodyRecoredLast({data: recordData}).then(function(res){
|
|
|
if(res.status == 200){
|
|
|
if(!res.data.xt || !res.data.xy) {
|
|
|
links[3].class="hidden";
|
|
|
}
|
|
|
initPage();
|
|
|
}else{
|
|
|
showWarningMsg(res.msg)
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
function initPage(){
|
|
|
links[tab].class="active";
|
|
|
var html = template('tab_tmp', {list: links});
|
|
@ -96,7 +129,7 @@ function getPrescriptionInfo(){
|
|
|
if(res.data.status < 50){ //支付成功前不会有订单记录
|
|
|
links[2].class="hidden";
|
|
|
}
|
|
|
initPage();
|
|
|
judgeDeviceFn();
|
|
|
}else{
|
|
|
showWarningMsg(res.msg);
|
|
|
}
|
|
@ -122,7 +155,7 @@ function getPrescriptionInfoByCode(){
|
|
|
if(res.data.prescription.status < 50){ //支付成功前不会有订单记录
|
|
|
links[2].class="hidden";
|
|
|
}
|
|
|
initPage();
|
|
|
judgeDeviceFn
|
|
|
}else{
|
|
|
showWarningMsg(res.msg);
|
|
|
}
|