7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
473 lines
16 KiB
HTML
473 lines
16 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="renderer" content="webkit">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
|
<title>全国排行-e订通</title>
|
|
<link rel="shortcut icon" type="image/x-icon" href="../favicon.ico" />
|
|
<link rel="stylesheet" href="layuiadmin/layui/css/layui.css">
|
|
<link rel="stylesheet" href="index.css">
|
|
|
|
<!-- universal -->
|
|
<link rel="stylesheet" href="js/universal/universal.css">
|
|
<script src="js/universal/universal.js"></script>
|
|
<!-- viewer js -->
|
|
<link rel="stylesheet" href="js/viewer/viewer.min.css">
|
|
<script src="js/viewer/viewer.min.js"></script>
|
|
<style>
|
|
.search_con_more td{padding:0px;margin:0px;color:#000;}
|
|
#offon{width:300px;}
|
|
#form1_submit{display:none;}
|
|
</style>
|
|
<script src="layuiadmin/layui/layui.js"></script>
|
|
<script src="js/function.js"></script>
|
|
</head>
|
|
<body style="width:100%;background-color:#fff;" >
|
|
<!--搜索-->
|
|
<div class="search">
|
|
<form class="layui-form" id="form1_search" action="ph.htm">
|
|
<div id="form1_search_left">
|
|
<div id="search_xx" style="line-height:45px;"></div>
|
|
</div>
|
|
<button id="form1_submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="form1_submit"> 搜 索 </button>
|
|
</form>
|
|
</div>
|
|
<!--表格-->
|
|
<div id="show-table">
|
|
<table class="layui-table">
|
|
<tbody id="show_table_mid"></tbody>
|
|
</table>
|
|
</div>
|
|
<script>
|
|
|
|
//是否手机端
|
|
var is_mobile="n";
|
|
var index_dk_single="";
|
|
//排行数量变化
|
|
var ms="1";
|
|
if(get_url_param("s_ph_ms")=="ph_ds")
|
|
ms=2;
|
|
function update_yd(khid){
|
|
layui.use('form', function(){
|
|
var $=layui.jquery;
|
|
var form = layui.form;
|
|
//获取预设数据
|
|
var url="./?_m=ph&_a=get_new&khid="+khid+"&ms="+ms+"";
|
|
$.ajax(
|
|
{
|
|
url:url,
|
|
contentType: "application/json",
|
|
method: 'POST',
|
|
success: function (res) {
|
|
var json_data=$.parseJSON(res);
|
|
|
|
//更新父窗口数据
|
|
window.parent.update_yd_param(json_data.zb_client_show,json_data.order_jsje,json_data.order_num,json_data.zb_je,json_data.wcl_je,json_data.zb_js,json_data.wcl_js);
|
|
var color;
|
|
if(ms=="1"){
|
|
if(json_data.ydjsa>=0){
|
|
var html1='<p>'+json_data.ydjsa+'</p>';
|
|
$("#shuliang_"+khid).html(html1);
|
|
}
|
|
if(json_data.ydjea>=0){
|
|
var html2='<p>'+json_data.ydjea+'</p>';
|
|
$("#je_"+khid).html(html2);
|
|
}
|
|
$("#pm_"+khid).html("");
|
|
|
|
if(json_data.ph_my2.length>0){
|
|
var thisph=json_data.ph_my2;
|
|
for(var j=0;j<thisph.length;j++){
|
|
if($("#pm_"+thisph[j].iid).length>0){
|
|
var html2='<p>'+thisph[j].pm+'</p>';
|
|
$("#pm_"+thisph[j].iid).html(html2);
|
|
}
|
|
}
|
|
}
|
|
}else{
|
|
for(var i=0;i<json_data.ds_color.length;i++){
|
|
color=json_data.ds_color[i];
|
|
var obj_ydjs=$(document).find("#shuliang_"+khid+color);
|
|
var obj_ydje=$(document).find("#je_"+khid+color);
|
|
if(obj_ydjs){
|
|
var html1='<p>'+json_data.ds_num[i]+'</p>';
|
|
$("#shuliang_"+khid+"_"+color).html(html1);
|
|
}
|
|
if(obj_ydje){
|
|
var html1='<p>'+json_data.ds_je[i]+'</p>';
|
|
$("#je_"+khid+"_"+color).html(html1);
|
|
}
|
|
$("#pm_"+khid+"_"+color).html("");
|
|
}
|
|
|
|
if(json_data.ds_ph_my2.length>0){
|
|
var thisph=json_data.ds_ph_my2;
|
|
for(var j=0;j<thisph.length;j++){
|
|
if($("#pm_"+thisph[j].iid).length>0){
|
|
var html2='<p>'+thisph[j].pm+'</p>';
|
|
$("#pm_"+thisph[j].iid).html(html2);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
error: function () {
|
|
//
|
|
}
|
|
}
|
|
);
|
|
});
|
|
}
|
|
//单款详情
|
|
function dk_single(id){
|
|
layui.use('layer', function(){
|
|
var layer = parent.layer;
|
|
index_dk_single = layer.open({
|
|
type: 2,
|
|
title: '',
|
|
content: "dk_single.htm?khid="+id+"",
|
|
offset: 'b',
|
|
closeBtn:0,
|
|
anim: 2
|
|
});
|
|
layer.full(index_dk_single);
|
|
});
|
|
}
|
|
function show_kh_pic(kh,pic){
|
|
var obj_div=document.getElementById("div_kh_pic");
|
|
var e=e||window.event;
|
|
var st=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop;
|
|
if(e){
|
|
var t1=e.clientY+st;
|
|
var l1=e.clientX+40;
|
|
t1=e.clientY>350?t1-230:t1;
|
|
}
|
|
t1=t1>0?t1:0;
|
|
l1=l1>0?l1:0;
|
|
obj_div.style.top=t1+"px";
|
|
obj_div.style.left=l1+"px";
|
|
obj_div.innerHTML="<table border='0' cellspacing='0' cellpadding='0' bgcolor='#CCCCCC' style='border:1px solid #000000'><tr><td align='center' height='18'><b>"+kh+"</b></td></tr><tr><td bgcolor='#FFFFFF'><img src=\""+pic+"\"></td></tr><tr><td bgcolor='#FFFFFF' align='center'><a href=\"#\" onmouseover=\"close_div('div_kh_pic')\">关闭</a></td></tr></table>";
|
|
obj_div.style.display="";
|
|
}
|
|
function close_div(div){
|
|
var obj_div=document.getElementById(div);
|
|
obj_div.style.display="none";
|
|
}
|
|
//http://localhost/edt7/ipad/?_m=order_report&_a=openDetail2&kh=12W0101
|
|
function openD(kh,color){
|
|
layui.use(['form','layer','element'],function(){
|
|
var form = layui.form,
|
|
$ = layui.jquery;
|
|
var element = layui.element;
|
|
var layer = layui.layer;
|
|
|
|
var tt="";
|
|
if(color!="" && color!=undefined && color!=null){
|
|
tt=kh+"-"+color+"订单明细";
|
|
color1=color;
|
|
}else{
|
|
tt=kh+"订单明细";
|
|
color1='';
|
|
}
|
|
|
|
var index = layui.layer.open({
|
|
title : tt,
|
|
type : 2,
|
|
offset: '',
|
|
area: ['100%', '600px'],
|
|
content : "order_report_openDetail2.htm?kh="+kh+"&color="+color1,
|
|
success : function(layero, index){
|
|
//
|
|
}
|
|
})
|
|
layer.full(index_dk_single);
|
|
|
|
})
|
|
}
|
|
var arr_dl;
|
|
//取得url传递参数
|
|
var query_str=location.search.substring(1);
|
|
if(query_str)
|
|
query_str="&"+query_str;
|
|
// var is_mobile="n";
|
|
layui.config({
|
|
base: './layuiadmin/'
|
|
}).extend({
|
|
index: 'lib/index'
|
|
}).use(['index', 'user','rate','flow'], function(){
|
|
var $ = layui.$
|
|
,setter = layui.setter
|
|
,admin = layui.admin
|
|
,form = layui.form;
|
|
var rate = layui.rate;
|
|
var flow = layui.flow;
|
|
|
|
flow.load({
|
|
isAuto:true,
|
|
scrollElem:'#show_table_mid',
|
|
elem: '#show_table_mid',
|
|
mb:10,
|
|
end:' ',
|
|
done: function (page, next) {
|
|
|
|
$.ajax(
|
|
{
|
|
url:"./?_m=ph&page="+page+query_str,
|
|
contentType: "application/json",
|
|
method: 'POST',
|
|
async:false,
|
|
success: function (res) {
|
|
var json_data=$.parseJSON(res);
|
|
console.log('排行初始:', json_data)
|
|
var res=$.parseJSON(res);
|
|
// if(json_data.last_path && json_data.last_path=="iphone")
|
|
// is_mobile="y";
|
|
//alert(json_data.ver);
|
|
if(json_data.code==0){
|
|
//------------------本页返回的错误信息
|
|
layer.msg(json_data.msg);
|
|
}else if(json_data.code==1){
|
|
//------------------系统错误
|
|
var msg=json_data.msg;
|
|
var url1="error.htm?msg="+json_data.msg+"&btn_title="+json_data.btn_title+"&btn_url="+json_data.btn_url;
|
|
window.parent.location.href=url1;
|
|
}else if(json_data.code==2){
|
|
//------------------重新登录
|
|
url1="login.htm?error_msg="+json_data.msg;
|
|
window.parent.location.href=url1;
|
|
}else if(json_data.is_ph_state=="nook"){
|
|
next('', page < res.pages);
|
|
$("#search_xx").html("<p style='color:red;font-size:24px;'>排行榜已关闭</p>");
|
|
}else{
|
|
//自定义选项
|
|
var html2='';
|
|
if(res.jzsj)
|
|
html2+="<div class=\"layui-input-inline\" style=\"width:100px\"><input name=\"s_kh\" onblur=\"javascript:form1_search.submit();\" value=\""+res.s_kh+"\" class=\"layui-input\" placeholder=\"输入款号\"><input name=\"s_yph\" onblur=\"javascript:form1_search.submit();\" value=\""+res.s_yph+"\" class=\"layui-input\" placeholder=\"输入圆牌号\"></div><div class=\"layui-input-inline\" style=\"width:10px;\"></div>";
|
|
for(var i=0;i<res.select_qm.length;i++){
|
|
html2+='<div class="layui-input-inline" style="width:100px"><select name="'+res.select_qm[i].no+'" lay-filter="s_is_jd">';
|
|
var op=res.select_qm[i].op;
|
|
for(var j=0;j<op.length;j++){
|
|
html2+='<option value="'+op[j].no+'"';
|
|
if(op[j].no==res.select_qm[i].value)
|
|
html2+='selected';
|
|
html2+='>'+op[j].title+'</option>';
|
|
}
|
|
html2+='</select></div><div class="layui-input-inline" style="width:10px;"></div>';
|
|
}
|
|
for(var i=0;i<res.select_dz.length;i++){
|
|
html2+='<div class="layui-input-inline" style="width:100px"><select name="s_'+res.select_dz[i].no+'" lay-filter="s_is_jd"><option value="">-'+res.select_dz[i].title+'-</option>';
|
|
var op=res.select_dz[i].op;
|
|
for(var j=0;j<op.length;j++){
|
|
html2+='<option value="'+op[j].no+'"';
|
|
if(op[j].no==res.select_dz[i].value)
|
|
html2+='selected';
|
|
html2+='>'+op[j].title+'</option>';
|
|
}
|
|
html2+='</select></div><div class="layui-input-inline" style="width:10px;"></div>';
|
|
}
|
|
for(var i=0;i<res.select_hm.length;i++){
|
|
html2+='<div class="layui-input-inline" style="width:100px"><select name="'+res.select_hm[i].no+'" lay-filter="s_is_jd">';
|
|
var op=res.select_hm[i].op;
|
|
for(var j=0;j<op.length;j++){
|
|
html2+='<option value="'+op[j].no+'"';
|
|
if(op[j].no==res.select_hm[i].value)
|
|
html2+='selected';
|
|
html2+='>'+op[j].title+'</option>';
|
|
}
|
|
html2+='</select></div><div class="layui-input-inline" style="width:10px;"></div>';
|
|
}
|
|
if(res.jzsj)
|
|
html2+=''+res.jzsj+'';
|
|
$("#search_xx").html(html2);
|
|
form.render();
|
|
form.on('select(s_is_jd)', function(data){
|
|
$("#form1_submit").click();
|
|
})
|
|
//1
|
|
var html1="";var html_top="";
|
|
html_top+='<tr>';
|
|
// html_top+='<tr>';
|
|
var huanhang=[];
|
|
for(var i=0;i<json_data.table_top.length;i++){
|
|
huanhang=json_data.table_top[i].split("|");
|
|
if(huanhang.length>1){
|
|
if(huanhang[0]=="this")
|
|
html_top+='<th width="300px" style="min-width: 300px; width: 25%;">'+huanhang[1]+'</th>';
|
|
else
|
|
html_top+='<th>'+huanhang[1]+'</th>';
|
|
}
|
|
else{
|
|
html_top+='<th class="yincang">'+json_data.table_top[i]+'</th>';
|
|
}
|
|
}
|
|
html_top+='</tr>';
|
|
// $("#show_table_top").html(html_top);
|
|
|
|
html1="";
|
|
var lis = [];
|
|
if (page == 1) lis.push(html_top);
|
|
|
|
var str,srca;var idbianhua="";var ms=1;
|
|
for(var i=0;i<json_data.table_mid.length;i++){
|
|
html1="";
|
|
html1+='<tr class="mid_style">';
|
|
for(var j=1;j<json_data.table_mid[i].length;j++){
|
|
if(json_data.table_mid[i][j].indexOf("zhankai")!="-1" || json_data.table_mid[i][j].indexOf("this")!="-1" || json_data.table_mid[i][j].indexOf("color")!="-1" || json_data.table_mid[i][j].indexOf("pma")!="-1" || json_data.table_mid[i][j].indexOf("jianshu")!="-1" || json_data.table_mid[i][j].indexOf("bianhua")!="-1" ||
|
|
json_data.table_mid[i][j].indexOf("je")!="-1"|| json_data.table_mid[i][j].indexOf("bianhua")!="-1" ||
|
|
json_data.table_mid[i][j].indexOf("my_pm")!="-1"){
|
|
if(json_data.table_mid[i][j].indexOf("zhankai")!="-1"){
|
|
str=json_data.table_mid[i][j].split("|");
|
|
srca="<img src="+str[2]+" watermark>";
|
|
html1+="<td><a href='javascript:void(0));' onmouseover='show_kh_pic(\""+str[1]+"\",\""+str[2]+"\")'>"+str[1]+"</a></td>";
|
|
}
|
|
if(json_data.ds=="1"){
|
|
bianhua="shuliang_"+json_data.table_mid[i][0]+"_"+json_data.ds_color[i][0]+"";
|
|
bianhua2="je_"+json_data.table_mid[i][0]+"_"+json_data.ds_color[i][0]+"";
|
|
bianhua3="pm_"+json_data.table_mid[i][0]+"_"+json_data.ds_color[i][0]+"";
|
|
}
|
|
else{
|
|
bianhua="shuliang_"+json_data.table_mid[i][0]+"";
|
|
bianhua2="je_"+json_data.table_mid[i][0]+"";
|
|
bianhua3="pm_"+json_data.table_mid[i][0]+"";
|
|
}
|
|
if(json_data.table_mid[i][j].indexOf("this")!="-1"){
|
|
str=json_data.table_mid[i][j].split("|");
|
|
srca="<span class='td_picture' style='background:;width:150px;display:block;float:left;height:100px;line-height:100px;'><img"+(str[3] ? " src="+str[3] : "")+(str[5] ? " data-original='"+str[5] : "")+"' watermark></span>";
|
|
if(json_data.face=="4")
|
|
html1+='<td width="300px;" style="min-width: 300px; width: 25%;">'+srca+'<span style="display:block;background:;text-align:left;width:150px;height:80px;float:right;"><br>'+str[1]+'<br><p style="text-decoration:underline;" onclick="dk_single('+str[2]+');">'+str[4]+'</p></span></td>';
|
|
else
|
|
html1+='<td width="300px;" style="min-width: 300px; width: 25%;">'+srca+'<span style="display:block;background:;text-align:left;width:150px;height:80px;float:right;"><br>'+str[1]+'<br><p>'+str[4]+'</p></span></td>';
|
|
}
|
|
if(json_data.table_mid[i][j].indexOf("color")!="-1"){
|
|
str=json_data.table_mid[i][j].split("|");
|
|
if(is_mobile=="n"){
|
|
html1+='<td>';
|
|
for(var a=1;a<str.length;a++){
|
|
html1+=''+str[a]+'<br>';
|
|
}
|
|
html1+='</td>';
|
|
}
|
|
}
|
|
if(json_data.table_mid[i][j].indexOf("pma")!="-1"){
|
|
str=json_data.table_mid[i][j].split("|");
|
|
if(str[1]<=3)
|
|
html1+='<td><span style="background:red;width:30px;display:block;color:white;margin:0 auto;">'+str[1]+'</span></td>';
|
|
else
|
|
html1+='<td><span style="background:#D0D0D0;width:30px;display:block;margin:0 auto;">'+str[1]+'</span></td>';
|
|
}
|
|
if(json_data.table_mid[i][j].indexOf("jianshu")!="-1"){
|
|
str=json_data.table_mid[i][j].split("|");
|
|
if(is_mobile=="n")
|
|
html1+="<td style=\"text-decoration:underline;\"><a style=\"color:blue;\" onclick=\"openD('"+str[2]+"','"+str[3]+"')\">"+str[1]+"</a></td>";
|
|
}
|
|
if(json_data.table_mid[i][j].indexOf("bianhua")!="-1"){
|
|
str=json_data.table_mid[i][j].split("|");
|
|
if(is_mobile=="n")
|
|
html1+="<td class='yincang'><span id='"+bianhua+"'>"+str[1]+"</span></td>";
|
|
}
|
|
if(json_data.table_mid[i][j].indexOf("je")!="-1"){
|
|
str=json_data.table_mid[i][j].split("|");
|
|
if(is_mobile=="n")
|
|
html1+="<td class='yincang'><span id='"+bianhua2+"'>"+str[1]+"</span></td>";
|
|
}
|
|
if(json_data.table_mid[i][j].indexOf("my_pm")!="-1"){
|
|
str=json_data.table_mid[i][j].split("|");
|
|
if(is_mobile=="n")
|
|
html1+="<td class='yincang'><span id='"+bianhua3+"'>"+str[1]+"</span></td>";
|
|
}
|
|
}
|
|
else{
|
|
if(is_mobile=="n")
|
|
html1+='<td>'+json_data.table_mid[i][j]+'</td>';
|
|
}
|
|
|
|
}
|
|
html1+='</tr>';
|
|
if(is_mobile=="y")
|
|
$(".yincang").css('display','none');
|
|
lis.push(html1);
|
|
}
|
|
next(lis.join(''), page < res.pages);
|
|
$("#show_table_mid .td_picture").each(function() {
|
|
new Viewer($(this)[0], {
|
|
url: 'data-original'
|
|
,toolbar: false
|
|
,title: false
|
|
,rotatable: false
|
|
,backdrop: false // 点击非图片层关闭
|
|
,viewed: function(event) {
|
|
USetWatermark({
|
|
el: $(event.detail.image)
|
|
,is_sy: json_data.is_sy
|
|
,text: json_data.username
|
|
,font_size: 64
|
|
})
|
|
}
|
|
})
|
|
})
|
|
USetWatermark({
|
|
is_sy: json_data.is_sy
|
|
,text: json_data.username
|
|
})
|
|
}
|
|
},
|
|
error: function () {
|
|
layui.layer.msg("与服务器通信失败!");
|
|
}
|
|
}
|
|
);
|
|
|
|
}
|
|
});
|
|
|
|
//监听屏幕旋转
|
|
$(window).on("orientationchange",function(){
|
|
if(index_dk_single)
|
|
parent.layer.full(index_dk_single);
|
|
})
|
|
|
|
});
|
|
</script>
|
|
<div id="div_kh_pic" style="display:none;position:absolute;top:10px;left:10px;"></div>
|
|
</body>
|
|
|
|
<style>
|
|
body {
|
|
background-color: #f0f0f0;
|
|
}
|
|
.search {
|
|
width: calc(100% - 20px);
|
|
text-align: left;
|
|
background-color: #ffffff;
|
|
margin: 10px;
|
|
}
|
|
#show-table {
|
|
margin: 10px;
|
|
width: calc(100% - 20px);
|
|
height: calc(100vh - 90px - 30px);
|
|
position: relative;
|
|
}
|
|
#show_table_mid {
|
|
height: calc(100vh - 90px - 30px);
|
|
overflow: auto;
|
|
display: block;
|
|
}
|
|
#show_table_mid th {
|
|
position: sticky;
|
|
top: -1px;
|
|
z-index: 1;
|
|
background-color: #d0d0d0; color: #000;
|
|
}
|
|
.layui-table {
|
|
margin: 0;
|
|
}
|
|
.search_con_more td{padding:0px;margin:0px;color:#000;}
|
|
|
|
.mid_style{
|
|
height:auto;
|
|
}
|
|
</style>
|
|
</html> |