|
@ -10,17 +10,19 @@ var request = getRequest(),
|
|
var docInfo = window.localStorage.getItem("docInfo");
|
|
var docInfo = window.localStorage.getItem("docInfo");
|
|
docInfo = JSON.parse(docInfo);
|
|
docInfo = JSON.parse(docInfo);
|
|
|
|
|
|
|
|
var fromTabIdx = tab; // 记录前一个Tab索引,用于返回按钮
|
|
|
|
|
|
//初始tab的链接
|
|
//初始tab的链接
|
|
var links = [{
|
|
var links = [{
|
|
url: 'prescription-consulting.html?sessionId='+sessionId,
|
|
|
|
|
|
url: 'prescription-consulting.html?from=tab&sessionId='+sessionId,
|
|
name: '咨询',
|
|
name: '咨询',
|
|
class: ''
|
|
class: ''
|
|
},{
|
|
},{
|
|
url: 'prescription-detail.html?code='+prescriptionCode,
|
|
|
|
|
|
url: 'prescription-detail.html?from=tab&code='+prescriptionCode,
|
|
name: '续方详情',
|
|
name: '续方详情',
|
|
class: ''
|
|
class: ''
|
|
},{
|
|
},{
|
|
url: 'order-tracking.html?code='+prescriptionCode,
|
|
|
|
|
|
url: 'order-tracking.html?from=tab&code='+prescriptionCode,
|
|
name: '订单跟踪',
|
|
name: '订单跟踪',
|
|
class: '',
|
|
class: '',
|
|
},{
|
|
},{
|
|
@ -32,11 +34,11 @@ var links = [{
|
|
name: '检查检验',
|
|
name: '检查检验',
|
|
class: ''
|
|
class: ''
|
|
},{
|
|
},{
|
|
url: 'jw-prescription-info.html?code='+jwCode+'&patient='+patiCode,
|
|
|
|
|
|
url: 'jw-prescription-info.html?from=tab&code='+jwCode+'&patient='+patiCode,
|
|
name: '诊断/处方',
|
|
name: '诊断/处方',
|
|
class: ''
|
|
class: ''
|
|
},{
|
|
},{
|
|
url: 'prescription-list.html?teamCode='+teamCode+'&patient='+patiCode,
|
|
|
|
|
|
url: 'prescription-list.html?from=tab&teamCode='+teamCode+'&patient='+patiCode,
|
|
name: '历史续方',
|
|
name: '历史续方',
|
|
class: ''
|
|
class: ''
|
|
}];
|
|
}];
|
|
@ -63,13 +65,22 @@ function initPage(){
|
|
$("#tabs").on('click', 'a', function(){
|
|
$("#tabs").on('click', 'a', function(){
|
|
var $this = $(this),
|
|
var $this = $(this),
|
|
$li = $this.parent();
|
|
$li = $this.parent();
|
|
|
|
fromTabIdx = $("#tabs li.active").index();
|
|
$li.siblings().removeClass("active");
|
|
$li.siblings().removeClass("active");
|
|
$li.addClass("active");
|
|
$li.addClass("active");
|
|
tab = $this.data('index');
|
|
tab = $this.data('index');
|
|
parent.document.getElementById('main').src = links[tab].url;
|
|
|
|
|
|
parent.document.getElementById('main').src = links[tab].url+'&from=tab';
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function toPrePrescriptionTab() {
|
|
|
|
if(fromTabIdx!=null && fromTabIdx != undefined) {
|
|
|
|
$("#tabs li").eq(fromTabIdx).find('a').trigger('click')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
top.toPrePrescriptionTab = toPrePrescriptionTab
|
|
|
|
|
|
function getPrescriptionInfo(){
|
|
function getPrescriptionInfo(){
|
|
patiCode = sessionId.split("_")[0];
|
|
patiCode = sessionId.split("_")[0];
|
|
consultCode = sessionId.split("_")[1];
|
|
consultCode = sessionId.split("_")[1];
|
|
@ -111,15 +122,15 @@ function getPrescriptionInfoByCode(){
|
|
|
|
|
|
function updateLinkInfo(){
|
|
function updateLinkInfo(){
|
|
links = [{
|
|
links = [{
|
|
url: 'prescription-consulting.html?sessionId='+sessionId,
|
|
|
|
|
|
url: 'prescription-consulting.html?from=tab&sessionId='+sessionId,
|
|
name: '咨询',
|
|
name: '咨询',
|
|
class: ''
|
|
class: ''
|
|
},{
|
|
},{
|
|
url: 'about:blank',
|
|
|
|
|
|
url: 'prescription-detail.html?from=tab&code='+prescriptionCode,
|
|
name: '续方详情',
|
|
name: '续方详情',
|
|
class: ''
|
|
class: ''
|
|
},{
|
|
},{
|
|
url: 'order-tracking.html?code='+prescriptionCode,
|
|
|
|
|
|
url: 'order-tracking.html?from=tab&code='+prescriptionCode,
|
|
name: '订单跟踪',
|
|
name: '订单跟踪',
|
|
class: '',
|
|
class: '',
|
|
},{
|
|
},{
|
|
@ -131,11 +142,11 @@ function updateLinkInfo(){
|
|
name: '检查检验',
|
|
name: '检查检验',
|
|
class: ''
|
|
class: ''
|
|
},{
|
|
},{
|
|
url: 'jw-prescription-info.html?code='+jwCode+'&patient='+patiCode,
|
|
|
|
|
|
url: 'jw-prescription-info.html?from=tab&code='+jwCode+'&patient='+patiCode,
|
|
name: '诊断/处方',
|
|
name: '诊断/处方',
|
|
class: ''
|
|
class: ''
|
|
},{
|
|
},{
|
|
url: 'prescription-list.html?teamCode='+teamCode+'&patient='+patiCode,
|
|
|
|
|
|
url: 'prescription-list.html?from=tab&teamCode='+teamCode+'&patient='+patiCode,
|
|
name: '历史续方',
|
|
name: '历史续方',
|
|
class: ''
|
|
class: ''
|
|
}];
|
|
}];
|