|
|
|
|
//订单管理操作
|
|
|
|
|
|
|
|
|
|
document.writeln('<style type="text/css">');
|
|
|
|
|
document.writeln('#divMyImg a{ display:block }');
|
|
|
|
|
document.writeln('#divMyImg a>img{ width:700px;margin-top: 5px;}');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
document.writeln('.button{\
|
|
|
|
|
width: 50px;\
|
|
|
|
|
line-height: 38px;\
|
|
|
|
|
text-align: center;\
|
|
|
|
|
font-weight: bold;\
|
|
|
|
|
color: #fff;\
|
|
|
|
|
text-shadow:1px 1px 1px #333;\
|
|
|
|
|
border-radius: 5px;\
|
|
|
|
|
margin:0;\
|
|
|
|
|
position: relative;\
|
|
|
|
|
overflow: hidden;\
|
|
|
|
|
}');
|
|
|
|
|
|
|
|
|
|
document.writeln('.button.red{\
|
|
|
|
|
border:1px solid #b42323;\
|
|
|
|
|
box-shadow: 0 1px 2px #e99494 inset,0 -1px 0 #954b4b inset,0 -2px 3px #e99494 inset;\
|
|
|
|
|
background: -webkit-linear-gradient(top,#d53939,#b92929);\
|
|
|
|
|
background: -moz-linear-gradient(top,#d53939,#b92929);\
|
|
|
|
|
background: linear-gradient(top,#d53939,#b92929);\
|
|
|
|
|
}');
|
|
|
|
|
|
|
|
|
|
document.writeln('.red:hover{\
|
|
|
|
|
background: -webkit-linear-gradient(top,#eb6f6f,#c83c3c);\
|
|
|
|
|
background: -moz-linear-gradient(top,#eb6f6f,#c83c3c);\
|
|
|
|
|
background: linear-gradient(top,#eb6f6f,#c83c3c);\
|
|
|
|
|
}');
|
|
|
|
|
document.writeln('.red:active{\
|
|
|
|
|
top:1px;\
|
|
|
|
|
box-shadow: 0 1px 3px #5b0505 inset,0 3px 0 #fff;\
|
|
|
|
|
background: -webkit-linear-gradient(top,#b11a1a,#bf2626);\
|
|
|
|
|
background: -moz-linear-gradient(top,#b11a1a,#bf2626);\
|
|
|
|
|
background: linear-gradient(top,#b11a1a,#bf2626);\
|
|
|
|
|
}');
|
|
|
|
|
|
|
|
|
|
document.writeln('</style>');
|
|
|
|
|
var n=0;
|
|
|
|
|
$(document).ready(function(){
|
|
|
|
|
$('body').css('background-color','rgb(255, 251, 240)');
|
|
|
|
|
markAdvisor();
|
|
|
|
|
window.t = setInterval(iniMovePic,200);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function iniMovePic(){
|
|
|
|
|
lastObj = $('img:last');
|
|
|
|
|
if(lastObj.size()<1){
|
|
|
|
|
n++;if(n>200){clearTimeout(t);}return;
|
|
|
|
|
}
|
|
|
|
|
if(!lastObj.get(0).complete) {return;}
|
|
|
|
|
if(!lastObj.next().is('.remove')){
|
|
|
|
|
lastObj.after('<span class="remove"><button type="button" class="button red">删除</button></span>')
|
|
|
|
|
}
|
|
|
|
|
clearTimeout(t);
|
|
|
|
|
p = lastObj.position();
|
|
|
|
|
$('.remove').css({left:p.left+25, top:p.top+5, position:'absolute'}).attr('para',lastObj.attr('src'));
|
|
|
|
|
$('.remove').one('click',function(){
|
|
|
|
|
var fname = $(this).attr('para').split('?')[0].split('/')[5].replace('.jpg','');
|
|
|
|
|
$.post('/api/api.php?method=train.movepic&orderid='+fname.split('-')[0]+'&i='+fname.split('-')[1],function(){
|
|
|
|
|
$('img:last').remove();$('.remove').remove();$('#index').val(($('#index').val()-1));
|
|
|
|
|
iniMovePic();
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var toggleLeft =function(){
|
|
|
|
|
var m= parseInt($('#a1111').width());
|
|
|
|
|
var l= $('#a1111').position().left
|
|
|
|
|
if(l>=0){
|
|
|
|
|
$('#a1111').animate({'left':-m+"px"});
|
|
|
|
|
$('#a_1111').animate({'left':-m+"px"});
|
|
|
|
|
}else{
|
|
|
|
|
$('#a1111').animate({'left':0});
|
|
|
|
|
$('#a_1111').animate({'left':0});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function markAdvisor(){
|
|
|
|
|
var COLI_ID = $('.captd').eq(0).text().replace(/[^\d]+/ig,'');
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:'/api/api.asp?method=cht.order.summary&id='+COLI_ID,
|
|
|
|
|
type:"GET",
|
|
|
|
|
dataType:"json",
|
|
|
|
|
success:function(e){
|
|
|
|
|
var oldHTML = $('.captd').eq(0).html();
|
|
|
|
|
var info=e.info[0];
|
|
|
|
|
$('.captd').eq(0).html(oldHTML + ' 团号:' + info.COLI_GroupCode+ ' 外联:'+info.COLI_OPIName);
|
|
|
|
|
colse='<div id="a_1111" style="position: fixed; width: 305px; top: 2px; text-align: right;left: 0px;margin-top: 1px"><span style="border: 1px solid rgb(255, 0, 0); padding: 1px 5px; cursor: pointer;background-color: #fff" onclick="toggleLeft()">关闭</span></div>';
|
|
|
|
|
$('body').append(colse);
|
|
|
|
|
$Str = $('<div id="a1111" style="position: fixed; left: 0px; top: 1px; border: 1px solid rgb(0, 102, 153); padding: 2px; color: rgb(204, 51, 153); font-weight: bold; background-color: rgb(221, 221, 221);max-width: 258px; overflow-y: scroll; height: 100%;"></div>');
|
|
|
|
|
|
|
|
|
|
if(info.COLI_Memo.trim().length>0){
|
|
|
|
|
$Str.append('<span style="background-color: #FFFF00">备注:</span><div style="background-color: #fff; padding:3px; border: 1px solid #aaa"><div>'+info.COLI_Memo+'</div></div>');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for(var i=0;i<info.Detail.length;i++){
|
|
|
|
|
var obj = info.Detail[i];
|
|
|
|
|
$Str.append('<table width="100%" border="1" cellpadding="0" cellspacing="0">\
|
|
|
|
|
<tr>\
|
|
|
|
|
<td colspan="2" bgcolor="#FFFFFF"><div align="left" style="color:#2F9101; font-weight:bolder;font-size: 20px">日期: '+ obj.DepartureDate +'</br>车次: '+obj.FlightsNo +'<br>'+obj.Cabin+'<span style="color:#000"> ¥'+obj.adultcost+'</span></div></td>\
|
|
|
|
|
</tr>\
|
|
|
|
|
<tr>\
|
|
|
|
|
<td><div align="center">'+obj.DepartureCity+'</div></td>\
|
|
|
|
|
<td><div align="center">'+obj.ArrivalCity+'</div></td>\
|
|
|
|
|
</tr>\
|
|
|
|
|
<tr>\
|
|
|
|
|
<td><div align="center">'+obj.DepartureTime+'</div></td>\
|
|
|
|
|
<td><div align="center">'+obj.ArrivalTime+'</div></td>\
|
|
|
|
|
</tr>\
|
|
|
|
|
</table>');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$Str.appendTo('body');
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
error:function(){
|
|
|
|
|
var oldHTML = $('.captd').eq(0).html();
|
|
|
|
|
$('.captd').eq(0).html(oldHTML + ' 外联和团号未知,或者未分配,请刷新页面:');
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//test the img
|
|
|
|
|
function IsExist(url)
|
|
|
|
|
{
|
|
|
|
|
var request = false;
|
|
|
|
|
try {
|
|
|
|
|
request = new XMLHttpRequest();
|
|
|
|
|
} catch (trymicrosoft) {
|
|
|
|
|
try {
|
|
|
|
|
request = new ActiveXObject("Msxml2.XMLHTTP");
|
|
|
|
|
} catch (othermicrosoft) {
|
|
|
|
|
try {
|
|
|
|
|
request = new ActiveXObject("Microsoft.XMLHTTP");
|
|
|
|
|
} catch (failed) {
|
|
|
|
|
request = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
request.open("HEAD",url,false);
|
|
|
|
|
request.send();
|
|
|
|
|
return request.status==200;
|
|
|
|
|
}
|